/* Hexlands — sea-teal and parchment harbour office */

:root {
  --bg: #0e1e2c;
  --panel: rgba(16, 32, 46, .94);
  --panel-solid: #132838;
  --panel-2: #0d1d2a;
  --line: rgba(150, 200, 210, .18);
  --ink: #eef3f4;
  --muted: #93a8b3;
  --gold: #e6c45a;
  --gold-2: #ffe08a;
  --teal: #2fb8a4;
  --red: #e2483d;
  --parch: #f3e7c9;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  background: var(--bg); color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.ri { display: inline-block; vertical-align: middle; flex: 0 0 auto; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: #4fd18a; flex: 0 0 auto; box-shadow: 0 0 0 1.5px rgba(0,0,0,.4); }
.icon-btn { background: rgba(255,255,255,.08); color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; min-width: 38px; height: 36px; cursor: pointer; font-size: 16px; font-weight: 800; }
.icon-btn:hover { background: rgba(255,255,255,.16); }
button:disabled { opacity: .45; cursor: default; }
/* web/style.css pins .volume-slider position:fixed top:12px — undo it here
   in case any shared strip carries it (CLAUDE.md contract item 5). */
.volume-slider { position: static !important; top: auto !important; }

/* ── the game grid ─────────────────────────────────────────────────── */
#app {
  position: fixed; inset: 0; display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "top top" "stage side" "dock dock";
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
#topBar { grid-area: top; display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: linear-gradient(180deg, #0f2333, #0c1b28); border-bottom: 1px solid var(--line); z-index: 2; }
.tb-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.prompt { font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: #dbe7ea; letter-spacing: .01em; }
.prompt.mine { color: var(--gold-2); }
.tb-sub { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.clock-txt { font-variant-numeric: tabular-nums; font-weight: 700; color: #cfe; margin-left: auto; }
.tb-clock { height: 4px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; }
#clockFill { height: 100%; width: 100%; background: linear-gradient(90deg, #1f8f80, #4fd1b8); transition: width .25s linear; }
#clockFill.low { background: linear-gradient(90deg, #a2261d, #ff5a4a); }
.spec-chip { background: rgba(60,110,170,.85); border-radius: 999px; padding: 4px 12px; font-size: 12px; white-space: nowrap; }

#pstrip { display: none; }
#stage { grid-area: stage; position: relative; min-height: 0; overflow: hidden; background: #0f3f63; }
#board { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* ── side column ── */
#side { grid-area: side; display: flex; flex-direction: column; min-height: 0; gap: 0;
  background: var(--panel-2); border-left: 1px solid var(--line); padding: 8px; overflow: hidden; }
.side-head { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
  font-weight: 800; margin: 10px 2px 4px; }
.players-panel { display: flex; flex-direction: column; gap: 5px; }
.pl-row { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px;
  font-size: 13px; position: relative; overflow: hidden; }
.pl-row.cur { box-shadow: 0 0 0 2px var(--gold), 0 4px 14px rgba(0,0,0,.35); }
.pl-row.me { background: linear-gradient(180deg, rgba(47,184,164,.16), rgba(16,32,46,.94)); }
.pl-row.away { opacity: .75; }
.pl-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.pl-sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; flex: 0 0 auto;
  box-shadow: 0 0 0 1.5px rgba(0,0,0,.6), inset 0 -3px 0 rgba(0,0,0,.25); }
.pl-name { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pl-tag { font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 4px; white-space: nowrap; }
.pl-vp { margin-left: auto; font-weight: 900; font-size: 18px; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.pl-vp small { font-size: 11px; color: var(--muted); font-weight: 700; }
.pl-stats { display: flex; flex-wrap: wrap; gap: 4px 10px; color: #b8c8cf; font-size: 12px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.pl-badge { background: rgba(230,196,90,.18); color: var(--gold-2); border-radius: 6px; padding: 0 5px; font-weight: 700; }
.pl-timer { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; display: none; }
.pl-row.cur .pl-timer { display: block; }
.pl-timer i { display: block; height: 100%; width: 100%; background: var(--gold); transition: width .25s linear; }
.pl-row.bump { animation: bump .35s ease; }

.offers-panel { display: flex; flex-direction: column; gap: 6px; max-height: 38%; overflow-y: auto; flex: 0 0 auto; }
.offer { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 7px 8px; font-size: 13px; position: relative; }
.offer.mine { border-color: rgba(230,196,90,.55); }
.offer.tome { border-color: rgba(47,184,164,.8); box-shadow: 0 0 0 1px rgba(47,184,164,.35); }
.of-head { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; line-height: 1.5; }
.of-head .arrow { color: var(--muted); font-size: 12px; margin: 0 2px; }
.of-body { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.of-rsp { display: flex; align-items: center; gap: 6px; }
.of-btns { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; align-items: center; }
.of-ttl { height: 2px; background: rgba(255,255,255,.08); margin-top: 6px; border-radius: 2px; overflow: hidden; }
.of-ttl i { display: block; height: 100%; background: var(--teal); transition: width 1s linear; }
.rsp { font-size: 12px; font-weight: 700; }
.rsp.no { color: #ff8d80; } .rsp.ok { color: #7fe3b4; } .rsp.co { color: var(--gold-2); } .rsp.wait { color: var(--muted); }
.bun { display: inline-flex; align-items: center; gap: 1px; margin-right: 2px; }
.bun b { font-size: 12px; }
button.mini { border-radius: 8px; padding: 5px 10px; font-size: 13px; font-weight: 800; cursor: pointer;
  background: #21394b; border: 1px solid #36566d; }
button.mini.primary { width: auto; background: linear-gradient(180deg, #4fd1b8, #1f8f80); color: #062520; border-color: #7fe9d5; padding: 5px 10px; font-size: 13px; }

.log-panel { flex: 1; min-height: 60px; overflow-y: auto; font-size: 12.5px; color: #c7d4d9;
  background: rgba(0,0,0,.18); border-radius: 8px; padding: 6px 8px; line-height: 1.55; }
.lg { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.lg.bad { color: #ffb0a6; } .lg.gold { color: var(--gold-2); } .lg.trade { color: #8fe9d3; }
.lg.turn { color: var(--muted); font-size: 11px; justify-content: center; margin: 3px 0; }
.lg.muted { color: var(--muted); }
.lg-who { font-weight: 800; color: #fff; text-shadow: 0 0 6px var(--pc); border-bottom: 2px solid var(--pc); }
.game-audio { margin-top: 8px; }
.game-audio .mps-audio, .menu-audio .mps-audio, .lobby-audio .mps-audio { width: 100%; justify-content: center; }

/* ── the dock ── */
#dock { grid-area: dock; display: flex; align-items: stretch; gap: 10px; padding: 8px 10px;
  background: linear-gradient(0deg, #0b1924, #0f2333); border-top: 1px solid var(--line); z-index: 2; }
#dock.spectating { display: none; }
.hand { display: flex; gap: 6px; align-items: stretch; }
.card-res { width: 62px; border-radius: 9px; padding: 4px 4px 3px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; position: relative;
  background: linear-gradient(180deg, var(--parch), #e3d1a5); color: #2a2216;
  border: 2px solid var(--rc); box-shadow: 0 3px 0 rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.4); }
.card-res b { position: absolute; top: 2px; right: 5px; font-size: 16px; font-weight: 900; }
.card-res .cr-name { font-size: 10px; font-weight: 700; letter-spacing: .04em; color: #5a4a30; }
.card-res.zero { opacity: .45; filter: grayscale(.6); }
.card-res.bump, .pl-row.bump { animation: bump .35s ease; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.14); } 100% { transform: scale(1); } }
.hand-total { display: flex; flex-direction: column; justify-content: center; align-items: center;
  min-width: 34px; font-weight: 900; font-size: 18px; color: var(--gold-2); }
.hand-total small { font-size: 10px; color: var(--muted); }
.cost-card { display: grid; grid-template-columns: repeat(4, minmax(78px, 1fr)); gap: 6px; flex: 1; max-width: 430px; }
.build-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: #19334a; border: 1px solid #2c4d66; border-radius: 10px; cursor: pointer; padding: 4px 4px; min-height: 52px; }
.build-btn:not(:disabled):hover { background: #224460; }
.build-btn.afford { border-color: rgba(47,184,164,.7); }
.build-btn.on { background: linear-gradient(180deg, #4fd1b8, #1f8f80); color: #062520; border-color: #a3f2e3; }
.build-btn:disabled { opacity: .55; }
.bb-name { font-size: 13px; font-weight: 800; }
.bb-cost { display: flex; align-items: center; gap: 1px; }
.actions { display: flex; gap: 6px; align-items: stretch; margin-left: auto; }
.act-btn { border-radius: 10px; padding: 6px 12px; cursor: pointer; font-weight: 800; font-size: 14px;
  background: #19334a; border: 1px solid #2c4d66; min-height: 52px; white-space: nowrap; }
.act-btn:not(:disabled):hover { background: #224460; }
.act-btn.big { background: linear-gradient(180deg, #f2d06e, #c79a26); color: #261b03; border-color: #ffe7a0; font-size: 16px; min-width: 120px; }
.act-btn.glow { box-shadow: 0 0 0 2px var(--gold), 0 0 14px rgba(230,196,90,.55); }

/* ── on the board ── */
.pick-bar { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 3;
  display: flex; gap: 8px; align-items: center; background: var(--panel); border: 1px solid var(--gold);
  border-radius: 14px; padding: 8px 10px; box-shadow: 0 8px 26px rgba(0,0,0,.45); }
.pick-bar button.primary, .pick-bar button.secondary { width: auto; padding: 8px 14px; font-size: 15px; margin: 0; }
.offer-float { display: none; }
.banner { position: absolute; top: 18%; left: 50%; transform: translate(-50%, -10px) scale(.96); z-index: 4;
  background: rgba(10, 24, 34, .9); border: 2px solid var(--teal); border-radius: 14px; padding: 10px 20px;
  font-size: 20px; font-weight: 900; opacity: 0; pointer-events: none; transition: all .25s ease; white-space: nowrap; }
.banner.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.banner.red { border-color: var(--red); color: #ffb3a8; }
.banner.gold { border-color: var(--gold); color: var(--gold-2); }
.toast { position: absolute; left: 50%; bottom: 70px; transform: translateX(-50%); z-index: 4; opacity: 0;
  background: rgba(10,24,34,.92); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px;
  font-size: 14px; pointer-events: none; transition: opacity .25s; max-width: 90%; text-align: center; }
.toast.show { opacity: 1; }
#flyLayer { position: fixed; inset: 0; pointer-events: none; z-index: 30; }
.fly { position: fixed; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  background: var(--parch); border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.45);
  transition: transform .75s cubic-bezier(.45,-0.2,.4,1), opacity .75s; opacity: 1; }

/* ── sheets ── */
.sheet-back { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 20; }
.sheet { position: fixed; z-index: 21; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 20px)); max-height: min(86vh, 760px); display: flex; flex-direction: column;
  background: var(--panel-solid); border: 1px solid rgba(47,184,164,.45); border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0,0,0,.6); }
#discardSheet, #stealSheet { border-color: var(--red); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 6px; }
.sheet-head h3 { margin: 0; font-size: 17px; color: var(--gold-2); }
.sheet-body { padding: 4px 14px 14px; overflow-y: auto; }
.tr-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tr-tab { flex: 1; padding: 8px; border-radius: 10px; background: #19334a; border: 1px solid #2c4d66; cursor: pointer; font-weight: 800; }
.tr-tab.on { background: linear-gradient(180deg, #4fd1b8, #1f8f80); color: #062520; }
.tr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tr-lbl { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 800; margin: 8px 0 5px; }
.steppers { display: flex; flex-direction: column; gap: 5px; }
.steppers.wide { flex-direction: row; flex-wrap: wrap; justify-content: center; }
.steppers.wide .stepper { width: 150px; }
.stepper { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.04);
  border: 1px solid var(--line); border-left: 4px solid var(--rc); border-radius: 9px; padding: 3px; }
.stepper button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid #36566d; background: #21394b;
  font-size: 18px; font-weight: 900; cursor: pointer; }
.st-v { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 16px; }
.tr-to { display: flex; flex-wrap: wrap; gap: 6px; }
.to-pill { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; cursor: pointer;
  background: #19334a; border: 1px solid #2c4d66; font-weight: 700; }
.to-pill.on { border-color: var(--teal); background: rgba(47,184,164,.22); }
.to-pill small { color: var(--muted); }
.tr-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.tr-foot button.primary { width: auto; flex: 0 0 auto; padding: 10px 18px; }
.bank-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.bk-res { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 10px;
  background: #19334a; border: 2px solid #2c4d66; cursor: pointer; position: relative; }
.bk-res.on { border-color: var(--rc); background: rgba(255,255,255,.12); box-shadow: 0 0 0 2px var(--rc); }
.bk-rate { font-weight: 900; color: var(--gold-2); font-size: 14px; }
.bk-res small { font-size: 10px; color: var(--muted); }
.steal-list { display: flex; flex-direction: column; gap: 8px; }
.steal-btn { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; cursor: pointer;
  background: #19334a; border: 1px solid #2c4d66; font-size: 16px; }
.steal-name { font-weight: 800; flex: 1; text-align: left; }
.buy-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.buy-row button.primary { width: auto; padding: 9px 16px; }
.charter { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); margin-bottom: 6px; }
.ch-ic { font-size: 26px; }
.ch-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ch-txt small { color: var(--muted); }
.menu-body { display: flex; flex-direction: column; gap: 4px; }
.menu-body button.secondary, .menu-body button.danger { margin-bottom: 4px; }
button.danger { width: 100%; border-radius: 12px; padding: 12px; font-weight: 800; cursor: pointer;
  background: #4a1d1d; border: 1px solid #7a3030; color: #ffc9c2; }
.menu-audio { margin: 6px 0; }
.phone-only { display: none; }

/* ── help overlay ── */
.help-overlay { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.55); display: flex;
  align-items: center; justify-content: center; padding: 12px; }
.help-card { width: min(720px, 100%); max-height: 92vh; display: flex; flex-direction: column; background: var(--panel-solid);
  border: 1px solid rgba(230,196,90,.45); border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.6); }
.help-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 4px; }
.help-head h2 { margin: 0; color: var(--gold-2); font-size: 20px; }
.help-body { overflow-y: auto; padding: 4px 18px 18px; line-height: 1.5; font-size: 14.5px; color: #d5e0e4; -webkit-user-select: text; user-select: text; }
.help-body h3 { color: var(--gold); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin: 16px 0 4px; }
.help-lead { font-size: 15.5px; }
.help-res { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 4px 12px; }
.help-costs { border-collapse: collapse; width: 100%; }
.help-costs td { padding: 5px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.help-costs td:first-child { font-weight: 800; }
.hc-cost { display: inline-flex; align-items: center; margin-right: 2px; }
.help-cards div { margin-bottom: 4px; }
.help-body button.primary { margin: 6px 0; }

/* ── tutorial ── */
/* desktop: the coach sits over the side column (trades + log), never over
   the board it is pointing at; a phone docks it under the top bar and the
   board is laid out below it (hexlands_client.js relayout) */
.tut-coach { position: fixed; z-index: 15; right: 10px; bottom: 96px; width: 320px; max-height: calc(100vh - 330px); overflow-y: auto;
  background: rgba(14, 30, 42, .97); border: 2px solid var(--gold); border-radius: 14px;
  box-shadow: 0 12px 34px rgba(0,0,0,.5); padding: 8px 10px; }
.tc-head { display: flex; align-items: center; gap: 6px; }
.tc-badge { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; background: var(--gold); color: #261b03;
  border-radius: 6px; padding: 1px 6px; font-weight: 900; white-space: nowrap; }
.tc-title { font-weight: 800; font-size: 14px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-tools { display: flex; gap: 3px; }
.tc-tools button { background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 7px; width: 28px; height: 26px; cursor: pointer; }
.tc-say { margin: 8px 2px 6px; font-size: 14px; line-height: 1.45; color: #e3ecee; }
.tc-task { display: flex; gap: 8px; align-items: center; background: rgba(230,196,90,.14); border-radius: 9px;
  padding: 7px 9px; font-weight: 800; color: var(--gold-2); }
.tc-arrow { font-size: 16px; }
.tc-nudge { display: none; margin-top: 6px; color: #ffb0a6; font-size: 13px; font-weight: 700; }
.tc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 8px; }
.tc-dots { display: flex; gap: 4px; flex-wrap: wrap; }
.tc-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.16); }
.tc-dots i.on { background: var(--teal); } .tc-dots i.cur { background: var(--gold); }
.tc-next { width: auto !important; padding: 8px 16px !important; font-size: 15px !important; }
.tut-coach.collapsed .tc-say, .tut-coach.collapsed .tc-dots { display: none; }
.tut-glow { box-shadow: 0 0 0 3px var(--gold), 0 0 18px rgba(255,211,77,.8) !important; animation: tglow 1s ease-in-out infinite alternate; }
@keyframes tglow { from { filter: brightness(1); } to { filter: brightness(1.25); } }
.tut-done { position: fixed; inset: 0; z-index: 25; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; padding: 14px; }
.td-card { width: min(440px, 100%); background: var(--panel-solid); border: 2px solid var(--teal); border-radius: 16px; padding: 20px; text-align: center; }
.td-check { width: 54px; height: 54px; margin: 0 auto 6px; border-radius: 50%; background: var(--teal); color: #062520; font-size: 30px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.td-card h2 { margin: 6px 0; color: var(--gold-2); font-size: 19px; }
.td-card p { color: #d5e0e4; line-height: 1.45; }
.td-btns { display: flex; flex-direction: column; gap: 8px; }
.td-btns button.secondary { margin-bottom: 0; }

/* ── lobby overlay ─────────────────────────────────────────────────── */
#lobbyOverlay {
  position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse at 30% 15%, rgba(47,184,164,.18), transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgba(230,196,90,.12), transparent 50%),
    #0d1f2c;
  overflow-y: auto; padding: 16px;
}
#lobbyOverlay .card {
  width: min(470px, 100%); background: var(--panel-solid); border: 1px solid rgba(47,184,164,.4);
  border-radius: 18px; padding: 22px; box-shadow: 0 24px 70px rgba(0,0,0,.55); margin: auto; text-align: center;
}
#lobbyOverlay .card.wide { width: min(900px, 100%); }
.title { margin: 4px 0 6px; font-size: 42px; font-weight: 900; letter-spacing: .1em; color: #e9f1f2;
  font-family: Georgia, 'Times New Roman', serif; }
.title span { color: var(--gold); }
.title.small { font-size: 30px; }
.tagline { color: var(--muted); margin: 0 0 16px; line-height: 1.45; }
#nameInput, select { background: #0b1823; color: var(--ink); border: 1px solid #2c4d66; border-radius: 10px; padding: 9px 10px; font-size: 15px; }
#nameInput { width: 100%; margin-bottom: 12px; text-align: center; -webkit-user-select: text; user-select: text; }
select { padding: 6px 8px; font-size: 14px; }
.solo-box { background: rgba(47,184,164,.08); border: 1px solid rgba(47,184,164,.3); border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.solo-box.compact { margin-top: 14px; padding: 10px; }
.solo-box .row { display: flex; gap: 10px; justify-content: center; margin-bottom: 10px; flex-wrap: wrap; }
.solo-box label, .settings-box label { display: flex; flex-direction: column; gap: 3px; font-size: 11px;
  color: var(--muted); letter-spacing: .06em; text-transform: uppercase; text-align: left; }
button.primary, button.secondary { width: 100%; border-radius: 12px; padding: 12px; font-size: 16px; font-weight: 800;
  cursor: pointer; letter-spacing: .03em; border: 1px solid transparent; }
button.primary { background: linear-gradient(180deg, #f2d06e, #c79a26); color: #261b03; border-color: #ffe7a0; }
button.primary:not(:disabled):hover { filter: brightness(1.08); }
button.secondary { background: #19334a; color: var(--ink); border-color: #2c4d66; margin-bottom: 8px; }
button.secondary:not(:disabled):hover { background: #224460; }
.link-btn { background: none; border: none; color: var(--gold-2); cursor: pointer; font-weight: 700; padding: 8px; font-size: 14px; }
.back-link { display: inline-block; margin-top: 12px; color: var(--muted); text-decoration: none; font-size: 13px; }
.back-link:hover { color: var(--ink); }
.lobby-audio { margin-bottom: 12px; display: flex; justify-content: center; }
.tut-offer { background: linear-gradient(180deg, rgba(230,196,90,.22), rgba(230,196,90,.08));
  border: 1px solid rgba(230,196,90,.5); border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.to-title { font-weight: 900; color: var(--gold-2); font-size: 16px; }
.to-text { color: #d5e0e4; font-size: 13px; margin: 4px 0 10px; line-height: 1.4; }
.tut-offer .link-btn { margin-top: 4px; color: var(--muted); font-weight: 600; font-size: 13px; }
button.secondary.tut-btn { border-color: rgba(230,196,90,.6); color: var(--gold-2); }
.lobby-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; text-align: left; }
.lobby-col h3 { margin: 4px 0 8px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.player-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.player-row { display: flex; align-items: center; gap: 8px; background: #0b1823; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; }
.player-row.me { border-color: rgba(47,184,164,.6); }
.player-name { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-row .tag { margin-left: auto; font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 4px; }
.settings-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; margin-bottom: 6px; }
#seatNote { margin: 4px 0 10px; }
#waitHost { text-align: center; }
.briefing { margin-top: 12px; background: #0b1823; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.briefing summary { cursor: pointer; font-weight: 700; color: var(--gold-2); }
.briefing ul { padding-left: 18px; margin: 8px 0 2px; color: #c9d6db; font-size: 13px; line-height: 1.45; }
.briefing li { margin-bottom: 5px; }
#lobbyChat { margin-top: 12px; }
.leaderboard { --lb-accent: var(--gold); }
.res-btns { display: flex; gap: 8px; margin-top: 14px; }
.res-btns button { margin-bottom: 0; }
#resultTable, #resultAwards { margin-top: 10px; }
#resultTable { overflow-x: auto; max-width: 100%; }
.lb-panel, .lb-card { --lb-bg: #0b1823; --lb-border: rgba(47,184,164,.3); --lb-accent: #e6c45a; --lb-text: #eef3f4; --lb-muted: #93a8b3; }

/* ── phone ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  /* minmax(0,…): a bare 1fr grows to a long nowrap prompt and pushes the
     menu button and the player strip off the right edge of a phone */
  #app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr auto;
    grid-template-areas: "top" "pstrip" "stage" "dock"; }
  #side { display: none; }
  #topBar { padding: 6px 8px; gap: 6px; }
  .prompt { font-size: 15px; }
  #pstrip { grid-area: pstrip; display: flex; gap: 4px; padding: 4px 6px; overflow-x: auto; background: #0c1b28;
    border-bottom: 1px solid var(--line); scrollbar-width: none; }
  #pstrip .pl-row { display: flex; align-items: center; gap: 4px; padding: 3px 6px; flex: 1 0 auto; font-size: 12px; min-width: 0; }
  #pstrip .pl-name { max-width: 70px; }
  #pstrip .pl-vp { font-size: 15px; margin-left: 2px; }
  #pstrip .pl-n { color: var(--muted); font-size: 11px; }
  #dock { flex-direction: column; gap: 5px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .hand { justify-content: space-between; }
  .card-res { flex: 1; width: auto; min-width: 0; padding: 2px; }
  .card-res .ri { width: 22px; height: 22px; }
  .card-res .cr-name { font-size: 9px; }
  .hand-total { min-width: 30px; font-size: 16px; }
  .cost-card { max-width: none; grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .build-btn { min-height: 46px; padding: 3px 2px; }
  .bb-name { font-size: 12px; }
  .bb-cost .ri { width: 14px; height: 14px; }
  .actions { margin-left: 0; gap: 4px; }
  .act-btn { flex: 1; min-height: 46px; padding: 4px 6px; font-size: 13px; }
  .act-btn.big { min-width: 0; font-size: 15px; }
  .offer-float { display: flex; flex-direction: column; gap: 6px; position: absolute; left: 6px; right: 6px; bottom: 6px;
    z-index: 3; max-height: 55%; overflow-y: auto; }
  .offer-float .offer { box-shadow: 0 6px 20px rgba(0,0,0,.5); }
  .pick-bar { bottom: auto; top: 8px; }
  .banner { font-size: 16px; padding: 8px 14px; }
  .toast { bottom: 12px; }
  .sheet { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: 100%; max-height: 80vh;
    border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .tr-cols { gap: 8px; }
  .stepper button { width: 32px; height: 32px; }
  .phone-only { display: block; }
  .lobby-cols { grid-template-columns: 1fr; }
  .title { font-size: 34px; }
  .tut-coach { left: 0; right: 0; width: auto; top: 96px; bottom: auto; max-height: 46vh; padding: 6px 8px;
    border-radius: 0 0 12px 12px; border-width: 0 0 2px 0; }
  .tc-say { font-size: 13px; margin: 5px 2px 4px; }
}

/* how many of a resource you hold, beside the stepper count (discard, give) */
.st-have { font-size: 11px; opacity: .65; margin-left: 1px; font-weight: 600; }
