
:root { color-scheme: light; font-family: "Yu Gothic", "Meiryo", sans-serif; color: #202d32; background: #f7f5ef; line-height: 1.9; }
* { box-sizing: border-box; }
body { margin: 0; }
header, main, footer { max-width: 900px; margin: auto; padding: 24px 32px; }
header { border-bottom: 2px solid #246256; font-weight: bold; }
main { min-height: 65vh; padding-top: 32px; }
a { color: #135f56; text-underline-offset: .18em; }
a:hover { color: #953f1f; }
a:focus-visible { outline: 3px solid #b87712; outline-offset: 4px; }
h1 { font-size: clamp(1.65rem, 4vw, 2.35rem); line-height: 1.5; margin-top: 8px; }
h2 { font-size: 1.25rem; margin: 2em 0 .6em; }
p { margin: .8em 0 1.2em; }
.lead { font-size: 1.12rem; }
.eyebrow { font-weight: bold; color: #246256; letter-spacing: .08em; margin-bottom: 0; }
aside { border-left: 4px solid #bd8535; padding: 8px 24px; background: #fff9e9; margin: 32px 0; }
aside h2 { margin-top: .5em; }
.small, figcaption, footer { font-size: .9rem; color: #4d595d; }
figure { margin: 28px 0; }
pre { padding: 24px; background: #fff; border: 1px solid #d7d8ce; overflow-x: auto; font-family: Consolas, "Courier New", monospace; font-size: 16px; line-height: 1.45; white-space: pre; }
figcaption { margin-top: 12px; }
.collections, .pager { display: flex; flex-wrap: wrap; gap: 16px; margin: 32px 0; }
.collections a { display: block; padding: 16px 24px; background: #e5eee7; border: 1px solid #b8cec0; border-radius: 6px; font-weight: bold; }
.card-list { padding-left: 1.8em; }
.card-list li { padding: 16px 0; border-bottom: 1px solid #d8ddd6; }
.card-list li > a { font-weight: bold; }
.card-list p { margin: .4em 0; }
footer { border-top: 1px solid #d8ddd6; }
@media (max-width: 560px) { header, main, footer { padding: 20px; } pre { padding: 14px; font-size: 14px; } aside { padding: 8px 16px; } }
@media print { body { background: white; } header, footer, .pager { display: none; } main { max-width: none; } aside, figure { break-inside: avoid; } }

/* 囲碁盤：交点・石・着手印はHTML/CSSで描画し、外部画像や通信を使わない。 */
.go-scroll { overflow-x: auto; padding: 8px 0; }
.go-board { --cell: 30px; display: grid; grid-template-columns: 26px repeat(var(--columns), var(--cell)); width: max-content; padding: 14px; background: #dcb56d; border: 1px solid #99733c; border-radius: 4px; color: #302617; }
.go-coordinate { height: var(--cell); display: grid; place-items: center; font: 13px Consolas, monospace; }
.go-point { position: relative; width: var(--cell); height: var(--cell); display: grid; place-items: center; background-image: linear-gradient(to right, transparent calc(50% - .5px), #655031 calc(50% - .5px), #655031 calc(50% + .5px), transparent calc(50% + .5px)), linear-gradient(to bottom, transparent calc(50% - .5px), #655031 calc(50% - .5px), #655031 calc(50% + .5px), transparent calc(50% + .5px)); }
.go-stone { width: 26px; height: 26px; border-radius: 50%; position: relative; box-shadow: 1px 2px 2px #0005; }
.go-black { background: radial-gradient(circle at 32% 25%, #515151, #101010 65%); border: 1px solid #111; }
.go-white { background: radial-gradient(circle at 32% 25%, #fff, #e4e3df 75%); border: 1px solid #89877f; }
.go-last::after { content: ''; position: absolute; width: 9px; height: 9px; left: 7px; top: 7px; border: 2px solid #e63d36; border-radius: 50%; background: #fff; }
.go-candidate { background: #fff2cb; border: 1px solid #805f32; border-radius: 3px; min-width: 20px; height: 22px; text-align: center; font: bold 16px/20px Consolas, monospace; color: #71310d; }
.go-unspecified { color: #645c4c; background: #e6ce9c; border-radius: 50%; font: 14px Consolas, monospace; }
.go-text { margin-top: 8px; }

/* 黒石の着手印は白石と混同しないよう、白塗りを使わない。 */
.go-black.go-last::after { width: 10px; height: 10px; left: 5px; top: 5px; border: 3px solid #ffca28; background: transparent; }
.go-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin: 10px 0; }
.go-copy { font: inherit; font-size: .9rem; color: #164f46; background: #eef5ef; border: 1px solid #91b4a5; border-radius: 5px; padding: 8px 12px; cursor: pointer; }
.go-copy:hover { background: #ddebe0; }
.go-copy:focus-visible { outline: 3px solid #b87712; outline-offset: 3px; }
.go-copy:disabled { opacity: .65; cursor: wait; }
.go-copy-status { font-size: .9rem; }
@media print { .go-tools { display: none; } }

/* 実際の盤端だけ線を半分にする。部分図の切断面は通常の交点のまま。 */
.go-point { background-image: none; }
.go-point::before, .go-point::after { content: ''; position: absolute; background: #655031; }
.go-point::before { height: 1px; width: 100%; left: 0; top: calc(50% - .5px); }
.go-point::after { width: 1px; height: 100%; top: 0; left: calc(50% - .5px); }
.go-edge-left::before { left: 50%; width: 50%; }
.go-edge-right::before { width: 50%; }
.go-edge-top::after { top: 50%; height: 50%; }
.go-edge-bottom::after { height: 50%; }
.go-stone, .go-candidate, .go-unspecified { z-index: 1; }

.go-replay { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 4px; }
.go-step, .go-reset { font: inherit; border: 1px solid #91b4a5; border-radius: 5px; padding: 6px 12px; color: #164f46; background: #eef5ef; cursor: pointer; }
.go-step { min-width: 44px; min-height: 44px; }
.go-step:disabled, .go-reset:disabled { opacity: .45; cursor: default; }
.go-step:focus-visible, .go-reset:focus-visible { outline: 3px solid #b87712; outline-offset: 3px; }
.go-replay-status { font-size: .9rem; }
@media print { .go-replay, .go-replay-note { display: none; } }

/* 操作ボタンは左上の固定幅２列。可変長の手数表示は必ず次の行に置く。 */
.go-replay { display: grid; grid-template-columns: 44px 44px minmax(0, 1fr); align-items: start; gap: 8px; }
.go-step { width: 44px; height: 44px; padding: 0; }
.go-step[data-step="-1"] { grid-column: 1; grid-row: 1; }
.go-step[data-step="1"] { grid-column: 2; grid-row: 1; }
.go-reset { grid-column: 3; grid-row: 1; justify-self: start; max-width: 100%; }
.go-replay-status { grid-column: 1 / -1; grid-row: 2; overflow-wrap: anywhere; }

/* 再生範囲は図ごとに指定。注目手の印はシークバーと同じ縮尺で配置する。 */
.go-seek { grid-column:1 / -1; grid-row:3; min-width:0; }
.go-seek label { display:block; font-size:.9rem; }
.go-seek-input { display:block; width:100%; margin:8px 0; accent-color:#176b59; }
.go-seek-marks { position:relative; height:30px; margin:0 10px; }
.go-keyframe { position:absolute; left:var(--position); transform:translateX(-50%); border:1px solid #805400; border-radius:4px; background:#ffdc72; color:#573600; min-width:28px; min-height:28px; cursor:pointer; }
.go-keyframe[aria-current="step"] { outline:3px solid #176b59; }
.go-keyframe:focus-visible { outline:3px solid #176b59; }
.go-keyframe-status { display:block; min-height:1.6em; font-weight:bold; overflow-wrap:anywhere; }

/* 上段：前後ボタンとシーク、下段：シーク上の注目手。 */
.go-replay { align-items:center; row-gap:2px; }
.go-seek { display:contents; }
.go-seek label { grid-column:3; grid-row:1; min-width:0; }
.go-seek-input { margin:0; box-sizing:border-box; }
.go-seek-marks { grid-column:3; grid-row:2; margin:0 10px; }
.go-replay [hidden] { display:none; }
.go-skip-notice { grid-column:1 / -1; grid-row:3; font-size:.9rem; }
.go-visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }

.go-comparison-controls { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:16px 0; }
.go-comparison-controls[hidden], .go-comparison > figure[hidden] { display:none; }
.go-comparison-controls button { min-width:44px; min-height:44px; font:inherit; border:1px solid #91b4a5; border-radius:5px; color:#164f46; background:#eef5ef; cursor:pointer; }
.go-comparison-controls button:disabled { opacity:.45; cursor:default; }
.go-comparison-controls input { flex:1; min-width:100px; accent-color:#176b59; }
.go-comparison-controls [role="status"] { width:100%; font-size:.9rem; }
.go-replay-note { font-size:.9rem; color:#445b53; }
.go-board { position:relative; }
.go-crop-edge { position:absolute; z-index:2; pointer-events:none; }
.go-crop-left, .go-crop-right { top:14px; bottom:44px; width:12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='24' viewBox='0 0 12 24'%3E%3Cpath d='M3 0 Q-1 6 3 12 T3 24 M9 0 Q5 6 9 12 T9 24' fill='none' stroke='%2372472c' stroke-width='1.7'/%3E%3C/svg%3E") repeat-y; }
.go-crop-left { left:34px; } .go-crop-right { right:8px; }
.go-crop-top, .go-crop-bottom { left:40px; right:14px; height:12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12' viewBox='0 0 24 12'%3E%3Cpath d='M0 3 Q6 -1 12 3 T24 3 M0 9 Q6 5 12 9 T24 9' fill='none' stroke='%2372472c' stroke-width='1.7'/%3E%3C/svg%3E") repeat-x; }
.go-crop-top { top:8px; } .go-crop-bottom { bottom:38px; }
.go-crop-note { font-size:.9rem; color:#68462d; margin:8px 0; }
@media print { .go-comparison-controls { display:none; } .go-comparison > figure[hidden] { display:block; } }

/* 組合せの照合記号。着手候補の文字と区別し、元の記号を保持する。 */
.go-pattern-symbol { position:relative; z-index:1; display:inline-grid; place-items:center; width:24px; height:24px; border:1px dashed #594524; border-radius:4px; background:#fff1ce; color:#35250e; font:bold 19px monospace; }

.definition-notice { border-left:4px solid #b07817; padding:2px 14px; margin:16px 0; background:#fff4dc; font-size:.9rem; }
