:root {
  --bg: #f4f1fb; --card: #fff; --ink: #1d1830; --sub: #6e6a82; --line: #e8e4f2; --soft: #f8f6fd;
  --night1: #2a2342; --night2: #1b1630; --gold: #e9b949; --gold-soft: #f6d98a;
  --ok: #1f9d55; --ok-bg: #e8f6ee; --no: #d64545; --no-bg: #fdecec;
  --kakao: #fee500; --naver: #03c75a;
  --serif: "Gowun Batang", "Noto Serif KR", serif;
  --latin: "Cormorant Garamond", Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.55;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
body.wide { padding-bottom: 0; }
a { color: inherit; }
.shell { max-width: 480px; margin: 0 auto; padding: 0 20px; }
body.wide .shell { max-width: 1000px; }
main { padding: 6px 0 10px; }

/* ---------- 상단 ---------- */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 18px 0 14px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text small { font-family: var(--latin); font-size: 11px; letter-spacing: .22em; color: #b48a2c; }
.brand-text b { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.top-right { display: flex; align-items: center; gap: 12px; }
.top-link { font-size: 13px; color: var(--sub); text-decoration: none; }
.pt-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px 7px 9px; border-radius: 99px;
  background: var(--night2); color: #f1ecff; text-decoration: none; font-size: 13px;
  box-shadow: 0 4px 10px rgba(27, 22, 48, .25);
}
.pt-pill b { font-size: 16px; color: #fff; }

/* ---------- 메인 배너 ---------- */
.hero-card {
  position: relative; overflow: hidden; border-radius: 26px; padding: 26px 22px 20px; color: #f3effc;
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(233, 185, 73, .30) 0%, rgba(233, 185, 73, 0) 45%),
    radial-gradient(90% 70% at 0% 100%, rgba(140, 110, 220, .25) 0%, rgba(140, 110, 220, 0) 60%),
    linear-gradient(160deg, var(--night1), var(--night2));
  box-shadow: 0 16px 34px rgba(27, 22, 48, .28);
}
.hero-card::after { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 20px; pointer-events: none; }
.hero-eyebrow { font-family: var(--latin); font-size: 13px; letter-spacing: .24em; color: var(--gold); margin: 0 0 8px; }
.hero-card h1 { font-size: 26px; line-height: 1.32; margin: 0 0 10px; letter-spacing: -.03em; font-weight: 800; }
.hero-card h1 em { font-style: normal; color: var(--gold-soft); }
.hero-card p { margin: 0 0 18px; font-size: 14px; color: #d8d2ea; }
.hero-mascot { position: absolute; right: 16px; top: 14px; filter: drop-shadow(0 8px 18px rgba(233, 185, 73, .45)); }
.spark { position: absolute; color: #f6e7b8; opacity: .8; font-size: 12px; }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: relative; z-index: 1; }
.hero-stat { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: 16px; padding: 12px 14px; }
.hero-stat span { display: block; font-size: 12px; color: #c9c2de; }
.hero-stat b { display: block; font-family: var(--serif); font-size: 23px; color: var(--gold-soft); margin-top: 2px; }

/* ---------- 섹션 ---------- */
.sec-head { display: flex; justify-content: space-between; align-items: baseline; margin: 28px 2px 12px; }
.sec-head h2 { font-size: 19px; margin: 0; letter-spacing: -.02em; }
.sec-head span { font-size: 13px; color: var(--sub); }

/* 퀴즈 목록 카드 */
.qlist { display: grid; gap: 10px; }
.qitem {
  display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 12px; text-decoration: none; transition: transform .12s, box-shadow .12s;
}
.qitem:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(29, 24, 48, .07); }
.qitem img, .qitem .qph { width: 58px; height: 58px; border-radius: 12px; object-fit: cover; flex: none; background: var(--soft); }
.qitem .qph { display: flex; align-items: center; justify-content: center; }
.qitem .qtxt { flex: 1; min-width: 0; }
.qitem .qtype { font-size: 12px; color: #a07a22; font-weight: 600; }
.qitem .qtitle { font-size: 15px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qitem .qpt { flex: none; font-family: var(--serif); color: #b4851f; font-size: 15px; }
.qitem.done { opacity: .5; }

/* 빈 상태 */
.empty-card { background: #fff; border: 1.5px dashed #ddd6ee; border-radius: 22px; padding: 34px 20px; text-align: center; }
.empty-card b { display: block; font-size: 17px; margin: 12px 0 4px; }
.empty-card span { color: var(--sub); font-size: 14px; }

/* ---------- 공통 카드·버튼 ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 20px; margin-bottom: 14px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 12px; padding: 15px;
  border: 0; border-radius: 15px; background: var(--night2); color: var(--gold-soft); font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer; box-shadow: 0 4px 0 #0d0a18;
}
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #0d0a18; }
.btn.light { background: #fff; color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; }
.btn.kakao { background: var(--kakao); color: #191600; box-shadow: none; }
.btn.naver { background: var(--naver); color: #fff; box-shadow: none; }
.btn .ico { width: 18px; height: 18px; }
.flash { background: var(--ok-bg); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.errors { background: var(--no-bg); color: #a12626; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.muted { color: var(--sub); font-size: 14px; }

/* ---------- 로그인·가입 ---------- */
.auth-head { text-align: center; margin: 10px 0 18px; }
.auth-head h1 { font-size: 23px; margin: 8px 0 4px; letter-spacing: -.02em; }
.auth-head p { margin: 0; color: var(--sub); font-size: 14px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--sub); font-size: 13px; margin: 20px 0 14px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; color: var(--sub); margin-bottom: 6px; }
.field input { width: 100%; padding: 14px; font: inherit; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; }
.field input:focus { outline: none; border-color: var(--ink); }
.help { font-size: 12px; color: var(--sub); margin-top: 6px; }
.auth-foot { text-align: center; color: var(--sub); font-size: 14px; }
.agree { background: var(--soft); border-radius: 16px; padding: 6px 16px; margin: 6px 0 4px; }
.chk { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 14px; cursor: pointer; }
.chk.all { border-bottom: 1px solid var(--line); }
.chk input { width: 18px; height: 18px; accent-color: var(--ink); }
.chk a { margin-left: auto; font-size: 12px; color: var(--sub); }

/* ---------- 포인트 ---------- */
.point-card { background: linear-gradient(160deg, var(--night1), var(--night2)); color: #f3effc; border-radius: 22px; padding: 20px 22px; margin-bottom: 14px; }
.point-card span { font-size: 13px; color: #c9c2de; }
.point-big { font-family: var(--serif); font-size: 34px; color: var(--gold-soft); margin-top: 2px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.list li:last-child { border-bottom: 0; }
.plus { color: var(--ok); font-weight: 700; } .minus { color: var(--no); font-weight: 700; }

/* ---------- 퀴즈 풀기 ---------- */
.quiz-top { display: flex; justify-content: space-between; font-size: 14px; color: var(--sub); margin: 4px 2px 12px; }
.quiz-top b { color: var(--ink); }
.q { font-size: 19px; font-weight: 700; line-height: 1.45; margin: 0 0 6px; letter-spacing: -.02em; }
.q-sub { font-size: 14px; color: var(--sub); margin: 0 0 14px; }
.q-img { display: block; width: 100%; max-width: 300px; aspect-ratio: 1; object-fit: cover; margin: 4px auto 16px; border-radius: 16px; background: var(--soft); }
.opt { display: block; width: 100%; text-align: left; padding: 14px 16px; margin-bottom: 10px; font: inherit; line-height: 1.4;
       background: var(--soft); border: 1.5px solid var(--line); border-radius: 15px; color: var(--ink); cursor: pointer; }
.opt:hover:not(:disabled) { border-color: var(--ink); }
.opt:disabled { cursor: default; }
.opt.correct { background: var(--ok-bg); border-color: var(--ok); }
.opt.wrong { background: var(--no-bg); border-color: var(--no); }
.result { display: none; margin-top: 6px; padding: 14px 16px; border-radius: 15px; font-size: 14px; }
.result.ok { display: block; background: var(--ok-bg); }
.result.no { display: block; background: var(--no-bg); }
.result strong { display: block; font-size: 16px; margin-bottom: 4px; }
.btns { display: none; gap: 8px; }
.btns.show { display: flex; }

/* ---------- 관리자 ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.stat span { color: var(--sub); font-size: 12px; }
.stat b { display: block; font-size: 22px; margin-top: 4px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--sub); font-weight: 600; font-size: 12px; }
textarea { width: 100%; min-height: 80px; padding: 12px; font: inherit; border: 1.5px solid var(--line); border-radius: 12px; }
.sbtn { padding: 8px 12px; border: 0; border-radius: 10px; background: var(--night2); color: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.sbtn.gray { background: #eceaf3; color: var(--ink); }
.sbtn.red { background: var(--no-bg); color: #b33; }
.row-off td { color: #aaa; }
.err { color: var(--no); }
.log { background: var(--night2); color: #e9e6f5; border-radius: 12px; padding: 12px 14px; font-size: 13px; white-space: pre-wrap; word-break: break-all; margin: 0 0 14px; }
.inline { display: inline; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 약관 ---------- */
.doc h1 { font-size: 20px; } .doc h2 { font-size: 16px; margin-top: 22px; } .doc p, .doc li { font-size: 14px; color: #3c3950; }

/* ---------- 하단 ---------- */
.foot { text-align: center; font-size: 12px; color: var(--sub); padding: 26px 0 24px; line-height: 1.8; }
.foot a { color: var(--sub); }
.foot-brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 6px; font-size: 13px; color: var(--ink); }
.foot-brand img { width: 40px; height: 40px; border-radius: 20px; display: block; }
.tabbar {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 520px; z-index: 10;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: rgba(255, 253, 248, .96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: #8d889e; font-size: 12px; }
.tabbar a.on { color: var(--ink); font-weight: 700; }
.tabbar a.on svg { color: #b4851f; }

/* ---------- 운세 포인트 부족 안내 카드 ---------- */
.need-card {
  position: relative; overflow: hidden; border-radius: 24px; padding: 20px 20px 16px; margin: 4px 0 18px; color: #f1ecff;
  background: radial-gradient(120% 90% at 100% 0%, rgba(233,185,73,.28), transparent 55%), linear-gradient(160deg, var(--night1), var(--night2));
  box-shadow: 0 10px 24px rgba(27,22,48,.22); animation: need-pop .45s cubic-bezier(.2,1.4,.4,1) both;
}
@keyframes need-pop { from { transform: translateY(8px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.need-top { display: flex; align-items: center; gap: 12px; }
.need-top .mascot { flex: none; }
.need-eyebrow { margin: 0; font-size: 12.5px; color: var(--gold); letter-spacing: .02em; }
.need-card h2 { word-break: keep-all; margin: 2px 0 0; font-family: var(--serif); font-size: 21px; line-height: 1.3; color: #fff; }
.need-gauge { margin-top: 16px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 12px 14px; }
.need-nums { display: flex; justify-content: space-between; font-size: 13px; color: rgba(241,236,255,.75); }
.need-nums b { font-family: var(--serif); font-size: 19px; color: var(--gold-soft); margin-left: 3px; }
.need-bar { height: 10px; border-radius: 99px; background: rgba(255,255,255,.12); margin: 8px 0 10px; overflow: hidden; }
.need-bar i { display: block; height: 100%; min-width: 6%; border-radius: 99px; background: linear-gradient(90deg, #f6d98a, #e9b949); }
.need-tip { margin: 0; font-size: 14px; line-height: 1.6; word-break: keep-all; }
.need-tip b { color: var(--gold-soft); }
.need-tip small { color: rgba(241,236,255,.6); font-size: 12px; }
.need-tip.light { margin-top: 14px; color: rgba(241,236,255,.85); }
.btn.need-go { margin-top: 14px; background: var(--gold); color: #3b2a12; box-shadow: 0 5px 0 #b98a24; }
.need-back { display: block; text-align: center; margin-top: 12px; font-size: 13px; color: rgba(241,236,255,.7); text-decoration: none; }
.need-lead { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(233,185,73,.16); color: #fff3cf; font-size: 14px; line-height: 1.5; word-break: keep-all; }
.need-lead b { color: var(--gold-soft); }
.need-lead span { color: rgba(241,236,255,.65); font-size: 12.5px; }

/* =====================================================================
 * 퀴즈 종류 탭 + 넌센스·OX 스피드 퀴즈 (2026-10-05)
 * ===================================================================== */
.quiz-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px; margin: 0 0 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.quiz-tabs a { text-align: center; padding: 10px 4px; border-radius: 12px; text-decoration: none; font-size: 14.5px; font-weight: 700; color: var(--sub); }
.quiz-tabs a.on { background: var(--night2); color: var(--gold-soft); }

.fun-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fun-card { position: relative; overflow: hidden; display: block; text-decoration: none; border-radius: 20px; padding: 16px 14px 14px; color: #fff; }
.fun-card.fc-nonsense { background: linear-gradient(150deg, #7c4dff, #c04bd8); box-shadow: 0 8px 18px rgba(124,77,255,.28); }
.fun-card.fc-ox { background: linear-gradient(150deg, #ff7a59, #f0a33b); box-shadow: 0 8px 18px rgba(255,122,89,.28); }
.fun-card::after { content: ""; position: absolute; right: -24px; top: -24px; width: 90px; height: 90px; border-radius: 50%; background: rgba(255,255,255,.14); }
.fun-card .fc-emoji { display: block; font-size: 30px; line-height: 1.1; }
.fun-card b { display: block; font-size: 18px; margin-top: 6px; letter-spacing: -.02em; }
.fun-card .fc-meta { display: block; font-size: 13px; opacity: .92; margin-top: 2px; }
.fun-card .fc-left { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 700; background: rgba(27,22,48,.28); padding: 4px 9px; border-radius: 99px; }

.fun-ready { text-align: center; }
.fun-ready .fr-emoji { font-size: 54px; line-height: 1.1; }
.fun-ready h1 { margin: 6px 0 2px; font-size: 24px; letter-spacing: -.02em; }
.fr-rules { list-style: none; padding: 0; margin: 16px 0 6px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fr-rules li { background: var(--soft); border: 1px solid var(--line); border-radius: 14px; padding: 10px 4px; }
.fr-rules b { display: block; font-size: 16px; }
.fr-rules span { font-size: 12px; color: var(--sub); }
.btn.fun-go { font-size: 17px; background: linear-gradient(135deg, #7c4dff, #ff5fb7); color: #fff; box-shadow: 0 5px 0 #4b2bb0; }
.fun-ox .btn.fun-go { background: linear-gradient(135deg, #ff7a59, #f0a33b); box-shadow: 0 5px 0 #c3602b; }
.fr-note { font-size: 13px; color: var(--sub); margin: 10px 0 0; }
.fr-done { margin: 16px 0 4px; font-size: 16px; font-weight: 700; line-height: 1.6; }
.fr-done span { font-size: 14px; font-weight: 400; color: var(--sub); }

.timer { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.timer-bar { flex: 1; height: 12px; border-radius: 99px; background: var(--soft); border: 1px solid var(--line); overflow: hidden; }
.timer-bar i { display: block; height: 100%; width: 100%; border-radius: 99px; background: linear-gradient(90deg, #4ade80, #22c55e); }
.timer b { width: 34px; text-align: center; font-size: 22px; font-family: var(--serif); }
.timer.urgent .timer-bar i { background: linear-gradient(90deg, #f87171, #ef4444); }
.timer.urgent b { color: var(--no); animation: tbeat .5s ease-in-out infinite; }
@keyframes tbeat { 50% { transform: scale(1.25); } }

.fun-q { font-size: 21px; font-weight: 800; line-height: 1.45; margin: 0 0 16px; letter-spacing: -.02em; word-break: keep-all; text-align: center; }
.fun-opts { display: grid; gap: 9px; }
.fun-opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 14px 14px; font: inherit; font-size: 16px; font-weight: 600;
  background: var(--soft); border: 1.5px solid var(--line); border-radius: 15px; color: var(--ink); cursor: pointer; transition: transform .08s; }
.fun-opt:active:not(:disabled) { transform: scale(.98); }
.fun-opt .no { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); font-size: 13px; }
.fun-opts.ox { grid-template-columns: 1fr 1fr; }
.fun-opts.ox .fun-opt { justify-content: center; padding: 22px 0; }
.fun-opts.ox .oxm { font-size: 46px; font-weight: 900; line-height: 1; }
.fun-opts.ox .fun-opt:nth-child(1) .oxm { color: #2563eb; }
.fun-opts.ox .fun-opt:nth-child(2) .oxm { color: #e11d48; }
.fun-opt.picked { border-color: var(--ink); }
.fun-opt.correct { background: var(--ok-bg); border-color: var(--ok); }
.fun-opt.wrong { background: var(--no-bg); border-color: var(--no); }
.fun-opt:disabled { cursor: default; }
.fun-result { margin-top: 12px; padding: 14px 16px; border-radius: 15px; font-size: 14.5px; line-height: 1.55; }
.fun-result strong { display: block; font-size: 19px; margin-bottom: 3px; }
.fun-result small { display: block; margin-top: 4px; color: var(--sub); }
.fun-result.ok { background: var(--ok-bg); }
.fun-result.no { background: var(--no-bg); }
.fun-result.info { background: var(--soft); text-align: center; }
.fun-result.pop { animation: rpop .45s cubic-bezier(.2,1.6,.4,1); }
.fun-result.shake { animation: rshake .4s ease; }
@keyframes rpop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rshake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* 🔊 소리 켜기/끄기 버튼 */
.snd-toggle { position: fixed; right: max(14px, calc(50% - 226px)); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 20;
  display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.snd-toggle button { display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 12px; border-radius: 99px;
  border: 1px solid var(--line); background: #fff; font: inherit; font-size: 15px; cursor: pointer; color: var(--ink);
  box-shadow: 0 6px 14px rgba(29,24,48,.15); }
.snd-toggle button span { font-size: 12px; font-weight: 700; }
.snd-toggle button.off { background: #eceaf3; color: var(--sub); box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .timer.urgent b, .fun-result.pop, .fun-result.shake { animation: none; } }
[hidden] { display: none !important; }
.snd-hint { position: fixed; left: 50%; bottom: calc(140px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 21;
  background: var(--night2); color: var(--gold-soft); font-size: 14px; font-weight: 700; padding: 10px 16px; border-radius: 99px;
  box-shadow: 0 8px 20px rgba(27,22,48,.3); white-space: nowrap; animation: hintIn .4s ease both, hintBob 1.8s ease-in-out .4s infinite; transition: opacity .35s; }
.snd-hint.bye { opacity: 0; }
@keyframes hintIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes hintBob { 50% { transform: translate(-50%, -4px); } }
@media (prefers-reduced-motion: reduce) { .snd-hint { animation: none; } }

/* =====================================================================
 * 출석 체크 · 주간 랭킹 (2026-10-06)
 * ===================================================================== */
.attend-card { margin-top: 16px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 14px 14px 12px; }
.attend-card .ac-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.attend-card .ac-head b { display: block; font-size: 17px; }
.attend-card .ac-head span { font-size: 13px; color: var(--sub); }
.attend-card .ac-btn { display: inline-block; border: 0; border-radius: 12px; padding: 10px 14px; font: inherit; font-weight: 800; font-size: 14px;
  background: var(--gold); color: #3b2a12; box-shadow: 0 4px 0 #b98a24; cursor: pointer; text-decoration: none; white-space: nowrap; }
.attend-card .ac-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #b98a24; }
.attend-card .ac-done { font-size: 13px; font-weight: 700; color: var(--ok); background: var(--ok-bg); padding: 7px 11px; border-radius: 99px; white-space: nowrap; }
.ac-days { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.ac-days li { text-align: center; }
.ac-days i { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 12px; font-style: normal; font-weight: 800; font-size: 14px;
  background: var(--soft); border: 1.5px dashed #ddd6ee; color: var(--sub); }
.ac-days li.bonus i { border-color: var(--gold); background: #fff8e6; }
.ac-days li.on i { background: var(--night2); border: 1.5px solid var(--night2); color: var(--gold-soft); }
.ac-days span { display: block; font-size: 11px; color: var(--sub); margin-top: 3px; }
.ac-days li.bonus span { color: #b4851f; font-weight: 700; }

.rank-link { font-size: 13.5px; font-weight: 700; color: #b4851f; text-decoration: none; }
.rank-strip { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 12px; padding: 11px 14px; border-radius: 14px;
  background: var(--night2); color: var(--gold-soft); text-decoration: none; font-size: 14px; font-weight: 700; }
.rank-strip span { color: #fff; font-weight: 400; font-size: 13px; white-space: nowrap; }
.rank-hero { position: relative; overflow: hidden; border-radius: 24px; padding: 20px 20px 16px; color: #fff; text-align: center;
  background: linear-gradient(150deg, #7c4dff, #c04bd8 60%, #ff7a59); box-shadow: 0 12px 26px rgba(124,77,255,.28); }
.rank-hero .rh-eyebrow { font-family: var(--latin); letter-spacing: .22em; font-size: 12px; margin: 0; opacity: .9; }
.rank-hero h1 { margin: 6px 0 4px; font-size: 24px; letter-spacing: -.02em; }
.rank-hero p { margin: 0; font-size: 13.5px; opacity: .95; word-break: keep-all; }
.rank-hero .rh-prize { display: flex; justify-content: center; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.rank-hero .rh-prize span { background: rgba(27,22,48,.3); border-radius: 99px; padding: 4px 11px; font-size: 13px; font-weight: 700; }
.rank-me { margin: 14px 0; padding: 14px; border-radius: 18px; background: #fff; border: 2px solid #7c4dff; text-align: center; }
.rank-me span { display: block; font-size: 13.5px; color: var(--sub); }
.rank-me b { display: block; font-family: var(--serif); font-size: 34px; color: #7c4dff; line-height: 1.2; }
.rank-list ol { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: flex; align-items: center; gap: 10px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.rank-list li:last-child { border-bottom: 0; }
.rank-list .rk { width: 32px; text-align: center; font-size: 18px; font-weight: 800; color: var(--sub); }
.rank-list li.top .rk { font-size: 24px; }
.rank-list .nm { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list .nm em { font-style: normal; font-size: 11px; background: #7c4dff; color: #fff; border-radius: 99px; padding: 1px 7px; margin-left: 4px; }
.rank-list .sc b { font-size: 18px; }
.rank-list .sc small { color: var(--sub); margin-left: 4px; }
.rank-list li.me { background: #f5f0ff; border-radius: 12px; }
.hall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.hall .hl { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 6px; text-align: center; }
.hall .hl span { font-size: 26px; display: block; }
.hall .hl b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hall .hl small { font-size: 12px; color: var(--sub); }

/* 하단 블로그 · 인스타그램 링크 */
.sns-links { display: flex; justify-content: center; gap: 8px; margin: 10px 0 8px; }
.sns-links a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 99px; text-decoration: none; font-size: 13px; font-weight: 700;
  background: #fff; border: 1px solid #e5e1ee; color: #2e2e3f; -webkit-text-stroke: 0; }
.sns-links a.sns-insta svg { color: #e1306c; }

/* =====================================================================
 * 💖 10대 감성 테마 (2026-10-07) — 회원 화면 전체 (관리자 화면 .wide 는 그대로)
 *   파스텔 핑크 · 라벤더 · 하늘색, 동글동글 Jua 제목, 스티커 같은 카드
 * ===================================================================== */
body:not(.wide) {
  --bg: #fff4fa; --ink: #3b2b55; --sub: #8a7ca3; --line: #f1e2f1; --soft: #fff8fc;
  --night1: #a07cff; --night2: #7b5cf5; --gold: #ff6fae; --gold-soft: #ffe1f0;
  --pink: #ff6fae; --lilac: #a98bff; --sky: #6cc4ff; --mint: #3fd3b4; --butter: #ffe36e;
  --cute: "Jua", "Pretendard", sans-serif;
  background: linear-gradient(180deg, #ffeef7 0%, #f6f0ff 42%, #eef6ff 100%) fixed;
}
body:not(.wide) .brand-text small { font-family: var(--cute); letter-spacing: .12em; color: var(--pink); }
body:not(.wide) .brand-text b { font-family: var(--cute); font-weight: 400; font-size: 19px; }
body:not(.wide) .pt-pill { background: linear-gradient(135deg, #ff7eb6, #9a7bff); box-shadow: 0 4px 12px rgba(255, 111, 174, .35); }
body:not(.wide) .btn { box-shadow: 0 4px 0 #5638c9; }
body:not(.wide) .btn:active { box-shadow: 0 2px 0 #5638c9; }
body:not(.wide) .btn.light { box-shadow: none; }
/* 카카오·네이버 버튼은 보라 그림자 대신 각자 색의 그림자 (보라색이 번져 보이던 문제) */
body:not(.wide) .btn.kakao { box-shadow: 0 4px 0 #d4bd00; }
body:not(.wide) .btn.naver { box-shadow: 0 4px 0 #02a04a; }
body:not(.wide) .btn.kakao:active { box-shadow: 0 2px 0 #d4bd00; }
body:not(.wide) .btn.naver:active { box-shadow: 0 2px 0 #02a04a; }
body:not(.wide) .card { border: 1.5px solid #f6e3f2; border-radius: 24px; box-shadow: 0 8px 22px rgba(169, 139, 255, .10); }

/* 메인 배너 → 파스텔 그라데이션 + 반짝이 */
body:not(.wide) .hero-card {
  color: #fff;
  background:
    radial-gradient(70% 60% at 90% 10%, rgba(255, 255, 255, .45) 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(135deg, #ff8cc6 0%, #b18cff 55%, #7cc8ff 100%);
  box-shadow: 0 14px 30px rgba(177, 140, 255, .35);
}
body:not(.wide) .hero-card::after { border-color: rgba(255, 255, 255, .45); border-style: dashed; }
body:not(.wide) .hero-eyebrow { font-family: var(--cute); color: #fff; opacity: .9; letter-spacing: .18em; }
body:not(.wide) .hero-card h1 { font-family: var(--cute); font-weight: 400; font-size: 28px; text-shadow: 0 2px 0 rgba(123, 92, 245, .35); }
body:not(.wide) .hero-card h1 em { color: #fff; background: linear-gradient(transparent 58%, rgba(255, 227, 110, .85) 58%); padding: 0 2px; }
body:not(.wide) .hero-card p { color: rgba(255, 255, 255, .92); }
body:not(.wide) .hero-stat { background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .5); }
body:not(.wide) .hero-stat span { color: rgba(255, 255, 255, .9); }
body:not(.wide) .hero-stat b { color: #fff; font-family: var(--cute); font-weight: 400; }
body:not(.wide) .spark { color: #fff; }

body:not(.wide) .sec-head h2 { font-family: var(--cute); font-weight: 400; font-size: 21px; }
body:not(.wide) .rank-link { color: var(--pink); }
body:not(.wide) .qitem { border: 1.5px solid #f6e3f2; border-radius: 20px; }
body:not(.wide) .qitem .qtype { color: #b05bd6; }
body:not(.wide) .qitem .qpt { color: var(--pink); font-family: var(--cute); font-size: 17px; }
body:not(.wide) .attend-card { border: 1.5px solid #f6e3f2; border-radius: 22px; }
body:not(.wide) .attend-card .ac-btn { color: #fff; box-shadow: 0 4px 0 #e0508f; }
body:not(.wide) .attend-card .ac-btn:active { box-shadow: 0 2px 0 #e0508f; }
body:not(.wide) .ac-days li.bonus i { background: #fff0f7; }
body:not(.wide) .ac-days li.bonus span { color: var(--pink); }
body:not(.wide) .tabbar a.on svg { color: var(--pink); }
body:not(.wide) .rank-strip { background: linear-gradient(135deg, #a98bff, #ff7eb6); color: #fff; }

/* 퀴즈 종류 탭 5개: 아이콘 + 이름 (한 줄에 딱 맞게) */
.quiz-tabs { grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 5px; border-radius: 20px; border: 1.5px solid #f6e3f2;
  background: rgba(255, 255, 255, .85); box-shadow: 0 6px 16px rgba(169, 139, 255, .10); }
.quiz-tabs a { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 0 6px; border-radius: 15px;
  font-size: 12.5px; font-weight: 700; color: var(--sub); letter-spacing: -.02em; white-space: nowrap; transition: background .15s, transform .1s; }
.quiz-tabs a i { font-style: normal; font-size: 20px; line-height: 1.2; }
.quiz-tabs a:active { transform: scale(.95); }
.quiz-tabs a.on { color: #fff; background: linear-gradient(135deg, #ff7eb6, #9a7bff); box-shadow: 0 4px 10px rgba(255, 111, 174, .35); }
.quiz-tabs a.qt-ox.on { background: linear-gradient(135deg, #ff9a76, #ffc24d); box-shadow: 0 4px 10px rgba(255, 154, 118, .35); }
.quiz-tabs a.qt-kpop.on { background: linear-gradient(135deg, #ff5fa2, #8b5cf6); }
.quiz-tabs a.qt-ajae.on { background: linear-gradient(135deg, #2ec4b6, #5aa9ff); box-shadow: 0 4px 10px rgba(46, 196, 182, .35); }
@media (max-width: 340px) { .quiz-tabs a { font-size: 11px; } .quiz-tabs a i { font-size: 17px; } }

/* 홈 스피드 퀴즈 카드 4개 (2 × 2) */
.fun-card { border-radius: 22px; min-height: 132px; }
.fun-card b { font-family: var(--cute); font-weight: 400; font-size: 20px; }
.fun-card.fc-nonsense { background: linear-gradient(150deg, #a78bfa, #f472b6); box-shadow: 0 8px 18px rgba(167, 139, 250, .32); }
.fun-card.fc-ox { background: linear-gradient(150deg, #ff9a76, #ffc24d); box-shadow: 0 8px 18px rgba(255, 154, 118, .32); }
.fun-card.fc-kpop { background: linear-gradient(150deg, #ff5fa2, #8b5cf6); box-shadow: 0 8px 18px rgba(255, 95, 162, .32); }
.fun-card.fc-ajae { background: linear-gradient(150deg, #2ec4b6, #5aa9ff); box-shadow: 0 8px 18px rgba(46, 196, 182, .32); }
.fun-card .fc-left { background: rgba(255, 255, 255, .26); }
.fun-card .fc-new { position: absolute; right: 10px; top: 10px; z-index: 1; background: #fff; color: #ff4f98; font-size: 10.5px; font-weight: 900;
  letter-spacing: .04em; padding: 2px 8px; border-radius: 99px; box-shadow: 0 2px 0 rgba(0, 0, 0, .08); }
.fun-card.fc-kpop::before { content: "✦"; position: absolute; left: 62%; top: 18px; color: rgba(255, 255, 255, .7); font-size: 12px; }

/* 풀이 화면: 시작 카드 */
.fun-ready { position: relative; overflow: hidden; }
.fun-ready::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, #ff7eb6, #a98bff, #7cc8ff); }
.fun-ready .fr-eyebrow { margin: 4px 0 2px; font-family: var(--cute); font-size: 13px; letter-spacing: .2em; color: var(--pink); }
.fun-ready h1 { font-family: var(--cute); font-weight: 400; font-size: 28px; }
.fun-ready .fr-emoji { display: inline-grid; place-items: center; width: 86px; height: 86px; margin: 4px 0 2px; border-radius: 30px; font-size: 48px;
  background: linear-gradient(150deg, #fff0f7, #f1ebff); border: 2px dashed #f4c6e0; transform: rotate(-4deg); }
.fr-rules li { background: #fff; border: 1.5px solid #f6e3f2; border-radius: 16px; }
.fr-rules b { font-family: var(--cute); font-weight: 400; font-size: 18px; }
.btn.fun-go { font-family: var(--cute); font-weight: 400; font-size: 20px; border-radius: 18px; background: linear-gradient(135deg, #ff7eb6, #9a7bff); box-shadow: 0 5px 0 #6a4be0; }
.fun-ox .btn.fun-go { background: linear-gradient(135deg, #ff9a76, #ffc24d); box-shadow: 0 5px 0 #e07a45; }
.fun-kpop .btn.fun-go { background: linear-gradient(135deg, #ff5fa2, #8b5cf6); box-shadow: 0 5px 0 #6b3fd6; }
.fun-ajae .btn.fun-go { background: linear-gradient(135deg, #2ec4b6, #5aa9ff); box-shadow: 0 5px 0 #2584c9; }
.fun-kpop .fun-ready .fr-emoji { background: linear-gradient(150deg, #ffe3f1, #ece2ff); border-color: #f0a8d0; }
.fun-ajae .fun-ready .fr-emoji { background: repeating-linear-gradient(135deg, #e9fbf8 0 8px, #e6f2ff 8px 16px); border-color: #9fdcd3; transform: rotate(3deg); }
.fun-ajae .fun-ready .fr-eyebrow { color: #20a99c; }
.fun-ajae .fun-ready::before { background: linear-gradient(90deg, #2ec4b6, #5aa9ff, #ffc24d); }
.fun-kpop .fun-ready::before { background: linear-gradient(90deg, #ff5fa2, #b18cff, #ff5fa2); }

/* 풀이 화면: 문제 · 보기 */
.fun-q { font-size: 21px; }
.fun-q-sub { display: block; width: fit-content; max-width: 100%; margin: 12px auto 0; padding: 9px 16px; border-radius: 16px;
  background: #fff0f7; border: 1.5px dashed #f4b3d4; color: #c03d82; font-size: 17px; font-weight: 800; line-height: 1.45; }
.fun-kpop .fun-q-sub { background: #f5efff; border-color: #c9b3ff; color: #6b3fd6; }
.fun-ajae .fun-q-sub { background: #ecfbf8; border-color: #9fdcd3; color: #1a8f84; }
.fun-opt { background: #fff; border: 2px solid #f3e4f1; border-radius: 17px; }
.fun-opt:hover:not(:disabled) { border-color: #ffb3d6; }
.fun-opt .no { background: #fff0f7; border-color: #f7cfe3; color: #ff4f98; font-weight: 800; }
.fun-kpop .fun-opt .no { background: #f3edff; border-color: #d9c8ff; color: #7b5cf5; }
.fun-ajae .fun-opt .no { background: #e9fbf8; border-color: #b6e9e1; color: #1a9e91; }
.fun-opt.picked { border-color: #9a7bff; }
.fun-opt.correct { background: #e6fbf3; border-color: #34c58e; }
.fun-opt.wrong { background: #fff0f3; border-color: #ff6b8a; }
.timer-bar { background: #fff; border: 1.5px solid #f3e4f1; }
.timer-bar i { background: linear-gradient(90deg, #7cc8ff, #a98bff, #ff7eb6); }
.timer b { font-family: var(--cute); font-weight: 400; }
.fun-result { border-radius: 18px; }
.fun-result strong { font-family: var(--cute); font-weight: 400; font-size: 22px; }
.fun-result.ok { background: #e6fbf3; }
.fun-result.no { background: #fff0f3; }
.fun-page #nextBtn { border-radius: 18px; background: linear-gradient(135deg, #ff7eb6, #9a7bff); color: #fff; box-shadow: 0 5px 0 #6a4be0; }
.fun-ox #nextBtn { background: linear-gradient(135deg, #ff9a76, #ffc24d); box-shadow: 0 5px 0 #e07a45; }
.fun-kpop #nextBtn { background: linear-gradient(135deg, #ff5fa2, #8b5cf6); box-shadow: 0 5px 0 #6b3fd6; }
.fun-ajae #nextBtn { background: linear-gradient(135deg, #2ec4b6, #5aa9ff); box-shadow: 0 5px 0 #2584c9; }
.fun-result { word-break: keep-all; }

/* =====================================================================
 * 상용화 준비 (2026-10-08): 광고 표시 · 타이머 · 정책 문서 · 관리자 대시보드
 * ===================================================================== */
.ad-badge { display: inline-block; padding: 1px 6px; border-radius: 6px; border: 1px solid #c9c4d8; background: #fff;
  color: #6e6a82; font-size: 11px; font-weight: 700; line-height: 1.5; letter-spacing: 0; vertical-align: 1px; font-family: inherit; }
.ad-badge.dark { background: transparent; border-color: rgba(255,255,255,.45); color: rgba(255,255,255,.85); margin-left: 6px; }
.ad-line { margin: 0 0 12px; font-size: 12px; color: var(--sub); }
.resume-note { margin: 0 0 12px; padding: 8px 12px; border-radius: 12px; background: #fff6dc; font-size: 13px; color: #7a5410; }
.opt.picked { border-color: var(--ink); }
.timer b { width: auto; min-width: 34px; }
.qitem.doing { border-color: #f3c552; box-shadow: 0 0 0 2px #fff1c7 inset; }
.qitem.doing .qpt { color: #c0392b; font-size: 13px; }
.foot-notice { margin: 4px auto 8px; max-width: 420px; font-size: 11.5px; line-height: 1.6; color: var(--sub); }

/* 정책 문서 */
.doc .doc-meta { margin: 0 0 18px; padding: 10px 12px; border-radius: 12px; background: var(--soft); font-size: 13px; color: var(--sub); }
.doc h3 { font-size: 14px; margin: 14px 0 4px; }
.doc table { margin: 8px 0; font-size: 13px; table-layout: fixed; }
.doc th, .doc td { border: 1px solid var(--line); padding: 7px 8px; text-align: left; vertical-align: top; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; }
.doc th { background: var(--soft); font-weight: 700; }
.doc .box { padding: 12px 14px; border-radius: 12px; background: #fff6dc; font-size: 13.5px; color: #5d4512; margin: 10px 0; }
.doc-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.doc-links a { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-size: 13px; color: var(--ink); text-decoration: none; }
.doc-links a.on { background: var(--night2); color: #fff; border-color: var(--night2); }

/* 관리자 */
.admin-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.admin-nav a { padding: 8px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; }
.admin-nav a.on { background: var(--night2); color: #fff; border-color: var(--night2); }
.stat small { display: block; font-size: 12px; color: var(--sub); margin-top: 2px; }
.stat small.up { color: var(--ok); } .stat small.down { color: var(--no); }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.dash-grid .card { margin: 0; }
.dash-h { font-size: 15px; margin: 0 0 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.dash-h small { font-weight: 400; color: var(--sub); font-size: 12px; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 14px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.bars .b i { display: block; width: 100%; max-width: 26px; border-radius: 5px 5px 0 0; background: #a98bff; min-height: 2px; }
.bars .b em { font-style: normal; font-size: 10.5px; color: var(--sub); margin-top: 4px; white-space: nowrap; }
.bars .b b { font-size: 10.5px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.bars.alt .b i { background: #f3c552; }
.dash-table td.num, .dash-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.dash-table tr.today td { font-weight: 700; background: #fffbea; }
.dash-table .plus { color: var(--ok); } .dash-table .minus { color: var(--no); }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--sub); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }



.tabbar a { color: #3d3652; }                 /* 거의 검정에 가까운 보라 */
.tabbar a > span:last-child {
  font-size: 13px;
  font-weight: 800;
  margin-top: 3px;
}
.tabbar a.on { color: #6a3cff; }
.tabbar a.on > span:last-child {
  background: #6a3cff;
  color: #fff;                                 /* 현재 메뉴는 흰 글씨 + 보라 배경 */
  padding: 2px 8px;
  border-radius: 999px;
}