:root {
  --bg: #120d2b;
  --bg2: #1a1340;
  --panel: rgba(32, 25, 72, .72);
  --panel-solid: #1f1846;
  --line: rgba(233, 185, 95, .22);
  --line-soft: rgba(255, 255, 255, .08);
  --gold: #e9b95f;
  --gold2: #ffd98e;
  --jade: #49d3bd;
  --coral: #ff7a8a;
  --violet: #9b7bff;
  --sky: #5fb4ff;
  --text: #f1ecff;
  --muted: #a69dcb;
  --dim: #6f6799;
  --radius: 20px;
  --serif: 'Fraunces', 'Noto Serif KR', serif;
  --sans: 'Inter', 'Noto Sans KR', system-ui, -apple-system, sans-serif;
  --mono: 'Space Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(155, 123, 255, .25), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(73, 211, 189, .12), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, #0d0922 100%);
  background-color: var(--bg);
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.stars {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .55;
  background-image:
    radial-gradient(1px 1px at 10% 20%, #fff, transparent),
    radial-gradient(1px 1px at 30% 70%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 60% 15%, var(--gold2), transparent),
    radial-gradient(1px 1px at 80% 50%, #fff, transparent),
    radial-gradient(1px 1px at 45% 40%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 90% 85%, #fff, transparent),
    radial-gradient(1px 1px at 15% 90%, var(--gold2), transparent),
    radial-gradient(1px 1px at 70% 92%, #fff, transparent);
}
button { font-family: inherit; }
[hidden] { display: none !important; }

/* ── Top bar ── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px max(16px, calc((100vw - 1180px) / 2));
  background: rgba(18, 13, 43, .78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.seal {
  width: 38px; height: 38px; display: grid; place-items: center;
  font-family: var(--serif); font-weight: 900; font-size: 22px; color: #fff;
  background: linear-gradient(135deg, #c8323f, #8e1b2a);
  border-radius: 9px; box-shadow: 0 0 0 2px rgba(255,255,255,.12) inset, 0 6px 18px rgba(200,50,63,.35);
  transform: rotate(-4deg);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-family: var(--serif); font-size: 18px; letter-spacing: -.02em; }
.brand-text small { font-family: var(--mono); font-size: 9.5px; color: var(--gold); letter-spacing: .2em; }
.engine { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.engine i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); animation: pulse 1.2s infinite; }
.engine.ok i { background: var(--jade); box-shadow: 0 0 10px var(--jade); animation: none; }
.engine.fail i { background: var(--coral); box-shadow: 0 0 10px var(--coral); animation: none; }
@keyframes pulse { 50% { opacity: .3; } }

/* ── Ads ── */
.ad-wrap { position: relative; z-index: 1; padding: 14px 16px 0; display: flex; justify-content: center; }
.ad-slot {
  display: grid; place-items: center; text-align: center;
  border: 1px dashed rgba(255,255,255,.16);
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 10px, transparent 10px 20px);
  border-radius: 12px; color: var(--dim);
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
}
.ad-leader { width: 100%; max-width: 728px; height: 90px; }
.ad-rect { width: 100%; max-width: 760px; min-height: 120px; margin: 8px 0 28px; }
.ad-inline { width: 100%; min-height: 110px; margin: 28px 0; }
.ad-sky { width: 300px; height: 600px; }

/* ── Layout ── */
.layout {
  position: relative; z-index: 1;
  max-width: 1180px; margin: 0 auto; padding: 0 16px;
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px;
}
main { min-width: 0; max-width: 820px; width: 100%; justify-self: center; }
.side { padding-top: 28px; }
.side .ad-sky { position: sticky; top: 84px; }
@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
}

/* ── Hero ── */
.hero { text-align: center; padding: 44px 0 28px; }
.eyebrow { display: inline-block; margin: 0 0 14px; padding: 6px 14px; font-size: 12.5px; color: var(--gold); border: 1px solid var(--line); border-radius: 99px; letter-spacing: .04em; }
.hero h1 { font-family: var(--serif); font-weight: 900; font-size: clamp(28px, 6vw, 48px); line-height: 1.25; letter-spacing: -.03em; margin: 0 0 16px; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--gold2), var(--gold), var(--coral));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { color: var(--muted); font-size: clamp(14.5px, 2.4vw, 16.5px); margin: 0 auto 22px; max-width: 620px; }
.lead b { color: var(--jade); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chips li { font-size: 13px; padding: 7px 13px; border-radius: 99px; background: rgba(255,255,255,.05); border: 1px solid var(--line-soft); }
.chips span { margin-right: 4px; }
@media (max-width: 640px) { .br-d { display: none; } }

/* ── Card ── */
.card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 34px);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(10px);
  margin-bottom: 24px;
}
.step + .step { margin-top: 30px; padding-top: 28px; border-top: 1px solid var(--line-soft); }
.step-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 18px; }
.step-head .num { font-family: var(--mono); font-size: 13px; color: var(--bg); background: var(--gold); padding: 1px 8px; border-radius: 6px; font-weight: 700; }
.step-head h2 { font-family: var(--serif); font-size: 21px; margin: 0; }
.step-head small { color: var(--muted); font-size: 13px; }
.field { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 12px; margin-bottom: 14px; }
.field label { font-size: 14px; color: var(--muted); }
@media (max-width: 520px) { .field { grid-template-columns: 1fr; gap: 8px; } }

