/* ============================================================
   exam-style.css — Shared styles for the 入試情報 (exam-data) section
   ------------------------------------------------------------
   Depends on shared/course-style.css (tokens, .section, .section-head,
   .eyebrow, .page-hero padding-top, .btn) and shared/site-style.css
   (header/footer). Link both before this file.
   ============================================================ */

/* ============================================================
   breadcrumb
   ============================================================ */
.breadcrumb {
  padding: calc(var(--header-h) + 20px) var(--pad-x) 0;
  max-width: var(--max);
  margin: 0 auto;
  font-size: 12px;
  color: var(--muted-soft);
  letter-spacing: .02em;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.breadcrumb a { color: var(--muted-soft); transition: color .15s; }
.breadcrumb a:hover { color: var(--fg); }
.breadcrumb .sep { color: var(--faint); font-size: 10px; }
.breadcrumb .current { color: var(--fg); font-weight: 500; }

/* .page-hero already adds header clearance by default (shared/site-style.css);
   when a breadcrumb precedes it, that clearance already happened, so only
   a small visual gap is needed here to avoid doubling the offset. */
.breadcrumb + .page-hero { padding-top: 8px; }

/* ============================================================
   exam-data page hero heading
   ============================================================ */
.info-page-hero .exam-data-title {
  line-height: 1.25;
}
.exam-data-title__identity,
.exam-data-title__type {
  display: block;
}
.exam-data-title__type {
  margin-top: .2em;
}
.exam-data-title__faculty {
  color: var(--accent);
}
@media (max-width: 540px) {
  .info-page-hero .exam-data-title__identity {
    font-size: 26px;
    white-space: nowrap;
  }
}

/* ============================================================
   table of contents (exam detail pages)
   ============================================================ */
.exam-toc {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px var(--pad-x) 0;
}
.exam-toc-label {
  display: block;
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 14px;
}
.exam-toc-list {
  list-style: none;
  counter-reset: toc;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  padding: 4px 24px;
}
.exam-toc-list li {
  border-bottom: 1px solid var(--border);
}
.exam-toc-list li:nth-last-child(-n+2) {
  border-bottom: none;
}
.exam-toc-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  transition: color .2s;
}
.exam-toc-list a:hover {
  color: var(--accent-deep);
}
.exam-toc-list a .num {
  flex-shrink: 0;
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-deep);
}
@media (max-width: 640px) {
  .exam-toc-list { grid-template-columns: 1fr; padding: 4px 20px; }
  .exam-toc-list li:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
  .exam-toc-list li:last-child { border-bottom: none; }
}
/* offset anchored sections so the floating header never covers the heading */
#overview, #requirements, #schedule, #step1, #step2, #step3, #results, #course {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* ============================================================
   info grid (募集概要)
   ============================================================ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--border);
  margin-bottom: 28px;
}
.info-item .info-label {
  font-size: 11px;
  font-family: var(--font-en);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent-deep);
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}
.info-item .info-value {
  font-size: 15px;
  color: var(--fg);
  font-weight: 500;
  line-height: 1.65;
}

/* ============================================================
   schedule table (選考プロセスと日程) — grouped by category
   ============================================================ */
.exam-table .exam-schedule-cat {
  font-family: var(--font-jp);
  font-weight: 700;
  color: var(--accent-deep);
  background: var(--accent-soft);
  vertical-align: middle;
  white-space: nowrap;
}
.exam-table tbody tr.exam-schedule-group-start td {
  border-top: 2px solid var(--border-strong);
}
.exam-table tbody tr.exam-schedule-group-start:first-child td {
  border-top: none;
}
/* tables with few enough columns to shrink and fit the viewport instead of
   inheriting the wider data tables' min-width, so they never need to scroll.
   (every selector combines .exam-table + .exam-table-fit so it reliably
   outweighs the plain .exam-table rules below, regardless of source order) */
.exam-table.exam-table-fit { min-width: 0; table-layout: auto; }
.exam-table.exam-table-fit th,
.exam-table.exam-table-fit td { padding: 14px 10px; }
.exam-table.exam-table-fit .faculty { min-width: 0; }
@media (max-width: 480px) {
  .exam-table.exam-table-fit { font-size: 11.5px; }
  .exam-table.exam-table-fit thead th { white-space: normal; }
  .exam-table.exam-table-fit th,
  .exam-table.exam-table-fit td { padding: 9px 4px; }
  .exam-table.exam-table-fit .exam-schedule-cat { padding: 9px 5px; }
  .exam-table.exam-table-fit:has(.exam-selection-stage) th:first-child,
  .exam-table.exam-table-fit .exam-selection-stage { width: 68px; }
  /* drop a lower-priority column (e.g. 目標時間) so the remaining
     columns can fit the phone width without a horizontal scrollbar */
  .exam-table.exam-table-fit .mobile-hide { display: none; }
}

/* ============================================================
   data table (試験科目と配点 / 過去の入試結果)
   ============================================================ */
.exam-table-wrap {
  border: 1px solid var(--border);
  overflow: hidden;
  background: #fff;
  overflow-x: auto;
  min-width: 0;
  max-width: 100%;
}
.exam-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.exam-table thead th {
  background: var(--accent-tint);
  text-align: left;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .05em;
  color: var(--fg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.exam-table thead th.center { text-align: center; }
.exam-table tbody td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  vertical-align: middle;
  line-height: 1.55;
}
.exam-table tbody td.center { text-align: center; }
.exam-table tbody tr:last-child td { border-bottom: none; }
.exam-table tbody tr:hover { background: var(--accent-soft); }
.exam-table .faculty { font-weight: 600; min-width: 180px; }
.exam-table .num { font-family: var(--font-en); font-weight: 600; color: var(--accent-deep); }
.exam-table .na { color: var(--faint); }
.exam-table tr.is-total td { background: var(--bg-soft); font-weight: 700; }
.exam-table tr.is-total:hover td { background: var(--bg-soft); }
.exam-table-label-mobile { display: none; }

/* year label above a stacked series of tables (2次選考 過去問 / 過去の入試結果) */
.exam-year-label {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
  margin: 32px 0 12px;
}
.exam-year-label:first-of-type { margin-top: 0; }
.exam-year-note {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--muted-soft);
  line-height: 1.7;
}

/* generic placeholder note (準備中 content) */
.exam-placeholder {
  padding: 24px 28px;
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.9;
}

/* body copy paragraphs quoted/adapted from the official admission guidelines */
.exam-body-text {
  font-size: 14.5px;
  line-height: 2;
  color: var(--fg);
  max-width: 74ch;
  margin-bottom: 16px;
}
.exam-body-text:last-of-type { margin-bottom: 28px; }

/* 出願資格 — boxed cards instead of a bullet list */
.exam-req-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.exam-req-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.exam-req-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 14px;
}
.exam-req-card h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
}
.exam-req-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.85;
}
@media (max-width: 760px) {
  .exam-req-grid { grid-template-columns: 1fr; }
}

/* SOLA's own commentary — kept visually distinct from official facts */
.exam-point {
  margin-top: 20px;
  padding: 22px 26px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-tint);
  border-radius: var(--radius-lg);
}
.exam-point-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 12px;
}
.exam-point-label::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--accent-deep);
}
.exam-point p {
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--fg);
}
.exam-point p + p {
  margin-top: 10px;
}

/* ============================================================
   year switcher (過去の入試結果) — one table visible at a time,
   picked from a vertical dropdown list (no left-right scrolling)
   ============================================================ */
