/* 季語クイズ固有の見た目（共通は ../common/base.css） */
[hidden] { display: none !important; }
:root { --mincho: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "BIZ UDMincho", serif; }

.board-wrap { min-height: 200px; container-type: inline-size; }

/* ---------- 問題のカード（和紙の地。明るいまま・文字の色は固定） ---------- */
.card {
  background: #FBF8F0; color: #1F2328; border: 2px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px 12px; text-align: center; min-height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  background-image: radial-gradient(circle at 20% 30%, rgba(170, 150, 110, .06) 0 2px, transparent 3px), radial-gradient(circle at 70% 60%, rgba(170, 150, 110, .05) 0 2px, transparent 3px);
  background-size: 23px 19px, 31px 27px;
}
.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 rt { color: #FFFFFF; }
.ask .kind.t-pick { background: #7A4E1D; }
.ask .kind.t-cat { background: #4F5B3A; }
.ask rt { font-size: 10px; }

/* 短冊（縦書きの季語） */
.show { margin: 10px 0 4px; display: flex; justify-content: center; }
.show.pop { animation: pop-in .22s ease-out; }
.tanzaku {
  --h: 200px;
  writing-mode: vertical-rl; text-orientation: upright; height: var(--h); width: 92px; box-sizing: border-box;
  background: #FFFDF7; border: 1px solid #D8CFBC; border-top: 6px solid #A8561A33; border-radius: 3px; padding: 14px 0;
  display: flex; align-items: center; justify-content: flex-start; box-shadow: 0 1px 0 #E6DECB;
}
.tanzaku .kg {
  font-family: var(--mincho); font-weight: 700; color: #1F2328; line-height: 1.5; letter-spacing: .08em; white-space: nowrap;
  font-size: min(44px, calc((var(--h) - 36px) / (var(--n) * 1.1)));
}
.tanzaku rt { font-family: var(--font); font-weight: 400; font-size: max(.36em, 10px); color: #5B616B; letter-spacing: 0; }
/* 季節の札（季節→季語の問題） */
.season-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; width: 180px; height: 150px; margin: 14px 0 12px;
  background: #FFFDF7; border: 1px solid #D8CFBC; border-radius: 6px; border-top: 8px solid var(--sc, #8F8A7E);
}
.season-card .sname { font-family: var(--mincho); font-weight: 700; font-size: 60px; line-height: 1.3; color: var(--sc, #1F2328); }
.season-card .sname rt { font-family: var(--font); font-size: 13px; font-weight: 400; color: #5B616B; }
.season-card.s-新年 .sname, .season-card.s-ny .sname { font-size: 48px; }
.season-card .srange { font-size: 14px; color: #5B616B; font-weight: 700; }
.season-card .srange rt { font-size: 10px; }
.s-春 { --sc: #B8456F; } .s-夏 { --sc: #2E7D4F; } .s-秋 { --sc: #A8561A; } .s-冬 { --sc: #2F6DB5; } .s-ny { --sc: #B23A3A; }

.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; }
.verdict rt { font-size: 10px; }
@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; } }

/* ---------- 選択肢 ---------- */
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 600px; margin: 12px auto 0; }
.opts.t-season { grid-template-columns: repeat(5, 1fr); gap: 6px; }
.opt {
  appearance: none; font: inherit; display: flex; align-items: center; gap: 10px; min-height: 64px; 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; position: relative;
}
.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-weight: 700; line-height: 1.75; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; }
.opt rt { font-size: 10px; color: var(--ink-sub); font-family: var(--font); font-weight: 400; }
.opt .kw { font-family: var(--mincho); font-size: clamp(21px, 5.4vw, 25px); }
.opt .big { font-family: var(--mincho); font-size: 22px; }
.opts.t-season .opt { flex-direction: column; justify-content: center; gap: 2px; padding: 6px 2px 8px; min-height: 84px; text-align: center; }
.opts.t-season .opt .t { flex-direction: column; gap: 4px; }
.opts.t-season .opt .big { font-size: clamp(22px, 5.6vw, 28px); line-height: 1.5; }
.opts.t-season .opt .n { position: absolute; left: 4px; top: 4px; width: 20px; height: 20px; font-size: 12px; border-width: 1.5px; }
.opt .sw { display: block; width: 28px; height: 5px; border-radius: 3px; background: var(--sc); order: 2; }
.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.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 rt { color: var(--bg); }
.opt.ok .sw { box-shadow: 0 0 0 1.5px 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); }
/* 答えたあとの季節の札（季語を選ぶ問題） */
.stag, .ctag { display: inline-block; font-family: var(--font); font-size: 14px; font-weight: 700; border-radius: 4px; padding: 0 7px; line-height: 22px; font-style: normal; white-space: nowrap; }
.stag { color: #FFFFFF; background: var(--sc); }
.stag rt { color: #FFFFFF !important; }
.stag.alt { background: #FFFFFF; color: var(--sc); box-shadow: inset 0 0 0 1.5px var(--sc); }
.stag.alt rt { color: var(--sc) !important; }
.ctag { color: #4F5B3A; background: #E8ECDD; }
.ctag rt { color: #4F5B3A; }
.opt.ok .stag { box-shadow: 0 0 0 1.5px var(--bg); }

.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: #FBF8F0; 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; flex-wrap: wrap; }
.explain .row > span:last-child { flex: 1; min-width: 12em; }
.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: inherit; }
.explain .lab.lit { background: #EFEBE2; color: #5B616B; }
.explain .lab.memo { background: #E8ECDD; color: #4F5B3A; }
.explain .kwline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.explain .kw { font-family: var(--mincho); font-weight: 700; font-size: 22px; }
.explain .kw2 { font-family: var(--mincho); font-weight: 700; font-size: 17px; flex: none !important; min-width: 0 !important; }
.explain .zure { border: 2px solid #A8561A; border-radius: var(--radius); padding: 6px 10px; margin: 6px 0 8px; background: #FFFFFF; }
.explain .zure b { color: #8A4512; }
.explain .zure.alt { border-color: #5B616B; }
.explain .zure.alt b { color: #3F454D; }
.explain .ku { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.explain .ku .h { font-family: var(--mincho); font-weight: 700; font-size: 17px; }
.explain .ku .a { font-size: 14px; color: #5B616B; }
.explain .others { border-top: 1px solid #E2DDD2; padding-top: 6px; margin-top: 6px; }
.explain .others .row { align-items: center; }
.explain .others .om { font-size: 14px; color: #3F454D; }
.explain.hintbox { border: 2px dashed #B7791F; }
.explain .t { color: #5B616B; font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.bandwrap { margin: 2px 0 6px; }
.band { display: block; width: 100%; max-width: 520px; height: auto; margin: 0 auto; font-family: var(--font); }

.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: 1.8; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.result-box .weak span b { font-size: 18px; font-family: var(--mincho); }
.result-box 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: nowrap; }
.klist-table .yomi { display: block; font-weight: 400; font-size: 14px; color: var(--ink-sub); }
.table-scroll { overflow-x: auto; }
.howto img.narrow { max-width: 560px; }

@media (max-width: 420px) {
  .stage { padding: 8px; }
  .card { min-height: 220px; padding: 8px 8px 10px; }
  .tanzaku { --h: 176px; width: 80px; }
  .season-card { width: 160px; height: 128px; margin: 8px 0; }
  .season-card .sname { font-size: 52px; }
  .opt { min-height: 56px; padding: 4px 8px; gap: 8px; }
  .opt .n { width: 24px; height: 24px; font-size: 14px; }
  .opts.t-season { gap: 4px; }
  .opts.t-season .opt { min-height: 76px; }
  .opts.t-season .opt .n { width: 18px; height: 18px; font-size: 12px; left: 3px; top: 3px; }
  .controls .btn.icon { padding: 0 9px; }
  #play .controls { gap: 6px; }
  #play .controls .spacer { display: none; }
  #hint { margin-right: auto; }
  .explain { padding: 8px 10px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .show.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; } }
/* 上のバーの高さ ここまで */
