:root {
  --prep-ink: #10233f;
  --prep-muted: #607086;
  --prep-blue: #0d5799;
  --prep-blue-dark: #073968;
  --prep-green: #16834a;
  --prep-green-dark: #0d6537;
  --prep-yellow: #f6bd2f;
  --prep-coral: #e96a56;
  --prep-mint: #eef8f0;
  --prep-sky: #eef7ff;
  --prep-line: #d5e2ea;
  --prep-paper: #ffffff;
  --prep-bg: #fbfcf8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.school-prep-page {
  margin: 0;
  color: var(--prep-ink);
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,252,246,.88) 55%, #fff),
    var(--prep-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Sans", Meiryo, sans-serif;
  font-size: 18px;
  line-height: 1.76;
}

.prep-topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 13px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--prep-line);
  background: rgba(255,255,255,.97);
}

.prep-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--prep-ink);
  text-decoration: none;
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 950;
  letter-spacing: 0;
}

.prep-brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--prep-green), #7ab648);
  font-size: 24px;
  font-weight: 950;
}

.prep-nav {
  display: flex;
  gap: 22px;
  font-size: 16px;
  font-weight: 850;
}

.prep-nav a {
  color: var(--prep-ink);
  text-decoration: none;
}

.prep-search {
  display: flex;
  align-items: center;
  width: min(330px, 28vw);
  height: 44px;
  border: 1px solid var(--prep-line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.prep-search input {
  min-width: 0;
  flex: 1;
  height: 100%;
  border: 0;
  padding: 0 14px;
  font-size: 15px;
  outline: none;
}

.prep-search button {
  width: 58px;
  height: 44px;
  border: 0;
  color: #fff;
  background: var(--prep-blue-dark);
  font-size: 16px;
  font-weight: 950;
}

.prep-hero {
  padding: clamp(34px, 5vw, 70px) clamp(18px, 4vw, 56px) 28px;
}

.prep-hero-grid {
  max-width: 1510px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(520px, 1fr);
  gap: clamp(28px, 4vw, 58px);
  align-items: start;
}

.prep-breadcrumb {
  color: var(--prep-blue);
  font-size: 16px;
  font-weight: 850;
}

.prep-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-top: 24px;
  padding: 5px 14px;
  border-radius: 999px;
  background: #e9f4ff;
  color: var(--prep-blue);
  font-size: 16px;
  font-weight: 950;
}

.prep-hero h1 {
  margin: 18px 0 12px;
  color: var(--prep-ink);
  font-size: clamp(48px, 5.4vw, 86px);
  line-height: 1.1;
  letter-spacing: 0;
  font-weight: 950;
}

.prep-subtitle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--prep-ink);
  font-size: clamp(22px, 2vw, 32px);
  line-height: 1.3;
  font-weight: 950;
}

.prep-checkmark {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--prep-green);
  font-size: 17px;
}

.prep-answer {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 22px;
  align-items: center;
  max-width: 820px;
  min-height: 92px;
  margin: 20px 0 16px;
  padding: 18px 22px;
  border-radius: 8px;
  background: linear-gradient(90deg, #edf8ef, #f8fcf7);
}

.prep-answer-label {
  display: grid;
  place-items: center;
  min-height: 54px;
  border-radius: 8px;
  background: var(--prep-green);
  color: #fff;
  font-size: 20px;
  font-weight: 950;
}

.prep-answer strong {
  color: var(--prep-green-dark);
  font-size: clamp(25px, 2vw, 34px);
  line-height: 1.25;
}

.prep-answer p {
  margin: 4px 0 0;
  color: #415167;
  font-size: 16px;
  font-weight: 700;
}

.prep-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 22px;
}

.prep-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 13px;
  border: 1px solid #b8d5e9;
  border-radius: 999px;
  background: #fff;
  color: var(--prep-blue);
  font-size: 15px;
  font-weight: 850;
}

.prep-tags span.warn {
  border-color: #f0c1b8;
  background: #fff4f1;
  color: #b94230;
}

.prep-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 820px;
}

.prep-action {
  min-height: 132px;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 38px;
  gap: 16px;
  align-items: center;
  padding: 22px;
  border: 2px solid #cfdbe2;
  border-radius: 8px;
  background: #fff;
  color: var(--prep-ink);
  text-decoration: none;
  box-shadow: 0 16px 38px rgba(15,52,91,.08);
}

