/* pzlers 公式Web 手筋の解説ページ(Issue #114)。site.css・puzzle.css の上に重ねる。
   盤の枠(A〜F)の色はアプリのヒントと同じ(packages/ui/src/styles/board-tokens.css の --hint-region-*)。
   X-Wing の解説では、底の線 = 紫、覆う線 = 緑、消える候補 = 赤、決まる一手 = 青。文の色の語も同じ色 */
:root {
  /* 段の切り替えの動き(motion.ts が読む)。動きを減らす設定では 0 */
  --t-motion: 1;
  --hint-region-a: #b35900; --hint-region-b: #7a3db8; --hint-region-c: #00745a;
  --hint-region-d: #b0125e; --hint-region-e: #5c6400; --hint-region-f: #006c87;
  --hint-region-ink: #ffffff; --hint-region-halo: #ffffff;
  --t-given: #2a2f3c; --t-input: #2563eb; --t-cand: #3d3d44; --t-pencil: #8a90a0; --t-cell: #ffffff; --t-line: #c9c9c3; --t-line-b: #0e0e10;
  --t-base: #7a3db8; --t-cover: #00745a; --t-struck: #d92d20; --t-answer: #1f5fff; --t-corner: #1f5fff;
  --t-corner-bg: #e3ebff; --t-base-bg: #efe6fa; --t-cover-bg: #dff3ec; --t-both-bg: #e4e4f4; --t-struck-bg: #fde4e1; --t-unit-bg: #e3ebff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --hint-region-a: #ffb062; --hint-region-b: #d4b0ff; --hint-region-c: #5fe0b8;
    --hint-region-d: #ff9ccc; --hint-region-e: #e2e86a; --hint-region-f: #7fdcf5;
    --hint-region-ink: #101827; --hint-region-halo: #101827;
    --t-given: #f1f2f6; --t-input: #5b93f5; --t-cand: #d6d6dc; --t-pencil: #7a8096; --t-cell: #18181b; --t-line: #3a3a40; --t-line-b: #f2f2ef;
    --t-base: #c9a2ff; --t-cover: #5fe0b8; --t-struck: #ff7a6b; --t-answer: #8fb0ff; --t-corner: #8fb0ff;
    --t-corner-bg: #1d2a48; --t-base-bg: #2e2440; --t-cover-bg: #173229; --t-both-bg: #2a2d3a; --t-struck-bg: #3d1d1a; --t-unit-bg: #1d2a48;
  }
  /* 盤の上だけは、アプリの暗い配色の盤(packages/ui/src/styles/board-tokens.css の :root[data-theme='dark'])と同じ、
     くすんだ青の地に濃紺の数字。黒い地では小さい候補の字・× が沈んで読めなかった(2026-11-25 本人の確認)。
     帯は枠の色(--hint-region-*)を地色に 55% 混ぜた色で、濃紺の字とのコントラスト比は 7 以上。候補の字は地色の上で 5.2 */
  .t-board {
    --t-cell: #788bb0; --t-line: #5d7097; --t-line-b: #101827;
    --t-given: #101827; --t-input: #081d57; --t-cand: #101827; --t-pencil: #101827;
    --t-answer: #0a3290; --t-corner: #0a3290; --t-corner-bg: #c3d1ef; --t-struck: #7d0610; --t-struck-bg: #f0b9be;
    --t-base-bg: #ab9fdb; --t-cover-bg: #6abab4; --t-both-bg: #8aacc5; --t-unit-bg: #c3d1ef;
  }
}

/* ---------- ヒーロー: 左に名前と「まず、ここを見る」、右に解説の盤(PC)。スマホは縦に ---------- */
.t-hero { padding: 20px 0 56px; }
.t-hero-in { display: grid; gap: 24px; }
.t-hero-in > * { min-width: 0; }
.t-left { display: grid; gap: 24px; align-content: start; }
@media (min-width: 1020px) {
  .t-hero { padding: 36px 0 88px; }
  .t-hero-in { grid-template-columns: minmax(0, 1fr) minmax(0, 560px); column-gap: 48px; align-items: start; }
  .t-left { gap: 32px; position: sticky; top: calc(var(--nav-h) + 24px); }
}
/* 見出し(手筋名)は語の切れ目(<wbr> と空白)でだけ折り返す。語の途中で折らないよう、字の大きさは
   一番長い語(--t-h1-seg、technique-pages.mjs の h1Seg が em で数える)が欄の幅(100cqi)に収まる大きさを上限にする */
