/* ==========================================================================
   Site shell: the sister-site look, a touch warmer, around a wood and baize card table
   ========================================================================== */
:root {
  --bg: #2d2b29;
  --bg-2: #252321;
  --bg-3: #1e1c1b;
  --panel: #272523;
  --panel-2: #211f1d;
  --panel-3: #312e2b;
  --hover: #3c3935;
  --line: #3e3a36;
  --text: #f5f3ee;
  --text-2: #cac5bd;
  --text-3: #918c84;
  --green: #5fa564;
  --green-hi: #71b775;
  --green-sh: #3a6b3e;
  --gray: #44403c;
  --gray-hi: #4f4b46;
  --gray-sh: #292624;
  --red: #e02828;
  --red-soft: #fa412d;
  --gold: #f2c94c;
  --radius: 6px;
  --font: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Barlow Semi Condensed", "Barlow", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --hl-last: rgba(246, 206, 92, .42);
  --hl-sel: rgba(246, 206, 92, .58);
  --accent: var(--green);
  --accent-hi: var(--green-hi);
  --accent-sh: var(--green-sh);
  --on-accent: #ffffff;
  --gold-sh: #9a7a1e;
  /* table, set by settings.js */
  --felt: #2f7a48;
  --felt-2: #1d5631;
  --rail: #4a2e1a;
  --rail-hi: #7a5232;
  --rail-lo: #2c1a0e;
  --trim: #b88d3f;
  --lane: rgba(0, 0, 0, .1);
  --felt-ink: #f3efe2;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0 0 .8em; line-height: 1.55; color: var(--text-2); }
h1, h2, h3, h4, .btn, .tab, .nav a, .logo-text, .menu-btn .mb-title, .section-title, .seg button,
.lesson-top .lt-title, .bot-card .bc-name, .tc-cat, .field label, .opp-status, .page-title, .lane-chip, .mode-card b, .variant-item b { font-family: var(--font-head); }
.clock, .tc-btn, .prating, .stat-line b, .lc-num, .lc-meta, .room-code, .go-rating, .count-pill, .log-item .ply { font-family: var(--font-mono); }
.txt-link { color: var(--green-hi); font-weight: 700; }
kbd { background: var(--panel-3); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-size: .85em; }
.muted { color: var(--text-3); }
.hidden { display: none !important; }

.ico { display: inline-flex; width: 1.2em; height: 1.2em; flex: none; }
.ico svg { width: 100%; height: 100%; }

/* --------------------------------------------------------------- shell --- */
.app { display: flex; height: 100vh; }
/* the restart notice sits above the page and the page shrinks to fit under it */
.maint-bar { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 16px; background: var(--panel-3); border-bottom: 1px solid var(--line); box-shadow: inset 0 -2px 0 var(--gold); color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.35; text-align: center; }
.maint-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; animation: maint-pulse 1.6s ease-in-out infinite; }
@keyframes maint-pulse { 50% { opacity: .3; } }
body.has-maint { display: flex; flex-direction: column; height: 100vh; }
body.has-maint .app { flex: 1; min-height: 0; height: auto; }
.sidebar {
  width: 168px;
  flex: none;
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  z-index: 10;
}
.logo { display: flex; align-items: center; gap: 8px; padding: 10px 14px 18px; }
.logo svg { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 2px 2px #0006); }
.logo-text { font-weight: 900; font-size: 18px; line-height: 1; letter-spacing: -.3px; }
.logo-text small { display: block; font-size: 10px; font-weight: 700; color: var(--green); letter-spacing: 2.2px; margin-top: 3px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px;
  font-weight: 700; font-size: 15px;
  color: var(--text-2);
  border-left: 3px solid transparent;
}
.nav a .ico { width: 24px; height: 24px; color: var(--text-3); }
.nav a:hover { background: var(--bg-3); color: var(--text); }
.nav a:hover .ico { color: var(--text); }
.nav a.active { color: var(--text); background: #1b1d1e; border-left-color: var(--green); }
.nav a.active .ico { color: var(--green); }
.side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 8px; }
.me-chip { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; border-radius: 6px; margin: 0 6px; }
.me-chip:hover { background: var(--bg-3); }
.me-chip .nm { font-weight: 700; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 92px; }
.me-chip .rt { font-size: 12px; color: var(--text-3); }
.side-tools { display: flex; gap: 4px; padding: 4px 10px; }
.conn { font-size: 11px; color: var(--text-3); padding: 2px 16px 6px; display: flex; align-items: center; gap: 6px; }
.conn i { width: 7px; height: 7px; border-radius: 50%; background: #777; display: inline-block; }
.conn.online i { background: var(--green); }
.conn.offline i { background: var(--red); }

.main { flex: 1; min-width: 0; overflow-y: auto; overflow-x: hidden; position: relative; }

/* ------------------------------------------------------------- buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer;
  background: var(--gray); color: var(--text);
  font-weight: 800; font-size: 15px;
  padding: 10px 16px;
  border-radius: 6px;
  box-shadow: 0 3px 0 0 var(--gray-sh), inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: background .12s, transform .06s, box-shadow .06s;
  user-select: none; white-space: nowrap;
}
.btn:hover { background: var(--gray-hi); }
.btn:active { transform: translateY(1px); box-shadow: 0 2px 0 0 var(--gray-sh); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn .ico { width: 20px; height: 20px; }
.btn-primary { background: var(--green); box-shadow: 0 3px 0 0 var(--green-sh), inset 0 1px 0 rgba(255, 255, 255, .14); text-shadow: 0 1px 0 #0003; }
.btn-primary:hover { background: var(--green-hi); }
.btn-primary:active { box-shadow: 0 2px 0 0 var(--green-sh); }
.btn-danger { background: #b3362a; box-shadow: 0 3px 0 0 #6e1d16; }
.btn-danger:hover { background: #c94233; }
.btn-xl { font-size: 22px; letter-spacing: .02em; padding: 17px 20px; border-radius: 8px; box-shadow: 0 4px 0 0 var(--green-sh), inset 0 1px 0 rgba(255, 255, 255, .14); width: 100%; }
.btn-lg { font-size: 18px; padding: 14px 18px; width: 100%; }
.btn-sm { font-size: 13px; padding: 6px 10px; box-shadow: 0 3px 0 0 var(--gray-sh); }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--hover); color: var(--text); }
.btn-ghost:active { box-shadow: none; }
.icon-btn {
  background: transparent; border: 0; cursor: pointer; color: var(--text-3);
  width: 34px; height: 34px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn .ico { width: 22px; height: 22px; }
.icon-btn.on { color: var(--green); }

/* big menu buttons (home / play panel) */
.menu-btn {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left;
  background: var(--gray); border: 0; cursor: pointer;
  padding: 14px 16px; border-radius: 8px;
  box-shadow: 0 3px 0 0 var(--gray-sh), inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: background .12s, transform .06s;
}
.menu-btn:hover { background: var(--gray-hi); }
.menu-btn:active { transform: translateY(1px); box-shadow: 0 2px 0 0 var(--gray-sh); }
.menu-btn.primary { background: var(--green); box-shadow: 0 3px 0 0 var(--green-sh), inset 0 1px 0 rgba(255, 255, 255, .14); }
.menu-btn.primary:hover { background: var(--green-hi); }
.menu-btn .mb-ico { width: 46px; height: 46px; flex: none; display: flex; align-items: center; justify-content: center; }
.menu-btn .mb-ico svg { width: 100%; height: 100%; }
.menu-btn .mb-ico .ico { width: 40px; height: 40px; }
.menu-btn .mb-title { font-size: 21px; font-weight: 800; color: #fff; text-shadow: 0 1px 0 #0003; }
.menu-btn .mb-sub { font-size: 13.5px; color: #ffffffcc; margin-top: 2px; font-weight: 600; }
.menu-btn:not(.primary) .mb-sub { color: var(--text-2); }

/* ---------------------------------------------------------------- forms --- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.input, select.input {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 6px; padding: 10px 12px; font: inherit; outline: none;
}
.input:focus { border-color: var(--green); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text-2); cursor: pointer; padding: 6px 0; }
.check input { margin-top: 3px; accent-color: var(--green); width: 16px; height: 16px; }
.check b { color: var(--text); display: block; }
.seg { display: flex; background: var(--panel-2); border-radius: 8px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; color: var(--text-2); padding: 8px; border-radius: 6px; cursor: pointer; font-weight: 700; }
.seg button.on { background: var(--gray-hi); color: #fff; }
.tc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tc-cat { font-size: 13px; font-weight: 800; color: var(--text-2); display: flex; align-items: center; gap: 6px; margin: 12px 0 6px; }
.tc-cat .ico { width: 18px; height: 18px; }
.tc-btn { background: var(--gray); border: 2px solid transparent; color: #fff; font-weight: 700; padding: 10px 4px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.tc-btn:hover { background: var(--gray-hi); }
.tc-btn.on { border-color: var(--green); background: #33463a; }
.tc-select { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; background: var(--gray); border: 0; border-radius: 6px; padding: 13px; color: #fff; font-size: 18px; font-weight: 700; cursor: pointer; box-shadow: 0 3px 0 0 var(--gray-sh); }
.tc-select:hover { background: var(--gray-hi); }

/* ---------------------------------------------------------------- modal --- */
#modal-root { position: fixed; inset: 0; pointer-events: none; z-index: 100; }
.modal-overlay { position: fixed; inset: 0; background: #0009; display: flex; align-items: center; justify-content: center; pointer-events: auto; opacity: 0; transition: opacity .18s; padding: 16px; }
.modal-overlay.show { opacity: 1; }
.modal { background: var(--panel); border-radius: 10px; width: 420px; max-width: 100%; max-height: 92vh; overflow: auto; box-shadow: 0 20px 60px #000a; transform: translateY(10px) scale(.98); transition: transform .18s; }
.modal-overlay.show .modal { transform: none; }
.modal-head { display: flex; align-items: center; padding: 16px 18px 6px; }
.modal-head h2 { flex: 1; font-size: 20px; font-weight: 800; }
.modal-body { padding: 8px 18px 16px; }
.modal-actions { display: flex; gap: 10px; padding: 0 18px 18px; }
.modal-actions .btn { flex: 1; }
.modal.wide { width: 640px; }

.gameover { width: 380px; overflow: hidden; }
.gameover .go-head { padding: 22px 18px 18px; text-align: center; position: relative; }
.gameover .go-head.win { background: linear-gradient(180deg, #4f8a53, #356339); }
.gameover .go-head.loss { background: linear-gradient(180deg, #6b3a35, #452422); }
.gameover .go-head.draw { background: linear-gradient(180deg, #57534d, #3b3934); }
.gameover .go-head h2 { font-size: 30px; font-weight: 900; display: flex; align-items: center; justify-content: center; gap: 10px; }
.gameover .go-head h2 .ico { width: 34px; height: 34px; color: var(--gold); }
.gameover .go-head p { margin: 4px 0 0; color: #ffffffcc; font-weight: 600; }
.go-players { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 18px 10px 6px; }
.go-player { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; max-width: 130px; text-align: center; }
.go-player .avatar.winner { box-shadow: 0 0 0 3px var(--green); }
.go-vs { color: var(--text-3); font-weight: 900; }
.go-rating { text-align: center; color: var(--text-2); font-size: 14px; padding: 4px 0 6px; }
.go-rating b.up { color: var(--green); }
.go-rating b.down { color: var(--red-soft); }
.go-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 18px 20px; }
.go-actions .btn:first-child { grid-column: span 2; }

/* --------------------------------------------------------------- toasts --- */
#toast-root { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #1d1f21; border: 1px solid var(--line); border-left: 4px solid var(--green); padding: 10px 16px; border-radius: 8px; font-weight: 600; font-size: 14px; box-shadow: 0 8px 24px #0008; opacity: 0; transform: translateY(-8px); transition: all .25s; max-width: 90vw; }
.toast.show { opacity: 1; transform: none; }
.toast.error { border-left-color: var(--red-soft); }
.toast.warn { border-left-color: var(--gold); }

/* --------------------------------------------------------------- avatar --- */
.avatar { border-radius: 4px; display: flex; align-items: center; justify-content: center; font-weight: 900; color: #fff; flex: none; overflow: hidden; text-shadow: 0 1px 2px #0005; }
.avatar svg { width: 100%; height: 100%; }
.avatar.empty { background: #4b4845; color: var(--text-3); }
.avatar.empty svg { width: 70%; height: 70%; }

/* ----------------------------------------------------------------- home --- */
.page { max-width: 1160px; margin: 0 auto; padding: 32px 28px 60px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; min-height: calc(100vh - 140px); }
.hero-board { display: flex; justify-content: center; align-items: center; height: min(78vh, 720px); }
.hero h1 { font-size: 46px; font-weight: 900; line-height: 1.08; letter-spacing: -1px; margin-bottom: 12px; }
.hero .jp { font-size: 18px; color: var(--text-3); font-weight: 700; margin-bottom: 18px; letter-spacing: 1px; }
.hero .lead { font-size: 17px; margin-bottom: 26px; max-width: 520px; }
.hero-actions { display: flex; flex-direction: column; gap: 14px; max-width: 440px; }
.hero-stats { display: flex; gap: 22px; margin-top: 24px; color: var(--text-3); font-weight: 700; font-size: 14px; }
.hero-stats b { color: var(--text); font-size: 18px; margin-right: 4px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.feature { background: var(--panel); border-radius: 10px; padding: 20px; }
.feature .f-ico { width: 54px; height: 54px; margin-bottom: 10px; }
.feature .f-ico svg { width: 100%; height: 100%; }
.feature h3 { font-size: 18px; margin-bottom: 6px; }
.feature p { font-size: 14px; margin: 0; }
.section-h { font-size: 26px; font-weight: 900; margin: 48px 0 6px; }

/* ----------------------------------------------------------------- play --- */
.lobby-list .lobby-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #ffffff0a; cursor: pointer; }
.lobby-item:hover { background: var(--panel-3); }
.lobby-item .li-name { flex: 1; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lobby-item .li-tc { color: var(--text-2); font-weight: 700; font-size: 14px; }
.seeking { text-align: center; padding: 26px 16px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.seeking h3 { font-size: 19px; }
.bot-list { display: flex; flex-direction: column; gap: 8px; }
.bot-card { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 8px; background: var(--panel-3); cursor: pointer; border: 2px solid transparent; }
.bot-card:hover { background: var(--hover); }
.bot-card.on { border-color: var(--green); background: #2f3d33; }
.bot-card .bc-name { font-weight: 800; }
.bot-card .bc-blurb { font-size: 13px; color: var(--text-3); }
.bot-card .bc-rating { margin-left: auto; font-weight: 800; color: var(--text-2); }
.bot-hero { display: flex; gap: 14px; align-items: center; background: var(--panel-2); padding: 14px; border-radius: 10px; margin-bottom: 12px; }
.speech { background: #fff; color: #222; border-radius: 10px; padding: 10px 12px; font-size: 14px; font-weight: 600; position: relative; flex: 1; }
.speech::before { content: ''; position: absolute; left: -8px; top: 18px; border: 8px solid transparent; border-left: 0; border-right-color: #fff; }

/* -------------------------------------------------------------- settings --- */
.theme-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.theme-swatch { border-radius: 6px; overflow: hidden; cursor: pointer; border: 2px solid transparent; aspect-ratio: 1; display: grid; grid-template-columns: 1fr 1fr; }
.theme-swatch.on { border-color: var(--green); }
.theme-swatch i { display: block; }
.theme-name { font-size: 11px; text-align: center; color: var(--text-3); margin-top: 3px; font-weight: 700; }

/* ------------------------------------------------------------ responsive --- */
@media (max-width: 1100px) {
  .side-panel { width: 340px; }
  .hero { grid-template-columns: 1fr; gap: 24px; min-height: 0; }
  .hero-board { height: 56vh; }
  .features, .learn-links { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  body { overflow: auto; }
  .app { flex-direction: column; height: auto; min-height: 100vh; }
  body.has-maint { display: block; height: auto; }
  .maint-bar { font-size: 13px; }
  .sidebar { width: 100%; flex-direction: row; align-items: center; padding: 0 6px; position: sticky; top: 0; overflow-x: auto; }
  .logo { padding: 8px; }
  .logo-text { display: none; }
  .nav { flex-direction: row; }
  .nav a { padding: 12px 10px; border-left: 0; border-bottom: 3px solid transparent; }
  .nav a span.lbl { display: none; }
  .nav a.active { border-bottom-color: var(--green); }
  .side-bottom { margin: 0 0 0 auto; flex-direction: row; padding: 0; align-items: center; }
  .me-chip .nm, .me-chip .rt, .conn { display: none; }
  .main { overflow: visible; }
  .game-layout { flex-direction: column; height: auto; padding: 10px 8px 24px; gap: 12px; }
  .board-col { width: 100%; }
  .board-stack { height: auto; }
  .board-area { height: auto; min-height: 0; flex: none; }
  .player-bar .thinking, .player-bar .ready-check { display: none; }
  .side-panel { width: 100%; max-height: none; min-height: 320px; }
  .page { padding: 20px 14px 50px; }
  .hero h1 { font-size: 34px; }
  .clock { font-size: 20px; min-width: 92px; }
  .sim { grid-template-columns: 1fr; }
}


/* ------------------------------------------------------- caravaneer additions --- */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.nav-badge { margin-left: auto; background: var(--red-soft); color: #fff; font-size: 11px; font-weight: 800; border-radius: 9px; padding: 1px 6px; }
.vip-tag { display: inline-flex; align-items: center; gap: 3px; color: var(--gold); font-size: 11px; font-weight: 800; margin-left: 6px; }
.vip-tag .ico { width: 14px; height: 14px; }
.btn-gold { background: var(--gold); color: #2c1f02; box-shadow: 0 3px 0 0 var(--gold-sh), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-gold:hover { background: #f6d470; }
.modal-x { margin-left: auto; }
.page.narrow { max-width: 820px; }
.page-title { font-size: 36px; font-weight: 900; margin-bottom: 6px; letter-spacing: -.5px; }
.page-lead { font-size: 16.5px; color: var(--text-2); margin-bottom: 22px; max-width: 680px; }
.card { background: var(--panel); border-radius: 8px; padding: 20px; }
.hero-art { display: flex; justify-content: center; align-items: center; min-height: 380px; }
.hero .kicker { font-size: 13px; color: var(--green); font-weight: 800; margin-bottom: 14px; letter-spacing: 2px; text-transform: uppercase; }
.feature .f-ico { color: var(--gold); }
.feature .f-ico .ico { width: 100%; height: 100%; }
.play-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; padding: 14px 20px; min-height: 100%; align-items: start; }
.play-preview { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.bot-card .bc-name { font-weight: 800; font-size: 16px; }
.bot-card .bc-blurb { font-size: 13px; color: var(--text-2); }
.bot-card .bc-rating { margin-left: auto; font-family: var(--font-mono); color: var(--text-3); font-weight: 700; }
.mode-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode-card { background: var(--panel-3); border: 2px solid transparent; border-radius: 8px; padding: 12px; cursor: pointer; text-align: left; color: inherit; font: inherit; }
.mode-card:hover { background: var(--hover); }
.mode-card.on { border-color: var(--green); background: #2f3d31; }
.mode-card b { display: block; font-size: 16px; margin-bottom: 2px; }
.mode-card > span { font-size: 12.5px; color: var(--text-2); line-height: 1.4; display: block; }
.variant-list { display: flex; flex-direction: column; gap: 6px; }
.variant-item { display: flex; gap: 10px; align-items: flex-start; background: var(--panel-2); border: 2px solid transparent; border-radius: 8px; padding: 10px 12px; cursor: pointer; text-align: left; width: 100%; color: inherit; font: inherit; }
.variant-item:hover { background: var(--panel-3); }
.variant-item.on { border-color: var(--green); }
.variant-item b { display: block; font-size: 15px; }
.variant-item > div > span { font-size: 12.5px; color: var(--text-2); line-height: 1.4; }
.badge-casual { display: inline-block; font-family: var(--font); font-size: 10.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: #3a2c00; background: var(--gold); border-radius: 4px; padding: 1px 6px; vertical-align: middle; }
.badge-rated { display: inline-block; font-family: var(--font); font-size: 10.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: #fff; background: var(--green); border-radius: 4px; padding: 1px 6px; vertical-align: middle; }
.theme-swatch { position: relative; display: block; }
.theme-swatch i { position: absolute; inset: 24%; border-radius: 3px; background: #fbf8f1; box-shadow: 0 2px 4px #0006; }
.back-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.back-swatch { cursor: pointer; border-radius: 6px; padding: 3px; border: 2px solid transparent; }
.back-swatch.on { border-color: var(--green); }
.back-swatch svg { width: 100%; height: auto; display: block; }
.go-routes { display: flex; justify-content: center; gap: 8px; padding: 4px 18px 0; }
.go-routes .gr { background: var(--panel-2); border-radius: 6px; padding: 6px 10px; font-size: 13px; font-weight: 700; color: var(--text-2); text-align: center; }
.go-routes .gr b { display: block; font-family: var(--font-mono); font-size: 15px; color: var(--text); }
.go-routes .gr.me { box-shadow: inset 0 -3px 0 var(--green); }
.go-routes .gr.opp { box-shadow: inset 0 -3px 0 var(--red-soft); }
@media (max-width: 1100px) {
  .hero-art { min-height: 0; }
  .play-layout { grid-template-columns: 1fr; }
  .play-preview { display: none; }
}
@media (max-width: 860px) {
  .side-bottom .btn { display: none; }
  .play-layout { padding: 10px 8px; }
}

@media (prefers-reduced-motion: reduce) { .maint-dot { animation: none; } }

/* Play page: matchmaking paused after leaving games unfinished */
.pause-note { display: flex; gap: 10px; align-items: flex-start; background: rgba(231, 181, 75, .12); border: 1px solid rgba(231, 181, 75, .45); border-radius: 8px; padding: 10px 12px; }
.pause-note .ico { width: 22px; height: 22px; flex: none; color: var(--gold); margin-top: 1px; }
.pause-note b { display: block; font-variant-numeric: tabular-nums; }
.pause-note p { margin: 4px 0 0; font-size: 13px; color: var(--text-2); }
.leave-note { font-size: 13px; margin: 0; }
