:root {
  --bg: #140a26;
  --accent: #f3d9ff;
  --btn-a: #c084fc;
  --btn-b: #8b5cf6;
  --err: #ffb3c0;
  --err-border: #ff8fa3;
  --glass: rgba(255, 255, 255, .1);
  --glass-border: rgba(255, 255, 255, .22);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color: #fff;
  background: var(--bg) url(assets/bg-front.jpg) center 30% / cover no-repeat fixed;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(20,10,38,.25) 0%, rgba(20,10,38,.55) 45%, rgba(20,10,38,.92) 100%);
}

.page {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: 28px 18px calc(18px + env(safe-area-inset-bottom));
}

/* 브랜드 */
.brand { text-align: center; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 21px; letter-spacing: .14em; }
.logo img { display: block; }
.tagline { margin: 4px 0 0; font-size: 13px; opacity: .85; }
.launch { text-align: center; font-size: 12px; letter-spacing: .2em; margin: 14px 0 0; opacity: .75; }

/* 장면 1 */
.screen { display: flex; flex-direction: column; flex: 1; }
.hero { text-align: center; margin: 10px 0 2px; }
.hero img { height: 140px; width: auto; filter: drop-shadow(0 14px 24px rgba(0,0,0,.35)); }
.hero.big img { height: 170px; }
.title { text-align: center; font-size: 22px; font-weight: 800; line-height: 1.35; margin: 6px 0 4px; }
.benefit {
  margin: 12px 0 0; border-radius: 14px; padding: 12px 14px; font-size: 13px; line-height: 1.55; text-align: center;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.benefit strong { display: block; font-size: 15px; color: var(--accent); margin-bottom: 2px; }

.card {
  margin-top: 16px;
  border-radius: 20px; padding: 16px;
  background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.phone-field {
  display: flex; align-items: center; height: 50px; border-radius: 12px; padding: 0 14px;
  background: rgba(10,4,24,.6); border: 1.5px solid transparent; font-size: 17px;
}
.phone-field.error { border-color: var(--err-border); }
.phone-field .prefix { opacity: .65; padding-right: 12px; margin-right: 12px; border-right: 1px solid rgba(255,255,255,.5); }
.phone-field input {
  flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: #fff; font-size: 17px; letter-spacing: .06em;
}
.phone-field input::placeholder { color: rgba(255,255,255,.4); font-size: 13px; letter-spacing: 0; }
.error { font-size: 12.5px; color: var(--err); margin: 8px 2px 0; }

.consent { font-size: 13px; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.consent label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.consent input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--btn-a); margin: 0; flex: none; }
.consent hr { border: 0; border-top: 1px solid rgba(255,255,255,.2); margin: 0; }
.consent .link {
  margin-left: auto; background: none; border: 0; color: #fff; opacity: .7; text-decoration: underline;
  font-size: 12.5px; padding: 4px; cursor: pointer; font-family: inherit;
}

.turnstile { margin-top: 10px; min-height: 0; }
.turnstile:not(:empty) { margin-top: 12px; }

.btn {
  width: 100%; margin-top: 12px; height: 50px; border-radius: 14px; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 800; font-size: 16px; color: #fff;
  background: linear-gradient(90deg, var(--btn-a), var(--btn-b));
  box-shadow: 0 8px 24px rgba(139,92,246,.5);
}
.btn:disabled { opacity: .6; cursor: default; }
.btn.share { background: rgba(255,255,255,.14); box-shadow: none; border: 1px solid rgba(255,255,255,.35); font-weight: 700; font-size: 15px; }

/* 장면 3 */
.done { align-items: center; justify-content: center; text-align: center; }
.done h2 { font-size: 26px; font-weight: 800; margin: 16px 0 8px; }
.done p { margin: 0; font-size: 14.5px; line-height: 1.6; opacity: .92; }
.done .num { font-size: 19px; font-weight: 700; color: var(--accent); margin: 12px 0 4px; letter-spacing: .04em; }
.done .muted { opacity: .7; }
.done .btn { margin-top: 26px; }
.share-link {
  margin-top: 10px !important; font-size: 13px; word-break: break-all; opacity: .9;
  user-select: all; -webkit-user-select: all; padding: 10px; border-radius: 10px; background: rgba(10,4,24,.6);
}

/* 하단 */
.foot { text-align: center; margin-top: 18px; font-size: 11px; opacity: .65; line-height: 1.6; }
.foot .ubineeds { margin: 0 0 4px; letter-spacing: .12em; font-size: 10px; }
.foot small { display: block; font-size: 10.5px; }
.foot a { color: #fff; }
.foot .copy { margin-top: 6px; opacity: .8; }

/* 안내창 */
dialog.notice {
  width: min(92vw, 400px); margin: auto; padding: 20px 18px; border: 1px solid rgba(192,132,252,.5); border-radius: 18px;
  background: #1d1033; color: #fff; font-size: 13px; line-height: 1.6;
}
dialog.notice::backdrop { background: rgba(5,2,14,.7); }
dialog.notice h3 { margin: 0 0 12px; text-align: center; font-size: 16px; color: var(--accent); }
dialog.notice p { margin: 6px 0; opacity: .9; }
dialog.notice .small { font-size: 12px; opacity: .8; }
dialog.notice table { width: 100%; border-collapse: collapse; margin: 10px 0; }
dialog.notice th, dialog.notice td { border: 1px solid rgba(255,255,255,.2); padding: 7px 9px; text-align: left; vertical-align: top; }
dialog.notice th { width: 32%; background: rgba(255,255,255,.06); font-weight: 700; }
dialog.notice .btn { height: 44px; font-size: 15px; margin-top: 14px; }

/* 토스트 */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  max-width: 90vw; padding: 12px 16px; border-radius: 12px; font-size: 13.5px; text-align: center;
  background: rgba(30,18,54,.95); border: 1px solid rgba(192,132,252,.5); box-shadow: 0 8px 24px rgba(0,0,0,.4);
  z-index: 10;
}

/* 넓은 화면: 가운데 카드, 양옆 배경 */
@media (min-width: 700px) {
  .page {
    margin: 32px auto; min-height: 0;
    border-radius: 28px; background: rgba(20,10,38,.55);
    border: 1px solid rgba(255,255,255,.12); box-shadow: 0 20px 60px rgba(0,0,0,.4);
    padding: 32px 26px 24px;
  }
}

[hidden] { display: none !important; }