.t-head { container-type: inline-size; }
.t-head h1 { margin-top: 12px; font-weight: 800; font-size: min(clamp(38px, 5.6vw, 68px), calc(100cqi / var(--t-h1-seg, 1))); line-height: 1.08; letter-spacing: -0.035em; word-break: keep-all; overflow-wrap: normal; }
/* 見出し→英語名→要約の間隔。字の黒い部分どうしのすき間を実測すると、見出しの行と行の間は見出しの字の 0.16〜0.24 倍(25手筋・375/1280・日英で最大 0.24 倍)。
   ・見出しと英語名の間は、その最大の 1.5 倍(見出しの字の 0.36 倍)以上あけ、英語名が見出しの続きの行に見えないようにする。
     字の外の余白が見出しの字の約 0.14 倍あるので、足す余白は 0.22 倍 = 英語名の字(0.42 倍)の 0.52 倍。
   ・英語名と要約の間は、見出しと英語名の間の 1.5 倍以上あけ、英語名が見出しの側にまとまって見えるようにする。
     要約の margin-top 14px と字の外の余白(68px の見出しで約 6px)に、英語名の字の 0.56 倍(16px)を足して 36px。
     margin だと要約の margin-top と相殺されるので padding で足す。測り方は PR #122 */
.t-h1-sub { display: block; margin-top: .52em; padding-bottom: .56em; font-size: .42em; letter-spacing: -0.01em; color: var(--ink-3); }
.t-summary { margin-top: 14px; max-width: 34em; font-size: clamp(16px, 1.4vw, 18px); line-height: 1.8; color: var(--ink-2); }

/* まず、ここを見る: 押すと解説のその段へ。今の段の項目が色付きになる */
.t-look { padding: 20px 18px 16px; border-radius: var(--r); background: color-mix(in srgb, var(--c) 8%, var(--bg)); }
.t-look-k { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; padding: 0 6px; }
.t-look-list { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.t-look-list button { display: grid; grid-template-columns: 28px 1fr; gap: 10px; width: 100%; padding: 10px 8px; border: 0; border-radius: 14px; background: transparent; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.65; text-align: left; cursor: pointer; transition: background .2s ease; }
.t-look-list button:hover { background: color-mix(in srgb, var(--c) 10%, var(--bg)); }
.t-look-list button[aria-current="step"] { background: var(--bg); box-shadow: inset 0 0 0 2px var(--c); }
.t-look-n { display: block; align-self: start; width: 26px; margin-top: 1px; --dy: 0em; padding: calc((26px - 1cap) / 2 - var(--dy)) 0 calc((26px - 1cap) / 2 + var(--dy)); border-radius: 8px; background: var(--c); color: var(--on-c); font-size: 14px; font-weight: 800; line-height: 1; text-align: center; text-box: trim-both cap alphabetic; }
.t-look-hint { margin-top: 6px; padding: 0 8px; font-size: 13px; color: var(--ink-3); }
.t-look-hint .t-sp { display: none; }
@media (max-width: 1019px) { .t-look-hint .t-pc { display: none; } .t-look-hint .t-sp { display: inline; } }
html:not(.t-js) .t-look-hint { display: none; }

/* 解説の盤。スマホ: 盤と説明が1画面に収まる(盤の幅を画面の高さから決める)。PC: 右の列に置いて上に残す */
/* 上の余白は site.css の scroll-padding-top(ナビの高さ + 12px)が持つ。ここで足すと二重になる */
.t-lesson { scroll-margin-top: -4px; padding: 14px 14px 16px; border-radius: 24px; background: var(--bg-2); }
@media (min-width: 1020px) { .t-lesson { padding: 20px; border-radius: 28px; } }
.t-lesson-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; margin-bottom: 10px; }
.t-stage-k { font-size: 14px; font-weight: 800; color: var(--ink-2); }
.t-lesson.is-yours .t-stage-k { color: var(--t-answer); }
.t-sum { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.t-sum:empty { display: none; }
.t-note { margin-bottom: 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg); font-size: 15px; line-height: 1.7; }
.t-note[hidden] { display: none; }
.t-note p + p { margin-top: 6px; }
.t-note-link { display: inline-block; margin: 8px 14px 0 0; font-weight: 800; color: var(--ink); }

