/* ============================================================
   시크릿 미션 — 다크 네온 스타일
   ============================================================ */
:root {
  --bg: #07070f; --bg2: #0e0d1d;
  --glass: rgba(255, 255, 255, .055); --glass2: rgba(255, 255, 255, .09);
  --line: rgba(255, 255, 255, .1); --line2: rgba(255, 255, 255, .18);
  --ink: #f4f2ff; --muted: #9a96b8; --dim: #6c6890;
  --pink: #ff4fa3; --cyan: #29e0ff; --violet: #8a5cff; --gold: #ffd36b; --mint: #3ee08f; --red: #ff4d6d;
  --ok: #3ee08f; --no: #ff4d6d;
  --r: 20px;
  --kr: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --ui: "Space Grotesk", "Noto Sans KR", sans-serif;
  --en: "Lexend", "Space Grotesk", sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--kr); color: var(--ink); background: var(--bg);
  min-height: 100vh; min-height: 100dvh;
  -webkit-user-select: none; user-select: none; overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vw 50vh at 10% 0%, rgba(138, 92, 255, .22), transparent 70%),
    radial-gradient(60vw 50vh at 100% 30%, rgba(255, 79, 163, .14), transparent 70%),
    radial-gradient(70vw 50vh at 50% 110%, rgba(41, 224, 255, .12), transparent 70%),
    var(--bg);
}
button { font-family: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, select { font-family: inherit; }
.en { font-family: var(--en); font-weight: 600; letter-spacing: -.01em; }
.ic { display: block; flex: none; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 6px 0; }
.small { font-size: 12px; }
.cr { color: var(--cyan); }
#app { max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; padding-bottom: 96px; }
.tag {
  display: inline-block; font-family: var(--ui); font-weight: 700; font-size: 11px; letter-spacing: .18em;
  color: var(--cyan); border: 1px solid rgba(41, 224, 255, .35); background: rgba(41, 224, 255, .07);
  padding: 4px 9px; border-radius: 6px; text-transform: uppercase;
}

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--kr); font-weight: 700; font-size: 17px; letter-spacing: -.01em;
  padding: 15px 22px; border-radius: 16px; color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  box-shadow: 0 8px 24px rgba(255, 79, 163, .3), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .1s, filter .1s;
}
.btn:active { transform: scale(.97); filter: brightness(1.1); }
.btn:disabled { background: #2a2840; color: #6c6890; box-shadow: none; cursor: default; }
.btn.big { width: 100%; font-size: 18px; padding: 17px; }
.btn.soft { background: var(--glass2); border: 1px solid var(--line2); box-shadow: none; font-weight: 500; font-size: 15px; padding: 12px 16px; }
.btn.magic { background: linear-gradient(135deg, var(--cyan), var(--violet)); box-shadow: 0 8px 24px rgba(41, 224, 255, .25); }
.btn.danger { background: linear-gradient(135deg, #ff4d6d, #ff7a3d); box-shadow: 0 8px 24px rgba(255, 77, 109, .35); }
.btn.danger-soft { background: transparent; color: #ff7c93; border: 1px solid rgba(255, 77, 109, .35); box-shadow: none; font-size: 14px; width: 100%; margin-top: 18px; padding: 12px; font-weight: 500; }
.next { width: 100%; margin-top: 20px; }

/* ---------- 요원 아바타 ---------- */
.ava {
  width: var(--s); height: var(--s); flex: none; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: calc(var(--s) * .48); line-height: 1;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .45), transparent 45%), linear-gradient(135deg, var(--a), var(--b));
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .18), 0 0 calc(var(--s) * .35) color-mix(in srgb, var(--a) 55%, transparent);
}
.h-ava {
  width: var(--s); height: var(--s); flex: none; border-radius: 12px; display: inline-grid; place-items: center;
  font-family: var(--ui); font-weight: 700; font-size: calc(var(--s) * .46); color: #0b0a16;
  background: linear-gradient(135deg, var(--c), #fff 140%);
  box-shadow: 0 0 16px color-mix(in srgb, var(--c) 45%, transparent);
}

/* ---------- 상단 · 하단 ---------- */
.hd { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px; }
.hd-l { display: flex; align-items: center; gap: 10px; }
.hd-l b { display: block; font-size: 16px; }
.hd-l small { font-family: var(--ui); font-size: 11px; letter-spacing: .14em; color: var(--muted); }
.hd-stats { display: flex; gap: 6px; }
.chip { font-family: var(--ui); font-weight: 700; font-size: 14px; background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; }
.chip.fire { opacity: .45; filter: grayscale(1); }
.chip.fire.lit { opacity: 1; filter: none; border-color: rgba(255, 140, 60, .4); }
.main { padding: 4px 16px 16px; }
.nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 520px; z-index: 20;
  display: flex; padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(12, 11, 26, .82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}
.nav-b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; border-radius: 12px; color: var(--dim); }
.nav-b small { font-size: 11px; font-weight: 500; }
.nav-b.on { color: var(--ink); }
.nav-b.on .ic { color: var(--pink); filter: drop-shadow(0 0 6px rgba(255, 79, 163, .7)); }

.page-head { padding: 8px 2px 4px; }
.page-head h2 { font-size: 28px; font-weight: 900; margin: 8px 0 2px; letter-spacing: -.03em; }
.sec-title { font-family: var(--ui); font-weight: 700; font-size: 13px; letter-spacing: .16em; color: var(--muted); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.panel { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin: 14px 0; }
.sub-title { font-size: 15px; font-weight: 700; margin: 16px 0 8px; }

/* ---------- 요원 ID 카드 ---------- */
.card-zone { perspective: 900px; margin: 10px 0 16px; }
.idcard {
  --rx: 0deg; --ry: 0deg; --mx: 50%;
  position: relative; overflow: hidden; border-radius: 22px; padding: 18px 18px 14px; color: #fff;
  background: var(--bg); aspect-ratio: 1.58;
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .15s;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .22);
  display: flex; flex-direction: column;
}
.idcard::before { content: ""; position: absolute; inset: 0; background: var(--bg); z-index: 0; }
.idcard::after {
  content: ""; position: absolute; inset: 0; z-index: 0; opacity: .25;
  background-image: linear-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .12) 1px, transparent 1px);
  background-size: 22px 22px; mask-image: linear-gradient(120deg, transparent 30%, #000 100%); -webkit-mask-image: linear-gradient(120deg, transparent 30%, #000 100%);
}
.idcard > * { position: relative; z-index: 1; }
.idcard.light { color: #1a1530; }
.idcard.light .id-code, .idcard.light .id-top, .idcard.light .id-stats small { color: rgba(26, 21, 48, .65); }
.id-shine {
  position: absolute !important; inset: 0; z-index: 2 !important; pointer-events: none; mix-blend-mode: overlay;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, .55) calc(var(--mx) - 6%), transparent calc(var(--mx) + 14%));
}
.idcard.flash .id-shine { animation: shine .7s; }
@keyframes shine { from { background-position: -300px 0; } to { background-position: 300px 0; } }
.id-top { display: flex; justify-content: space-between; font-family: var(--ui); font-weight: 700; font-size: 11px; letter-spacing: .22em; color: rgba(255, 255, 255, .8); }
.id-body { display: flex; align-items: center; gap: 14px; margin-top: auto; margin-bottom: auto; }
.id-photo { position: relative; }
.id-gear { position: absolute; right: -10px; bottom: -6px; font-size: 26px; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .45)); }
.id-name { font-size: 26px; font-weight: 900; letter-spacing: -.03em; line-height: 1.1; }
.id-code { font-family: var(--ui); font-size: 12px; letter-spacing: .14em; color: rgba(255, 255, 255, .8); margin-top: 3px; }
.id-rank { margin-top: 6px; font-size: 12px; display: inline-flex; gap: 6px; align-items: center; background: rgba(0, 0, 0, .28); padding: 4px 10px; border-radius: 999px; }
.idcard.light .id-rank { background: rgba(255, 255, 255, .55); }
.id-rank b { font-family: var(--ui); letter-spacing: .12em; }
.id-stats { display: flex; gap: 6px; }
.id-stats div { flex: 1; background: rgba(0, 0, 0, .22); border-radius: 10px; padding: 6px 8px; }
.idcard.light .id-stats div { background: rgba(255, 255, 255, .45); }
.id-stats b { font-family: var(--ui); font-size: 18px; display: block; }
.id-stats small { font-family: var(--ui); font-size: 9px; letter-spacing: .14em; color: rgba(255, 255, 255, .7); }
.id-strip { position: absolute !important; right: 18px; top: 40px; width: 42px; height: 30px; border-radius: 6px; background: linear-gradient(135deg, #f7e2a1, #b88a2c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); opacity: .9; }
.idcard.small { aspect-ratio: 1.75; padding: 14px; }
.idcard.small .id-name { font-size: 22px; }
.idcard.small .id-strip { top: 34px; width: 34px; height: 24px; }

/* ---------- 본부 ---------- */
.hq-greet { font-size: 15px; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.mission {
  position: relative; overflow: hidden; border-radius: 24px; padding: 20px; margin: 14px 0;
  background: linear-gradient(160deg, color-mix(in srgb, var(--wc, var(--violet)) 22%, #11102a) 0%, #0d0c1e 70%);
  border: 1px solid color-mix(in srgb, var(--wc, var(--violet)) 45%, transparent);
  box-shadow: 0 0 40px color-mix(in srgb, var(--wc, var(--violet)) 18%, transparent);
}
.mission::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--wc, var(--violet)) 40%, transparent); box-shadow: 0 0 0 26px color-mix(in srgb, var(--wc, var(--violet)) 6%, transparent), 0 0 0 52px color-mix(in srgb, var(--wc, var(--violet)) 4%, transparent); pointer-events: none; }
.m-head { display: flex; justify-content: space-between; align-items: center; }
.m-code { font-family: var(--ui); font-weight: 700; font-size: 26px; letter-spacing: .06em; color: var(--wc); text-shadow: 0 0 16px color-mix(in srgb, var(--wc) 60%, transparent); }
.m-no { font-family: var(--ui); font-size: 12px; letter-spacing: .14em; color: var(--muted); margin-top: 14px; }
.m-title { font-size: 28px; font-weight: 900; letter-spacing: -.03em; margin: 4px 0 8px; }
.m-brief { font-size: 14px; color: #c9c5e6; line-height: 1.6; margin: 0 0 14px; }
.m-brief b { color: var(--ink); background: rgba(255, 255, 255, .1); padding: 0 6px; border-radius: 6px; }
.m-steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 16px; }
.ms { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 2px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--dim); }
.ms small { font-size: 9.5px; white-space: nowrap; }
.ms.done { color: var(--ok); border-color: rgba(62, 224, 143, .4); background: rgba(62, 224, 143, .08); }
.m-locked { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 14px; border-radius: 14px; background: rgba(62, 224, 143, .08); color: var(--ok); border: 1px solid rgba(62, 224, 143, .3); font-size: 15px; }
.m-boss { display: flex; align-items: center; gap: 14px; margin: 6px 0 16px; }
.m-boss .villain { width: 76px; height: 76px; flex: none; }
.m-boss b { font-family: var(--ui); letter-spacing: .1em; font-size: 18px; color: var(--wc); display: block; }
.m-boss small { color: var(--muted); font-size: 13px; }
.mission.legend { --wc: var(--gold); }
.side-ops { margin-top: 18px; }
.op { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 15px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); margin-bottom: 10px; color: var(--cyan); }
.op:disabled { opacity: .45; }
.op b { display: block; font-size: 16px; color: var(--ink); }
.op small { font-size: 13px; color: var(--muted); }

