:root {
  --bg: #15121F;
  --ink: #F6EFE4;
  --sub: #B8AFC6;
  --line: rgba(246, 239, 228, .16);
  --glass: rgba(255, 255, 255, .06);
  --amber: #F2A65A;
  --p0: #FFD08A;
  --p1: #F08A3C;
  --p2: #8C3B1F;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --serif: "Gowun Batang", "AppleMyungjo", "Nanum Myeongjo", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(242, 166, 90, .16), transparent 60%),
    radial-gradient(100% 50% at 100% 100%, rgba(139, 92, 246, .18), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font);
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
main { max-width: 440px; margin: 0 auto; padding: 24px 20px 8px; min-height: calc(100dvh - 72px); }
[hidden] { display: none !important; }
.screen { display: flex; flex-direction: column; gap: 14px; text-align: center; animation: in .35s ease-out; }
@keyframes in { from { opacity: 0; transform: translateY(8px); } }

h1, .question, .color-name { font-family: var(--serif); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 34px; line-height: 1.3; margin: 0; }
#s-landing h1 { font-size: 40px; }
.eyebrow { margin: 0; color: var(--amber); font-size: 14px; font-weight: 700; letter-spacing: .04em; }
.lead { margin: 0 0 8px; color: var(--sub); font-size: 16px; line-height: 1.7; }
.meta, .hint { margin: 0; color: var(--sub); font-size: 13px; }

/* 랜딩: 8색 오브가 떠 있는 밤하늘 */
.sky { position: relative; height: 230px; margin: 8px 0 4px; }
.sky .orb { position: absolute; animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }

.orb {
  display: inline-grid; place-items: center; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 32% 28%, var(--p0), var(--p1) 55%, var(--p2));
  box-shadow: 0 0 42px -4px var(--p1);
}
.orb.big { width: 180px; height: 180px; align-self: center; margin: 6px 0 2px; box-shadow: 0 0 80px 0 var(--p1), inset 0 -10px 30px rgba(0,0,0,.18); }
.orb.mid { width: 112px; height: 112px; }
.orb.mini { width: 40px; height: 40px; box-shadow: 0 0 18px -2px var(--p1); }
.orb.mystery {
  width: 108px; height: 108px; background: var(--glass); box-shadow: none;
  border: 2px dashed var(--line); font: 700 52px var(--serif); color: var(--sub);
}

