/* 운전면허 3D — 운전석에서 배우는 필기시험
   공통 규칙: 상단 심벌→홈, 하단 고정 3종 버전 바, 뒤로/앞으로, 단어 중간 끊김 방지 */

@font-face {
  font-family: 'Pretendard';
  src: url('/assets/fonts/pretendard-sub.woff2') format('woff2-variations'),
       url('/assets/fonts/pretendard-sub.woff2') format('woff2');
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #101519;
  --ink-2: #46505a;
  --ink-3: #6d7781;
  --line: #e3e6e9;
  --line-2: #eef0f2;
  --bg: #f4f5f6;
  --card: #ffffff;
  --blue: #1450c8;
  --blue-d: #0e3b96;
  --green: #0d7a50;
  --yellow: #ffc400;
  --red: #cf3b2e;
  --night: #12161b;
  --night-2: #1b2128;
  --r: 16px;
  --r-s: 11px;
  --shadow: 0 1px 2px rgba(16, 21, 25, .05), 0 12px 28px -18px rgba(16, 21, 25, .28);
  --hdr-h: 60px;
  --ver-h: 46px;
  --max: 1180px;
  --ff: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--ff);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
  padding-bottom: calc(var(--ver-h) + env(safe-area-inset-bottom, 0px) + 8px);
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
button { font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; letter-spacing: -.02em; font-weight: 800; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid rgba(20, 80, 200, .45); outline-offset: 2px; border-radius: 6px; }

