/* 車の脱出パズル 固有の見た目（共通は ../common/base.css）。盤の中の色は、ダーク表示でも同じ駐車場の色（固定色） */
[hidden] { display: none !important; }

.board-wrap { position: relative; max-width: 640px; margin: 0 auto; }
.lot-box { display: flex; justify-content: center; }
svg.kuruma {
  display: block; height: auto; aspect-ratio: 730 / 660;
  width: min(100%, 520px, calc(60vh * 730 / 660));
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; cursor: pointer;
}
svg.kuruma text { pointer-events: none; }

/* 駐車場: コンクリートの壁・アスファルトの床・白い十字のます目・出口 */
.kuruma .wall { fill: #A9ACA8; stroke: #6F736F; stroke-width: 3; }
.kuruma .floor { fill: #595E64; }
.kuruma .lot-mark { stroke: #D9DBD6; stroke-width: 3; stroke-linecap: round; opacity: .55; }
.kuruma .road, .kuruma .exit { fill: #595E64; }
.kuruma .exit-edge { stroke: #6F736F; stroke-width: 4; }
.kuruma .exit-arrow { fill: none; stroke: #E4C45A; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.kuruma .lane { stroke: #E4C45A; stroke-width: 3; stroke-dasharray: 3 14; stroke-linecap: round; opacity: .45; }
.kuruma .exit-label { font-family: var(--font); font-size: 26px; font-weight: 700; fill: var(--ink-sub); text-anchor: middle; }

/* 車: 手で触る物なので薄い影を1段、つかんだ車は影を大きく */
.kuruma .car { filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .35)); }
.kuruma .car.lifted { filter: drop-shadow(0 9px 7px rgba(0, 0, 0, .35)); }

/* 選んだ車: アクセント色の枠と、動ける向きの三角 */
.kuruma .car.selected .body-line { stroke: #7FB3E6; stroke-width: 8; }
.kuruma .sel-arrow { fill: #2F5D8A; stroke: #FFFFFF; stroke-width: 3; stroke-linejoin: round; pointer-events: none; }
/* ヒント: 動かす車を注意色の点線、行き先に点線の影と矢印 */
.kuruma .hint-box { fill: none; stroke: #F2C14E; stroke-width: 7; stroke-dasharray: 18 10; pointer-events: none; }
.kuruma .hint-ghost { fill: rgba(242, 193, 78, .18); stroke: #F2C14E; stroke-width: 4; stroke-dasharray: 12 8; }
.kuruma .hint-path, .kuruma .hint-head { fill: none; stroke: #F2C14E; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.kuruma .hint-path { stroke-dasharray: 2 13; }
.kuruma .over { pointer-events: none; }

/* 手番のバー: 問題・手数・最短 */
.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; }
  svg.kuruma { width: min(100%, 520px, calc(54vh * 730 / 660)); }
  .btnrow { margin-top: 8px; gap: 6px; }
  /* 英語はボタンの文字が長く3段になるので、スマホ幅では「操作」を出さない（操作のしかたは盤のすぐ下にある） */
  :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: 1; } }
@media (min-width: 641px) { .turnbar { --tb-msg-lines: 1; --tb-st-lines: 1; } }
:root:lang(en) .turnbar { --tb-msg-lines: 3; --tb-st-lines: 1; --tb-rt: 0px; --tb-st-rt: 0px; }
@media (min-width: 375px) { :root:lang(en) .turnbar { --tb-msg-lines: 2; --tb-st-lines: 1; } }
@media (min-width: 641px) { :root:lang(en) .turnbar { --tb-msg-lines: 1; --tb-st-lines: 1; } }
/* 上のバーの高さ ここまで */
