/* Game Night: true-black, Apple-Games-like home; orange active state; floating pill tabs. */
:root {
  color-scheme: dark;
  --accent: #ff9f0a;
  --accent-ink: #1a0f00;
  --bg: #000;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --surface-3: #3a3a3c;
  --ink: #f5f5f7;
  --ink-2: #98989f;
  --line: rgb(255 255 255 / 10%);
  --good: #30d158;
  --bad: #ff453a;
  --warn: #ffd60a;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: none;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1100px;
}

body { background: #000; color: var(--ink); }
.app-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(12px + var(--safe-top)) calc(18px + var(--safe-right)) calc(120px + var(--safe-bottom)) calc(18px + var(--safe-left));
}
body.playing .app-main { padding-bottom: calc(24px + var(--safe-bottom)); }
h1, h2, h3 { letter-spacing: -0.02em; }
section { margin-top: 30px; }
button { font: inherit; color: inherit; }
.muted { color: var(--ink-2); }
.center { text-align: center; }
.eyebrow { margin: 0; font-size: .8rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-2); }
.footnote { margin: 36px 0 0; text-align: center; font-size: .8rem; color: var(--ink-2); }

/* ---------- Large title ---------- */
.large-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 14px 0 18px; }
.large-title h1 { margin: 0; font-size: 2.15rem; font-weight: 800; letter-spacing: -0.03em; }
.me {
  width: 40px; height: 40px; flex: none; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #ff9f0a, #ff375f); font-size: 1.2rem; display: grid; place-items: center;
}
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 1.35rem; font-weight: 750; }
.link { border: 0; background: none; color: var(--accent); font-weight: 600; cursor: pointer; min-height: var(--tap); padding: 0 4px; }
.link.danger { color: var(--bad); }
.back {
  border: 0; background: none; color: var(--accent); font-size: 1.05rem; font-weight: 500; cursor: pointer;
  min-height: var(--tap); padding: 0 6px 0 0; margin: 6px 0;
}

