/* B안 「한국 현실 감각 테스트」 — 늘 어두운 남색 + 라임 강조 */
:root {
  color-scheme: dark;
  --bg: #0e1430;
  --card: #18204a;
  --card2: #1f2858;
  --ink: #f3f5ff;
  --muted: #a7b0d8;
  --line: #2f3a72;
  --soft: #232d63;
  --accent: #d4ff3a;
  --on-accent: #10162f;
  --me: #d4ff3a;
  --truth: #ffffff;
  --crowd: #56d6ff;
  --rival: #ff6fb1;
  --bad: #ff7a7a;
  --track: #2b3570;
  --shadow: 0 16px 40px -24px rgba(0, 0, 0, 0.8);
  --focus: #d4ff3a;
}
body { background: radial-gradient(120% 60% at 50% -10%, #1f2b6b 0%, var(--bg) 60%) fixed, var(--bg); }

.top .brand .flag { font-size: 20px; }
.btn.primary { box-shadow: 0 10px 30px -14px rgba(212, 255, 58, 0.6); }

/* ---------- 첫 화면 ---------- */
.hero { padding: 22px 0 8px; }
.hero h1 { margin: 0 0 12px; font-size: clamp(29px, 8.6vw, 38px); line-height: 1.2; letter-spacing: -0.035em; font-weight: 900; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { margin: 0; color: var(--muted); font-size: 15px; }
.vsline { display: flex; align-items: center; gap: 10px; margin: 20px 0 18px; }
.vsline .half { flex: 1; border-radius: 18px; padding: 14px 12px; background: var(--card); text-align: center; }
.vsline .half small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.vsline .half b { display: block; font-size: 22px; font-weight: 900; margin-top: 2px; }
.vsline .half.me b { color: var(--me); }
.vsline .vs { font-weight: 900; color: var(--muted); }
.banner { margin: 10px 0 0; padding: 14px 16px; border-radius: 18px; background: var(--soft); border: 1.5px solid var(--line); font-weight: 700; font-size: 15px; text-align: center; }
.banner b { color: var(--accent); }
.banner.rival { border-color: var(--rival); }
.banner.rival b { color: var(--rival); }
.examples { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.examples li { background: var(--card); border-radius: 14px; padding: 12px 14px; font-size: 14px; font-weight: 700; color: var(--muted); }
.examples li::before { content: "Q. "; color: var(--accent); font-weight: 900; }
.daily-card { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-radius: 20px; background: linear-gradient(135deg, #263278, #1a2356); border: 1.5px solid var(--line); text-decoration: none; }
.daily-card .t { font-weight: 900; font-size: 16px; }
.daily-card .s { color: var(--muted); font-size: 13px; font-weight: 700; margin-top: 2px; }
.daily-card .go { flex: none; background: var(--accent); color: var(--on-accent); border-radius: 12px; padding: 10px 14px; font-weight: 900; font-size: 14px; }
.count-note { text-align: center; color: var(--accent); font-weight: 800; font-size: 14px; margin: 12px 0 0; }
.cta-note { text-align: center; color: var(--muted); font-size: 13px; margin: 10px 0 0; }

/* ---------- 문제 ---------- */
.qtop { display: flex; align-items: center; gap: 10px; height: 56px; }
.qtop .back { border: 0; background: none; color: var(--ink); font-weight: 800; min-height: 44px; padding: 0 6px; }
.progress { flex: 1; height: 8px; border-radius: 8px; background: var(--track); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 8px; transition: width 0.3s ease; }
.qno { font-size: 13px; font-weight: 800; color: var(--muted); min-width: 40px; text-align: right; }
.cat { display: inline-flex; gap: 6px; align-items: center; padding: 5px 11px; border-radius: 999px; background: var(--soft); font-size: 13px; font-weight: 800; margin-top: 8px; }
.qtext { margin: 12px 0 6px; font-size: 22px; line-height: 1.35; letter-spacing: -0.02em; font-weight: 900; }
.qdef { margin: 0 0 18px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.guess { text-align: center; min-height: 64px; }
.guess .v { font-size: clamp(38px, 12vw, 50px); font-weight: 900; letter-spacing: -0.04em; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--me); }
.guess .ph { font-size: 16px; color: var(--muted); font-weight: 700; padding-top: 18px; }

/* 직접 만든 막대(손잡이 없이 시작 → 앵커링 방지) */
.bar { position: relative; height: 64px; margin: 6px 14px 0; touch-action: none; cursor: pointer; outline: none; user-select: none; -webkit-user-select: none; }
.bar .rail { position: absolute; left: 0; right: 0; top: 28px; height: 10px; border-radius: 10px; background: var(--track); }
.bar .fill { position: absolute; left: 0; top: 28px; height: 10px; border-radius: 10px; background: linear-gradient(90deg, rgba(212, 255, 58, 0.35), var(--me)); width: 0; }
.bar .knob { position: absolute; top: 15px; width: 36px; height: 36px; margin-left: -18px; border-radius: 50%; background: var(--me); box-shadow: 0 0 0 6px rgba(212, 255, 58, 0.18), 0 8px 18px -6px rgba(0, 0, 0, 0.7); transition: transform 0.12s; }
.bar:focus-visible .knob { box-shadow: 0 0 0 4px #fff, 0 0 0 8px rgba(212, 255, 58, 0.4); }
.bar.drag .knob { transform: scale(1.12); }
.bar .hintdot { position: absolute; top: 24px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; border: 2px dashed var(--muted); opacity: 0.6; animation: tap 1.6s ease-in-out infinite; }
@keyframes tap { 0%, 100% { transform: scale(0.9); opacity: 0.35; } 50% { transform: scale(1.25); opacity: 0.75; } }
.bar .mk { position: absolute; top: 4px; bottom: 0; width: 0; pointer-events: none; }
.bar .mk::before { content: ""; position: absolute; left: -2px; top: 16px; width: 4px; height: 30px; border-radius: 4px; background: currentColor; }
.bar .mk span { position: absolute; left: 50%; transform: translateX(-50%); top: -14px; white-space: nowrap; font-size: 11px; font-weight: 900; color: currentColor; }
.bar .mk.truth { color: var(--truth); z-index: 3; }
.bar .mk.truth::before { width: 6px; left: -3px; top: 10px; height: 42px; }
.bar .mk.crowd { color: var(--crowd); }
.bar .mk.crowd span { top: 50px; }
.bar .mk.rival { color: var(--rival); }
.bar .mk.rival span { top: 50px; }
.bar .mk.me { color: var(--me); }
.bar .mk.me span { top: -14px; }
.ticks { display: flex; justify-content: space-between; margin: 0 4px; font-size: 12px; color: var(--muted); font-weight: 700; }
.fine { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.fine button { width: 52px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font-size: 22px; font-weight: 900; }
.fine button[disabled] { opacity: 0.35; }
.direct { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--muted); font-weight: 700; }
.direct input { width: 130px; min-height: 40px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); padding: 0 10px; font-weight: 800; font-size: 15px; text-align: right; }
.q-actions { position: sticky; bottom: 0; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, var(--bg) 35%); margin-top: 14px; }

.reveal { margin-top: 12px; padding: 18px 16px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); animation: rise 0.35s ease both; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.reveal .ans { font-size: 14px; color: var(--muted); font-weight: 800; }
.reveal .ans b { display: block; font-size: 34px; color: var(--truth); letter-spacing: -0.03em; font-weight: 900; }
.reveal .err { margin: 6px 0 0; font-size: 16px; font-weight: 800; }
.reveal .pts { display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 99px; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 900; vertical-align: 2px; }
.reveal .note { margin: 10px 0 0; font-size: 14px; line-height: 1.5; }
.reveal .src { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 10px 0 0; font-size: 12px; font-weight: 800; }
.legend span::before { content: "●"; margin-right: 4px; }
.legend .me { color: var(--me); }
.legend .truth { color: var(--truth); }
.legend .crowd { color: var(--crowd); }
.legend .rival { color: var(--rival); }
.cold { margin: 8px 0 0; font-size: 12px; color: var(--muted); }

/* ---------- 결과 ---------- */
.rhero { margin-top: 6px; padding: 26px 18px 22px; border-radius: 28px; background: linear-gradient(160deg, #26307a, #141b45); border: 1.5px solid var(--line); text-align: center; box-shadow: var(--shadow); }
.rhero .k { font-size: 15px; font-weight: 800; color: var(--muted); }
.rhero .big { font-size: clamp(64px, 20vw, 84px); font-weight: 900; letter-spacing: -0.05em; line-height: 1.05; color: var(--accent); font-variant-numeric: tabular-nums; }
.rhero .big small { font-size: 0.36em; color: var(--ink); margin-left: 4px; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: rgba(212, 255, 58, 0.14); color: var(--ink); font-weight: 900; font-size: 18px; margin-top: 6px; }
.badge b { font-size: 22px; }
.rhero .line { margin: 10px 0 0; color: var(--muted); font-size: 15px; font-weight: 700; }
.sentence { margin-top: 14px; padding: 20px 18px; border-radius: 22px; background: var(--accent); color: var(--on-accent); font-size: 19px; line-height: 1.45; font-weight: 900; letter-spacing: -0.02em; }
.sentence small { display: block; font-size: 12px; font-weight: 800; opacity: 0.7; margin-bottom: 6px; }
.duel { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; text-align: center; }
.duel .p b { display: block; font-size: 34px; font-weight: 900; }
.duel .p.me b { color: var(--me); }
.duel .p.rv b { color: var(--rival); }
.duel .p small { color: var(--muted); font-weight: 800; }
.duel .vs { font-weight: 900; color: var(--muted); }
.duel-verdict { text-align: center; font-weight: 900; font-size: 17px; margin: 10px 0 0; }
.qlist { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.qlist li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.qlist .l { font-weight: 800; font-size: 14px; }
.qlist .sc { font-weight: 900; font-size: 13px; color: var(--accent); }
.qlist .d { grid-column: span 2; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.qlist .d b { color: var(--ink); }
.qlist .mini { grid-column: span 2; height: 6px; border-radius: 6px; background: var(--track); overflow: hidden; }
.qlist .mini i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.qlist .dot { font-size: 12px; margin-left: 4px; }
.cats { display: grid; gap: 10px; }
.cats .c { display: grid; grid-template-columns: 70px 1fr 44px; gap: 10px; align-items: center; font-weight: 800; font-size: 14px; }
.cats .c .b { height: 10px; border-radius: 10px; background: var(--track); overflow: hidden; }
.cats .c .b i { display: block; height: 100%; background: var(--accent); border-radius: 10px; }
.cats .c span:last-child { text-align: right; color: var(--muted); }
.crowd-big { font-size: 18px; font-weight: 800; margin: 0; }
.crowd-big b { color: var(--crowd); font-size: 24px; }
.again { display: grid; gap: 8px; margin-top: 14px; }

/* 시트 */
.sheet-bg { position: fixed; inset: 0; background: rgba(4, 6, 20, 0.6); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 480px; background: var(--card); border-radius: 26px 26px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); max-height: 90dvh; overflow-y: auto; }
.sheet h3 { margin: 0 0 6px; font-size: 20px; }
.sheet p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.inp { width: 100%; min-height: 52px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); padding: 0 14px; font-size: 16px; font-weight: 700; }

/* 오늘의 문제 */
.streak { text-align: center; margin: 14px 0 0; font-weight: 900; font-size: 18px; }
.next-q { text-align: center; color: var(--muted); font-weight: 700; font-size: 14px; margin: 6px 0 0; font-variant-numeric: tabular-nums; }

/* ---------- 공유 이미지 (1080×1350) ---------- */
.shot { width: 1080px; height: 1350px; padding: 90px 84px; background: radial-gradient(120% 70% at 50% 0%, #2a3690 0%, #0e1430 65%); color: #f3f5ff; font-family: "Pretendard", "Apple SD Gothic Neo", sans-serif; display: flex; flex-direction: column; word-break: keep-all; position: relative; overflow: hidden; }
.shot .brand { display: flex; justify-content: space-between; font-size: 36px; font-weight: 900; }
.shot .brand span:last-child { color: #a7b0d8; font-weight: 700; font-size: 32px; }
.shot .k { margin-top: 90px; font-size: 52px; font-weight: 800; color: #a7b0d8; }
.shot .score { margin-top: 6px; font-size: 250px; font-weight: 900; line-height: 1; letter-spacing: -0.05em; color: #d4ff3a; }
.shot .score small { font-size: 90px; color: #f3f5ff; margin-left: 10px; }
.shot .tier { margin-top: 26px; align-self: flex-start; display: inline-flex; gap: 18px; background: rgba(212, 255, 58, 0.16); border-radius: 999px; padding: 18px 36px; font-size: 52px; font-weight: 900; }
.shot .sent { margin-top: 50px; padding: 40px 44px; border-radius: 40px; background: #d4ff3a; color: #10162f; font-size: 50px; line-height: 1.42; font-weight: 900; letter-spacing: -0.02em; }
.shot .sent small { display: block; font-size: 30px; opacity: 0.7; margin-bottom: 8px; }
.shot .foot2 { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: 38px; font-weight: 900; padding-top: 30px; border-top: 3px solid #2f3a72; }
.shot .foot2 span:last-child { color: #d4ff3a; }