/* ---------- 盤 ---------- */
.t-board { position: relative; width: 100%; max-width: 520px; margin: 0 auto; aspect-ratio: 1; }
.t-lesson .t-board { width: min(100%, calc(100svh - var(--nav-h) - 345px)); min-width: 250px; }
@media (max-width: 1019px) and (max-height: 720px) { .t-sum { display: none; } .t-lesson .t-board { width: min(100%, calc(100svh - var(--nav-h) - 330px)); } .t-step-text { min-height: 5.1em; } }
@media (min-width: 1020px) { .t-lesson .t-board { width: min(100%, calc(100vh - var(--nav-h) - 400px)); min-width: 380px; } }
.t-grid { display: grid; grid-template-columns: repeat(9, 1fr); width: 100%; height: 100%; border: 2.5px solid var(--t-line-b); border-radius: 6px; overflow: hidden; background: var(--t-cell); container-type: inline-size; }
.t-cell { position: relative; display: grid; place-items: center; min-width: 0; padding: 0; border: 0; border-right: 1px solid var(--t-line); border-bottom: 1px solid var(--t-line); background: var(--t-cell); color: var(--t-given); font: 700 6.2cqi/1 var(--sans); }
.t-cell:nth-child(9n) { border-right: 0; }
.t-cell:nth-child(n+73) { border-bottom: 0; }
.t-cell.t-r { border-right: 2px solid var(--t-line-b); }
.t-cell.t-b { border-bottom: 2px solid var(--t-line-b); }
/* 数字の色はアプリと同じ: 問題の数字 = 濃い灰の太字、入れた数字 = 青 */
.t-cell.is-entry { color: var(--t-input); font-weight: 500; }
.t-cell.is-wrong-entry { color: var(--t-struck); font-weight: 600; background: var(--t-struck-bg); }
.t-cell.in-base { background: var(--t-base-bg); }
.t-cell.in-cover { background: var(--t-cover-bg); }
.t-cell.in-base.in-cover { background: var(--t-both-bg); }
.t-cell.in-unit { background: var(--t-unit-bg); }
.t-cell.is-struck { background: var(--t-struck-bg); }
.t-cell.is-answer { background: var(--t-unit-bg); }
.t-cell.is-dim { opacity: .35; }
.t-cell.is-focus { box-shadow: inset 0 0 0 3px var(--t-answer); }
.t-cell.is-bad { background: var(--t-struck-bg); color: var(--t-struck); }
.t-cell.is-picked { box-shadow: inset 0 0 0 3px var(--c); background: color-mix(in srgb, var(--c) 14%, var(--t-cell)); }
.t-cell.is-lit { background: color-mix(in srgb, var(--c) 10%, var(--t-cell)); }
button.t-cell { cursor: pointer; }

/* 大きい数字: 答え(入れた数字と同じ青)と、練習で間違えた数字 */
.t-big { position: relative; display: grid; place-items: center; font-size: 6.2cqi; font-weight: 500; line-height: 1; }
.t-big.is-answer { color: var(--t-input); }
.t-big.is-wrong { color: var(--t-struck); }

/* 候補: アプリのメモ(SudokuBoard の notesGrid)と同じ。マスの上下 4%・左右 6% + 2px を空けて3×3に分け、
   数字の場所(5 なら真ん中、4 なら左の中)に、マスの幅の約26%の細めの灰色の字 */
.t-pencil { position: absolute; place-self: stretch; top: 4%; bottom: 4%; left: calc(6% + 2px); right: calc(6% + 2px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); font-size: 2.9cqi; font-weight: 500; line-height: 1; color: var(--t-pencil); font-variant-numeric: tabular-nums; }
/* 候補の字は、字の箱を大文字の高さ〜基準線に切り詰めて(text-box)区画の上下中央に置く。数字の形がちょうど区画の中心に来て、
   丸・× の中心(字の箱の中心)とも重なる */
.t-pencil > span { display: block; align-self: center; min-width: 0; text-align: center; text-box: trim-both cap alphabetic; }
.t-n { position: relative; line-height: 1; font-variant-numeric: tabular-nums; }
.t-n.is-faint { opacity: .4; }
/* 見る候補・仮に置く候補: 青で塗った丸に白抜きの字(2026-11-27 本人「アプリみたいに青背景白抜きじゃだめなの？」)。
   丸はメモの1区画に収まる大きさ(区画は字の約 1.12 倍。となりの候補の丸と重ならない) */
