/* AIオタク検定：「推論コンソール × オタクのノート」
   - 見出しは Dela Gothic One、それ以外は等幅の M PLUS 1 Code（public/fonts）
   - 色は2つだけを主役にする：シアン（AI・選択・情報）と、推しピンク（合格・強調）
   - 見出しをトークンに区切った表示と、合格のホロステッカーがこのサイトの顔 */

:root {
  --bg: #f6f3ff;
  --surface: #ffffff;
  --surface-2: #efeaff;
  --line: #ddd5f7;
  --line-strong: #b9adeb;
  --text: #1d1838;
  --muted: #5f5888;
  --cyan: #0a8f8c;
  --cyan-soft: #d5f4f2;
  --pink: #d42a7c;
  --pink-soft: #ffe0ef;
  --yellow: #a26700;
  --ok: #12855a;
  --ng: #c8323a;
  --on-accent: #ffffff;
  --focus: #6a4dff;
  --tok-0: #e3dcff;
  --tok-1: #cdf3f1;
  --tok-2: #ffd9ea;
  --tok-3: #fff0c2;
  --radius: 10px;
  --display: "Dela Gothic One", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  --mono: "M PLUS 1 Code", "BIZ UDGothic", "Hiragino Sans", "Yu Gothic UI", ui-monospace, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #120f24;
    --surface: #1b1733;
    --surface-2: #241f44;
    --line: #322b5c;
    --line-strong: #4b4287;
    --text: #ece8fa;
    --muted: #a39cc6;
    --cyan: #4fe3e0;
    --cyan-soft: #143a45;
    --pink: #ff5da2;
    --pink-soft: #43193a;
    --yellow: #ffd45c;
    --ok: #5be3a0;
    --ng: #ff7070;
    --on-accent: #120f24;
    --focus: #b9a6ff;
    --tok-0: #3a3170;
    --tok-1: #17474f;
    --tok-2: #4d1e45;
    --tok-3: #4a3d18;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #120f24;
  --surface: #1b1733;
  --surface-2: #241f44;
  --line: #322b5c;
  --line-strong: #4b4287;
  --text: #ece8fa;
  --muted: #a39cc6;
  --cyan: #4fe3e0;
  --cyan-soft: #143a45;
  --pink: #ff5da2;
  --pink-soft: #43193a;
  --yellow: #ffd45c;
  --ok: #5be3a0;
  --ng: #ff7070;
  --on-accent: #120f24;
  --focus: #b9a6ff;
  --tok-0: #3a3170;
  --tok-1: #17474f;
  --tok-2: #4d1e45;
  --tok-3: #4a3d18;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--bg);
  /* 埋め込み空間の点（とても薄く） */
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.8;
}

