/* Step 3 (designer 2026-11-19): the whole game in the "Sunday bulletin" look (theme.css). Daytime paper
   only for now (an evening version is an open question in DESIGN-PLAN.md). */
:root {
  --bg: var(--mc-paper); --panel: var(--mc-card); --ink: var(--mc-ink); --muted: var(--mc-ink-soft); --line: var(--mc-rule);
  --accent: var(--mc-member); --accent-ink: #fffdf7; --good: #4f6b34; --bad: #a2302a; --warn-bg: #fbf0d3; --warn-line: #d4a12a;
  --hc: var(--mc-hc); --pc: var(--mc-pc); --cc: var(--mc-cc); --ch: var(--mc-change);
  --fruit: var(--mc-fruit-tint); --sin: var(--mc-sin-tint); --member: var(--mc-member-tint); --path: var(--mc-event-tint); --loc: var(--mc-location-tint); --round: var(--mc-round-tint);
  --back: var(--mc-back); --empty: var(--mc-paper);
  --shadow: var(--mc-shadow);
  --wood: #6b4a2e; --wood-dark: #4f3520; --wood-light: #8a6440;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); font: 15px/1.4 var(--mc-body);
  background: radial-gradient(circle at 1px 1px, rgba(110, 90, 60, .07) 1px, transparent 1.3px) 0 0 / 6px 6px, var(--bg); }