/* ---------- Buttons ---------- */
.pill-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--tap); padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 1rem; white-space: nowrap;
}
.pill-btn.small { min-height: 34px; padding: 0 16px; font-size: .9rem; }
.pill-btn.light { background: #fff; color: #000; }
.pill-btn.ghost { background: var(--surface-2); color: var(--ink); }
.pill-btn.ghost.danger { color: var(--bad); }
.pill-btn.danger-fill { background: var(--bad); color: #fff; }
.pill-btn.wide { width: 100%; min-height: 50px; }
.pill-btn:disabled { opacity: .4; cursor: default; }
.pill-btn:not(:disabled):active { transform: scale(.97); }

/* ---------- Hero "What to Play Together" ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 28px; padding: 26px 24px 22px; min-height: 270px;
  background: radial-gradient(120% 90% at 100% 0%, var(--b), transparent 60%), linear-gradient(160deg, var(--a), #000 130%);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.hero .kicker { margin: 0 0 4px; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.hero h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 850; margin: 0 0 6px; max-width: 16ch; }
.hero p { max-width: 42ch; margin: 0 0 16px; opacity: .92; }
.hero-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-meta { font-size: .85rem; opacity: .85; }
.hero-art { position: absolute; top: 18px; right: 14px; display: flex; pointer-events: none; }
.hero-art .glyph { width: 112px; height: 112px; opacity: .9; filter: drop-shadow(0 10px 24px rgb(0 0 0 / 35%)); }
.hero-art .glyph:first-child { transform: rotate(-14deg) translateX(18px); }
.hero-art .glyph:last-child { transform: rotate(12deg) translateY(36px); opacity: .55; }
@media (max-width: 520px) { .hero-art .glyph { width: 84px; height: 84px; } }

/* ---------- Carousels with peeking edges ---------- */
.carousel {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 330px); gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 calc(-18px - var(--safe-right)) 0 calc(-18px - var(--safe-left));
  padding: 2px calc(18px + var(--safe-right)) 6px calc(18px + var(--safe-left));
  scroll-padding: 0 18px;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { scroll-snap-align: start; }
.app-icon { width: 60px; height: 60px; flex: none; border-radius: 15px; }

.continue-card, .top-card, .friend-card {
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  background: var(--surface); border: 0; border-radius: var(--radius); padding: 14px;
}
.continue-card span:nth-child(2), .top-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.continue-card small, .top-copy small { color: var(--ink-2); font-size: .82rem; }
.top-played { grid-auto-columns: min(84%, 360px); }
.top-card .rank { font-size: 1.3rem; font-weight: 800; color: var(--ink-2); width: 1.2em; text-align: center; }
.friend-card { flex-direction: column; justify-content: center; text-align: center; gap: 6px; padding: 18px 12px; }
.carousel:has(.friend-card) { grid-auto-columns: 150px; }
.friend-card small { color: var(--ink-2); font-size: .78rem; line-height: 1.3; }

/* ---------- Browse Categories 2x2 ---------- */
.category-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 900px) { .category-grid { grid-template-columns: repeat(4, 1fr); } }
.category-tile {
  position: relative; overflow: hidden; aspect-ratio: 1.55; border: 0; border-radius: var(--radius); cursor: pointer;
  background: linear-gradient(140deg, var(--a), var(--b)); text-align: left; padding: 14px 16px; color: #fff;
}
.category-tile strong { position: relative; z-index: 1; font-size: 1.12rem; font-weight: 800; }
.tilted { position: absolute; right: -6px; bottom: -10px; display: flex; }
.tilted .app-icon { width: 66px; height: 66px; box-shadow: 0 8px 18px rgb(0 0 0 / 25%); }
.tilted .app-icon:first-child { transform: rotate(-16deg) translate(14px, 4px); }
.tilted .app-icon:last-child { transform: rotate(14deg) translateY(-12px); }
.category-tile:active, .continue-card:active, .top-card:active, .friend-card:active { transform: scale(.98); }

.category-hero { border-radius: 26px; padding: 34px 22px 22px; margin-bottom: 18px; background: linear-gradient(140deg, var(--a), var(--b)); }
.category-hero h1 { font-size: 2rem; font-weight: 850; margin: 0; }
.category-hero p { margin: 4px 0 0; opacity: .9; }

/* ---------- Game list rows ---------- */
.game-list, .friend-list, .history { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.game-row, .friend-row, .history-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.game-row + .game-row, .friend-row + .friend-row, .history-row + .history-row { border-top: 1px solid var(--line); }
.game-row-copy, .friend-copy, .history-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.game-row small, .friend-row small, .history-row small { color: var(--ink-2); font-size: .85rem; }
.history-row .app-icon { width: 44px; height: 44px; border-radius: 11px; }
.result { font-weight: 800; font-size: .85rem; padding: 4px 12px; border-radius: 999px; }
.result.win { background: rgb(48 209 88 / 18%); color: var(--good); }
.result.loss { background: rgb(255 69 58 / 18%); color: var(--bad); }
.result.draw { background: var(--surface-2); color: var(--ink-2); }

/* ---------- Arcade ---------- */
.feature-row { grid-auto-columns: min(82%, 380px); }
.feature {
  position: relative; overflow: hidden; border-radius: 26px; padding: 150px 20px 20px; min-height: 320px;
  background: linear-gradient(160deg, var(--a), var(--b));
}
.feature .kicker { margin: 0; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.feature h2 { font-size: 1.7rem; font-weight: 850; margin: 2px 0 6px; }
.feature p { opacity: .92; font-size: .95rem; }
.feature-art { position: absolute; top: 14px; right: 10px; }
.feature-art .glyph { width: 140px; height: 140px; transform: rotate(-12deg); filter: drop-shadow(0 12px 22px rgb(0 0 0 / 30%)); }
.level-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.level-card { background: var(--surface); border-radius: var(--radius-sm); padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.level-card small { color: var(--ink-2); font-size: .82rem; line-height: 1.3; }
.bars { display: flex; gap: 3px; align-items: flex-end; height: 18px; }
.bars i { width: 6px; border-radius: 2px; background: var(--surface-3); }
.bars i:nth-child(1) { height: 8px; } .bars i:nth-child(2) { height: 13px; } .bars i:nth-child(3) { height: 18px; }
.bars i.on { background: var(--accent); }
.rules { display: flex; flex-direction: column; gap: 10px; }
.rules details { background: var(--surface); border-radius: var(--radius-sm); padding: 4px 14px; }
.rules summary { display: flex; align-items: center; gap: 12px; min-height: 56px; cursor: pointer; font-weight: 650; list-style: none; }
.rules summary::-webkit-details-marker { display: none; }
.rules summary .app-icon { width: 36px; height: 36px; border-radius: 9px; }
.rules details p { color: var(--ink-2); }

/* ---------- Friends (Discord-like) ---------- */
.segmented { display: flex; background: var(--surface); border-radius: 999px; padding: 3px; gap: 2px; margin-bottom: 14px; }
.segmented button { flex: 1; min-height: 38px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font-weight: 650; cursor: pointer; }
.segmented [aria-selected="true"], .segmented [aria-checked="true"] { background: var(--surface-3); color: var(--ink); }
.lead { margin: 0 2px 6px; }
.group-label { margin: 20px 4px 8px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.avatar {
  position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 1.35rem;
  background: color-mix(in srgb, var(--c, #555) 30%, #111);
}
.avatar.lg { width: 64px; height: 64px; font-size: 2rem; }
.avatar.xl { width: 84px; height: 84px; font-size: 2.6rem; }
.avatar.me-av { background: linear-gradient(135deg, #ff9f0a, #ff375f); }
.avatar .dot { position: absolute; right: -1px; bottom: -1px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--surface); }
.avatar.lg .dot, .avatar.xl .dot { width: 18px; height: 18px; }
.dot.online { background: #23a55a; }
.dot.idle { background: #f0b232; }
.dot.in-game { background: #5865f2; }
.dot.offline { background: #80848e; }
.friend-row .pill-btn { flex: none; }

.clubs { display: flex; flex-direction: column; gap: 14px; }
.club { margin: 0; background: var(--surface); border-radius: var(--radius); padding: 12px; }
.club-head { display: flex; align-items: center; gap: 12px; padding: 2px 4px 10px; }
.club-head div { display: flex; flex-direction: column; }
.club-icon { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; background: linear-gradient(140deg, var(--a), var(--b)); }
.channel-list { list-style: none; margin: 0; padding: 0; }
.channel-list button { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: none; border-radius: 10px; padding: 8px; min-height: var(--tap); cursor: pointer; }
.channel-list button:active { background: var(--surface-2); }
.channel-list span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.channel-list small { color: var(--ink-2); font-size: .82rem; }
.hash { color: var(--ink-2); font-size: 1.4rem; font-weight: 400; width: 20px; text-align: center; }
.count { background: var(--surface-3); border-radius: 999px; padding: 0 8px; font-size: .78rem; color: var(--ink-2); }
.channel-head h1 { display: flex; gap: 6px; align-items: center; margin: 0; font-size: 1.6rem; }
.messages { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 12px; align-items: flex-start; }
.msg p { margin: 2px 0 0; }
.msg .avatar .dot { display: none; }
.composer { position: sticky; bottom: calc(96px + var(--safe-bottom)); display: flex; gap: 8px; align-items: center; background: var(--surface-2); border-radius: 999px; padding: 6px 6px 6px 16px; }
.composer input { flex: 1; min-width: 0; border: 0; background: none; color: var(--ink); font-size: 16px; min-height: 36px; outline: none; }

.lobby-head h1 { font-size: 1.9rem; font-weight: 850; margin: 2px 0 0; }
.lobby-seats { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 22px 0 6px; background: radial-gradient(80% 120% at 50% 0%, #5865f233, transparent), var(--surface); border-radius: var(--radius); padding: 22px 12px; }
.seat { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; flex: 1; }
.seat small { color: var(--ink-2); font-size: .8rem; }
.vs { font-weight: 900; color: var(--accent); font-size: 1.2rem; }
.lobby-games { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.lobby-games button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: var(--radius-sm); border: 2px solid transparent; background: var(--surface); cursor: pointer; font-weight: 650; }
.lobby-games [aria-checked="true"] { border-color: var(--accent); }

.feed { display: flex; flex-direction: column; gap: 10px; }
.post { display: flex; gap: 12px; background: var(--surface); border-radius: var(--radius-sm); padding: 12px 14px 12px 8px; }
.vote { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 44px; font-weight: 750; font-size: .9rem; }
.vote button { width: 40px; height: 34px; border: 0; background: none; color: var(--ink-2); cursor: pointer; border-radius: 8px; }
.vote .up.on { color: #ff4500; }
.vote .down.on { color: #7193ff; }
.post-body { flex: 1; min-width: 0; }
.post-meta { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--ink-2); margin: 0 0 4px; }
.post-meta .app-icon { width: 20px; height: 20px; border-radius: 6px; }
.post-meta strong { color: var(--ink); }
.post h3 { margin: 0 0 4px; font-size: 1.05rem; }
.post p { color: #d1d1d6; font-size: .93rem; }
.post-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

/* ---------- Library ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; background: var(--surface); border-radius: var(--radius); padding: 16px 8px; text-align: center; }
.stat-row div { display: flex; flex-direction: column; }
.stat-row strong { font-size: 1.5rem; font-weight: 800; }
.stat-row small { color: var(--ink-2); font-size: .78rem; }
.chips { margin-bottom: 12px; }
.chip { background: var(--surface); color: var(--ink); border: 0; min-height: 36px; padding: 0 16px; border-radius: 999px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.empty-state { background: var(--surface); border-radius: var(--radius); }

/* ---------- Search ---------- */
.search-field { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: 14px; padding: 0 12px; }
.search-field .tab-icon { width: 20px; height: 20px; color: var(--ink-2); }
.search-field input { flex: 1; border: 0; background: none; color: var(--ink); font-size: 17px; min-height: 46px; outline: none; }
.search-field input::-webkit-search-cancel-button { filter: invert(1); }

/* ---------- Floating pill tab bar ---------- */
.pill-tabs { position: fixed; left: 0; right: 0; bottom: calc(14px + var(--safe-bottom)); z-index: 30; display: flex; justify-content: center; pointer-events: none; padding: 0 12px; }
.pill-tabs-inner {
  --tab-bg: #2a2a2c;
  pointer-events: auto; display: flex; gap: 2px; padding: 6px; border-radius: 999px; width: min(100%, 480px);
  background: rgb(38 38 40 / 72%); border: 1px solid rgb(255 255 255 / 8%);
  backdrop-filter: saturate(1.8) blur(22px); -webkit-backdrop-filter: saturate(1.8) blur(22px);
  box-shadow: 0 10px 30px rgb(0 0 0 / 55%);
}
.pill-tabs button {
  flex: 1; min-height: 52px; border: 0; border-radius: 999px; background: none; color: #c7c7cc; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .68rem; font-weight: 600;
}
.pill-tabs .tab-icon { width: 24px; height: 24px; }
.pill-tabs [aria-selected="true"] { color: var(--accent); background: rgb(255 255 255 / 9%); }
body.playing .pill-tabs { display: none; }

/* ---------- Sheets ---------- */
dialog.sheet.dark-sheet { background: var(--surface); color: var(--ink); }
dialog.sheet.dark-sheet::backdrop { background: rgb(0 0 0 / 60%); }
.setup h2 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.setup-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.setup-head > div { flex: 1; }
.close-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--ink-2); cursor: pointer; }
.setup-label { margin: 16px 0 8px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.setup .segmented { background: var(--surface-2); }
.setup .segmented [aria-checked="true"] { background: var(--surface-3); }
.level-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.level-pick button { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 12px; border-radius: var(--radius-sm); border: 2px solid transparent; background: var(--surface-2); cursor: pointer; }
.level-pick small { color: var(--ink-2); font-size: .78rem; line-height: 1.3; }
.level-pick [aria-checked="true"] { border-color: var(--accent); }
.setup-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.setup .notice { background: rgb(255 159 10 / 12%); color: #ffd9a0; margin: 12px 0 0; }
.promo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.result-sheet { text-align: center; }
.result-emoji { font-size: 3.4rem; }

/* ---------- Play screen ---------- */
.play-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.play-title { flex: 1; text-align: center; display: flex; flex-direction: column; }
.play-title small { color: var(--ink-2); font-size: .8rem; }
.icon-round { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface-2); font-weight: 800; cursor: pointer; }
.play-layout { display: grid; gap: 16px; }
@media (min-width: 900px) and (orientation: landscape) { .play-layout { grid-template-columns: minmax(0, 1fr) 260px; align-items: start; } }
.play-surface {
  --size: max(280px, min(calc(100vw - 36px - var(--safe-left) - var(--safe-right)), calc(100dvh - 360px - var(--safe-top) - var(--safe-bottom)), 600px));
  display: flex; flex-direction: column; gap: 10px; align-items: center; }
.player { display: flex; align-items: center; gap: 10px; width: min(100%, max(var(--size), 340px)); padding: 8px 12px; border-radius: 16px; background: var(--surface); border: 2px solid transparent; transition: border-color .2s; }
.player > div { flex: 1; display: flex; flex-direction: column; }
.player small { color: var(--ink-2); font-size: .8rem; }
.player.active { border-color: var(--accent); }
.player .avatar { width: 36px; height: 36px; font-size: 1.1rem; }
.captures { font-size: 1.1rem; letter-spacing: -2px; color: var(--ink-2); }

.board {
  width: var(--size); aspect-ratio: 1; display: grid; grid-template-columns: repeat(8, 1fr);
  border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 6px #1c1c1e, 0 20px 40px rgb(0 0 0 / 60%); touch-action: none;
}
.sq { position: relative; border: 0; padding: 0; display: grid; place-items: center; cursor: pointer; container-type: size; }
.board.chess .light { background: #e9dfc9; }
.board.chess .dark { background: #7a5bd1; }
.board.checkers .light { background: #f2e6d0; }
.board.checkers .dark { background: #2f3a46; }
.sq.sel { box-shadow: inset 0 0 0 100px rgb(255 159 10 / 45%); }
.sq.last { box-shadow: inset 0 0 0 100px rgb(255 214 10 / 28%); }
.sq.check { background: radial-gradient(circle, #ff453a 0%, #ff453a88 45%, transparent 75%) !important; }
.pc { font-size: 78cqh; line-height: 1; user-select: none; pointer-events: none; }
.pc.w { color: #fff; text-shadow: 0 0 1px #000, 0 0 2px #000, 0 2px 3px rgb(0 0 0 / 45%); }
.pc.b { color: #111; text-shadow: 0 0 1px #fff8, 0 2px 3px rgb(0 0 0 / 35%); }
.disc { width: 78%; height: 78%; border-radius: 50%; display: grid; place-items: center; font-size: 42cqh; pointer-events: none; }
.disc.w { background: radial-gradient(circle at 35% 30%, #ff8a80, #e53935 55%, #a31515); box-shadow: inset 0 -4px 0 rgb(0 0 0 / 30%), 0 3px 6px rgb(0 0 0 / 40%); color: #ffe082; }
.disc.b { background: radial-gradient(circle at 35% 30%, #666, #1d1d1f 60%); box-shadow: inset 0 -4px 0 rgb(0 0 0 / 50%), 0 3px 6px rgb(0 0 0 / 50%); color: #ffd60a; }
.hint { position: absolute; width: 30%; height: 30%; border-radius: 50%; background: rgb(0 0 0 / 28%); pointer-events: none; }
.board.checkers .hint { background: rgb(255 159 10 / 70%); }
.hint.cap { width: 86%; height: 86%; background: none; border: 5px solid rgb(0 0 0 / 30%); }
.file, .rank { position: absolute; font-size: 22cqh; font-weight: 700; opacity: .55; color: #000; pointer-events: none; }
.file { right: 6%; bottom: 2%; }
.rank { left: 6%; top: 2%; }

.pool-frame { width: min(100%, 860px); padding: 14px; border-radius: 22px; background: linear-gradient(#5a3a22, #3b2414); box-shadow: 0 20px 40px rgb(0 0 0 / 60%); }
.pool-frame canvas { width: 100%; height: auto; border-radius: 8px; touch-action: none; }
.pool-controls { display: flex; align-items: center; gap: 14px; width: min(100%, 560px); }
.power { flex: 1; display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: .9rem; font-weight: 600; }
.power input { flex: 1; accent-color: var(--accent); min-height: var(--tap); }
.pool-message { margin: 0; color: var(--ink-2); text-align: center; }
.status { margin: 2px 0 0; font-weight: 700; font-size: 1.05rem; }
.status.over { color: var(--accent); }
.play-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.move-book { background: var(--surface); border-radius: var(--radius); padding: 14px 16px; }
.move-book h3 { margin: 0 0 6px; }
.move-book ol { margin: 0 0 8px; padding-left: 1.6em; max-height: 46vh; overflow: auto; font-size: .9rem; font-variant-numeric: tabular-nums; }

.hint-host { max-width: var(--max); margin: 0 auto; padding: var(--safe-top) calc(18px + var(--safe-right)) 0 calc(18px + var(--safe-left)); }
.hint-host:empty { display: none; }
body.playing .hint-host { display: none; }
.offline-pill { background: var(--surface-2); color: var(--ink); }
.install-hint { background: var(--surface); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
