/* 慣用句クイズ固有の見た目（共通は ../common/base.css）。四字熟語クイズ（games/yoji-jukugo）の見た目を写して調整 */
[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 14px 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-fill { background: #8A5A1F; }
.ask .kind.t-rev { background: #2E7D4F; }
.ask .kind.t-mis { background: #9A3B6A; }
.ask .kind rt { color: #FFFFFF; }

/* 慣用句（明朝体で大きく。ふりがなは上に） */
.kw-big {
  margin: 10px 0 4px; max-width: 100%; font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "BIZ UDMincho", serif;
  font-weight: 700; font-size: clamp(26px, 7.4cqw, 42px); line-height: 1.9; letter-spacing: .04em; word-break: keep-all; overflow-wrap: anywhere;
}
/* 意味→慣用句・誤用（言い方）の問題: 答える前は意味の文を出す */
.kw-big.as-mean { font-family: var(--font); font-weight: 700; font-size: clamp(19px, 4.6cqw, 24px); letter-spacing: 0; line-height: 2; text-align: left; max-width: 34em; margin: 14px 0 8px; }
.kw-big.as-mean rt { font-size: 10px; }
.kw-big.pop { animation: pop-in .22s ease-out; }
.kw-big rt, .opt rt, .explain rt, .result-box rt { font-family: var(--font); font-weight: 400; letter-spacing: 0; }
.kw-big rt { font-size: .42em; color: #5B616B; }
/* あなうめの □ */
.blank {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: -.08em;
  min-width: calc(var(--n, 1) * 1em + .3em); height: 1.2em; margin: 0 .08em; border: 3px solid #8A5A1F; border-radius: 6px;
  background: #FFF6E3; color: #8A5A1F; font-size: .9em; line-height: 1;
}
.blank span { font-family: var(--font); font-size: .6em; }
.fill { background: #FFE9B8; border-radius: 4px; box-shadow: 0 0 0 2px #D9A21B; padding: 0 .06em; }
.verdict { margin: 4px 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(.94); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes shake { 20% { transform: translateX(-8px); } 45% { transform: translateX(7px); } 70% { transform: translateX(-4px); } 100% { transform: none; } }

/* ---------- 4択 ---------- */
.opts { display: grid; grid-template-columns: 1fr; gap: 8px; max-width: 600px; margin: 12px auto 0; }
.opts.grid2 { grid-template-columns: 1fr 1fr; }
.opt {
  appearance: none; font: inherit; display: flex; align-items: center; gap: 10px; min-height: 60px; 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 { font-size: 18px; font-weight: 700; line-height: 1.75; }
.opt .t rt { font-size: 10px; color: var(--ink-sub); }
.opts.grid2 .opt { justify-content: flex-start; min-height: 64px; }
.opts.grid2 .opt .t { font-size: clamp(21px, 5.6vw, 26px); font-family: "Hiragino Mincho ProN", "Yu Mincho", "BIZ UDMincho", serif; }
.opts.grid2 .opt .t rt { font-size: 11px; font-family: var(--font); }
/* あなうめ: 1字を大きく / 正しい漢字: 4字 / 読み: ひらがな */
.opts.grid2.one .opt .t { font-size: clamp(30px, 8vw, 40px); line-height: 1.3; }
.opts.grid2.four .opt .t { font-size: clamp(22px, 6vw, 30px); letter-spacing: .06em; }
.opts.grid2.kana .opt .t { font-family: var(--font); font-size: clamp(16px, 4.4vw, 20px); letter-spacing: 0; word-break: break-all; }
.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 以上。D12） */
.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.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 .t rt { 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); }
.opt .tag-mis { display: inline-block; font-size: 14px; font-weight: 700; border-radius: 999px; padding: 0 8px; margin-left: 6px; background: var(--ng); color: var(--bg); line-height: 20px; vertical-align: 2px; }

.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;
}
.explain p { margin: 0 0 6px; }
.explain p:last-child { margin-bottom: 0; }
.explain rt { font-size: 10px; color: #5B616B; }
.explain .row { display: flex; gap: 8px; align-items: baseline; }
.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.lit { background: #EFEBE2; color: #5B616B; }
.explain .lab.memo { background: #FBEBDD; color: #8A4A12; }
.explain .kw { font-family: "Hiragino Mincho ProN", "Yu Mincho", "BIZ UDMincho", serif; font-weight: 700; font-size: 18px; }
.explain .mis { border: 2px solid #B23A3A; border-radius: var(--radius); padding: 6px 10px; margin: 0 0 8px; background: #FFFFFF; }
.explain .mis b { color: #B23A3A; }
.explain .kw-yomi { font-family: var(--font); font-weight: 400; font-size: 15px; color: #5B616B; margin-left: 12px; letter-spacing: 0; }
.explain .lab.ng { background: #F8E1E1; color: #B23A3A; }
.explain .wrongk { font-family: "Hiragino Mincho ProN", "Yu Mincho", "BIZ UDMincho", serif; font-weight: 700; }
.explain .wrongk .diff { color: #B23A3A; background: #F8E1E1; border-radius: 3px; padding: 0 2px; }
.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; }
.timer { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 18px; min-width: 64px; text-align: right; margin-left: auto; }
.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: 1.8; font-size: 14px; }
.result-box .weak span b { font-size: 17px; display: block; }
.result-box .weak rt { font-size: 10px; }
.callout { z-index: 5; top: 30%; }

/* ---------- 解説の一覧 ---------- */
.klist-wrap details { border: 1px solid var(--line); border-radius: var(--radius); margin: 8px 0; background: var(--surface); }
.klist-wrap summary { cursor: pointer; padding: 10px 14px; font-weight: 700; min-height: var(--tap); display: flex; align-items: center; }
.klist-table { width: 100%; border-collapse: collapse; margin: 0; }
.klist-table th, .klist-table td { vertical-align: top; }
.klist-table td.k { font-weight: 700; white-space: normal; min-width: 9em; }
.klist-table rt { font-size: 10px; }
.klist-table .yomi { display: block; font-weight: 400; font-size: 14px; color: var(--ink-sub); }
.table-scroll { overflow-x: auto; }

@media (max-width: 420px) {
  .stage { padding: 8px; }
  .card { min-height: 170px; padding: 8px 8px 10px; }
  .opt { min-height: 54px; padding: 4px 8px; gap: 8px; }
  .opt .n { width: 24px; height: 24px; font-size: 14px; }
  .opt .t { font-size: 16px; }
  .opts.grid2.kana .opt .t { font-size: 15px; }
  .controls .btn.icon { padding: 0 9px; }
  .explain { padding: 8px 10px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .kw-big.pop, .opt.ng.shake { animation: none; }
}
.howto img.narrow { max-width: 560px; }
/* 2列の選択肢では「よくあるまちがい」の札を字の下に（明朝・字の間あけを受けつがない） */
.opts.grid2 .opt .t .tag-mis { display: block; width: max-content; margin: 2px 0 0; font-family: var(--font); letter-spacing: 0; font-size: 14px; line-height: 20px; }
.opts.grid2.one .opt, .opts.grid2.four .opt { justify-content: flex-start; }
/* あなうめの□を、となりの字（ふりがな付き）と高さをそろえる */
.kw-big .blank { vertical-align: .14em; height: 1.1em; min-width: 1.1em; }

/* ---------- 慣用句クイズで足したもの ---------- */
/* 慣用句の選択肢（意味→慣用句・誤用の言い方）: 明朝で1列 */
.opts.idioms .opt .t { font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "BIZ UDMincho", serif; font-size: clamp(19px, 5vw, 23px); letter-spacing: .03em; }
.opts.idioms .opt .t rt { font-family: var(--font); font-size: 10px; letter-spacing: 0; }
.opts.idioms .opt .t .tag-mis { font-family: var(--font); letter-spacing: 0; }
/* 誤用の2択は少し大きく */
.opts.two .opt { min-height: 68px; }
/* あなうめの答えが2字以上のとき（天下・足元など）は字を少し小さく */
.opts.grid2.one.wide .opt .t { font-size: clamp(24px, 6.4vw, 32px); }
/* カードの中の例文（誤用・意味の問題） */
.card-ex { margin: 2px 0 4px; max-width: 34em; font-size: 16px; line-height: 2; text-align: left; color: #1F2328; }
.card-ex .lab, .explain .lab { vertical-align: 1px; }
.card-ex .lab { display: inline-block; font-size: 14px; font-weight: 700; border-radius: 999px; padding: 0 8px; line-height: 22px; background: #EFEBE2; color: #5B616B; margin-right: 6px; }
.card-ex rt { font-size: 10px; color: #5B616B; }
.ex-kw { background: linear-gradient(transparent 62%, #FFE9B8 62%); font-weight: 700; }
.hole { display: inline-block; border-bottom: 2px solid #8A5A1F; color: #8A5A1F; font-weight: 700; padding: 0 .2em; }
.explain .kind-tag { display: inline-block; font-family: var(--font); font-weight: 700; font-size: 13px; border: 1.5px solid #8A5A1F; color: #8A5A1F; border-radius: 999px; padding: 0 8px; line-height: 20px; margin-left: 10px; letter-spacing: 0; vertical-align: 2px; }
.explain .kind-tag rt { color: #8A5A1F; }
.explain .mis b { white-space: nowrap; }
.klist-table td.c { white-space: nowrap; font-size: 14px; color: var(--ink-sub); }
/* 上のバーの高さを一定に（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; } }
/* 上のバーの高さ ここまで */