.exam-year-select {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}
.exam-year-select-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 160px;
  padding: 12px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: #fff;
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
  cursor: pointer;
  transition: border-color .2s;
}
.exam-year-select-trigger:hover { border-color: var(--accent); }
.exam-year-select-current { flex: 1; text-align: left; }
.exam-year-select-trigger .caret {
  flex-shrink: 0;
  width: 11px;
  height: 7px;
  color: var(--muted);
  transition: transform .2s;
}
.exam-year-select-trigger .caret path { stroke: currentColor; }
.exam-year-select[data-open="true"] .exam-year-select-trigger .caret { transform: rotate(180deg); }
.exam-year-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  max-height: 320px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15,27,54,.14);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .18s, transform .18s, visibility .18s;
  z-index: 20;
}
.exam-year-select[data-open="true"] .exam-year-select-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.exam-year-select-option {
  text-align: left;
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  background: none;
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.exam-year-select-option:hover { background: var(--accent-soft); color: var(--accent-deep); }
.exam-year-select-option.is-active { background: var(--fg); color: #fff; }

.exam-year-panel { display: none; }
.exam-year-panel.is-active { display: block; }

.exam-table-notes {
  margin-top: 16px;
  padding: 16px 20px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.85;
}
.exam-table-notes ul { padding-left: 18px; }
.exam-table-notes li { margin-bottom: 4px; }

/* ============================================================
   document list (出願書類)
   ============================================================ */
.doc-list {
  display: flex; flex-direction: column; gap: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.doc-item {
  display: flex; gap: 20px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.doc-item:last-child { border-bottom: none; }
.doc-num {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-family: var(--font-en);
  font-size: 13px; font-weight: 700;
  display: grid; place-items: center;
}
.doc-name { font-size: 15px; color: var(--fg); font-weight: 500; }

.report-structure {
  margin-top: 24px;
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.report-structure h3 {
  font-family: var(--font-heading);
  font-size: 15px; font-weight: 700;
  margin-bottom: 8px;
}
.report-structure .lead-mini {
  font-size: 14px; color: var(--muted);
  margin-bottom: 16px; line-height: 1.8;
}
.report-structure ol { list-style: none; counter-reset: item; }
.report-structure ol li {
  counter-increment: item;
  position: relative;
  padding: 10px 0 10px 36px;
  font-size: 14.5px;
  color: var(--fg);
  border-bottom: 1px dashed var(--border);
  line-height: 1.65;
}
.report-structure ol li:last-child { border-bottom: none; }
.report-structure ol li::before {
  content: counter(item, decimal-leading-zero);
  position: absolute; left: 0; top: 10px;
  font-family: var(--font-en);
  font-size: 11px; font-weight: 700;
  color: var(--accent-deep);
  letter-spacing: .04em;
}

/* ============================================================
   official links / sources
   ============================================================ */
.exam-disclaimer {
  padding: 16px 20px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.9;
}
.exam-disclaimer strong { color: var(--fg); font-weight: 600; }
.exam-source-summary {
  margin-top: 24px;
}
.exam-source-summary h2 {
  margin: 0 0 8px;
  color: var(--fg);
  font-size: 15px;
  font-weight: 700;
}
.exam-source-summary ul {
  margin: 0;
  padding-left: 1.3em;
}
.exam-source-summary li + li {
  margin-top: 6px;
}

/* ============================================================
   related course CTA (restrained card, no gradient)
   ============================================================ */
.exam-course-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(20px, 3vw, 40px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 3.5vw, 40px);
}
.exam-course-cta-eyebrow {
  font-family: var(--font-en);
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent-deep); font-weight: 600;
  margin-bottom: 10px;
}
.exam-course-cta h2,
.exam-course-cta h3 {
  font-family: var(--font-heading);
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 700; line-height: 1.55;
  margin-bottom: 8px;
}
.exam-course-cta p { font-size: 14.5px; color: var(--muted); line-height: 1.85; max-width: 52ch; }
.exam-course-cta .btn { flex-shrink: 0; }
@media (max-width: 720px) {
  .exam-course-cta { flex-direction: column; align-items: flex-start; }
  .exam-course-cta .btn { align-self: stretch; justify-content: center; }
}

.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 8px;
  font-size: 14px; font-weight: 500;
  color: var(--accent-deep);
  transition: gap .2s;
}
.back-link:hover { gap: 12px; }

/* ============================================================
   score-adjustment tool
   ============================================================ */
.page-score-adjustment {
  --accent: var(--crimson);
  --accent-deep: var(--crimson);
  --accent-tint: var(--crimson-tint);
  --accent-rgb: 140, 35, 50;
  --accent-soft: var(--crimson-soft);
}
.score-adjustment-shell { max-width: 980px; min-width: 0; }
.score-adjustment-shell > * { min-width: 0; }
.score-adjustment-overview { display: grid; gap: 28px; }
.score-adjustment-intro { margin: 0; }
.score-adjustment-intro h2 { margin-bottom: 9px; font-family: var(--font-heading); font-size: clamp(22px, 3vw, 30px); font-weight: 600; }
.score-adjustment-intro > p { max-width: 74ch; color: var(--muted); line-height: 1.8; }
.score-adjustment-guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 24px 0 18px; padding: 0; border-block: 1px solid var(--border); list-style: none; }
.score-adjustment-guide li { display: grid; grid-template-columns: auto 1fr; column-gap: 11px; align-items: center; padding: 18px 20px; }
.score-adjustment-guide li + li { border-left: 1px solid var(--border); }
.score-adjustment-guide span { grid-row: 1 / 3; font-family: var(--font-en); color: var(--crimson); font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.score-adjustment-guide strong { font-size: 14px; font-weight: 600; }
.score-adjustment-guide small { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.score-adjustment-intro .score-adjustment-caution { max-width: none; margin: 0; padding: 13px 16px; border-radius: var(--radius); background: var(--bg-soft); color: var(--fg); font-size: 12.5px; line-height: 1.7; }
.score-adjustment-card { background: transparent; border: 0; border-radius: 0; padding: 0; margin-block: 0; min-width: 0; }
.score-adjustment-context { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 14px; margin-bottom: 18px; }
.score-adjustment-context select:disabled { opacity: 1; color: var(--fg); background: var(--bg-soft); cursor: default; }
.score-adjustment-controls { display: grid; grid-template-columns: minmax(0, 220px); gap: 16px; }
.score-adjustment-status { margin: 16px 0 0; color: var(--muted); font-size: 13px; }
.score-input-list { display: grid; gap: 10px; }
.score-input-row { display: grid; grid-template-columns: minmax(110px, .9fr) minmax(160px, 1.5fr) minmax(110px, .9fr) minmax(130px, 1fr) minmax(110px, .85fr); align-items: center; gap: 14px; padding: 15px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.score-input-row.is-unselected { background: var(--bg-soft); opacity: .7; }
.score-input-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.score-subject-toggle { width: 16px; height: 16px; accent-color: var(--accent); }
.score-input-meta, .score-input-points { color: var(--muted); font-size: 12.5px; }
.score-input-type { width: 100%; min-width: 0; padding: 9px 7px; border: 1px solid var(--border-strong); border-radius: 7px; background: #fff; font: inherit; font-size: 12px; }
.score-input-field { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.score-input-field input { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--border-strong); border-radius: 7px; font: inherit; text-align: right; }
.score-input-field input:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 1px; border-color: var(--accent); }
.score-result-area { min-height: 60px; }
.score-result-empty { margin: 0; padding: 18px; border-radius: var(--radius); background: var(--bg-soft); color: var(--muted); text-align: center; }
.score-result-partial { margin: 0 0 14px; padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--bg-soft); color: var(--fg); font-size: 13px; line-height: 1.7; }
.score-total-summary { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; margin-bottom: 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.score-total-summary > div { padding: 18px 20px; background: var(--card); }
.score-total-summary > div + div { border-left: 1px solid var(--border); }
.score-total-summary span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.score-total-summary strong { display: block; font-family: var(--font-en); font-size: 27px; line-height: 1.1; }
.score-total-summary strong small { font-family: var(--font-jp); font-size: 13px; }
.score-total-summary p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.score-total-summary .is-positive { color: #16803b; }
.score-total-summary .is-negative { color: #b42318; }
.score-rank { display: inline-flex; align-items: center; justify-content: center; min-width: 29px; height: 29px; border-radius: 50%; font-family: var(--font-en); font-weight: 700; }
.score-total-rank strong { font-size: 30px; color: var(--score-rank-color, var(--fg)); }
.score-total-rank--s { --score-rank-color: #6d28d9; }
.score-total-rank--a { --score-rank-color: #0369a1; }
.score-total-rank--b { --score-rank-color: #167547; }
.score-total-rank--c { --score-rank-color: #a15c00; }
.score-total-rank--d { --score-rank-color: #9f2531; }
.score-total-rank--e, .score-total-rank--e-minus { --score-rank-color: #7a4b11; }
.score-rank--s { color: #6d28d9; background: #f1eafe; }
.score-rank--a { color: #0369a1; background: #e0f2fe; }
.score-rank--b { color: #167547; background: #dcfce7; }
.score-rank--c { color: #a15c00; background: #fff4d6; }
.score-rank--d { color: #9f2531; background: #fee9eb; }
.score-rank--e, .score-rank--e-minus { color: #7a4b11; background: #f5eee4; }
.score-result-table td small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 400; }
.score-result-note, .score-target-note { margin: 13px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.score-target-table th small, .score-target-table td small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: 0; }
.score-target-table td { text-align: center; white-space: nowrap; }
.score-target-table td.is-current { background: #e9f5ff; box-shadow: inset 0 0 0 2px #3689c9; font-weight: 700; }
.score-target-average td, .score-target-average th { background: var(--bg-soft); }
.score-rank-guide { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.score-rank-guide h3 { margin: 0 0 12px; font-size: 15px; }
.score-rank-guide > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.score-rank-guide article { display: flex; align-items: flex-start; gap: 8px; padding: 10px; border-radius: var(--radius); background: var(--bg-soft); }
.score-rank-guide article p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.55; }
.score-rank-guide article strong { display: block; color: var(--fg); font-size: 12px; }
.score-adjustment-method { margin-top: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.score-adjustment-method summary { padding: 16px 18px; cursor: pointer; font-weight: 600; }
.score-adjustment-method > div { padding: 0 18px 18px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.score-adjustment-method p { margin: 0; }
.score-adjustment-method p + p { margin-top: 10px; }
@media (max-width: 720px) {
  .score-adjustment-guide { grid-template-columns: 1fr; }
  .score-adjustment-guide li { padding: 14px 4px; }
  .score-adjustment-guide li + li { border-top: 1px solid var(--border); border-left: 0; }
  .score-adjustment-context, .score-adjustment-controls { grid-template-columns: 1fr; }
  .score-input-row { grid-template-columns: 1fr 1fr; gap: 7px 12px; }
  .score-input-meta { text-align: right; }
  .score-input-type { grid-column: 1; }
  .score-input-field { grid-column: 2; grid-row: 2; }
  .score-input-points { grid-column: 1 / -1; }
  .score-total-summary { grid-template-columns: 1fr; }
  .score-total-summary > div + div { border-top: 1px solid var(--border); border-left: 0; }
  .score-result-table { table-layout: fixed; font-size: 10px; }
  .score-result-table th, .score-result-table td { padding: 8px 4px; white-space: normal; line-height: 1.35; }
  .score-target-table { min-width: 0; table-layout: fixed; font-size: 9px; }
  .score-target-table th, .score-target-table td { padding: 7px 3px; white-space: normal; line-height: 1.25; }
  .score-target-table th:nth-child(2), .score-target-table td:nth-child(2) { display: none; }
  .score-rank-guide > div { grid-template-columns: 1fr; }
}

.exam-bottom-cta {
  text-align: center;
  padding: clamp(48px, 6vw, 72px) var(--pad-x);
  background: var(--bg-soft);
}
.exam-bottom-cta p {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 22px;
}

/* ============================================================
   university-grouped list (総合型選抜/一般選抜 一覧ページ)
   ports index.html's course-school-grid pattern into a shared class
   ============================================================ */
.exam-uni-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2vw, 24px);
  align-items: start;
}
.exam-uni-col {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.exam-uni-head {
  padding: 18px 26px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.exam-uni-col.is-waseda .exam-uni-head { background: var(--crimson); }
.exam-uni-col.is-keio .exam-uni-head { background: var(--navy); }
.exam-uni-name {
  font-family: var(--font-jp);
  font-size: clamp(16px, 1.7vw, 19px);
  font-weight: 700;
  letter-spacing: .03em;
  color: #fff;
}
.exam-uni-count {
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: .12em;
  color: rgba(255,255,255,.78);
  text-transform: uppercase;
  font-weight: 600;
}
.exam-uni-items { display: flex; flex-direction: column; }
.exam-uni-grid--dense .exam-uni-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.exam-uni-grid--dense .exam-uni-item {
  min-height: 68px;
  padding: 16px 18px;
  border-inline-end: 1px solid var(--border);
}
.exam-uni-grid--dense .exam-uni-item:nth-child(2n) {
  border-inline-end: 0;
}
.exam-uni-item {
  padding: 20px 26px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 76px;
  transition: background .2s;
  font-family: var(--font-jp);
  text-decoration: none;
  color: inherit;
}
.exam-uni-item:last-child { border-bottom: none; }
.exam-uni-col.is-waseda .exam-uni-item:not(.is-disabled):hover { background: var(--crimson-soft); }
.exam-uni-col.is-keio .exam-uni-item:not(.is-disabled):hover { background: var(--navy-soft); }
.exam-uni-item.is-disabled { cursor: not-allowed; opacity: .55; pointer-events: none; }
.exam-uni-item-name {
  font-size: clamp(15.5px, 1vw + 8px, 16.5px);
  font-weight: 500;
  line-height: 1.55;
  color: var(--fg);
}
.exam-uni-item-status {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.exam-uni-item-arrow {
  flex-shrink: 0;
  font-family: var(--font-en);
  font-size: 16px;
  color: var(--muted-soft);
  transition: transform .2s, color .2s;
}
.exam-uni-col.is-waseda .exam-uni-item:hover .exam-uni-item-arrow { color: var(--crimson); transform: translateX(3px); }
.exam-uni-col.is-keio .exam-uni-item:hover .exam-uni-item-arrow { color: var(--navy); transform: translateX(3px); }

@media (max-width: 760px) {
  .exam-uni-grid { grid-template-columns: 1fr; }
  .exam-uni-grid--dense .exam-uni-item {
    min-height: 62px;
    padding: 14px 12px;
    gap: 8px;
  }
  .exam-uni-grid--dense .exam-uni-item-name {
    font-size: 14px;
    line-height: 1.45;
  }
}

/* ============================================================
   exam data dashboard pages
   ============================================================
   The page shell intentionally uses .info-page-hero from page-style.css,
   the same H1, text colour and header clearance used by FAQ and company
   pages.  Only the data controls and tables are exam-data-specific. */
.exam-data-shell {
  /* A data page contains many consecutive H2 sections.  Keep their rhythm
     independent from table density, and share it across every faculty page. */
  --exam-section-gap: clamp(64px, 7vw, 88px);
  display: grid;
  gap: var(--exam-section-gap);
}
.exam-data-shell > * {
  min-width: 0;
}
/* Content hierarchy: the compact H2/H3 scale is shared in tone with the
   public heading rule (Noto Sans JP, 600 weight, heading tracking) while
   remaining suitably smaller than the page-level H1. */
.exam-data-shell .exam-dashboard-head h2 {
  font-family: var(--font-heading);
  font-size: clamp(22px, 2vw, 26px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: var(--tracking-heading);
  color: var(--fg);
}
.exam-data-shell h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: var(--tracking-heading);
  color: var(--fg);
}
/* university/faculty switcher — sits between the hero and the in-page
   TOC bar; see shared/exam-faculty-nav.js for the single source of
   truth faculty list and the mount logic (targets [data-exam-faculty-nav]) */
.exam-faculty-nav {
  align-items: flex-end;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 0;
}
.exam-faculty-nav .exam-select-filter {
  min-width: min(220px, 100%);
}
@media (max-width: 480px) {
  .exam-faculty-nav {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }
}
.exam-data-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.exam-anchor-nav {
  position: sticky;
  top: 86px;
  z-index: 5;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(20,20,20,.06);
  scrollbar-width: none;
}
.exam-anchor-nav::-webkit-scrollbar {
  display: none;
}
.exam-anchor-nav a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
}
.exam-anchor-nav a:hover {
  color: var(--accent-deep);
  background: var(--accent-soft);
}
.exam-metric-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  min-height: 132px;
}
.exam-metric-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 10px;
}
.exam-metric-value {
  display: block;
  font-family: var(--font-en);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  line-height: 1;
  color: var(--fg);
  letter-spacing: .01em;
}
.exam-metric-note {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted-soft);
  line-height: 1.6;
}
.exam-dashboard-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 32px);
}
/* Data sections use a flat layout so the table, rather than a nested card,
   is the visual unit. Cards remain reserved for summaries, controls, notes,
   and calls to action. */
.exam-dashboard-table-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin-block: 0;
  min-width: 0;
}
/* Normal general-admission and comprehensive-selection detail pages are
   intentionally flat. The accent heading establishes each section; a second
   white card around narrative content or a table only reduces usable width.
   Interactive controls may keep their own compact surfaces, but the outer
   section shell stays flat on every exam-data page. University/faculty
   navigation and course CTAs are not
   .exam-dashboard-card children, so they remain deliberately card-based. */
.exam-data-shell > .exam-dashboard-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin-block: 0;
  min-width: 0;
}
.exam-dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: var(--accent);
}
.exam-dashboard-head p {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.8;
  color: #fff;
}
.exam-data-shell .exam-dashboard-head h2 { color: #fff; }
.exam-data-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--accent-deep);
  background: var(--bg-soft);
  text-transform: uppercase;
}
/* Direct tabs are reserved for a short, single filter axis (typically 2–5
   options). Years, departments, majors, or multiple concurrent axes use a
   labelled select so that the controls remain readable on mobile. */
.exam-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 18px;
}
.exam-filter-button {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  min-height: 34px;
  padding: 0 13px;
  background: var(--bg);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.exam-filter-button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.exam-select-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: -4px 0 18px;
}
.exam-select-filter {
  display: grid;
  gap: 6px;
  min-width: min(260px, 100%);
}
.exam-select-filter span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.exam-select-filter .exam-data-select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 36px 0 12px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}
.exam-select-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
  margin: -4px 0 18px;
}
.exam-select-field {
  display: grid;
  gap: 6px;
}
.exam-select-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.exam-select-field select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: var(--fg);
  font: inherit;
  font-size: 14px;
}
.exam-card-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.exam-compact-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}
.exam-score-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}
.exam-average-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}
.exam-compact-table th,
.exam-compact-table td,
.exam-score-table th,
.exam-score-table td,
.exam-average-table th,
.exam-average-table td {
  white-space: nowrap;
}
.exam-mobile-label {
  display: none;
}
.exam-table .method {
  font-weight: 700;
  color: var(--fg);
  white-space: normal;
}
.exam-table .sub {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-soft);
}
.exam-year-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  background: var(--bg);
}
.exam-year-card h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--fg);
}
.exam-stat-list {
  display: grid;
  gap: 10px;
}
.exam-stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.exam-stat-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.exam-stat-row span:first-child {
  font-size: 12px;
  color: var(--muted);
}
.exam-stat-row span:last-child {
  font-family: var(--font-en);
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
  text-align: right;
}
.exam-average-list {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}
.exam-average-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  font-size: 13px;
  color: var(--muted);
}
.exam-average-list strong {
  font-family: var(--font-en);
  color: var(--fg);
}
.exam-section-anchor {
  scroll-margin-top: 140px;
}
.exam-data-table {
  min-width: 980px;
}
.exam-data-table th,
.exam-data-table td {
  white-space: nowrap;
}
.exam-data-table td:first-child,
.exam-data-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: inherit;
}
.exam-data-table tbody td:first-child {
  background: #fff;
}
.exam-data-table tbody tr:hover td:first-child {
  background: var(--accent-soft);
}
.exam-data-table .method {
  font-weight: 700;
  color: var(--fg);
}
.exam-data-table .sub {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-soft);
}
.exam-selection-stage {
  width: 82px;
  font-weight: 700;
  color: var(--accent-deep);
  background: var(--accent-soft);
  white-space: nowrap;
}
/* Keep the selection-stage column compact so dates and details retain space. */
.exam-table.exam-table-fit:has(.exam-selection-stage) th:first-child {
  width: 82px;
}
.exam-selection-results-table {
  min-width: 920px;
}
.exam-selection-results-table th,
.exam-selection-results-table td {
  white-space: nowrap;
}
.exam-selection-year-card + .exam-selection-year-card {
  margin-top: 18px;
}
.exam-selection-year-card h3 {
  margin-bottom: 12px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
}
.exam-selection-results-table .is-hidden-by-filter {
  display: none;
}
/* Compact results tables for single-track comprehensive-selection exams.
   The wider multi-faculty regional table intentionally remains scrollable. */
