@font-face {
  font-family: "Pretendard";
  src: url("/fonts/Pretendard-subset.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eceef2;
  --text: #15171c;
  --muted: #6b7280;
  --line: #e2e5ea;
  --accent: #4f5dff;
  --accent-ink: #ffffff;
  --danger: #e5484d;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(17, 19, 24, 0.08);
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0f13;
    --surface: #17191f;
    --surface-2: #20232b;
    --text: #f1f2f5;
    --muted: #9aa1ad;
    --line: #2a2e38;
    --accent: #7a86ff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom));
}

/* ---------- 홈 ---------- */
.hero { padding: 16px 4px 8px; }
.hero .logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; color: var(--muted); }
.hero .logo svg { width: 22px; height: 22px; }
.hero h1 { font-size: 30px; line-height: 1.25; margin: 14px 0 8px; letter-spacing: -0.02em; font-weight: 800; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #4f5dff, #ff5b8a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 0; color: var(--muted); font-size: 15px; }
.teasers { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0 4px; scrollbar-width: none; }
.teasers::-webkit-scrollbar { display: none; }
.teasers span { flex: none; font-size: 13px; background: var(--surface); border: 1px solid var(--line); padding: 6px 12px; border-radius: 99px; color: var(--muted); }

.panel { background: var(--surface); border-radius: var(--radius); padding: 20px 18px; box-shadow: var(--shadow); margin-top: 16px; }
.panel h2 { font-size: 17px; margin: 0 0 4px; }
.panel .hint { font-size: 13px; color: var(--muted); margin: 0 0 16px; }

.field { margin-bottom: 18px; }
.field > label, .field > .label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.field .opt { font-weight: 500; color: var(--muted); font-size: 12px; margin-left: 4px; }
.field input[type="date"], .field input[type="text"], .field input[type="number"], .field select {
  width: 100%;
  height: 50px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  padding: 0 14px;
  font-size: 16px; /* iOS 확대 방지 */
  appearance: none;
  -webkit-appearance: none;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 14px) 22px; background-size: 6px 6px; background-repeat: no-repeat; }
.money { position: relative; }
.money input { padding-right: 56px !important; }
.money .unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }
.money-read { font-size: 12.5px; color: var(--accent); margin-top: 6px; min-height: 18px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; background: var(--surface-2); padding: 4px; border-radius: 12px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { text-align: center; padding: 10px 4px; border-radius: 9px; font-size: 14.5px; font-weight: 600; color: var(--muted); transition: background .15s, color .15s; }
.seg input:checked + label { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.seg input:focus-visible + label { outline: 2px solid var(--accent); }
.err { color: var(--danger); font-size: 13px; margin-top: 6px; }
details.more { border-top: 1px dashed var(--line); padding-top: 14px; margin-top: 4px; }
details.more summary { font-weight: 700; font-size: 14px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; margin-bottom: 14px; }
details.more summary::after { content: "펼치기"; color: var(--accent); font-weight: 600; font-size: 13px; }
details.more[open] summary::after { content: "접기"; }
.privacy { font-size: 12px; color: var(--muted); margin: 12px 2px 0; text-align: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; border-radius: 14px; border: 0; font-weight: 700; font-size: 16px; width: 100%; }
.btn.primary { background: var(--text); color: var(--bg); }
.btn.ghost { background: var(--surface); color: var(--text); border: 1.5px solid var(--line); }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: scale(.98); }

/* ---------- 메뉴 ---------- */
.me-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); }
.me-bar .who { font-weight: 700; font-size: 15px; }
.me-bar .who small { display: block; color: var(--muted); font-weight: 500; font-size: 12.5px; }
.me-bar button { background: var(--surface-2); border: 0; border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 600; flex: none; }
.menu-title { font-size: 22px; font-weight: 800; margin: 26px 4px 12px; letter-spacing: -0.01em; }
.tiles { display: grid; gap: 10px; }
.tile { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 14px; text-align: left; background: var(--surface); border: 0; border-radius: 16px; padding: 14px; box-shadow: var(--shadow); width: 100%; }
.tile .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; }
.tile .q { font-weight: 700; font-size: 15.5px; line-height: 1.35; }
.tile .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tile .need { font-size: 11.5px; color: var(--accent); font-weight: 700; }
.tile .arrow { color: var(--muted); }
.tile:active { transform: scale(.99); }