.t-n.is-corner, .t-n.is-suppose { isolation: isolate; color: #fff; font-weight: 800; }
.t-n.is-corner::before, .t-n.is-suppose::before { content: ""; position: absolute; left: 50%; top: 50%; z-index: -1; width: 1.08em; height: 1.08em; margin: -0.54em 0 0 -0.54em; border-radius: 50%; background: var(--t-corner); }
/* 仮に置くと入れなくなる候補: 薄くして斜線 */
.t-n.is-off { opacity: .45; }
.t-n.is-off::after, .t-n.is-struck::before, .t-n.is-struck::after { content: ""; position: absolute; left: 50%; top: 50%; width: 1.25em; height: 1.5px; margin: -0.75px 0 0 -0.625em; border-radius: 1px; background: currentColor; transform: rotate(-45deg); }
/* 消える候補: 赤い字に赤い × */
.t-n.is-struck { color: var(--t-struck); font-weight: 800; }
.t-n.is-struck::before { transform: rotate(45deg); }
/* 練習で選んだ数字の候補: 区画いっぱいの塗り(区画の高さ = マスの 92% の 1/3 ≒ 盤の幅の 3.4%) */
.t-pencil .is-lit { isolation: isolate; color: #fff; font-weight: 800; }
.t-pencil .is-lit::before { content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 50%; height: 3.4cqi; margin-top: -1.7cqi; border-radius: 4px; background: var(--c); }
/* 暗い配色: 使わない候補・入れなくなる候補は薄くしすぎない(くすんだ青の地の上で、候補の字が読める濃さ。地色の上で 4.3 前後)。
   選んだ数字の塗りは明るい枠の色なので、字は濃紺 */
@media (prefers-color-scheme: dark) {
  .t-n.is-faint { opacity: .85; }
  .t-n.is-off { opacity: .8; }
  .t-pencil .is-lit { color: var(--t-given); }
  .t-rect, .t-diag { stroke-opacity: .7; }
  .t-diag.is-on { stroke-opacity: .85; }
}

/* 理由になる確定の数字(唯一の場所・唯一候補で、どの数字がマスを止めているか): 数字を輪で囲む */
.t-src { position: absolute; left: 50%; top: 50%; width: 76%; height: 76%; margin: -38% 0 0 -38%; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--t-corner); pointer-events: none; }

/* 長方形・対角・アプリのヒントの枠 */
/* 重ね絵の座標は px(board.ts が実際のマスの位置を測る)。盤と同じ箱に重ねるだけで、余白で位置を合わせない */
.t-over { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
/* 線は数字の上で切れる(board.ts の mask)。細く薄く */
.t-rect-fill { fill: color-mix(in srgb, var(--t-corner) 4%, transparent); stroke: none; }
.t-rect { fill: none; stroke: var(--t-corner); stroke-opacity: .45; stroke-width: 1.6px; stroke-linejoin: round; }
.t-diag { stroke: var(--t-corner); stroke-opacity: .45; stroke-width: 1.3px; stroke-dasharray: 5 4; stroke-linecap: round; }
.t-diag.is-on { stroke-dasharray: none; stroke-opacity: .6; stroke-width: 1.8px; }
/* 色枠と札: アプリのヒント(packages/ui/src/hint/HintRegionFrames)と同じ。実線の枠に白い縁取り、札は丸の中に白い字 */
.t-frame, .t-frame-halo { fill: none; stroke-linecap: square; stroke-linejoin: round; }
.t-frame { stroke-width: 2.5px; }
.t-frame-halo { stroke: var(--hint-region-halo); stroke-width: 4px; opacity: .9; }
.t-badge-halo { fill: var(--hint-region-halo); }
.t-badge-id { font-family: var(--sans); font-weight: 800; fill: var(--hint-region-ink); }

@media (prefers-reduced-motion: reduce) { :root { --t-motion: 0; } }
/* 動きのあいだだけ置く物: 消えていく前の印と、走る光 */
.t-ghosts { position: absolute; inset: 0; pointer-events: none; }
.t-ghost { position: absolute; margin: 0; }
.t-beam { fill: none; stroke-width: 3.5px; stroke-linecap: round; filter: drop-shadow(0 0 3px currentColor); }
.t-beam.is-on { stroke: var(--t-corner); color: var(--t-corner); }
.t-beam.is-strike { stroke: var(--t-struck); color: var(--t-struck); }

/* ---------- 段の説明 ---------- */
.t-step { margin-top: 12px; padding: 14px 16px 14px; border-radius: 18px; background: var(--bg); }
.t-step[hidden] { display: none; }
.t-step-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.t-step-count { flex: none; white-space: nowrap; font-size: 13px; font-weight: 800; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.t-dots { display: flex; gap: 6px; min-width: 0; }
.t-dots button { flex: 0 1 10px; min-width: 6px; aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; background: var(--line); cursor: pointer; }
.t-dots button[aria-current="step"] { background: var(--ink); transform: scale(1.2); }
.t-step-title { margin-top: 6px; font-size: 18px; font-weight: 800; line-height: 1.45; letter-spacing: -0.01em; }
.t-step-text { margin-top: 6px; min-height: 5.2em; font-size: 16px; line-height: 1.7; }
.t-step-act { margin-top: 10px; display: flex; gap: 10px; justify-content: flex-end; }
.t-page .t-step-act .btn { --bh: 46px; padding-inline: 20px; font-size: 15px; }
/* ページの中のボタン: 字の箱を大文字の高さ〜基準線に切り詰め、上下の空きで高さを作る(行の高さで置くと、字の形が 1〜3px 上下にずれる) */
.t-page main .btn { --bh: 50px; --dy: 0em; display: inline-block; min-height: 0; padding-block: calc((var(--bh) - 1cap) / 2 - var(--dy)) calc((var(--bh) - 1cap) / 2 + var(--dy)); line-height: 1; text-align: center; text-box: trim-both cap alphabetic; }
.t-step-act .btn:disabled { opacity: .35; cursor: default; }
@media (max-width: 1019px) {
  .t-step-title { font-size: 16px; }
  .t-step-text { font-size: 15px; min-height: 6.8em; }
  .t-step-act { margin-top: 6px; }
  .t-page .t-step-act .btn { --bh: 44px; flex: 1; }
}
/* 文の中の札(⟦A⟧)と行・列の語。アプリの文の中の札(packages/ui/src/hint/HintText)と同じ見た目:
   色の縁の小さな四角、中は薄い同じ色、字は枠の色。
   字の箱を大文字の高さ〜基準線に切り詰め(text-box)、上下は字の 0.3 倍・左右は 0.45 倍あける(2026-11-25 本人「ボーダーと文字の間が近すぎる」)。
   箱の基準線は字の基準線なので、周りの文の字とも高さがそろう */
.t-ref, .t-w { --dy: 0em; display: inline-block; margin: 0 .15em; padding: calc(.3em - var(--dy)) .45em calc(.3em + var(--dy)); border: 1.5px solid var(--rc); border-radius: 5px; background: color-mix(in srgb, var(--rc) 14%, var(--bg)); color: var(--rc); font-size: .9em; font-weight: 800; line-height: 1; white-space: nowrap; text-box: trim-both cap alphabetic; }
.t-ref { text-align: center; }
.t-w-b { --rc: var(--t-base); }
.t-w-c { --rc: var(--t-cover); }
.t-w-x { --rc: var(--t-struck); }
.t-w-a { --rc: var(--t-answer); }
.t-js-off { margin-top: 10px; font-size: 14px; color: var(--ink-3); }
html:not(.t-js) .t-lesson .t-step-act, html:not(.t-js) .t-lesson .t-board { display: none; }

/* ---------- 本文の節 ---------- */
.t-sec { padding: 56px 0; border-top: 1px solid var(--line); }
@media (min-width: 1020px) { .t-sec { padding: 72px 0; } }
.t-two { display: grid; gap: 40px; }
@media (min-width: 900px) { .t-two { grid-template-columns: 1fr 1fr; gap: 56px; } }
.t-body { max-width: 40em; font-size: 17px; line-height: 1.9; color: var(--ink-2); }
.t-small { margin-top: 10px; font-size: 15px; }
.t-sec .p-h2 { margin-bottom: 16px; }
.t-read summary { cursor: pointer; font-size: 18px; font-weight: 800; }
.t-read-list { margin: 16px 0 0; padding-left: 1.4em; display: grid; gap: 14px; max-width: 44em; }
.t-read-list h3 { font-size: 16px; font-weight: 800; }
.t-read-list p { margin-top: 2px; font-size: 16px; line-height: 1.8; color: var(--ink-2); }

/* ---------- 次の手筋・アプリ ---------- */
.t-next { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
@media (min-width: 720px) { .t-next { grid-template-columns: repeat(2, minmax(0, 360px)); } }
.t-next-link { display: block; padding: 18px 22px; border-radius: 18px; background: var(--bg-2); color: var(--ink); text-decoration: none; }
.t-next-link:hover { background: var(--bg-3); }
.t-next-k { display: block; font-size: 13px; font-weight: 800; color: var(--ink-3); }
.t-next-link strong { font-size: 20px; font-weight: 800; }
.t-all { margin-top: 18px; font-size: 15px; font-weight: 700; }
.t-all a { color: var(--ink-2); }
.t-app .p-store { margin-top: 20px; }

/* ---------- 手筋の一覧 ---------- */
.t-index .t-hero { padding-bottom: 40px; }
.t-index-k { margin-top: 28px; font-size: 13px; font-weight: 800; color: var(--ink-3); }
.t-index-list { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
@media (min-width: 720px) { .t-index-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1020px) { .t-index-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.t-index-link { display: flex; gap: 14px; align-items: flex-start; height: 100%; padding: 18px 20px; border-radius: 18px; background: var(--bg-2); color: var(--ink); text-decoration: none; }
.t-index-link:hover { background: var(--bg-3); }
.t-index-n { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--c); color: var(--on-c); font-size: 15px; font-weight: 800; }
.t-index-body { display: grid; gap: 6px; min-width: 0; }
.t-index-body strong { font-size: 20px; font-weight: 800; line-height: 1.3; }
.t-index-sum { font-size: 15px; line-height: 1.65; color: var(--ink-2); }
.t-index-go { font-size: 14px; font-weight: 800; }
/* 語や札と、すぐ後の句読点を折り返さない(句読点が行の頭に来ないように) */
.t-nb { white-space: nowrap; }

/* ---------- 盤を寄せる(StepView.zoom。board.ts の setZoom が窓の大きさと位置を決める) ---------- */
.t-zoomer { position: absolute; inset: 0; width: 100%; height: 100%; }
.t-board.is-zoom { overflow: hidden; border-radius: 6px; box-shadow: 0 0 0 2.5px var(--t-line-b); }
/* 説明に使わないマス(StepView.keep の外)は、中身だけを薄くする。マスの線は薄くしない(ボックスの太線がまだらにならない)。
   マスの地の色を上に重ねて薄く見せ、出し入れはゆっくり(動きを減らす設定では切り替えるだけ) */
.t-cell::after { content: ""; position: absolute; inset: 0; background: var(--t-cell); opacity: 0; pointer-events: none; }
.t-cell.is-faded::after { opacity: .62; }
.t-board.is-zoom .t-cell::after { transition: opacity .4s cubic-bezier(0.16, 1, 0.3, 1); }
@media (prefers-reduced-motion: reduce) { .t-board.is-zoom .t-cell::after { transition: none; } }

/* ---------- 話しかける形のページ(technique-pages.mjs の story) ----------
   スマホ: 上から 題 → 頭に寄せた盤の短い動きと一言 → 1段ずつ → アプリでの練習への案内。
   PC(1020px 以上。Issue #149 の案A): 盤を左に画面の高さいっぱいに置き、右に題・一言・段の説明・戻る/次へ・アプリでの練習への案内。
   最初の画面に盤と段の操作が収まる。頭の動き(見本の小さい盤)は PC では出さない(同じ盤が2枚並ぶため)。
   盤を画面の高さに収めるので、列を固定(sticky)しない */
.t-story { padding: 14px 0 56px; }
.t-story-in { max-width: 600px; }
.t-story .t-head h1 { font-size: clamp(34px, 5vw, 60px); }
.t-teaser { margin: 16px auto 0; width: min(100%, 380px, calc(100svh - var(--nav-h) - 300px)); min-width: 220px; }
.t-teaser .t-board { width: 100%; }
.t-teaser-cap { margin-top: 10px; min-height: 1.6em; text-align: center; font-size: 16px; font-weight: 800; line-height: 1.6; }
.t-hook { margin: 12px auto 0; max-width: 30em; text-align: center; font-size: clamp(16px, 1.4vw, 18px); line-height: 1.75; color: var(--ink-2); }
/* 頭の動きと1段ずつの間は、画面の端から端までの線で区切る */
.t-story-lesson { margin-top: 28px; }
.t-story-lesson::before { content: ""; display: block; height: 1px; margin: 0 calc(50% - 50vw) 24px; background: var(--line); }
/* アプリでの練習への案内 */
.t-train { margin-top: 36px; }
.t-train-k { font-size: 22px; font-weight: 800; line-height: 1.4; letter-spacing: -0.01em; }
.t-train-lead { margin-top: 8px; max-width: 34em; font-size: 16px; line-height: 1.8; color: var(--ink-2); }
.t-train .p-store { margin-top: 18px; }
@media (min-width: 1020px) {
  .t-story { padding: 28px 0 72px; }
  .t-story-in { max-width: 1240px; display: grid; grid-template-columns: auto minmax(400px, 1fr); grid-template-rows: auto auto auto auto 1fr; column-gap: clamp(40px, 4vw, 72px); align-items: start; }
  .t-story .t-teaser { display: none; }
  .t-story .t-head h1 { font-size: min(clamp(34px, 4vw, 54px), calc(100cqi / var(--t-h1-seg, 1))); }
  .t-story-lesson, .t-story .t-lesson { display: contents; }
  .t-story-lesson::before { display: none; }
  .t-story-in > .t-head { grid-column: 2; grid-row: 1; }
  /* 一言は右の列では 16px(ドイツ語の長い一言でも、1440×900 の最初の画面に段の操作が入る) */
  .t-story .t-hook { grid-column: 2; grid-row: 2; margin: 16px 0 0; max-width: 36em; font-size: 16px; line-height: 1.7; text-align: left; }
  .t-story .t-lesson-head, .t-story .t-note { grid-column: 2; grid-row: 3; }
  .t-story .t-lesson-head { margin: 20px 0 0; }
  .t-story .t-note { margin: 20px 0 0; background: var(--bg-2); }
  .t-story .t-lesson-head + .t-note:not([hidden]) { margin-top: 44px; }
  /* 盤は画面の高さ(ナビと上下の余白を除く)いっぱい。右の列が 400px を切らない幅(700px)まで */
  .t-story .t-lesson .t-board { grid-column: 1; grid-row: 1 / -1; width: min(calc(100vh - var(--nav-h) - 64px), 700px); min-width: 400px; max-width: none; margin: 0; }
  .t-story-in:has(.t-lesson .t-board:empty) { column-gap: 0; }
  .t-story .t-step { grid-column: 2; grid-row: 4; margin-top: 24px; padding: 0; background: none; }
  .t-story .t-step-text { min-height: 6.8em; }
  .t-story .t-train { grid-column: 2; grid-row: 5; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
  .t-story .t-train-k { font-size: 20px; }
  .t-story .t-train-lead { font-size: 15px; }
  /* 右の列(380px〜)に収まるよう、QR を小さくし、説明の字は出さない(9em の欄では1字だけの行ができる。バッジと並ぶので QR の意味は分かる) */
  .t-train .store-item { gap: 18px; padding: 14px 18px; }
  .t-train .qr img { width: 92px; height: 92px; }
  .t-train .qr figcaption { display: none; }
}
/* 背の低い PC の画面(1280×577 など): 右の列の題・一言を詰め、盤と同じ最初の画面に段の説明と戻る/次へが入るようにする */
@media (min-width: 1020px) and (max-height: 760px) {
  .t-story { padding-top: 14px; }
  .t-story .t-head .p-crumbs { display: none; }
  .t-story .t-head h1 { margin-top: 6px; font-size: min(46px, calc(100cqi / var(--t-h1-seg, 1))); }
  .t-story .t-hook { margin-top: 10px; max-width: none; font-size: 14px; line-height: 1.6; }
  .t-story .t-step-title { font-size: 16px; }
  .t-story .t-step { margin-top: 10px; }
  .t-story .t-step-text { min-height: 0; font-size: 14px; line-height: 1.6; }
  .t-story .t-lesson .t-board { width: min(calc(100vh - var(--nav-h) - 44px), 700px); }
}
/* 盤面の文字列が読めないとき(?p= の形の誤り)は盤を描かないので、空の枠を残さない */
.t-lesson .t-board:empty { display: none; }
/* ?p= の盤面: 例の盤の頭の動きと一言は出さず、題のすぐ下からその盤面の解説にする(main.ts も例の盤を描かない) */
.t-own .t-teaser, .t-own .t-hook { display: none; }
.t-own .t-story-lesson { margin-top: 16px; }
.t-yours-mini { padding: 20px 0 28px; }
.t-yours-mini .t-read summary { font-size: 14px; font-weight: 700; color: var(--ink-3); }

/* ---------- この手筋が出てくる解き方の記事(Issue #160) ---------- */
.t-guide-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
@media (min-width: 720px) { .t-guide-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.t-guide-list a { display: grid; gap: 4px; height: 100%; padding: 18px 20px; border-radius: 18px; background: var(--bg-2); color: var(--ink); text-decoration: none; }
.t-guide-list a:hover { background: var(--bg-3); }
.t-guide-list strong { font-size: 19px; font-weight: 800; line-height: 1.4; }
.t-guide-list span { font-size: 15px; line-height: 1.7; color: var(--ink-2); }
/* 記事が多い手筋(5本以上)は、題だけの短い札にする(Issue #160) */
.t-guide-list.is-compact { display: flex; flex-wrap: wrap; gap: 8px; }
.t-guide-list.is-compact a { padding: 10px 16px; border-radius: 999px; }
.t-guide-list.is-compact strong { font-size: 15px; font-weight: 700; line-height: 1.35; }
/* 解説の文の中の、ほかの手筋のページへのリンク(Issue #164) */
.t-tech-link { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--c); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.t-tech-link:hover { color: var(--c); }

/* ---------- 例題(Issue #225): 盤のマスを押して数字を入れ、正誤をその場で返す。記事とテクニック解説の両方で使う ----------
   盤は解説の盤より大きくしない。数字のボタンとヒントは盤のすぐ隣(PC)・すぐ下(スマホ)に置く */
.x-try { display: grid; gap: 14px; max-width: 860px; margin: 20px 0 8px; padding: 14px; border-radius: 24px; background: var(--bg-2); }
.x-try-board { width: 100%; max-width: 440px; margin: 0 auto; }
.x-try .t-board { max-width: none; }
.x-try-side { display: grid; gap: 12px; align-content: start; min-width: 0; }
.x-try-msg { min-height: 3.4em; margin: 0 2px; font-size: 16px; font-weight: 700; line-height: 1.7; color: var(--ink); }
.x-try-msg[hidden] { display: none; }
.x-try-msg.is-ok { color: var(--x-ok); }
.x-try-msg.is-ng { color: var(--x-ng); }
.x-try { --x-ok: #0b7a4b; --x-ng: #b3261e; }
@media (prefers-color-scheme: dark) { .x-try { --x-ok: #5fe0b8; --x-ng: #ff8a7d; } }
.x-pad { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.x-pad button { min-height: 48px; padding: 0; border: 0; border-radius: 12px; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); font: 700 20px/1 var(--sans); cursor: pointer; }
.x-pad button:hover { background: var(--bg-3); }
.x-pad button:active { transform: scale(.96); }
.x-pad button:disabled { opacity: .35; cursor: default; }
.x-try-act { display: flex; flex-wrap: wrap; gap: 10px; }
.t-page .x-try-act .btn { --bh: 44px; flex: 1; padding-inline: 14px; font-size: 15px; }
.x-try-act .btn[hidden] { display: none; }
.x-hint { padding: 12px 14px; border-radius: 16px; background: var(--bg); }
.x-hint[hidden] { display: none; }
.x-hint-t { margin-top: 4px; font-size: 16px; font-weight: 800; line-height: 1.5; }
.x-hint-p { margin-top: 4px; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
@media (max-width: 719px) { .x-hint { order: -1; } }
.x-try-off { font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.x-try-lead { max-width: 40em; }
.x-try-more { margin-top: 4px; }
.x-try:not(.is-live) .x-try-act, .x-try:not(.is-live) .x-pad, .x-try:not(.is-live) .x-try-msg { display: none; }
@media (min-width: 720px) {
  .x-try { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 24px; padding: 20px; align-items: start; }
  .x-try-board { margin: 0; }
  .x-pad { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 216px; }
  .t-page .x-try-act .btn { flex: none; }
}
/* ?p= の盤面を見ているときは例題を出さない(その盤面の解説だけを見せる) */
.t-own .x-try-sec { display: none; }