.exam-data-table.exam-sougougata-result-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}
.exam-sougougata-result-table th:first-child,
.exam-sougougata-result-table td:first-child {
  text-align: center;
}
.exam-sougougata-result-table thead th:first-child {
  background: var(--accent-tint);
}
.exam-sougougata-result-table th:nth-child(1),
.exam-sougougata-result-table td:nth-child(1) { width: 16%; }
.exam-sougougata-result-table th:nth-child(2),
.exam-sougougata-result-table td:nth-child(2) { width: 18%; }
.exam-sougougata-result-table th:nth-child(3),
.exam-sougougata-result-table td:nth-child(3) { width: 20%; }
.exam-sougougata-result-table th:nth-child(4),
.exam-sougougata-result-table td:nth-child(4) { width: 26%; }
.exam-sougougata-result-table th:nth-child(5),
.exam-sougougata-result-table td:nth-child(5) { width: 20%; }
@media (max-width: 560px) {
  .exam-sougougata-result-table {
    font-size: 12px;
  }
  .exam-sougougata-result-table thead th {
    padding: 9px 3px;
    font-size: 10px;
    line-height: 1.25;
    white-space: normal;
    letter-spacing: 0;
    overflow-wrap: anywhere;
  }
  .exam-sougougata-result-table tbody td {
    padding: 12px 3px;
    white-space: nowrap;
  }
}
.exam-trend-bars {
  display: grid;
  gap: 16px;
}
.exam-trend-row {
  display: grid;
  grid-template-columns: 74px 1fr minmax(120px, auto);
  align-items: center;
  gap: 14px;
  font-size: 13px;
}
.exam-trend-year {
  font-family: var(--font-en);
  font-weight: 700;
  color: var(--fg);
}
.exam-trend-track {
  height: 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
}
.exam-trend-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-deep);
}
.exam-trend-value {
  font-family: var(--font-en);
  font-weight: 700;
  color: var(--accent-deep);
  text-align: right;
}
.exam-point-list {
  display: grid;
  gap: 12px;
}
.exam-term-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.exam-term-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  background: var(--bg);
}
.exam-term-card h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--fg);
  margin-bottom: 8px;
}
.exam-term-card p {
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--muted);
}
.exam-term-card .quote {
  display: block;
  margin-bottom: 8px;
  color: var(--fg);
  font-weight: 700;
}
.exam-subject-method-list {
  display: grid;
  gap: 20px;
}
.exam-subject-method-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 12px;
}
.exam-subject-method .exam-table-wrap {
  max-width: 800px;
}
.exam-subject-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}
.exam-subject-table th:nth-child(1),
.exam-subject-table td:nth-child(1) { width: 22%; }
.exam-subject-table th:nth-child(3),
.exam-subject-table td:nth-child(3) { width: 22%; }
.exam-subject-table th {
  padding: 12px 16px;
}
.exam-subject-table td {
  padding: 12px 16px;
  font-size: 13.5px;
}
.exam-subject-method-note {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}
.exam-dashboard-card .exam-disclaimer {
  margin-top: 20px;
}
.exam-disclaimer-link {
  display: inline-block;
  margin-top: 4px;
}
.exam-disclaimer-link a {
  color: var(--accent-deep);
  font-weight: 600;
}
.exam-deviation-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.exam-deviation-block {
  flex: 0 1 auto;
}
.exam-deviation-block-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 10px;
}
.exam-deviation-table {
  width: auto;
  min-width: 320px;
  max-width: 400px;
}
.exam-deviation-table th,
.exam-deviation-table td {
  padding: 14px 20px;
  white-space: normal;
}
@media (max-width: 480px) {
  .exam-deviation-table { min-width: 0; }
  .exam-deviation-block { flex-basis: 100%; }
}
.exam-point-list li {
  list-style: none;
  position: relative;
  padding-left: 22px;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--fg);
}
.exam-point-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .85em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent-deep);
}
@media (max-width: 920px) {
  .exam-data-grid { grid-template-columns: repeat(2, 1fr); }
  .exam-card-list { grid-template-columns: 1fr; }
  .exam-term-grid { grid-template-columns: 1fr; }
  .exam-compact-table,
  .exam-score-table,
  .exam-average-table {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    table-layout: auto;
  }
}
@media (max-width: 560px) {
  .exam-data-shell {
    --exam-section-gap: 52px;
    width: calc(100% + 24px);
    margin-inline: -12px;
  }
  .exam-anchor-nav {
    top: 74px;
    margin-inline: -4px;
    border-radius: 18px;
  }
  .exam-data-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .exam-metric-card {
    min-height: 118px;
    padding: 16px 14px;
    border-radius: 18px;
  }
  .exam-metric-label {
    font-size: 11px;
    line-height: 1.45;
    margin-bottom: 8px;
  }
  .exam-metric-value {
    font-size: clamp(25px, 8vw, 34px);
  }
  .exam-metric-note {
    margin-top: 8px;
    font-size: 11px;
  }
  .exam-select-grid { grid-template-columns: 1fr; }
  .exam-dashboard-card {
    padding: 22px 20px;
    border-radius: 18px;
  }
  .exam-dashboard-table-card {
    padding: 0;
    margin-block: 0;
    border-radius: 0;
  }
  .exam-dashboard-head {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
    padding: 14px 16px;
  }
  .exam-dashboard-table-card .exam-dashboard-head {
    padding-inline: 16px;
  }
  .exam-dashboard-head p {
    font-size: 13px;
  }
  .exam-data-chip {
    margin-left: 6px;
  }
  .exam-filter-bar {
    gap: 7px;
    margin-bottom: 14px;
    padding-inline: 6px;
  }
  .exam-filter-button {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }
  .exam-compact-table,
  .exam-score-table,
  .exam-average-table {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    table-layout: auto;
    font-size: 10px;
  }
  .exam-compact-table th,
  .exam-compact-table td,
  .exam-score-table th,
  .exam-score-table td,
  .exam-average-table th,
  .exam-average-table td {
    padding: 8px 0;
    white-space: normal;
    line-height: 1.25;
    letter-spacing: 0;
  }
  .exam-compact-table th,
  .exam-score-table th,
  .exam-average-table th {
    font-size: 9.5px;
    overflow-wrap: anywhere;
    word-break: break-all;
  }
  .exam-full-label {
    display: none;
  }
  .exam-mobile-label {
    display: inline;
  }
  .exam-compact-table .center,
  .exam-score-table .center,
  .exam-average-table .center {
    text-align: right;
  }
  .exam-compact-table .method,
  .exam-score-table .method,
  .exam-average-table .method {
    text-align: left;
    font-size: 9.5px;
    line-height: 1.25;
  }
  .exam-compact-table .method[data-mobile],
  .exam-score-table .method[data-mobile],
  .exam-average-table .method[data-mobile] {
    font-size: 0;
  }
  .exam-average-table .subject[data-mobile] {
    font-size: 0;
  }
  .exam-compact-table .method[data-mobile]::after,
  .exam-score-table .method[data-mobile]::after,
  .exam-average-table .method[data-mobile]::after {
    content: attr(data-mobile);
    font-size: 9.5px;
    white-space: nowrap;
  }
  .exam-average-table .subject[data-mobile]::after {
    content: attr(data-mobile);
    font-size: 9.5px;
    white-space: nowrap;
  }
  .exam-compact-table th:nth-child(1),
  .exam-compact-table td:nth-child(1) {
    width: 27px;
  }
  .exam-compact-table th:nth-child(2),
  .exam-compact-table td:nth-child(2) {
    width: 28px;
  }
  .exam-compact-table th:nth-child(3),
  .exam-compact-table td:nth-child(3) {
    width: 27px;
  }
  .exam-compact-table th:nth-child(4),
  .exam-compact-table td:nth-child(4),
  .exam-compact-table th:nth-child(5),
  .exam-compact-table td:nth-child(5),
  .exam-compact-table th:nth-child(6),
  .exam-compact-table td:nth-child(6) {
    width: 32px;
  }
  .exam-compact-table th:nth-child(7),
  .exam-compact-table td:nth-child(7) {
    width: 27px;
  }
  /* Tables that publish a distinct admission method and department keep both
     fields visible on mobile without falling back to horizontal scrolling. */
  .exam-compact-table.exam-has-departments th:nth-child(1),
  .exam-compact-table.exam-has-departments td:nth-child(1) { width: 27px; }
  .exam-compact-table.exam-has-departments th:nth-child(2),
  .exam-compact-table.exam-has-departments td:nth-child(2) { width: 28px; }
  .exam-compact-table.exam-has-departments th:nth-child(3),
  .exam-compact-table.exam-has-departments td:nth-child(3) { width: 56px; }
  .exam-compact-table.exam-has-departments th:nth-child(4),
  .exam-compact-table.exam-has-departments td:nth-child(4),
  .exam-compact-table.exam-has-departments th:nth-child(5),
  .exam-compact-table.exam-has-departments td:nth-child(5),
  .exam-compact-table.exam-has-departments th:nth-child(6),
  .exam-compact-table.exam-has-departments td:nth-child(6),
  .exam-compact-table.exam-has-departments th:nth-child(7),
  .exam-compact-table.exam-has-departments td:nth-child(7) { width: 31px; }
  .exam-compact-table.exam-has-departments th:nth-child(8),
  .exam-compact-table.exam-has-departments td:nth-child(8) { width: 28px; }
  .exam-score-table th:nth-child(1),
  .exam-score-table td:nth-child(1) {
    width: 34px;
  }
  .exam-score-table th:nth-child(2),
  .exam-score-table td:nth-child(2) {
    width: 44px;
  }
  .exam-score-table th:nth-child(3),
  .exam-score-table td:nth-child(3),
  .exam-score-table th:nth-child(4),
  .exam-score-table td:nth-child(4) {
    width: 40px;
  }
  .exam-score-table th:nth-child(5),
  .exam-score-table td:nth-child(5) {
    width: 36px;
  }
  .exam-score-table.exam-has-departments th:nth-child(1),
  .exam-score-table.exam-has-departments td:nth-child(1) { width: 30px; }
  .exam-score-table.exam-has-departments th:nth-child(2),
  .exam-score-table.exam-has-departments td:nth-child(2) { width: 28px; }
  .exam-score-table.exam-has-departments th:nth-child(3),
  .exam-score-table.exam-has-departments td:nth-child(3) { width: 58px; }
  .exam-score-table.exam-has-departments th:nth-child(4),
  .exam-score-table.exam-has-departments td:nth-child(4) { width: 34px; }
  .exam-score-table.exam-has-departments th:nth-child(5),
  .exam-score-table.exam-has-departments td:nth-child(5) { width: 42px; }
  .exam-score-table.exam-has-departments th:nth-child(6),
  .exam-score-table.exam-has-departments td:nth-child(6) { width: 40px; }
  .exam-average-table th:nth-child(1),
  .exam-average-table td:nth-child(1) {
    width: 28px;
  }
  .exam-average-table th:nth-child(2),
  .exam-average-table td:nth-child(2) {
    width: 34px;
  }
  .exam-average-table th:nth-child(3),
  .exam-average-table td:nth-child(3) {
    width: 42px;
    white-space: nowrap;
  }
  .exam-average-table th:nth-child(4),
  .exam-average-table td:nth-child(4) {
    width: 24px;
  }
  .exam-average-table th:nth-child(5),
  .exam-average-table td:nth-child(5) {
    width: 40px;
  }
  .exam-average-table th:nth-child(6),
  .exam-average-table td:nth-child(6) {
    width: 42px;
  }
  .exam-trend-row { grid-template-columns: 54px 1fr; gap: 8px 10px; }
  .exam-trend-value { grid-column: 2; text-align: left; }
}
.exam-detail-table {
  min-width: 1070px;
  table-layout: fixed;
}
/* When the data has no 専攻・専修 field, the generator applies this class.
   Reclaim the unused desktop column before overflow is considered. */