.prep-action.primary {
  border-color: var(--prep-green);
  background: linear-gradient(135deg, var(--prep-green), #137442);
  color: #fff;
}

.prep-action-icon,
.prep-mini-icon,
.prep-step-icon {
  display: grid;
  place-items: center;
  font-weight: 950;
}

.prep-action-icon {
  width: 60px;
  height: 60px;
  border: 2px solid currentColor;
  border-radius: 14px;
  color: inherit;
  font-size: 29px;
}

.prep-action b {
  display: block;
  font-size: clamp(24px, 1.9vw, 32px);
  line-height: 1.25;
  white-space: nowrap;
}

.prep-action p {
  margin: 6px 0 0;
  color: inherit;
  opacity: .86;
  font-size: 17px;
  line-height: 1.55;
  font-weight: 700;
}

.prep-action-arrow {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  background: var(--prep-blue-dark);
  font-size: 28px;
  font-weight: 950;
  justify-self: end;
}

.prep-action.primary .prep-action-arrow {
  color: var(--prep-green);
  background: #fff;
}

.prep-panel {
  border: 1px solid var(--prep-line);
  border-radius: 8px;
  padding: 22px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 18px 46px rgba(29,66,35,.08);
}

.prep-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.prep-panel-head h2,
.prep-section-head h2,
.prep-side-card h2 {
  margin: 0;
  color: var(--prep-ink);
  font-size: clamp(24px, 2vw, 31px);
  line-height: 1.3;
  letter-spacing: 0;
}

.prep-save {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #e0ad24;
  border-radius: 999px;
  color: #7c5400;
  background: #fff8df;
  font-size: 14px;
  font-weight: 900;
}

.prep-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
  border: 1px solid var(--prep-line);
  border-radius: 8px;
  overflow: hidden;
}

.prep-tabs span {
  min-height: 46px;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--prep-line);
  color: var(--prep-ink);
  background: #fff;
  font-size: 16px;
  font-weight: 900;
}

.prep-tabs span:last-child { border-right: 0; }
.prep-tabs span.active {
  color: #fff;
  background: var(--prep-blue-dark);
}

.prep-checklist {
  border: 1px solid var(--prep-line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.prep-check-row {
  display: grid;
  grid-template-columns: 44px 1fr 110px 86px 28px;
  gap: 14px;
  align-items: center;
  min-height: 66px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--prep-line);
}

.prep-check-row:last-child { border-bottom: 0; }

.prep-mini-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--prep-blue);
  background: var(--prep-sky);
  font-size: 18px;
}

.prep-check-row b {
  display: block;
  color: #233650;
  font-size: 17px;
  line-height: 1.35;
}

.prep-check-row em {
  display: block;
  color: var(--prep-muted);
  font-style: normal;
  font-size: 14px;
  font-weight: 700;
}

.prep-qty {
  display: inline-grid;
  place-items: center;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid #8ccb9d;
  border-radius: 999px;
  color: var(--prep-green-dark);
  background: #f1fbf3;
  font-size: 16px;
  font-weight: 950;
  white-space: nowrap;
}

.prep-status {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #666;
  background: #f1f1f1;
  font-size: 14px;
  font-weight: 900;
}

.prep-box {
  width: 22px;
  height: 22px;
  border: 2px solid #b9c7cd;
  border-radius: 5px;
  background: #fff;
}

.prep-panel-note {
  margin: 12px 0 0;
  color: var(--prep-muted);
  text-align: center;
  font-size: 15px;
  font-weight: 750;
}

.prep-primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin: 14px auto 0;
  width: min(390px, 100%);
  border-radius: 8px;
  color: #fff;
  background: var(--prep-blue-dark);
  text-decoration: none;
  font-size: 18px;
  font-weight: 950;
}

.prep-shell {
  max-width: 1510px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 56px) 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
}

.prep-section,
.prep-side-card {
  border: 1px solid var(--prep-line);
  border-radius: 8px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 12px 34px rgba(29,66,35,.05);
}

.prep-section {
  margin-bottom: 18px;
  padding: clamp(22px, 3vw, 32px);
}

.prep-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.prep-section-head p {
  margin: 0;
  color: var(--prep-muted);
  font-size: 16px;
  font-weight: 750;
}

.prep-step-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.prep-step-card {
  min-height: 178px;
  padding: 22px;
  border: 1px solid var(--prep-line);
  border-radius: 8px;
  background: #fff;
}

.prep-step-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border-radius: 50%;
  color: #fff;
  background: var(--prep-green);
  font-size: 21px;
}

.prep-step-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.36;
}

.prep-step-card p {
  margin: 0;
  color: #425269;
  font-size: 17px;
  line-height: 1.62;
  font-weight: 650;
}

.prep-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--prep-line);
  border-radius: 8px;
  background: #fff;
}

.prep-table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
}

.prep-table th,
.prep-table td {
  padding: 15px 16px;
  border-right: 1px solid var(--prep-line);
  border-bottom: 1px solid var(--prep-line);
  vertical-align: top;
  font-size: 16px;
}

