/* Geneva, Year One 3D — 원본(Geneva, Year One)의 색과 카드 모양을 그대로 쓰고, 3D 화면 위에 얹습니다 */
:root {
  --bg: #0F1B2D; --s1: #17263D; --s2: #1E3352; --line: #2A3E5C; --deep: #0C1626;
  --text: #F3EFE7; --muted: #A9B4C6; --dim: #8B97AB;
  --amber: #F2B84B; --teal: #4FC3B5; --coral: #F28B6B; --blue: #8FB2FF; --gold-bg: #2A2614;
  --glass: rgba(15, 27, 45, 0.82);
  --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px);
  --talkH: 60%;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.hidden { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b1524; color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { cursor: default; }
.grow { flex: 1; }
.ghost { background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; font-size: 14px; }

/* ---------- 공통 조각 (원본) ---------- */
.status { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.status:empty { display: none; }
.status.center { justify-content: center; margin: 10px 0 4px; }
.chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--s1); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.chip.demo { background: #3A2E14; color: var(--amber); font-weight: 600; }
.chip.warn { background: #3A1F24; color: var(--coral); font-weight: 600; }
.chip.ok { background: #143A33; color: var(--teal); font-weight: 600; }
.badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--coral); color: var(--bg); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
.pill { border: 0; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 5px 10px; min-height: 28px; }
.pill.lv { background: var(--teal); color: var(--bg); }
.place-chip { font-size: 12px; font-weight: 700; color: var(--bg); background: var(--amber); border-radius: 999px; padding: 5px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.glass { border: 1px solid #2E4A72; background: rgba(15, 27, 45, 0.8); color: var(--text); font-size: 12px; font-weight: 700; border-radius: 999px; height: 32px; padding: 0 11px; display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.glass svg { width: 14px; height: 14px; }
.seg { display: flex; background: var(--s1); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; height: 36px; border-radius: 9px; color: var(--muted); font-weight: 700; font-size: 13px; padding: 0 8px; }
.seg button[aria-pressed="true"] { background: var(--amber); color: var(--bg); }
.seg.small button { height: 30px; font-size: 12px; }
.btns { display: flex; gap: 10px; }
.btn { flex: 1; flex-shrink: 0; min-height: 48px; height: 48px; border-radius: 999px; border: 1px solid #2E4A72; background: var(--s1); font-weight: 600; font-size: 15px; padding: 0 16px; }
.btn.primary { background: var(--amber); color: var(--bg); border-color: var(--amber); font-weight: 700; }
.btn:disabled { opacity: 0.6; }
.btn.big { min-height: 52px; height: 52px; font-size: 16px; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.empty { font-size: 14px; color: var(--muted); text-align: center; padding: 16px; line-height: 1.6; }
.toast { position: fixed; left: 50%; top: calc(var(--st) + 70px); transform: translateX(-50%); background: var(--text); color: var(--bg); font-size: 14px; font-weight: 600; padding: 10px 16px; border-radius: 12px; max-width: 90%; z-index: 80; opacity: 0; transition: opacity 0.25s; pointer-events: none; text-align: center; line-height: 1.4; }
.toast.show { opacity: 1; }
#fade { position: fixed; inset: 0; background: #0b1524; opacity: 0; pointer-events: none; transition: opacity 0.35s; z-index: 60; }
#fade.on { opacity: 1; pointer-events: auto; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; }
#topLeft { position: absolute; left: 10px; top: calc(10px + var(--st)); pointer-events: auto; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; max-width: 46vw; }
#minimap { width: 176px; height: 109px; border-radius: 12px; background: rgba(10, 20, 35, 0.72); border: 1px solid var(--line); display: block; cursor: pointer; }
.hud-row { display: flex; gap: 6px; align-items: center; }
#roomName { font-size: 13px; font-weight: 700; text-shadow: 0 1px 3px #000; background: rgba(10, 20, 35, 0.66); display: inline-block; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
#roomName:empty { display: none; }
#topRight { position: absolute; right: 10px; top: calc(10px + var(--st)); display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.hbtns { display: flex; gap: 8px; pointer-events: auto; }
.hbtn { width: 46px; height: 46px; border-radius: 12px; background: rgba(10, 20, 35, 0.72); border: 1px solid var(--line); position: relative; display: flex; align-items: center; justify-content: center; color: var(--text); }
.hbtn svg { width: 22px; height: 22px; }
#btnBook { color: var(--amber); }
.next { background: rgba(23, 38, 61, 0.92); border: 1px solid #2E4A72; border-radius: 16px; padding: 8px 10px 8px 12px; display: flex; align-items: center; gap: 10px; pointer-events: auto; }
#nextPanel { width: min(320px, 56vw); }
.next-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.next-mid small { font-size: 11px; color: var(--amber); font-weight: 700; }
.next-mid b { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.next-mid span { font-size: 12px; color: var(--muted); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.go { height: 38px; padding: 0 14px; border-radius: 999px; background: var(--amber); color: var(--bg); font-weight: 700; font-size: 13px; flex-shrink: 0; }
#crosshair { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: rgba(255, 255, 255, 0.75); box-shadow: 0 0 3px #000; }
#prompt { position: absolute; left: 50%; bottom: calc(26px + var(--sb)); transform: translateX(-50%); pointer-events: auto;
  background: var(--amber); color: var(--bg); border-radius: 30px; padding: 14px 24px; font-size: 16px; font-weight: 800; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45); white-space: nowrap; }
#prompt small { font-weight: 600; opacity: 0.7; margin-left: 6px; }
#joy { position: absolute; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.07); }
#joyKnob { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px; border-radius: 50%; background: rgba(255, 255, 255, 0.45); }
#hint { position: absolute; left: 50%; bottom: calc(96px + var(--sb)); transform: translateX(-50%); font-size: 13px; color: #fff; background: rgba(10, 20, 35, 0.7); padding: 7px 12px; border-radius: 10px; max-width: min(90vw, 560px); text-align: center; line-height: 1.45; }
#hint:empty { display: none; }
@media (max-width: 430px) {
  #minimap { width: 148px; height: 92px; }
  #nextPanel { width: calc(100vw - 148px - 34px); }
  .next-mid b { font-size: 13px; }
  .go { padding: 0 11px; }
}

/* ---------- 대화 ---------- */
#talk { position: fixed; left: 0; right: 0; bottom: 0; height: var(--talkH); display: flex; flex-direction: column; z-index: 20;
  background: rgba(15, 27, 45, 0.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid #2E4A72; border-radius: 20px 20px 0 0; }
@media (min-width: 900px) and (min-aspect-ratio: 4/3) {
  #talk { left: auto; top: 0; width: 460px; height: 100%; border-radius: 0; border-top: 0; border-left: 1px solid #2E4A72; padding-top: var(--st); }
}
.t-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px 4px; }
.t-name { display: flex; flex-direction: column; gap: 1px; padding: 4px 14px 0; }
.t-name b { font-size: 16px; }
.t-name span { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
@media (max-width: 700px) { .t-name .en { display: none; } }
.goals-mini { display: flex; gap: 6px; padding: 8px 14px 0; }
.goals-mini i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.goals-mini i.on { background: var(--teal); }
.talk-status { padding: 6px 14px 0; }
.log { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 14px; -webkit-overflow-scrolling: touch; }
.row { display: flex; flex-direction: column; gap: 8px; }
.row.me { align-items: flex-end; }
.bubble { max-width: 90%; border-radius: 16px; padding: 11px 13px; font-size: 16px; line-height: 1.5; }
.bubble.npc { background: var(--text); color: #13213A; border-radius: 4px 16px 16px 16px; position: relative; padding-right: 48px; }
.bubble.npc .who { font-size: 12px; font-weight: 700; color: #2E8C80; margin-bottom: 2px; }
.bubble.npc p { margin: 0; }
.bubble.npc .ko { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #c9c2b4; font-size: 14px; color: #3c4a60; }
.bubble.npc .tools { display: flex; gap: 6px; margin-top: 8px; }
.bubble.npc .tools button { font-size: 12px; font-weight: 600; color: #3C5A8A; background: #e4ded2; border-radius: 999px; padding: 4px 10px; }
.replay { position: absolute; top: 6px; right: 4px; width: 40px; height: 40px; border-radius: 50%; color: #3C5A8A; display: flex; align-items: center; justify-content: center; }
.replay svg { width: 20px; height: 20px; }
.bubble.me { background: var(--s2); border: 1px solid #2E4A72; border-radius: 16px 4px 16px 16px; }
.bubble.me mark { background: rgba(242, 184, 75, 0.25); color: var(--text); border-radius: 3px; padding: 0 2px; }
.pending { display: inline-flex; gap: 5px; padding: 6px 2px; }
.bubble.pending { display: flex; padding: 16px; width: 76px; }
.pending span { width: 8px; height: 8px; border-radius: 50%; background: #3C5A8A; animation: dot 1s infinite; }
.pending span:nth-child(2) { animation-delay: 0.15s; } .pending span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
.fixes { display: flex; flex-direction: column; gap: 8px; width: 94%; align-self: stretch; margin-left: auto; }
.fix { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.fix.loot { background: var(--gold-bg); border: 1.5px solid var(--amber); border-radius: 16px; padding: 12px 14px; animation: pop 0.45s ease-out; }
@keyframes pop { 0% { transform: scale(0.94); opacity: 0; } 60% { transform: scale(1.02); opacity: 1; } 100% { transform: scale(1); } }
.loot.again { border-color: #6B5A2E; }
.fix-top { display: flex; align-items: center; gap: 8px; }
.loot-title { flex: 1; font-size: 13px; font-weight: 700; color: var(--amber); }
.plus { font-size: 13px; font-weight: 700; color: var(--amber); }
.tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--bg); }
.t-grammar { color: var(--coral); } .t-literal { color: var(--teal); } .t-register { color: var(--blue); } .t-term { color: var(--amber); }
.fix-line { font-size: 15px; line-height: 1.5; }
.fix-line s { color: #A99C7A; }
.fix-line b { color: var(--text); font-weight: 700; font-size: 16px; }
.why { font-size: 13px; color: #E6D3A3; line-height: 1.5; }
.src { font-size: 12px; color: #A99C7A; line-height: 1.45; }
.loot-foot { display: flex; align-items: center; gap: 6px; border-top: 1px solid #4A4128; padding-top: 8px; font-size: 12px; color: #E6D3A3; }
.loot-foot span { flex: 1; }
.loot-foot svg.b { width: 16px; height: 16px; flex-shrink: 0; }
.hear { background: var(--bg); color: var(--teal); font-size: 12px; font-weight: 600; border-radius: 999px; padding: 0 12px; height: 32px; display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.hear svg { width: 14px; height: 14px; }
.okline { font-size: 12px; color: var(--teal); }
.okline.muted { color: var(--dim); }
.debug { font-size: 11px; color: var(--dim); max-width: 92%; text-align: right; line-height: 1.5; }
.errbox { background: #3A1F24; border: 1px solid var(--coral); border-radius: 14px; padding: 12px; font-size: 13px; color: #FFD9CF; display: flex; flex-direction: column; gap: 8px; max-width: 90%; }
.errbox button { align-self: flex-start; background: var(--coral); color: var(--bg); font-weight: 700; border-radius: 999px; height: 36px; padding: 0 14px; }
.coach { background: rgba(143, 178, 255, 0.12); border: 1px solid rgba(143, 178, 255, 0.45); border-radius: 14px; padding: 10px 12px; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.coach .q { color: var(--muted); font-size: 12.5px; }
.coach .opt { display: block; width: 100%; text-align: left; background: rgba(255, 255, 255, 0.08); border-radius: 10px; padding: 9px 11px; font-weight: 600; line-height: 1.45; }
.coach .note { color: var(--muted); font-size: 12.5px; }

.dock { border-top: 1px solid #1E3352; padding: 8px 18px calc(var(--sb) + 10px); background: var(--deep); }
.dock [data-show] { display: none; }
.dock[data-mode="idle"] [data-show~="idle"],
.dock[data-mode="listening"] [data-show~="listening"],
.dock[data-mode="transcribing"] [data-show~="transcribing"],
.dock[data-mode="confirm"] [data-show~="confirm"],
.dock[data-mode="thinking"] [data-show~="thinking"] { display: flex; }
.tchips { gap: 6px; padding-bottom: 8px; overflow-x: auto; }
.tchips button { flex: none; background: var(--s1); border: 1px solid #2E4A72; border-radius: 999px; padding: 5px 11px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tchips button.on { background: rgba(143, 178, 255, 0.22); border-color: var(--blue); color: var(--text); }
.controls { align-items: center; justify-content: space-between; gap: 12px; }
.mic { width: 72px; height: 72px; border-radius: 50%; background: var(--amber); color: var(--bg); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 6px rgba(242, 184, 75, 0.18); }
.mic svg { width: 30px; height: 30px; }
.mic.rec { background: var(--coral); box-shadow: 0 0 0 8px rgba(242, 139, 107, 0.22); animation: pulse 1.2s ease-in-out infinite; }
.mic.ko { background: var(--blue); box-shadow: 0 0 0 6px rgba(143, 178, 255, 0.2); }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.round { width: 52px; height: 52px; border-radius: 50%; border: 1px solid #2E4A72; background: var(--s1); color: var(--muted); display: flex; align-items: center; justify-content: center; position: relative; flex-shrink: 0; }
.round svg { width: 22px; height: 22px; }
.round.gold { color: var(--amber); }
.round .badge { top: -4px; right: -4px; }
.mic-col { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.live { flex-direction: column; align-items: center; gap: 10px; }
.live p { margin: 0; font-size: 16px; line-height: 1.5; text-align: center; min-height: 44px; color: var(--text); }
.live small { font-size: 12px; color: var(--muted); }
.confirm { flex-direction: column; gap: 8px; }
.confirm label { font-size: 12px; color: var(--muted); }
textarea { width: 100%; min-height: 70px; max-height: 150px; resize: none; border-radius: 14px; border: 1px solid #2E4A72; background: var(--s1); color: var(--text); font: inherit; font-size: 16px; line-height: 1.5; padding: 11px 12px; }
.thinking { justify-content: center; align-items: center; gap: 10px; height: 72px; color: var(--muted); font-size: 14px; }

/* ---------- 겹쳐 뜨는 창 ---------- */
.overlay { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; background: rgba(5, 12, 22, 0.6); padding: 14px; padding-top: calc(14px + var(--st)); padding-bottom: calc(14px + var(--sb)); }
.card { background: var(--s1); border: 1px solid #2E4A72; border-radius: 20px; padding: 20px; max-width: 640px; width: 100%; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); }
#start { background: linear-gradient(180deg, rgba(5, 12, 22, 0.35), rgba(5, 12, 22, 0.75)); overflow-y: auto; align-items: flex-start; }
.startcard { text-align: center; margin: auto; background: rgba(23, 38, 61, 0.94); }
.eyebrow { font-size: 12px; letter-spacing: 0.12em; color: var(--amber); font-weight: 700; }
h1 { margin: 6px 0 10px; font-size: 30px; letter-spacing: -0.01em; }
h1 span { font-size: 15px; vertical-align: middle; background: var(--amber); color: var(--bg); padding: 2px 8px; border-radius: 7px; margin-left: 4px; }
.lead { color: #d5dfeb; line-height: 1.6; font-size: 15px; margin: 0 0 12px; }
.progress-line { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 0 0 12px; }
.progress-line span { font-size: 12.5px; background: var(--bg); border-radius: 999px; padding: 4px 10px; color: var(--muted); }
.progress-line b { color: var(--text); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; font-size: 13px; color: #d5dfeb; line-height: 1.55; margin-top: 12px; }
.grid2 > div { background: rgba(255, 255, 255, 0.05); border-radius: 12px; padding: 10px 12px; }
.mk { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; background: var(--amber); color: var(--bg); align-items: center; justify-content: center; font-size: 12px; }
.mk.teal { background: var(--teal); }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } h1 { font-size: 25px; } }
.start-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.fine { font-size: 11.5px; color: #7f8fa6; margin-top: 12px; line-height: 1.5; }
.touch .desk-only, .desk .touch-only { display: none; }
#loadwrap { margin: 12px auto 0; max-width: 360px; }
#loadwrap .bar { height: 6px; background: rgba(255, 255, 255, 0.1); border-radius: 3px; overflow: hidden; }
#loadbar { display: block; height: 100%; width: 0; background: var(--amber); transition: width 0.3s; }
#loadtxt { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.panel { max-width: 720px; height: min(88vh, 780px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.phead { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.phead b { font-size: 17px; }
.phead .close { margin-left: auto; }
.pbody { flex: 1; overflow-y: auto; padding: 12px 14px 18px; -webkit-overflow-scrolling: touch; }

/* 도서관 */
.lib-body { display: flex; flex-direction: column; gap: 12px; }
.hero { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border-radius: 16px; background: var(--amber); color: var(--bg); padding: 12px 14px; min-height: 78px; flex-shrink: 0; }
.hero:disabled { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.hero-n { width: 52px; height: 52px; flex-shrink: 0; border-radius: 14px; background: var(--bg); color: var(--amber); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; }
.hero-mid { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.hero-mid b { font-size: 16px; }
.hero-mid small { font-size: 12px; line-height: 1.4; }
.hero svg { width: 22px; height: 22px; flex-shrink: 0; }
.lib-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; flex-shrink: 0; }
.lib-stats div { background: var(--bg); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.lib-stats span { font-size: 11px; color: var(--muted); }
.lib-stats b { font-size: 18px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }
.filters button { border: 1px solid #2E4A72; border-radius: 999px; color: var(--muted); padding: 6px 11px; font-size: 12px; font-weight: 700; min-height: 32px; }
.filters button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.cards { display: flex; flex-direction: column; gap: 10px; }
.bcard { background: var(--bg); border: 1px solid #2E4A72; border-left: 4px solid var(--teal); border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; gap: 5px; }
.bcard.k-term { border-left-color: var(--amber); } .bcard.k-grammar { border-left-color: var(--coral); } .bcard.k-register { border-left-color: var(--blue); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.due { font-size: 11px; font-weight: 700; color: var(--muted); }
.due.now { color: var(--coral); }
.bcard s { font-size: 13px; color: var(--dim); }
.bcard > b { font-size: 15px; line-height: 1.4; }
.bcard .why { color: #C9D2DF; }
.bcard .src { color: var(--muted); }
.card-btns { display: flex; justify-content: flex-end; gap: 4px; }
.card-btns .del { color: var(--dim); height: 32px; padding: 0 8px; font-size: 12px; }

/* 지도 */
.mappanel { max-width: 1000px; }
.map-body { display: flex; flex-direction: column; gap: 10px; }
.map-title { display: flex; flex-direction: column; gap: 2px; }
.map-title small { font-size: 12px; letter-spacing: 0.14em; color: var(--amber); font-weight: 700; }
.map-title b { font-size: 17px; }
#bigmap { width: 100%; max-width: calc(44vh * 1100 / 640); height: auto; aspect-ratio: 1100 / 640; align-self: center; background: var(--bg); border-radius: 14px; border: 1px solid var(--line); flex-shrink: 0; }
.phead .seg { flex: 1; min-width: 0; }
.phead .seg button { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-list { display: flex; flex-direction: column; gap: 8px; }
.mrow { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid #2E4A72; border-radius: 14px; padding: 9px 10px 9px 12px; }
.mrow .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mrow .mid b { font-size: 14px; }
.mrow .mid span { font-size: 12px; color: var(--muted); line-height: 1.4; }
.mrow .eps { font-size: 12px; color: var(--amber); }
.mrow .eps i { font-style: normal; opacity: 0.35; }
.face { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: var(--bg); flex-shrink: 0; }

/* 설정 */
.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; color: var(--muted); font-weight: 600; }
select, input[type=password], input[type=text] { height: 46px; border-radius: 12px; border: 1px solid #2E4A72; background: var(--bg); color: var(--text); font: inherit; font-size: 16px; padding: 0 12px; width: 100%; }
select option { color: #000; }
input[type=range] { width: 100%; }
.radio { display: flex; gap: 8px; flex-wrap: wrap; }
.radio label { flex: 1; min-width: 90px; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border-radius: 12px; border: 1px solid #2E4A72; font-size: 14px; cursor: pointer; padding: 4px 8px; position: relative; }
.radio input { position: absolute; opacity: 0; pointer-events: none; }
.radio label:has(input:checked) { background: var(--amber); border-color: var(--amber); color: var(--bg); font-weight: 700; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; min-height: 40px; line-height: 1.4; }
.check input { width: 22px; height: 22px; flex-shrink: 0; }
.note { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; }
.credits h4 { margin: 16px 0 6px; font-size: 14px; color: var(--amber); }
.credits p { margin: 0; font-size: 13.5px; line-height: 1.6; color: #d5dfeb; }

/* ---------- 대화상자 (원본) ---------- */
dialog { border: 0; padding: 0; background: transparent; color: var(--text); max-width: 560px; width: 100%; margin: auto auto 0; max-height: 90dvh; }
dialog::backdrop { background: rgba(5, 10, 20, 0.55); }
.sheet { background: var(--s1); border-radius: 20px 20px 0 0; padding: 18px 18px calc(var(--sb) + 18px); display: flex; flex-direction: column; gap: 12px; max-height: 90dvh; overflow-y: auto; border-top: 1px solid #2E4A72; }
.sheet h2 { margin: 0; font-size: 20px; }
.sheet p { margin: 0; font-size: 14px; line-height: 1.6; color: #C9D2DF; }
.sheet .close { align-self: stretch; flex: none; }
.person { display: flex; align-items: center; gap: 12px; }
.person > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.person b { font-size: 16px; }
.person span:not(.face) { font-size: 12px; color: var(--muted); line-height: 1.35; }
.person .face { width: 46px; height: 46px; font-size: 16px; }
.say { align-self: flex-start; max-width: 92%; background: var(--text); color: #13213A; border-radius: 4px 16px 16px 16px; padding: 10px 12px; font-size: 14.5px; line-height: 1.45; text-align: left; }
.actions { display: flex; flex-direction: column; gap: 10px; }
.act { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1px solid #2E4A72; border-radius: 14px; background: var(--bg); color: var(--text); padding: 11px 14px; min-height: 60px; }
.act.primary { background: var(--amber); color: var(--bg); border-color: var(--amber); }
.act.locked { border-style: dashed; background: #142135; color: var(--dim); }
.act svg.i { width: 22px; height: 22px; flex-shrink: 0; }
.act-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.act-mid b { font-size: 15px; line-height: 1.35; }
.act-mid span { font-size: 12px; line-height: 1.35; opacity: 0.85; }
.stars { font-size: 13px; letter-spacing: 1px; flex-shrink: 0; color: var(--amber); }
.act.primary .stars { color: var(--bg); }
.stars i { font-style: normal; opacity: 0.35; }
.goal-list { display: flex; flex-direction: column; gap: 10px; }
.goal { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.5; }
.goal svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 1px; }
.goal.on { color: var(--teal); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--bg); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 22px; }
.stat span { font-size: 12px; color: var(--muted); }
.end-list { display: flex; flex-direction: column; gap: 8px; }
.pane { display: flex; flex-direction: column; gap: 12px; }
.pr-head { display: flex; justify-content: space-between; align-items: center; }
.pr-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.pr-orig { font-size: 20px; line-height: 1.45; color: var(--coral); }
.pr-hint { align-self: flex-start; }
.pr-result { background: var(--bg); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.5; }
.pr-result b { font-size: 16px; }
.pr-result .ans { color: var(--teal); font-size: 18px; }
.pr-result .why { color: #C9D2DF; }
.pr-result .src { color: var(--muted); }
@media (min-width: 900px) { dialog { margin: auto; } .sheet { border-radius: 20px; } }