.exam-detail-table--no-major { min-width: 880px; }
.exam-detail-table--no-department { min-width: 720px; }
/* give the three text columns (方式/学科/専攻・専修) enough room that
   labels like "電気・情報生命工学科"(10字)や"教育学専攻 生涯教育学専修"(13字)
   が3行以上に折り返さないようにする。5つの数値列は短いのでコンパクトなまま。
   一部の方式名（最大18字、人間科学部・政治経済学部のみ）は2行折り返しを許容する。 */
.exam-detail-table col:nth-child(1),
.exam-detail-table th:nth-child(1),
.exam-detail-table td:nth-child(1) { width: 60px; }
.exam-detail-table col:nth-child(2),
.exam-detail-table th:nth-child(2),
.exam-detail-table td:nth-child(2) { width: 160px; }
.exam-detail-table col:nth-child(3),
.exam-detail-table th:nth-child(3),
.exam-detail-table td:nth-child(3) { width: 190px; }
.exam-detail-table col:nth-child(4),
.exam-detail-table th:nth-child(4),
.exam-detail-table td:nth-child(4) { width: 260px; }

.exam-detail-minimum-table {
  min-width: 820px;
}

.exam-subject-score-table {
  min-width: 760px;
}

.exam-subject-block + .exam-subject-block {
  margin-top: 22px;
}

