/* ══════════════════════════════════════════════════════════════════
   서울 퇴마 헌터 · 스타일
   ══════════════════════════════════════════════════════════════════ */
:root {
  --ink: #05060e;
  --ink-2: #0a0d1a;
  --panel: rgba(9, 12, 24, 0.82);
  --panel-2: rgba(14, 19, 36, 0.92);
  --line: rgba(120, 205, 255, 0.20);
  --line-strong: rgba(120, 214, 255, 0.52);
  --cyan: #66e6ff;
  --cyan-deep: #2ea8c9;
  --violet: #a97cff;
  --gold: #ffcf82;
  --red: #ff7286;
  --paper: #ece5d5;
  --muted: #93a5c4;
  --font-display: "Cinzel", "Noto Serif KR", "Song Myung", serif;
  --font-serif: "Noto Serif KR", "Song Myung", "Apple SD Gothic Neo", "Nanum Myeongjo", serif;
  --font-hud: "Chakra Petch", "Pretendard Variable", Pretendard, "Noto Sans KR", sans-serif;
  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font-family: inherit; color: inherit; cursor: pointer; }
b { font-weight: 700; }
em { font-style: normal; }
.hidden { display: none !important; }

#app {
  position: fixed; inset: 0;
  overflow: hidden;
  user-select: none; -webkit-user-select: none;
  background: radial-gradient(120% 90% at 50% 10%, #101a33 0%, #070a14 55%, #04050b 100%);
}
#stage-floor {
  position: absolute; top: 0; left: 0;
  transform-origin: 0 0;
  will-change: transform;
  pointer-events: none;
  display: block;
  image-rendering: auto;
}
#stage-floor.is-hidden { display: none; }
#stage {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  touch-action: none;
}

/* ── 화면 레이어 ── */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  pointer-events: none;
  opacity: 0; visibility: hidden;
  transition: opacity .32s ease;
}
.screen.is-visible { opacity: 1; visibility: visible; }
.screen > * { pointer-events: auto; }