a { color: var(--cyan); text-underline-offset: 3px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

main, .masthead, .colophon { max-width: 780px; margin: 0 auto; padding: 0 16px; }
main:focus { outline: none; }

/* ---------- 上の帯 ---------- */
.masthead {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding-top: 16px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line-strong);
}
.wordmark {
  font-family: var(--display); font-size: 20px; letter-spacing: 0.04em;
  color: var(--text); text-decoration: none;
}
/* 入力待ちのカーソル（このサイトで唯一の、勝手に動く飾り） */
.wordmark::after {
  content: ""; display: inline-block; width: 0.5em; height: 1em; margin-left: 4px;
  vertical-align: -0.12em; background: var(--cyan);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.masthead-nav { display: flex; gap: 2px; margin-left: auto; }
.masthead-nav a {
  padding: 6px 12px; border-radius: 999px;
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 700;
}
.masthead-nav a:hover { background: var(--surface-2); color: var(--cyan); }

/* ---------- 表紙（トップ） ---------- */
.cover {
  margin: 28px 0 8px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.cover-title { padding: 20px 20px 18px; }
.prompt-line { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.cover-title h1 {
  margin: 0;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(36px, 10vw, 68px); line-height: 1.15;
  display: flex; flex-wrap: wrap; gap: 4px;
}
/* トークンの区切りを見せる表示（トークナイザーの可視化ツール風） */
.tok {
  display: inline-block; padding: 0 0.12em; border-radius: 6px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12);
}
.tok-0 { background: var(--tok-0); }
.tok-1 { background: var(--tok-1); }
.tok-2 { background: var(--tok-2); }
.tok-3 { background: var(--tok-3); }
.tok-count { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.tok-count::before { content: "↳ "; color: var(--cyan); }
.lead { margin: 14px 0 0; max-width: 36em; }

/* 検定の仕様：モデルの設定ファイル風 */
.spec {
  margin: 0; padding: 14px 20px;
  display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4px 28px;
  border-top: 1px dashed var(--line-strong);
  background: var(--surface-2);
  font-size: 14px;
}
.spec div { display: flex; gap: 8px; align-items: baseline; }
.spec dt { color: var(--cyan); }
.spec dt::after { content: ":"; color: var(--muted); }
.spec dd { margin: 0; color: var(--yellow); font-weight: 700; }

h2 {
  font-family: var(--display); font-weight: 400;
  font-size: 20px; margin: 40px 0 12px; padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
h2::before { content: "## "; font-family: var(--mono); font-weight: 700; color: var(--pink); }

/* 級の一覧：モデルの大きさに見立てる */
.grades { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.grade-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 2px 16px; align-items: center;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.grade-mark {
  grid-row: span 2;
  width: 64px; height: 64px;
  display: grid; place-content: center; text-align: center;
  border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  font-family: var(--display); font-size: 18px; line-height: 1.1;
}
.grade-mark small { font-family: var(--mono); font-size: 11px; color: var(--cyan); font-weight: 700; margin-top: 2px; }
.grade-row.closed { background: transparent; border-style: dashed; }
.grade-row.closed .grade-mark { opacity: 0.5; }
.grade-row.passed { border-color: var(--pink); }
.grade-row.passed .grade-mark { background: var(--pink-soft); border-color: var(--pink); }
.grade-stage { font-weight: 700; }
.grade-time { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--muted); }
.grade-goal { grid-column: 2; color: var(--muted); font-size: 13px; line-height: 1.6; }
.grade-row .btn, .grade-row .soon { grid-column: 3; grid-row: 1 / span 2; }
.soon { color: var(--muted); font-size: 13px; }
.soon::before { content: "// "; }
.passed-tag {
  display: inline-block; margin-left: 10px; padding: 0 8px;
  border-radius: 999px; background: var(--pink); color: var(--on-accent);
  font-size: 11px; font-weight: 700;
}

/* 練習モードの選択 */
.practice-form { display: grid; gap: 14px; }
.field-label { font-size: 13px; font-weight: 700; margin-bottom: 6px; display: block; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 5px 12px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); font-size: 13px; cursor: pointer;
}
.chip input:checked + span { background: var(--cyan); border-color: var(--cyan); color: var(--on-accent); font-weight: 700; }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.chip input:disabled + span { opacity: 0.45; cursor: not-allowed; }

.rules { margin: 14px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 13px; }
.rules li::before { content: "- "; color: var(--cyan); }

/* ---------- ボタン ---------- */
.btn {
  appearance: none; font: inherit; font-weight: 700; font-size: 14px;
  padding: 10px 18px; min-height: 44px;
  border: 1px solid var(--cyan); border-radius: 999px;
  background: var(--cyan); color: var(--on-accent);
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--cyan); }
.btn.small { min-height: 34px; padding: 4px 14px; font-size: 12px; }
.btn.danger { background: var(--ng); border-color: var(--ng); color: var(--on-accent); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; align-items: center; }
.actions .spacer { flex: 1; }

/* ---------- 受験中の帯 ---------- */
.exam-bar {
  position: sticky; top: 0; z-index: 5;
  margin: 0 -16px; padding: 10px 16px 12px;
  display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap;
  background: var(--bg);
  border-bottom: 1px solid var(--line-strong);
}
.exam-bar strong { font-family: var(--display); font-weight: 400; color: var(--pink); }
.exam-bar .btn.small { margin-left: auto; }
.progress { color: var(--muted); font-size: 13px; }
.timer { margin-left: auto; font-weight: 700; font-size: 18px; color: var(--cyan); font-variant-numeric: tabular-nums; }
.timer.low { color: var(--ng); }
/* 残り時間を「残りのコンテキスト」に見立てたバー */
.ctx-bar { flex-basis: 100%; height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.ctx-fill { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--cyan), var(--pink)); transition: width 0.5s linear; }
.ctx-bar.low .ctx-fill { background: var(--ng); }

/* ---------- 問題 ---------- */
.question { margin: 22px 0 0; }
.q-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.q-no { font-family: var(--display); font-size: 22px; color: var(--pink); }
.q-cat { font-size: 12px; color: var(--muted); }
.q-cat::before { content: "#"; color: var(--cyan); }
.q-text { font-size: 17px; line-height: 1.85; margin: 8px 0 18px; font-weight: 700; max-width: 40em; }

.choices { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.choice {
  width: 100%; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center;
  padding: 12px 14px; min-height: 56px;
  font: inherit; font-size: 15px; line-height: 1.65; text-align: left; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer;
}
.choice:hover:not(:disabled) { border-color: var(--cyan); }
.choice:disabled { cursor: default; }

/* 選択肢の記号：AIの出力候補のように角括弧のチップ */
.bubble {
  width: 34px; height: 30px; border-radius: 6px;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  color: var(--cyan); font-size: 14px; font-weight: 700;
  background: var(--surface-2);
}
.choice[aria-pressed="true"],
.choice.chosen { border-color: var(--pink); }
.choice[aria-pressed="true"] .bubble,
.choice.chosen .bubble { background: var(--pink); border-color: var(--pink); color: var(--on-accent); }

/* 採点後の表示 */
.choice.is-answer { border-color: var(--ok); box-shadow: inset 4px 0 0 var(--ok); }
.choice.is-wrong { border-color: var(--ng); box-shadow: inset 4px 0 0 var(--ng); }
.verdict { font-weight: 700; }
.verdict.ok { color: var(--ok); }
.verdict.ng { color: var(--ng); }

/* 解説：コードのコメント風 */
.explain {
  margin-top: 16px; padding: 14px 16px;
  background: var(--surface-2); border-left: 3px solid var(--cyan);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.explain p { margin: 0; }
.explain .verdict { display: block; margin-bottom: 4px; }
.explain .verdict::before { content: "// "; color: var(--muted); }
.terms { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding: 0; list-style: none; }
.terms li {
  font-size: 12px; padding: 1px 10px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface);
}
.terms a { color: inherit; text-decoration: none; }
.terms a::before { content: "#"; color: var(--cyan); }
.terms a:hover { color: var(--cyan); }
.as-of { margin-top: 8px; font-size: 12px; color: var(--muted); }

/* 解答用紙（問題番号の一覧） */
.sheet { margin-top: 28px; }
.sheet summary { cursor: pointer; font-weight: 700; color: var(--cyan); font-size: 14px; }
.sheet-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; margin-top: 10px; }
.sheet-cell {
  font: inherit; font-size: 13px;
  min-height: 40px; padding: 4px 0;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--text); cursor: pointer;
}
.sheet-cell.done { background: var(--pink); border-color: var(--pink); color: var(--on-accent); font-weight: 700; }
.sheet-cell.current { outline: 2px solid var(--cyan); outline-offset: 1px; }

