:root {
  --td-ink: #17191d;
  --td-muted: #68707b;
  --td-line: #dfe3e8;
  --td-paper: #f4f6f7;
  --td-white: #fff;
  --td-gold: #c99c2e;
  --td-jade: #397d6a;
  --td-coral: #a85f58;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--td-paper); color: var(--td-ink); font-family: "Pretendard", "Apple SD Gothic Neo", sans-serif; }
button, input { font: inherit; }
.td-nav-shell { position: relative; z-index: 50; background: rgba(12,14,16,.95); border-bottom: 1px solid rgba(255,255,255,.08); }
.td-shell { width: min(1160px, calc(100% - 32px)); margin: 0 auto; padding: 92px 0 120px; }
.td-hero { max-width: 820px; margin-bottom: 40px; }
.td-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid rgba(201,156,46,.45); border-radius: 999px; background: #17191d; color: #f1cf73; font: 800 11px/1 "JetBrains Mono", monospace; letter-spacing: .08em; }
.td-hero h1 { margin: 16px 0 14px; font-family: "Noto Serif KR", serif; font-size: clamp(34px, 5vw, 58px); line-height: 1.24; letter-spacing: 0; word-break: keep-all; }
.td-hero p { margin: 0; color: var(--td-muted); font-size: 17px; line-height: 1.8; word-break: keep-all; }
.td-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(310px, .8fr); align-items: start; gap: 24px; }
.td-form { display: grid; gap: 18px; min-width: 0; }
.td-panel { min-width: 0; padding: 28px; border: 1px solid var(--td-line); border-radius: 16px; background: var(--td-white); box-shadow: 0 5px 20px rgba(20,25,30,.04); }
.td-panel__head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 22px; }
.td-step { display: grid; place-items: center; flex: 0 0 27px; width: 27px; height: 27px; border-radius: 50%; background: var(--td-ink); color: #fff; font: 800 12px/1 "JetBrains Mono", monospace; }
.td-panel__head h2 { margin: 0; font-size: 19px; }
.td-panel__head p { margin: 5px 0 0; color: var(--td-muted); font-size: 13px; line-height: 1.6; }
.td-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.td-field { min-width: 0; }
.td-field--full { grid-column: 1 / -1; }
.td-field label, .td-field > span { display: block; margin-bottom: 7px; color: #424850; font-size: 13px; font-weight: 800; }
.td-input { width: 100%; min-height: 50px; padding: 13px 14px; border: 1px solid #ccd2d8; border-radius: 9px; background: #fff; color: #17191d; outline: none; font-size: 16px; font-weight: 650; }
.td-input:focus { border-color: var(--td-jade); box-shadow: 0 0 0 3px rgba(57,125,106,.13); }
.td-static-value { display: flex; align-items: center; width: 100%; min-height: 50px; padding: 13px 14px; border: 1px solid #d7dce1; border-radius: 9px; background: #edf0f2; color: #777f88; font-size: 16px; font-weight: 650; }
.td-segment { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.td-segment--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.td-segment label { position: relative; min-width: 0; }
.td-segment input { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.td-segment span { position: relative; z-index: 1; display: grid; place-items: center; min-height: 44px; padding: 8px 5px; border: 1px solid #ccd2d8; border-radius: 8px; background: #fff; color: #626a74; font-size: 12px; font-weight: 750; text-align: center; cursor: pointer; white-space: nowrap; }
.td-segment input:checked + span { border-color: var(--td-jade); background: #edf7f3; color: #286350; }
.td-segment input:focus-visible + span { outline: 3px solid rgba(57,125,106,.28); outline-offset: 2px; border-color: var(--td-jade); }
.td-time-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.td-unknown { display: flex !important; align-items: center; gap: 7px; min-height: 50px; margin: 0 !important; padding: 0 13px; border: 1px solid #ccd2d8; border-radius: 9px; background: #f8f9fa; cursor: pointer; white-space: nowrap; }
.td-unknown input { width: 17px; height: 17px; accent-color: var(--td-jade); }
.td-unknown input:focus-visible { outline: 3px solid rgba(57,125,106,.28); outline-offset: 2px; }
.td-person { overflow: hidden; padding: 0; }
.td-person[open] { overflow: visible; }
.td-person summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; padding: 19px 22px; cursor: pointer; list-style: none; }
.td-person summary::-webkit-details-marker { display: none; }
.td-person summary:focus-visible { outline: 3px solid rgba(57,125,106,.28); outline-offset: -3px; border-radius: 14px; }
.td-person__identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.td-person__mark { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 9px; color: #fff; font-weight: 900; }
.td-person--father .td-person__mark { background: var(--td-jade); }
.td-person--mother .td-person__mark { background: var(--td-coral); }
.td-person--child .td-person__mark { background: var(--td-gold); color: #221b0c; }
.td-person__identity strong, .td-person__identity span { display: block; }
.td-person__identity strong { font-size: 17px; }
.td-person__identity span { margin-top: 3px; color: var(--td-muted); font-size: 12px; }
.td-person__toggle { flex: 0 0 auto; color: var(--td-muted); font-size: 12px; font-weight: 700; }
.td-person[open] .td-person__toggle { color: var(--td-jade); }
.td-person__body { padding: 4px 22px 24px; border-top: 1px solid #eef0f2; }
.td-role-note { margin: 16px 0 0; padding: 12px 14px; border-radius: 8px; background: #f5f7f8; color: #626a74; font-size: 12px; line-height: 1.65; word-break: keep-all; }
.td-city-field { position: relative; z-index: 4; }
.td-city-field:focus-within { z-index: 20; }
.td-city-list { position: absolute; z-index: 30; top: calc(100% - 1px); right: 0; left: 0; max-height: 220px; margin: 6px 0 0; padding: 6px; overflow-y: auto; border: 1px solid #cfd5da; border-radius: 10px; background: #fff; box-shadow: 0 14px 32px rgba(20,25,30,.16); list-style: none; }
.td-city-list[hidden] { display: none; }
.td-city-list li { padding: 11px 12px; border-radius: 7px; color: #363c44; font-size: 14px; font-weight: 700; cursor: pointer; }
.td-city-list li[aria-selected="true"], .td-city-list li:hover { background: #edf7f3; color: #286350; }
.td-city-list .td-city-list__empty { color: #858c95; cursor: default; text-align: center; }
.td-field-error { margin: 7px 0 0; color: #a64040; font-size: 12px; font-weight: 700; line-height: 1.5; }
.td-input[aria-invalid="true"] { border-color: #b94e4e; box-shadow: 0 0 0 3px rgba(185,78,78,.12); }

.td-side { position: sticky; top: 86px; min-width: 0; }
.td-offer { overflow: hidden; border: 1px solid #292d32; border-radius: 16px; background: #121519; color: #fff; box-shadow: 0 18px 50px rgba(10,14,18,.18); }
.td-offer__top { padding: 26px; border-bottom: 1px solid rgba(255,255,255,.1); background: linear-gradient(145deg, #17130e, #12191d); }
.td-offer__top span { color: #e8c662; font: 800 10px/1 "JetBrains Mono", monospace; letter-spacing: .14em; }
.td-offer__top h2 { margin: 10px 0 8px; font-family: "Noto Serif KR", serif; font-size: 25px; line-height: 1.4; }
.td-offer__top p { margin: 0; color: #aeb3ba; font-size: 13px; line-height: 1.65; word-break: keep-all; }
.td-offer__body { padding: 24px; }
.td-offer__body h3 { margin: 0 0 15px; font-size: 15px; }
.td-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.td-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; min-width: 0; color: #d7d9dc; font-size: 13px; line-height: 1.55; }
.td-list b { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid rgba(229,191,88,.35); border-radius: 50%; color: #e5bf58; font: 700 10px/1 "JetBrains Mono", monospace; }
.td-price { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 24px 0 14px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); }
.td-price > span { color: #8d939b; font-size: 12px; }
.td-price strong { font-size: 28px; }
.td-price strong span { display: inline; color: inherit; font-size: inherit; }
.td-cta { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; border: 0; border-radius: 9px; background: #e5bf58; color: #17130a; font-weight: 900; cursor: pointer; }
.td-cta:focus-visible, .td-promo-apply:focus-visible, .td-promo summary:focus-visible { outline: 3px solid rgba(229,191,88,.38); outline-offset: 3px; }
.td-cta:disabled { cursor: wait; opacity: .72; }
.td-discount-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px 0 12px; padding: 10px 12px; border: 1px solid rgba(90,184,142,.25); border-radius: 8px; background: rgba(49,121,90,.14); color: #aee2c9; font-size: 12px; font-weight: 800; }
.td-discount-row[hidden] { display: none; }
.td-promo { margin-top: 12px; border-top: 1px solid rgba(255,255,255,.1); }
.td-promo summary { padding: 13px 2px 4px; color: #aeb3ba; font-size: 12px; font-weight: 750; text-align: center; cursor: pointer; list-style-position: inside; }
.td-promo[open] summary { color: #e5bf58; }
.td-promo__body { padding-top: 11px; }
.td-promo__body > label { display: block; margin-bottom: 7px; color: #c8cbd0; font-size: 12px; font-weight: 800; }
.td-promo__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.td-promo .td-input { min-height: 44px; padding: 10px 12px; border-color: #3c4249; background: #1b1f24; color: #fff; font-size: 14px; text-transform: uppercase; }
.td-promo .td-input::placeholder { color: #777f88; text-transform: none; }
.td-promo .td-input:focus { border-color: #e5bf58; box-shadow: 0 0 0 3px rgba(229,191,88,.12); }
.td-promo-apply { min-width: 64px; min-height: 44px; padding: 0 14px; border: 1px solid #e5bf58; border-radius: 8px; background: transparent; color: #e5bf58; font-size: 13px; font-weight: 850; cursor: pointer; }
.td-promo-apply:disabled { cursor: wait; opacity: .65; }
.td-promo-status { margin: 8px 0 0; padding: 9px 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 7px; background: rgba(255,255,255,.05); color: #c5c9ce; font-size: 11px; line-height: 1.5; }
.td-promo-status[hidden] { display: none; }
.td-promo-status[data-tone="success"] { border-color: rgba(90,184,142,.3); background: rgba(49,121,90,.14); color: #aee2c9; }
.td-promo-status[data-tone="error"] { border-color: rgba(212,104,104,.35); background: rgba(142,49,49,.16); color: #f0b8b8; }
.td-legal { margin: 13px 0 0; color: #858b93; font-size: 11px; line-height: 1.6; text-align: center; word-break: keep-all; }
.td-mobile-cta { display: none; }

@media (max-width: 900px) {
  .td-layout { grid-template-columns: 1fr; }
  .td-side { position: static; }
}

@media (max-width: 640px) {
  .td-shell { width: min(100% - 20px, 1160px); padding: 68px 0 108px; }
  .td-hero { margin-bottom: 26px; }
  .td-hero h1 { font-size: 34px; }
  .td-hero p { font-size: 15px; }
  .td-panel { padding: 21px 17px; border-radius: 12px; }
  .td-grid-2 { grid-template-columns: 1fr; }
  .td-field--full { grid-column: auto; }
  .td-person { border-radius: 12px; }
  .td-person summary { min-height: 70px; padding: 16px; }
  .td-person__body { padding: 4px 16px 20px; }
  .td-segment span { font-size: 11px; }
  .td-side { display: none; }
  .td-mobile-cta { position: fixed; z-index: 60; right: 0; bottom: 0; left: 0; display: block; padding: 11px max(12px, env(safe-area-inset-right)) calc(11px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); border-top: 1px solid #d9dde2; background: rgba(255,255,255,.97); box-shadow: 0 -10px 30px rgba(20,25,30,.08); backdrop-filter: blur(12px); }
  .td-mobile-cta__main { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; }
  .td-mobile-cta__main > div > span, .td-mobile-cta strong { display: block; }
  .td-mobile-cta__main > div > span { color: var(--td-muted); font-size: 11px; }
  .td-mobile-cta strong { margin-top: 2px; font-size: 20px; }
  .td-mobile-cta strong span { display: inline; color: inherit; font-size: inherit; }
  .td-mobile-cta .td-cta { width: auto; min-height: 48px; padding: 0 18px; white-space: nowrap; }
  .td-mobile-cta .td-discount-row { margin: 9px 0 0; border-color: #cce6da; background: #edf8f3; color: #286350; }
  .td-promo--mobile { margin-top: 7px; border-top-color: #e5e8eb; }
  .td-promo--mobile summary { padding: 6px 0 0; color: #626a74; text-align: right; }
  .td-promo--mobile[open] summary { color: #286350; }
  .td-promo--mobile .td-promo__body { padding-top: 9px; }
  .td-promo--mobile .td-promo__body > label { color: #424850; }
  .td-promo--mobile .td-input { border-color: #ccd2d8; background: #fff; color: #17191d; }
  .td-promo--mobile .td-input:focus { border-color: var(--td-jade); box-shadow: 0 0 0 3px rgba(57,125,106,.13); }
  .td-promo--mobile .td-promo-apply { border-color: #286350; background: #286350; color: #fff; }
  .td-promo--mobile .td-promo-status { border-color: #dfe3e8; background: #f5f7f8; color: #626a74; }
  .td-promo--mobile .td-promo-status[data-tone="success"] { border-color: #cce6da; background: #edf8f3; color: #286350; }
  .td-promo--mobile .td-promo-status[data-tone="error"] { border-color: #edcaca; background: #fff2f2; color: #a64040; }
}

@media (min-width: 641px) {
  .td-promo--mobile { display: none; }
}
