@import url("https://fonts.googleapis.com/css2?family=Onest:wght@500;600;700&display=swap");

/* ============================================================
   足利大学 工学部 入試ガイド 統一スタイルシート
   ------------------------------------------------------------
   5ページ共通のスタイルを1つにまとめたものです。
   ページごとの違い(カード列数・表の幅など)は、
   <body> に付けたクラスで切り替えます。

   - 一般入試        <body class="page-ippan">
   - 共通テスト      <body class="page-kyotsu">
   - 高校推薦        <body class="page-koko">
   - 総合型推薦      <body class="page-sogo">
   - 留学生選抜      <body class="page-ryugaku">
   ============================================================ */

/* ---------- 変数 ---------- */
:root {
  --bg: #ffffff;
  --paper: #ffffff;
  --ink: #151515;
  --muted: #666;
  --line: #dedede;
  --soft: #f7f7f4;
  --blue: #0c4a8a;
  --blue-2: #e9f2fb;
  --green: #127260;
  --green-2: #e8f5f1;
  --orange: #aa5a16;
  --orange-2: #fff0df;
  --red: #a83232;
  --red-2: #f9ecec;
  --purple: #6944a0;
  --purple-2: #f0ebf8;
  --shadow: 0 18px 50px rgba(0,0,0,.08);
  --radius: 22px;
  --max: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Noto Sans JP", Meiryo, sans-serif;
}

/* ---------- ベース ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, rgba(247,247,244,.78) 0%, #fff 35%);
  line-height: 1.75;
  letter-spacing: .02em;
}
/* メインリンク */
a {
  color: #649ED7;
  font-weight: bold;
}

/* サブリンク */
a.sub-link {
  color: inherit;
}
.site { min-height: 100vh; overflow: hidden; }

/* ルビ（留学生選抜ページ） */
body.page-ryugaku { line-height: 1.85; }
ruby rt {
  font-size: .48em;
  color: #555;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
}