/* ══ 로비 상단 ══ */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  padding: calc(10px + var(--safe-t)) 14px 6px;
}
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand-seal {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  font-family: var(--font-serif); font-weight: 900; font-size: 20px;
  color: var(--cyan);
  border: 1px solid rgba(102, 230, 255, .55);
  background: linear-gradient(160deg, rgba(30, 90, 120, .55), rgba(8, 14, 28, .9));
  border-radius: 9px;
  box-shadow: 0 0 16px rgba(80, 210, 255, .22), inset 0 0 12px rgba(80, 210, 255, .15);
}
.brand-txt { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; overflow: hidden; }
.brand-txt strong {
  font-family: var(--font-serif); font-weight: 900; font-size: 15px;
  letter-spacing: -0.01em; color: #f3f0e8;
  white-space: nowrap;
}
.brand-txt em {
  font-size: 8px; letter-spacing: .18em; color: rgba(150, 200, 230, .55);
  margin-top: 3px; white-space: nowrap;
  font-family: var(--font-hud);
}
.topbar-right { display: flex; align-items: center; gap: 6px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(8, 13, 26, .72);
  font-size: 11.5px; font-weight: 600;
  color: #d8e6f6;
  backdrop-filter: blur(6px);
  transition: border-color .2s, transform .12s;
}
.chip:active { transform: scale(.96); }
.chip b { font-size: 12.5px; color: #fff; }
.chip .slash { opacity: .45; }
.chip-emoji { font-size: 12px; }
.chip-ticket { border-color: rgba(255, 205, 120, .34); }
.chip-ticket b { color: var(--gold); }
.chip-soul { border-color: rgba(120, 220, 255, .3); }
.chip-soul b { color: var(--cyan); }
.chip-label { display: none; }
.soul-dot {
  width: 11px; height: 15px; display: inline-block;
  background: radial-gradient(60% 60% at 40% 30%, #eafcff, #66e6ff 45%, #4361ff 100%);
  clip-path: polygon(50% 0%, 86% 34%, 74% 100%, 26% 100%, 14% 34%);
  box-shadow: 0 0 10px rgba(110, 230, 255, .75);
  flex: none;
}
.icon-btn {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(8, 13, 26, .7);
  color: #cfe6f5; font-size: 14px;
}
.icon-btn.is-off { color: rgba(150, 170, 200, .45); text-decoration: line-through; }
.lang-btn { font-size: 10px; font-weight: 800; letter-spacing: .06em; color: #cfe6f5; }
.city-tag {
  margin: 0 0 1px;
  font-family: var(--font-hud);
  font-size: 9px; font-weight: 700; letter-spacing: .26em;
  color: rgba(255, 205, 150, .8);
  text-transform: uppercase;
}

/* ══ 로비 타이틀 ══ */
.hero-title {
  padding: 4px 20px 0;
  margin-top: 2px;
  max-width: 620px;
}
.eyebrow {
  margin: 0;
  font-family: var(--font-hud);
  font-size: 9px; letter-spacing: .16em; font-weight: 600;
  color: rgba(146, 210, 240, .72);
  text-transform: uppercase;
}
.hero-title h1 {
  margin: 6px 0 6px;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(34px, 9.4vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: #f6f2e8;
  text-shadow: 0 0 26px rgba(90, 200, 255, .22), 0 2px 0 rgba(0, 0, 0, .5);
}
.hero-title h1 .accent {
  color: var(--cyan);
  text-shadow: 0 0 22px rgba(90, 230, 255, .6), 0 0 60px rgba(70, 170, 255, .35);
}
.tagline {
  margin: 0;
  font-size: 12.5px; line-height: 1.55;
  color: rgba(198, 212, 232, .78);
  letter-spacing: .01em;
}

/* ══ 로비 하단 ══ */
.lobby-bottom {
  margin-top: auto;
  width: 100%;
  max-width: 1040px;
  align-self: center;
  padding: 10px 14px calc(12px + var(--safe-b));
  display: flex; flex-direction: column; gap: 9px;
}

.stage-card {
  position: relative;
  padding: 11px 13px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(18, 26, 48, .90), rgba(7, 10, 20, .88));
  box-shadow: inset 0 1px 0 rgba(160, 220, 255, .10), 0 10px 30px rgba(0, 0, 0, .35);
  backdrop-filter: blur(8px);
}
.stage-card::after {
  content: ""; position: absolute; inset: 5px;
  border-radius: 10px; pointer-events: none;
  border: 1px solid rgba(120, 200, 255, .06);
}
.stage-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stage-tag {
  font-size: 9.5px; font-weight: 800; letter-spacing: .16em;
  color: var(--cyan);
  padding: 2px 7px; border-radius: 4px;
  border: 1px solid rgba(102, 230, 255, .32);
  background: rgba(40, 120, 160, .16);
}
.mode-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(150, 170, 220, .18);
  background: rgba(8, 12, 24, .6);
  border-radius: 999px;
  padding: 3px 7px 3px 9px;
  font-size: 10.5px; color: #a9bad6; font-weight: 600;
}
.mode-toggle .mode-ico { font-size: 12px; color: var(--violet); }
.mode-toggle .switch {
  width: 22px; height: 12px; border-radius: 999px;
  background: rgba(120, 140, 180, .28);
  position: relative; transition: background .2s;
}
.mode-toggle .switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #b9c8de; transition: transform .2s, background .2s;
}
.mode-toggle[aria-pressed="true"] { color: #e9f6ff; border-color: rgba(170, 130, 255, .45); }
.mode-toggle[aria-pressed="true"] .switch { background: rgba(169, 124, 255, .55); }
.mode-toggle[aria-pressed="true"] .switch::after { transform: translateX(10px); background: #f0e6ff; }
.stage-name {
  margin: 6px 0 2px;
  font-family: var(--font-serif); font-weight: 900;
  font-size: 21px; letter-spacing: -0.02em;
  color: #f2ede1;
}
.stage-desc { margin: 0; font-size: 11.5px; color: var(--muted); }
.stage-desc b { color: #ffb4c0; font-weight: 700; }
.stage-meta {
  display: flex; gap: 14px; margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(120, 200, 255, .10);
}
.stage-meta div { display: flex; flex-direction: column; gap: 1px; }
.stage-meta span { font-size: 9px; color: rgba(150, 170, 200, .7); letter-spacing: .02em; }
.stage-meta b { font-size: 13px; color: #e6eefb; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ══ 퇴마 등급 진행 (로비) ══ */
.rank-row {
  margin-top: 6px; padding-top: 5px;
  border-top: 1px solid rgba(120, 190, 255, .13);
  display: flex; align-items: center; gap: 8px;
}
.rank-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rank-badge {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  font-size: 10px; font-weight: 700; color: #dff5ff; letter-spacing: .01em;
  white-space: nowrap;
}
.rank-badge i {
  display: grid; place-items: center;
  width: 17px; height: 17px; flex: none;
  font-style: normal; font-family: var(--font-serif); font-size: 10px; font-weight: 900;
  color: #06121a; border-radius: 4px;
  background: linear-gradient(150deg, var(--cyan), #53c8ff);
  box-shadow: 0 0 10px rgba(90, 220, 255, .45);
}
.rank-row[data-tier="2"] .rank-badge i { background: linear-gradient(150deg, #7ef0ff, #2fc4ea); box-shadow: 0 0 12px rgba(110, 240, 255, .6); }
.rank-row[data-tier="3"] .rank-badge i { background: linear-gradient(150deg, #ffe6a8, #e0a94c); box-shadow: 0 0 14px rgba(255, 205, 120, .6); }
.rank-row[data-tier="4"] .rank-badge i { background: linear-gradient(150deg, #dcc6ff, #ffd98a); box-shadow: 0 0 16px rgba(190, 150, 255, .75); }
.rank-points { font-size: 9.5px; color: rgba(160, 185, 215, .8); font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
.rank-points b { color: #eaf5ff; font-size: 10.5px; }
.rank-track {
  position: relative; height: 4px; border-radius: 999px; flex: 1; min-width: 40px;
  background: rgba(120, 150, 200, .18); overflow: hidden;
}
.rank-track i {
  position: absolute; inset: 0 auto 0 0; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), #9be6ff);
  box-shadow: 0 0 8px rgba(90, 220, 255, .6);
  transition: width .5s cubic-bezier(.2, .8, .2, 1);
}
.rank-row[data-tier="3"] .rank-track i { background: linear-gradient(90deg, #ffd98a, #ffb347); box-shadow: 0 0 9px rgba(255, 200, 110, .6); }
.rank-row[data-tier="4"] .rank-track i { background: linear-gradient(90deg, #cbb0ff, #ffe0a0); box-shadow: 0 0 10px rgba(200, 160, 255, .7); }
.rank-next { margin: 2px 0 0; font-size: 9px; line-height: 1.3; color: rgba(178, 200, 226, .82); }
.rank-next b { color: #ffe3ad; font-weight: 700; }
.rank-row.is-max .rank-next { color: rgba(230, 210, 170, .9); }

/* ══ 결과 점수 줄 ══ */
.score-line {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 2px 0 0; padding: 4px 8px;
  font-size: 10.5px; color: rgba(198, 216, 236, .86);
  border-radius: 8px;
  background: rgba(30, 90, 130, .18);
  border: 1px solid rgba(110, 200, 255, .18);
}
.score-line .score-tag { font-weight: 800; color: #9be6ff; font-variant-numeric: tabular-nums; }
.score-line .score-tag b { font-size: 12.5px; color: #eafaff; }
.score-line.is-up { background: rgba(150, 110, 40, .22); border-color: rgba(255, 205, 120, .45); }
.score-line.is-up .score-tag { color: #ffe0a0; }

.lobby-actions { display: flex; flex-direction: column; gap: 8px; }

.daily-row { display: flex; gap: 7px; }
.daily-btn {
  flex: 1; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 34px; padding: 0 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 205, 120, .26);
  background: linear-gradient(160deg, rgba(48, 38, 20, .55), rgba(12, 12, 22, .8));
  color: #f4e4c6; font-size: 11px; font-weight: 600;
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.daily-btn b { color: var(--gold); font-size: 11.5px; }
.daily-btn.pass { border-color: rgba(169, 124, 255, .30); background: linear-gradient(160deg, rgba(40, 26, 70, .6), rgba(12, 12, 22, .8)); color: #e3d8ff; }
.daily-btn:disabled { opacity: .45; }
.daily-btn:active { transform: scale(.985); }

.cta {
  position: relative;
  height: 58px;
  border-radius: 14px;
  border: 1px solid rgba(110, 235, 255, .55);
  background:
    linear-gradient(180deg, rgba(58, 160, 190, .30), rgba(8, 24, 40, .92)),
    linear-gradient(90deg, rgba(20, 60, 80, .8), rgba(40, 110, 140, .55));
  box-shadow: 0 0 26px rgba(60, 200, 255, .20), inset 0 1px 0 rgba(200, 250, 255, .25), inset 0 -14px 24px rgba(0, 20, 35, .6);
  color: #f2fdff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  overflow: hidden;
  transition: transform .12s ease, box-shadow .2s;
}
.cta:active { transform: scale(.985); }
.cta-main {
  font-family: var(--font-serif); font-weight: 900;
  font-size: 24px; letter-spacing: .22em;
  padding-left: .22em;
  text-shadow: 0 0 18px rgba(120, 235, 255, .7);
}
.cta-sub { font-size: 10px; letter-spacing: .05em; color: rgba(190, 225, 240, .78); }
.cta-sheen {
  position: absolute; top: 0; bottom: 0; width: 40%;
  left: -50%;
  background: linear-gradient(105deg, transparent, rgba(210, 250, 255, .22), transparent);
  transform: skewX(-18deg);
  animation: sheen 4.4s ease-in-out infinite;
}
@keyframes sheen {
  0%, 62% { left: -60%; }
  86%, 100% { left: 130%; }
}
.reenter {
  height: 40px; border-radius: 11px;
  border: 1px solid rgba(255, 205, 120, .5);
  background: rgba(60, 40, 12, .7);
  color: var(--gold); font-weight: 700; font-size: 12.5px;
}

.lobby-nav { display: flex; gap: 7px; }
.lobby-nav button {
  flex: 1;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(130, 170, 220, .2);
  background: rgba(8, 12, 24, .66);
  color: #c3d4ea; font-size: 11.5px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.lobby-nav button:active { transform: scale(.98); }
.lobby-nav b { color: var(--cyan); }

.build-tag {
  position: absolute; right: 12px; bottom: calc(2px + var(--safe-b));
  font-size: 8.5px; letter-spacing: .08em;
  color: rgba(140, 160, 200, .35);
  pointer-events: none;
  margin: 0;
}

/* ══ 전투 HUD (얇고 투명하게 — 명소 스카이라인을 가리지 않도록 상단에 모은다) ══ */
#battle .hud-top {
  position: absolute; top: 0; left: 0; right: 0;
  padding: calc(5px + var(--safe-t)) 12px 0;
  display: flex; flex-direction: column; gap: 4px;
  pointer-events: none;
}
.hud-row { display: flex; align-items: center; gap: 6px; }
.hud-row2 { display: flex; align-items: center; gap: 8px; }
.xp-track {
  position: relative;
  flex: 1; height: 7px;
  border-radius: 999px;
  background: rgba(6, 10, 20, .72);
  border: 1px solid rgba(110, 200, 240, .30);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6);
}
.xp-track i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #2a9fd6, #6fe6ff 60%, #c8fbff);
  box-shadow: 0 0 10px rgba(110, 235, 255, .8);
  transition: width .18s ease;
}
.lvl-badge {
  flex: none;
  min-width: 32px; height: 18px;
  display: grid; place-items: center;
  font-size: 9.5px; font-weight: 800; letter-spacing: .02em;
  color: #061018;
  background: linear-gradient(180deg, #e9fbff, #8fe6ff);
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(110, 235, 255, .45);
  font-variant-numeric: tabular-nums;
}
.timer {
  flex: none;
  font-family: var(--font-serif); font-weight: 900;
  font-size: 17px; line-height: 1;
  color: #f7f4ea;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .85);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.hud-sub { display: flex; align-items: center; gap: 4px; font-size: 9px; color: rgba(190, 212, 234, .85); white-space: nowrap; text-shadow: 0 1px 4px rgba(0,0,0,.9); }
.hud-sub .dot { width: 2px; height: 2px; border-radius: 50%; background: rgba(180, 205, 230, .6); }
.hp-track {
  position: relative;
  flex: 1; height: 9px; border-radius: 999px;
  background: rgba(8, 8, 16, .8);
  border: 1px solid rgba(255, 110, 130, .32);
  overflow: hidden;
}
.hp-track i {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, #ff4e6a, #ff8a9b 70%, #ffd0d6);
  box-shadow: 0 0 10px rgba(255, 90, 120, .55);
  transition: width .15s ease;
}
.hp-track span {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 7.5px; font-weight: 700; letter-spacing: .06em;
  color: rgba(255, 240, 240, .95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .85);
  font-variant-numeric: tabular-nums;
}
.boss-bar { margin-top: 2px; display: flex; flex-direction: column; align-items: center; }
.boss-name {
  font-family: var(--font-serif); font-weight: 700;
  font-size: 11px; letter-spacing: .1em; color: #ffd3da;
  text-align: center; margin-bottom: 4px;
  padding: 2px 12px;
  border-radius: 999px;
  background: rgba(24, 6, 14, .78);
  border: 1px solid rgba(255, 100, 120, .35);
  box-shadow: 0 0 14px rgba(255, 60, 90, .25);
  text-shadow: 0 0 10px rgba(255, 70, 90, .55);
}
.boss-track { width: 100%; }
.boss-track {
  height: 8px; border-radius: 999px;
  background: rgba(20, 6, 12, .9);
  border: 1px solid rgba(255, 90, 110, .45);
  overflow: hidden;
}
.boss-track i {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, #7a1024, #ff4a63 60%, #ffb0bc);
  transition: width .18s ease;
}

.hud-bottom {
  position: absolute; left: 0; right: 0; bottom: calc(10px + var(--safe-b));
  padding: 0 12px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 6px;
}

/* 구역(명소) 표찰 — HUD 바로 아래에 붙는 슬림 바. 사냥꾼(화면 중앙)과 절대 겹치지 않는다. */
.zone-card {
  position: absolute; left: 10px;
  top: calc(var(--band-top, 52px) + 1px);
  width: auto; max-width: min(72%, 258px);
  padding: 4px 9px 5px;
  border-radius: 9px;
  border: 1px solid rgba(var(--zc, 150, 220, 255), .30);
  background: linear-gradient(160deg, rgba(9, 13, 26, .74), rgba(6, 9, 18, .52));
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .05);
  pointer-events: none;
  opacity: .95;
}
.zone-card.is-enter { animation: zoneIn .6s cubic-bezier(.2, .9, .3, 1); }
@keyframes zoneIn {
  0% { opacity: 0; transform: translateX(-14px); }
  100% { opacity: .96; transform: none; }
}
.zone-card.is-cleared { border-color: rgba(255, 205, 120, .72); box-shadow: 0 0 22px rgba(255, 190, 110, .25); }
.zone-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.zone-texts { min-width: 0; display: flex; align-items: baseline; gap: 6px; }
.zone-eyebrow {
  display: block; flex: none;
  font-size: 7px; font-weight: 800; letter-spacing: .14em;
  color: rgba(var(--zc, 150, 220, 255), .95);
}
.zone-name {
  display: block;
  font-family: var(--font-serif); font-weight: 900;
  font-size: 13px; line-height: 1.1; letter-spacing: -.01em;
  color: #f7f2e7;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .8);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.zone-sub {
  display: none;
  font-size: 8.5px; color: rgba(205, 220, 240, .78);
  letter-spacing: .02em; margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.zone-count {
  flex: none;
  font-size: 8.5px; font-weight: 800; font-variant-numeric: tabular-nums;
  color: rgba(var(--zc, 150, 220, 255), .95);
}
.zone-track {
  height: 2px; border-radius: 2px; margin-top: 3px;
  background: rgba(255, 255, 255, .12); overflow: hidden;
}
.zone-track i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, rgba(var(--zc, 150, 220, 255), .9), #fff);
  transition: width .3s ease;
}

/* 자동 사냥 표시 */
.auto-chip {
  position: absolute; left: 13px; bottom: calc(64px + var(--safe-b));
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 999px;
  border: 1px solid rgba(110, 230, 255, .38);
  background: rgba(8, 14, 26, .72);
  font-size: 8.5px; font-weight: 800; letter-spacing: .1em;
  color: #bff0ff;
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.auto-chip i {
  width: 5px; height: 5px; border-radius: 50%;
  background: #6fe6ff; box-shadow: 0 0 8px #6fe6ff;
  animation: autoPulse 1.3s ease-in-out infinite;
}
.auto-chip.is-manual { border-color: rgba(255, 205, 120, .45); color: #ffe2b0; }
.auto-chip.is-manual i { background: #ffcf82; box-shadow: 0 0 8px #ffcf82; animation: none; }
@keyframes autoPulse { 50% { opacity: .3; } }

/* 유물 슬롯 */
.relic-slots { display: flex; gap: 7px; align-items: flex-end; margin-bottom: 2px; }
.relic-slot {
  position: relative;
  width: 52px; height: 52px; border-radius: 13px;
  border: 1px solid rgba(255, 215, 150, .38);
  background: radial-gradient(120% 120% at 50% 18%, rgba(70, 56, 30, .6), rgba(8, 10, 20, .92));
  display: grid; place-items: center; padding: 0; overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.relic-slot .relic-ico { display: grid; place-items: center; transform: translateY(-5px); }
.relic-slot .relic-name {
  position: absolute; bottom: 2px; left: 1px; right: 1px;
  text-align: center; font-size: 6.5px; line-height: 1.1;
  color: rgba(255, 232, 195, .85); letter-spacing: -.02em;
  display: block; overflow: hidden;
  white-space: normal; word-break: break-word;
  max-height: 14px; line-height: 1.05;
}
.relic-slot .relic-cd {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 900; color: #ffe9c8;
  font-variant-numeric: tabular-nums;
  background: conic-gradient(from -90deg, rgba(5, 8, 16, .82) var(--cd, 0%), rgba(5, 8, 16, 0) 0);
  pointer-events: none;
}
.relic-slot.is-ready { border-color: rgba(255, 235, 180, .95); box-shadow: 0 0 16px rgba(255, 205, 120, .45); }
.relic-slot.is-ready .relic-ico { filter: drop-shadow(0 0 6px rgba(255, 220, 150, .8)); }
.relic-slot.is-empty { opacity: .42; border-style: dashed; }
.relic-slot.is-empty .relic-cd { background: none; }

.codex-grid.is-relics { grid-template-columns: 1fr; }
.relic-item { align-items: flex-start; }
.relic-item .relic-equip { height: 26px; font-size: 9.5px; }
.relic-equip-row { display: flex; gap: 4px; margin-top: 4px; }
.relic-equip {
  flex: 1; height: 22px; border-radius: 6px;
  border: 1px solid rgba(255, 205, 120, .35);
  background: rgba(30, 22, 10, .7);
  color: #ffd9a0; font-size: 8.5px; font-weight: 800;
}
.relic-equip.is-on { border-color: rgba(140, 240, 190, .6); color: #8ff0c6; background: rgba(10, 30, 22, .8); }

.pause-btn {
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid rgba(140, 180, 220, .25);
  background: rgba(8, 12, 24, .66);
  color: #cfe0f2; font-size: 11px; letter-spacing: .1em;
  backdrop-filter: blur(6px);
}
.burst-btn {
  position: relative;
  width: 88px; height: 88px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: grid; place-items: center;
  padding: 0;
  filter: grayscale(.55) brightness(.8);
  transition: filter .25s, transform .15s;
}
.burst-btn.is-ready {
  filter: none;
  animation: burstPulse 1.8s ease-in-out infinite;
}
.burst-btn:active { transform: scale(.95); }
@keyframes burstPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}
.burst-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 215, 130, .5);
  box-shadow: 0 0 22px rgba(255, 205, 110, .2), inset 0 0 24px rgba(0, 0, 0, .6);
}
.burst-btn.is-ready .burst-ring {
  border-color: rgba(255, 235, 180, .95);
  box-shadow: 0 0 30px rgba(255, 210, 120, .55), inset 0 0 22px rgba(255, 180, 90, .25);
}
.burst-core {
  position: relative;
  width: 66px; height: 66px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  background: radial-gradient(120% 120% at 50% 20%, rgba(60, 130, 160, .5), rgba(6, 10, 22, .95));
  border: 1px solid rgba(120, 210, 240, .28);
}
.burst-core b {
  font-family: var(--font-serif); font-weight: 900;
  font-size: 19px; letter-spacing: .04em;
  color: #eafcff;
  text-shadow: 0 0 12px rgba(120, 235, 255, .7);
}
.burst-core em { font-size: 8px; color: rgba(190, 220, 240, .8); letter-spacing: .02em; }
.burst-btn.is-ready .burst-core {
  background: radial-gradient(120% 120% at 50% 20%, rgba(255, 215, 130, .38), rgba(40, 24, 6, .92));
  border-color: rgba(255, 220, 150, .6);
}
.burst-fill {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: conic-gradient(from -90deg, rgba(120, 235, 255, .85) var(--burst, 0%), rgba(255, 255, 255, .05) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  pointer-events: none;
}
.burst-btn.is-ready .burst-fill { background: conic-gradient(from -90deg, rgba(255, 220, 140, .95) 100%, transparent 0); }

/* 등장 배너 */
.banner {
  position: absolute; left: 0; right: 0; top: 30%;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  opacity: 0; transform: translateY(8px) scale(.98);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
  text-align: center;
}
.banner.show { opacity: 1; transform: none; }
.banner strong {
  font-family: var(--font-serif); font-weight: 900;
  font-size: clamp(18px, 4.8vw, 26px);
  letter-spacing: .04em;
  color: #fff6e6;
  padding: 3px 16px;
  text-shadow: 0 0 18px rgba(255, 180, 90, .55), 0 2px 0 rgba(0, 0, 0, .65);
  background: linear-gradient(90deg, transparent, rgba(12, 10, 18, .78) 18%, rgba(12, 10, 18, .78) 82%, transparent);
  border-top: 1px solid rgba(255, 205, 120, .3);
  border-bottom: 1px solid rgba(255, 205, 120, .3);
}
.banner span { font-size: 10px; letter-spacing: .1em; color: rgba(255, 220, 180, .85); text-shadow: 0 1px 6px rgba(0,0,0,.9); }

/* ══ 모달 공통 ══ */
.modal {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(3, 4, 10, .68);
  backdrop-filter: blur(7px);
  opacity: 0; visibility: hidden;
  transition: opacity .22s ease;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal-card {
  width: min(560px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 18px 18px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(40, 90, 120, .30), transparent 60%),
    linear-gradient(170deg, rgba(16, 22, 40, .98), rgba(6, 9, 18, .99));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(180, 235, 255, .12);
  transform: translateY(10px) scale(.985);
  transition: transform .24s cubic-bezier(.2, .9, .3, 1);
  scrollbar-width: thin;
}
.modal.is-open .modal-card { transform: none; }
.modal-card.small { width: min(360px, 100%); }
.modal-head { margin-bottom: 10px; }
.modal-head.row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.modal-head h3 {
  margin: 4px 0 4px;
  font-family: var(--font-serif); font-weight: 900;
  font-size: 24px; letter-spacing: -0.02em;
  color: #f6f1e6;
}
.modal-desc { margin: 0; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.modal-desc b { color: #ffd9a0; }
.key-hint { color: rgba(150, 180, 210, .5); font-size: 10px; }
.modal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid rgba(120, 200, 255, .12);
}
.modal-foot p { margin: 0; font-size: 10px; color: rgba(150, 175, 205, .7); line-height: 1.45; flex: 1; min-width: 0; }
.modal-foot .btn { flex: none; white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }

.btn {
  height: 44px; padding: 0 16px;
  border-radius: 11px;
  border: 1px solid rgba(130, 175, 215, .25);
  background: rgba(14, 20, 36, .8);
  color: #dbe8f6; font-size: 13px; font-weight: 700;
  transition: transform .12s, border-color .2s, background .2s;
}
.btn:active { transform: scale(.98); }
.btn.primary {
  border-color: rgba(110, 235, 255, .55);
  background: linear-gradient(180deg, rgba(50, 150, 180, .55), rgba(10, 40, 60, .9));
  color: #f0fdff;
  box-shadow: 0 0 20px rgba(70, 210, 255, .18), inset 0 1px 0 rgba(210, 250, 255, .3);
}
.btn.ghost { color: #a9bcd4; background: rgba(10, 14, 26, .6); }
.btn.small { height: 32px; padding: 0 10px; font-size: 11px; border-radius: 8px; }
.btn:disabled { opacity: .4; }

/* 레벨업 카드 */
.levelup-card { width: min(760px, 100%); }
.cards { display: grid; gap: 8px; grid-template-columns: 1fr; }
.card {
  position: relative;
  display: grid;
  grid-template-columns: 62px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 13px;
  border: 1px solid rgba(120, 200, 255, .18);
  background: linear-gradient(140deg, rgba(22, 32, 56, .9), rgba(9, 13, 24, .92));
  text-align: left;
  overflow: hidden;
  transition: border-color .18s, transform .12s, box-shadow .2s;
}
.card:hover { border-color: rgba(120, 220, 255, .45); }
.card:active { transform: scale(.99); }
.card.is-evolve {
  border-color: rgba(255, 205, 120, .6);
  background: linear-gradient(140deg, rgba(58, 42, 16, .85), rgba(16, 12, 8, .94));
  box-shadow: 0 0 24px rgba(255, 190, 90, .18), inset 0 1px 0 rgba(255, 230, 180, .25);
}
.card .card-icon { width: 62px; height: 62px; display: grid; place-items: center; }
.card .card-icon canvas { display: block; }
.card .card-body { min-width: 0; }
.card .card-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card .card-name {
  font-family: var(--font-serif); font-weight: 900;
  font-size: 15px; letter-spacing: -0.01em; color: #f4efe3;
}
.card .card-desc { margin: 3px 0 0; font-size: 10.5px; line-height: 1.4; color: var(--muted); }
.card .card-effect { margin: 3px 0 0; font-size: 10.5px; color: var(--cyan); font-weight: 700; }
.card.is-evolve .card-effect { color: var(--gold); }
.card .card-key {
  font-size: 10px; font-weight: 800; color: rgba(160, 195, 225, .55);
  border: 1px solid rgba(150, 190, 225, .22);
  border-radius: 6px; width: 22px; height: 22px;
  display: grid; place-items: center;
}
.tag {
  font-size: 8.5px; font-weight: 800; letter-spacing: .08em;
  padding: 1.5px 5px; border-radius: 4px;
  border: 1px solid rgba(120, 220, 255, .4);
  color: var(--cyan);
}
.tag.new { border-color: rgba(120, 240, 190, .5); color: #86f0c8; }
.tag.evo { border-color: rgba(255, 205, 120, .6); color: var(--gold); }
.tag.max { border-color: rgba(180, 160, 220, .4); color: #c9b6ff; }
.tag.rare { border-color: rgba(255, 150, 90, .65); color: #ffb689; }
.tag.legend { border-color: rgba(255, 205, 120, .8); color: #ffe0a0; }

/* 퇴마 등급 — 희귀/전설 강화 카드 */
.card.is-rare {
  border-color: rgba(255, 150, 90, .5);
  background: linear-gradient(140deg, rgba(52, 30, 18, .9), rgba(14, 10, 10, .94));
}
.card.is-rare .card-effect { color: #ffb689; }
.card.is-legend {
  border-color: rgba(255, 205, 120, .7);
  background: linear-gradient(140deg, rgba(58, 44, 14, .9), rgba(18, 13, 6, .95));
  box-shadow: 0 0 26px rgba(255, 200, 110, .2), inset 0 1px 0 rgba(255, 235, 190, .28);
}
.card.is-legend .card-effect { color: #ffe0a0; }

/* 영혼석 강화 */
.soul-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  border: 1px solid rgba(120, 220, 255, .3);
  background: rgba(8, 16, 30, .8);
  font-size: 13px; font-weight: 800; color: var(--cyan);
  font-variant-numeric: tabular-nums;
}
.upgrade-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.upgrade-row {
  display: grid; grid-template-columns: 40px 1fr auto;
  align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 11px;
  border: 1px solid rgba(120, 200, 255, .12);
  background: rgba(12, 17, 30, .7);
}
.upgrade-row .u-icon { width: 40px; height: 40px; display: grid; place-items: center; }
.upgrade-row .u-name { font-size: 12.5px; font-weight: 700; color: #e8f1fb; }
.upgrade-row .u-desc { font-size: 10px; color: var(--muted); margin-top: 1px; }
.upgrade-row .u-buy {
  min-width: 84px; height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(120, 220, 255, .4);
  background: rgba(16, 44, 60, .7);
  color: var(--cyan); font-size: 11px; font-weight: 800;
}
.upgrade-row .u-buy:disabled { opacity: .38; border-color: rgba(140, 160, 190, .2); color: #8ea2ba; }
.pips { display: flex; gap: 2.5px; margin-top: 3px; }
.pips i { width: 12px; height: 3px; border-radius: 2px; background: rgba(120, 160, 200, .22); }
.pips i.on { background: var(--cyan); box-shadow: 0 0 6px rgba(110, 235, 255, .6); }

/* 도감 */
.tabs { display: inline-flex; gap: 3px; padding: 3px; border-radius: 9px; background: rgba(8, 12, 24, .7); border: 1px solid rgba(130, 170, 220, .18); }
.tab {
  border: none; background: transparent;
  padding: 4px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 700; color: #93a5c4;
}
.tab.is-active { background: rgba(60, 140, 180, .35); color: #eafaff; }
.codex-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 7px;
  margin-top: 10px;
}
.codex-item {
  display: grid; grid-template-columns: 46px 1fr; gap: 8px;
  align-items: center;
  padding: 7px;
  border-radius: 10px;
  border: 1px solid rgba(120, 200, 255, .12);
  background: rgba(10, 14, 26, .7);
}
.codex-item.locked { opacity: .42; }
.codex-item .cx-name { font-family: var(--font-serif); font-size: 12px; font-weight: 700; color: #f0ead9; }
.codex-item .cx-desc { font-size: 9.5px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.codex-item .cx-tag { font-size: 8.5px; color: var(--gold); margin-top: 2px; display: block; }

/* 출정권 */
.ticket-rows { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.option-row {
  display: grid; grid-template-columns: 42px 1fr 14px;
  align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(120, 200, 255, .2);
  background: rgba(12, 18, 32, .8);
  text-align: left;
}
.option-row.pass { border-color: rgba(169, 124, 255, .32); }
.option-ico { font-size: 22px; text-align: center; }
.option-txt { display: flex; flex-direction: column; gap: 2px; }
.option-txt b { font-size: 12.5px; color: #eef6ff; }
.option-txt b em { color: var(--gold); margin-left: 4px; }
.option-txt em { font-size: 10px; color: var(--muted); }
.option-go { color: rgba(170, 200, 230, .6); font-size: 18px; }
.option-row:active { transform: scale(.99); }

/* 패스 */
.pass-features { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 6px; }
.pass-features li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 8px 11px;
  border-radius: 9px;
  background: rgba(40, 30, 70, .35);
  border: 1px solid rgba(169, 124, 255, .18);
}
.pass-features b { font-size: 12px; color: #efe6ff; font-family: var(--font-serif); }
.pass-features span { font-size: 10px; color: var(--muted); }
.pass-price { margin: 4px 0 0; font-family: var(--font-serif); font-size: 20px; font-weight: 900; color: var(--gold); }
.pass-price small { display: block; font-family: var(--font-sans); font-size: 9.5px; font-weight: 500; color: rgba(160, 180, 205, .7); margin-top: 3px; }
.pass-actions { display: flex; gap: 7px; margin-top: 12px; }
.pass-actions .btn { flex: 1; }
.pass-state { margin: 8px 0 0; font-size: 10.5px; color: #8ff0c6; text-align: center; }

/* 광고 */
.ad-card { width: min(360px, 100%); text-align: center; }
.ad-card h3 { font-family: var(--font-serif); margin: 4px 0 10px; font-size: 21px; }
.ad-screen {
  height: 96px; border-radius: 10px;
  display: grid; place-items: center;
  font-family: var(--font-serif); font-size: 26px; font-weight: 900; color: #ffe9b8;
  background: repeating-linear-gradient(45deg, rgba(60, 40, 10, .55) 0 12px, rgba(30, 20, 6, .55) 12px 24px);
  border: 1px solid rgba(255, 205, 120, .3);
  margin-bottom: 10px;
}
.ad-progress { height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; margin-bottom: 10px; }
.ad-progress i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, #ffcf82, #ffe9c0); transition: width .1s linear; }
.ad-card .btn { width: 100%; margin-top: 10px; }

/* 기사회생 / 결과 */
.revive-card { border-color: rgba(255, 205, 120, .4); }
.revive-card h3 { color: var(--gold); }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 12px 0 4px; }
.result-grid div {
  padding: 9px 11px; border-radius: 9px;
  background: rgba(12, 18, 32, .7);
  border: 1px solid rgba(120, 200, 255, .12);
  display: flex; flex-direction: column; gap: 2px;
}
.result-grid span { font-size: 9px; color: var(--muted); }
.result-grid b { font-size: 16px; color: #f2f7ff; font-variant-numeric: tabular-nums; }
.reward-note { margin: 10px 0 0; font-size: 10px; color: var(--gold); text-align: center; }
.victory-card { border-color: rgba(255, 205, 120, .45); }
.victory-card h3 { color: #ffe7b5; }
.victory-card .result-grid b { color: #ffe2ac; }

/* 토스트 */
.toast-wrap {
  position: fixed; left: 50%; bottom: calc(84px + var(--safe-b));
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  z-index: 60; pointer-events: none;
}
.toast {
  padding: 8px 14px;
  max-width: min(340px, calc(100vw - 36px));
  white-space: normal;
  text-align: center;
  line-height: 1.35;
  font-size: 11.5px;
  border-radius: 999px;
  border: 1px solid rgba(255, 215, 150, .45);
  background: rgba(20, 16, 10, .92);
  color: #ffe9c8; font-size: 12px; font-weight: 700;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .5);
  animation: toastIn .3s ease, toastOut .4s ease 1.7s forwards;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(8px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-6px); } }

/* ══ 데스크톱/가로 ══ */
@media (min-width: 900px) {
  .brand-txt strong { font-size: 17px; }
  .chip-label { display: inline; }
  .hero-title { padding-left: 48px; margin-top: 18px; }
  .lobby-bottom {
    flex-direction: row;
    align-items: flex-end;
    gap: 14px;
    padding: 16px 48px 26px;
  }
  .stage-card { flex: 1; padding: 14px 16px; }
  .lobby-actions { width: 400px; flex: none; }
  .cta { height: 60px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: 12px 10px 14px;
    gap: 6px;
  }
  .card .card-top { justify-content: center; }
  .card .card-key { position: absolute; top: 8px; right: 8px; }
  .card .card-body { text-align: center; }
  .codex-grid { grid-template-columns: 1fr 1fr 1fr; }
  .modal-card { padding: 22px 24px 20px; }
  .build-tag { right: 24px; bottom: 8px; }
}

@media (max-width: 430px) {
  .brand-txt em { display: none; }
}

@media (max-width: 380px) {
  .brand-txt em { display: none; }
  .brand-txt strong { font-size: 13.5px; }
  .chip-label { display: none; }
  .cta-main { font-size: 22px; }
  .hero-title h1 { font-size: 32px; }
}

@media (max-height: 700px) {
  .hero-title h1 { font-size: clamp(28px, 7.6vw, 40px); }
  .tagline { font-size: 11px; }
  .stage-card { padding: 9px 12px 8px; }
  .stage-name { font-size: 18px; }
  .cta { height: 52px; }
  .cta-main { font-size: 21px; }
  .daily-btn { height: 30px; }
  .lobby-nav button { height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .cta-sheen, .burst-btn.is-ready, .relic-slot.is-ready { animation: none; }
}

/* ══ 영어판 타이포그래피 ══ */
body.lang-en .hero-title h1 { font-size: clamp(25px, 7.2vw, 52px); letter-spacing: -.02em; }
body.lang-en .brand-txt strong { font-size: 10.5px; letter-spacing: .03em; }
body.lang-en .daily-btn { font-size: 9.5px; }
body.lang-en .cta-main { font-size: 20px; letter-spacing: .1em; padding-left: .1em; }
body.lang-en .stage-name { font-size: 19px; }
body.lang-en .zone-name { font-size: 11.5px; }
body.lang-en .zone-card { max-width: min(78%, 300px); }
body.lang-en .chip-label { display: none; }
body.lang-en .daily-btn { font-size: 10px; }
body.lang-en .daily-btn { font-size: 10px; }
body.lang-en .lobby-nav button { font-size: 10.5px; }
body.lang-en .modal-head h3 { font-size: 21px; }
body.lang-en .card .card-name { font-size: 14px; }

@media (max-width: 380px) {
  body.lang-en .hero-title h1 { font-size: 22px; }
  .zone-card { max-width: 72%; }
  body.lang-en .zone-name { font-size: 10.5px; }
}

/* ══ 도감 · 나의 궤적(My Trail) ══ */
.codex-grid.is-trail {
  grid-template-columns: 1fr;
  gap: 9px;
}
.trail-city {
  padding: 11px 13px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 205, 120, .26);
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(255, 190, 90, .13), transparent 62%),
    linear-gradient(150deg, rgba(30, 24, 16, .9), rgba(10, 12, 22, .92));
  box-shadow: inset 0 1px 0 rgba(255, 230, 180, .14);
}
.trail-city-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.trail-eyebrow {
  margin: 0; font-size: 8px; font-weight: 800;
  letter-spacing: .22em; color: rgba(255, 207, 130, .72);
}
.trail-city-name {
  margin: 2px 0 0;
  font-family: var(--font-serif); font-weight: 900;
  font-size: 16px; letter-spacing: -.01em; color: #f6efdf;
}
.trail-city-count {
  flex: none; padding-top: 1px;
  font-size: 10px; color: rgba(190, 205, 225, .78);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.trail-city-count b { font-size: 17px; color: var(--gold); margin-right: 1px; }
.trail-city-count em {
  display: block; margin-top: 1px; font-style: normal;
  font-size: 8.5px; color: rgba(160, 185, 215, .7); text-align: right;
}
.trail-bar {
  height: 5px; margin-top: 9px; border-radius: 99px;
  background: rgba(120, 170, 220, .14); overflow: hidden;
}
.trail-bar i {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #ffd089, #ffb45e);
  box-shadow: 0 0 10px rgba(255, 190, 90, .55);
  transition: width .3s ease;
}

.trail-path { list-style: none; margin: 0; padding: 0; }
.trail-node {
  position: relative;
  display: block;
  padding: 6px 0 10px 34px;
  --ta: 255, 196, 110;
}
.trail-rail {
  position: absolute; left: 10px; top: 0; bottom: 0;
  width: 0; border-left: 1.5px dashed rgba(130, 165, 205, .28);
}
.trail-rail.is-first { top: 15px; }
.trail-path .trail-node:last-child .trail-rail { bottom: auto; height: 16px; }
.trail-rail.is-solid {
  border-left: 2px solid rgba(255, 196, 110, .72);
  box-shadow: 0 0 9px rgba(255, 190, 90, .32);
}
.trail-rail.is-frontier { border-left: 1.5px dashed rgba(255, 200, 120, .62); }
.trail-dot {
  position: absolute; left: 3px; top: 8px;
  width: 15px; height: 15px; border-radius: 50%;
}
.trail-node.is-lit .trail-dot {
  background: radial-gradient(circle at 34% 30%, #fff8ea, rgb(var(--ta)) 58%, rgba(var(--ta), .5));
  box-shadow: 0 0 13px rgba(var(--ta), .8), 0 0 0 3px rgba(var(--ta), .15);
}
.trail-node.is-dim .trail-dot {
  background: rgba(8, 12, 22, .92);
  border: 1.5px solid rgba(130, 165, 205, .42);
}
.trail-body {
  min-width: 0;
  display: grid; grid-template-columns: 1fr auto;
  align-items: center; column-gap: 7px;
}
.trail-name {
  grid-column: 1; margin: 0;
  font-family: var(--font-serif); font-weight: 700;
  font-size: 12.5px; line-height: 1.25; color: #eef3fb;
}
.trail-node.is-dim .trail-name { color: rgba(158, 180, 208, .74); }
.trail-tag {
  grid-column: 2; justify-self: end;
  font-size: 8px; font-weight: 800; letter-spacing: .05em;
  padding: 1px 6px; border-radius: 99px;
  border: 1px solid rgba(130, 165, 205, .3); color: rgba(150, 175, 205, .8);
  white-space: nowrap;
}
.trail-tag.is-lit {
  color: #2a1a06;
  background: linear-gradient(180deg, #ffe0a6, #ffbf66);
  border-color: rgba(255, 220, 160, .85);
  box-shadow: 0 0 10px rgba(255, 190, 90, .35);
}
.trail-meta {
  grid-column: 1 / -1; margin: 3px 0 0;
  font-size: 9.5px; line-height: 1.4;
  color: rgba(150, 175, 205, .72);
  font-variant-numeric: tabular-nums;
}
.trail-node.is-lit .trail-meta { color: rgba(255, 214, 150, .82); }

.trail-runs {
  padding: 10px 12px 11px;
  border-radius: 12px;
  border: 1px solid rgba(120, 200, 255, .16);
  background: rgba(10, 15, 28, .72);
}
.trail-sec-title {
  margin: 0 0 7px; font-size: 9px; font-weight: 800;
  letter-spacing: .16em; color: rgba(150, 205, 235, .8);
}
.trail-run-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.trail-run {
  padding: 6px 8px 7px; border-radius: 8px;
  background: rgba(16, 22, 38, .8);
  border-left: 2px solid rgba(120, 200, 255, .25);
}
.trail-run .tr-top { display: flex; align-items: center; gap: 6px; }
.tr-when { flex: none; font-size: 8.5px; color: rgba(145, 170, 200, .7); font-variant-numeric: tabular-nums; }
.tr-where {
  flex: 1; min-width: 0;
  font-size: 10.5px; font-weight: 700; color: #dfe9f6;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tr-res { flex: none; font-size: 8px; font-weight: 800; padding: 1px 5px; border-radius: 99px; }
.tr-res.is-win { color: #1a1206; background: linear-gradient(180deg, #ffe2ab, #ffc169); }
.tr-res.is-lose {
  color: rgba(190, 205, 225, .85);
  background: rgba(90, 110, 140, .3);
  border: 1px solid rgba(140, 165, 200, .28);
}
.tr-meta { margin: 2px 0 0; font-size: 9px; color: rgba(150, 175, 205, .72); font-variant-numeric: tabular-nums; }
.trail-empty {
  margin: 0; padding: 10px 4px 8px; text-align: center;
  font-size: 10px; line-height: 1.5; color: rgba(150, 175, 205, .65);
}

/* 도감 탭이 4개가 되어 좁은 화면에서는 머리줄이 접힌다 */
@media (max-width: 520px) {
  .modal-head.row { flex-wrap: wrap; }
  .modal-head.row .tabs { margin-top: 2px; }
}
/* 도감은 머리/발치를 고정하고 목록만 스크롤한다(나의 궤적처럼 길어져도 닫기 버튼이 항상 보임) */
#modal-codex .modal-card { display: flex; flex-direction: column; overflow: hidden; }
#modal-codex .modal-head { flex: none; }
#modal-codex #codexGrid {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
  align-content: start;
  padding-right: 2px;
  padding-bottom: 20px;
  scrollbar-width: thin;
}
#modal-codex .codex-fade {
  flex: none; height: 26px; margin-top: -26px;
  pointer-events: none; opacity: 0;
  transition: opacity .18s ease;
  background: linear-gradient(to bottom, rgba(9, 12, 22, 0), rgba(8, 11, 20, .94));
}
#modal-codex .codex-fade.is-on { opacity: 1; }
#modal-codex .codex-fade-top {
  margin-top: 0; margin-bottom: -26px;
  background: linear-gradient(to top, rgba(9, 12, 22, 0), rgba(8, 11, 20, .94));
}
#modal-codex .modal-foot { flex: none; }
body.lang-en .tab { padding: 4px 8px; font-size: 10px; }
body.lang-en .trail-name { font-size: 12px; }
body.lang-en .trail-city-name { font-size: 15px; }


/* ══════════════════════════════════════════════════════════════════
   퇴마 헌터: 월드 — 도시 선택 · 궤적 요약 · 네임드 게임 타이포
   ══════════════════════════════════════════════════════════════════ */

/* ── 8개 대도시 선택 (가로 스크롤 칩) ── */
.city-picker {
  width: 100%;
  max-width: 1040px;
  align-self: center;
  padding: 6px 0 2px;
  margin-top: 8px;
  mask-image: linear-gradient(to right, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
}
.city-track {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 14px 6px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.city-track::-webkit-scrollbar { display: none; }
.city-chip {
  flex: none;
  scroll-snap-align: center;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 7px;
  min-width: 104px;
  padding: 6px 9px 6px 8px;
  border-radius: 11px;
  border: 1px solid rgba(120, 160, 200, .20);
  background: linear-gradient(160deg, rgba(14, 20, 36, .82), rgba(7, 10, 20, .88));
  backdrop-filter: blur(8px);
  transition: border-color .18s, box-shadow .18s, transform .12s;
}
.city-chip:active { transform: scale(.97); }
.city-glyph {
  grid-row: span 2;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 8px;
  font-family: var(--font-serif);
  font-size: 15px; font-weight: 900;
  color: rgba(150, 220, 255, .85);
  border: 1px solid rgba(120, 205, 255, .24);
  background: rgba(20, 40, 64, .55);
}
.city-txt { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.city-name {
  font-family: var(--font-serif);
  font-size: 12px; font-weight: 900; letter-spacing: -.01em;
  color: #eef3fa; white-space: nowrap;
}
.city-en {
  font-family: var(--font-hud);
  font-size: 7.5px; letter-spacing: .14em;
  color: rgba(150, 185, 220, .55); white-space: nowrap;
}
.city-badge {
  justify-self: end;
  font-family: var(--font-hud);
  font-size: 9px; font-weight: 700;
  letter-spacing: .04em;
  color: rgba(160, 190, 220, .65);
}
.city-chip.is-done .city-badge { color: var(--gold); }
.city-chip.is-active {
  border-color: rgba(120, 230, 255, .62);
  box-shadow: 0 0 0 1px rgba(120, 230, 255, .25), 0 0 20px rgba(70, 200, 255, .20), inset 0 0 18px rgba(60, 170, 230, .12);
  background: linear-gradient(160deg, rgba(22, 46, 70, .92), rgba(9, 14, 28, .92));
}
.city-chip.is-active .city-glyph { color: #d8f6ff; border-color: rgba(150, 240, 255, .6); }
.city-chip.is-active .city-name { color: #fff; }

/* ── 나의 궤적 · 8개 도시 요약 ── */
.trail-summary { margin: 0 0 12px; }
.trail-sum-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; margin-bottom: 6px;
}
.trail-sum-head .trail-sec-title { margin: 0; }
.trail-sum-total {
  font-family: var(--font-hud);
  font-size: 11px; font-weight: 700; color: var(--gold);
  letter-spacing: .04em;
}
.trail-sum-total em { font-size: 8px; letter-spacing: .1em; color: rgba(160, 185, 215, .6); margin-left: 3px; }
.trail-sum-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.trail-sum-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 7px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(120, 160, 200, .18);
  background: rgba(13, 18, 32, .72);
  text-align: left;
  transition: border-color .18s, box-shadow .18s;
}
.ts-glyph {
  grid-row: span 2;
  font-family: var(--font-serif);
  font-size: 14px; font-weight: 900;
  color: rgba(150, 220, 255, .8);
}
.ts-name {
  font-family: var(--font-serif);
  font-size: 11px; font-weight: 700; color: #e8eef8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ts-count { font-family: var(--font-hud); font-size: 9.5px; color: rgba(160, 190, 220, .7); }
.ts-count b { color: #fff; font-size: 11px; }
.ts-bar {
  grid-column: 2 / span 2;
  height: 2px; border-radius: 2px;
  background: rgba(120, 160, 200, .16);
  overflow: hidden;
}
.ts-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, rgba(120, 230, 255, .85), var(--gold)); }
.trail-sum-card.is-active {
  border-color: rgba(120, 230, 255, .55);
  box-shadow: 0 0 0 1px rgba(120, 230, 255, .18), 0 0 14px rgba(70, 200, 255, .16);
  background: rgba(18, 30, 48, .86);
}
.trail-sum-card.is-done .ts-count b { color: var(--gold); }

/* ── 네임드 게임 타이포: 영문 디스플레이 세리프 ── */
body.lang-en .brand-txt strong,
body.lang-en .hero-title h1,
body.lang-en .stage-name,
body.lang-en .zone-name,
body.lang-en .modal-head h3,
body.lang-en .trail-city-name,
body.lang-en .trail-sum-card .ts-name,
body.lang-en .city-chip .city-name,
body.lang-en .pass-features b,
body.lang-en .result-grid b { font-family: var(--font-display); }

body.lang-en .hero-title h1 { letter-spacing: .005em; }
body.lang-en .eyebrow { letter-spacing: .3em; font-weight: 700; }
body.lang-en .brand-txt strong { letter-spacing: .06em; font-size: 9.5px; }
body.lang-en .stage-name { letter-spacing: .02em; }

/* HUD·숫자·도시 태그는 테크노 산세리프 */
.timer, .lvl-badge, .hud-sub, .hud-sub span, .chip b, .stage-meta b,
.zone-eyebrow, .zone-count, .burst-core b, .build-tag, .city-tag,
.stage-tag, .speed-label, .result-grid b, .res-num {
  font-family: var(--font-hud);
  font-variant-numeric: tabular-nums;
}
.brand-txt strong { font-family: var(--font-serif); }
.burst-core b { letter-spacing: .08em; }

/* ══════════════════════════════════════════════════════════════════
   v2.3 — 오늘의 현상수배 · 퇴마 비보함 · 월드 퇴마 전적표
   ══════════════════════════════════════════════════════════════════ */

/* ── 오늘의 현상수배: 스테이지 카드 배지 · 도시 칩 리본 ── */
.wanted-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px 2px 6px; border-radius: 999px;
  font-size: 9.5px; font-weight: 800; letter-spacing: .08em;
  color: #ffe0a0; white-space: nowrap;
  border: 1px solid rgba(255, 150, 90, .55);
  background: linear-gradient(100deg, rgba(140, 26, 34, .78), rgba(170, 104, 26, .78));
  box-shadow: 0 0 12px rgba(255, 120, 60, .28);
}
.wanted-tag b { font-family: var(--font-hud); font-size: 9.5px; letter-spacing: .04em; }
.wanted-flame { display: inline-grid; place-items: center; color: #ffd08a; animation: wantedFlame 1.8s ease-in-out infinite; }
@keyframes wantedFlame {
  0%, 100% { opacity: .7; transform: scale(.94); }
  50% { opacity: 1; transform: scale(1.1); }
}

.city-chip { position: relative; }
.city-chip.is-wanted {
  border-color: rgba(255, 140, 80, .78);
  box-shadow: 0 0 0 1px rgba(255, 140, 80, .28), 0 0 16px rgba(255, 110, 60, .22);
}
.city-chip.is-wanted .city-glyph { color: #ffdca0; border-color: rgba(255, 170, 90, .6); }
.city-wanted {
  grid-column: 1 / -1;
  margin-top: 3px;
  text-align: center;
  font-family: var(--font-hud);
  font-size: 7.5px; font-weight: 800; letter-spacing: .08em;
  color: #ffe6bc;
  padding: 1px 0 2px;
  border-radius: 5px;
  background: linear-gradient(100deg, rgba(132, 22, 30, .85), rgba(170, 104, 24, .88));
}

/* ── 로비 내비: 비보함 버튼(4개 한 줄) ── */
.lobby-nav button { min-width: 0; padding: 0 4px; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lobby-nav .nav-vault {
  position: relative;
  border-color: rgba(255, 205, 120, .34);
  color: #ffe5b8;
  background: linear-gradient(160deg, rgba(48, 36, 14, .6), rgba(9, 12, 22, .7));
}
.lobby-nav .nav-vault span:first-child { color: var(--gold); font-family: var(--font-serif); }
.lobby-nav .nav-vault.has-free::after {
  content: attr(data-free);
  position: absolute; top: 2px; right: 3px;
  min-width: 11px; height: 11px; padding: 0 2px;
  display: grid; place-items: center;
  border-radius: 999px;
  font-family: var(--font-hud); font-size: 7px; font-weight: 800; color: #241603;
  background: linear-gradient(180deg, #ffe2a8, #e8b96a);
  box-shadow: 0 0 8px rgba(255, 200, 120, .6);
}
@media (max-width: 430px) {
  .lobby-nav button { font-size: 9.5px; gap: 3px; }
  body.lang-en .lobby-nav button { font-size: 9.5px; }
}

/* ── 퇴마 비보함 ── */
#modal-vault .modal-card { width: min(560px, 100%); }
.vault-slots {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px; margin-top: 10px;
}
.vault-slot {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto;
  align-items: center; column-gap: 5px;
  padding: 6px 6px 5px; min-height: 48px;
  border-radius: 10px;
  border: 1px dashed rgba(130, 170, 220, .26);
  background: rgba(10, 15, 28, .6);
}
.vault-slot.is-on { border-style: solid; border-color: rgba(255, 205, 120, .42); background: rgba(28, 22, 12, .5); }
.vault-slot.rarity-rare.is-on { border-color: rgba(190, 150, 255, .5); }
.vault-slot.rarity-legend.is-on { border-color: rgba(255, 205, 120, .65); box-shadow: 0 0 12px rgba(255, 190, 90, .2) inset; }
.vs-icon { grid-row: span 2; width: 34px; height: 34px; display: grid; place-items: center; }
.vs-name { font-size: 9.5px; color: #e6eef8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-lv { font-family: var(--font-hud); font-size: 8.5px; color: var(--gold); }
.vs-empty { color: rgba(150, 180, 210, .32); font-family: var(--font-hud); font-size: 15px; }
.vault-sum {
  grid-column: 1 / -1; margin: 2px 0 0;
  font-size: 9.5px; line-height: 1.5; color: rgba(170, 200, 230, .82);
}

.vault-pulls { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 6px; margin-top: 9px; }
.vault-pull {
  height: 46px; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border-radius: 11px;
  border: 1px solid rgba(130, 170, 220, .24);
  background: rgba(8, 12, 24, .72);
  color: #dbe8f8; font-size: 10.5px; font-weight: 700;
  white-space: nowrap; overflow: hidden;
}
.vault-pull b { font-family: var(--font-hud); font-size: 9.5px; color: var(--gold); }
.vault-pull .vp-cost { font-family: var(--font-hud); font-size: 11px; letter-spacing: .02em; }
.vault-pull.free { border-color: rgba(120, 230, 255, .38); color: #d6f6ff; }
.vault-pull.free.is-spent { opacity: .42; }
.vault-pull.one { border-color: rgba(255, 205, 120, .42); color: #ffe9c4; }
.vault-pull.ten { border-color: rgba(190, 150, 255, .45); color: #efe4ff; }
.vault-pull.is-short { opacity: .5; }
.vault-pull:active { transform: scale(.985); }

.vault-shard {
  display: flex; align-items: center; gap: 6px;
  margin-top: 8px; font-size: 10px; color: #c9d8ea;
}
.vault-shard b { font-family: var(--font-hud); font-size: 11px; color: var(--gold); }
.vault-shard button {
  margin-left: auto; height: 26px; padding: 0 8px;
  border-radius: 7px; border: 1px solid rgba(150, 180, 220, .24);
  background: rgba(10, 16, 30, .7); color: #9fb4cc;
  font-size: 9px; font-weight: 700; white-space: nowrap;
}
.vault-shard button.is-ready { color: #ffe1a8; border-color: rgba(255, 205, 120, .5); }

.vault-grid { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; }
.vault-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center;
  padding: 6px 9px; border-radius: 10px;
  border: 1px solid rgba(120, 160, 200, .16);
  background: rgba(9, 14, 26, .66);
  box-shadow: inset 2px 0 0 rgba(150, 200, 255, .5);
}
.vault-item.rarity-rare { box-shadow: inset 2px 0 0 rgba(190, 150, 255, .6); }
.vault-item.rarity-legend { box-shadow: inset 2px 0 0 rgba(255, 205, 120, .75); }
.vault-item.locked { opacity: .5; }
.vault-item.is-equipped { border-color: rgba(255, 205, 120, .42); background: rgba(28, 22, 12, .52); }
.vi-icon { width: 38px; height: 38px; display: grid; place-items: center; }
.vi-lock { color: rgba(150, 180, 210, .35); font-family: var(--font-hud); font-size: 17px; }
.vi-body { min-width: 0; }
.vi-top { display: flex; align-items: center; gap: 6px; }
.vi-name { font-size: 11.5px; font-weight: 700; color: #eef5ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vi-rar {
  flex: none; font-family: var(--font-hud); font-size: 7.5px; letter-spacing: .08em;
  padding: 1px 5px; border-radius: 4px;
  background: rgba(120, 160, 200, .16); color: #9fb8d4;
}
.rarity-rare .vi-rar { color: #d9c6ff; background: rgba(140, 100, 220, .2); }
.rarity-legend .vi-rar { color: #ffe4ac; background: rgba(200, 150, 60, .22); }
.vi-fx { font-size: 9.5px; color: rgba(180, 205, 230, .85); margin-top: 1px; }
.vi-lv { display: flex; align-items: center; gap: 2px; margin-top: 3px; font-family: var(--font-hud); font-size: 8.5px; color: var(--gold); }
.vi-lv i { width: 5px; height: 5px; border-radius: 50%; background: rgba(150, 180, 215, .22); }
.vi-lv i.on { background: var(--gold); box-shadow: 0 0 6px rgba(255, 205, 120, .7); }
.vi-slots { display: flex; gap: 4px; margin-top: 4px; }
.vi-slots .tal-slot-btn {
  height: 20px; padding: 0 6px; border-radius: 6px;
  border: 1px solid rgba(140, 175, 215, .22);
  background: rgba(8, 12, 24, .6); color: #a8bdd6;
  font-size: 8.5px; font-weight: 700;
}
.vi-slots .tal-slot-btn.is-on {
  color: #241603; border-color: #ffe2a8;
  background: linear-gradient(180deg, #ffe2a8, #e8b96a);
}

/* ── 뽑기 결과 ── */
#modal-pull .modal-card { width: min(560px, 100%); }
.pull-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.pull-grid:not(.is-ten) { grid-template-columns: minmax(0, 220px); justify-content: center; }
.pull-item {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 9px 3px 8px;
  border-radius: 10px;
  border: 1px solid rgba(130, 170, 220, .2);
  background: rgba(9, 14, 26, .82);
  overflow: hidden;
  animation: pullIn .42s cubic-bezier(.2, .9, .3, 1) both;
}
.pull-grid.is-ten .pull-item:nth-child(2) { animation-delay: .05s; }
.pull-grid.is-ten .pull-item:nth-child(3) { animation-delay: .1s; }
.pull-grid.is-ten .pull-item:nth-child(4) { animation-delay: .15s; }
.pull-grid.is-ten .pull-item:nth-child(5) { animation-delay: .2s; }
.pull-grid.is-ten .pull-item:nth-child(6) { animation-delay: .25s; }
.pull-grid.is-ten .pull-item:nth-child(7) { animation-delay: .3s; }
.pull-grid.is-ten .pull-item:nth-child(8) { animation-delay: .35s; }
.pull-grid.is-ten .pull-item:nth-child(9) { animation-delay: .4s; }
.pull-grid.is-ten .pull-item:nth-child(10) { animation-delay: .45s; }
@keyframes pullIn {
  from { opacity: 0; transform: translateY(10px) scale(.9); }
  to { opacity: 1; transform: none; }
}
.pull-item.rarity-rare { border-color: rgba(190, 150, 255, .55); box-shadow: 0 0 18px rgba(150, 110, 255, .22); }
.pull-item.rarity-legend { border-color: rgba(255, 205, 120, .72); box-shadow: 0 0 26px rgba(255, 190, 90, .3); }
.pi-glow {
  position: absolute; inset: -40%; pointer-events: none;
  background: radial-gradient(circle at 50% 30%, rgba(255, 205, 120, .28), rgba(255, 205, 120, 0) 62%);
  opacity: 0;
}
.pull-item.rarity-rare .pi-glow { background: radial-gradient(circle at 50% 30%, rgba(190, 150, 255, .32), rgba(190, 150, 255, 0) 62%); opacity: 1; animation: piPulse 2.4s ease-in-out infinite; }
.pull-item.rarity-legend .pi-glow { background: radial-gradient(circle at 50% 30%, rgba(255, 205, 120, .4), rgba(255, 205, 120, 0) 62%); opacity: 1; animation: piPulse 1.8s ease-in-out infinite; }
@keyframes piPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.pi-icon { position: relative; width: 38px; height: 38px; }
.pull-grid:not(.is-ten) .pi-icon { width: 62px; height: 62px; }
.pi-name {
  position: relative; font-size: 8.5px; font-weight: 700; color: #eef5ff;
  text-align: center; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.pull-grid:not(.is-ten) .pi-name { font-size: 12.5px; margin-top: 2px; }
.pi-rar { position: relative; font-family: var(--font-hud); font-size: 7px; letter-spacing: .1em; color: rgba(160, 190, 220, .8); }
.pull-item.rarity-rare .pi-rar { color: #d9c6ff; }
.pull-item.rarity-legend .pi-rar { color: #ffe4ac; }
.pi-state {
  position: relative; margin-top: 1px; font-family: var(--font-hud);
  font-size: 7.5px; font-weight: 800; letter-spacing: .02em;
  padding: 1px 4px; border-radius: 4px;
  color: rgba(190, 214, 238, .85); background: rgba(120, 160, 200, .14);
}
.pi-state.is-new { color: #0d1a12; background: linear-gradient(180deg, #9cf5c8, #55c99a); }
.pi-state.is-up { color: #241603; background: linear-gradient(180deg, #ffe2a8, #e8b96a); }
.pi-state.is-shard { color: #d9e6f8; background: rgba(150, 180, 215, .2); }
.pull-grid:not(.is-ten) .pi-state { font-size: 10px; padding: 2px 8px; }

/* ── 월드 퇴마 전적표 ── */
#modal-record .modal-card { width: min(430px, 100%); }
.record-preview {
  margin: 10px auto 0;
  width: min(100%, 296px);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 205, 120, .38);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55), 0 0 22px rgba(255, 190, 90, .12);
  background: #05060e;
}
.record-preview canvas { display: block; width: 100%; height: auto; }
.record-actions { gap: 6px; }
.btn.record {
  border-color: rgba(255, 205, 120, .5);
  color: #ffe6b6;
  background: linear-gradient(160deg, rgba(70, 52, 18, .72), rgba(14, 14, 24, .9));
}
.wanted-bonus {
  margin: 8px 0 0; text-align: center;
  font-size: 10.5px; font-weight: 700; letter-spacing: .01em;
  color: #ffe0a0;
}
.trail-record-btn {
  width: 100%; height: 34px; margin: 2px 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 205, 120, .42);
  background: linear-gradient(160deg, rgba(60, 44, 16, .6), rgba(10, 12, 22, .86));
  color: #ffe3ae; font-size: 11px; font-weight: 700;
}
.trail-record-btn:active { transform: scale(.99); }

/* 모달 겹침 순서 — 비보함 위로 뽑기 결과·광고·전적표가 올라온다(DOM 순서와 무관하게) */
#modal-vault { z-index: 44; }
#modal-pull { z-index: 48; }
#modal-ad { z-index: 52; }
#modal-record { z-index: 56; }

.wanted-tag { cursor: pointer; font-family: inherit; }
.wanted-tag.is-hint {
  color: #ffd7a0;
  border-color: rgba(255, 170, 110, .38);
  background: linear-gradient(100deg, rgba(92, 22, 28, .6), rgba(120, 76, 22, .6));
  box-shadow: none;
}
.wanted-tag.is-hint .wanted-flame { animation-duration: 2.6s; }
.city-track { position: relative; }