/* ---------- 작전 지도 ---------- */
.city { border-radius: 22px; margin: 16px 0; padding: 16px; background: linear-gradient(180deg, var(--ws), rgba(255, 255, 255, .02)); border: 1px solid color-mix(in srgb, var(--wc) 35%, transparent); }
.city.sealed { filter: saturate(.3); opacity: .7; }
.city-head { display: flex; align-items: center; gap: 12px; }
.city-head b { display: block; font-size: 18px; font-weight: 800; }
.city-head small { font-size: 12px; color: var(--muted); }
.city-code { font-family: var(--ui); font-weight: 700; font-size: 22px; color: var(--wc); letter-spacing: .04em; min-width: 56px; text-shadow: 0 0 14px color-mix(in srgb, var(--wc) 50%, transparent); }
.city-code.sm { font-size: 14px; min-width: 0; }
.city-count { margin-left: auto; font-family: var(--ui); font-size: 13px; color: var(--muted); }
.city-bar { height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .08); margin: 12px 0 6px; overflow: hidden; }
.city-bar.big { height: 6px; }
.city-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--cyan)); border-radius: 99px; }
.city .city-bar i { background: var(--wc); box-shadow: 0 0 10px var(--wc); }
.ops { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 14px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.row-no { font-family: var(--ui); font-weight: 700; font-size: 15px; color: var(--muted); width: 24px; }
.row-t { flex: 1; font-size: 15px; font-weight: 500; }
.row-t small { display: block; font-size: 11px; color: var(--dim); font-weight: 400; }
.row-r { display: flex; align-items: center; color: var(--dim); }
.row.done .row-no { color: var(--ok); }
.row.cur { border-color: var(--wc); box-shadow: 0 0 0 1px var(--wc), 0 0 22px color-mix(in srgb, var(--wc) 30%, transparent); background: color-mix(in srgb, var(--wc) 10%, rgba(0, 0, 0, .3)); }
.row.lock .row-t { color: var(--dim); letter-spacing: .14em; font-family: var(--ui); font-size: 13px; filter: blur(.3px); }
.row.boss { background: linear-gradient(90deg, rgba(255, 77, 109, .14), rgba(0, 0, 0, .25)); border-color: rgba(255, 77, 109, .3); }
.row.boss .row-t { color: #ff9fb1; font-weight: 700; }
.now { font-family: var(--ui); font-weight: 700; font-size: 11px; letter-spacing: .14em; color: #0b0a16; background: var(--wc); padding: 3px 8px; border-radius: 6px; animation: blink 1.4s infinite; }
.gbadge { font-family: var(--ui); font-weight: 700; font-size: 13px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; }
.gS { color: #0b0a16; background: linear-gradient(135deg, var(--gold), #fff3c4); box-shadow: 0 0 12px rgba(255, 211, 107, .5); }
.gA { color: #0b0a16; background: linear-gradient(135deg, var(--cyan), #c9f6ff); }
.gB { color: #fff; background: rgba(255, 255, 255, .15); }

/* ---------- 포토카드 ---------- */
.dex-stat { display: flex; gap: 22px; margin: 6px 0 2px; }
.dex-stat b { font-family: var(--ui); font-size: 34px; }
.dex-stat small { color: var(--muted); font-size: 13px; margin-left: 4px; }
.holo-t { background: linear-gradient(90deg, #ff9ad5, #9ee8ff, #d3a4ff, #fff1a8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dex-city { margin: 22px 0; }
.pc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pc {
  position: relative; overflow: hidden; aspect-ratio: .72; border-radius: 14px; padding: 10px 6px 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  background: linear-gradient(170deg, color-mix(in srgb, var(--wc, var(--violet)) 30%, #1a1838) 0%, #121126 75%);
  border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 8px 18px rgba(0, 0, 0, .35);
}
.pc-emo { font-size: 44px; line-height: 1; margin-bottom: auto; margin-top: 14%; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .4)); }
.pc-en { font-size: 14px; line-height: 1.2; text-align: center; }
.pc-ko { font-size: 11px; color: var(--muted); }
.pc.holo { border-color: rgba(255, 255, 255, .5); }
.pc.holo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: .55;
  background: linear-gradient(115deg, transparent 20%, #ff9ad5 35%, #9ee8ff 45%, #d3a4ff 55%, #fff1a8 65%, transparent 80%);
  background-size: 250% 250%; animation: holo 4s linear infinite;
}
.pc.holo::before { content: "HOLO"; position: absolute; top: 7px; left: 8px; font-family: var(--ui); font-weight: 700; font-size: 9px; letter-spacing: .16em; color: #fff; }
@keyframes holo { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.pc.locked { background: repeating-linear-gradient(135deg, #12111f 0 8px, #16152a 8px 16px); justify-content: center; gap: 8px; color: var(--dim); box-shadow: none; }
.pc-cls { font-family: var(--ui); font-size: 9px; letter-spacing: .16em; }
.pc.mini { aspect-ratio: auto; width: 78px; height: 104px; opacity: 0; animation: cardIn .5s forwards; }
.pc.mini .pc-emo { font-size: 36px; }
@keyframes cardIn { from { opacity: 0; transform: translateY(20px) rotate(-8deg) scale(.8); } to { opacity: 1; transform: none; } }

/* ---------- 장비실 ---------- */
.coin-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin: 0 2px 6px; }
.coin-line b { font-family: var(--ui); font-size: 16px; color: var(--ink); }
.shop-sec { margin: 18px 0; }
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.item { background: var(--glass); border: 1px solid var(--line); border-radius: 16px; padding: 12px 6px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.item-emo { font-size: 32px; height: 44px; display: grid; place-items: center; }
.swatch { width: 54px; height: 36px; border-radius: 8px; margin: 4px 0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.item b { font-size: 12.5px; font-weight: 500; text-align: center; }
.item small { font-family: var(--ui); font-size: 12px; color: var(--muted); }
.item.own small { color: var(--ok); }
.item.on { border-color: var(--pink); box-shadow: 0 0 0 1px var(--pink), 0 0 18px rgba(255, 79, 163, .3); }

/* ---------- 요원 등록 ---------- */
.ob { padding: 40px 22px 30px; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.splash { position: relative; }
.stamp { position: absolute; top: 34px; right: 18px; transform: rotate(10deg); font-family: var(--ui); font-weight: 700; letter-spacing: .2em; font-size: 13px; color: var(--red); border: 2px solid var(--red); padding: 5px 10px; border-radius: 6px; opacity: .85; }
.ob-kicker { font-family: var(--ui); font-size: 12px; letter-spacing: .24em; color: var(--cyan); }
.ob-title {
  font-family: var(--ui); font-weight: 700; font-size: 64px; line-height: .92; letter-spacing: -.03em; margin: 4px 0 6px;
  background: linear-gradient(120deg, #fff 20%, var(--pink) 55%, var(--violet) 80%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ob-sub { font-size: 17px; line-height: 1.6; color: #c9c5e6; margin: 0; }
.ob-sub b { color: #fff; }
.ob-list { list-style: none; padding: 0; margin: 10px 0 18px; display: flex; flex-direction: column; gap: 8px; }
.ob-list li { font-size: 14px; color: var(--muted); padding-left: 18px; position: relative; }
.ob-list li::before { content: ""; position: absolute; left: 0; top: 8px; width: 8px; height: 2px; background: var(--pink); }
.ob-q { font-size: 26px; font-weight: 900; letter-spacing: -.03em; line-height: 1.3; margin: 2px 0; }
.field { display: block; }
.field span { display: block; font-size: 13px; margin: 0 0 6px 2px; color: var(--muted); }
.field input { width: 100%; font-size: 18px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line2); outline: none; background: rgba(255, 255, 255, .05); color: var(--ink); }
.field input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 79, 163, .2); }
.field.big input { font-size: 28px; font-weight: 700; padding: 16px; }
.call-preview { min-height: 22px; font-size: 14px; color: var(--muted); }
.call-preview b { color: var(--pink); }
.pick-title { font-size: 13px; color: var(--muted); margin-top: 4px; }
.sigs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sig-b { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); }
.sig-b i { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: 0 0 14px color-mix(in srgb, var(--a) 50%, transparent); }
.sig-b small { font-size: 11px; color: var(--muted); }
.sig-b.on { border-color: #fff; background: var(--glass2); }
.embs { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.emb-b { aspect-ratio: 1; font-size: 22px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); }
.emb-b.on { border-color: #fff; background: var(--glass2); transform: scale(1.06); }
.issued { text-align: center; }
.issue-card { perspective: 900px; animation: issue 1s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes issue { from { transform: translateY(60px) rotateX(50deg) scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- 보호자 ---------- */
.gate { text-align: center; }
.gate-q { font-family: var(--ui); font-weight: 700; font-size: 38px; margin: 12px 0; }
.gate-in { width: 60%; font-size: 24px; text-align: center; padding: 12px; border-radius: 14px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .05); color: var(--ink); margin-bottom: 14px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; text-align: center; }
.stat small { display: block; font-size: 11px; color: var(--muted); }
.stat b { font-size: 15px; }
.weak { display: flex; flex-wrap: wrap; gap: 6px; }
.wk { background: rgba(255, 77, 109, .1); border: 1px solid rgba(255, 77, 109, .25); border-radius: 10px; padding: 5px 10px; font-size: 13px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.set-row.col { flex-direction: column; align-items: stretch; gap: 8px; }
.set-row b { font-size: 15px; font-weight: 500; }
.set-row p { margin: 3px 0 0; }
.set-row select { font-size: 14px; padding: 10px; border-radius: 10px; border: 1px solid var(--line2); background: #15142a; color: var(--ink); }
.tg { flex: none; width: 50px; height: 30px; border-radius: 99px; background: #2a2840; position: relative; transition: background .2s; }
.tg i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .2s; }
.tg.on { background: var(--pink); }
.tg.on i { left: 23px; }
.seg { display: flex; background: rgba(255, 255, 255, .06); border-radius: 10px; padding: 3px; }
.seg-b { padding: 7px 10px; border-radius: 8px; font-size: 13px; color: var(--muted); }
.seg-b.on { background: var(--glass2); color: var(--ink); }
.name-edit { display: flex; gap: 6px; }
.name-edit input { flex: 1; min-width: 0; font-size: 15px; padding: 10px; border-radius: 10px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .05); color: var(--ink); }
.panel > .btn.soft { width: 100%; margin-top: 12px; }
.method details { border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); margin: 8px 0; padding: 0 14px; }
.method summary { font-size: 15px; font-weight: 500; padding: 13px 0; cursor: pointer; list-style: none; }
.method summary::-webkit-details-marker { display: none; }
.method summary::after { content: "+"; float: right; color: var(--muted); font-family: var(--ui); }
.method details[open] summary::after { content: "–"; }
.method details p { margin: 0 0 14px; font-size: 14px; line-height: 1.75; color: #c9c5e6; }
.method b { color: #fff; }
.foot-note { text-align: center; color: var(--dim); font-size: 12px; }

/* ============================================================
   작전 화면
   ============================================================ */
.lesson { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: var(--bg); }
.lesson::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(80vw 40vh at 50% 0%, rgba(138, 92, 255, .2), transparent 70%), radial-gradient(70vw 40vh at 50% 100%, rgba(41, 224, 255, .1), transparent 70%);
}
.lesson > * { position: relative; }
.l-top { display: flex; align-items: center; gap: 12px; padding: calc(12px + env(safe-area-inset-top)) 16px 4px; max-width: 560px; width: 100%; margin: 0 auto; }
.l-x { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); background: var(--glass); border: 1px solid var(--line); }
.l-bar { flex: 1; height: 6px; background: rgba(255, 255, 255, .08); border-radius: 99px; overflow: hidden; }
.l-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--pink), var(--cyan)); border-radius: 99px; transition: width .5s; box-shadow: 0 0 12px rgba(41, 224, 255, .6); }
.l-coin { font-family: var(--ui); font-weight: 700; font-size: 15px; padding: 6px 10px; border-radius: 10px; background: var(--glass); border: 1px solid var(--line); }
.l-coin.bump b { display: inline-block; animation: pop .4s; color: var(--cyan); }
.l-title { text-align: center; color: var(--dim); font-family: var(--ui); font-size: 11px; letter-spacing: .14em; padding: 4px 16px 0; }
.l-stage { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.pane { max-width: 520px; margin: 0 auto; padding: 16px 16px calc(28px + env(safe-area-inset-bottom)); animation: paneIn .35s ease; text-align: center; }
@keyframes paneIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.prompt { font-size: 19px; font-weight: 700; text-align: center; margin: 12px 0; line-height: 1.45; letter-spacing: -.02em; }
.prompt.small { font-size: 14px; font-weight: 500; color: var(--muted); margin: 6px 0 10px; }
.prompt b.en { color: var(--cyan); }
.hint { text-align: center; color: var(--dim); font-size: 13px; margin-top: 12px; }
.q-head { text-align: center; margin-bottom: 16px; }
.say-big {
  width: 76px; height: 76px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .35), transparent 50%), linear-gradient(135deg, var(--cyan), var(--violet));
  box-shadow: 0 0 0 6px rgba(41, 224, 255, .1), 0 0 30px rgba(41, 224, 255, .35);
}
.say-big.sm { width: 56px; height: 56px; }
.say-big:active { transform: scale(.94); }
.say-mini { display: inline-flex; align-items: center; gap: 6px; color: var(--cyan); background: rgba(41, 224, 255, .08); border: 1px solid rgba(41, 224, 255, .3); border-radius: 99px; padding: 7px 13px; font-size: 13px; }
.q-letter { font-family: var(--en); font-weight: 700; font-size: 84px; line-height: 1; margin: 6px 0; color: #fff; text-shadow: 0 0 24px rgba(255, 79, 163, .7); }
.q-letter.sm { font-size: 52px; }
.big-emo { font-size: 92px; line-height: 1.1; margin: 4px 0; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .5)); }
.big-emo.small { font-size: 56px; }

.opts { display: grid; gap: 10px; }
.opts.g2 { grid-template-columns: 1fr 1fr; }
.opts.g3 { grid-template-columns: repeat(3, 1fr); }
.opts.list { grid-template-columns: 1fr; }
.opt {
  position: relative; min-height: 64px; padding: 12px; border-radius: 18px; display: grid; place-items: center;
  background: var(--glass); border: 1px solid var(--line2); transition: transform .1s, border-color .2s, background .2s;
}
.opt:active { transform: scale(.97); }
.pics .opt { aspect-ratio: 1.05; }
.opt .emo { font-size: 58px; line-height: 1; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .4)); }
.g3 .opt .emo { font-size: 46px; }
.opt .word { font-size: 28px; }
.opt > .en:not(.word) { font-size: 19px; line-height: 1.35; }
.opt.ok { border-color: var(--ok); background: rgba(62, 224, 143, .12); box-shadow: 0 0 0 1px var(--ok), 0 0 26px rgba(62, 224, 143, .35); animation: pop .4s; }
.opt.no { border-color: rgba(255, 77, 109, .5); background: rgba(255, 77, 109, .08); opacity: .5; animation: shake .4s; }
.opt.fade { opacity: .25; }
.bump { animation: pop .35s; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes blink { 50% { opacity: .4; } }
.shake { animation: shake .4s; }

/* 단계 소개 · 클리어 */
.brief, .clear { padding: 26px 0 4px; }
.brief-icon { width: 108px; height: 108px; margin: 22px auto 14px; border-radius: 30px; display: grid; place-items: center; color: var(--cyan); background: rgba(41, 224, 255, .07); border: 1px solid rgba(41, 224, 255, .3); box-shadow: 0 0 40px rgba(41, 224, 255, .2), inset 0 0 30px rgba(41, 224, 255, .08); }
.brief-icon .ic { filter: drop-shadow(0 0 8px rgba(41, 224, 255, .8)); }
.brief-code { font-family: var(--ui); font-weight: 700; font-size: 13px; letter-spacing: .3em; color: var(--pink); }
.brief-name { font-size: 32px; font-weight: 900; letter-spacing: -.03em; margin: 4px 0 8px; }
.brief-desc { font-size: 15px; color: var(--muted); line-height: 1.6; }
.brief-desc b { color: #fff; font-size: 20px; }
.clear-word { font-family: var(--ui); font-weight: 700; font-size: 24px; letter-spacing: .1em; margin-top: 18px; }
.grade { font-family: var(--ui); font-weight: 700; font-size: 120px; line-height: 1; margin: 10px auto; width: 160px; height: 160px; display: grid; place-items: center; border-radius: 36px; animation: gradeIn .6s cubic-bezier(.2, 1.6, .4, 1); }
.grade.gS { color: #1a1206; box-shadow: 0 0 60px rgba(255, 211, 107, .55); }
.grade.gA { color: #04202a; box-shadow: 0 0 50px rgba(41, 224, 255, .45); }
.grade.gB { color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid var(--line2); }
@keyframes gradeIn { from { transform: scale(.2) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
.clear-sub { font-size: 15px; color: var(--muted); }

/* 시작 인사 */
.greet { padding-top: 30px; }
.greet-ava { margin: 26px 0 10px; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.greet-call { font-size: 56px; font-weight: 900; letter-spacing: -.04em; background: linear-gradient(120deg, #fff 30%, var(--wc, var(--pink))); -webkit-background-clip: text; background-clip: text; color: transparent; animation: pop .6s; }
.greet-sub { font-size: 17px; color: #c9c5e6; line-height: 1.6; margin-top: 4px; }
.greet-sub b { color: var(--wc, #fff); }
.greet-file { margin: 22px auto 0; text-align: left; padding: 14px 16px; border-radius: 16px; background: rgba(0, 0, 0, .3); border: 1px dashed color-mix(in srgb, var(--wc, var(--violet)) 50%, transparent); }
.greet-file .code { font-family: var(--ui); font-size: 11px; letter-spacing: .18em; color: var(--wc); display: block; }
.greet-file b { display: block; font-size: 20px; margin: 4px 0 2px; }
.greet-file small { font-size: 12px; color: var(--muted); }

/* 코드 해독 */
.cipher { padding: 22px 10px 16px; border-radius: 24px; background: linear-gradient(180deg, rgba(255, 79, 163, .1), rgba(138, 92, 255, .05)); border: 1px solid rgba(255, 79, 163, .3); }
.ci-big { font-size: 112px; line-height: 1; margin-top: 10px; color: #fff; text-shadow: 0 0 30px rgba(255, 79, 163, .8), 0 0 4px #fff; }
.ci-big small { font-size: 40px; color: var(--muted); text-shadow: none; }
.ci-upper { font-size: 26px; color: rgba(255, 255, 255, .45); }
.ci-sound { font-size: 15px; margin-top: 8px; color: var(--muted); }
.ci-sound b { color: #fff; background: rgba(255, 255, 255, .1); padding: 2px 10px; border-radius: 8px; margin-left: 4px; }
.tip { text-align: left; background: rgba(255, 211, 107, .07); border: 1px solid rgba(255, 211, 107, .25); border-radius: 14px; padding: 12px 14px; margin: 12px 0; font-size: 14px; line-height: 1.6; color: #efe6c8; }
.tip-k { display: inline-block; font-size: 11px; font-weight: 700; color: var(--gold); margin-right: 8px; letter-spacing: .04em; }
.keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 8px; }
.key { padding: 12px 4px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--glass); border: 1px solid var(--line); transition: transform .15s, border-color .2s; }
.key .emo { font-size: 40px; }
.key .en { font-size: 16px; }
.key mark { background: none; color: var(--pink); text-shadow: 0 0 10px rgba(255, 79, 163, .8); }
.key.lit { border-color: var(--cyan); transform: scale(1.06); box-shadow: 0 0 20px rgba(41, 224, 255, .35); }
.blend { display: flex; justify-content: center; gap: 12px; margin: 28px 0 12px; transition: gap .4s; }
.gtile { width: 78px; height: 92px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--glass); border: 1px solid var(--line2); }
.gtile .en { font-size: 44px; line-height: 1; }
.gtile small { font-size: 12px; color: var(--muted); margin-top: 4px; }
.gtile.seen { border-color: var(--cyan); box-shadow: 0 0 14px rgba(41, 224, 255, .3); }
.blend.merged { gap: 0; }
.blend.merged .gtile { border-radius: 0; border-color: var(--ok); background: rgba(62, 224, 143, .1); box-shadow: 0 0 18px rgba(62, 224, 143, .25); }
.blend.merged .gtile:first-child { border-radius: 16px 0 0 16px; }
.blend.merged .gtile:last-child { border-radius: 0 16px 16px 0; }
.blend.merged .gtile small { visibility: hidden; }
.blend-word { font-size: 46px; min-height: 64px; color: var(--ok); text-shadow: 0 0 20px rgba(62, 224, 143, .6); }
.merge { width: 100%; margin-top: 12px; }
.badge-warn { display: inline-block; background: rgba(255, 77, 109, .1); color: #ff9fb1; border: 1px solid rgba(255, 77, 109, .35); border-radius: 8px; padding: 7px 12px; font-size: 13px; font-weight: 700; margin: 14px 0 0; }
.pair-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 12px 0; font-family: var(--ui); font-size: 12px; color: var(--dim); }
.pchip { min-width: 120px; padding: 14px 10px; border-radius: 14px; font-size: 24px; background: rgba(41, 224, 255, .08); border: 1px solid rgba(41, 224, 255, .3); }
.pchip.alt { background: rgba(255, 79, 163, .08); border-color: rgba(255, 79, 163, .3); }

/* 인텔 카드 */
.intel {
  position: relative; width: 78%; margin: 18px auto 0; aspect-ratio: .74; border-radius: 22px; padding: 18px 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(165deg, #2a1f5c 0%, #15122e 60%); border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 24px 50px rgba(0, 0, 0, .55), 0 0 40px rgba(138, 92, 255, .25); animation: flipIn .5s;
}
.intel::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .12) 45%, transparent 60%); }
.intel-no { position: absolute; top: 14px; left: 16px; font-family: var(--ui); font-size: 11px; letter-spacing: .18em; color: var(--cyan); }
.intel-emo { font-size: 110px; line-height: 1.1; filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .5)); }
.intel-en { font-size: 40px; margin-top: 10px; }
.intel-ko { font-size: 16px; color: var(--muted); margin-top: 2px; }
@keyframes flipIn { from { transform: perspective(700px) rotateY(70deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* 음성 인증 */
.speak-card { position: relative; overflow: hidden; margin-top: 14px; padding: 22px 12px; border-radius: 22px; background: var(--glass); border: 1px solid var(--line2); }
.speak-card.scanning::after { content: ""; position: absolute; left: 0; right: 0; height: 40%; top: -40%; background: linear-gradient(180deg, transparent, rgba(41, 224, 255, .25), transparent); animation: scan 1.2s linear infinite; }
@keyframes scan { to { top: 100%; } }
.speak-card.matched { border-color: var(--ok); box-shadow: 0 0 30px rgba(62, 224, 143, .3); }
.sc-emo { font-size: 80px; line-height: 1.1; }
.sc-en { font-size: 34px; line-height: 1.25; }
.sc-ko { font-size: 15px; color: var(--muted); margin-top: 4px; }
.speak-ctrl { display: flex; justify-content: center; align-items: center; gap: 22px; margin: 22px 0 10px; }
.mic { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--pink), var(--violet)); box-shadow: 0 0 0 8px rgba(255, 79, 163, .12), 0 0 34px rgba(255, 79, 163, .45); }
.mic:disabled { opacity: .35; }
.mic.on { animation: micPulse 1s infinite; background: linear-gradient(135deg, #ff4d6d, var(--pink)); }
.mic.small { width: 54px; height: 54px; flex: none; box-shadow: 0 0 20px rgba(255, 79, 163, .4); }
@keyframes micPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 79, 163, .6); } 100% { box-shadow: 0 0 0 26px rgba(255, 79, 163, 0); } }
.speak-msg { font-size: 15px; min-height: 48px; line-height: 1.6; color: #c9c5e6; }
.speak-msg small { color: var(--muted); font-size: 13px; }
.listening { color: var(--cyan); animation: blink 1s infinite; }
.good { font-family: var(--ui); font-weight: 700; font-size: 22px; letter-spacing: .06em; color: var(--ok); text-shadow: 0 0 14px rgba(62, 224, 143, .6); }
.good.sm { font-family: var(--kr); font-size: 17px; letter-spacing: 0; }

/* 복호화 */
.pz-head { display: flex; align-items: center; gap: 14px; text-align: left; margin-top: 12px; padding: 14px 16px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); }
.pz-emo { font-size: 46px; }
.pz-ko { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.pz-line, .sp-line { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 8px; min-height: 76px; margin: 24px 0 18px; font-size: 26px; }
.slot { min-width: 52px; height: 52px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-bottom: 2px dashed rgba(255, 255, 255, .3); }
.slot.filled { border-bottom: 2px solid var(--cyan); color: #fff; animation: pop .3s; text-shadow: 0 0 10px rgba(41, 224, 255, .5); }
.pz-end { font-size: 30px; padding-bottom: 6px; color: var(--muted); }
.pz-line.done .slot, .sp-line.done .slot { border-color: var(--ok); color: var(--ok); text-shadow: 0 0 12px rgba(62, 224, 143, .6); }
.pz-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tile { font-size: 22px; padding: 12px 16px; min-width: 60px; border-radius: 12px; display: inline-flex; flex-direction: column; align-items: center; background: rgba(138, 92, 255, .12); border: 1px solid rgba(138, 92, 255, .45); box-shadow: 0 4px 0 rgba(138, 92, 255, .25); }
.tile small { font-family: var(--kr); font-size: 11px; color: var(--muted); font-weight: 400; }
.tile.used { visibility: hidden; }
.sp-line .slot { min-width: 60px; height: 60px; font-size: 36px; }
.pat-card { margin-top: 12px; padding: 22px 12px; border-radius: 22px; background: linear-gradient(170deg, rgba(41, 224, 255, .1), rgba(138, 92, 255, .06)); border: 1px solid rgba(41, 224, 255, .3); }
.pat-emo { font-size: 70px; }
.pat-en { font-size: 30px; line-height: 1.35; margin-top: 6px; }
.pw { display: inline-block; padding: 0 3px; border-radius: 8px; transition: all .15s; cursor: pointer; }
.pw.lit { color: var(--cyan); text-shadow: 0 0 14px rgba(41, 224, 255, .8); transform: translateY(-4px); }
.pat-ko { font-size: 15px; color: var(--muted); margin: 6px 0 4px; }
.pane > .say-mini { margin-top: 12px; }

/* 보안 서명 */
.trace-wrap { position: relative; width: 100%; max-width: 360px; margin: 6px auto 0; border-radius: 22px; overflow: hidden; background: #0c0b1c; border: 1px solid var(--line2); box-shadow: inset 0 0 40px rgba(138, 92, 255, .12); }
.trace-wrap canvas { position: absolute; inset: 0; }
.cv-u { touch-action: none; cursor: crosshair; }
.trace-ok { position: absolute; top: 10px; right: 12px; color: var(--ok); opacity: 0; transform: scale(.4); transition: all .3s; pointer-events: none; }
.trace-wrap.passed { border-color: var(--ok); box-shadow: 0 0 30px rgba(62, 224, 143, .3); }
.trace-wrap.passed .trace-ok { opacity: 1; transform: scale(1); }
.trace-ctl { display: flex; gap: 10px; margin-top: 16px; }
.trace-ctl .btn { flex: 1; }
.trace-msg { margin-top: 10px; min-height: 30px; }

/* 잠입 대화 */
.chat-top { display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); }
.chat-top b { display: block; font-size: 17px; letter-spacing: .06em; }
.chat-top small { font-size: 12px; color: var(--muted); }
.secure { margin-left: auto; font-family: var(--ui); font-size: 10px; letter-spacing: .16em; color: var(--ok); }
.chat-log { display: flex; flex-direction: column; gap: 10px; padding: 16px 0; text-align: left; }
.bub { display: flex; align-items: flex-end; gap: 8px; animation: paneIn .3s; }
.bub.right { justify-content: flex-end; }
.bub-body { max-width: 76%; padding: 11px 14px; border-radius: 18px 18px 18px 6px; background: #1b1934; border: 1px solid var(--line); }
.bub.right .bub-body { border-radius: 18px 18px 6px 18px; background: linear-gradient(135deg, rgba(255, 79, 163, .3), rgba(138, 92, 255, .3)); border-color: rgba(255, 79, 163, .4); }
.bub-prop { font-size: 40px; line-height: 1.15; }
.bub-en { font-size: 19px; line-height: 1.35; cursor: pointer; }
.bub-ko { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.typing .bub-body { display: flex; gap: 5px; padding: 15px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
.chat-foot { position: sticky; bottom: 0; padding-top: 14px; background: linear-gradient(180deg, transparent, var(--bg) 18%); }
.chat-opts { display: grid; gap: 8px; }
.copt { text-align: left; padding: 13px 15px; border-radius: 14px; display: flex; flex-direction: column; gap: 2px; background: var(--glass); border: 1px solid rgba(41, 224, 255, .35); }
.copt .en { font-size: 18px; }
.copt small { font-size: 12.5px; color: var(--muted); }
.copt.emo-only { align-items: center; }
.copt.emo-only .en { font-size: 42px; }
.copt.no { opacity: .4; border-color: rgba(255, 77, 109, .5); animation: shake .4s; }
.chat-mic { display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 12px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); }
.chat-mic div { flex: 1; }
.chat-mic b { display: block; font-size: 15px; }
.chat-mic small { color: var(--muted); font-size: 12px; }
.chat-mic .btn { font-size: 13px; padding: 9px 12px; }

/* 보스 */
.arena { position: relative; height: 210px; border-radius: 24px; overflow: hidden; margin-bottom: 16px; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--wc) 25%, #0b0a18), #05050c 70%); border: 1px solid color-mix(in srgb, var(--wc) 40%, transparent); }
.arena-grid { position: absolute; inset: 50% -20% -40%; background-image: linear-gradient(color-mix(in srgb, var(--wc) 35%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--wc) 35%, transparent) 1px, transparent 1px); background-size: 30px 30px; transform: perspective(300px) rotateX(60deg); opacity: .5; }
.boss-name { position: absolute; top: 14px; left: 0; right: 0; font-family: var(--ui); font-weight: 700; letter-spacing: .14em; font-size: 15px; color: var(--wc); }
.boss-name small { display: block; font-size: 9px; letter-spacing: .3em; color: var(--muted); }
.boss-hp { position: absolute; top: 56px; left: 24%; right: 24%; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.boss-hp i { display: block; height: 100%; background: linear-gradient(90deg, #ff4d6d, #ffb36b); transition: width .4s; box-shadow: 0 0 12px #ff4d6d; }
.boss-fig { position: absolute; left: 50%; top: 70px; width: 130px; height: 130px; transform: translateX(-50%); animation: bossFloat 2.4s ease-in-out infinite; }
.villain { width: 100%; height: 100%; display: block; }
.boss-me { position: absolute; left: 16px; bottom: 14px; }
.boss-fig.hit { animation: bossHit .45s; }
.boss-fig.laugh { animation: bossLaugh .6s; }
.boss-fig.down { animation: bossDown 1.2s forwards; }
@keyframes bossFloat { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-6px); } }
@keyframes bossHit { 0% { transform: translateX(-50%); filter: none; } 30% { transform: translateX(-40%) rotate(8deg); filter: brightness(2.5) drop-shadow(0 0 20px #fff); } 60% { transform: translateX(-58%) rotate(-6deg); } 100% { transform: translateX(-50%); } }
@keyframes bossLaugh { 0%, 100% { transform: translateX(-50%) scale(1); } 40% { transform: translateX(-50%) scale(1.12); } }
@keyframes bossDown { 0% { transform: translateX(-50%) scale(1); opacity: 1; filter: none; } 30% { filter: brightness(3); } 100% { transform: translateX(-50%) translateY(30px) scale(.3); opacity: 0; filter: blur(6px); } }
.shot { position: absolute; left: 50px; bottom: 34px; width: 60px; height: 4px; border-radius: 99px; background: linear-gradient(90deg, transparent, var(--cyan), #fff); box-shadow: 0 0 14px var(--cyan); animation: shot .38s ease-in forwards; transform-origin: left; }
@keyframes shot { from { transform: rotate(-28deg) translateX(0); } to { transform: rotate(-28deg) translateX(min(48vw, 230px)); opacity: .2; } }
.boss-line { display: inline-block; font-size: 20px; padding: 10px 14px; margin: 4px 0; border-radius: 14px; background: var(--glass); border: 1px solid var(--line2); }
.blank { display: inline-block; min-width: 56px; border-bottom: 2px solid var(--pink); color: var(--pink); }

/* 랭크 업 · 보급품 */
.rankup { padding-top: 26px; }
.ru-card { position: relative; margin: 30px auto 16px; width: 220px; padding: 26px 0 70px; border-radius: 26px; background: linear-gradient(170deg, #2a1f5c, #0f0d22); border: 1px solid rgba(255, 255, 255, .2); box-shadow: 0 0 50px rgba(138, 92, 255, .35); }
.ru-old, .ru-new { position: absolute; left: 0; right: 0; bottom: 22px; font-family: var(--ui); font-weight: 700; font-size: 26px; letter-spacing: .14em; transition: all .6s; }
.ru-old { color: var(--muted); }
.ru-new { opacity: 0; transform: translateY(20px); background: linear-gradient(90deg, var(--gold), #fff, var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ru-card.go { box-shadow: 0 0 80px rgba(255, 211, 107, .5); border-color: var(--gold); }
.ru-card.go .ru-old { opacity: 0; transform: translateY(-20px); }
.ru-card.go .ru-new { opacity: 1; transform: none; }
.ru-msg { font-size: 20px; line-height: 1.6; min-height: 90px; }
.ru-msg small { display: block; font-size: 13px; color: var(--muted); margin-top: 6px; }
.drop { padding-top: 26px; }
.case { position: relative; margin: 24px auto 10px; width: 170px; height: 170px; border-radius: 40px; display: grid; place-items: center; color: var(--gold); background: radial-gradient(circle, rgba(255, 211, 107, .15), transparent 70%); filter: drop-shadow(0 0 var(--glow, 0px) rgba(255, 211, 107, .9)); transition: filter .2s; }
.case-lock { position: absolute; bottom: 40px; color: #fff; }
.case.wiggle { animation: wiggle .35s; }
@keyframes wiggle { 0%, 100% { rotate: 0deg; } 25% { rotate: -8deg; } 75% { rotate: 8deg; } }
.reward { font-family: var(--ui); font-weight: 700; font-size: 52px; margin: 20px 0 6px; text-shadow: 0 0 24px rgba(41, 224, 255, .6); animation: pop .5s; }
.pc-row { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* 타깃 훈련 */
.bl-head { display: flex; align-items: center; gap: 12px; text-align: left; }
.bl-head .prompt { margin: 0; font-size: 16px; }
.sky { position: relative; height: 62vh; margin-top: 12px; border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, #0b0a1c, #120f2e); border: 1px solid var(--line); }
.sky-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(41, 224, 255, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(41, 224, 255, .08) 1px, transparent 1px); background-size: 28px 28px; }
.balloon { position: absolute; bottom: -120px; width: 22%; animation: rise linear forwards; }
.bl-in { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .1) 0 55%, transparent 56%); border: 2px solid var(--c); box-shadow: 0 0 18px var(--c), inset 0 0 18px color-mix(in srgb, var(--c) 40%, transparent); }
.bl-in::before, .bl-in::after { content: ""; position: absolute; background: var(--c); opacity: .7; }
.bl-in::before { left: 50%; top: -8px; width: 2px; height: 10px; box-shadow: 0 calc(100% + 86px) 0 var(--c); }
.bl-in::after { top: 50%; left: -8px; height: 2px; width: 10px; }
.bl-in .emo { font-size: 38px; }
.balloon.popped .bl-in { animation: popped .4s forwards; }
@keyframes rise { from { transform: translateY(0); } to { transform: translateY(calc(-62vh - 160px)); } }
@keyframes popped { to { transform: scale(1.8); opacity: 0; filter: brightness(3); } }

/* 효과 */
.spark { position: fixed; z-index: 200; pointer-events: none; font-size: 20px; transform: translate(-50%, -50%); text-shadow: 0 0 10px currentColor; animation: spark .9s ease-out forwards; }
@keyframes spark { to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.3); opacity: 0; } }
.confetti { position: fixed; top: -30px; z-index: 200; pointer-events: none; border-radius: 2px; animation: fall 3s linear forwards; box-shadow: 0 0 8px currentColor; }
@keyframes fall { to { transform: translateY(115vh) rotate(900deg); } }
.toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); z-index: 300; background: rgba(20, 18, 40, .95); border: 1px solid var(--line2); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; animation: toastIn .3s; max-width: 90vw; text-align: center; backdrop-filter: blur(10px); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }

.modal { position: fixed; inset: 0; z-index: 400; background: rgba(3, 3, 10, .7); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: toastIn .2s; }
.modal-card { width: 100%; max-width: 360px; text-align: center; padding: 24px 20px 18px; border-radius: 22px; background: #141228; border: 1px solid var(--line2); }
.modal-title { font-size: 20px; font-weight: 900; }
.modal-sub { color: var(--muted); font-size: 14px; margin: 8px 0 18px; line-height: 1.5; }
.modal-btns { display: flex; gap: 10px; }
.modal-btns .btn { flex: 1; font-size: 16px; }

/* 수료증 */
.cert-modal { overflow-y: auto; align-content: center; gap: 14px; }
.cert { width: 100%; max-width: 440px; padding: 10px; border-radius: 20px; background: linear-gradient(135deg, #ffd36b, #ff4fa3, #8a5cff, #29e0ff); }
.cert-in { border-radius: 14px; padding: 26px 18px; text-align: center; background: #0d0c1e; }
.cert-top { font-family: var(--ui); font-size: 10px; letter-spacing: .2em; color: var(--muted); }
.cert-title { font-family: var(--ui); font-weight: 700; font-size: 30px; letter-spacing: .06em; margin-top: 12px; background: linear-gradient(90deg, var(--gold), #fff, var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cert-kr { font-size: 13px; color: var(--muted); }
.cert-name { font-size: 32px; font-weight: 900; margin: 18px 0 8px; }
.cert-name small { display: block; font-family: var(--ui); font-size: 11px; letter-spacing: .2em; color: var(--cyan); font-weight: 500; }
.cert-body { font-size: 13.5px; line-height: 1.8; color: #c9c5e6; }
.cert-body b { color: var(--gold); }
.cert-ava { margin: 12px 0; }
.cert-date { font-family: var(--ui); font-size: 13px; color: var(--muted); }
.cert-sign { font-family: var(--ui); font-size: 10px; letter-spacing: .16em; color: var(--dim); margin-top: 8px; }
.cert-btns { display: flex; gap: 10px; width: 100%; max-width: 440px; }
.cert-btns .btn { flex: 1; }

@media print {
  body { background: #fff; }
  body::before, #app, .nav, .lesson, .cert-btns, .toast, .confetti { display: none !important; }
  .cert-modal { position: static; background: none; padding: 0; backdrop-filter: none; }
  .cert { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cert-in { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 360px) {
  .ob-title { font-size: 52px; }
  .opt .emo { font-size: 48px; }
  .ci-big { font-size: 92px; }
  .intel-emo { font-size: 90px; }
  .gtile { width: 66px; height: 82px; }
  .m-steps small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .sky .balloon { animation-duration: 9s !important; }
}
.ob > .tag { align-self: flex-start; }
.issued > .tag { align-self: center; }

/* ============================================================
   v3 — 아이돌 월드 투어 이미지
   ============================================================ */
.pic { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .45)); }
.opt .pic { width: 86%; height: auto; aspect-ratio: 1; margin: auto; }
.g3 .opt .pic { width: 92%; }
.key .pic { width: 64px; height: 64px; }
.intel-emo { width: 72%; aspect-ratio: 1; display: grid; place-items: center; }
.intel-emo .emo { font-size: 110px; }
.sc-emo { width: 150px; height: 150px; margin: 0 auto; display: grid; place-items: center; }
.big-emo { width: 170px; height: 170px; margin: 0 auto; display: grid; place-items: center; }
.big-emo.small { width: 110px; height: 110px; }
.pc-emo { width: 78%; aspect-ratio: 1; display: grid; place-items: center; margin-top: 6%; }
.pc .pc-emo .emo { font-size: 44px; }
.pc.mini .pc-emo { width: 70px; }

/* 사람 사진 공통 */
.h-ava { overflow: hidden; padding: 0; border-radius: 50%; box-shadow: 0 0 0 2px var(--c), 0 0 16px color-mix(in srgb, var(--c) 50%, transparent); }
.h-ava img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; display: block; }
.m-ava { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.m-ava img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; box-shadow: 0 0 0 2px var(--wc), 0 0 14px color-mix(in srgb, var(--wc) 55%, transparent); }
.m-ava small { font-family: var(--ui); font-size: 10px; letter-spacing: .12em; color: var(--muted); }
.m-ava.sm img { width: 34px; height: 34px; }

/* 스플래시 */
.splash { background: linear-gradient(180deg, rgba(7, 7, 15, .2) 0%, rgba(7, 7, 15, .75) 40%, var(--bg) 70%), var(--stage) center top / cover no-repeat; }
.mentors { display: flex; justify-content: space-between; margin: 6px 0 2px; }

/* 시작 인사 */
.greet { position: relative; margin: -16px -16px 0; padding: 30px 16px 0; background: linear-gradient(180deg, rgba(7, 7, 15, .35), var(--bg) 78%), var(--stage) center top / cover no-repeat; border-radius: 0 0 28px 28px; }

/* 단계 소개 — 선배 사진 */
.brief-mentor { width: 150px; height: 190px; margin: 22px auto 14px; border-radius: 26px; overflow: hidden; box-shadow: 0 0 0 2px var(--wc), 0 0 40px color-mix(in srgb, var(--wc) 45%, transparent); }
.brief-mentor img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.brief-desc b.en { color: #fff; font-size: 17px; }

/* 홈 미션 카드 */
.mission { background: linear-gradient(180deg, rgba(10, 9, 24, .35) 0%, rgba(10, 9, 24, .92) 46%, #0d0c1e 100%), var(--stage) center top / cover no-repeat; }
.mission::after { display: none; }
.m-no { margin-top: 70px; }
.m-mentor { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; }
.m-mentor img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; box-shadow: 0 0 0 2px var(--wc); }
.m-mentor small { display: block; font-family: var(--ui); font-size: 10px; letter-spacing: .16em; color: var(--muted); }
.m-mentor b { font-family: var(--ui); font-size: 17px; letter-spacing: .08em; margin-right: 6px; }
.m-mentor span { font-size: 12px; color: var(--muted); }
.m-villain { width: 84px; height: 106px; border-radius: 16px; object-fit: cover; flex: none; box-shadow: 0 0 0 1px var(--wc), 0 0 24px color-mix(in srgb, var(--wc) 40%, transparent); }

/* 지도 도시 */
.city { padding: 0 0 16px; overflow: hidden; }
.city-hero { position: relative; height: 130px; background: linear-gradient(180deg, transparent 30%, rgba(10, 9, 24, .95)), var(--stage) center 30% / cover no-repeat; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 16px 10px; }
.city-hero .city-code { font-size: 34px; }
.city-m img { width: 62px; height: 62px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; box-shadow: 0 0 0 2px var(--wc), 0 0 18px color-mix(in srgb, var(--wc) 50%, transparent); }
.city > .city-head, .city > .city-bar, .city > .ops { margin-left: 16px; margin-right: 16px; }
.city > .city-head { margin-top: 10px; }

/* 보스 */
.arena { background-size: cover; background-position: center; }
.arena-grid { opacity: .25; }
.boss-fig { top: 64px; width: 120px; height: 146px; }
.villain-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; border-radius: 20px; box-shadow: 0 0 0 1px var(--wc), 0 0 30px color-mix(in srgb, var(--wc) 50%, transparent); }
.arena { height: 230px; }

.cert-mentors { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