/* ── 인트로 커튼 ─────────────────────────────────────────── */
#curtain {
  position: fixed; inset: 0; z-index: 2000;
  background: var(--night);
  display: grid; place-items: center;
  color: #fff;
  transition: transform .9s cubic-bezier(.7, 0, .2, 1), opacity .9s;
}
#curtain.done { transform: translateY(-101%); opacity: .02; pointer-events: none; }
.cu-in { text-align: center; padding: 24px; }
.cu-mark { width: 76px; height: 76px; margin: 0 auto 20px; color: var(--yellow); }
.cu-mark circle, .cu-mark path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s cubic-bezier(.6, 0, .2, 1) forwards; }
.cu-mark path:nth-child(2) { animation-delay: .18s; }
.cu-mark path:nth-child(3) { animation-delay: .34s; }
.cu-mark circle + path + path + circle { opacity: 0; animation: fadeIn .5s .7s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }
.cu-name { font-size: 26px; font-weight: 800; letter-spacing: -.03em; opacity: 0; animation: fadeUp .7s .55s forwards; }
.cu-sub { margin-top: 6px; font-size: 13.5px; color: #9aa5b1; opacity: 0; animation: fadeUp .7s .7s forwards; }
.cu-line { width: 56px; height: 2px; background: var(--yellow); margin: 22px auto 0; opacity: 0; animation: fadeUp .7s .85s forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  #curtain, #curtain * { animation: none !important; }
  #curtain.done { transition: opacity .3s; transform: none; }
}

/* ── 헤더 ───────────────────────────────────────────────── */
.hdr {
  position: sticky; top: 0; z-index: 900;
  background: rgba(244, 245, 246, .82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(16, 21, 25, .06);
}
.hdr-in {
  max-width: var(--max); margin: 0 auto; height: var(--hdr-h);
  display: flex; align-items: center; gap: 10px; padding: 0 16px;
}
.brand { display: flex; align-items: center; gap: 9px; cursor: pointer; flex: 0 0 auto; padding: 6px 2px; }
.brand .mark { width: 30px; height: 30px; color: var(--ink); flex: 0 0 auto; }
.b-txt { display: flex; flex-direction: column; line-height: 1.1; }
.b-name { font-weight: 850; font-size: 15.5px; letter-spacing: -.03em; }
.b-tag { font-size: 10.5px; color: var(--ink-3); letter-spacing: .06em; margin-top: 2px; }
.tabs { display: flex; gap: 2px; margin-left: 14px; flex: 1 1 auto; overflow: hidden; }
.tab {
  padding: 8px 12px; border-radius: 9px; font-size: 14px; font-weight: 650; color: var(--ink-2);
  white-space: nowrap;
}
.tab:hover { background: rgba(16, 21, 25, .05); color: var(--ink); }
.tab.active { background: var(--ink); color: #fff; }
.hdr-r { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.icon-btn {
  border: 0; background: transparent; width: 38px; height: 38px; border-radius: 10px;
  font-size: 15px; font-weight: 800; color: var(--ink-2); cursor: pointer;
  display: grid; place-items: center;
}
.icon-btn:hover { background: rgba(16, 21, 25, .06); color: var(--ink); }
.burger { display: none; font-size: 18px; }

/* 서브 내비 (뒤로/앞으로) */
.subnav {
  position: sticky; top: var(--hdr-h); z-index: 880;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 6px;
  padding: 7px 16px;
  max-width: 100%;
}
.subnav-in, .subnav { max-width: var(--max); margin: 0 auto; }
.qnav {
  width: 40px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; font-size: 17px; font-weight: 700; color: var(--ink); cursor: pointer;
  display: grid; place-items: center; flex: 0 0 auto;
}
.qnav:disabled { opacity: .3; cursor: default; }
.qnav:not(:disabled):hover { background: var(--line-2); }
.subnav-t { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-left: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 본문 ───────────────────────────────────────────────── */
main { display: block; min-height: 60vh; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.sec { padding: 34px 0 8px; }
.sec-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-h h2 { font-size: 21px; }
.sec-h .more { font-size: 13px; font-weight: 700; color: var(--blue); white-space: nowrap; }
.kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .12em; color: var(--blue); text-transform: uppercase; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }

/* 히어로 */
.hero {
  margin: 14px auto 0; max-width: var(--max); padding: 0 16px;
}
.hero-card {
  position: relative; overflow: hidden; border-radius: 24px;
  background: var(--night); color: #fff;
  min-height: 380px;
  display: grid; grid-template-columns: 1.05fr .95fr;
  box-shadow: var(--shadow);
}
.hero-txt { padding: 38px 34px 34px; position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
  font-size: 11.5px; font-weight: 800; letter-spacing: .1em; color: var(--yellow);
  border: 1px solid rgba(255, 196, 0, .35); border-radius: 999px; padding: 5px 11px;
}
.hero h1 { font-size: clamp(30px, 4.2vw, 46px); margin: 16px 0 12px; letter-spacing: -.04em; }
.hero h1 em { font-style: normal; color: var(--yellow); }
.hero-lead { font-size: 15px; color: #b9c2cc; max-width: 420px; }
.hero-facts { display: flex; gap: 22px; margin: 24px 0 26px; flex-wrap: wrap; }
.hero-facts div { display: flex; flex-direction: column; }
.hero-facts b { font-size: 21px; font-weight: 850; letter-spacing: -.02em; }
.hero-facts span { font-size: 11.5px; color: #8b96a3; margin-top: 2px; }
.hero-cta { display: flex; gap: 9px; flex-wrap: wrap; }
.hero-3d { position: relative; min-height: 320px; }
#heroCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-3d::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--night) 0%, rgba(18, 22, 27, .55) 28%, rgba(18, 22, 27, 0) 62%);
  pointer-events: none;
}
.hero-badge {
  position: absolute; left: 20px; bottom: 18px; z-index: 3;
  font-size: 11.5px; color: #cdd5dd; background: rgba(10, 13, 16, .55);
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; padding: 6px 12px;
  backdrop-filter: blur(6px);
}

/* 버튼 */
.btn {
  border: 0; border-radius: 12px; padding: 12px 18px; font-size: 14.5px; font-weight: 750;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s, background .15s, box-shadow .15s;
  min-height: 46px;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--yellow); color: #16191d; }
.btn-primary:hover { background: #ffd233; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #232a31; }
.btn-ghost { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .22); }
.btn-ghost:hover { background: rgba(255, 255, 255, .17); }
.btn-line { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-line:hover { background: var(--line-2); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-d); }
.btn-sm { padding: 8px 13px; font-size: 13px; min-height: 38px; border-radius: 10px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* 종별 카드 */
.grid-lic { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.lic {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 16px; cursor: pointer; text-align: left; position: relative;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  display: flex; flex-direction: column; gap: 4px;
}
.lic:hover { border-color: #c9ced4; box-shadow: var(--shadow); transform: translateY(-1px); }
.lic.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink) inset, var(--shadow); }
.lic .lic-code { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--blue); }
.lic b { font-size: 16.5px; letter-spacing: -.02em; }
.lic span { font-size: 12.5px; color: var(--ink-3); }
.lic .tick { position: absolute; top: 14px; right: 14px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); color: #fff; display: none; place-items: center; font-size: 11px; }
.lic.on .tick { display: grid; }

/* 기능 카드 */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px; box-shadow: none;
}
.feat { cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; display: flex; flex-direction: column; gap: 8px; min-height: 148px; }
.feat:hover { border-color: #c9ced4; transform: translateY(-2px); box-shadow: var(--shadow); }
.feat .fi { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #eef2fb; color: var(--blue); margin-bottom: 4px; }
.feat .fi svg { width: 23px; height: 23px; }
.feat b { font-size: 16.5px; }
.feat p { font-size: 13px; color: var(--ink-3); }
.feat .go { margin-top: auto; font-size: 12.5px; font-weight: 800; color: var(--ink); }

/* 현황 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 14px 15px; }
.stat b { display: block; font-size: 24px; font-weight: 850; letter-spacing: -.03em; }
.stat span { font-size: 11.5px; color: var(--ink-3); }
.stat.hot b { color: var(--blue); }

/* 문제 카드 */
.q-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.q-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.badge {
  font-size: 11px; font-weight: 800; letter-spacing: .02em; padding: 4px 9px; border-radius: 999px;
  background: var(--line-2); color: var(--ink-2); white-space: nowrap;
}
.badge.b-blue { background: #e9efff; color: var(--blue); }
.badge.b-green { background: #e6f5ee; color: var(--green); }
.badge.b-yellow { background: #fff6d6; color: #8a6300; }
.badge.b-red { background: #fdeae8; color: var(--red); }
.badge.b-dark { background: var(--ink); color: #fff; }
.q-no { font-size: 12px; color: var(--ink-3); font-weight: 700; margin-left: auto; }
.q-text { font-size: 17px; font-weight: 700; line-height: 1.6; letter-spacing: -.01em; }
.q-img { margin: 14px 0 4px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.q-img img { width: 100%; height: auto; cursor: zoom-in; }
.q-scene { margin: 12px 0 0; display: flex; flex-direction: column; gap: 5px; }
.q-scene li { font-size: 12.5px; color: var(--ink-2); padding-left: 14px; position: relative; }
.q-scene li::before { content: ''; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--yellow); }

.opts { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.opt {
  display: flex; gap: 11px; align-items: flex-start; text-align: left; width: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px;
  cursor: pointer; font-size: 14.5px; line-height: 1.5; transition: border-color .12s, background .12s;
}
.opt:hover { border-color: #b9c0c8; background: #fbfbfc; }
.opt .num {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #cfd4da;
  display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--ink-2); margin-top: 1px;
}
.opt.sel { border-color: var(--ink); background: #f7f8f9; }
.opt.sel .num { background: var(--ink); border-color: var(--ink); color: #fff; }
.opt.ok { border-color: var(--green); background: #f1faf5; }
.opt.ok .num { background: var(--green); border-color: var(--green); color: #fff; }
.opt.no { border-color: var(--red); background: #fdf3f2; }
.opt.no .num { background: var(--red); border-color: var(--red); color: #fff; }
.opt[disabled] { cursor: default; }

.explain { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 16px; }
.explain h4 { font-size: 13px; color: var(--ink-3); font-weight: 800; letter-spacing: .04em; margin-bottom: 6px; }
.exp-core {
  background: #f1f7ff; border: 1px solid #dbe8ff; border-radius: 12px; padding: 13px 14px;
  font-size: 14.5px; font-weight: 700; color: #123a86; margin-bottom: 10px;
}
.exp-why { font-size: 14px; color: var(--ink-2); line-height: 1.65; }
.exp-full { margin-top: 10px; }
.exp-full summary { cursor: pointer; font-size: 13px; font-weight: 750; color: var(--blue); list-style: none; }
.exp-full summary::-webkit-details-marker { display: none; }
.exp-full p { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); line-height: 1.7; white-space: pre-wrap; }
.exp-tip { margin-top: 12px; font-size: 12.5px; color: var(--ink-3); border-left: 3px solid var(--yellow); padding-left: 10px; }

/* 시험 화면 */
.exam-bar {
  position: sticky; top: var(--hdr-h); z-index: 850; background: rgba(244, 245, 246, .95);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 9px 16px;
}
.exam-bar-in { max-width: 860px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 850; font-size: 18px; letter-spacing: -.02em; }
.timer.warn { color: var(--red); }
.exam-prog { flex: 1; height: 6px; background: #e2e5e8; border-radius: 99px; overflow: hidden; }
.exam-prog i { display: block; height: 100%; background: var(--ink); width: 0; transition: width .25s; }
.exam-count { font-size: 12.5px; font-weight: 750; color: var(--ink-2); white-space: nowrap; }
.exam-main { max-width: 860px; margin: 0 auto; padding: 18px 16px 30px; }
.exam-foot { display: flex; gap: 10px; margin-top: 16px; }
.exam-foot .btn { flex: 1; }
.palette { display: grid; grid-template-columns: repeat(8, 1fr); gap: 7px; margin: 14px 0; }
.pal {
  aspect-ratio: 1; border-radius: 9px; border: 1px solid var(--line); background: #fff;
  font-size: 12.5px; font-weight: 750; cursor: pointer; display: grid; place-items: center;
}
.pal.done { background: var(--ink); color: #fff; border-color: var(--ink); }
.pal.cur { outline: 2px solid var(--blue); outline-offset: 1px; }

/* 결과 */
.result-hero { text-align: center; padding: 30px 16px 8px; }
.score-ring { width: 168px; height: 168px; margin: 0 auto 14px; position: relative; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .num { position: absolute; inset: 0; display: grid; place-items: center; font-size: 44px; font-weight: 850; letter-spacing: -.04em; }
.verdict { font-size: 22px; font-weight: 850; margin-bottom: 4px; }
.verdict.pass { color: var(--green); }
.verdict.fail { color: var(--red); }
.breakdown { display: flex; flex-direction: column; gap: 9px; margin-top: 18px; }
.bd-row { display: grid; grid-template-columns: 92px 1fr 62px; gap: 10px; align-items: center; font-size: 13px; }
.bd-bar { height: 8px; background: #e9ecef; border-radius: 99px; overflow: hidden; }
.bd-bar i { display: block; height: 100%; background: var(--blue); }
.bd-row b { text-align: right; font-variant-numeric: tabular-nums; }

/* 3D */
.scene-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sc-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s;
}
.sc-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #c9ced4; }
.sc-thumb { aspect-ratio: 16 / 10; background: #10151a; position: relative; }
.sc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sc-thumb .lv { position: absolute; top: 10px; left: 10px; }
.sc-body { padding: 13px 14px 15px; }
.sc-body b { font-size: 15.5px; display: block; }
.sc-body p { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }

.drive { position: relative; background: var(--night); border-radius: 20px; overflow: hidden; color: #fff; max-width: 900px; margin: 0 auto; }
.drive-canvas { position: relative; aspect-ratio: 16 / 9; background: #0b0f13; }
.drive-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.drive-canvas::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 16%;
  background: linear-gradient(180deg, rgba(9,12,16,0) 0%, rgba(9,12,16,.72) 62%, #090c10 100%);
  pointer-events: none; z-index: 1; }
.drive-hud { position: absolute; inset: 0; pointer-events: none; }
.hud-tl { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.hud-tr { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; pointer-events: auto; }
.hud-chip {
  font-size: 11.5px; font-weight: 750; padding: 5px 10px; border-radius: 999px;
  background: rgba(8, 11, 14, .62); border: 1px solid rgba(255, 255, 255, .14); color: #e7edf3;
  backdrop-filter: blur(6px);
}
.hud-chip.on { background: var(--yellow); color: #15181c; border-color: var(--yellow); }
.hud-speed {
  position: absolute; left: 14px; bottom: 12px; font-variant-numeric: tabular-nums;
  font-size: 30px; font-weight: 850; letter-spacing: -.04em; color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}
.hud-speed small { font-size: 11px; font-weight: 700; color: #9fabb6; margin-left: 3px; letter-spacing: 0; }
.hud-mission {
  position: absolute; left: 50%; top: 54px; transform: translateX(-50%);
  max-width: 78%; text-align: center; font-size: 13px; font-weight: 750; color: #fff;
  background: rgba(8, 11, 14, .6); border: 1px solid rgba(255, 255, 255, .12);
  padding: 7px 14px; border-radius: 999px; backdrop-filter: blur(6px);
}
.drive-pad {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; background: #0e1318;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.pad-btn {
  border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); color: #fff;
  border-radius: 12px; padding: 13px 10px; font-size: 14px; font-weight: 800; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 50px;
}
.pad-btn:hover { background: rgba(255, 255, 255, .12); }
.pad-btn.brake { border-color: rgba(207, 59, 46, .55); color: #ffb4ac; }
.pad-btn.brake.on { background: var(--red); color: #fff; }
.pad-btn.accel { border-color: rgba(255, 196, 0, .5); color: var(--yellow); }
.pad-btn.accel.on { background: var(--yellow); color: #15181c; }
.pad-btn.wide { grid-column: span 2; }
.pad-btn.sig.on { background: #2b6bff; border-color: #2b6bff; }
.view-toggle { position: absolute; right: 12px; bottom: 12px; pointer-events: auto; }
.drive-msg {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center;
  background: rgba(6, 9, 12, .72); backdrop-filter: blur(3px);
}
.drive-msg .box { max-width: 420px; }
.drive-msg h3 { font-size: 20px; margin-bottom: 6px; }
.drive-msg p { font-size: 13.5px; color: #c3ccd6; }
.drive-msg .ok { color: #58d6a0; }
.drive-msg .no { color: #ff8d80; }

/* 목록 */
.list { display: flex; flex-direction: column; gap: 8px; }
.row {
  background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 13px 15px;
  display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left; width: 100%;
}
.row:hover { border-color: #c5cbd2; }
.row .n { font-size: 12px; font-weight: 800; color: var(--ink-3); width: 34px; flex: 0 0 auto; }
.row .t { flex: 1; font-size: 14px; font-weight: 650; line-height: 1.45; }
.row .r { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }

.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px;
  font-size: 13px; font-weight: 700; color: var(--ink-2); cursor: pointer; white-space: nowrap;
}
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.empty { text-align: center; padding: 50px 20px; color: var(--ink-3); }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 6px; }

/* 설정 */
.set-list { display: flex; flex-direction: column; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.set-row:last-child { border-bottom: 0; }
.set-row .k { font-size: 14px; font-weight: 700; }
.set-row .d { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

/* 푸터 */
.foot { border-top: 1px solid var(--line); margin-top: 46px; padding: 30px 0 26px; background: #fbfbfc; }
.foot-in { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-brand .mark { width: 28px; height: 28px; color: var(--ink); }
.foot-brand strong { font-size: 15px; }
.foot-brand p { font-size: 12px; color: var(--ink-3); }
.foot-links { display: flex; gap: 18px; margin: 18px 0 10px; flex-wrap: wrap; }
.foot-links a { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.foot-links a:hover { color: var(--blue); }
.foot-fine { font-size: 11.5px; color: var(--ink-3); line-height: 1.65; max-width: 760px; }
.foot-mail { font-size: 12px; color: var(--ink-2); margin-top: 8px; font-weight: 700; }

/* 하단 고정 3종 버전 바 */
.verbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 950;
  height: calc(var(--ver-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex; align-items: center; justify-content: center; gap: 0;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--line);
}
.vb {
  border: 0; background: transparent; font-size: 12.5px; font-weight: 750; color: var(--ink-2);
  height: 100%; padding: 0 18px; cursor: pointer;
}
.vb:hover { color: var(--ink); }
.vb.on { color: var(--blue); }
.vb-sep { width: 1px; height: 14px; background: var(--line); }

/* 시트 */
.sheet-wrap { position: fixed; inset: 0; z-index: 1200; }
.sheet-bg { position: absolute; inset: 0; background: rgba(8, 11, 14, .48); }
.sheet {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(560px, 100%); max-height: 82vh; overflow: auto;
  background: #fff; border-radius: 22px 22px 0 0; padding: 10px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .25);
  animation: up .28s cubic-bezier(.2, .8, .2, 1);
}
@keyframes up { from { transform: translate(-50%, 40px); opacity: .4; } }
.sheet-grab { width: 38px; height: 4px; border-radius: 99px; background: #d8dde2; margin: 6px auto 12px; }
.sheet-t { font-size: 17px; margin-bottom: 10px; }
.sheet-body { display: flex; flex-direction: column; }
.sheet-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line-2);
  font-size: 14.5px; font-weight: 650; cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; width: 100%;
}
.sheet-item:hover { color: var(--blue); }
.sheet-item .ic { width: 22px; text-align: center; color: var(--ink-3); }

/* 토스트 */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--ver-h) + 22px); transform: translate(-50%, 14px);
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none; transition: .22s; z-index: 1500;
  max-width: 90vw; text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* 이미지 확대 (뒤로가기로 닫힘) */
.lightbox { position: fixed; inset: 0; z-index: 1300; background: rgba(7, 10, 13, .93); display: grid; place-items: center; padding: 16px; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 10px; }
.lightbox .close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; border: 0; font-size: 20px; cursor: pointer; }

/* 진행 표시 */
.bar { height: 8px; background: #e9ecef; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--blue); transition: width .3s; }

/* 모드 */
html.mode-m body, html.mode-app body { background: #e9ebed; }
html.mode-m main, html.mode-m .hdr-in, html.mode-m .foot-in, html.mode-m .hero,
html.mode-app main, html.mode-app .hdr-in, html.mode-app .foot-in, html.mode-app .hero {
  max-width: 480px;
}
html.mode-m .hero-card, html.mode-app .hero-card { grid-template-columns: 1fr; min-height: 0; }
html.mode-m .hero-3d, html.mode-app .hero-3d { min-height: 240px; }
html.mode-m .hero-3d::after, html.mode-app .hero-3d::after { background: linear-gradient(180deg, rgba(18,22,27,0) 40%, var(--night) 100%); }
html.mode-m .grid-4, html.mode-m .grid-3, html.mode-app .grid-3, html.mode-app .grid-2 { grid-template-columns: 1fr; }

/* 반응형 */
@media (max-width: 1020px) {
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .grid-lic { grid-template-columns: repeat(2, 1fr); }
  .scene-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .hero-card { grid-template-columns: 1fr; min-height: 0; }
  .hero-txt { padding: 26px 22px 22px; }
  .hero-3d { min-height: 250px; }
  .hero-3d::after { background: linear-gradient(180deg, rgba(18,22,27,0) 45%, var(--night) 100%); }
  .tabs { display: none; }
  .burger { display: grid; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .q-card { padding: 17px; }
  .q-text { font-size: 16px; }
  .palette { grid-template-columns: repeat(6, 1fr); }
  .sec { padding: 26px 0 6px; }
  .sec-h h2 { font-size: 19px; }
}
@media (max-width: 420px) {
  .grid-lic { grid-template-columns: 1fr; }
  .scene-grid { grid-template-columns: 1fr; }
  .b-tag { display: none; }
  .score-ring { width: 150px; height: 150px; }
  .score-ring .num { font-size: 38px; }
}

/* 앱 모드: 설치 안내 */
.install-card { background: var(--ink); color: #fff; border-radius: 16px; padding: 22px; }
.install-card h3 { font-size: 18px; }
.install-card p { font-size: 13px; color: #b7c0ca; margin-top: 6px; }
.install-steps { margin-top: 14px; display: flex; flex-direction: column; gap: 9px; }
.install-steps li { font-size: 13px; color: #dfe5eb; padding-left: 26px; position: relative; }
.install-steps li b { position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--yellow); color: #16191d; display: grid; place-items: center; font-size: 11px; }
