/* ネジ外しパズル 固有の見た目（共通は ../common/base.css）。盤の中の色は、ダーク表示でも同じ（固定色） */
[hidden] { display: none !important; }

.board-wrap { position: relative; max-width: 640px; margin: 0 auto; }
.board-box { display: flex; justify-content: center; }
.stage svg.neji {
  display: block; height: auto;
  width: min(100%, 470px, calc(60vh * var(--ar, 0.8)));
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; cursor: pointer;
}
svg.neji text { pointer-events: none; }
svg.neji .over, svg.neji .layer { pointer-events: none; }

/* 盤の地: 穴のあいた明るい灰色の板 */
.neji .b-panel { fill: #B9B4A8; stroke: #7D776B; stroke-width: 4; }
.neji .b-inner { fill: #CFCAC0; }
.neji .b-dot { fill: #ABA597; }
.neji .b-hole-rim { fill: #A39D90; }
.neji .b-hole { fill: #3A3631; }

/* 木の板: 少し透けて下のネジが見える。手で触る物なので薄い影を1段 */
.neji .plate { opacity: .9; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .3)); }
.neji .p-hole { fill: #3A3631; }
.neji .plate.flash .p-edge { animation: neji-flash 1.2s ease-out; }
@keyframes neji-flash { 0%, 60% { stroke: #B23A3A; } 100% { } }

/* 金属のネジ */
.neji .s-shadow { fill: rgba(0, 0, 0, .28); transform: translate(2px, 4px); }
.neji .s-head { fill: #C4C9CF; stroke: #5D646C; stroke-width: 3; }
.neji .s-face { fill: #D9DDE1; }
.neji .s-slot { fill: #4D545C; }
.neji .screw.lifted .s-shadow { transform: translate(5px, 16px); fill: rgba(0, 0, 0, .22); }
.neji .screw.lifted .s-head { stroke: #2F5D8A; stroke-width: 6; }

/* 付けられる穴（青い輪）・ヒント（注意色の点線）・キーボードの枠 */
.neji .target { fill: none; stroke: #2F6DB5; stroke-width: 7; stroke-dasharray: 10 6; }
.neji .hint-ring { fill: none; stroke: #F2C14E; stroke-width: 8; stroke-dasharray: 14 8; }
.neji .hint-path, .neji .hint-head { fill: none; stroke: #F2C14E; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.neji .hint-path { stroke-dasharray: 2 14; }
.neji .cursor { fill: none; stroke: #2F5D8A; stroke-width: 6; }

/* 手番のバー: 問題・のこりの板・手数・最短 */
.status { flex-wrap: wrap; column-gap: 14px; row-gap: 0; }
.st-name { white-space: nowrap; }
.counter { font-variant-numeric: tabular-nums; white-space: nowrap; }
.counter b { font-size: 1.12em; }
.counter.sub { font-weight: 400; color: var(--ink-sub); }

/* 問題の選択 */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; font-style: normal; }
.stages { gap: 6px; }
.stage-choice span { min-width: 48px; justify-content: center; padding: 0 6px; font-variant-numeric: tabular-nums; position: relative; }
.stage-choice .ck, .stage-choice .star { width: 14px; height: 14px; margin-left: 2px; }
.stage-choice .ck path { fill: none; stroke: var(--ok); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.stage-choice .star path { fill: var(--warn); }

/* ボタンの列 */
.btnrow { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.linkbtn { display: inline-flex; align-items: center; text-decoration: none; }

.result-box { position: static; margin: 10px auto 0; padding: 16px 20px; max-width: 560px; }
.result-box h2 { font-size: 1.4rem; margin-bottom: 4px; }
.result-box .big { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.result-box ul { list-style: none; padding: 0; margin: 0 0 8px; }
.callout { z-index: 3; font-size: clamp(17px, 4vw, 22px); padding: 4px 18px; }

@media (max-width: 480px) {
  .stage { padding: 8px; }
  .controls .btn.icon, .btnrow .btn { padding: 0 10px; }
  .stage svg.neji { width: min(100%, 470px, calc(52vh * var(--ar, 0.8))); }
  .btnrow { margin-top: 8px; gap: 6px; }
  :root:lang(en) #controls-btn { display: none; }
}
/* 上のバーの高さを一定に（No.93。数字は一番長い文が画面の幅（360px・375px 以上・641px 以上）で何行になるか。--tb-rt はふりがなの分。base.css・turnbar.js） */
.turnbar { --tb-msg-lines: 2; --tb-st-lines: 2.25; --tb-rt: 0px; --tb-st-rt: 0px; }
@media (min-width: 375px) { .turnbar { --tb-msg-lines: 2; --tb-st-lines: 2.25; } }
@media (min-width: 641px) { .turnbar { --tb-msg-lines: 1; --tb-st-lines: 1; } }
:root:lang(en) .turnbar { --tb-msg-lines: 2; --tb-st-lines: 2.25; --tb-rt: 0px; --tb-st-rt: 0px; }
@media (min-width: 375px) { :root:lang(en) .turnbar { --tb-msg-lines: 2; --tb-st-lines: 2.25; } }
@media (min-width: 641px) { :root:lang(en) .turnbar { --tb-msg-lines: 1; --tb-st-lines: 1; } }
/* 上のバーの高さ ここまで */