/* ---------- 카드 화면 ---------- */
.card-page { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.card-top { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.card-top button { background: none; border: 0; color: var(--muted); font-weight: 600; font-size: 14px; padding: 6px 4px; display: flex; align-items: center; gap: 4px; }
.card-top .count { font-size: 13px; color: var(--muted); }
.card-holder { width: 100%; display: flex; justify-content: center; }
.actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions .full { grid-column: 1 / -1; }
.pager { width: 100%; display: flex; justify-content: space-between; gap: 10px; }
.pager button { flex: 1; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; height: 46px; font-size: 14px; font-weight: 600; }
.pager button[disabled] { opacity: .35; }
.note { font-size: 12px; color: var(--muted); text-align: center; margin: 0 8px; }

#toast { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: rgba(20, 22, 28, 0.92); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; z-index: 50; max-width: calc(100vw - 32px); text-align: center; }

/* ================= 결과 카드 (이미지로 저장되는 영역) =================
   화면 테마와 무관하게 고정 색을 쓴다. 9:16 비율. */
.scard {
  --w: min(calc(100vw - 32px), 380px);
  width: var(--w);
  aspect-ratio: 9 / 16;
  border-radius: 26px;
  overflow: hidden;
  position: relative;
  color: #fff;
  font-family: "Pretendard", "Apple SD Gothic Neo", sans-serif;
  word-break: keep-all;
  overflow-wrap: anywhere;
  display: flex;
  flex-direction: column;
  padding: 26px 24px 20px;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  font-size: calc(var(--w) / 380 * 16px);
  background: var(--c-bg);
}
.scard.capturing { border-radius: 0; box-shadow: none; }
.scard .deco { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.scard .deco i { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .55; }
.scard > *:not(.deco) { position: relative; }
.scard .brand { display: flex; justify-content: space-between; align-items: center; font-size: .72em; font-weight: 700; letter-spacing: .02em; opacity: .85; }
.scard .brand b { display: inline-flex; align-items: center; gap: .4em; }
.scard .brand svg { width: 1.3em; height: 1.3em; }
.scard .chip { display: inline-block; align-self: flex-start; margin-top: 1.3em; font-size: .72em; font-weight: 700; padding: .35em .8em; border-radius: 99px; background: rgba(255,255,255,.18); }
.scard .ask { font-size: 1.28em; font-weight: 800; line-height: 1.32; margin: .55em 0 0; letter-spacing: -0.02em; }
.scard .lead { font-size: .86em; opacity: .85; margin-top: 1.1em; font-weight: 600; }
.scard .big { font-size: 3.1em; font-weight: 900; line-height: 1.05; letter-spacing: -0.035em; margin-top: .1em; }
.scard .big small { font-size: .42em; font-weight: 800; letter-spacing: -0.01em; margin-left: .1em; }
.scard .sub { font-size: .92em; font-weight: 700; margin-top: .45em; line-height: 1.4; }
.scard .sub mark { background: rgba(255,255,255,.22); color: inherit; padding: 0 .25em; border-radius: .25em; }
.scard .viz { margin-top: 1.1em; flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; }
.scard .viz svg { width: 100%; height: auto; display: block; max-height: 100%; }
.scard .facts { margin-top: 1em; display: grid; gap: .5em; }
.scard .fact { display: flex; justify-content: space-between; gap: .8em; align-items: baseline; font-size: .8em; padding: .6em .85em; border-radius: .8em; background: rgba(255,255,255,.12); }
.scard .fact span { opacity: .85; }
.scard .fact b { font-weight: 800; text-align: right; white-space: nowrap; }
.scard .src { margin-top: .9em; font-size: .6em; opacity: .7; line-height: 1.45; }
.scard .empty { margin: auto 0; text-align: center; font-size: .95em; font-weight: 600; opacity: .9; }

.th-indigo { --c-bg: linear-gradient(160deg, #3b3fd8 0%, #5b3bd1 55%, #8a3fc9 100%); }
.th-coral  { --c-bg: linear-gradient(160deg, #ff6a5b 0%, #ff4f7e 60%, #d63a8f 100%); }
.th-teal   { --c-bg: linear-gradient(160deg, #0e9f8e 0%, #117fa8 100%); }
.th-gold   { --c-bg: linear-gradient(160deg, #1d1a14 0%, #3a2d12 100%); color: #ffe7a3; }
.th-green  { --c-bg: linear-gradient(160deg, #12804f 0%, #0b5e5a 100%); }
.th-sky    { --c-bg: linear-gradient(160deg, #2a7cf6 0%, #1a49c7 100%); }
.th-ink    { --c-bg: linear-gradient(160deg, #1b1e27 0%, #2c3140 100%); }
.th-sunset { --c-bg: linear-gradient(160deg, #ff9a3c 0%, #f5576c 55%, #7b2ff7 100%); }
.th-gold .fact { background: rgba(255, 215, 120, .12); }
.th-gold .chip { background: rgba(255, 215, 120, .18); }

/* ---------- 홈·메뉴 그룹 ---------- */
.gtitle { font-size: 16px; margin: 0 0 14px; display: flex; align-items: center; gap: 6px; }
.gtitle .req { font-size: 11px; font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); padding: 2px 8px; border-radius: 99px; margin-left: 4px; }
details.more summary { margin-bottom: 0; padding-bottom: 14px; }
details.more[open] summary { margin-bottom: 4px; }
details.more + details.more { margin-top: 0; }
details.more { margin-bottom: 14px; }
.menu-sub { margin: -4px 4px 8px; color: var(--muted); font-size: 13.5px; }
.menu-sub b { color: var(--text); }
h3.cat { font-size: 14px; color: var(--muted); margin: 22px 4px 10px; font-weight: 700; }
.ask-q { width: 100%; display: flex; align-items: center; gap: 12px; font-size: 18px; line-height: 1.35; padding: 4px 2px; }
.ask-q .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; flex: none; }
.ask-panel { width: 100%; margin-top: 0; }
.card-top #replay { margin-left: auto; margin-right: 10px; color: var(--text); background: var(--surface); border-radius: 99px; padding: 6px 12px; font-size: 13px; box-shadow: var(--shadow); }
.card-top #replay svg { width: 14px; height: 14px; }
.card-top .count { order: 3; }

/* ================= 카드 연출 =================
   기본 스타일 = 최종 상태. .play 가 붙으면 키프레임이 "처음부터 그려지는" 연출을 한다.
   --d 로 요소별 지연. 저장(.capturing)·모션 최소화 설정에서는 모두 끈다. */
.scard.play .rv { animation: rv-rise .55s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d, 0s); }
.scard.play .big.rv { animation-name: rv-pop; animation-duration: .7s; }
.scard.play .viz svg .a-grow-x  { transform-box: fill-box; transform-origin: left center;  animation: a-grow-x .75s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(.5s + var(--d, 0s)); }
.scard.play .viz svg .a-grow-xr { transform-box: fill-box; transform-origin: right center; animation: a-grow-x .75s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(.5s + var(--d, 0s)); }
.scard.play .viz svg .a-grow-y  { transform-box: fill-box; transform-origin: center bottom; animation: a-grow-y .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(.5s + var(--d, 0s)); }
.scard.play .viz svg .a-draw    { stroke-dasharray: 1; animation: a-draw 1.3s cubic-bezier(.45,.05,.3,1) both; animation-delay: calc(.5s + var(--d, 0s)); }
.scard.play .viz svg .a-draw.a-slow { animation-duration: 1.6s; }
.scard.play .viz svg .a-fade    { animation: a-fade .5s ease-out both; animation-delay: calc(.5s + var(--d, 0s)); }
.scard.play .viz svg .a-pop     { transform-box: fill-box; transform-origin: center; animation: a-pop .35s cubic-bezier(.3,1.6,.5,1) both; animation-delay: calc(.5s + var(--d, 0s)); }
.scard.play .viz svg .a-pop-big { transform-box: fill-box; transform-origin: center; animation: a-pop-big .6s cubic-bezier(.3,1.8,.5,1) both; animation-delay: calc(.5s + var(--d, 0s)); }
.scard.play .viz svg .a-slide   { animation: a-slide .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(.5s + var(--d, 0s)); }
.scard.play .viz svg .a-wipe    { animation: a-wipe 1s ease-out both; animation-delay: calc(.5s + var(--d, 0s)); }
.scard.play .viz svg .a-spin    { animation: a-spin 1.6s cubic-bezier(.45,.05,.3,1) both; animation-delay: calc(.5s + var(--d, 0s)); }

@keyframes rv-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes rv-pop { 0% { opacity: 0; transform: scale(.7); } 70% { opacity: 1; transform: scale(1.04); } }
@keyframes a-grow-x { from { transform: scaleX(0); } }
@keyframes a-grow-y { from { transform: scaleY(0); } }
@keyframes a-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes a-fade { from { opacity: 0; } }
@keyframes a-pop { from { opacity: 0; transform: scale(0); } }
@keyframes a-pop-big { 0% { opacity: 0; transform: scale(0); } 60% { opacity: 1; transform: scale(1.6); } }
@keyframes a-slide { from { opacity: 0; transform: translateX(-24px); } }
@keyframes a-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes a-spin { from { transform: rotate(0deg); } to { transform: rotate(var(--rot)); } }

/* 상위권 축하 폭죽 (기본은 안 보임 → 저장 이미지에 남지 않는다) */
.scard .burst { position: absolute; left: 50%; top: 30%; width: 0; height: 0; pointer-events: none; z-index: 2; }
.scard .burst b { position: absolute; width: 8px; height: 12px; border-radius: 2px; opacity: 0; background: hsl(calc(var(--i) * 40), 95%, 65%); }
.scard.play .burst b { animation: burst 1.3s cubic-bezier(.1,.7,.3,1) both; animation-delay: 1.5s; }
@keyframes burst {
  0% { opacity: 0; transform: rotate(calc(var(--i) * 20deg)) translateY(0) rotate(0); }
  8% { opacity: 1; }
  100% { opacity: 0; transform: rotate(calc(var(--i) * 20deg)) translateY(-170px) rotate(540deg); }
}

.scard.capturing *, .scard.capturing *::before, .scard.capturing *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .scard.play *, .scard.play .rv { animation: none !important; }
}

/* ================= vonvon식 홈 · 퀴즈 · 로딩 ================= */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 4px 2px 14px; }
.topbar .logo { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 18px; letter-spacing: -0.02em; }
.topbar .logo svg { width: 26px; height: 26px; }
.topbar .tb-sub { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.intro { padding: 6px 2px 16px; }
.intro h1 { font-size: 30px; line-height: 1.25; margin: 0 0 8px; letter-spacing: -0.02em; font-weight: 900; }
.intro h1 em { font-style: normal; background: linear-gradient(90deg, #4f5dff, #ff5b8a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.intro p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.big-cta { font-size: 17px; height: 58px; }
.me-bar { margin-bottom: 14px; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px; }
.thumb { background: none; border: 0; padding: 0; text-align: left; display: block; width: 100%; }
.thumb .poster { position: relative; overflow: hidden; border-radius: 16px; aspect-ratio: 1 / 1; background: var(--c-bg); color: #fff; padding: 12px; display: flex; flex-direction: column; justify-content: flex-end; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.thumb .poster.th-gold { color: #ffe7a3; }
.thumb .poster .deco { position: absolute; inset: 0; }
.thumb .poster .deco i { position: absolute; border-radius: 50%; opacity: .5; }
.thumb .p-emoji { position: absolute; top: 10px; right: 10px; font-size: 38px; line-height: 1; filter: drop-shadow(0 4px 8px rgba(0,0,0,.25)); transform: rotate(-8deg); }
.thumb .p-title { position: relative; font-weight: 900; font-size: 16px; line-height: 1.28; letter-spacing: -0.03em; text-shadow: 0 2px 10px rgba(0,0,0,.25); }
.thumb .t-name { font-weight: 800; font-size: 14.5px; margin: 8px 2px 1px; }
.thumb .t-desc { font-size: 12px; color: var(--muted); margin: 0 2px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thumb .t-desc .need { color: var(--accent); font-weight: 700; }
.thumb:active .poster { transform: scale(.97); }
.hero-wrap { margin: 2px 0 6px; }
.hero-thumb .poster { aspect-ratio: 16 / 10; padding: 20px; border-radius: 20px; }
.hero-thumb .p-emoji { font-size: 72px; top: 16px; right: 18px; }
.hero-thumb .p-title { font-size: 25px; max-width: 80%; }
.hero-thumb .p-cta { position: relative; margin-top: 10px; font-weight: 800; font-size: 14px; background: rgba(255,255,255,.22); align-self: flex-start; padding: 7px 14px; border-radius: 99px; }
.privacy { margin-top: 26px; }

/* 퀴즈 */
.quiz { min-height: 100svh; background: var(--c-bg); color: #fff; padding: max(14px, env(safe-area-inset-top)) 16px 40px; }
.quiz.th-gold { color: #ffe7a3; }
.q-top { max-width: 480px; margin: 0 auto; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; }
.q-top button { background: rgba(255,255,255,.18); border: 0; color: inherit; width: 36px; height: 36px; border-radius: 12px; font-size: 20px; }
.q-top span { flex: 1; opacity: .9; }
.q-bar { max-width: 480px; margin: 12px auto 0; height: 6px; border-radius: 99px; background: rgba(255,255,255,.2); overflow: hidden; }
.q-bar i { display: block; height: 100%; background: #fff; border-radius: 99px; transition: width .35s ease; }
.q-body { max-width: 480px; margin: 0 auto; padding-top: 8vh; animation: rv-rise .45s cubic-bezier(.2,.8,.2,1) both; }
.q-icon { font-size: 56px; text-align: center; filter: drop-shadow(0 6px 12px rgba(0,0,0,.2)); }
.q-ask { font-size: 26px; font-weight: 900; text-align: center; margin: 14px 0 6px; letter-spacing: -0.03em; line-height: 1.3; }
.q-hint { text-align: center; opacity: .8; margin: 0 0 6px; font-size: 14px; }
.q-private { text-align: center; opacity: .75; font-size: 12.5px; margin-top: 18px; }
.choices { display: grid; gap: 10px; margin-top: 24px; }
.choices.regions { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.choices.regions .choice { padding: 14px 4px; font-size: 15px; }
.choices.many { gap: 8px; }
.choice { background: rgba(255,255,255,.95); color: #1b1d24; border: 0; border-radius: 16px; padding: 18px 16px; font-size: 17px; font-weight: 800; box-shadow: 0 6px 16px rgba(0,0,0,.14); transition: transform .12s, background .12s; }
.choice:active { transform: scale(.97); }
.choice.on { background: #1b1d24; color: #fff; transform: scale(.98); }
.q-input { margin-top: 24px; }
.q-input .field > label, .q-input .field > .label { display: none; }
.q-input .field input { height: 62px !important; font-size: 22px !important; font-weight: 800; text-align: center; background: rgba(255,255,255,.95) !important; color: #1b1d24; border: 0 !important; border-radius: 16px !important; }
.q-input .money .unit { color: #555; font-weight: 700; font-size: 16px; }
.q-input .money-read { color: #fff; text-align: center; font-weight: 700; }
.q-input .err { color: #fff; background: rgba(0,0,0,.25); padding: 8px 12px; border-radius: 10px; text-align: center; }
.q-input .btn.primary { margin-top: 8px; background: #1b1d24; color: #fff; }

/* 로딩 */
.loading { min-height: 100svh; background: var(--c-bg); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px; }
.l-icon { font-size: 72px; animation: l-bob 1s ease-in-out infinite; }
.l-bars { display: flex; gap: 6px; align-items: flex-end; height: 56px; }
.l-bars i { width: 12px; border-radius: 4px; background: #fff; animation: l-bar 0.9s ease-in-out infinite; animation-delay: calc(var(--i) * .08s); height: 20%; }
.l-text { font-size: 18px; font-weight: 800; margin: 0; }
.l-prog { width: min(260px, 70vw); height: 6px; border-radius: 99px; background: rgba(255,255,255,.22); overflow: hidden; }
.l-prog i { display: block; height: 100%; width: 100%; background: #fff; transform-origin: left; animation: l-prog linear both; }
@keyframes l-bob { 50% { transform: translateY(-10px) rotate(-6deg); } }
@keyframes l-bar { 50% { height: 100%; } }
@keyframes l-prog { from { transform: scaleX(0); } }

.card-top { gap: 8px; }
.card-top #replay { margin-left: auto; margin-right: 0; }

/* ================= 일러스트 (Fluent Emoji 3D) ================= */
.thumb .p-emoji { display: none; }
.thumb .p-art { position: absolute; pointer-events: none; filter: drop-shadow(0 8px 14px rgba(0,0,0,.28)); }
.thumb .p-art.main { width: 58%; right: -4%; top: 4%; transform: rotate(-8deg); animation: float 4.5s ease-in-out infinite; }
.thumb .p-art.s1 { width: 22%; left: 8%; top: 10%; transform: rotate(10deg); animation: float 3.6s ease-in-out infinite .6s; }
.thumb .p-art.s2 { width: 16%; left: 36%; top: 34%; opacity: .95; animation: float 3.2s ease-in-out infinite 1.1s; }
.hero-thumb .p-art.main { width: 40%; right: 2%; top: 8%; }
.hero-thumb .p-art.s1 { width: 14%; left: auto; right: 42%; top: 10%; }
.hero-thumb .p-art.s2 { width: 10%; left: auto; right: 6%; top: 62%; }
.thumb .p-title { max-width: 100%; }
.hero-thumb .p-title { max-width: 62%; }
@keyframes float { 50% { translate: 0 -6px; } }

.intro-art { display: flex; justify-content: center; gap: 4px; margin: 4px 0 14px; }
.intro-art img { width: 58px; height: 58px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.18)); animation: intro-pop .6s cubic-bezier(.3,1.6,.5,1) both, float 3.4s ease-in-out infinite; animation-delay: calc(var(--i) * .08s), calc(.6s + var(--i) * .3s); }
.intro-art img:nth-child(odd) { rotate: -8deg; }
.intro-art img:nth-child(even) { rotate: 8deg; margin-top: 10px; }
@keyframes intro-pop { from { opacity: 0; transform: scale(.3) translateY(20px); } }

.scard .c-art { position: absolute; top: 44px; right: 14px; width: 26%; filter: drop-shadow(0 10px 16px rgba(0,0,0,.3)); transform: rotate(-8deg); z-index: 1; }
.scard .c-art2 { position: absolute; top: 118px; right: 26%; width: 10%; filter: drop-shadow(0 6px 10px rgba(0,0,0,.25)); transform: rotate(12deg); z-index: 1; opacity: .95; }
.scard .ask { margin-right: 24%; }
.scard .chip { align-self: flex-start; }
.scard.play .c-art.rv, .scard.play .c-art2.rv { animation: art-pop .8s cubic-bezier(.3,1.7,.5,1) both; animation-delay: var(--d); }
@keyframes art-pop { from { opacity: 0; transform: scale(.2) rotate(-40deg); } }
.scard .cta-url { margin-top: .7em; display: flex; justify-content: space-between; align-items: center; font-size: .74em; background: rgba(255,255,255,.95); color: #1b1d24; border-radius: .9em; padding: .55em .9em; }
.scard .cta-url b { font-weight: 900; letter-spacing: -0.01em; }
.scard .src { margin-top: .7em; }

.l-icon { width: 120px; height: 120px; font-size: 0; filter: drop-shadow(0 12px 18px rgba(0,0,0,.3)); }
.q-icon img { width: 96px; height: 96px; filter: drop-shadow(0 10px 16px rgba(0,0,0,.28)); animation: art-pop .7s cubic-bezier(.3,1.7,.5,1) both; }
@media (prefers-reduced-motion: reduce) { .thumb .p-art, .intro-art img { animation: none !important; } }

/* ================= 어드민 ================= */
.admin .panel h3 { font-size: 15px; margin: 0 0 12px; }
.a-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 12px; }
.a-head h2 { font-size: 18px; margin: 0; }
.a-head button, .a-tabs button { background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 7px 12px; font-size: 13px; font-weight: 700; }
.a-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.a-tabs button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.a-tabs #rf { margin-left: auto; }
.a-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.a-kpi div { background: var(--surface); border-radius: 12px; padding: 10px; box-shadow: var(--shadow); }
.a-kpi span { display: block; font-size: 11px; color: var(--muted); }
.a-kpi b { font-size: 18px; font-weight: 900; }
@media (max-width: 420px) { .a-kpi { grid-template-columns: repeat(2, 1fr); } }
.a-fun { margin-bottom: 12px; }
.a-fun-l { display: flex; justify-content: space-between; font-size: 13.5px; }
.a-fun small { color: var(--muted); font-size: 11.5px; }
.a-bar { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 5px 0 3px; }
.a-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.a-chart { width: 100%; height: auto; color: var(--text); }
.a-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.a-table { border-collapse: collapse; width: 100%; font-size: 12.5px; white-space: nowrap; }
.a-table th, .a-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: right; }
.a-table th:first-child, .a-table td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); }
.a-table th { color: var(--muted); font-weight: 700; font-size: 11.5px; }

/* 링크형 썸네일 · 푸터 · 문서 페이지 */
a.thumb, .topbar a.logo { color: inherit; text-decoration: none; }
.foot { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin: 22px 0 8px; font-size: 12.5px; color: var(--muted); }
.foot a { color: var(--muted); }
.doc h1 { font-size: 22px; margin: 0 0 10px; }
.doc h2 { font-size: 16px; margin: 20px 0 6px; }
.doc p, .doc li { font-size: 14.5px; line-height: 1.7; }
.doc ul { padding-left: 18px; }
.doc a { color: var(--accent); }
a.btn { text-decoration: none; }