.prep-table th {
  color: var(--prep-blue-dark);
  background: #f2f8ff;
  font-weight: 950;
}

.prep-table td {
  color: #33455d;
  font-weight: 650;
}

.prep-table tr:last-child td { border-bottom: 0; }
.prep-table th:last-child,
.prep-table td:last-child { border-right: 0; }

.prep-point {
  margin-top: 14px;
  padding: 14px 18px;
  border: 1px solid #ebc85b;
  border-radius: 8px;
  background: #fff9e8;
  color: #6c510b;
  font-size: 16px;
  font-weight: 800;
}

.prep-danger {
  border-color: #f0c6c0;
  background: #fff8f6;
}

.prep-danger h2 {
  margin: 0 0 12px;
  color: #b43b2a;
  font-size: clamp(26px, 2.2vw, 34px);
}

.prep-danger ul,
.prep-ref-list,
.prep-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.prep-danger li,
.prep-ref-list li {
  position: relative;
  margin: 9px 0;
  padding-left: 20px;
  color: #34465d;
  font-weight: 750;
}

.prep-danger li::before,
.prep-ref-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .75em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--prep-coral);
}

.prep-side-sticky {
  position: sticky;
  top: 18px;
}

.prep-side-card {
  margin-bottom: 18px;
  padding: 20px;
}

.prep-toc a,
.prep-ref-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 0;
  border-bottom: 1px solid var(--prep-line);
  color: var(--prep-ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 850;
}

.prep-toc li:last-child a,
.prep-ref-list li:last-child a { border-bottom: 0; }

.prep-school-note {
  border-color: #e2b437;
  background: #fff8e2;
}

.prep-school-note strong {
  display: block;
  color: #7e5600;
  font-size: 22px;
  line-height: 1.35;
}

.prep-school-note p {
  margin: 8px 0 14px;
  color: #564817;
  font-size: 16px;
  font-weight: 700;
}

.ad-slot {
  display: grid;
  place-items: center;
  min-height: 94px;
  margin: 18px 0;
  border: 1px dashed #cedce4;
  border-radius: 8px;
  background: rgba(255,255,255,.72);
  color: #7f8d99;
  font-size: 14px;
  font-weight: 850;
}

.prep-footer {
  padding: 32px 18px 44px;
  text-align: center;
  border-top: 1px solid var(--prep-line);
  background: #fff;
  color: var(--prep-muted);
  font-size: 15px;
}

.prep-footer a {
  color: var(--prep-blue);
  text-decoration: none;
  font-weight: 850;
}

@media (max-width: 1180px) {
  .prep-nav { display: none; }
  .prep-search { width: min(320px, 40vw); }
  .prep-hero-grid,
  .prep-shell { grid-template-columns: 1fr; }
  .prep-side-sticky {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .prep-side-card { margin-bottom: 0; }
}

@media (max-width: 760px) {
  body.school-prep-page { font-size: 17px; }
  .prep-topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }
  .prep-search { width: 100%; }
  .prep-hero { padding-top: 28px; }
  .prep-hero h1 { font-size: clamp(40px, 11vw, 56px); }
  .prep-subtitle { font-size: 21px; }

  .prep-answer,
  .prep-actions,
  .prep-step-flow,
  .prep-side-sticky {
    grid-template-columns: 1fr;
  }

  .prep-answer-label {
    min-height: 48px;
  }

  .prep-action {
    min-height: 116px;
    grid-template-columns: 54px 1fr 22px;
    padding: 18px;
  }

  .prep-action b { font-size: 24px; }
  .prep-panel { padding: 16px; }

  .prep-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .prep-tabs span:nth-child(2) { border-right: 0; }
  .prep-tabs span:nth-child(-n+2) { border-bottom: 1px solid var(--prep-line); }

  .prep-check-row {
    grid-template-columns: 38px 1fr;
    gap: 10px;
  }
  .prep-qty,
  .prep-status,
  .prep-box {
    grid-column: 2;
    justify-self: start;
  }

  .prep-section { padding: 20px; }
  .prep-section-head { display: block; }
  .prep-section-head p { margin-top: 8px; }

  .prep-table-wrap { overflow-x: visible; }
  .prep-table { min-width: 0; }
  .prep-table thead { display: none; }
  .prep-table,
  .prep-table tbody,
  .prep-table tr,
  .prep-table td {
    display: block;
    width: 100%;
  }
  .prep-table tr { border-bottom: 1px solid var(--prep-line); }
  .prep-table tr:last-child { border-bottom: 0; }
  .prep-table td {
    border-right: 0;
    padding: 13px 14px;
  }
  .prep-table td:first-child {
    color: var(--prep-blue-dark);
    background: #f2f8ff;
    font-weight: 950;
  }
}