/* ---------- ヘッダー ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(255,255,255,.86);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.brand a {
  display: block;
  width: 250px;
  flex-shrink: 0;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}
.nav { display: flex; gap: 18px; font-size: 13px; color: #333; }
.nav a { text-decoration: none; border-bottom: 1px solid transparent; }
.nav a:hover { border-bottom-color: var(--ink); }

/* ---------- ヒーロー ---------- */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 76px 22px 48px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 44px;
  align-items: center;
  position: relative;
}
.page-koko .hero { grid-template-columns: 1.1fr .9fr; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 800;
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; display: inline-block; width: 38px; height: 1px; background: var(--blue); }
h1 {
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.15;
  letter-spacing: .02em;
  margin: 0 0 24px;
  font-weight: 850;
}
.page-ryugaku h1 { line-height: 1.18; }
h1 span {
  display: block;
  font-size: clamp(22px, 3vw, 38px);
  margin-top: 10px;
  color: #2e2e2e;
  font-weight: 750;
}
.page-koko h1 { font-weight: 800; }
.page-koko h1 span { font-weight: 700; }
.page-koko .eyebrow { font-weight: 700; }
.lead {
  font-size: clamp(16px, 1.8vw, 20px);
  color: #333;
  max-width: 760px;
  margin: 0 0 30px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.page-koko .btn { font-weight: 700; }
.btn.primary { background: #649ED7; color: white; box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.btn.secondary { background: white; color: var(--ink); border: 1px solid var(--line); }
.btn:hover { transform: translateY(-2px); }

.hero-card {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 32px;
  padding: 28px;
  position: relative;
}
.hero-card::before, .hero-card::after {
  content: "";
  position: absolute;
  border: 1px solid #111;
  opacity: .14;
  pointer-events: none;
}
.hero-card::before { top: 18px; right: -22px; width: 92px; height: 92px; border-radius: 50%; }
.hero-card::after { bottom: -20px; left: 26px; width: 140px; height: 1px; background: #111; }
.quick-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 850;
  margin: 0 0 18px;
}
.tag {
  font-size: 11px;
  font-weight: 850;
  color: var(--blue);
  background: var(--blue-2);
  padding: 5px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.quick-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.quick-list li {
  padding: 14px;
  background: var(--soft);
  border: 1px solid #ebebe7;
  border-radius: 16px;
}
.quick-list b { display: block; font-size: 14px; margin-bottom: 2px; }
.quick-list span { display: block; color: var(--muted); font-size: 13px; }

/* ---------- セクション共通 ---------- */
section { max-width: var(--max); margin: 0 auto; padding: 58px 22px; }
.section-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: end;
  margin-bottom: 28px;
  border-top: 1px solid var(--ink);
  padding-top: 24px;
}
.section-kicker {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-weight: 800;
}
.page-koko .section-kicker { font-weight: 700; }
h2 { margin: 0; font-size: clamp(26px, 3vw, 42px); line-height: 1.25; letter-spacing: .02em; }
.page-ryugaku h2 { line-height: 1.3; }
.section-lead { color: #444; margin: 14px 0 0; max-width: 760px; }

/* ---------- ルートカード ---------- */
.cards { display: grid; gap: 18px; margin-top: 26px; }
.page-ippan .cards, .page-sogo .cards { grid-template-columns: repeat(4, 1fr); gap: 16px; }
.page-kyotsu .cards, .page-koko .cards { grid-template-columns: repeat(3, 1fr); }
.page-ryugaku .cards { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 8px 28px rgba(0,0,0,.04);
  position: relative;
  min-height: 265px;
  display: flex;
  flex-direction: column;
}
.page-ippan .card { padding: 22px; min-height: 266px; }
.page-sogo .card { padding: 22px; min-height: 290px; }
.page-koko .card { display: block; min-height: 250px; }
.card.recommended { border-color: rgba(12,74,138,.28); background: linear-gradient(180deg, #fff 0%, #f7fbff 100%); }
.card .number { color: #649ED7; font-size: 15px; letter-spacing: .12em; font-weight: 850; }
.page-koko .card .number { font-weight: 800; }
.card h3 { font-size: 22px; margin: 8px 0 10px; line-height: 1.35; }
.page-ippan .card h3, .page-sogo .card h3 { font-size: 21px; }
.page-ryugaku .card h3 { font-size: 24px; }
.card p { color: #444; margin: 0 0 18px; font-size: 15px; }
.page-ippan .card p, .page-sogo .card p { font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.chip {
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
  background: #f3f3f3;
  border: 1px solid #e7e7e7;
  border-radius: 999px;
  color: #333;
}
.page-koko .chip { font-weight: 700; }
.chip.blue { background: var(--blue-2); color: var(--blue); border-color: #d2e5f8; }
.chip.green { background: var(--green-2); color: var(--green); border-color: #c8e8df; }
.chip.orange { background: var(--orange-2); color: var(--orange); border-color: #f3d3ae; }
.chip.red { background: var(--red-2); color: var(--red); border-color: #edcaca; }
.chip.purple { background: var(--purple-2); color: var(--purple); border-color: #d9ccec; }

/* ---------- 比較表 ---------- */
.compare-wrap {
  position: relative;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 10px 32px rgba(0,0,0,.04);
  -webkit-overflow-scrolling: touch;
}
table.compare { width: 100%; border-collapse: collapse; min-width: 900px; }
.page-ippan table.compare { min-width: 980px; }
.page-koko table.compare { min-width: 860px; }
.page-sogo table.compare { min-width: 1040px; }
.page-ryugaku table.compare { min-width: 880px; }
.compare th, .compare td {
  padding: 17px 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  font-size: 14px;
}
.page-koko .compare th, .page-koko .compare td { padding: 18px 16px; }
.compare th { background: var(--soft); font-size: 13px; color: #333; letter-spacing: .06em; }
.compare tr:last-child td { border-bottom: none; }
.compare td:first-child { font-weight: 850; color: var(--ink); width: 170px; }
.page-koko .compare td:first-child, .page-ryugaku .compare td:first-child { width: 180px; }
.page-koko .compare td:first-child { font-weight: 800; }
.mark {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 850;
  background: #efefef;
}
.page-koko .mark { font-weight: 800; }
.mark.ok { background: var(--green-2); color: var(--green); }
.mark.info { background: var(--blue-2); color: var(--blue); }
.mark.warn { background: var(--orange-2); color: var(--orange); }
.mark.red { background: var(--red-2); color: var(--red); }
.mark.purple { background: var(--purple-2); color: var(--purple); }
.mark.no { background: #f7e9e9; color: var(--red); }

/* ---------- 比較表：横スクロールヒント（外部ライブラリ不使用） ---------- */
.scroll-hint-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(21,21,21,.82);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity .35s ease;
}
.scroll-hint-badge__arrow {
  display: inline-block;
  font-size: 15px;
  animation: scroll-hint-swing 1.3s ease-in-out infinite;
}
.compare-wrap.is-scrollable .scroll-hint-badge { display: inline-flex; }
.compare-wrap.is-scrollable.hint-visible .scroll-hint-badge { opacity: 1; }
@keyframes scroll-hint-swing {
  0%, 100% { transform: translateX(-3px); }
  50% { transform: translateX(3px); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-hint-badge__arrow { animation: none; }
}

/* ---------- 科目（一般入試） ---------- */
.subject-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.page-ippan .subject-box {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: white;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,.04);
}
.page-ippan .subject-box h3 { margin: 0 0 12px; font-size: 22px; }
.page-ippan .subject-box p { color: #444; margin: 0 0 16px; }
.subject-list { display: grid; gap: 10px; margin-top: 16px; }
.subject-item {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  background: var(--soft);
  border-radius: 14px;
}
.subject-item b { color: var(--blue); }
.subject-item span { font-size: 13px; color: #444; }

/* ---------- ポイント（共通テスト・留学生選抜） ---------- */
.point-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.point-box {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,.04);
}
.point-box h3 { margin: 0 0 10px; font-size: 21px; }
.point-box p { margin: 0; color: #444; font-size: 14px; }

/* ---------- 科目（共通テスト） ---------- */
.page-kyotsu .subject-box {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: white;
  padding: 26px;
  box-shadow: 0 10px 30px rgba(0,0,0,.04);
}
.page-kyotsu .subject-box h3 { margin: 0 0 12px; font-size: 24px; }
.page-kyotsu .subject-box p { color: #444; margin: 0 0 20px; }
.subjects { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.subject-pill {
  padding: 10px 13px;
  border-radius: 999px;
  border: 1px solid #dce7f2;
  background: var(--blue-2);
  color: var(--blue);
  font-weight: 800;
  font-size: 13px;
}
.note-list { display: grid; gap: 10px; margin-top: 20px; }
.note {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  background: var(--soft);
  border-radius: 14px;
  font-size: 14px;
}
.note b { color: var(--blue); }
.note span { color: #444; }

/* ---------- 出願区分・基礎学力テスト（総合型推薦） ---------- */
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.type-box {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,.04);
}
.type-box h3 { margin: 0 0 10px; font-size: 21px; }
.type-box p { margin: 0 0 16px; color: #444; font-size: 14px; }
.type-box .mini {
  padding: 12px;
  background: var(--soft);
  border-radius: 14px;
  color: #444;
  font-size: 13px;
}
.test-box {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: white;
  padding: 26px;
  box-shadow: 0 10px 30px rgba(0,0,0,.04);
}
.test-box h3 { margin: 0 0 12px; font-size: 24px; }
.test-box p { color: #444; margin: 0 0 20px; }
.score-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
.score-card {
  background: var(--soft);
  border-radius: 16px;
  padding: 15px;
  border: 1px solid #e8e8e2;
}
.score-card b { display: block; color: var(--blue); font-size: 14px; }
.score-card span { color: #444; font-size: 13px; }

/* ---------- 提出書類（留学生選抜） ---------- */
.documents-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.doc {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  padding: 16px;
  align-items: start;
}
.doc .icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue-2);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-weight: 900;
}
.doc b { display: block; font-size: 15px; margin-bottom: 2px; }
.doc span { display: block; color: var(--muted); font-size: 13px; }

/* ---------- 出願フロー ---------- */
.flow { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 24px; }
.flow-step {
  position: relative;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 14px;
  min-height: 142px;
}
.page-ippan .flow-step { min-height: 140px; }
.page-koko .flow-step { min-height: 136px; }
.page-ryugaku .flow-step { min-height: 145px; }
.flow-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
  font-weight: 850;
  z-index: 1;
}
.page-koko .flow-step:not(:last-child)::after { font-weight: 800; }
.flow-step b { display: block; font-size: 15px; margin-bottom: 6px; }
.flow-step span { color: var(--muted); font-size: 14px; }

/* ---------- 日程 ---------- */
.timeline { display: grid; gap: 14px; margin-top: 22px; }
.date-row {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: white;
}
.page-ippan .date-row { grid-template-columns: 150px 1fr; }
.page-koko .date-row { grid-template-columns: 180px 1fr; }
.date-row b { color: var(--blue); }
.date-row p { margin: 2px 0 0; color: #444; font-size: 14px; }

/* ---------- 学業特待生・検定料 ---------- */
.scholarship, .fee-box {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 22px;
  align-items: stretch;
}
.scholar-main, .fee-main {
  background: #649ED7;
  color: white;
  border-radius: 30px;
  padding: 30px;
  position: relative;
  overflow: hidden;
}
.scholar-main::after, .fee-main::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  right: -70px;
  bottom: -80px;
}
.scholar-main h3, .fee-main h3 { font-size: clamp(26px, 3vw, 42px); line-height: 1.2; margin: 0 0 14px; }
.scholar-main p, .fee-main p { color: rgba(255,255,255,.76); margin: 0; }
.money, .fee-cards { display: grid; gap: 14px; }
.money-card, .fee-card { border-radius: 24px; border: 1px solid var(--line); background: white; padding: 24px; }
.money-card b, .fee-card b { display: block; font-size: 17px; margin-bottom: 6px; }
.amount {
  font-size: clamp(27px, 4vw, 46px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--blue);
  margin: 10px 0 4px;
}
.amount small { font-size: 16px; font-weight: 800; color: var(--muted); }
.page-koko .amount small { font-weight: 700; }

/* ---------- 折りたたみ詳細 ---------- */
details {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  margin-bottom: 12px;
  overflow: hidden;
}

summary {
  cursor: pointer;
  padding: 18px 56px 18px 20px;
  font-weight: 850;
  list-style: none;
  display: block;
  position: relative;
}

.page-koko summary {
  font-weight: 800;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
}

details[open] summary::after {
  content: "−";
}

.detail-body {
  border-top: 1px solid var(--line);
  padding: 18px 20px 22px;
  color: #444;
  font-size: 14px;
}

.detail-body ul {
  margin: 0;
  padding-left: 1.25em;
}
.detail-body th, .detail-body td {
  padding: 17px 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  font-size: 14px;
}

/* HTML4 の廃止属性(width / cellspacing / cellpadding / align)の置き換え。
   元の属性は「presentational hint」で、下の 640px 以下のカード表示用
   ルールより優先度が低かったため、同じ挙動になるよう 641px 以上に
   限定しています。表示は従来どおりです。 */
@media (min-width: 641px) {
  .detail-body table.bd {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
  }
  .detail-body th.w70,  .detail-body td.w70  { width: 70px; }
  .detail-body th.w100, .detail-body td.w100 { width: 100px; }
  .detail-body th.w150, .detail-body td.w150 { width: 150px; }
  .detail-body th.ta-center, .detail-body td.ta-center { text-align: center; }
}

.ta-right { text-align: right; }

/* ---------- 出題範囲テーブル：スマホ幅でのスタック（カード）表示 ----------
   狭い画面では4列(選考項目/内容/試験時間/配点)が押し縮められ、
   特に「内容」列の説明文が細い列内で何行にも折り返されて縦長になるため、
   一定幅を下回ったらテーブル表示をやめて、行ごとに1枚のカードとして
   積み上げる表示に切り替える。
------------------------------------------------------------------ */
@media (max-width: 640px) {
  .stack-table,
  .stack-table thead,
  .stack-table tbody,
  .stack-table tr,
  .stack-table th,
  .stack-table td {
    display: block;
    width: auto;
  }

  /* 見出し行は視覚的に隠す（読み上げ用にDOMには残す） */
  .stack-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .stack-table tbody tr {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--soft);
    padding: 14px 16px;
    margin-bottom: 12px;
  }
  .stack-table tbody tr:last-child { margin-bottom: 0; }

  .detail-body .stack-table td {
    display: block;
    padding: 6px 0;
    border-bottom: 0;
    font-size: 14px;
  }

  /* 選考項目セルはカードの見出しとして扱う（ラベル文字は不要） */
  .stack-table td.c1 {
    padding-top: 0;
    padding-bottom: 8px;
    font-size: 16px;
    font-weight: 850;
    color: var(--blue);
    border-bottom: 1px solid var(--line);
    margin-bottom: 6px;
  }
  .stack-table td.c1::before { content: none; }

  /* それ以外のセルには列見出しをラベルとして表示 */
  .stack-table td:not(.c1)::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: .04em;
    margin-bottom: 2px;
  }
}

/* ---------- 試験教科・科目表（rowspan/colspanを含む表）：
   スマホ幅での代替カード表示 ----------
   一般選抜の「試験教科・科目」表はセルの結合(rowspan/colspan)を
   多用しており、表をそのままブロック要素に変換すると結合情報が
   失われて崩れてしまう。そのため狭い画面では表自体を隠し、
   ページ上部の「受験科目」セクションと同じ .subject-item カード
   （<b>必須/選択</b> + <span>内容</span>）で同じ内容を代わりに表示する。
   HTML側では、表の直後に .subject-list.mobile-subject-cards を
   セットで用意しておく。
------------------------------------------------------------------ */
@media (max-width: 640px) {
  .examtable { display: none; }
}
@media (min-width: 641px) {
  .mobile-subject-cards { display: none; }
}
.detail-body .mobile-subject-cards {
  margin: 0 0 22px;
}
.detail-body .mobile-subject-cards:last-child {
  margin-bottom: 0;
}

ruby {
  ruby-position: over;
}

ruby rt {
  font-size: 0.5em;
  line-height: 1;
  letter-spacing: 0;
  font-weight: 600;
}

/* ---------- CTA・フッター ---------- */
.cta { margin: 34px 22px 64px; max-width: none; padding: 0; }
.cta-inner {
  max-width: var(--max);
  margin: 0 auto;
  background: linear-gradient(135deg, #f7f7f4, #fff);
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: 34px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  box-shadow: var(--shadow);
}
.cta h2 { font-size: clamp(24px, 3vw, 36px); margin: 0 0 8px; }
.cta p { margin: 0; color: #444; }
.footer {
  border-top: 1px solid var(--line);
  padding: 28px 22px 38px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* ---------- レスポンシブ ---------- */
/* 学校推薦型選抜ページ：iPad系（mini〜Pro、縦横どちらの向きも）でもヒーローを縦積みにする */
@media (max-width: 1200px) {
  .page-koko .hero { grid-template-columns: 1fr; }
}
@media (max-width: 1060px) {
  .page-ippan .cards, .page-sogo .cards { grid-template-columns: repeat(2, 1fr); }
  .page-sogo .score-grid { grid-template-columns: repeat(2, 1fr); }
  .point-grid, .documents-grid { grid-template-columns: 1fr; }
}
@media (max-width: 920px) {
  .nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .section-head { grid-template-columns: 1fr; gap: 10px; }
  .page-kyotsu .cards, .page-koko .cards, .page-ryugaku .cards { grid-template-columns: 1fr; }
  .subject-grid, .type-grid { grid-template-columns: 1fr; }
  .scholarship, .fee-box { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow-step:not(:last-child)::after {
    content: "↓";
    right: auto;
    left: 50%;
    top: auto;
    bottom: -18px;
    transform: translateX(-50%);
  }
  .date-row { grid-template-columns: 1fr; }
  .cta-inner { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .topbar-inner { padding: 12px 16px; }
  .brand span { display: none; }
  .hero, section { padding-left: 16px; padding-right: 16px; }
  .cards, .page-ippan .cards, .page-sogo .cards { grid-template-columns: 1fr; }
  .page-sogo .score-grid { grid-template-columns: 1fr; }
  .hero-card, .scholar-main, .fee-main, .cta-inner { border-radius: 24px; }
  .btn { width: 100%; }
  .subject-item, .note { grid-template-columns: 1fr; }
  .page-koko .compare th, .page-koko .compare td { padding: 14px 12px; }
}

/* 募集要項・出願PDFボタン */
    .pdf-guide-action {
      width: min(100%, 460px);
      margin-top: 18px;
    }

    .pdf-guide-button {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      min-height: 54px;
      padding: 8px 8px 8px 22px;
      border: 2px solid #649ED7;
      border-radius: 999px;
      background: #fff;
      color: #649ED7;
      text-decoration: none;
      font-size: 14px;
      font-weight: 800;
      line-height: 1.4;
      box-shadow: 0 5px 14px rgba(75, 67, 151, .08);
      transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
    }

    .pdf-guide-button__arrow {
      display: grid;
      place-items: center;
      flex: 0 0 36px;
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: #649ED7;
      color: #fff;
      font-size: 20px;
      line-height: 1;
      transition: transform .2s ease;
    }

    .pdf-guide-button:hover {
      background: #f7f6ff;
      box-shadow: 0 9px 20px rgba(75, 67, 151, .16);
      transform: translateY(-2px);
    }

    .pdf-guide-button:hover .pdf-guide-button__arrow {
      transform: translateX(2px);
    }

    .pdf-guide-button:focus-visible {
      outline: 3px solid rgba(75, 67, 151, .28);
      outline-offset: 3px;
    }

    @media (max-width: 560px) {
      .pdf-guide-action {
        width: 100%;
      }

      .pdf-guide-button {
        padding-left: 18px;
        font-size: 13px;
      }
    }

/* ============================================================
   大学サイト共通パーツ（ashikaga.ac.jp/exam_site/ から実測）
   - ヘッダー右上のハンバーガーメニュー（紺 #233f7c）
   - 全画面ナビパネル（黄 #ffff30 / リンク #716c64 / Onest 500）
   - 右側の固定サイドボタン（黄 #ffff30 / 黒文字 / 縦書き）
   ============================================================ */

/* ---- 開くボタン（ヘッダー右上・紺色） ---- */
.topbar .navbar-toggle {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 76.8px;
  background: #233f7c;
  border: 0;
  margin: 0;
  padding: 5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
.topbar .navbar-toggle .icon-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  transition: width .13s ease-out, transform .13s ease-out, opacity .13s ease-out;
}
.topbar .navbar-toggle .icon-bar + .icon-bar { margin-top: 5px; }
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
@media (max-width: 1340px) {
  .topbar-inner { padding-right: 100px; }
}

/* ---- 全画面ナビパネル ---- */
.side-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2000;
  visibility: hidden;
  opacity: 0;
  transition: opacity .3s, visibility .3s;
}
.side-nav.is-open { visibility: visible; opacity: 1; }
.side-nav__scrollable-container {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background: #ffff30;
}
.side-nav__wrap { padding: 60px 30px; }

/* 閉じるボタン（×） */
.side-nav__close-button .navbar-toggle {
  background: none;
  border: 0;
  margin: 0;
  padding: 12px 0;
  display: block;
  cursor: pointer;
}
.side-nav__close-button .icon-bar {
  display: block;
  width: 28px;
  height: 2px;
  background: #716c64;
  transition: width .13s ease-out, transform .13s ease-out, opacity .13s ease-out;
}
.side-nav__close-button .icon-bar:nth-of-type(1) { transform: translateY(7px) rotate(-45deg); }
.side-nav__close-button .icon-bar:nth-of-type(2) { margin-top: 5px; width: 17px; opacity: 0; }
.side-nav__close-button .icon-bar:nth-of-type(3) { margin-top: 5px; transform: translateY(-7px) rotate(45deg); }

/* メニュー本体（既存 .nav のスタイルを打ち消して実サイトの値を適用） */
.side-nav .navbar-nav {
  display: block !important;
  list-style: none;
  margin: 0 0 40px 13px;
  padding: 0;
  font-size: 32px;
  color: #78787f;
}
.side-nav .navbar-nav > li {
  margin: 0 30px;
  border-bottom: 1px solid #716c64;
}
.side-nav .navbar-nav li a {
  display: block;
  padding: 32px 0 3px;
  color: #716c64 !important;
  font-family: "Onest", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: normal;
  text-decoration: none;
  border-bottom: 0;
}
.side-nav .navbar-nav .svg-icon-angle-down {
  float: right;
  fill: #999;
  width: 26px;
  height: 26px;
  margin: 4px 0 0 10px;
  vertical-align: text-top;
}
.side-nav .navbar-nav ul.sub-menu {
  list-style: none;
  margin: 0 0 0 48px;
  padding: 0;
}
.side-nav .navbar-nav .sub-menu li {
  margin: 0;
  border-bottom: 1px solid #78787f;
}
.side-nav .navbar-nav .sub-menu li:last-child { border-bottom: none; }
.side-nav .navbar-nav .sub-menu a { padding: 32px 15px 8px; }

/* ---- 固定サイドボタン ---- */
.top.site-fix-menu-wrap {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 14vh;
  z-index: 10;
}
.top.site-fix-menu-wrap .site-fix-menu {
  width: 100%;
  height: 14vh;
  margin: 0 0 0 auto;
  padding: 0;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  flex-wrap: wrap;
}
.top.site-fix-menu-wrap .site-fix-menu li {
  list-style: none;
  overflow: hidden;
  width: 50%;
  height: 6vh;
}
.top.site-fix-menu-wrap .site-fix-menu li:nth-of-type(1) { border-top: .5px solid #7c7c7c; border-right: .5px solid #7c7c7c; }
.top.site-fix-menu-wrap .site-fix-menu li:nth-of-type(2) { border-top: .5px solid #7c7c7c; }
.top.site-fix-menu-wrap .site-fix-menu li:nth-of-type(3) { border-top: .5px solid #7c7c7c; border-right: .5px solid #7c7c7c; height: 8vh; }
.top.site-fix-menu-wrap .site-fix-menu li:nth-of-type(4) { border-top: .5px solid #7c7c7c; height: 8vh; }
.top.site-fix-menu-wrap .site-fix-menu a {
  display: flex;
  justify-content: center;
  align-items: center;
  color: #000;
  width: 100%;
  height: 100%;
  background: #ffff30;
  font-family: "Hiragino Kaku Gothic Pro", Meiryo, sans-serif;
  font-weight: 500;
  letter-spacing: .2em;
  font-size: 14px;
  line-height: 1.1rem;
  text-align: center;
  text-decoration: none;
}
@media (min-width: 768px) {
  .top.site-fix-menu-wrap {
    width: 6vw;
    height: 88vh;
    top: 14vh;
    right: 0;
    z-index: 20;
  }
  .top.site-fix-menu-wrap .site-fix-menu {
    width: 5.4vw;
    height: 90%;
    flex-direction: column;
    justify-content: space-around;
  }
  .top.site-fix-menu-wrap .site-fix-menu li {
    width: 100%;
    height: 20%;
    border-radius: .8vw 0 0 .8vw;
    border-top: 0;
    border-right: 0;
  }
  .top.site-fix-menu-wrap .site-fix-menu li:nth-of-type(3) { height: 28%; border-top: 0; border-right: 0; }
  .top.site-fix-menu-wrap .site-fix-menu li:nth-of-type(4) { height: 24vh; border-top: 0; }
  .top.site-fix-menu-wrap .site-fix-menu a {
    writing-mode: vertical-rl;
    font-size: 10px;
    line-height: .9rem;
  }
}
@media (min-width: 980px) {
  .top.site-fix-menu-wrap { width: 4vw; }
  .top.site-fix-menu-wrap .site-fix-menu { width: 3.4vw; }
  .top.site-fix-menu-wrap .site-fix-menu a { font-size: 12px; }
}
@media print {
  .top.site-fix-menu-wrap { display: none; }
}

/* ---- サイトフッター（実サイトの内容・配色をそのまま反映） ---- */
.site-footer {
  background: #dcdcdc;
  color: #000;
  margin-top: 40px;
  font-size: 16px;
}
.site-footer .inner-wrap { max-width: none; }
.footer-widgets { padding: 0; }

/* スマホ幅：白背景・2列ボーダー付きグリッド（実サイトの初期表示） */
.footer-section {
  background: #fff;
  border-top: .5px solid #000;
  text-align: center;
}
.footer-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}
.footer-section li {
  width: 50%;
  border-bottom: .5px solid #000;
}
.footer-section li:nth-child(2n+1) { border-right: .5px solid #000; }
.footer-section li:last-child { width: 100%; text-align: center; }
.footer-section a.btnarrow {
  position: relative;
  display: block;
  padding: 1.3em 2em 1.3em 1em;
  color: #000;
  font-size: 11px;
  text-decoration: none;
}
.footer-section a.btnarrow:hover { text-decoration: underline; }
.footer-section a.btnarrow::after {
  content: "＞";
  position: static;
　display: inline-block;
  right: 5px;
  font-size: 11px;
  color: #000;
}

/* PC幅：グレー背景に横並び中央寄せ（実サイトの768px以上と同じ） */
@media (min-width: 768px) {
  .footer-section { background: inherit; border-top: 0; text-align: center; }
  .footer-section ul { display: inline-block; padding: 1.3em 0; }
  .footer-section li {
    display: inline-block;
    width: auto;
    margin-right: 1rem;
    border-bottom: 0;
  }
  .footer-section li:nth-child(2n+1) { border-right: 0; }
  .footer-section li:last-child { width: auto; }
  .footer-section a.btnarrow { display: inline; padding: 0 2em 1em; }
}

.site-info {
  text-align: center;
  padding: 8px 0 24px;
}
.copyright {
  display: block;
  font-size: 11px;
  color: #000;
}