.btn {
  appearance: none; border: 1.5px solid var(--line); background: var(--glass); color: var(--ink);
  font: inherit; font-size: 16px; font-weight: 700; padding: 14px 16px; border-radius: 16px;
  cursor: pointer; width: 100%;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: linear-gradient(135deg, #F7BE73, #E2783A); border: 0; color: #2A1608; box-shadow: 0 8px 28px -10px #E2783A; }
.btn.big { font-size: 18px; padding: 18px 16px; }
.btn.ghost { background: transparent; }
.btn.text { border: 0; background: none; color: var(--sub); font-weight: 600; text-decoration: underline; }
.row { display: flex; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; }

.duo { display: flex; align-items: flex-start; justify-content: center; gap: 22px; margin: 18px 0 4px; }

/* 질문 */
.quiz-top { display: flex; align-items: center; gap: 10px; }
.back { border: 0; background: none; font-size: 32px; line-height: 1; padding: 0 6px; color: var(--ink); cursor: pointer; }
.back:disabled { opacity: .2; }
.progress { flex: 1; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
#q-bar { height: 100%; width: 0; background: linear-gradient(90deg, #F7BE73, #8B5CF6); transition: width .25s; }
.count { font-size: 14px; color: var(--sub); font-weight: 700; min-width: 44px; text-align: right; }
.question { font-size: 25px; line-height: 1.45; margin: 40px 0 20px; min-height: 2.9em; }
.options { display: flex; flex-direction: column; gap: 10px; }
.options .btn { text-align: left; font-weight: 600; font-size: 17px; line-height: 1.45; padding: 17px 18px; }
@media (hover: hover) { .options .btn:hover { border-color: var(--amber); } }

/* 결과 카드: 팔레트 그라데이션 + 어두운 반투명 패널 */
.card {
  position: relative; overflow: hidden; border-radius: 28px; padding: 22px 16px 16px;
  display: flex; flex-direction: column; gap: 12px;
  background: linear-gradient(160deg, var(--p0), var(--p1) 50%, var(--p2));
}
.card.pair { background: linear-gradient(160deg, var(--a1), var(--b1)); }
.card > .eyebrow { color: rgba(20, 14, 26, .7); }
.panel { background: rgba(18, 14, 28, .62); backdrop-filter: blur(6px); border-radius: 20px; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.color-name { font-size: 32px; line-height: 1.25; margin: 0; }
.catch { margin: 0; font-size: 16px; font-weight: 600; color: #F3DDBF; line-height: 1.6; }
.chips { display: flex; justify-content: center; gap: 8px; }
.chip { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--sub); font-variant-numeric: tabular-nums; }
.chip i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); }
.desc { margin: 4px 0 0; padding: 0; list-style: none; text-align: left; font-size: 15px; line-height: 1.7; display: flex; flex-direction: column; gap: 4px; }
.desc li { padding-left: 14px; position: relative; }
.desc li::before { content: ''; position: absolute; left: 0; top: .72em; width: 5px; height: 5px; border-radius: 50%; background: var(--p0); }
.playlist { margin-top: 4px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.07); text-align: left; display: flex; flex-direction: column; gap: 4px; }
.playlist span { font-size: 12px; font-weight: 700; color: var(--amber); letter-spacing: .04em; }
.playlist strong { font-size: 15px; font-weight: 600; line-height: 1.5; }
.friend { display: flex; align-items: center; gap: 12px; background: rgba(18, 14, 28, .62); border-radius: 16px; padding: 12px 14px; text-align: left; }
.friend p { margin: 0; font-size: 13px; color: var(--sub); display: flex; flex-direction: column; gap: 2px; }
.friend strong { font-size: 16px; color: var(--ink); }

.invite-box { display: flex; flex-direction: column; gap: 10px; text-align: left; margin-top: 6px; }
.nick-label { font-size: 13px; font-weight: 700; color: var(--sub); }
#nick { font: inherit; font-size: 16px; padding: 13px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--glass); color: var(--ink); width: 100%; }
#nick::placeholder { color: rgba(184, 175, 198, .7); }

/* 비교 */
.who-col { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 132px; }
.who { font-size: 12px; font-weight: 700; color: rgba(20, 14, 26, .75); background: rgba(255,255,255,.55); padding: 3px 10px; border-radius: 99px; margin-top: 4px; }
.who-col strong { font-size: 15px; color: #1A1222; }
.badge { align-self: center; margin: 0; background: rgba(18, 14, 28, .75); color: #F7BE73; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 99px; }
.blend { height: 12px; border-radius: 99px; background: linear-gradient(90deg, var(--a0), var(--a1), var(--b1), var(--b0)); }

.disclaimer { max-width: 440px; margin: 0 auto; padding: 18px 20px 28px; text-align: center; font-size: 12px; color: var(--sub); line-height: 1.6; }

#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 99px; font-size: 14px; font-weight: 700;
  opacity: 0; pointer-events: none; transition: .2s; max-width: calc(100% - 40px); text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

#img-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.88); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; padding: 20px; z-index: 10;
}
#img-overlay img { max-width: 100%; max-height: 72vh; border-radius: 12px; -webkit-touch-callout: default; }
#img-overlay p { color: #fff; margin: 0; font-weight: 700; }
#img-overlay .btn { max-width: 200px; }

@media (min-width: 700px) { main { padding-top: 48px; } }
@media (prefers-reduced-motion: reduce) { .sky .orb, .screen { animation: none; } }
