/* 同音異義語・同訓異字クイズ固有の見た目（共通は ../common/base.css） */
[hidden] { display: none !important; }

.board-wrap { min-height: 200px; container-type: inline-size; }

/* ---------- 問題のカード（紙の地は明るいまま。文字の色は固定） ---------- */
.card {
  background: var(--board); color: #1F2328; border: 2px solid var(--line); border-radius: var(--radius);
  padding: 10px 16px 14px; text-align: center; min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
}
.prog { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; min-height: 18px; margin-bottom: 2px; }
.prog i {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid #C9C4B8; background: #FFFFFF; font-style: normal;
  font-size: 14px; line-height: 1; font-weight: 700; color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center;
}
.prog i.now { border-color: #2F5D8A; box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #2F5D8A; }
.prog i.ok { background: #2E7D4F; border-color: #2E7D4F; }
.prog i.ng { background: #B23A3A; border-color: #B23A3A; }
.prog i.ok::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #FFFFFF; }
.prog i.ng::after { content: '×'; }

.ask { margin: 4px 0 0; font-size: 17px; font-weight: 700; color: #5B616B; min-height: 1.5em; }
.ask .kind { display: inline-block; font-size: 14px; border-radius: 999px; padding: 0 10px; margin-right: 6px; line-height: 22px; vertical-align: 1px; color: #FFFFFF; background: #2F5D8A; }
.ask .kind.t-on { background: #8A5A1F; }
.ask .kind rt { color: #FFFFFF; }

/* 例文（明朝体で大きめ。ふりがなは上に） */
.sentence {
  margin: 14px 0 6px; max-width: 34em; font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "BIZ UDMincho", serif;
  font-weight: 700; font-size: clamp(20px, 5.2cqw, 28px); line-height: 2.35; text-align: left; overflow-wrap: anywhere;
}
.sentence.pop { animation: pop-in .22s ease-out; }
.sentence rt, .opt rt, .explain rt, .result-box rt { font-family: var(--font); font-weight: 400; letter-spacing: 0; }
.sentence rt { font-size: max(.42em, 10px); color: #5B616B; }
/* 空所: 読みを上に（いつも出す）、下に「？」の箱 */
.sentence ruby.blank { ruby-align: center; margin: 0 .1em; }
.sentence ruby.blank rt { font-size: max(.56em, 13px); color: #8A4A12; font-weight: 700; letter-spacing: .08em; }
.blank .box {
  display: inline-flex; align-items: center; justify-content: center; min-width: 2.1em; height: 1.35em; padding: 0 .15em; box-sizing: border-box;
  border: 3px solid #8A5A1F; border-radius: 6px; background: #FFF6E3; color: #8A5A1F; vertical-align: -.2em;
}
.blank .box .qm { font-family: var(--font); font-size: .7em; }
.blank.filled .box { background: #FFE9B8; border-color: #D9A21B; color: #1F2328; border-style: solid; }
.verdict { margin: 2px 0 0; font-size: 20px; font-weight: 700; }
.verdict.ok { color: #2E7D4F; }
.verdict.ng { color: #B23A3A; }
.verdict .mark { display: inline-block; width: 1.4em; height: 1.4em; line-height: 1.4em; border-radius: 50%; color: #FFFFFF; margin-right: 6px; font-size: .85em; vertical-align: 1px; }
.verdict.ok .mark { background: #2E7D4F; }
.verdict.ng .mark { background: #B23A3A; }
@keyframes pop-in { from { transform: scale(.97); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes shake { 20% { transform: translateX(-8px); } 45% { transform: translateX(7px); } 70% { transform: translateX(-4px); } 100% { transform: none; } }

/* ---------- 選択肢（2〜4つ。2列） ---------- */
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 600px; margin: 12px auto 0; }
.opt {
  appearance: none; font: inherit; display: flex; align-items: center; gap: 10px; min-height: 68px; padding: 6px 12px; text-align: left;
  border-radius: var(--radius); border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; touch-action: manipulation;
}
.opt .n { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--accent); color: var(--accent); font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.opt .t { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.opt .k { font-family: "Hiragino Mincho ProN", "Yu Mincho", "BIZ UDMincho", serif; font-weight: 700; font-size: clamp(26px, 7vw, 34px); letter-spacing: .04em; }
.opts.on .opt .k { font-size: clamp(24px, 6.4vw, 30px); letter-spacing: .08em; }
.opt .f { font-size: 14px; color: var(--ink-sub); font-weight: 700; margin-top: 2px; }
.opt:hover:not([aria-disabled="true"]) { border-color: var(--accent); }
.opt:active:not([aria-disabled="true"]) { transform: translateY(1px); }
.opt:focus-visible { outline: 3px solid var(--warn); outline-offset: 2px; }
.opt[aria-disabled="true"] { cursor: default; }
.opt.dim { opacity: .55; }
.opt.ng { border-color: var(--ng); color: var(--ng); background: transparent; opacity: 1; }
/* 成功・失敗の色の地の文字は、白ではなく背景の色（ライト・ダークとも 4.5:1 以上） */
.opt.ng .n { border-color: var(--ng); background: var(--ng); color: var(--bg); }
.opt.ng .n::before { content: '×'; }
.opt.ng .n span { display: none; }
.opt.ng .f { color: var(--ng); }
.opt.ng.shake { animation: shake .35s ease-out; }
.opt.ok { border-color: var(--ok); background: var(--ok); color: var(--bg); opacity: 1; }
.opt.ok .n { border-color: var(--bg); color: var(--bg); }
.opt.ok .f { color: var(--bg); }
.opt.show { border-color: var(--ok); border-width: 3px; opacity: 1; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }

.next-row { max-width: 600px; margin: 10px auto 0; }
.btn.next { width: 100%; min-height: 52px; font-size: 19px; }

/* ---------- 説明・ヒント ---------- */
.explain {
  margin: 10px auto 0; max-width: 600px; box-sizing: border-box; border-radius: var(--radius); padding: 10px 14px;
  background: var(--board); border: 2px solid var(--line); color: #1F2328; font-size: 16px; line-height: 1.9; text-align: left;
}
.explain p { margin: 0 0 6px; }
.explain p:last-child { margin-bottom: 0; }
.explain rt { font-size: 10px; color: #5B616B; }
.explain .words { margin: 0 0 8px; display: grid; gap: 4px; }
.explain .words > div { display: grid; grid-template-columns: 7.5em 1fr; gap: 8px; align-items: baseline; padding: 2px 6px; border-radius: 6px; }
.explain .words > div.ans { background: #E4F2E9; }
.explain .words > div.picked { background: #F8E1E1; }
.explain .words dt { font-family: "Hiragino Mincho ProN", "Yu Mincho", "BIZ UDMincho", serif; font-weight: 700; font-size: 18px; line-height: 1.5; }
.explain .words dd { margin: 0; }
.explain .st { display: block; width: max-content; font-family: var(--font); font-size: 14px; font-weight: 700; color: #8A4A12; }
.explain .st rt { color: #8A4A12; }
.explain .row { display: flex; gap: 8px; align-items: baseline; }
.explain .row.small { font-size: 15px; }
.explain .lab { flex: none; font-size: 14px; font-weight: 700; border-radius: 999px; padding: 0 8px; line-height: 22px; background: #E3ECF5; color: #2F5D8A; }
.explain .lab rt { color: #2F5D8A; }
.explain .lab.both { background: #EFEBE2; color: #5B616B; }
.explain .src { font-size: 14px; color: #5B616B; margin-top: 4px; }
.explain.hintbox { border: 2px dashed #B7791F; }
.explain .t { color: #5B616B; font-size: 14px; font-weight: 700; margin-bottom: 2px; }

.linkbtn { display: inline-flex; align-items: center; text-decoration: none; }
#furi-btn[aria-pressed="false"] { text-decoration: line-through; text-decoration-thickness: 2px; }
.turnbar .status { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.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.retry { color: var(--ng); }

/* ---------- 結果 ---------- */
.result-box { position: static; margin: 0 auto; max-width: 600px; }
.result-box .big { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.result-box .weak { display: grid; gap: 6px; margin: 6px 0 10px; text-align: left; }
.result-box .weak span { border-left: 4px solid var(--ng); background: var(--surface); border-radius: 4px; padding: 4px 10px; line-height: 2; font-size: 15px; }
.result-box .weak span b:first-child { font-size: 17px; display: block; line-height: 1.5; }
.result-box .weak .fillin { background: #FFE9B8; color: #1F2328; border-radius: 3px; padding: 0 2px; }
.result-box .weak rt { font-size: 10px; }
.callout { z-index: 5; top: 30%; }

/* ---------- 解説の表 ---------- */
.table-scroll { overflow-x: auto; }
.article .glist td.k { font-weight: 700; white-space: nowrap; }
.article .glist rt { font-size: 10px; }
.howto img.narrow { max-width: 560px; }

@media (max-width: 420px) {
  .stage { padding: 8px; }
  .card { min-height: 170px; padding: 8px 10px 10px; }
  .opt { min-height: 60px; padding: 4px 8px; gap: 8px; }
  .opt .n { width: 24px; height: 24px; font-size: 14px; }
  .controls .btn.icon { padding: 0 9px; }
  .explain { padding: 8px 10px; font-size: 15px; }
  .explain .words > div { grid-template-columns: 6.2em 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .sentence.pop, .opt.ng.shake { animation: none; }
}
/* 上のバーの高さを一定に（No.93。数字は一番長い文が画面の幅（360px・375px 以上・641px 以上）で何行になるか。--tb-rt はふりがなの分。base.css・turnbar.js） */
.turnbar { --tb-msg-lines: 2; --tb-st-lines: 1; --tb-rt: 11px; --tb-st-rt: 11px; }
@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; } }
/* 上のバーの高さ ここまで */
