:root {
  --paper: #f5f1e8;
  --paper-deep: #e9e2d3;
  --ink: #172520;
  --muted: #627069;
  --green: #184f3b;
  --green-dark: #0e3829;
  --lime: #d9f05a;
  --orange: #ff7043;
  --white: #fffdf8;
  --line: #cfc8ba;
  --shadow: 0 18px 50px rgba(23, 37, 32, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 10% 2%, rgba(217, 240, 90, 0.24), transparent 22rem),
    var(--paper);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  line-height: 1.55;
  word-break: keep-all;
}

button, input { font: inherit; }
button { color: inherit; }
button, label, input { -webkit-tap-highlight-color: transparent; }

.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;
}

.topbar {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: var(--lime);
  font-family: Georgia, serif;
}

.local-badge {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.page-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 44px;
  align-items: center;
  min-height: 530px;
  padding: 70px 0 62px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.eyebrow span {
  width: 28px;
  height: 2px;
  background: currentColor;
}

.hero h1 {
  margin: 0;
  font-size: clamp(46px, 6.5vw, 86px);
  line-height: 1.02;
  letter-spacing: -0.075em;
}

.hero h1 em {
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.06em;
}

.hero-description {
  max-width: 570px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.bridge-art {
  position: relative;
  aspect-ratio: 1 / 0.86;
  min-height: 320px;
  overflow: hidden;
  border-radius: 48% 48% 24px 24px;
  background: var(--green);
  box-shadow: var(--shadow);
}

.bridge-art::before {
  content: "";
  position: absolute;
  inset: 62% -15% -30%;
  border-radius: 50% 50% 0 0;
  background: var(--green-dark);
}

.sun {
  position: absolute;
  top: 17%;
  right: 17%;
  width: 88px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 60px rgba(217, 240, 90, 0.2);
}

.cloud {
  position: absolute;
  width: 70px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.8);
}

.cloud::before, .cloud::after {
  content: "";
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  background: inherit;
}

.cloud::before { left: 13px; width: 30px; height: 30px; }
.cloud::after { right: 9px; width: 23px; height: 23px; }
.cloud-one { top: 22%; left: 15%; }
.cloud-two { top: 40%; right: 11%; transform: scale(0.65); opacity: 0.7; }

.bridge-line {
  position: absolute;
  z-index: 2;
  left: 6%;
  right: 6%;
  bottom: 20%;
  height: 35%;
  border-top: 8px solid var(--orange);
  border-radius: 50% 50% 0 0;
}

.bridge-line::after {
  content: "";
  position: absolute;
  top: 20%;
  left: -8%;
  width: 116%;
  border-top: 10px solid var(--orange);
}

.bridge-line i {
  position: absolute;
  top: 4%;
  height: 38%;
  width: 5px;
  background: var(--orange);
}
.bridge-line i:nth-child(1) { left: 10%; }
.bridge-line i:nth-child(2) { left: 30%; }
.bridge-line i:nth-child(3) { left: 50%; }
.bridge-line i:nth-child(4) { left: 70%; }
.bridge-line i:nth-child(5) { left: 90%; }

.bridge-art strong {
  position: absolute;
  z-index: 3;
  left: 7%;
  bottom: 4%;
  color: var(--paper);
  font-family: Georgia, serif;
  font-size: clamp(50px, 8vw, 95px);
  font-style: italic;
  line-height: 1;
  opacity: 0.92;
}

.calculator,
.result-card,
.how-it-works {
  border-radius: 24px;
}

.calculator {
  max-width: 850px;
  margin: 0 auto 24px;
  padding: 42px;
  background: var(--white);
  border: 1px solid rgba(207, 200, 186, 0.75);
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 34px;
}

.step-number {
  display: grid;
  flex: 0 0 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: var(--green-dark);
  font-family: Georgia, serif;
  font-weight: 700;
}

.section-heading h2,
.how-it-works h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
  letter-spacing: -0.055em;
  line-height: 1.2;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.field-group {
  min-width: 0;
  margin: 0;
  padding: 26px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.field-group legend {
  float: left;
  width: 100%;
  margin-bottom: 15px;
  font-size: 14px;
  font-weight: 850;
}

.field-group legend + * { clear: both; }

.date-range {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: end;
}

.date-range label { display: grid; gap: 7px; }
.date-range label span { color: var(--muted); font-size: 12px; font-weight: 700; }

input[type="date"] {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 750;
}

input[type="date"]:focus-visible,
button:focus-visible,
a:focus-visible,
.budget-options input:focus-visible + span,
.switch input:focus-visible + span {
  outline: 3px solid rgba(255, 112, 67, 0.42);
  outline-offset: 3px;
}

.date-arrow { padding-bottom: 13px; color: var(--green); font-weight: 900; }
.field-hint { margin: 10px 0 0; color: var(--muted); font-size: 12px; }

.budget-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
}

.budget-options label { cursor: pointer; }
.budget-options input { position: absolute; opacity: 0; pointer-events: none; }
.budget-options span {
  display: grid;
  min-height: 50px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font-weight: 800;
  transition: 150ms ease;
}

.budget-options input:checked + span {
  border-color: var(--green);
  background: var(--green);
  color: var(--lime);
  box-shadow: inset 0 0 0 1px var(--green);
}

.holiday-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 23px 0;
  border-top: 1px solid var(--line);
}

