:root {
  --bg: #10131c;
  --bg-2: #171b25;
  --card: #202638;
  --card-2: #293046;
  --line: #3a435f;
  --text: #e8ecff;
  --muted: #9aa3c7;
  --accent: #8fb6ff;
  --accent-2: #68d8bd;
  --gold: #f4c96b;
  --paper: #efe5cf;
  --ink: #243043;
  --good: #56d364;
  --bad: #ff6b81;
  --bronze: #cd7f32;
  --silver: #c0c8d8;
  --r: 16px;
  --shadow: 0 8px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
body {
  background:
    linear-gradient(180deg, rgba(239,229,207,.08), transparent 38%),
    linear-gradient(135deg, #10131c 0%, #151a25 48%, #0d1018 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Pretendard", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 520px;
  margin: 0 auto;
  height: 100dvh;
  min-height: 100%;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* 헤더 */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  position: sticky; top: 0; z-index: 5;
  background: linear-gradient(180deg, var(--bg) 60%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; }
.brand-logo { width: 32px; height: 32px; object-fit: contain; filter: drop-shadow(0 5px 10px rgba(0,0,0,.35)); }
.install-btn {
  background: var(--accent); color: #0c1024; border: 0; font-weight: 700;
  padding: 8px 14px; border-radius: 999px; font-size: 13px; cursor: pointer;
}

/* 화면 */
.screen {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 6px 16px 26px;
}
.backbar {
  display:flex; align-items:center; gap:10px; margin:2px 0 12px;
  color:var(--muted); font-weight:800; font-size:13px;
}
.back-btn {
  width:40px; height:40px; border-radius:12px; border:1px solid var(--line);
  background:rgba(255,255,255,.04); color:var(--text); cursor:pointer;
  font-size:20px; line-height:1;
}

/* 탭바 */
.tabbar {
  position: relative;
  width: 100%;
  flex: none;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #161a2e;
  border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  z-index: 10;
}
.tabbar.coach-tabbar { z-index: 33; }
.tab {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-height: 48px; padding: 6px 0; font-size: 11px; border-radius: 12px; transition: .15s;
}
.tab-ico { width: 25px; height: 25px; display: grid; place-items: center; }
.tab-ico img { width: 25px; height: 25px; object-fit: contain; filter: saturate(.86) brightness(.78); }
.tab.active .tab-ico img { filter: saturate(1.12) brightness(1.08) drop-shadow(0 0 8px rgba(104,216,189,.34)); }
.tab.active { color: var(--accent); background: rgba(124,156,255,.1); }
button:focus-visible, [role="button"]:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent-2); outline-offset: 3px;
}

/* 공용 카드/패널 */
.panel {
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0)), var(--card);
  border: 1px solid var(--line);
  border-radius: 14px; padding: 16px; box-shadow: var(--shadow);
}
.section-title { font-size: 13px; color: var(--muted); margin: 18px 4px 8px; font-weight: 700; letter-spacing: .3px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* 대시보드 캐릭터 */
.hero {
  display: flex; gap: 14px; align-items: center;
  background:
    radial-gradient(circle at 20% 22%, rgba(143,182,255,.22), transparent 34%),
    linear-gradient(135deg, rgba(244,201,107,.12), rgba(104,216,189,.08)),
    linear-gradient(135deg, var(--card-2), var(--card));
  border: 1px solid var(--line); border-radius: var(--r); padding: 14px;
  overflow: hidden; min-height: 128px;
}
.hero .char { width: 84px; height: 100px; flex: none; }
.hero .char-asset {
  width: 108px; height: 120px; object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,.42));
  margin: -10px 0 -12px -8px;
}
.hero .meta { flex: 1; min-width: 0; }
.hero .lv { font-size: 22px; font-weight: 800; }
.hero .lv small { font-size: 13px; color: var(--muted); font-weight: 600; }
.xpbar { height: 12px; background: #0d1126; border-radius: 999px; overflow: hidden; margin-top: 8px; border: 1px solid var(--line); }
.xpbar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); width: 0; transition: width .6s; }
.xp-text { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* 통계 타일 */
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px; text-align: center;
}
.stat .num { font-size: 26px; font-weight: 800; }
.stat .lbl { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat .num.streak { color: var(--gold); }
.stat .num.due { color: var(--accent-2); }
.stat .num.credits { color: #94d8ff; }
.stat .num.seal { color: var(--silver); }

.home-stats, .action-panel, .strategy-panel, .utility-panel, .loadout-panel, .contract-panel,
.doctor-profile { margin-top: 9px; }
.home-stats { grid-template-columns:repeat(4, minmax(0, 1fr)); gap:8px; }
.home-stats .stat { padding:10px 5px; border-radius:12px; }
.home-stats .stat .num { font-size:22px; line-height:1; }
.home-stats .stat .lbl { font-size:10.5px; line-height:1.2; min-height:25px; }
.streak-rx-stat {
  border-color:rgba(244,201,107,.24); color:inherit; cursor:pointer; position:relative;
  overflow:hidden;
  background:linear-gradient(180deg, rgba(244,201,107,.11), rgba(20,24,38,.96));
}
.streak-rx-stat:disabled { cursor:default; }
.streak-rx-stat.ready {
  border-color:rgba(244,201,107,.62); box-shadow:0 0 0 1px rgba(244,201,107,.12) inset;
}
.streak-rx-stat.claimed { opacity:.78; }
.streak-stat-img {
  width:22px; height:22px; object-fit:cover; border-radius:7px;
  position:absolute; left:6px; top:6px; box-shadow:0 8px 18px rgba(0,0,0,.24);
}
.doctor-profile {
  padding:8px; border-color:rgba(148,216,255,.22);
  background:
    linear-gradient(135deg, rgba(148,216,255,.12), rgba(244,201,107,.05)),
    var(--card);
}
.doctor-profile-head, .doctor-profile-feature {
  display:grid; grid-template-columns:54px minmax(0, 1fr); gap:8px; align-items:center;
}
.doctor-profile-rank, .doctor-profile-title {
  width:54px; height:54px; object-fit:cover; border-radius:12px;
  border:1px solid rgba(255,255,255,.1); background:#101827;
}
.doctor-profile-head b, .doctor-profile-feature b {
  display:block; font-size:15px; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.doctor-profile-head span, .doctor-profile-feature small {
  display:block; color:var(--muted); font-size:11.5px; line-height:1.35; margin-top:2px;
  word-break:keep-all;
}
.doctor-profile-head i {
  display:block; height:7px; margin-top:7px; border-radius:999px; overflow:hidden;
  background:rgba(255,255,255,.08);
}
.doctor-profile-head u {
  display:block; height:100%; text-decoration:none; border-radius:999px;
  background:linear-gradient(90deg, var(--accent-2), var(--gold));
}
.doctor-profile-feature {
  margin-top:6px; padding:6px; border-radius:12px;
  background:rgba(244,201,107,.07); border:1px solid rgba(244,201,107,.18);
}
.career-rank-claim {
  width:100%; display:grid; grid-template-columns:38px minmax(0, 1fr) auto; gap:7px;
  align-items:center; margin-top:6px; padding:6px; border-radius:12px;
  border:1px solid rgba(244,201,107,.35);
  background:linear-gradient(135deg, rgba(244,201,107,.16), rgba(104,216,189,.07));
  color:var(--text); text-align:left; cursor:pointer;
}
.career-rank-claim-img {
  width:38px; height:38px; object-fit:cover; border-radius:10px;
  border:1px solid rgba(255,255,255,.1); background:#101827;
}
.career-rank-claim b, .career-rank-claim small, .career-rank-claim em { display:block; min-width:0; }
.career-rank-claim b { font-size:12.8px; line-height:1.12; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.career-rank-claim small { color:var(--muted); font-size:10.5px; line-height:1.18; margin-top:1px; }
.career-rank-claim em { color:var(--gold); font-size:10.6px; font-style:normal; line-height:1.1; margin-top:2px; }
.career-rank-claim strong { color:var(--gold); font-size:12px; }
.doctor-profile-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:5px; margin-top:6px; }
.doctor-profile-tile {
  min-width:0; min-height:72px; padding:5px 3px; text-align:center; border-radius:11px;
  background:rgba(255,255,255,.045); border:1px solid rgba(255,255,255,.08);
}
.doctor-profile-icon { width:30px; height:30px; object-fit:cover; border-radius:9px; }
.doctor-profile-icons {
  display:flex; justify-content:center; gap:2px; min-height:30px; align-items:center;
}
.doctor-profile-mini-icon {
  width:21px; height:21px; object-fit:cover; border-radius:7px;
  border:1px solid rgba(255,255,255,.08); background:#101827;
}
.doctor-profile-tile em, .doctor-profile-tile b, .doctor-profile-tile small { display:block; min-width:0; }
.doctor-profile-tile em { color:var(--accent-2); font-size:9.8px; font-style:normal; font-weight:900; margin-top:2px; }
.doctor-profile-tile b { font-size:10.8px; line-height:1.08; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.doctor-profile-tile small { color:var(--muted); font-size:9px; line-height:1.15; margin-top:1px; }
.doctor-profile-actions { display:grid; grid-template-columns:repeat(3, 1fr); gap:5px; margin-top:6px; }
.doctor-profile-actions button {
  min-height:31px; border:1px solid rgba(104,216,189,.28); border-radius:10px;
  background:rgba(104,216,189,.08); color:var(--text); font-weight:900;
}
.action-panel { padding:8px; }
.action-panel .cta { margin-top: 0; }
.action-primary { min-height: 40px; padding: 9px; }
.action-grid, .utility-grid { display:grid; gap:6px; margin-top:6px; }
.action-grid { display:flex; overflow-x:auto; padding-bottom:2px; }
.action-grid > * { flex:0 0 167px; }
.action-grid button, .utility-grid button {
  min-height:42px; border:1px solid rgba(104,216,189,.22); border-radius:12px;
  background:rgba(104,216,189,.055); color:var(--text); font-weight:800; cursor:pointer;
  font-size:12px; line-height:1.15; padding:6px 5px;
}
.specimen-home-strip {
  min-width:0; min-height:48px; display:grid; grid-template-columns:30px 1fr;
  align-items:center; gap:8px; margin-top:0; padding:8px 10px;
  border:1px solid rgba(123,168,255,.28); border-radius:12px;
  background:linear-gradient(135deg, rgba(123,168,255,.13), rgba(104,216,189,.06));
  color:var(--text); text-align:left; cursor:pointer;
}
.specimen-home-img {
  width:30px; height:30px; object-fit:cover; border-radius:9px; background:#101827;
}
.specimen-home-strip span { min-width:0; display:block; }
.specimen-home-strip b, .specimen-home-strip em { display:block; }
.specimen-home-strip b { font-size:12px; line-height:1.12; }
.specimen-home-strip em {
  color:var(--muted); font-size:10.2px; line-height:1.15; font-style:normal;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:2px;
}
.integration-home-strip {
  min-width:0; min-height:48px; display:grid; grid-template-columns:30px 1fr;
  align-items:center; gap:8px; margin-top:0; padding:8px 10px;
  border:1px solid rgba(244,201,107,.3); border-radius:12px;
  background:linear-gradient(135deg, rgba(244,201,107,.16), rgba(104,216,189,.07));
  color:var(--text); text-align:left; cursor:pointer;
}
.integration-home-img {
  width:30px; height:30px; object-fit:cover; border-radius:9px; background:#101827;
}
.integration-home-strip span { min-width:0; display:block; }
.integration-home-strip b, .integration-home-strip em { display:block; }
.integration-home-strip b { font-size:12px; line-height:1.12; }
.integration-home-strip em {
  color:var(--muted); font-size:10.2px; line-height:1.15; font-style:normal;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:2px;
}
.strategy-strip { display:flex; gap:6px; margin-top:6px; overflow-x:auto; padding-bottom:2px; }
.strategy-card {
  flex:0 0 167px; min-width:0; min-height:44px; display:grid; grid-template-columns:28px 1fr; gap:7px;
  align-items:center; padding:7px 8px;
  border:1px solid rgba(143,182,255,.18); border-radius:11px;
  background:rgba(143,182,255,.055); color:var(--text); text-align:left; cursor:pointer;
}
.strategy-card.active {
  border-color:rgba(244,201,107,.62);
  background:linear-gradient(145deg, rgba(244,201,107,.16), rgba(104,216,189,.07));
}
.strategy-card.ready {
  border-color:rgba(244,201,107,.72);
  box-shadow:0 0 0 1px rgba(244,201,107,.08) inset;
}
.strategy-card.claimed { opacity:.74; }
.strategy-img {
  width:28px; height:28px; object-fit:cover; border-radius:8px;
  background:#0d1423; border:1px solid rgba(255,255,255,.08);
}
.strategy-card b, .strategy-card em, .strategy-card i, .strategy-card small { display:block; }
.strategy-card b { font-size:11px; line-height:1.12; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.strategy-card em { color:var(--gold); font-size:9.8px; font-style:normal; line-height:1.14; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.strategy-card i {
  height:3px; margin-top:2px; border-radius:999px; overflow:hidden;
  background:rgba(255,255,255,.08);
}
.strategy-card u {
  display:block; height:100%; border-radius:999px; text-decoration:none;
  background:linear-gradient(90deg, var(--accent-2), var(--gold));
}
.strategy-card small {
  display:none;
}
@media (min-width: 900px) {
  #app { max-width:1120px; border-left:1px solid rgba(255,255,255,.07); border-right:1px solid rgba(255,255,255,.07); }
  .screen { padding:14px 28px 34px; }
  .action-grid, .strategy-strip { display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:8px; }
  .specimen-home-strip, .integration-home-strip { grid-column:auto; }
  .action-grid > * { flex:initial; }
  .strategy-card { flex:initial; }
  .dex-grid { grid-template-columns:repeat(5, 1fr); }
  .chapter-list { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; }
  .hospital-grid, .ward-grid, .territory-grid { grid-template-columns:repeat(3, minmax(0, 1fr)); }
}
.utility-grid { grid-template-columns:repeat(5, minmax(0, 1fr)); gap:5px; }
.utility-grid button {
  min-height:40px; border-radius:10px; padding:6px 3px;
  font-size:10.5px; line-height:1.15;
}
.utility-grid button:disabled { opacity:.45; cursor:default; }
.contract-panel { padding:13px; }
.contract-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:9px; }
.contract-head b { font-size:14px; }
.contract-head span { color:var(--muted); font-size:11.5px; }
.grand-round-card {
  width:100%; min-height:76px; display:grid; grid-template-columns:58px minmax(0, 1fr) 64px;
  align-items:center; gap:9px; margin-bottom:8px; padding:8px;
  border:1px solid rgba(244,201,107,.24); border-radius:12px;
  background:linear-gradient(135deg, rgba(244,201,107,.13), rgba(104,216,189,.07));
  color:var(--text); text-align:left; cursor:pointer;
}
.grand-round-card.ready {
  border-color:rgba(244,201,107,.58);
  box-shadow:0 0 0 1px rgba(244,201,107,.08) inset;
}
.grand-round-img {
  width:58px; height:58px; border-radius:10px; object-fit:cover;
  background:#111827; box-shadow:0 8px 16px rgba(0,0,0,.25);
}
.grand-round-card span { min-width:0; display:block; }
.grand-round-card b, .grand-round-card em, .grand-round-card small { display:block; }
.grand-round-card b { font-size:12.8px; line-height:1.25; }
.grand-round-card em, .grand-round-card small {
  color:var(--muted); font-size:10.7px; line-height:1.25; font-style:normal;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:2px;
}
.grand-round-card i {
  display:block; height:5px; border-radius:999px; overflow:hidden;
  background:rgba(255,255,255,.09); margin:6px 0 3px;
}
.grand-round-card u {
  display:block; height:100%; border-radius:999px;
  background:linear-gradient(90deg, var(--gold), var(--accent-2)); text-decoration:none;
}
.grand-round-card strong {
  min-height:48px; border-radius:10px; display:grid; place-items:center;
  background:rgba(12,16,36,.58); color:var(--gold); font-size:13px;
}
.grand-round-card strong small {
  color:var(--muted); font-size:9.5px; max-width:54px; text-align:center;
}
.contract-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; }
.contract-card {
  min-height:100px; display:grid; grid-template-rows:38px 1fr; gap:5px;
  border:1px solid rgba(143,182,255,.18); border-radius:12px;
  padding:8px 6px; background:rgba(143,182,255,.055);
  color:var(--text); text-align:center; cursor:pointer;
}
.contract-card:disabled { opacity:.72; cursor:default; }
.contract-card.ready { border-color:rgba(104,216,189,.58); background:rgba(104,216,189,.105); }
.contract-img {
  width:38px; height:38px; object-fit:cover; margin:0 auto; border-radius:9px;
}
.contract-card b, .contract-card em, .contract-card small { display:block; }
.contract-card b { font-size:12px; line-height:1.15; }
.contract-card em, .contract-card small { color:var(--muted); font-size:10.5px; line-height:1.2; font-style:normal; margin-top:3px; }
.contract-card.ready small { color:var(--accent-2); font-weight:900; }
.contract-card i { display:block; height:5px; border-radius:999px; overflow:hidden; background:rgba(255,255,255,.08); margin:6px 2px 2px; }
.contract-card u { display:block; height:100%; border-radius:999px; background:linear-gradient(90deg, var(--accent), var(--accent-2)); text-decoration:none; }
.contract-done-row {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  min-height:38px; border:1px solid rgba(104,216,189,.22); border-radius:11px;
  padding:8px 10px; background:rgba(104,216,189,.075);
}
.contract-done-row b { font-size:12.5px; }
.contract-done-row span { color:var(--muted); font-size:11px; white-space:nowrap; }
.build-line { display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-bottom:10px; }
.build-line b { font-size:15px; }
.build-line span { color:var(--muted); font-size:12px; white-space:nowrap; }
.quick-actions { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin-bottom:7px; }
.quick-actions button {
  min-height:38px; border:1px solid rgba(143,182,255,.24); border-radius:11px;
  background:rgba(143,182,255,.08); color:var(--text); font-weight:800; cursor:pointer;
}
.loadout-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(112px, 1fr)); gap:9px; }
.loadout-slot {
  min-height:146px; padding:10px 7px; text-align:center; border-radius:12px;
  background:linear-gradient(180deg, rgba(239,229,207,.08), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.08); color:var(--text); cursor:pointer;
}
.loadout-img { width:58px; height:58px; object-fit:contain; display:block; margin:0 auto 5px; }
.loadout-slot b { display:block; font-size:12.5px; line-height:1.25; }
.loadout-slot span, .loadout-slot small {
  display:block; color:var(--muted); font-size:11.5px; line-height:1.3; margin-top:3px;
}
.loadout-slot em {
  display:inline-block; margin-top:6px; padding:3px 7px; border-radius:999px;
  color:#08122a; background:var(--accent-2); font-style:normal; font-size:11px; font-weight:800;
}
.skill-row { display:grid; gap:8px; margin-top:10px; }
.skill-chip {
  width:100%; min-height:56px; display:flex; align-items:center; gap:10px; text-align:left;
  border:1px solid rgba(104,216,189,.22); border-radius:12px; padding:8px 10px;
  background:rgba(104,216,189,.055); color:var(--text); cursor:pointer;
}
.skill-img { width:40px; height:40px; object-fit:contain; flex:none; }
.skill-chip b { display:block; font-size:13px; }
.skill-chip em { display:block; color:var(--muted); font-style:normal; font-size:11.5px; margin-top:2px; }
.skill-chip small, .skill-chip i { display:block; color:var(--muted); font-style:normal; font-size:12px; line-height:1.3; }
.compact-loadout .quick-actions { margin-bottom:8px; }
.set-bonus-strip {
  display:flex; align-items:center; gap:10px; margin:8px 0 10px; padding:8px;
  border:1px solid rgba(143,182,255,.18); border-radius:12px;
  background:linear-gradient(135deg, rgba(143,182,255,.08), rgba(244,201,107,.06));
}
.set-bonus-strip.ready {
  border-color:rgba(244,201,107,.38);
  box-shadow:0 0 0 1px rgba(244,201,107,.05) inset;
}
.set-bonus-img {
  width:48px; height:48px; flex:none; border-radius:10px; object-fit:cover;
  background:#111827;
}
.set-bonus-strip span { min-width:0; display:block; flex:1; }
.set-bonus-strip b { display:block; font-size:12.5px; line-height:1.25; }
.set-bonus-strip small {
  display:block; color:var(--muted); font-size:11.2px; line-height:1.25; margin-top:2px;
}
.set-bonus-strip i {
  display:block; height:5px; margin-top:6px; border-radius:999px; overflow:hidden;
  background:rgba(255,255,255,.08);
}
.set-bonus-strip u {
  display:block; height:100%; border-radius:inherit;
  background:linear-gradient(90deg, var(--accent), var(--gold)); text-decoration:none;
}
.compact-loadout .set-bonus-strip { margin:4px 0 7px; padding:5px 6px; gap:7px; }
.compact-loadout .set-bonus-img { width:34px; height:34px; border-radius:8px; }
.compact-loadout .set-bonus-strip b { font-size:11.5px; }
.compact-loadout .set-bonus-strip small { font-size:10.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.compact-loadout .set-bonus-strip i { display:none; }
.compact-loadout .loadout-mini, .compact-loadout .skill-mini { min-height:52px; padding:4px 4px; }
.loadout-mini-grid, .skill-mini-grid {
  display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:6px;
}
.skill-mini-grid { margin-top:6px; }
.loadout-mini, .skill-mini {
  min-width:0; min-height:72px; display:grid; place-items:center; gap:4px;
  border-radius:12px; border:1px solid rgba(255,255,255,.08);
  background:linear-gradient(180deg, rgba(239,229,207,.07), rgba(255,255,255,.02));
  color:var(--text); cursor:pointer; padding:7px 5px;
}
.loadout-mini.active { border-color:rgba(244,201,107,.5); background:rgba(244,201,107,.08); }
.loadout-mini-img, .skill-mini-img { width:30px; height:30px; object-fit:contain; }
.loadout-mini span, .skill-mini span {
  max-width:100%; font-size:11.5px; line-height:1.15; font-weight:800;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.inventory-panel, .skills-panel, .equip-summary, .tactic-panel { margin-top:10px; }
.tactic-panel {
  display:grid; grid-template-columns:68px minmax(0, 1fr); gap:12px; align-items:center;
  padding:12px; border-color:rgba(244,201,107,.28);
  background:linear-gradient(145deg, rgba(244,201,107,.12), rgba(104,216,189,.07));
}
.skill-tactic {
  border-color:rgba(104,216,189,.32);
  background:linear-gradient(145deg, rgba(104,216,189,.11), rgba(143,182,255,.07));
}
.tactic-img {
  width:68px; height:68px; object-fit:contain; border-radius:12px; padding:5px;
  background:rgba(255,255,255,.045); border:1px solid rgba(255,255,255,.08);
}
.tactic-panel b, .tactic-panel span, .tactic-panel small { display:block; }
.tactic-panel b { font-size:16px; line-height:1.2; }
.tactic-panel span, .tactic-panel small { color:var(--muted); font-size:12px; line-height:1.35; margin-top:3px; }
.tactic-panel button {
  width:100%; min-height:34px; margin-top:9px; border:1px solid rgba(244,201,107,.34);
  border-radius:10px; background:rgba(244,201,107,.12); color:var(--gold); font-weight:900;
}
.skill-tactic button { border-color:rgba(104,216,189,.34); background:rgba(104,216,189,.12); color:var(--accent-2); }
.tactic-panel button:disabled { opacity:.48; cursor:not-allowed; }
.inventory-grid { grid-template-columns:1fr; }
.inventory-card {
  min-height:122px; display:grid; grid-template-columns:72px minmax(0, 1fr); gap:10px;
  align-items:center; text-align:left; border:1px solid rgba(244,201,107,.22);
  border-radius:14px; padding:12px; background:rgba(244,201,107,.055);
  color:var(--text);
}
.inventory-card .loadout-img { width:64px; height:64px; margin:0; grid-column:1; grid-row:1 / span 6; }
.inventory-card b { grid-column:2; font-size:15px; word-break:keep-all; }
.inventory-card span, .inventory-card small, .inventory-card i {
  grid-column:2; display:block; color:var(--muted); font-size:12.5px;
  line-height:1.35; font-style:normal; word-break:keep-all;
}
.inventory-card em {
  grid-column:2; justify-self:start; padding:4px 8px; border-radius:999px;
  background:var(--gold); color:#08122a; font-style:normal; font-weight:900; font-size:11px;
}
.gear-actions {
  grid-column:2; display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:2px;
}
.gear-actions button {
  min-height:36px; border:1px solid rgba(255,255,255,.12); border-radius:10px;
  background:rgba(255,255,255,.06); color:var(--text); font-weight:900;
}
.gear-actions button[data-upgrade-gear] {
  border-color:rgba(244,201,107,.35); background:rgba(244,201,107,.12); color:var(--gold);
}
.gear-actions button:disabled { opacity:.45; cursor:not-allowed; }
.skill-summary {
  color:var(--muted); font-weight:800; font-size:12.5px; margin-bottom:10px;
}
.skill-list { display:grid; gap:10px; }
.skill-card {
  width:100%; min-height:92px; display:flex; align-items:center; gap:12px; text-align:left;
  border:1px solid rgba(104,216,189,.25); border-radius:14px; padding:12px;
  background:linear-gradient(135deg, rgba(104,216,189,.09), rgba(143,182,255,.05));
  color:var(--text); cursor:pointer;
}
.skill-train-card {
  display:grid; grid-template-columns:52px minmax(0, 1fr); align-items:center; cursor:default;
}
.skill-train-card .skill-img { grid-column:1; grid-row:1 / span 2; width:46px; height:46px; }
.skill-train-card span { grid-column:2; min-width:0; }
.skill-card b { display:block; font-size:15px; }
.skill-card em, .skill-card small, .skill-card i {
  display:block; color:var(--muted); font-style:normal; font-size:12.5px; line-height:1.35; margin-top:2px;
}
.skill-actions { grid-column:2; margin-top:8px; }
.skill-actions button {
  width:100%; min-height:36px; border:1px solid rgba(104,216,189,.32);
  border-radius:10px; background:rgba(104,216,189,.12); color:var(--accent-2); font-weight:900;
  scroll-margin-bottom:120px;
}
.skill-actions button:disabled { opacity:.45; cursor:not-allowed; }
.skill-train-card:last-child { margin-bottom:38px; }
.skill-prep { margin-top:12px; }
.skill-prep p { margin:6px 0; font-weight:900; }
.skill-prep small { display:block; color:var(--muted); line-height:1.4; margin-bottom:10px; }
.equip-summary p { margin:6px 0; font-weight:800; }
.equip-summary small { color:var(--muted); line-height:1.45; }
.hospital-hero {
  padding:0; overflow:hidden;
  background:linear-gradient(145deg, rgba(104,216,189,.12), rgba(244,201,107,.06));
}
.hospital-art { display:block; width:100%; height:172px; object-fit:cover; object-position:center; }
.hospital-copy { padding:14px 16px 16px; }
.hospital-copy b { display:block; font-size:18px; line-height:1.25; }
.hospital-copy span { display:block; color:var(--muted); font-size:12.5px; line-height:1.45; margin-top:6px; }
.specialty-panel {
  margin-top:10px; padding:12px;
  background:linear-gradient(145deg, rgba(143,182,255,.1), rgba(244,201,107,.06));
}
.specialty-head { display:flex; justify-content:space-between; gap:10px; align-items:flex-end; }
.specialty-head b, .specialty-head small { display:block; }
.specialty-head b { font-size:16px; line-height:1.2; }
.specialty-head small { color:var(--muted); font-size:12px; line-height:1.35; margin-top:3px; }
.specialty-head em { color:var(--gold); font-style:normal; font-size:12px; font-weight:900; white-space:nowrap; }
.specialty-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; margin-top:10px; }
.specialty-card {
  display:grid; grid-template-columns:44px minmax(0, 1fr); gap:7px; align-items:center;
  min-height:76px; padding:8px; border:1px solid rgba(143,182,255,.18);
  border-radius:11px; background:rgba(7,12,24,.34); color:var(--text); text-align:left;
}
.specialty-card.active { border-color:rgba(244,201,107,.48); background:rgba(244,201,107,.12); }
.specialty-img { width:44px; height:44px; object-fit:cover; border-radius:9px; background:#101827; }
.specialty-card b, .specialty-card small, .specialty-card em { display:block; min-width:0; }
.specialty-card b { font-size:12.5px; line-height:1.15; }
.specialty-card small { color:var(--muted); font-size:10.5px; line-height:1.25; margin-top:2px; }
.specialty-card em { color:var(--accent-2); font-style:normal; font-size:10.8px; margin-top:3px; }
.specialty-mission {
  display:grid; grid-template-columns:48px minmax(0, 1fr) auto; gap:8px; align-items:center;
  width:100%; min-height:66px; margin-top:9px; padding:8px; border:1px solid rgba(104,216,189,.22);
  border-radius:12px; background:rgba(104,216,189,.07); color:var(--text); text-align:left;
}
.specialty-mission.ready { border-color:rgba(104,216,189,.55); box-shadow:0 0 0 1px rgba(104,216,189,.14) inset; }
.specialty-mission:disabled { opacity:.64; cursor:default; }
.specialty-mission-img { width:48px; height:48px; object-fit:cover; border-radius:10px; background:#101827; }
.specialty-mission b, .specialty-mission small, .specialty-mission em { display:block; min-width:0; }
.specialty-mission b { font-size:13px; line-height:1.15; }
.specialty-mission small { color:var(--muted); font-size:11px; line-height:1.3; margin-top:2px; }
.specialty-mission em { color:var(--gold); font-style:normal; font-size:11px; margin-top:2px; }
.specialty-mission i { display:block; height:5px; margin-top:5px; border-radius:99px; overflow:hidden; background:rgba(255,255,255,.08); }
.specialty-mission u { display:block; height:100%; border-radius:99px; background:linear-gradient(90deg,var(--gold),var(--accent-2)); text-decoration:none; }
.specialty-mission strong { color:var(--accent-2); font-size:11px; white-space:nowrap; }
.hospital-conference {
  display:grid; grid-template-columns:50px minmax(0, 1fr) auto; gap:8px; align-items:center;
  width:100%; min-height:64px; margin-top:8px; padding:8px;
  border:1px solid rgba(244,201,107,.2); border-radius:12px;
  background:linear-gradient(135deg, rgba(244,201,107,.09), rgba(104,216,189,.06));
  color:var(--text); text-align:left;
}
.hospital-conference.ready { border-color:rgba(244,201,107,.56); box-shadow:0 0 0 1px rgba(244,201,107,.13) inset; }
.hospital-conference:disabled { opacity:.72; cursor:default; }
.hospital-conference-img { width:50px; height:50px; object-fit:cover; border-radius:10px; background:#101827; }
.hospital-conference b, .hospital-conference em, .hospital-conference small { display:block; min-width:0; }
.hospital-conference b { font-size:13px; line-height:1.15; }
.hospital-conference em { color:var(--gold); font-size:10.8px; font-style:normal; margin-top:2px; }
.hospital-conference small { color:var(--muted); font-size:10.8px; line-height:1.25; margin-top:2px; }
.hospital-conference i { display:block; height:5px; margin-top:5px; border-radius:99px; overflow:hidden; background:rgba(255,255,255,.08); }
.hospital-conference u { display:block; height:100%; border-radius:99px; background:linear-gradient(90deg,var(--gold),var(--accent-2)); text-decoration:none; }
.hospital-conference strong { color:var(--gold); font-size:10.5px; white-space:nowrap; }
.specialty-rep {
  display:grid; grid-template-columns:46px minmax(0, 1fr) auto; gap:8px; align-items:center;
  min-height:58px; margin-top:8px; padding:8px; border:1px solid rgba(244,201,107,.2);
  border-radius:12px; background:linear-gradient(135deg, rgba(244,201,107,.1), rgba(143,182,255,.06));
}
.specialty-rep-img { width:46px; height:46px; object-fit:cover; border-radius:10px; background:#101827; }
.specialty-rep b, .specialty-rep em { display:block; min-width:0; }
.specialty-rep b { color:var(--gold); font-size:12.5px; line-height:1.18; }
.specialty-rep em { color:var(--muted); font-size:10.8px; font-style:normal; margin-top:2px; }
.specialty-rep i { display:flex; gap:5px; flex-wrap:wrap; margin-top:5px; font-style:normal; }
.specialty-rep small {
  padding:3px 5px; border-radius:999px; background:rgba(7,12,24,.45);
  color:var(--text); font-size:10px; white-space:nowrap;
}
.specialty-rep strong { color:var(--accent-2); font-size:10.5px; white-space:nowrap; }
.specialty-synergy {
  display:grid; grid-template-columns:54px minmax(0, 1fr) auto; gap:8px; align-items:center;
  width:100%; min-height:64px; margin-top:8px; padding:8px; border:1px solid rgba(104,216,189,.2);
  border-radius:12px; background:linear-gradient(135deg, rgba(104,216,189,.09), rgba(143,182,255,.07));
  color:var(--text); text-align:left;
}
.specialty-synergy.ready { border-color:rgba(104,216,189,.55); box-shadow:0 0 0 1px rgba(104,216,189,.14) inset; }
.specialty-synergy:disabled { opacity:.7; cursor:default; }
.specialty-synergy-icons { display:grid; grid-template-columns:1fr 1fr; gap:3px; font-style:normal; }
.specialty-synergy-img { width:25px; height:25px; object-fit:cover; border-radius:7px; background:#101827; }
.specialty-synergy b, .specialty-synergy em { display:block; min-width:0; }
.specialty-synergy b { color:var(--accent-2); font-size:12.5px; line-height:1.18; }
.specialty-synergy em { color:var(--muted); font-size:10.8px; font-style:normal; margin-top:2px; }
.specialty-synergy span>i { display:flex; gap:5px; flex-wrap:wrap; margin-top:5px; font-style:normal; }
.specialty-synergy small {
  padding:3px 5px; border-radius:999px; background:rgba(7,12,24,.45);
  color:var(--text); font-size:10px; white-space:nowrap;
}
.specialty-synergy strong { color:var(--accent-2); font-size:10.5px; white-space:nowrap; }
.specialty-reward {
  display:grid; grid-template-columns:46px minmax(0, 1fr) auto; gap:8px; align-items:center;
  width:100%; min-height:58px; margin-top:8px; padding:8px; border:1px solid rgba(143,182,255,.2);
  border-radius:12px; background:rgba(143,182,255,.07); color:var(--text); text-align:left;
}
.specialty-reward.ready { border-color:rgba(244,201,107,.55); box-shadow:0 0 0 1px rgba(244,201,107,.13) inset; }
.specialty-reward:disabled { opacity:.7; cursor:default; }
.specialty-reward-img { width:46px; height:46px; object-fit:cover; border-radius:10px; background:#101827; }
.specialty-reward b, .specialty-reward em { display:block; min-width:0; }
.specialty-reward b { color:var(--text); font-size:12.5px; line-height:1.18; }
.specialty-reward em { color:var(--muted); font-size:10.8px; font-style:normal; margin-top:2px; }
.specialty-reward i { display:flex; gap:5px; flex-wrap:wrap; margin-top:5px; font-style:normal; }
.specialty-reward small {
  padding:3px 6px; border-radius:999px; background:rgba(7,12,24,.45);
  color:var(--muted); font-size:10px; white-space:nowrap;
}
.specialty-reward small.ready { color:var(--gold); background:rgba(244,201,107,.13); }
.specialty-reward small.done { color:var(--accent-2); background:rgba(104,216,189,.13); }
.specialty-reward strong { color:var(--gold); font-size:10.5px; white-space:nowrap; }
@media(max-width:720px){.specialty-grid{grid-template-columns:1fr}.specialty-head{align-items:flex-start}}
.rotation-panel {
  display:grid; grid-template-columns:74px minmax(0, 1fr); gap:12px; align-items:center;
  margin-top:10px; padding:12px; border-color:rgba(244,201,107,.22);
  background:linear-gradient(145deg, rgba(244,201,107,.095), rgba(104,216,189,.055));
}
.rotation-panel.ready { border-color:rgba(104,216,189,.48); box-shadow:0 0 0 1px rgba(104,216,189,.14) inset; }
.rotation-art {
  width:74px; height:74px; object-fit:contain; border-radius:12px; padding:4px;
  background:rgba(255,255,255,.045); border:1px solid rgba(255,255,255,.08);
}
.rotation-copy b, .rotation-copy span, .rotation-copy small { display:block; }
.rotation-copy b { font-size:16px; line-height:1.2; }
.rotation-copy span, .rotation-copy small { color:var(--muted); font-size:12px; line-height:1.35; margin-top:3px; }
.rotation-copy i { display:block; height:7px; border-radius:999px; overflow:hidden; background:rgba(255,255,255,.08); margin-top:8px; }
.rotation-copy u { display:block; height:100%; border-radius:999px; background:linear-gradient(90deg, var(--gold), var(--accent-2)); text-decoration:none; }
.rotation-actions { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin-top:9px; }
.rotation-actions button {
  min-height:32px; border:1px solid rgba(244,201,107,.28); border-radius:9px;
  background:rgba(244,201,107,.1); color:var(--text); font-size:12px; font-weight:900;
}
.rotation-actions button:disabled { opacity:.48; cursor:default; }
.portfolio-panel {
  display:grid; grid-template-columns:82px minmax(0, 1fr); gap:12px; align-items:center;
  margin-top:10px; padding:12px;
  background:linear-gradient(145deg, rgba(143,182,255,.12), rgba(104,216,189,.055));
}
.portfolio-art {
  width:82px; height:82px; object-fit:contain; border-radius:14px; padding:4px;
  background:rgba(255,255,255,.045); border:1px solid rgba(255,255,255,.08);
}
.portfolio-copy b, .portfolio-copy em, .portfolio-copy small { display:block; }
.portfolio-copy b { font-size:16px; line-height:1.2; }
.portfolio-copy em { color:var(--accent-2); font-style:normal; font-size:12px; margin-top:3px; }
.portfolio-copy small { color:var(--muted); font-size:11.5px; line-height:1.35; margin-top:4px; }
.portfolio-chips { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:6px; margin-top:9px; }
.portfolio-chips span {
  min-height:31px; padding:6px 7px; border:1px solid rgba(143,182,255,.16);
  border-radius:9px; color:var(--muted); font-size:10.5px; background:rgba(7,12,24,.34);
}
.portfolio-chips b { float:right; color:var(--text); font-size:11px; line-height:1.1; }
.specimen-cert-card {
  grid-column:1/-1; display:grid; grid-template-columns:44px minmax(0, 1fr) auto;
  gap:9px; align-items:center; min-height:58px; margin-top:2px; padding:8px;
  border:1px solid rgba(244,201,107,.22); border-radius:12px;
  background:linear-gradient(135deg, rgba(244,201,107,.1), rgba(104,216,189,.06));
  color:var(--text); text-align:left; cursor:pointer;
}
.specimen-cert-img {
  width:44px; height:44px; object-fit:cover; border-radius:10px;
  background:#101827; border:1px solid rgba(255,255,255,.1);
}
.specimen-cert-card b, .specimen-cert-card em { display:block; min-width:0; }
.specimen-cert-card b { color:var(--gold); font-size:12.5px; line-height:1.2; }
.specimen-cert-card em {
  color:var(--muted); font-size:10.8px; font-style:normal; margin-top:2px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.specimen-cert-card i {
  display:block; height:5px; margin-top:5px; border-radius:99px; overflow:hidden;
  background:rgba(255,255,255,.08);
}
.specimen-cert-card u {
  display:block; height:100%; border-radius:99px;
  background:linear-gradient(90deg,var(--gold),var(--accent-2)); text-decoration:none;
}
.specimen-cert-card strong {
  padding:5px 7px; border-radius:999px; background:rgba(104,216,189,.12);
  color:var(--accent-2); font-size:11px; white-space:nowrap;
}
.specimen-badge-rail {
  grid-column:1/-1; margin-top:7px; padding:8px; border-radius:12px;
  border:1px solid rgba(143,182,255,.18);
  background:linear-gradient(135deg, rgba(143,182,255,.08), rgba(244,201,107,.04));
}
.specimen-badge-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:7px; }
.specimen-badge-head b { color:var(--text); font-size:12.5px; }
.specimen-badge-head span { color:var(--gold); font-size:11px; font-weight:900; }
.specimen-badge-grid { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:6px; }
.specimen-badge {
  min-height:68px; padding:5px 4px; border-radius:10px; text-align:center;
  border:1px solid rgba(255,255,255,.075); background:rgba(7,12,24,.35);
}
.specimen-badge.current { border-color:rgba(244,201,107,.52); box-shadow:0 0 0 1px rgba(244,201,107,.12) inset; }
.specimen-badge.locked { opacity:.5; filter:saturate(.45); }
.specimen-badge-img { width:30px; height:30px; object-fit:cover; border-radius:8px; background:#101827; }
.specimen-badge b, .specimen-badge small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.specimen-badge b { color:var(--text); font-size:9.8px; line-height:1.1; margin-top:3px; }
.specimen-badge small { color:var(--muted); font-size:9.5px; margin-top:2px; }
.ward-grid { display:grid; gap:10px; margin-top:12px; }
.ward-card {
  min-height:92px; display:grid; grid-template-columns:64px 1fr; gap:12px; align-items:center;
  text-align:left; border:1px solid rgba(148,216,255,.18); border-radius:12px;
  padding:12px; color:var(--text); background:rgba(148,216,255,.055);
}
.ward-card.locked { opacity:.52; cursor:default; }
.ward-card.active { border-color:rgba(104,216,189,.42); background:rgba(104,216,189,.09); }
.ward-art { width:64px; height:64px; object-fit:contain; border-radius:10px; background:rgba(255,255,255,.04); padding:4px; }
.ward-card b, .ward-card em, .ward-card i, .ward-card small { display:block; font-style:normal; }
.ward-card b { font-size:15px; }
.ward-card em, .ward-card i, .ward-card small { color:var(--muted); font-size:12px; line-height:1.35; margin-top:2px; }
.ward-actions, .territory-actions { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-top:8px; }
.ward-actions button, .territory-actions button {
  min-height:30px; border:1px solid rgba(104,216,189,.24); border-radius:8px;
  background:rgba(104,216,189,.1); color:var(--text); font-weight:850; font-size:11.5px;
}
.ward-actions button:disabled, .territory-actions button:disabled { opacity:.48; cursor:default; }

.cta {
  display: block; width: 100%; text-align: center; border: 0; cursor: pointer;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #08122a; font-weight: 800; font-size: 16px;
  min-height: 52px; padding: 16px; border-radius: 12px; margin-top: 18px;
}
.cta.secondary { background: var(--card-2); color: var(--text); border: 1px solid var(--line); }
.cta:disabled { opacity: .5; cursor: default; }

.progress-ring, .territory-head { display:flex; align-items:center; gap:14px; }
.territory-panel { margin-top:9px; padding:10px; }
.command-head {
  display:grid; grid-template-columns:56px 1fr auto; gap:8px; align-items:center;
  border:1px solid rgba(148,216,255,.16); border-radius:13px; padding:7px;
  background:linear-gradient(135deg, rgba(148,216,255,.11), rgba(244,201,107,.06));
}
.command-art {
  width:56px; height:56px; object-fit:cover; border-radius:11px;
  background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.08);
}
.command-copy { min-width:0; }
.command-kicker { color:var(--accent-2); font-size:12px; font-weight:900; margin-bottom:2px; }
.command-copy b, .command-copy span, .command-copy small { display:block; }
.command-copy b { font-size:15px; line-height:1.25; word-break:keep-all; }
.command-copy span, .command-copy small {
  color:var(--muted); font-size:11.5px; line-height:1.35; margin-top:3px; word-break:keep-all;
}
.command-copy i {
  display:block; height:7px; margin-top:8px; border-radius:999px; overflow:hidden;
  background:rgba(255,255,255,.08);
}
.command-copy u {
  display:block; height:100%; text-decoration:none; border-radius:999px;
  background:linear-gradient(90deg, var(--accent-2), var(--gold));
}
.career-percent { text-align:center; min-width:52px; }
.career-percent b, .career-percent span { display:block; }
.career-percent b { color:var(--gold); font-size:19px; }
.career-percent span { color:var(--muted); font-size:11px; margin-top:2px; }
.career-bonus-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:6px; margin-top:6px; }
.career-metric {
  border:1px solid rgba(244,201,107,.18); border-radius:10px; padding:6px 5px;
  background:rgba(244,201,107,.055); text-align:center;
}
.career-metric b, .career-metric span { display:block; }
.career-metric b { color:var(--gold); font-size:13px; }
.career-metric span { color:var(--muted); font-size:10.5px; margin-top:2px; }
.home-specimen-cert {
  display:grid; grid-template-columns:24px minmax(0, 1fr); align-items:center; gap:2px 5px;
  width:100%; min-height:42px; margin:0; padding:5px;
  border:1px solid rgba(104,216,189,.24); border-radius:11px;
  background:linear-gradient(135deg, rgba(104,216,189,.09), rgba(244,201,107,.06));
  color:var(--text); text-align:left; cursor:pointer;
}
.home-cert-img {
  grid-row:1/3; width:24px; height:24px; object-fit:cover; border-radius:7px;
  background:#101827; border:1px solid rgba(255,255,255,.1);
}
.home-specimen-cert b, .home-specimen-cert em { display:block; min-width:0; }
.home-specimen-cert b {
  color:var(--accent-2); font-size:10.2px; line-height:1.1;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.home-specimen-cert em {
  color:var(--muted); font-size:0; font-style:normal; margin:0;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.home-specimen-cert strong {
  grid-column:1/-1; justify-self:center; padding:2px 5px; border-radius:999px;
  background:rgba(244,201,107,.1); color:var(--gold); font-size:9.8px; white-space:nowrap;
}
.territory-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:6px; margin-top:8px; }
.territory-card {
  min-height:118px; display:grid; grid-template-rows:auto 1fr; gap:5px;
  border:1px solid rgba(244,201,107,.2); border-radius:11px; padding:6px 5px;
  background:linear-gradient(180deg, rgba(244,201,107,.07), rgba(104,216,189,.045));
  color:var(--text); text-align:center;
}
.territory-card.active { border-color:rgba(244,201,107,.48); box-shadow:0 0 0 1px rgba(244,201,107,.16) inset; }
.territory-art { width:42px; height:42px; object-fit:cover; margin:0 auto; border-radius:10px; }
.territory-card b, .territory-card em, .territory-card small, .territory-card strong { display:block; }
.territory-card b { font-size:12.5px; line-height:1.2; }
.territory-card em, .territory-card small {
  color:var(--muted); font-size:10.5px; line-height:1.25; font-style:normal; margin-top:3px;
}
.territory-card strong {
  color:var(--gold); font-size:10.5px; line-height:1.2; margin-top:4px;
}
.territory-card i {
  display:block; height:6px; background:rgba(255,255,255,.08);
  border-radius:999px; overflow:hidden; margin:7px 2px 4px;
}
.territory-card u {
  display:block; height:100%; background:linear-gradient(90deg, var(--gold), var(--accent-2));
  text-decoration:none; border-radius:999px;
}
.focus-settle {
  margin-top:9px; color:var(--gold); font-weight:850; font-size:13px;
  padding:8px 10px; border-radius:10px; background:rgba(244,201,107,.08);
}
.correction-settle {
  display:flex; align-items:center; gap:9px; margin-top:9px; padding:8px 10px;
  border:1px solid rgba(104,216,189,.25); border-radius:10px;
  background:rgba(104,216,189,.08); text-align:left;
}
.correction-settle-img {
  width:34px; height:34px; flex:none; object-fit:cover; border-radius:8px;
}
.correction-settle b, .correction-settle small { display:block; }
.correction-settle b { color:var(--accent-2); font-size:13px; line-height:1.2; }
.correction-settle small { color:var(--muted); font-size:11.5px; margin-top:2px; }
.integration-settle {
  display:flex; align-items:center; gap:9px; margin-top:9px; padding:8px 10px;
  border:1px solid rgba(244,201,107,.28); border-radius:10px;
  background:rgba(244,201,107,.08); text-align:left;
}
.integration-settle-img {
  width:34px; height:34px; flex:none; object-fit:cover; border-radius:8px;
}
.integration-settle b, .integration-settle small { display:block; }
.integration-settle b { color:var(--gold); font-size:13px; line-height:1.2; }
.integration-settle small { color:var(--muted); font-size:11.5px; margin-top:2px; }
.integration-balance-line {
  display:flex; align-items:center; gap:9px; margin-top:9px; padding:8px 10px;
  border:1px solid rgba(104,216,189,.25); border-radius:10px;
  background:rgba(104,216,189,.08); text-align:left;
}
.integration-balance-img {
  width:34px; height:34px; flex:none; object-fit:cover; border-radius:8px;
}
.integration-balance-line b, .integration-balance-line small { display:block; }
.integration-balance-line b { color:var(--accent-2); font-size:13px; line-height:1.2; }
.integration-balance-line small { color:var(--muted); font-size:11.5px; margin-top:2px; }
.chain-settle {
  display:flex; align-items:center; gap:9px; margin-top:9px; padding:8px 10px;
  border:1px solid rgba(244,201,107,.25); border-radius:10px;
  background:rgba(244,201,107,.08); text-align:left;
}
.chain-settle-img {
  width:34px; height:34px; flex:none; object-fit:cover; border-radius:8px;
}
.chain-settle b, .chain-settle small { display:block; }
.chain-settle b { color:var(--gold); font-size:13px; line-height:1.2; }
.chain-settle small { color:var(--muted); font-size:11.5px; margin-top:2px; }
.specimen-settle {
  display:flex; align-items:center; gap:9px; margin-top:9px; padding:8px 10px;
  border:1px solid rgba(123,168,255,.25); border-radius:10px;
  background:rgba(123,168,255,.09); text-align:left;
}
.specimen-settle-img {
  width:34px; height:34px; flex:none; object-fit:cover; border-radius:8px;
}
.specimen-settle b, .specimen-settle small { display:block; }
.specimen-settle b { color:#aecaed; font-size:13px; line-height:1.2; }
.specimen-settle small { color:var(--muted); font-size:11.5px; margin-top:2px; }
.chain-hint {
  margin-top:10px; padding:8px 10px; border-radius:10px;
  background:rgba(244,201,107,.08); color:var(--gold);
  font-weight:850; font-size:12.5px; text-align:center;
}
.specimen-hint {
  margin-top:8px; padding:8px 10px; border-radius:10px;
  background:rgba(123,168,255,.08); color:#cfe0ff;
  font-weight:850; font-size:12.5px; text-align:center;
}
@media (max-width: 430px) {
  .command-head { grid-template-columns:64px 1fr; }
  .command-art { width:64px; height:64px; }
  .career-percent { grid-column:1 / -1; display:flex; justify-content:space-between; text-align:left; }
}

/* 도감 그리드 */
.dex-atlas-panel {
  margin:8px 0 12px; padding:12px; border:1px solid rgba(123,168,255,.2);
  border-radius:14px; background:linear-gradient(180deg, rgba(123,168,255,.11), rgba(18,26,42,.92));
}
.dex-atlas-head { display:flex; justify-content:space-between; gap:10px; align-items:end; margin-bottom:10px; }
.dex-atlas-head b, .dex-atlas-head small { display:block; }
.dex-atlas-head b { color:var(--text); font-size:14px; line-height:1.15; }
.dex-atlas-head small { color:var(--muted); font-size:11.5px; margin-top:2px; }
.dex-atlas-head strong { color:var(--gold); font-size:11px; white-space:nowrap; }
.dex-atlas-grid { display:flex; gap:8px; overflow-x:auto; scroll-snap-type:x proximity; padding-bottom:2px; }
.dex-atlas-grid::-webkit-scrollbar { height:6px; }
.dex-atlas-grid::-webkit-scrollbar-thumb { background:#33466f; border-radius:99px; }
.dex-atlas-card {
  flex:0 0 164px; min-width:0; display:grid; grid-template-columns:42px 1fr; gap:8px; align-items:center;
  padding:8px; border:1px solid rgba(143,182,255,.22); border-radius:12px; background:rgba(10,16,28,.7);
  color:var(--text); text-align:left; cursor:pointer; scroll-snap-align:start; position:relative;
}
.dex-atlas-card.active { border-color:rgba(244,201,107,.62); background:rgba(244,201,107,.1); }
.dex-atlas-img { width:42px; height:42px; object-fit:cover; border-radius:10px; background:#111827; }
.dex-atlas-card span { min-width:0; }
.dex-atlas-card b { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; line-height:1.12; padding-right:28px; }
.dex-atlas-card small { display:block; color:var(--muted); font-size:10.5px; line-height:1.12; margin-top:2px; }
.dex-atlas-card i { display:block; height:5px; margin-top:5px; border-radius:99px; overflow:hidden; background:#0b1020; }
.dex-atlas-card u { display:block; height:100%; background:linear-gradient(90deg, var(--accent), var(--gold)); }
.dex-atlas-card em { position:absolute; right:8px; top:8px; color:#b9c8e8; font-size:11px; font-style:normal; font-weight:900; }
.dex-rx-panel {
  display:grid; grid-template-columns:58px 1fr; gap:10px; align-items:center;
  margin:0 0 12px; padding:10px; border:1px solid rgba(244,201,107,.28);
  border-radius:14px; background:linear-gradient(135deg, rgba(244,201,107,.12), rgba(24,36,60,.94));
}
.dex-rx-img { width:58px; height:58px; object-fit:cover; border-radius:12px; background:#101827; }
.dex-rx-copy { min-width:0; }
.dex-rx-copy b { display:block; color:var(--text); font-size:14px; line-height:1.18; }
.dex-rx-copy small { display:block; color:var(--muted); font-size:11px; line-height:1.25; margin-top:3px; }
.dex-rx-copy i { display:block; height:6px; margin-top:7px; border-radius:99px; overflow:hidden; background:#0b1020; }
.dex-rx-copy u { display:block; height:100%; background:linear-gradient(90deg, var(--gold), var(--accent)); }
.dex-rx-actions { grid-column:1 / -1; display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.dex-rx-actions button {
  border:1px solid rgba(143,182,255,.28); border-radius:10px; background:rgba(12,20,36,.76);
  color:var(--text); padding:8px 9px; font-size:12px; font-weight:900; cursor:pointer;
}
.dex-rx-actions button:first-child { background:linear-gradient(135deg, var(--accent), #a8c2ff); color:#081020; }
.dex-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 14px; }
.chip {
  background: var(--card); border: 1px solid var(--line); color: var(--muted);
  padding: 7px 13px; border-radius: 999px; font-size: 13px; cursor: pointer; font-weight: 600;
}
.chip.active { background: var(--accent); color: #0c1024; border-color: var(--accent); }

.dex-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dex-cell {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  min-height: 132px; padding: 8px; cursor: pointer; text-align: center; position: relative; transition: .15s;
}
.dex-cell:active { transform: scale(.96); }
.dex-cell.locked {
  opacity: 1;
  background: linear-gradient(180deg, rgba(143,182,255,.08), rgba(255,255,255,.025)), var(--card);
}
.dex-cell .frame { width: 100%; aspect-ratio: 1/1; border-radius: 10px; overflow: hidden; }
.asset-thumb, .asset-hero, .body-base-img {
  width: 100%; height: 100%; display: block; object-fit: contain;
}
.asset-thumb {
  background:
    linear-gradient(180deg, rgba(239,229,207,.94), rgba(211,221,228,.88));
  padding: 3px;
}
.asset-hero {
  max-height: 100%; padding: 8px;
  background: linear-gradient(180deg, #f3ead8, #d7e0e6);
  border-radius: 12px;
}
.locked-asset {
  filter: saturate(.72) brightness(.58) contrast(1.06) blur(.45px);
  transform: scale(1.05);
  object-position: var(--lock-x, 50%) var(--lock-y, 50%);
}
.asset-thumb.locked-asset {
  object-fit: cover;
}
.asset-hero.locked-asset {
  filter: saturate(.74) brightness(.62) contrast(1.08) blur(.35px);
  background: linear-gradient(180deg, #dce5ef, #8e9aad);
  object-fit: contain;
}
.asset-credit {
  margin: 7px 2px 0; color: var(--muted);
  font-size: 11px; line-height: 1.35; text-align: center;
}
.asset-credit a { color: var(--muted); text-decoration: none; }
.dex-cell .nm { font-size: 11.5px; margin-top: 6px; font-weight: 700; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dex-cell .stars { font-size: 11px; color: var(--gold); height: 14px; }
.dex-cell .lock-ico {
  position:absolute; top:50%; left:50%; transform:translate(-50%,-62%);
  padding:4px 8px; border-radius:999px; font-size:10px; font-weight:900;
  letter-spacing:0; color:#0b1020; background:rgba(232,237,247,.86);
  box-shadow:0 8px 18px rgba(0,0,0,.28);
}

/* 모달 */
.modal-back {
  position: fixed; inset: 0; background: rgba(6,8,18,.7);
  display: flex; align-items: flex-end; justify-content: center; z-index: 50;
  animation: fade .2s;
}
.modal {
  background: var(--bg-2); width: 100%; max-width: 520px;
  border-radius: 22px 22px 0 0; border: 1px solid var(--line);
  padding: 20px 18px calc(24px + env(safe-area-inset-bottom));
  max-height: 88vh; overflow-y: auto; animation: slideup .25s;
}
@keyframes slideup { from { transform: translateY(40px); opacity:.6 } to { transform:none; opacity:1 } }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal h2 { margin: 8px 0 2px; font-size: 22px; }
.modal .latin { color: var(--muted); font-style: italic; margin: 0 0 12px; }
.modal .big-art { width: 100%; height: 200px; border-radius: 14px; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); display:flex; align-items:center; justify-content:center; }
.kv { display: grid; grid-template-columns: 84px 1fr; gap: 6px 10px; font-size: 14px; margin: 14px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.tagrow { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.tag { background: var(--card-2); border: 1px solid var(--line); padding: 4px 9px; border-radius: 8px; font-size: 12px; }
.mnemonic { background: rgba(255,204,102,.08); border: 1px solid rgba(255,204,102,.3);
  border-radius: 12px; padding: 12px; font-size: 14px; color: #ffe2a8; margin-top: 8px; }
.source-box {
  margin-top: 12px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid rgba(104,216,189,.24); background: rgba(104,216,189,.06);
}
.source-box summary { cursor: pointer; font-size: 13px; font-weight: 800; color: var(--accent-2); }
.source-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 9px; }
.source-list li { display: grid; gap: 2px; min-width: 0; }
.source-list a { color: var(--text); font-size: 13px; font-weight: 800; overflow-wrap: anywhere; }
.source-list span, .source-list em { color: var(--muted); font-size: 11.5px; font-style: normal; line-height: 1.35; }
.modal-close { position: sticky; top: -20px; float: right; background: var(--card-2);
  border: 1px solid var(--line); color: var(--text); width: 34px; height: 34px; border-radius: 50%;
  font-size: 18px; cursor: pointer; }

/* 퀴즈 */
.quiz-top { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:14px; }
.quiz-progress { flex:1; min-width:52px; height:8px; background:#0d1126; border-radius:999px; overflow:hidden; }
.quiz-progress > i { display:block; height:100%; background: var(--accent); transition: width .3s; }
.quiz-q { font-size: 13px; color: var(--muted); }
.chain-pill {
  display:flex; align-items:center; gap:6px; min-width:116px; max-width:126px;
  padding:5px 7px; border:1px solid rgba(244,201,107,.22); border-radius:10px;
  background:rgba(244,201,107,.08); color:var(--text);
}
.chain-pill-img { width:22px; height:22px; object-fit:cover; border-radius:6px; flex:none; }
.chain-pill b, .chain-pill small { display:block; line-height:1.05; white-space:nowrap; }
.chain-pill b { color:var(--gold); font-size:10.2px; }
.chain-pill small { color:var(--muted); font-size:9.2px; margin-top:2px; }
.integration-pill {
  display:flex; align-items:center; gap:6px; min-width:98px; max-width:116px;
  padding:5px 7px; border:1px solid rgba(104,216,189,.24); border-radius:10px;
  background:rgba(104,216,189,.08); color:var(--text);
}
.integration-pill-img { width:22px; height:22px; object-fit:cover; border-radius:6px; flex:none; }
.integration-pill b, .integration-pill small { display:block; line-height:1.05; white-space:nowrap; }
.integration-pill b { color:var(--accent-2); font-size:10.2px; }
.integration-pill small { color:var(--muted); font-size:9.2px; margin-top:2px; }
.quiz-card { text-align: center; }
.quiz-prompt { font-size: 14px; color: var(--muted); margin: 8px 0 4px; }
.quiz-term { font-size: 30px; font-weight: 800; margin: 6px 0 18px; }
.choices { display: grid; gap: 10px; }
.choice {
  background: var(--card); border: 1.5px solid var(--line); color: var(--text);
  padding: 16px; border-radius: 14px; font-size: 16px; cursor: pointer; text-align: left; font-weight: 600;
}
.choice:active { transform: scale(.98); }
.choice.correct { border-color: var(--good); background: rgba(86,211,100,.14); }
.choice.wrong { border-color: var(--bad); background: rgba(255,107,129,.14); }
.choice.dim { opacity: .55; }

/* 매칭 */
.match-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.match-col { display: grid; gap: 10px; }
.match-item { background: var(--card); border: 1.5px solid var(--line); padding: 13px; border-radius: 12px;
  cursor: pointer; font-size: 15px; font-weight: 600; text-align:center; }
.match-item.sel { border-color: var(--accent); background: rgba(124,156,255,.16); }
.match-item.done { border-color: var(--good); background: rgba(86,211,100,.12); opacity:.7; pointer-events:none; }

/* 위치찍기 */
.body-stage { position: relative; width: 100%; max-width: 280px; margin: 8px auto 0; }
.body-stage svg { width: 100%; height: auto; display: block; }
.body-atlas { position: relative; width: 100%; aspect-ratio: 1/2; }
.body-atlas > svg, .body-atlas > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.body-hot-layer { z-index: 2; }
.hot { cursor: pointer; transition: .15s; }
.hot:hover, .hot:focus { filter: brightness(1.3); }
.hot.correct { fill: var(--good) !important; }
.hot.wrong { fill: var(--bad) !important; }

/* 결과/연출 */
.reveal { text-align:center; padding: 8px 0; }
.reveal .char-asset {
  width:min(210px, 74%); height:auto; max-height:220px; object-fit:contain;
  display:block; margin:0 auto 8px;
}
.reveal .verdict { font-size: 28px; font-weight: 800; }
.reveal .verdict.ok { color: var(--good); }
.reveal .verdict.no { color: var(--bad); }
.reveal .ans { color: var(--muted); margin-top: 6px; }
.wrong-explain {
  margin-top: 12px; padding: 12px; border-radius: 12px;
  background: rgba(255,107,129,.08); border: 1px solid rgba(255,107,129,.28);
  text-align: left;
}
.compare { display:flex; justify-content:space-between; gap:10px; font-size:13px; margin:4px 0; }
.compare span { color: var(--muted); }
.compare.good b { color: var(--good); }
.wrong-explain p { margin: 10px 0 0; line-height: 1.45; font-size: 13px; }
.evidence { margin-top: 8px; color: var(--paper); font-size: 12px; line-height: 1.45; }
.insight-panel { margin-top: 9px; }
.mini-title { font-size: 13px; color: var(--accent-2); font-weight: 800; margin-bottom: 10px; }
.insight-row { display:grid; grid-template-columns: 78px 1fr auto; gap:8px; align-items:center; font-size:13px; margin:7px 0; }
.insight-row span, .insight-row em, .insight-empty, .insight-tip { color: var(--muted); font-style: normal; }
.insight-tip { margin-top: 5px; font-size: 11.5px; line-height: 1.35; }
.reference-panel { margin-top: 12px; }
.reference-row {
  display: grid; gap: 4px; padding: 10px 0; color: inherit;
  text-decoration: none; border-top: 1px solid rgba(255,255,255,.07);
}
.reference-row b { font-size: 13px; }
.reference-row em { color: var(--muted); font-size: 12px; font-style: normal; }
.reference-row i { display:flex; gap:6px; flex-wrap:wrap; font-style: normal; }
.reference-row span {
  color: var(--accent-2); border: 1px solid rgba(104,216,189,.28);
  border-radius: 999px; padding: 2px 7px; font-size: 11px;
}
.reference-foot { color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 8px; }
.reference-showcase { margin-top: 12px; }
.ref-showcase-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:10px; }
.ref-showcase-card {
  min-width:0; padding:9px; border-radius:12px; text-align:center;
  background:linear-gradient(180deg, rgba(239,229,207,.08), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.08);
}
.ref-showcase-img {
  width:100%; aspect-ratio:1/1; object-fit:contain; display:block;
  border-radius:10px; background:linear-gradient(180deg, #f5ecd9, #d9e3e8);
}
.ref-showcase-card b {
  display:block; margin-top:7px; font-size:11.5px; line-height:1.2;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.ref-showcase-card .asset-credit { font-size:9.5px; margin-top:5px; }
.next-btn { margin-top: 18px; }

/* 가챠 연출 */
.gacha-back { position: fixed; inset:0; background: rgba(6,8,18,.88); z-index: 60;
  display:flex; align-items:center; justify-content:center; animation: fade .2s; }
.gacha { text-align:center; width: min(320px, calc(100vw - 42px)); }
.reward-medallion {
  width: 184px; height: 184px; margin: 0 auto 10px; padding: 10px;
  border-radius: 20px; border: 2px solid var(--ring);
  background: linear-gradient(180deg, rgba(239,229,207,.98), rgba(208,219,226,.94));
  box-shadow: 0 0 36px color-mix(in srgb, var(--ring) 38%, transparent), var(--shadow);
  animation: pop .5s ease-out;
}
.reward-medallion .asset-thumb, .reward-medallion svg { border-radius: 14px; }
@keyframes pop { 0% { transform: scale(.2); opacity:0 } 60% { transform: scale(1.12) } 100% { transform: scale(1); opacity:1 } }
.gacha .tier { font-size: 26px; font-weight: 800; margin-top: 6px; }
.gacha .reward { color: var(--gold); font-size: 18px; font-weight: 700; margin-top: 4px; }
.gacha .got { color: var(--muted); margin-top: 10px; }
.gacha .tap { color: var(--muted); font-size: 12px; margin-top: 22px; }

/* 토스트 */
.toast-root { position: fixed; bottom: 84px; left: 0; right: 0; display:flex; flex-direction:column; gap:8px;
  align-items:center; z-index: 70; pointer-events:none; }
.toast { background: var(--card-2); border: 1px solid var(--line); color: var(--text);
  padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow);
  animation: toastIn .25s; }
.toast.xp { color: var(--accent-2); }
@keyframes toastIn { from { transform: translateY(12px); opacity:0 } to { transform:none; opacity:1 } }
.tour-target {
  position:relative; z-index:32;
  box-shadow:0 0 0 3px rgba(244,201,107,.9), 0 0 28px rgba(244,201,107,.32) !important;
}
.coach-backdrop {
  position:fixed; inset:0; z-index:31;
  background:rgba(4,7,18,.62); pointer-events:none;
}
.coach-target {
  position:relative; z-index:32;
  box-shadow:0 0 0 3px rgba(104,216,189,.92), 0 0 30px rgba(104,216,189,.34) !important;
}
#coachMark {
  position:fixed; left:12px; right:12px; bottom:88px; z-index:72;
  display:flex; justify-content:center; pointer-events:none;
}
#coachMark .tour-card { pointer-events:auto; }
.coach-inline {
  margin-top:8px; color:var(--gold); font-size:12px; font-weight:800;
}
.tour-coach {
  position:fixed; left:12px; right:12px; bottom:88px; z-index:72;
  pointer-events:none; display:flex; justify-content:center;
}
.tour-card {
  width:min(372px, 100%); pointer-events:auto; padding:13px 14px;
  border:1px solid rgba(244,201,107,.34); border-radius:14px;
  background:linear-gradient(180deg, rgba(31,38,58,.98), rgba(12,17,29,.98));
  box-shadow:0 18px 45px rgba(0,0,0,.42);
}
.tour-kicker { color:var(--gold); font-size:11.5px; font-weight:900; margin-bottom:4px; }
.tour-card b { display:block; font-size:16px; line-height:1.2; }
.tour-card p { margin:6px 0 10px; color:var(--muted); font-size:12.8px; line-height:1.42; }
.tour-actions { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.tour-primary, .tour-ghost {
  border:1px solid rgba(104,216,189,.25); border-radius:10px; padding:8px 11px;
  background:rgba(104,216,189,.1); color:var(--text); font-weight:850; cursor:pointer;
}
.tour-ghost { background:rgba(255,255,255,.04); color:var(--muted); }
.tour-wait { color:var(--gold); font-size:12px; font-weight:850; }
.settle-back { z-index:75; opacity:1; animation:none; align-items:center; }
.settlement {
  width:min(340px, calc(100vw - 32px)); margin:auto; padding:18px;
  border:1px solid rgba(148,216,255,.2); border-radius:18px;
  background:linear-gradient(180deg, rgba(31,38,58,.98), rgba(14,18,30,.98));
  box-shadow:var(--shadow); text-align:center; animation:pop .42s ease-out;
}
.settle-img {
  width:106px; height:106px; object-fit:cover; border-radius:18px; margin:0 auto 10px;
  border:1px solid rgba(255,255,255,.1); box-shadow:0 16px 34px rgba(0,0,0,.38);
}
.settle-copy b, .settle-copy span { display:block; }
.settle-copy b { font-size:18px; line-height:1.25; }
.settle-copy span { color:var(--muted); font-size:12px; line-height:1.35; margin-top:5px; }
.settle-metrics { display:grid; grid-template-columns:repeat(3, 1fr); gap:7px; margin:13px 0; }
.settle-metric {
  border:1px solid rgba(244,201,107,.18); border-radius:12px; padding:8px 5px;
  background:rgba(244,201,107,.07);
}
.settle-metric-img {
  width:30px; height:30px; display:block; margin:0 auto 4px;
  object-fit:cover; border-radius:8px; box-shadow:0 8px 18px rgba(0,0,0,.22);
}
.settle-metric b, .settle-metric span { display:block; }
.settle-metric b { color:var(--gold); font-size:15px; }
.settle-metric span { color:var(--muted); font-size:10.5px; margin-top:2px; }
.settle-rank {
  display:grid; grid-template-columns:48px 1fr; gap:9px; align-items:center; text-align:left;
  border:1px solid rgba(143,182,255,.18); border-radius:13px; padding:8px;
  background:rgba(143,182,255,.07); margin:0 0 13px;
}
.settle-rank.promoted { border-color:rgba(244,201,107,.36); background:rgba(244,201,107,.09); }
.settle-rank-img { width:48px; height:48px; object-fit:cover; border-radius:10px; }
.settle-rank b, .settle-rank em { display:block; }
.settle-rank b { font-size:13px; line-height:1.2; }
.settle-rank em { color:var(--muted); font-size:11px; font-style:normal; margin-top:3px; }
.settle-rank i {
  display:block; height:6px; margin-top:6px; border-radius:999px; overflow:hidden;
  background:rgba(255,255,255,.08);
}
.settle-rank u {
  display:block; height:100%; text-decoration:none; border-radius:999px;
  background:linear-gradient(90deg, var(--accent-2), var(--gold));
}
.settle-close { margin-top:0; }
.result-loot {
  display:grid; grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:7px; margin:10px 0;
}
.result-loot .settle-metric { padding:7px 4px; }
.result-loot .settle-metric-img { width:28px; height:28px; }
.result-prescription {
  display:grid; grid-template-columns:42px 1fr; gap:9px; align-items:center;
  margin:9px 0; padding:8px 10px; text-align:left;
  border:1px solid rgba(104,216,189,.22); border-radius:13px;
  background:rgba(104,216,189,.07);
}
.result-prescription-img {
  width:42px; height:42px; object-fit:cover; border-radius:10px;
  box-shadow:0 8px 18px rgba(0,0,0,.24);
}
.result-prescription b, .result-prescription em { display:block; }
.result-prescription b { font-size:13px; line-height:1.2; }
.result-prescription em {
  color:var(--muted); font-size:11.5px; font-style:normal;
  line-height:1.28; margin-top:3px;
}
.boss-aftercare {
  display:grid; grid-template-columns:48px 1fr; gap:8px; align-items:center;
  margin:7px 0 6px; padding:8px; text-align:left;
  border:1px solid rgba(255,218,121,.24); border-radius:16px;
  background:linear-gradient(135deg, rgba(255,218,121,.12), rgba(104,216,189,.08));
}
.boss-after-img {
  width:48px; height:48px; object-fit:cover; border-radius:12px;
  box-shadow:0 12px 24px rgba(0,0,0,.28);
}
.boss-after-copy b, .boss-after-copy small, .boss-after-copy p { display:block; }
.boss-after-copy b { font-size:13px; line-height:1.15; }
.boss-after-copy small, .boss-after-copy p { color:var(--muted); font-size:11px; margin-top:2px; }
.boss-after-tags, .boss-after-actions {
  grid-column:1 / -1; display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:7px;
}
.boss-after-tags em {
  padding:4px 6px; border-radius:999px; text-align:center;
  background:rgba(255,255,255,.07); color:var(--muted); font-style:normal; font-size:10.5px;
}
.boss-after-actions .cta { margin:0; min-height:36px; padding:0 6px; font-size:12px; }
.boss-retry-clear {
  border-color:rgba(104,216,189,.3);
  background:linear-gradient(135deg, rgba(104,216,189,.13), rgba(255,211,122,.09));
}
.boss-retry-clear .result-loot {
  grid-column:1 / -1; margin:0; gap:6px;
}
.boss-retry-clear .settle-metric {
  background:rgba(0,0,0,.13); border-radius:12px;
}
.boss-retry-care {
  display:grid; grid-template-columns:64px 1fr; gap:9px; align-items:center;
  margin:9px 0 2px; padding:10px; text-align:left;
  border:1px solid rgba(255,119,119,.28); border-radius:16px;
  background:linear-gradient(135deg, rgba(255,119,119,.13), rgba(123,168,255,.08));
}
.boss-retry-img {
  width:64px; height:64px; object-fit:contain; border-radius:14px;
  background:rgba(0,0,0,.18); padding:3px; box-shadow:0 14px 28px rgba(0,0,0,.32);
}
.boss-retry-copy b, .boss-retry-copy small, .boss-retry-copy p { display:block; }
.boss-retry-copy b { font-size:13px; line-height:1.16; }
.boss-retry-copy small, .boss-retry-copy p { color:var(--muted); font-size:11px; margin-top:2px; }
.boss-retry-skill {
  grid-column:1 / -1; display:grid; grid-template-columns:38px 1fr; gap:8px; align-items:center;
  border:1px solid rgba(123,168,255,.22); border-radius:12px; padding:8px; background:rgba(123,168,255,.07);
}
.boss-retry-skill-img { width:38px; height:38px; object-fit:cover; border-radius:10px; }
.boss-retry-skill b, .boss-retry-skill small { display:block; line-height:1.2; }
.boss-retry-skill small { color:var(--muted); font-size:11px; margin-top:2px; }
.boss-retry-tags, .boss-retry-actions {
  grid-column:1 / -1; display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:7px;
}
.boss-retry-tags em {
  padding:4px 6px; border-radius:999px; text-align:center; color:var(--muted);
  background:rgba(255,255,255,.07); font-style:normal; font-size:10.5px;
}
.boss-retry-actions .cta { margin:0; min-height:36px; padding:0 6px; font-size:12px; }
.boss-retry-boost {
  display:grid; grid-template-columns:42px 1fr; gap:8px; align-items:center;
  margin:8px 0 0; padding:8px; border-radius:13px; text-align:left;
  border:1px solid rgba(255,211,122,.28);
  background:linear-gradient(135deg, rgba(255,211,122,.16), rgba(104,216,189,.08));
}
.boss-retry-boost-img {
  width:42px; height:42px; object-fit:cover; border-radius:11px;
  box-shadow:0 10px 22px rgba(0,0,0,.28);
}
.boss-retry-boost b, .boss-retry-boost small { display:block; line-height:1.2; }
.boss-retry-boost b { color:var(--gold); font-size:12.5px; }
.boss-retry-boost small { color:var(--muted); font-size:11px; margin-top:2px; }
.boss-trophy-effect {
  display:grid; grid-template-columns:42px 1fr; gap:8px; align-items:center;
  margin:8px 0 0; padding:8px; border-radius:13px; text-align:left;
  border:1px solid rgba(104,216,189,.28);
  background:linear-gradient(135deg, rgba(104,216,189,.14), rgba(255,211,122,.06));
}
.boss-trophy-effect-img {
  width:42px; height:42px; object-fit:contain; border-radius:11px; padding:3px;
  background:rgba(0,0,0,.18); box-shadow:0 10px 22px rgba(0,0,0,.28);
}
.boss-trophy-effect b, .boss-trophy-effect small { display:block; line-height:1.2; }
.boss-trophy-effect b { color:var(--accent-2); font-size:12.5px; }
.boss-trophy-effect small { color:var(--muted); font-size:11px; margin-top:2px; }
.boss-title-effect {
  display:grid; grid-template-columns:42px 1fr; gap:8px; align-items:center;
  margin:8px 0 0; padding:8px; border-radius:13px; text-align:left;
  border:1px solid rgba(244,201,107,.3);
  background:linear-gradient(135deg, rgba(244,201,107,.16), rgba(123,168,255,.08));
}
.boss-title-effect-img {
  width:42px; height:42px; object-fit:cover; border-radius:11px;
  box-shadow:0 10px 22px rgba(0,0,0,.28);
}
.boss-title-effect b, .boss-title-effect small { display:block; line-height:1.2; }
.boss-title-effect b { color:var(--gold); font-size:12.5px; }
.boss-title-effect small { color:var(--muted); font-size:11px; margin-top:2px; }

.empty { text-align:center; color: var(--muted); padding: 40px 10px; }
.empty .big { font-size: 40px; margin-bottom: 8px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 10px; text-align:center; }
.row-between { display:flex; align-items:center; justify-content:space-between; }
.badge { background: var(--card-2); border:1px solid var(--line); border-radius:999px; padding:3px 10px; font-size:12px; color:var(--muted); }
.exam-panel { margin-top: 9px; }
.exam-score { display:flex; align-items:baseline; gap:10px; margin-bottom:8px; }
.exam-score b { color: var(--gold); font-size: 24px; }
.exam-score span { color: var(--muted); font-size: 13px; }
.exam-meta { color:var(--muted); font-size:12px; margin-top:4px; }
.exam-start-panel { margin-top:10px; padding:13px; }
.specimen-start-panel { margin-top:10px; padding:13px; }
.integration-start-panel { margin-top:10px; padding:13px; }
.integration-panel {
  display:grid; grid-template-columns:76px 1fr; gap:12px; align-items:center;
  margin-bottom:10px; text-align:left;
}
.integration-panel-img {
  width:76px; height:76px; border-radius:14px; object-fit:cover;
  border:1px solid rgba(244,201,107,.28); background:#101827;
}
.integration-panel b, .integration-panel p, .integration-panel small { display:block; min-width:0; }
.integration-panel b { color:var(--text); font-size:13.5px; line-height:1.2; }
.integration-panel p { margin:5px 0 6px; color:var(--muted); font-size:12px; line-height:1.35; }
.integration-panel small { color:var(--gold); font-size:11.5px; font-weight:850; }
.integration-reward {
  display:grid; grid-template-columns:46px minmax(0,1fr) auto; gap:8px; align-items:center;
  width:100%; min-height:58px; margin:0 0 10px; padding:8px;
  border:1px solid rgba(244,201,107,.24); border-radius:12px;
  background:linear-gradient(135deg, rgba(244,201,107,.1), rgba(104,216,189,.06));
  color:var(--text); text-align:left;
}
.integration-reward.ready { border-color:rgba(244,201,107,.58); box-shadow:0 0 0 1px rgba(244,201,107,.14) inset; }
.integration-reward:disabled { opacity:.72; cursor:default; }
.integration-reward-img { width:46px; height:46px; object-fit:cover; border-radius:10px; background:#101827; }
.integration-reward b, .integration-reward em { display:block; min-width:0; }
.integration-reward b { color:var(--text); font-size:12.5px; line-height:1.18; }
.integration-reward em { color:var(--muted); font-size:10.8px; font-style:normal; margin-top:2px; }
.integration-reward i { display:flex; gap:5px; flex-wrap:wrap; margin-top:5px; font-style:normal; }
.integration-reward small {
  padding:3px 6px; border-radius:999px; background:rgba(7,12,24,.45);
  color:var(--muted); font-size:10px; white-space:nowrap;
}
.integration-reward small.ready { color:var(--gold); background:rgba(244,201,107,.13); }
.integration-reward small.done { color:var(--accent-2); background:rgba(104,216,189,.13); }
.integration-reward strong { color:var(--gold); font-size:10.5px; white-space:nowrap; }
.specimen-panel {
  display:grid; grid-template-columns:76px 1fr; gap:12px; align-items:center;
  margin-bottom:10px; text-align:left;
}
.specimen-panel-img {
  width:76px; height:76px; border-radius:14px; object-fit:cover;
  border:1px solid rgba(123,168,255,.24); background:#101827;
}
.specimen-panel p {
  margin:0 0 7px; color:var(--muted); font-size:12px; line-height:1.35;
}
.specimen-stats { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:6px; }
.specimen-stats span {
  padding:4px 7px; border-radius:999px; background:rgba(123,168,255,.1);
  color:#dbe7ff; font-size:11px; font-weight:850;
}
.specimen-panel small { color:var(--gold); font-size:11.5px; font-weight:850; }
.specimen-report {
  margin-top:10px; padding:9px; border-radius:12px;
  border:1px solid rgba(123,168,255,.24);
  background:linear-gradient(145deg, rgba(123,168,255,.1), rgba(104,216,189,.055));
  text-align:left;
}
.specimen-report-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:7px; margin-top:8px; }
.specimen-report-card {
  min-width:0; border:1px solid rgba(255,255,255,.08); border-radius:10px; padding:6px;
  background:rgba(8,13,23,.42); color:var(--text); text-align:left; cursor:pointer;
}
.specimen-report-img {
  width:100%; aspect-ratio:1/1; object-fit:cover; border-radius:8px; background:#101827;
}
.specimen-report-card b, .specimen-report-card small { display:block; }
.specimen-report-card b {
  font-size:10.5px; line-height:1.15; margin-top:5px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.specimen-report-card small {
  color:var(--muted); font-size:9.5px; line-height:1.15; margin-top:2px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.specimen-report > small { display:block; color:var(--gold); font-size:11px; font-weight:850; margin-top:7px; }
.specimen-challenge-wrap { margin:-5px 0 10px; }
.specimen-challenge {
  display:grid; grid-template-columns:44px 1fr 54px; gap:9px; align-items:center;
  padding:8px; border:1px solid rgba(123,168,255,.28); border-radius:13px;
  background:linear-gradient(135deg, rgba(123,168,255,.13), rgba(104,216,189,.06));
  box-shadow:0 10px 24px rgba(0,0,0,.2);
}
.specimen-challenge-rank, .specimen-challenge-card {
  width:44px; height:44px; object-fit:cover; border-radius:10px;
  border:1px solid rgba(255,255,255,.1); background:#101827;
}
.specimen-challenge-card { width:54px; height:54px; }
.specimen-challenge b, .specimen-challenge small { display:block; min-width:0; }
.specimen-challenge b {
  font-size:13px; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.specimen-challenge small { color:var(--muted); font-size:10.5px; margin:3px 0 6px; }
.specimen-challenge i {
  display:block; height:6px; border-radius:999px; overflow:hidden; background:rgba(255,255,255,.08);
}
.specimen-challenge u {
  display:block; height:100%; border-radius:999px;
  background:linear-gradient(90deg, var(--accent), var(--accent-2)); text-decoration:none;
}
.specimen-challenge-result {
  display:flex; align-items:center; gap:9px; margin-top:10px; padding:8px;
  border:1px solid rgba(244,201,107,.24); border-radius:12px;
  background:rgba(244,201,107,.075); text-align:left;
}
.specimen-result-img { width:42px; height:42px; object-fit:cover; border-radius:10px; }
.specimen-challenge-result b, .specimen-challenge-result small { display:block; }
.specimen-challenge-result b { color:var(--gold); font-size:13px; line-height:1.2; }
.specimen-challenge-result small { color:var(--muted); font-size:11px; margin-top:2px; }
.specimen-rank-line {
  display:flex; align-items:center; gap:9px; margin-top:10px; padding:8px;
  border:1px solid rgba(123,168,255,.26); border-radius:12px;
  background:linear-gradient(135deg, rgba(123,168,255,.12), rgba(244,201,107,.06));
  text-align:left;
}
.specimen-rank-line.promoted {
  border-color:rgba(244,201,107,.36); background:rgba(244,201,107,.09);
}
.specimen-rank-img {
  width:44px; height:44px; object-fit:cover; border-radius:10px;
  border:1px solid rgba(255,255,255,.1); background:#101827; flex:none;
}
.specimen-rank-line b, .specimen-rank-line small, .specimen-rank-line em {
  display:block; min-width:0;
}
.specimen-rank-line b { color:var(--gold); font-size:13px; line-height:1.2; }
.specimen-rank-line small, .specimen-rank-line em {
  color:var(--muted); font-size:11px; line-height:1.25; font-style:normal;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.specimen-rank-line i {
  display:block; height:5px; margin-top:5px; border-radius:999px; overflow:hidden;
  background:rgba(255,255,255,.08);
}
.specimen-rank-line u {
  display:block; height:100%; border-radius:999px;
  background:linear-gradient(90deg,var(--gold),var(--accent-2)); text-decoration:none;
}
.specimen-retrain-card {
  width:100%; display:flex; align-items:center; gap:9px; margin-top:10px; padding:8px;
  border:1px solid rgba(104,216,189,.3); border-radius:12px;
  background:linear-gradient(135deg, rgba(104,216,189,.13), rgba(123,168,255,.07));
  color:var(--text); text-align:left; cursor:pointer;
}
.specimen-retrain-img {
  width:46px; height:46px; object-fit:cover; border-radius:10px;
  border:1px solid rgba(255,255,255,.1); background:#101827; flex:none;
}
.specimen-retrain-card b, .specimen-retrain-card small { display:block; min-width:0; }
.specimen-retrain-card b { color:var(--accent-2); font-size:13px; line-height:1.2; }
.specimen-retrain-card small {
  color:var(--muted); font-size:11px; margin-top:3px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.exam-mode-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:8px; }
.exam-mode-grid button {
  min-height:44px; border:1px solid rgba(255,218,121,.22); border-radius:12px;
  background:rgba(255,218,121,.065); color:var(--text); font-weight:800; cursor:pointer;
}
.exam-clock { color:var(--gold); white-space:nowrap; }
.exam-break { display:grid; grid-template-columns:1fr; gap:12px; margin-top:14px; text-align:left; }
.heat-title { color:var(--muted); font-size:12px; font-weight:800; margin:10px 0 6px; }
.heat-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:7px; }
.heat-cell {
  min-height:42px; padding:8px; border-radius:10px; border:1px solid rgba(255,255,255,.08);
  background:linear-gradient(90deg, rgba(255,107,139,.2) var(--risk), rgba(104,216,189,.08) 0);
}
.heat-cell b, .heat-cell span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.heat-cell b { font-size:12px; }
.heat-cell span { color:var(--muted); font-size:11px; margin-top:2px; }
.score-block {
  border:1px solid rgba(255,255,255,.08); border-radius:12px;
  padding:12px; background:rgba(255,255,255,.025);
}
.score-row { display:grid; grid-template-columns:1fr auto auto; gap:9px; font-size:13px; margin:7px 0; }
.score-row span, .score-row em { color:var(--muted); font-style:normal; }

/* ============================================================ *
 * 진단의 전당 — 캠페인 / 보스전 / 게임필
 * ============================================================ */

/* 임상 케이스 지문 */
.case-sub {
  background: rgba(124,156,255,.1); border:1px solid var(--line); border-radius:12px;
  padding: 12px 14px; font-size: 14px; line-height: 1.55; color: var(--text);
  margin: 4px 0 16px; text-align: left;
}
.pin-test-stage {
  margin: 0 0 14px; padding:10px; border-radius:14px;
  border:1px solid rgba(244,201,107,.24);
  background:linear-gradient(145deg, rgba(244,201,107,.1), rgba(104,216,189,.06));
}
.pin-test-frame {
  position:relative; min-height:184px; display:grid; place-items:center;
  border-radius:12px; overflow:hidden;
  background:linear-gradient(145deg, #efe4cc, #cfd9df 58%, #182131);
}
.pin-test-img {
  width:100%; max-height:238px; object-fit:contain; padding:6px;
  filter:saturate(1.06) contrast(1.04) drop-shadow(0 14px 24px rgba(0,0,0,.32));
}
.pin-dot {
  position:absolute; left:50%; top:50%; width:20px; height:20px;
  transform:translate(-50%,-50%); border-radius:50%;
  border:3px solid var(--gold); box-shadow:0 0 0 9px rgba(244,201,107,.16);
}
.pin-test-tags { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.pin-test-tags span {
  padding:4px 8px; border-radius:999px; color:var(--muted);
  background:rgba(255,255,255,.055); font-size:11px; font-weight:850;
}

/* 캠페인 챕터 맵 */
.chapter-map { display: grid; gap: 12px; margin-top: 4px; }
.chapter-node {
  display:flex; align-items:center; gap: 14px; width:100%; text-align:left; cursor:pointer;
  background: var(--card); border:1px solid var(--line); border-radius: var(--r); padding: 14px;
  color: var(--text); transition: .15s; position: relative; overflow: hidden;
}
.chapter-node:disabled { cursor: default; }
.chapter-node:active { transform: scale(.98); }
.chapter-node.locked { opacity:.76; cursor: default; }
.chapter-node.cleared { border-color: var(--gold); }
.chapter-node.cleared::after {
  content:''; position:absolute; inset:0; background:linear-gradient(90deg, rgba(255,204,102,.08), transparent 60%); pointer-events:none;
}
.ch-badge {
  flex:none; width: 44px; height: 44px; border-radius: 50%; display:flex; align-items:center; justify-content:center;
  font-weight:800; font-size: 18px; background: var(--card-2); border:1px solid var(--line); color: var(--accent);
}
.chapter-node.cleared .ch-badge { background: var(--gold); color:#0f1220; border-color: var(--gold); }
.chapter-thumb {
  width: 58px; height: 58px; flex: none; display:grid; place-items:center;
  border-radius: 10px; background: rgba(239,229,207,.06); overflow:hidden;
}
.chapter-art { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.chapter-node.locked .chapter-art { filter: saturate(.86) brightness(.78); }
.ch-info { flex:1; min-width:0; }
.ch-name { font-weight:800; font-size: 15px; }
.ch-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.ch-prog { color: var(--muted); font-size: 11.5px; margin-top: 4px; }
.ch-go { color: var(--muted); font-size: 20px; flex:none; }
.boss-hall-panel {
  margin:6px 0 12px; padding:12px; border:1px solid rgba(255,211,122,.24);
  border-radius:16px; background:linear-gradient(145deg, rgba(255,211,122,.12), rgba(123,168,255,.075));
  overflow:hidden;
}
.boss-hall-head {
  display:grid; grid-template-columns:58px 1fr; gap:10px; align-items:center; min-width:0;
}
.boss-hall-img {
  width:58px; height:58px; object-fit:contain; border-radius:13px; padding:3px;
  background:rgba(0,0,0,.18); box-shadow:0 14px 28px rgba(0,0,0,.28);
}
.boss-hall-head b, .boss-hall-head small { display:block; line-height:1.2; }
.boss-hall-head b { color:var(--text); font-size:13px; }
.boss-hall-head small { color:var(--muted); font-size:11.5px; margin-top:3px; }
.boss-hall-power {
  display:grid; grid-template-columns:36px 1fr; gap:8px; align-items:center;
  margin-top:10px; padding:8px; border:1px solid rgba(104,216,189,.28);
  border-radius:12px; background:rgba(104,216,189,.08);
}
.boss-hall-power-img {
  width:36px; height:36px; object-fit:contain; border-radius:9px; background:rgba(0,0,0,.18);
}
.boss-hall-power b, .boss-hall-power small { display:block; line-height:1.2; }
.boss-hall-power b { color:var(--accent-2); font-size:12px; }
.boss-hall-power small { color:var(--muted); font-size:11px; margin-top:2px; }
.boss-title-rack {
  display:grid; gap:8px; margin-top:8px; padding:8px; border-radius:14px;
  border:1px solid rgba(244,201,107,.18);
  background:linear-gradient(135deg, rgba(244,201,107,.1), rgba(123,168,255,.055));
}
.boss-title-active, .boss-title-chip {
  display:grid; grid-template-columns:42px 1fr; gap:8px; align-items:center; text-align:left;
}
.boss-title-active-img, .boss-title-chip-img {
  width:42px; height:42px; object-fit:cover; border-radius:10px;
  background:#101827; border:1px solid rgba(255,255,255,.1);
}
.boss-title-active b, .boss-title-active small,
.boss-title-active em, .boss-title-chip b,
.boss-title-chip small { display:block; line-height:1.15; }
.boss-title-active b { color:var(--gold); font-size:12.5px; }
.boss-title-active small, .boss-title-chip small { color:var(--muted); font-size:10.5px; margin-top:2px; }
.boss-title-active em {
  color:#dce7ff; font-size:10.5px; font-style:normal; margin-top:3px;
  overflow-wrap:anywhere;
}
.boss-title-quest {
  display:grid; grid-template-columns:42px 1fr auto; gap:8px; align-items:center;
  border:1px solid rgba(104,216,189,.22); border-radius:12px; padding:7px;
  background:linear-gradient(135deg, rgba(104,216,189,.12), rgba(244,201,107,.07));
  color:var(--text); text-align:left;
}
.boss-title-quest.ready { border-color:rgba(104,216,189,.58); }
.boss-title-quest-img { width:42px; height:42px; object-fit:cover; border-radius:10px; }
.boss-title-quest b, .boss-title-quest small, .boss-title-quest em { display:block; line-height:1.15; }
.boss-title-quest b { color:var(--accent-2); font-size:12px; }
.boss-title-quest small, .boss-title-quest em { color:var(--muted); font-size:10.5px; font-style:normal; margin-top:2px; }
.boss-title-quest strong { color:var(--gold); font-size:11px; white-space:nowrap; }
.boss-title-list { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:6px; }
.boss-title-chip {
  border:1px solid rgba(255,255,255,.08); border-radius:11px; padding:6px;
  background:rgba(8,13,23,.48); color:var(--text);
}
.boss-title-chip.active { border-color:rgba(244,201,107,.5); background:rgba(244,201,107,.1); }
.boss-title-chip:disabled { opacity:.46; cursor:default; }
.boss-title-chip b { font-size:10.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.boss-hall-milestones {
  display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:7px; margin-top:10px;
}
.boss-hall-milestone {
  min-width:0; display:grid; grid-template-columns:34px 1fr; gap:7px; align-items:center;
  padding:7px; border:1px solid rgba(255,255,255,.1); border-radius:12px;
  background:rgba(8,13,23,.42);
}
.boss-hall-milestone.ready {
  border-color:rgba(104,216,189,.34); background:linear-gradient(135deg, rgba(104,216,189,.1), rgba(255,211,122,.08));
}
.boss-hall-prize {
  width:34px; height:34px; object-fit:cover; border-radius:9px; background:#101827;
}
.boss-hall-milestone span { min-width:0; }
.boss-hall-milestone b, .boss-hall-milestone small {
  display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; line-height:1.18;
}
.boss-hall-milestone b { font-size:10.6px; }
.boss-hall-milestone small { color:var(--muted); font-size:9.8px; margin-top:2px; }
.boss-hall-milestone button {
  grid-column:1 / -1; border:1px solid rgba(255,211,122,.24); border-radius:9px;
  background:rgba(255,211,122,.14); color:var(--text); padding:6px 5px; font-size:10.5px; font-weight:900;
}
.boss-hall-milestone button:disabled {
  color:var(--muted); border-color:rgba(255,255,255,.08); background:rgba(255,255,255,.055);
}
.boss-hall-track {
  display:grid; grid-auto-flow:column; grid-auto-columns:minmax(112px, 124px);
  gap:8px; margin-top:10px; overflow-x:auto; padding-bottom:3px; overscroll-behavior-x:contain;
}
.boss-hall-tile {
  min-width:0; border:1px solid rgba(255,255,255,.1); border-radius:12px; padding:7px;
  background:rgba(8,13,23,.46); color:var(--text);
}
.boss-hall-tile.conquered { border-color:rgba(255,211,122,.36); background:rgba(255,211,122,.08); }
.boss-hall-tile.locked { opacity:.68; }
.boss-hall-boss { width:100%; aspect-ratio:1/1; display:grid; place-items:center; }
.boss-hall-boss .boss-art {
  width:100%; height:100%; object-fit:contain; border-radius:10px;
  background:rgba(0,0,0,.18); padding:3px;
}
.boss-hall-tile b, .boss-hall-tile small, .boss-hall-tile em {
  display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.boss-hall-tile b { margin-top:5px; font-size:10.8px; line-height:1.18; }
.boss-hall-tile small, .boss-hall-tile em { color:var(--muted); font-size:10px; margin-top:2px; font-style:normal; }

.chapter-head { display:flex; gap: 14px; align-items:center; }
.chapter-head .boss-art { width: 90px; height: 90px; flex:none; }
.chapter-head-art {
  width: 96px; height: 96px; flex:none; object-fit: contain;
  border-radius: 12px; background: rgba(239,229,207,.06); padding: 6px;
}
.boss-rx-panel {
  display:grid; grid-template-columns:86px 1fr; gap:10px; align-items:center;
  margin:12px 0; padding:12px; border:1px solid rgba(255,211,122,.28);
  border-radius:14px; background:linear-gradient(135deg, rgba(255,211,122,.12), rgba(20,28,46,.95));
}
.boss-rx-panel>.boss-art {
  width:86px; height:86px; object-fit:contain; border-radius:14px;
  background:rgba(0,0,0,.16); padding:4px;
}
.boss-rx-copy { min-width:0; }
.boss-rx-copy .mini-title { margin-bottom:3px; color:var(--gold); }
.boss-rx-copy b, .boss-rx-skill b { display:block; color:var(--text); line-height:1.15; }
.boss-rx-copy small, .boss-rx-copy p, .boss-rx-skill small {
  display:block; color:var(--muted); font-size:11.3px; line-height:1.32; margin:3px 0 0;
}
.boss-rx-copy i { display:block; height:6px; margin-top:7px; border-radius:99px; overflow:hidden; background:#0b1020; }
.boss-rx-copy u { display:block; height:100%; background:linear-gradient(90deg, var(--bad), var(--gold), var(--accent)); }
.boss-rx-tags { display:flex; flex-wrap:wrap; gap:5px; margin-top:7px; }
.boss-rx-tags em {
  font-style:normal; font-size:10.5px; color:var(--text); border:1px solid rgba(255,255,255,.1);
  border-radius:999px; padding:3px 7px; background:rgba(0,0,0,.16);
}
.boss-rx-skill {
  grid-column:1 / -1; display:grid; grid-template-columns:38px 1fr; gap:8px; align-items:center;
  border:1px solid rgba(104,216,189,.2); border-radius:11px; padding:8px; background:rgba(104,216,189,.06);
}
.boss-rx-skill-img { width:38px; height:38px; object-fit:cover; border-radius:10px; background:#101827; }
.boss-rx-actions { grid-column:1 / -1; display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.boss-rx-actions button {
  border:1px solid rgba(143,182,255,.28); border-radius:10px; background:rgba(12,20,36,.76);
  color:var(--text); padding:9px 10px; font-size:12px; font-weight:900; cursor:pointer;
}
.boss-rx-actions button:first-child { background:linear-gradient(135deg, var(--gold), #ffdca2); color:#101421; }
.boss-record-card {
  display:grid; grid-template-columns:54px 1fr; gap:10px; align-items:center;
  margin:10px 0 0; padding:10px;
  border:1px solid rgba(104,216,189,.25); border-radius:14px;
  background:linear-gradient(135deg, rgba(104,216,189,.12), rgba(255,211,122,.08));
}
.boss-record-img {
  width:54px; height:54px; object-fit:contain; border-radius:12px;
  background:rgba(0,0,0,.18); padding:3px; box-shadow:0 12px 24px rgba(0,0,0,.28);
}
.boss-record-card b, .boss-record-card small, .boss-record-card p {
  display:block; line-height:1.25;
}
.boss-record-card b { color:var(--text); font-size:13px; }
.boss-record-card small, .boss-record-card p {
  color:var(--muted); font-size:11px; margin:3px 0 0;
}

/* 보스전 무대 */
.boss-stage {
  background:
    radial-gradient(circle at 50% 44%, rgba(104,216,189,.18), transparent 42%),
    linear-gradient(160deg, var(--card-2), var(--card));
  border:1px solid var(--line); border-radius: var(--r); padding: 14px 16px 16px; margin-bottom: 12px;
}
.boss-bar-row { display:flex; align-items:center; justify-content:space-between; margin-bottom: 8px; }
.boss-name { font-weight:800; font-size: 16px; color: var(--bad); letter-spacing:.3px; }
.hearts { font-size: 16px; letter-spacing: 2px; }

.boss-hp {
  height: 16px; border-radius: 999px; background:#0d1126; border:1px solid var(--line);
  overflow:hidden; position:relative;
}
.boss-hp > i {
  display:block; height:100%; width:100%;
  background: linear-gradient(90deg, var(--bad), #ff9aa6);
  transition: width .55s cubic-bezier(.4,0,.2,1);  /* HP 드레인 트랜지션 */
}

.boss-figure { position: relative; display:flex; justify-content:center; margin: 8px 0 4px; }
.boss-figure .boss-art { width: 164px; height: 164px; object-fit: contain; }
.boss-figure .boss-asset {
  width: 196px; height: 196px;
  filter: drop-shadow(0 18px 26px rgba(0,0,0,.48)) drop-shadow(0 0 18px rgba(104,216,189,.18));
  margin: -12px 0 0;
}
.dmg-layer { position:absolute; inset:0; pointer-events:none; }

/* 대미지 숫자 플로팅 */
.dmg-num {
  position:absolute; left:50%; top: 30%; transform: translateX(-50%);
  font-weight:800; font-size: 26px; color: var(--gold); text-shadow: 0 2px 8px rgba(0,0,0,.6);
  animation: dmgFloat .9s ease-out forwards; white-space: nowrap;
}
.dmg-num.crit { font-size: 34px; color: #fff; text-shadow: 0 0 12px var(--gold), 0 2px 6px rgba(0,0,0,.6); }
.dmg-num.miss { color: var(--muted); font-size: 20px; }
@keyframes dmgFloat {
  0% { opacity:0; transform: translate(-50%, 10px) scale(.6); }
  25% { opacity:1; transform: translate(-50%, -6px) scale(1.15); }
  100% { opacity:0; transform: translate(-50%, -46px) scale(1); }
}

/* 보스 피격 흔들림 */
.shake { animation: shake .42s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake {
  10%,90% { transform: translateX(-2px); }
  20%,80% { transform: translateX(4px); }
  30%,50%,70% { transform: translateX(-8px); }
  40%,60% { transform: translateX(8px); }
}

/* 콤보 미터 + 플래시 */
.combo-meter {
  text-align:center; margin-top: 6px; font-weight:800; font-size: 15px; color: var(--muted);
  transition: color .2s;
}
.combo-meter small { font-weight:600; font-size: 12px; }
.combo-meter.hot { color: var(--gold); }
.combo-meter.flash { animation: comboFlash .5s ease-out; }
@keyframes comboFlash {
  0% { transform: scale(1); text-shadow:none; }
  40% { transform: scale(1.35); color:#fff; text-shadow: 0 0 16px var(--gold); }
  100% { transform: scale(1); }
}
.boss-pattern-card {
  margin-top: 9px; padding: 9px 10px; border-radius: 10px;
  border: 1px solid rgba(255,211,122,.24); background: rgba(255,211,122,.07);
}
.boss-pattern-card b { display:block; color: var(--gold); font-size: 13px; }
.boss-pattern-card span { display:block; color: var(--muted); font-size: 11.5px; margin-top: 2px; line-height: 1.35; }
.boss-pattern-card div { display:flex; flex-wrap:wrap; gap:5px; margin-top: 7px; }
.boss-pattern-card em {
  font-style:normal; font-size: 10.5px; color: var(--text);
  border:1px solid rgba(255,255,255,.08); border-radius:999px; padding:3px 7px;
  background:rgba(0,0,0,.16);
}
.boss-skillbar {
  border:1px solid rgba(104,216,189,.2); border-radius:12px; padding:10px;
  background:rgba(104,216,189,.055); margin:-4px 0 12px;
}
.boss-skill-actions { display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; margin-top:8px; }
.boss-skill {
  min-height:58px; display:flex; align-items:center; justify-content:center; gap:6px;
  border:1px solid rgba(255,255,255,.08); border-radius:10px; background:rgba(255,255,255,.04);
  color:var(--text); cursor:pointer; padding:6px;
}
.boss-skill:disabled { opacity:.55; cursor:default; }
.boss-skill.passive:disabled {
  opacity:1; border-color:rgba(104,216,189,.3); background:rgba(104,216,189,.08);
}
.boss-skill.recommended {
  border-color: rgba(255,211,122,.46);
  background: linear-gradient(180deg, rgba(255,211,122,.12), rgba(255,255,255,.04));
}
.boss-skill.spent { opacity:.45; }
.boss-skill-img { width:30px; height:30px; object-fit:contain; flex:none; }
.boss-skill span { display:block; font-size:11.5px; font-weight:800; line-height:1.2; }
.boss-skill small { display:block; color:var(--muted); font-size:10.5px; font-weight:700; margin-top:2px; }
.skill-readout { color:var(--muted); font-size:12px; line-height:1.45; }
.skill-readout {
  display:grid; grid-template-columns:34px 1fr; gap:8px; align-items:center;
}
.skill-readout-img { width:34px; height:34px; object-fit:cover; border-radius:9px; }
.skill-readout b { display:block; color:var(--accent-2); font-size:12.5px; }
.skill-note {
  border-left:3px solid var(--accent-2); padding:8px 10px; margin:10px 0;
  background:rgba(104,216,189,.08); color:var(--text); font-size:12.5px; line-height:1.45;
}
.boss-pattern-note {
  margin-top: 10px; padding: 8px 10px; border-radius: 10px;
  background: rgba(255,211,122,.10); color: var(--gold); font-size: 12.5px; line-height: 1.45;
  border: 1px solid rgba(255,211,122,.22);
}

/* 내가 피격당했을 때 화면 붉은 플래시 */
.hurt { animation: hurtFlash .45s ease-out; }
@keyframes hurtFlash {
  0% { box-shadow: inset 0 0 0 0 rgba(255,107,129,0); }
  30% { box-shadow: inset 0 0 120px 0 rgba(255,107,129,.35); }
  100% { box-shadow: inset 0 0 0 0 rgba(255,107,129,0); }
}

.boss-q { margin-bottom: 0; }

@media (max-height: 880px) and (max-width: 520px) {
  .boss-stage { padding: 10px 14px 12px; margin-bottom: 8px; }
  .boss-bar-row { margin-bottom: 6px; }
  .boss-hp { height: 13px; }
  .boss-figure { margin: 0; }
  .boss-figure .boss-art { width: 126px; height: 126px; }
  .boss-figure .boss-asset { width: 146px; height: 146px; margin: -8px 0 2px; }
  .combo-meter { margin-top: 2px; font-size: 13px; }
  .boss-pattern-card { margin-top: 6px; padding: 7px 8px; }
  .boss-pattern-card span { font-size: 11px; }
  .boss-pattern-card div { gap: 4px; margin-top: 5px; }
  .boss-skillbar { padding: 8px; margin: -2px 0 8px; }
  .boss-skill-actions { gap: 6px; margin-top: 6px; }
  .boss-skill { min-height: 48px; padding: 5px; gap: 4px; }
  .boss-skill-img { width: 24px; height: 24px; }
  .boss-skill span { font-size: 10.5px; }
  .skill-readout { font-size: 11.5px; }
  .boss-q { padding: 14px; }
  .quiz-term { font-size: 25px; margin: 4px 0 12px; }
  .choice { padding: 13px 14px; font-size: 15px; }
}

/* 승리 연출 */
.victory .victory-burst {
  width: 160px; height: 160px; margin: 0 auto 4px; display:grid; place-items:center;
  animation: pop .55s ease-out;
}
.victory-img, .exam-reward-img {
  width:100%; height:100%; object-fit:contain;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.45)) drop-shadow(0 0 18px rgba(255,218,121,.24));
}
.boss-result .victory-burst { width:96px; height:96px; margin:-6px auto 0; }
.boss-result .verdict.ok { font-size:25px !important; margin-top:4px !important; }
.boss-result .ans { font-size:13px; }
.boss-result .result-loot { margin:7px 0; gap:5px; }
.boss-result .result-prescription { margin:7px 0; padding:7px 8px; }
.boss-result .settle-rank { padding:7px 9px; }
.unlock-card {
  display:flex; align-items:center; justify-content:center; gap:10px;
  margin:10px auto 2px; padding:8px 12px; max-width:280px;
  border:1px solid rgba(255,218,121,.22); border-radius:14px;
  background:rgba(255,218,121,.075); color:var(--text); font-weight:800;
}
.unlock-img { width:46px; height:46px; object-fit:contain; flex:none; }
.exam-medal {
  width:136px; height:136px; margin:-4px auto 2px;
  display:grid; place-items:center;
}

@media (max-width: 520px) {
  .doctor-profile-actions button,
  .utility-grid button,
  .tactic-panel button,
  .gear-actions button,
  .skill-actions button,
  .rotation-actions button,
  .ward-actions button,
  .territory-actions button,
  .boss-after-actions .cta,
  .boss-retry-actions .cta,
  .boss-rx-actions button,
  .boss-hall-milestone button {
    min-height: 44px;
  }
}
