/* ==========================================================================
   Wine Drill — application UI
   ========================================================================== */
.app {
  display: grid; grid-template-columns: 252px minmax(0, 1fr);
  min-height: 100dvh; background: var(--bg);
}
.app[aria-busy="true"] { cursor: progress; }

/* ---------- rail ---------- */
.rail {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column;
  padding: 22px 16px 18px; color: rgba(255,255,255,.72);
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(226,210,171,.16), transparent 60%),
    linear-gradient(175deg, #0d0d12 0%, #14141b 52%, #1a1c23 100%);
  border-right: 1px solid rgba(255,255,255,.06);
  z-index: 40;
}
.rail-brand { display: flex; align-items: center; gap: 11px; color: #fff; padding: 4px 10px 26px; }
.rail-brand svg { color: #e2d2ab; flex: none; }
.rail-brand-text { display: flex; flex-direction: column; line-height: 1.1; font-family: var(--font-display); font-weight: 400; letter-spacing: .16em; font-size: 21px; text-transform: uppercase; }
.rail-brand-text em { font-family: var(--font-body); font-style: normal; font-size: 9.5px; letter-spacing: .2em; color: rgba(255,255,255,.5); margin-top: 5px; font-weight: 600; }
.rail-nav { display: grid; gap: 3px; }
.rail-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 13px; border-radius: 12px;
  color: rgba(255,255,255,.7); font-size: 13.5px; font-weight: 600; letter-spacing: .01em;
  transition: background .16s, color .16s, transform .16s;
}
.rail-link svg { opacity: .72; flex: none; }
.rail-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.rail-link.is-active { background: rgba(255,255,255,.13); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.08) inset; }
.rail-link.is-active svg { opacity: 1; color: #e2d2ab; }
.rail-link .rail-badge {
  margin-left: auto; font-size: 10.5px; font-weight: 700; background: var(--gold); color: #fff;
  border-radius: 999px; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 6px;
}
.rail-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); }
.rail-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; color: #fff; }
.rail-user:hover { background: rgba(255,255,255,.07); color: #fff; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: linear-gradient(140deg, #e8d8b6, #b07a45); color: #191a20; font-weight: 800; font-size: 13px;
}
.rail-user-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.rail-user-text b { font-size: 12.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-user-text small { font-size: 10.5px; color: rgba(255,255,255,.5); }

/* ---------- main / bar ---------- */
.app-main { min-width: 0; display: flex; flex-direction: column; }
.app-bar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px;
  height: 66px; padding: 0 clamp(16px, 3vw, 34px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.5) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
}
.app-bar-title { font-size: 14.5px; font-weight: 700; letter-spacing: .01em; }
.app-bar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-button {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-button:hover { background: var(--surface-2); color: var(--ink); }
.rail-toggle { display: none; }
.search-button {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--mut);
  font-size: 12.5px; cursor: pointer;
}
.search-button:hover { border-color: var(--line-strong); color: var(--ink-2); }
.search-button kbd, .cmdk-input-wrap kbd {
  font-family: var(--font-body); font-size: 10px; border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 5px; color: var(--mut); background: var(--surface-2);
}
.plan-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; background: var(--gold-soft); color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 26%, transparent);
  white-space: nowrap;
}
.plan-pill.is-paid { background: var(--sage-soft); color: var(--sage); border-color: color-mix(in srgb, var(--sage) 26%, transparent); }
.plan-pill.is-expired { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 26%, transparent); }

.app-view { width: 100%; max-width: 1180px; margin: 0 auto; padding: clamp(20px, 3vw, 38px) clamp(16px, 3vw, 34px) 96px; outline: none; }