.holiday-row strong { font-size: 14px; }
.holiday-row p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }

.switch { position: relative; flex: 0 0 auto; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span {
  display: block;
  width: 54px;
  height: 30px;
  padding: 4px;
  border-radius: 999px;
  background: #bbb8ae;
  transition: 150ms ease;
}
.switch span::after {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  transition: 150ms ease;
}
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(24px); }

.error-message {
  margin: 5px 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff0eb;
  color: #a62f12;
  font-size: 13px;
  font-weight: 750;
}

.calculate-button,
.share-button,
.secondary-button {
  min-height: 54px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 850;
  transition: transform 150ms ease, filter 150ms ease;
}

.calculate-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 0 22px;
  background: var(--orange);
  color: #26130d;
  font-size: 16px;
}
.calculate-button span:last-child, .share-button span { font-size: 21px; }
.calculate-button:hover, .share-button:hover, .secondary-button:hover { transform: translateY(-2px); filter: brightness(1.03); }

.result-card {
  max-width: 850px;
  margin: 24px auto;
  padding: 42px;
  overflow: hidden;
  background: var(--green);
  color: var(--white);
  box-shadow: var(--shadow);
}

.result-card[hidden] { display: none; }

.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.eyebrow.light { color: var(--lime); }
.result-header h2 { margin: 0; font-size: clamp(23px, 4vw, 34px); letter-spacing: -0.05em; }
.ticket-stamp {
  display: grid;
  flex: 0 0 64px;
  height: 64px;
  place-items: center;
  border: 1px dashed var(--lime);
  border-radius: 50%;
  color: var(--lime);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  transform: rotate(9deg);
}

.result-main {
  margin: 45px 0 30px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.18);
}
.big-number { display: flex; align-items: baseline; gap: 13px; }
.big-number strong {
  color: var(--lime);
  font-family: Georgia, serif;
  font-size: clamp(82px, 15vw, 132px);
  font-style: italic;
  font-weight: 500;
  line-height: 0.76;
  letter-spacing: -0.08em;
}
.big-number span { font-size: clamp(20px, 4vw, 30px); font-weight: 900; letter-spacing: -0.05em; }
.date-summary { margin: 25px 0 0; color: rgba(255,255,255,0.75); font-weight: 700; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 34px;
}
.stats-grid div {
  padding: 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
}
.stats-grid span { display: block; margin-bottom: 4px; color: rgba(255,255,255,0.62); font-size: 11px; }
.stats-grid strong { color: var(--lime); font-size: 20px; }