.confirm {
  margin-top: 18px; padding: 14px 16px;
  border: 1px solid var(--pink); border-radius: var(--radius);
  background: var(--surface);
}
.confirm p { margin: 0 0 10px; }

/* ---------- 結果・マイページの見出し ---------- */
.result-head {
  position: relative;
  margin: 28px 0 0; padding: 22px 20px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface);
  min-height: 170px;
}
.result-head:has(.hanko) { padding-right: 170px; }
.result-grade { color: var(--cyan); font-weight: 700; overflow-wrap: anywhere; }
.score { font-family: var(--display); font-size: clamp(46px, 13vw, 76px); line-height: 1.1; margin: 6px 0; }
.score small { font-family: var(--mono); font-size: 0.32em; color: var(--muted); font-weight: 700; }
.result-note { margin: 0; color: var(--muted); font-size: 13px; max-width: 30em; }
.result-record { margin: 10px 0 0; font-size: 13px; font-weight: 700; max-width: 30em; }

/* 合格のホロステッカー：貼られたように一度だけ動く */
.hanko {
  position: absolute; right: 20px; top: 50%;
  width: 128px; height: 128px; margin-top: -64px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(from 210deg, #ff5da2, #ffd45c, #4fe3e0, #9b7bff, #ff5da2);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transform: rotate(-10deg);
  animation: stick 460ms cubic-bezier(.2, .9, .3, 1.3) both 200ms;
}
.hanko::before {
  content: ""; position: absolute; inset: 7px; border-radius: 50%;
  background: var(--surface);
}
.hanko span {
  position: relative;
  font-family: var(--display); font-size: 34px; line-height: 1;
  background: linear-gradient(135deg, #ff5da2, #9b7bff 55%, #4fe3e0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hanko.retry { background: none; box-shadow: none; border: 2px dashed var(--line-strong); animation: none; }
.hanko.retry::before { display: none; }
.hanko.retry span { background: none; color: var(--muted); font-size: 24px; }
@keyframes stick {
  from { transform: rotate(-30deg) scale(1.6); opacity: 0; }
  to { transform: rotate(-10deg) scale(1); opacity: 1; }
}

.review { list-style: none; margin: 0; padding: 0; }
.review > li { padding: 20px 0; border-bottom: 1px solid var(--line); }
.review .q-text { font-size: 15px; margin-bottom: 12px; }
.review .choices { gap: 6px; }
.review .choice { min-height: 0; padding: 8px 12px; font-size: 14px; }
.review .bubble { width: 30px; height: 26px; font-size: 12px; }

.filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 0; }

/* ---------- 単語帳 ---------- */
.page-head { margin: 28px 0 8px; }
.page-head h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(32px, 8vw, 50px); line-height: 1.2; }
.page-head h1::after { content: "_"; color: var(--cyan); margin-left: 4px; }
.page-head p { margin: 8px 0 0; max-width: 40em; color: var(--muted); }
.word-tools { display: grid; gap: 12px; margin: 20px 0 8px; }
.word-tools .actions { margin-top: 0; }
.word-count { margin: 0; color: var(--muted); font-size: 13px; }
.search {
  width: 100%; font: inherit; font-size: 16px;
  padding: 10px 16px; min-height: 46px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--text);
}
.search::placeholder { color: var(--muted); }
.search:focus { border-color: var(--cyan); outline: none; box-shadow: 0 0 0 3px var(--cyan-soft); }