/* ---------- common view pieces ---------- */
.view { animation: viewIn .32s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.view-head h1 { font-size: clamp(1.55rem, 2.6vw, 2.1rem); }
.view-head p { margin: 6px 0 0; color: var(--mut); font-size: 13.5px; }
.view-head .head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.eyebrow-sm { font-size: 10.5px; font-weight: 700; letter-spacing: .18em; color: var(--gold); text-transform: uppercase; margin-bottom: 7px; }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: clamp(18px, 2.4vw, 26px); box-shadow: var(--shadow-sm);
}
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h2 { font-family: var(--font-body); font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.panel-head .mut { font-size: 12px; }
.panel-link { font-size: 12.5px; font-weight: 650; color: var(--wine); display: inline-flex; align-items: center; gap: 3px; }
.panel-link:hover { gap: 6px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-12 { display: grid; grid-template-columns: 1.4fr .6fr; gap: 16px; }
@media (max-width: 1000px) { .grid-12 { grid-template-columns: 1fr; } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- dashboard ---------- */
.dash-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.dash-top h1 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
.dash-top .sub { color: var(--mut); font-size: 13.5px; margin-top: 5px; }
.dash-greet { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.streak-chip {
  display: inline-flex; align-items: center; gap: 7px; background: linear-gradient(135deg, #f4ecdd, #eadfc8);
  color: #6c5230; border: 1px solid #e0d3ba; border-radius: 999px; padding: 6px 13px; font-size: 12px; font-weight: 700;
}
.streak-chip svg { color: #8a6a3a; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat-card {
  position: relative; overflow: hidden; padding: 18px 18px 16px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.stat-card .stat-label { font-size: 11px; font-weight: 650; letter-spacing: .08em; color: var(--mut); text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.stat-card .stat-value { font-family: var(--font-num); font-size: clamp(1.7rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin-top: 10px; }
.stat-card .stat-value small { font-size: .55em; color: var(--mut); font-weight: 600; letter-spacing: 0; margin-left: 2px; }
.stat-card .stat-sub { font-size: 11.5px; color: var(--mut); margin-top: 5px; }
.stat-card .stat-spark { position: absolute; right: 12px; bottom: 10px; opacity: .9; }
.stat-card--accent { background: linear-gradient(150deg, #191a20, #26305e); border-color: transparent; color: #fff; }
.stat-card--accent .stat-label, .stat-card--accent .stat-sub { color: rgba(255,255,255,.66); }
.stat-card--accent .stat-value { color: #fff; }
@media (max-width: 1000px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .stat-card { padding: 14px; } }

.goal-card { display: flex; align-items: center; gap: 22px; }
.ring { position: relative; width: 132px; height: 132px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { stroke: var(--surface-3); }
.ring-fill { stroke: var(--wine); stroke-linecap: round; transition: stroke-dashoffset .7s var(--ease); }
.ring-fill.gold { stroke: var(--gold); }
.ring-fill.sage { stroke: var(--sage); }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-center b { font-family: var(--font-num); font-size: 27px; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.ring-center small { font-size: 10.5px; color: var(--mut); margin-top: 4px; }
.goal-copy h3 { font-family: var(--font-body); font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.goal-copy p { font-size: 12.5px; color: var(--mut); margin: 0 0 14px; }
.goal-copy .button { padding: 9px 16px; font-size: 13px; }

.chapter-mini { display: grid; gap: 2px; }
.chapter-row {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; padding: 11px 0; border-bottom: 1px solid var(--line);
  align-items: center; text-decoration: none; color: inherit;
}
.chapter-row:last-child { border-bottom: 0; }
.chapter-row:hover .chapter-name { color: var(--wine); }
.chapter-name { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.chapter-score { font-family: var(--font-num); font-size: 12.5px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.chapter-meter { grid-column: 1 / -1; height: 5px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.chapter-meter i { display: block; height: 100%; border-radius: 99px; background: var(--wine); }
.chapter-meter i.low { background: var(--danger); }
.chapter-meter i.gold { background: var(--gold); }

.chart { width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .area { fill: url(#areaGradient); }
.chart .line { fill: none; stroke: var(--wine); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chart .dot { fill: var(--surface); stroke: var(--wine); stroke-width: 2; }
.chart .bar { fill: var(--surface-3); }
.chart .bar.is-today { fill: var(--wine); }
.chart text { font-family: var(--font-body); font-size: 9.5px; fill: var(--mut); }

.heatmap { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.heat-cell { width: 12px; height: 12px; border-radius: 3px; background: var(--surface-3); }
.heat-cell.l1 { background: color-mix(in srgb, var(--wine) 22%, var(--surface-3)); }
.heat-cell.l2 { background: color-mix(in srgb, var(--wine) 44%, var(--surface-3)); }
.heat-cell.l3 { background: color-mix(in srgb, var(--wine) 68%, var(--surface-3)); }
.heat-cell.l4 { background: var(--wine); }
.heat-legend { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--mut); margin-top: 10px; justify-content: flex-end; }

.recent-list { display: grid; gap: 0; }
.recent-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; line-height: 1.65; }
.recent-item:last-child { border-bottom: 0; }
.recent-mark { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; margin-top: 1px; }
.recent-mark.ok { background: var(--sage-soft); color: var(--sage); }
.recent-mark.ng { background: var(--danger-soft); color: var(--danger); }
.recent-item .mut { font-size: 11px; }
.recent-item--link { color: inherit; text-decoration: none; border-radius: 10px; padding-left: 8px; padding-right: 8px; margin-left: -8px; margin-right: -8px; transition: background .15s ease; }
.recent-item--link:hover { background: var(--surface-2, rgba(0,0,0,.04)); }
.recent-item--link:hover b { color: var(--wine); }

/* ---------- paywall ---------- */
.paywall {
  position: relative; overflow: hidden; border-radius: 22px; padding: clamp(26px, 4vw, 42px);
  background: linear-gradient(150deg, #191a20, #26305e 58%, #3b477e); color: #fff;
  box-shadow: var(--shadow-md); margin-bottom: 18px;
}
.paywall::after { content: ""; position: absolute; width: 380px; height: 380px; right: -130px; top: -170px; border-radius: 50%; background: radial-gradient(circle, rgba(226,210,171,.3), transparent 68%); }
.paywall > * { position: relative; }
.paywall .kicker { color: #e2d2ab; }
.paywall h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin-bottom: 10px; color: #fff; }
.paywall p { color: rgba(255,255,255,.78); font-size: 13.5px; max-width: 40em; }
.paywall .row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; align-items: center; }
.paywall .price { font-family: var(--font-num); font-size: 1.7rem; font-weight: 700; }
.paywall .price small { font-size: .45em; font-weight: 600; opacity: .7; margin-left: 4px; }

/* ---------- practice ---------- */
.practice-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 16px; align-items: start; }
@media (max-width: 980px) { .practice-grid { grid-template-columns: 1fr; } }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button, .seg label {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px;
  padding: 8px 14px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s;
}
.seg button:hover, .seg label:hover { border-color: var(--line-strong); }
.seg button.is-active, .seg label.is-active { background: var(--wine); border-color: var(--wine); color: #fff; }
/* 分野 → 章 → 地方 → テーマ の絞り込みチップ */
.pick-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pick-chip {
  display: inline-flex; align-items: baseline; gap: 5px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 8px;
  padding: 6px 10px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s;
}
.pick-chip:hover { border-color: var(--line-strong); background: var(--surface-2); }
.pick-chip.is-active { background: var(--wine); border-color: var(--wine); color: #fff; }
.pick-chip small { font-size: 10px; font-weight: 600; opacity: .62; }
.pick-chip.is-active small { opacity: .8; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.field-label { font-size: 12px; font-weight: 700; color: var(--ink-2); margin: 18px 0 9px; letter-spacing: .02em; }
.field-label:first-child { margin-top: 0; }
.chapter-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
@media (max-width: 620px) { .chapter-picker { grid-template-columns: 1fr; } }
.chapter-tile {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; transition: all .15s;
}
.chapter-tile:hover { border-color: var(--line-strong); background: var(--surface-2); }
.chapter-tile.is-active { border-color: var(--wine); background: var(--wine-soft); }
.chapter-tile .ct-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--wine); font-size: 10.5px; font-weight: 800; flex: none; }
.chapter-tile.is-active .ct-mark { background: var(--wine); color: #fff; }
.chapter-tile .ct-body { min-width: 0; }
.chapter-tile b { display: block; font-size: 12.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chapter-tile small { font-size: 10.5px; color: var(--mut); }
.start-card { position: sticky; top: 82px; }
@media (max-width: 980px) { .start-card { position: static; } }

/* ---------- practice (2026 refresh) ---------- */
.progress-hero {
  display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: clamp(18px, 3vw, 32px);
  align-items: center; margin-bottom: 18px; padding: clamp(20px, 2.6vw, 28px);
  border-radius: 22px; border: 1px solid var(--line);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(38, 48, 94, .07), transparent 58%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}
.progress-hero .ring { width: 132px; }
.ph-kicker { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; color: var(--gold); text-transform: uppercase; margin: 0 0 6px; }
.ph-body h2 { font-family: var(--font-display); font-size: clamp(1.15rem, 2vw, 1.45rem); font-weight: 400; line-height: 1.5; margin: 0 0 4px; }
.ph-body h2 b { font-family: var(--font-num); font-weight: 700; letter-spacing: -.01em; }
.ph-body > p { margin: 0; color: var(--mut); font-size: 12.5px; }
.ph-facts { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 14px; }
.ph-facts > div { display: flex; flex-direction: column; }
.ph-facts b { font-family: var(--font-num); font-size: 18px; font-weight: 700; line-height: 1.2; }
.ph-facts b small { font-size: 10px; color: var(--mut); margin-left: 1px; }
.ph-facts span { font-size: 10.5px; color: var(--mut); }
@media (max-width: 560px) {
  .progress-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .ph-facts { justify-content: center; }
}

.practice-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 1040px) { .practice-layout { grid-template-columns: 1fr; } }
.practice-side { position: sticky; top: 82px; }
@media (max-width: 1040px) { .practice-side { position: static; } }
.practice-side .start-card { position: static; }

.mode-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
@media (max-width: 620px) { .mode-cards { grid-template-columns: 1fr; } }
.mode-card {
  position: relative; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  padding: 12px 13px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface);
  transition: border-color .15s, background .15s, box-shadow .15s; color: inherit;
}
.mode-card:hover { border-color: var(--line-strong); background: var(--surface-2); }
.mode-card.is-active { border-color: var(--wine); background: var(--wine-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wine) 9%, transparent); }
.mc-ic { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); color: var(--mut); }
.mode-card.is-active .mc-ic { background: var(--wine); color: #fff; }
.mc-copy { display: flex; flex-direction: column; min-width: 0; }
.mc-copy b { font-size: 13px; font-weight: 700; }
.mc-copy small { font-size: 10.5px; color: var(--mut); margin-top: 1px; }
.mc-radio { margin-left: auto; flex: none; width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--line-strong); }
.mode-card.is-active .mc-radio { border-color: var(--wine); background: radial-gradient(circle, var(--wine) 0 4px, transparent 4.6px); }
@media (max-width: 760px) { .mc-radio { display: none; } }

.fl-note { float: right; font-weight: 500; font-size: 10.5px; color: var(--mut); letter-spacing: 0; }

.domain-list { display: grid; gap: 8px; }
.domain-block { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.domain-head {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(60px, 150px) 46px 18px; align-items: center; gap: 10px;
  width: 100%; padding: 11px 13px; background: transparent; border: 0; cursor: pointer; text-align: left; color: inherit;
}
.domain-head:hover { background: var(--surface-2); }
.dm-mark { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--wine); font-size: 10px; font-weight: 800; }
.dm-title { display: flex; flex-direction: column; min-width: 0; }
.dm-title b { font-size: 13px; font-weight: 700; }
.dm-title small { font-size: 10.5px; color: var(--mut); }
.dm-pct { text-align: right; font-family: var(--font-num); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dm-pct small { font-size: 9.5px; color: var(--mut); margin-left: 1px; }
.dm-caret { color: var(--mut); display: grid; place-items: center; transition: transform .2s var(--ease); }
.domain-block.is-closed .dm-caret { transform: rotate(-90deg); }
.domain-block.is-closed .domain-body { display: none; }
.domain-body { padding: 0 10px 10px; }
@media (max-width: 560px) {
  .domain-head { grid-template-columns: 32px minmax(0, 1fr) 44px 16px; }
  .domain-head .meter { display: none; }
}
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
@media (max-width: 680px) { .cat-grid { grid-template-columns: 1fr; } }
.cat-row {
  display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); text-align: left; color: inherit;
  transition: border-color .14s, background .14s;
}
.cat-row:hover { border-color: var(--line-strong); background: var(--surface-2); }
.cat-row.is-active { border-color: var(--wine); background: var(--wine-soft); }
.cat-mark { width: 26px; height: 26px; flex: none; border-radius: 7px; display: grid; place-items: center; background: var(--surface-2); color: var(--mut); font-size: 9.5px; font-weight: 800; }
.cat-row.is-active .cat-mark { background: var(--wine); color: #fff; }
.cat-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.cat-title { display: flex; align-items: baseline; gap: 6px; font-size: 12.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-title small { font-size: 10px; color: var(--mut); font-weight: 500; }
.cat-state { flex: none; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.cat-state b { font-family: var(--font-num); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cat-state b small { font-size: 9px; color: var(--mut); }
.cat-state > small { font-size: 9.5px; color: var(--mut); }
.cat-tick { flex: none; color: var(--wine); display: grid; place-items: center; }

.meter { display: block; height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--wine); transition: width .5s var(--ease); }
.meter--gold i { background: var(--gold); }
.meter--sage i { background: var(--sage); }

.pick-chip em { font-style: normal; font-size: 9.5px; color: var(--sage); font-weight: 700; padding-left: 2px; }
.pick-chip.is-active em { color: #fff; opacity: .85; }

.sc-scope { display: flex; flex-direction: column; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sc-label { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--mut); font-weight: 700; }
.sc-value { font-size: 15px; font-family: var(--font-display); font-weight: 400; }
.sc-value.is-warn { color: var(--gold); }
.sc-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.sc-chip { font-size: 11px; font-weight: 600; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--ink-2); padding: 4px 9px; cursor: pointer; }
.sc-chip:hover { border-color: var(--danger); color: var(--danger); }
.sc-chip span { margin-left: 4px; opacity: .6; }

/* 分野別の進捗（成績） */
.domain-progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 900px) { .domain-progress { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .domain-progress { grid-template-columns: 1fr; } }
.dp-card { border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px; background: var(--surface); }
.dp-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.dp-top b { font-size: 12.5px; font-weight: 700; }
.dp-top span { font-family: var(--font-num); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dp-card .meter { margin: 9px 0 6px; }
.dp-sub { font-size: 10.5px; color: var(--mut); }

/* ---------- quiz ---------- */
.quiz-shell { max-width: 860px; margin: 0 auto; }
.quiz-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.quiz-progress { flex: 1; min-width: 140px; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.quiz-progress i { display: block; height: 100%; background: var(--wine); border-radius: 99px; transition: width .3s var(--ease); }
.quiz-count { font-family: var(--font-num); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.quiz-quit { font-size: 12px; color: var(--mut); background: none; border: 0; cursor: pointer; padding: 4px; }
.quiz-quit:hover { color: var(--danger); }
.quiz-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow-sm); }
.q-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.chip--wine { background: var(--wine-soft); color: var(--wine); }
.chip--gold { background: var(--gold-soft); color: var(--gold); }
.chip--sage { background: var(--sage-soft); color: var(--sage); }
.chip--outline { background: transparent; border: 1px solid var(--line); color: var(--mut); }
.q-text { font-size: clamp(1.05rem, 1.9vw, 1.28rem); font-weight: 650; line-height: 1.8; margin: 6px 0 20px; }
ruby rt { font-size: .5em; color: var(--mut); font-weight: 400; }
.choice-list { display: grid; gap: 9px; }
.choice {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  padding: 13px 15px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--surface);
  font-size: 14.5px; line-height: 1.65; color: var(--ink); transition: border-color .14s, background .14s, transform .14s;
}
.choice:hover:not(:disabled) { border-color: var(--wine); background: var(--wine-soft); }
.choice .key {
  flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--mut); font-family: var(--font-num); font-size: 11px; font-weight: 700; margin-top: 1px;
}
.choice.is-selected { border-color: var(--wine); background: var(--wine-soft); }
.choice.is-selected .key { background: var(--wine); color: #fff; }
.choice.is-correct { border-color: var(--sage); background: var(--sage-soft); }
.choice.is-correct .key { background: var(--sage); color: #fff; }
.choice.is-wrong { border-color: var(--danger); background: var(--danger-soft); }
.choice.is-wrong .key { background: var(--danger); color: #fff; }
.choice:disabled { cursor: default; }
.choice.is-dim { opacity: .55; }
.text-answer { display: flex; gap: 9px; margin-top: 4px; }
.text-answer input { flex: 1; padding: 13px 15px; border: 1.5px solid var(--line-strong); border-radius: 12px; font: inherit; font-size: 15px; background: var(--surface); color: var(--ink); }
.text-answer input:focus { outline: none; border-color: var(--wine); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wine) 13%, transparent); }
.quiz-hint { font-size: 11.5px; color: var(--mut); margin-top: 14px; display: flex; align-items: center; gap: 6px; }
.quiz-hint kbd { border: 1px solid var(--line); background: var(--surface-2); border-radius: 4px; padding: 0 4px; font-size: 10px; }

.answer-banner {
  display: flex; align-items: center; gap: 10px; border-radius: 12px; padding: 11px 14px; font-weight: 700; font-size: 14px; margin: 18px 0 14px;
}
.answer-banner.ok { background: var(--sage-soft); color: var(--sage); }
.answer-banner.ng { background: var(--danger-soft); color: var(--danger); }
.answer-banner > span:first-child { flex: none; white-space: nowrap; }
.answer-banner .correct-answer { font-weight: 650; color: var(--ink); margin-left: 4px; flex: 1; min-width: 0; }
.explain { border-top: 1px solid var(--line); padding-top: 16px; }
.explain-point { background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 24%, transparent); border-radius: 12px; padding: 13px 15px; font-size: 13.5px; line-height: 1.85; margin-bottom: 12px; }
.explain-point b { color: var(--gold); }
.explain ul { padding-left: 1.15em; margin: 0 0 12px; }
.explain li { font-size: 13.5px; line-height: 1.85; margin-bottom: 5px; color: var(--ink-2); }
.quiz-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 18px; align-items: center; }
.quiz-actions .spacer { flex: 1; }
.quiz-card.is-answered .choice-list { pointer-events: none; }

/* ---------- result ---------- */
.result-hero { text-align: center; padding: 12px 0 6px; }
.result-hero h1 { font-size: clamp(1.5rem, 2.8vw, 2rem); margin: 14px 0 8px; }
.result-hero .lead { color: var(--mut); font-size: 13.5px; }
.score-ring { width: 148px; height: 148px; margin: 0 auto; position: relative; }
.score-ring svg { width: 100%; transform: rotate(-90deg); }
.score-ring .ring-fill { transition: stroke-dashoffset 1s var(--ease); }
.score-ring .score-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.score-ring .score-center b { font-family: var(--font-num); font-size: 34px; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.score-ring .score-center small { font-size: 10.5px; color: var(--mut); margin-top: 5px; }
.result-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 24px 0; }
.result-stats .rs { background: var(--surface-2); border-radius: 12px; padding: 12px; text-align: center; }
.result-stats b { display: block; font-family: var(--font-num); font-size: 20px; font-weight: 700; line-height: 1.2; }
.result-stats span { font-size: 10.5px; color: var(--mut); }
@media (max-width: 560px) { .result-stats { grid-template-columns: 1fr 1fr; } }

/* ---------- 模擬試験結果：推定された実力と合格ラインの図解 ---------- */
.irt-panel .panel-head { align-items: flex-start; flex-wrap: wrap; }
.irt-panel .panel-head h2 { font-size: 1.05rem; }
.ability-hero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 32px; margin: 2px 0 4px; }
.ability-hero-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ability-hero-label { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; color: var(--mut); }
.ability-hero-main b {
  font-family: var(--font-num); font-size: clamp(2.1rem, 7vw, 2.9rem); font-weight: 700;
  line-height: 1.05; letter-spacing: -.035em; color: var(--ink);
}
.ability-hero-main b small {
  display: block; margin-top: 3px; font-family: var(--font-body); font-size: 10px;
  font-weight: 500; letter-spacing: 0; color: var(--mut);
}
.ability-hero-gap { display: flex; flex-direction: column; gap: 1px; padding-bottom: 3px; }
.ability-hero-gap > span:first-child { font-size: 11px; color: var(--mut); }
.ability-hero-gap > b { font-size: clamp(1.05rem, 3.5vw, 1.3rem); font-weight: 700; line-height: 1.3; color: var(--wine); }
.ability-hero-gap > b.is-pass { color: var(--sage); }
.ability-hero-grade { font-size: 10.5px; line-height: 1.5; color: var(--mut); }
.ability-hero-prob { font-size: 10.5px; line-height: 1.6; color: var(--mut); max-width: 38em; }
.ability-fig { position: relative; margin: 14px 0 0; padding-top: 38px; }
.ability-callout {
  position: absolute; top: 0; transform: translateX(-50%); z-index: 6;
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 3px 10px; border-radius: 999px; background: var(--ink); color: #fff;
  font-size: 10.5px; line-height: 1.5; white-space: nowrap;
}
.ability-callout::after {
  content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--ink);
}
.ability-callout b { font-family: var(--font-num); font-size: 12.5px; color: #fff; }
.ability-track {
  position: relative; height: 62px; border: 1px solid var(--line-strong);
  border-radius: 12px; background: var(--surface-2);
}
.ability-bands { position: absolute; inset: 0; display: flex; overflow: hidden; border-radius: 11px; }
.ab-band {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; min-width: 0; height: 100%;
  border-right: 1px solid color-mix(in srgb, var(--line-strong) 70%, transparent);
}
.ab-band:last-child { border-right: 0; }
.ab-band b { font-family: var(--font-display); font-size: 19px; font-weight: 400; line-height: 1; color: var(--ink); }
.ab-band small {
  max-width: 100%; padding: 0 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 9px; line-height: 1.4; color: var(--ink-2);
}
.ab-band.is-narrow small { display: none; }
.ab-band.is-tiny b { font-size: 11px; }
.ab-band.is-pass { background: var(--sage-soft); }
.ab-band.is-fail { background: color-mix(in srgb, var(--mut) 9%, var(--surface-2)); }
.ab-band--A { background: color-mix(in srgb, var(--sage) 17%, var(--surface)); }
.ab-band--B { background: var(--sage-soft); }
.ab-band--C { background: color-mix(in srgb, var(--gold) 8%, var(--surface-2)); }
.ab-band--D { background: color-mix(in srgb, var(--mut) 12%, var(--surface-2)); }
.ability-range {
  position: absolute; bottom: 6px; height: 8px; border-radius: 99px; z-index: 3;
  background: color-mix(in srgb, var(--wine) 26%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wine) 55%, transparent);
}
.ability-passline {
  position: absolute; top: -5px; bottom: -5px; width: 0; z-index: 4;
  border-left: 2px dashed var(--ink); transform: translateX(-1px);
}
.ability-dot {
  position: absolute; top: -7px; width: 15px; height: 15px; border-radius: 50%; z-index: 5;
  background: var(--ink); border: 2px solid var(--surface);
  box-shadow: 0 1px 4px rgba(22, 21, 26, .28); transform: translateX(-50%);
}
.ability-ticks { position: relative; height: 40px; margin-top: 3px; }
.ab-tick {
  position: absolute; top: 0; transform: translateX(-50%); text-align: center; white-space: nowrap;
  color: var(--ink-2); font-size: 10.5px; line-height: 1.3;
}
.ab-tick.is-row2 { top: 19px; }
.ab-tick i { display: block; width: 1px; height: 5px; margin: 0 auto 2px; background: var(--line-strong); }
.ab-tick em { display: block; font-family: var(--font-num); font-style: normal; font-size: 10.5px; }
.ab-tick small { display: block; margin-top: 1px; font-size: 9.5px; font-weight: 700; color: var(--wine); }
.ab-tick.is-pass em { color: var(--ink); font-weight: 700; }
.ability-ends {
  display: flex; justify-content: space-between; margin-top: -3px;
  font-family: var(--font-num); font-size: 10px; color: var(--ink-2);
}
.ability-legend {
  display: flex; flex-wrap: wrap; gap: 5px 16px; margin: 10px 0 0;
  font-size: 10.5px; line-height: 1.7; color: var(--ink-2);
}
.ability-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.ability-legend i { flex: none; display: inline-block; }
.lg-range {
  width: 22px; height: 8px; border-radius: 99px;
  background: color-mix(in srgb, var(--wine) 26%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wine) 55%, transparent);
}
.lg-pass { width: 0; height: 14px; border-left: 2px dashed var(--ink); }
.lg-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--ink); }
.ability-disclaimer {
  margin: 12px 0 0; padding: 9px 12px; border-left: 3px solid var(--gold);
  border-radius: 4px 8px 8px 4px; background: var(--sand-soft);
  color: var(--ink-2); font-size: 11px; line-height: 1.75;
}
/* 模擬試験の開始前に置く、結果画面の見本。 */
.mock-intro-figs {
  margin-top: 14px; padding: 14px 14px 4px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface);
}
.mock-intro-fig-head {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: baseline; gap: 3px 10px;
}
.mock-intro-fig-head b { font-size: 12.5px; color: var(--ink); }
.mock-intro-fig-head span { font-size: 10px; color: var(--mut); }
.mock-intro-fig-title {
  margin: 8px 0 0; font-size: 11px; font-weight: 700; color: var(--ink-2);
}
.mock-intro-figs .ability-fig { margin-top: 8px; }
.mock-intro-figs .grade-gauge { margin-top: 14px; }
.mock-intro-figs .mock-advice { margin-top: 12px; }
.mock-intro-figs .irt-details { margin-top: 10px; }
@media (max-width: 560px) {
  .mock-intro-figs { padding: 12px 11px 2px; }
  .mock-intro-figs .grade-facts { gap: 0 12px; }
}

.grade-gauge { margin-top: 20px; }
.gg-zones {
  display: flex; overflow: hidden; border-radius: 8px 8px 0 0;
  font-size: 9.5px; font-weight: 700; letter-spacing: .08em;
}
.gg-zone {
  flex: none; padding: 3px 0; text-align: center;
  border-right: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.gg-zone:last-child { border-right: 0; }
.gg-zone.is-pass { background: var(--sage-soft); color: var(--sage); }
.gg-zone.is-fail { background: color-mix(in srgb, var(--mut) 13%, var(--surface-2)); color: var(--mut); }
.gg-track { display: flex; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 0 0 10px 10px; }
.gg-seg {
  position: relative; flex: 1 1 0; min-width: 0; min-height: 64px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 8px 2px 6px; text-align: center; border-right: 1px solid var(--line);
  background: var(--surface);
}
.gg-seg:last-child { border-right: 0; }
.gg-seg.is-pass { background: var(--sage-soft); }
.gg-seg.is-fail { background: color-mix(in srgb, var(--mut) 7%, var(--surface)); }
.gg-seg b { font-family: var(--font-display); font-size: 20px; font-weight: 400; line-height: 1; color: var(--ink); }
.gg-seg small {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 9px; line-height: 1.4; color: var(--ink-2);
}
.gg-seg.is-current { background: var(--wine-soft); box-shadow: inset 0 0 0 2px var(--wine); }
.gg-now {
  display: inline-block; margin-top: 2px; padding: 0 6px; border-radius: 999px;
  background: var(--wine); color: #fff; font-size: 8.5px; font-weight: 700; line-height: 1.7; white-space: nowrap;
}
.grade-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; margin: 12px 0 0; }
.grade-facts > div { min-width: 0; padding: 8px 0; border-top: 1px solid var(--line); }
.grade-facts dt { margin: 0 0 1px; font-size: 10px; line-height: 1.5; color: var(--mut); }
.grade-facts dd { margin: 0; font-size: 12px; font-weight: 650; line-height: 1.7; color: var(--ink); }
.grade-facts dd b { font-family: var(--font-num); font-size: 13px; }
.grade-facts .is-wide { grid-column: 1 / -1; }

.mock-advice {
  margin-top: 16px; padding: 13px 15px; border: 1px solid var(--line);
  border-left: 4px solid var(--wine); border-radius: 10px; background: var(--wine-soft);
}
.mock-advice--below { border-left-color: var(--gold); background: var(--sand-soft); }
.mock-advice--above { border-left-color: var(--sage); background: var(--sage-soft); }
.mock-advice b { display: block; font-size: 12.5px; line-height: 1.6; color: var(--ink); }
.mock-advice p { margin: 3px 0 0; font-size: 11.5px; line-height: 1.8; color: var(--ink-2); }
.mock-advice small { display: block; margin-top: 6px; font-size: 10px; line-height: 1.7; color: var(--mut); }

.irt-details { margin-top: 14px; padding-top: 4px; border-top: 1px solid var(--line); }
.irt-details summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 0 4px; cursor: pointer; list-style: none;
  font-size: 12px; font-weight: 700; line-height: 1.6; color: var(--wine);
}
.irt-details summary::-webkit-details-marker { display: none; }
.irt-details summary::after { content: "＋"; flex: none; font-size: 15px; font-weight: 400; color: var(--wine); }
.irt-details[open] summary::after { content: "−"; }
.irt-details > .grade-scale-head { margin-top: 8px; }
.irt-details .result-stats { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); margin: 10px 0; }
.irt-compare { margin: 8px 0 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.irt-compare-flag {
  display: inline-block; margin: 0 0 10px; padding: 1px 8px; border-radius: 999px;
  background: var(--gold-soft); color: var(--gold); font-size: 9.5px; font-weight: 700; line-height: 1.7;
}
.irt-compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.irt-case { min-width: 0; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.irt-case-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 6px;
  margin-bottom: 8px; font-size: 11px;
}
.irt-case-head b { font-size: 12.5px; }
.irt-case-head span { flex: none; font-family: var(--font-num); font-size: 9.5px; color: var(--mut); }
.irt-tier { display: grid; grid-template-columns: 3.2em minmax(0, 1fr) 5.4em; align-items: center; gap: 6px; margin-top: 5px; }
.irt-tier-name { font-size: 10px; color: var(--mut); }
.irt-tier-bar { height: 8px; overflow: hidden; border-radius: 99px; background: var(--surface-3); }
.irt-tier-bar i { display: block; height: 100%; border-radius: 99px; background: var(--wine); }
.irt-tier-n { text-align: right; white-space: nowrap; font-family: var(--font-num); font-size: 9.5px; color: var(--ink-2); }
.irt-case-note { margin-top: 8px; font-size: 10px; line-height: 1.6; color: var(--mut); }
.irt-case-result { margin-top: 4px; font-size: 11px; font-weight: 700; line-height: 1.6; }
.irt-case-result.is-high { color: var(--wine); }
.irt-case-result.is-low { color: var(--ink-2); }
.irt-compare-note { margin: 10px 0 0; font-size: 10.5px; line-height: 1.85; color: var(--ink-2); }
.irt-defs { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 5px 12px; margin: 10px 0 0; }
.irt-defs dt { font-size: 11px; font-weight: 700; line-height: 1.7; color: var(--ink); }
.irt-defs dd { margin: 0; font-size: 11px; line-height: 1.8; color: var(--ink-2); }

@media (max-width: 560px) {
  .irt-panel { padding: 18px 15px; }
  .ability-track { height: 56px; }
  .ab-band b { font-size: 16px; }
  .ab-band small { font-size: 8px; }
  /* スマホではB帯が約41pxしかなく「合格ライン」が省略記号だらけになるため、
     説明文は下のA〜Dゲージに任せ、スケール上は区分名だけにする。 */
  .ab-band--B small { display: none; }
  .ab-tick { font-size: 10px; }
  .ab-tick em { font-size: 10px; }
  .ab-tick small { font-size: 9px; }
  .ability-legend { gap: 4px 12px; font-size: 10px; }
  .gg-seg { min-height: 60px; }
  .gg-seg small { font-size: 8px; }
  .grade-facts { gap: 0 14px; }
  .grade-facts dd { font-size: 11.5px; }
  .irt-compare-grid { grid-template-columns: 1fr; }
  .irt-defs { grid-template-columns: 1fr; gap: 0; }
  .irt-defs dt { margin-top: 6px; }
  .irt-defs dd { margin-bottom: 4px; }
}

.review-list { display: grid; gap: 8px; }
.review-item { border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; font-size: 12.5px; line-height: 1.7; }
.review-item.ok { border-left: 3px solid var(--sage); }
.review-item.ng { border-left: 3px solid var(--danger); }
.review-item .meta { color: var(--mut); font-size: 11px; }
.review-item details summary { cursor: pointer; color: var(--wine); font-size: 11.5px; margin-top: 4px; }
.review-item details p { margin: 6px 0 0; color: var(--ink-2); font-size: 12.5px; }

/* ---------- drills / cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 1000px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .card-grid { grid-template-columns: 1fr; } }
.drill-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); }
.drill-card h3 { font-family: var(--font-body); font-size: 13.5px; font-weight: 700; line-height: 1.5; }
.drill-card p { font-size: 11.5px; color: var(--mut); margin: 0; line-height: 1.7; flex: 1; }
.drill-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--mut); }
.mini-bar { height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; flex: 1; }
.mini-bar i { display: block; height: 100%; border-radius: 99px; background: var(--sage); }
.drill-card .button { width: 100%; padding: 9px 14px; font-size: 12.5px; }

/* ---------- mock ---------- */
.mock-run { max-width: 1120px; margin: 0 auto; }
.mock-bar { position: sticky; top: 66px; z-index: 20; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.mock-timer { font-family: var(--font-num); font-size: 20px; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; color: var(--wine); }
.mock-timer.low { color: var(--danger); }
.mock-progress { flex: 1; min-width: 120px; height: 5px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.mock-progress i { display: block; height: 100%; background: var(--wine); border-radius: 99px; }
.mock-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
@media (max-width: 980px) { .mock-layout { grid-template-columns: 1fr; } .mock-bar { top: 60px; } }
.palette-panel { position: sticky; top: 150px; max-height: calc(100dvh - 172px); overflow-y: auto; }
.palette-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.palette-grid button {
  aspect-ratio: 1; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font-family: var(--font-num); font-size: 10.5px; font-weight: 600; cursor: pointer; padding: 0;
}
.palette-grid button.done { background: var(--sage-soft); border-color: color-mix(in srgb, var(--sage) 40%, transparent); color: var(--sage); }
.palette-grid button.marked { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); }
.palette-grid button.now { outline: 2px solid var(--wine); outline-offset: 1px; }
.palette-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 10.5px; color: var(--mut); margin-top: 10px; }
.palette-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.mock-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.mock-actions .button { padding: 9px 15px; font-size: 12.5px; }

/* 過去の模擬試験の一覧・振り返り */
.mock-hist-list { display: grid; max-height: 340px; overflow-y: auto; scrollbar-width: thin; }
.mock-hist-row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px;
  padding: 10px 20px 10px 4px; border-bottom: 1px solid var(--line); border-radius: 8px;
  text-decoration: none; color: inherit; position: relative;
}
.mock-hist-row:last-child { border-bottom: 0; }
.mock-hist-row:hover { background: var(--surface-2); }
.mock-hist-row .mh-top { grid-column: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.mock-hist-row .mh-top b { font-weight: 650; }
.mock-hist-row .mh-score { grid-column: 2; grid-row: 1; font-family: var(--font-num); font-size: 12px; font-weight: 700; color: var(--ink-2); text-align: right; white-space: nowrap; }
.mock-hist-row .mh-bar { grid-column: 1 / -1; height: 4px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.mock-hist-row .mh-bar i { display: block; height: 100%; border-radius: 99px; background: var(--sage); }
.mock-hist-row .mh-sub { grid-column: 1 / -1; font-size: 11px; color: var(--mut); }
.mock-hist-row .mh-arrow { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); color: var(--mut); display: flex; }

.review-q { font-weight: 650; margin: 3px 0 6px; }
.review-answer-line { font-size: 12px; margin-bottom: 6px; }
.review-answer-line .ans-ok { color: var(--sage); font-weight: 650; }
.review-answer-line .ans-ng { color: var(--danger); font-weight: 650; }
.review-verdict { display: inline-block; font-size: 9.5px; font-weight: 700; padding: 1px 7px; border-radius: 99px; margin-left: 4px; vertical-align: 1px; }
.review-verdict.is-ok { background: var(--sage-soft); color: var(--sage); }
.review-verdict.is-ng { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }
.review-choices { list-style: none; margin: 4px 0 2px; padding: 0; display: grid; gap: 4px; }
.review-choice { display: flex; align-items: flex-start; gap: 8px; padding: 5px 9px 5px 30px; position: relative; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; line-height: 1.6; }
.review-choice::before { content: attr(data-key); position: absolute; left: 9px; top: 5px; font-family: var(--font-num); font-size: 10.5px; font-weight: 700; color: var(--mut); }
.review-choice .rc-text { flex: 1; }
.review-choice.is-correct { border-color: color-mix(in srgb, var(--sage) 50%, var(--line)); background: var(--sage-soft); }
.review-choice.is-wrong { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.review-choice .rc-tag { flex: none; font-size: 9.5px; font-weight: 700; border-radius: 99px; padding: 1px 6px; align-self: center; }
.rc-tag--ok { background: var(--sage); color: #fff; }
.rc-tag--mine { background: var(--danger); color: #fff; }
.review-expl { margin-top: 6px; }
.review-expl summary { cursor: pointer; color: var(--wine); font-size: 11.5px; }
.review-expl .explain { margin-top: 6px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th { text-align: left; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); font-weight: 650; padding: 0 10px 10px; white-space: nowrap; }
.data-table td { padding: 11px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table .num { font-family: var(--font-num); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.bar { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; min-width: 70px; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--wine); }
.bar i.gold { background: var(--gold); }
.bar i.sage { background: var(--sage); }
.bar i.low { background: var(--danger); }
.table-note { font-size: 11px; color: var(--mut); margin-top: 12px; }

/* ---------- history ---------- */
.history-item { display: flex; align-items: flex-start; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; line-height: 1.7; }
.history-item:last-child { border-bottom: 0; }
.history-item .when { margin-left: auto; flex: none; font-size: 10.5px; color: var(--mut); white-space: nowrap; }
.hi-review { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 11.5px; font-weight: 650; color: var(--wine); text-decoration: none; }
.hi-review:hover { text-decoration: underline; }
.hi-review svg { flex: none; }
.filter-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }

/* ---------- settings ---------- */
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row .s-copy b { display: block; font-size: 13.5px; font-weight: 650; }
.setting-row .s-copy span { font-size: 11.5px; color: var(--mut); }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track { position: absolute; inset: 0; background: var(--surface-3); border-radius: 99px; transition: background .18s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s var(--ease); }
.switch input:checked + .track { background: var(--wine); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- toast ---------- */
.toast-root { position: fixed; right: 18px; bottom: 18px; z-index: 150; display: grid; gap: 8px; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 340px;
  background: var(--ink); color: var(--bg); border-radius: 12px; padding: 11px 15px; font-size: 12.5px; font-weight: 600;
  box-shadow: var(--shadow-md); animation: toastIn .25s var(--ease);
}
.toast svg { color: var(--gold); flex: none; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .toast-root { left: 14px; right: 14px; bottom: 82px; } .toast { max-width: none; } }

/* ---------- command palette ---------- */
.cmdk[hidden] { display: none; }
.cmdk { position: fixed; inset: 0; z-index: 140; display: grid; place-items: start center; padding: 12vh 18px 18px; }
.cmdk-backdrop { position: absolute; inset: 0; background: rgba(12,6,8,.5); backdrop-filter: blur(4px); }
.cmdk-panel { position: relative; width: min(100%, 560px); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.cmdk-input-wrap { display: flex; align-items: center; gap: 10px; padding: 13px 15px; border-bottom: 1px solid var(--line); color: var(--mut); }
.cmdk-input-wrap input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 14.5px; color: var(--ink); outline: none; }
.cmdk-results { max-height: 52vh; overflow-y: auto; padding: 7px; }
.cmdk-group { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--mut); padding: 9px 10px 5px; font-weight: 700; }
.cmdk-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 11px; border: 0; background: none; border-radius: 9px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.cmdk-item small { margin-left: auto; color: var(--mut); font-size: 10.5px; }
.cmdk-item.is-active, .cmdk-item:hover { background: var(--surface-2); color: var(--ink); }
.cmdk-item svg { color: var(--mut); flex: none; }

/* ---------- tabbar (mobile) ---------- */
.tabbar { display: none; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .rail {
    position: fixed; left: 0; top: 0; width: 268px; transform: translateX(-102%);
    transition: transform .28s var(--ease); box-shadow: var(--shadow-lg);
  }
  .app.rail-open .rail { transform: none; }
  .rail-toggle { display: grid; }
  .search-button span, .search-button kbd { display: none; }
  .search-button { width: 38px; padding: 0; justify-content: center; }
  .app-bar { height: 58px; }
  .app-view { padding-bottom: 104px; }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid;
    grid-template-columns: repeat(5, 1fr); align-items: end;
    background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(16px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 10px; font-size: 9.5px; font-weight: 650; color: var(--mut); }
  .tabbar a.is-active { color: var(--wine); }
  .tabbar a.is-active svg { stroke-width: 2; }
  .tabbar .tab-badge { position: absolute; transform: translate(14px, -8px); min-width: 14px; height: 14px; border-radius: 99px; background: var(--gold); color: #191a20; font-size: 8.5px; display: grid; place-items: center; padding: 0 3px; }
  .tabbar a { position: relative; }
}
@media (min-width: 861px) { .tabbar { display: none; } }

/* ---------- skeleton ---------- */
.boot-skeleton { display: grid; gap: 16px; padding-top: 10px; }
.sk { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 10px; }
.sk-title { width: 240px; height: 34px; }
.sk-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sk-card { height: 112px; border-radius: 18px; }
.sk-panel { height: 320px; border-radius: 20px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- empty state ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--mut); }
.empty .empty-ic { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: var(--surface-2); color: var(--wine); }
.empty h3 { font-family: var(--font-body); font-size: 14px; color: var(--ink); margin-bottom: 6px; }
.empty p { font-size: 12.5px; margin: 0 auto; max-width: 30em; }

/* ---------- misc ---------- */
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.stack-8 { display: grid; gap: 8px; }
.stack-14 { display: grid; gap: 14px; }
.mono { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.tooltip { position: relative; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 160; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(14, 6, 9, .56); backdrop-filter: blur(4px); animation: fadeIn .18s ease; }
.modal-card {
  position: relative; width: min(100%, 440px); background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow-lg);
  animation: modalIn .22s var(--ease);
}
.modal-card h2 { font-family: var(--font-body); font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.modal-card p { font-size: 13px; line-height: 1.85; color: var(--mut); margin: 0 0 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; }
.modal-actions .button { padding: 9px 17px; font-size: 13px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- figures ---------- */
/* 見せ場の数字は Cormorant Garamond。小さな数値は本文フォントで読みやすく。 */
.stat-card .stat-value, .ring-center b, .score-ring .score-center b, .result-stats b,
.paywall .price { font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.01em; }
.chapter-score, .quiz-count, .choice .key, .mock-timer, .palette-grid button,
.data-table .num, .mono { font-family: var(--font-body); }
.quiz-count, .chapter-score, .mock-timer, .data-table .num, .mono { font-variant-numeric: tabular-nums; }

/* ---------- motion preference ---------- */
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after {
  animation-duration: .001ms !important; animation-iteration-count: 1 !important;
  transition-duration: .001ms !important; scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body.app-page { background: var(--bg); }
body.app-page .skip-link { z-index: 170; }

/* ==========================================================================
   可読性の調整（2026-11-17）
   演習の本文は十分な大きさだが、ダッシュボード・成績・図解の補助情報が
   9〜13px台に集中していたため、全体を約1px引き上げる。
   トップページ側の図解（.exam-preview）に影響しないよう .app 配下に限定。
   ========================================================================== */

.app .rail-link { font-size: 14.5px; }
.app .rail-badge { font-size: 11px; }
.app .rail-user-text b { font-size: 13px; }
.app .rail-user-text small { font-size: 11.5px; }
.app .app-bar-title { font-size: 15.5px; }
.app .search-button { font-size: 13.5px; }
.app .plan-pill { font-size: 12.5px; }
.app .view-head p { font-size: 14.5px; }
.app .eyebrow-sm { font-size: 11.5px; }
.app .panel-head h2 { font-size: 16px; }
.app .irt-panel .panel-head h2 { font-size: 1.1rem; }
.app .panel-head .mut { font-size: 13px; }
.app .panel-link { font-size: 13.5px; }
.app .dash-top .sub { font-size: 14.5px; }
.app .streak-chip { font-size: 13px; }
.app .stat-card .stat-label { font-size: 12px; }
.app .stat-card .stat-sub { font-size: 12.5px; }
.app .goal-copy h3 { font-size: 15px; }
.app .goal-copy p { font-size: 13.5px; }
.app .chapter-name { font-size: 14px; }
.app .chapter-score { font-size: 13.5px; }
.app .chart text { font-size: 10.5px; }
.app .heat-legend { font-size: 11.5px; }
.app .recent-item { font-size: 13.5px; }
.app .recent-item .mut { font-size: 12px; }
.app .paywall p { font-size: 14.5px; }
.app .seg button, .app .seg label { font-size: 13.5px; }
.app .pick-chip { font-size: 13px; }
.app .pick-chip small { font-size: 11px; }
.app .field-label { font-size: 13px; }
.app .chapter-tile .ct-mark { font-size: 11.5px; }
.app .chapter-tile b { font-size: 13.5px; }
.app .chapter-tile small { font-size: 11.5px; }
.app .ph-kicker { font-size: 11.5px; }
.app .ph-body > p { font-size: 13.5px; }
.app .ph-facts b small { font-size: 11px; }
.app .ph-facts span { font-size: 11.5px; }
.app .mc-copy b { font-size: 14px; }
.app .mc-copy small { font-size: 11.5px; }
.app .fl-note { font-size: 11.5px; }
.app .dm-title b { font-size: 14px; }
.app .dm-title small { font-size: 11.5px; }
.app .dm-pct { font-size: 14px; }
.app .dm-pct small { font-size: 10.5px; }
.app .cat-title { font-size: 13.5px; }
.app .cat-title small { font-size: 11px; }
.app .cat-state b { font-size: 13px; }
.app .cat-state b small { font-size: 10px; }
.app .cat-state > small { font-size: 10.5px; }
.app .sc-label { font-size: 11.5px; }
.app .sc-value { font-size: 16px; }
.app .sc-chip { font-size: 12px; }
.app .dp-top b { font-size: 13.5px; }
.app .dp-top span { font-size: 14px; }
.app .dp-sub { font-size: 11.5px; }
.app .quiz-count { font-size: 13.5px; }
.app .quiz-quit { font-size: 13px; }
.app .chip { font-size: 11.5px; }
.app .choice { font-size: 15.5px; }
.app .choice .key { font-size: 12px; }
.app .text-answer input { font-size: 16px; }
.app .quiz-hint { font-size: 12.5px; }
.app .quiz-hint kbd { font-size: 11px; }
.app .answer-banner { font-size: 15px; }
.app .explain-point { font-size: 14.5px; }
.app .explain li { font-size: 14.5px; }
.app .result-hero .lead { font-size: 14.5px; }
.app .result-stats span { font-size: 11.5px; }
.app .review-item { font-size: 13.5px; }
.app .review-item .meta { font-size: 12px; }
.app .review-item details summary { font-size: 12.5px; }
.app .review-item details p { font-size: 13.5px; }
.app .review-answer-line { font-size: 13px; }
.app .review-verdict { font-size: 10.5px; }
.app .review-choice { font-size: 13px; }
.app .review-choice::before { font-size: 11.5px; }
.app .drill-card h3 { font-size: 14.5px; }
.app .drill-card p { font-size: 12.5px; }
.app .drill-meta { font-size: 12px; }
.app .drill-card .button { font-size: 13.5px; }
.app .palette-grid button { font-size: 11.5px; }
.app .palette-legend { font-size: 11.5px; }
.app .mock-actions .button { font-size: 13.5px; }
.app .mock-hist-row .mh-top { font-size: 13.5px; }
.app .mock-hist-row .mh-score { font-size: 13px; }
.app .mock-hist-row .mh-sub { font-size: 12px; }
.app .modal-card p { font-size: 14px; }
.app .review-choice .rc-tag { font-size: 10.5px; }
.app .review-expl summary { font-size: 12.5px; }
.app .data-table { font-size: 13.5px; }
.app .data-table th { font-size: 11.5px; }
.app .table-note { font-size: 12px; }
.app .history-item { font-size: 13.5px; }
.app .history-item .when { font-size: 11.5px; }
.app .hi-review { font-size: 12.5px; }
.app .setting-row .s-copy b { font-size: 14.5px; }
.app .setting-row .s-copy span { font-size: 12.5px; }
.app .toast { font-size: 13.5px; }
.app .cmdk-input-wrap input { font-size: 15.5px; }
.app .cmdk-group { font-size: 11px; }
.app .cmdk-item { font-size: 14px; }
.app .cmdk-item small { font-size: 11.5px; }
.app .tabbar a { font-size: 10.5px; }
.app .tabbar .tab-badge { font-size: 9.5px; }
.app .empty h3 { font-size: 15px; }
.app .empty p { font-size: 13.5px; }

.app .ability-hero-label { font-size: 11.5px; }
.app .ability-hero-main b small { font-size: 11px; }
.app .ability-hero-gap > span:first-child { font-size: 12px; }
.app .ability-hero-grade { font-size: 11.5px; }
.app .ability-hero-prob { font-size: 11.5px; }
.app .ability-callout { font-size: 11.5px; }
.app .ability-callout b { font-size: 13.5px; }
.app .ab-band b { font-size: 20px; }
.app .ab-band small { font-size: 10px; }
.app .ab-band.is-tiny b { font-size: 12px; }
.app .ab-tick { font-size: 11.5px; }
.app .ab-tick em { font-size: 11.5px; }
.app .ab-tick small { font-size: 10.5px; }
.app .ability-ends { font-size: 11px; }
.app .ability-legend { font-size: 11.5px; }
.app .ability-disclaimer { font-size: 12px; }
.app .mock-intro-fig-head b { font-size: 13.5px; }
.app .mock-intro-fig-head span { font-size: 11px; }
.app .mock-intro-fig-title { font-size: 12px; }
.app .gg-zones { font-size: 10.5px; }
.app .gg-seg b { font-size: 21px; }
.app .gg-seg small { font-size: 10px; }
.app .gg-now { font-size: 9.5px; }
.app .grade-facts dt { font-size: 11px; }
.app .grade-facts dd { font-size: 13px; }
.app .grade-facts dd b { font-size: 14px; }
.app .mock-advice b { font-size: 13.5px; }
.app .mock-advice p { font-size: 12.5px; }
.app .mock-advice small { font-size: 11px; }
.app .irt-details summary { font-size: 13px; }
.app .irt-compare-flag { font-size: 10.5px; }
.app .irt-case-head { font-size: 12px; }
.app .irt-case-head b { font-size: 13.5px; }
.app .irt-case-head span { font-size: 10.5px; }
.app .irt-tier-name { font-size: 11px; }
.app .irt-tier-n { font-size: 10.5px; }
.app .irt-case-note { font-size: 11px; }
.app .irt-case-result { font-size: 12px; }
.app .irt-compare-note { font-size: 11.5px; }
.app .irt-defs dt,
.app .irt-defs dd { font-size: 12px; }

@media (max-width: 560px) {
  .app .ab-band b { font-size: 17px; }
  .app .ab-band small { font-size: 9px; }
  .app .ab-tick { font-size: 11px; }
  .app .ab-tick em { font-size: 11px; }
  .app .ab-tick small { font-size: 10px; }
  .app .ability-callout { font-size: 11px; }
  .app .ability-legend { font-size: 10.5px; }
  .app .gg-seg small { font-size: 9px; }
  .app .grade-facts dd { font-size: 12.5px; }
}

