:root {
  color-scheme: light;
  --paper: #f7f5ed;
  --surface: #fffdf8;
  --ink: #132640;
  --muted: #4d5e70;
  --navy: #112b52;
  --navy-deep: #102745;
  --blue: #174bad;
  --blue-dark: #103880;
  --blue-soft: #e9effb;
  --gold: #e6c77e;
  --gold-ink: #745317;
  --line: #dcded8;
  --focus: #ac5200;
  --width: 72rem;
  --gutter: clamp(1rem, 3.7vw, 2.75rem);
  --radius: 1rem;
  --body: system-ui, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", sans-serif;
}

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

html { min-width: 0; }

body {
  margin: 0;
  min-width: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img, svg { max-width: 100%; }
img { display: block; height: auto; }
button, input, select { font: inherit; }
button { color: inherit; }
a { color: var(--blue-dark); text-underline-offset: .23em; }
a:hover { text-decoration-thickness: .12em; }
[hidden] { display: none !important; }

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

h1, h2, h3, p { margin-block: 0; }
h1, h2, h3 { line-height: 1.24; letter-spacing: -.037em; }

h1, h2, h3, p, li, dd, dt {
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.skip-link {
  position: fixed;
  z-index: 3;
  top: .75rem;
  left: .75rem;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .5rem 1rem;
  transform: translateY(calc(-100% - 1.5rem));
  border-radius: .5rem;
  background: var(--navy);
  color: white;
}

.skip-link:focus { transform: none; }

.site-header { border-bottom: 1px solid var(--line); }

.header-inner, .site-main, .footer-inner {
  width: min(100% - var(--gutter) * 2, var(--width));
  margin-inline: auto;
}

.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
}

.header-inner { min-height: 4.75rem; }

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.brand-logo { display: block; width: 134px; height: auto; }

.header-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  flex-shrink: 0;
  color: var(--blue-dark);
  font-size: .86rem;
  font-weight: 740;
}

.site-main { min-height: 58vh; padding-block: 2rem clamp(3.5rem, 8vw, 6.5rem); }

.page-kicker {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: var(--blue-dark);
  font-size: .78rem;
  font-weight: 820;
  letter-spacing: .085em;
}

.page-kicker::before {
  content: "";
  width: 1.45rem;
  height: 2px;
  flex: 0 0 1.45rem;
  background: #a27724;
}

.page-lead { max-width: 38rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.65rem; }

.kit-home {
  --kit-navy: #102f49;
  --kit-blue: #005ca9;
  --kit-muted: #45596c;
  --kit-gold: #926322;
  --kit-line: #d9e3ea;
  --kit-gutter: 20px;
  background: #f7f6f1;
  color: var(--kit-navy);
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  line-height: 1.5;
}

.kit-home :is(.header-inner, .site-main, .footer-inner) {
  width: min(100% - var(--kit-gutter) * 2, 29rem);
}

.kit-home .site-header, .kit-home .site-footer { border: 0; background: transparent; }
.kit-home .header-inner { min-height: 71px; gap: 1rem; }
.kit-home .site-main { min-height: 0; padding-block: 0; }
.kit-edition {
  color: var(--kit-muted);
  font: 700 .625rem/1.3 Arial, sans-serif;
  letter-spacing: .095em;
  text-align: right;
}

.kit-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: 210px;
  padding: 18px;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid #e2e4d9;
  border-radius: 19px;
  background: #f9f7ee;
}

.kit-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 36%;
  content: "";
  background: url("/assets/campus-illustration.webp") 48% 45% / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 1%, #000 53%);
  mask-image: linear-gradient(90deg, transparent 1%, #000 53%);
}

