:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --border: #e6e8ec;
  --text: #1b1f27;
  --text-muted: #626a78;
  --primary: #1f5cff;
  --primary-hover: #1749d6;
  --primary-soft: #eaf0ff;
  --focus: #1f5cff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 24, 32, 0.05), 0 8px 24px rgba(20, 24, 32, 0.06);
  --sticky-height: 72px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo",
    "Malgun Gothic", "Noto Sans KR", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  padding-bottom: calc(var(--sticky-height) + env(safe-area-inset-bottom, 0px));
}

a {
  color: inherit;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
}

.header-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 6px 0;
}

.header-link:hover {
  text-decoration: underline;
}

/* Hero */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 36px 0 40px;
}

.hero-title {
  font-size: 26px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0 0 24px;
}

/* Region selector */
.region-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.region-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.region-card {
  position: relative;
  cursor: pointer;
}

.region-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.region-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.region-name {
  font-size: 16px;
  font-weight: 700;
}

.region-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.region-input:focus-visible + .region-card-body {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.region-input:checked + .region-card-body {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.region-input:checked + .region-card-body .region-name {
  color: var(--primary);
}

/* CTA */
.cta-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-ghost {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--primary);
}

.btn[hidden] {
  display: none;
}

.btn-arrow {
  font-size: 18px;
}

.hero-note {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* Sections */
.guide,
.conditions,
.quick-links {
  padding: 36px 0;
}

.conditions {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin: -10px 0 18px;
}

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step {
  display: flex;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.step-num {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
}

.step-body strong {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}

.step-body p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* Conditions */
.condition-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.condition {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.condition-label {
  font-weight: 700;
  font-size: 14px;
}

.condition-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* Quick links */
.quick-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick-link {
  display: block;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.quick-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.footer-note {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.footer-brand {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.footer-brand a {
  color: var(--primary);
  text-decoration: none;
}

.footer-brand a:hover {
  text-decoration: underline;
}

/* Sticky bar */
.sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 10px 0;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 30;
}

.btn-sticky {
  width: 100%;
}

/* Desktop */
@media (min-width: 640px) {
  .hero-title {
    font-size: 34px;
  }

  .hero {
    padding: 56px 0;
  }

  .region-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .condition-list {
    grid-template-columns: 1fr 1fr;
  }

  .quick-nav {
    grid-template-columns: repeat(3, 1fr);
  }

  .step-body {
    font-size: 15px;
  }
}

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