/* ============================================================
   별헤는 밤 — 기본 토큰·레이아웃·컴포넌트
   ============================================================ */
:root {
  --bg: #0a0710;
  --bg-2: #120a16;
  --wine: #2a0d1c;
  --wine-2: #46152c;
  --pine: #0c2019;
  --gold: #e6c489;
  --gold-2: #f6e3bb;
  --gold-dim: rgba(230, 196, 137, 0.22);
  --cream: #f8f1e5;
  --ink: #efe6dc;
  --muted: #a294a1;
  --rose: #d98ca6;
  --ok: #9fd3b6;
  --danger: #e2909b;
  --radius: 24px;
  --serif: "Noto Serif KR", "Nanum Myeongjo", "Apple SD Gothic Neo", serif;
  --sans: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  --shadow: 0 24px 60px -34px rgba(0, 0, 0, 0.9);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: break-word;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.68;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(70% 55% at 12% 0%, rgba(94, 27, 55, 0.55), transparent 62%),
    radial-gradient(55% 45% at 88% 12%, rgba(20, 60, 48, 0.4), transparent 60%),
    radial-gradient(80% 60% at 50% 100%, rgba(38, 16, 34, 0.75), transparent 70%),
    linear-gradient(180deg, #0d0712 0%, #0a0710 42%, #080b0c 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

body.is-locked {
  overflow: hidden;
}

#snow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

#app {
  position: relative;
  z-index: 2;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px 72px;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  color: inherit;
}

::selection {
  background: rgba(230, 196, 137, 0.28);
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.ic {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.13em;
  flex: none;
}

.ic--fill {
  fill: currentColor;
  stroke: none;
}

.is-hidden {
  display: none !important;
}

/* ---------------- 상단 네비 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 780px;
  margin: 0 auto;
  padding: 14px 20px 12px;
  background: linear-gradient(180deg, rgba(9, 6, 13, 0.92), rgba(9, 6, 13, 0.55) 70%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.02em;
  color: var(--gold-2);
}

.brand__mark {
  display: inline-flex;
  width: 22px;
  height: 22px;
  color: var(--gold);
}

.brand__mark svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  stroke: none;
}

.nav {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(230, 196, 137, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.navlink {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  transition: 0.2s;
}

.navlink.is-active,
.navlink:hover {
  color: #241509;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
}

/* ---------------- 타이포 ---------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.95;
}

.eyebrow__num {
  padding: 2px 8px;
  border: 1px solid rgba(230, 196, 137, 0.4);
  border-radius: 999px;
  letter-spacing: 0.08em;
  font-size: 11px;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.35;
}

em {
  font-style: normal;
  background: linear-gradient(120deg, #f7e7c3 10%, #e2b46f 55%, #f0d6a4 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------- 버튼 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: none;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-align: center;
}

.btn:active {
  transform: scale(0.985);
}

.btn--gold {
  background: linear-gradient(135deg, #f6e3bb 0%, #e3ba7c 55%, #cfa262 100%);
  color: #241509;
  box-shadow: 0 14px 34px -18px rgba(230, 196, 137, 0.9);
}

.btn--gold:hover {
  box-shadow: 0 18px 40px -16px rgba(230, 196, 137, 0.8);
}

.btn--ghost {
  border-color: rgba(230, 196, 137, 0.32);
  background: rgba(255, 255, 255, 0.035);
  color: var(--cream);
}

.btn--ghost:hover {
  background: rgba(230, 196, 137, 0.1);
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn--lg {
  min-height: 58px;
  font-size: 16.5px;
  border-radius: 18px;
}

.btn.is-disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.25);
}

.btn--sm {
  min-height: 42px;
  padding: 0 16px;
  font-size: 14px;
  border-radius: 12px;
}

.btn svg {
  width: 19px;
  height: 19px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12.5px;
  color: rgba(248, 241, 229, 0.82);
  white-space: nowrap;
}

.chip--gold {
  border-color: rgba(230, 196, 137, 0.42);
  background: rgba(230, 196, 137, 0.11);
  color: var(--gold-2);
}

.kwrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 18px 0 4px;
}

/* ---------------- 홈 ---------------- */
.hero {
  position: relative;
  padding: 54px 4px 34px;
  text-align: center;
}

.hero__ornament {
  position: absolute;
  top: -30px;
  left: 50%;
  width: 300px;
  height: 300px;
  transform: translateX(-50%);
  opacity: 0.55;
  animation: spinSlow 90s linear infinite;
  pointer-events: none;
}

.hero__title {
  margin: 18px 0 16px;
  font-size: clamp(34px, 9vw, 50px);
  line-height: 1.28;
}

.hero__lede {
  color: rgba(248, 241, 229, 0.72);
  font-size: 15.5px;
  line-height: 1.8;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 22px 0 26px;
}

.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid rgba(230, 196, 137, 0.28);
  font-size: 13.5px;
  color: var(--gold-2);
  background: none;
  cursor: pointer;
}

.hero__scroll svg {
  width: 16px;
  height: 16px;
  transform: rotate(90deg);
}

.services {
  display: grid;
  gap: 14px;
  margin: 8px 0 34px;
}

.servicecard {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 16px;
  padding: 22px 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(230, 196, 137, 0.16);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    radial-gradient(120% 100% at 100% 0%, rgba(120, 40, 70, 0.28), transparent 55%);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.servicecard:nth-child(2) {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    radial-gradient(120% 100% at 100% 0%, rgba(22, 74, 58, 0.34), transparent 55%);
}

.servicecard:nth-child(3) {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    radial-gradient(120% 100% at 100% 0%, rgba(52, 40, 90, 0.34), transparent 55%);
}

.servicecard:hover {
  transform: translateY(-2px);
  border-color: rgba(230, 196, 137, 0.36);
}

.servicecard__hanja {
  position: absolute;
  right: -6px;
  bottom: -34px;
  font-family: var(--serif);
  font-size: 130px;
  line-height: 1;
  color: rgba(230, 196, 137, 0.07);
  pointer-events: none;
}

.servicecard__num {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--gold);
  padding-top: 6px;
  width: 26px;
  flex: none;
}

.servicecard__body {
  flex: 1;
  min-width: 0;
}

.servicecard__sub {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(230, 196, 137, 0.85);
}

.servicecard__title {
  margin: 4px 0 8px;
  font-size: 24px;
}

.servicecard__desc {
  font-size: 13.5px;
  color: rgba(248, 241, 229, 0.62);
  line-height: 1.6;
}

.servicecard__tag {
  display: inline-block;
  margin-top: 12px;
  font-size: 11.5px;
  color: rgba(248, 241, 229, 0.45);
  border-left: 2px solid rgba(230, 196, 137, 0.4);
  padding-left: 8px;
}

.servicecard__arrow {
  align-self: center;
  color: rgba(230, 196, 137, 0.6);
  width: 20px;
  height: 20px;
  flex: none;
}

.servicecard__arrow svg {
  width: 20px;
  height: 20px;
}

.home__note,
.home__gift {
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.028);
  padding: 22px;
  margin-bottom: 16px;
}