.exam-subject-block h3 {
  margin-bottom: 4px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
}

.exam-subject-block > p {
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}

.exam-detail-table th,
.exam-detail-table td,
.exam-detail-minimum-table th,
.exam-detail-minimum-table td,
.exam-subject-score-table th,
.exam-subject-score-table td {
  padding-inline: 12px;
}

.exam-detail-table td:nth-child(5),
.exam-detail-table td:nth-child(6),
.exam-detail-table td:nth-child(7),
.exam-detail-table td:nth-child(8),
.exam-detail-table td:nth-child(9),
.exam-detail-minimum-table td:nth-child(5),
.exam-detail-minimum-table td:nth-child(6),
.exam-detail-minimum-table td:nth-child(7),
.exam-subject-score-table td:nth-child(4),
.exam-subject-score-table td:nth-child(5),
.exam-subject-score-table td:nth-child(6),
.exam-subject-score-table td:nth-child(7),
.exam-subject-score-table td:nth-child(8),
.exam-subject-score-table td:nth-child(9) {
  text-align: right;
}

/* ============================================================
   mobile table contract
   Standard tables must fit the viewport without horizontal scrolling.
   Only the three detailed, high-density table types retain horizontal
   scrolling; their first column remains visible as a reading anchor.
   ============================================================ */
