/* 大人の共通テスト：試験会場・問題冊子・マークシート */
:root {
  --accent: #2b4a9b; --accent-ink: #ffffff; --accent-soft: #e3e9f8;
  --ok-board: #2f4a3a; --ok-board-t: #eef3e8; --ok-desk-a: #c99a62; --ok-desk-b: #a8794a;
  --ok-paper: #fffdf6; --ok-paper-line: #e7dfc9; --ok-sheet-red: #c0392b; --ok-ink: #24262b; --ok-mark: #2a2d33;
  --ok-gold: #e2a72e;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --accent: #93adff; --accent-ink: #0f1220; --accent-soft: #222c50; --ok-board: #1d2c23; --ok-board-t: #d6e3cd; --ok-desk-a: #6e5235; --ok-desk-b: #4f3a25; --ok-paper: #1e2232; --ok-paper-line: #343a52; --ok-sheet-red: #ff7b6b; --ok-ink: #eef0f7; --ok-mark: #e8eaf2; --ok-gold: #f2c14e; }
}
:root[data-theme="dark"] { --accent: #93adff; --accent-ink: #0f1220; --accent-soft: #222c50; --ok-board: #1d2c23; --ok-board-t: #d6e3cd; --ok-desk-a: #6e5235; --ok-desk-b: #4f3a25; --ok-paper: #1e2232; --ok-paper-line: #343a52; --ok-sheet-red: #ff7b6b; --ok-ink: #eef0f7; --ok-mark: #e8eaf2; --ok-gold: #f2c14e; }

/* ヒーロー（SVG） */
.ok-hero-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.ok-hero { display: block; width: 100%; height: auto; }
.ok-board { fill: var(--ok-board); }
.ok-board-t { fill: var(--ok-board-t); font-size: 12px; font-weight: 700; letter-spacing: .06em; opacity: .9; }
.ok-desk-a { stop-color: var(--ok-desk-a); } .ok-desk-b { stop-color: var(--ok-desk-b); }
.ok-book { fill: #f4efe2; stroke: #d6ccb3; }
.ok-book-t { fill: #1d2b55; font-size: 16px; font-weight: 900; }
.ok-book-s { fill: #c0392b; font-size: 12px; font-weight: 700; }
.ok-book-line { fill: #cfc6ae; }
.ok-sheet { fill: #fffdf8; stroke: #e3b3ac; }
.ok-sheet-bar { fill: #c0392b; }
.ok-sheet-n { fill: #c0392b; font-size: 9px; font-weight: 700; }
.ok-ticks rect { fill: #222; }
.ok-bub { fill: #fff; stroke: #d5786d; stroke-width: 1.2; }
.ok-bub.on { animation: ok-fill .25s ease-out both; }
@keyframes ok-fill { from { fill: #fff; } to { fill: #2a2d33; } }
.ok-pen-metal { fill: #b9b9b9; } .ok-pen-eraser { fill: #f08a8a; } .ok-pen-wood { fill: #f1d3a3; } .ok-pen-lead { fill: #333; }
.ok-pen { animation: ok-write 2.2s ease-in-out infinite; transform-origin: 250px 160px; }
@keyframes ok-write { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-6px, -3px); } 50% { transform: translate(-2px, -8px); } 75% { transform: translate(-8px, -5px); } }
.ok-clock { fill: #c0392b; } .ok-clock-face { fill: #fffdf6; }
.ok-hand { stroke: #222; stroke-width: 2.4; stroke-linecap: round; transform-origin: 0 0; }
.ok-hand-s { stroke-width: 1.6; animation: ok-tick 6s steps(12) infinite; }
.ok-hand-c { fill: #c0392b; }
@keyframes ok-tick { to { transform: rotate(360deg); } }

/* 受験中 */
.ok-qn { font-size: 16px; }
.ok-subj-tag { font-size: 13px; font-weight: 800; padding: 2px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.ok-paper { background: var(--ok-paper); color: var(--ok-ink); border: 1px solid var(--ok-paper-line); border-radius: 6px; padding: 14px 14px 16px; box-shadow: var(--shadow);
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--ok-paper-line) 31px 32px); background-position: 0 44px; }
.ok-paper.ok-new { animation: ok-turn .45s ease-out; }
@keyframes ok-turn { from { opacity: 0; transform: perspective(600px) rotateX(-12deg) translateY(-6px); } to { opacity: 1; transform: none; } }
.ok-paper-head { display: flex; align-items: center; gap: 8px; border-bottom: 2px solid var(--ok-ink); padding-bottom: 6px; margin-bottom: 10px; }
.ok-paper-sub { font-family: var(--font-serif); font-weight: 900; font-size: 18px; letter-spacing: .1em; }
.ok-paper-no { font-family: var(--font-serif); font-weight: 700; }
.ok-q { font-size: 17px; font-weight: 700; line-height: 1.75; margin: 0 0 12px; }
.ok-q[lang="en"] { font-family: Georgia, "Times New Roman", var(--font-serif); font-weight: 600; }
.ok-choices { display: grid; gap: 8px; }
.ok-choice { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; min-height: 52px; border: 2px solid var(--ok-paper-line); border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer; font-weight: 700; line-height: 1.5; touch-action: manipulation; }
.ok-choice:hover:not(:disabled) { border-color: var(--accent); }
.ok-choice:disabled { cursor: default; }
.ok-bubble { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 38px; border-radius: 50%; border: 2px solid var(--ok-sheet-red); color: var(--ok-sheet-red); font-size: 15px; background: transparent; transition: background .2s; }
.ok-choice.is-marked .ok-bubble { background: var(--ok-mark); color: transparent; border-color: var(--ok-mark); }
.ok-choice.is-good { border-color: var(--good); background: var(--good-soft); }
.ok-choice.is-bad { border-color: var(--bad); background: var(--bad-soft); }
.ok-ctext { min-width: 0; }
.ok-after:empty { display: none; }
.ok-after { display: grid; gap: 8px; }
.ok-judge { font-size: 22px; font-weight: 900; text-align: center; margin: 0; }
.ok-judge.ok { color: var(--good); } .ok-judge.ng { color: var(--bad); }
.ok-explain { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.ok-explain p { margin: 0 0 6px; }

/* 成績通知書 */
.ok-result { position: relative; background: var(--ok-paper); color: var(--ok-ink); border: 2px solid var(--ok-ink); border-radius: 6px; padding: 16px; box-shadow: var(--shadow); }
.ok-result::before { content: "成績通知書"; position: absolute; top: -12px; left: 14px; background: var(--ok-paper); padding: 0 8px; font-family: var(--font-serif); font-weight: 900; letter-spacing: .2em; font-size: 14px; }
.ok-result.is-rare { border-color: var(--ok-gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok-gold) 35%, transparent), var(--shadow); }
.ok-res-top { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.ok-res-lbl { margin: 0; font-size: 13px; font-weight: 700; color: var(--text-sub); }
.ok-res-big { font-size: clamp(64px, 20vw, 88px); font-weight: 900; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.ok-res-type { flex: 1; min-width: 160px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ok-res-type b { font-size: 20px; line-height: 1.35; width: 100%; }
.ok-res-em { font-size: 30px; line-height: 1; }
.ok-res-line { font-weight: 800; font-size: 16px; margin: 12px 0 6px; padding: 6px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--text); }
.ok-table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 14px; }
.ok-table th, .ok-table td { padding: 5px 4px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.ok-table thead th { font-size: 12px; color: var(--text-sub); font-weight: 700; }
.ok-mk { letter-spacing: .1em; }
.ok-mkb { display: inline-block; width: 20px; text-align: center; font-weight: 900; }
.ok-mkb.g { color: var(--good); } .ok-mkb.b { color: var(--bad); }
.ok-barcell { width: 100%; }
.ok-bar { position: relative; display: block; height: 10px; background: var(--surface-2); border-radius: 99px; min-width: 60px; }
.ok-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.ok-bar em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text-sub); }
.ok-hv { text-align: right !important; font-weight: 900; font-variant-numeric: tabular-nums; }
.ok-review { padding-left: 1.4em; font-size: 14px; margin: 8px 0 0; }
.ok-review li { margin-bottom: 8px; }
.ok-rate { color: var(--text-sub); font-size: 12px; }
details > summary { cursor: pointer; }
.ok-zukan { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.ok-z { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 10px; background: var(--surface-2); text-align: center; color: var(--text-sub); }
.ok-z span { font-size: 22px; line-height: 1.2; }
.ok-z small { font-size: 11px; line-height: 1.35; }
.ok-z.got { background: var(--accent-soft); color: var(--text); }
.ok-z.cur { outline: 2px solid var(--accent); }
@media (max-width: 360px) { .ok-zukan { grid-template-columns: repeat(2, 1fr); } }
@media (prefers-reduced-motion: reduce) { .ok-bub.on { fill: #2a2d33; } }
