:root {
  color-scheme: dark;
  --ink: #111210;
  --surface: #191a16;
  --surface-light: #20211b;
  --line: #35352a;
  --line-soft: #292a22;
  --text: #e5dfd0;
  --muted: #aaa799;
  --faint: #8e9280;
  --gold: #c2a06a;
  --red: #da785c;
  --jade: #80b3a3;
  --serif: "STKaiti", "Kaiti SC", "KaiTi", "Songti SC", "Noto Serif CJK SC", serif;
  --sans: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "Baskerville", "Iowan Old Style", "Palatino Linotype", serif;
  font-family: var(--sans);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; min-height: 100dvh; background: radial-gradient(ellipse at 3% 28%, #4c2b1e22, transparent 40%), radial-gradient(ellipse at 82% 76%, #3d59401b, transparent 40%), #111210; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .42; }
button, a, input { outline-offset: 5px; }
:focus-visible { outline: 2px solid var(--gold); }
button { border: 0; background: none; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
::selection { color: #f3ead7; background: #884b36; }
.scene-grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .35; background-image: repeating-linear-gradient(0deg, #fff2 0 1px, transparent 1px 4px); background-size: 5px 5px; mask-image: linear-gradient(transparent, #0003); }
.scene-glow { position: fixed; width: 650px; height: 650px; border: 1px solid #7a745519; border-radius: 50%; top: 260px; left: -340px; z-index: -1; pointer-events: none; box-shadow: 0 0 0 80px #786a3c04, 0 0 0 160px #786a3c04; }
.app-shell { width: min(1260px, calc(100% - 80px)); margin: auto; }
.site-header { height: 100px; display: flex; align-items: center; gap: 48px; border-bottom: 1px solid var(--line-soft); }
.brand { display: flex; gap: 14px; align-items: center; flex-shrink: 0; }
.brand-seal { width: 43px; height: 47px; display: grid; place-items: center; color: #e6c5a4; font: 29px var(--serif); background: #763829; border: 1px solid #a5644380; box-shadow: inset 0 0 0 4px #11121033; border-radius: 2px 1px 2px 4px; transform: rotate(-3deg); }
.brand-copy { display: grid; gap: 7px; }
.brand-copy strong { font: 27px/.9 var(--serif); letter-spacing: .12em; }
.brand-copy strong span { font-size: 17px; margin-left: 8px; color: var(--gold); letter-spacing: .1em; }
.brand-copy small { color: var(--faint); font-size: 8px; letter-spacing: .22em; }
.main-nav { display: flex; align-items: stretch; gap: 32px; height: 100%; font-size: 13px; }
.main-nav > * { display: flex; align-items: center; padding: 0; position: relative; color: var(--muted); white-space: nowrap; }
.main-nav .nav-current { color: var(--gold); }
.nav-current::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--gold); }
.main-nav button:hover { color: var(--text); }
.header-actions { display: flex; gap: 14px; align-items: center; margin-left: auto; }
.setting-toggle { display: flex; align-items: center; gap: 7px; padding: 7px 0; font-size: 11px; color: var(--faint); white-space: nowrap; }
.setting-toggle[aria-pressed="true"] { color: var(--gold); }
.sound-mark { width: 14px; height: 13px; position: relative; display: block; background: currentColor; clip-path: polygon(0 34%, 30% 34%, 70% 0, 70% 100%, 30% 66%, 0 66%); }
.fx-mark { font: 20px/1 var(--serif); }
.hub-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #887447a8;
  background: linear-gradient(180deg, #3a3424, #2a261c);
  color: #e4d2a8;
  font-size: 12px;
  letter-spacing: .06em;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 #d2b57422;
}
.hub-link:hover,
.hub-link:focus-visible {
  color: #f6e7c4;
  border-color: var(--gold);
  background: linear-gradient(180deg, #4a4130, #322c20);
  outline: none;
}
.battle-heading { padding: 32px 0 28px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.eyebrow { margin: 0; color: var(--gold); font-size: 10px; letter-spacing: .2em; font-weight: 500; }
.battle-heading .eyebrow { display: flex; align-items: center; gap: 8px; color: #999a87; margin-bottom: 14px; }
.battle-heading .eyebrow span { width: 18px; height: 1px; background: var(--gold); }
h1 { margin: 0; font: 31px/1.1 var(--serif); letter-spacing: .07em; font-weight: 400; }
h1 em, h2 em, .soul-copy em { font-style: normal; color: var(--gold); }
.battle-meta { display: grid; justify-items: end; gap: 10px; padding-bottom: 2px; }
.connection-badge { display: flex; align-items: center; gap: 7px; color: var(--jade); font-size: 10px; letter-spacing: .04em; }
.connection-badge i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px #80b3a350; }
.connection-badge[data-state="offline"] { color: var(--faint); }
.connection-badge[data-state="connecting"] { color: var(--gold); }
.time-control { color: var(--faint); font-size: 10px; }
.time-control b { font-weight: 400; color: var(--gold); padding: 0 3px; }
.battle-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 40px; align-items: start; }
.arena { min-width: 0; max-width: 700px; width: 100%; margin: 0 auto; }
.mobile-battle-controls { display: none; }
.player-strip { display: flex; align-items: center; gap: 12px; padding: 0 4px; min-height: 60px; }
.opponent-strip { margin-bottom: 16px; }
.self-strip { margin-top: 12px; }
.player-avatar { width: 45px; height: 45px; display: grid; place-items: center; position: relative; border: 1px solid #4f625349; color: var(--jade); background: radial-gradient(ellipse at 35% 20%, #4c6e4e2b, #1b211b); box-shadow: inset 0 0 0 4px #10141080; }
.player-avatar::after { content: ""; position: absolute; inset: 4px; border: 1px solid currentColor; opacity: .15; }
.player-avatar span { font: 28px/1 var(--serif); }
.player-avatar.red { border-color: #8e50374a; color: var(--red); background: radial-gradient(ellipse at 35% 20%, #943d292b, #2b2119); }
.player-copy { min-width: 0; }
.player-title { display: flex; align-items: center; gap: 8px; }
.player-title strong { font-weight: 500; font-size: 14px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-tag { display: inline-block; font-size: 8px; color: var(--faint); border: 1px solid var(--line); padding: 2px 5px; flex-shrink: 0; }
.player-detail { display: block; margin-top: 7px; font-size: 10px; color: var(--faint); }
.player-time { display: flex; align-items: baseline; gap: 10px; margin-left: auto; }
.clock-label { color: var(--faint); font-size: 9px; letter-spacing: .1em; }
.player-time strong { color: #bcbbae; font: 30px/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; min-width: 73px; text-align: right; }
.player-strip.is-turn .player-time strong { color: var(--gold); }
.player-strip.is-turn .player-avatar { box-shadow: 0 0 14px #c2a06a0d; }
.player-time strong.is-low { color: var(--red); }
.board-surround { position: relative; }
.board-rim { padding: 12px; border: 1px solid #5f5b3f6b; background: linear-gradient(145deg, #4a422127, transparent 23%, #27342a18), #1a1b16; box-shadow: 0 12px 40px #0005, inset 0 0 0 4px #111210b0, inset 0 0 0 5px #6b684d21; position: relative; }
.rim-corner { width: 24px; height: 24px; position: absolute; border: 1px solid #8b78537a; z-index: 4; pointer-events: none; }
.rim-corner.tl { top: 5px; left: 5px; border-right: 0; border-bottom: 0; }
.rim-corner.tr { top: 5px; right: 5px; border-left: 0; border-bottom: 0; }
.rim-corner.bl { bottom: 5px; left: 5px; border-right: 0; border-top: 0; }
.rim-corner.br { bottom: 5px; right: 5px; border-left: 0; border-top: 0; }
.chess-board { position: relative; width: 100%; aspect-ratio: 9 / 10; isolation: isolate; background: radial-gradient(ellipse at 50% 45%, #32322588, transparent 70%), linear-gradient(150deg, #24251d, #1e2019 45%, #1b201a); touch-action: pan-y; border: 1px solid #4d4e3745; }
.board-grid { z-index: 0; }
.board-targets { z-index: 3; }
.board-pieces { z-index: 2; }
.board-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 6; }
.board-watermark { position: absolute; top: 50%; left: 50%; display: flex; gap: 4px; align-items: center; transform: translate(-50%, -50%); color: #87734f3b; pointer-events: none; z-index: 0; }
.board-watermark span { font: 34px var(--serif); }
.board-watermark small { font: 21px var(--serif); }
.piece { display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid #9f7855; background: radial-gradient(ellipse at 40% 25%, #574531, #30281e 65%, #211d17); color: #e49870; box-shadow: 0 4px 0 #15120f, 0 5px 8px #0007, inset 0 1px 2px #ecba7533, inset 0 0 0 3px #483c29, inset 0 0 0 4px #b7833b33; transition: box-shadow 150ms, border-color 150ms; opacity: 1; }
.piece.black { color: #adc2ab; border-color: #687b60; background: radial-gradient(ellipse at 40% 25%, #3b4936, #242e24 65%, #1b221c); box-shadow: 0 4px 0 #0e1610, 0 5px 8px #0008, inset 0 1px 2px #bbd2a033, inset 0 0 0 3px #303b2b, inset 0 0 0 4px #85957533; }
.piece:disabled { opacity: 1; cursor: default; }
.piece-ring { position: absolute; inset: 12%; border: 1px solid currentColor; border-radius: 50%; opacity: .32; pointer-events: none; }
.piece-face { font: 400 calc(var(--board-cell, 70px) * .44)/1 var(--serif); position: relative; top: -1px; text-shadow: 0 1px 0 #000c; pointer-events: none; }
.piece[data-type="general"] .piece-ring { border-style: double; border-width: 3px; }
.piece.is-selected { z-index: 4; border-color: #efd098; box-shadow: 0 4px 0 #17140f, 0 0 0 3px #d5b37740, 0 0 22px #dca2513b, inset 0 0 0 3px #70542e; }
.piece.is-checked { border-color: #ed8065; box-shadow: 0 4px 0 #17140f, 0 0 0 3px #d57b4c50, 0 0 22px #e7523c55; }
.piece.is-ghost { z-index: 0; }
.piece:not(:disabled):hover { border-color: #e1bf87; box-shadow: 0 4px 0 #17140f, 0 0 14px #dca25135, inset 0 0 0 3px #483c29; }
.move-target, .capture-target { display: grid; place-items: center; padding: 0; border-radius: 50%; background: transparent; border: 0; }
.move-target::after { content: ""; width: 13%; height: 13%; border-radius: 50%; background: #caa467; box-shadow: 0 0 15px #dca66070; }
.move-target:hover::after { width: 20%; height: 20%; }
.capture-target { border: 1px solid #db9871; box-shadow: inset 0 0 14px #d5533b22, 0 0 12px #d5533b30; }
.capture-target::after { content: ""; position: absolute; inset: -3px; border: 1px dashed #dc976870; border-radius: 50%; }
.last-marker { border: 1px solid #cba56c33; border-radius: 50%; pointer-events: none; }
.last-marker.from { border-style: dashed; }
.last-marker.to { box-shadow: 0 0 0 3px #cba56c0c; }
.board-caption { display: flex; justify-content: space-between; margin-top: 11px; font-size: 9px; color: #878879; letter-spacing: .04em; padding: 0 1px; }
.board-caption > span { display: flex; align-items: center; gap: 6px; }
.board-caption b { font: 9px var(--serif); color: #676a59; margin: 0 4px; }
.legend-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--red); flex-shrink: 0; }
.legend-dot.black { background: var(--jade); }
.turn-banner { min-height: 73px; display: flex; align-items: center; gap: 13px; margin: 14px 0 0; padding: 13px 16px; border: 1px solid #6d57312a; background: linear-gradient(100deg, #8a5f2612, #1a1b161a); }
.turn-glyph { font: 27px/1 var(--serif); color: var(--gold); width: 29px; text-align: center; flex-shrink: 0; }
.turn-banner strong { font-size: 12px; font-weight: 500; letter-spacing: .05em; }
.turn-banner p { margin: 6px 0 0; font-size: 10px; color: var(--faint); line-height: 1.5; }
.turn-chip { margin-left: auto; white-space: nowrap; color: var(--gold); font: 10px var(--serif); border: 1px solid #6b57323b; padding: 5px 8px; }
.turn-banner[data-side="black"] .turn-glyph, .turn-banner[data-side="black"] .turn-chip { color: var(--jade); }
.turn-banner[data-check="true"] { border-color: #be594c66; background: #762c231b; }
.board-tools { display: flex; align-items: center; gap: 22px; margin-top: 20px; }
.board-tools button { color: var(--muted); font-size: 10px; padding: 2px 0; white-space: nowrap; }
.board-tools button span { font-size: 16px; color: var(--gold); padding-right: 4px; vertical-align: middle; }
.board-tools .tools-demo { margin-left: auto; }
.board-tools button:not(:disabled):hover { color: var(--gold); }
.board-help { color: #6f7264; font-size: 9px; margin: 13px 0 0; }
.war-room { display: grid; gap: 25px; }
.match-panel { background: linear-gradient(160deg, #32302722, transparent 38%), #191a16; border: 1px solid var(--line-soft); padding: 23px 24px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 19px; }
.panel-flourish { color: #786c4347; font: 26px/1 var(--serif); }
.mode-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; padding: 3px; border: 1px solid #393a2d; background: #12140f; margin-bottom: 27px; }
.mode-tabs button { font-size: 10px; padding: 10px 0; color: var(--faint); }
.mode-tabs button.active { color: #dcc495; background: #302d20; box-shadow: inset 0 0 0 1px #76623a25; }
.match-panel h2 { margin: 0 0 11px; color: #d5cbb6; font: 21px/1.25 var(--serif); font-weight: 400; }
.panel-intro { margin: 0 0 22px; font-size: 11px; color: #97998a; line-height: 1.9; }
.field-label { display: block; margin: 0 0 9px; font-size: 10px; color: #b0ab99; }
.text-field { width: 100%; min-width: 0; background: #11140f; color: #d7d0bc; border: 1px solid #393b2c; border-radius: 0; padding: 12px 13px; font-size: 11px; outline-offset: 2px; }
.text-field::placeholder { color: #737965; }
.text-field:focus { border-color: #9a7b4b; }
.primary-button { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 17px; min-height: 44px; background: linear-gradient(100deg, #8c4330, #733729); border: 1px solid #a7643d70; color: #f0d4b2; font-size: 12px; box-shadow: inset 0 1px 0 #d2a06920; }
.primary-button:not(:disabled):hover { background: linear-gradient(100deg, #a35038, #8c4330); border-color: #c48a5970; }
.primary-button span:last-child:not(:first-child) { color: #c89470; }
#create-room { width: 100%; margin-top: 13px; }
.lobby-toolbar { display: flex; justify-content: space-between; align-items: center; margin: 22px 0 12px; }
.room-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 280px; overflow: auto; }
.room-list:empty + #room-list-empty { display: block; }
.room-list:not(:empty) + #room-list-empty { display: none; }
.room-card { display: grid; gap: 10px; padding: 12px 13px; border: 1px solid #393b2c; background: #12140f; }
.room-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.room-card-id { font: 14px/1.2 var(--mono); letter-spacing: .08em; color: #d4b682; }
.room-card-status { font-size: 9px; color: var(--jade); }
.room-card-status.is-active { color: #c89470; }
.room-card-meta { font-size: 10px; color: #8d917f; line-height: 1.7; }
.room-card-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.room-card-actions button { flex: 1; min-width: 64px; padding: 8px 6px; font-size: 10px; }
.outline-button { min-height: 42px; padding: 11px 13px; border: 1px solid #59543a; color: #c4ae83; font-size: 11px; white-space: nowrap; }
.outline-button:not(:disabled):hover { background: #8b713214; border-color: var(--gold); }
.quiet-button { padding: 11px 14px; font-size: 11px; color: var(--muted); border: 1px solid var(--line); }
.quiet-button:hover { color: var(--text); }
.full-width { width: 100%; }
.or-divider { display: flex; align-items: center; gap: 11px; margin: 22px 0; }
.or-divider span { flex: 1; height: 1px; background: var(--line-soft); }
.or-divider small { color: #777c69; font-size: 9px; }
.join-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px; gap: 7px; }
.field-note { color: var(--faint); font-size: 9px; line-height: 1.8; margin: 11px 0 0; }
.text-button { color: var(--gold); font-size: 10px; padding: 0; }
.text-button:hover { color: #e3cba1; }
#watch-room { margin-top: 17px; }
.server-note { margin: 17px 0 0; padding: 12px; border-left: 2px solid #805b31; background: #805b310d; font-size: 10px; color: var(--muted); line-height: 1.9; }
.server-note code { font-size: 10px; color: var(--gold); }
.room-heading { display: flex; align-items: center; justify-content: space-between; }
.room-heading .field-label { margin: 0; }
.room-status { font-size: 9px; color: var(--jade); }
.room-code { font: 42px/1.2 var(--mono); letter-spacing: .13em; color: #d4b682; margin: 13px 0 15px; }
.room-occupants { display: grid; gap: 14px; margin-top: 23px; padding: 17px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.room-occupants > span { display: flex; align-items: center; gap: 9px; font-size: 11px; }
.room-occupants b { font-weight: 400; max-width: 155px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-occupants small { margin-left: auto; color: var(--faint); font-size: 9px; }
.room-bottom { display: flex; justify-content: space-between; margin: 18px 0 20px; }
.room-bottom > span { font-size: 9px; color: var(--faint); }
#claim-seat { margin-top: 12px; }
.practice-emblem { width: 64px; height: 68px; font: 39px/1 var(--serif); color: var(--gold); margin: 2px auto 25px; border: 1px solid #8874476b; outline: 1px solid #88744721; outline-offset: 5px; display: grid; place-items: center; background: radial-gradient(ellipse, #8a703015, transparent); }
.practice-specs { display: grid; gap: 9px; margin-bottom: 24px; color: var(--muted); font-size: 10px; }
.practice-specs span::before { content: ""; width: 4px; height: 4px; display: inline-block; border: 1px solid var(--gold); transform: rotate(45deg); margin: 0 10px 2px 2px; }
.history-panel { border: 1px solid var(--line-soft); background: #171914; padding: 20px 22px 16px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.section-heading h2 { font-size: 12px; font-weight: 400; letter-spacing: .08em; margin: 0; }
.section-heading > span { font-size: 9px; color: var(--faint); }
.history-columns { display: grid; grid-template-columns: 35px 1fr 1fr; gap: 5px; padding: 10px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); color: #999c87; font-size: 9px; }
.history-columns .legend-dot { width: 4px; height: 4px; vertical-align: middle; margin-right: 4px; }
.move-history { height: 177px; overflow: auto; scrollbar-width: thin; scrollbar-color: #45432e transparent; overscroll-behavior: contain; }
.empty-history { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.empty-history > span { color: #666847; font: 32px/1 var(--serif); }
.empty-history p { font: 14px var(--serif); margin: 12px 0 9px; color: #959b7e; }
.empty-history small { color: #686f5c; font-size: 9px; }
.history-row { display: grid; grid-template-columns: 35px 1fr 1fr; align-items: center; gap: 5px; padding: 10px 0; font-size: 10px; }
.history-row:nth-child(even) { background: #2c2e221f; }
.history-row > span:first-child { color: #7f856e; font: 12px var(--mono); }
.history-move { font-family: var(--serif); color: #c1a17c; display: flex; gap: 3px; align-items: center; }
.history-move.black { color: #a0b59d; }
.history-move small { font-size: 8px; color: #c08861; }
.history-move.is-latest { color: #ede0bc; }
.captured-line { border-top: 1px solid var(--line-soft); margin-top: 13px; padding-top: 13px; display: flex; gap: 11px; align-items: start; min-height: 32px; }
.captured-line > span { font-size: 9px; color: #868c75; padding-top: 3px; flex-shrink: 0; }
.captured-pieces { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.captured-pieces small { font-size: 9px; color: #737b65; padding-top: 3px; }
.captured-token { font: 12px var(--serif); display: grid; place-items: center; width: 21px; height: 21px; border: 1px solid #76553766; border-radius: 50%; color: #aa7455; opacity: .8; }
.captured-token.black { color: #96a28a; border-color: #66725566; }
.soul-feature { text-align: left; display: flex; align-items: center; gap: 18px; padding: 5px 1px 2px; }
.soul-character { display: grid; place-items: center; flex-shrink: 0; width: 60px; height: 60px; border: 1px solid #92714170; border-radius: 50%; box-shadow: inset 0 0 0 4px #141510, inset 0 0 0 5px #7c633832, 0 0 20px #9870360c; font: 37px var(--serif); color: #b8945d; transform: rotate(-12deg); background: radial-gradient(ellipse at 40% 20%, #5b44222e, #181911); }
.soul-copy { flex: 1; min-width: 0; }
.soul-copy small { color: var(--faint); font-size: 8px; }
.soul-copy strong { display: block; font: 19px/1.4 var(--serif); margin: 7px 0 10px; }
.soul-copy > span { display: flex; justify-content: space-between; color: #858a74; font-size: 8px; }
.soul-copy b { color: var(--gold); font-size: 12px; }
.soul-feature:hover .soul-character { border-color: var(--gold); color: #dfb97b; }
.site-footer { border-top: 1px solid var(--line-soft); margin-top: 38px; padding: 22px 0 29px; display: flex; justify-content: space-between; color: #727865; font-size: 9px; }
.site-footer i { margin: 0 8px; font-style: normal; }
.game-dialog { color: var(--text); width: min(660px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 35px; background: radial-gradient(ellipse at 0 0, #44342342, transparent 65%), #1a1d16; border: 1px solid #6c614151; box-shadow: 0 32px 100px #000a, inset 0 0 0 5px #11150f50; scrollbar-width: thin; scrollbar-color: #5e5638 #191c14; }
.game-dialog::backdrop { background: #080b09d9; backdrop-filter: blur(7px); }
.game-dialog[open] { animation: dialog-enter 240ms ease-out; }
.dialog-close { position: absolute; top: 15px; right: 16px; width: 27px; height: 27px; display: grid; place-items: center; color: var(--muted); font: 24px/1 var(--sans); padding: 0; }
.dialog-close:hover { color: var(--gold); }
.game-dialog > .eyebrow { margin-bottom: 16px; }
.game-dialog h2 { font: 31px/1.3 var(--serif); margin: 0 0 13px; }
.dialog-intro { color: var(--muted); font-size: 11px; line-height: 1.9; margin: 0 0 23px; }
.soul-tabs { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 22px; }
.soul-tabs button { color: var(--muted); border: 1px solid #454732; padding: 9px 0; font: 23px/1 var(--serif); }
.soul-tabs button.active { background: #70502a21; border-color: #aa834a99; color: var(--gold); }
.soul-detail > span { font: 18px/1.2 var(--serif); color: var(--gold); }
.soul-detail p { color: var(--muted); font-size: 11px; line-height: 1.8; margin: 9px 0 16px; }
.preview-arena { width: 100%; aspect-ratio: 2 / 1; position: relative; overflow: hidden; background: radial-gradient(ellipse at center, #363c2850, #141911); border: 1px solid #464e3280; --board-cell: 90px; }
.preview-grid { position: absolute; inset: 18px; opacity: .28; background: repeating-linear-gradient(0deg, #8e8d5e 0 1px, transparent 1px 48px), repeating-linear-gradient(90deg, #8e8d5e 0 1px, transparent 1px 48px); }
.preview-arena .piece { position: absolute; width: 65px; height: 65px; z-index: 3; pointer-events: none; }
.preview-river { position: absolute; top: 45%; left: 37%; font: 29px var(--serif); color: #62683f80; pointer-events: none; }
.preview-actions { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 8px; margin-top: 17px; }
.preview-actions .primary-button { justify-content: center; }
.rules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.rules-grid > div { display: flex; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.rules-grid b { width: 42px; flex-shrink: 0; font: 20px var(--serif); color: var(--gold); }
.rules-grid p { font-size: 10px; color: var(--muted); line-height: 1.8; margin: 0; }
.rules-note { margin-top: 24px; }
.rules-note strong { color: #cec0a1; font-size: 12px; font-weight: 400; }
.rules-note p { color: var(--muted); font-size: 10px; line-height: 1.9; margin: 8px 0 20px; }
.result-dialog { width: min(430px, calc(100% - 32px)); text-align: center; padding: 43px 35px 32px; }
.result-seal { width: 86px; height: 92px; display: grid; place-items: center; margin: 2px auto 28px; font: 58px/1 var(--serif); color: #e8c296; background: #783c2770; border: 1px solid #a77c4866; outline: 1px solid #a77c4826; outline-offset: 5px; box-shadow: inset 0 0 0 5px #351e1490; transform: rotate(-4deg); }
.result-dialog[data-winner="black"] .result-seal { background: #344b35; color: #b0cda9; border-color: #859968; }
.result-stats { display: flex; justify-content: center; gap: 29px; margin: 20px 0 28px; font-size: 11px; color: var(--muted); }
.result-stats b { font: 23px var(--mono); color: var(--gold); padding: 0 4px; }
#result-review { margin-top: 20px; }
.confirm-dialog { width: min(430px, calc(100% - 32px)); }
.confirm-dialog h2 { font-size: 27px; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.confirm-actions .primary-button { justify-content: center; }
.toast { position: fixed; bottom: max(25px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 20; color: #e9dabc; background: #302b1ef5; box-shadow: 0 9px 25px #0007; border: 1px solid #85703d80; font-size: 12px; line-height: 1.7; padding: 12px 20px; width: max-content; max-width: calc(100% - 32px); text-align: center; }
.noscript-note { position: fixed; inset: 40% 10% auto; z-index: 30; background: #342a1e; padding: 22px; color: var(--text); }
@keyframes dialog-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes reveal { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: no-preference) { .battle-heading { animation: reveal 500ms ease-out both; } .arena { animation: reveal 650ms 70ms ease-out both; } .war-room { animation: reveal 600ms 150ms ease-out both; } }
@media (min-width: 1440px) { .app-shell { width: min(1260px, calc(100% - 140px)); } .battle-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 60px; } .match-panel { padding: 26px; } .war-room { gap: 28px; } }
@media (min-width: 1024px) and (max-height: 950px) { .arena { max-width: 565px; } .battle-heading { padding-top: 25px; padding-bottom: 25px; } .site-header { height: 82px; } .board-rim { padding: 10px; } .player-strip { min-height: 47px; } .player-avatar { width: 39px; height: 41px; } .player-avatar span { font-size: 25px; } .opponent-strip { margin-bottom: 13px; } .self-strip { margin-top: 8px; } .turn-banner { min-height: 66px; margin-top: 11px; } .board-tools { margin-top: 15px; } }
@media (max-width: 1100px) { .app-shell { width: calc(100% - 56px); } .battle-layout { gap: 28px; grid-template-columns: minmax(0, 1fr) 310px; } .match-panel { padding: 20px; } .site-header { gap: 35px; } .main-nav { gap: 23px; } .header-actions { gap: 12px; } }
@media (max-width: 900px) { .app-shell { width: calc(100% - 40px); } .site-header { height: 83px; gap: 24px; } .main-nav { gap: 16px; font-size: 11px; } .brand-seal { width: 36px; height: 40px; font-size: 25px; } .brand-copy strong { font-size: 24px; } .brand-copy strong span { font-size: 14px; } .brand-copy small { font-size: 7px; } .battle-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 21px; } .match-panel { padding: 19px 17px; } .match-panel h2 { font-size: 19px; } .history-panel { padding: 18px; } .board-rim { padding: 8px; } .player-time { gap: 7px; } .clock-label { display: none; } .player-time strong { font-size: 27px; min-width: 63px; } .player-title { gap: 5px; } .player-title strong { font-size: 12px; max-width: 170px; } .player-detail { font-size: 9px; } .board-tools { gap: 15px; } .board-tools button { font-size: 9px; } .board-tools button span { font-size: 14px; } .soul-feature { gap: 12px; } .soul-character { width: 52px; height: 52px; font-size: 32px; } .soul-copy strong { font-size: 16px; } h1 { font-size: 28px; } }
@media (max-width: 700px) { .app-shell { width: calc(100% - 32px); } .site-header { height: 77px; gap: 16px; flex-wrap: wrap; } .brand { gap: 10px; } .brand-copy strong { font-size: 25px; } .brand-copy small { font-size: 6px; } .main-nav { margin-left: auto; font-size: 10px; gap: 15px; } .main-nav .nav-current { display: none; } .header-actions { gap: 13px; margin-left: 0; } .setting-toggle { font-size: 0; gap: 0; width: 16px; } .sound-mark { width: 15px; } .fx-mark { font-size: 21px; } .battle-heading { padding: 25px 0 24px; } h1 { font-size: 27px; letter-spacing: .015em; } .battle-heading .eyebrow { font-size: 8px; margin-bottom: 10px; } .battle-meta { gap: 8px; } .connection-badge { font-size: 8px; } .time-control { font-size: 8px; } .battle-layout { display: flex; flex-direction: column; gap: 28px; } .arena { max-width: 540px; } .war-room { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; } .match-panel { padding: 20px; } .soul-feature { grid-column: 1 / -1; padding-top: 3px; padding-bottom: 1px; justify-content: center; } .soul-copy { flex: 0 1 245px; } .history-panel { height: auto; } .mode-tabs { margin-bottom: 22px; } .player-strip { min-height: 46px; gap: 11px; } .player-avatar { width: 38px; height: 40px; } .player-avatar span { font-size: 25px; } .opponent-strip { margin-bottom: 12px; } .player-title strong { font-size: 12px; max-width: 200px; } .player-detail { margin-top: 6px; font-size: 9px; } .self-strip { margin-top: 10px; } .player-time strong { font-size: 29px; } .board-caption { font-size: 8px; } .turn-banner { margin-top: 14px; padding: 12px; } .turn-banner p { font-size: 9px; } .turn-banner strong { font-size: 11px; } .board-tools { margin-top: 16px; gap: 22px; } .board-tools button { font-size: 10px; } .board-tools button span { font-size: 15px; } .board-help { font-size: 8px; } .site-footer { margin-top: 29px; padding: 18px 0 24px; font-size: 8px; } }
@media (max-width: 480px) { .app-shell { width: calc(100% - 28px); } .site-header { gap: 12px; } .main-nav { gap: 12px; } .main-nav button { font-size: 9px; } .brand-copy strong { font-size: 22px; } .brand-copy strong span { font-size: 13px; margin-left: 5px; } .brand-copy small { letter-spacing: .15em; } .brand-seal { width: 32px; height: 36px; font-size: 23px; } .brand { gap: 9px; } .header-actions { gap: 10px; } .battle-heading { align-items: start; padding: 22px 0; } h1 { font-size: 23px; line-height: 1.3; } .battle-meta { padding-top: 5px; gap: 8px; } .connection-badge { max-width: 98px; line-height: 1.5; } .time-control { font-size: 7px; white-space: nowrap; } .battle-heading .eyebrow { letter-spacing: .18em; } .board-rim { padding: 7px; } .rim-corner { width: 20px; height: 20px; } .player-time strong { font-size: 28px; } .player-title strong { max-width: 160px; } .war-room { display: flex; flex-direction: column; gap: 22px; } .match-panel, .history-panel { width: 100%; padding: 23px; } .mode-tabs button { font-size: 11px; } .panel-intro { font-size: 11px; } .field-note { font-size: 9px; } .match-panel h2 { font-size: 23px; } .move-history { height: 165px; } .history-row { font-size: 12px; padding: 11px 0; } .history-columns { font-size: 10px; padding: 12px 0; } .history-columns, .history-row { grid-template-columns: 48px 1fr 1fr; } .soul-feature { width: 100%; justify-content: start; padding: 0 7px; gap: 20px; } .soul-character { width: 61px; height: 61px; font-size: 38px; } .soul-copy { flex: 1; } .soul-copy strong { font-size: 23px; } .soul-copy small, .soul-copy > span { font-size: 9px; } .site-footer { gap: 12px; font-size: 7px; flex-wrap: wrap; } .board-tools { gap: 15px; } .board-tools button { font-size: 9px; } .board-tools button span { padding-right: 2px; } .turn-glyph { font-size: 24px; width: 24px; } .turn-chip { font-size: 9px; padding: 5px 6px; } .game-dialog { padding: 28px 23px; } .game-dialog h2 { font-size: 27px; } .soul-tabs { gap: 4px; } .soul-tabs button { padding: 9px 0; font-size: 23px; } .preview-actions { gap: 6px; grid-template-columns: 1fr 1.2fr 1fr; } .preview-actions > button { font-size: 9px; padding: 12px 8px; } .preview-arena { aspect-ratio: 1.7 / 1; --board-cell: 73px; } .rules-grid { grid-template-columns: 1fr; } .rules-grid b { width: 49px; } .rules-grid p { font-size: 11px; } .result-dialog { padding-top: 39px; } }
@media (max-width: 360px) { .main-nav { gap: 9px; } .main-nav button { font-size: 8px; } .brand-copy small { display: none; } .brand-copy strong { font-size: 22px; } .brand-copy strong span { display: none; } .header-actions { gap: 8px; } .battle-meta { max-width: 84px; } h1 { font-size: 20px; } .board-tools { gap: 13px; } .board-tools button { font-size: 8px; } .player-title strong { max-width: 129px; } .match-panel, .history-panel { padding: 19px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (max-width: 700px) {
  .mobile-battle-controls { display: grid; grid-template-columns: 1fr 1fr 1fr 65px; gap: 0; padding: 3px; border: 1px solid var(--line); background: #151711; margin-bottom: 19px; }
  .mobile-battle-controls button { font-size: 10px; color: var(--muted); padding: 9px 0; }
  .mobile-battle-controls button.active { background: #302d20; color: #dcc495; }
  #mobile-room-action { border-left: 1px solid var(--line); color: var(--gold); }
  #mobile-room-action span { font-size: 12px; }
}