@media (max-width: 560px) {
  /* Preserve the reading gutter for headings and controls, while allowing
     data tables to use the full device width. This is especially important
     for the dense nine-column admission-result tables. */
  .exam-data-shell .exam-table-wrap {
    width: calc(100% + 16px);
    max-width: none;
    margin-inline: -8px;
  }
  .exam-table-label-full { display: none; }
  .exam-table-label-mobile { display: inline; }
  .exam-table-wrap {
    overflow-x: hidden;
  }
  .exam-table-wrap > .exam-table:not(.exam-detail-table):not(.exam-detail-minimum-table):not(.exam-subject-score-table) {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    table-layout: fixed;
    font-size: 11px;
  }
  .exam-table-wrap > .exam-table:not(.exam-detail-table):not(.exam-detail-minimum-table):not(.exam-subject-score-table) thead th {
    padding: 9px 5px;
    font-size: 10px;
    line-height: 1.35;
    letter-spacing: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .exam-table-wrap > .exam-table:not(.exam-detail-table):not(.exam-detail-minimum-table):not(.exam-subject-score-table) tbody td {
    padding: 10px 5px;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .exam-subject-table th,
  .exam-subject-table td {
    padding: 9px 6px;
    font-size: 11px;
    line-height: 1.5;
  }
  .exam-deviation-table th,
  .exam-deviation-table td {
    padding: 10px 8px;
    font-size: 11px;
  }

  /* All exam-data tables fit a phone viewport.  Dense tables retain the
     desktop column model, but use the shared mobile labels and compact widths
     instead of a horizontal scrollbar. */
  .exam-table-wrap:has(.exam-detail-table),
  .exam-table-wrap:has(.exam-detail-minimum-table),
  .exam-table-wrap:has(.exam-subject-score-table),
  .exam-table-wrap:has(.exam-selection-results-table) { overflow-x: hidden; }

  .exam-detail-table,
  .exam-detail-minimum-table,
  .exam-subject-score-table,
  .exam-selection-results-table {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    table-layout: fixed;
    font-size: 9.5px;
  }
  .exam-table.exam-detail-table thead th,
  .exam-table.exam-detail-minimum-table thead th,
  .exam-table.exam-subject-score-table thead th,
  .exam-table.exam-selection-results-table thead th,
  .exam-table.exam-detail-table tbody td,
  .exam-table.exam-detail-minimum-table tbody td,
  .exam-table.exam-subject-score-table tbody td,
  .exam-table.exam-selection-results-table tbody td {
    box-sizing: border-box;
    padding: 8px 2px;
    font-size: 9.5px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .exam-detail-table .method,
  .exam-detail-minimum-table .method,
  .exam-subject-score-table .method { white-space: nowrap; }
  .exam-detail-table th,
  .exam-detail-minimum-table th,
  .exam-subject-score-table th,
  .exam-selection-results-table th {
    font-size: 9px;
    letter-spacing: 0;
  }
  /* Dense table columns use proportional widths. This keeps every column in
     view on narrow phones instead of clipping a fixed desktop pixel total. */
  .exam-detail-table th:nth-child(1), .exam-detail-table td:nth-child(1) { width: 10%; }
  .exam-detail-table th:nth-child(2), .exam-detail-table td:nth-child(2) { width: 8%; }
  .exam-detail-table th:nth-child(3), .exam-detail-table td:nth-child(3) { width: 15%; }
  .exam-detail-table th:nth-child(4), .exam-detail-table td:nth-child(4) { width: 15%; }
  .exam-detail-table th:nth-child(n+5), .exam-detail-table td:nth-child(n+5) { width: 10.4%; }
  .exam-detail-minimum-table th:nth-child(1), .exam-detail-minimum-table td:nth-child(1) { width: 10%; }
  .exam-detail-minimum-table th:nth-child(2), .exam-detail-minimum-table td:nth-child(2) { width: 10%; }
  .exam-detail-minimum-table th:nth-child(3), .exam-detail-minimum-table td:nth-child(3) { width: 16%; }
  .exam-detail-minimum-table th:nth-child(4), .exam-detail-minimum-table td:nth-child(4) { width: 21%; }
  .exam-detail-minimum-table th:nth-child(5), .exam-detail-minimum-table td:nth-child(5) { width: 12%; }
  .exam-detail-minimum-table th:nth-child(6), .exam-detail-minimum-table td:nth-child(6) { width: 16%; }
  .exam-detail-minimum-table th:nth-child(7), .exam-detail-minimum-table td:nth-child(7) { width: 15%; }

  /* Hide structurally empty detail columns instead of reserving space for
     dashes. The released width keeps the year visible in every faculty table. */
  .exam-detail-table--no-major th:nth-child(1), .exam-detail-table--no-major td:nth-child(1) { width: 10%; }
  .exam-detail-table--no-major th:nth-child(2), .exam-detail-table--no-major td:nth-child(2) { width: 14%; }
  .exam-detail-table--no-major th:nth-child(3), .exam-detail-table--no-major td:nth-child(3) { width: 22%; }
  .exam-detail-table--no-major th:nth-child(n+4), .exam-detail-table--no-major td:nth-child(n+4) { width: 10.8%; }
  .exam-detail-table--no-department th:nth-child(1), .exam-detail-table--no-department td:nth-child(1) { width: 12%; }
  .exam-detail-table--no-department th:nth-child(2), .exam-detail-table--no-department td:nth-child(2) { width: 28%; }
  .exam-detail-table--no-department th:nth-child(n+3), .exam-detail-table--no-department td:nth-child(n+3) { width: 12%; }
  .exam-detail-minimum-table--no-major th:nth-child(1), .exam-detail-minimum-table--no-major td:nth-child(1) { width: 12%; }
  .exam-detail-minimum-table--no-major th:nth-child(2), .exam-detail-minimum-table--no-major td:nth-child(2) { width: 15%; }
  .exam-detail-minimum-table--no-major th:nth-child(3), .exam-detail-minimum-table--no-major td:nth-child(3) { width: 24%; }
  .exam-detail-minimum-table--no-major th:nth-child(n+4), .exam-detail-minimum-table--no-major td:nth-child(n+4) { width: 16.33%; }
  .exam-subject-score-table th:nth-child(1), .exam-subject-score-table td:nth-child(1) { width: 8%; }
  .exam-subject-score-table th:nth-child(2), .exam-subject-score-table td:nth-child(2) { width: 16%; }
  .exam-subject-score-table th:nth-child(3), .exam-subject-score-table td:nth-child(3) { width: 18%; }
  .exam-subject-score-table th:nth-child(n+4), .exam-subject-score-table td:nth-child(n+4) { width: 9.666%; }
  .exam-selection-results-table th:nth-child(1), .exam-selection-results-table td:nth-child(1) { width: 16%; }
  .exam-selection-results-table th:nth-child(n+2), .exam-selection-results-table td:nth-child(n+2) { width: 10.5%; }
  .exam-table.exam-selection-results-table thead th:nth-child(n+2) { font-size: 0 !important; }
  .exam-table.exam-selection-results-table thead th:nth-child(n+2)::after { font-size: 9px; }
  .exam-selection-results-table th:nth-child(2)::after { content: '志願'; }
  .exam-selection-results-table th:nth-child(3)::after { content: '1合格'; }
  .exam-selection-results-table th:nth-child(4)::after { content: '1倍率'; }
  .exam-selection-results-table th:nth-child(5)::after { content: '2合格'; }
  .exam-selection-results-table th:nth-child(6)::after { content: '2倍率'; }
  .exam-selection-results-table th:nth-child(7)::after { content: '最終合'; }
  .exam-selection-results-table th:nth-child(8)::after { content: '最終率'; }
  .exam-selection-results-table th:nth-child(9)::after { content: '倍率'; }
}
/* ============================================================
   exam-data faculty accent themes — <body class="theme-exam-KEY">
   Colors: real faculty brand colors where verified elsewhere in the
   codebase or from official score-report PDFs; a few (Waseda's 3
   engineering faculties, Keio 商/医/理工/看護医療/薬学部) have no
   published brand color, so a coordinated color was designed instead.
   --accent-deep is only darkened as much as needed to clear ~4.5:1
   contrast against white (many colors need none at all) so the base
   --accent stays visually vivid rather than uniformly muted.
   Set by scripts/generate-exam-page.cjs from each page's `theme` field.
   ============================================================ */
body.theme-exam-waseda-bunkakousou {
  /* 早稲田 文化構想学部 */
  --accent:      #006D67;
  --accent-deep: #006D67;
  --accent-tint: #D1E5E4;
  --accent-rgb:  0, 109, 103;
  --accent-soft: rgba(0, 109, 103, .07);
}
body.theme-exam-waseda-bungaku {
  /* 早稲田 文学部 */
  --accent:      #014D95;
  --accent-deep: #014D95;
  --accent-tint: #D1DFEC;
  --accent-rgb:  1, 77, 149;
  --accent-soft: rgba(1, 77, 149, .07);
}
body.theme-exam-waseda-shogaku {
  /* 早稲田 商学部 */
  --accent:      #001945;
  --accent-deep: #001945;
  --accent-tint: #D1D6DE;
  --accent-rgb:  0, 25, 69;
  --accent-soft: rgba(0, 25, 69, .07);
}
body.theme-exam-waseda-hougaku {
  /* 早稲田 法学部 */
  --accent:      #46847D;
  --accent-deep: #437F78;
  --accent-tint: #DEE9E8;
  --accent-rgb:  70, 132, 125;
  --accent-soft: rgba(70, 132, 125, .07);
}
body.theme-exam-waseda-shakaikagaku {
  /* 早稲田 社会科学部 */
  --accent:      #F6901E;
  --accent-deep: #AC6515;
  --accent-tint: #FDEBD6;
  --accent-rgb:  246, 144, 30;
  --accent-soft: rgba(246, 144, 30, .07);
}
body.theme-exam-waseda-seikei {
  /* 早稲田 政治経済学部 */
  --accent:      #EE592B;
  --accent-deep: #CD4D25;
  --accent-tint: #FCE1D9;
  --accent-rgb:  238, 89, 43;
  --accent-soft: rgba(238, 89, 43, .07);
}
body.theme-exam-waseda-kyoiku {
  /* 早稲田 教育学部 */
  --accent:      #9A4B80;
  --accent-deep: #9A4B80;
  --accent-tint: #EDDFE8;
  --accent-rgb:  154, 75, 128;
  --accent-soft: rgba(154, 75, 128, .07);
}
body.theme-exam-waseda-kokusaikyoyo {
  /* 早稲田 国際教養学部 */
  --accent:      #00B2B1;
  --accent-deep: #008483;
  --accent-tint: #D1F1F1;
  --accent-rgb:  0, 178, 177;
  --accent-soft: rgba(0, 178, 177, .07);
}
body.theme-exam-waseda-ningen {
  /* 早稲田 人間科学部 */
  --accent:      #00A6C6;
  --accent-deep: #00819A;
  --accent-tint: #D1EFF5;
  --accent-rgb:  0, 166, 198;
  --accent-soft: rgba(0, 166, 198, .07);
}
body.theme-exam-waseda-sports {
  /* 早稲田 スポーツ科学部 */
  --accent:      #008CD2;
  --accent-deep: #007BB9;
  --accent-tint: #D1EAF7;
  --accent-rgb:  0, 140, 210;
  --accent-soft: rgba(0, 140, 210, .07);
}
body.theme-exam-waseda-kikanrikou {
  /* 早稲田 基幹理工学部 */
  --accent:      #C6733E;
  --accent-deep: #AA6335;
  --accent-tint: #F5E6DC;
  --accent-rgb:  198, 115, 62;
  --accent-soft: rgba(198, 115, 62, .07);
}
body.theme-exam-waseda-souzourikou {
  /* 早稲田 創造理工学部 */
  --accent:      #D4915A;
  --accent-deep: #9D6B43;
  --accent-tint: #F7EBE1;
  --accent-rgb:  212, 145, 90;
  --accent-soft: rgba(212, 145, 90, .07);
}
body.theme-exam-waseda-senshinrikou {
  /* 早稲田 先進理工学部 */
  --accent:      #B8632E;
  --accent-deep: #B15F2C;
  --accent-tint: #F2E3D9;
  --accent-rgb:  184, 99, 46;
  --accent-soft: rgba(184, 99, 46, .07);
}
/* 地域探究・貢献入試 is cross-faculty, so it does not receive one of the
   faculty themes above. Complete its shared exam-data color tokens here;
   without this, --accent-deep falls back to the neutral black default. */
body.theme-chiiki .exam-data-shell {
  --accent:      #D85A7A;
  --accent-deep: #D85A7A;
  --accent-tint: #F8DDE5;
  --accent-rgb:  216, 90, 122;
  --accent-soft: rgba(216, 90, 122, .07);
}
body.theme-chiiki .exam-data-shell .exam-dashboard-head h2,
body.theme-chiiki .exam-data-shell .exam-dashboard-head p {
  color: #fff;
}
body.theme-exam-keio-bungaku {
  /* 慶應 文学部 */
  --accent:      #4FA0D6;
  --accent-deep: #3C7AA3;
  --accent-tint: #DFEEF8;
  --accent-rgb:  79, 160, 214;
  --accent-soft: rgba(79, 160, 214, .07);
}
body.theme-exam-keio-keizai {
  /* 慶應 経済学部 */
  --accent:      #35B597;
  --accent-deep: #26826D;
  --accent-tint: #DBF2EC;
  --accent-rgb:  53, 181, 151;
  --accent-soft: rgba(53, 181, 151, .07);
}
body.theme-exam-keio-hougaku {
  /* 慶應 法学部 */
  --accent:      #8E4F9A;
  --accent-deep: #8E4F9A;
  --accent-tint: #EBDFED;
  --accent-rgb:  142, 79, 154;
  --accent-soft: rgba(142, 79, 154, .07);
}
body.theme-exam-keio-shogaku {
  /* 慶應 商学部 */
  --accent:      #EE8B2E;
  --accent-deep: #AB6421;
  --accent-tint: #FCEAD9;
  --accent-rgb:  238, 139, 46;
  --accent-soft: rgba(238, 139, 46, .07);
}
body.theme-exam-keio-igaku {
  /* 慶應 医学部 */
  --accent:      #E85D2C;
  --accent-deep: #C85026;
  --accent-tint: #FBE2D9;
  --accent-rgb:  232, 93, 44;
  --accent-soft: rgba(232, 93, 44, .07);
}
body.theme-exam-keio-rikou {
  /* 慶應 理工学部 */
  --accent:      #3D7EBF;
  --accent-deep: #3B79B7;
  --accent-tint: #DCE8F3;
  --accent-rgb:  61, 126, 191;
  --accent-soft: rgba(61, 126, 191, .07);
}
body.theme-exam-keio-sougouseisaku {
  /* 慶應 総合政策学部 */
  --accent:      #D474AB;
  --accent-deep: #AA5D89;
  --accent-tint: #F7E6F0;
  --accent-rgb:  212, 116, 171;
  --accent-soft: rgba(212, 116, 171, .07);
}
body.theme-exam-keio-kankyoujouhou {
  /* 慶應 環境情報学部 */
  --accent:      #94C0E6;
  --accent-deep: #5C778F;
  --accent-tint: #ECF4FA;
  --accent-rgb:  148, 192, 230;
  --accent-soft: rgba(148, 192, 230, .07);
}
body.theme-exam-keio-kangoiryou {
  /* 慶應 看護医療学部 */
  --accent:      #2E75B6;
  --accent-deep: #2E75B6;
  --accent-tint: #D9E6F2;
  --accent-rgb:  46, 117, 182;
  --accent-soft: rgba(46, 117, 182, .07);
}
body.theme-exam-keio-yaku {
  /* 慶應 薬学部 */
  --accent:      #7A9B3E;
  --accent-deep: #647F33;
  --accent-tint: #E7EDDC;
  --accent-rgb:  122, 155, 62;
  --accent-soft: rgba(122, 155, 62, .07);
}

/* ============================================================
   cross-faculty exam schedule calendar (/exam-data/ippan)
   ============================================================ */
.exam-schedule-calendar {
  --sched-exam: #FF7A3D;
  --sched-result: #2FAE66;
}
.exam-schedule-head {
  margin-bottom: 18px;
}
.exam-schedule-head h2 {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
}
.exam-schedule-head p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 640px;
}
.exam-schedule-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 14px 0 20px;
}
.exam-schedule-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
}
.exam-schedule-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}
.exam-schedule-legend-dot--exam { background: var(--sched-exam); }
.exam-schedule-legend-dot--result { background: var(--sched-result); }