.leave-guide h3,
.timeline-heading h3 { margin: 0 0 12px; font-size: 14px; }
.leave-pills { display: flex; flex-wrap: wrap; gap: 8px; min-height: 34px; }
.leave-pill {
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--orange);
  color: #32150c;
  font-size: 12px;
  font-weight: 900;
}
.no-leave { color: rgba(255,255,255,0.7); font-size: 13px; }

.timeline-wrap { margin-top: 30px; }
.timeline-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.legend { display: flex; gap: 12px; color: rgba(255,255,255,0.7); font-size: 10px; }
.legend span::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; }
.legend-leave::before { background: var(--orange); }
.legend-off::before { background: var(--lime); }
.timeline {
  display: flex;
  gap: 7px;
  margin: 0;
  padding: 3px 0 12px;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.3) transparent;
}
.day-card {
  display: grid;
  flex: 0 0 60px;
  min-height: 80px;
  padding: 10px 4px;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 11px;
  background: rgba(255,255,255,0.05);
  text-align: center;
}
.day-card .weekday { color: rgba(255,255,255,0.56); font-size: 10px; }
.day-card strong { font-family: Georgia, serif; font-size: 23px; line-height: 1; }
.day-card small { font-size: 9px; font-weight: 850; }
.day-card.leave { border-color: var(--orange); background: rgba(255,112,67,0.13); }
.day-card.leave small { color: #ff9a7b; }
.day-card.off { border-color: rgba(217,240,90,0.35); }
.day-card.off small { color: var(--lime); }

.holiday-note { min-height: 20px; margin: 14px 0 0; color: rgba(255,255,255,0.62); font-size: 11px; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 9px; margin-top: 28px; }
.secondary-button { padding: 0 14px; border: 1px solid rgba(255,255,255,0.24); background: transparent; color: var(--white); }
.share-button { display: flex; align-items: center; justify-content: space-between; padding: 0 18px; background: var(--lime); color: var(--green-dark); }
.action-status { min-height: 20px; margin: 10px 0 -10px; color: var(--lime); font-size: 12px; text-align: right; }

.how-it-works {
  max-width: 850px;
  margin: 24px auto 80px;
  padding: 42px;
  border: 1px solid var(--line);
}
.how-it-works ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 30px 0; padding: 0; list-style: none; }
.how-it-works li { display: flex; gap: 12px; }
.how-it-works li > b { display: grid; flex: 0 0 29px; height: 29px; place-items: center; border-radius: 50%; background: var(--green); color: var(--lime); font-family: Georgia, serif; font-size: 13px; }
.how-it-works li span { color: var(--muted); font-size: 12px; }
.how-it-works li strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: 14px; }
.dataset-note { margin: 0; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }

footer {
  display: flex;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 38px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.noscript { margin: 0; padding: 14px; background: #fff0eb; color: #a62f12; text-align: center; }

@media (max-width: 760px) {
  .topbar, .page-shell, footer { width: min(100% - 28px, 620px); }
  .topbar { min-height: 66px; }
  .local-badge { display: none; }
  .hero { grid-template-columns: 1fr; gap: 35px; min-height: 0; padding: 56px 0 48px; }
  .hero-description { font-size: 15px; }
  .bridge-art { width: 100%; min-height: 0; aspect-ratio: 1.35 / 1; }
  .calculator, .result-card, .how-it-works { padding: 26px 20px; border-radius: 18px; }
  .section-heading { margin-bottom: 22px; }
  .date-range { grid-template-columns: 1fr; gap: 10px; }
  .date-arrow { display: none; }
  .budget-options { gap: 5px; }
  .budget-options span { min-height: 46px; border-radius: 9px; font-size: 13px; }
  .result-main { margin-top: 38px; }
  .stats-grid { gap: 6px; }
  .stats-grid div { padding: 12px 9px; }
  .stats-grid strong { font-size: 17px; }
  .result-actions { grid-template-columns: 1fr 1fr; }
  .share-button { grid-column: 1 / -1; }
  .how-it-works ol { grid-template-columns: 1fr; }
  footer { gap: 15px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