.home__note h3 {
  font-size: 17px;
  margin-bottom: 14px;
}

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

.steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: rgba(248, 241, 229, 0.72);
}

.steps span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  border: 1px solid rgba(230, 196, 137, 0.35);
  font-size: 11.5px;
  color: var(--gold);
}

.home__gift {
  text-align: center;
  background:
    radial-gradient(100% 140% at 50% 0%, rgba(120, 40, 70, 0.35), transparent 60%),
    rgba(255, 255, 255, 0.03);
}

.home__gift-eyebrow {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 8px;
}

.home__gift p {
  font-size: 14.5px;
  color: rgba(248, 241, 229, 0.78);
  margin-bottom: 14px;
}

/* ---------------- 뷰 헤더 ---------------- */
.view {
  padding-top: 8px;
  animation: fadeUp 0.45s ease both;
}

.viewhead {
  position: relative;
  padding: 26px 0 26px;
}

.viewhead__back {
  position: absolute;
  top: 20px;
  left: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
}

.viewhead__back svg {
  width: 18px;
  height: 18px;
}

.viewhead__body {
  padding-left: 46px;
}

.viewhead__title {
  margin: 10px 0 10px;
  font-size: clamp(30px, 7.6vw, 40px);
}

.viewhead__lede {
  font-size: 14.5px;
  color: rgba(248, 241, 229, 0.65);
  max-width: 34em;
}

.viewnote {
  margin: 18px 0 8px;
  padding: 16px 18px;
  border-left: 2px solid rgba(230, 196, 137, 0.35);
  font-size: 12.5px;
  color: rgba(248, 241, 229, 0.52);
  line-height: 1.7;
}

.viewnote b {
  color: rgba(230, 196, 137, 0.9);
  font-weight: 600;
}

/* ---------------- 카드·폼 ---------------- */
.card {
  border-radius: var(--radius);
  border: 1px solid rgba(230, 196, 137, 0.16);
  background: linear-gradient(158deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  box-shadow: var(--shadow);
  padding: 22px;
  backdrop-filter: blur(6px);
}

.formcard {
  padding: 24px 20px 22px;
}

.birthform {
  display: grid;
  gap: 22px;
}

.field {
  display: grid;
  gap: 10px;
}

.field__label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(248, 241, 229, 0.82);
  letter-spacing: 0.01em;
}

