/* 一筆書きパズル固有の見た目（共通は ../common/base.css）。盤の中の色は明るい盤の上で見やすい色に固定（ダーク表示でも盤は明るい） */
[hidden] { display: none !important; }

.board-wrap { min-height: 200px; }
.fig {
  display: block; width: min(100%, 560px); height: auto; margin: 0 auto; max-height: 72vh;
  background: var(--board); border-radius: var(--radius); user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.fig.live { touch-action: none; cursor: pointer; }

/* ---------- 線の図形 ---------- */
.fig .edge { fill: none; stroke: #8C857A; stroke-width: 7; stroke-linecap: round; }
.fig .next { fill: none; stroke: #2F5D8A; stroke-opacity: .22; stroke-width: 22; stroke-linecap: round; }
.fig .done { fill: none; stroke: #2F6DB5; stroke-width: 13; stroke-linecap: round; stroke-linejoin: round; }
.fig .done.is-bad { stroke: #B23A3A; stroke-dasharray: 14 12; stroke-linecap: butt; }
.fig .answer { fill: none; stroke: #2E7D4F; stroke-width: 11; stroke-linecap: round; }
.fig .anum circle { fill: #2E7D4F; stroke: #FFFFFF; stroke-width: 2.5; }
.fig .anum text { fill: #FFFFFF; font: 700 15px system-ui, "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif; text-anchor: middle; dominant-baseline: central; }
.fig .hintline { fill: none; stroke: #B7791F; stroke-width: 12; stroke-linecap: round; stroke-dasharray: 1 18; }
.fig .pt .dot { fill: #FFFFFF; stroke: #3A3530; stroke-width: 4; }
.fig .pt.is-head .dot { fill: #2F6DB5; stroke: #1F2328; }
.fig .pt .ring { fill: none; stroke: #2F6DB5; stroke-width: 4; }
.fig .pt.is-start .dot { fill: #DCEFE2; stroke: #2E7D4F; stroke-width: 5; }
.fig .pt.is-odd .dot { fill: #F8DCD9; stroke: #B23A3A; stroke-width: 5; }
.fig .pt .deg { fill: #1F2328; font: 700 18px system-ui, "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif; text-anchor: middle; dominant-baseline: central; }
.fig .pt .hintring { fill: none; stroke: #B7791F; stroke-width: 5; stroke-dasharray: 6 5; }
.fig .pt .cursorring { fill: none; stroke: #B7791F; stroke-width: 4; }
.fig.appear .edges { animation: fade-in .35s ease-out; }

/* ---------- マス目 ---------- */
.fig .cell { fill: #FFFFFF; stroke: #CFCBC1; stroke-width: 2; }
.fig .cell.is-vis { fill: #DCE7F3; }
.fig .cell.is-start { fill: #DCEFE2; stroke: #2E7D4F; stroke-width: 3; }
.fig .cell.is-block { fill: #6E675D; stroke: #6E675D; }
.fig .blockx { stroke: #4E483F; stroke-width: 4; stroke-linecap: round; }
.fig .gridpath { fill: none; stroke: #2F6DB5; stroke-width: 14; stroke-linecap: round; stroke-linejoin: round; }
.fig .gridpath.is-bad { stroke: #B23A3A; stroke-dasharray: 12 10; stroke-linecap: butt; }
.fig .gridanswer { fill: none; stroke: #2E7D4F; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.fig .gridhint { stroke: #B7791F; stroke-width: 10; stroke-linecap: round; stroke-dasharray: 1 14; }
.fig .hintcell { fill: none; stroke: #B7791F; stroke-width: 4; stroke-dasharray: 7 5; }
.fig .gridhead { fill: #2F6DB5; stroke: #FFFFFF; stroke-width: 4; }
.fig .startmark { fill: #2E7D4F; font: 700 13px system-ui, "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif; text-anchor: middle; dominant-baseline: central; }
.fig .cursorcell { fill: none; stroke: #B7791F; stroke-width: 3; }
.fig.appear .cells { animation: fade-in .35s ease-out; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 道具・クイズ ---------- */
.tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px auto 0; max-width: 560px; }
.tool { display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; font-size: 16px; flex: 1 1 0; justify-content: center; white-space: nowrap; }
.tool svg { width: 20px; height: 20px; flex: none; }
.quiz { display: flex; justify-content: center; gap: 12px; margin: 12px auto 0; max-width: 560px; }
.answer-btn { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; font-size: 19px; }
.answer-btn svg { width: 24px; height: 24px; flex: none; }
.after { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.status { justify-content: space-between; flex-wrap: wrap; row-gap: 0; }
.st-text { min-width: 0; }
.st-right { display: inline-flex; align-items: center; gap: 12px; margin-left: auto; }
.remain { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.remain b { color: var(--accent); font-size: 20px; }
.timer { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 18px; min-width: 50px; text-align: right; }
.linkbtn { display: inline-flex; align-items: center; text-decoration: none; }
.tag { display: inline-block; white-space: nowrap; font-size: 14px; font-weight: 700; padding: 0 8px; border-radius: 999px; border: 1.5px solid currentColor; margin-left: 6px; vertical-align: middle; color: var(--accent); }
.tag.best { color: var(--ok); }
.dots { display: inline-flex; gap: 5px; vertical-align: middle; margin-left: 6px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink-sub); display: inline-block; }
.dots i.ok { background: var(--ok); border-color: var(--ok); }
.dots i.ng { background: var(--ng); border-color: var(--ng); }
.dots i.now { border-color: var(--accent); border-width: 3px; }

.think { margin: 10px auto 0; max-width: 640px; border: 2px solid var(--line); border-radius: var(--radius); padding: 10px 14px; background: var(--surface); }
.think h3 { margin: 0 0 4px; font-size: 16px; }
.think p { margin: 0 0 6px; }
.think p:last-child { margin-bottom: 0; }
.think .odd { color: var(--ng); font-weight: 700; }
.callout { z-index: 3; font-size: clamp(17px, 4vw, 22px); padding: 4px 20px; border-width: 2.5px; } /* 図形の上の余白に収まる大きさ */

@media (max-width: 480px) {
  .stage { padding: 8px; }
  .tools { gap: 6px; }
  .tool { padding: 0 6px; font-size: 15px; gap: 4px; min-width: 0; }
  .tools svg { display: none; }
  .controls .btn.icon { padding: 0 9px; }
  .fig { max-height: 62vh; }
}
@media (prefers-reduced-motion: reduce) {
  .fig.appear .edges, .fig.appear .cells { animation: none; }
}
/* 上のバーの高さを一定に（No.93。数字は一番長い文が画面の幅（360px・375px 以上・641px 以上）で何行になるか。--tb-rt はふりがなの分。base.css・turnbar.js） */
.turnbar { --tb-msg-lines: 3; --tb-st-lines: 2.25; --tb-rt: 0px; --tb-st-rt: 0px; }
@media (min-width: 375px) { .turnbar { --tb-msg-lines: 3; --tb-st-lines: 2.25; } }
@media (min-width: 641px) { .turnbar { --tb-msg-lines: 2; --tb-st-lines: 1.25; } }
:root:lang(en) .turnbar { --tb-msg-lines: 4; --tb-st-lines: 2.25; --tb-rt: 0px; --tb-st-rt: 0px; }
@media (min-width: 375px) { :root:lang(en) .turnbar { --tb-msg-lines: 3; --tb-st-lines: 2.25; } }
@media (min-width: 641px) { :root:lang(en) .turnbar { --tb-msg-lines: 2; --tb-st-lines: 1.25; } }
/* 上のバーの高さ ここまで */
