/* SHARKOPOLY — rubber floor, oak platform, chalk, steel. */
@font-face { font-family: 'Archivo'; src: url(/assets/fonts/archivo-latin.woff2) format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Archivo'; src: url(/assets/fonts/archivo-latin-ext.woff2) format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #0D0E0F; --panel: #151719; --panel2: #1C1F22; --panel3: #24282C;
  --line: rgba(238,234,226,.09); --line2: rgba(238,234,226,.17);
  --chalk: #EEEAE2; --dim: #A6A29B; --faint: #6F6C67;
  --good: #7BD8A0; --bad: #FF7A66; --gold: #F3C93A; --oak: #B98A55;
  --paper: #F3EFE7; --ink: #15130F; --gs-ink: #0D1012; --gs-grey: #9FA3A8; --gs-line: rgba(255,255,255,.22);
  --r: 14px; --hdr: 54px;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --font: 'Archivo', ui-sans-serif, -apple-system, system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--chalk); overscroll-behavior: none; }
body { font: 500 15px/1.4 var(--font); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
input { font: inherit; color: inherit; user-select: text; -webkit-user-select: text; }
img { -webkit-user-drag: none; }
[data-act] { cursor: pointer; }
.num { font-variant-numeric: tabular-nums; }
.cond { font-stretch: 72%; }
.wide { font-stretch: 120%; }

#app { position: fixed; inset: 0; background: var(--bg) url(/assets/img/rubber.jpg) 0 0 / 512px 512px; }
.hdr { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: calc(var(--hdr) + var(--sat)); padding: var(--sat) 8px 0; background: var(--bg);
  display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); }
.hdr .ib { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--chalk); }
.hdr .ib svg { width: 22px; height: 22px; }
.hdr .ib:active { background: var(--panel2); }
.hdr .mid { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 10px; }
.wordmark { font-weight: 900; font-stretch: 72%; letter-spacing: -.005em; text-transform: uppercase; font-size: 21px; line-height: 1; white-space: nowrap; }
.codechip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 13px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--gs-line);
  font-weight: 800; font-stretch: 100%; letter-spacing: .12em; font-size: 14px; }
.codechip svg { width: 16px; height: 16px; color: var(--dim); }
.conn { width: 7px; height: 7px; border-radius: 50%; background: var(--good); flex: none; }
.conn.off { background: var(--bad); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.main { position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--hdr) + var(--sat)); overflow: hidden; }
.scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 24px; border-radius: 14px;
  font-weight: 600; font-stretch: 100%; letter-spacing: 0; text-transform: none; font-size: 16px; transition: transform .12s, opacity .2s, background .2s, color .2s; }