#app { max-width: 1500px; margin: 0 auto; padding: 12px 16px 40px; }
h1 { font: 700 30px/1.1 var(--mc-head); margin: 4px 0 12px; letter-spacing: .01em; }
h2 { font: 700 18px/1.2 var(--mc-head); margin: 0 0 8px; }
/* Area titles are written like book titles (designer 2026-11-19), not in capitals. */
h3 { font: 700 14px/1.2 var(--mc-head); margin: 12px 0 6px; color: var(--muted); letter-spacing: .01em; }
h3 .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.loading { color: var(--muted); }
/* Panels are folded bulletin sheets: card stock with a thin printed double rule. */
.panel { position: relative; background: var(--panel); border: 1px solid #c9b998; border-radius: 6px; padding: 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.panel::before { content: ""; position: absolute; inset: 4px; border: 1px solid var(--mc-rule); border-radius: 3px; pointer-events: none; }
.panel > * { position: relative; }
/* The masthead at the top of each screen */
.masthead { text-align: center; border-top: 3px double var(--ink); border-bottom: 3px double var(--ink); padding: 10px 8px 8px; margin: 6px 0 18px; }
.masthead h1 { font-size: 40px; margin: 0; }
.masthead .sub { font: italic 600 15px/1.4 var(--mc-head); letter-spacing: .04em; color: var(--muted); margin-top: 5px; }
.masthead .tagline { font: 400 14px/1.4 var(--mc-body); color: var(--ink); margin-top: 4px; }
#app:not(.game-mode) > .panel, #app:not(.game-mode) > p { max-width: 820px; margin-left: auto; margin-right: auto; }
#app:not(.game-mode) > .masthead { max-width: 820px; margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); }
.small-note { font-size: 12px; margin: 8px 0 0; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 12px; }
@media (max-width: 1000px) { .grid { grid-template-columns: 1fr; } }

button { font: 600 14px/1.2 var(--mc-body); border: 1.5px solid var(--mc-ink-soft); background: #fffdf7; color: var(--ink); border-radius: 7px; padding: 6px 12px; cursor: pointer; }
button:hover { border-color: var(--ink); background: var(--mc-paper-2); }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.primary:hover { background: #2a3956; border-color: #2a3956; }
button.small { font-size: 12px; padding: 3px 8px; border-width: 1px; }
button:disabled { opacity: .5; cursor: default; }
input, select { font: inherit; padding: 5px 8px; border: 1px solid #bfae8e; border-radius: 6px; background: #fffdf7; color: var(--ink); }

/* ---- Board (Board Design tab: 5 rows x 9 card slots) */
/* The game screen is one view filling the window: zoom with the scroll wheel, move by dragging with the
   mouse wheel held down. The screen inside has a fixed layout (it's scaled, not rearranged). */
#app.game-mode { max-width: none; padding: 0; }
.game-view { position: fixed; inset: 0; overflow: hidden; background: var(--bg); touch-action: none; }
.game-view.panning, .game-view.panning * { cursor: grabbing !important; user-select: none; }
.game-canvas { position: absolute; top: 0; left: 0; transform-origin: 0 0; width: 1720px; padding: 14px 16px 30px; } /* wide enough that the table has the same margin on both sides of its 9 columns (designer 2026-11-20) */
.game-canvas .grid { grid-template-columns: minmax(0, 1fr) 400px; }
.game-canvas .zones { flex-direction: row; }
.game-canvas .zone-loc { flex: 0 0 var(--mc-face-w, 170px); width: var(--mc-face-w, 170px); } /* one card wide (designer 2026-11-19) */
/* Sound and music (design step 5): a button in the bottom-left corner of every screen. */
.sound-tools { position: fixed; left: 12px; bottom: 12px; z-index: 6; font-size: 12px; }
.sound-tools > button { box-shadow: var(--shadow); background: var(--panel); }
.sound-panel { position: absolute; left: 0; bottom: calc(100% + 6px); width: 230px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow); display: grid; gap: 8px; }
.sound-panel[hidden] { display: none; }
.sound-panel label { display: grid; gap: 2px; font-weight: 600; }
.sound-panel label.mute { display: flex; gap: 6px; align-items: center; }
.sound-panel input[type=range] { width: 100%; padding: 0; accent-color: var(--accent); }
.sound-panel p { margin: 0; font-size: 11px; }
.zoom-tools { position: fixed; right: 12px; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; justify-content: flex-end;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; box-shadow: var(--shadow); font-size: 12px; max-width: calc(100vw - 120px); } /* (leaves room for the Sound button) */
.board { display: grid; grid-template-columns: repeat(9, var(--mc-face-w, 170px)); gap: 18px 12px; width: max-content; margin: 0 auto; }
/* The shared board is a wooden table (designer 2026-11-19, instead of a bulletin board): warm oak planks,
   close to the old cork color, with the cards lying on it. */
.panel.board-panel { background:
    /* plank seams */
    repeating-linear-gradient(180deg, transparent 0 168px, rgba(60, 35, 15, .45) 168px 170px, rgba(255, 230, 190, .12) 170px 171px, transparent 171px 172px),
    /* fine grain */
    repeating-linear-gradient(178.6deg, rgba(90, 55, 25, .10) 0 2px, transparent 2px 7px, rgba(255, 235, 200, .06) 7px 9px, transparent 9px 15px),
    repeating-linear-gradient(181.2deg, transparent 0 23px, rgba(80, 48, 20, .12) 23px 25px, transparent 25px 41px),
    /* soft light and shade across the planks */
    radial-gradient(ellipse 60% 40% at 30% 20%, rgba(255, 230, 190, .18), transparent 70%),
    radial-gradient(ellipse 50% 50% at 80% 85%, rgba(60, 35, 15, .18), transparent 70%),
    linear-gradient(90deg, #b48756, #bf9262 35%, #b0824f 65%, #bb8e5d);
  border: 10px solid var(--wood); border-radius: 10px; padding: 18px 20px 12px;
  box-shadow: inset 0 2px 12px rgba(40, 22, 8, .35), 0 0 0 2px var(--wood-dark), 0 6px 16px rgba(60, 40, 20, .3); }
.panel.board-panel::before { display: none; }
.board > .card .slot-label { color: #fff6e3; text-shadow: 0 1px 2px rgba(0, 0, 0, .55); }
/* Cards lie on the table: a soft shadow underneath. Pointing at any card lifts it a little off the table. */
.board > .card .mc-face, .board > .card .mc-back { box-shadow: 0 4px 8px rgba(40, 22, 8, .4), 0 1px 2px rgba(40, 22, 8, .3);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; }
.board > .card:hover .mc-face, .board > .card:hover .mc-back { transform: translateY(-6px); box-shadow: 0 12px 18px rgba(40, 22, 8, .38), 0 2px 4px rgba(40, 22, 8, .25); }
/* Cards in your hand and in a card's question lift too. */
.zone-hand .card .mc-face, .choice .card .mc-face, .choice .card .mc-back, .loc-pick .card .mc-face { transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; }
.zone-hand .card:hover .mc-face, .choice-main .card:hover .mc-face, .choice-main .card.buyable:hover .mc-back, .loc-pick .card:hover .mc-face { transform: translateY(-6px); box-shadow: 0 12px 18px rgba(40, 22, 8, .3), 0 2px 4px rgba(40, 22, 8, .2); }
.card.back.buyable { cursor: pointer; }
/* Cards you can use right now: buy from the board, play from your hand, pick in a card's question
   (designer 2026-11-20). A warm, soft yellow glow around the edges; pointing at one turns it to a cool
   blue-white light, and a left click does it. Cards you can't use right now are a little darker. */
.card.buyable { cursor: pointer; }
/* The glow is only on the board (designer 2026-11-20: none for your hand or a question's cards). */
.board > .card.buyable .mc-face { box-shadow: 0 0 0 2px #f6d27a, 0 0 12px 4px rgba(255, 196, 82, .75), 0 4px 8px rgba(40, 22, 8, .35); }
.board > .card.buyable:hover .mc-face { box-shadow: 0 0 0 2px #f4f9ff, 0 0 16px 6px rgba(168, 208, 255, .95), 0 12px 18px rgba(40, 22, 8, .35); }
.card.unbuyable .mc-face { filter: brightness(.8) saturate(.85); }
.card.unbuyable:hover .mc-face { filter: brightness(.88) saturate(.9); }
.board .card .empty-face { border-color: rgba(255, 246, 227, .55); background: rgba(255, 246, 227, .08); }
.board-panel .small-note { color: #fff6e3; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); margin-top: 12px; }
/* The top of the game screen: a bulletin masthead line */
.topbar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; border-top: 3px double var(--ink); border-bottom: 3px double var(--ink); padding: 6px 4px; margin: 0 0 14px; }
.topbar h1 { margin: 0; font-size: 28px; }
.topbar .order { text-align: center; font: 600 14px/1.3 var(--mc-head); letter-spacing: .02em; color: var(--muted); }
.topbar .order b { color: var(--ink); }
.top-tools { display: flex; gap: 10px; align-items: center; font-size: 13px; }

/* ---- Cards: the standard card face (theme.css .mc-face, all cards the same size), with the slot name
   above it and the sale tag, notes and buttons below it */
.card { position: relative; cursor: pointer; width: var(--mc-face-w, 170px); display: flex; flex-direction: column; gap: 4px; }
.card .slot-label { font: 600 11px/1.2 var(--mc-body); letter-spacing: .01em; color: var(--muted); padding: 0 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .as { font-size: 11px; line-height: 1.3; background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 5px; padding: 3px 6px; }
.card .status { font: 600 11px/1.3 var(--mc-body); color: var(--accent); padding: 0 2px; }
.card .cb { display: flex; flex-wrap: wrap; gap: 4px; }
.mc-face.ghost::after { top: 38%; font-size: 13px; }
/* Chips (sale tags, member groups) */
.chip { font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 9px; border: 1px solid currentColor; line-height: 16px; background: #fffdf7; }
.chip.hc { color: var(--mc-hc); } .chip.pc { color: var(--mc-pc); } .chip.cc { color: var(--mc-cc); } .chip.sp { color: var(--mc-ink-soft); }
/* Sale prices: the old cost gets a diagonal red line through it, the new cost sits below like a sale sign. */
.mc-seal.struck { position: relative; opacity: .7; }
.mc-seal.struck::after { content: ""; position: absolute; left: -3px; right: -3px; top: 50%; border-top: 2.5px solid #c8102e; transform: rotate(-35deg); }
.chip.struck { position: relative; opacity: .65; }
.chip.struck::after { content: ""; position: absolute; left: -2px; right: -2px; top: 50%; border-top: 2px solid #c8102e; transform: rotate(-18deg); }
.sale-tag { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; padding: 2px 5px; border: 1.5px dashed #c8102e; border-radius: 4px; background: #fff3f0; color: var(--mc-ink); }
.sale-tag .sale-word { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: #c8102e; border-radius: 3px; padding: 0 4px; line-height: 15px; }
.sale-tag b { color: #c8102e; font-size: 12px; }
.sale-tag .sale-why { flex-basis: 100%; font-size: 10px; line-height: 1.25; color: #8a1c1c; }
/* "τετέλεσται" stamped diagonally on a Location paid in full, below the middle so the Action stays readable */
.face-wrap { position: relative; }
.card-stamp { position: absolute; left: 50%; top: 78%; transform: translate(-50%, -50%) rotate(-24deg); pointer-events: none; z-index: 2;
  font: 700 26px/1 var(--mc-head); letter-spacing: .04em; color: #b3261e; white-space: nowrap;
  border: 3px double #b3261e; border-radius: 6px; padding: 5px 10px 6px; background: rgba(255, 250, 240, .35); opacity: .85;
  -webkit-mask: radial-gradient(circle at 30% 40%, #000 62%, rgba(0, 0, 0, .6) 100%); mask: radial-gradient(circle at 30% 40%, #000 62%, rgba(0, 0, 0, .6) 100%); }
.mc-face.on-sale { box-shadow: 0 0 0 2px #c8102e88, var(--mc-shadow); }
.card .sale-tag { margin-top: -1px; }
/* Card backs (decks, face-down Sins): the same size as a card face */
.card.back { cursor: default; }
.card .mc-back { aspect-ratio: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px 8px; }
.card .mc-back .back-emblem { width: 60%; max-width: 90px; position: relative; }
.card .mc-back .back-emblem svg { width: 100%; display: block; }
.card .mc-back .back-name { font: 700 13.5px/1.2 var(--mc-head); text-align: center; position: relative; }
.card .mc-back .deck-count { font: 600 11.5px/1.2 var(--mc-body); opacity: .9; position: relative; }
/* Empty board spots */
.card.empty { cursor: default; }
.card .empty-face { border: 1.5px dashed var(--mc-rule); border-radius: 10px; background: color-mix(in srgb, var(--mc-paper) 70%, transparent); }
/* A tier nobody has reached yet takes less room on the board */
.board .card.compact .mc-face-size { height: 92px; }
.board .card.compact .back-emblem { width: 34px; }
.card[draggable="true"] { cursor: grab; }
.card.dragging { opacity: .4; }
.card.drop-before { box-shadow: -5px 0 0 var(--accent), var(--mc-shadow); }

/* ---- Animations (design step 4, ui/animate.js): a layer above everything that clicks pass through */
#animLayer { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.anim-ghost { position: fixed; transform-origin: 0 0; will-change: transform, opacity; }
.anim-ghost > .card { width: var(--mc-face-w, 170px); }
/* A card you gain: it flies to the middle of the screen, flips, then goes to where it belongs (designer 2026-11-21) */
.anim-flash { position: fixed; left: 0; top: 0; transform-origin: 0 0; will-change: transform, opacity; filter: drop-shadow(0 10px 26px rgba(40, 25, 10, .35)); }
.anim-flash .flip { position: relative; transform-style: preserve-3d; }
.anim-flash .side { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.anim-flash .side.back { position: absolute; inset: 0; transform: rotateY(180deg); }
.anim-flash .card { width: var(--mc-face-w, 170px); margin: 0; }
.anim-flash .side { position: relative; }
.anim-flash .side.back { position: absolute; }
/* Words across a flashing card (a face-down Sin: "HIDDEN SIN"): red, a little see-through */
.flash-label { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-14deg); white-space: nowrap; pointer-events: none;
  font: 800 30px/1 var(--mc-head); letter-spacing: .06em; text-transform: uppercase; color: #d0201f; opacity: .72;
  padding: 4px 10px; border: 3px solid currentColor; border-radius: 6px; background: rgba(255, 253, 247, .25); }
.anim-toast { position: fixed; font: 700 15px/1 var(--mc-head); color: var(--mc-ink); background: #fffdf7; border: 1.5px solid var(--mc-ink-soft);
  border-radius: 6px; padding: 5px 10px; box-shadow: var(--mc-shadow); white-space: nowrap; }
.anim-moment { position: fixed; left: 50%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.anim-moment .mc-stamp { font-size: 40px; background: rgba(255, 253, 247, .9); transform: none; box-shadow: 0 6px 24px rgba(40, 25, 10, .25); }
.anim-moment .mc-stamp.turn { white-space: nowrap; font-size: clamp(20px, 5.5vw, 40px); } /* ("Ben's turn" on one line) */
.anim-moment.coin, .anim-moment.dice { background: rgba(255, 253, 247, .95); border: 1px solid var(--mc-rule); border-radius: 12px; padding: 16px 22px 12px; box-shadow: 0 8px 30px rgba(40, 25, 10, .3); }
.anim-caption { font: 600 15px/1.3 var(--mc-head); color: var(--mc-ink); text-align: center; }
/* 3D dice and coins (dice3d.js, designer 2026-11-21): a small wooden tray, like the board, about a quarter of the
   screen wide. --u: the floor's width in px; --d: a die's size; --c, --t: the coin's size and thickness. */
.roll-box { position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%); width: clamp(220px, 25vw, 420px);
  padding: 12px; border-radius: 12px;
  background: linear-gradient(180deg, var(--wood-light), var(--wood) 40%, var(--wood-dark));
  box-shadow: 0 0 0 2px var(--wood-dark), 0 14px 40px rgba(40, 22, 8, .45), inset 0 1px 0 rgba(255, 230, 190, .35); }
.roll-floor { position: relative; width: 100%; aspect-ratio: 1; border-radius: 5px; perspective: 900px; perspective-origin: 50% 50%;
  background:
    repeating-linear-gradient(180deg, transparent 0 calc(var(--u, 300px) / 4 - 2px), rgba(60, 35, 15, .45) calc(var(--u, 300px) / 4 - 2px) calc(var(--u, 300px) / 4), rgba(255, 230, 190, .12) calc(var(--u, 300px) / 4) calc(var(--u, 300px) / 4 + 1px), transparent calc(var(--u, 300px) / 4 + 1px) calc(var(--u, 300px) / 4)),
    repeating-linear-gradient(178.6deg, rgba(90, 55, 25, .10) 0 2px, transparent 2px 7px, rgba(255, 235, 200, .06) 7px 9px, transparent 9px 15px),
    repeating-linear-gradient(181.2deg, transparent 0 23px, rgba(80, 48, 20, .12) 23px 25px, transparent 25px 41px),
    radial-gradient(ellipse 60% 40% at 30% 20%, rgba(255, 230, 190, .18), transparent 70%),
    radial-gradient(ellipse 50% 50% at 80% 85%, rgba(60, 35, 15, .18), transparent 70%),
    linear-gradient(90deg, #b48756, #bf9262 35%, #b0824f 65%, #bb8e5d);
  box-shadow: inset 0 0 0 3px var(--wood-dark), inset 0 4px 14px rgba(40, 22, 8, .55), inset 0 -2px 6px rgba(255, 230, 190, .15); }
.roll-caption { min-height: 2.6em; display: grid; place-items: center; padding: 6px 4px 2px; text-align: center;
  font: 600 14px/1.3 var(--mc-head); color: #fbeedb; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); opacity: .75; }
.roll-caption.shown { opacity: 1; }
.roll-caption span { white-space: nowrap; font-size: clamp(11px, 1vw, 14px); }
.roll-caption small { display: block; font-size: 12px; font-weight: 600; opacity: .9; }
.roll-caption b { padding: 0 3px; border-radius: 4px; background: #fffdf7; text-shadow: none; }
.roll-caption b.m { color: var(--mc-member); } .roll-caption b.s { color: var(--mc-sin); }
.roll-caption b.h, .roll-caption b.t { color: #6b4f12; }
.roll-obj { position: absolute; left: 50%; top: 50%; transform-style: preserve-3d; will-change: transform; }
.roll-shadow { position: absolute; left: 50%; top: 50%; width: calc(var(--d, 50px) * 1.15); height: calc(var(--d, 50px) * 1.15);
  margin: calc(var(--d, 50px) * -.575); border-radius: 30%; background: radial-gradient(closest-side, rgba(30, 15, 5, .75), rgba(30, 15, 5, 0)); opacity: .5; }
.roll-shadow.coin { width: calc(var(--c, 70px) * 1.1); height: calc(var(--c, 70px) * 1.1); margin: calc(var(--c, 70px) * -.55); border-radius: 50%; }
.die3d { width: var(--d); height: var(--d); margin: calc(var(--d) / -2); }
.die-body { position: absolute; inset: 0; transform-style: preserve-3d; }
.die-face, .die-core { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.die-core { background: #e9dfc8; }
.die-face { display: grid; place-items: center; border-radius: 16%; font: 800 calc(var(--d) * .62)/1 var(--mc-head);
  background: radial-gradient(circle at 30% 25%, #fffef9, #f7f0df 60%, #e6dbc2); box-shadow: inset 0 0 calc(var(--d) * .08) rgba(120, 95, 50, .35); }
.die3d.member .die-face span { color: var(--mc-member); } .die3d.sin .die-face span { color: var(--mc-sin); }
.die3d.member .die-face { border: calc(var(--d) * .035) solid color-mix(in srgb, var(--mc-member) 55%, #fff); }
.die3d.sin .die-face { border: calc(var(--d) * .035) solid color-mix(in srgb, var(--mc-sin) 55%, #fff); }
.die3d.lit .die-face { box-shadow: inset 0 0 calc(var(--d) * .08) rgba(120, 95, 50, .35), 0 0 calc(var(--d) * .25) rgba(255, 236, 160, .9); }
.coin3d { width: var(--c); height: var(--c); margin: calc(var(--c) / -2); }
.coin-body { position: absolute; inset: 0; transform-style: preserve-3d; }
.coin-rim { position: absolute; inset: 0; border-radius: 50%; background: #9c7420; }
.coin-rim.silver { background: #8d9198; }
.coin-face { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  font: 800 calc(var(--c) * .46)/1 var(--mc-head); color: #6b4f12; border: calc(var(--c) * .05) solid #b8871f;
  background: radial-gradient(circle at 35% 30%, #fff1b8, #e2b444 52%, #b5872a); box-shadow: inset 0 0 0 calc(var(--c) * .06) rgba(255, 240, 190, .45); }
.coin-face.tails { color: #3f444b; border-color: #9aa0a8; background: radial-gradient(circle at 35% 30%, #ffffff, #c9cdd3 52%, #8f949c);
  box-shadow: inset 0 0 0 calc(var(--c) * .06) rgba(255, 255, 255, .5); }
.coin3d.lit .coin-face { box-shadow: inset 0 0 0 calc(var(--c) * .06) rgba(255, 240, 190, .45), 0 0 calc(var(--c) * .25) rgba(255, 236, 160, .95); }
.anim-coins { display: flex; gap: 10px; }
.anim-coin { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font: 800 26px/1 var(--mc-head); color: #6b4f12;
  background: radial-gradient(circle at 35% 30%, #fff1b8, #d9a93a 55%, #a67a1f); border: 3px solid #8a6416; box-shadow: inset 0 0 0 4px rgba(255, 240, 190, .5);
  animation: coin-spin .9s cubic-bezier(.3,.6,.3,1) both; }
.anim-coin[data-face="Tails"] { color: #5a4a2a; background: radial-gradient(circle at 35% 30%, #f1ece0, #b9ad95 55%, #8a7f6a); border-color: #6f6553; }
.anim-coin span { animation: show-late .9s steps(1) both; }
@keyframes coin-spin { 0% { transform: translateY(0) rotateX(0); } 45% { transform: translateY(-40px) rotateX(900deg); } 100% { transform: translateY(0) rotateX(1800deg); } }
@keyframes show-late { 0%, 85% { opacity: 0; } 100% { opacity: 1; } }
.anim-dice { display: flex; gap: 14px; }
.anim-die { width: 60px; height: 60px; border-radius: 11px; display: grid; place-items: center; font: 800 30px/1 var(--mc-head); box-shadow: 0 3px 0 rgba(0, 0, 0, .25);
  animation: die-tumble .9s cubic-bezier(.3,.6,.3,1) both; }
.anim-die.member { background: #fffdf7; color: var(--mc-member); border: 2.5px solid var(--mc-member); }
.anim-die.sin { background: #fffdf7; color: var(--mc-sin); border: 2.5px solid var(--mc-sin); animation-delay: .08s; }
.anim-die span { animation: show-late .9s steps(1) both; }
@keyframes die-tumble { 0% { transform: translate(-60px, -30px) rotate(-200deg); opacity: 0; } 60% { transform: translate(6px, 4px) rotate(20deg); opacity: 1; } 100% { transform: none; } }
.anim-bump { display: inline-flex; animation: bump .45s ease-out; }
.anim-bump.down { animation-name: bump-down; }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes bump-down { 0% { transform: scale(1); } 35% { transform: scale(.85); } 100% { transform: scale(1); } }

/* ---- Money bar, alerts */
.stats { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 15px; }
.stat b { font-size: 18px; }
.stats .mc-token { font-size: 17px; }
/* Your pew: a wooden pew back across the top of your area */
.panel.pew { padding-top: 0; overflow: hidden; }
.pew-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 -14px 12px; padding: 9px 18px 8px;
  background: linear-gradient(180deg, var(--wood-light), var(--wood) 55%, var(--wood-dark)); color: #fbeedb;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); }
.pew-head h2 { margin: 0; color: #fbeedb; text-shadow: 0 1px 1px rgba(0, 0, 0, .4); }
.your-turn, .their-turn { font: 700 12px/1 var(--mc-body); letter-spacing: .02em; padding: 5px 9px; border-radius: 4px;
  background: #fbeedb; color: var(--wood-dark); }
.their-turn { background: var(--accent); color: #fffdf7; vertical-align: middle; margin-left: 6px; }
/* Other players: their cards at a smaller size (the same card, scaled down) */
.compact-cards { zoom: .62; gap: 10px; }
.hc b { color: var(--hc); } .pc b { color: var(--pc); } .cc b { color: var(--cc); } .ch b { color: var(--ch); }
.badge { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 10px; background: var(--sin); }
.alert { margin: 8px 0; padding: 8px 10px; border: 1px solid var(--warn-line); background: var(--warn-bg); border-radius: 8px; font-weight: 600; }
.zones { display: flex; gap: 16px; }
.zone-loc { flex: 0 0 var(--mc-face-w, 170px); width: var(--mc-face-w, 170px); }
.zone-loc h3 { white-space: nowrap; }
.zone-loc .muted { font-size: 13px; }
.zone-hand { flex: 1; min-width: 0; }
@media (max-width: 700px) { .zones { flex-direction: column; } .zone-loc { flex: none; } }

/* ---- Computer players */
/* One player per line, always (designer 2026-11-20); people first, then computers with their Difficulty,
   Focus and Style boxes lined up under those titles (designer 2026-11-21). Narrow screens scroll sideways. */
.seats { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; overflow-x: auto; max-width: 100%; padding-bottom: 2px; }
.seat-row { display: grid; grid-template-columns: 170px 110px 200px 110px 130px; gap: 6px; align-items: center; }
.seat-row > * { min-width: 0; }
.seat-heads { margin: 6px 0 -4px; font: 700 12px/1.2 var(--mc-body); letter-spacing: .08em; text-transform: uppercase; color: var(--mc-ink-soft); }
.turn-order { margin: 4px 0 0; padding-left: 26px; }
.turn-order li { margin: 3px 0; }
.turn-order li span { display: inline-block; min-width: 170px; }
.turn-order button { padding: 1px 8px; }
.level-notes { margin: 8px 0 0; padding-left: 20px; font-size: 13px; }
.level-notes li { margin: 2px 0; }
.thinking { margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: var(--member); border: 1px solid var(--line); font-weight: 600; }

/* ---- Online play */
.open-seat { display: inline-block; padding: 5px 8px; border: 1px dashed var(--line); border-radius: 6px; color: var(--muted); }
.room-code { font-family: var(--mc-body); background: var(--member); padding: 1px 8px; border-radius: 6px; letter-spacing: .05em; }
.lobby-seats { padding-left: 18px; }
.lobby-seats li { margin: 6px 0; }
.online-bar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 14px; padding: 8px 12px; }
.online-seat { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.online-seat.deciding { font-weight: 700; color: var(--accent); }

/* ---- Choice, moves, players, log */
.choice { border: 2px solid var(--accent); }
.choice .opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.choice-body { display: flex; gap: 14px; align-items: flex-start; }
.choice-source { flex: 0 0 auto; }
.choice-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 700px) { .choice-body { flex-direction: column; } }
.moves .group { margin-bottom: 8px; }
.moves .group > div { display: flex; flex-wrap: wrap; gap: 5px; }
.log { max-height: 420px; overflow: auto; font-size: 13px; }
.log div { padding: 2px 0; border-bottom: 1px dotted var(--line); }
/* Whose turn it is (design step 6): a warm candle-like glow around that player's area, gently breathing. */
.player.current, .panel.pew.turn { box-shadow: 0 0 0 3px #e6b54f, 0 0 18px 4px rgba(230, 181, 79, .55), var(--shadow);
  animation: mc-turn-glow 2.8s ease-in-out infinite; }
@keyframes mc-turn-glow {
  50% { box-shadow: 0 0 0 3px #f1c76a, 0 0 28px 9px rgba(241, 199, 106, .75), var(--shadow); }
}
.anim-off .player.current, .anim-off .panel.pew.turn { animation: none; }
@media (prefers-reduced-motion: reduce) { .player.current, .panel.pew.turn { animation: none; } }
.player.current .their-turn { background: #8a6420; }
.thinking { background: var(--mc-member-tint); border-color: #b9c4d8; }
.log div { font-size: 13px; }
.choice { border: 2px solid var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent), var(--shadow); }
.choice > h2 { font-size: 20px; }
/* The winner celebration (design step 6): golden light rays behind the stamp and paper confetti falling. */
.panel.end { overflow: hidden; }
.panel.end > .celebrate { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; border-radius: 6px; }
.panel.end > :not(.celebrate) { z-index: 1; }
.celebrate .rays { position: absolute; left: 50%; top: 52px; width: 1100px; height: 1100px; margin: -550px 0 0 -550px; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(246, 210, 122, .42) 0deg 7deg, rgba(246, 210, 122, 0) 7deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 0, #000 12%, transparent 62%); mask: radial-gradient(circle, #000 0, #000 12%, transparent 62%);
  animation: mc-rays 60s linear infinite; }
.celebrate.still .rays { animation: none; }
@keyframes mc-rays { to { transform: rotate(360deg); } }
.celebrate i { position: absolute; top: -24px; border-radius: 1px; opacity: 0; box-shadow: 0 1px 1px rgba(40, 22, 8, .18);
  animation: mc-confetti 5s cubic-bezier(.3, .2, .6, 1) 2 both; }
@keyframes mc-confetti {
  0% { opacity: 0; transform: translate(0, 0) rotate(0) rotateX(0); }
  8% { opacity: 1; }
  50% { transform: translate(calc(var(--spin) * 26px), 300px) rotate(calc(var(--spin) * 240deg)) rotateX(360deg); }
  90% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(var(--spin) * -14px), 620px) rotate(calc(var(--spin) * 520deg)) rotateX(720deg); }
}
@media (prefers-reduced-motion: reduce) { .celebrate .rays { animation: none; } }
.end-stamp { text-align: center; margin: 6px 0 14px; }
/* The link to the How to Play page (design step 6) */
.how-link { font: 600 13px/1.2 var(--mc-body); color: var(--accent); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
h2 .how-link { float: right; margin-top: 4px; }
a { color: var(--accent); }
.panel.end h2 { text-align: center; font-size: 26px; }
.panel.end table.scores { margin: 0 auto 12px; background: var(--panel); border-radius: 6px; box-shadow: 0 0 0 6px var(--panel); }
.panel.end > p { text-align: center; }
.cover h2 { font-size: 26px; }
details > summary { cursor: pointer; color: var(--muted); font-size: 13px; margin: 8px 0 4px; }
.cover { text-align: center; padding: 60px 20px; }
.cover h2 { font-size: 24px; }
.error { color: var(--bad); font-weight: 600; }
table.scores { border-collapse: collapse; }
table.scores td, table.scores th { padding: 4px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.setup label { display: block; margin: 8px 0 4px; font-weight: 600; }
.picker { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; padding: 6px; columns: 2 220px; font-size: 13px; }
.picker label { font-weight: 400; margin: 0; }

/* ---- Full-size card / Location list */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 10; overflow: auto; }
.modal-box { background: var(--panel); border-radius: 12px; padding: 16px; max-width: 900px; width: 100%; box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.big-view { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.big-view .mc-card.big { flex: 0 0 auto; max-width: 100%; }
.big-notes { flex: 1 1 260px; min-width: 0; }
.big-notes h3:first-child { margin-top: 0; }
.big-notes p, .big-notes ul { margin: 4px 0; }
.big-notes .sale-tag { display: inline-flex; margin-top: 4px; }
