/* Shared app framework: navigation, responsive workspaces and board coordinates. */
.coordinates{font-size:14px!important;font-weight:550}.board-wrap{--board-padding:26px!important}.dl-header+.record-message{margin:0}.workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(330px,36%);max-width:1800px;margin:6px auto;padding:0 16px;gap:20px;height:calc(100dvh - var(--record-header-height,58px) - 12px);align-items:stretch}.workspace .play-area{min-width:0;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.workspace .board-wrap{width:min(100%,calc(100dvh - var(--record-header-height,58px) - 84px));margin:auto}.workspace-panel{overflow-y:auto;min-height:0;padding:12px 6px;scrollbar-width:thin}.workspace-panel h1{font:650 24px var(--dl-font);letter-spacing:0;margin:0 0 12px}.workspace-panel h2{font:600 18px var(--dl-font);margin:20px 0 10px}.editor-toolbar,.editor-file-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.editor-toolbar button,.editor-file-actions button,.file-button{font-size:13px;padding:10px 12px}.editor-file-actions{align-items:center}.file-button{border:1px solid var(--dl-line);border-radius:7px;cursor:pointer;background:white}.editor-file-actions input[type=file]{width:100%;font-size:12px}.editor-setup{display:grid;grid-template-columns:1fr 1fr;gap:8px}.editor-setup select,.game-details-editor select{min-width:0;width:100%;font:inherit;border:1px solid var(--dl-line);border-radius:6px;padding:8px;background:white;color:var(--dl-text)}.editor-setup small{grid-column:1/-1;line-height:1.5}.editor-setup label{font-size:13px;align-self:center}.game-details-editor{padding:14px;border:1px solid var(--dl-line);border-radius:8px;margin:18px 0}.game-details-editor summary{font-size:14px;font-weight:600;cursor:pointer}.game-details-editor form{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}.game-details-editor label{display:flex;flex-direction:column;gap:5px;min-width:0;font-size:12px}.game-details-editor input{width:100%;padding:8px;border:1px solid var(--dl-line);border-radius:5px;font:inherit}.editor-navigation{width:100%;justify-content:center;gap:5px;flex-wrap:wrap}.editor-navigation button{min-height:32px;padding:4px 12px;line-height:1.2}.editor-tree-panel{margin:16px 0;border:1px solid var(--dl-line);border-radius:8px;overflow:hidden}.editor-tree-panel h2{font:650 15px var(--dl-font);margin:12px 14px 4px}#editor-tree-help{font-size:12px;line-height:1.5;margin:0 14px 10px;color:var(--dl-muted)}#editor-tree{position:relative;overflow:auto;max-height:264px;background:#e6ebed;overscroll-behavior:contain;overflow-anchor:none;scrollbar-width:thin}.editor-tree-canvas{position:relative;min-width:100%}.editor-tree-links{position:absolute;inset:0;overflow:visible;pointer-events:none}.editor-tree-links path{fill:none;stroke:#8c9ba4;stroke-width:2}.editor-tree-links .main-path{stroke:#ab8a52}.editor-tree-links .selected-path{stroke:var(--dl-accent);stroke-width:3}.editor-tree-stone{position:absolute;transform:translate(-50%,-50%);width:32px;height:32px;min-width:32px;padding:0;border:1px solid #74818a;border-radius:50%;font:650 12px/30px var(--dl-font);box-shadow:0 1px 3px #0002;text-align:center;cursor:pointer}.editor-tree-stone.tree-black{background:#28323a;color:#fff}.editor-tree-stone.tree-white{background:#fff;color:#28323a}.editor-tree-stone.tree-root{background:#e6ebed;color:var(--dl-muted);border-style:dashed}.editor-tree-stone[aria-pressed=true]{outline:3px solid var(--dl-accent);outline-offset:2px}.editor-tree-stone.main-path:after{content:'★';position:absolute;right:-4px;top:-10px;font:11px/1 var(--dl-font);color:#8c651e;text-shadow:0 0 2px #fff}.editor-tree-stone:hover{box-shadow:0 0 0 3px var(--dl-focus)}.editor-tree-stone:focus-visible{outline:3px solid var(--dl-accent);outline-offset:2px}#editor-notice:empty{display:none}#editor-notice{color:#a13725}.home-main{position:relative;isolation:isolate;display:block;max-width:1180px;margin:0 auto;padding:64px 30px 48px;min-height:calc(100svh - var(--record-header-height,58px));overflow:hidden}.home-board{position:absolute;inset:0;z-index:-1;opacity:.17;pointer-events:none;display:flex;justify-content:center;align-items:center}.home-board .board-wrap{width:min(100%,950px);transform:rotate(-8deg)}.home-intro{max-width:840px;margin:auto}.home-intro h1{font:650 clamp(30px,4vw,50px)/1.15 system-ui;letter-spacing:-1px;margin:10px 0 20px}.home-intro>p{font-size:17px;color:#394952}.home-intro .eyebrow{font-size:12px;font-weight:650;letter-spacing:3px}#home-actions{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:28px 0}#home-actions a{display:flex;flex-direction:column;gap:8px;padding:24px;border:1px solid #bcc6cc;border-radius:10px;text-decoration:none;background:#ffffffee;color:var(--dl-text);box-shadow:0 3px 14px #00000006}#home-actions a:hover{border-color:var(--dl-accent);transform:translateY(-2px)}#home-actions strong{font-size:22px}#home-actions span{font-size:13px;color:var(--dl-muted)}.home-ai{background:#ffffffd9;border-radius:10px;padding:20px 24px}.home-ai h2{font:650 20px var(--dl-font);margin:0 0 10px}.home-ai p{font-size:14px;color:#394952}#home-public-note{font-size:12px;color:#6b4e26}.guide-actions a,.page-links a{color:var(--dl-accent)}.page-links{display:flex;gap:14px;flex-wrap:wrap;margin:20px 0}.page-links a{padding:10px 16px;border:1px solid var(--dl-line);border-radius:6px}.site-document main{display:block}.site-document .document-table{overflow:auto}.report-sheet{scroll-margin-top:calc(var(--record-header-height,58px) + 14px)}body.focus main{height:calc(100dvh - var(--record-header-height,58px))}body.focus .board-wrap{max-height:calc(100dvh - var(--record-header-height,58px) - 120px)}.play-page .game-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 12px;padding:0}.play-page .game-meta>div{flex-basis:100%;min-width:0;order:-1}.play-page #game-name{overflow-wrap:anywhere}.play-page #player-names{font-size:14px;line-height:1.5;margin:6px 0 10px}.live-view-tools{display:flex;justify-content:flex-end;margin:0 0 12px}.live-view-tools button,.play-page .game-meta button,.play-page .game-meta a{font-size:13px;padding:8px 10px}.play-page .live-navigation{margin-top:8px;flex-shrink:0}.play-page .workspace-panel{overflow-anchor:none}.play-page.focus #play-main{display:grid;margin:6px auto;padding:0 16px;gap:20px;height:calc(100dvh - var(--record-header-height,58px) - 12px);grid-template-columns:minmax(0,1fr) minmax(250px,28%);align-items:stretch}.play-page.focus #play-main .play-area{width:auto}.play-page.focus #play-main .workspace-panel{width:auto;max-height:none}.play-page.focus #play-main .board-wrap{max-height:none;padding:var(--board-padding);width:min(100%,calc(100dvh - var(--record-header-height,58px) - 84px))}.record-page #record-main aside{overflow-anchor:none}.record-page .record-summary .game-meta{margin:0;padding:0}.site-document .notice-box{padding:16px;background:var(--dl-accent-soft);border-radius:8px}.site-document .architecture-node p{font-size:13px;line-height:1.6}

@media(max-width:950px){.coordinates{font-size:12px!important}.board-wrap{--board-padding:23px!important}}
@media(max-width:850px){.workspace{height:auto;grid-template-columns:minmax(0,1fr);gap:12px;padding:0 10px;margin-top:4px}.workspace .play-area{min-height:calc(100svh - var(--record-header-height,48px) - 8px);justify-content:flex-start}.workspace .board-wrap{width:min(100%,calc(100svh - var(--record-header-height,48px) - 88px));flex-shrink:0;margin:auto}.workspace-panel{overflow:visible;padding:12px 6px}.editor-navigation{margin:8px 0 0}.home-main{padding:35px 18px}.home-intro>p{font-size:15px}#home-actions{gap:12px}#home-actions a{padding:18px}#home-actions strong{font-size:19px}.home-ai{padding:18px}.play-page .game-meta{padding:0}.play-page #play-main .play-area{justify-content:center}.play-page #play-main .board-wrap{margin:0 auto}.play-page.focus #play-main{height:auto;grid-template-columns:1fr;padding:0 10px;gap:12px}.play-page.focus #play-main .workspace-panel{overflow:visible}.play-page.focus #play-main .board-wrap{width:min(100%,calc(100svh - var(--record-header-height,48px) - 88px))}.report-sheet{padding:22px}}
@media(max-width:420px){.coordinates{font-size:11px!important}#home-actions{grid-template-columns:1fr}#home-actions a{padding:15px 18px}#home-actions strong{font-size:20px}.home-main{padding-top:26px}.game-details-editor form{grid-template-columns:1fr}.editor-navigation button{padding:4px 9px}.editor-navigation .move-label{font-size:13px}}

.library-entry strong{display:block;font-size:1.2rem}.library-entry small{margin-top:6px;font-size:.95rem;color:#3d4b55}

button.is-loading:before{content:'';display:inline-block;width:12px;height:12px;margin-right:8px;vertical-align:-2px;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;animation:analysis-spin .8s linear infinite}

#next-recorded-legend{display:flex;flex-wrap:wrap;gap:4px 6px;align-items:center}
.next-move-legend-title{white-space:nowrap}
.next-move-legend-item{display:inline-flex;gap:3px;align-items:center;white-space:nowrap}
.next-move-swatch{display:inline-block;width:10px;height:10px;clip-path:polygon(50% 0,100% 100%,0 100%);background:#64748b}
.next-move-swatch[data-quality=best]{background:#2978ce}
.next-move-swatch[data-quality=good]{background:#27834c}
.next-move-swatch[data-quality=inaccuracy]{background:#d7ad20}
.next-move-swatch[data-quality=mistake]{background:#df7a19}
.next-move-swatch[data-quality=blunder]{background:#d33c36}

.editor-upload-box{padding:14px;border:1px solid #b9d8e8;border-radius:10px;background:var(--dl-accent-soft);margin:0 0 18px}.editor-upload-box button{display:flex;width:100%;min-height:56px;padding:14px 18px;font-size:18px;font-weight:650}

.editor-save-help{margin:-3px 0 14px;font-size:13px;line-height:1.5;color:var(--dl-muted)}

.game-details-editor h2{margin:0;font:600 14px var(--dl-font)}

.editor-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:32px;margin-bottom:12px}.editor-heading h1{margin:0;flex-shrink:0}.editor-heading #draft-status{margin:0;min-width:0;max-width:50%;font-size:12px;line-height:1.4;color:var(--dl-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.editor-page .workspace-panel{overflow-anchor:none}
/* With no game to show (not found, bad link, load failure) the message is the whole page. */
.record-page:has(#record-main[hidden]) #record-message{font-size:18px;line-height:1.6;color:#26323a;padding-top:28px}
@media(max-width:850px){.record-page:has(#record-main[hidden]) #record-message{padding:24px 20px 0}}
/* Phones: title, Open SGF, board, navigation, then the panel (tree, tools, Save, details), with no screen-high gap round the board. */
@media(max-width:850px){
 .editor-page #editor-main{display:flex;flex-direction:column;gap:0;padding:0 10px}
 .editor-page #editor-main>.play-area,.editor-page #editor-main>.workspace-panel{display:contents}
 .editor-page .workspace-panel>*{order:6;margin-left:6px;margin-right:6px;overflow-anchor:none}
 .editor-page .workspace-panel>.editor-heading{order:1;margin-top:10px;margin-bottom:8px}
 .editor-page .workspace-panel>.editor-upload-box{order:2;margin-bottom:10px}
 .editor-page .workspace-panel>#editor-notice{order:3}
 .editor-page #editor-main .board-wrap{order:4;margin:0 auto}
 .editor-page #editor-main .editor-navigation{order:5;margin:8px 0 0}
}

.sequence-edit-panel{padding:14px;border:2px solid var(--dl-accent);border-radius:8px;background:var(--dl-accent-soft);margin:16px 0}.sequence-edit-panel[hidden]{display:none}.sequence-edit-panel h2{font:650 16px var(--dl-font);margin:0 0 8px}.sequence-edit-panel p{font-size:13px;line-height:1.5;margin:8px 0}.sequence-edit-panel .actions{display:flex;gap:8px;flex-wrap:wrap}.editor-tree-stone.preview-issue{box-shadow:0 0 0 3px #c33129;border-color:#c33129}.editor-tree-stone.preview-incomplete{opacity:.5}#sequence-edit-preview:empty{display:none}

.game-details-editor label:has([required])>span:after{content:' *';color:var(--dl-accent)}.game-details-editor label[hidden]{display:none}

.stone-sound-control{display:flex;align-items:center;gap:12px;margin:12px 0;font-size:13px}.stone-sound-control span{white-space:nowrap}.stone-sound-control input{flex:1;min-width:60px;accent-color:var(--dl-accent)}.stone-sound-control output{min-width:42px;text-align:right}.play-page #play-sound .stone-sound-control{margin:0}

#record-main .record-file-actions #generate-report{gap:8px;min-height:44px;padding:10px 18px;font-size:15px;font-weight:700}#record-main .record-file-actions #generate-report[aria-disabled=true]:after{content:'Not ready';font-size:11px;font-weight:500;padding:3px 5px;border:1px solid #b4ceda;border-radius:4px}:lang(zh-CN) #record-main .record-file-actions #generate-report[aria-disabled=true]:after{content:'待生成'}

@media(min-width:421px){.game-details-editor #result-margin-field{grid-column:2}}

.time-control-fields{grid-column:1/-1;margin:12px 0 0;padding:14px;border:1px solid #d5dfe4;border-radius:8px;min-width:0}.time-control-fields legend{padding:0 5px;font:600 14px var(--dl-font)}.time-control-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.time-control-grid label{margin:0}.time-control-grid label[hidden]{display:none}.time-control-grid input,.time-control-grid select{width:100%;box-sizing:border-box}.time-control-preview{margin:12px 0 0;font-size:13px;color:var(--dl-text)}@media(max-width:420px){.time-control-grid{grid-template-columns:1fr}}
.rules-page article[id]{scroll-margin-top:84px}.rules-page .licence-line{font-size:13px;color:var(--dl-muted)}
.rules-page .cost-table{border-collapse:collapse;margin:8px 0 4px;font-size:14px}.rules-page .cost-table :is(th,td){padding:6px 12px 6px 0;text-align:left;border-bottom:1px solid #e3e8eb;white-space:nowrap}.rules-page .cost-table td{font-variant-numeric:tabular-nums}.rules-page .cost-table tr:first-child th{font-weight:600;color:var(--dl-muted);font-size:12px}
@media(max-width:480px){.rules-page .cost-table{font-size:13px}.rules-page .cost-table :is(th,td){padding-right:8px}.rules-page .cost-table :is(th,td):nth-child(4){display:none}}
.site-document .cost-lead{margin:4px 0 16px;color:#4b5a63}.cost-flows{display:grid;grid-template-columns:1fr 1fr;gap:16px}.cost-flow{border:1px solid var(--dl-line);border-radius:10px;padding:18px 20px;background:#fff}.site-document .cost-flow h2{display:flex;align-items:center;gap:10px;margin:0 0 4px;font-size:21px}.cost-flow h2 a{color:inherit;text-decoration:none}.cost-flow h2 a:hover{text-decoration:underline}.cost-flow-number{display:inline-grid;place-items:center;flex:none;width:28px;height:28px;border-radius:50%;background:#1f2933;color:#fff;font-size:15px}.site-document .cost-flow-path{margin:0 0 6px;color:#56636b;font-size:14px;line-height:1.5}.site-document .cost-flow h3{margin:14px 0 6px;font:650 12px var(--dl-font);letter-spacing:.06em;text-transform:uppercase;color:#6a7780}.cost-list{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;margin:0;font-size:15px;line-height:1.4}.cost-list dt{color:#4b5a63}.cost-list dd{margin:0;font-weight:650;text-align:right;font-variant-numeric:tabular-nums}.cost-price dd{font-size:18px;color:#1b5faa}.site-document .cost-flow-note{margin:12px 0 0;font-size:13px;line-height:1.5;color:#6a7780}.site-document .cost-guard{margin:16px 0 8px;padding:14px 18px;background:var(--dl-accent-soft);border-radius:10px}.cost-guard strong{display:block;margin-bottom:2px}.site-document .cost-detail h3{margin:20px 0 4px;font:650 17px var(--dl-font)}.site-document .cost-detail p{margin-top:0}
@media(max-width:700px){.cost-flows{grid-template-columns:1fr}.cost-flow{padding:16px}.cost-list{font-size:14px}.cost-price dd{font-size:17px}}
.library-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:24px}.history-page .library-head h1{margin:0}
.library-record{min-height:44px;font-weight:650}.library-record::before{content:'+';margin-right:6px;font-size:18px;line-height:1}

.dg-icon-large{width:48px;height:48px;border-radius:12px}.dg-icon-large svg{width:31px;height:31px}

a.dg-step:hover,a.dg-node:hover,a.dg-lane-head:hover{border-color:var(--dl-accent)}







.dg-lanes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.dg-lane{display:flex;flex-direction:column;align-items:stretch;padding:12px;background:#fff;border:1px solid #c9d3d9;border-radius:12px}.dg-lane-head{display:flex;align-items:center;gap:12px;padding:4px 4px 12px;margin-bottom:10px;border-bottom:1px solid #e6ebed;color:var(--dl-text)!important;text-decoration:none;border-radius:8px}.dg-lane-head strong{font:650 17px var(--dl-font)}.dg-lane-step{position:relative;display:flex;align-items:center;gap:10px;min-height:46px;padding:8px 10px 8px 36px;background:#f7f9fa;border:1px solid #e1e7ea;border-radius:8px}.dg-lane-step .dg-num{top:50%;transform:translateY(-50%);left:8px;background:#fff;border:1px solid #c9d3d9}.dg-lane-step .dg-icon{width:30px;height:30px;border-radius:8px}.dg-lane-step .dg-icon svg{width:20px;height:20px}.dg-down{align-self:center;color:#7b8a93;font:15px/18px var(--dl-font)}

.dg-more>:not(summary){margin-left:14px;margin-right:14px}.dg-more article{background:#fff}
.dg-legend{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px 14px;margin:0;padding:0;list-style:none}.dg-legend li{display:flex;align-items:center;gap:10px;font:13.5px/1.35 var(--dl-font);color:var(--dl-text)}.dg-legend svg{flex:none;width:30px;height:30px}.dg-keys kbd{display:inline-block;min-width:26px;padding:3px 7px;margin-right:4px;border:1px solid #b9c3c9;border-bottom-width:3px;border-radius:6px;background:#fff;font:600 13px var(--dl-font);text-align:center}
.dg-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}.dg-pair>.dg{margin:0}
.dg-layouts{display:flex;gap:22px;align-items:flex-start;justify-content:center;flex-wrap:wrap}.dg-device{display:flex;flex-direction:column;align-items:center;gap:8px}.dg-device>span{font:600 12px var(--dl-font);color:var(--dl-muted)}.dg-screen{display:grid;gap:5px;padding:9px;border:2px solid #35434b;border-radius:14px;background:#fff}.dg-screen.phone{width:150px}.dg-screen.desktop{width:330px;grid-template-columns:1.15fr 1fr;border-radius:8px;align-items:start}.dg-col{display:grid;gap:5px}.dg-block{display:flex;align-items:center;justify-content:center;padding:5px;border-radius:5px;background:#e6ebed;color:var(--dl-text);font:600 11px/1.2 var(--dl-font);text-align:center;min-height:22px}.dg-block.board{aspect-ratio:1;background:#e2bd78}.dg-block.chart{background:#d4e8f4;min-height:34px}.dg-block.table{background:#dfeee4;min-height:44px}
.dg-tree{display:block;width:100%;max-width:420px;height:auto;margin:0 auto}
@media(max-width:760px){.dg-lanes{grid-template-columns:1fr}.dg-pair{grid-template-columns:1fr}}
@media(max-width:640px){.dg-tier-nodes{grid-template-columns:1fr 1fr}.dg-node{flex-direction:column;align-items:flex-start;gap:6px}.dg-screen.desktop{width:280px}}
@media(max-width:380px){.dg-tier-nodes{grid-template-columns:1fr}.dg-node{flex-direction:row;align-items:center}}

.dg-symbol{display:inline-grid;place-items:center;flex:none;width:30px;height:30px;border-radius:50%;color:#fff;font:750 14px var(--dl-font);box-shadow:0 0 0 2px #fff,0 1px 3px #0005}.dg-legend .dg-tri{filter:drop-shadow(0 1px 1px #0007)}
@media(max-width:640px){.dg-node:only-child{grid-column:1/-1;flex-direction:row;align-items:center}}
.dg-keys{display:inline-flex;flex:none;gap:4px}.dg-keys kbd{margin:0}.site-document .dg-stats+.dg-note{margin-top:-6px}.dg-more>section,.dg-more>article{padding:0 4px}
.site-document .dg-stats{grid-template-columns:repeat(3,minmax(0,1fr))}@media(max-width:640px){.site-document .dg-stats{grid-template-columns:1fr 1fr}}

.result-count{margin:0 0 16px;padding:12px 14px;border-radius:10px;background:#f3f5f6}.result-count-label{margin:0;font-size:15px;font-weight:600;color:#3d4a50}.end-game .result-summary{margin:0;color:#4b5a63;font-size:15px}.result-winner{display:flex;align-items:center;gap:10px;margin:6px 0;font-size:22px;line-height:1.25;font-weight:700;color:#1f2a2e}.result-winner::before{content:"";width:26px;height:26px;border-radius:50%;flex-shrink:0;box-shadow:1px 2px 3px rgba(0,0,0,.35)}.result-winner[data-winner=black]::before{background:radial-gradient(circle at 35% 30%,#666,#111 60%)}.result-winner[data-winner=white]::before{background:radial-gradient(circle at 35% 30%,#fff,#e9e9e6 55%,#bdbdb8)}.result-winner[data-winner=draw]::before{display:none}.result-options{border:0;margin:0;padding:0;display:grid;gap:6px}.result-row{display:flex;align-items:center;gap:10px;min-height:44px;padding:6px 12px;border:1px solid #d9dfe2;border-radius:10px;cursor:pointer;font-size:15px}.result-row:has(input[type=radio]:checked){border-color:#2f7d5b;background:#eef7f2}.result-row input[type=radio]{margin:0;width:18px;height:18px;accent-color:#2f7d5b;flex-shrink:0}.result-row .margin{width:84px;padding:6px 8px;font:inherit;border:1px solid #c4ccd0;border-radius:8px;margin-left:auto}.result-row .result-unit{min-width:2.4em;color:#5d6b70}.result-short{margin:12px 0 0;padding:8px 12px;border-radius:8px;background:#fff4dc;color:#7a4b00;font-size:14px}
.table-note{margin:6px 0 0;font-size:13px;color:#4b5a63}

/* Info pages: shared tab bar (added by site-shell.js) */



/* about-page agent: Read more cards, bullet lists and small tables on /about */
.about-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0 0}.rules-page .about-card{display:flex;align-items:flex-start;gap:14px;padding:16px 18px;border:1px solid var(--dl-line);border-radius:10px;background:#fff;color:var(--dl-text);text-decoration:none;transition:border-color .15s,box-shadow .15s}.rules-page .about-card:hover{border-color:var(--dl-accent);box-shadow:0 2px 8px #0000000d}.rules-page .about-card:focus-visible{outline:2px solid var(--dl-accent);outline-offset:3px}.about-card-text{display:flex;flex-direction:column;gap:4px;min-width:0}.about-card-text strong{font:650 18px/1.3 var(--dl-font);color:var(--dl-text)}.about-card-line{font:14px/1.45 var(--dl-font);color:var(--dl-muted)}.about-card-key{margin-top:4px;font:650 14px/1.4 var(--dl-font);color:var(--dl-accent)}
@media(max-width:600px){.about-cards{grid-template-columns:1fr}.rules-page .about-card{padding:14px}}
.rules-page .about-points{margin:8px 0 0;padding-left:20px}.rules-page .about-points li{font-size:15px;line-height:1.6;margin:4px 0}.rules-page .about-links{margin-top:10px}
.about-table-wrap{overflow-x:auto;margin:10px 0}.about-table{border-collapse:collapse;font-size:14px;line-height:1.45}.about-table :is(th,td){padding:7px 24px 7px 0;text-align:left;vertical-align:top;border-bottom:1px solid #e3e8eb}.about-table thead th{font-size:12px;font-weight:600;color:var(--dl-muted)}.about-table tbody th{font-weight:600}.about-table td{font-variant-numeric:tabular-nums}


/* docs-pages agent */
.site-document .doc-list{margin:6px 0 12px;padding-left:22px}.site-document .doc-list li{margin:3px 0}.site-document .document-table{margin:10px 0}.site-document .document-table th{background:#f7f9fa}.site-document .cost-detail .dg-stats{margin:10px 0}

/* bench-page agent */
.benchmarks-page section[id]{scroll-margin-top:72px}.benchmarks-page tr[id]{scroll-margin-top:84px}.benchmarks-page tr:target{background:#fdf7ea}
.benchmarks-page thead th{white-space:nowrap}.benchmarks-page td.num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.benchmarks-page .bench-settings td:last-child{min-width:16em}
.benchmarks-page h3{font:650 16px var(--dl-font);margin:20px 0 4px}.benchmarks-page .bench-note{margin:6px 0 0;font-size:13px;line-height:1.5;color:var(--dl-muted)}
.benchmarks-page .bench-runs td,.benchmarks-page .bench-settings td:first-child{white-space:nowrap}

/* Draft conflict: local editing stays open; the reload action is the obvious next step. */
.draft-conflict{margin:0 0 12px;padding:12px 14px;border:2px solid #d98a1c;border-radius:8px;background:#fff4df;color:#5b3a0e}.draft-conflict[hidden]{display:none}.draft-conflict p{margin:0 0 10px;font-size:14px;line-height:1.5}
.draft-conflict #draft-reload{display:block;width:100%;min-height:44px;padding:10px 16px;font-size:15px;font-weight:700;color:#fff;background:var(--dl-accent);border:2px solid var(--dl-accent);border-radius:var(--dl-radius-small)}.draft-conflict #draft-reload:hover{background:var(--dl-accent-hover);border-color:var(--dl-accent-hover)}.draft-conflict #draft-reload:focus-visible{outline:3px solid var(--dl-focus);outline-offset:3px}
@media(max-width:850px){.editor-page .workspace-panel>#draft-conflict{order:3;margin-top:4px}}

/* Live game info: each player's name and rank share a row; rules are two toggle buttons. */
#edit-form .edit-pair{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:10px;margin:16px 0}
#edit-form .edit-pair label{margin:0}
#edit-form .rules-field{margin:16px 0;font-size:14px}
.rules-choice{display:grid;grid-template-columns:1fr 1fr;margin-top:6px}
.rules-choice button{margin:0;padding:10px}

#edit-form .edit-pair:has(.komi-field){grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
#edit-form select{display:block;width:100%;margin-top:6px;font:inherit;font-size:14px;height:39px;padding:0 10px;border:1px solid var(--dl-line);border-radius:5px;background:#fff;color:var(--dl-text)}
#edit-form select:disabled{opacity:.6}
#edit-form .komi-field{font-size:14px;min-width:0}
#edit-form .komi-field output{display:block;margin-top:6px;padding:10px 0;font-weight:650}
#edit-form .byoyomi-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:end;gap:10px;margin-top:10px}
#edit-form .byoyomi-fields[hidden]{display:none}
#edit-form .byoyomi-fields label{margin:0;font-size:13px}
#edit-form .byoyomi-fields input:disabled,.rules-choice button:disabled{opacity:.6}
#edit-form .field-hint{display:block;margin-top:6px;font-size:12px;color:var(--dl-muted)}
.sr-only{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.player-boxes{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;margin:0 0 12px}
.player-box{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:6px 8px;padding:10px 12px;border:1px solid var(--dl-line);border-radius:8px;background:#fff;min-width:0}
.player-box.active{border-color:var(--dl-accent);box-shadow:inset 0 0 0 1px var(--dl-accent);background:var(--dl-accent-soft)}
.player-box-side{flex:1 1 100%;min-width:0;overflow:hidden;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;font-weight:650;font-size:14px;line-height:1.3}
.player-box-side::before,.my-side [data-side=black]::before,.my-side [data-side=white]::before{content:"";display:inline-block;vertical-align:-3px;margin-right:7px;width:16px;height:16px;box-sizing:border-box;border-radius:50%;box-shadow:0 1px 2px #0005}
.player-box-black::before,.my-side [data-side=black]::before{background:radial-gradient(circle at 30% 25%,#505452,#080a09);border:1px solid #89958d}
.player-box-white::before,.my-side [data-side=white]::before{background:radial-gradient(circle at 30% 25%,#fff,#dfdfd6);border:1px solid #b9b9ad}
.play-page .workspace-panel>.game-meta,.play-page .workspace-panel>.status-card{grid-column:1/-1}
.player-box-side small{margin-left:6px;white-space:nowrap;font-weight:400;font-size:12px;color:var(--dl-muted)}
.player-box-time{font-size:17px;line-height:24px;font-variant-numeric:tabular-nums}
.player-box-captures{font-size:12px;color:var(--dl-muted);white-space:nowrap}
.player-box-captures strong{color:var(--dl-text);font-weight:600}
.player-box-periods{flex:1 1 100%;min-height:1.3em;font-size:12px;line-height:1.3;color:var(--dl-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.player-box.byoyomi .player-box-time,.player-box.timeout .player-box-time{color:#a12a1f}
.player-box.timeout .player-box-time{font-weight:650}
.player-box.period-used .player-box-periods{color:#a12a1f;font-weight:650}
.status-card .clock-note{margin:-4px 0 10px;font-size:13px;color:var(--dl-muted)}
.status-card .sound-unlock{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;margin:-4px 0 10px;padding:9px 12px;font-size:14px;font-weight:650;color:var(--dl-accent);background:var(--dl-accent-soft);border:1px solid var(--dl-accent);border-radius:var(--dl-radius-small)}
.status-card .sound-unlock[hidden]{display:none}
.status-card .sound-unlock::before{content:"";width:18px;height:18px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a4b00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H3v6h3l5 4z' fill='%237a4b00'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a4b00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H3v6h3l5 4z' fill='%237a4b00'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13'/%3E%3C/svg%3E") center/contain no-repeat}
#pause-clock{display:flex;align-items:center;justify-content:center;gap:7px}
#pause-clock::before{content:"";flex-shrink:0;box-sizing:border-box;width:9px;height:11px;border-left:3px solid currentColor;border-right:3px solid currentColor}
#pause-clock[data-paused=true]::before{width:0;height:0;border-right:0;border-left:10px solid currentColor;border-top:6px solid transparent;border-bottom:6px solid transparent}
.play-prefs{display:flex;align-items:center;gap:10px 18px;flex-wrap:wrap}
.play-prefs #play-sound{flex:1 1 140px;min-width:0}
.play-prefs .stone-sound-control{margin:0;gap:8px}
.my-side{display:flex;align-items:center;flex-wrap:wrap;flex:1 1 100%;font-size:13px}
.my-side button{margin:0;padding:6px 7px;font-size:13px}
.my-side button[data-side]::before{width:13px;height:13px;margin-right:5px}

.play-prefs .stone-sound-control>span{flex-shrink:0;width:18px;height:18px;margin:0;overflow:hidden;font-size:0;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6b70' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H3v6h3l5 4z' fill='%235d6b70'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13'/%3E%3C/svg%3E") center/contain no-repeat}
.play-prefs .stone-sound-control output{min-width:36px;text-align:left}
.play-prefs .sync-group{display:flex;align-items:center;gap:10px;margin-left:auto}
.play-prefs .sync-group[hidden]{display:none}
.play-prefs #sync{min-width:3.6em}
#edit-dialog .actions{}
#edit-dialog .dl-dialog-actions button{min-width:96px}
.play-prefs .sync-group.off{padding:4px 10px;border-radius:8px;background:#fff4dc}
.play-prefs .sync-group.off label,.play-prefs .sync-group.off #sync{color:#7a4b00;font-weight:600}
body.focus .player-boxes{flex:1 1 100%;margin:0}
.sync-card{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.sync-card label{margin:0;flex-shrink:0}
.sync-card #sync{margin:0 0 0 auto;font-size:13px;color:var(--dl-muted);font-variant-numeric:tabular-nums;text-align:right}
.play-page .game-meta .game-terms{flex:1 1 100%;min-width:0;margin:0;font-size:13px;line-height:1.4;color:var(--dl-muted)}
@media(max-width:850px){.play-page #play-main{display:flex;flex-direction:column;gap:12px;padding:0 10px}.play-page #play-main>.play-area,.play-page #play-main>.workspace-panel{display:contents}.play-page #play-main .workspace-panel>*{order:5;margin:0 6px}.play-page #play-main .board-wrap{order:1;margin:0 auto}.play-page #play-main .live-navigation{order:2;margin:-4px 0 0}.play-page #play-main .workspace-panel>.status-card{order:3}.play-page #play-main .workspace-panel>#scoring{order:4}.play-page #play-main .workspace-panel>:last-child{margin-bottom:12px}.play-page .status-card{padding:10px 12px}.play-page .player-boxes{gap:8px;margin-bottom:8px}.play-page .player-box{padding:6px 10px;row-gap:2px}.play-page .status-card .actions{gap:8px}.play-page .status-card .actions button{padding:9px 6px}.play-page .status-card .clock-note{margin:-2px 0 8px}.play-page .play-prefs{padding:10px 12px;gap:10px 12px}.play-page .play-prefs .sync-group{gap:8px}.play-page .play-prefs .sync-group.off{padding:4px 8px}.play-page .play-prefs #play-sound{flex-basis:110px}.play-page .play-prefs .stone-sound-control input{min-width:48px}}
@media(max-width:850px) and (orientation:portrait){.play-page #play-main .board-wrap{width:min(100%,calc(100svh - var(--record-header-height,48px) - 224px))}}
#save-report.dl-button{padding:8px 14px;border-radius:var(--dl-radius-small);font-size:14px;line-height:1.2}#save-report.dl-button-primary{border-color:var(--dl-accent);background:var(--dl-accent);color:#fff}#save-report.dl-button-primary:hover{border-color:var(--dl-accent-hover);background:var(--dl-accent-hover)}
.health-chart{display:grid;gap:8px;margin:12px 0}.health-bar-row{display:grid;grid-template-columns:minmax(0,15em) minmax(0,1fr) auto;gap:10px;align-items:center}.health-bar{display:flex;gap:2px;height:14px;border-radius:7px;background:var(--dl-surface);overflow:hidden}.health-bar-visitor{background:var(--dl-accent)}.health-bar-self{background:var(--dl-ok)}.health-bar-count{color:var(--dl-muted);font-size:13px;white-space:nowrap}.health-legend{display:flex;flex-wrap:wrap;gap:6px 16px;margin:4px 0 0;color:var(--dl-muted);font-size:13px}.health-legend span::before{content:"";display:inline-block;width:10px;height:10px;margin-right:6px;border-radius:2px;vertical-align:-1px}.health-key-visitor::before{background:var(--dl-accent)}.health-key-self::before{background:var(--dl-ok)}.health-mark{font-weight:600;white-space:nowrap}.health-mark.is-pass{color:var(--dl-ok)}.health-mark.is-warn{color:#9a6700}.health-mark.is-fail{color:var(--dl-danger)}
@media(max-width:600px){.health-bar-row{grid-template-columns:minmax(0,1fr) auto}.health-bar{grid-column:1/-1;grid-row:2}}
@media(max-width:600px){.health-table table,.health-table tbody,.health-table tr,.health-table td{display:block;width:auto}.health-table tr:first-child{display:none}.health-table tr{padding:8px 0;border-bottom:1px solid var(--dl-line)}.health-table td{border:0;padding:3px 0}.health-table td::before{content:attr(data-label);display:block;color:var(--dl-muted);font-size:12px}.health-table td:first-child{font-weight:600}.health-table td:first-child::before{display:none}}

/* Admin tools on a game record: shown only to the signed-in site admin (record.js). */
#record-main .record-admin[hidden]{display:none}
#record-main .record-admin h2{margin:0 0 4px;font-size:15px}
#record-main .record-admin p{margin:0 0 10px;font-size:13px;line-height:1.5;color:var(--dl-muted)}
#record-main .record-admin-actions{display:flex;flex-wrap:wrap;gap:8px}
#record-main .record-admin #admin-message{margin:10px 0 0;color:var(--dl-text)}
#record-main .record-admin #admin-message:empty{display:none}
@media(max-width:850px){#record-main aside>.record-admin{order:4}}
#edit-dialog #edit-error,#delete-dialog #delete-error{color:var(--dl-danger)}
#edit-dialog #edit-error:empty,#delete-dialog #delete-error:empty{display:none}
#edit-dialog #edit-note{margin:0 0 12px}