.btn:active { transform: scale(.97); }
.btn.pri { background: #fff; color: var(--gs-ink); }
.btn.pri:active { background: #d9dcdf; }
.btn.sec { background: transparent; border: 1px solid rgba(255,255,255,.85); color: #fff; }
.btn.sec:active { background: rgba(255,255,255,.1); }
.btn.ghost { color: var(--dim); }
.btn.bad { background: transparent; border: 1px solid rgba(255,122,102,.5); color: var(--bad); }
.btn.gold { background: var(--gold); color: #1a1400; }
.btn.small { height: 40px; font-size: 14px; padding: 0 16px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .35; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn .sub { font-weight: 600; font-stretch: 100%; letter-spacing: .02em; text-transform: none; opacity: .65; font-size: 13px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--dim); }

/* ---------- home: the highlight reel behind, the form over it ---------- */
.home { position: absolute; inset: 0; overflow: hidden; background: #000; }
.home .reelbox { position: absolute; inset: 0; }
.home .reel { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.home .reelshade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(13,16,18,.62) 0, rgba(13,16,18,0) 16%); }
.home .reelcap { position: absolute; left: 18px; right: 18px; top: calc(var(--hdr) + var(--sat) + 8px); pointer-events: none; opacity: 0; transform: translateY(10px); transition: opacity .35s, transform .45s cubic-bezier(.2,1,.3,1); }
.home .reelcap.on { opacity: 1; transform: none; }
.home .reelcap b { display: block; font-weight: 900; font-stretch: 72%; text-transform: uppercase; font-size: clamp(36px, 11vw, 66px); line-height: .88; letter-spacing: -.01em; color: #fff; text-shadow: 0 4px 26px rgba(0,0,0,.55); }
.home .reelcap span { display: block; margin-top: 7px; font-size: 15px; color: rgba(255,255,255,.9); text-shadow: 0 2px 12px rgba(0,0,0,.75); }
.home .panel { position: absolute; left: 0; right: 0; bottom: 0; padding: 44px 16px calc(14px + var(--sab));
  background: linear-gradient(180deg, rgba(13,16,18,0) 0, rgba(13,16,18,.9) 30px, #0D1012 44px); }
.home .brand { margin-bottom: 14px; }
@media (orientation: portrait) { .home .brand { display: none; } }
.home .brand .big { font-weight: 900; font-stretch: 72%; text-transform: uppercase; letter-spacing: -.01em; font-size: clamp(48px, 15vw, 92px); line-height: .84; white-space: nowrap; }
.home .brand .sub { margin-top: 7px; color: var(--gs-grey); font-size: 14px; }
.home .field { margin-bottom: 10px; }
.home .joinrow { margin-top: 10px; }
.home .joinrow .btn { flex: none; width: 34%; }
.home .foot { margin-top: 6px; text-align: left; }
body.homefloat .hdr { background: none; border-bottom: 0; }
body.homefloat .main { top: 0; }
@media (orientation: landscape) {
  .home .reelshade { background: linear-gradient(90deg, rgba(13,16,18,.4) 0, rgba(13,16,18,0) 20%, rgba(13,16,18,0) 50%, rgba(13,16,18,.9) 60%, #0D1012 70%),
      linear-gradient(180deg, rgba(13,16,18,.5) 0, rgba(13,16,18,0) 18%); }
  .home .panel { top: 0; left: auto; width: min(420px, 44%); overflow-y: auto; background: none; padding: calc(var(--hdr) + var(--sat) + 6px) calc(env(safe-area-inset-right, 0px) + 18px) 14px 18px; }
  .home .reelcap { top: auto; bottom: calc(var(--sab) + 22px); left: calc(env(safe-area-inset-left, 0px) + 22px); right: 47%; }
  .home .brand .big { font-size: clamp(40px, 7.5vw, 88px); }
}
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; font-weight: 500; color: var(--gs-grey); }
.inp { height: 52px; border-radius: 13px; background: rgba(13,16,18,.72); border: 1px solid var(--gs-line); padding: 0 16px; font-size: 17px; font-weight: 500; outline: none; }
.inp:focus { border-color: #fff; }
.inp.code { text-transform: uppercase; letter-spacing: .3em; font-weight: 800; font-stretch: 115%; text-align: center; }
.tokpick { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.tokpick button { aspect-ratio: 1; border-radius: 12px; background: rgba(13,16,18,.6); border: 1px solid var(--gs-line); display: grid; place-items: center; color: var(--dim); }
.tokpick button svg { width: 58%; height: 58%; }
.tokpick button.on { background: #fff; color: var(--gs-ink); border-color: #fff; }
.tokpick button.taken { opacity: .25; pointer-events: none; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.rejoin { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(13,16,18,.72); border: 1px solid var(--gs-line); margin-bottom: 12px; }
.rejoin b { font-stretch: 115%; letter-spacing: .14em; }
.foot { text-align: center; color: var(--faint); font-size: 11px; margin-top: 10px; }

/* ---------- lobby ---------- */
.lobby { position: absolute; inset: 0; display: flex; flex-direction: column; }
.lobby .body { flex: 1; min-height: 0; padding: 16px 16px 8px; }
.lobby h2 { font-size: 17px; font-weight: 800; font-stretch: 80%; text-transform: uppercase; color: var(--chalk); margin: 20px 2px 8px; }
.invite { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.invite .k { font-size: 13px; font-weight: 500; color: var(--gs-grey); }
.invite .code { font-weight: 900; font-stretch: 75%; font-size: 56px; letter-spacing: .04em; line-height: .95; margin: 2px 0 10px; }
.invite .qr { width: 104px; height: 104px; background: #fff; border-radius: 12px; padding: 7px; }
.invite .qr svg { width: 100%; height: 100%; display: block; }
.seat { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 8px; }
.seat .nm { flex: 1; min-width: 0; font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat .nm small { display: block; color: var(--faint); font-weight: 600; font-size: 12px; }
.seat .x { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--faint); }
.seat .x svg { width: 16px; height: 16px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 8px; }
.opt .l { min-width: 0; }
.opt .l b { display: block; font-size: 15px; }
.opt .l span { display: block; color: var(--faint); font-size: 12.5px; }
.seg { display: inline-flex; background: transparent; border-radius: 12px; padding: 0; border: 1px solid var(--gs-line); flex: none; overflow: hidden; }
.seg button { height: 34px; padding: 0 12px; border-radius: 0; font-size: 13.5px; font-weight: 500; color: var(--gs-grey); }
.seg button.on { background: #fff; color: var(--gs-ink); }
.lobby .actions { flex: none; padding: 10px 16px calc(14px + var(--sab)); display: flex; flex-direction: column; gap: 8px; background: var(--bg); border-top: 1px solid var(--line); }
.hint { color: var(--faint); font-size: 12.5px; text-align: center; }

/* ---------- token chip: an enamel disc in the player's colour, the piece inked on it ---------- */
.tok { --pc: #EEE; position: relative; flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #101214;
  background: radial-gradient(circle at 34% 26%, color-mix(in srgb, var(--pc) 50%, #fff) 0%, var(--pc) 44%, color-mix(in srgb, var(--pc) 76%, #000) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.3), 0 0 0 2px rgba(0,0,0,.4), 0 3px 8px rgba(0,0,0,.6); }
.tok svg { width: 60%; height: 60%; filter: drop-shadow(0 1px 0 rgba(255,255,255,.3)); }
.tok.sm { width: 28px; height: 28px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3), 0 0 0 1.5px rgba(0,0,0,.4), 0 2px 5px rgba(0,0,0,.55); }
.tok.xs { width: 20px; height: 20px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.tok.out { filter: grayscale(1) brightness(.55); }

/* ---------- game layout ---------- */
.game { position: absolute; inset: 0; }
.rail { position: absolute; left: 0; right: 0; top: 0; height: 66px; display: flex; gap: 8px; padding: 8px 10px; overflow-x: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.pchip { position: relative; flex: none; display: flex; align-items: center; gap: 9px; height: 50px; padding: 0 12px 0 7px; border-radius: 14px;
  background: color-mix(in srgb, var(--pc) 11%, var(--panel)); border: 1px solid color-mix(in srgb, var(--pc) 38%, transparent); }
.pchip .tok.sm { width: 34px; height: 34px; }
.pchip.turn { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 22%, var(--panel)); box-shadow: 0 0 0 1px var(--pc), 0 0 18px color-mix(in srgb, var(--pc) 36%, transparent); }
.pchip .meta { line-height: 1.05; }
.pchip .n { font-weight: 800; font-size: 13px; max-width: 92px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 5px; }
.pchip .c { font-weight: 800; font-stretch: 90%; font-size: 15px; margin-top: 3px; display: flex; align-items: center; gap: 6px; }
.pchip .c.up { color: var(--good); } .pchip .c.down { color: var(--bad); }
.pchip .badge { font-size: 10.5px; font-weight: 500; letter-spacing: 0; padding: 1px 5px; border-radius: 5px; background: rgba(255,255,255,.12); color: var(--chalk); text-transform: none; }
.pchip.me .n::after { content: 'You'; font-size: 10.5px; letter-spacing: 0; color: var(--gs-grey); font-weight: 500; }
.pchip.out { opacity: .4; }
.pchip .off { width: 6px; height: 6px; border-radius: 50%; background: var(--bad); }
.floaty { position: absolute; left: 50%; top: -4px; transform: translateX(-50%); font-weight: 900; font-stretch: 90%; font-size: 15px; pointer-events: none; white-space: nowrap;
  text-shadow: 0 2px 6px rgba(0,0,0,.8); animation: floaty 1.5s ease-out forwards; z-index: 5; }
.floaty.up { color: var(--good); } .floaty.down { color: var(--bad); }
@keyframes floaty { 0% { opacity: 0; transform: translate(-50%, 8px); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -26px); } }
.emote { position: absolute; left: 50%; top: 0; font-size: 30px; pointer-events: none; animation: emote 2.2s ease-out forwards; z-index: 6; }
@keyframes emote { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.6); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -70px) scale(1); } }

.boardvp { position: absolute; overflow: hidden; touch-action: none; border-radius: 6px; }
.board { position: absolute; left: 0; top: 0; width: 1000px; height: 1000px; transform-origin: 0 0; will-change: transform;
  background: #111214 url(/assets/img/rubber.jpg) 0 0 / 512px 512px; box-shadow: 0 0 0 2px #2a2d31, 0 30px 80px rgba(0,0,0,.6); border-radius: 8px; contain: layout paint; }
.zoombtn { position: absolute; right: calc(14% + 10px); bottom: calc(14% + 10px); width: 38px; height: 38px; border-radius: 11px; background: rgba(21,23,25,.92); border: 1px solid var(--line2); display: grid; place-items: center; color: var(--dim); z-index: 5; }
.zoombtn svg { width: 20px; height: 20px; }

/* tiles */
.tile { position: absolute; background: #1A1C1F; box-shadow: inset 0 0 0 1px #2B2E33; overflow: hidden; color: var(--chalk); }
.tile .band { position: absolute; background: var(--g); display: flex; align-items: center; justify-content: center; gap: 3px; }
.tile.side-b .band { left: 0; right: 0; top: 0; height: 24px; }
.tile.side-t .band { left: 0; right: 0; bottom: 0; height: 24px; }
.tile.side-l .band { top: 0; bottom: 0; right: 0; width: 24px; flex-direction: column; }
.tile.side-r .band { top: 0; bottom: 0; left: 0; width: 24px; flex-direction: column; }
.tile .face { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2px; }
.tile.side-b .face { left: 0; right: 0; top: 24px; bottom: 9px; }
.tile.side-t .face { left: 0; right: 0; top: 9px; bottom: 24px; }
.tile.side-l .face { left: 9px; right: 24px; top: 0; bottom: 0; }
.tile.side-r .face { left: 24px; right: 9px; top: 0; bottom: 0; }
.tile .por { width: 52px; height: 52px; border-radius: 9px; object-fit: cover; background: #2a2d31; box-shadow: 0 0 0 1.5px rgba(0,0,0,.6); }
.tile.side-l .por, .tile.side-r .por { width: 38px; height: 38px; border-radius: 8px; }
.tile .f { font-size: 10.5px; font-weight: 600; color: var(--dim); line-height: 1; margin-top: 3px; white-space: nowrap; }
.tile .l { font-size: 17px; font-weight: 900; font-stretch: 68%; text-transform: uppercase; line-height: .95; letter-spacing: .01em; white-space: nowrap; }
.tile .pr { font-size: 11px; font-weight: 700; color: var(--faint); line-height: 1; margin-top: 2px; }
.tile.side-l .f, .tile.side-r .f { display: none; }
.tile .own { position: absolute; background: var(--oc, transparent); display: flex; align-items: center; justify-content: center; gap: 3px; color: #101214; overflow: hidden; }
.tile .own svg { width: 13px; height: 13px; flex: none; }
.tile .own b { font-size: 10px; font-weight: 800; font-stretch: 75%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56px; }
.tile.side-l .own b, .tile.side-r .own b { display: none; }
.tile.side-b .own { left: 0; right: 0; bottom: 0; height: 9px; }
.tile.side-t .own { left: 0; right: 0; top: 0; height: 9px; }
.tile.side-l .own { top: 0; bottom: 0; left: 0; width: 9px; }
.tile.side-r .own { top: 0; bottom: 0; right: 0; width: 9px; }
.tile.owned { background: color-mix(in srgb, var(--oc) 20%, #1A1C1F); }
.tile.owned.side-b .own, .tile.owned.side-t .own { height: 20px; } .tile.owned.side-l .own, .tile.owned.side-r .own { width: 20px; }
.tile.owned.side-b .face { bottom: 20px; } .tile.owned.side-t .face { top: 20px; } .tile.owned.side-l .face { left: 20px; } .tile.owned.side-r .face { right: 20px; }
.tile.owned .pr { display: none; }
.tile.mort .face { opacity: .35; }
.tile.mort::after { content: 'MORTGAGED'; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-32deg); font-size: 11px; font-weight: 900; letter-spacing: .12em;
  color: var(--bad); border: 1.5px solid var(--bad); padding: 2px 5px; border-radius: 4px; background: rgba(13,14,15,.8); white-space: nowrap; }
.tile.hl { box-shadow: inset 0 0 0 3px var(--chalk), 0 0 24px rgba(238,234,226,.35); z-index: 2; }
.plate { width: 15px; height: 15px; border-radius: 50%; flex: none; background: radial-gradient(circle, #15171a 0 14%, #c9ced4 15% 30%, #1d8a52 31% 84%, #2bb36f 85% 100%); box-shadow: 0 1px 2px rgba(0,0,0,.6); }
.plate.red { width: 20px; height: 20px; background: radial-gradient(circle, #15171a 0 12%, #c9ced4 13% 27%, #e2492b 28% 85%, #ff6a3d 86% 100%); }
.tile .icon { width: 44px; height: 44px; color: var(--chalk); opacity: .92; }
.tile .icon svg { width: 100%; height: 100%; }
.tile.side-l .icon, .tile.side-r .icon { width: 34px; height: 34px; }
.tile .kind { font-size: 15px; font-weight: 900; font-stretch: 72%; text-transform: uppercase; letter-spacing: .03em; line-height: 1; }
.tile .sub { font-size: 9.5px; color: var(--faint); font-weight: 700; line-height: 1.05; letter-spacing: .02em; }
.tile.card-lore .icon { color: var(--gold); }
.tile.card-roster .icon { color: #8FD0EE; }
.tile.tax .kind { color: var(--chalk); }
.tile.corner { background: #17191C; }
.corner .ci { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 10px; }
.corner .ci .icon { width: 54px; height: 54px; }
.corner .big { font-size: 22px; font-weight: 900; font-stretch: 72%; text-transform: uppercase; line-height: .95; letter-spacing: .02em; }
.corner .small { font-size: 10px; color: var(--dim); font-weight: 700; letter-spacing: .03em; line-height: 1.15; }
.corner.go .big { font-size: 25px; }
.corner.go .arrow { width: 70px; height: 34px; color: var(--chalk); }
.corner.go .arrow svg { width: 100%; height: 100%; }
.corner.jail .cell { position: absolute; right: 0; top: 0; width: 100px; height: 100px; background: #222529; box-shadow: inset 0 0 0 1px #34383d;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.corner.jail .cell .icon { width: 50px; height: 50px; }
.corner.jail .cell .big { font-size: 19px; }
.corner.jail .vis { position: absolute; left: 0; bottom: 0; font-size: 10.5px; font-weight: 900; letter-spacing: .14em; color: var(--dim); text-transform: uppercase; }
.corner.jail .vis.h { left: 40px; bottom: 12px; }
.corner.jail .vis.v { left: 13px; bottom: 40px; writing-mode: vertical-rl; transform: rotate(180deg); }
.corner.gotojail .big { color: var(--bad); }

/* board centre: rubber / oak platform / rubber */
.centre { position: absolute; left: 140px; top: 140px; width: 720px; height: 720px; }
.centre .oak { position: absolute; left: 0; right: 0; top: 200px; height: 320px; background: #9b7346 url(/assets/img/oak.jpg) center / cover; box-shadow: inset 0 0 0 2px rgba(0,0,0,.35), inset 0 10px 30px rgba(0,0,0,.25), inset 0 -10px 30px rgba(0,0,0,.25); }
.centre .mark { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-58%); text-align: center; pointer-events: none; }
.centre .mark .w { font-weight: 900; font-stretch: 125%; font-size: 74px; letter-spacing: .03em; text-transform: uppercase; color: rgba(36, 20, 8, .62); line-height: 1; mix-blend-mode: multiply; }
.centre .mark .s { margin-top: 10px; font-weight: 800; font-stretch: 118%; font-size: 15px; letter-spacing: .5em; text-transform: uppercase; color: rgba(36, 20, 8, .5); }
.centre .decks { position: absolute; left: 0; right: 0; top: 0; height: 200px; display: flex; align-items: center; justify-content: center; gap: 70px; }
.deck { position: relative; width: 116px; height: 156px; }
.deck .cb { position: absolute; inset: 0; border-radius: 12px; }
.deck.lore .cb { background: #121315; box-shadow: inset 0 0 0 2px #F3C93A44, 0 2px 0 #000; }
.deck.roster .cb { background: var(--paper); box-shadow: inset 0 0 0 2px rgba(0,0,0,.08), 0 2px 0 #000; }
.deck .cb:nth-child(1) { transform: translate(5px, 6px) rotate(3deg); filter: brightness(.7); }
.deck .cb:nth-child(2) { transform: translate(2px, 3px) rotate(1.5deg); filter: brightness(.85); }
.deck .face { position: absolute; inset: 0; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 10px 20px rgba(0,0,0,.45); }
.deck.lore .face { background: #121315; color: var(--gold); box-shadow: inset 0 0 0 2px #F3C93A55, 0 10px 20px rgba(0,0,0,.45); }
.deck.roster .face { background: var(--paper) url(/assets/img/paper.jpg); color: #111; }
.deck .face svg { width: 52px; height: 52px; }
.deck .face b { font-weight: 900; font-stretch: 112%; letter-spacing: .2em; font-size: 15px; }
.deck .face small { font-size: 11px; font-weight: 700; opacity: .6; letter-spacing: .06em; }
.deck { transform: rotate(-4deg); }
.deck.roster { transform: rotate(4deg); }
.centre .tree { position: absolute; left: 0; right: 0; bottom: 0; height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.centre .tree .lbl { font-size: 13px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; color: var(--faint); }
.centre .tree .pl { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 560px; }
.centre .tree .pl i { width: 13px; height: 13px; border-radius: 50%; background: #25A36A; box-shadow: inset 0 0 0 3.5px #1E8957; }
.centre .tree .pl i.r { background: #E5383B; box-shadow: inset 0 0 0 3.5px #C42A2E; width: 16px; height: 16px; }
.centre .tree .pl i.gone { background: transparent; box-shadow: inset 0 0 0 1.5px #3a3e43; }
.centre .tree .pot { font-weight: 800; color: var(--gold); font-size: 15px; letter-spacing: .06em; }
.centre .lastroll { position: absolute; right: 24px; top: 214px; display: flex; gap: 8px; opacity: .9; }

/* pieces on the board */
.pieces { position: absolute; inset: 0; pointer-events: none; }
.piece { position: absolute; left: 0; top: 0; width: 56px; height: 56px; margin: -28px 0 0 -28px; will-change: transform; transition: none; }
.piece .tok { width: 56px; height: 56px; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.3), 0 0 0 3px rgba(13,14,15,.85), 0 10px 14px rgba(0,0,0,.6); }
.piece.turn .tok::after { content: ''; position: absolute; inset: -14px; border-radius: 50%; border: 3px solid var(--pc); animation: ring 1.6s ease-out infinite; }
@keyframes ring { 0% { transform: scale(.75); opacity: .9; } 100% { transform: scale(1.25); opacity: 0; } }
.piece.hop .tok { animation: hop .17s ease-out; }
@keyframes hop { 50% { transform: translateY(-16px) scale(1.06); } }

/* dice (screen space) */
.dicebox { position: absolute; pointer-events: none; z-index: 8; display: flex; gap: 14px; perspective: 600px; }
.die { width: var(--ds, 52px); height: var(--ds, 52px); position: relative; transform-style: preserve-3d; }
.die .f { position: absolute; inset: 0; border-radius: 22%; background: radial-gradient(circle at 30% 25%, #ffffff, #eeeae2 55%, #d6d1c7); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), inset 0 -3px 6px rgba(0,0,0,.12);
  display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 15%; }
.die .f i { width: 72%; height: 72%; margin: auto; border-radius: 50%; background: #16181b; box-shadow: inset 0 1px 2px rgba(255,255,255,.2); }
.die .f i.h { visibility: hidden; }
.die.shadow { filter: drop-shadow(0 10px 10px rgba(0,0,0,.45)); }
.minidie { width: 26px; height: 26px; border-radius: 6px; background: #EEEAE2; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 3px; }
.minidie i { width: 5px; height: 5px; margin: auto; border-radius: 50%; background: #16181b; }
.minidie i.h { visibility: hidden; }

/* dock */
.dock { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px calc(10px + var(--sab)); display: flex; flex-direction: column; gap: 9px; }
.status { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.status .txt { flex: 1; min-width: 0; font-size: 14px; color: var(--dim); line-height: 1.25; }
.status .txt b { color: var(--chalk); font-weight: 800; }
.acts { display: flex; gap: 8px; }
.acts .btn { flex: 1; min-width: 0; }
.acts .btn.pri { flex: 1.6; }
.subacts { display: flex; gap: 6px; }
.subacts button { flex: 1; height: 44px; border-radius: 12px; background: transparent; border: 1px solid var(--gs-line); font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--chalk); position: relative; }
.subacts button:active { background: rgba(255,255,255,.1); }
.subacts .dot { position: absolute; top: 7px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.ticker { flex: 1; min-height: 0; overflow: hidden; padding: 4px 4px 0; display: flex; flex-direction: column; gap: 2px;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
.ticker .tl { display: flex; gap: 9px; align-items: baseline; font-size: 13px; color: var(--faint); line-height: 1.3; min-height: 22px; }
.ticker .tl i { width: 7px; height: 7px; border-radius: 50%; background: var(--pc); flex: none; transform: translateY(-1px); }
.ticker .tl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cashline { display: flex; align-items: baseline; justify-content: space-between; }
.cashline .k { font-size: 14px; font-weight: 500; color: var(--gs-grey); }
.cashline .v { font-weight: 900; font-stretch: 92%; font-size: 22px; }

/* desktop / landscape tablet */
.game.wide .rail { position: absolute; flex-direction: column; overflow-y: auto; overflow-x: hidden; height: auto; }
.game.wide .pchip { width: 100%; }
.game.wide .pchip .n { max-width: none; }
.sidecol { position: absolute; display: none; }
.game.wide .sidecol { display: flex; flex-direction: column; }
.sidelog { flex: 1; min-height: 0; border-top: 1px solid var(--line); padding: 8px 14px; font-size: 13px; color: var(--dim); }
.sidelog p { margin: 0 0 6px; }

/* ---------- sheets + overlays ---------- */
.scrim { position: fixed; inset: 0; background: rgba(5,6,7,.62); z-index: 70; opacity: 0; transition: opacity .22s; }
.scrim.on { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 71; max-height: 88%; display: flex; flex-direction: column; background: var(--panel); border-radius: 22px 22px 0 0;
  border-top: 1px solid var(--line2); transform: translateY(105%); transition: transform .3s cubic-bezier(.2,.9,.3,1); padding-bottom: var(--sab); }
.sheet.on { transform: none; }
.sheet .grab { flex: none; height: 26px; display: grid; place-items: center; }
.sheet .grab i { width: 40px; height: 5px; border-radius: 3px; background: var(--line2); }
.sheet .sh { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 16px 10px; }
.sheet .sh h3 { margin: 0; font-size: 20px; font-weight: 900; font-stretch: 75%; letter-spacing: -.005em; text-transform: uppercase; }
.sheet .sh .ib { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--chalk); background: transparent; }
.sheet .sh .ib svg { width: 18px; height: 18px; }
.sheet .sb { flex: 1; min-height: 0; padding: 0 14px 18px; }
@media (min-width: 700px) { .sheet { left: 50%; width: 560px; margin-left: -280px; } }

.grp { margin-bottom: 14px; }
.grp .gh { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; font-stretch: 80%; text-transform: uppercase; color: var(--chalk); margin: 0 2px 7px; }
.grp .gh i { width: 12px; height: 12px; border-radius: 3px; background: var(--g); }
.grp .gh em { font-style: normal; color: var(--faint); font-weight: 700; letter-spacing: .04em; text-transform: none; }
.asset { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 13px; background: var(--panel2); border: 1px solid var(--line); margin-bottom: 6px; }
.asset img, .asset .ico { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; flex: none; background: #2a2d31; }
.asset .ico { display: grid; place-items: center; color: var(--chalk); }
.asset .ico svg { width: 30px; height: 30px; }
.asset .ai { flex: 1; min-width: 0; }
.asset .ai b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset .ai span { display: block; font-size: 12px; color: var(--faint); }
.asset .ab { display: flex; gap: 5px; flex: none; }
.asset .ab button { height: 42px; min-width: 58px; padding: 0 9px; border-radius: 10px; background: var(--panel3); border: 1px solid var(--line); font-size: 13px; font-weight: 800; color: var(--chalk); white-space: nowrap;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; font-variant-numeric: tabular-nums; }
.asset .ab button small { font-size: 10.5px; font-weight: 500; letter-spacing: 0; text-transform: none; opacity: .75; }
.asset .ab button[data-why] { opacity: .38; }
.asset .ab button.go { background: #25A36A; border-color: #25A36A; color: #04140b; }

.asset .plates { display: flex; gap: 3px; margin-top: 4px; }
.asset .plates .plate { width: 12px; height: 12px; }
.asset .plates .plate.red { width: 16px; height: 16px; }
.asset.mort { opacity: .65; }
.empty { color: var(--faint); text-align: center; padding: 26px 10px; font-size: 14px; }

/* log */

/* deed: a swing tag */
.deedwrap { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px 20px calc(20px + var(--sab)); pointer-events: none; }
.deedwrap > * { pointer-events: auto; }
.deed { position: relative; width: min(330px, 100%); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; overflow-x: hidden; border-radius: 18px; background: var(--paper) url(/assets/img/paper.jpg); color: var(--ink);
  box-shadow: 0 30px 70px rgba(0,0,0,.7); transform-origin: 50% 0; animation: tagin .38s cubic-bezier(.2,1.2,.3,1); }
@keyframes tagin { 0% { transform: translateY(40px) rotate(-4deg) scale(.92); opacity: 0; } 100% { transform: none; opacity: 1; } }
.deed .hole { position: absolute; top: 12px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #0d0e0f; box-shadow: 0 0 0 3px rgba(0,0,0,.12); z-index: 3; }
.deed .dh { position: relative; height: 128px; background: var(--g); color: var(--gi); }
.deed .dh .sq { position: absolute; left: 18px; top: 16px; font-size: 10.5px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; opacity: .85; }
.deed .dh .cnt { position: absolute; left: 18px; top: 34px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; opacity: .85; }
.deed .dh img { position: absolute; left: 18px; bottom: -40px; width: 104px; height: 104px; border-radius: 16px; object-fit: cover; border: 3px solid var(--paper); box-shadow: 0 8px 18px rgba(0,0,0,.3); background: #ccc; }
.deed .dh .ic { position: absolute; left: 18px; bottom: -36px; width: 96px; height: 96px; border-radius: 16px; background: #141517; color: var(--chalk); display: grid; place-items: center; border: 3px solid var(--paper); }
.deed .dh .ic svg { width: 62px; height: 62px; }
.deed .nmw { padding: 10px 18px 0 136px; min-height: 52px; }
.deed .nmw .f { font-size: 12px; font-weight: 700; color: #6b665d; }
.deed .nmw .l { font-size: 25px; font-weight: 900; font-stretch: 70%; text-transform: uppercase; line-height: .92; letter-spacing: .005em; }
.deed .claim { padding: 14px 18px 0; font-size: 13.5px; font-weight: 600; color: #3b3832; line-height: 1.3; }
.deed .reach { display: flex; gap: 14px; padding: 8px 18px 0; font-size: 12.5px; font-weight: 800; color: #4a463f; }
.deed .reach span { display: inline-flex; align-items: center; gap: 4px; }
.deed .reach svg { width: 15px; height: 15px; }
.deed table { width: calc(100% - 36px); margin: 12px 18px 0; border-collapse: collapse; font-size: 13.5px; }
.deed td { padding: 5px 0; border-bottom: 1px solid rgba(21,19,15,.1); }
.deed td:last-child { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.deed tr.now td { color: #000; font-weight: 900; }
.deed tr.now td:first-child::before { content: '▸ '; }
.deed .fine { display: flex; justify-content: space-between; padding: 9px 18px 0; font-size: 11.5px; color: #6b665d; font-weight: 700; }
.deed .owner { display: flex; align-items: center; gap: 10px; margin: 14px 18px 0; padding: 10px 12px; border-radius: 12px; background: rgba(21,19,15,.06); font-size: 13.5px; font-weight: 700; }
.deed .owner .tok { width: 26px; height: 26px; box-shadow: 0 0 0 2px var(--pc); }
.deed .dact { display: flex; gap: 8px; padding: 14px 18px 18px; }
.deed .dact .btn { flex: 1; height: 50px; }
.deed .dact .btn.pri { background: var(--gs-ink); color: #fff; box-shadow: none; }
.deed .dact .btn.sec { background: transparent; color: var(--gs-ink); border: 1px solid var(--gs-ink); }
.deed .x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(0,0,0,.18); color: var(--gi); z-index: 4; }
.deed .x svg { width: 16px; height: 16px; }
.deed .note { padding: 12px 18px 0; font-size: 12.5px; color: #6b665d; font-weight: 600; }
.deed .dl, .deed .dr { display: contents; }   /* the two halves only exist sideways */
.deed .dpad { height: 18px; }

/* drawn cards */
.cardstage { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; pointer-events: auto; perspective: 1200px; background: rgba(6,7,8,.78); animation: fade .25s; }
.card3 { position: relative; width: min(300px, 82vw); height: min(420px, 115vw); }
.card3 .side { position: absolute; inset: 0; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 70px rgba(0,0,0,.7); }
.card3 .back { display: grid; place-items: center; }
.card3 .back.lore { background: #121315; color: var(--gold); box-shadow: inset 0 0 0 3px #F3C93A66, 0 30px 70px rgba(0,0,0,.7); }
.card3 .back.roster { background: var(--paper) url(/assets/img/paper.jpg); color: #111; }
.card3 .back svg { width: 96px; height: 96px; }
.lorecard { background: #121315; color: var(--chalk); padding: 26px 24px; display: flex; flex-direction: column; box-shadow: inset 0 0 0 3px #F3C93A66; }
.lorecard .kind { font-size: 11px; font-weight: 900; letter-spacing: .3em; color: var(--gold); }
.lorecard .tagbig { position: absolute; right: -10px; bottom: 70px; font-weight: 900; font-stretch: 125%; font-size: 120px; line-height: 1; color: rgba(243,201,58,.08); letter-spacing: -.02em; white-space: nowrap; pointer-events: none; }
.lorecard h4 { margin: 18px 0 0; font-weight: 900; font-stretch: 72%; text-transform: uppercase; font-size: 46px; line-height: .9; }
.lorecard .tag { margin-top: 10px; font-weight: 800; color: var(--gold); font-size: 14px; letter-spacing: .04em; }
.lorecard p { margin: auto 0 0; font-size: 17px; line-height: 1.38; font-weight: 600; color: #e4e0d8; position: relative; }
.rostercard { background: var(--paper) url(/assets/img/paper.jpg); color: var(--ink); display: flex; flex-direction: column; }
.rostercard .ph { position: relative; height: 52%; overflow: hidden; background: #ccc; }
.rostercard .ph img { width: 100%; height: 100%; object-fit: cover; }
.rostercard .ph .kind { position: absolute; left: 14px; top: 14px; font-size: 10.5px; font-weight: 900; letter-spacing: .2em; color: #fff; background: rgba(0,0,0,.55); padding: 5px 8px; border-radius: 6px; }
.rostercard .bd { flex: 1; padding: 16px 20px 20px; display: flex; flex-direction: column; }
.rostercard h4 { margin: 0; font-weight: 900; font-stretch: 72%; text-transform: uppercase; font-size: 32px; line-height: .92; }
.rostercard .tag { margin-top: 6px; font-weight: 700; color: #6b665d; font-size: 13px; }
.rostercard p { margin: auto 0 0; font-size: 16.5px; line-height: 1.36; font-weight: 700; }
.cardstage .tapnote { position: absolute; bottom: calc(26px + var(--sab)); left: 0; right: 0; text-align: center; color: var(--faint); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.cardstage .who { position: absolute; top: calc(var(--sat) + 22px); left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 8px; color: var(--dim); font-weight: 700; font-size: 14px; }

/* auction */
.auction { position: fixed; left: 10px; right: 10px; z-index: 75; bottom: calc(10px + var(--sab)); border-radius: 22px; background: var(--panel); border: 1px solid var(--line2);
  box-shadow: 0 -10px 50px rgba(0,0,0,.6); padding: 14px; animation: rise .3s cubic-bezier(.2,1,.3,1); }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 700px) { .auction { left: 50%; right: auto; width: 520px; margin-left: -260px; } }
.auction .top { display: flex; align-items: center; gap: 12px; }
.auction .top img, .auction .top .ico { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; background: #2a2d31; display: grid; place-items: center; }
.auction .top .ico svg { width: 36px; height: 36px; }
.auction .top .t { flex: 1; min-width: 0; }
.auction .top .t small { display: block; font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--gold); text-transform: none; }
.auction .top .t b { display: block; font-size: 19px; font-weight: 900; font-stretch: 80%; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auction .top .t span { font-size: 12px; color: var(--faint); font-weight: 700; }
.auction .bidnow { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 10px; padding: 12px 14px; border-radius: 14px; background: var(--panel2); }
.auction .bidnow .amt { font-weight: 900; font-stretch: 95%; font-size: 34px; line-height: 1; }
.auction .bidnow .by { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; }
.auction .clock { height: 5px; border-radius: 3px; background: var(--panel3); overflow: hidden; margin-bottom: 12px; }
.auction .clock i { display: block; height: 100%; background: var(--gold); transform-origin: 0 50%; }
.auction .bids { display: grid; grid-template-columns: repeat(3, 1fr) 0.9fr; gap: 8px; }
.auction .bids .btn { height: 52px; padding: 0 6px; font-size: 15px; }
.auction .msg { text-align: center; color: var(--dim); font-weight: 700; font-size: 14px; padding: 8px 0 2px; }

/* trade */
.tr-players { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.tr-players button { flex: none; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px 0 6px; border-radius: 13px; background: var(--panel2); border: 1px solid var(--line); font-weight: 800; font-size: 13px; }
.tr-players button.on { border-color: #fff; background: var(--panel3); }
.tr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tr-col h4 { margin: 4px 2px 8px; font-size: 15px; font-weight: 800; font-stretch: 80%; text-transform: uppercase; color: var(--chalk); }
.tr-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px; border-radius: 11px; background: var(--panel2); border: 1px solid var(--line); margin-bottom: 6px; text-align: left; }
.tr-item.on { border-color: var(--chalk); background: var(--panel3); box-shadow: 0 0 0 1px var(--chalk) inset; }
.tr-item img, .tr-item .ico { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; flex: none; display: grid; place-items: center; background: #2a2d31; }
.tr-item .ico svg { width: 20px; height: 20px; }
.tr-item b { font-size: 12.5px; line-height: 1.1; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-item span { font-size: 10.5px; color: var(--faint); display: block; }
.tr-item .g { width: 4px; align-self: stretch; border-radius: 2px; background: var(--g); flex: none; }
.stepper { display: flex; align-items: center; justify-content: space-between; padding: 6px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); margin-bottom: 8px; }
.stepper button { width: 36px; height: 36px; border-radius: 10px; background: var(--panel3); font-weight: 900; font-size: 18px; }
.stepper b { font-weight: 900; font-size: 16px; }
.offer { padding: 14px; border-radius: 18px; background: var(--panel2); border: 1px solid var(--line2); margin-bottom: 10px; }
.offer .oh { display: flex; align-items: center; gap: 10px; font-weight: 800; margin-bottom: 10px; }
.offer .os { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 13px; }
.offer .os div h5 { margin: 0 0 6px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.offer .os div p { margin: 0 0 4px; font-weight: 700; }
.offer .oa { display: flex; gap: 8px; margin-top: 12px; }
.offer .oa .btn { flex: 1; height: 46px; }
.incoming { position: fixed; left: 10px; right: 10px; top: calc(var(--hdr) + var(--sat) + 8px); z-index: 74; border-radius: 18px; background: var(--panel); border: 1px solid var(--chalk); box-shadow: 0 20px 60px rgba(0,0,0,.6); padding: 14px; animation: drop .3s ease-out; }
@keyframes drop { from { transform: translateY(-20px); opacity: 0; } }
@media (min-width: 700px) { .incoming { left: 50%; right: auto; width: 520px; margin-left: -260px; } }

/* banners, toasts */
.banner { position: fixed; left: 0; right: 0; top: 34%; z-index: 90; pointer-events: none; display: grid; place-items: center; }
.banner b { font-weight: 900; font-stretch: 72%; font-size: clamp(40px, 13vw, 92px); text-transform: uppercase; letter-spacing: -.01em; color: #fff;
  text-shadow: 0 6px 30px rgba(0,0,0,.8); animation: bannr 1.6s cubic-bezier(.2,1,.3,1) forwards; white-space: nowrap; }
.banner b.bad { color: var(--bad); }
.banner b.gold { color: var(--gold); }
@keyframes bannr { 0% { opacity: 0; transform: scale(1.25); letter-spacing: .06em; } 18% { opacity: 1; transform: scale(1); letter-spacing: -.01em; } 78% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
.toast { position: fixed; left: 50%; bottom: calc(160px + var(--sab)); transform: translateX(-50%); z-index: 95; background: #fff; color: var(--gs-ink); font-weight: 500; font-size: 15px; padding: 13px 18px; border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.6); max-width: calc(100% - 40px); text-align: center; animation: toast 2.8s ease forwards; pointer-events: none; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 10px); } 8%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

/* game over */
.over { position: fixed; inset: 0; z-index: 88; background: rgba(9,10,11,.94); display: flex; flex-direction: column; padding: calc(var(--hdr) + var(--sat) + 10px) 18px calc(18px + var(--sab)); animation: fade .5s; }
@keyframes fade { from { opacity: 0; } }
.over .crown { text-align: center; margin-top: 4vh; }
.over .crown .tok { width: 84px; height: 84px; margin: 0 auto; box-shadow: 0 0 0 6px var(--pc), 0 20px 50px rgba(0,0,0,.7); }
.over .crown h2 { margin: 18px 0 2px; font-weight: 900; font-stretch: 72%; font-size: 48px; line-height: .9; text-transform: uppercase; }
.over .crown p { margin: 0; color: var(--dim); }
.over .ranks { margin: 24px 0 0; flex: 1; min-height: 0; }
.over .rk { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 8px; }
.over .rk .pos { width: 22px; font-weight: 900; color: var(--faint); }
.over .rk .nm { flex: 1; font-weight: 800; }
.over .rk .nm small { display: block; color: var(--faint); font-weight: 600; font-size: 12px; }
.over .rk .w { font-weight: 900; font-stretch: 92%; }
.over .oa { display: flex; gap: 8px; }
.over .oa .btn { flex: 1; }


/* rules page */
.rules h4 { margin: 20px 0 6px; font-size: 18px; font-weight: 900; font-stretch: 75%; text-transform: uppercase; color: var(--chalk); }
.rules p, .rules li { color: var(--dim); font-size: 14px; line-height: 1.45; }
.rules ul { padding-left: 18px; margin: 6px 0; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 15px 4px; border-radius: 0; background: transparent; border: 0; border-bottom: 1px solid var(--line); margin-bottom: 0; font-weight: 600; font-size: 16px; text-align: left; }
.menu-item svg { width: 24px; height: 24px; flex: none; color: var(--dim); }
.menu-item small { display: block; color: var(--faint); font-weight: 600; font-size: 12.5px; }
.menu-item.bad { color: var(--bad); }


/* =================== 3D table + landscape =================== */
.boardvp canvas.gl { display: block; width: 100%; height: 100%; }
.game.three .boardvp { border-radius: 0; }
.game.three .zoombtn { right: 12px; bottom: 12px; background: rgba(13,14,15,.78); }
.game.three:not(.land) .dock { background: var(--bg); border-top: 1px solid var(--line); }
.game.three:not(.land) .rail { background: linear-gradient(180deg, var(--bg), rgba(13,14,15,0)); z-index: 4; }

/* sideways: the table owns the whole screen. The header floats over it as three glass buttons,
   players stack in the top-left, the action cluster sits bottom-right under the right thumb.
   Tokens travel right-to-left on screen, so the cluster only ever covers tiles already passed. */
body.g3land .hdr { background: none; border-bottom: 0; pointer-events: none; height: calc(var(--hdr) + 6px);
  padding: 6px calc(env(safe-area-inset-right, 0px) + 8px) 0 calc(env(safe-area-inset-left, 0px) + 8px); }
body.g3land .hdr .ib, body.g3land .hdr .codechip { pointer-events: auto; background: rgba(13,14,15,.74); border: 1px solid rgba(238,234,226,.1); box-shadow: 0 6px 18px rgba(0,0,0,.35); }
body.g3land .hdr .ib { color: var(--chalk); }
body.g3land .main { top: 0; }

/* upright game: the header bar goes; the player row becomes the top bar (solid + fixed, which also keeps iOS 26+'s
   edge blur off), with the menu at its left end. Room code + invite live in the menu; sound too. */
body.gport .hdr { display: none; }
body.gport .main { top: var(--sat); }
body.gport .game:not(.land) .rail { position: fixed; top: var(--sat); left: 0; right: 0; background: var(--bg); z-index: 6; padding-left: 6px; }
.railmenu { display: none; }
body.gport .railmenu { position: sticky; left: 0; z-index: 2; flex: none; display: grid; place-items: center; width: 40px; height: 50px; margin-right: -2px;
  border-radius: 12px; color: var(--chalk); background: var(--bg); box-shadow: 8px 0 10px -4px var(--bg); }
.railmenu svg { width: 22px; height: 22px; }
.railmenu:active { background: var(--panel2); }
body.netoff .railmenu::after, body.netoff.g3land .hdr [data-act="menu"]::after { content: ''; position: absolute; top: 9px; right: 6px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--bad); animation: blink 1s infinite; }
body.g3land .hdr [data-act="menu"] { position: relative; }

/* camera: 3D (follows the play) | Top (the whole board from above) */
.viewseg { position: absolute; z-index: 5; display: flex; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.55); background: rgba(13,16,18,.74); box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.viewseg button { height: 34px; min-width: 48px; padding: 0 12px; font-size: 14px; font-weight: 600; color: rgba(255,255,255,.78); }
.viewseg button.on { background: #fff; color: var(--gs-ink); }
.game.three:not(.land) .viewseg { top: 8px; right: 8px; }
.game.three.land .viewseg { top: 8px; right: calc(env(safe-area-inset-right, 0px) + 54px); }
/* you steered the camera: one tap goes back to the live, auto-tracking camera */
.autocam { position: absolute; z-index: 5; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 12px; font-size: 14px; font-weight: 600;
  color: #fff; background: rgba(13,16,18,.8); border: 1px solid rgba(255,255,255,.55); box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.autocam[hidden] { display: none; }
.autocam i { width: 8px; height: 8px; border-radius: 50%; background: #FF3B30; box-shadow: 0 0 0 3px rgba(255,59,48,.25); }
.autocam:active { background: rgba(255,255,255,.14); }
.game.three:not(.land) .autocam { top: 50px; right: 8px; }
.game.three.land .autocam { top: 50px; right: calc(env(safe-area-inset-right, 0px) + 54px); }

/* your roll is a gesture, not a button */
.acts { flex-wrap: wrap; }
.swirlhint { flex: 1 1 100%; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,.85); color: rgba(255,255,255,.82); font-size: 13.5px; line-height: 1.25; text-align: left; }
.swirlhint:active { background: rgba(255,255,255,.1); }
.swirlhint b { display: block; color: #fff; font-weight: 900; font-stretch: 75%; text-transform: uppercase; font-size: 19px; line-height: 1; margin-bottom: 2px; }
.swirlhint .sw { flex: none; position: relative; width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.18); border-top-color: #fff; border-right-color: #fff; animation: swirl .85s linear infinite; }
.swirlhint .sw::before, .swirlhint .sw::after { content: ''; position: absolute; width: 7px; height: 7px; background: #fff; border-radius: 1.5px; }
.swirlhint .sw::before { left: 4px; top: 9px; } .swirlhint .sw::after { right: 4px; bottom: 7px; }
.swirlhint.busy { opacity: .55; } .swirlhint.busy .sw { animation-duration: .35s; }
@keyframes swirl { to { transform: rotate(360deg); } }

.game.three.land .rail { left: calc(env(safe-area-inset-left, 0px) + 8px); top: calc(var(--hdr) + 12px); right: auto; width: auto; height: auto;
  max-height: calc(100% - var(--hdr) - 18px); flex-direction: column; gap: 5px; padding: 0; overflow: visible; z-index: 4; pointer-events: none; }
.game.three.land .pchip { pointer-events: auto; width: 136px; height: 40px; gap: 7px; padding: 0 9px 0 6px; border-radius: 13px;
  background: color-mix(in srgb, var(--pc) 14%, rgba(13,14,15,.8)); border-color: color-mix(in srgb, var(--pc) 40%, transparent); box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.game.three.land .pchip.turn { background: color-mix(in srgb, var(--pc) 26%, rgba(20,22,25,.92)); border-color: var(--pc); box-shadow: 0 0 0 1px var(--pc), 0 0 18px color-mix(in srgb, var(--pc) 40%, transparent); }
.game.three.land .pchip .tok.sm { width: 28px; height: 28px; }
.game.three.land .pchip .meta { min-width: 0; flex: 1; }
.game.three.land .pchip .n { font-size: 11.5px; max-width: none; }
.game.three.land .pchip .n::after { font-size: 8px; }
.game.three.land .pchip .c { font-size: 14px; margin-top: 2px; gap: 5px; }
.game.three.land .pchip .badge { font-size: 9.5px; padding: 0 4px; }
.game.three.land .rail.many { gap: 4px; }
.game.three.land .rail.many .pchip { height: 33px; }
.game.three.land .rail.many .pchip .tok.sm { width: 22px; height: 22px; }
.game.three.land .rail.many .pchip .n { font-size: 10.5px; }
.game.three.land .rail.many .pchip .c { font-size: 12.5px; margin-top: 0; }

.game.three.land .dock { left: auto; top: auto; width: 236px; right: calc(env(safe-area-inset-right, 0px) + 8px); bottom: calc(var(--sab) + 8px);
  padding: 10px; gap: 8px; border-radius: 18px; z-index: 4; background: rgba(13,16,18,.82); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 14px 40px rgba(0,0,0,.45); }
.game.three.land .status { min-height: 0; padding: 0 2px; }
.game.three.land .status .txt { font-size: 12.5px; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.game.three.land .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.game.three.land .acts .btn { height: 40px; padding: 0 8px; font-size: 14px; }
.game.three.land .acts .btn:first-child, .game.three.land .acts .swirlhint { grid-column: 1 / -1; }
.game.three.land .acts .btn:first-child { height: 50px; font-size: 16px; }
.game.three.land .swirlhint { min-height: 56px; padding: 8px 12px; font-size: 12.5px; }
.game.three.land .subacts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.game.three.land .subacts button { height: 34px; font-size: 12.5px; background: transparent; }
.game.three.land .subacts .dot { top: 5px; right: 5px; width: 7px; height: 7px; }
.game.three.land .ticker { display: none; }

/* a short screen sideways: slimmer header, overlays that fit 390 px of height */
@media (orientation: landscape) and (max-height: 520px) {
  :root { --hdr: 40px; }
  .hdr .ib { width: 36px; height: 36px; }
  .codechip { padding: 5px 10px; font-size: 13px; }
  .wordmark { font-size: 13px; }

  /* deeds become a wide tag: the athlete on a squad-coloured half, the numbers on paper */
  .deedwrap { padding: 10px calc(env(safe-area-inset-right, 0px) + 12px) calc(10px + var(--sab)) calc(env(safe-area-inset-left, 0px) + 12px); }
  .deed:not(.info) { width: min(640px, 100%); display: flex; align-items: stretch; transform-origin: 50% 50%; }
  .deed:not(.info) .hole { left: 22%; top: 10px; width: 12px; height: 12px; margin-left: -6px; }
  .deed:not(.info) .x { color: var(--ink); background: rgba(21,19,15,.07); top: 10px; right: 10px; width: 32px; height: 32px; }
  .deed .dl { flex: 0 0 44%; min-width: 0; background: var(--g); color: var(--gi); padding: 30px 16px 14px; display: grid;
    grid-template-columns: 104px 1fr; grid-template-rows: auto auto 1fr auto; column-gap: 12px; align-content: start; }
  .deed .dl .dh { display: contents; }
  .deed .dl .dh .sq { position: static; grid-column: 1 / -1; grid-row: 1; justify-self: start; }
  .deed .dl .dh .cnt { position: static; grid-column: 1 / -1; grid-row: 1; justify-self: end; }
  .deed .dl .dh img, .deed .dl .dh .ic { position: static; grid-column: 1; grid-row: 2; width: 104px; height: 104px; margin-top: 10px; border-radius: 16px;
    border: 3px solid rgba(255,255,255,.92); box-shadow: 0 10px 22px rgba(0,0,0,.28); }
  .deed .dl .dh .ic svg { width: 60px; height: 60px; }
  .deed .dl .nmw { grid-column: 2; grid-row: 2; align-self: end; padding: 0 0 4px; min-height: 0; }
  .deed .dl .nmw .f { color: var(--gi); opacity: .78; }
  .deed .dl .nmw .l { font-size: 24px; overflow-wrap: anywhere; }
  .deed .dl .claim { grid-column: 1 / -1; grid-row: 3; padding: 12px 0 0; font-size: 12.5px; color: var(--gi); opacity: .92; }
  .deed .dl .reach { grid-column: 1 / -1; grid-row: 4; padding: 10px 0 0; color: var(--gi); }
  .deed .dr { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 12px 16px 14px 16px; }
  .deed .dr .owner { order: -1; margin: 0 40px 6px 0; padding: 0; min-height: 32px; background: none; font-size: 12.5px; }
  .deed .dr .owner .tok { width: 22px; height: 22px; }
  .deed .dr table { width: 100%; margin: 0; font-size: 12.5px; }
  .deed .dr td { padding: 3px 0; }
  .deed .dr .fine { padding: 7px 0 0; font-size: 11px; }
  .deed .dr .dact { margin-top: auto; padding: 12px 0 0; }
  .deed .dr .dact .btn { height: 46px; font-size: 14px; }
  .deed .dr .dpad { display: none; }
  .deed.info { width: min(400px, 100%); }
  .deed.info .dh { height: 92px; }
  .deed.info .dh .ic { width: 80px; height: 80px; bottom: -30px; }
  .deed.info .nmw { padding: 8px 18px 0 116px; min-height: 40px; }
  .deed.info .claim { padding: 18px 18px 0; }

  .card3 { height: 78vh; width: calc(78vh * 0.714); margin-top: 3vh; }
  .lorecard { padding: 18px 18px; }
  .lorecard h4 { font-size: 30px; margin-top: 10px; }
  .lorecard p { font-size: 14px; }
  .lorecard .tagbig { font-size: 80px; bottom: 50px; }
  .rostercard h4 { font-size: 22px; }
  .rostercard p { font-size: 13.5px; }
  .rostercard .bd { padding: 10px 14px 14px; }
  .cardstage .who { top: 10px; }
  .cardstage .tapnote { bottom: 10px; }

  .auction { left: 50%; right: auto; width: min(560px, 70vw); margin-left: calc(min(560px, 70vw) / -2); bottom: 8px; padding: 10px 12px; }
  .auction .top img, .auction .top .ico { width: 44px; height: 44px; }
  .auction .bidnow { margin: 8px 0 7px; padding: 8px 12px; }
  .auction .bidnow .amt { font-size: 26px; }
  .auction .clock { margin-bottom: 8px; }
  .auction .bids .btn { height: 44px; }
  .incoming { width: min(520px, 70vw); left: 50%; right: auto; margin-left: calc(min(520px, 70vw) / -2); top: calc(var(--hdr) + 6px); padding: 10px 12px; }
  .over { padding: calc(var(--hdr) + 6px) 18px 12px; }
  .over .crown { margin-top: 0; display: flex; align-items: center; gap: 16px; justify-content: center; text-align: left; }
  .over .crown .tok { width: 56px; height: 56px; margin: 0; }
  .over .crown h2 { margin: 0; font-size: 26px; }
  .over .ranks { margin-top: 12px; }
  .banner b { font-size: clamp(24px, 6vh, 44px); }
  .toast { bottom: auto; top: calc(var(--hdr) + 14px); }
  .game.wide .rail { gap: 5px; padding: 4px 10px; }
  .game.wide .pchip { height: 38px; border-radius: 12px; }
  .game.wide .pchip .tok.sm { width: 24px; height: 24px; }
  .game.wide .pchip .n { font-size: 11.5px; } .game.wide .pchip .c { font-size: 13.5px; margin-top: 1px; }
  .game.wide .dock { gap: 7px; padding: 6px 12px; }
  .game.wide .acts .btn { height: 44px; font-size: 13.5px; }
  .game.wide .subacts button { height: 36px; font-size: 11px; }
  .game.wide .status { min-height: 0; } .game.wide .status .txt { font-size: 12.5px; }

  /* home: tighter form on a short screen */
  .home .field { margin-bottom: 8px; } .home .inp { height: 44px; } .home .btn { height: 46px; }
  .home .brand { margin-bottom: 8px; } .home .brand .big { font-size: 46px; } .home .brand .sub { display: none; }
  .home .tokpick { gap: 5px; }
  .lobby .body { padding: 10px calc(env(safe-area-inset-right, 0px) + 16px) 8px calc(env(safe-area-inset-left, 0px) + 16px); }
  .lobby .actions { flex-direction: row; align-items: center; padding: 8px 16px calc(8px + var(--sab)); }
  .lobby .actions .row { flex: 2; }
  .lobby .actions .hint { display: none; }
}
