/* Rent Rush: warm board-game look. Cream parchment surfaces, chunky cards with a cocoa outline and a hard bottom
   shadow, green primary buttons, marigold and brick accents, a wooden table. Lilita One for the wordmark, headings,
   numbers and buttons, Fredoka for text. Fonts are bundled (OFL), nothing external. */
@font-face { font-family: "Lilita One"; src: url(/fonts/lilita-one.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Fredoka"; src: url(/fonts/fredoka.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }
:root {
  --bg: #fbeed6; --bg2: #f4dfb8; --card: #fffaf1; --well: #f8edd8; --ink: #2e231c; --text: #2e231c; --muted: #8c7b68; --soft: #e8d8bc;
  --line: rgba(46,35,28,.14); --line2: #cdb998;
  --green: #2f9e55; --green-d: #1f7a3e; --green-l: #d7eedb;
  --marigold: #f6a723; --marigold-l: #fdeec6; --brick: #dc5a3c; --brick-l: #f8d9cf; --teal: #2f97a6; --teal-l: #d9edf0;
  --wood: #8f5c34; --wood-d: #5c3a21;
  --amber: var(--marigold); --red: var(--brick);
  --radius: 18px; --shadow: 0 4px 0 var(--ink);
  --display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Fredoka", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; color: var(--text); font: 500 16px/1.45 var(--body); -webkit-text-size-adjust: 100%; }
html { background: var(--bg); }
body { overflow-x: hidden; min-height: 100vh; background: radial-gradient(120% 80% at 50% 0%, #fff7e6 0%, var(--bg) 55%, var(--bg2) 100%) fixed; }
a { color: #b06d05; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; margin: 0 0 .5rem; letter-spacing: .01em; }
h1 { font-size: 1.85rem; } h2 { font-size: 1.32rem; } h3 { font-size: 1.05rem; margin-top: .9rem; }
p { margin: .4rem 0; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 12px; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .good { color: var(--green-d); } .bad { color: var(--brick); }
.center { text-align: center; }
.row { display: flex; align-items: center; } .row.gap { gap: 8px; } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; gap: 8px; } .row.center { justify-content: center; }
.card { background: var(--card); border: 2.5px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin: 14px 0; }
.card > h2:first-child, .sec-h { display: flex; align-items: center; gap: 8px; }
.card > h2:first-child::before, .sec-h::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--marigold); border: 2px solid var(--ink); flex: none; }
code { font-family: ui-monospace, Consolas, monospace; word-break: break-all; }
.num { font-family: var(--display); font-weight: 400; }
.ic { flex: none; display: block; }

/* splash / loading */
.loading { min-height: 50vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 3rem 1rem; text-align: center; color: var(--muted); font: 600 1rem var(--body); }
.loading::before { content: "RENT RUSH"; font: 400 2.2rem/1 var(--display); color: #fff; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink); letter-spacing: .02em; }
.loading::after { content: ""; width: 120px; height: 12px; border-radius: 12px; border: 2.5px solid var(--ink); background: linear-gradient(90deg, var(--marigold) 0 40%, #fff 40%) 0 0 / 200% 100%; animation: rush 1.1s linear infinite; }
@keyframes rush { to { background-position: -200% 0; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 14px; border: 2.5px solid var(--ink); background: #fff; color: var(--ink); font: 400 1rem/1 var(--display); letter-spacing: .02em; cursor: pointer; text-decoration: none; touch-action: manipulation; box-shadow: 0 3px 0 var(--ink); transition: transform .06s, box-shadow .06s, background .15s; }
.btn:hover:not(:disabled) { background: #fff7ea; }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--green); color: #fff; }
.btn.primary:hover:not(:disabled) { background: #34ab5d; }
.btn.amber { background: var(--marigold); color: var(--ink); }
.btn.amber:hover:not(:disabled) { background: #f8b23e; }
.btn.ghost { background: transparent; box-shadow: none; border-color: var(--line2); color: var(--muted); }
.btn.big { min-height: 56px; font-size: 1.25rem; padding: 0 22px; border-radius: 16px; box-shadow: 0 4px 0 var(--ink); }
.btn.block { display: flex; width: 100%; margin: 12px 0; }
.btn.tiny { min-height: 36px; padding: 0 12px; font-size: .88rem; border-radius: 11px; gap: 6px; box-shadow: 0 2px 0 var(--ink); border-width: 2px; }
.link { background: none; border: 0; color: #b06d05; font: inherit; cursor: pointer; padding: 4px 6px; min-height: 32px; text-decoration: underline; }
.icon-btn { background: #fff; border: 2.5px solid var(--ink); border-radius: 12px; color: var(--ink); font-size: 1.05rem; min-width: 44px; min-height: 44px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 0 var(--ink); }
.chip { min-height: 40px; min-width: 40px; padding: 0 10px; border-radius: 999px; border: 2.5px solid var(--ink); background: #fff; color: var(--ink); font: 400 .92rem var(--display); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 0 var(--ink); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 10px; border-radius: 999px; border: 2px solid var(--ink); background: var(--well); color: var(--ink); font: 600 .72rem/1.6 var(--body); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; vertical-align: middle; }
.pill.amber { background: var(--marigold); } .pill.green { background: var(--green-l); color: var(--green-d); } .pill.red { background: var(--brick-l); color: #a83a22; }
input, select { font: 500 1rem var(--body); color: var(--ink); background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; min-height: 46px; padding: 0 12px; min-width: 0; width: 100%; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; }
.row input { flex: 1; }
.seg { display: flex; gap: 6px; margin: 8px 0; }
.seg button { flex: 1; min-height: 44px; border-radius: 14px; border: 2.5px solid var(--ink); background: #fff; color: var(--ink); font: 400 .98rem var(--display); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 2px 0 var(--ink); }
.seg button.on { background: var(--marigold); box-shadow: 0 3px 0 var(--ink); }
.seg button .n { font-family: var(--body); font-weight: 700; font-size: .8rem; min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--well); border: 1.5px solid var(--ink); }
.seg button.on .n { background: #fff; }

/* empty states */
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px; text-align: center; color: var(--muted); }
.empty .ic { color: var(--ink); width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: var(--marigold-l); border: 2px solid var(--ink); box-sizing: content-box; }
.empty b { color: var(--ink); font: 400 1.05rem var(--display); }
.empty p { margin: 0; font-size: .92rem; max-width: 300px; }

/* token coins */
.coin { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%; background: var(--c); border: 2.5px solid var(--ink); box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), inset 0 2px 0 rgba(255,255,255,.35); }
.coin svg { display: block; }

/* header, bottom dock, footer */
header.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px; background: rgba(251,238,214,.95); backdrop-filter: blur(8px); border-bottom: 2.5px solid var(--ink); }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font: 400 1.35rem var(--display); letter-spacing: .03em; min-height: 44px; }
.brand img { border-radius: 50%; border: 2px solid var(--ink); }
.brand span i { font-style: normal; color: var(--marigold); -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; }
.me-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; max-width: 52%; padding: 0 12px 0 4px; border-radius: 999px; border: 2.5px solid var(--ink); background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; box-shadow: 0 2px 0 var(--ink); }
.me-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.me-chip .av { width: 30px; height: 30px; border-radius: 50%; background: var(--marigold); color: var(--ink); border: 2px solid var(--ink); display: grid; place-items: center; font: 400 .95rem var(--display); flex: none; }
.me-chip.on { background: var(--marigold-l); }
@media (max-width: 420px) { .me-chip { padding: 0; gap: 0; width: 42px; height: 42px; min-height: 42px; max-width: none; justify-content: center; flex: none; } .me-chip span { display: none; } .me-chip .av { width: 32px; height: 32px; } }
.x-link { display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; border: 2.5px solid var(--ink); background: #fff; color: var(--ink); box-shadow: 0 2px 0 var(--ink); }
footer .ic { vertical-align: -2px; }
.dock { position: fixed; z-index: 30; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 3px; width: min(calc(100vw - 20px), 440px); padding: 5px; border-radius: 22px; background: var(--card); border: 2.5px solid var(--ink); box-shadow: 0 4px 0 var(--ink), 0 10px 24px rgba(92,58,33,.18); }
.dock a { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; border-radius: 16px; color: var(--muted); text-decoration: none; font: 400 .78rem var(--display); letter-spacing: .03em; border: 2px solid transparent; }
.dock a { position: relative; z-index: 1; transition: color .2s; }
.dock a.on { color: var(--ink); }
.dock-on { position: absolute; left: 5px; top: 5px; bottom: 5px; width: calc((100% - 22px) / 5); border-radius: 16px; background: var(--marigold); border: 2px solid var(--ink); transform: translateX(calc(var(--i) * (100% + 3px))); animation: dock-slide .32s cubic-bezier(.3,1.3,.5,1) both; }
@keyframes dock-slide { from { transform: translateX(calc(var(--from) * (100% + 3px))); } }
.has-dock { padding-bottom: 92px; }
footer { max-width: 1100px; margin: 24px auto 0; padding: 16px 12px 24px; border-top: 2px dashed var(--line2); color: var(--muted); font-size: .92rem; }

/* page transition */
.page-in { animation: page-in .22s ease-out both; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .page-in, .panel, .modal, .drawn-card { animation: none !important; } }

/* home */
.kicker { display: inline-flex; align-items: center; gap: 6px; font: 600 .78rem var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--green-d); }
.wordmark { font: 400 clamp(2.5rem, 13vw, 4.4rem)/.95 var(--display); color: #fff; letter-spacing: .02em; margin: 8px 0 8px; -webkit-text-stroke: .07em var(--ink); paint-order: stroke fill; text-shadow: 0 .07em 0 var(--ink); }
.wordmark span { display: block; }
.wordmark span + span { color: var(--marigold); }
.lead { font-size: 1.08rem; font-weight: 600; margin: 4px 0; }
.resume { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin: 0 0 14px; border-radius: 16px; background: var(--green); color: #fff; text-decoration: none; font-weight: 600; border: 2.5px solid var(--ink); box-shadow: var(--shadow); }
.resume b { font: 400 1.15rem var(--display); display: block; }
.resume .ic { margin-left: auto; }
.play-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.play-grid .btn { min-height: 52px; font-size: .95rem; padding: 0 8px; text-align: center; line-height: 1.1; }
.pot-banner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2px 12px; margin: 14px 0; padding: 12px 16px; border-radius: 18px; background: var(--marigold-l); color: var(--ink); text-decoration: none; border: 2.5px solid var(--ink); box-shadow: var(--shadow); }
.pot-banner .ic { grid-row: 1 / 3; color: var(--ink); width: 34px; height: 34px; padding: 5px; border-radius: 50%; background: var(--marigold); border: 2px solid var(--ink); box-sizing: content-box; }
.pot-banner span { font: 600 .74rem var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pot-banner b { font: 400 1.4rem var(--display); grid-column: 2; overflow-wrap: anywhere; }
.pot-banner small { grid-column: 1 / -1; color: var(--muted); border-top: 2px dashed var(--line2); padding-top: 6px; margin-top: 6px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 11px 0; border-bottom: 2px dashed var(--soft); flex-wrap: wrap; }
.list li:last-child { border-bottom: 0; }
.list li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; display: inline-block; border: 2px solid var(--ink); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.stats div { background: var(--well); border: 2px solid var(--ink); border-radius: 14px; padding: 10px 6px; text-align: center; }
.stats b { display: block; font: 400 1.5rem var(--display); color: var(--green-d); }
.stats small { color: var(--muted); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-head .av { width: 58px; height: 58px; border-radius: 50%; background: var(--marigold); color: var(--ink); border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); display: grid; place-items: center; font: 400 1.7rem var(--display); flex: none; }
.profile-head h1 { margin: 0; overflow-wrap: anywhere; min-width: 0; }

/* table lobby */
.tl { max-width: 560px; margin: 12px auto; padding: 18px 16px; }
.tl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.tl-head h1 { font-size: 1.55rem; margin: 0; overflow-wrap: anywhere; min-width: 0; }
.tl-head .pills { display: flex; gap: 6px; flex: none; padding-top: 4px; }
.seat-grid { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 14px 0; }
.invite { display: flex; gap: 8px; margin: 6px 0 4px; }
.invite input { flex: 1 1 auto; font-size: .9rem; }
.invite .btn { flex: none; padding: 0 12px; }
.invite-box { margin-top: 14px; padding: 12px; border-radius: 14px; border: 2.5px dashed var(--line2); background: var(--well); }
.seat-row { display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 8px 10px; border: 2.5px solid var(--ink); border-radius: 16px; background: #fff; box-shadow: 0 3px 0 var(--ink); animation: page-in .2s ease-out both; }
.seat-row.me { background: var(--marigold-l); }
.seat-row .nm { font: 400 1.1rem var(--display); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-row .nm i { font: 500 .95rem var(--body); color: var(--muted); }
.seat-row .badges { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; flex: 1; align-items: center; }
.seat-row .x { margin-left: auto; flex: none; min-width: 44px; min-height: 44px; border-radius: 12px; border: 2px solid var(--ink); background: #fff; font-size: 1rem; cursor: pointer; color: var(--ink); display: grid; place-items: center; }
.seat-empty { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 62px; padding: 8px 10px 8px 16px; border: 2.5px dashed var(--line2); border-radius: 16px; color: var(--muted); font-size: .98rem; }
.tl .note { font-size: .88rem; color: var(--muted); }

/* ---------------- the table ---------------- */
.game-main { padding: 0; max-width: 1400px; }
.game { display: grid; grid-template-columns: 100%; padding-bottom: 12px; }
.game-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 8px 10px; }
.game-top .menu { flex: none; }
.ttl { min-width: 0; flex: 1 1 100px; line-height: 1.15; }
.ttl b { display: block; font: 400 1.12rem var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ttl small { color: var(--muted); font-size: .74rem; letter-spacing: .06em; font-weight: 600; text-transform: uppercase; }
.top-pills { display: flex; gap: 6px; align-items: center; flex: none; }
.turn-pill { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 2.5px solid var(--ink); background: #fff; font: 400 .92rem var(--display); white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 0 var(--ink); }
.turn-pill.mine { background: var(--marigold); }
.secs { display: inline-flex; align-items: center; justify-content: center; min-width: 50px; min-height: 36px; padding: 0 8px; border-radius: 999px; border: 2.5px solid var(--ink); background: #fff; font: 400 .95rem var(--display); box-shadow: 0 2px 0 var(--ink); }
.secs.low { color: #fff; background: var(--brick); }
.secs.off { visibility: hidden; }
.pot-pill { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 4px 12px; min-height: 40px; justify-content: center; border-radius: 14px; border: 2px solid var(--marigold); background: var(--marigold-l); color: var(--ink); font: 500 .8rem/1.3 var(--body); cursor: pointer; text-align: left; order: 5; flex: 1 1 100%; }
.pot-l b, .pot-e b { font-weight: 700; } .pot-e { font-size: .76rem; } .pot-e.muted { color: var(--muted); }
@media (min-width: 640px) { .pot-pill { order: 0; flex: 0 1 auto; } }

.board-wrap { position: relative; margin: 0 8px; border: 2.5px solid var(--ink); border-radius: 20px; overflow: hidden; background: var(--wood); box-shadow: var(--shadow); }
.board-box { width: 100%; margin: 0 auto; aspect-ratio: 1 / 1; position: relative; }
.board-box[data-kind="3d"] { aspect-ratio: 1 / 1.12; max-height: 74vh; }
.board-box[data-kind="2d"] { padding: 3%; background: repeating-linear-gradient(0deg, #94603a 0 22px, #9c663c 22px 46px, #8b5832 46px 64px); }
.b3, .b3 canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.board-btns { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 8px; z-index: 3; }
.board-btns .chip { width: 42px; height: 42px; padding: 0; }
.board-box[data-kind="2d"] ~ .board-btns { top: 15%; right: 15%; flex-direction: row; }
@media (max-width: 520px) { .board-btns { top: 8px; right: 8px; gap: 6px; } .board-btns .chip { width: 40px; height: 40px; min-width: 40px; min-height: 40px; font-size: .8rem; } }
.timer { height: 10px; background: #fff; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; margin: 8px 0 2px; }
.timer i { display: block; height: 100%; background: var(--green); transition: width .25s linear; }
.timer.low i { background: var(--brick); } .timer.off { display: none; }

.side { padding: 0 8px; min-width: 0; }
.offer-card { background: var(--marigold-l); color: var(--ink); border: 2.5px solid var(--ink); border-radius: 16px; padding: 12px 14px; margin: 12px 0 0; box-shadow: var(--shadow); }
.offer-card .who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.offer-card .who b { font: 400 1.08rem var(--display); }
.offer-card .pill { background: var(--marigold); }
.offer-card p { margin: 2px 0; font-size: .95rem; overflow-wrap: anywhere; }
.offer-card .row { margin-top: 8px; }
.action-bar { margin: 12px 0 0; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 2.5px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.turn-line { min-width: 0; overflow-wrap: anywhere; }
.turn-line b:first-child { font: 400 1.15rem var(--display); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions .btn { flex: 1 1 auto; }
.actions .btn.big { flex-basis: 100%; }
.sub-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sub-actions .btn { min-height: 40px; font-size: .92rem; }
.mini-dice { display: flex; gap: 4px; flex: none; }
.mini-dice i { width: 30px; height: 30px; border-radius: 8px; background: #fff; border: 2px solid var(--ink); display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 3px; }
.mini-dice i b { width: 5px; height: 5px; border-radius: 50%; background: var(--ink); place-self: center; }
.mini-dice i b.r { background: var(--brick); width: 7px; height: 7px; }
.hint { margin: 10px 0 0; padding: 8px 12px; border-radius: 14px; background: var(--marigold-l); border: 2px solid var(--ink); font-size: .9rem; display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.tabs { display: flex; gap: 6px; margin: 14px 0 8px; padding: 2px 2px 6px; overflow-x: auto; }
.tabs button { flex: 1 0 auto; min-height: 44px; padding: 0 10px; background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; color: var(--muted); font: 400 .92rem var(--display); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 2px 0 var(--ink); }
.tabs button.on { color: var(--ink); background: var(--marigold); box-shadow: 0 3px 0 var(--ink); }
@media (max-width: 380px) { .tabs { gap: 4px; } .tabs button { padding: 0 6px; font-size: .82rem; gap: 4px; } .tabs .ic { width: 16px; height: 16px; } }
.panel { padding: 12px; min-height: 140px; background: var(--card); border: 2.5px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); animation: page-in .18s ease-out; }

/* player cards (left column on wide screens, Rivals tab on phones) */
.players { display: flex; flex-direction: column; gap: 8px; }
.pcard { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; width: 100%; padding: 10px 12px; border-radius: 16px; border: 2.5px solid var(--ink); background: #fff; color: var(--ink); font: inherit; text-align: left; cursor: pointer; min-width: 0; box-shadow: 0 3px 0 var(--ink); border-left: 7px solid var(--c, var(--ink)); }
.pcard .coin { grid-row: 1 / 4; }
.pcard .pn { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .pn small { color: var(--muted); font-weight: 500; }
.pcard .cash { font: 400 1.3rem/1.15 var(--display); }
.pcard .props { font-size: .8rem; color: var(--muted); }
.pcard .sets-row { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.setchip { min-width: 20px; height: 20px; padding: 0 4px; border-radius: 6px; background: var(--c); color: #fff; font: 700 .72rem/16px var(--body); text-align: center; border: 2px solid var(--ink); text-shadow: 0 1px 0 rgba(0,0,0,.35); }
.setchip.full { box-shadow: 0 0 0 2px var(--marigold); }
.pcard.turn { background: var(--marigold-l); border-color: var(--ink); box-shadow: 0 0 0 3px var(--marigold), 0 3px 0 3px var(--ink); }
.pcard.out { opacity: .5; }
.pcard.out .cash { color: var(--muted); }
.players-col { display: none; }
.log { margin: 0; padding: 0; list-style: none; font-size: .92rem; max-height: 360px; overflow: auto; }
.log li { padding: 6px 0 6px 12px; border-left: 2px dashed var(--line2); position: relative; }
.log li::before { content: ""; position: absolute; left: -6px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--line2); }
.log li:first-child { font-weight: 600; } .log li:first-child::before { background: var(--marigold); border-color: var(--ink); }

/* my deeds */
.sets { display: flex; flex-direction: column; gap: 10px; }
.set { border-radius: 14px; overflow: hidden; background: #fff; color: var(--ink); border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
.set-head { display: flex; justify-content: space-between; align-items: center; padding: 5px 10px; background: var(--c); color: #fff; font: 400 1rem var(--display); text-shadow: 0 1px 0 rgba(0,0,0,.3); border-bottom: 2.5px solid var(--ink); }
.set.full .set-head span { background: var(--marigold); color: var(--ink); text-shadow: none; padding: 0 8px; border-radius: 999px; border: 2px solid var(--ink); font: 600 .74rem/1.5 var(--body); letter-spacing: .04em; }
.set > .deed { padding: 4px 10px; }
.deed { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; border-top: 2px dashed var(--soft); }
.deed:first-of-type { border-top: 0; }
.deed.mort .deed-name { opacity: .55; text-decoration: line-through; }
.deed-name { background: none; border: 0; color: var(--ink); font: 600 .98rem var(--body); text-align: left; padding: 6px 0; min-height: 36px; cursor: pointer; }
.deed-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.trade h3 { margin-top: 14px; }
.offer { background: var(--well); border: 2px solid var(--ink); border-left: 6px solid var(--teal); border-radius: 12px; padding: 8px 10px; margin: 6px 0; }
.compose .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compose .field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; font-weight: 600; }
.compose input[type=number] { margin: 4px 0; }
.pick { display: flex; flex-direction: column; gap: 2px; max-height: 200px; overflow: auto; }
.chk { display: flex; align-items: center; gap: 6px; min-height: 36px; font-size: .9rem; border-left: 5px solid var(--c, transparent); padding-left: 6px; }
.chk input { width: 20px; min-height: 20px; height: 20px; flex: none; accent-color: var(--green); }
.compose > .btn { width: 100%; margin-top: 12px; }

/* ---------------- 2D board ---------------- */
.b2 { position: relative; width: 100%; height: 100%; }
.b2-grid { display: grid; grid-template-columns: 1.45fr repeat(9, 1fr) 1.45fr; grid-template-rows: 1.45fr repeat(9, 1fr) 1.45fr; width: 100%; height: 100%; background: var(--wood-d); border: 4px solid var(--wood-d); border-radius: 8px; overflow: hidden; gap: 1.5px; box-shadow: 0 6px 0 rgba(46,35,28,.55), 0 10px 24px rgba(0,0,0,.3); }
.b2-tile { position: relative; background: #fdf6e6; color: var(--ink); border: 0; padding: 0; font: 600 clamp(5px, 1.5vw, 10px)/1.05 var(--body); display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; text-align: center; min-width: 0; min-height: 0; }
.b2-tile .band { position: absolute; display: flex; align-items: center; justify-content: center; gap: 1px; }
.s-b .band { top: 0; left: 0; right: 0; height: 24%; } .s-t .band { bottom: 0; left: 0; right: 0; height: 24%; }
.s-l .band { right: 0; top: 0; bottom: 0; width: 24%; flex-direction: column; } .s-r .band { left: 0; top: 0; bottom: 0; width: 24%; flex-direction: column; }
.houses { display: flex; gap: 1px; } .s-l .houses, .s-r .houses { flex-direction: column; }
.houses i { width: clamp(3px, 1vw, 7px); height: clamp(3px, 1vw, 7px); background: var(--green); border: 1px solid var(--ink); border-radius: 1px; }
.houses i.hotel { width: clamp(6px, 2vw, 13px); background: var(--brick); border-color: #5a1e10; }
.s-l .houses i.hotel, .s-r .houses i.hotel { width: clamp(3px, 1vw, 7px); height: clamp(6px, 2vw, 13px); }
.b2-tile .nm { padding: 0 1px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-l .nm, .s-r .nm, .s-l .pr, .s-r .pr, .s-l .ic, .s-r .ic { writing-mode: vertical-rl; max-height: 100%; }
.s-l .nm, .s-l .pr, .s-l .ic { transform: rotate(180deg); }
.b2-tile .pr { font-weight: 500; opacity: .7; font-size: .9em; }
.b2-tile .ic { font-size: 1.5em; line-height: 1; }
.b2-tile .own { position: absolute; }
.s-b .own { bottom: 0; left: 0; right: 0; height: 12%; } .s-t .own { top: 0; left: 0; right: 0; height: 12%; } .s-l .own { left: 0; top: 0; bottom: 0; width: 12%; } .s-r .own { right: 0; top: 0; bottom: 0; width: 12%; }
.b2-tile.mort { background: repeating-linear-gradient(45deg, #e2d6c0 0 4px, #f6eedd 4px 8px); }
.b2-tile.k-airdrop { background: #fdecc0; } .b2-tile.k-dao { background: #d9edf0; } .b2-tile.k-tax { background: #fdf6e6; }
.b2-tile.k-start { background: #d6eccb; } .b2-tile.k-jail { background: #ece4d6; } .b2-tile.k-rest { background: #e4f0d4; } .b2-tile.k-gotojail { background: #f9dcd4; }
.corner { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 2em; line-height: 1; } .corner small { font: 400 .38em/1.05 var(--display); letter-spacing: .02em; text-align: center; padding: 0 2px; }
.b2-tile.k-start .nm, .b2-tile.k-jail .nm, .b2-tile.k-rest .nm, .b2-tile.k-gotojail .nm { display: none; }
.b2-tile.pop { animation: pop .5s; }
@keyframes pop { 40% { transform: scale(1.18); z-index: 2; } }
.b2-center { grid-row: 2 / 11; grid-column: 2 / 11; background: #dcebc9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4%; padding: 5%; color: var(--ink); position: relative; }
.sticker { font: 400 clamp(22px, 8vw, 54px)/.92 var(--display); text-align: center; letter-spacing: .02em; transform: rotate(-4deg); }
.sticker span { display: block; color: #fff; -webkit-text-stroke: .12em var(--ink); paint-order: stroke fill; text-shadow: 0 .08em 0 var(--ink); }
.sticker span + span { color: var(--marigold); }
.b2-mid { display: flex; align-items: center; justify-content: center; gap: 6%; width: 100%; }
.pile { display: flex; flex-direction: column; align-items: center; gap: 3px; font: 400 clamp(6px, 1.9vw, 12px) var(--display); letter-spacing: .04em; }
.pile i { width: clamp(24px, 8vw, 52px); aspect-ratio: 1.4; border-radius: 5px; background: var(--c); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); transform: rotate(-8deg); position: relative; }
.pile i::after { content: ""; position: absolute; inset: 18%; border-radius: 3px; background: rgba(255,255,255,.55); }
.pile.council i { transform: rotate(8deg); }
.tray { width: clamp(64px, 22vw, 140px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #2f7d4a 0 64%, #7a4a2a 65% 100%); border: 2px solid var(--wood-d); display: flex; align-items: center; justify-content: center; gap: 6%; box-shadow: 0 4px 0 rgba(46,35,28,.5); }
.b2-dice { display: contents; }
.die { width: 30%; aspect-ratio: 1; background: #fbf3e2; border-radius: 20%; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 6%; box-shadow: 0 2px 0 rgba(0,0,0,.4); }
.die b { width: 70%; aspect-ratio: 1; border-radius: 50%; background: var(--ink); place-self: center; }
.die b.r { background: var(--brick); width: 85%; }
.b2-dice.rolling .die { animation: shake .35s; }
@keyframes shake { 25% { transform: rotate(20deg) translateY(-6px); } 50% { transform: rotate(-25deg); } 75% { transform: rotate(10deg) translateY(-3px); } }
.b2-caption { font-size: clamp(9px, 2.6vw, 13px); text-align: center; color: var(--ink); max-width: 92%; min-height: 2.6em; font-weight: 600; }
.b2-tokens { position: absolute; inset: 0; pointer-events: none; }
.b2-token { position: absolute; transform: translate(-50%, -50%); transition: left .1s linear, top .1s linear; }
.b2-token .coin { width: clamp(14px, 5vw, 30px) !important; height: clamp(14px, 5vw, 30px) !important; border-width: 2px; box-shadow: 0 2px 3px rgba(0,0,0,.4); }
.b2-token .coin svg { width: 66%; height: 66%; }
.b2-token.turn .coin { box-shadow: 0 0 0 3px var(--marigold), 0 2px 6px rgba(0,0,0,.45); }
.b2-token.gone { display: none; }

/* overlays */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(46,35,28,.45); display: flex; align-items: flex-end; justify-content: center; }
.modal { width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; background: var(--card); border: 2.5px solid var(--ink); border-bottom: 0; border-radius: 24px 24px 0 0; padding: 4px 16px 20px; animation: up .2s ease-out; }
.modal::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 5px; background: var(--line2); margin: 8px auto 0; }
.modal.wide { max-width: 640px; }
@media (min-width: 700px) { .modal-back { align-items: center; } .modal { border-radius: 24px; border-bottom: 2.5px solid var(--ink); box-shadow: 0 6px 0 var(--ink); } .modal::before { display: none; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: 0; background: var(--card); padding: 10px 0 8px; margin-bottom: 8px; border-bottom: 2px dashed var(--soft); z-index: 1; }
.modal-head h2 { margin: 0; overflow-wrap: anywhere; font-size: 1.3rem; }
.deed-card { border-radius: 16px; padding: 0 14px 12px; overflow: hidden; background: #fff; color: var(--ink); border: 2.5px solid var(--ink); box-shadow: var(--shadow); }
.deed-band { background: var(--c, #7a6a58); color: #fff; font: 400 1.15rem var(--display); text-align: center; margin: 0 -14px 10px; padding: 12px; letter-spacing: .04em; text-shadow: 0 1px 0 rgba(0,0,0,.3); border-bottom: 2.5px solid var(--ink); }
.deed-card b { color: inherit; }
table.rent, table.lb { width: 100%; border-collapse: collapse; }
table.rent td, table.lb td, table.lb th { padding: 7px 4px; border-bottom: 2px dashed var(--soft); text-align: left; }
table.lb th { color: var(--muted); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }
table.lb tr:nth-child(2) td:first-child { color: #b06d05; font-family: var(--display); }
table.rent td:last-child { text-align: right; font-weight: 700; }
table.rent tr.now td { background: var(--marigold-l); font-weight: 700; }
.menu-group { margin: 6px 0 14px; }
.menu-group h3 { margin: 0 0 6px; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; font-family: var(--body); font-weight: 600; color: var(--muted); }
.menu-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.menu-list .btn { width: 100%; min-height: 64px; flex-direction: column; gap: 6px; font-size: .9rem; padding: 6px; }
.menu-list .btn.danger { color: #fff; background: var(--brick); grid-column: 1 / -1; min-height: 48px; flex-direction: row; }
#toasts { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 6px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: #fff; color: var(--ink); padding: 10px 14px; border-radius: 14px; font-weight: 600; border: 2.5px solid var(--ink); border-left: 8px solid var(--teal); box-shadow: 0 3px 0 var(--ink); transition: opacity .4s, transform .4s; }
.toast.error { border-left-color: var(--brick); } .toast.good { border-left-color: var(--green); }
.toast.out { opacity: 0; transform: translateY(8px); }
.drawn-card { position: fixed; z-index: 60; left: 50%; top: 38%; transform: translate(-50%, -50%) rotate(-2deg); width: min(80vw, 320px); padding: 0 18px 16px; border-radius: 18px; background: var(--card); color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 6px 0 var(--ink), 0 20px 40px rgba(46,35,28,.35); text-align: center; animation: draw .4s cubic-bezier(.2,1.3,.4,1); transition: opacity .4s; overflow: hidden; }
.drawn-card small { display: block; margin: 0 -18px 10px; padding: 10px; background: var(--marigold); color: var(--ink); font: 400 1.1rem var(--display); letter-spacing: .05em; border-bottom: 3px solid var(--ink); }
.drawn-card.dao small { background: var(--teal); color: #fff; }
.drawn-card p { font-size: 1.1rem; font-weight: 600; }
.drawn-card .muted { color: var(--muted); }
.drawn-card.out { opacity: 0; }
@keyframes draw { from { transform: translate(-50%, -10%) rotate(-20deg) scale(.5); opacity: 0; } }
.emote-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.burst { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.burst i { position: absolute; top: 18%; width: 9px; height: 14px; border-radius: 2px; animation: burst 2.2s cubic-bezier(.2,.7,.4,1) forwards; }
@keyframes burst { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 30% { transform: translate(var(--dx), var(--up)) rotate(260deg); } 100% { transform: translate(calc(var(--dx) * 1.4), 120%) rotate(720deg); opacity: .1; } }
.emote-bubble { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); font-size: 2.6rem; background: #fff; border: 3px solid var(--c); border-radius: 18px; padding: 4px 14px; display: flex; flex-direction: column; align-items: center; box-shadow: 0 3px 0 var(--ink); animation: float 2.6s ease-out forwards; }
.emote-bubble small { font-size: .78rem; color: var(--muted); }
@keyframes float { to { transform: translate(-50%, -90px); opacity: 0; } }
.emotes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.emote { font-size: 1.8rem; min-height: 56px; border-radius: 14px; border: 2.5px solid var(--ink); background: #fff; cursor: pointer; box-shadow: 0 2px 0 var(--ink); }

/* winner */
.win-hero { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; background: var(--marigold); color: var(--ink); margin: 8px 0 14px; overflow: hidden; border: 2.5px solid var(--ink); box-shadow: var(--shadow); }
.win-hero::after { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.3); }
.win-hero .coin { width: 64px !important; height: 64px !important; }
.win-hero .crown { position: absolute; left: 30px; top: -2px; font-size: 1.5rem; transform: rotate(-12deg); z-index: 1; }
.win-hero b { font: 400 1.45rem var(--display); display: block; overflow-wrap: anywhere; }
.win-hero small { color: #6b4a10; font-weight: 600; }
.rank { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 12px; border: 2.5px solid var(--ink); border-radius: 14px; background: #fff; margin: 8px 0; box-shadow: 0 2px 0 var(--ink); }
.rank.first { background: var(--marigold-l); }
.rank .pos { font: 400 1.1rem var(--display); width: 2em; flex: none; color: var(--muted); }
.rank.first .pos { color: #b06d05; }
.rank .nm { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .st { flex: none; color: var(--muted); }
.rank.first .st { color: var(--ink); font-family: var(--display); }
.claim-note { background: var(--marigold-l); color: var(--ink); border: 2px solid var(--ink); border-radius: 14px; padding: 10px 14px; margin: 14px 0; font-size: .92rem; }
.claim-note b { color: var(--ink); }
.win-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.win-btns .btn { flex: 1 1 140px; }

.pot-hero { text-align: center; background: var(--marigold-l); color: var(--ink); position: relative; }
.pot-hero .muted { color: var(--muted); }
.pot-big { font: 400 2.3rem var(--display); color: var(--ink); overflow-wrap: anywhere; margin: 4px 0; }
.hist li { display: grid; grid-template-columns: 1fr auto; } .hist li small { grid-column: 1 / -1; }
.faq details { border-bottom: 2px dashed var(--soft); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 600; min-height: 46px; display: flex; align-items: center; gap: 10px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); color: var(--ink); display: grid; place-items: center; font: 400 1rem var(--display); flex: none; }
.faq details[open] summary::before { content: "−"; background: var(--marigold); }
.lobby .card { max-width: 560px; margin: 12px auto; }
.table-page { min-height: 60vh; }

/* wide screens: players left, board centre, turn panel and log right */
@media (min-width: 1000px) {
  .game { grid-template-columns: 240px minmax(0, 1fr) 330px; column-gap: 14px; padding: 0 12px 12px; align-items: start; }
  .game > .game-top { grid-column: 1 / -1; padding: 8px 0; }
  .players-col { display: flex; }
  .board-wrap { margin: 0; }
  .board-box, .board-box[data-kind="3d"] { max-height: calc(100vh - 90px); aspect-ratio: auto; height: calc(100vh - 90px); }
  .board-box[data-kind="2d"] { aspect-ratio: 1 / 1; height: auto; max-width: calc(100vh - 90px); }
  .side { padding: 0; max-height: calc(100vh - 80px); overflow: auto; }
  .side > :first-child { margin-top: 0; }
  .tabs .t-players { display: none; }
}
.side-val { margin-top: 6px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.deal-verdict { margin-top: 10px; text-align: center; font-weight: 700; font-size: .9rem; padding: 6px 10px; border-radius: 999px; background: var(--marigold-l); color: var(--muted); }
.deal-verdict.even { background: var(--teal-l); color: #1f6f7b; } .deal-verdict.good { background: var(--green-l); color: var(--green-d); } .deal-verdict.them { background: var(--brick-l); color: #a83a22; }

/* 2D money effects */
.b2 { container-type: inline-size; }
.b2-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.b2-note { position: absolute; width: 3.4cqw; height: 2cqw; margin: -1cqw 0 0 -1.7cqw; background: #8fcf84; border: 1px solid #3f7d3a; border-radius: 2px; opacity: 0; animation: b2fly .8s ease-in both; }
.b2-note.burst { background: #f6c64a; border-color: #b8860b; animation-name: b2burst; animation-duration: 1s; }
@keyframes b2fly { 0% { opacity: 0; transform: translate(0, 0) rotate(0); } 15% { opacity: 1; } 50% { transform: translate(calc(var(--dx) * .5), calc(var(--dy) * .5 + var(--arc))) rotate(180deg); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(360deg) scale(.7); } }
@keyframes b2burst { 0% { opacity: 0; transform: translate(0, 0); } 20% { opacity: 1; transform: translate(var(--sx), -6cqw) rotate(120deg); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(360deg) scale(.7); } }
.b2-amt { position: absolute; transform: translate(-50%, -50%); font: 400 clamp(11px, 3.6cqw, 16px)/1 var(--display, inherit); padding: 2px 5px; border-radius: 8px; border: 2px solid; background: #fffaf0; white-space: nowrap; animation: b2float 1.2s ease-out both; }
.b2-amt.up { color: #2f7d32; border-color: #2f7d32; } .b2-amt.down { color: #b23a26; border-color: #b23a26; }
@keyframes b2float { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.7); } 15% { opacity: 1; transform: translate(-50%, -80%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -260%); } }
@media (prefers-reduced-motion: reduce) { .b2-note { display: none; } .b2-amt { animation-duration: 1.4s; } }

.cash-have { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 4px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.cash-have .tiny { padding: 2px 10px; min-height: 0; font-size: .75rem; }
.who-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.who-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; max-width: 100%; padding: 0 12px 0 6px; border-radius: 999px; border: 2.5px solid var(--ink); background: #fff; color: var(--ink); font: 400 .92rem var(--display); cursor: pointer; box-shadow: 0 2px 0 var(--ink); }
.who-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-chip.on { background: var(--marigold); box-shadow: 0 2px 0 var(--ink), 0 0 0 3px #fff, 0 0 0 5px var(--ink); }

/* ---------- home: the table (2026-10-19) ----------
   The first screen is a seat at a wooden table: a tilted mini board you can roll on, deeds fanned beside it.
   Motion is transform/opacity only; reveals and the autoplay roll are off under prefers-reduced-motion. */
.hero { position: relative; margin: 2px 0 14px; }
.hero-copy { padding: 6px 4px 0; }
.hero .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 6px 0 0; color: var(--muted); font-weight: 600; font-size: .9rem; }
.hero .meta i { width: 6px; height: 6px; border-radius: 50%; background: var(--marigold); border: 1.5px solid var(--ink); }
.hero .wordmark { font-size: clamp(2.6rem, 13.5vw, 4.6rem); margin: 4px 0 6px; }
.hero .wordmark span { display: inline-block; margin-right: .22em; animation: word-in .5s cubic-bezier(.2,1.2,.4,1) both; }
.hero .wordmark span + span { animation-delay: .08s; }
@keyframes word-in { from { opacity: 0; transform: translateY(14px) rotate(-3deg); } }

.scene { position: relative; margin: 12px -12px 0; height: clamp(318px, 92vw, 440px); overflow: hidden; border-block: 2.5px solid var(--ink);
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.06) 0 2px, transparent 2px 58px), repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 3px, transparent 3px 9px), linear-gradient(160deg, #a46a3c, #8f5c34 45%, #74482a); box-shadow: inset 0 10px 22px rgba(46,35,28,.35); }
.scene-board { position: absolute; left: 43%; top: 41%; width: min(54vw, 260px); aspect-ratio: 1; transform: translate(-50%, -50%) perspective(900px) rotateX(42deg) rotateZ(-28deg); transform-style: preserve-3d; animation: board-in .7s .1s cubic-bezier(.2,1,.3,1) both; }
@keyframes board-in { from { opacity: 0; transform: translate(-50%, -38%) perspective(900px) rotateX(42deg) rotateZ(-40deg) scale(.9); } }
.mb { position: absolute; inset: 0; display: grid; grid-template: repeat(5, 1fr) / repeat(5, 1fr); background: #fffaf1; border: 4px solid #4a2e1b; border-radius: 6px; box-shadow: 0 2px 0 #4a2e1b, 0 6px 0 #3a2415, 10px 16px 18px rgba(30,18,10,.4); transform-style: preserve-3d; }
.mt { position: relative; border: 1px solid rgba(46,35,28,.28); display: grid; place-items: center; color: var(--ink); background: #fffaf1; }
.mt.corner { background: #f4e6c8; }
.mt svg { display: block; }
.mt .band { position: absolute; background: var(--c); }
.mt.b .band { left: 0; right: 0; top: 0; height: 30%; border-bottom: 1px solid var(--ink); }
.mt.t .band { left: 0; right: 0; bottom: 0; height: 30%; border-top: 1px solid var(--ink); }
.mt.l .band { top: 0; bottom: 0; right: 0; width: 30%; border-left: 1px solid var(--ink); }
.mt.r .band { top: 0; bottom: 0; left: 0; width: 30%; border-right: 1px solid var(--ink); }
.mb-mid { grid-area: 2 / 2 / 5 / 5; background: #dcebc9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6%; }
.mb-word { display: flex; flex-direction: column; align-items: center; font: 400 clamp(.9rem, 4.6vw, 1.3rem)/.9 var(--display); color: #fff; -webkit-text-stroke: .1em var(--ink); paint-order: stroke fill; transform: rotate(-4deg); }
.mb-word b + b { color: var(--marigold); }
.tray { display: flex; gap: 8px; padding: 8px 10px; border-radius: 999px; background: #2f7a48; border: 3px solid #5c3a21; box-shadow: inset 0 3px 6px rgba(0,0,0,.3); }
.die { width: clamp(22px, 7vw, 30px); aspect-ratio: 1; border-radius: 6px; background: #fffaf1; border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink); display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 2px; }
.die b { width: 4px; height: 4px; border-radius: 50%; background: var(--ink); place-self: center; }
.die b.r { width: 6px; height: 6px; background: var(--brick); }
.mb-token { position: absolute; left: 0; top: 0; z-index: 2; filter: drop-shadow(2px 4px 0 rgba(30,18,10,.35)); will-change: transform; }
.mb-token .coin { transform: rotateZ(28deg) rotateX(-42deg) translateY(-30%); }
.fan { position: absolute; right: 6px; bottom: 58px; width: 118px; height: 100px; }
.dm { position: absolute; right: 0; bottom: 0; width: 66px; height: 90px; padding: 0 0 6px; border-radius: 7px; background: #fffaf1; border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); display: flex; flex-direction: column; align-items: center; text-align: center; overflow: hidden; transform-origin: 50% 120%; animation: deal .5s cubic-bezier(.2,1.1,.4,1) both; }
.dm:nth-child(1) { transform: rotate(9deg); animation-delay: .55s; z-index: 3; }
.dm:nth-child(2) { transform: translateX(-26px) rotate(-3deg); animation-delay: .45s; z-index: 2; }
.dm:nth-child(3) { transform: translateX(-50px) rotate(-15deg); animation-delay: .35s; z-index: 1; }
.dm.new { animation: deal-new .55s cubic-bezier(.2,1.2,.4,1) both; }
@keyframes deal { from { opacity: 0; transform: translate(-80px, 60px) rotate(-40deg); } }
@keyframes deal-new { from { opacity: 0; transform: translate(-120px, -40px) rotate(-30deg) scale(.8); } }
.dm i { align-self: stretch; background: var(--c); color: #fff; font: 600 .5rem/1 var(--body); letter-spacing: .1em; text-transform: uppercase; padding: 7px 2px 5px; border-bottom: 2px solid var(--ink); font-style: normal; text-shadow: 0 1px 0 rgba(0,0,0,.3); min-height: 20px; }
.dm b { font: 400 .74rem/1.05 var(--display); padding: 6px 4px 2px; }
.dm small { font-size: .58rem; color: var(--muted); font-weight: 600; }
.dm em { margin-top: auto; font: 400 .8rem var(--display); font-style: normal; color: var(--green-d); }
.scene-say { position: absolute; left: 12px; right: 92px; bottom: 12px; margin: 0; padding: 6px 10px; border-radius: 12px; background: rgba(255,250,241,.94); border: 2px solid var(--ink); font-size: .82rem; font-weight: 600; line-height: 1.25; min-height: 38px; display: flex; align-items: center; }
.roll-chip { position: absolute; right: 12px; bottom: 12px; min-height: 40px; padding: 0 12px; font-size: .95rem; gap: 6px; }
@media (min-width: 760px) {
  .hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; align-items: center; }
  .hero-copy { padding: 0; }
  .scene { margin: 0; height: 420px; border: 2.5px solid var(--ink); border-radius: 24px; box-shadow: var(--shadow), inset 0 10px 22px rgba(46,35,28,.35); }
  .scene-board { width: 280px; left: 44%; }
  .fan { right: 22px; bottom: 70px; }
}

/* seat picker */
.start h2 { margin-bottom: 2px; }
.start-grid { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 12px; align-items: center; }
.start-grid .seg { flex-direction: column; gap: 6px; }
.start-grid .seg button { min-height: 40px; }
.seat-ring { --r: 48px; position: relative; width: 116px; aspect-ratio: 1; }
.seat-ring .felt { position: absolute; inset: 22px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #3f9a5d, #2f7a48); border: 4px solid #8f5c34; box-shadow: 0 0 0 2px var(--ink), 0 4px 0 2px var(--ink); display: grid; place-content: center; text-align: center; color: #fff; }
.seat-ring .felt b { font: 400 1.6rem/1 var(--display); }
.seat-ring .felt small { font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.seat { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; transform: rotate(var(--a)) translateX(var(--r)) rotate(calc(-1 * var(--a))) scale(.2); opacity: 0; transition: transform .38s cubic-bezier(.3,1.4,.5,1), opacity .2s; }
.seat.on { opacity: 1; transform: rotate(var(--a)) translateX(var(--r)) rotate(calc(-1 * var(--a))); }
.seat.you .coin { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ink); }
@media (max-width: 340px) { .start-grid { grid-template-columns: 100px minmax(0, 1fr); gap: 8px; } .seat-ring { --r: 40px; width: 100px; } .seat-ring .felt { inset: 20px; } }

/* tables as little tables */
.list li.tbl { flex-wrap: nowrap; justify-content: flex-start; gap: 10px; }
.list li.tbl > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.list li.tbl small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dots { display: grid; grid-template-columns: repeat(3, 10px); gap: 3px; flex: none; padding: 6px; border-radius: 10px; background: #2f7a48; border: 2px solid var(--ink); }
.dots i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.7); }
.dots i.on { background: var(--marigold); border-color: var(--ink); }
.rnd { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--well); border: 2px solid var(--ink); display: grid; place-content: center; text-align: center; font: 400 1.1rem/1 var(--display); }
.rnd small { font: 600 .55rem var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* how a turn goes */
.how { margin: 22px 0 8px; }
.steps { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--card); border: 2px solid var(--ink); }
.steps li:nth-child(even) { flex-direction: row-reverse; }
.st-art { flex: none; width: 74px; height: 62px; }
.steps b { display: flex; align-items: center; gap: 8px; font: 400 1.08rem var(--display); }
.st-n { width: 22px; height: 22px; border-radius: 50%; background: var(--marigold); border: 2px solid var(--ink); display: grid; place-items: center; font-size: .78rem; flex: none; }
.steps p { margin: 2px 0 0; font-size: .9rem; color: var(--muted); }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(4, 1fr); } .steps li, .steps li:nth-child(even) { flex-direction: column; align-items: flex-start; } }

/* inner page heads */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 2px 4px; }
.page-head h1 { font-size: 2rem; margin: 0; }
.page-head p { margin: 2px 0 0; color: var(--muted); font-weight: 500; }
.ph-art { flex: none; width: 104px; }
.ph-art svg { width: 100%; height: auto; display: block; }
.art-note { animation: bob 3.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes bob { 50% { transform: translateY(-4px) rotate(-4deg); } }

/* podium */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 6px; margin: 12px 0 0; }
.pod { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.pod b { font: 400 .95rem var(--display); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod small { color: var(--muted); font-size: .78rem; font-weight: 600; }
.pod span { align-self: stretch; margin-top: 6px; display: grid; place-items: center; font: 400 1.6rem var(--display); background: var(--card); border: 2.5px solid var(--ink); border-bottom: 0; border-radius: 12px 12px 0 0; }
.pod.p1 span { height: 84px; background: var(--marigold); } .pod.p2 span { height: 60px; } .pod.p3 span { height: 44px; }
.podium + .card { margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
.lost h1 { font-size: 3.4rem; color: #fff; -webkit-text-stroke: .06em var(--ink); paint-order: stroke fill; text-shadow: 0 .07em 0 var(--ink); }

/* scroll reveals: hidden only once JS has switched them on */
html.rv-on .rv { opacity: 0; transform: translateY(18px); transition: opacity .5s ease-out var(--d, 0ms), transform .55s cubic-bezier(.2,.9,.3,1) var(--d, 0ms); }
html.rv-on .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .hero .wordmark span, .scene-board, .dm, .dm.new, .dock-on, .art-note { animation: none !important; }
  .seat { transition: none; }
  html.rv-on .rv { opacity: 1; transform: none; transition: none; }
}
@media (min-width: 760px) { .start-grid .seg { flex-direction: row; } .start-grid .seg button { flex: 1; min-height: 46px; } }