/* single combined calendar (2月〜3月上旬) */
.exam-schedule-month-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: var(--card);
}
.exam-schedule-month-card--mobile {
  display: none;
}
.exam-schedule-month-head {
  margin-bottom: 14px;
}
.exam-schedule-month-head h3 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--fg);
}
.exam-schedule-month-tag {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--sched-exam);
}
.exam-schedule-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}
.exam-schedule-weekdays span {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-soft);
}
.exam-schedule-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.exam-schedule-day {
  min-width: 0;
  min-height: 64px;
  border-radius: 6px;
  padding: 4px 3px;
  background: var(--bg-soft);
  overflow: hidden;
}
.exam-schedule-day-num {
  display: block;
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 2px;
}
.exam-schedule-day-chips {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.exam-schedule-chip {
  display: block;
  font-size: 9.5px;
  line-height: 1.3;
  font-weight: 600;
  padding: 1px 3px;
  border-radius: 3px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.exam-schedule-chip--exam { background: var(--sched-exam); }
.exam-schedule-chip--result { background: var(--sched-result); }
.exam-schedule-chip--more {
  background: none;
  color: var(--muted-soft);
  font-weight: 700;
  padding: 1px 3px;
}
.exam-schedule-empty {
  font-size: 13.5px;
  color: var(--muted);
}
.exam-schedule-source {
  margin-top: 18px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted-soft);
}

@media (max-width: 768px) {
  .exam-schedule-month-card--desktop { display: none; }
  .exam-schedule-month-card--mobile { display: block; }
  .exam-schedule-month-card--mobile { padding: 14px; }
  .exam-schedule-month-card--mobile .exam-schedule-day { min-height: 52px; padding: 3px 2px; }
  .exam-schedule-month-card--mobile .exam-schedule-day-num { font-size: 10px; }
  .exam-schedule-month-card--mobile .exam-schedule-chip {
    font-size: 7.5px;
    padding: 1px 2px;
    white-space: normal;
    word-break: break-all;
    text-overflow: clip;
  }
  .exam-schedule-month-card--mobile .exam-schedule-grid { gap: 2px; }
}

/* General selection comparison pages */
.exam-explorer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.exam-explorer-card {
  display: flex;
  min-height: 176px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 8px;
  padding: 24px;
  color: var(--fg);
  background: #fff;
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.exam-explorer-card:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(25, 32, 37, .08);
  transform: translateY(-2px);
}
.exam-explorer-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.45;
}
.exam-explorer-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}
.exam-explorer-card span {
  color: var(--accent-deep);
  font-size: 14px;
  font-weight: 700;
}
/* Used on pages with a single explorer card (e.g. sougougata top) so it
   doesn't stretch full-width inside the 3-column grid. */