.word-list { display: grid; gap: 10px; }
.word {
  padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  display: grid; grid-template-columns: 1fr auto; column-gap: 16px;
  scroll-margin-top: 12px;
}
.word > * { grid-column: 1; }
.word .learned-toggle { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
.word.focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
.word.learned { border-color: var(--pink); }
.word-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.word h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 20px; line-height: 1.4; }
.word h3:focus { outline: none; }
.word.learned h3::after { content: " ✓"; font-family: var(--mono); font-size: 14px; color: var(--pink); }
.word-grade { font-size: 11px; color: var(--cyan); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 8px; white-space: nowrap; }
.word-en { margin: 0 0 6px; color: var(--muted); font-size: 12px; }
.word-desc { margin: 0; max-width: 42em; }
.word-point { margin: 8px 0 0; font-size: 13px; max-width: 44em; color: var(--muted); }
.word-point strong { color: var(--pink); }
.word-related { margin: 8px 0 0; font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.link-button {
  font: inherit; color: var(--cyan); background: none; border: 0; padding: 2px 0;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.learned-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer;
  padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-2);
}
.learned-toggle input { width: 16px; height: 16px; accent-color: var(--pink); margin: 0; }
.word.learned .learned-toggle { color: var(--pink); border-color: var(--pink); }

