:root {
  --bg: #070b16; --panel: #0c1426; --panel2: #101b33; --line: #1e3a5f;
  --accent: #39c0ff; --accent-dim: #1f6f95; --gold: #ffd166; --good: #52e39b; --bad: #ff6b7a; --text: #e6eef8; --muted: #7f93b3;
  --glow: 0 0 18px rgba(57,192,255,.25), inset 0 0 12px rgba(57,192,255,.06);
  --font: 'Noto Sans KR', system-ui, -apple-system, sans-serif; --pixel: 'Galmuri11', 'Noto Sans KR', monospace;
}
[data-theme="kepco"] {
  --bg: #0a0d0a; --panel: #0f1810; --panel2: #15221a; --line: #2b5a34; --accent: #7cf29a; --accent-dim: #2f8a4a; --gold: #ffd166;
  --glow: 0 0 18px rgba(124,242,154,.22), inset 0 0 12px rgba(124,242,154,.05);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; }
body { background-image: radial-gradient(1200px 600px at 50% -20%, rgba(57,192,255,.10), transparent 60%); min-height: 100dvh; }
[data-theme="kepco"] body { background-image: radial-gradient(1200px 600px at 50% -20%, rgba(124,242,154,.10), transparent 60%); }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 12px; } .gold { color: var(--gold); } .good { color: var(--good); } .bad { color: var(--bad); }
.delta { font-variant-numeric: tabular-nums; } .delta.up { color: var(--good); } .delta.down { color: var(--bad); }
b { font-weight: 700; }
button { font-family: inherit; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 15px; background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; width: 100%; min-width: 0; }
textarea { resize: vertical; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row > * { flex: 1; }
.form { display: grid; gap: 8px; }
.btn { background: linear-gradient(180deg, var(--accent), var(--accent-dim)); border: 0; color: #041018; font-weight: 700; padding: 10px 14px; border-radius: 10px; cursor: pointer; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--accent); }
.btn.danger { background: transparent; border: 1px solid #6b2a33; color: var(--bad); }
.link-btn { background: none; border: 0; color: var(--accent); padding: 0; cursor: pointer; font-size: 13px; }
.icon-btn { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; width: 38px; height: 38px; font-size: 18px; cursor: pointer; }
.wide-btn { width: 100%; padding: 12px; border-radius: 12px; font-weight: 700; cursor: pointer; }
.wide-btn.ghost { background: transparent; border: 1px dashed var(--line); color: var(--accent); }

.screen { max-width: 640px; margin: 0 auto; padding: 12px 16px calc(84px + env(safe-area-inset-bottom)); }
#screen-select { padding-top: 60px; }
.profile-list { display: grid; gap: 10px; margin: 12px 0; }
.profile-card { display: flex; gap: 12px; align-items: center; background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; cursor: pointer; text-align: left; width: 100%; }
.profile-card .avatar { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 26px; background: var(--panel); border: 1px solid var(--line); }
.profile-card .meta { flex: 1; } .profile-card .meta b { font-size: 17px; }

/* 시스템 창 프레임 */
.sys-frame { position: relative; background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 12px 0; box-shadow: var(--glow); }
.sys-frame::before, .sys-frame::after { content: ''; position: absolute; width: 10px; height: 10px; border-color: var(--accent); border-style: solid; opacity: .8; }
.sys-frame::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-radius: 4px 0 0 0; }
.sys-frame::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; border-radius: 0 0 4px 0; }
.sys-head { font-family: var(--pixel); font-size: 13px; letter-spacing: .04em; color: var(--accent); display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.blink { animation: blink 1.4s steps(2) infinite; } @keyframes blink { 50% { opacity: .35; } }

/* 상단바 */
.topbar { display: flex; gap: 10px; align-items: center; padding: 6px 0 2px; }
.who { flex: 1; min-width: 0; }
.name-line { display: flex; gap: 6px; align-items: center; font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.title-badge { font-size: 11px; color: var(--gold); border: 1px solid rgba(255,209,102,.4); padding: 0 6px; border-radius: 6px; font-family: var(--pixel); }
.title-badge:empty { display: none; }
.lv-line { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.xpbar { flex: 1; height: 6px; background: #0a1020; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; max-width: 160px; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-dim), var(--accent)); width: 0; transition: width .6s; }
.streak { font-weight: 700; font-size: 15px; background: var(--panel2); border: 1px solid var(--line); padding: 6px 10px; border-radius: 10px; }

/* 확률 카드 */
.prob-main { display: flex; gap: 14px; align-items: center; }
.prob-num { font-family: var(--pixel); font-size: 54px; line-height: 1; color: var(--text); text-shadow: 0 0 22px rgba(57,192,255,.45); font-variant-numeric: tabular-nums; }
.prob-num small { font-size: 22px; color: var(--accent); margin-left: 2px; }
.prob-side { flex: 1; font-size: 13px; display: grid; gap: 2px; }
.prob-why { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; font-size: 13px; }
.factor { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 6px 0; border-bottom: 1px solid rgba(30,58,95,.5); }
.factor .bar { grid-column: 1 / -1; height: 5px; background: #0a1020; border-radius: 3px; overflow: hidden; }
.factor .bar i { display: block; height: 100%; background: var(--accent); }
.factor .bar i.measured { background: var(--gold); } .factor .bar i.behavior { background: var(--good); }
.factor .note { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.legend { display: flex; gap: 12px; font-size: 11px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 6px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }

.briefing p { margin: 0; font-size: 14px; min-height: 1.5em; }

/* 퀘스트 */
.quest-group { margin-top: 18px; }
.quest-group h3 { font-size: 13px; color: var(--muted); font-weight: 500; margin: 0 0 8px 4px; letter-spacing: .02em; }
.quest-list { display: grid; gap: 8px; }
.quest { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; transition: transform .08s, border-color .2s; user-select: none; }
.quest:active { transform: scale(.985); }
.quest.done { opacity: .55; border-color: var(--accent-dim); }
.quest .ico { font-size: 22px; width: 32px; text-align: center; }
.quest .body { min-width: 0; }
.quest .t { font-weight: 700; font-size: 15px; }
.quest.done .t { text-decoration: line-through; }
.quest .d { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quest .rw { text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
.quest .rw .xp { color: var(--accent); font-weight: 700; }
.quest .rw .pp { color: var(--good); }
.quest .due { font-size: 11px; color: var(--gold); }
.quest .due.over { color: var(--bad); }
.quest.special { border-color: rgba(255,209,102,.55); background: linear-gradient(180deg, rgba(255,209,102,.10), var(--panel2)); }
.quest.sudden { border-color: #a267ff; background: linear-gradient(180deg, rgba(162,103,255,.14), var(--panel2)); }
.check { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line); display: inline-grid; place-items: center; font-size: 14px; color: #041018; }
.quest.done .check { background: var(--accent); border-color: var(--accent); }
.milestones { display: grid; gap: 6px; }
.ms { display: flex; gap: 10px; align-items: baseline; font-size: 14px; padding: 6px 10px; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; }
.ms .dd { font-family: var(--pixel); color: var(--gold); min-width: 52px; }
.ms .date { color: var(--muted); font-size: 12px; margin-left: auto; }

/* 상태창 */
.stat-list { display: grid; gap: 10px; }
.stat { display: grid; grid-template-columns: 40px 1fr auto; gap: 4px 10px; align-items: center; }
.stat .rank { font-family: var(--pixel); font-size: 20px; text-align: center; color: var(--accent); }
.stat .rank.S, .stat .rank.SS, .stat .rank.SSS { color: var(--gold); text-shadow: 0 0 10px rgba(255,209,102,.6); }
.stat .rank.A { color: var(--good); } .stat .rank.D, .stat .rank.E, .stat .rank.F { color: var(--muted); }
.stat .lbl { font-weight: 700; }
.stat .val { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); }
.stat .bar { grid-column: 2 / -1; height: 8px; background: #0a1020; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.stat .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-dim), var(--accent)); transition: width .6s; }
.stat .desc { grid-column: 2 / -1; font-size: 12px; color: var(--muted); }
.stat .plus { background: var(--gold); color: #1a1200; border: 0; border-radius: 6px; padding: 2px 8px; font-weight: 700; cursor: pointer; }
.measured-list { display: grid; gap: 6px; }
.measured { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; padding: 6px 0; border-bottom: 1px solid rgba(30,58,95,.5); }
.measured .v { font-family: var(--pixel); color: var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 13px; cursor: pointer; background: var(--panel2); }
.chip.active { border-color: var(--gold); color: var(--gold); }
.chip.locked { opacity: .45; cursor: default; }
.inv-list { display: grid; gap: 8px; }
.inv { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.inv .ic { font-size: 22px; } .inv .n { font-weight: 700; } .inv .c { color: var(--gold); font-family: var(--pixel); margin-left: auto; }

/* 기록 */
.heatmap { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; margin: 6px 0 10px; }
.heatmap .col { display: grid; gap: 3px; }
.heatmap .cell { aspect-ratio: 1; border-radius: 3px; background: #0a1020; border: 1px solid rgba(30,58,95,.5); }
.heatmap .cell.l1 { background: rgba(57,192,255,.25); } .heatmap .cell.l2 { background: rgba(57,192,255,.5); } .heatmap .cell.l3 { background: rgba(57,192,255,.8); } .heatmap .cell.l4 { background: var(--accent); }
.heatmap .cell.rest { background: rgba(255,209,102,.4); }
.heatmap .cell.today { outline: 1px solid var(--gold); }
.log-list { display: grid; gap: 6px; }
.log { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; font-size: 13px; padding: 7px 0; border-bottom: 1px solid rgba(30,58,95,.5); }
.log .when { color: var(--muted); font-size: 11px; grid-column: 1 / -1; }
.log .ab { color: var(--gold); font-size: 12px; }
.report { white-space: pre-wrap; font-size: 14px; line-height: 1.6; }

/* 부모 */
.manage-list { display: grid; gap: 6px; margin-top: 8px; }
.mq { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; font-size: 13px; padding: 6px 8px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; }
.mq .k { color: var(--muted); font-size: 11px; }
.mq button { background: transparent; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; font-size: 12px; cursor: pointer; }
.days label { flex: 0; display: flex; align-items: center; gap: 3px; font-size: 12px; }
.days input { width: auto; }
.mform { display: grid; grid-template-columns: 1fr 90px auto; gap: 6px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.mform .lbl b { display: block; } .mform .lbl span { color: var(--muted); font-size: 11px; }

/* 탭바 */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: rgba(7,11,22,.92); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar button { flex: 1; background: none; border: 0; padding: 8px 0 6px; font-size: 20px; color: var(--muted); display: grid; place-items: center; gap: 1px; cursor: pointer; }
.tabbar button span { font-size: 11px; }
.tabbar button.active { color: var(--accent); }

/* 완료 오버레이 */
.overlay { position: fixed; inset: 0; background: rgba(3,6,14,.86); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; z-index: 50; animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.sys-window { width: min(440px, 100%); background: linear-gradient(180deg, #0f1a33, #0a1224); border: 1px solid var(--accent); border-radius: 14px; padding: 18px; box-shadow: 0 0 40px rgba(57,192,255,.35), inset 0 0 30px rgba(57,192,255,.06); animation: pop .35s cubic-bezier(.2,1.4,.4,1); }
[data-theme="kepco"] .sys-window { background: linear-gradient(180deg, #13261a, #0b170f); box-shadow: 0 0 40px rgba(124,242,154,.3); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.ov-lines { min-height: 90px; font-size: 16px; display: grid; gap: 8px; }
.ov-lines .l { opacity: 0; animation: rise .4s forwards; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { opacity: 1; } }
.ov-lines .ability { font-size: 22px; font-weight: 900; color: var(--gold); text-shadow: 0 0 16px rgba(255,209,102,.6); }
.ov-lines .ability .q { color: var(--text); font-weight: 400; }
.ov-lines .flavor { color: var(--muted); font-size: 13px; }
.ov-prob { margin-top: 12px; font-family: var(--pixel); font-size: 16px; }
.ov-extra { display: grid; gap: 6px; margin-top: 10px; }
.ov-extra .ex { padding: 8px 10px; border-radius: 8px; background: rgba(255,209,102,.10); border: 1px solid rgba(255,209,102,.4); font-size: 14px; animation: rise .4s; }
.ov-extra .ex.lv { background: rgba(57,192,255,.12); border-color: var(--accent); }
#ov-close { width: 100%; margin-top: 14px; }

/* 거울 모드 */
.mirror { position: fixed; inset: 0; background: #000; z-index: 60; }
.mirror video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); opacity: .85; }
.mirror-ui { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr auto; padding: max(14px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(0,0,0,.55), transparent 25%, transparent 60%, rgba(0,0,0,.7)); }
.mirror-top { display: flex; justify-content: space-between; align-items: center; }
.mirror-center { display: grid; align-content: end; gap: 12px; text-align: center; padding-bottom: 20px; }
.mirror-text { font-size: 26px; font-weight: 900; line-height: 1.35; text-shadow: 0 2px 14px rgba(0,0,0,.9); }
.mirror-reps { display: flex; gap: 10px; justify-content: center; }
.mirror-reps i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--gold); }
.mirror-reps i.on { background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.mirror-bottom { display: grid; place-items: center; }
.hold-btn { position: relative; width: 120px; height: 120px; border-radius: 50%; border: 3px solid var(--gold); background: rgba(255,209,102,.15); color: var(--gold); font-weight: 900; font-size: 15px; cursor: pointer; touch-action: none; }
.hold-btn .ring { position: absolute; inset: -3px; border-radius: 50%; background: conic-gradient(var(--gold) var(--p, 0%), transparent 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 0); mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 0); }
.hold-btn.holding { background: rgba(255,209,102,.35); transform: scale(1.04); }
.hold-btn.done { background: var(--gold); color: #1a1200; }
.mirror.nocam { background: radial-gradient(600px 400px at 50% 30%, #17203a, #05070f); }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--accent); color: var(--text); padding: 10px 14px; border-radius: 10px; font-size: 14px; z-index: 70; max-width: 90vw; box-shadow: var(--glow); }
.typewriter { white-space: pre-wrap; }
@media (max-width: 380px) { .prob-num { font-size: 44px; } }

/* 일정 배너 · 그룹 버튼 · 큰 카드 */
.sched-banner { background: linear-gradient(180deg, rgba(255,209,102,.18), rgba(255,209,102,.06)); border: 1px solid rgba(255,209,102,.5); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin: 8px 0; }
.group-btns { display: flex; gap: 8px; margin-top: 16px; }
.grp-btn { flex: 1; background: var(--panel2); border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: 10px 6px; font-size: 13px; cursor: pointer; display: flex; justify-content: center; gap: 6px; align-items: center; }
.grp-btn b { color: var(--accent); } .grp-btn .chev { color: var(--muted); }
.quest.big { padding: 14px 12px; } .quest.big .t { font-size: 16px; }
.quest.skipped { opacity: .5; }
.quest .time { color: var(--gold); font-size: 11px; margin-right: 4px; }
.quest .kind { font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; vertical-align: middle; font-weight: 400; }
.quest .info-lnk { color: var(--muted); text-decoration: none; margin-left: 4px; }
.quest .pbar { height: 5px; background: #0a1020; border-radius: 3px; overflow: hidden; margin-top: 6px; } .quest .pbar i { display: block; height: 100%; background: var(--gold); }
.skip-btn { display: block; margin: 6px 0 0 auto; background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 6px; font-size: 11px; padding: 2px 7px; cursor: pointer; }
.allclear { text-align: center; font-size: 15px; }

/* 하루 여정(장면) */
.scene-card { position: relative; height: 210px; border-radius: 16px; overflow: hidden; background: var(--panel2) center 35% / cover no-repeat; border: 1px solid var(--line); box-shadow: var(--glow); }
.scene-card.nobg { background: linear-gradient(135deg, var(--panel2), var(--accent-dim)); }
.scene-card .scene-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px; background: linear-gradient(180deg, transparent, rgba(3,6,14,.88)); }
.scene-title { font-weight: 900; font-size: 17px; text-shadow: 0 1px 8px rgba(0,0,0,.9); }
.scene-sub { font-size: 12px; color: var(--gold); font-family: var(--pixel); }
.journey { display: flex; align-items: center; gap: 4px; margin: 8px 0 12px; }
.jn { flex: 0 0 auto; display: grid; place-items: center; gap: 1px; width: 50px; padding: 6px 0 4px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); cursor: pointer; }
.jn .ic { font-size: 18px; } .jn .n { font-size: 10px; font-variant-numeric: tabular-nums; }
.jn.past { opacity: .55; }
.jn.cur { border-color: var(--gold); color: var(--text); box-shadow: 0 0 12px rgba(255,209,102,.35); }
.jn.sel { background: var(--panel); border-color: var(--accent); }
.jn-line { flex: 1; height: 2px; background: var(--line); min-width: 4px; }
.quest .kind.late { color: var(--bad); border-color: var(--bad); }
.mirror-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .95; }
.mirror video.pip { inset: auto; left: 16px; bottom: calc(150px + env(safe-area-inset-bottom)); width: 96px; height: 96px; border-radius: 50%; border: 2px solid var(--gold); opacity: 1; object-fit: cover; z-index: 2; box-shadow: 0 0 14px rgba(255,209,102,.5); }
.mirror.nocam video.pip { display: none; }

/* 그림 자산: 아이콘·배지·보스·귤·톡·전직 */
.stat-ic { width: 26px; height: 26px; object-fit: contain; vertical-align: middle; margin-right: 2px; filter: drop-shadow(0 0 4px rgba(57,192,255,.4)); }
.chip.badge { display: inline-flex; align-items: center; gap: 6px; padding-left: 4px; }
.chip.badge img { width: 26px; height: 26px; object-fit: contain; }
.boss { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.boss-thumb { width: 56px; height: 72px; object-fit: cover; object-position: center 30%; border-radius: 10px; border: 1px solid #6b2a33; box-shadow: 0 0 10px rgba(255,107,122,.35); cursor: pointer; flex: 0 0 auto; }
.boss-body { flex: 1; min-width: 0; }
.gyul { position: absolute; right: 10px; top: 8px; width: 46px; height: 46px; object-fit: cover; object-position: center 20%; border-radius: 50%; border: 2px solid var(--line); background: #f3e2c6; opacity: .95; }
.prob-card { padding-right: 62px; }
.briefing-row { display: flex; gap: 10px; align-items: flex-start; }
.tok-face { width: 52px; height: 52px; object-fit: cover; object-position: center 25%; border-radius: 50%; border: 2px solid rgba(255,209,102,.6); background: #f3e2c6; flex: 0 0 auto; }
.ov-tok { position: absolute; top: -34px; right: 14px; width: 84px; height: 84px; object-fit: cover; object-position: center 22%; border-radius: 50%; border: 3px solid var(--gold); background: #f3e2c6; box-shadow: 0 0 18px rgba(255,209,102,.6); animation: pop .4s cubic-bezier(.2,1.4,.4,1); }
.sys-window { position: relative; }
.job-ladder { display: flex; gap: 6px; }
.jl { flex: 1; display: grid; place-items: center; gap: 4px; padding: 8px 2px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); font-size: 10px; text-align: center; color: var(--muted); }
.jl img { width: 100%; max-width: 64px; aspect-ratio: 1; object-fit: contain; filter: grayscale(1) brightness(.6); }
.jl.done img { filter: none; opacity: .8; } .jl.done { color: var(--text); }
.jl.cur { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 12px rgba(255,209,102,.35); } .jl.cur img { filter: none; }

/* 하단 시트 */
.sheet { position: fixed; inset: 0; background: rgba(3,6,14,.7); backdrop-filter: blur(3px); z-index: 55; display: grid; align-items: end; }
.sheet-card { position: relative; background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--accent); border-bottom: 0; border-radius: 18px 18px 0 0; padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); max-width: 640px; margin: 0 auto; width: 100%; box-shadow: 0 -10px 40px rgba(57,192,255,.2); animation: up .25s; max-height: 88vh; overflow: auto; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet-close { position: absolute; top: 10px; right: 10px; }
.mins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.mins .btn { padding: 14px 6px; font-size: 15px; }
.timer { text-align: center; padding: 18px 0; }
#timer-num { font-family: var(--pixel); font-size: 64px; color: var(--gold); text-shadow: 0 0 20px rgba(255,209,102,.5); }
.word { font-size: 34px; font-weight: 900; text-align: center; margin: 14px 0 6px; }
.sentence { font-size: 18px; line-height: 1.5; margin: 12px 0; }
.opts { display: grid; gap: 8px; margin-top: 12px; }
.opts .btn { text-align: left; padding: 12px; }
.opts .btn.ok { border-color: var(--good); color: var(--good); } .opts .btn.ng { border-color: var(--bad); color: var(--bad); }
.warn { background: rgba(255,209,102,.12); border: 1px solid rgba(255,209,102,.5); border-radius: 8px; padding: 8px 10px; font-size: 13px; margin: 8px 0; }

/* 막대 그래프 */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; padding-bottom: 18px; position: relative; }
.bar-col { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.bar-col i { display: block; width: 100%; background: linear-gradient(180deg, var(--accent), var(--accent-dim)); border-radius: 2px 2px 0 0; min-height: 1px; }
.bar-axis { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; }

/* 주도 모드 편집 */
.mq-edit { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 13px; }
.mq-edit summary { cursor: pointer; list-style: none; }
.mq-edit summary::-webkit-details-marker { display: none; }
.mq-edit .form { margin-top: 8px; }
.mq-edit .k, .mq .k { color: var(--muted); font-size: 11px; }
.mq-btn { display: inline-block; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; font-size: 12px; cursor: pointer; }
.ex { white-space: pre-wrap; }
