@charset "UTF-8";

:root {
  color-scheme: dark;
  --ink: #efe9dc;
  --ink-soft: #b6b9b1;
  --muted: #7d8985;
  --faint: #576863;
  --canvas: #111b1f;
  --panel: #172226;
  --line: rgba(189, 200, 179, .14);
  --copper: #c49977;
  --copper-light: #e0b894;
  --green: #95aa92;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --board-dark: #29423f;
  --board-light: #668078;
  --focus: #e3c3a2;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: radial-gradient(ellipse at 22% 30%, #24332f66 0, transparent 48%), radial-gradient(ellipse at 95% 0%, #49342926 0, transparent 45%), var(--canvas); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 30; opacity: .075; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.93' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23n)' opacity='.35' d='M0 0h160v160H0z'/%3E%3C/svg%3E"); }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, a { touch-action: manipulation; }
button { color: inherit; }
button:disabled { cursor: default; opacity: .35; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
input, textarea { color: var(--ink); }
button svg, a svg, summary svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a { color: inherit; text-decoration: none; }
button { border: 0; }
p, h1, h2, h3 { margin: 0; }
::selection { background: #ad836654; color: var(--ink); }
.page-shell { max-width: 1328px; padding: 0 64px; margin: 0 auto; }
.site-header { height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 13px; }
.brand-mark { height: 35px; width: 35px; color: var(--copper); stroke-width: 1; }
.brand-name { font-size: 13px; font-weight: 600; letter-spacing: 3.5px; display: flex; align-items: center; }
.brand-divider { color: #55655f; font-size: 18px; font-weight: 300; padding: 0 18px 0 15px; }
.brand-place { color: #a3afa6; font-family: var(--serif); font-style: italic; font-size: 15px; letter-spacing: .1px; font-weight: 400; }
.header-actions { display: flex; align-items: center; gap: 22px; }
.session-name { font-size: 11px; color: var(--muted); letter-spacing: .5px; }
.text-button { background: transparent; padding: 6px 0; display: inline-flex; align-items: center; justify-content: center; gap: 9px; color: var(--ink-soft); font-size: 12px; }
.text-button:hover:not(:disabled) { color: var(--ink); }
.saved-tables-button { min-height: 44px; }
.saved-tables-button svg { width: 16px; height: 16px; color: var(--copper); }
.small-count { min-width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 50%; display: inline-grid; place-items: center; font-size: 10px; color: var(--muted); margin-left: 1px; }
.icon-button { width: 36px; height: 36px; background: transparent; color: #9baa9f; display: inline-flex; align-items: center; justify-content: center; border-radius: 5px; flex: none; transition: color .16s, background .16s; }
.icon-button:hover:not(:disabled) { background: #9fac9410; color: var(--ink); }
.icon-button[aria-pressed="true"] { color: var(--copper-light); background: #c4997713; }
.icon-button.subtle { width: 28px; color: var(--faint); margin-left: -10px; }
.icon-button svg { width: 18px; height: 18px; }
.intro { display: flex; align-items: flex-end; justify-content: space-between; padding: 47px 0 43px; gap: 30px; }
.eyebrow { font-size: 9px; line-height: 1.6; letter-spacing: 2.6px; font-weight: 600; color: var(--copper); }
.intro .eyebrow { display: flex; align-items: center; gap: 10px; }
.tiny-diamond { display: inline-block; width: 5px; height: 5px; background: var(--copper); transform: rotate(45deg); }
h1 { font: 400 clamp(68px, 7.5vw, 102px)/1.08 var(--serif); letter-spacing: -5.5px; margin: 9px 0 13px -5px; }
.title-period { color: var(--copper); }
.invitation { color: #a5afa8; font-family: var(--serif); font-size: 18px; letter-spacing: .2px; }
.intro-aside { display: flex; flex-direction: column; align-items: flex-end; gap: 15px; padding-bottom: 4px; }
.room-rule { font-size: 11px; color: var(--muted); }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 20px; font-size: 12px; font-weight: 600; letter-spacing: .15px; min-height: 45px; padding: 12px 21px; border-radius: 4px; transition: background .18s, transform .18s, box-shadow .18s; }
.primary-button { background: var(--copper); color: #1f2726; border: 1px solid #d4ac8866; box-shadow: inset 0 1px #ffe0be40, 0 3px 9px #0002; }
.primary-button:hover:not(:disabled) { background: #d2aa86; box-shadow: inset 0 1px #ffe0be66, 0 5px 20px #0003; transform: translateY(-1px); }
.primary-button:active:not(:disabled) { transform: translateY(0); }
.button-plus { font-size: 23px; font-weight: 300; line-height: 15px; }
.secondary-button { border: 1px solid #7d8d783f; background: #809c8010; color: #d4d9cb; box-shadow: inset 0 1px #ffffff03; }
.secondary-button:hover:not(:disabled) { background: #809c8025; border-color: #a0ae8b66; }
.full-width { width: 100%; justify-content: space-between; }
.table-layout { display: grid; grid-template-columns: minmax(0, 650px) minmax(265px, 340px); gap: clamp(35px, 5vw, 72px); align-items: start; }
.board-column { min-width: 0; }
.table-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.table-number { font-size: 8px; font-weight: 600; letter-spacing: 2.3px; color: var(--muted); }
.table-heading h2 { font: 400 22px/1.4 var(--serif); color: #d4daca; margin-top: 4px; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.save-state { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--muted); font-size: 10px; padding-top: 17px; }
.save-dot { width: 4px; height: 4px; border-radius: 50%; background: #809e83; }
.save-state.saving .save-dot { background: var(--copper); animation: breathe 1.5s ease-in-out infinite; }
.save-state.unsaved .save-dot { background: #d4a078; }
.player-rail { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 4px; min-height: 46px; }
.top-player { margin-bottom: 15px; }
.bottom-player { margin-top: 16px; }
.player-identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.player-avatar { width: 35px; height: 35px; border-radius: 50%; background: #8ca28b10; border: 1px solid #8ca28b29; display: inline-flex; align-items: center; justify-content: center; flex: none; font-family: var(--serif); font-size: 19px; color: #d0b595; }
.player-avatar.kairo-avatar { border-color: #8ca28b22; background: #8ca28b09; color: #b5c0a8; }
.kairo-orbit { width: 28px; height: 28px; overflow: visible; stroke: currentColor; stroke-width: .8; fill: none; animation: orbit 35s linear infinite; }
.player-name { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; letter-spacing: .3px; min-width: 0; }
.player-name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.player-you { font-size: 8px; letter-spacing: 1.5px; color: var(--copper); border: 1px solid #c4997733; border-radius: 2px; padding: 1px 5px; line-height: 1.5; }
.player-subtitle { font-size: 10px; color: var(--muted); margin-top: 3px; letter-spacing: .25px; }
.player-material { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 10px; flex: none; }
.material-count { display: inline-flex; align-items: center; gap: 5px; }
.material-count svg { height: 14px; width: 16px; stroke: currentColor; stroke-width: 1.2; fill: none; }
.material-count .tiny-piece { width: 12px; height: 12px; }
.player-turn-label { font-size: 8px; letter-spacing: 1.1px; color: var(--copper); text-transform: uppercase; display: flex; align-items: center; gap: 5px; }
.player-turn-label::before { content: ""; width: 3px; height: 3px; background: currentColor; border-radius: 50%; }
.board-surround { position: relative; isolation: isolate; }
.board-surround::before { content: ""; position: absolute; inset: 5% -8% -3%; background: radial-gradient(ellipse at 50% 60%, #54715726, transparent 70%); z-index: -1; filter: blur(30px); }
.board-frame { position: relative; padding: 13px; background: linear-gradient(135deg, #617167 0%, #33453e 22%, #263632 70%, #687468 100%); border: 1px solid #81917a54; border-radius: 6px; box-shadow: 0 1px 0 #b4bca554 inset, 0 -2px 0 #0a1113 inset, 0 2px 0 #0c1416, 0 5px 0 #2b3c34, 0 7px 0 #111b1c, 0 20px 38px -12px #050d13aa, 0 36px 65px -29px #0009; }
.board-frame::before { content: ""; position: absolute; inset: 7px; border: 1px solid #9ba98e30; border-radius: 2px; pointer-events: none; }
.board-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 5px; background: linear-gradient(130deg, #fff1, transparent 34%, transparent 78%, #d9cca605); mix-blend-mode: screen; }
.board { display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 1; position: relative; border: 1px solid #0a1818; box-shadow: 0 0 0 1px #bbc49b19, 0 2px 10px #0008 inset; overflow: hidden; border-radius: 1px; }
.square { position: relative; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 0; background: var(--board-light); min-width: 0; aspect-ratio: 1; }
.square.light { background: linear-gradient(135deg, #71867c, #627b73); box-shadow: inset 0 0 10px #ffffff03; }
.square.dark { background: linear-gradient(135deg, #304a44, #253e3b); box-shadow: inset 0 0 10px #061c1b10; }
.square.dark::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; transition: background .18s; }
.square.dark:hover:not(:disabled)::before { background: #ecddae10; }
.square:focus-visible { outline: 2px solid #f5d7ac; outline-offset: -4px; z-index: 4; }
.square[aria-disabled="true"] { cursor: default; }
.square.selected::before { box-shadow: inset 0 0 0 2px #dfc497b0; background: #d5b98319; }
.square.last-origin::before { background: #c7ad6f12; }
.square.last-target::before { background: #c7ad6f1c; }
.square.last-target::after { content: ""; position: absolute; width: 5px; height: 5px; border-top: 1.5px solid #e3c09599; border-right: 1.5px solid #e3c09599; right: 5px; top: 5px; }
.square.path-square::before { background: #e7c38a20; }
.square.destination { cursor: pointer; }
.square.destination::after { content: ""; position: absolute; height: 27%; width: 27%; border: 1.5px solid #e4ce9e99; border-radius: 50%; background: #dbc6921f; box-shadow: 0 0 14px #e4c68a08; transition: background .18s, transform .18s; }
.square.destination:hover::after { background: #dfc79655; transform: scale(1.14); }
.square.available .piece { cursor: pointer; }
.square.available:hover .piece { transform: translateY(-2px); filter: brightness(1.06); }
.square.selected .piece { transform: translateY(-3px); box-shadow: 0 7px 8px #00130f77, 0 4px 0 var(--piece-edge), inset 0 1px 2px #ffffff80, inset 0 -2px 3px var(--piece-shadow); }
.square.capture-eligible .piece::after { border-color: #ffedc48c; }
.square.capture-eligible:not(.selected) .piece .capture-mark { display: block; }
.capture-mark { display: none; position: absolute; bottom: 8%; left: 47%; width: 5px; height: 5px; z-index: 3; border: 1px solid currentColor; transform: rotate(45deg); opacity: .8; }
.square-number { position: absolute; top: 3px; left: 4px; font-size: clamp(6px, .7vw, 9px); line-height: 1; color: #bec9aa85; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 2; font-variant-numeric: tabular-nums; }
.board.show-numbers .square-number { opacity: 1; }
.board.history-board .square { cursor: default; }
.board.history-board { filter: saturate(.78); }
.piece { --piece-edge: #815b42; --piece-shadow: #8c5d3f; display: flex; align-items: center; justify-content: center; position: relative; width: 77%; height: 77%; border-radius: 50%; background: radial-gradient(ellipse at 36% 24%, #e4b995 0, #ca9a74 40%, #b5825d 100%); color: #835735; border: 1px solid #d6aa8390; box-shadow: 0 4px 0 var(--piece-edge), 0 6px 5px #071d1baa, inset 0 1px 2px #ffffff85, inset 0 -2px 3px var(--piece-shadow); z-index: 3; transition: transform .16s, filter .16s, box-shadow .16s; pointer-events: none; }
.piece::before { content: ""; position: absolute; inset: 11%; border: 1.5px solid #92653f8c; border-radius: 50%; box-shadow: 0 1px 0 #f7d1ac90, inset 0 1px 1px #f5c89e80; }
.piece::after { content: ""; position: absolute; inset: 18%; border: 1px solid #f5cea884; border-radius: 50%; box-shadow: 0 -1px 1px #7a4a2940, inset 0 -1px 1px #8d5c3830; background: linear-gradient(155deg, #fff1, transparent 70%); }
.piece.ivory { --piece-edge: #aaa893; --piece-shadow: #b6b29b; color: #8c8b74; background: radial-gradient(ellipse at 36% 24%, #f3efda 0, #e1dfc9 50%, #cacdb6 100%); border-color: #e8e7d0; box-shadow: 0 4px 0 var(--piece-edge), 0 6px 5px #071d1b9e, inset 0 1px 2px #fff, inset 0 -2px 3px var(--piece-shadow); }
.piece.ivory::before { border-color: #b7b69d; box-shadow: 0 1px 0 #fffff2c9, inset 0 1px 1px #fffef480; }
.piece.ivory::after { border-color: #ffffeb9c; box-shadow: 0 -1px 1px #a4a28a66, inset 0 -1px 1px #b4b29740; }
.piece.king { box-shadow: 0 2px 0 var(--piece-edge), 0 3px 0 #f1d1a166, 0 6px 0 var(--piece-edge), 0 8px 6px #071d1b9e, inset 0 1px 2px #fff9, inset 0 -2px 3px var(--piece-shadow); }
.crown-glyph { width: 40%; height: 35%; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; fill: none; position: relative; z-index: 2; transform: translateY(-2%); filter: drop-shadow(0 1px 0 #fff5); }
.piece.arriving { opacity: 0; }
.moving-piece, .captured-ghost { position: absolute; width: 9.625%; height: 9.625%; z-index: 8; will-change: transform, opacity; transition: none; }
.captured-ghost { z-index: 5; }
.empty-table-overlay { position: absolute; z-index: 10; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; border-radius: 5px; background: #101c20b3; backdrop-filter: blur(3px); text-align: center; padding: 20px; }
.empty-table-overlay h3 { font: 400 49px/1.2 var(--serif); letter-spacing: -1.8px; margin: 12px 0; }
.empty-table-overlay p { color: #c4c9b9; font-size: 13px; line-height: 1.7; }
.empty-table-overlay .primary-button { margin-top: 23px; min-width: 167px; justify-content: space-between; }
.preview-label { position: absolute; bottom: 25px; font-size: 8px; letter-spacing: .7px; color: #b1c0adab; }
.board-loading { position: absolute; inset: 0; z-index: 11; background: #142124dd; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 18px; font-size: 11px; color: #abb6a4; letter-spacing: .5px; }
.loading-orbit { width: 34px; height: 34px; border: 1px solid #b9bba332; border-top-color: var(--copper); border-radius: 50%; animation: orbit 1.8s linear infinite; }
.board-tools { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; gap: 10px; min-height: 39px; }
.board-instruction { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 10px; color: var(--muted); }
.instruction-dot { width: 4px; height: 4px; border-radius: 50%; background: #96a88d; flex: none; }
.board-instruction.attention { color: #d3b18b; }
.board-instruction.attention .instruction-dot { background: var(--copper); }
.board-instruction.attention .instruction-dot { border-radius: 0; transform: rotate(45deg); }
.inline-button { background: transparent; font-size: inherit; color: #b8bea9; padding: 0; border-bottom: 1px solid #a1aa8929; line-height: 1.7; white-space: nowrap; }
.inline-button:hover { color: var(--copper-light); border-color: var(--copper); }
#cancel-move { color: var(--copper-light); margin-left: 2px; }
.board-utilities { display: flex; gap: 2px; }
.board-utilities .icon-button { width: 30px; height: 32px; }
.board-utilities .icon-button svg { width: 16px; height: 16px; }
.number-button { font-size: 19px; font-weight: 300; font-family: var(--serif); }
.replay-bar { border-top: 1px solid var(--line); margin-top: 13px; padding-top: 18px; }
.replay-caption { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.replay-caption .eyebrow { color: var(--muted); font-size: 8px; letter-spacing: 1.7px; }
#replay-label { color: var(--muted); font-size: 10px; }
.replay-controls { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.replay-controls .icon-button { width: 28px; height: 31px; }
#replay-slider { appearance: none; width: 100%; min-width: 0; height: 3px; border-radius: 2px; background: #52665a4d; outline-offset: 7px; cursor: pointer; accent-color: var(--copper); margin: 0; }
#replay-slider::-webkit-slider-thumb { appearance: none; height: 10px; width: 10px; border-radius: 50%; background: var(--copper); box-shadow: 0 0 0 3px #111b1f; }
#replay-slider::-moz-range-thumb { height: 10px; width: 10px; border: 0; border-radius: 50%; background: var(--copper); }
#replay-slider:disabled { opacity: .4; cursor: default; }
.live-button { font-size: 10px; display: flex; align-items: center; gap: 5px; flex: none; background: #96ab7f10; color: #a5b394; padding: 5px 9px; border: 1px solid #9eab7d20; border-radius: 3px; margin-left: 5px; }
.live-button:disabled { opacity: .75; }
.live-dot { width: 3px; height: 3px; background: currentColor; border-radius: 50%; }
.live-button.is-history { color: var(--copper-light); border-color: #c4997755; }
.board-footnote { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 9px; color: #6d7d72; margin-top: 26px; flex-wrap: wrap; }
.board-footnote > span:first-child { font-size: 7px; letter-spacing: 1.5px; }
.board-footnote .inline-button { margin-left: 10px; font-size: 9px; color: #9aa68f; }
.footnote-dot { color: #52665a; }
.sidebar { padding-top: 9px; min-width: 0; }
.turn-panel { position: relative; padding: 22px 0 26px; border-top: 1px solid #c4997766; }
.turn-panel::before { content: ""; position: absolute; width: 36px; height: 2px; background: var(--copper); top: -1px; left: 0; }
.turn-kicker { display: flex; align-items: center; gap: 7px; font-size: 8px; letter-spacing: 1.75px; color: var(--copper); font-weight: 600; min-height: 13px; }
.turn-dot { width: 4px; height: 4px; background: currentColor; border-radius: 50%; flex: none; }
.turn-dot.thinking { animation: breathe 2s ease-in-out infinite; }
.turn-dot.paused { border-radius: 1px; width: 4px; height: 6px; box-shadow: 3px 0 0 currentColor; margin-right: 3px; }
.move-number { margin-left: auto; color: var(--muted); font-size: 8px; letter-spacing: 1px; font-weight: 400; }
.turn-panel h2 { font: 400 34px/1.22 var(--serif); letter-spacing: -.8px; margin-top: 15px; max-width: 330px; }
.turn-panel > p { font-size: 11px; line-height: 1.85; color: #99a89b; margin-top: 13px; max-width: 290px; }
.turn-extra { font-family: var(--serif); color: #c7c9b6; font-size: 16px; line-height: 1.6; border-left: 1px solid #c4997755; padding-left: 14px; margin-top: 18px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 180px; overflow-y: auto; }
.kairo-controls { display: flex; align-items: center; gap: 19px; margin-top: 20px; }
.kairo-controls .secondary-button { font-size: 10px; min-height: 34px; padding: 7px 14px; }
.kairo-controls .text-button { font-size: 10px; color: var(--muted); }
.rematch-button { margin-top: 20px; }
.record-panel { border-top: 1px solid var(--line); }
.record-tabs { display: flex; align-items: center; gap: 28px; border-bottom: 1px solid var(--line); }
.record-tab { position: relative; font-size: 11px; color: var(--muted); background: transparent; padding: 17px 0 15px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.record-tab::after { content: ""; position: absolute; height: 1px; bottom: -1px; inset-inline: 0; background: transparent; }
.record-tab.active { color: var(--ink); }
.record-tab.active::after { background: var(--copper); }
.record-tab:hover { color: var(--ink); }
.tab-count { font-size: 8px; border-radius: 3px; background: #a0a98d13; color: #94a089; padding: 1px 5px; }
.record-tab-ornament { margin-left: auto; font-size: 18px; color: #5a7061; }
.unread-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--copper); }
.ledger-head { display: grid; grid-template-columns: 38px 1fr 1fr; gap: 10px; padding: 17px 10px 12px 0; font-size: 7px; letter-spacing: 1.2px; color: #738579; }
.ledger-head span { display: flex; align-items: center; gap: 7px; }
.ledger-head span:first-child { justify-content: center; }
.tiny-piece { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #be916f; border: 1px solid #dcaf8780; box-shadow: 0 1px 0 #79573f; flex: none; }
.tiny-piece.ivory { background: #d8ddc5; border-color: #eff2d870; box-shadow: 0 1px 0 #909980; }
.move-ledger { min-height: 216px; max-height: 267px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; scrollbar-color: #5c726043 transparent; }
.ledger-row { display: grid; grid-template-columns: 38px 1fr 1fr; gap: 10px; align-items: center; min-height: 39px; border-bottom: 1px solid #a5b39b0b; }
.ledger-row:nth-child(even) { background: #869b8006; }
.ledger-number { color: #6e8273; font-size: 10px; text-align: center; font-variant-numeric: tabular-nums; }
.ledger-move { display: flex; align-items: center; gap: 7px; padding: 7px 3px; font: 12px/1.5 var(--serif); font-variant-numeric: tabular-nums; letter-spacing: .8px; color: #bec9b7; background: transparent; border-radius: 2px; min-height: 34px; text-align: left; }
.ledger-move:hover { background: #c4997713; color: var(--ink); }
.ledger-move.viewing { color: var(--copper-light); background: #c4997713; }
.ledger-move.latest { color: #e0c1a1; }
.ledger-move .crown-glyph { width: 11px; height: 11px; stroke-width: 1.8; }
.ledger-blank { color: #4b6255; font-size: 10px; padding-left: 3px; }
.record-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 200px; padding: 20px 8px; color: #7c907e; }
.record-empty svg { height: 32px; width: 32px; fill: none; stroke: #657c67; stroke-width: 1; margin-bottom: 18px; }
.record-empty p { font-family: var(--serif); font-size: 16px; color: #a5b39b; }
.record-empty > span { display: block; font-size: 10px; margin-top: 8px; line-height: 1.7; max-width: 230px; }
.message-list { min-height: 160px; max-height: 283px; overflow-y: auto; padding: 4px 0 0; scrollbar-width: thin; scrollbar-color: #5c726043 transparent; }
.message-item { border-bottom: 1px solid #a5b39b0c; padding: 17px 0; }
.message-heading { display: flex; align-items: center; gap: 7px; font-size: 9px; color: var(--copper); }
.message-heading svg { height: 13px; width: 13px; fill: none; stroke: currentColor; stroke-width: 1; }
.message-heading time { margin-left: auto; color: #6f8474; font-size: 8px; }
.message-item p { white-space: pre-wrap; overflow-wrap: anywhere; color: #b6c1b0; font-size: 12px; line-height: 1.85; margin-top: 8px; }
.message-item.kairo p { font-family: var(--serif); font-size: 17px; color: #d4d7c1; }
.message-item.system p { color: var(--muted); font-size: 10px; }
.note-form { border-top: 1px solid var(--line); padding-top: 17px; margin-top: 10px; }
.note-form label { display: block; font-size: 9px; color: #abb7a1; margin-bottom: 10px; }
.note-input-wrap { border: 1px solid #8da28227; background: #071b1a22; border-radius: 4px; padding: 11px 10px 7px 12px; display: flex; align-items: flex-end; gap: 8px; }
.note-input-wrap:focus-within { border-color: #c4997770; }
.note-input-wrap textarea { padding: 0; border: 0; resize: vertical; width: 100%; font-size: 11px; line-height: 1.7; min-height: 41px; max-height: 170px; background: transparent; outline: none; }
.note-input-wrap textarea::placeholder { color: #657d6b; }
.note-send { width: 27px; height: 28px; border-radius: 3px; background: #bfa077; color: #172a23; flex: none; display: grid; place-items: center; margin-bottom: 3px; }
.note-send svg { height: 17px; width: 17px; }
.note-help { font-size: 8px; line-height: 1.8; color: #6d8271; margin-top: 8px; }
.pieces-panel { border-top: 1px solid var(--line); padding-top: 21px; margin-top: 23px; }
.small-section-heading { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.small-section-heading h3 { font-size: 8px; letter-spacing: 1.5px; font-weight: 500; color: #9caa95; }
.small-section-heading > span { font-family: var(--serif); font-size: 10px; font-style: italic; color: #6d8271; }
.capture-row { display: flex; align-items: center; justify-content: space-between; min-height: 40px; color: #a2b19a; font-size: 10px; }
.capture-row:first-of-type { margin-top: 9px; }
.capture-row > div { display: flex; align-items: center; gap: 16px; }
.capture-row > div > span:first-child { min-width: 52px; max-width: 100px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.captured-pieces { display: flex; align-items: center; padding-left: 3px; min-height: 18px; }
.captured-pieces .tiny-piece { width: 15px; height: 15px; margin-left: -3px; box-shadow: 0 1px 0 #334437; }
.captured-pieces.empty-captures::before { content: "—"; color: #536b5a; font-size: 12px; }
.capture-total { color: #6f8472; font-size: 10px; font-variant-numeric: tabular-nums; }
.capture-explanation { font-size: 8px; color: #607866; margin-top: 5px; }
.table-actions { display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); margin-top: 24px; padding-top: 19px; }
.export-menu { position: relative; font-size: 10px; color: #879c85; }
.export-menu summary { display: flex; align-items: center; gap: 7px; cursor: pointer; list-style: none; min-height: 30px; }
.export-menu summary::-webkit-details-marker { display: none; }
.export-menu summary svg { width: 15px; height: 15px; }
.export-menu summary > span { margin-left: 5px; font-size: 11px; }
.export-menu summary:hover { color: var(--ink); }
.export-options { position: absolute; bottom: 40px; left: 0; width: 200px; padding: 7px; border: 1px solid #9aac8a33; background: #1c2c28; border-radius: 4px; z-index: 15; box-shadow: 0 8px 30px #0006; }
.export-options a { display: flex; flex-direction: column; gap: 3px; padding: 10px; border-radius: 2px; color: #d3d7c1; font-size: 11px; }
.export-options a:hover { background: #9aac8a10; }
.export-options a span { color: #7c947c; font-size: 9px; }
.resign-button { font-size: 10px; color: #9b9782; min-height: 30px; }
.resign-button > span { margin-left: 5px; font-size: 13px; }
.room-footer { display: flex; align-items: center; gap: 12px; padding: 44px 0 30px; margin-top: 34px; border-top: 1px solid #90a6820c; }
.footer-mark { color: #687d65; font-size: 23px; line-height: 1; }
.room-footer p { color: #789074; font-family: var(--serif); font-size: 13px; font-style: italic; }
.footer-rule { font-size: 7px; letter-spacing: 2.2px; margin-left: auto; color: #526b55; }
.connection-banner { display: flex; align-items: center; gap: 12px; font-size: 11px; padding: 12px 16px; margin-top: 16px; border: 1px solid #d3a57944; background: #c4997710; border-radius: 4px; color: #d5bfa0; }
.connection-banner .text-button { margin-left: auto; flex: none; font-size: 10px; text-decoration: underline; text-underline-offset: 3px; }
.connection-mark { display: inline-grid; place-items: center; width: 17px; height: 17px; border: 1px solid #c4997770; border-radius: 50%; font-size: 10px; flex: none; }
.pending-recovery { display: flex; align-items: center; justify-content: space-between; gap: 15px; border: 1px solid #c4997755; padding: 15px; background: #c4997710; border-radius: 4px; margin: 15px 0; }
.pending-recovery strong { color: #dfc09c; font-size: 11px; font-weight: 500; }
.pending-recovery p { font-size: 10px; color: #acb09b; margin-top: 4px; line-height: 1.7; }
.pending-recovery .secondary-button { flex: none; font-size: 10px; min-height: 36px; padding: 8px 12px; }
.room-dialog { width: min(500px, calc(100vw - 32px)); padding: 0; border: 1px solid #9aa68a36; border-radius: 9px; background: radial-gradient(ellipse at 0 0, #3c4e3829, transparent 70%), #172425; color: var(--ink); box-shadow: 0 30px 100px #0009; max-height: calc(100dvh - 48px); scrollbar-width: thin; scrollbar-color: #69856855 transparent; }
.room-dialog::backdrop { background: #081115c9; backdrop-filter: blur(8px); }
.room-dialog[open] { animation: dialog-in .22s ease-out; }
.dialog-body { padding: 43px 40px 35px; }
.dialog-close { position: absolute; top: 10px; right: 12px; color: var(--muted); font-size: 25px; line-height: 1; font-weight: 300; }
.room-dialog h2 { font: 400 42px/1.15 var(--serif); letter-spacing: -1.7px; margin-top: 11px; }
.dialog-description { margin-top: 14px; font-size: 12px; line-height: 1.8; color: #9cac99; }
.dialog-emblem { display: block; width: 41px; height: 41px; color: var(--copper); margin-bottom: 34px; }
.login-dialog { width: min(440px, calc(100vw - 32px)); }
.login-dialog form { margin-top: 30px; }
.field-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 10px; color: #b7c0a9; margin-bottom: 9px; }
.field-label span { font-size: 9px; color: #688269; }
.text-input { display: block; width: 100%; border: 1px solid #8da28237; border-radius: 4px; min-height: 45px; font-size: 12px; background: #0d1c1b70; padding: 11px 13px; }
.text-input::placeholder { color: #657c67; }
.text-input:focus { border-color: #c4997780; outline: none; box-shadow: 0 0 0 2px #c4997713; }
.login-dialog .primary-button { margin-top: 20px; }
.dialog-footnote { font: italic 13px var(--serif); color: #6d866b; text-align: center; margin-top: 29px; }
.choice-field { border: 0; padding: 0; margin: 27px 0 0; }
.choice-field legend { padding: 0; font-size: 10px; color: #b7c0a9; margin-bottom: 10px; }
.mode-choices { display: grid; gap: 8px; }
.choice-card, .side-choice { display: flex; align-items: center; gap: 14px; position: relative; border: 1px solid #8da28229; background: #90a87c04; border-radius: 4px; cursor: pointer; transition: border-color .18s, background .18s; }
.choice-card { min-height: 69px; padding: 12px 14px; }
.choice-card input, .side-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-card:has(input:checked), .side-choice:has(input:checked) { border-color: #c4997780; background: #c499770c; }
.choice-card:has(input:focus-visible), .side-choice:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.choice-card:hover, .side-choice:hover { border-color: #98ad8055; }
.choice-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 27px; height: 30px; color: #a0b392; }
.choice-icon svg { height: 24px; width: 24px; stroke: currentColor; fill: none; stroke-width: 1; }
.orbital-choice { font-size: 33px; color: var(--copper); }
.choice-card strong, .side-choice strong { display: block; font-size: 12px; font-weight: 500; color: #d6dcca; }
.choice-card small, .side-choice small { display: block; font-size: 9px; margin-top: 4px; color: #809679; line-height: 1.6; }
.radio-mark { width: 13px; height: 13px; border: 1px solid #80967955; border-radius: 50%; margin-left: auto; flex: none; }
input:checked ~ .radio-mark { border-color: var(--copper); box-shadow: inset 0 0 0 3px #26332a; background: var(--copper); }
.bridge-notice { font-size: 10px; line-height: 1.7; color: #b0a88b; border-left: 1px solid #c4997770; padding-left: 12px; margin-top: 14px; }
.side-field { margin-top: 21px; }
.side-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.side-choice { padding: 14px 11px; gap: 10px; min-height: 70px; }
.sample-piece { width: 30px; height: 30px; flex: none; }
.sample-piece::before { border-width: 1px; }
.side-choice strong { font-size: 11px; }
.side-choice small { font-size: 8px; max-width: 95px; }
.side-choice .radio-mark { width: 11px; height: 11px; }
#new-form > .field-label { margin-top: 24px; }
#new-form > .primary-button { margin-top: 23px; }
.form-error { color: #e0ac92; font-size: 11px; line-height: 1.7; margin: 12px 0 0; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; }
.confirm-actions button { font-size: 11px; }
.saved-dialog { margin-right: max(20px, calc((100vw - 1328px) / 2 + 20px)); margin-left: auto; width: min(460px, calc(100vw - 24px)); height: calc(100dvh - 40px); max-height: none; }
.saved-dialog .dialog-body { padding: 45px 30px 30px; }
.saved-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 25px; padding: 17px 0; }
.saved-stat { text-align: center; border-right: 1px solid var(--line); }
.saved-stat:last-child { border: 0; }
.saved-stat strong { font: 400 23px var(--serif); color: #cecfb8; display: block; }
.saved-stat span { font-size: 8px; letter-spacing: .5px; color: #769173; display: block; margin-top: 4px; }
.saved-list { margin: 12px 0 23px; }
.saved-game { display: flex; align-items: center; gap: 13px; padding: 20px 3px; width: 100%; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.saved-game:hover { background: #a9b89005; }
.saved-game.current { background: #c4997708; }
.saved-game-icon { width: 32px; height: 32px; flex: none; display: grid; place-items: center; color: var(--copper); }
.saved-game-icon svg { width: 30px; height: 30px; stroke-width: 1; }
.saved-game-copy { min-width: 0; flex: 1; }
.saved-game-title { display: block; font: 400 19px/1.4 var(--serif); color: #d5d9c4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved-game-meta { display: block; color: #819c7c; font-size: 9px; margin-top: 5px; }
.saved-game-status { color: #bfa27b; font-size: 9px; flex: none; text-align: right; }
.saved-game-status span { display: block; font-size: 15px; margin-top: 5px; }
.rules-dialog { width: min(580px, calc(100vw - 32px)); }
.rules-list { margin: 24px 0; padding-left: 18px; display: grid; gap: 17px; color: #97ac8f; font-size: 11px; line-height: 1.85; }
.rules-list li { padding-left: 5px; }
.rules-list li::marker { color: var(--copper); font-family: var(--serif); }
.rules-list strong { color: #d2d8c0; font-weight: 500; }
.rules-keyboard { padding: 16px 0 22px; border-top: 1px solid var(--line); font-size: 10px; line-height: 1.8; color: #8ea184; }
.rules-keyboard strong { display: block; color: #bec9ac; font-size: 11px; margin-bottom: 6px; font-weight: 500; }
.toast-stack { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: calc(100vw - 32px); pointer-events: none; }
.toast { background: #26392f; color: #e1dfc5; border: 1px solid #b0bb8c44; padding: 12px 18px; border-radius: 5px; box-shadow: 0 8px 30px #0005; font-size: 11px; text-align: center; animation: toast-in .2s ease-out; white-space: normal; width: max-content; max-width: 100%; }
.toast.error { border-color: #c4997766; background: #3b3329; }
.skip-link { position: fixed; left: 20px; top: -100px; background: var(--copper); color: #142023; z-index: 100; padding: 12px 18px; font-size: 12px; border-radius: 3px; }
.skip-link:focus { top: 10px; }
.noscript-message { position: fixed; inset: auto 15px 15px; background: #c49977; color: #172425; padding: 20px; z-index: 100; text-align: center; }
body.focus-mode .intro, body.focus-mode .sidebar, body.focus-mode .room-footer { display: none; }
body.focus-mode .table-layout { grid-template-columns: minmax(0, 700px); justify-content: center; margin-top: 30px; padding-bottom: 28px; }
body.focus-mode .table-heading { margin-bottom: 16px; }
body.focus-mode .site-header { height: 76px; }

@keyframes breathe { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 1500px) {
  .page-shell { max-width: 1400px; padding-inline: 80px; }
  .table-layout { grid-template-columns: minmax(0, 700px) minmax(280px, 360px); gap: 80px; }
  .intro { padding-top: 50px; padding-bottom: 47px; }
  .turn-panel h2 { font-size: 37px; }
  .move-ledger { max-height: 307px; min-height: 260px; }
}

@media (max-width: 1100px) {
  .page-shell { padding: 0 36px; }
  .table-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 35px; }
  .site-header { height: 85px; }
  .intro { padding-top: 35px; padding-bottom: 34px; }
  .brand-place { display: none; }
  .brand-divider { display: none; }
  h1 { font-size: 86px; }
  .turn-panel h2 { font-size: 31px; }
  .record-tabs { gap: 23px; }
  .move-ledger { min-height: 175px; max-height: 220px; }
  .board-frame { padding: 11px; }
  .board-frame::before { inset: 5px; }
  .player-name-text { max-width: 145px; }
  .player-material { gap: 8px; }
  .board-instruction { font-size: 9px; }
  .board-utilities { gap: 0; }
  .board-utilities .icon-button { width: 28px; }
  .table-heading h2 { max-width: 270px; font-size: 21px; }
  .board-footnote { font-size: 8px; gap: 5px; }
  .board-footnote .inline-button { margin-left: 5px; font-size: 8px; }
  .sidebar { padding-top: 9px; }
}

@media (max-width: 850px) {
  .page-shell { max-width: 680px; padding: 0 32px; }
  .board-surround::before { inset: 5% 0 -3%; }
  .table-layout { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .site-header { height: 82px; }
  .header-actions { gap: 16px; }
  .session-name { display: none; }
  .intro { padding: 34px 0 32px; }
  h1 { font-size: 82px; margin-bottom: 11px; }
  .invitation { font-size: 16px; }
  .room-rule { display: none; }
  .intro-aside { padding-bottom: 4px; }
  .new-table-button { min-height: 40px; padding: 9px 14px; font-size: 11px; gap: 11px; }
  .table-heading { margin-bottom: 18px; }
  .table-heading h2 { max-width: 400px; }
  .board-frame { padding: 13px; }
  .board-frame::before { inset: 7px; }
  .board-instruction { font-size: 10px; }
  .board-utilities .icon-button { width: 36px; height: 36px; }
  .board-utilities .icon-button svg { width: 17px; height: 17px; }
  .player-name-text { max-width: 220px; }
  .player-material { gap: 14px; }
  .board-footnote { font-size: 9px; }
  .board-footnote .inline-button { font-size: 9px; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; padding: 0; }
  .turn-panel { grid-column: 1 / -1; margin-bottom: 4px; }
  .turn-panel h2 { font-size: 32px; max-width: none; }
  .turn-panel > p { max-width: 490px; }
  .turn-extra { max-width: 510px; }
  .record-panel { grid-column: 1 / -1; }
  .move-ledger { max-height: 258px; min-height: 170px; }
  .pieces-panel { grid-column: 1 / -1; margin-top: 25px; }
  .table-actions { grid-column: 1 / -1; }
  .record-empty { min-height: 170px; }
  .room-footer { margin-top: 32px; padding-top: 30px; }
  .square-number { font-size: 9px; }
}

@media (max-width: 480px) {
  .page-shell { padding: 0 19px; }
  .site-header { height: 72px; gap: 16px; }
  .brand { gap: 9px; }
  .brand-mark { height: 29px; width: 29px; }
  .brand-name { font-size: 11px; letter-spacing: 2.8px; }
  .header-actions { gap: 10px; }
  .saved-tables-button { font-size: 10px; gap: 7px; }
  .saved-tables-button svg { width: 14px; height: 14px; }
  .small-count { min-width: 18px; height: 18px; font-size: 8px; }
  .icon-button.subtle { width: 24px; margin-left: -4px; }
  .icon-button.subtle svg { height: 15px; width: 15px; }
  .intro { padding-top: 27px; padding-bottom: 28px; align-items: flex-start; gap: 10px; position: relative; }
  .intro .eyebrow { font-size: 7px; letter-spacing: 2px; gap: 8px; }
  .tiny-diamond { width: 4px; height: 4px; }
  h1 { font-size: 68px; letter-spacing: -3.8px; margin: 8px 0 8px -3px; }
  .invitation { font-size: 13px; letter-spacing: .05px; }
  .intro-aside { position: absolute; right: 0; top: 8px; }
  .new-table-button { min-height: 35px; padding: 8px 11px; font-size: 9px; gap: 8px; }
  .button-plus { font-size: 19px; }
  .table-number { font-size: 7px; letter-spacing: 1.8px; }
  .table-heading { margin-bottom: 16px; gap: 12px; }
  .table-heading h2 { font-size: 21px; max-width: 230px; margin-top: 3px; }
  .save-state { font-size: 8px; gap: 5px; padding-top: 15px; }
  .player-rail { min-height: 38px; padding: 0 2px; gap: 10px; }
  .top-player { margin-bottom: 12px; }
  .bottom-player { margin-top: 15px; }
  .player-avatar { width: 31px; height: 31px; font-size: 18px; }
  .kairo-orbit { width: 25px; height: 25px; }
  .player-identity { gap: 9px; }
  .player-name { font-size: 12px; gap: 6px; }
  .player-name-text { max-width: 142px; }
  .player-you { font-size: 6px; letter-spacing: 1px; padding: 1px 4px; }
  .player-subtitle { font-size: 9px; margin-top: 2px; }
  .player-material { font-size: 9px; gap: 10px; }
  .material-count { gap: 4px; }
  .material-count svg { width: 14px; height: 12px; }
  .material-count .tiny-piece { width: 10px; height: 10px; }
  .player-turn-label { font-size: 6px; letter-spacing: .6px; }
  .board-frame { padding: 9px; border-radius: 4px; }
  .board-frame::before { inset: 4px; }
  .piece { width: 79%; height: 79%; box-shadow: 0 3px 0 var(--piece-edge), 0 5px 4px #071d1b99, inset 0 1px 2px #ffffff85, inset 0 -1px 2px var(--piece-shadow); }
  .piece.ivory { box-shadow: 0 3px 0 var(--piece-edge), 0 5px 4px #071d1b9e, inset 0 1px 2px #fff, inset 0 -1px 2px var(--piece-shadow); }
  .piece::before { border-width: 1px; }
  .piece.king { box-shadow: 0 2px 0 var(--piece-edge), 0 3px 0 #f1d1a166, 0 5px 0 var(--piece-edge), 0 7px 5px #071d1b9e, inset 0 1px 2px #fff9; }
  .moving-piece, .captured-ghost { width: 9.875%; height: 9.875%; }
  .square-number { font-size: 7px; top: 2px; left: 3px; }
  .square.last-target::after { top: 3px; right: 3px; width: 4px; height: 4px; }
  .board-tools { margin-top: 12px; align-items: center; gap: 4px; }
  .board-instruction { font-size: 8px; gap: 5px; flex-wrap: wrap; max-width: 210px; }
  .instruction-dot { width: 3px; height: 3px; }
  .board-utilities { gap: 0; }
  .board-utilities .icon-button { width: 30px; height: 38px; }
  .board-utilities .icon-button svg { width: 15px; height: 15px; }
  .board-utilities .number-button { font-size: 17px; }
  .replay-bar { padding-top: 16px; margin-top: 8px; }
  .replay-caption .eyebrow { font-size: 7px; letter-spacing: 1.4px; }
  #replay-label { font-size: 9px; }
  .replay-controls { gap: 6px; }
  .replay-controls .icon-button { height: 36px; width: 27px; }
  .live-button { font-size: 9px; padding: 6px 8px; }
  .board-footnote { gap: 6px; font-size: 8px; margin-top: 20px; }
  .board-footnote > span:first-child { font-size: 6px; letter-spacing: 1px; }
  .board-footnote .inline-button { font-size: 8px; margin-left: 4px; }
  .table-layout { gap: 30px; }
  .turn-panel { padding-top: 20px; padding-bottom: 25px; }
  .turn-panel h2 { font-size: 33px; }
  .turn-panel > p { font-size: 11px; max-width: none; }
  .turn-kicker { font-size: 7px; }
  .move-number { font-size: 7px; }
  .record-tabs { gap: 28px; }
  .record-tab { padding-top: 18px; padding-bottom: 16px; }
  .ledger-head { padding-top: 17px; }
  .ledger-move { min-height: 39px; font-size: 13px; }
  .pieces-panel { margin-top: 23px; }
  .capture-row { min-height: 43px; }
  .table-actions { margin-top: 23px; }
  .export-menu summary, .resign-button { min-height: 40px; }
  .room-footer { padding: 28px 0; margin-top: 32px; gap: 9px; }
  .room-footer p { font-size: 11px; }
  .footer-mark { font-size: 19px; }
  .footer-rule { display: none; }
  .empty-table-overlay h3 { font-size: 39px; }
  .empty-table-overlay p { font-size: 11px; }
  .empty-table-overlay .eyebrow { font-size: 7px; }
  .empty-table-overlay .primary-button { margin-top: 18px; min-height: 41px; font-size: 11px; }
  .preview-label { bottom: 18px; font-size: 6px; }
  .empty-table-overlay h3 { margin-block: 9px; }
  .pending-recovery { padding: 12px; gap: 10px; }
  .pending-recovery strong { font-size: 10px; }
  .pending-recovery p { font-size: 9px; }
  .pending-recovery .secondary-button { font-size: 9px; padding-inline: 9px; }
  .connection-banner { padding: 10px; font-size: 9px; gap: 8px; }
  .connection-banner .text-button { font-size: 9px; }
  .dialog-body { padding: 39px 24px 29px; }
  .room-dialog { max-height: calc(100dvh - 32px); }
  .room-dialog h2 { font-size: 36px; }
  .dialog-description { font-size: 11px; }
  .choice-card { gap: 11px; }
  .choice-card small { font-size: 8px; }
  .side-choice { padding: 12px 9px; gap: 8px; }
  .side-choice .radio-mark { display: none; }
  .sample-piece { width: 27px; height: 27px; }
  .side-choice strong { font-size: 10px; }
  .side-choice small { font-size: 7px; }
  .text-input, .note-input-wrap textarea { font-size: 16px; }
  .note-input-wrap textarea { min-height: 56px; }
  .note-send { width: 35px; height: 35px; }
  .note-help { font-size: 9px; }
  .note-form label { font-size: 10px; }
  .saved-dialog { margin: 12px; width: calc(100vw - 24px); height: calc(100dvh - 24px); max-height: none; }
  .saved-dialog .dialog-body { padding-inline: 24px; }
  .confirm-actions { flex-direction: column-reverse; }
  .confirm-actions button { min-height: 44px; width: 100%; }
  body.focus-mode .page-shell { padding-inline: 13px; }
  body.focus-mode .site-header { height: 65px; }
  body.focus-mode .table-layout { margin-top: 22px; }
}

@media (max-width: 360px) {
  .page-shell { padding-inline: 14px; }
  .intro-aside { top: 8px; }
  h1 { font-size: 63px; }
  .new-table-button { padding-inline: 8px; gap: 5px; }
  .table-heading h2 { max-width: 220px; font-size: 20px; }
  .save-state { font-size: 7px; }
  .player-name-text { max-width: 120px; }
  .board-utilities .icon-button { width: 27px; }
  .saved-tables-button { gap: 5px; font-size: 9px; }
  .header-actions { gap: 8px; }
}

/* Keep the complete live position and both players in one desktop viewport. */
@media (min-width: 851px) and (max-height: 1100px) {
  :root { --desktop-board-size: clamp(340px, calc(100dvh - 415px), 650px); }
  .page-shell { max-width: calc(var(--desktop-board-size) + 540px); }
  .site-header { height: 72px; }
  .intro { padding: 18px 0 12px; }
  h1 { font-size: 78px; line-height: 1.04; letter-spacing: -4px; margin: 7px 0 9px -4px; }
  .invitation { font-size: 16px; }
  .intro-aside { gap: 12px; }
  .table-layout { grid-template-columns: minmax(0, var(--desktop-board-size)) minmax(265px, 340px); gap: 72px; }
  .table-heading { margin-bottom: 8px; }
  .table-heading h2 { font-size: 21px; line-height: 1.25; margin-top: 3px; }
  .table-number { font-size: 7px; }
  .player-rail { min-height: 36px; }
  .top-player { margin-bottom: 10px; }
  .bottom-player { margin-top: 12px; min-height: 38px; }
  .player-avatar { height: 32px; width: 32px; }
  .sidebar { padding-top: 5px; }
  .turn-panel { padding-top: 18px; padding-bottom: 22px; }
  .turn-panel h2 { font-size: 32px; margin-top: 13px; }
  .move-ledger { min-height: 175px; max-height: 230px; }
  .record-empty { min-height: 175px; }
  .pieces-panel { margin-top: 20px; padding-top: 18px; }
  .table-actions { margin-top: 18px; padding-top: 15px; }
  body.focus-mode .page-shell { max-width: 1328px; }
  body.focus-mode .table-layout { grid-template-columns: minmax(0, min(700px, calc(100dvh - 270px))); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
  .square.light { background: Canvas; }
  .square.dark { background: ButtonFace; border: 1px solid GrayText; }
  .piece { background: CanvasText; outline: 2px solid Canvas; }
  .piece.ivory { background: Canvas; outline: 2px solid CanvasText; }
  .piece::before, .piece::after { border-color: GrayText; }
  .square.destination::after { border: 2px solid Highlight; }
  .square.selected { outline: 3px solid Highlight; outline-offset: -3px; }
  .player-turn-label, .turn-dot { color: Highlight; }
}