.card {
  margin-top: 16px; padding: 28px 22px; min-height: 230px;
  border: 1px solid var(--line-strong); border-radius: 16px;
  background: var(--surface);
  box-shadow: 6px 6px 0 var(--tok-0);
}
.card-term { font-family: var(--display); font-size: clamp(26px, 7vw, 38px); line-height: 1.3; margin: 10px 0 0; }
.card-back { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line-strong); }
.card-back p { margin: 0 0 8px; max-width: 42em; }
.done-card { min-height: 0; }

/* ---------- ログイン・マイページ ---------- */
.examinee {
  display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap;
  padding: 10px 20px; border-top: 1px dashed var(--line-strong);
  font-size: 13px;
}
.examinee-label { color: var(--cyan); }
.examinee-label::after { content: ":"; color: var(--muted); }
.examinee-note { color: var(--muted); }
.examinee .btn.small { margin-left: auto; }
.examinee-name { font-weight: 700; color: var(--text); }
.examinee-grade { margin-left: auto; color: var(--muted); }
.examinee-grade strong { font-family: var(--display); font-weight: 400; color: var(--pink); font-size: 18px; margin-left: 4px; }
.hint { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.about { margin-top: 32px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.about summary { cursor: pointer; font-weight: 700; color: var(--cyan); }
.about p { font-size: 13px; max-width: 42em; }
.about.danger summary { color: var(--ng); }

/* ボット対策の確認（必要なときだけ表示される） */
.turnstile-box { margin-top: 10px; }
.turnstile-box:empty { display: none; }

/* ---------- 運営者情報・プライバシーポリシー ---------- */
.doc { padding-bottom: 8px; }
.doc p { max-width: 44em; }
.doc h3 { font-size: 15px; margin: 22px 0 6px; color: var(--cyan); }
.doc .rules { font-size: 14px; color: var(--text); }
.doc .rules li { margin-bottom: 4px; }
.doc-table { margin: 12px 0 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.doc-table div { display: grid; grid-template-columns: 11em 1fr; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.doc-table div:last-child { border-bottom: 0; }
.doc-table dt { color: var(--cyan); font-weight: 700; }
.doc-table dd { margin: 0; overflow-wrap: anywhere; }
.colophon a { color: var(--muted); }

/* ---------- その他 ---------- */
.loading, .notice { margin: 40px 0; color: var(--muted); }
.loading::before, .notice::before { content: "▍"; color: var(--cyan); margin-right: 6px; animation: blink 1.1s steps(1) infinite; }
.error-box {
  margin: 18px 0; padding: 12px 16px;
  border: 1px solid var(--ng); border-radius: var(--radius);
  color: var(--ng); background: var(--surface);
}
.error-box::before { content: "Error: "; font-weight: 700; }
.colophon {
  margin-top: 56px; padding-top: 16px; padding-bottom: 32px;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 12px; line-height: 1.7;
}
.colophon p { margin: 0 0 4px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (max-width: 560px) {
  body { font-size: 14px; }
  .masthead-nav a { padding: 6px 7px; font-size: 13px; }
  .spec { grid-template-columns: 1fr; padding: 12px 20px; }
  .grade-row { grid-template-columns: 58px 1fr; }
  .grade-mark { width: 54px; height: 54px; font-size: 15px; }
  .grade-row .btn, .grade-row .soon { grid-column: 2; grid-row: auto; justify-self: start; margin-top: 8px; }
  .grade-goal { grid-column: 2; }
  .sheet-grid { grid-template-columns: repeat(5, 1fr); }
  .result-head:has(.hanko) { padding-right: 112px; }
  .hanko { width: 92px; height: 92px; margin-top: -46px; right: 12px; }
  .hanko span { font-size: 25px; }
  .hanko.retry span { font-size: 18px; }
  .word { grid-template-columns: 1fr; }
  .word .learned-toggle { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 10px; }
  .examinee-grade, .examinee .btn.small { margin-left: 0; }
  .doc-table div { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .wordmark::after, .loading::before, .notice::before { animation: none; }
  .hanko { animation: none; }
  .ctx-fill { transition: none; }
}