.exam-explorer-grid--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 420px;
}
/* belt-and-suspenders: the catalog list can include very wide tables
   (many faculties × many columns); each one scrolls internally via
   .exam-compare-table-wrap, so clipping overflow at the body level here
   never hides content — it only guarantees the page itself never gains
   a horizontal scrollbar. */
body.exam-compare-page {
  overflow-x: hidden;
}
.exam-compare-shell {
  display: grid;
  gap: 28px;
  min-width: 0;
}

/* filter bar — a compact, secondary utility strip, not the page's focus */
.exam-compare-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  padding: 14px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.exam-compare-controls .exam-select-filter {
  display: grid;
  gap: 5px;
  flex: 1 1 150px;
  min-width: 130px;
}
.exam-compare-controls .exam-select-filter span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.exam-compare-controls select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 28px 0 10px;
  color: var(--fg);
  background: #fff;
  font: inherit;
  font-size: 13px;
}
.exam-compare-count {
  margin: 0 0 2px auto;
  color: var(--muted-soft);
  font-size: 12px;
  white-space: nowrap;
}

/* catalog list — one section per faculty, read top to bottom */
.exam-compare-groups {
  display: grid;
  gap: 30px;
  min-width: 0;
}
.exam-compare-group {
  min-width: 0;
}
.exam-compare-group + .exam-compare-group {
  padding-top: 30px;
  border-top: 1px solid var(--border);
}
.exam-compare-group-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}
.exam-compare-group-uni {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--muted-soft);
  white-space: nowrap;
}
.exam-compare-group-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}
.exam-compare-group-title a {
  color: var(--fg);
  text-decoration: none;
}
.exam-compare-group-title a:hover {
  color: var(--accent-deep);
}
.exam-compare-group-title a::after {
  content: '→';
  display: inline-block;
  margin-left: 6px;
  font-size: 14px;
  color: var(--accent-deep);
}

.exam-compare-table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  -webkit-overflow-scrolling: touch;
}
.exam-compare-table {
  width: 100%;
  min-width: 560px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}
.exam-compare-table th,
.exam-compare-table td {
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 13px 14px;
  vertical-align: middle;
  white-space: nowrap;
}
.exam-compare-table th {
  color: var(--fg);
  background: var(--accent-tint);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}
.exam-compare-table th.center,
.exam-compare-table td.center {
  text-align: center;
}
.exam-compare-table tbody tr:last-child td {
  border-bottom: 0;
}
.exam-compare-table tbody tr:hover td {
  background: var(--bg-soft);
}
.exam-compare-table .number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.exam-compare-emphasis {
  color: var(--accent-deep);
  font-weight: 700;
}
.exam-compare-note {
  margin: 4px 0 0;
  color: var(--muted-soft);
  font-size: 12px;
  line-height: 1.8;
}

/* 入試科目・配点 compare page reuses the individual-page .exam-subject-*
   components as-is (method card title + 科目区分/科目内容/配点 table),
   just repeated once per faculty inside .exam-compare-group. */
.exam-compare-group .exam-subject-method-list {
  display: grid;
  gap: 20px;
}

@media (max-width: 900px) {
  .exam-explorer-grid { grid-template-columns: 1fr; }
  .exam-explorer-grid--single { max-width: none; }
}

@media (max-width: 560px) {
  .exam-explorer-card { min-height: 0; padding: 20px; }
  .exam-explorer-card h3 { font-size: 18px; }
  .exam-compare-controls { padding: 12px 14px; gap: 10px 12px; }
  .exam-compare-controls .exam-select-filter { flex-basis: calc(50% - 6px); min-width: 0; }
  .exam-compare-count { margin: 2px 0 0; flex-basis: 100%; text-align: left; }
  .exam-compare-group-head { flex-wrap: wrap; }
  /* match the individual-page .exam-compact-table strategy: shrink to fit
     every column (table-layout:auto + tiny font + wrap) instead of forcing
     internal horizontal scroll, so the whole table is readable at a glance. */
  .exam-compare-table {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    table-layout: auto;
    font-size: 11px;
  }
  .exam-compare-table thead th,
  .exam-compare-table tbody td {
    padding: 9px 5px;
    white-space: normal;
    line-height: 1.35;
  }
  .exam-compare-table thead th {
    font-size: 10px;
  }
}
