/* ===== Theme tokens — warm tabletop: dark felt + walnut wood ===== */
:root {
  --bg: #11211a; --bg2: #1a3127;
  --card: #2a1f14; --card2: #3b2c1d;
  --ink: #f1e8d8; --muted: #b9a78b; --line: #4f3b25;
  --accent: #e8a33d; --accent-2: #36d399; --gold: #ffcc33; --vp: #7ad7ff;
  --felt: radial-gradient(ellipse at 50% 40%, #1f5e44 0%, #163f30 55%, #0f2b22 100%);
  --wood: linear-gradient(90deg, #5e3a14 0%, #7c4f1f 45%, #6a431a 100%);
  --wood-ink: #ffe9c4;
  --shadow: 0 2px 0 rgba(0,0,0,.4), 0 12px 30px rgba(0,0,0,.45);
  --corn: #f6c945; --indigo: #6b7cff; --sugar: #ff6db0;
  --tobacco: #c98a4b; --coffee: #8a5a3c; --quarry: #aab2bd;
}
[data-theme="light"] {
  --bg: #f1e4cc; --bg2: #e4d0ab;
  --card: #fffaf0; --card2: #f5ead4;
  --ink: #3a2c1c; --muted: #97836a; --line: #ddc7a1;
  --felt: radial-gradient(ellipse at 50% 40%, #2bb673 0%, #1f9c61 55%, #178050 100%);
  --wood: linear-gradient(90deg, #8b5a26 0%, #a8732f 45%, #946228 100%);
  --wood-ink: #fff3da;
  --shadow: 0 4px 0 rgba(0,0,0,.08), 0 12px 28px rgba(120,80,30,.16);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html { scroll-behavior: smooth; }
.games { scroll-margin-top: 80px; }   /* anchor lands clear of the sticky topbar */
.game-cat { scroll-margin-top: 76px; }
body {
  margin: 0; font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(1200px 700px at 70% -10%, var(--bg2), var(--bg)) fixed;
  color: var(--ink); min-height: 100vh;
}
.landing-body { overflow-x: hidden; }   /* contain the full-bleed hero carpet strip */
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
.error { color: #ff6b6b; min-height: 18px; font-size: 13px; margin-top: 8px; }

/* ===== Top bar ===== */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: var(--wood);
  border-bottom: 3px solid rgba(0,0,0,.35);
  color: var(--wood-ink); box-shadow: 0 3px 0 rgba(0,0,0,.35); position: sticky; top: 0; z-index: 5;
}
.brand { font-weight: 900; font-size: 22px; letter-spacing: .5px; }
.brand-link { color: inherit; text-decoration: none; }
.brand-link:hover { text-decoration: underline; }
.logo-table { width: 24px; height: 24px; vertical-align: -4px; margin-right: 3px; fill: currentColor; }
.brand-game { font-weight: 700; opacity: .8; font-size: 16px; }
.topright { display: flex; align-items: center; gap: 12px; }
.status { font-weight: 800; }
.iconbtn { border: 0; background: rgba(0,0,0,.18); color: inherit; font-size: 18px;
  width: 38px; height: 34px; border-radius: 10px; cursor: pointer; }

/* ===== Cards & buttons ===== */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 16px;
}
.btn {
  border: 0; border-radius: 12px; padding: 9px 14px; font-weight: 800;
  cursor: pointer; background: var(--card2); color: var(--ink); font-size: 14px;
  box-shadow: 0 3px 0 rgba(0,0,0,.35); transition: transform .06s, filter .1s;
}
.btn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.35); }
.btn:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-primary { background: linear-gradient(180deg, #3ee9a6, #2bbd84); color: #06281c; }
.btn-pick { background: linear-gradient(180deg, #ffd95e, #f2b705); color: #3a2a00; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }

.setup { max-width: 440px; margin: 32px auto; animation: rise .4s ease; }
.setup h1 { margin: 0 0 4px; font-size: 30px; }
.setup-h2 { margin: 18px 0 6px; font-size: 17px; }
.dim { opacity: .65; font-weight: 400; }
input.wide { width: 100%; }
.wide-btn { width: 100%; margin-top: 14px; font-size: 15px; }

/* player name rows (+ button to add) */
.playerrow { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.playerrow input { flex: 1; margin: 0; }
.rowdel { padding: 7px 11px; flex: none; }
.addplayer { margin-top: 4px; }

/* lobby browser */
.lobbybrowser { margin-top: 18px; }
.lrow { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 12px; margin: 8px 0; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card2); animation: rise .3s ease; }
.lrow-info { min-width: 0; }
.lrow-name { font-weight: 800; }
.lrow-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* top-bar leave button needs room for its label */
#leaveBtn { width: auto; padding: 0 12px; font-size: 14px; font-weight: 800; }
textarea, select, input {
  width: 100%; font: inherit; padding: 9px; border: 1px solid var(--line);
  border-radius: 10px; margin: 6px 0 10px; background: var(--bg2); color: var(--ink);
}
select, input { width: auto; }

/* ===== Native controls, re-dressed for the table ===== */
/* scrollbars: slim walnut rails instead of the browser's plastic */
* { scrollbar-width: thin; scrollbar-color: #6a4a2e transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7a5435, #5a3a22);
  border-radius: 8px; border: 2px solid rgba(0, 0, 0, .28);
  background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #936740, #6a4528);
  background-clip: padding-box; border: 2px solid rgba(0, 0, 0, .28); }
*::-webkit-scrollbar-corner { background: transparent; }

/* selects: our chevron, not the OS one — and themed option lists */
select option { background-color: #2a1f14; color: #f1e8d8; }
select option:checked { background-color: #5a3a22; }
[data-theme="light"] select option { background-color: #fffaf0; color: #3a2c1c; }
[data-theme="light"] select option:checked { background-color: #f0e2c8; }
select { appearance: none; -webkit-appearance: none; cursor: pointer;
  padding-right: 30px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23b9a78b' stroke-width='2' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center; }

/* plain checkboxes pick up the table green */
input[type="checkbox"] { accent-color: #2bbd84; }

/* sliders: a wood knob on a brass rail */
input[type="range"] { appearance: none; -webkit-appearance: none; height: 22px;
  padding: 0; border: 0; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 4px;
  background: linear-gradient(180deg, #4a3826, #3a2c1c);
  border: 1px solid rgba(0, 0, 0, .4); }
input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px; margin-top: -7px; border-radius: 50%;
  background: linear-gradient(180deg, #f0b75a, #d18a25);
  border: 1px solid #8a5a1c; box-shadow: 0 2px 4px rgba(0, 0, 0, .45); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 4px;
  background: #3a2c1c; border: 1px solid rgba(0, 0, 0, .4); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(180deg, #f0b75a, #d18a25); border: 1px solid #8a5a1c; }

/* number inputs: native spinners out, wooden − / ＋ steppers in (kit adds them) */
input[type="number"] { appearance: textfield; -moz-appearance: textfield;
  text-align: center; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.numwrap { display: inline-flex; align-items: center; gap: 4px; }
.numwrap input[type="number"] { margin: 6px 0; }
.numbtn { width: 30px; height: 34px; flex: none; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card2); color: var(--ink);
  font-weight: 900; font-size: 15px; line-height: 1; padding: 0; }
.numbtn:hover { border-color: var(--accent); }
.numbtn:active { transform: translateY(1px); }

/* ===== Layout ===== */
.game {
  display: grid; grid-template-columns: 180px 1fr 300px; gap: 16px; padding: 16px;
  align-items: start; max-width: 1460px; margin: 0 auto;
}
.adrail { grid-column: 1; grid-row: 1 / span 3; position: sticky; top: 70px; }
.action { grid-column: 2; }
.table-board { grid-column: 2; }
.board { grid-column: 2; }
/* the sidebar flows with the page — the browser's own scroll is the only one
   (a rail-level scrollbar made the right side feel cluttered) */
.side { grid-column: 3; grid-row: 1 / span 3; }

/* ===== Ad placeholder ===== */
.ad-slot { display: flex; flex-direction: column; gap: 6px; }
.ad-label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: center; }
.ad-box {
  height: 600px; border: 2px dashed var(--line); border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: var(--muted); font-weight: 800; background: var(--card); text-align: center; font-size: 14px;
}
.ad-box > div:first-child { font-size: 30px; }

/* ===== Central table board (cubicle style) ===== */
.table-board {
  background: var(--felt); border-radius: 22px; padding: 16px;
  border: 6px solid #0c1f18; box-shadow: var(--shadow), inset 0 0 60px rgba(0,0,0,.35);
  display: grid; gap: 12px;
  grid-template-columns: auto 1fr auto; grid-template-rows: auto 1fr auto;
  grid-template-areas: "roles roles roles" "plant medallion ships" "market market market";
}
.tb-roles { grid-area: roles; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tb-plant { grid-area: plant; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.tb-ships { grid-area: ships; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.tb-market { grid-area: market; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; align-items: center; }
.tb-medallion { grid-area: medallion; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: #eafff5; text-shadow: 0 2px 6px rgba(0,0,0,.5); gap: 4px; }
.tb-label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.65); }

/* Cubicle tile */
.cube {
  width: 64px; min-height: 64px; border-radius: 12px; position: relative;
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--line); box-shadow: 0 3px 0 rgba(0,0,0,.4);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 24px; transition: transform .12s, box-shadow .15s, filter .15s;
}
.cube .cap { font-size: 9.5px; font-weight: 800; color: var(--muted); margin-top: 2px; letter-spacing: .03em; }
.cube .badge { position: absolute; top: -7px; right: -7px; background: var(--gold); color: #3a2a00;
  font-size: 10px; font-weight: 900; border-radius: 999px; padding: 1px 6px; box-shadow: 0 2px 5px rgba(0,0,0,.5); }
.cube.role { cursor: default; }
.cube.available { animation: pulse 1.8s ease-in-out infinite; }
.cube.active-role { box-shadow: 0 0 0 3px var(--accent), 0 0 22px var(--accent); transform: translateY(-3px) scale(1.05); }
.cube.taken { opacity: .4; filter: grayscale(.6); }
.cube.ship .fill { font-size: 11px; color: var(--vp); font-weight: 800; }
.cube.pop { animation: pop .45s cubic-bezier(.2,1.4,.4,1); }
.medal-role { font-size: 40px; animation: bob 2.4s ease-in-out infinite; }
.medal-stats { display: flex; gap: 12px; font-weight: 900; font-size: 15px; }
.medal-stats .g { color: var(--gold); } .medal-stats .v { color: var(--vp); }

/* token discs (players on the board) */
.tokens { display: flex; gap: 4px; margin-top: 4px; }
.token { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 900; color: #06120d; box-shadow: 0 2px 5px rgba(0,0,0,.5);
  border: 2px solid rgba(255,255,255,.5); transition: transform .3s; }
.cube .token { position: absolute; bottom: -10px; animation: pop .4s; }

/* ===== Player boards ===== */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.player { background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 12px; animation: rise .35s ease; position: relative; }
.player.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255,122,60,.5), var(--shadow); }
.player h3 { margin: 0 0 6px; display: flex; align-items: center; gap: 6px; font-size: 16px; }
.ptoken { width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: 10px; font-weight: 900; color: #06120d; border: 2px solid rgba(255,255,255,.4); }
.gov { background: var(--gold); color: #3a2a00; font-size: 10px; padding: 1px 6px; border-radius: 8px; font-weight: 900; }
.stats { display: flex; gap: 12px; font-weight: 900; margin-bottom: 8px; }
.stats .coin { color: var(--gold); } .stats .vp { color: var(--vp); } .stats .free { color: var(--accent-2); }
.stat.bump { animation: bump .4s; }

.tiles { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.tile { width: 32px; height: 32px; border-radius: 8px; position: relative; font-size: 16px;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 0 rgba(0,0,0,.4);
  border: 1px solid rgba(0,0,0,.3); }
.tile.corn { background: var(--corn); } .tile.indigo { background: var(--indigo); }
.tile.sugar { background: var(--sugar); } .tile.tobacco { background: var(--tobacco); }
.tile.coffee { background: var(--coffee); } .tile.quarry { background: var(--quarry); }
.tile.new { animation: pop .5s cubic-bezier(.2,1.4,.4,1); }
.tile .worker { position: absolute; bottom: -6px; right: -6px; font-size: 13px;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); animation: pop .4s; }

.buildings { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.bld { border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; font-size: 11px; background: var(--card2); min-width: 58px; }
.bld.large { background: #2a2140; border-color: #4b3a78; }
.bld.new { animation: pop .5s cubic-bezier(.2,1.4,.4,1); }
.bld .w { color: var(--accent-2); font-weight: 800; }
.goods { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; }
.pill { background: var(--card2); border-radius: 999px; padding: 2px 9px; font-weight: 700; }

/* ===== Action panel ===== */
.action h2 { margin: 0 0 10px; font-size: 18px; }
.action .turn { color: var(--accent); }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.staged { font-size: 12px; color: var(--muted); margin: 6px 0; }

/* ===== Log ===== */
.log h3 { margin: 0 0 8px; font-size: 15px; }
.loglines { max-height: 28vh; overflow-y: auto; font-size: 13.5px; line-height: 1.55; }
.loglines div { padding: 3px 0; border-bottom: 1px dashed var(--line); }
.loglines div:first-child { animation: slidein .4s ease; color: var(--accent); font-weight: 700; }

/* ===== 7 Blunders ===== */
.bl-board { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.bl-player h3 { justify-content: flex-start; }
.bl-sub { margin-left: auto; font-size: 12px; color: var(--accent-2); font-weight: 800; }
.bl-wonder { background: var(--card2); border: 1px solid var(--line); border-radius: 10px;
  padding: 7px 9px; margin-bottom: 8px; }
.bl-wname { font-size: 12.5px; font-weight: 800; }
.bl-stages { display: flex; gap: 6px; margin-top: 6px; }
.bl-stage { width: 30px; height: 30px; border-radius: 8px; border: 1px dashed var(--line);
  display: grid; place-items: center; font-weight: 900; color: var(--muted); font-size: 13px; }
.bl-stage.built { background: linear-gradient(180deg, #3ee9a6, #2bbd84); color: #06281c;
  border-style: solid; }
.bl-cards { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.bl-chip { font-size: 11px; font-weight: 700; border-radius: 7px; padding: 2px 7px;
  border: 1px solid rgba(0,0,0,.35); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.bl-chip.big { font-size: 13px; padding: 4px 10px; min-width: 120px; text-align: center; }
.bl-chip.brown { background: #8a5a3c; } .bl-chip.grey { background: #8d99a6; }
.bl-chip.blue { background: #4a7bd0; } .bl-chip.yellow { background: #d9a92c; color: #3a2a00; text-shadow: none; }
.bl-chip.red { background: #c0504a; } .bl-chip.green { background: #3d9b62; }
.bl-chip.purple { background: #8e5aad; }
.bl-hand { display: flex; flex-direction: column; gap: 8px; }
.bl-handrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--card2); }
.bl-eff { flex: 1; min-width: 150px; font-size: 12px; }
.bl-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.bl-btns .btn { padding: 6px 10px; font-size: 12.5px; }
.bl-scores { border-collapse: collapse; margin: 8px auto 0; font-size: 14px; }
.bl-scores th, .bl-scores td { padding: 4px 12px; border-bottom: 1px dashed var(--line); text-align: center; }
.bl-scores td:first-child { text-align: left; text-transform: capitalize; }
.bl-scores .bl-total td { font-weight: 900; color: var(--gold); border-bottom: none; }

/* 7 Blunders: cubicle data layers */
.blay { display: flex; gap: 8px; align-items: baseline; padding: 4px 7px; margin: 4px 0;
  border: 1px solid var(--line); border-radius: 8px; background: rgba(0,0,0,.10);
  font-size: 11.5px; line-height: 1.5; }
.blay-label { font-size: 8.5px; font-weight: 900; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); min-width: 52px; flex: none;
  padding-top: 2px; }
.bvs { font-weight: 800; white-space: nowrap; }
.bvs.win { color: var(--accent-2); }
.bvs.lose { color: #ff8a80; }
.bvs.tie { color: var(--muted); }
.bmedals { margin-left: 6px; }
/* ===== The standard table: green felt + walnut rail (the Plantation look) ===== */
.felt-table {
  background: var(--felt); border-radius: 26px; padding: 22px 18px;
  border: 6px solid #5a3a22; min-height: 250px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 14px;
  box-shadow: 0 0 0 3px #2c1a0f, var(--shadow), inset 0 0 60px rgba(0,0,0,.4);
}
.felt-table .muted { color: rgba(236,255,247,.72); }
.felt-table h2 { color: #ecfff7; }
/* the dropped play owns the felt: big cards, roomy spread */
.felt-cards { display: flex; gap: 12px; justify-content: center; align-items: center;
  flex-wrap: wrap; min-height: 100px; }
.felt-table .pd-card { width: 68px; height: 95px; cursor: default; }
.felt-table .pc-pip { font-size: 34px; }
.felt-table .pc-corner { font-size: 14px; }
.felt-empty { font-size: 48px; opacity: .35; filter: grayscale(.4); }
/* mahjong: the wall as actual bricks — one per facedown tile */
.mj-wall { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center;
  max-width: 580px; }
.mj-brick { width: 13px; height: 19px; border-radius: 2.5px; flex: none;
  background: linear-gradient(180deg, #a8714a 0%, #8a5a3c 55%, #6f4527 100%);
  border: 1px solid #41281a; box-shadow: inset 0 1px 0 rgba(255,255,255,.28); }
/* mahjong: the discard pond lives on the felt */
.mj-pond { display: flex; flex-direction: column; gap: 4px; width: 100%;
  max-width: 640px; }
.mj-pondrow { display: flex; gap: 8px; align-items: baseline; }
.mj-pondname { font-size: 10px; font-weight: 900; letter-spacing: .06em;
  text-transform: uppercase; color: rgba(236,255,247,.6); min-width: 76px;
  text-align: right; flex: none; }
.felt-caption { color: rgba(236,255,247,.88); font-weight: 800; font-size: 15.5px;
  text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,.5); }

/* card games: keep Play/Pass within thumb's reach while the hand scrolls */
.pd-actions { position: sticky; bottom: 8px; z-index: 5; margin-top: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px; box-shadow: 0 -4px 14px rgba(0,0,0,.35); }

/* results pill: study the table after game over, reopen scores anytime */
.results-pill { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  z-index: 46; border: 0; border-radius: 999px; padding: 11px 18px; cursor: pointer;
  font-weight: 900; font-size: 14px; color: #2a1700;
  background: linear-gradient(180deg, #f0b75a, #d18a25);
  box-shadow: 0 6px 18px rgba(0,0,0,.5); animation: pop .25s ease; }

/* small screens & portrait: tighter chrome, smaller cards, wrap everything */
@media (max-width: 640px) {
  .game { padding: 8px; gap: 10px; }
  .topbar { padding: 8px 10px; }
  .brand-game { display: none; }
  .card, .action { padding: 12px 10px; }
  .felt-table { padding: 14px 8px; border-radius: 18px; min-height: 185px; }
  .felt-table .pd-card { width: 54px; height: 76px; }
  .felt-table .pc-pip { font-size: 26px; }
  .felt-table .pc-corner { font-size: 12px; }
  .pd-card { width: 40px; height: 56px; }
  .pc-pip { font-size: 18px; }
  .pc-corner { font-size: 10px; }
  .pd-hand { gap: 4px; }
  .btnrow .btn { padding: 9px 12px; font-size: 13px; }
  .botflash { top: 10%; max-width: 92vw; }
  .botflash-line { font-size: 16px; }
}

/* ===== Get Rich: the ring board on the felt (property-board layout, dark tiles) ===== */
.gr-board { display: grid; width: 100%; aspect-ratio: 1;
  /* property-board geometry: square corners, deep rectangular edge tiles, ZERO gaps —
     as big as the screen allows without scrolling */
  max-width: min(1240px, calc(100vh - 128px));
  grid-template-columns: 1.45fr repeat(9, 1fr) 1.45fr;
  grid-template-rows: 1.45fr repeat(9, 1fr) 1.45fr; gap: 0; }
.gr-tile { position: relative; border-radius: 0; cursor: pointer;
  background: linear-gradient(180deg, #33271a, #261c11);
  border: 1px solid rgba(0,0,0,.55); overflow: visible; min-width: 0; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  text-align: center; color: #f1e8d8; padding: 2px 1px;
  transition: transform .08s, box-shadow .08s; }
/* the rotating inner block: chip at the OUTER edge, name centered, art (or
   the hanging set icon) toward the board's middle */
.gr-rot { position: relative; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; width: 100%; height: 100%; padding: 4px 2px; gap: 2px; }
.gr-sb .gr-rot { flex-direction: column-reverse; }
.gr-sr .gr-rot, .gr-sl .gr-rot { justify-content: flex-start; }
.gr-sr .gr-rot { writing-mode: vertical-rl; padding: 2px 3px; }
.gr-sl .gr-rot { writing-mode: vertical-rl; transform: rotate(180deg); padding: 2px 3px; }
/* the 180° flip would turn emoji upside-down — counter-rotate the art */
.gr-sl .gr-art, .gr-sl .gr-houses, .gr-sl .gr-build { transform: rotate(180deg); }
.gr-mid { display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 0; min-height: 0; }
.gr-chip { background: rgba(0,0,0,.58); color: #ffe9b0; font-weight: 900; font-size: 12px;
  border-radius: 9px; padding: 2px 10px; flex: none; white-space: nowrap; line-height: 1.25;
  box-shadow: inset 0 0 0 1.5px rgba(255,233,176,.3); }
.gr-cur { font-size: .82em; opacity: .9; }
.gr-spc { width: 14px; height: 14px; flex: none; }
/* the 💲 stands upright even inside the rotated side chips */
.gr-cur { display: inline-block; }
.gr-sr .gr-cur { transform: rotate(-90deg); }
.gr-sl .gr-cur { transform: rotate(90deg); }
.gr-build { background: rgba(0,0,0,.58); border: 1px solid var(--gold);
  border-radius: 7px; padding: 1px 6px 2px; flex: none; white-space: nowrap;
  font-size: 12.5px; line-height: 1.35; font-weight: 900; color: var(--gold);
  max-width: 96%; max-height: 96%; overflow: hidden;
  box-shadow: 0 0 9px rgba(255,204,51,.4); }
.gr-art { font-size: 26px; line-height: 1; flex: none;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.gr-art-inner { position: absolute; z-index: 4; font-size: 24px; line-height: 1;
  pointer-events: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,.55)); }
.gr-st .gr-art-inner { bottom: 3px; left: 50%; transform: translateX(-50%); }
.gr-sb .gr-art-inner { top: 3px; left: 50%; transform: translateX(-50%); }
.gr-sr .gr-art-inner { left: 4px; top: 50%; transform: translateY(-50%); }
.gr-sl .gr-art-inner { right: 4px; top: 50%; transform: translateY(-50%); }
.gr-badge-ic { position: absolute; z-index: 4; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: 16px; line-height: 1;
  background: #10141d; border: 2px solid #666;
  box-shadow: 0 2px 7px rgba(0,0,0,.55); pointer-events: none; }
.gr-st .gr-badge-ic { bottom: -15px; left: 50%; transform: translateX(-50%); }
.gr-sb .gr-badge-ic { top: -15px; left: 50%; transform: translateX(-50%); }
.gr-sr .gr-badge-ic { left: -15px; top: 50%; transform: translateY(-50%); }
.gr-sl .gr-badge-ic { right: -15px; top: 50%; transform: translateY(-50%); }
/* prison corner: a barred cell + the visitors' sidewalk */
.gr-prison { padding: 0; }
.gr-jail-cell { flex: 1.55; width: calc(100% - 8px); margin: 4px 4px 2px; border-radius: 7px;
  position: relative; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; padding-top: 4px; gap: 2px; overflow: hidden;
  background: repeating-linear-gradient(90deg, #2c3447 0 7px, #151a25 7px 14px); }
.gr-jail-label { font-size: 9px; font-weight: 900; letter-spacing: .07em;
  text-transform: uppercase; color: #d9e2f2; background: rgba(0,0,0,.45);
  border-radius: 5px; padding: 1px 6px; white-space: nowrap; }
.gr-visit { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 1px; position: relative; }
.gr-visit-label { font-size: 8.5px; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted); }
.gr-zone-pawns { position: static; inset: auto; display: flex; justify-content: center;
  align-items: center; padding: 0; min-height: 18px; flex-wrap: wrap; }
.gr-ownedtile { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.75); }
.gr-ownedtile .gr-price { color: #fff; }
.gr-tile:hover { transform: scale(1.06); z-index: 3;
  box-shadow: 0 4px 14px rgba(0,0,0,.6); }
.gr-open { outline: 2px solid var(--accent-2); z-index: 3; }
.gr-corner { border-radius: 0; background: linear-gradient(180deg, #3a2c1c, #2a1f12); }
.gr-emoji { font-size: 20px; line-height: 1.05; margin-top: 3px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.gr-corner .gr-emoji { font-size: 21px; margin-top: 2px; }
.gr-go { font-size: 12px; margin-top: 6px; }
.gr-emoji, .gr-name, .gr-price, .gr-houses { flex: none; }
.gr-name { font-size: 13px; font-weight: 800; line-height: 1.22; letter-spacing: 0;
  max-width: 100%; color: #fff; text-align: center;
  /* a true outline: readable on every owner color, even the bright ones */
  text-shadow: -1px -1px 0 rgba(0,0,0,.9), 1px -1px 0 rgba(0,0,0,.9),
    -1px 1px 0 rgba(0,0,0,.9), 1px 1px 0 rgba(0,0,0,.9),
    0 2px 5px rgba(0,0,0,.55);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; }
.gr-corner .gr-name { font-size: 13.5px; }
.gr-price { font-size: 10.5px; color: #efe4c8; font-weight: 800;
  text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.gr-gold { color: var(--gold); }
.gr-houses { font-size: 10.5px; line-height: 1; letter-spacing: -1px; }
/* mortgaged: a dark veil over the TILE — never over the players on it
   (pawns z5 and the set socket z4 ride above the veil) */
.gr-mort::after { content: ""; position: absolute; inset: 0; z-index: 2;
  background: rgba(16, 12, 8, .55); pointer-events: none; }
.gr-mort-text { text-decoration: line-through; opacity: .75; }
.gr-pawns { position: absolute; bottom: 6px; right: 2px; display: flex; gap: 1px;
  flex-wrap: wrap; justify-content: flex-end; }
.gr-pawn { width: 14px; height: 14px; border-radius: 50%; font-size: 9px; font-weight: 900;
  display: inline-grid; place-items: center; color: #08131f; border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.gr-center { grid-row: 2 / 11; grid-column: 2 / 11; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; }
/* slot-machine dice: two boxes that tease before they land */
.gr-dice { display: flex; align-items: center; gap: 10px; }
.gr-die { width: 46px; height: 46px; border-radius: 11px; font-size: 26px; font-weight: 900;
  display: grid; place-items: center; color: #1d1d28;
  background: linear-gradient(180deg, #fffef8, #ddd6c2);
  border: 1px solid #9a8a6a; border-bottom-width: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,.45); }
.gr-die.gr-spin { animation: gr-jitter .15s infinite; color: #6a5a44; }
.gr-die-pop { animation: pop .3s ease; }
.gr-plus { font-size: 22px; font-weight: 900; color: #ecfff7;
  text-shadow: 0 2px 6px rgba(0,0,0,.5); }
@keyframes gr-jitter { 0% { transform: translateY(0); } 50% { transform: translateY(-3px); } 100% { transform: translateY(0); } }
/* actions live IN the board center — no scrolling to a separate tab */
.gr-action { width: 92%; max-width: 560px; max-height: 56%; overflow-y: auto;
  background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 10px 12px; }
.gr-action:empty { display: none; }
.gr-head { font-weight: 900; font-size: 15.5px; color: #ecfff7; margin-bottom: 7px;
  text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.gr-waiting { opacity: .75; margin-bottom: 0; }
.gr-action .btnrow { justify-content: center; }
.gr-action .muted { color: rgba(236,255,247,.65); }
.gr-action .gr-manage h3 { color: #ecfff7; }
/* pieces rest LOW on the tile so the name/prices above stay readable;
   the landing glide targets the real pawn rect, so this stays jank-free */
.gr-pawns { position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; pointer-events: none; z-index: 5; }
/* the player marker rests dead CENTER of every tile — cost + name live at the
   outer edge, the set icon at the inner edge, so the marker covers neither */
.gr-scorner .gr-pawns { align-items: flex-end; padding-bottom: 4px; }
.gr-pawn { width: 42px; height: 42px; font-size: 27px; border-width: 3px;
  margin: 0 -9px; box-shadow: 0 3px 11px rgba(0,0,0,.72); }
.gr-pawn.me { outline: 2px solid #fff; animation: gr-me 1.6s ease-in-out infinite; }
@keyframes gr-me { 0%, 100% { box-shadow: 0 0 5px rgba(255,255,255,.6); }
  50% { box-shadow: 0 0 18px rgba(255,255,255,1); } }
.gr-bigpawn { display: inline-grid; place-items: center; width: 26px; height: 26px;
  border-radius: 50%; font-size: 15px; border: 2px solid rgba(255,255,255,.85);
  box-shadow: 0 1px 4px rgba(0,0,0,.5); flex: none; }
/* the whole cubicle wears the player's color */
.gr-cubicle { border: 2px solid var(--pc) !important;
  background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 45%, var(--card)),
                              color-mix(in srgb, var(--pc) 16%, var(--card))) !important; }
.gr-cubicle.active { box-shadow: 0 0 0 2px var(--pc), 0 0 18px var(--pc); }
/* token picker (lobby): emoji + color, unique per table */
.token-picker { margin-top: 12px; border: 1px dashed var(--line); border-radius: 12px;
  padding: 10px 12px; }
.tp-label { font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 7px; }
.tp-urgent { border-color: var(--accent-2); box-shadow: 0 0 14px rgba(54,211,153,.35); }
.tp-urgent .tp-label { color: var(--accent-2); }
.gr-deed-named { min-width: 0; padding: 3px 9px; font-size: 12px; font-weight: 800;
  height: auto; border-radius: 8px; }
.tp-row { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.tp-icon { width: 34px; height: 34px; font-size: 18px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--card2); cursor: pointer;
  display: grid; place-items: center; padding: 0; }
.tp-icon.sel { outline: 3px solid var(--accent-2); }
.tp-icon.taken { opacity: .25; cursor: not-allowed; }
.tp-color { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(0,0,0,.4);
  cursor: pointer; padding: 0; }
.tp-color.sel { outline: 3px solid #fff; }
.tp-color.taken { opacity: .25; cursor: not-allowed; }

/* sidebar cubicles: lean money squares, two per row */
.gr-side-board { display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 12px; }
.gr-side-board .player { margin: 0; padding: 8px 9px; min-width: 0; }
.gr-side-board .player h3 { font-size: 12.5px; margin-bottom: 4px;
  display: flex; align-items: center; gap: 5px; min-width: 0; }
.gr-pname-txt { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap;
  text-overflow: ellipsis; }
.gr-badge { flex: none; font-size: 14px; line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.gr-side-board .gr-bigpawn { width: 22px; height: 22px; font-size: 13px; }
.gr-side-board .stats { display: flex; flex-direction: column; gap: 2px; }
.gr-side-board .stat { font-size: 13px; font-weight: 900; }
/* taking damage / getting healed: the counter bops, the whole card flashes */
.stat[data-cash] { display: inline-block; }
.cash-hit { animation: cash-hit .65s ease; }
@keyframes cash-hit {
  0% { color: #ff5252; transform: scale(1.35); }
  65% { color: #ff5252; transform: scale(1); }
  100% { color: inherit; }
}
.cash-heal { animation: cash-heal .65s ease; }
@keyframes cash-heal {
  0% { color: #3ee9a6; transform: scale(1.3); }
  65% { color: #3ee9a6; transform: scale(1); }
  100% { color: inherit; }
}
.card-hit { animation: card-hit .6s ease; }
@keyframes card-hit {
  0% { box-shadow: 0 0 0 3px #ff5252, 0 0 26px rgba(255, 82, 82, .85);
       background-color: rgba(255, 82, 82, .22); }
  100% { box-shadow: none; }
}
.card-heal { animation: card-heal .6s ease; }
@keyframes card-heal {
  0% { box-shadow: 0 0 0 3px #3ee9a6, 0 0 26px rgba(62, 233, 166, .8); }
  100% { box-shadow: none; }
}
/* the card's dismiss hint */
.draw-hint { font-size: 10px; text-align: center; color: #9a8a6a; font-weight: 700;
  padding: 0 8px 2px; }

/* 🎰 the slot machine & 🎡 the wheel */
.slot-frame { position: relative; width: 240px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, #8a1f1f, #5a1414); color: #fff;
  border: 2px solid #3a0d0d; box-shadow: 0 18px 44px rgba(0,0,0,.65),
  inset 0 0 0 3px rgba(255,205,90,.35); display: flex; flex-direction: column;
  animation: draw-in .5s cubic-bezier(.2, .9, .3, 1.15); }
.slot-title { padding: 10px 8px; font-weight: 900; text-align: center; font-size: 15px;
  letter-spacing: .08em; color: #ffd76e; text-shadow: 0 1px 3px rgba(0,0,0,.6);
  background: rgba(0,0,0,.25); }
.slot-window { display: flex; justify-content: center; gap: 8px; padding: 16px 10px;
  background: linear-gradient(180deg, #fffef8, #e3dcc6); margin: 10px 12px 4px;
  border-radius: 10px; border: 2px solid #9a8a6a; }
.slot-reel { width: 52px; height: 56px; display: grid; place-items: center;
  font-size: 30px; background: #fff; border-radius: 7px;
  border: 1px solid #b9a78b; box-shadow: inset 0 4px 8px rgba(0,0,0,.15); }
.slot-stop { animation: pop .3s ease; }
.slot-result { min-height: 40px; padding: 8px 12px; text-align: center;
  font-weight: 900; font-size: 14.5px; line-height: 1.4; }
.slot-result.slot-win { color: #7dffc8; }
.slot-result.slot-lose { color: #ff9c9c; }
.slot-result .dc-good { color: #7dffc8; }
.slot-result .dc-bad { color: #ff9c9c; }
.slot-frame .draw-close { display: block; margin: 0 auto 6px; padding: 6px 14px;
  font-size: 12.5px; }
.slot-frame .draw-brand { color: rgba(255,215,110,.65); }
.wheel-frame { background: linear-gradient(180deg, #1f4d8a, #122b4d);
  border-color: #0a1a30; box-shadow: 0 18px 44px rgba(0,0,0,.65),
  inset 0 0 0 3px rgba(122,215,255,.3); }
.wheel-frame .slot-title { color: #9fdcff; }
.wheel-stage { position: relative; width: 170px; height: 170px; margin: 14px auto 4px; }
.wheel-pointer { position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  font-size: 22px; color: #ffd76e; z-index: 2; text-shadow: 0 2px 4px rgba(0,0,0,.7); }
.wheel-disc { width: 170px; height: 170px; border-radius: 50%; position: relative;
  border: 4px solid #ffd76e; box-shadow: 0 6px 18px rgba(0,0,0,.5);
  transition: transform 2.2s cubic-bezier(.12, .8, .15, 1);
  background: conic-gradient(
    #2bbd84 0deg 45deg, #36d399 45deg 90deg, #59c98f 90deg 135deg,
    #7fd3a1 135deg 180deg, #8d99a6 180deg 225deg, #d98a8a 225deg 270deg,
    #e06666 270deg 315deg, #c0392b 315deg 360deg); }
.wheel-label { position: absolute; left: 50%; top: 50%; margin: -9px 0 0 -16px;
  width: 32px; text-align: center; font-size: 11px; font-weight: 900;
  color: #102019; text-shadow: 0 1px 2px rgba(255,255,255,.35); }

/* ===== Get Rich IN-GAME: the board IS the page — no bar, no scrolling =====
   (lobby & seating screens keep the normal header) */
body.gr-locked .topbar { position: fixed; inset: 0 0 auto 0; height: 0;
  padding: 0; background: none; border: 0; box-shadow: none; z-index: 80;
  pointer-events: none; overflow: visible; }
body.gr-locked .topbar .brand,
body.gr-locked #leaveBtn,
body.gr-locked #themeBtn { display: none; }
/* the ⚙️ settings gear stays reachable during play */
body.gr-locked .topright { position: fixed; top: 10px; right: 12px; left: auto;
  pointer-events: auto; z-index: 85; display: flex; gap: 8px; }
body.gr-locked .settings-panel { z-index: 90; }
/* during play the status line is STATIC above the cubicles (the client
   docks it there) — it never floats over the board */
body.gr-locked .side > #status { display: block; text-align: center;
  margin: 0 0 8px; background: rgba(15,12,8,.93); color: #ffe9b0;
  border: 1px solid rgba(255,233,176,.35); border-radius: 10px;
  padding: 7px 12px; font-weight: 800; font-size: 13px; }
body.gr-locked .side > #status:empty { display: none; }
.gr-title { font-size: clamp(28px, 3.4vw, 46px); font-weight: 900;
  color: rgba(236,255,247,.94); letter-spacing: .04em; text-align: center;
  text-shadow: 0 3px 10px rgba(0,0,0,.5); }
.gr-resign-row { margin-top: 6px; }
.gr-resign { width: 100%; padding: 4px 8px; font-size: 11.5px; font-weight: 800;
  border-color: rgba(255,107,107,.5); color: #ff9c9c; }
.gr-resign.gr-leave { border-color: var(--line); color: var(--ink); }
.shuffle-btn { width: 100%; margin-top: 10px; }
/* seating lock-in */
.tp-lockbtn { width: 100%; margin-top: 10px; }
.tp-ready-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
  margin-top: 8px; }
.tp-ready-chip { font-size: 12px; font-weight: 800; padding: 3px 10px;
  border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tp-ready-chip.rdy { color: var(--accent-2); border-color: var(--accent-2);
  background: rgba(54,211,153,.08); }
.token-picker.tp-locked .tp-icon, .token-picker.tp-locked .tp-color { opacity: .55; }
@media (min-width: 901px) {
  body.gr-locked { overflow: hidden; height: 100vh; padding: 0; }
  /* ad rail | centered board | lean 300px sidebar — nothing feels cramped */
  body.gr-locked .game { display: grid; grid-template-columns: 180px 1fr 300px;
    gap: 12px; padding: 0 10px; max-width: none; margin: 0; height: 100vh;
    align-items: stretch; background: var(--felt); }
  body.gr-locked .adrail { display: block; position: static; grid-column: 1;
    grid-row: 1; padding-top: 12px; }
  body.gr-locked #action { display: none; }
  body.gr-locked .felt-table { grid-column: 2; grid-row: 1; display: flex;
    align-items: center; justify-content: center; border: 0; border-radius: 0;
    box-shadow: none; padding: 0; min-height: 0; background: none; }
  body.gr-locked .gr-board { width: min(100vh, calc(100vw - 540px));
    height: min(100vh, calc(100vw - 540px)); max-width: none; }
  body.gr-locked .side { grid-column: 3; grid-row: 1; width: 300px; height: 100vh;
    overflow-y: auto; padding: 8px 6px 18px 0; }
}

.gr-badge-tap { cursor: pointer; }
.gr-hookbadge { font-size: 11.5px; font-weight: 900; color: #ff9c9c;
  background: rgba(91, 20, 16, .7); border: 1px solid #ff6b6b; border-radius: 999px;
  padding: 0 6px; white-space: nowrap; }
.gr-badge-tap:hover { filter: brightness(1.3); }
.badge-pop { width: 300px; }

/* ===== in-UI confirm dialog (replaces browser confirm) ===== */
.ui-modal-ov { position: fixed; inset: 0; background: rgba(0,0,0,.58);
  display: grid; place-items: center; z-index: 200; padding: 16px;
  animation: ui-fade .14s ease; }
.ui-modal-out { opacity: 0; transition: opacity .15s ease; }
@keyframes ui-fade { from { opacity: 0; } to { opacity: 1; } }
.ui-modal { background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px 24px 20px; max-width: 390px; width: 100%; color: var(--ink); text-align: center;
  box-shadow: 0 18px 52px rgba(0,0,0,.6); animation: ui-pop .18s cubic-bezier(.2,.9,.3,1.15); }
@keyframes ui-pop { from { transform: scale(.93); opacity: .35; } to { transform: scale(1); opacity: 1; } }
.ui-modal-title { font-size: 18px; font-weight: 900; margin-bottom: 9px; line-height: 1.3; }
.ui-modal-body { font-size: 14px; line-height: 1.6; color: var(--muted); margin-bottom: 18px; }
.ui-modal-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ui-modal-btns .btn { min-width: 124px; }
.ui-btn-danger { background: linear-gradient(180deg, #e0544f, #b3322d); color: #fff;
  border: 1px solid #ff8a80; font-weight: 800; }
.ui-btn-danger:hover { filter: brightness(1.08); }

/* 🦈 Premium Shark offer + static trade rows */
.shark-pop { width: 320px; }
.shark-pool { text-align: center; font-size: 34px; font-weight: 900;
  color: var(--gold); margin: 6px 0 2px; }
.tf-prop.static { cursor: default; }
.tf-prop.static:hover { border-color: var(--line); }
.tf-sub { text-align: center; font-size: 11px; margin: -4px 0 6px;
  text-transform: uppercase; letter-spacing: .06em; }
.tf-cashline { text-align: center; margin: 2px 0 6px; }

/* 🦈 swimming with the fishies */
.fish-frame { position: relative; width: 280px; height: 205px; border-radius: 16px;
  overflow: hidden; color: #dff3ff; text-align: center;
  background: linear-gradient(180deg, #123a5e 0%, #0a2440 60%, #051527 100%);
  border: 2px solid #051527; box-shadow: 0 18px 44px rgba(0,0,0,.65),
  inset 0 0 0 3px rgba(122,215,255,.25);
  animation: draw-in .5s cubic-bezier(.2, .9, .3, 1.15); }
.fish-shark { position: absolute; top: 40px; font-size: 46px;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.5));
  animation: fish-cruise 3.4s ease-in-out infinite alternate; }
@keyframes fish-cruise { from { left: -4px; } to { left: calc(100% - 56px); } }
.fish-token { position: absolute; top: 24px; left: 50%; width: 34px; height: 34px;
  margin-left: -17px; border-radius: 50%; display: grid; place-items: center;
  font-size: 20px; border: 2px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.5);
  animation: fish-sink 4.8s ease-in forwards; }
@keyframes fish-sink { 0% { top: 24px; transform: rotate(0); opacity: 1; }
  100% { top: 155px; transform: rotate(170deg); opacity: .25; } }
.fish-bubbles { position: absolute; top: 76px; left: 57%; font-size: 18px;
  animation: fish-bub 2.1s linear infinite; }
@keyframes fish-bub { from { transform: translateY(26px); opacity: .9; }
  to { transform: translateY(-40px); opacity: 0; } }
.fish-text { position: absolute; bottom: 32px; width: 100%; font-weight: 900;
  font-size: 15px; color: #ff9c9c; text-shadow: 0 2px 5px rgba(0,0,0,.7); }
.fish-frame .draw-brand { position: absolute; bottom: 9px; width: 100%;
  color: rgba(122,215,255,.55); }

/* 👑 Secret Usurper: the Secret-Hitler-style board */
.su-board { max-width: 640px; margin: 0 auto 14px; }
.su-track { display: flex; align-items: center; gap: 12px; margin: 6px 0; }
.su-track-label { width: 150px; font-size: 11px; font-weight: 900;
  letter-spacing: .04em; text-align: right; color: #f1e8d8; }
.su-slots { display: flex; gap: 5px; flex: 1; }
.su-slot { flex: 1; aspect-ratio: 3/4; border-radius: 6px; display: grid;
  place-items: center; font-size: 17px; border: 1px solid rgba(0,0,0,.5); }
.su-usurp .su-slot { background: linear-gradient(180deg, #4a1416, #2a0c0e); }
.su-loyal .su-slot { background: linear-gradient(180deg, #16314a, #0c1d2e); }
.su-usurp .su-slot.su-on { background: linear-gradient(180deg, #b33, #821); box-shadow: 0 0 8px rgba(255,80,80,.5); }
.su-loyal .su-slot.su-on { background: linear-gradient(180deg, #3a7bd0, #245); box-shadow: 0 0 8px rgba(80,160,255,.5); }
.su-power { opacity: .8; filter: grayscale(.3); }
.su-chaos { display: flex; align-items: center; gap: 8px; justify-content: center;
  margin: 8px 0; }
.su-chaos-label { font-size: 11px; font-weight: 900; color: #ff9c6b; }
.su-pip { color: #5a4636; font-size: 14px; }
.su-pip-on { color: #ff6b3c; text-shadow: 0 0 8px rgba(255,107,60,.8); }
.su-deck { margin-left: 12px; font-size: 11.5px; }
.su-court { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 12px; }
.su-chip { min-width: 98px; padding: 8px 10px; border-radius: 11px; text-align: center;
  background: rgba(40,32,22,.85); border: 1px solid var(--line); color: #f1e8d8; }
.su-chip-name { font-weight: 800; font-size: 13px; }
.su-chip-tags { display: flex; flex-direction: column; gap: 2px; margin-top: 3px; }
.su-tag { font-size: 10px; font-weight: 800; border-radius: 999px; padding: 1px 6px; }
.su-steward { background: rgba(232,163,61,.2); color: var(--gold); }
.su-chan { background: rgba(54,211,153,.18); color: var(--accent-2); }
.su-is-steward { border-color: var(--gold); }
.su-is-chan { border-color: var(--accent-2); }
.su-dead { opacity: .5; filter: grayscale(.7); }
.su-me { outline: 2px solid var(--accent-2); }
.su-chip-role { font-size: 11px; color: var(--muted); }
.su-vote { font-size: 11.5px; font-weight: 800; margin-top: 3px; }
.su-aye { color: var(--accent-2); }
.su-nay { color: #ff8a80; }
.su-roleline { text-align: center; color: #f1e8d8; font-size: 13.5px; }
.su-rolepill { display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-weight: 900; color: #fff; border: 1.5px solid; }
.su-role-loyalist { background: #16314a; border-color: #3a7bd0; }
.su-role-conspirator { background: #4a1416; border-color: #b33; }
.su-role-usurper { background: #3a2a0c; border-color: var(--gold); }
.su-peek { display: flex; gap: 10px; justify-content: center; margin: 6px 0 10px; }
.su-peekcard { width: 46px; height: 62px; border-radius: 8px; display: grid;
  place-items: center; font-size: 26px; border: 2px solid rgba(255,255,255,.3); }
.pk-loyal { background: linear-gradient(180deg, #3a7bd0, #245); }
.pk-usurp { background: linear-gradient(180deg, #b33, #821); }
@media (max-width: 760px) { .su-track-label { width: 92px; font-size: 9.5px; } }

/* 🌃 Mafia: the Narrator's stage */
.mf-story { max-width: 620px; margin: 0 auto 14px; padding: 14px 20px;
  background: rgba(10, 8, 16, .82); border: 1px solid rgba(185, 167, 139, .4);
  border-radius: 14px; text-align: center; }
.mf-story-head { font-size: 11px; font-weight: 900; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.mf-story-text { color: #f1e8d8; font-size: 15.5px; line-height: 1.55;
  font-style: italic; }
.mf-village { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin-bottom: 12px; }
.mf-chip { min-width: 86px; padding: 7px 10px; border-radius: 10px; text-align: center;
  background: rgba(40, 32, 22, .85); border: 1px solid var(--line); color: #f1e8d8; }
.mf-chip-name { font-weight: 800; font-size: 13px; }
.mf-chip-votes { color: var(--gold); font-weight: 900; font-size: 12px; }
.mf-chip-role { font-size: 11.5px; color: var(--muted); }
.mf-dead { opacity: .55; filter: grayscale(.7); }
.mf-me { outline: 2px solid var(--accent-2); }
.mf-roleline { text-align: center; color: #f1e8d8; font-size: 13.5px; }
.mf-role-pill { display: inline-block; padding: 3px 12px; border-radius: 999px;
  border: 1.5px solid; font-weight: 900; color: #fff; }

/* 🏝️ Settlements: the hex island */
.set-svg { width: 100%; max-width: 620px; height: auto; display: block; margin: 0 auto;
  flex: none; min-height: 280px; }
.set-hex { transition: filter .1s; }
.set-hexemoji { font-size: 22px; }
.set-token { font-size: 15px; font-weight: 900; fill: #3a2c1c; }
.set-token.set-hot { fill: #c0392b; }
/* a rolled hex pulses gold so everyone sees which tiles paid out this turn */
@keyframes set-hexpulse {
  0%, 100% { stroke: #ffe066; stroke-width: 4; }
  50% { stroke: #fff6c4; stroke-width: 9; }
}
.set-hexglow { animation: set-hexpulse 1s ease-in-out infinite;
  filter: drop-shadow(0 0 9px #ffd24a); pointer-events: none; }
@keyframes set-hexfill { 0%, 100% { opacity: .14; } 50% { opacity: .5; } }
.set-hexglow-fill { fill: #ffe45c; pointer-events: none;
  animation: set-hexfill 1s ease-in-out infinite; }
@keyframes set-tokenpulse {
  0%, 100% { stroke: #e0a020; stroke-width: 1.5; }
  50% { stroke: #ffcf4a; stroke-width: 5; }
}
.set-tokenglow { animation: set-tokenpulse 1s ease-in-out infinite; }
.set-robber { font-size: 22px; }
.set-harbor { filter: drop-shadow(0 1px 3px rgba(0,0,0,.55)); cursor: help; }
.set-harborlbl { font-size: 13px; font-weight: 900; fill: #ffe6a6; }
/* the dice bar above the island */
.set-dicebar { display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 2px auto 10px; }
.set-dice { display: flex; align-items: center; gap: 8px; }
.set-die { width: 48px; height: 48px; border-radius: 11px; font-size: 27px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; color: #2a2218;
  background: linear-gradient(160deg, #fffdf6, #e6dcc6); border: 2px solid #b79a63;
  box-shadow: 0 3px 8px rgba(0,0,0,.35), inset 0 2px 3px rgba(255,255,255,.7); }
.set-die.set-spin { animation: gr-jitter .15s infinite; color: #8a7a5c; }
.set-die-pop { animation: pop .3s ease; }
.set-plus { font-size: 22px; font-weight: 900; color: #ecfff7; }
.set-dicelabel { font-size: 15px; font-weight: 800; color: #f1e8d8; }
.set-fognote { text-align: center; font-size: 13.5px; color: #d7c7a6; margin: 0 auto 8px;
  background: rgba(40,52,76,.55); border: 1px solid #4a5e80; border-radius: 9px;
  padding: 6px 12px; max-width: 460px; }
.set-raterow { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 4px 0; }
.set-ratechip { font-size: 12px; padding: 2px 7px; border-radius: 7px; background: rgba(0,0,0,.3);
  border: 1px solid var(--line); font-weight: 700; }
.set-rategood { border-color: #4f8f6f; background: rgba(40,70,55,.5); color: #bdf0d4; }
.set-pick { cursor: pointer; }
.set-vpick { fill: rgba(255,255,255,.5); stroke: #fff; stroke-width: 2; }
.set-vpick:hover { fill: var(--gold); }
.set-roadpick:hover { stroke: var(--gold) !important; }
.set-pickhex { fill: rgba(255,80,80,.25); stroke: #fff; stroke-width: 2; }
.set-pickhex:hover { fill: rgba(255,80,80,.55); }
.set-players { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.set-pcard { min-width: 110px; padding: 7px 11px; border-radius: 10px; text-align: center;
  background: rgba(40,32,22,.85); border: 2px solid var(--pc); color: #f1e8d8; }
.set-active { box-shadow: 0 0 0 2px var(--pc), 0 0 14px rgba(255,255,255,.15); }
.set-me { outline: 2px dashed #fff; outline-offset: 1px; }
.set-pname { font-weight: 800; font-size: 13px; }
.set-pstat { font-size: 12.5px; margin-top: 2px; }
.set-hand { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.set-card { background: rgba(0,0,0,.35); border: 1px solid var(--line); border-radius: 8px;
  padding: 3px 9px; font-weight: 800; font-size: 13.5px; }
.set-trade { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; }
.set-sel { padding: 4px 8px; border-radius: 7px; }
.set-discard { margin-top: 6px; }
.set-drow { display: flex; align-items: center; gap: 8px; margin: 3px 0; font-size: 13px; }
.set-dcount { min-width: 18px; text-align: center; font-weight: 900; }
.set-dev { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.set-devhand { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 6px 0; }
.set-devcard { background: rgba(60,40,90,.45); border: 1px solid #7a5fb0; border-radius: 8px;
  padding: 3px 10px; font-weight: 800; font-size: 13px; cursor: help; }
.set-devfresh { opacity: .55; border-style: dashed; }
.set-tradeoffer { margin: 8px auto; max-width: 360px; text-align: center; padding: 8px 12px;
  background: rgba(40,70,55,.5); border: 1px solid #4f8f6f; border-radius: 10px; }
.set-tradebox { margin: 8px auto; max-width: 360px; padding: 10px 12px;
  background: rgba(40,32,22,.6); border: 1px solid var(--line); border-radius: 10px; }
.set-tradehead { font-weight: 900; font-size: 14px; }
.set-tradeline { font-size: 13.5px; margin-top: 2px; }
.set-traderow { display: flex; align-items: center; gap: 6px; justify-content: center; margin: 6px 0; }
.set-tradegrid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 4px 10px;
  align-items: center; margin-top: 6px; }
.set-tradecol { font-size: 12px; text-align: center; }
.set-tradeemoji { font-size: 18px; text-align: center; }
.set-stepwrap { display: inline-flex; align-items: center; gap: 4px; justify-content: center; }
.set-stepbtn { padding: 1px 9px; min-width: 0; font-size: 15px; }
.set-pcdot { display: inline-block; width: 12px; height: 12px; border-radius: 50%;
  vertical-align: middle; border: 1px solid rgba(0,0,0,.45); box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.set-tradepartners { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; margin-bottom: 8px; }
.set-partnerbtn { display: inline-flex; align-items: center; gap: 5px; }

/* ===== Settlements: viewport-locked, board left + action/log right (Get-Rich style)
   so the board never pushes the action panel below the fold ===== */
body[data-game="settlements"] .game {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  grid-template-rows: auto 1fr;
  gap: 12px; padding: 12px; max-width: 1680px;
  height: calc(100vh - 76px); overflow: hidden; align-items: stretch;
}
body[data-game="settlements"] .adrail { display: none; }   /* reclaim the width in-game */
body[data-game="settlements"] #board { display: none; }    /* unused template leftover */
body[data-game="settlements"] #table {
  grid-column: 1; grid-row: 1 / span 2; min-height: 0; overflow: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
}
body[data-game="settlements"] #action.action {
  grid-column: 2; grid-row: 1; min-height: 0; max-height: 58vh; overflow: auto;
  padding: 16px 20px; font-size: 15px;
}
body[data-game="settlements"] .side {
  grid-column: 2; grid-row: 2; min-height: 0; overflow: auto; margin: 0;
}
body[data-game="settlements"] .set-svg {
  max-width: 100%; max-height: calc(100vh - 250px);   /* room for dice bar + player strip */
  width: auto; height: auto;
}
/* de-tightened action contents */
body[data-game="settlements"] #action .gr-head { font-size: 16.5px; font-weight: 900; margin: 10px 0 8px; }
body[data-game="settlements"] #action .btn { padding: 8px 14px; font-size: 14.5px; }
body[data-game="settlements"] #action .btn-primary { font-weight: 800; }
body[data-game="settlements"] #action .btnrow { gap: 9px; margin: 4px 0; }
body[data-game="settlements"] .set-hand { gap: 10px; margin-bottom: 10px; }
body[data-game="settlements"] .set-card { font-size: 16px; padding: 6px 13px; }
body[data-game="settlements"] .set-devcard { font-size: 13.5px; padding: 5px 11px; }
body[data-game="settlements"] .set-ratechip { font-size: 13px; padding: 3px 9px; }
body[data-game="settlements"] .set-dev { margin-top: 12px; padding-top: 10px; }
/* incoming trade offer: impossible to miss */
body[data-game="settlements"] .set-tradeoffer {
  max-width: 100%; padding: 12px 16px; border-width: 2px; border-left: 6px solid #4f8f6f;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
body[data-game="settlements"] .set-tradehead { font-size: 15.5px; }
body[data-game="settlements"] .set-tradeline { font-size: 15px; }
body[data-game="settlements"] .set-tradebox { max-width: 100%; padding: 14px 16px; }
/* the dice bar shrinks a touch so the board gets the height */
body[data-game="settlements"] .set-die { width: 42px; height: 42px; font-size: 24px; }
body[data-game="settlements"] .set-dicebar { margin: 0 auto 8px; }
/* narrow screens: go back to a simple scrolling stack */
@media (max-width: 980px) {
  body[data-game="settlements"] .game {
    grid-template-columns: 1fr; grid-template-rows: auto auto auto;
    height: auto; overflow: visible;
  }
  body[data-game="settlements"] #table { grid-column: 1; grid-row: 1; }
  body[data-game="settlements"] #action.action { grid-column: 1; grid-row: 2; max-height: none; }
  body[data-game="settlements"] .side { grid-column: 1; grid-row: 3; }
  body[data-game="settlements"] .set-svg { max-height: 56vh; }
}

/* 🌫️ Fog of War: the generals' board */
.fw-board { display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px;
  width: 100%; max-width: 760px; margin: 0 auto; aspect-ratio: 9/8; flex: none; }
.fw-cell { position: relative; border-radius: 4px; display: grid; place-items: center;
  background: #2e4636; border: 1px solid rgba(0,0,0,.4); aspect-ratio: 1; }
.fw-dark { background: #24382b; }
/* pieces are rectangular battalion counters wearing a brass shoulder-board */
.fw-piece { width: 94%; height: 72%; border-radius: 3px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; line-height: 1; overflow: hidden;
  border: 1.5px solid rgba(0,0,0,.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -3px 5px rgba(0,0,0,.4), 0 1px 3px rgba(0,0,0,.5); }
/* the ownership "uniform" the board is mounted on = a coloured frame */
.fw-mine { border-color: #9cc8f7; cursor: pointer;
  box-shadow: 0 0 0 2px #2f6bc0, inset 0 1px 0 rgba(255,255,255,.22), inset 0 -3px 5px rgba(0,0,0,.4), 0 1px 3px rgba(0,0,0,.5); }
.fw-foe { border-color: #f59ab0;
  box-shadow: 0 0 0 2px #b33, inset 0 1px 0 rgba(255,255,255,.18), inset 0 -3px 5px rgba(0,0,0,.4), 0 1px 3px rgba(0,0,0,.5); }
/* the brass tiers */
.fw-br-gen { background: linear-gradient(180deg, #f2d066, #b78a2b); }
.fw-br-field { background: linear-gradient(180deg, #6a44b8, #3a2272); }
.fw-br-coy { background: linear-gradient(180deg, #4555ad, #27306f); }
.fw-br-nco { background:
  repeating-linear-gradient(125deg, rgba(214,172,62,.6) 0 3px, transparent 3px 7px),
  linear-gradient(180deg, #7c7637, #4c4922); }
.fw-br-pvt { background: linear-gradient(180deg, #61643a, #3b3d22); }
.fw-br-spy { background: linear-gradient(180deg, #333b4a, #161b24); }
.fw-br-flag { background: linear-gradient(180deg, #9c2929, #5d1616); }
.fw-pips { display: flex; gap: 1px; font-size: 11px; line-height: 1; letter-spacing: -.5px; }
.fw-pips-tight { font-size: 8.5px; }
.fw-rlbl { font-size: 7px; font-weight: 900; letter-spacing: .4px; margin-top: 1px;
  color: rgba(255,255,255,.92); text-shadow: 0 1px 1px rgba(0,0,0,.55); }
.fw-br-gen .fw-pips, .fw-br-gen .fw-rlbl { color: #4a3500; text-shadow: 0 1px 0 rgba(255,255,255,.28); }
.fw-br-field .fw-pips, .fw-br-coy .fw-pips { color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.5); }
.fw-fog { font-size: 16px; background: linear-gradient(180deg, #5b2630, #391620); }
.fw-fogmk { opacity: .85; }
.fw-dest { box-shadow: inset 0 0 0 3px var(--accent-2); cursor: pointer; }
.fw-dest::after { content: ""; position: absolute; width: 30%; height: 30%;
  border-radius: 50%; background: rgba(54,211,153,.5); }
.fw-sel .fw-piece { outline: 3px solid var(--gold); }
.fw-last { box-shadow: inset 0 0 0 2px rgba(255,204,51,.55); }
.fw-home { outline: 1px solid rgba(54,211,153,.45); cursor: pointer; }
.fw-home:hover { background: rgba(54,211,153,.18); }
.fw-offlimits { opacity: .4; }
.fw-tray { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.fw-trayp { display: flex; align-items: center; gap: 5px; padding: 5px 9px;
  border-radius: 9px; border: 1px solid var(--line); background: var(--card2);
  color: var(--ink); cursor: pointer; font-size: 12px; }
.fw-trayp:hover { border-color: var(--accent-2); }
.fw-trayp-sel { border-color: var(--gold); background: rgba(255,204,51,.14);
  box-shadow: 0 0 0 1px var(--gold); }
.fw-trayp-out { opacity: .4; }
.fw-trayicon { font-weight: 900; font-size: 11px; min-width: 26px; text-align: center;
  background: linear-gradient(180deg, #2f6bc0, #1d437d); color: #eaf3ff;
  border-radius: 4px; padding: 1px 3px; }
.fw-traylbl { font-weight: 700; }
.fw-traynum { color: var(--muted); font-weight: 800; }
@media (max-width: 620px) { .fw-pips { font-size: 9px; } .fw-pips-tight { font-size: 7px; }
  .fw-rlbl { font-size: 6px; } .fw-fog { font-size: 13px; } }
/* the board flanked by its rank cheat-sheet rails */
.fw-arena { display: flex; align-items: flex-start; justify-content: center; gap: 14px; width: 100%; }
.fw-boardwrap { flex: 1 1 auto; min-width: 0; display: flex; justify-content: center; }
.fw-rail { flex: 0 0 172px; background: rgba(0,0,0,.24); border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px; padding: 10px 9px; }
.fw-rail-title { color: #ecfff7; font-size: 12.5px; font-weight: 900; margin: 0 0 3px; }
.fw-rail-sub { color: rgba(236,255,247,.6); font-size: 10px; line-height: 1.35; margin: 0 0 7px; }
.fw-ref-row { display: flex; align-items: center; gap: 5px; padding: 3.5px 0; font-size: 11px;
  border-top: 1px solid rgba(255,255,255,.06); }
.fw-ref-ic { font-weight: 900; font-size: 10px; min-width: 27px; text-align: center; flex: none;
  color: #eaf3ff; background: linear-gradient(180deg, #2f6bc0, #1d437d);
  border-radius: 4px; padding: 2px 2px; }
.fw-ref-lbl { color: #dfeaf5; font-weight: 700; white-space: nowrap; }
.fw-ref-arr { color: var(--gold); font-weight: 900; }
.fw-ref-eat { color: rgba(236,255,247,.74); font-size: 10px; line-height: 1.2; }
.fw-ref-spec { background: rgba(255,204,51,.1); border-radius: 6px; border-top-color: transparent; }
.fw-ref-spec .fw-ref-ic { background: linear-gradient(180deg, #d8b13f, #806113); color: #1a1205; }
.fw-rail-note { margin-top: 8px; font-size: 10px; line-height: 1.45; color: rgba(255,222,120,.9); }
@media (max-width: 1100px) { .fw-rail { display: none; } }

/* ===== Guided tutorial overlay ===== */
.tut-lock { overflow: hidden; }
.tut-ov { position: fixed; inset: 0; z-index: 300; background: rgba(4,8,6,.92);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: tut-fade .22s ease; }
.tut-panel { display: flex; flex-direction: column; align-items: center; gap: 16px;
  width: 100%; max-width: 600px; }
.tut-stage { width: 100%; display: flex; justify-content: center; }
.tut-board { display: grid; gap: 4px; width: 100%; max-width: 460px; }
.tut-cell { aspect-ratio: 1; border-radius: 5px; background: #2e4636;
  border: 1px solid rgba(0,0,0,.4); display: grid; place-items: center; position: relative;
  transition: opacity .28s ease, transform .28s ease, box-shadow .28s ease, filter .28s ease; }
.tut-dark { background: #24382b; }
.tut-faded { opacity: .2; filter: grayscale(.6); }
.tut-glow { box-shadow: 0 0 0 3px var(--gold), 0 0 22px rgba(255,204,51,.85);
  transform: scale(1.07); z-index: 2; animation: tut-pulse 1.5s ease-in-out infinite; }
.tut-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 18px 14px; width: 100%; max-width: 540px; position: relative;
  box-shadow: var(--shadow); max-height: 46vh; overflow-y: auto; }
.tut-cardhead { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.tut-coach { font-size: 30px; flex: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.45)); }
.tut-title { font-size: 16.5px; font-weight: 900; color: var(--gold); line-height: 1.2; }
.tut-text { font-size: 15px; line-height: 1.55; color: var(--ink); min-height: 62px; }
.tut-text b { color: var(--gold); }
.tut-dots { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 13px 0 11px; }
.tut-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: all .2s; }
.tut-dot.on { background: var(--gold); transform: scale(1.35); }
.tut-dot.done { background: var(--accent-2); }
.tut-btns { display: flex; gap: 10px; align-items: center; }
.tut-back { flex: 0 0 auto; }
.tut-next { flex: 1 1 auto; }
.tut-skip { position: absolute; top: 9px; right: 11px; background: none; border: 0;
  color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 700; }
.tut-skip:hover { color: var(--ink); }
.htp-btn { margin: 4px 0 6px; }
.htp-sub { font-size: 12.5px; margin: 0 0 6px; }
/* concept tiles for non-grid tutorials (Plantation roles/goods/etc.) */
.tut-tile { display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; width: 92%; height: 92%; border-radius: 9px;
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(0,0,0,.22));
  border: 1px solid rgba(255,255,255,.14); box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.tut-tile-ic { font-size: 24px; line-height: 1; }
.tut-tile-lbl { font-size: 8.5px; font-weight: 800; letter-spacing: .2px; text-align: center;
  color: rgba(255,255,255,.85); line-height: 1.1; }
.tut-tile.tut-gold { background: linear-gradient(180deg, rgba(255,204,51,.3), rgba(180,130,20,.25));
  border-color: rgba(255,204,51,.55); }
/* a small playing card for the Pusoy Dos tutorial */
.tut-card-face { width: 80%; height: 90%; border-radius: 6px; background: #f6f1e4; color: #1b1b1b;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font-weight: 900; box-shadow: 0 1px 3px rgba(0,0,0,.5), inset 0 0 0 1px rgba(0,0,0,.18); }
.tut-card-face.red { color: #c0392b; }
.tut-card-rank { font-size: 18px; line-height: 1; }
.tut-card-suit { font-size: 17px; line-height: 1; }
@keyframes tut-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tut-pulse { 0%,100% { box-shadow: 0 0 0 3px var(--gold), 0 0 16px rgba(255,204,51,.6); }
  50% { box-shadow: 0 0 0 3px var(--gold), 0 0 28px rgba(255,204,51,.95); } }
@media (max-width: 560px) { .tut-board { max-width: 88vw; } .tut-text { font-size: 14px; }
  .tut-card { max-height: 50vh; } }
@media (prefers-reduced-motion: reduce) { .tut-glow { animation: none; } }

/* ⚓ Cannon-Ships: two seas */
.cs-seas { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; }
.cs-sea { display: flex; flex-direction: column; align-items: center; }
.cs-head { color: #ecfff7; margin: 4px 0 8px; font-size: 16px; }
.cs-grid { display: grid; grid-template-columns: 18px repeat(10, 30px);
  grid-auto-rows: 30px; gap: 2px; }
.cs-lbl { display: grid; place-items: center; font-size: 10px; font-weight: 800;
  color: rgba(236,255,247,.65); }
.cs-cell { border: 1px solid rgba(122,215,255,.25); border-radius: 5px;
  background: rgba(10,40,60,.55); color: #dff3ff; font-size: 14px;
  display: grid; place-items: center; padding: 0; }
.cs-cell:disabled { opacity: 1; cursor: default; }
.cs-aim { cursor: crosshair; }
.cs-aim:hover { background: rgba(255,204,51,.3); border-color: var(--gold); }
.cs-ship { background: rgba(94,58,20,.85); border-color: #8a5a3c; }
.cs-hit { background: rgba(220,70,50,.85); border-color: #ff8a70; }
.cs-miss { background: rgba(20,60,90,.5); color: rgba(223,243,255,.5); }
.cs-sunk { background: #5b1410; border-color: #ff6b6b; }
.cs-note { margin-top: 8px; }
@media (max-width: 760px) {
  .cs-grid { grid-template-columns: 14px repeat(10, 24px); grid-auto-rows: 24px; }
  .cs-cell { font-size: 11px; }
}

/* hopping pieces */
.gr-hopper { position: fixed; z-index: 44; width: 42px; height: 42px; font-size: 27px;
  margin: 0 !important;   /* .gr-pawn's -8px stacking margin shoved the mover off-center */
  display: grid; place-items: center; border-radius: 50%;
  border: 2px solid #fff; color: #08131f;
  transition: left .12s ease-out, top .12s ease-out;   /* glide, hover a beat, glide */
  box-shadow: 0 6px 14px rgba(0,0,0,.55); }
/* the draw pile: deck + a real-looking card that flips out and vanishes */
.draw-wrap { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%);
  z-index: 47; pointer-events: none; cursor: pointer; }
.draw-close { display: block; margin: 2px auto 4px; padding: 6px 14px; font-size: 12.5px; }
.dc-good { color: #1f8a5e; }
.dc-bad { color: #c43d3d; }
.draw-pile { position: absolute; left: 50%; top: 50%; width: 168px; height: 232px;
  transform: translate(-50%, -50%) rotate(-4deg) translateY(16px);
  border-radius: 14px; border: 2px solid #2c1a0f;
  background: repeating-linear-gradient(45deg, #5a3a22, #5a3a22 7px, #46301d 7px, #46301d 14px);
  box-shadow: 0 10px 26px rgba(0,0,0,.5); }
.draw-pile.p2 { transform: translate(-50%, -50%) rotate(3deg) translateY(8px); }
.draw-card { position: relative; width: 180px; min-height: 244px; border-radius: 14px;
  background: linear-gradient(180deg, #fffef8, #efe7d2); color: #2a2118;
  border: 1px solid #9a8a6a; box-shadow: 0 18px 44px rgba(0,0,0,.65);
  display: flex; flex-direction: column; overflow: hidden;
  animation: draw-in .5s cubic-bezier(.2, .9, .3, 1.15); }
@keyframes draw-in {
  0% { transform: translateY(85px) rotateY(90deg) scale(.5); opacity: 0; }
  55% { transform: translateY(-8px) rotateY(0deg) scale(1.05); opacity: 1; }
  100% { transform: none; }
}
.draw-head { padding: 10px 8px; font-weight: 900; text-align: center; font-size: 16px;
  letter-spacing: .06em; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.45); }
.draw-card.sur .draw-head { background: linear-gradient(180deg, #e58d3c, #c96f1f); }
.draw-card.tre .draw-head { background: linear-gradient(180deg, #3aa37a, #2b8763); }
.draw-text { flex: 1; padding: 14px 14px; font-size: 14px; line-height: 1.5;
  font-weight: 700; display: flex; align-items: center; justify-content: center;
  text-align: center; }
.draw-brand { font-size: 9px; letter-spacing: .3em; text-align: center;
  color: #9a8a6a; padding: 7px; font-weight: 900; }
.draw-out { opacity: 0; transition: opacity .32s ease; }

/* trade notification chip (right side) + popup */
.trade-notif { position: fixed; right: 16px; top: 35%; z-index: 46;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  border: 2px solid var(--accent); border-radius: 12px; padding: 9px 13px;
  background: var(--card); color: var(--ink); font-weight: 900; font-size: 13.5px;
  cursor: pointer; box-shadow: 0 8px 22px rgba(0,0,0,.5); animation: pop .25s ease; }
.trade-notif.mine { border-color: var(--accent-2);
  box-shadow: 0 0 18px rgba(54,211,153,.5), 0 8px 22px rgba(0,0,0,.5); }
.trade-notif-sub { font-size: 10px; font-weight: 700; color: var(--muted); }
/* compound selectors: .deed-panel's own width must never win this fight */
.deed-panel.trade-pop { width: 360px; max-width: 94vw; }
.deed-panel.trade-wide { width: 600px; max-width: 96vw; padding: 18px 22px 20px; }
.trade-wide .tf-head { font-size: 16px; }
.trade-wide .tf-prop { font-size: 13.5px; padding: 9px 11px; }
.trade-wide .tf-cash { font-size: 14px; padding: 3px 14px; }
.trade-wide .tf-cashrow { font-size: 12px; }
.trade-wide .tf-cols { gap: 16px; }
.trade-wide .deed-title { font-size: 22px; }
.tf-partner { display: flex; align-items: center; gap: 10px; width: 100%;
  margin: 5px 0; padding: 11px 14px; border-radius: 11px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card2); color: var(--ink);
  font-weight: 800; font-size: 14.5px; }
.tf-partner:hover { border-color: var(--accent); }
.tf-cols { display: flex; gap: 10px; align-items: flex-start; }
.tf-col { flex: 1; min-width: 0; }
.tf-arrow { align-self: center; font-size: 20px; font-weight: 900;
  color: var(--muted); flex: none; }
.tf-head { display: flex; align-items: center; gap: 7px; justify-content: center;
  font-weight: 900; margin-bottom: 6px; }
.tf-cashrow { display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; margin: -2px 0 8px; }
.tf-cash { background: linear-gradient(180deg, #f0b75a, #d18a25); color: #2a1700;
  font-weight: 900; font-size: 12.5px; border-radius: 999px; padding: 2px 11px; }
.tf-prop { display: flex; align-items: center; gap: 7px; width: 100%;
  margin: 3px 0; padding: 7px 9px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg2); color: var(--ink);
  font-size: 12.5px; font-weight: 700; text-align: left; }
.tf-prop:hover { border-color: var(--accent); }
.tf-prop.sel { border-color: var(--accent-2); box-shadow: 0 0 0 1px var(--accent-2);
  background: rgba(54, 211, 153, .1); }
.tf-dot { width: 12px; height: 12px; border-radius: 4px; flex: none;
  border: 1px solid rgba(0,0,0,.4); }
.tf-pname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.tf-pprice { font-weight: 900; color: var(--gold); flex: none; }
.tf-pardons { display: flex; align-items: center; gap: 6px; margin-top: 4px;
  font-size: 13px; }
/* auction: WHO leads and for HOW MUCH — token first, amount huge */
.gr-bid-row { display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 5px 0 3px; }
.gr-bid-token { display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; font-size: 26px; border: 3px solid rgba(255,255,255,.9);
  box-shadow: 0 3px 10px rgba(0,0,0,.55); flex: none; }
.gr-bid-now { font-size: 34px; font-weight: 900; color: var(--gold);
  text-shadow: 0 2px 8px rgba(0,0,0,.5); line-height: 1; }
.gr-bid-leader { font-size: 13px; color: rgba(236,255,247,.75); font-weight: 700; }
.bid-bop { animation: bid-bop .5s cubic-bezier(.25,1.6,.4,1); }
@keyframes bid-bop {
  0% { transform: scale(1); }
  35% { transform: scale(1.22) translateY(-7px); }
  70% { transform: scale(.97); }
  100% { transform: scale(1); }
}
.gr-timer { text-align: center; font-weight: 900; font-size: 15px; color: #ecfff7; }
.gr-timer.hot { color: #ff8a80; animation: gr-jitter .4s infinite; font-size: 17px; }

/* the deed card (click a tile) — the when/get format */
.deed-panel { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 48; width: 280px; border-radius: 16px; padding: 14px 18px 16px;
  background: var(--card); border: 1px solid var(--line); overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.65); animation: deed-in .22s cubic-bezier(.2,.8,.3,1); }
@keyframes deed-in {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.92); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.deed-band { position: absolute; top: 0; left: 0; width: 100%; height: 10px; }
.deed-title { margin: 8px 0 4px; font-size: 20px; text-align: center; }
.deed-owner { display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.deed-ownertok { display: inline-grid; place-items: center; width: 24px; height: 24px;
  flex: none; margin: 0; border-radius: 50%; font-size: 14px;
  border: 2px solid rgba(255,255,255,.85); box-shadow: 0 1px 4px rgba(0,0,0,.45); }
.deed-row { display: flex; justify-content: space-between; gap: 12px;
  font-size: 13.5px; padding: 3.5px 0; }
.deed-head { color: var(--muted); font-size: 11px; text-transform: lowercase;
  border-bottom: 1px dashed var(--line); }
.deed-val { font-weight: 900; color: var(--gold); }
.deed-note { font-size: 13px; line-height: 1.5; padding: 6px 0; }
.deed-foot { display: flex; justify-content: space-between; gap: 12px; font-size: 13px;
  border-top: 1px dashed var(--line); margin-top: 9px; padding-top: 9px;
  color: var(--muted); }
.deed-foot b { color: var(--ink); }
.deed-actions { margin-top: 10px; justify-content: center; }
.deed-actions .btn { font-size: 12px; padding: 7px 10px; }
.gr-pool { font-size: 17px; font-weight: 900; color: var(--gold);
  background: rgba(0,0,0,.25); border: 1px dashed var(--gold); border-radius: 999px;
  padding: 4px 14px; }
.gr-turn { font-size: 12px; color: rgba(236,255,247,.7); }
/* deeds (property chips) + cubicle bits */
.gr-deeds { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; }
.gr-deed { display: inline-grid; place-items: center; min-width: 22px; height: 22px;
  padding: 0 2px; border-radius: 5px; font-size: 11px; border: 1px solid rgba(0,0,0,.4);
  color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.gr-deed.gr-pick { cursor: pointer; }
.gr-deed.sel { outline: 3px solid var(--accent-2); }
.gr-dead > *:not(.gr-resign-row) { opacity: .45; filter: grayscale(.6); }
.gr-resign.gr-leave { border-color: var(--accent); color: #ffe9b0;
  background: rgba(232,163,61,.14); font-weight: 900; }
/* manage + trade panels */
.gr-manage { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.gr-manage h3 { margin: 0 0 6px; font-size: 13px; }
.gr-mrow { display: flex; align-items: center; gap: 7px; padding: 3px 0; font-size: 12.5px; }
.gr-mname { flex: 1; min-width: 0; }
.gr-mbtns { display: flex; gap: 4px; }
.gr-mbtns .btn { padding: 4px 8px; font-size: 11px; }
.gr-tradebox { border: 1px solid var(--accent); border-radius: 10px; padding: 9px 11px;
  margin-bottom: 10px; background: rgba(240,183,90,.07); font-size: 13px; }
.gr-tradeform { border: 1px dashed var(--line); border-radius: 10px; padding: 10px;
  margin-top: 8px; }
/* lobby entry: two big honest buttons */
.entry-choice { display: flex; gap: 12px; margin: 14px 0 4px; }
.entry-btn { flex: 1; display: flex; flex-direction: column; gap: 3px; align-items: center;
  padding: 18px 10px; border-radius: 14px; cursor: pointer;
  border: 2px solid var(--line); background: var(--card2); color: var(--ink); }
.entry-btn:hover { border-color: var(--accent); }
.entry-btn.on { border-color: var(--accent-2); box-shadow: 0 0 0 1px var(--accent-2); }
.entry-big { font-size: 18px; font-weight: 900; }
.entry-sub { font-size: 11.5px; color: var(--muted); }
.gr-rules-fold { margin-bottom: 12px; }
.gr-rules-fold summary { cursor: pointer; }

/* the house-rules picker on the create form */
.gr-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; margin-bottom: 12px; }
.gr-rules > label.muted { display: flex; flex-direction: column; gap: 3px;
  align-items: stretch; }
.gr-rules > label.muted select { width: 100%; margin: 2px 0 6px; }
/* house-rule rows look like the ⚙️ settings menu: text left, ON/OFF pill right */
.gr-check { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; font-size: 13px; color: var(--ink); grid-column: span 2;
  padding: 8px 2px; border-bottom: 1px dashed var(--line); cursor: pointer; }
.gr-check:last-child { border-bottom: 0; }
.gr-check-txt { flex: 1; min-width: 0; line-height: 1.4; }
.gr-check input[type="checkbox"] { appearance: none; -webkit-appearance: none;
  width: 58px; min-width: 58px; height: 28px; margin: 0; border-radius: 9px;
  border: 1px solid var(--line); background: var(--card2); cursor: pointer;
  display: grid; place-items: center; font-weight: 900; font-size: 12px;
  color: var(--muted); }
.gr-check input[type="checkbox"]::before { content: "OFF"; }
.gr-check input[type="checkbox"]:checked {
  background: linear-gradient(180deg, #3ee9a6, #2bbd84); color: #06281c;
  border-color: transparent; }
.gr-check input[type="checkbox"]:checked::before { content: "ON"; }
@media (max-width: 640px) {
  .gr-rules { grid-template-columns: 1fr; }
  .gr-check { grid-column: span 1; }
  .gr-name { font-size: 6px; }
  .gr-emoji { font-size: 11px; }
}

/* bot move flash: green card hovering over the board, big enough to read */
.botflash {
  position: fixed; top: 16%; left: 50%; transform: translateX(-50%);
  z-index: 45; max-width: min(560px, 88vw); pointer-events: none;
  background: rgba(7, 38, 26, .94); border: 2px solid var(--accent-2);
  border-radius: 14px; padding: 12px 22px 14px; text-align: center;
  box-shadow: 0 0 0 1px rgba(54,211,153,.25), 0 0 34px rgba(54,211,153,.45),
              0 12px 30px rgba(0,0,0,.5);
  animation: botflash-in .28s ease;
}
.botflash-head { font-size: 11px; font-weight: 900; letter-spacing: .18em;
  color: var(--accent-2); }
.botflash-line { margin-top: 6px; font-size: 19px; font-weight: 800; line-height: 1.35;
  color: #ecfff7; text-shadow: 0 1px 3px rgba(0,0,0,.55); }
.botflash-out { opacity: 0; transition: opacity .34s ease; }
@keyframes botflash-in {
  0% { opacity: 0; transform: translateX(-50%) translateY(-14px) scale(.92);
       box-shadow: 0 0 0 14px rgba(54,211,153,.25), 0 0 60px rgba(54,211,153,.7); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* bot flash — ALLOCATED strip (non-Get-Rich): pinned atop the sidebar, in the
   layout, never over the board */
/* the sidebar is the strip's anchor — it OVERLAYS the top, never reflows it */
aside.side { position: relative; }
.botstrip { position: absolute; top: 0; left: 0; right: 0; z-index: 8;
  background: linear-gradient(180deg, rgba(7,38,26,.99), rgba(7,38,26,.96));
  border: 2px solid var(--accent-2); border-radius: 12px; padding: 9px 14px;
  text-align: center; box-shadow: 0 0 0 1px rgba(54,211,153,.3),
  0 8px 22px rgba(0,0,0,.6); animation: botstrip-in .26s ease; }
.botstrip-head { font-size: 10px; font-weight: 900; letter-spacing: .16em;
  color: var(--accent-2); }
.botstrip-line { margin-top: 3px; font-size: 14.5px; font-weight: 800;
  line-height: 1.3; color: #ecfff7; text-shadow: 0 1px 3px rgba(0,0,0,.55); }
.botstrip-out { opacity: 0; transition: opacity .34s ease; }
@keyframes botstrip-in {
  0% { opacity: 0; transform: translateY(-8px); }
  100% { opacity: 1; transform: translateY(0); } }

/* house-bot seat controls */
.botbtn { font-size: 11px; padding: 6px 9px; white-space: nowrap; }
.botchip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px;
  font-weight: 800; color: var(--accent-2); border: 1px dashed var(--accent-2);
  border-radius: 999px; padding: 3px 6px 3px 10px; white-space: nowrap; }
.botx { padding: 1px 7px; font-size: 11px; line-height: 1.4; border-radius: 999px; }

.binc { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.binc-chip { border: 1px solid var(--line); border-radius: 6px; padding: 0 5px;
  font-weight: 800; font-size: 11px; line-height: 1.7; background: rgba(0,0,0,.18);
  white-space: nowrap; }
.binc-chip.zero { opacity: .32; }
.binc-chip.choice { border-style: dashed; }
.bwar { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.bwar .bmedals { margin-left: 0; margin-top: 1px; }
.bwar .bmedal:first-child { margin-left: 0; }
.bmedal { display: inline-block; font-size: 10px; font-weight: 900; border-radius: 999px;
  padding: 1px 6px; margin-left: 3px; }
.bmedal.won { background: rgba(255,204,51,.18); color: var(--gold); border: 1px solid rgba(255,204,51,.5); }
.bmedal.lost { background: rgba(255,107,107,.12); color: #ff8a80; border: 1px solid rgba(255,107,107,.4); }
.bcard-blurb { padding: 0 9px 7px; font-size: 9.5px; line-height: 1.45; color: var(--muted); }

/* ===== 7 Blunders: real-looking cards in hand =====
   layout mirrors the physical cards: name banner + big "gives" glyphs on the
   colored band, cost icons dropping down the left edge, the function text
   sitting where the artwork would be. */
.bhand { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.bcard-wrap { display: flex; flex-direction: column; gap: 5px; width: 168px; }
.bcard { border-radius: 11px; overflow: hidden; border: 1px solid rgba(0,0,0,.45);
  box-shadow: 0 3px 9px rgba(0,0,0,.4); background: var(--card2);
  display: flex; flex-direction: column; flex: 1; min-height: 190px;
  transition: transform .1s; }
.bcard:hover { transform: translateY(-3px); }
.bcard-band { padding: 6px 7px 8px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.bcard-band.brown { background: #8a5a3c; } .bcard-band.grey { background: #8d99a6; }
.bcard-band.blue { background: #4a7bd0; } .bcard-band.yellow { background: #d9a92c; color: #3a2a00; text-shadow: none; }
.bcard-band.red { background: #c0504a; } .bcard-band.green { background: #3d9b62; }
.bcard-band.purple { background: #8e5aad; }
.bcard-banner { background: linear-gradient(180deg, #f7eed8, #e3d4b0); color: #33240e;
  text-shadow: none; border: 1px solid rgba(0,0,0,.35); border-radius: 3px;
  font-weight: 900; font-size: 10px; text-transform: uppercase; letter-spacing: .04em;
  text-align: center; padding: 2px 4px; line-height: 1.25;
  box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.bcard-icons { text-align: center; font-size: 21px; line-height: 1.25; margin-top: 5px;
  font-weight: 900; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.bcard-icons.small { font-size: 13.5px; }
.bcard-mid { display: flex; flex: 1; align-items: stretch; }
.bcosts { flex: none; display: flex; flex-direction: column; gap: 3px;
  padding: 7px 0; align-self: flex-start; }
.bcost { min-width: 23px; height: 23px; padding: 0 3px; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 800; background: rgba(0,0,0,.28); color: var(--ink, #eef3fb);
  border: 1px solid var(--line); border-left: none; border-radius: 0 9px 9px 0;
  box-shadow: 1px 1px 3px rgba(0,0,0,.3); }
.bcost.wide { font-size: 11px; }
.bcosts.many { gap: 2px; }
.bcosts.many .bcost { min-width: 20px; height: 20px; font-size: 11px; }
.bcard-body { flex: 1; min-width: 0; }
.bcard-eff { padding: 7px 8px 4px; font-size: 11px; font-weight: 700; line-height: 1.45; }
.bcard-cost { padding: 5px 9px 6px; border-top: 1px dashed var(--line); font-size: 10.5px;
  color: var(--muted); }
.bcard-chain { font-size: 9.5px; color: var(--muted); line-height: 1.3; }
.bcard-pay { font-weight: 900; font-size: 11.5px; }
.bcard-pay.ok { color: var(--accent-2); }
.bcard-pay.no { color: #ff8a80; }
.bcard-why { font-size: 9.5px; color: #ff8a80; line-height: 1.3; }
.bcard-btns { display: flex; gap: 4px; }
.bcard-btns .btn { flex: 1; padding: 6px 3px; font-size: 10.5px; }

/* wonder stages: always-visible, equal-width slots */
.bw-stages { display: grid; gap: 6px; margin-top: 6px; }
.bw-stage { border: 1px dashed var(--line); border-radius: 8px; padding: 5px 7px;
  font-size: 10px; line-height: 1.4; min-height: 66px; background: rgba(0,0,0,.12); }
.bw-stage.done { border-style: solid; border-color: var(--accent-2);
  background: rgba(54,211,153,.12); }
.bw-stnum { font-weight: 900; font-size: 9px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); }
.bw-stage.done .bw-stnum { color: var(--accent-2); }
.bw-stcost { font-weight: 800; margin: 2px 0; font-size: 10.5px; }
.bw-steff { color: var(--muted); }

/* ===== Liar's Ship ===== */
.ls-route { grid-column: 2; }
.ls-strip { display: flex; gap: 6px; justify-content: space-between; flex-wrap: wrap; }
.ls-isle { flex: 1; min-width: 64px; position: relative; text-align: center; border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 4px 6px; background: var(--card2); }
.ls-isle.here { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(232,163,61,.5); }
.ls-isle.next { border-style: dashed; border-color: var(--accent-2); }
.ls-isle.sunk { opacity: .45; filter: grayscale(.7); }
.ls-val { font-weight: 900; font-size: 18px; color: var(--gold); }
.ls-name { font-size: 9.5px; color: var(--muted); font-weight: 700; letter-spacing: .02em; }
.ls-tr { font-size: 10px; margin-top: 3px; letter-spacing: -2px; }
.ls-ship { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 20px;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); animation: bob 2.4s ease-in-out infinite; }
.ls-dice { display: flex; gap: 8px; align-items: center; margin-top: 12px; justify-content: center; }
.ls-die { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; font-size: 20px;
  background: var(--card2); border: 2px solid var(--accent); box-shadow: 0 3px 0 rgba(0,0,0,.4); }
.ls-die.calm { border-color: var(--line); opacity: .7; }
.ls-board { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.ls-needs { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.ls-needrow { padding: 4px 8px; border-radius: 7px; background: var(--card2); }
.ls-needrow.ok { border-left: 3px solid var(--accent-2); }
.ls-needrow.bad { border-left: 3px solid #ff6b6b; }
.ls-mine { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
.ls-picked { box-shadow: 0 0 0 2px var(--accent-2) !important; }

/* ===== Card & tile games (Pusoy Dos · Tong-its · Mahjong) ===== */
.pd-hand { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.pd-card {
  position: relative; width: 46px; height: 66px; padding: 0;
  border-radius: 7px; font-weight: 900;
  background: #fffaf0; color: #1d1d28; border: 1px solid #b9a78b;
  box-shadow: 0 2px 0 rgba(0,0,0,.35); cursor: pointer; transition: transform .08s;
}
.pc-corner { position: absolute; top: 3px; left: 5px; font-size: 11px;
  line-height: 1.05; text-align: center; pointer-events: none; }
.pc-corner.flip { top: auto; left: auto; bottom: 3px; right: 5px;
  transform: rotate(180deg); }
.pc-pip { position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 22px; pointer-events: none; }
.pd-card.red { color: #c0392b; }
.pd-card:disabled { cursor: default; opacity: .95; }
.pd-card.sel { transform: translateY(-7px); box-shadow: 0 0 0 2px var(--accent-2), 0 6px 10px rgba(0,0,0,.4); }
.pd-card:not(:disabled):hover { transform: translateY(-3px); }
.pd-card.sel:not(:disabled):hover { transform: translateY(-7px); }

.tg-melds { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 6px; }
.tg-meld { border: 1px dashed var(--line); border-radius: 10px; padding: 5px 7px; background: var(--card2); }
.tg-meld.droppable { border-color: var(--accent-2); cursor: pointer; box-shadow: 0 0 10px rgba(54,211,153,.35); }
.tg-meld .pd-card { width: 36px; height: 50px; }
.tg-meld .pc-corner { font-size: 9px; }
.tg-meld .pc-pip { font-size: 15px; }

.mj-tile {
  min-width: 40px; padding: 9px 5px; border-radius: 7px; font-weight: 900; font-size: 14px;
  background: linear-gradient(180deg, #fffef8, #e8e2d0); color: #19324a;
  border: 1px solid #9a8a6a; border-bottom-width: 4px;
  box-shadow: 0 2px 0 rgba(0,0,0,.35); cursor: default;
}
.mj-tile.live { cursor: pointer; }
.mj-tile.live:hover { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--accent-2); }
.mj-tile:disabled { opacity: .95; }
.tg-meld .mj-tile { min-width: 30px; padding: 4px 3px; font-size: 11px; }
.mj-river { display: flex; flex-wrap: wrap; gap: 2px; }
/* pond tiles: real tile faces, just a notch smaller than the hand */
.mj-rivertile {
  display: inline-block; min-width: 34px; padding: 7px 4px; text-align: center;
  font-weight: 900; font-size: 13.5px; border-radius: 6px;
  background: linear-gradient(180deg, #fffef8, #e8e2d0); color: #19324a;
  border: 1px solid #9a8a6a; border-bottom-width: 3px;
  box-shadow: 0 1px 0 rgba(0,0,0,.3);
}
.mj-rivertile.hot { box-shadow: 0 0 0 2px var(--accent-2), 0 0 12px rgba(54,211,153,.6);
  transform: translateY(-2px); }

/* the sound-debug overlay */
.snd-debug { position: fixed; bottom: 70px; right: 16px; z-index: 65; width: 210px;
  background: rgba(0,0,0,.82); color: #7dffa8; font: 11px/1.5 Consolas, monospace;
  border: 1px solid #2bbd84; border-radius: 10px; padding: 8px 10px;
  white-space: pre-wrap; pointer-events: none; }

/* the "audio is blocked" pill */
.audio-pill { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  z-index: 70; background: #181818; color: #ffd31d; border: 1px solid #ffd31d;
  border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 800;
  box-shadow: 0 6px 18px rgba(0,0,0,.5); animation: rise .3s ease; pointer-events: none; }

/* ===== Settings menu ===== */
.settings-panel { position: fixed; top: 62px; right: 16px; z-index: 60; width: 290px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 12px 14px; animation: rise .18s ease; }
.set-row { display: flex; justify-content: space-between; align-items: center;
  gap: 10px; padding: 7px 0; font-size: 13.5px; font-weight: 700; }
.set-toggle { padding: 5px 12px; font-size: 12px; min-width: 56px; }
.set-toggle.set-on { background: linear-gradient(180deg, #3ee9a6, #2bbd84); color: #06281c; }
.set-volwrap { display: flex; align-items: center; gap: 8px; }
.set-slider { width: 110px; margin: 0; padding: 0; }
.set-note { font-size: 10.5px; color: var(--muted); margin-top: 8px; font-weight: 400; }

/* ===== Table chat ===== */
.chatbox h3 { margin: 0 0 8px; font-size: 15px; }
.side .chatbox { margin-top: 14px; }
.lobby-chat { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 14px; }
.chatlines { max-height: 200px; min-height: 56px; overflow-y: auto; font-size: 13px; line-height: 1.5; }
.chatline { padding: 2px 0; overflow-wrap: anywhere; }
.chatline b { color: var(--accent); font-weight: 800; }
.chatrow { display: flex; gap: 6px; margin-top: 8px; }
.chatrow .chatinput { flex: 1; margin: 0; min-width: 0; }
.chatrow .chatsend { padding: 7px 12px; flex: none; }

/* unavailable buildings: dimmed chip that still explains itself */
.bldoff { opacity: .55; cursor: help; box-shadow: none; transform: none !important;
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.bldoff:hover { filter: none; }
.bldwhy { font-size: 10px; font-weight: 700; color: #ff8a80; letter-spacing: .01em; }

/* ===== The Coach (per-seat advisor, sidebar card between log and chat) ===== */
.coach { margin-top: 14px; background: var(--card); border: 1px solid var(--accent-2);
  border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.coach-head { display: flex; justify-content: space-between; align-items: center;
  padding: 9px 14px; font-weight: 800; font-size: 14px;
  background: linear-gradient(90deg, rgba(54,211,153,.18), transparent); }
.coach-btn { border: 0; background: var(--card2); color: var(--ink); width: 26px; height: 24px;
  border-radius: 7px; cursor: pointer; font-weight: 900; }
.coachlines { max-height: 22vh; overflow-y: auto; padding: 8px 14px 10px;
  font-size: 13.5px; line-height: 1.55; }
.coachline { padding: 2px 0; animation: slidein .3s ease; }
.coachsep { border-bottom: 1px dashed var(--line); margin: 5px 0; }

/* ===== Banner ===== */
.banner { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.7); z-index: 30; }
.banner .inner { background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  padding: 30px 40px; text-align: center; box-shadow: var(--shadow); animation: pop .5s; }
.banner h1 { margin: 0 0 10px; color: var(--gold); font-size: 30px; }

/* ===== FX layer (flying emojis + toasts) ===== */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 40; }
.fly { position: fixed; font-size: 22px; will-change: transform, opacity;
  transition: transform .7s cubic-bezier(.3,.8,.3,1), opacity .7s; }
.toast { position: fixed; font-weight: 900; font-size: 15px; will-change: transform, opacity;
  transition: transform 1s ease-out, opacity 1s ease-out; text-shadow: 0 2px 4px rgba(0,0,0,.6); }

/* ===== Tooltip ===== */
.tooltip {
  position: fixed; z-index: 60; max-width: 260px; pointer-events: none;
  background: #0b0e14; color: #eef3fb; border: 1px solid var(--accent);
  border-radius: 10px; padding: 9px 11px; font-size: 12.5px; line-height: 1.45;
  box-shadow: 0 10px 26px rgba(0,0,0,.6); animation: pop .12s ease;
  white-space: pre-line;   /* card tooltips list gives/cost/chain/strategy on their own lines */
}
.tooltip .tt-title { font-weight: 900; color: var(--accent); margin-bottom: 3px; font-size: 13px; }
[data-tip] { cursor: help; }

/* ===== Handbook (fab + modal) ===== */
.fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 25;
  background: linear-gradient(180deg, #f0b75a, #d18a25); color: #2a1700;
  border: 0; border-radius: 14px; padding: 12px 16px; font-weight: 900; font-size: 15px;
  cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.5); animation: bob 3s ease-in-out infinite;
}
.fab:hover { filter: brightness(1.08); }
.fab2 { bottom: 72px; background: linear-gradient(180deg, #7ad7ff, #4aa8d8); animation-delay: .4s; }
.fab3 { bottom: 126px; background: linear-gradient(180deg, #3ee9a6, #2bbd84); color: #06281c; animation-delay: .8s; }

/* seat count stepper */
.seatpick { display: flex; align-items: center; gap: 14px; margin: 6px 0 10px; }
.seatpick .btn { width: 40px; font-size: 18px; padding: 6px 0; }
.seatnum { font-size: 26px; font-weight: 900; min-width: 28px; text-align: center; color: var(--accent); }

/* hollow slots: remaining island / town spaces */
.tile.slot { background: transparent; border: 2px dashed var(--line); box-shadow: none; }
.bld.slot { background: transparent; border-style: dashed; color: var(--muted);
  display: grid; place-items: center; min-width: 30px; font-size: 14px; }

/* buildings reference rows */
.bref { display: flex; align-items: baseline; gap: 10px; padding: 5px 8px; margin: 3px 0;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card2); font-size: 13px; }
.bref-name { font-weight: 800; min-width: 150px; }
.bref-info { flex: 1; font-size: 11.5px; }
.bref-cost { font-weight: 800; white-space: nowrap; }
.bref.out { opacity: .45; }
.bref.out .bref-cost::after { content: " · SOLD OUT"; color: #ff6b6b; }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.72);
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  max-width: 640px; width: 100%; max-height: 86vh; overflow-y: auto; padding: 24px 28px;
  box-shadow: var(--shadow); position: relative; animation: rise .3s ease;
}
.modal-card h1 { margin: 0 0 6px; font-size: 24px; }
.modal-card h2 { margin: 18px 0 6px; font-size: 16px; color: var(--accent); }
.modal-card p, .modal-card li { font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.modal-card ul { margin: 4px 0; padding-left: 20px; }
.modal-card li { margin: 3px 0; }
.modal-x { position: absolute; top: 14px; right: 14px; background: var(--card2); color: var(--ink);
  border: 0; width: 32px; height: 32px; border-radius: 9px; cursor: pointer; font-weight: 900; }

/* ===== Keyframes ===== */
@keyframes pulse { 0%,100%{ box-shadow: 0 3px 0 rgba(0,0,0,.4);} 50%{ box-shadow: 0 3px 0 rgba(0,0,0,.4), 0 0 16px rgba(255,204,51,.55);} }
@keyframes pop { 0%{ transform: scale(.4); opacity:0;} 70%{ transform: scale(1.12);} 100%{ transform: scale(1); opacity:1;} }
@keyframes rise { from{ transform: translateY(10px); opacity:0;} to{ transform: none; opacity:1;} }
@keyframes slidein { from{ transform: translateX(-12px); opacity:0;} to{ transform:none; opacity:1;} }
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-5px);} }
@keyframes bump { 0%{ transform: scale(1);} 40%{ transform: scale(1.35);} 100%{ transform: scale(1);} }

/* ===== Knock-On landing page ===== */
.landing-body { display: flex; flex-direction: column; min-height: 100vh; }

/* A) the felt has seen some games: worn patches, stains, scratches, fabric grain */
.landing-body {
  background:
    radial-gradient(240px 130px at 18% 28%, rgba(255,255,255,.045), transparent 70%),
    radial-gradient(300px 160px at 79% 14%, rgba(255,255,255,.035), transparent 70%),
    radial-gradient(360px 220px at 64% 78%, rgba(0,0,0,.18), transparent 72%),
    radial-gradient(170px 95px at 33% 64%, rgba(255,255,255,.04), transparent 70%),
    radial-gradient(110px 60px at 90% 55%, rgba(0,0,0,.14), transparent 70%),
    radial-gradient(1200px 700px at 70% -10%, var(--bg2), var(--bg)) fixed;
}
.landing-body::before { content: none; }
.landing-body::after {            /* fabric grain (SVG noise, very faint) */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .03;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.landing-body .landing, .landing-body .topbar, .landing-body .site-footer {
  position: relative; z-index: 1; }
.landing-body .topbar { z-index: 5; }
/* fabs & modals must stay FIXED — "position: relative" here once pinned the
   bug/rules modals to the bottom of the page instead of popping up */
.landing-body .modal { z-index: 50; }
.landing-body .fab { z-index: 25; }

/* C) the pun under the welcome */
.wood-joke { max-width: 600px; margin: -8px auto 20px; font-size: 13.5px; font-style: italic;
  color: var(--gold); opacity: .85; cursor: pointer; line-height: 1.5; }
.wood-joke:hover { opacity: 1; }

/* D) safety note + how-a-night-works list */
.safety { margin-top: 16px; padding: 11px 14px; border-radius: 12px; font-size: 13px; line-height: 1.6;
  background: rgba(122, 215, 255, .07); border: 1px solid rgba(122, 215, 255, .35); }
.hownight { margin: 6px 0 10px; padding-left: 22px; }
.hownight li { font-size: 14px; line-height: 1.65; margin: 7px 0; }
.landing { flex: 1; max-width: 860px; margin: 0 auto; padding: 24px 20px 48px; width: 100%; }
.hero { text-align: center; padding: 26px 10px 30px; animation: rise .4s ease; }
.hero-emoji { font-size: 44px; animation: bob 3s ease-in-out infinite; }
/* the hero logo as a full-width brown rug laid across the green felt table */
.hero-band {
  position: relative; isolation: isolate;
  width: 100vw; margin: -50px 0 28px; margin-left: calc(50% - 50vw);
  padding: 22px 16px 24px;
  background: #5a3712;   /* exact flat brown of the banner image, so it bleeds edge-to-edge seamlessly */
  box-shadow: 0 16px 32px rgba(0, 0, 0, .45);   /* the rug casts a shadow onto the table */
}
.hero-band-logo {
  display: block; position: relative; z-index: 2; margin: 0 auto;
  height: clamp(104px, 15vw, 156px); width: auto; max-width: 100%; aspect-ratio: 1776 / 414;
}
/* woven rug border: twin tan stripes running the full width, hidden behind the centered logo */
.hero-band::before {
  content: ""; position: absolute; inset: 10px 0; z-index: 1; pointer-events: none;
  border-top: 2px solid rgba(216, 178, 120, .34);
  border-bottom: 2px solid rgba(216, 178, 120, .34);
}
/* fringe of tassels hanging off the bottom onto the green felt */
.hero-band::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -12px; height: 13px; z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(216, 178, 120, .8) 0 2px, transparent 2px 8px);
  -webkit-mask: linear-gradient(180deg, #000 0%, transparent 92%);
  mask: linear-gradient(180deg, #000 0%, transparent 92%);
}
/* the carpet rolls up as you scroll (JS sets the transform); pivot at the top edge */
.hero-band { transform-origin: top center; will-change: transform, opacity; }

/* scroll-reveal: headers, cards and points fade-and-rise into view.
   Guarded by .js (set in <head>) so no-JS visitors see everything, and skipped for reduced-motion. */
@media (prefers-reduced-motion: no-preference) {
  .js .games-grid > *,
  .js .cat-head,
  .js .games-notice,
  .js .about-points .point,
  .js .hownight li,
  .js .footer-supporters {
    opacity: 0; transform: translateY(26px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.22, .7, .25, 1);
  }
  .js .games-grid > .shown,
  .js .cat-head.shown,
  .js .games-notice.shown,
  .js .about-points .point.shown,
  .js .hownight li.shown,
  .js .footer-supporters.shown {
    opacity: 1; transform: none;
  }
}
.hero h1 { font-size: 40px; margin: 10px 0 6px; }
.hero-brand { color: var(--accent); }
.hero-tag { color: var(--muted); font-size: 17px; max-width: 560px; margin: 0 auto 22px; line-height: 1.5; }
.hero-cta { font-size: 17px; padding: 13px 26px; display: inline-block; text-decoration: none; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 20px auto 0; max-width: 580px; }
.hero-badges span { font-size: 12.5px; font-weight: 700; color: var(--muted);
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; }
.cat-nav { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 8px; }
.cat-nav a { font-size: 12.5px; font-weight: 800; text-decoration: none; color: var(--ink);
  background: var(--card2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
  transition: border-color .12s, transform .1s; }
.cat-nav a:hover { border-color: var(--accent); transform: translateY(-1px); }
.about { margin: 18px 0; }
.about h2, .games h2 { margin: 0 0 8px; font-size: 20px; }
.about p { line-height: 1.6; font-size: 14.5px; }
.about-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
@media (max-width: 760px) { .about-points { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .about-points { grid-template-columns: 1fr; } }
.point { background: var(--card2); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; display: grid; grid-template-columns: 32px 1fr; column-gap: 10px;
  align-items: start; }
.point-emoji { font-size: 22px; grid-row: 1 / span 2; line-height: 1.2; margin-top: 2px; }
.point b { grid-column: 2; font-size: 13.5px; }
.point p { grid-column: 2; margin: 2px 0 0; font-size: 12px; line-height: 1.45; }
.games { margin-top: 28px; }
.games-notice { font-size: 12.5px; color: var(--muted); margin: 4px 0 12px; line-height: 1.55;
  border-left: 3px solid #d9a92c; padding-left: 10px; }
.games-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 10px; }
.game-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit;
  transition: transform .12s, box-shadow .15s; }
a.game-card:hover { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.game-card h3 { margin: 0; font-size: 19px; }
.game-card p { margin: 0; line-height: 1.5; }
.game-art { font-size: 42px; }
.game-play { margin-top: auto; align-self: flex-start; }
.game-cta { margin-top: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.game-cta .game-play { margin-top: 0; }
.game-count { font-weight: 900; font-size: 12.5px; white-space: nowrap;
  background: linear-gradient(180deg, #f0b75a, #d18a25); color: #2a1700;
  border-radius: 999px; padding: 5px 11px; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.game-rules { font-size: 12px; padding: 6px 10px; }
.game-card.soon { opacity: .78; }
/* ===== header section tabs ===== */
.landing-topbar { gap: 12px; }
.site-tabs { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.site-tabs .tab { font-size: 14px; font-weight: 800; color: var(--wood-ink); opacity: .8;
  background: transparent; border: 0; border-radius: 999px; padding: 7px 15px; cursor: pointer;
  text-decoration: none; transition: background .12s, opacity .12s; white-space: nowrap; font-family: inherit; }
.site-tabs .tab:hover { opacity: 1; background: rgba(0,0,0,.16); }
.site-tabs .tab.active { opacity: 1; background: rgba(0,0,0,.3);
  box-shadow: inset 0 0 0 1px rgba(255,233,196,.35); }
.panel { display: none; }
.panel.active { display: block; animation: rise .25s ease; }
@media (max-width: 760px) {
  .landing-topbar { flex-wrap: wrap; row-gap: 8px; }
  .site-tabs { order: 3; width: 100%; }
}

/* ===== supporters / wall of thanks ===== */
.footer-supporters { margin: 14px 0 6px; display: flex; flex-direction: column;
  align-items: center; gap: 8px; }
.supporter-mini { display: flex; gap: 8px; }
.supporter-mini img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--gold); transition: transform .12s; display: block; }
.supporter-mini a:hover img { transform: scale(1.13); }
.supporters-grid { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 18px; }
.supporter { width: 196px; text-align: center; background: var(--card2);
  border: 1px solid var(--line); border-radius: 14px; padding: 18px 14px; }
.supporter-pic { width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--gold); box-shadow: 0 3px 11px rgba(0,0,0,.45); }
.supporter-name { font-weight: 900; font-size: 15.5px; margin-top: 10px; }
.supporter-tag { display: inline-block; font-size: 11.5px; font-weight: 800; border-radius: 999px;
  padding: 3px 12px; margin-top: 7px; }
.tag-donor { background: rgba(255,204,51,.16); color: var(--gold); border: 1px solid var(--gold); }
.tag-complain { background: rgba(224,79,79,.15); color: #ff9c9c; border: 1px solid #e04f4f; }
.tag-tester { background: rgba(120,170,255,.15); color: #b9d2ff; border: 1px solid #5e8be0; }
.supporter-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.supporter-note { font-size: 12px; line-height: 1.55; margin-top: 9px; color: var(--muted); }
mark.hl { background: linear-gradient(180deg, rgba(255,204,51,.18), rgba(255,204,51,.3));
  color: var(--gold); font-weight: 800; font-style: italic; border-radius: 4px;
  padding: 0 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* ===== game categories ===== */
.game-cat { margin: 22px 0 6px; }
.cat-head { font-size: 16px; margin: 0 0 11px; color: var(--ink); font-weight: 800;
  border-bottom: 1px solid var(--line); padding-bottom: 7px; letter-spacing: .01em; }
.cat-sub { color: var(--muted); font-weight: 500; font-size: 13.5px; }

/* ===== WIP caution tape ===== */
.wip { position: relative; overflow: hidden; }
.wip-tape {
  position: absolute; top: 18px; right: -48px; transform: rotate(38deg);
  width: 190px; text-align: center; padding: 5px 0; pointer-events: none; z-index: 2;
  background: repeating-linear-gradient(45deg, #ffd31d 0 12px, #181818 12px 24px);
  box-shadow: 0 2px 8px rgba(0,0,0,.45);
  font-size: 10px; font-weight: 900; letter-spacing: .06em;
}
.wip-tape span { background: #ffd31d; color: #1a1206; padding: 1px 8px; border-radius: 3px; }
.wip-note { font-size: 11.5px; color: #d9a92c; font-weight: 700; margin: 0; }
.wip-contact { font-size: 11px; color: var(--muted); margin: 0; }
.maillink { color: var(--accent); font-weight: 700; text-decoration: underline; cursor: pointer; }
.polished { background: linear-gradient(180deg, #3ee9a6, #2bbd84); color: #06281c;
  font-size: 10px; font-weight: 900; padding: 2px 8px; border-radius: 999px;
  display: inline-block; margin-bottom: 4px; align-self: flex-start; }

/* share-this-game widget (lobby screen) */
.share-label { text-align: center; font-size: 12px; font-weight: 800; color: var(--muted);
  letter-spacing: .04em; margin: 14px 0 6px; }
.share-info { cursor: help; opacity: .8; }
.share-row { display: flex; gap: 0; }
.share-row .share-url {
  flex: 1; margin: 0; min-width: 0; font-size: 12.5px; padding: 9px 11px;
  background: rgba(0,0,0,.28); border: 1px solid var(--line);
  border-radius: 10px 0 0 10px; border-right: 0; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: text;
}
[data-theme="light"] .share-row .share-url { background: rgba(0,0,0,.06); }
.share-copy { border-radius: 0 10px 10px 0; box-shadow: none; padding: 0 14px;
  background: linear-gradient(180deg, #ffd95e, #f2b705); color: #3a2a00; white-space: nowrap; }

/* WIP banner on game pages */
.wip-banner {
  margin: 12px 0 4px; padding: 9px 12px; border-radius: 10px; font-size: 12.5px;
  background: rgba(255, 211, 29, .1); border: 1px solid rgba(217, 169, 44, .55);
  position: relative; overflow: hidden;
}
.wip-banner::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: repeating-linear-gradient(45deg, #ffd31d 0 8px, #181818 8px 16px);
}

/* ===== Site footer (credits) — B) the wooden underside of the table ===== */
.site-footer {
  margin-top: 30px; border-top: 0; position: relative; color: var(--wood-ink);
  background:
    /* knots in the wood */
    radial-gradient(115px 26px at 21% 62%, rgba(0,0,0,.34), transparent 70%),
    radial-gradient(80px 18px at 77% 28%, rgba(0,0,0,.26), transparent 70%),
    radial-gradient(46px 12px at 56% 84%, rgba(0,0,0,.22), transparent 70%),
    /* uneven, sun-faded paint */
    radial-gradient(480px 200px at 62% 70%, rgba(255,235,196,.07), transparent 72%),
    radial-gradient(420px 170px at 12% 18%, rgba(0,0,0,.15), transparent 70%),
    /* scratches across the grain */
    linear-gradient(87deg, transparent 49.85%, rgba(255,235,196,.10) 50%, transparent 50.15%),
    linear-gradient(-2deg, transparent 49.9%, rgba(0,0,0,.20) 50%, transparent 50.1%),
    /* the grain itself */
    repeating-linear-gradient(178.5deg, rgba(0,0,0,.11) 0 2px, transparent 2px 9px,
      rgba(0,0,0,.06) 9px 11px, transparent 11px 26px),
    var(--wood);
  background-size: auto, auto, auto, auto, auto, 640px 300px, 980px 260px, auto, auto;
}
.site-footer::before {            /* splintered, chipped top edge */
  content: ""; position: absolute; top: -7px; left: 0; right: 0; height: 7px;
  background:
    repeating-linear-gradient(-58deg, #6a431a 0 7px, transparent 7px 13px, #553211 13px 18px, transparent 18px 29px);
  opacity: .9;
}
.site-footer a { color: var(--gold); }
.site-footer .muted { color: rgba(255, 233, 196, .62); }
.footer-inner { max-width: 860px; margin: 0 auto; padding: 26px 20px; text-align: center; }
.footer-brand { font-weight: 900; font-size: 18px; margin-bottom: 8px; }
.footer-inner p { margin: 5px 0; font-size: 13.5px; }
.footer-inner a { color: var(--accent); font-weight: 700; }
.footer-fine { margin-top: 12px !important; font-size: 11.5px !important; }

@media (max-width: 1100px) { .game { grid-template-columns: 1fr 280px; } .adrail { display: none; } }
@media (max-width: 900px) {
  .game { grid-template-columns: 1fr; }
  .side { position: static; grid-column: 1; grid-row: auto; }
  .action, .table-board, .board { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ===== Jewelers (gem-engine builder) ===== */
.jw-wrap { display: flex; flex-direction: column; gap: 10px; padding: 10px; }
.jw-bank, .jw-nobles { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jw-tok { display: inline-flex; align-items: center; gap: 3px; background: rgba(0,0,0,.25);
  border: 1px solid var(--g, #888); border-radius: 999px; padding: 2px 9px; font-size: 14px; }
.jw-tok .jw-dot { font-size: 13px; }
.jw-dot { display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%; font-size: 11px; }
.jw-noble { display: inline-flex; gap: 3px; background: linear-gradient(160deg,#5a4a8a,#39305e);
  border: 1px solid #b9924a; border-radius: 8px; padding: 5px 7px; }
.jw-need { display: inline-flex; gap: 3px; }
.jw-pip { display: inline-flex; align-items: center; justify-content: center; min-width: 20px;
  height: 20px; border-radius: 5px; font-weight: 800; font-size: 12px; padding: 0 3px; }
.jw-pip-s { min-width: 17px; height: 17px; font-size: 11px; }
.jw-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.jw-deck { display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-width: 54px; background: linear-gradient(160deg,#2c2118,#16100a);
  border: 1px solid #5a4632; border-radius: 9px; padding: 6px; font-size: 13px; }
.jw-deckn { font-weight: 800; color: var(--accent); }
.jw-card { display: flex; flex-direction: column; gap: 6px; width: 84px; min-height: 104px;
  background: var(--card); border: 1px solid #6c5638; border-top: 5px solid var(--bc, #888);
  border-radius: 9px; padding: 7px; }
.jw-chead { display: flex; justify-content: space-between; align-items: center; }
.jw-pts { font-weight: 900; color: var(--accent); font-size: 16px; }
.jw-bonus { width: 22px; height: 22px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-size: 12px; border: 1px solid rgba(0,0,0,.4); }
.jw-cost { display: flex; flex-wrap: wrap; gap: 3px; margin-top: auto; }
.jw-cbtns { display: flex; gap: 4px; }
.jw-mini { padding: 2px 8px !important; font-size: 13px !important; min-width: 0 !important; }
.jw-take { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.jw-gem { border-left: 5px solid var(--g, #888) !important; }
.jw-gem-on { outline: 2px solid var(--accent); }
.jw-discard { display: flex; flex-direction: column; gap: 6px; }
.jw-drow { display: flex; align-items: center; gap: 8px; }
.jw-dcount { min-width: 18px; text-align: center; font-weight: 800; }
.jw-players { display: flex; flex-direction: column; gap: 8px; }
.jw-pcard { background: var(--card); border: 1px solid #5a4632; border-radius: 9px; padding: 8px 10px; }
.jw-pcard.jw-active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.jw-pcard.jw-me { border-left: 5px solid var(--accent-2); }
.jw-pname { display: flex; justify-content: space-between; font-weight: 700; }
.jw-pwin { color: var(--accent); }
.jw-pstats { display: flex; gap: 9px; flex-wrap: wrap; margin: 5px 0; }
.jw-pgem { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; }
.jw-pgem .jw-dot { border: 1px solid rgba(0,0,0,.4); }
.jw-pgem small { color: var(--muted); }
.jw-pfoot { font-size: 12px; }
