/* chess/css/chess.css - THE CORN GAMBIT's page: the door, the hall, the HUD, the captions and the dialogs, laid over the
 * 3D table (chess/js/chess-scene.js). The Herd's band is candy pink and mint; the Horde's is violet and toxic green
 * (html[data-band], set by chess/js/chess-main.js). Phone-friendly: the hall becomes a sheet under the board. */
:root {
  --ink: #0E0716;
  --night: #170A24;
  --glass: rgba(20, 10, 34, 0.78);
  --glass-2: rgba(36, 20, 58, 0.72);
  --line: rgba(255, 255, 255, 0.14);
  --text: #FBF3E7;
  --muted: #C8B8E0;
  --gold: #F5C242;
  --a: #FF6FB5;
  --b: #7FE0D6;
  --danger: #FF5A5A;
  --font: 'Trebuchet MS', 'Lucida Grande', Verdana, sans-serif;
  --title-font: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
html[data-band="horde"] { --a: #A78BFA; --b: #6BE04A; }

html, body { margin: 0; padding: 0; height: 100%; background: var(--ink); color: var(--text); font-family: var(--font); overflow: hidden; -webkit-tap-highlight-color: transparent; }
button { font-family: inherit; color: inherit; }
[hidden] { display: none !important; }

#table { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; touch-action: none; outline: none; }
.veil { position: fixed; inset: 0; pointer-events: none; transition: background 0.6s ease; }
.veil-door { background: radial-gradient(ellipse at 30% 50%, rgba(14, 7, 22, 0.78) 0%, rgba(14, 7, 22, 0.35) 45%, rgba(14, 7, 22, 0.1) 75%); }
.veil-hall { background: linear-gradient(90deg, rgba(14, 7, 22, 0.55) 0%, rgba(14, 7, 22, 0.1) 60%); }

/* ---- the loading curtain ---- */
.curtain { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(circle at 50% 40%, #2A1446 0%, var(--ink) 70%); transition: opacity 0.5s ease; }
.curtain.is-gone { opacity: 0; }
.curtain-board { width: 96px; height: 96px; border-radius: 12px; transform: rotateX(55deg) rotateZ(45deg);
  background: repeating-conic-gradient(#FF6FB5 0 25%, #FBF3E7 0 50%) 0 0 / 24px 24px; box-shadow: 0 0 40px rgba(255, 111, 181, 0.6); animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotateX(55deg) rotateZ(405deg); } }
.curtain-title { margin: 0; font-family: var(--title-font); font-weight: bold; letter-spacing: 0.18em; font-size: 22px; color: var(--gold); }
.curtain-bar { width: min(280px, 70vw); height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.curtain-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #FF6FB5, #F5C242, #7FE0D6); transition: width 0.4s ease; }
.curtain-line { margin: 0; color: var(--muted); font-size: 14px; }

/* ---- buttons and chips ---- */
.btn { appearance: none; border: 1px solid var(--line); background: var(--glass-2); color: var(--text); border-radius: 12px; padding: 10px 16px; font-size: 15px; font-weight: bold; cursor: pointer; transition: transform 0.12s ease, filter 0.12s ease, background 0.2s; }
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: scale(0.97); }
.btn:focus-visible, .chip:focus-visible, .choice:focus-visible, .tab:focus-visible, .card:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn-ghost { background: transparent; }
.btn-small { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn-play { position: relative; border: 0; padding: 14px 34px; font-size: 20px; letter-spacing: 0.12em; text-transform: uppercase; color: #1A0F24;
  background: linear-gradient(135deg, var(--gold), #FFE9A8 45%, var(--a)); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25) inset, 0 8px 30px rgba(245, 194, 66, 0.45); }
.btn-play::after { content: ''; position: absolute; inset: -4px; border-radius: 16px; border: 2px solid var(--gold); opacity: 0.6; animation: halo 2.4s ease-in-out infinite; pointer-events: none; }
@keyframes halo { 0%, 100% { transform: scale(1); opacity: 0.6; } 50% { transform: scale(1.06); opacity: 0.15; } }
.btn-buy { border: 0; color: #1A0F24; background: linear-gradient(135deg, var(--gold), #FFE9A8); }
.chip { appearance: none; border: 1px solid var(--line); background: var(--glass); color: var(--text); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: bold; cursor: pointer; backdrop-filter: blur(6px); }
.chip-danger { border-color: rgba(255, 90, 90, 0.5); color: #FFC2C2; }

/* ---- the door ---- */
.door { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px;
  padding: calc(40px + var(--safe-t)) 8vw calc(90px + var(--safe-b)); pointer-events: none; }
.door > * { pointer-events: auto; }
.door-crest { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; pointer-events: none; }
.door-crest span { display: block; }
.crest-herd, .crest-horde { width: 34px; height: 34px; border-radius: 50%; }
.crest-herd { background: radial-gradient(circle at 35% 35%, #FFFFFF, #FF6FB5 55%, #7FE0D6); box-shadow: 0 0 18px #FF6FB5; }
.crest-horde { background: radial-gradient(circle at 35% 35%, #C9A8F5, #3A2060 55%, #6BE04A); box-shadow: 0 0 18px #A78BFA; }
.crest-vs { font-family: var(--title-font); font-weight: bold; color: var(--gold); letter-spacing: 0.1em; }
.door-kicker { margin: 0; color: var(--muted); letter-spacing: 0.32em; text-transform: uppercase; font-size: 13px; font-weight: bold; }
.door-title { margin: 0; font-family: var(--title-font); font-weight: bold; line-height: 0.92; font-size: clamp(48px, 9vw, 118px); letter-spacing: 0.04em; }
.door-title span { display: block; background: linear-gradient(180deg, #FFF6D0 0%, var(--gold) 45%, var(--a) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.45)) drop-shadow(0 0 24px rgba(245, 194, 66, 0.35)); }
.door-title span + span { background: linear-gradient(180deg, #FFFFFF 0%, var(--b) 50%, var(--a) 100%); -webkit-background-clip: text; background-clip: text; }
.door-sub { margin: 4px 0 14px; font-size: clamp(15px, 1.8vw, 20px); color: var(--text); max-width: 32em; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7); }
.door-band { margin: 8px 0 0; color: var(--muted); font-size: 14px; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8); }
.door-copy { position: fixed; left: max(14px, env(safe-area-inset-left, 0px)); bottom: calc(10px + var(--safe-b)); margin: 0; color: rgba(255, 255, 255, 0.5); font-size: 11px; }

.corner { position: fixed; top: calc(12px + var(--safe-t)); right: 12px; z-index: 45; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chip-acct { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- the hall ---- */
.hall { position: fixed; z-index: 30; top: 0; left: 0; bottom: 0; width: min(560px, 46vw); display: flex; flex-direction: column;
  background: var(--glass); backdrop-filter: blur(10px); border-right: 1px solid var(--line); padding-top: var(--safe-t); }
.hall-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px 8px; }
.hall-title { flex: 1; margin: 0; font-family: var(--title-font); font-size: 22px; color: var(--gold); letter-spacing: 0.06em; }
.purse { margin: 0; font-weight: bold; color: var(--gold); font-size: 14px; text-align: right; }
.tabs { display: flex; gap: 4px; padding: 0 12px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.tab { appearance: none; border: 0; background: none; padding: 10px 12px; font-size: 14px; font-weight: bold; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tab.is-on { color: var(--text); border-bottom-color: var(--a); }
.panes { flex: 1; overflow-y: auto; padding: 12px 16px calc(24px + var(--safe-b)); }
.pane { display: none; }
.pane.is-on { display: block; }
.note { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.pick { border: 0; margin: 0 0 12px; padding: 0; }
.pick legend { padding: 0; margin-bottom: 6px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: bold; }
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.choices-boards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice { appearance: none; text-align: left; border: 1px solid var(--line); background: var(--glass-2); border-radius: 12px; padding: 9px 11px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-height: 48px; }
.choice-name { font-weight: bold; font-size: 14px; }
.choice-sub { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.choice.is-on { border-color: var(--a); background: linear-gradient(135deg, rgba(255, 111, 181, 0.28), rgba(127, 224, 214, 0.16)); box-shadow: 0 0 0 1px var(--a) inset; }
html[data-band="horde"] .choice.is-on { background: linear-gradient(135deg, rgba(167, 139, 250, 0.3), rgba(107, 224, 74, 0.14)); }
.choice.is-locked { opacity: 0.62; }
.choice.is-locked .choice-sub::before { content: 'Locked: '; color: var(--gold); }
.btn-start { width: 100%; margin-top: 6px; }

.shop { display: grid; gap: 10px; }
.card { display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass-2); cursor: pointer; }
.card.is-owned { border-color: rgba(245, 194, 66, 0.5); }
.swatch { width: 58px; height: 58px; border-radius: 10px; border: 3px solid; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); }
.card-name { margin: 0; font-weight: bold; font-size: 15px; }
.card-line { margin: 2px 0 6px; font-size: 12px; color: var(--muted); line-height: 1.35; }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 14px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.15); }
.pips i.on { background: linear-gradient(90deg, var(--gold), var(--a)); }

.sec { margin: 16px 0 8px; font-family: var(--title-font); font-size: 18px; color: var(--gold); }
.sec small { font-family: var(--font); font-size: 12px; color: var(--muted); font-weight: normal; }
.chal { display: flex; gap: 12px; align-items: center; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass-2); }
.chal.is-done { border-color: rgba(107, 224, 74, 0.5); }
.chal-body { flex: 1; min-width: 0; }
.chal-title { margin: 0; font-weight: bold; font-size: 14px; }
.chal-line { margin: 2px 0 6px; font-size: 12px; color: var(--muted); }
.chal-count { margin: 3px 0 0; font-size: 11px; color: var(--muted); }
.bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--a), var(--gold)); }
.tag { font-size: 12px; font-weight: bold; color: var(--gold); white-space: nowrap; }
.tag-done { color: #9BF08A; }

.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge { padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass-2); text-align: center; opacity: 0.55; filter: grayscale(0.8); }
.badge.is-earned { opacity: 1; filter: none; }
.medal { display: block; width: 46px; height: 46px; margin: 0 auto 6px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2) inset, 0 4px 12px rgba(0, 0, 0, 0.5); }
.tier-bronze .medal { background: radial-gradient(circle at 35% 30%, #FFD9B0, #C07A3A 60%, #6A3A18); }
.tier-silver .medal { background: radial-gradient(circle at 35% 30%, #FFFFFF, #B8C4D8 60%, #5A667A); }
.tier-gold .medal { background: radial-gradient(circle at 35% 30%, #FFF6D0, #F5C242 60%, #8A5A00); }
.tier-mythic .medal { background: conic-gradient(#FF6FB5, #F5C242, #7FE0D6, #A78BFA, #FF6FB5); }
.badge-title { margin: 0; font-weight: bold; font-size: 13px; }
.badge-line { margin: 3px 0; font-size: 11.5px; color: var(--muted); }
.badge-at { margin: 0; font-size: 11px; color: var(--gold); }

.guide p { font-size: 13.5px; line-height: 1.5; color: var(--text); margin: 0 0 8px; }
.names { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
.names th, .names td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.names th { color: var(--gold); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }

/* ---- the HUD ---- */
.hud { position: fixed; inset: 0; z-index: 25; pointer-events: none; }
.hud > * { pointer-events: auto; }
.plate { position: fixed; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 16px; border-radius: 14px;
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(8px); min-width: min(420px, 92vw); max-width: 96vw; transition: box-shadow 0.25s, border-color 0.25s; }
.plate-them { top: calc(10px + var(--safe-t)); }
.plate-you { bottom: calc(10px + var(--safe-b)); }
.plate-name { font-weight: bold; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45vw; }
.plate-taken { flex: 1; font-size: 17px; letter-spacing: -1px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.plate-clock { font-family: 'Courier New', monospace; font-weight: bold; font-size: 22px; padding: 4px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.45); min-width: 72px; text-align: center; }
.plate[data-army="herd"] { border-left: 4px solid #FF6FB5; }
.plate[data-army="horde"] { border-left: 4px solid #A78BFA; }
.plate.is-turn { border-color: var(--gold); box-shadow: 0 0 22px rgba(245, 194, 66, 0.45); }
.plate.is-turn .plate-clock { background: var(--gold); color: #1A0F24; }
.plate.is-turn.is-low .plate-clock { background: var(--danger); color: #FFFFFF; animation: pulse 0.8s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }
.hud-tools { position: fixed; top: calc(12px + var(--safe-t)); right: 12px; display: flex; gap: 8px; }
.hud-moves { position: fixed; right: 12px; top: calc(62px + var(--safe-t)); width: 190px; max-height: 42vh; overflow-y: auto; margin: 0; padding: 8px 12px; list-style: none;
  background: var(--glass); border: 1px solid var(--line); border-radius: 12px; font-family: 'Courier New', monospace; font-size: 13px; line-height: 1.6; white-space: pre; }
.hud-moves:empty { display: none; }
.hud-status { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(76px + var(--safe-b)); margin: 0; padding: 6px 14px; border-radius: 999px; background: rgba(0, 0, 0, 0.5); font-size: 14px; font-weight: bold; pointer-events: none; }
.hud-status:empty { display: none; }

/* ---- the kill caption ---- */
.caption { position: fixed; left: 50%; top: 18%; z-index: 40; transform: translate(-50%, -10px) scale(0.9); opacity: 0; transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
  display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; text-align: center; white-space: nowrap; }
.caption.is-on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.caption span { display: block; font-family: var(--title-font); font-weight: bold; text-transform: uppercase; letter-spacing: 0.08em; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.55), 0 0 22px rgba(0, 0, 0, 0.6); }
.cap-a { font-size: clamp(26px, 4.6vw, 54px); }
.cap-verb { font-size: clamp(14px, 2vw, 22px); color: var(--gold); letter-spacing: 0.3em; }
.cap-v { font-size: clamp(20px, 3.4vw, 40px); color: #FFD2D2; }
.cap-herd .cap-a { color: #FFB8DD; }
.cap-horde .cap-a { color: #C9A8F5; }

/* ---- dialogs and the toast ---- */
.dialog { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(8, 4, 14, 0.55); backdrop-filter: blur(3px); }
.dialog-card { width: min(440px, 100%); padding: 22px; border-radius: 18px; background: linear-gradient(180deg, #2A1644, #170A24); border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); text-align: center; }
.dialog-card h2 { margin: 0 0 6px; font-family: var(--title-font); color: var(--gold); }
.dialog-card p { color: var(--muted); }
.dialog-row { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.dialog-row .btn-play { padding: 11px 24px; font-size: 16px; }
.promo-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.promo-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px; }
.promo-glyph { font-size: 34px; line-height: 1; }
.result-kicker { margin: 0; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.result-title { font-size: 44px; margin: 4px 0 !important; }
.dialog-result[data-result="win"] .result-title { background: linear-gradient(180deg, #FFF6D0, var(--gold), var(--a)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dialog-result[data-result="loss"] .result-title { color: #FF9A9A; }
.result-line { color: var(--text) !important; }
.reward { font-size: 28px; font-weight: bold; color: var(--gold) !important; margin: 6px 0; }
.line-chal, .line-badge { margin: 4px 0; color: #9BF08A !important; font-weight: bold; font-size: 13px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(26px + var(--safe-b)); z-index: 70; max-width: min(520px, 90vw); padding: 10px 16px; border-radius: 12px;
  background: rgba(20, 10, 34, 0.92); border: 1px solid var(--gold); font-size: 14px; text-align: center; box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5); }
.boot-error { position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; background: var(--ink); }
.boot-error a { color: var(--gold); }

/* ---- phones and narrow windows: the hall is a sheet under the board ---- */
@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  .door { align-items: center; text-align: center; justify-content: flex-end; padding-bottom: calc(110px + var(--safe-b)); }
  .door-crest { display: none; } /* on a tall screen the board itself stands above the title; the crest would sit on it */
  .veil-door { background: linear-gradient(0deg, rgba(14, 7, 22, 0.9) 0%, rgba(14, 7, 22, 0.55) 45%, rgba(14, 7, 22, 0.05) 75%); }
  .veil-hall { background: none; }
  .hall { top: auto; width: 100%; height: 64vh; height: 64dvh; border-right: 0; border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; padding-top: 0; }
  .hall-top { padding: 10px 12px 4px; }
  .hall-title { font-size: 17px; white-space: nowrap; }
  .tab { padding: 9px 8px; font-size: 13px; }
  .choices { gap: 6px; }
  .choice { padding: 8px 9px; }
  .choice-sub { font-size: 11px; }
  .hud-moves { display: none; }
  .plate { min-width: 0; width: calc(100vw - 20px); gap: 8px; padding: 6px 8px 6px 12px; }
  .plate-name { font-size: 13px; max-width: 44vw; }
  .plate-clock { font-size: 19px; min-width: 62px; padding: 3px 8px; }
  .hud-tools { top: auto; bottom: calc(66px + var(--safe-b)); right: 10px; }
  .plate-them { top: calc(8px + var(--safe-t)); }
  .hud-status { bottom: calc(110px + var(--safe-b)); }
  .caption { top: 14%; }
}
@media (max-height: 460px) and (orientation: landscape) {
  .door { padding-top: 16px; padding-bottom: 60px; gap: 4px; }
  .door-title { font-size: clamp(36px, 7vw, 64px); }
  .hall { width: min(460px, 52vw); height: auto; top: 0; border-radius: 0; border-top: 0; border-right: 1px solid var(--line); }
  .plate { left: auto; right: 10px; transform: none; min-width: 0; width: min(340px, 42vw); }
  .plate-them { top: 8px; }
  .plate-you { bottom: 8px; }
  .hud-tools { top: 8px; bottom: auto; right: auto; left: 10px; }
  .hud-moves { display: none; }
  .hud-status { left: 10px; transform: none; bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn-play::after, .curtain-board, .plate.is-turn.is-low .plate-clock { animation: none; }
  .caption { transition: opacity 0.2s ease; }
}

/* ---- online: the waiting dialog ---- */
.wait-spin { width: 38px; height: 38px; margin: 0 auto 10px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--gold); animation: wait-spin 1s linear infinite; }
@keyframes wait-spin { to { transform: rotate(360deg); } }
.wait-link { display: flex; gap: 8px; margin-top: 12px; }
.wait-link input { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.35); color: inherit; font: inherit; font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .wait-spin { animation: none; } }

/* ---- online: the draw offer, the table talk (phrases only, kept nowhere) and the rematch ---- */
.hud-tools { flex-wrap: wrap; justify-content: flex-end; max-width: calc(100vw - 24px); }
.chip[disabled] { opacity: 0.5; cursor: default; }
.chip[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.talk { position: fixed; top: calc(58px + var(--safe-t)); right: 12px; z-index: 30; width: min(300px, calc(100vw - 24px)); padding: 10px; border-radius: 14px;
  background: rgba(20, 10, 34, 0.94); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; gap: 8px; }
.talk-pick, .result-talk { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.talk-pick .btn, .result-talk .btn { padding: 7px 8px; font-size: 12.5px; }
.talk .chip { align-self: flex-end; }
.bubble { position: fixed; left: 50%; transform: translateX(-50%); z-index: 28; margin: 0; max-width: min(360px, 80vw); padding: 7px 14px; border-radius: 16px; font-size: 14px; font-weight: bold;
  background: #FFF6E0; color: #1A0F24; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); pointer-events: none; text-align: center; }
.bubble-them { top: calc(64px + var(--safe-t)); }
.bubble-you { bottom: calc(118px + var(--safe-b)); background: #E6FFF9; }
.offer { position: fixed; left: 50%; transform: translateX(-50%); top: calc(110px + var(--safe-t)); z-index: 29; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center;
  max-width: calc(100vw - 24px); padding: 8px 10px 8px 14px; border-radius: 14px; background: rgba(20, 10, 34, 0.94); border: 1px solid var(--gold); font-size: 14px; font-weight: bold; }
.result-live { margin-top: 10px; }
.result-heard { margin: 4px 0; color: var(--text) !important; font-weight: bold; min-height: 1em; }
.result-heard:empty, .result-rematch:empty { display: none; }
.result-rematch { margin: 4px 0; color: var(--gold) !important; font-weight: bold; }
.result-talk { grid-template-columns: repeat(4, 1fr); margin-top: 8px; }
.line-rating { margin: 4px 0; font-weight: bold; color: var(--text) !important; }
.ladder table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
.ladder th, .ladder td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.ladder th { color: var(--gold); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.ladder td.num, .ladder th.num { text-align: right; font-variant-numeric: tabular-nums; }
.ladder tr.is-you td { color: var(--gold); font-weight: bold; }
.ladder tr.gap td { text-align: center; color: var(--muted); border-bottom: 0; }
@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  .talk { top: auto; bottom: calc(160px + var(--safe-b)); right: 10px; }
  .bubble-them { top: calc(60px + var(--safe-t)); }
  .bubble-you { bottom: calc(150px + var(--safe-b)); }
  .offer { top: calc(100px + var(--safe-t)); }
  .result-talk { grid-template-columns: repeat(2, 1fr); }
  .hud-tools { gap: 6px; }
  .hud-tools .chip { padding: 7px 10px; font-size: 12px; }
}
@media (max-height: 460px) and (orientation: landscape) {
  .talk { top: 50px; right: auto; left: 10px; bottom: auto; }
  .bubble-them { left: auto; right: 10px; transform: none; top: 60px; }
  .bubble-you { left: auto; right: 10px; transform: none; bottom: 60px; }
  .offer { top: 8px; }
}

/* THE SHOP's kill shots and the money boards (2026-10-04, chess/js/chess-shots.js) */
.swatch-shot { border-radius: 50%; }
.swatch-bundle { background: conic-gradient(from 20deg, #F5B98A, #FF7A2E, #C9A8F5, #F5C242, #FFE27A, #F5B98A); border-color: var(--gold); }
.card-bundle { border-color: rgba(245, 194, 66, 0.7); }
.card-earn { font-size: 12px; color: var(--muted); max-width: 120px; text-align: right; line-height: 1.3; }
