:root {
  --cherry-700: #8f1730;
  --cherry-600: #b4233c;
  --cherry-100: #fbe7eb;
  --navy-900: #12263f;
  --navy-700: #1f3a5f;
  --navy-100: #e9eef4;
  --ivory-50: #fff9f0;
  --surface: #ffffff;
  --text-muted: #526071;
  --border: #d8dee8;
  --success: #1f6b4f;
  --warning: #9a5b13;
  --focus: #0b63ce;
  --shadow-sm: 0 8px 24px rgba(18, 38, 63, .08);
  --shadow-lg: 0 28px 70px rgba(18, 38, 63, .16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --content: 1120px;
  --reading: 680px;
  --font-body: 1rem;
  --font-support: .8125rem;
  --line-body: 1.65;
  --target-min: 44px;
  --mobile-cta-reserve: calc(4lh + env(safe-area-inset-bottom));
  --mobile-cta-reserve-zoom: calc(8lh + env(safe-area-inset-bottom));
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  color: var(--navy-900);
  background:
    radial-gradient(circle at 90% 4%, rgba(251, 231, 235, .95), transparent 28rem),
    linear-gradient(180deg, var(--ivory-50) 0, #fffdf9 48rem, var(--surface) 100%);
  font-family: Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: var(--font-body);
  line-height: var(--line-body);
  text-wrap: pretty;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
button, input, textarea { font: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 1000; background: var(--navy-900); color: #fff; padding: 12px 16px; }
.skip-link:focus { top: 12px; }
.shell { width: min(calc(100% - 32px), var(--content)); margin-inline: auto; }
.reading { max-width: var(--reading); }
.eyebrow { margin: 0 0 var(--space-3); color: var(--cherry-700); font-size: var(--font-support); font-weight: 800; letter-spacing: .02em; }
h1, h2, h3 { margin: 0; letter-spacing: -.035em; line-height: 1.28; text-wrap: balance; }
h1 { font-size: clamp(2rem, 6vw, 3.55rem); font-weight: 850; }
h2 { font-size: clamp(1.65rem, 4vw, 2.45rem); font-weight: 820; }
h3 { font-size: 1.15rem; font-weight: 780; }
p { margin: 0; }
.lead { margin-top: var(--space-5); color: var(--navy-700); font-size: clamp(1.05rem, 2vw, 1.2rem); }
.muted { color: var(--text-muted); }
.small { font-size: .875rem; }
.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; }

.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(216, 222, 232, .85); background: rgba(255, 249, 240, .92); backdrop-filter: blur(16px); }
.site-header__inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.brand { min-height: var(--target-min); text-decoration: none; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.brand strong { font-size: 1rem; letter-spacing: -.02em; }
.brand span { color: var(--text-muted); font-size: var(--font-support); }
a[href^="tel:"]:not(.btn) { min-height: var(--target-min); display: inline-flex; align-items: center; }
.site-nav { display: flex; gap: var(--space-2); align-items: center; }
.site-nav a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: var(--radius-sm); color: var(--navy-700); font-size: .875rem; font-weight: 700; text-decoration: none; }
.site-nav a:hover { background: var(--navy-100); }

.hero { padding: clamp(48px, 9vw, 104px) 0 var(--space-16); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); gap: clamp(32px, 7vw, 80px); align-items: center; }
.hero__copy { max-width: 720px; }
.hero__title-mark { color: var(--cherry-600); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.proof-list { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: var(--space-8) 0 0; padding: 0; list-style: none; }
.proof-list li { display: flex; align-items: center; gap: var(--space-2); color: var(--navy-700); font-size: .875rem; font-weight: 700; }
.proof-list li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(31,107,79,.12); }
.hero__panel { position: relative; padding: var(--space-8); border: 1px solid rgba(255,255,255,.65); border-radius: var(--radius-lg); background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(233,238,244,.88)); box-shadow: var(--shadow-lg); overflow: hidden; }
.hero__video-frame { position: relative; aspect-ratio: 16 / 9; margin: calc(var(--space-8) * -1) calc(var(--space-8) * -1) var(--space-6); overflow: hidden; background: var(--navy-900); }
.hero__video, .hero__video-poster { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.hero__video-poster { display: none; }
.hero__panel::after { content: ""; position: absolute; width: 180px; height: 180px; right: -72px; bottom: -80px; border-radius: 50%; background: radial-gradient(circle, rgba(180,35,60,.22), rgba(180,35,60,0) 70%); pointer-events: none; }
.hero__panel-label { color: var(--cherry-700); font-size: var(--font-support); font-weight: 800; }
.hero__panel-title { margin-top: var(--space-2); font-size: 1.45rem; }
.hero__panel ol { margin: var(--space-6) 0 0; padding: 0; list-style: none; counter-reset: hero-step; display: grid; gap: var(--space-4); }
.hero__panel li { counter-increment: hero-step; display: grid; grid-template-columns: 32px 1fr; gap: var(--space-3); align-items: start; }
.hero__panel li::before { content: counter(hero-step); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--navy-900); color: #fff; font-size: var(--font-support); font-weight: 800; }

.section { padding: clamp(64px, 9vw, 104px) 0; }
.section--tint { background: linear-gradient(180deg, rgba(233,238,244,.46), rgba(255,255,255,.72)); border-block: 1px solid rgba(216,222,232,.7); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: var(--space-6); margin-bottom: var(--space-10); }
.section-head p { max-width: 520px; color: var(--text-muted); }
.grid { display: grid; gap: var(--space-5); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card { padding: var(--space-6); border: 1px solid var(--border); border-radius: var(--radius-md); background: rgba(255,255,255,.94); box-shadow: var(--shadow-sm); }
.card__label { color: var(--cherry-700); font-size: var(--font-support); font-weight: 800; }
.card h3 { margin-top: var(--space-2); }
.card p { margin-top: var(--space-3); color: var(--text-muted); }
.card--selected { border-color: var(--cherry-600); box-shadow: 0 0 0 3px var(--cherry-100), var(--shadow-sm); }
.card--quiet { box-shadow: none; background: rgba(255,255,255,.72); }

.btn { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); border: 1px solid transparent; border-radius: 12px; padding: 11px 20px; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: linear-gradient(135deg, var(--cherry-600), var(--cherry-700)); color: #fff; box-shadow: 0 10px 24px rgba(180,35,60,.24); }
.btn--primary:hover { background: var(--cherry-700); }
.btn--secondary { background: var(--surface); color: var(--cherry-700); border-color: var(--cherry-600); }
.btn--secondary:hover { background: var(--cherry-100); }
.btn--quiet { color: var(--navy-700); border-color: var(--border); background: rgba(255,255,255,.74); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--wide { width: 100%; }

.choice-group { border: 0; padding: 0; margin: 0; }
.choice-group legend { margin-bottom: var(--space-3); font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip { min-height: var(--target-min); border: 1px solid var(--border); border-radius: 999px; padding: 9px 15px; color: var(--navy-700); background: var(--surface); font-weight: 750; cursor: pointer; transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease); }
.chip:hover { background: var(--navy-100); }
.chip[aria-pressed="true"], .chip--selected { color: var(--cherry-700); border-color: var(--cherry-600); background: var(--cherry-100); }

.diagnosis { display: grid; grid-template-columns: .9fr 1.1fr; gap: var(--space-8); align-items: start; }
.diagnosis__form { display: grid; gap: var(--space-6); }
.result { min-height: 100%; padding: var(--space-8); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--navy-900); color: #fff; box-shadow: var(--shadow-lg); }
.result .eyebrow { color: #f8b8c6; }
.result p { margin-top: var(--space-4); color: #e5edf6; }
.result ul { margin: var(--space-5) 0 0; padding-left: 1.2rem; }
.result__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.result .btn--secondary { border-color: rgba(255,255,255,.7); background: transparent; color: #fff; }
.result[hidden] { display: none; }

.timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.step { position: relative; padding: var(--space-6); border-top: 4px solid var(--border); background: rgba(255,255,255,.76); }
.step--current { border-color: var(--cherry-600); }
.step__time { color: var(--cherry-700); font-size: var(--font-support); font-weight: 850; }
.step h3 { margin-top: var(--space-2); }
.step p { margin-top: var(--space-2); color: var(--text-muted); font-size: .9rem; }

.link-card { min-height: 100%; display: flex; flex-direction: column; }
.link-card .btn { margin-top: auto; align-self: flex-start; }
.source-note { margin-top: var(--space-3); color: var(--text-muted); font-size: var(--font-support); }
.source-note a { color: var(--navy-700); font-weight: 750; }

.faq-list { display: grid; gap: var(--space-3); }
details { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
summary { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-5); font-weight: 780; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--cherry-600); font-size: 1.35rem; }
details[open] summary::after { content: "−"; }
.details-body { padding: 0 var(--space-5) var(--space-5); color: var(--text-muted); }

.notice { padding: var(--space-4); border-left: 4px solid var(--navy-700); background: var(--navy-100); color: var(--navy-900); }
.notice--warning { border-color: var(--warning); background: #fff4dc; }
.notice--success { border-color: var(--success); background: #e8f4ef; }
.notice--error { border-color: var(--cherry-700); background: var(--cherry-100); }

.field { display: grid; gap: var(--space-2); }
.field label { font-size: .9rem; font-weight: 780; }
.field input, .field textarea { width: 100%; min-height: 48px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--navy-900); padding: 11px 13px; }
.field textarea { min-height: 100px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(11,99,206,.13); outline: 0; }
.field__help { color: var(--text-muted); font-size: var(--font-support); }
.field__error { color: var(--cherry-700); font-size: var(--font-support); font-weight: 700; }
.field--error input { border-color: var(--cherry-700); }

.admin-shell { width: min(calc(100% - 32px), 860px); margin: var(--space-12) auto; }
.admin-header { display: flex; justify-content: space-between; gap: var(--space-4); align-items: center; margin-bottom: var(--space-8); }
.admin-card { padding: clamp(20px, 5vw, 40px); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-lg); }
.admin-form { display: grid; gap: var(--space-5); }
.admin-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.admin-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.generated-link { margin-top: var(--space-5); padding: var(--space-4); border: 1px dashed var(--navy-700); background: var(--navy-100); word-break: break-all; }
.pin-box { max-width: 440px; margin: 14vh auto 0; }

.site-footer { padding: var(--space-12) 0 120px; border-top: 1px solid var(--border); background: var(--navy-900); color: #dce6f1; }
.site-footer__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); }
.site-footer a { color: #fff; }

.bottom-bar { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; display: none; gap: var(--space-2); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--surface); box-shadow: 0 -8px 24px rgba(18,38,63,.12); backdrop-filter: blur(12px); }
.bottom-bar .btn { flex: 1; min-width: 0; padding-inline: 12px; font-size: var(--font-body); white-space: normal; }
html.text-zoom body { padding-bottom: 0; }
html.text-zoom .bottom-bar { position: static; flex-direction: column; width: auto; margin-inline: 16px; margin-bottom: 16px; }

.dialog { width: min(calc(100% - 32px), 560px); max-height: min(80vh, 680px); border: 0; border-radius: var(--radius-lg); padding: 0; box-shadow: var(--shadow-lg); }
.dialog::backdrop { background: rgba(18,38,63,.58); backdrop-filter: blur(4px); }
.dialog__head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); padding: var(--space-5); border-bottom: 1px solid var(--border); }
.dialog__close { flex: 0 0 var(--target-min); width: var(--target-min); height: var(--target-min); border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--navy-900); font-size: 1.25rem; cursor: pointer; }
.dialog__body { padding: var(--space-5); overflow: auto; }

:where(.hero__copy, .hero__panel, .section-head > *, .card, .step, .result, .field, .dialog__head > h2, .dialog__body) { min-width: 0; }

@media (max-width: 900px) {
  .site-nav a:not(.nav-cta) { display: none; }
  .hero__grid, .diagnosis { grid-template-columns: 1fr; }
  .hero__panel { max-width: 620px; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .timeline { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 640px) {
  html { scroll-padding-top: 72px; scroll-padding-bottom: calc(var(--mobile-cta-reserve) + var(--space-4)); }
  body { padding-bottom: var(--mobile-cta-reserve); }
  h1 { font-size: 26px; }
  h2 { font-size: 21px; }
  :where(a, button, input, textarea, summary, [tabindex]):focus-visible { scroll-margin-block-end: calc(var(--mobile-cta-reserve) + var(--space-4)); }
  .shell { width: min(calc(100% - 32px), var(--content)); }
  .brand span { display: none; }
  .nav-cta { display: none !important; }
  .hero { padding-top: 44px; padding-bottom: 56px; }
  .hero__actions { display: grid; }
  .hero__actions .btn { width: 100%; }
  .hero__panel { padding: var(--space-6); }
  .section { padding: 64px 0; }
  .section-head { align-items: start; flex-direction: column; margin-bottom: var(--space-8); }
  .grid--2, .grid--3, .timeline, .admin-form__grid, .site-footer__grid { grid-template-columns: 1fr; }
  .card { padding: var(--space-5); }
  .result { padding: var(--space-6); }
  .bottom-bar { display: flex; min-height: 72px; }
  .site-footer { padding-bottom: 40px; }
  .admin-header { align-items: start; flex-direction: column; }
}

@media (max-width: 320px) {
  html { scroll-padding-bottom: calc(var(--mobile-cta-reserve-zoom) + var(--space-4)); }
  body { padding-bottom: var(--mobile-cta-reserve-zoom); }
  :where(a, button, input, textarea, summary, [tabindex]):focus-visible { scroll-margin-block-end: calc(var(--mobile-cta-reserve-zoom) + var(--space-4)); }
  .bottom-bar { flex-direction: column; }
  .bottom-bar .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero__video { display: none; }
  .hero__video-poster { display: block; }
}