.field__label span {
  font-weight: 400;
  font-size: 11.5px;
  color: var(--muted);
  margin-left: 4px;
}

.field__hint {
  font-size: 11.5px;
  color: rgba(248, 241, 229, 0.45);
  line-height: 1.6;
}

.input,
.select {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 8, 14, 0.55);
  color: var(--cream);
  font-size: 15.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}

.select {
  background-image: linear-gradient(45deg, transparent 50%, rgba(230, 196, 137, 0.7) 50%),
    linear-gradient(135deg, rgba(230, 196, 137, 0.7) 50%, transparent 50%);
  background-position: calc(100% - 18px) 23px, calc(100% - 13px) 23px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.input:focus,
.select:focus {
  border-color: rgba(230, 196, 137, 0.6);
  box-shadow: 0 0 0 4px rgba(230, 196, 137, 0.1);
}

.input::placeholder {
  color: rgba(248, 241, 229, 0.28);
}

.input.is-error {
  border-color: rgba(226, 144, 155, 0.8);
}

.datepick {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr 0.9fr;
  gap: 8px;
}

.datepick--time {
  grid-template-columns: 1fr 1fr;
}

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 8, 14, 0.5);
}

.segmented__item {
  min-height: 44px;
  border: none;
  border-radius: 10px;
  background: none;
  color: rgba(248, 241, 229, 0.6);
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
}

.segmented__item.is-active {
  background: linear-gradient(135deg, rgba(246, 227, 187, 0.95), rgba(214, 172, 112, 0.95));
  color: #241509;
  font-weight: 600;
  box-shadow: 0 6px 18px -10px rgba(230, 196, 137, 0.8);
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(248, 241, 229, 0.68);
  cursor: pointer;
}

.check input {
  width: 18px;
  height: 18px;
  accent-color: #d9b26a;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13.5px;
  color: rgba(248, 241, 229, 0.72);
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch__track {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transition: 0.24s;
  flex: none;
}

.switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(248, 241, 229, 0.85);
  transition: 0.24s;
}

.switch input:checked + .switch__track {
  background: rgba(216, 172, 110, 0.85);
}

.switch input:checked + .switch__track .switch__thumb {
  transform: translateX(20px);
  background: #241509;
}

.formerror {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(226, 144, 155, 0.12);
  border: 1px solid rgba(226, 144, 155, 0.35);
  color: #f0b6bd;
  font-size: 13px;
}

.formfine {
  text-align: center;
  font-size: 11.5px;
  color: rgba(248, 241, 229, 0.35);
}

/* ---------------- 로딩 ---------------- */
.loadingview {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loadingcard {
  text-align: center;
  padding: 40px 24px;
}

.loadingchars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 26px 0 20px;
}

.loadingchars span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 56px;
  border-radius: 12px;
  border: 1px solid rgba(230, 196, 137, 0.25);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--serif);
  font-size: 22px;
  color: var(--gold-2);
  opacity: 0;
  animation: charIn 0.5s ease forwards;
  animation-delay: var(--d, 0s);
}

.loadingcard__text {
  font-size: 14px;
  color: rgba(248, 241, 229, 0.6);
}

.loadingbar {
  width: 180px;
  height: 2px;
  margin: 22px auto 0;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  border-radius: 2px;
}

.loadingbar span {
  display: block;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: loadSlide 1.2s ease-in-out infinite;
}

@keyframes loadSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

@keyframes charIn {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes spinSlow {
  to { transform: translateX(-50%) rotate(360deg); }
}

/* ---------------- 푸터 ---------------- */
.footer {
  position: relative;
  z-index: 2;
  max-width: 780px;
  margin: 0 auto;
  padding: 30px 20px 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(248, 241, 229, 0.4);
  font-size: 11.5px;
  line-height: 1.75;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(230, 196, 137, 0.8);
  font-family: var(--serif);
  font-size: 15px;
  margin-bottom: 12px;
}

.footer__brand .brand__mark {
  width: 16px;
  height: 16px;
}

.footer__note + .footer__note {
  margin-top: 8px;
}

.footer__copy {
  margin-top: 14px;
  opacity: 0.6;
}

/* ---------------- 토스트 ---------------- */
#toast-root {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 200;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  width: calc(100% - 40px);
  max-width: 420px;
  display: flex;
  justify-content: center;
}

#toast-root.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.toast {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: 14px;
  background: rgba(28, 16, 26, 0.96);
  border: 1px solid rgba(230, 196, 137, 0.3);
  box-shadow: 0 20px 50px -24px #000;
  font-size: 13.5px;
  color: var(--cream);
}

.toast svg {
  color: var(--gold);
  width: 18px;
  height: 18px;
}
