:root {
  --paper: #f5f3ed;
  --ink: #283e34;
  --muted: #96978b;
  --green: #294e40;
  --green-light: #eaf0e9;
  --red: #b84d3c;
  --line: #e8e7df;
  --serif: 'STKaiti', 'KaiTi', 'Noto Serif SC', 'Songti SC', serif;
  --sans: 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 13px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
body::before { content: ''; position: fixed; z-index: -1; inset: 0; pointer-events: none; opacity: .15; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%239d967e' opacity='.25' filter='url(%23n)' d='M0 0h180v180H0z'/%3E%3C/svg%3E"); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button { border: 0; background: none; }
button:disabled { opacity: .36; cursor: not-allowed; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
button, a, input { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button, a, .switch-track { transition: color .2s, background .2s, border-color .2s, box-shadow .2s, transform .2s; }
button:not(:disabled):active { transform: translateY(1px); }
svg { display: block; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }
.site-header { height: 88px; border-bottom: 1px solid var(--line); max-width: 1360px; margin: auto; padding: 0 54px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-seal { width: 42px; height: 44px; display: grid; place-items: center; background: var(--red); color: #fbf4e5; border-radius: 8px 7px 9px 6px; font: 32px/1 var(--serif); outline: 1px solid #ffffff76; outline-offset: -5px; box-shadow: inset 0 0 0 2px #b05343; transform: rotate(-2deg); }
.brand-type { font: bold 25px/1.1 var(--serif); letter-spacing: 5px; }
.brand-type > span { display: block; font: 8px/1.1 Georgia, serif; letter-spacing: 1px; padding-top: 7px; }
.brand-divider { height: 24px; width: 1px; background: #dcded4; margin: 0 3px 0 6px; }
.brand-caption { color: #767c71; letter-spacing: 2px; font-size: 12px; }
.navigation { height: 100%; display: flex; align-items: stretch; gap: 34px; margin-left: -62px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 8px; font-size: 13px; color: #898d81; padding: 0 3px; }
.nav-link.active { color: var(--green); font-weight: 600; }
.nav-link.active::after { content: ''; height: 3px; background: var(--green); border-radius: 2px; position: absolute; bottom: 0; left: 2px; right: 2px; }
.nav-link:hover { color: var(--green); }
.header-end { display: flex; align-items: center; gap: 20px; }
.quiet-note { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #818978; letter-spacing: 1px; }
.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #799876; flex-shrink: 0; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #dfE3d8; border-radius: 50%; color: #70816f; }
.icon-button:hover { background: #e9ede4; }
.page { max-width: 1192px; padding: 34px 36px 0; margin: 0 auto; }
.page-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.eyebrow { margin: 0 0 7px; color: #8e927f; font-size: 10px; letter-spacing: 2px; }
.eyebrow > span { margin: 0 10px; color: #b3af9c; }
h1 { font: 33px/1.35 var(--serif); letter-spacing: 1px; margin: 0; font-weight: 500; }
h1 > span { color: var(--red); }
.heading-note { display: flex; align-items: center; gap: 13px; color: #9b9e8d; font-size: 10px; letter-spacing: 4px; line-height: 1.8; margin-right: 3px; }
.heading-note strong { font-weight: 400; color: #737d6b; }
.tiny-grid { width: 28px; height: 28px; border: 1px solid #b2b9a5; background: linear-gradient(to right, transparent 48%, #b2b9a5 49%, #b2b9a5 51%, transparent 52%), linear-gradient(to bottom, transparent 48%, #b2b9a5 49%, #b2b9a5 51%, transparent 52%); transform: rotate(-12deg); position: relative; }
.tiny-grid::after { content: ''; position: absolute; width: 10px; height: 10px; background: var(--paper); border: 1px solid #b2b9a5; border-radius: 50%; inset: 7px; }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 304px; gap: 28px; align-items: start; }
.play-area { position: relative; padding: 20px 38px 14px; background: #eaece3; background-image: radial-gradient(ellipse at 50% 30%, #f2f2e9 0%, #eaece380 70%); border: 1px solid #e1e4d8; border-radius: 14px; isolation: isolate; }
.play-area::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .36; border-radius: inherit; background-image: repeating-linear-gradient(92deg, #75826309 0 1px, transparent 1px 5px); pointer-events: none; }
.table-corner { position: absolute; width: 25px; height: 25px; opacity: .42; pointer-events: none; }
.top-left { top: 14px; left: 14px; border-top: 1px solid #9caa91; border-left: 1px solid #9caa91; }
.bottom-right { bottom: 14px; right: 14px; border-bottom: 1px solid #9caa91; border-right: 1px solid #9caa91; }
.table-inscription { position: absolute; top: 43%; writing-mode: vertical-rl; font: 15px/1.2 var(--serif); letter-spacing: 7px; color: #a6ad99; }
.table-inscription.left { left: 22px; }
.table-inscription.right { right: 22px; }
.player-row { display: flex; align-items: center; gap: 10px; min-height: 48px; max-width: 508px; margin: 0 auto; }
#top-player { margin-bottom: 16px; }
#bottom-player { margin-top: 3px; }
.player-avatar { height: 39px; width: 39px; display: grid; place-items: center; border-radius: 50%; background: #dce3d6; color: #48614b; border: 1px solid #cfD8c6; position: relative; }
.player-avatar > .icon { width: 20px; height: 20px; }
.player-avatar.red { color: var(--red); background: #eee0d5; border-color: #e2cfc3; }
.player-avatar.active::after { content: ''; position: absolute; width: 7px; height: 7px; background: #789870; border: 2px solid #edf0e7; border-radius: 50%; right: 0; bottom: 0; }
.player-avatar.red.active::after { background: var(--red); }
.player-name { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.player-tag { font-size: 9px; color: #8a9381; border: 1px solid #d7dccf; font-weight: 400; border-radius: 3px; line-height: 1.5; padding: 0 4px; }
.player-meta { color: #8a917f; font-size: 10px; letter-spacing: .5px; margin-top: 1px; }
.player-captures { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 1px; max-width: 130px; }
.captured-piece { font: 14px/1.4 var(--serif); color: #8c8f7f; opacity: .9; }
.captured-piece.red { color: #b26e5a; }
.player-clock { margin-left: 13px; color: #69715e; font: 19px/1 Georgia, serif; font-variant-numeric: tabular-nums; letter-spacing: .5px; min-width: 49px; text-align: right; }
.player-clock.active { color: var(--green); }
.board-wrap { max-width: 510px; margin: 0 auto; }
.board-frame { padding: 11px; background: #ddc69f; border-radius: 7px; border: 1px solid #cbb389; box-shadow: 0 12px 22px -10px #4d513645, 0 3px 1px #b69b75, inset 0 0 0 3px #e9d9ba, inset 0 0 0 4px #cdb78f; }
.board { width: 100%; aspect-ratio: 9 / 10; position: relative; overflow: hidden; background-color: #efe0bf; border: 1px solid #c9b28b; background-image: linear-gradient(120deg, #fff6e72e, #c9ac7410), repeating-linear-gradient(0deg, #a4804b04 0 1px, transparent 1px 4px); border-radius: 2px; user-select: none; container-type: inline-size; }
.board-lines, .move-overlay, .board-squares { position: absolute; inset: 0; width: 100%; height: 100%; }
.board-lines { color: #89714e; }
.board-lines .board-grid { stroke: currentColor; stroke-width: 1.8; fill: none; }
.board-lines .board-border { stroke-width: 3; }
.board-lines .river-word { font: 47px var(--serif); fill: #806744; letter-spacing: 15px; }
.move-overlay { pointer-events: none; z-index: 3; }
.square { position: absolute; width: 10.6%; height: 9.54%; padding: 0; transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center; outline-offset: -1px !important; z-index: 2; }
.square:not(:disabled):active { transform: translate(-50%, -50%); }
.square.empty { z-index: 1; }
.square.empty:hover { background: #385a4410; }
.piece { display: grid; place-items: center; width: 86%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 25%, #fff8e8 0%, #f6e9ce 59%, #e4cda4 100%); color: #33463b; box-shadow: 0 3px 1px #9b7c5163, 0 4px 5px #5a452731, inset 0 0 0 1px #c2a77d, inset 0 0 0 4px #f8ebd0, inset 0 0 0 5px #74836b; font: bold 33px/1 var(--serif); font-size: 6.65cqw; text-shadow: 0 1px 0 #fff8e9; position: relative; transition: transform .17s, box-shadow .17s, background .17s; }
.piece.red { color: #b34936; box-shadow: 0 3px 1px #9b7c5163, 0 4px 5px #5a452731, inset 0 0 0 1px #c2a77d, inset 0 0 0 4px #f8ebd0, inset 0 0 0 5px #c27a5f; }
.square:not(:disabled):hover .piece { transform: translateY(-2px); box-shadow: 0 5px 7px #5a452745, inset 0 0 0 1px #c2a77d, inset 0 0 0 4px #f8ebd0, inset 0 0 0 5px #829273; }
.square.selected .piece { transform: translateY(-3px); background: radial-gradient(circle at 35% 25%, #fffbed, #ffe7ac); box-shadow: 0 0 0 3px #3f6e50, 0 7px 9px #5a452745, inset 0 0 0 1px #c2a77d, inset 0 0 0 4px #f8ebd0, inset 0 0 0 5px #9c9060; }
.square.checked .piece { box-shadow: 0 0 0 3px #b94b3a, 0 0 18px #bd554341, inset 0 0 0 1px #c2a77d, inset 0 0 0 4px #f8ebd0, inset 0 0 0 5px #bd765c; }
.square.last-to::after { content: ''; position: absolute; bottom: -5%; width: 5px; height: 5px; border-radius: 50%; background: #68805b; }
.square.last-from::before { content: ''; position: absolute; inset: 20%; border: 1.5px dashed #677e5780; border-radius: 50%; }
.square.legal.empty::after { content: ''; width: 21%; height: 21%; border-radius: 50%; background: #426c4b80; box-shadow: 0 0 0 5px #6184600a; }
.square.legal:not(.empty)::before { content: ''; position: absolute; inset: 2%; border: 2px dashed #638654; border-radius: 50%; }
.piece.just-moved { animation: piece-land .24s ease-out; }
.file-labels { display: grid; grid-template-columns: repeat(9, 1fr); margin: 10px 4.9% 0; font: 11px/1.4 var(--serif); color: #9a9f8c; text-align: center; }
.board-toolbar { max-width: 508px; margin: 15px auto 0; padding-top: 14px; display: flex; justify-content: center; align-items: center; gap: 23px; border-top: 1px solid #d9dece; }
.board-toolbar button { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #6e7d64; padding: 4px 1px; }
.board-toolbar button:hover:not(:disabled) { color: #244a33; }
.board-toolbar .icon { width: 16px; height: 16px; }
.toolbar-divider { width: 1px; height: 14px; background: #d1d8c7; margin: 0 -5px; }
.side-panel { display: flex; flex-direction: column; gap: 16px; }
.status-card { background: var(--green); color: #f2f3e9; border-radius: 12px; padding: 19px 20px 13px; position: relative; overflow: hidden; }
.status-card::after { content: ''; width: 145px; height: 145px; border: 1px solid #c2d1b810; border-radius: 50%; position: absolute; top: -55px; right: -43px; box-shadow: 0 0 0 14px #c2d1b807, 0 0 0 34px #c2d1b806; pointer-events: none; }
.status-eyebrow { display: flex; justify-content: space-between; font-size: 10px; color: #b6c7b4; letter-spacing: .6px; }
.status-eyebrow > span:first-child { display: flex; align-items: center; gap: 7px; }
.status-eyebrow .live-dot { background: #acbf93; width: 5px; height: 5px; }
.turn-line { display: flex; align-items: center; gap: 12px; padding: 18px 0 20px; }
.turn-piece { width: 41px; height: 41px; flex-shrink: 0; display: grid; place-items: center; font: 26px/1 var(--serif); color: #365442; border-radius: 50%; border: 1px solid #e1d3b3; background: #f1e7ce; outline: 1px solid #99a082; outline-offset: -5px; }
.turn-piece.red { color: var(--red); outline-color: #bc8a6d; }
.turn-line h2 { margin: 0 0 2px; font-size: 19px; letter-spacing: 1px; font-weight: 500; }
.turn-line p { font-size: 10px; color: #bdcbb7; margin: 0; }
.status-bottom { border-top: 1px solid #a3b79930; padding-top: 10px; display: flex; justify-content: space-between; font-size: 10px; color: #aec2a9; }
.status-bottom > span:last-child { display: flex; align-items: center; gap: 4px; }
.status-bottom .icon { width: 12px; height: 12px; }
.settings-card, .record-card { background: #fdfcf8; border: 1px solid #e6e5dc; border-radius: 12px; padding: 18px 20px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.section-title h2 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .6px; display: flex; align-items: center; gap: 6px; }
.section-subtitle { font-size: 9px; color: #a3a390; letter-spacing: 1px; }
.field-label { display: block; color: #7b8173; font-size: 11px; }
.segmented { display: flex; background: #eeeee7; padding: 4px; border-radius: 7px; gap: 3px; margin-top: 8px; }
.segmented button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; height: 33px; border-radius: 5px; font-size: 11px; color: #939689; white-space: nowrap; }
.segmented .icon { width: 15px; height: 15px; }
.segmented button.selected { background: #fdfdf9; color: var(--green); font-weight: 600; box-shadow: 0 2px 5px #2b462c0c; }
.segmented button:not(.selected):hover { background: #e5e8de; color: var(--green); }
.field-heading { display: flex; justify-content: space-between; align-items: center; margin: 17px 0 8px; }
#difficulty-note { font-size: 9px; color: #a0a28e; }
.difficulty-options { display: flex; gap: 8px; }
.difficulty-options button { flex: 1; border: 1px solid #e4e5dc; border-radius: 5px; height: 33px; display: flex; gap: 6px; align-items: center; justify-content: center; color: #909486; font-size: 11px; }
.difficulty-options button.selected { border-color: #b0c0a7; background: #edf1e8; color: #4d6843; }
.difficulty-options button:hover { border-color: #a3b69b; }
.level-bars { height: 12px; display: flex; align-items: end; gap: 2px; }
.level-bars i { width: 2px; height: 5px; background: currentColor; border-radius: 1px; }
.level-bars i:nth-child(2) { height: 8px; }
.level-bars i:nth-child(3) { height: 11px; }
.side-choice { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; }
.side-choice > div { display: flex; gap: 13px; }
.side-choice button { display: flex; align-items: center; gap: 5px; padding: 2px 0; color: #9a9d90; font-size: 10px; }
.side-choice button.selected { color: #52654c; }
.side-choice button:not(.selected) .side-dot { opacity: .35; }
.side-choice button.selected::after { content: '✓'; font-size: 10px; margin-left: -2px; }
.side-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; vertical-align: middle; }
.side-dot.red { background: var(--red); }
.side-dot.black { background: #4c6350; }
.setting-divider { height: 1px; background: #edeee6; margin: 15px 0; }
.toggle-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; font-size: 11px; color: #67745e; }
.setting-help { display: block; color: #a4a693; font-size: 9px; padding-top: 3px; }
.toggle-row input { appearance: none; -webkit-appearance: none; display: block; width: 32px; height: 19px; border: 0; padding: 0; margin: 0; border-radius: 20px; background: #d7dbcd; flex-shrink: 0; position: relative; cursor: pointer; transition: background .2s; }
.toggle-row input::after { content: ''; width: 13px; height: 13px; top: 3px; left: 3px; background: #fffef5; border-radius: 50%; position: absolute; transition: transform .2s; box-shadow: 0 1px 3px #0002; }
.toggle-row input:checked { background: #5c7952; }
.toggle-row input:checked::after { transform: translateX(13px); }
.toggle-row input:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 40px; background: var(--green); border-radius: 6px; color: #f2f3e9; font-size: 12px; letter-spacing: 1px; padding: 10px 14px; }
.settings-card > .primary-button { margin-top: 21px; }
.primary-button > .icon { width: 15px; height: 15px; }
.primary-button > .icon:last-child:not(:first-child) { margin-left: auto; }
.primary-button > .icon:first-child { margin-right: auto; }
.primary-button:hover { background: #365f4c; box-shadow: 0 3px 8px #24422b15; }
.local-description { color: #929780; font-size: 11px; line-height: 2; margin: 23px 0; min-height: 75px; }
.record-card { padding-bottom: 0; overflow: hidden; }
.record-card .section-title { margin-bottom: 12px; }
.count-badge { font: 9px/1.5 var(--sans); min-width: 17px; padding: 0 3px; text-align: center; background: #efF0e8; color: #8e997f; border-radius: 4px; letter-spacing: 0; }
.text-button { padding: 0; color: #a0a58f; }
.text-button .icon { width: 15px; height: 15px; }
.text-button:hover:not(:disabled) { color: var(--green); }
.record-head { display: grid; grid-template-columns: 45px 1fr 1fr; padding: 6px 5px; font-size: 9px; color: #a0a592; background: #f3f4ec; border-radius: 4px; }
.record-head span { display: flex; align-items: center; gap: 5px; }
.record-head .side-dot { width: 4px; height: 4px; }
.move-list { height: 128px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #cdd4c0 transparent; }
.record-empty { padding: 21px 0 19px; text-align: center; color: #a1a58f; }
.record-empty > .icon { margin: auto; width: 22px; height: 22px; color: #c2c7b1; }
.record-empty p { font-size: 10px; margin: 6px 0 2px; letter-spacing: 1px; }
.record-empty > span { font-size: 9px; color: #bec0ae; }
.move-row { display: grid; grid-template-columns: 45px 1fr 1fr; padding: 8px 5px; border-bottom: 1px solid #f0f0e8; font-size: 11px; }
.move-row > span:first-child { font: 11px/1.7 Georgia, serif; color: #a4ac98; }
.move-red { color: #b06953; }
.move-black { color: #62745a; }
.latest-move { font-weight: 600; }
.latest-move::after { content: ''; display: inline-block; height: 4px; width: 4px; background: currentColor; border-radius: 50%; margin-left: 5px; vertical-align: 3px; }
.chess-wisdom { display: flex; justify-content: center; align-items: flex-start; gap: 11px; color: #8f9b80; padding: 2px 0 0; }
.chess-wisdom > .icon { margin-top: 2px; width: 19px; height: 19px; stroke-width: 1.1; }
.chess-wisdom p { font: 14px/1.5 var(--serif); margin: 0; letter-spacing: 1px; }
.chess-wisdom p span { display: block; font: 9px/1.8 var(--sans); letter-spacing: .4px; margin-top: 3px; color: #a8ad98; }
.page-footer { display: flex; justify-content: space-between; font-size: 9px; color: #a5ab98; padding: 24px 2px; letter-spacing: .5px; }
.page-footer i { font-style: normal; padding: 0 6px; }
.page-footer > span:last-child { display: flex; align-items: center; gap: 6px; }
.saved-dot { width: 4px; height: 4px; border-radius: 50%; background: #9aaa88; }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 12px); background: #2b493bee; color: #f9faef; padding: 11px 22px; border-radius: 8px; box-shadow: 0 6px 25px #283c3520; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 10; max-width: calc(100vw - 28px); width: max-content; text-align: center; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.game-dialog { border: 1px solid #dfdfd1; border-radius: 16px; padding: 0; background: #fdfcf7; color: var(--ink); width: 480px; max-width: calc(100vw - 32px); max-height: min(85vh, 760px); box-shadow: 0 25px 100px #1a2e353d; }
.game-dialog::backdrop { background: #1b2d2855; backdrop-filter: blur(4px); }
.dialog-content { padding: 30px; position: relative; }
.dialog-close { position: absolute; right: 17px; top: 17px; color: #9aa18e; border: 0; }
.dialog-eyebrow { font-size: 9px; letter-spacing: 3px; color: #929e80; margin: 0 0 8px; }
.dialog-content h2 { font: 29px/1.4 var(--serif); margin: 0 0 12px; }
.dialog-description { color: #8c9580; font-size: 12px; line-height: 1.9; margin: 0 0 22px; }
.dialog-actions { display: flex; gap: 10px; margin-top: 23px; }
.dialog-actions > button { flex: 1; }
.secondary-button { border: 1px solid #dce1d1; border-radius: 6px; min-height: 40px; color: #7c886c; padding: 8px 15px; font-size: 12px; }
.secondary-button:hover { background: #f0f3e9; }
.rule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.rule-item { display: flex; align-items: flex-start; gap: 10px; padding: 11px 9px; background: #f1f2e9; border-radius: 7px; }
.rule-icon { width: 27px; height: 27px; border: 1px solid #d9c0a0; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: #f4e9d2; color: var(--red); font: 19px var(--serif); }
.rule-item h3 { margin: 0 0 3px; font-size: 11px; font-weight: 500; }
.rule-item p { margin: 0; font-size: 10px; line-height: 1.8; color: #939a82; }
.rule-note { padding: 12px 13px; background: #eee7d73d; color: #979c85; font-size: 10px; line-height: 1.9; border-left: 2px solid #b7b998; margin-top: 17px; }
.dialog-records { max-height: 360px; overflow-y: auto; padding: 7px 0; }
.dialog-records .move-row, .dialog-records .record-head { grid-template-columns: 60px 1fr 1fr; }
.result-seal { margin: 9px auto 21px; display: grid; place-items: center; width: 67px; height: 67px; border: 1px solid #c5b18c; background: #f0e8d5; color: var(--red); outline: 1px solid #cbbda3; outline-offset: -7px; border-radius: 50%; font: 39px var(--serif); }
.result-dialog { text-align: center; }
.result-dialog .dialog-description { max-width: 340px; margin-left: auto; margin-right: auto; }
.thinking .live-dot { animation: breathe 1s ease-in-out infinite; }
.thinking #turn-piece { animation: breathe 1.3s ease-in-out infinite; }
.noscript-notice { padding: 30px; color: var(--red); text-align: center; }
.page-heading, .play-area, .side-panel { animation: reveal .55s both; }
.play-area { animation-delay: .08s; }
.side-panel { animation-delay: .16s; }
@keyframes reveal { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes breathe { 50% { opacity: .5; } }
@keyframes piece-land { from { transform: translateY(-6px) scale(1.04); } to { transform: translateY(0) scale(1); } }
@media (min-width: 1500px) {
  .page { padding-top: 43px; }
  .page-heading { margin-bottom: 31px; }
  .board-wrap { max-width: 535px; }
  .player-row, .board-toolbar { max-width: 532px; }
  .play-area { padding-top: 23px; padding-bottom: 19px; }
  .side-panel { gap: 20px; }
  .move-list { height: 150px; }
}
@media (max-width: 1080px) {
  .site-header { padding: 0 30px; height: 78px; }
  .brand-caption, .brand-divider { display: none; }
  .navigation { margin-left: 0; }
  .page { padding: 27px 26px 0; }
  .game-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 22px; }
  .play-area { padding: 18px 24px 14px; }
  .table-inscription { display: none; }
  .status-card, .settings-card, .record-card { padding-left: 17px; padding-right: 17px; }
  .board-toolbar { gap: 20px; }
  .player-clock { font-size: 17px; margin-left: 5px; }
  .player-captures { max-width: 80px; }
}
@media (max-width: 760px) {
  .site-header { padding: 0 22px; height: 74px; gap: 15px; }
  .brand-seal { width: 36px; height: 38px; font-size: 28px; }
  .brand-type { font-size: 21px; }
  .brand-type > span { font-size: 7px; }
  .navigation { gap: 24px; }
  .quiet-note { display: none; }
  .page { max-width: 600px; padding: 26px 22px 0; }
  .page-heading { margin-bottom: 23px; }
  h1 { font-size: 30px; }
  .heading-note { display: none; }
  .game-layout { grid-template-columns: 1fr; gap: 22px; }
  .play-area { padding: 16px 22px 13px; }
  .board-wrap { max-width: 470px; }
  .player-row { min-height: 44px; }
  .side-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .status-card { grid-column: 1 / -1; padding: 17px 20px 12px; }
  .turn-line { padding: 14px 0; }
  .status-card .turn-line h2 { font-size: 21px; }
  .status-card .turn-line p { font-size: 11px; }
  .settings-card { grid-column: 1 / -1; }
  .record-card { grid-column: 1 / -1; }
  .move-list { height: 150px; }
  .chess-wisdom { grid-column: 1 / -1; padding: 10px 0; }
  .page-footer { padding: 17px 0 24px; flex-direction: column; align-items: center; gap: 7px; }
  .player-captures { max-width: 130px; }
}
@media (max-width: 440px) {
  .site-header { padding: 0 17px; gap: 12px; height: 67px; }
  .brand { gap: 9px; }
  .brand-type { font-size: 19px; }
  .brand-seal { width: 33px; height: 35px; font-size: 26px; }
  .brand-type > span { font-size: 6px; letter-spacing: .8px; }
  .navigation { gap: 20px; margin-left: auto; }
  .nav-link { font-size: 11px; }
  .nav-link .icon { display: none; }
  .header-end { margin-left: 1px; }
  .icon-button { width: 30px; height: 30px; }
  .header-end .icon { width: 15px; height: 15px; }
  .page { padding: 23px 14px 0; }
  .page-heading { padding-left: 4px; margin-bottom: 21px; }
  .eyebrow { font-size: 8px; margin-bottom: 7px; }
  h1 { font-size: 28px; letter-spacing: 0; }
  .play-area { padding: 13px 13px 12px; border-radius: 11px; }
  #top-player { margin-bottom: 11px; }
  .player-avatar { width: 33px; height: 33px; }
  .player-avatar > .icon { width: 17px; height: 17px; }
  .player-name { font-size: 11px; gap: 5px; }
  .player-meta { font-size: 9px; }
  .player-clock { font-size: 17px; }
  .player-captures { max-width: 77px; }
  .captured-piece { font-size: 12px; }
  .board-frame { padding: 8px; }
  .piece { box-shadow: 0 2px 1px #9b7c5163, 0 3px 4px #5a452731, inset 0 0 0 1px #c2a77d, inset 0 0 0 3px #f8ebd0, inset 0 0 0 4px #74836b; }
  .piece.red { box-shadow: 0 2px 1px #9b7c5163, 0 3px 4px #5a452731, inset 0 0 0 1px #c2a77d, inset 0 0 0 3px #f8ebd0, inset 0 0 0 4px #c27a5f; }
  .board-toolbar { margin-top: 11px; padding-top: 11px; gap: 25px; }
  .board-toolbar button { font-size: 10px; gap: 5px; }
  .board-toolbar .icon { width: 14px; height: 14px; }
  .file-labels { font-size: 9px; margin-top: 9px; }
  .square.last-to::after { width: 3px; height: 3px; }
  .section-title h2 { font-size: 14px; }
  .side-panel { gap: 14px; }
  .settings-card, .record-card { padding-left: 19px; padding-right: 19px; }
  .dialog-content { padding: 26px 22px; }
  .rule-grid { gap: 8px; }
  .rule-item { gap: 7px; padding: 10px 7px; }
  .rule-item p { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