.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button {
  flex: 1 1 0; min-width: 70px;
  padding: 12px 10px; font-size: 15px; font-weight: 500; color: var(--text);
  background: rgba(255,255,255,.04); border: 1px solid var(--line-soft); border-radius: 12px;
  cursor: pointer; transition: .18s;
}
.seg button span { margin-right: 6px; color: var(--gold); }
.seg button:hover { border-color: var(--line); background: rgba(233,185,95,.06); }
.seg button.on { background: linear-gradient(135deg, rgba(233,185,95,.24), rgba(255,122,138,.14)); border-color: var(--gold); box-shadow: 0 0 0 3px rgba(233,185,95,.12); }
.seg.ages button { flex: 1 1 calc(33.33% - 8px); }
@media (min-width: 640px) { .seg.ages button { flex: 1 1 0; } }

.photo-zone {
  border: 1.5px dashed var(--line); border-radius: 16px; min-height: 260px;
  display: grid; place-items: center; text-align: center; padding: 20px;
  background: radial-gradient(circle at 50% 40%, rgba(233,185,95,.06), transparent 70%);
  transition: .2s;
}
.photo-zone.drag { border-color: var(--jade); background: rgba(73,211,189,.08); }
.photo-empty p { color: var(--muted); font-size: 14px; margin: 10px 0 16px; }
.face-guide { width: 110px; height: 128px; fill: none; stroke: var(--gold); stroke-width: 1.6; opacity: .75; }
.face-guide .g { stroke: var(--jade); stroke-dasharray: 3 4; stroke-width: 1; }
.photo-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.photo-preview { position: relative; }
.photo-preview canvas { max-width: 100%; max-height: 360px; border-radius: 12px; display: block; }
.chg { position: absolute; right: 10px; bottom: 10px; font-size: 12.5px; padding: 7px 12px; border-radius: 99px; border: 0; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 20px; font-size: 15px; font-weight: 700; border-radius: 12px; cursor: pointer;
  border: 1px solid transparent; transition: .18s; color: var(--text); text-decoration: none;
}
.btn.ghost { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.btn.ghost:hover { background: rgba(255,255,255,.12); }
.btn.primary { background: linear-gradient(135deg, var(--gold2), var(--gold) 45%, #e58a5a); color: #2a1a05; box-shadow: 0 10px 30px -10px rgba(233,185,95,.7); }
.btn.primary:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; filter: grayscale(.4); }
.btn.big { width: 100%; margin-top: 30px; padding: 18px; flex-direction: column; gap: 2px; font-size: 18px; }
.btn.big small { font-size: 12px; font-weight: 500; opacity: .75; }
.privacy { text-align: center; font-size: 12.5px; color: var(--dim); margin: 14px 0 0; }

/* ── Scan ── */
.scan { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: center; }
@media (max-width: 680px) { .scan { grid-template-columns: 1fr; } }
.scan-stage { position: relative; border-radius: 14px; overflow: hidden; background: #000; }
.scan-stage canvas { display: block; width: 100%; height: auto; }
.scan-line {
  position: absolute; left: 0; right: 0; height: 3px; top: 0;
  background: linear-gradient(90deg, transparent, var(--jade), transparent);
  box-shadow: 0 0 24px 6px rgba(73,211,189,.55);
  animation: scanY 1.8s ease-in-out infinite alternate;
}
@keyframes scanY { to { top: calc(100% - 3px); } }
.scan-corners i { position: absolute; width: 26px; height: 26px; border: 3px solid var(--gold); }
.scan-corners i:nth-child(1) { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.scan-corners i:nth-child(2) { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.scan-corners i:nth-child(3) { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.scan-corners i:nth-child(4) { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.scan-title { font-family: var(--serif); font-size: 24px; font-weight: 900; margin: 0 0 4px; }
.scan-step { color: var(--jade); font-family: var(--mono); font-size: 13.5px; margin: 0 0 14px; min-height: 22px; }
.progress { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--jade), var(--gold)); transition: width .25s; }
.scan-log { list-style: none; padding: 0; margin: 16px 0 0; font-family: var(--mono); font-size: 12px; color: var(--muted); max-height: 190px; overflow: hidden; }
.scan-log li { padding: 3px 0; border-bottom: 1px dotted rgba(255,255,255,.07); display: flex; justify-content: space-between; gap: 10px; animation: fadeIn .3s; }
.scan-log li b { color: var(--gold2); font-weight: 400; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } }

/* ── Result ── */
.r-hero {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(28px, 6vw, 48px) clamp(18px, 4vw, 34px);
  border-radius: var(--radius);
  background:
    radial-gradient(600px 300px at 50% 0%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 70%),
    linear-gradient(180deg, #241b55, #170f38);
  border: 1px solid var(--line);
  margin-bottom: 24px;
}
.r-hero::after {
  content: attr(data-hanja); position: absolute; right: -10px; bottom: -36px;
  font-family: var(--serif); font-weight: 900; font-size: 130px; color: rgba(255,255,255,.035); white-space: nowrap; pointer-events: none;
}
.r-label { font-size: 13px; color: var(--gold); letter-spacing: .14em; margin: 0 0 8px; }
.r-type { display: flex; justify-content: center; gap: clamp(4px, 1.5vw, 10px); margin: 0 0 10px; }
.r-type span {
  font-family: var(--serif); font-weight: 900; font-size: clamp(52px, 14vw, 96px); line-height: 1;
  background: linear-gradient(180deg, #fff 20%, var(--c));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: pop .6s cubic-bezier(.2,1.6,.4,1) backwards;
  filter: drop-shadow(0 6px 20px color-mix(in srgb, var(--c) 40%, transparent));
}
.r-type span:nth-child(2) { animation-delay: .08s; } .r-type span:nth-child(3) { animation-delay: .16s; } .r-type span:nth-child(4) { animation-delay: .24s; }
@keyframes pop { from { opacity: 0; transform: scale(.3) translateY(20px); } }
.r-nick { font-family: var(--serif); font-size: clamp(22px, 5vw, 30px); font-weight: 900; margin: 0; }
.r-nick small { display: block; font-size: 14px; color: var(--muted); font-weight: 500; margin-top: 2px; letter-spacing: .3em; }
.r-hook { max-width: 560px; margin: 16px auto 22px; font-size: clamp(15px, 2.6vw, 17px); color: #fff; }
.r-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: rgba(255,255,255,.07); border: 1px solid var(--line-soft); font-size: 14px; }
.badge b { color: var(--gold2); }

.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } }

.sec-title { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 19px; font-weight: 900; margin: 0 0 16px; }
.sec-title .tag { font-family: var(--mono); font-size: 10.5px; font-weight: 400; color: var(--jade); border: 1px solid rgba(73,211,189,.4); padding: 1px 7px; border-radius: 5px; letter-spacing: .08em; }

.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs button { flex: 1; padding: 8px; font-size: 13px; border-radius: 9px; border: 1px solid var(--line-soft); background: transparent; color: var(--muted); cursor: pointer; }
.tabs button.on { background: rgba(233,185,95,.14); color: var(--gold2); border-color: var(--line); }
.sketch-wrap { border-radius: 14px; overflow: hidden; background: #000; }
.sketch-wrap canvas { width: 100%; height: auto; display: block; }
.sketch-cap { font-family: var(--mono); font-size: 11px; color: var(--dim); margin: 8px 0 0; text-align: center; }

.axis { margin-bottom: 18px; }
.axis-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.axis-top .l, .axis-top .r { color: var(--dim); }
.axis-top .win { color: var(--text); font-weight: 700; }
.axis-top b { font-family: var(--serif); font-size: 17px; margin-right: 3px; }
.axis-bar { position: relative; height: 12px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.axis-bar i { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: var(--c); transition: width 1.1s cubic-bezier(.2,.8,.2,1); width: 0; }
.axis-bar::after { content: ''; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: rgba(255,255,255,.3); }
.axis-pct { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.radar svg { width: 100%; height: auto; max-width: 360px; display: block; margin: 0 auto; }
.radar text { font-family: var(--sans); }

.ogwan { width: 100%; border-collapse: collapse; font-size: 14px; }
.ogwan td { padding: 9px 4px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.ogwan td:first-child { white-space: nowrap; }
.ogwan .hj { font-family: var(--serif); color: var(--gold); margin-right: 6px; }
.ogwan .bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.07); position: relative; min-width: 60px; }
.ogwan .bar i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, var(--jade), var(--gold)); }
.ogwan .sc { font-family: var(--mono); text-align: right; color: var(--gold2); width: 42px; }
.grade { display: inline-block; white-space: nowrap; font-size: 11px; padding: 0 6px; border-radius: 4px; background: rgba(73,211,189,.15); color: var(--jade); margin-left: 4px; }

.thirds { display: flex; height: 44px; border-radius: 10px; overflow: hidden; margin: 6px 0 10px; }
.thirds div { display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #1a1236; line-height: 1.15; text-align: center; }
.thirds div small { display: block; font-weight: 500; font-size: 10.5px; }
.thirds-legend { font-size: 12.5px; color: var(--muted); margin: 0; }

.metrics { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 16px; }
.metrics th, .metrics td { padding: 7px 6px; text-align: left; border-bottom: 1px dotted rgba(255,255,255,.1); }
.metrics th { color: var(--dim); font-weight: 500; font-size: 11.5px; }
.metrics td.n { font-family: var(--mono); color: var(--jade); text-align: right; }
.metrics td.p { font-family: var(--mono); color: var(--gold2); text-align: right; }

.score-ring { position: relative; width: 150px; height: 150px; margin: 0 auto 10px; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .v { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.score-ring .v b { font-family: var(--serif); font-size: 42px; line-height: 1; display: block; }
.score-ring .v small { font-size: 11px; color: var(--muted); }

.story h3 { font-family: var(--serif); font-size: 18px; margin: 28px 0 10px; display: flex; align-items: center; gap: 8px; }
.story h3:first-child { margin-top: 0; }
.story h3 .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(233,185,95,.13); font-size: 16px; }
.story p { margin: 0 0 12px; color: #ddd6f5; font-size: 15.5px; line-height: 1.85; word-break: keep-all; }
.story p b { color: var(--gold2); }
.story .feat { padding: 14px 16px; border-left: 3px solid var(--gold); background: rgba(255,255,255,.03); border-radius: 0 12px 12px 0; margin-bottom: 10px; }
.story .feat strong { display: block; font-family: var(--serif); color: var(--gold); font-size: 14.5px; margin-bottom: 4px; }
.story .feat p { margin: 0; font-size: 15px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.pills span { font-size: 13.5px; padding: 6px 12px; border-radius: 99px; background: rgba(73,211,189,.1); border: 1px solid rgba(73,211,189,.3); color: #c6f5ec; }
.quote { font-family: var(--serif); font-size: 18px; text-align: center; padding: 20px; margin: 24px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--gold2); }
.charcount { font-family: var(--mono); font-size: 11px; color: var(--dim); text-align: right; margin: 10px 0 0; }

.fortune { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 600px) { .fortune { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.f-item { text-align: center; padding: 16px 8px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line-soft); }
.f-item .ic { font-size: 24px; }
.f-item b { display: block; font-family: var(--serif); font-size: 26px; margin: 2px 0; }
.f-item small { color: var(--muted); font-size: 12.5px; }
.stars5 { color: var(--gold); letter-spacing: 2px; font-size: 12px; }

.celebs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 560px) { .celebs { grid-template-columns: 1fr; } }
.celeb { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 20px 12px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid var(--line-soft); position: relative; }
@media (max-width: 560px) { .celeb { flex-direction: row; text-align: left; gap: 14px; } }
.celeb .rank { position: absolute; top: 10px; left: 12px; font-family: var(--mono); font-size: 11px; color: var(--gold); }
@media (max-width: 560px) { .celeb .rank { position: static; } }
.avatar { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-weight: 900; font-size: 28px; color: #fff; margin-bottom: 10px; flex: none; box-shadow: 0 0 0 3px rgba(255,255,255,.1), 0 10px 24px -8px rgba(0,0,0,.6); }
@media (max-width: 560px) { .avatar { margin: 0; width: 60px; height: 60px; font-size: 22px; } }
.celeb h4 { margin: 0; font-size: 16px; }
.celeb .sim { font-family: var(--mono); color: var(--jade); font-size: 13px; }
.celeb .why { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.note { font-size: 12px; color: var(--dim); margin: 12px 0 0; text-align: center; }

.match { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.match .mt { font-family: var(--serif); font-weight: 900; font-size: 40px; color: var(--coral); line-height: 1; }
.match p { margin: 0; flex: 1; min-width: 200px; color: #ddd6f5; }

.actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 8px 0 24px; }
@media (max-width: 560px) { .actions { grid-template-columns: 1fr; } }

.lucky { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 600px) { .lucky { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lucky div { padding: 12px; border-radius: 12px; background: rgba(255,255,255,.04); text-align: center; font-size: 13px; color: var(--muted); }
.lucky b { display: block; color: var(--text); font-size: 15px; margin-top: 2px; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 5px; border: 1px solid rgba(255,255,255,.3); }

.reveal { animation: rise .7s cubic-bezier(.2,.8,.2,1) backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

/* ── Modal / Toast ── */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(5,3,15,.82); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.modal-box { width: 100%; max-width: 480px; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
.cam-stage { position: relative; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 3/4; }
.cam-stage video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.cam-guide { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--gold); stroke-width: .7; stroke-dasharray: 2 1.5; }
.cam-tip { text-align: center; color: var(--muted); font-size: 13px; margin: 12px 0; }
.modal-btns { display: flex; gap: 10px; }
.modal-btns .btn { flex: 1; }
.msg { text-align: center; padding: 28px 22px 22px; }
.msg-icon { font-size: 44px; margin: 0; }
.msg h3 { font-family: var(--serif); margin: 6px 0 8px; }
.msg p { color: var(--muted); font-size: 14.5px; margin: 0 0 20px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; z-index: 60; background: #fff; color: #1a1236; padding: 11px 18px; border-radius: 99px; font-size: 14px; font-weight: 500; transition: .3s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.foot { position: relative; z-index: 1; max-width: 820px; margin: 20px auto 0; padding: 30px 16px 40px; text-align: center; color: var(--dim); font-size: 12.5px; border-top: 1px solid var(--line-soft); }
.foot p { margin: 0 0 6px; }
.foot b { color: var(--muted); }
.foot .c { margin-top: 14px; font-family: var(--mono); font-size: 11px; }

/* ── 촬영 유도 강화 ── */
.hero-cta { margin-top: 24px; padding: 15px 28px; font-size: 16.5px; border-radius: 99px; }
.photo-ask { font-size: 14.5px; color: var(--muted); margin: 12px 0 18px !important; line-height: 1.7; }
.photo-ask b { display: inline-block; font-family: var(--serif); font-size: 19px; color: var(--text); margin-bottom: 2px; }
.cam-cta { width: 100%; max-width: 340px; padding: 17px 22px; font-size: 17.5px; border-radius: 14px; animation: camGlow 2.2s ease-in-out infinite; }
@keyframes camGlow { 50% { box-shadow: 0 0 0 8px rgba(233,185,95,.12), 0 10px 34px -6px rgba(233,185,95,.8); } }
.photo-or { display: flex; align-items: center; gap: 10px; max-width: 340px; margin: 16px auto 12px; color: var(--dim); font-size: 12px; }
.photo-or::before, .photo-or::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }
.drop-hint { font-size: 12px !important; color: var(--dim) !important; margin: 12px 0 0 !important; }
@media (hover: none) { .drop-hint { display: none; } }
.countdown { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-weight: 900; font-size: 120px; color: #fff; text-shadow: 0 0 30px rgba(233,185,95,.9); pointer-events: none; }
.countdown.tick { animation: tick .9s ease-out; }
@keyframes tick { from { transform: scale(1.6); opacity: 0; } 30% { opacity: 1; } }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.flash.go { animation: flash .45s ease-out; }
@keyframes flash { from { opacity: .95; } to { opacity: 0; } }

/* ── MBTI 결과지 ── */
.rp-sub { color: var(--muted); font-size: 14px; margin: -6px 0 14px; }
.rp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 600px) { .rp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rp-cell { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 16px 8px 14px; border-radius: 16px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 18%, transparent), rgba(255,255,255,.02)); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.rp-axis { font-size: 11.5px; color: var(--muted); }
.rp-letter { font-family: var(--serif); font-weight: 900; font-size: 54px; line-height: 1.1; color: var(--c); }
.rp-en { font-family: var(--mono); font-size: 13px; color: var(--text); }
.rp-en u { text-decoration: none; }
.rp-en em { font-style: normal; color: var(--c); font-weight: 700; font-size: 15px; }
.rp-ko { font-weight: 700; font-size: 15px; margin-top: 2px; }
.rp-pct { font-family: var(--mono); font-size: 11.5px; color: var(--gold2); margin-top: 6px; }
.rp-full { text-align: center; font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 16px 0 0; word-break: keep-all; }
.rp-full b { color: var(--gold2); font-size: 15px; }
.axis-top { font-family: var(--mono); font-size: 12px; }
.letter-sec { margin: 16px 0 20px; padding: 18px 18px 8px; border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid var(--line-soft); border-top: 3px solid var(--c); }
.ls-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.ls-head > b { font-family: var(--serif); font-size: 46px; line-height: 1; color: var(--c); min-width: 40px; text-align: center; }
.ls-head strong { display: block; font-size: 16.5px; }
.ls-head small { color: var(--muted); font-size: 12.5px; }
.ls-mo { margin-bottom: 4px !important; }
.moments { margin: 0 0 14px; padding-left: 0; list-style: none; }
.moments li { position: relative; padding: 6px 0 6px 24px; color: #ddd6f5; font-size: 15px; border-bottom: 1px dotted rgba(255,255,255,.08); }
.moments li::before { content: '✔'; position: absolute; left: 2px; color: var(--jade); }
.stack { display: grid; gap: 10px; margin: 6px 0 14px; }
.st-row { display: flex; gap: 14px; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line-soft); }
.st-n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; background: var(--gold); color: #2a1a05; }
.st-row strong { font-size: 15px; } .st-row small { margin-left: 8px; color: var(--jade); font-size: 12px; }
.st-row p { margin: 4px 0 0 !important; font-size: 14.5px !important; }
.tbadge { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 5px; background: rgba(233,185,95,.18); color: var(--gold2); vertical-align: 2px; }

.ls-ev { font-size: 14.5px !important; padding: 10px 12px; border-radius: 10px; background: rgba(73,211,189,.07); border: 1px dashed rgba(73,211,189,.3); }
.ls-ev b { color: var(--jade) !important; }

/* ── AI 샘플 ── */
.samples { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line-soft); }
.samples p { font-size: 13px !important; margin: 0 0 10px !important; }
.samples p b { color: var(--jade); }
.sample-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.sample { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 99px; border: 1px solid var(--line-soft); background: rgba(255,255,255,.05); color: var(--text); cursor: pointer; transition: .18s; text-align: left; }
.sample:hover { border-color: var(--jade); background: rgba(73,211,189,.1); }
.sample img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.sample span { font-size: 13.5px; font-weight: 700; line-height: 1.2; }
.sample small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); }

/* ── MBTI 입문 가이드 ── */
.guide { border-color: var(--line); }
.g-eyebrow { display: inline-block; margin: 0 0 8px; font-size: 12px; color: var(--bg); background: var(--jade); padding: 2px 10px; border-radius: 99px; font-weight: 700; }
.g-intro { color: #ddd6f5; font-size: 15px; line-height: 1.8; margin: 0 0 8px; word-break: keep-all; }
.g-h { font-family: var(--serif); font-size: 17px; margin: 26px 0 12px; color: var(--gold2); }
.g-axes { display: grid; gap: 12px; }
.g-q { margin: 0 0 6px; font-size: 13.5px; color: var(--muted); }
.g-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 8px; }
.g-vs { align-self: center; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.g-side { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line-soft); opacity: .75; }
.g-side.me { opacity: 1; border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 25%, transparent); }
.g-side > b { font-family: var(--serif); font-size: 30px; color: var(--c); min-width: 26px; text-align: center; }
.g-side strong { display: block; font-size: 13px; }
.g-side small { color: var(--muted); font-size: 12px; }
@media (max-width: 520px) { .g-pair { grid-template-columns: 1fr; } .g-vs { display: none; } }
.g-tip { font-size: 14px; color: #ddd6f5; margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: rgba(233,185,95,.08); }
.g-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 680px) { .g-groups { grid-template-columns: 1fr; } }
.g-group { border-radius: 16px; border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 10%, transparent), transparent 40%); padding: 12px; }
.g-ghead { display: flex; align-items: baseline; justify-content: space-between; padding: 2px 4px 10px; }
.g-ghead b { font-family: var(--serif); font-size: 17px; color: var(--c); }
.g-ghead span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.g-type { display: flex; gap: 12px; padding: 10px 6px; border-top: 1px solid var(--line-soft); border-radius: 10px; }
.g-type.me { background: color-mix(in srgb, var(--c) 18%, transparent); border-top-color: transparent; }
.g-tcode { flex: none; width: 54px; font-family: var(--mono); font-weight: 700; font-size: 14px; color: var(--c); padding-top: 1px; }
.g-tcode em { display: block; width: fit-content; font-style: normal; font-family: var(--sans); font-size: 10.5px; color: #1a1236; background: var(--c); padding: 0 6px; border-radius: 4px; margin-top: 3px; }
.g-type strong { font-size: 13.5px; }
.g-type p { margin: 2px 0 0; font-size: 13px; color: var(--muted); line-height: 1.55; word-break: keep-all; }

.foot-links a { color: var(--gold); text-decoration: none; } .foot-links a:hover { text-decoration: underline; }

/* ── 문서 페이지 (소개/개인정보) ── */
.doc-back { padding: 8px 14px; font-size: 13px; }
.doc { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 40px 16px 20px; }
.doc h1 { font-family: var(--serif); font-size: clamp(28px, 6vw, 38px); margin: 0 0 4px; }
.doc-date { color: var(--muted); font-family: var(--mono); font-size: 12.5px; margin: 0 0 22px; }
.doc h2 { font-family: var(--serif); font-size: 19px; color: var(--gold2); margin: 30px 0 10px; }
.doc p, .doc li { color: #ddd6f5; font-size: 15px; line-height: 1.85; word-break: keep-all; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc a:not(.btn) { color: var(--jade); }
.doc b { color: #fff; }
.doc-hl { padding: 16px 18px; border-radius: 14px; background: rgba(73,211,189,.08); border: 1px solid rgba(73,211,189,.3); color: #ddd6f5; line-height: 1.8; }

/* ── language switch ── */
.topbar-right { display: flex; align-items: center; gap: 14px; }
.lang { font-size: 12.5px; color: var(--gold2); text-decoration: none; padding: 5px 11px; border: 1px solid var(--line); border-radius: 99px; }
.lang:hover { background: rgba(233,185,95,.1); }
@media (max-width: 520px) { .engine span { display: none; } }
.story p, .g-intro, .doc p, .doc li, .g-type p { word-break: normal; }

/* ── language suggestion ── */
.lang-suggest { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; padding: 10px 12px 10px 16px; border-radius: 16px; background: var(--panel-solid); border: 1px solid var(--line); box-shadow: 0 20px 40px -10px rgba(0,0,0,.6); font-size: 14px; max-width: calc(100% - 32px); }
.lang-suggest .btn { padding: 8px 14px; font-size: 13.5px; }
.ls-close { background: none; border: 0; color: var(--muted); font-size: 12.5px; cursor: pointer; padding: 6px; }