.kit-hero h1 { font-size: clamp(1.875rem, 8.4vw, 2.4375rem); letter-spacing: -.086em; line-height: 1.15; }
.kit-hero h1 span { color: var(--kit-blue); }
.kit-hero p { margin-top: 13px; color: #6c5127; font-size: .75rem; font-weight: 700; }
.kit-guide { display: grid; gap: 8px; }
.kit-guide-card { min-width: 0; border: 1px solid #d9e6f0; border-radius: 12px; background: #e7f0f7; }
.kit-guide-city { border-color: #eadfc9; background: #f3ebdd; }

.kit-guide-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 65px;
  padding: 9px 13px 9px 15px;
  border-radius: inherit;
  cursor: pointer;
  list-style: none;
}
.kit-guide-card summary::-webkit-details-marker { display: none; }
.kit-guide-card summary::after {
  content: "";
  flex: 0 0 8px;
  height: 8px;
  margin-right: 4px;
  border-right: 2px solid var(--kit-blue);
  border-bottom: 2px solid var(--kit-blue);
  transform: rotate(45deg) translateY(-2px);
}
.kit-guide-city summary::after { border-color: var(--kit-gold); }
.kit-guide-card[open] summary::after { transform: rotate(225deg) translate(-2px, -1px); }
.kit-guide-card summary:focus-visible { outline: 2px solid var(--kit-blue); outline-offset: -3px; }
.kit-guide-card strong, .kit-guide-card small { display: block; }
.kit-guide-card strong { letter-spacing: -.035em; }
.kit-guide-card small { color: var(--kit-muted); font-size: .75rem; }
.kit-guide-detail { margin: 0 8px 8px; padding: 13px; border-radius: 8px; background: #fffdfa; font-size: .875rem; }
.kit-guide-detail p { margin-bottom: 10px; }
.kit-guide-detail .kit-guide-button { display: flex; justify-content: flex-start; gap: .65rem; width: 100%; text-align: start; }
.kit-guide-button + .kit-guide-button { margin-top: .5rem; }
.kit-guide-emoji {
  flex: none;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 1.18em;
  line-height: 1;
}
.kit-campus-illustration { width: min(100%, 255px); margin: 0 auto 10px; border-radius: 6px; }
.kit-home .footer-inner {
  display: block;
  min-height: 0;
  margin-top: 18px;
  padding: 12px 0 24px;
  border-top: 1px solid var(--kit-line);
  color: var(--kit-muted);
  font-size: .6875rem;
}

@media (max-width: 350px) {
  .kit-home { --kit-gutter: 14px; }
  .kit-hero { min-height: 190px; padding-inline: 14px; }
}

@media (min-width: 48rem) {
  .kit-home :is(.header-inner, .site-main, .footer-inner) { width: min(100% - var(--kit-gutter) * 2, 48rem); }
  .kit-hero { min-height: 276px; padding-inline: 2rem; }
  .kit-hero h1 { font-size: 3.2rem; }
  .kit-hero p { font-size: .875rem; }
}

.section { margin-top: clamp(2rem, 5.6vw, 4.5rem); }

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .45rem 1rem;
  margin-bottom: 1.1rem;
}

.section-heading h2, h2.section-heading {
  color: var(--navy);
  font-size: clamp(1.45rem, 2.8vw, 2rem);
}

.section-heading p { color: var(--muted); font-size: .95rem; }

.content-grid, .list-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel, .result-card, .empty-state {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.page-hero {
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(1.2rem, 3.5vw, 2.6rem) clamp(1.05rem, 4.7vw, 3.75rem);
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: linear-gradient(110deg, var(--surface) 48%, #edf1fa);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .3rem .7rem;
  margin: 0 0 .85rem;
  padding: 0;
  color: var(--muted);
  font-size: .85rem;
}

.breadcrumbs :is(ul, ol) { display: flex; flex-wrap: wrap; gap: .3rem .7rem; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li + li::before { content: "/"; margin-right: .6rem; color: var(--muted); }
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.page-title { margin-top: .55rem; color: var(--navy); font-size: clamp(2rem, 5.6vw, 3.8rem); font-weight: 820; letter-spacing: -.055em; }
.page-lead { margin-top: .85rem; font-size: clamp(1rem, 1.6vw, 1.12rem); }

.panel, .result-card, .empty-state { padding: clamp(1rem, 2.6vw, 1.7rem); }
.panel > :not(:first-child), .result-card > :not(:first-child) { margin-block-start: .75rem; }
.panel-title, .result-card h2, .result-card h3 { color: var(--navy); font-size: clamp(1.2rem, 2.1vw, 1.48rem); }
.muted { color: var(--muted); }
.result-card a:not(.button) { font-weight: 740; }
.result-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .65rem; color: var(--muted); font-size: .875rem; }
.result-card img, .panel img { width: 100%; border-radius: .65rem; }

.tag, .pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: .25rem .66rem;
  border-radius: 100vw;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: .8rem;
  font-weight: 730;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.pill { border: 1px solid #ded6c3; background: #f7f0db; color: var(--gold-ink); }

.filters {
  display: grid;
  gap: .7rem;
  padding: clamp(.95rem, 2.5vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.filter-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.filter-group + .filter-group { padding-top: .5rem; border-top: 1px solid var(--line); }
.filter-label, .filter-group > legend { padding: 0; margin-bottom: .35rem; color: var(--navy); font-size: .86rem; font-weight: 790; }
.filter-options { display: flex; flex-wrap: wrap; gap: .45rem; }

.filter-option {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 2.75rem;
  max-width: 100%;
  padding: .38rem .82rem;
  border: 1px solid #c7cfd9;
  border-radius: 100vw;
  background: var(--surface);
  color: var(--navy);
  font-size: .86rem;
  font-weight: 650;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.filter-option:hover { border-color: var(--blue-dark); background: var(--blue-soft); }
.filter-option:is(.is-active, [aria-pressed="true"], [aria-selected="true"], [aria-current="true"], [aria-current="page"], :has(input:checked)),
input:checked + .filter-option {
  border-color: var(--navy);
  background: var(--navy);
  color: white;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px white;
}

:is(.filter-option:has(input:focus-visible), input:focus-visible + .filter-option) { outline: 3px solid var(--focus); outline-offset: 3px; }

.results-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .5rem 1rem;
  margin-block: 1rem .65rem;
  color: var(--muted);
}

.results-bar a, .results-bar button { min-height: 2.75rem; }
.empty-state { margin-block: 1rem; }
.empty-state p { margin: .5rem 0 .85rem; color: var(--muted); }

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
}

.steps {
  display: grid;
  gap: .7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: .8rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: var(--surface);
}

.step-number {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: .45rem;
  background: var(--navy);
  color: white;
  font-variant-numeric: tabular-nums;
  font-size: .875rem;
  font-weight: 800;
}

.step h2, .step h3 { color: var(--navy); }
.step p { margin-top: .35rem; color: var(--muted); }

.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr));
  gap: .55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quick-links a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .5rem .8rem;
  border: 1px solid #d5e1f5;
  border-radius: .65rem;
  background: #f2f5fc;
  color: var(--blue-dark);
  font-weight: 720;
  text-decoration: none;
}

.quick-links a:hover { border-color: var(--blue-dark); text-decoration: underline; }
.text-link { font-weight: 740; }
.panel .text-link, .results-bar .text-link { display: inline-flex; align-items: center; min-height: 2.75rem; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .45rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  max-width: 100%;
  padding: .62rem 1rem;
  border: 1px solid transparent;
  border-radius: .62rem;
  background: transparent;
  font-size: .92rem;
  font-weight: 760;
  line-height: 1.32;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}

.button-primary { border-color: var(--blue); background: var(--blue); color: white; }
.button-primary:hover { border-color: var(--blue-dark); background: var(--blue-dark); }
.button-secondary { border-color: #aab9d6; background: var(--surface); color: var(--blue-dark); }
.button-secondary:hover { border-color: var(--blue-dark); background: var(--blue-soft); }

.site-footer { border-top: 1px solid var(--line); background: #eeece2; }
.footer-inner { min-height: 5.5rem; padding-block: .85rem; color: var(--muted); font-size: .86rem; }
.footer-inner a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 700; }

@media (max-width: 43rem) {
  .site-main { padding-top: 1rem; }
  .header-inner { min-height: 4.15rem; }
  .content-grid, .list-grid, .split-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 32rem) {
  .section-heading { display: block; }
  .section-heading p { margin-top: .4rem; }
  .footer-inner { flex-wrap: wrap; }
}

@media (max-width: 23rem) {
  .header-inner { gap: .5rem; }
  .header-link { font-size: .8rem; }
  .hero-actions .button { flex-grow: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}
