:root {
  color-scheme: dark;
  --gold-1: #ffe58a; --gold-2: #ffbf1f; --gold-3: #b86e00; --gold-ink: #5a2d00;
  --blue-1: #8ec5ff; --blue-2: #2f6df0; --blue-3: #143b9e; --blue-ink: #0a1d52;
  --green-1: #9dff8a; --green-2: #22c55e; --green-3: #0d7a36; --green-ink: #053d1a;
  --red-1: #ff9a8a; --red-2: #ef3b3b; --red-3: #8f1111;
  --panel: rgba(12, 20, 46, 0.92); --panel-2: rgba(25, 38, 82, 0.95);
  --line: #3cc8ff; --text: #f4fbff; --muted: #b9c3e6;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --font: "Jua", "Lilita One", system-ui, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --num: "Lilita One", "Jua", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
html, body { margin: 0; height: 100%; background: #05070f; overflow: hidden; color: var(--text); font-family: var(--font); touch-action: none; overscroll-behavior: none; }
#app { position: relative; width: 100%; height: 100%; margin: 0 auto; overflow: hidden; background: #0b1530; }
@media (min-aspect-ratio: 3/4) { #app { width: min(100vw, calc(100vh * 0.5625)); box-shadow: 0 0 80px rgba(0,0,0,0.8); } }
canvas#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hidden { display: none !important; }
button { font-family: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
img { -webkit-user-drag: none; }

/* ── buttons ───────────────────────────────────────── */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px;
  border-radius: 18px; font-size: 20px; letter-spacing: 0.5px; color: #fff; transition: transform .08s ease, filter .15s;
  text-shadow: 0 2px 0 rgba(0,0,0,0.35); }
.btn:active { transform: translateY(3px) scale(0.98); }
.btn[disabled] { filter: grayscale(0.85) brightness(0.75); pointer-events: none; }
.btn.gold { background: linear-gradient(180deg, var(--gold-1), var(--gold-2) 55%, #f29a00); color: var(--gold-ink); text-shadow: 0 1px 0 rgba(255,255,255,0.6);
  box-shadow: inset 0 -5px 0 var(--gold-3), inset 0 2px 0 rgba(255,255,255,0.7), 0 5px 0 #6b3a00, 0 10px 18px rgba(0,0,0,0.45); }
.btn.blue { background: linear-gradient(180deg, var(--blue-1), var(--blue-2) 55%, #2457d8);
  box-shadow: inset 0 -5px 0 var(--blue-3), inset 0 2px 0 rgba(255,255,255,0.5), 0 5px 0 #0a1f5c, 0 10px 18px rgba(0,0,0,0.45); }
.btn.green { background: linear-gradient(180deg, var(--green-1), var(--green-2) 55%, #16a34a);
  box-shadow: inset 0 -5px 0 var(--green-3), inset 0 2px 0 rgba(255,255,255,0.55), 0 5px 0 #064d22, 0 10px 18px rgba(0,0,0,0.45); }
.btn.red { background: linear-gradient(180deg, var(--red-1), var(--red-2) 55%, #d42020);
  box-shadow: inset 0 -5px 0 var(--red-3), inset 0 2px 0 rgba(255,255,255,0.45), 0 5px 0 #5c0808, 0 10px 18px rgba(0,0,0,0.45); }
.btn.ghost { background: rgba(255,255,255,0.08); border: 2px solid rgba(255,255,255,0.25); box-shadow: none; min-height: 44px; font-size: 17px; }
.btn.big { min-height: 72px; font-size: 30px; border-radius: 24px; padding: 0 34px; }
.btn .ad { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; background: rgba(0,0,0,0.28); font-size: 13px; }
.btn img.ico { width: 26px; height: 26px; object-fit: contain; }
.icon-btn { width: 46px; height: 46px; border-radius: 15px; background: linear-gradient(180deg, #3a4f8f, #1c2b5c); box-shadow: inset 0 -4px 0 #0d1838, inset 0 2px 0 rgba(255,255,255,0.25), 0 4px 10px rgba(0,0,0,0.5);
  display: inline-flex; align-items: center; justify-content: center; font-size: 22px; }
.icon-btn:active { transform: translateY(2px); }
.pause-ico { width: 14px; height: 18px; border-left: 5px solid #fff; border-right: 5px solid #fff; }

/* ── pills ─────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px 0 6px; border-radius: 20px; background: rgba(5,10,30,0.72);
  border: 2px solid rgba(255,214,90,0.55); font-family: var(--num); font-size: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.4); }
.pill img { width: 32px; height: 32px; object-fit: contain; }
.pill .plus { width: 24px; height: 24px; border-radius: 8px; background: var(--green-2); color: #fff; font-size: 20px; line-height: 22px; text-align: center; margin-left: 4px; box-shadow: inset 0 -3px 0 var(--green-3); }

/* ── HUD ───────────────────────────────────────────── */
#hud { position: absolute; inset: 0; pointer-events: none; }
#hud .hud-top { position: absolute; top: calc(10px + var(--safe-t)); left: 10px; right: 10px; display: flex; align-items: center; gap: 10px; pointer-events: auto; }
.stage-pill { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stage-pill span { font-family: var(--num); font-size: 18px; text-shadow: 0 2px 0 #000, 0 0 8px rgba(0,0,0,0.6); }
.prog { position: relative; width: 100%; max-width: 230px; height: 12px; border-radius: 8px; background: rgba(0,0,0,0.55); border: 2px solid rgba(255,255,255,0.35); overflow: visible; }
.prog i { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; border-radius: 6px; background: linear-gradient(90deg, #6fe7ff, #3b82f6); transition: width .2s linear; }
.prog b { position: absolute; right: -8px; top: -9px; width: 26px; height: 26px; background: no-repeat center/contain; display: none; }
.prog b.on { display: block; }
.kill-pill { min-width: 70px; height: 38px; padding: 0 12px; border-radius: 19px; background: rgba(5,10,30,0.72); border: 2px solid rgba(255,120,120,0.5); display: flex; align-items: center; gap: 6px; font-family: var(--num); font-size: 18px; }
.kill-pill .sk { font-size: 16px; }
#army-label { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); pointer-events: none; will-change: transform; }
#army-label span { display: block; min-width: 54px; padding: 4px 14px 5px; border-radius: 16px; text-align: center; font-family: var(--num); font-size: 26px; color: #fff;
  background: linear-gradient(180deg, #4f8dff, #1f4fd0); border: 3px solid #fff; box-shadow: 0 4px 0 #0b2470, 0 6px 14px rgba(0,0,0,0.5); text-shadow: 0 2px 0 #0b2470; transition: transform .12s; }
#army-label span.bump { transform: scale(1.25); }
#army-label span.hurt { background: linear-gradient(180deg, #ff7a7a, #d42020); box-shadow: 0 4px 0 #6b0b0b, 0 6px 14px rgba(0,0,0,0.5); }
#boss-bar { position: absolute; top: calc(66px + var(--safe-t)); left: 12px; right: 12px; display: flex; align-items: center; gap: 8px; pointer-events: none; animation: dropIn .4s ease; }
#boss-bar img { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 3px 4px #000); }
.bb-main { flex: 1; }
.bb-name { font-size: 17px; color: #ffd0c0; text-shadow: 0 2px 0 #000; margin-bottom: 3px; }
.bb-track { position: relative; height: 20px; border-radius: 10px; background: rgba(0,0,0,0.7); border: 2px solid #ffb4a0; overflow: hidden; }
.bb-track i { position: absolute; inset: 0; width: 100%; background: linear-gradient(180deg, #ff6b5b, #c8121e); transition: width .15s; }
.bb-track span { position: absolute; inset: 0; text-align: center; font-family: var(--num); font-size: 14px; line-height: 17px; text-shadow: 0 1px 0 #000; }
#tip { position: absolute; left: 50%; top: 24%; transform: translateX(-50%); width: min(88%, 380px); padding: 12px 16px; border-radius: 16px; text-align: center; font-size: 19px; line-height: 1.3;
  background: rgba(8,14,40,0.85); border: 2px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,0.5); animation: tipIn .35s ease; }
#drag-hint { position: absolute; left: 50%; bottom: 20%; width: 220px; height: 70px; transform: translateX(-50%); }
#drag-hint .track { position: absolute; left: 10px; right: 10px; top: 30px; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.35); }
#drag-hint .hand { position: absolute; top: 0; font-size: 44px; animation: swipe 1.6s ease-in-out infinite; filter: drop-shadow(0 4px 4px #000); }
@keyframes swipe { 0%,100% { left: 0; } 50% { left: 170px; } }
#flash { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, rgba(255,0,0,0) 40%, rgba(255,20,20,0.55)); opacity: 0; transition: opacity .25s; }

/* floating combat text */
#fx-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ft { position: absolute; left: 0; top: 0; font-family: var(--num); font-size: 24px; color: #fff; white-space: nowrap; text-shadow: 0 3px 0 rgba(0,0,0,0.6), 0 0 6px rgba(0,0,0,0.6); will-change: transform, opacity; }
.ft.gain { color: #8dff9c; -webkit-text-stroke: 1px #0b4a1a; }
.ft.loss { color: #ff8b80; -webkit-text-stroke: 1px #5a0808; }
.ft.big { font-size: 32px; }
.ft.huge { font-size: 44px; }
.ft.pop { font-size: 28px; }

/* ── screens / panels ─────────────────────────────── */
#screens { position: absolute; inset: 0; pointer-events: none; }
#screens > * { pointer-events: auto; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; }
.home-bg { position: absolute; inset: 0; background: #0b1530 center/cover no-repeat; }
.home-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,8,24,0.15) 0%, rgba(4,8,24,0) 35%, rgba(4,8,24,0.55) 62%, rgba(4,8,24,0.95) 100%); }
.home-bg.day::after { background: linear-gradient(180deg, rgba(4,8,24,0.25) 0%, rgba(4,8,24,0) 26%, rgba(4,8,24,0) 48%, rgba(4,8,24,0.62) 66%, rgba(4,8,24,0.94) 100%); }
.home-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: calc(10px + var(--safe-t)) 12px 0; gap: 8px; }
.home-logo { position: relative; z-index: 2; width: min(58%, 270px); margin: 4px auto 0 12px; display: block; filter: drop-shadow(0 8px 16px rgba(0,0,0,0.6)); animation: logoFloat 4s ease-in-out infinite; }
.home-sub { position: relative; z-index: 2; text-align: left; padding-left: 22px; font-size: 16px; color: #bfeaff; text-shadow: 0 2px 0 #000; margin-top: -6px; }
.home-mid { flex: 1; }
.home-bottom { position: relative; z-index: 2; padding: 0 14px calc(14px + var(--safe-b)); display: flex; flex-direction: column; gap: 12px; }
body.has-banner .home-bottom { padding-bottom: calc(var(--banner-h, 60px) + 4px + var(--safe-b)); }
.stage-card { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 20px; background: var(--panel); border: 2px solid rgba(246,196,69,0.6); box-shadow: 0 8px 24px rgba(0,0,0,0.5); }
.stage-card .ch-thumb { width: 92px; height: 58px; border-radius: 12px; background: center/cover no-repeat; border: 2px solid rgba(255,255,255,0.3); flex: none; }
.stage-card .info { flex: 1; min-width: 0; }
.stage-card .ch-name { font-size: 15px; color: var(--muted); }
.stage-card .st-name { font-family: var(--num); font-size: 26px; line-height: 1.1; }
.stage-card .st-name small { font-family: var(--font); font-size: 15px; color: #ffcf6a; margin-left: 6px; }
.dots { display: flex; gap: 4px; margin-top: 6px; }
.dots i { flex: 1; height: 7px; border-radius: 4px; background: rgba(255,255,255,0.15); }
.dots i.done { background: linear-gradient(90deg, #ffd54a, #ff9d00); }
.dots i.cur { background: #fff; box-shadow: 0 0 8px #fff; }
.dots i.boss { position: relative; }
.dots i.boss::after { content: '☠'; position: absolute; top: -15px; left: 50%; transform: translateX(-50%); font-size: 11px; color: #ff8080; }
.play-row { display: flex; gap: 10px; align-items: stretch; }
.play-row .btn.big { flex: 1; }
.boost-btn { width: 86px; flex: none; flex-direction: column; gap: 0; font-size: 13px; line-height: 1.1; padding: 4px; min-height: 72px; border-radius: 22px; }
.boost-btn b { font-family: var(--num); font-size: 22px; }
.boost-btn.on { background: linear-gradient(180deg, #fff3b0, #ffd23a); color: var(--gold-ink); box-shadow: inset 0 -5px 0 var(--gold-3), 0 5px 0 #6b3a00, 0 0 18px rgba(255,210,58,0.8); }
.nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.nav button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px 8px; border-radius: 18px; background: var(--panel); border: 2px solid rgba(255,255,255,0.14); font-size: 14px; box-shadow: 0 6px 14px rgba(0,0,0,0.4); }
.nav button:active { transform: translateY(2px); }
.nav img { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(0,0,0,0.5)); }
.badge { position: absolute; top: -6px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--red-2); border: 2px solid #fff; font-family: var(--num); font-size: 13px; line-height: 18px; box-shadow: 0 2px 6px rgba(0,0,0,0.5); animation: pulse 1.2s ease-in-out infinite; }
.side-btns { position: relative; z-index: 3; display: flex; flex-direction: row; gap: 6px; margin: 10px 0 0 10px; align-self: flex-start; }
.side-btn { width: 64px; display: flex; flex-direction: column; align-items: center; font-size: 12px; text-align: center; line-height: 1.1; text-shadow: 0 2px 0 #000; }
.side-btn .ic { width: 56px; height: 56px; border-radius: 18px; background: var(--panel); border: 2px solid rgba(60,200,255,0.75); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 14px rgba(0,0,0,0.45); margin-bottom: 3px; position: relative; }
.side-btn .ic img { width: 46px; height: 46px; object-fit: contain; }
.side-btn .ic .noad { font-family: var(--num); font-size: 15px; color: #fff; background: var(--red-2); border-radius: 8px; padding: 2px 6px; transform: rotate(-8deg); box-shadow: 0 2px 0 var(--red-3); }
.side-btn .timer { font-family: var(--num); color: #ffe08a; }
.side-btn.dim .ic { filter: grayscale(0.7) brightness(0.7); }

/* sheets & modals */
.modal-wrap { position: absolute; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center; background: rgba(2,4,14,0.6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s; }
.modal-wrap.show { opacity: 1; }
.modal-wrap.center { align-items: center; }
/* v3.14: a card taller than the screen (a region clear with a Core line on a 640-px phone) scrolls instead of running off
   both ends — auto margins centre it when it fits and pin it to the top when it doesn't; a result card that has to scroll
   (.tall, ui.openModal) also gets room above for the leader portrait that sticks out of it (.res-hero) */
.modal-wrap.center { align-items: flex-start; overflow-y: auto; touch-action: pan-y; padding: 10px 0; }
.modal-wrap.center > .modal { margin: auto; flex: none; }
.modal-wrap.center.has-hero.tall { padding-top: calc(10px + min(86px, 10vh)); }
/* short phones (≤700 px tall): result cards a size smaller so the portrait, the card and its buttons fit a 640-px screen */
@media (max-height: 700px) {
  .modal .chapter-art { aspect-ratio: 32/9; margin: 4px 0; }
  .res-hero .art { width: 136px; height: 122px; }
  .result-title { font-size: 40px; margin-bottom: 2px; }
  .stars { font-size: 28px; margin-bottom: 2px; }
  .stats { margin: 4px 0 6px; } .stats div { padding: 5px 8px; }
  .reward-box { font-size: 34px; margin: 4px 0 0; } .reward-box img { width: 50px; height: 50px; }
  .modal .col { gap: 8px; margin-top: 10px; } .modal .btn.big { min-height: 60px; }
  .later { margin-top: 6px; }
}
/* the ×3 button on one line ("3배 받기 +4,260" broke as "3배 받 / 기" at 360 px) */
.modal .col .btn { word-break: keep-all; }
@media (max-width: 374px) { .modal .col .btn.big { font-size: 24px; padding: 0 16px; white-space: nowrap; } }
body > .modal-wrap { position: fixed; }
.sheet { width: 100%; max-height: 86%; display: flex; flex-direction: column; border-radius: 26px 26px 0 0; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border-top: 3px solid var(--line);
  box-shadow: 0 -10px 30px rgba(0,0,0,0.6); padding: 12px 14px calc(16px + var(--safe-b)); transform: translateY(100%); transition: transform .28s cubic-bezier(.2,.9,.3,1.1); }
.modal-wrap.show .sheet { transform: translateY(0); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sheet-head h2 { margin: 0; font-size: 26px; font-weight: normal; color: #ffe08a; text-shadow: 0 2px 0 #000; }
.sheet-body { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 2px 2px 6px; touch-action: pan-y; }
.close-x { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,0.1); font-size: 22px; }
.modal { width: min(92%, 400px); border-radius: 26px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 3px solid var(--line); padding: 20px 18px 18px; text-align: center;
  box-shadow: 0 16px 40px rgba(0,0,0,0.7); transform: scale(0.85); transition: transform .25s cubic-bezier(.2,.9,.3,1.3); }
.modal-wrap.show .modal { transform: scale(1); }
.modal.small { padding: 18px; }
.modal .row { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.modal .row .btn { flex: 1; }
.modal .col { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.confirm-text { white-space: pre-line; font-size: 19px; margin: 6px 0 4px; }
.card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; background: rgba(255,255,255,0.06); border: 2px solid rgba(255,255,255,0.12); }
.card .ci { width: 62px; height: 62px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 16px; background: radial-gradient(circle at 50% 40%, rgba(255,255,255,0.18), rgba(255,255,255,0.03)); }
.card .ci img { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(0,0,0,0.5)); }
.card .cm { flex: 1; min-width: 0; text-align: left; }
.card .cn { font-size: 19px; }
.card .cn .lv { font-family: var(--num); font-size: 15px; color: #8ec5ff; margin-left: 6px; }
.card .cd { font-size: 14px; color: var(--muted); margin-top: 2px; }
.card .btn { min-height: 46px; font-size: 18px; padding: 0 12px; border-radius: 14px; min-width: 98px; }
.card .btn img { width: 22px; height: 22px; }
.card.hl { border-color: rgba(246,196,69,0.9); background: linear-gradient(180deg, rgba(255,200,60,0.18), rgba(255,200,60,0.04)); }
.card .ribbon { position: absolute; top: -8px; left: 10px; padding: 2px 10px; border-radius: 8px; background: var(--red-2); font-family: var(--num); font-size: 13px; box-shadow: 0 2px 0 var(--red-3); }
.card { position: relative; }
.skin-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.skin { position: relative; display: flex; flex-direction: column; align-items: center; padding: 10px 8px; border-radius: 18px; background: rgba(255,255,255,0.06); border: 2px solid rgba(255,255,255,0.14); text-align: center; }
.skin.sel { border-color: var(--green-2); box-shadow: 0 0 16px rgba(34,197,94,0.5); }
.skin > img { width: 96px; height: 110px; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(0,0,0,0.5)); }
.skin .sn { font-size: 17px; margin-top: 4px; }
.skin .sd { font-size: 12.5px; color: #9fe3ff; min-height: 32px; margin: 2px 0 6px; }
.skin .btn { min-height: 40px; font-size: 16px; width: 100%; border-radius: 12px; padding: 0 8px; }
.result-title { font-size: 48px; margin: 0 0 6px; color: #ffe066; text-shadow: 0 4px 0 #8a4a00, 0 0 20px rgba(255,200,40,0.6); letter-spacing: 1px; animation: popIn .5s cubic-bezier(.2,.9,.3,1.5); }
.result-title.lose { color: #ff8a80; text-shadow: 0 4px 0 #5a0808, 0 0 18px rgba(255,60,60,0.5); }
.stars { font-size: 34px; letter-spacing: 6px; margin-bottom: 6px; }
.stats { display: flex; justify-content: center; gap: 12px; margin: 6px 0 10px; }
.stats div { flex: 1; padding: 8px; border-radius: 14px; background: rgba(255,255,255,0.06); }
.stats b { display: block; font-family: var(--num); font-size: 24px; }
.stats span { font-size: 13px; color: var(--muted); }
.reward-box { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 8px 0 2px; font-family: var(--num); font-size: 40px; color: #ffe066; text-shadow: 0 3px 0 #6b3a00; }
.reward-box img { width: 64px; height: 64px; object-fit: contain; animation: bob 1.4s ease-in-out infinite; }
.later { margin-top: 12px; font-size: 16px; color: var(--muted); opacity: 0; transition: opacity .3s; text-decoration: underline; }
.later.show { opacity: 1; }
.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 6px; border-bottom: 1px solid rgba(255,255,255,0.08); font-size: 19px; }
.toggle { width: 64px; height: 34px; border-radius: 17px; background: #3a425e; position: relative; transition: background .2s; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 2px 4px rgba(0,0,0,0.4); }
.toggle.on { background: var(--green-2); }
.toggle.on::after { left: 33px; }
.seg { display: flex; border-radius: 12px; overflow: hidden; border: 2px solid rgba(255,255,255,0.2); }
.seg button { padding: 6px 12px; font-size: 16px; }
.seg button.on { background: var(--blue-2); }
.link { color: #9fc3ff; text-decoration: underline; font-size: 16px; }
.ver { color: #6b77a3; font-size: 13px; text-align: center; margin-top: 8px; }
.chapter-art { width: 100%; aspect-ratio: 16/9; border-radius: 16px; background: center/cover no-repeat; border: 2px solid rgba(255,255,255,0.3); margin: 8px 0; box-shadow: 0 8px 20px rgba(0,0,0,0.5); }
.boss-intro { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.boss-intro div { padding: 14px 30px; font-size: 40px; color: #fff; background: linear-gradient(90deg, rgba(150,0,0,0), rgba(170,0,0,0.85) 20%, rgba(170,0,0,0.85) 80%, rgba(150,0,0,0)); text-shadow: 0 3px 0 #000; animation: bossIn 2.2s ease forwards; width: 100%; text-align: center; }

/* loading */
#loading { position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: #070c1e; transition: opacity .5s; }
#loading .load-bg { position: absolute; inset: 0; background: #070c1e url(assets/loading.webp) 50% 32%/cover no-repeat; }
#loading .load-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,6,18,0.55) 0%, rgba(3,6,18,0) 18%, rgba(3,6,18,0) 62%, rgba(3,6,18,0.86) 86%, rgba(3,6,18,0.96) 100%); }
#loading .load-logo { position: absolute; bottom: calc(21.5% + var(--safe-b)); left: 50%; transform: translateX(-50%); width: min(66%, 320px); filter: drop-shadow(0 8px 16px #000); }
.load-bar { position: relative; width: min(70%, 300px); height: 16px; border-radius: 10px; background: rgba(0,0,0,0.6); border: 2px solid var(--line); overflow: hidden; }
.load-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #ffd54a, #ff9d00); transition: width .2s; }
.load-text { position: relative; font-size: 17px; color: #ffe9b0; text-shadow: 0 2px 0 #000; }

/* mock ad + toast */
.mock-ad { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,0.92); display: flex; align-items: center; justify-content: center; }
.mock-ad-box { position: relative; width: min(86%, 360px); padding: 30px 20px; border-radius: 20px; background: linear-gradient(160deg, #283c86, #45a247); text-align: center; font-family: var(--font); }
.mock-ad-box p { font-size: 15px; opacity: .9; }
.mock-tag { position: absolute; top: 10px; left: 10px; padding: 2px 8px; border-radius: 6px; background: #ffd23a; color: #000; font-size: 12px; }
.mock-count { font-family: var(--num); font-size: 54px; margin-top: 10px; }
.mock-close { position: absolute; top: 8px; right: 8px; width: 38px; height: 38px; border-radius: 50%; background: rgba(0,0,0,0.5); color: #fff; font-size: 18px; }
.mock-close[disabled] { opacity: .3; }
.toast { position: fixed; left: 50%; bottom: 18%; z-index: 120; transform: translate(-50%, 20px); max-width: 86%; padding: 12px 18px; border-radius: 14px; background: rgba(10,16,40,0.95); border: 2px solid var(--line); font-family: var(--font); font-size: 17px; text-align: center; opacity: 0; transition: all .3s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes dropIn { from { transform: translateY(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tipIn { from { transform: translate(-50%, -14px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes popIn { 0% { transform: scale(0.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes logoFloat { 0%,100% { transform: translateY(0) rotate(-0.5deg); } 50% { transform: translateY(-6px) rotate(0.5deg); } }
@keyframes bossIn { 0% { transform: scaleY(0); opacity: 0; } 12% { transform: scaleY(1); opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes shine { from { background-position: -200% 0; } to { background-position: 200% 0; } }
.btn.shine::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,0.55) 50%, transparent 65%); background-size: 200% 100%; animation: shine 2.6s ease-in-out infinite; pointer-events: none; }

/* power-ups */
#buffs { position: absolute; top: calc(64px + var(--safe-t)); left: 12px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
#hud.has-boss #buffs { top: calc(132px + var(--safe-t)); }
.buff { position: relative; width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, rgba(255,255,255,0.28), rgba(10,16,40,0.78)); border: 2px solid var(--bc, #fff);
  box-shadow: 0 0 12px var(--bc, #fff), 0 3px 6px rgba(0,0,0,0.5); animation: buffIn .3s ease; }
.buff img { position: absolute; inset: 5px; width: 32px; height: 32px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.6)); }
.buff i { position: absolute; inset: -2px; border-radius: 50%; }
.buff b { position: absolute; right: -6px; bottom: -6px; min-width: 22px; padding: 0 4px; border-radius: 10px; background: #10183a; border: 1px solid var(--bc, #fff); font-family: var(--num); font-size: 13px; line-height: 18px; text-align: center; color: #fff; }
.buff.ending { animation: buffBlink .25s steps(2) infinite; }
@keyframes buffIn { from { transform: scale(0.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes buffBlink { 50% { opacity: 0.35; } }
.ft.buff { font-size: 34px; color: #ffe066; -webkit-text-stroke: 1.5px #5a3300; }
.ft.unlock { font-size: 30px; color: #ffd84a; -webkit-text-stroke: 1.5px #4a3000; }
.ft.block { font-size: 24px; color: #9cd0ff; -webkit-text-stroke: 1px #0a2a5a; }
#boss-bar.warden .bb-track i { background: linear-gradient(180deg, #ffb24a, #e0620e); }

/* ── siege mode HUD ─────────────────────────────────── */
.s-only { display: none !important; }
#hud.siege .s-only { display: flex !important; }
#hud.siege .s-only.hidden { display: none !important; }
#hud.siege #army-label { display: none !important; }
#s-hp { position: absolute; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%); align-items: center; gap: 6px; padding: 5px 12px; border-radius: 18px;
  background: rgba(5,10,30,0.78); border: 2px solid rgba(255,120,120,0.65); box-shadow: 0 4px 10px rgba(0,0,0,0.45); pointer-events: none; }
#s-hp .hp-ico { color: #ff5a5a; font-size: 18px; text-shadow: 0 2px 0 #000; }
#s-hp .hp-track { width: 112px; height: 12px; border-radius: 6px; background: rgba(0,0,0,0.6); overflow: hidden; border: 1px solid rgba(255,255,255,0.25); }
#s-hp .hp-track i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff5b4b, #ffb03a); transition: width .2s; }
#s-hp b { font-family: var(--num); font-size: 17px; min-width: 22px; text-align: center; }
#s-hp.hurt { animation: hpHurt .3s ease; }
@keyframes hpHurt { 30% { transform: translateX(-50%) scale(1.15); border-color: #ff3b3b; } }
.s-btn { position: absolute; bottom: calc(16px + var(--safe-b)); width: 78px; height: 78px; border-radius: 50%; pointer-events: auto; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 38%, #3b4f8f, #101a3e); border: 3px solid rgba(255,255,255,0.3); box-shadow: 0 6px 14px rgba(0,0,0,0.55); touch-action: none; }
#s-champ { left: 14px; }
#s-ult { right: 14px; }
.s-btn img { position: relative; width: 60px; height: 60px; object-fit: contain; filter: grayscale(0.7) brightness(0.7); transition: filter .2s; pointer-events: none; }
.s-btn .ring { position: absolute; inset: -7px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(var(--rc, #6fe7ff) var(--p, 0deg), rgba(0,0,0,0.55) 0);
  -webkit-mask: radial-gradient(circle, transparent 43px, #000 44px); mask: radial-gradient(circle, transparent 43px, #000 44px); }
#s-ult .ring { --rc: #ffb43a; }
.s-btn .ready { position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); padding: 1px 9px; border-radius: 9px; background: var(--green-2); font-family: var(--num); font-size: 15px;
  box-shadow: 0 2px 0 var(--green-3); display: none; pointer-events: none; }
.s-btn.on { border-color: #ffe066; box-shadow: 0 0 20px rgba(255,220,80,0.95), 0 6px 14px rgba(0,0,0,0.5); animation: pulse 0.9s ease-in-out infinite; }
.s-btn.on img { filter: none; }
.s-btn.on .ready { display: block; }
.s-btn:active { transform: scale(0.94); }
#s-round { position: absolute; top: calc(60px + var(--safe-t)); left: 12px; padding: 2px 10px; border-radius: 10px; background: rgba(10,22,52,0.7);
  border: 2px solid rgba(255,255,255,0.35); font-family: var(--num); font-size: 14px; pointer-events: none; }

/* ── home: mode tabs + siege card ───────────────────── */
.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode-tab { position: relative; height: 66px; border-radius: 16px; overflow: hidden; border: 2px solid rgba(255,255,255,0.18); background: #10183a center/cover no-repeat;
  box-shadow: 0 6px 14px rgba(0,0,0,0.45); display: flex; align-items: flex-end; padding: 0 8px 6px; filter: saturate(0.55) brightness(0.65); transition: filter .15s, border-color .15s; }
.mode-tab::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.75)); }
.mode-tab span { position: relative; z-index: 1; font-size: 17px; text-shadow: 0 2px 0 #000; }
.mode-tab.on { filter: none; border-color: var(--line); box-shadow: 0 0 16px rgba(246,196,69,0.55), 0 6px 14px rgba(0,0,0,0.45); }
.mode-tab .new { position: absolute; z-index: 2; top: 5px; right: 6px; padding: 1px 7px; border-radius: 8px; background: var(--red-2); font-family: var(--num); font-size: 12px; box-shadow: 0 2px 0 var(--red-3); }
.loadout { display: flex; gap: 6px; margin-top: 6px; }
.lo-slot { display: flex; align-items: center; gap: 4px; padding: 2px 8px 2px 2px; border-radius: 12px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); font-size: 13px; min-width: 0; }
.lo-slot img { width: 30px; height: 30px; object-fit: contain; }
.lo-slot.locked { opacity: 0.45; }
.lo-slot .lo-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 84px; }
.boost-btn .two { white-space: pre-line; }
#hud.siege #tip { top: auto; bottom: calc(106px + var(--safe-b)); font-size: 16px; padding: 9px 14px; width: min(76%, 330px); background: rgba(10,22,52,0.72); }

/* ── v2.1: six modes, mode cards, per-mode sheets ─────────── */
.mode-tabs.six { grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mode-tabs.six .mode-tab { height: 50px; padding: 0 6px 4px; border-radius: 13px; }
.mode-tabs.six .mode-tab span { font-size: 14px; line-height: 1.05; }
.mode-tab.locked { filter: grayscale(1) brightness(0.45); }
.mode-tab .lock, .mode-tab .cnt { position: absolute; z-index: 2; top: 3px; right: 4px; padding: 0 6px; border-radius: 8px; background: rgba(0,0,0,0.65); font-family: var(--num); font-size: 11px; line-height: 17px; }
.mode-tab .cnt { background: var(--blue-2); box-shadow: 0 2px 0 var(--blue-3); font-size: 12px; }
.mode-tab .cnt.red { background: var(--red-2); box-shadow: 0 2px 0 var(--red-3); }
.mode-tabs.six .mode-tab .new { top: 3px; right: 4px; font-size: 11px; padding: 0 6px; }
.home-top .wallet { display: flex; gap: 6px; align-items: center; }
.pill.brick { border-color: rgba(255,140,100,0.6); padding-right: 12px; }
.stage-card .sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.25; }
.stage-card .sub.red { color: #ff9a8a; }
.stage-card .st-name.small { font-size: 19px; }
.stage-card .st-name .ico, .stage-card .sub .ico { width: 24px; height: 24px; object-fit: contain; vertical-align: -4px; margin-right: 3px; }
.stage-card .ch-thumb.portrait { background-size: contain; background-color: rgba(255,255,255,0.06); width: 70px; height: 70px; }
.lg-badge { width: 70px; height: 70px; flex: none; }
.lg-badge img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5)); }
.lg-bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,0.14); overflow: hidden; margin-top: 4px; }
.lg-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd54a, #ff9d00); }
.stage-card .opp { flex: none; width: 82px; display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 12px; line-height: 1.15; }
.stage-card .opp .on { margin-top: 2px; max-width: 82px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-card .opp small { color: #ffcf6a; font-family: var(--num); font-size: 13px; }
.lord { position: relative; display: inline-flex; width: 52px; height: 52px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #6a7fd0, #1c2a64); border: 2px solid rgba(255,255,255,0.6); overflow: visible; flex: none; }
.lord img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.lord b { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); padding: 0 5px; border-radius: 6px; background: #5b6478; font-family: var(--num); font-size: 10px; line-height: 14px; color: #fff; letter-spacing: 0.5px; }
.shields { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.shields i { width: 18px; height: 21px; background: rgba(255,255,255,0.15); clip-path: polygon(50% 0, 100% 18%, 92% 62%, 50% 100%, 8% 62%, 0 18%); }
.shields i.on { background: linear-gradient(180deg, #8ec5ff, #2f6df0); }
.shields.big { justify-content: center; margin: 8px 0; }
.shields.big i { width: 28px; height: 32px; }
.bb-track.mini { height: 16px; margin-top: 4px; }
.bb-track.mini span { font-size: 12px; line-height: 13px; }
/* hud: timer, loot / damage counter, rival wall, NEW card */
#s-timer { position: absolute; top: calc(58px + var(--safe-t)); left: 50%; transform: translateX(-50%); padding: 2px 12px; border-radius: 12px; background: rgba(10,22,52,0.78);
  border: 2px solid rgba(255,255,255,0.4); font-family: var(--num); font-size: 18px; pointer-events: none; }
#hud.has-boss #s-timer { top: calc(124px + var(--safe-t)); left: 12px; transform: none; }
#s-timer.low { border-color: #ff6a5a; color: #ffb0a6; animation: pulse 0.8s ease-in-out infinite; }
#s-loot { position: absolute; top: calc(58px + var(--safe-t)); right: 12px; align-items: center; gap: 5px; padding: 3px 10px 3px 4px; border-radius: 14px; background: rgba(10,22,52,0.8);
  border: 2px solid rgba(255,214,90,0.6); font-family: var(--num); font-size: 18px; pointer-events: none; }
#hud.has-boss #s-loot { top: calc(124px + var(--safe-t)); }
#s-loot img { width: 26px; height: 26px; object-fit: contain; }
#s-loot .lbl { font-family: var(--font); font-size: 13px; padding-left: 6px; color: #ffcf9a; }
#s-loot .lt { font-size: 14px; color: #9ff0ff; margin-left: 4px; }
#s-loot.live { border-color: #ffe066; box-shadow: 0 0 16px rgba(255,220,80,0.8); }
#s-loot b { display: inline-block; }
#s-loot.bump b { animation: numBump .3s ease-out; }
@keyframes numBump { 0% { transform: scale(1.35); } 100% { transform: scale(1); } }
#s-hp.wide .hp-track { width: 140px; }
#boss-bar.rival .bb-track i { background: linear-gradient(180deg, #ff8a5b, #c8321e); }
#boss-bar.rival img { border-radius: 50%; background: radial-gradient(circle at 50% 35%, #6a7fd0, #1c2a64); border: 2px solid rgba(255,255,255,0.6); width: 54px; height: 54px; }
.npc { padding: 0 5px; border-radius: 6px; background: #5b6478; font-family: var(--num); font-size: 11px; vertical-align: 2px; }
#intro { position: absolute; left: 50%; top: calc(122px + var(--safe-t)); transform: translateX(-50%); width: min(84%, 330px); display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px;
  border-radius: 18px; background: linear-gradient(180deg, rgba(30,52,120,0.95), rgba(12,24,64,0.95)); border: 2px solid #ffe066; box-shadow: 0 10px 26px rgba(0,0,0,0.5), 0 0 18px rgba(255,220,80,0.4);
  pointer-events: auto; animation: introIn .45s cubic-bezier(.2,.9,.3,1.3); }
#hud.has-boss #intro { top: calc(166px + var(--safe-t)); }   /* v3.13: under the boss-raid timer */
#intro .tag { position: absolute; top: -11px; left: 12px; padding: 0 8px; border-radius: 8px; background: var(--red-2); font-family: var(--num); font-size: 14px; box-shadow: 0 2px 0 var(--red-3); }
#intro .ico { width: 58px; height: 58px; flex: none; display: flex; align-items: center; justify-content: center; }
#intro .ico img { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(0,0,0,0.5)); }
.mini-atlas { display: block; filter: drop-shadow(0 3px 3px rgba(0,0,0,0.5)); }
#intro .tx { display: flex; flex-direction: column; gap: 2px; text-align: left; min-width: 0; }
#intro .tx b { font-size: 20px; color: #ffe8a0; font-weight: normal; }
#intro .tx span { font-size: 14px; line-height: 1.25; color: #dfe8ff; }
#intro .btn { min-height: 44px; margin-top: 8px; font-size: 17px; }
#drag-hint .caption { position: absolute; bottom: 78px; left: -40px; right: -40px; padding: 8px 12px; border-radius: 12px; background: #07152de8; text-align: center; font-size: 15px; line-height: 1.4; }
@keyframes introIn { from { transform: translate(-50%, -20px) scale(0.8); opacity: 0; } to { transform: translate(-50%, 0) scale(1); opacity: 1; } }
.mini-gate { display: flex; align-items: center; justify-content: center; width: 58px; height: 46px; border-radius: 10px; border: 3px solid #fff; font-family: var(--num); font-size: 21px; color: #fff;
  background: linear-gradient(180deg, rgba(110,200,255,0.9), rgba(30,110,255,0.95)); text-shadow: 0 2px 0 #0b2f8a; box-shadow: 0 3px 6px rgba(0,0,0,0.4); }
.mini-gate.bad, .mini-gate.red { background: linear-gradient(180deg, rgba(255,140,130,0.9), rgba(215,30,50,0.95)); text-shadow: 0 2px 0 #5a0612; }
.mini-gate.myst { background: linear-gradient(180deg, rgba(220,150,255,0.9), rgba(130,40,220,0.95)); text-shadow: 0 2px 0 #33106a; }
.mini-gate.gold { background: linear-gradient(180deg, #ffe58a, #f2a000); color: #fff; text-shadow: 0 2px 0 #7a4a00; }
.mini-gate.charge { background: linear-gradient(180deg, #b6fff0, #12b8a8); text-shadow: 0 2px 0 #045a52; }
.mini-gate.lock { background: linear-gradient(180deg, #c8ccd8, #6a7088); text-shadow: 0 2px 0 #2a2e3a; }
.mini-txt { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; border: 3px solid #fff; color: #fff; font-size: 26px; text-shadow: 0 2px 0 rgba(0,0,0,0.4); box-shadow: 0 3px 6px rgba(0,0,0,0.4); }
/* sheets */
.up-note { font-size: 14px; line-height: 1.4; color: #c9d4f5; background: rgba(255,255,255,0.05); border-radius: 12px; padding: 8px 10px; text-align: left; }
.card.league.dim { opacity: 0.55; }
.card .you { padding: 2px 10px; border-radius: 10px; background: var(--green-2); font-size: 14px; box-shadow: 0 2px 0 var(--green-3); }
.card.target .ci { background: none; }
.card.target.rev { border-color: rgba(255,120,100,0.8); background: linear-gradient(180deg, rgba(255,80,60,0.16), rgba(255,80,60,0.03)); }
.card .cd.loot { display: flex; align-items: center; gap: 4px; font-family: var(--num); font-size: 16px; color: #ffe8b0; }
.card .cd.loot img { width: 22px; height: 22px; object-fit: contain; }
.card .def { display: inline-flex; align-items: center; gap: 1px; margin-right: 8px; font-family: var(--num); font-size: 14px; }
.card .def img { width: 22px; height: 22px; object-fit: contain; }
.wall-ico { display: inline-block; width: 18px; height: 13px; border-radius: 2px; background: repeating-linear-gradient(90deg, #b9bfcc 0 8px, #8d96a8 8px 9px); vertical-align: -1px; }
.raid-head { display: flex; align-items: center; justify-content: center; gap: 14px; }
.boss-info { display: flex; align-items: center; gap: 12px; text-align: left; }
.boss-info > img { width: 86px; height: 86px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5)); }
.boss-info > div { flex: 1; }
.boss-info .bn { font-size: 20px; color: #ffd0c0; margin-bottom: 4px; }
.boss-info.small > img { width: 64px; height: 64px; }
.dmg-big { font-size: 16px; color: var(--muted); }
.dmg-big b { font-family: var(--num); font-size: 30px; color: #ffe066; margin-left: 6px; }
.ms-track { position: relative; height: 14px; margin: 26px 18px 30px; border-radius: 7px; background: rgba(0,0,0,0.5); border: 2px solid rgba(255,255,255,0.25); }
.ms-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: linear-gradient(90deg, #ffb24a, #ff5a3d); }
.ms-fill.old { background: rgba(255,255,255,0.35); }
.ms { position: absolute; top: -22px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; font-family: var(--num); font-size: 12px; }
.ms img { width: 30px; height: 30px; object-fit: contain; filter: grayscale(0.8) brightness(0.7); }
.ms.ready img, .ms.got img { filter: none; }
.ms.new img { animation: pulse 0.8s ease-in-out infinite; }
.ms small { color: #ffe066; }
.vs-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.vs-row .side { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 15px; }
.vs-row .vs { font-family: var(--num); font-size: 22px; color: #ffcf6a; }
.wall-bar { width: 100%; height: 10px; border-radius: 5px; background: rgba(0,0,0,0.5); overflow: hidden; }
.wall-bar i { display: block; height: 100%; }
.wall-bar.blue i { background: linear-gradient(90deg, #6fe7ff, #3b82f6); }
.wall-bar.red i { background: linear-gradient(90deg, #ff8a5b, #c8321e); }
.trophy-row { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--num); font-size: 26px; margin: 6px 0; }
.trophy-row img { width: 40px; height: 40px; object-fit: contain; }
.trophy-row.up b { color: #8dff9c; }
.trophy-row.down b { color: #ff8b80; }
.trophy-row span { font-size: 18px; color: var(--muted); }
.league-up { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 6px 0; font-size: 18px; color: #9ff0ff; }
.league-up img { width: 56px; height: 56px; object-fit: contain; animation: bob 1.4s ease-in-out infinite; }
.league-up b { color: #ffe066; margin-left: 4px; }
.league-up small { display: block; color: #ffe066; font-family: var(--num); font-size: 16px; }
.loot-row { display: flex; justify-content: center; gap: 14px; margin: 8px 0; }
.loot-row div { display: flex; flex-direction: column; align-items: center; padding: 8px 14px; border-radius: 14px; background: rgba(255,255,255,0.06); }
.loot-row img { width: 44px; height: 44px; object-fit: contain; }
.loot-row b { font-family: var(--num); font-size: 26px; color: #ffe066; }
.loot-row span { font-size: 13px; color: var(--muted); }
.news-lord { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 2px 0 8px; font-size: 18px; }
.modal .sub { font-size: 15px; color: var(--muted); }
/* raid target rows: name on one line, base level under it */
.card.target .cn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.target .cn .lv { display: block; font-size: 12px; opacity: 0.8; white-space: nowrap; margin-top: 1px; }
/* little count bubble inside a button (defeat → upgrades) */
.badge-in { display: inline-block; min-width: 20px; height: 20px; line-height: 20px; margin-left: 4px; padding: 0 5px; border-radius: 10px;
  background: #ff4a3d; color: #fff; font-size: 13px; font-family: var(--num); vertical-align: 2px; }
#d-up { white-space: nowrap; padding-left: 10px; padding-right: 10px; }

/* ── v3.0 heroine commanders: lobby, result lines, ultimate cut-in ───────── */
.home-hero { position: absolute; z-index: 1; right: -4%; top: calc(104px + var(--safe-t)); height: 62%; padding: 0; display: block; }
.home-hero img { height: 100%; width: auto; max-width: 78vw; object-fit: contain; object-position: 100% 100%; display: block; transform-origin: 50% 100%; animation: heroIdle 4.6s ease-in-out infinite;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 62%, rgba(0,0,0,0.25) 80%, transparent 92%); mask-image: linear-gradient(180deg, #000 0%, #000 62%, rgba(0,0,0,0.25) 80%, transparent 92%);
  filter: drop-shadow(0 10px 22px rgba(0,0,0,0.55)); }
.home-hero.swap img { animation: heroSwap .45s cubic-bezier(.2,.9,.3,1.2), heroIdle 4.6s ease-in-out .45s infinite; }
.home-hero.hop img { animation: heroHop .55s cubic-bezier(.3,1.5,.5,1), heroIdle 4.6s ease-in-out .55s infinite; }
.hero-row { display: flex; justify-content: flex-end; margin: 0 2px -4px; }
.hero-tag { display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 12px; border-radius: 999px;
  background: rgba(6, 18, 48, 0.82); border: 2px solid rgba(60,200,255,0.8); box-shadow: 0 4px 12px rgba(0,0,0,0.5); font-size: 15px; white-space: nowrap; }
.hero-tag b { font-weight: normal; color: #e9f8ff; }
.hero-tag i { font-style: normal; color: #3cc8ff; font-family: var(--num); }
.hero-tag:active { transform: translateY(2px); }
/* v3.1 commander squad: lobby tag + squad sheet */
.hero-tag { position: relative; padding: 4px 10px 4px 12px; }
.hero-tag .ht-n { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.08; }
.hero-tag .ht-n small { font-size: 11px; color: #8fdcff; }
.hero-tag .ht-n b { font-size: 16px; }
.hero-tag i { margin-left: 2px; padding-left: 8px; border-left: 1px solid rgba(60,200,255,0.4); font-size: 13px; font-family: var(--font); }
.hero-tag .ht-new { position: absolute; top: -8px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #ff4f6d; color: #fff;
  font-style: normal; font-size: 13px; line-height: 20px; text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,0.5); animation: pulseNew 1.4s ease-in-out infinite; }
@keyframes pulseNew { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
.roster { display: flex; flex-direction: column; gap: 10px; }
.ro-detail { display: flex; gap: 12px; align-items: stretch; padding: 10px; border-radius: 18px; background: radial-gradient(circle at 25% 30%, #1d3f86, #0a1636); border: 2px solid rgba(60,200,255,0.55); }
.ro-art { width: 42%; max-width: 190px; aspect-ratio: 0.82; object-fit: cover; object-position: 50% 0; border-radius: 14px; flex: none; background: rgba(0,0,0,0.2); }
.ro-detail.locked .ro-art { filter: brightness(0.12) saturate(0); }
.ro-info { flex: 1; display: flex; flex-direction: column; gap: 7px; justify-content: center; min-width: 0; }
.ro-role { font-size: 13px; color: #8fdcff; }
.ro-name { font-size: 27px; color: #fff; line-height: 1.05; }
.ro-skill { padding: 7px 10px; border-radius: 12px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14); }
.ro-skill small { display: block; font-size: 11.5px; color: #ffd36b; }
.ro-skill b { font-weight: normal; font-size: 15px; color: #e9f8ff; }
.ro-info .btn { min-height: 44px; font-size: 16px; border-radius: 12px; padding: 0 10px; }
.ro-count { font-size: 13px; color: var(--muted); text-align: right; margin: -2px 2px; }
.ro-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ro-card { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0 0 4px; border-radius: 14px; overflow: hidden;
  background: rgba(255,255,255,0.06); border: 2px solid rgba(255,255,255,0.14); color: var(--text); font-family: var(--font); }
.ro-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.ro-card .nm { font-size: 13px; margin-top: 3px; white-space: nowrap; }
.ro-card.sel { border-color: #3cc8ff; box-shadow: 0 0 0 2px rgba(60,200,255,0.35); }
.ro-card.lead { border-color: #ffc83a; }
.ro-card.locked img { filter: brightness(0.12) saturate(0); }
.ro-card.locked .nm { color: var(--muted); }
.ro-card .ld { display: none; position: absolute; top: 3px; left: 3px; padding: 1px 6px; border-radius: 8px; background: #ffc83a; color: #3a2400; font-weight: normal; font-size: 11px; }
.ro-card.lead .ld { display: block; }
.ro-card .nw { position: absolute; top: 3px; right: 3px; padding: 1px 5px; border-radius: 8px; background: #ff4f6d; color: #fff; font-weight: normal; font-size: 10.5px; }
.ro-note { font-size: 12.5px; color: var(--muted); margin: 2px 2px 0; line-height: 1.4; }
@keyframes heroIdle { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-4px) scale(1.008); } }
@keyframes heroSwap { 0% { transform: translateX(18%); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes heroHop { 0% { transform: none; } 35% { transform: translateY(-16px) scale(1.02); } 70% { transform: translateY(2px) scale(0.995); } 100% { transform: none; } }
.res-hero { position: relative; display: flex; align-items: flex-end; gap: 4px; margin: calc(-1 * min(86px, 10vh)) 0 4px -8px; text-align: left; }
.res-hero .art { flex: none; width: 164px; height: 150px; position: relative; }
.res-hero .art img { position: absolute; left: 50%; bottom: 0; height: 100%; width: auto; max-width: 200px; transform: translateX(-50%); object-fit: contain; object-position: 50% 100%;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,0.6)); animation: resPop .55s cubic-bezier(.2,.9,.3,1.25) both; }
.res-hero.lose .art img { animation-name: resSink; }
.res-hero .bubble { position: relative; flex: 1; padding: 9px 12px; border-radius: 14px 14px 14px 4px; background: rgba(255,255,255,0.08); border: 2px solid rgba(255,255,255,0.14); font-size: 15px; line-height: 1.35; margin-bottom: 14px;
  animation: resBubble .4s .25s ease both; }
.res-hero .bubble b { display: block; font-weight: normal; font-size: 13px; color: #8fdcff; margin-bottom: 2px; }
.res-hero.lose .bubble b { color: #ffb0a6; }
@keyframes resPop { 0% { transform: translateX(-50%) translateY(24px) scale(0.9); opacity: 0; } 100% { transform: translateX(-50%); opacity: 1; } }
@keyframes resSink { 0% { transform: translateX(-50%) translateY(-14px); opacity: 0; } 100% { transform: translateX(-50%); opacity: 1; } }
@keyframes resBubble { 0% { transform: translateX(-10px); opacity: 0; } 100% { transform: none; opacity: 1; } }
.cutin { position: absolute; inset: 0; z-index: 25; pointer-events: none; overflow: hidden; }
.cutin .cut-band { position: absolute; left: -10%; right: -10%; top: 31%; height: 25%; transform: skewY(-7deg);
  background: linear-gradient(90deg, rgba(8,30,90,0) 0%, rgba(18,80,210,0.94) 16%, rgba(40,170,255,0.94) 62%, rgba(8,30,90,0) 100%);
  box-shadow: 0 0 34px rgba(60,180,255,0.65); animation: cutBand 1.3s cubic-bezier(.2,.9,.2,1) forwards; }
.cutin img { position: absolute; right: -6%; top: 13%; height: 37%; width: auto; max-width: 106%; object-fit: contain; object-position: 100% 100%; filter: drop-shadow(0 10px 18px rgba(0,0,0,0.6)); animation: cutHero 1.5s cubic-bezier(.2,.9,.2,1) forwards; }
.cutin .cut-txt { position: absolute; left: 6%; top: 36%; max-width: 62%; color: #fff; text-shadow: 0 3px 0 #04163f, 0 0 14px rgba(60,200,255,0.8); animation: cutTxt 1.5s ease forwards; }
.cutin .cut-txt i { display: block; margin-top: 4px; font-style: normal; font-size: 17px; color: #fff6c8; }
.cutin .cut-band { animation-duration: 1.5s !important; }
.cutin.champ .cut-band { background: linear-gradient(90deg, rgba(255,190,60,0), rgba(255,170,40,0.85) 30%, rgba(255,230,140,0.9) 70%, rgba(255,190,60,0));
  box-shadow: 0 0 34px rgba(255,170,40,0.6); top: 58%; height: 17%; animation: cutBandL 1.1s cubic-bezier(.2,.9,.2,1) forwards !important; }
.cutin.champ img { right: auto; left: -6%; top: 35%; height: 31%; max-width: 100%; object-position: 0 100%; animation: cutHeroL 1.1s cubic-bezier(.2,.9,.2,1) forwards; }
.cutin.champ .cut-txt { left: auto; right: 6%; top: 62%; text-align: right; text-shadow: 0 3px 0 #4a2600, 0 0 14px rgba(255,190,60,0.8); animation: cutTxtR 1.1s ease forwards; }
.cutin.champ .cut-txt b { font-size: 30px; }
@keyframes cutBandL { 0% { transform: translateX(-110%) skewY(-7deg); } 16% { transform: translateX(0) skewY(-7deg); } 80% { transform: translateX(0) skewY(-7deg); opacity: 1; } 100% { transform: translateX(110%) skewY(-7deg); opacity: 0; } }
@keyframes cutHeroL { 0% { transform: translateX(-60%); opacity: 0; } 20% { transform: translateX(0); opacity: 1; } 80% { transform: translateX(4%); opacity: 1; } 100% { transform: translateX(30%); opacity: 0; } }
@keyframes cutTxtR { 0% { transform: translateX(40%); opacity: 0; } 22% { transform: none; opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
/* greeting: a new leader takes over / a heroine joins */
.greet { position: absolute; inset: 0; z-index: 45; overflow: hidden; background: radial-gradient(120% 75% at 72% 45%, rgba(46,104,214,0.6), rgba(3,8,26,0.94) 72%); animation: gIn .25s ease both; }
.greet::before { content: ''; position: absolute; left: -25%; right: -25%; top: 40%; height: 30%; transform: skewY(-14deg);
  background: linear-gradient(90deg, rgba(60,200,255,0), rgba(60,200,255,0.32) 45%, rgba(255,255,255,0.14) 70%, rgba(60,200,255,0)); animation: gBand .7s cubic-bezier(.2,.9,.25,1) both; }
.greet.join::before { background: linear-gradient(90deg, rgba(255,200,80,0), rgba(255,190,60,0.34) 45%, rgba(255,255,255,0.16) 70%, rgba(255,200,80,0)); }
.greet.out { animation: gOut .26s ease both; }
.greet .g-art { position: absolute; right: -10%; bottom: calc(25% + var(--safe-b)); width: 118%; max-width: 640px; height: auto; max-height: 50%; object-fit: contain; object-position: 100% 100%; filter: drop-shadow(0 14px 26px rgba(0,0,0,0.6)); animation: gArt .7s cubic-bezier(.2,.9,.25,1.12) both; }
.greet .g-head { position: absolute; left: 6%; top: calc(11% + var(--safe-t)); animation: gTxt .5s .15s ease both; }
.greet .g-tag { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 17px; color: #04163f; background: linear-gradient(90deg, #8fe6ff, #3cc8ff); box-shadow: 0 4px 14px rgba(60,200,255,0.5); }
.greet.join .g-tag { background: linear-gradient(90deg, #ffe58a, #ffbf1f); color: #4a2600; box-shadow: 0 4px 14px rgba(255,190,40,0.5); }
.greet .g-name { margin-top: 8px; text-shadow: 0 3px 0 #04163f, 0 0 16px rgba(60,200,255,0.6); }
.greet .g-name small { display: block; font-size: 16px; color: #9fe3ff; }
.greet .g-name b { display: block; font-weight: normal; font-size: 46px; color: #fff; line-height: 1.05; }
.greet .g-foot { position: absolute; left: 5%; right: 34%; bottom: calc(11% + var(--safe-b)); display: flex; flex-direction: column; gap: 8px; animation: gTxt .5s .3s ease both; }
.greet .g-line { position: relative; padding: 10px 13px; border-radius: 16px 16px 16px 4px; background: rgba(6,18,48,0.88); border: 2px solid rgba(60,200,255,0.7); font-size: 16px; line-height: 1.4; color: #f4fbff; }
.greet .g-skill { padding: 7px 11px; border-radius: 12px; background: rgba(6,18,48,0.75); border: 1px solid rgba(255,211,107,0.5); font-size: 14px; color: #e9f8ff; }
.greet .g-skill small { display: block; font-size: 11.5px; color: #ffd36b; }
.greet .g-tap { position: absolute; left: 0; right: 0; bottom: calc(3.5% + var(--safe-b)); text-align: center; font-size: 13px; color: rgba(233,248,255,0.65); animation: gBlink 1.4s ease-in-out infinite; }
@keyframes gIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes gOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes gBand { from { transform: translateX(100%) skewY(-14deg); } to { transform: skewY(-14deg); } }
@keyframes gArt { 0% { transform: translateX(40%) scale(1.06); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes gTxt { 0% { transform: translateX(-30px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes gBlink { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.9; } }
/* lobby: tap the heroine and she answers */
.hero-say { position: absolute; z-index: 3; left: 5%; top: calc(244px + var(--safe-t)); max-width: 54%; padding: 9px 12px; border-radius: 16px 16px 4px 16px;
  background: rgba(6,18,48,0.9); border: 2px solid rgba(60,200,255,0.8); font-size: 15px; line-height: 1.4; color: #f4fbff; box-shadow: 0 6px 16px rgba(0,0,0,0.5);
  animation: sayIn .3s cubic-bezier(.2,.9,.3,1.3) both; pointer-events: none; }
@keyframes sayIn { 0% { transform: scale(0.7); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* v3.2.1 after a battle: the leader's full-body win / lose pose, then the result card */
.rpose { position: absolute; inset: 0; overflow: hidden;
  background: radial-gradient(80% 55% at 50% 52%, rgba(255,200,80,0.42), rgba(10,18,48,0.9) 68%, rgba(4,8,24,0.97)); }
.rpose.lose { background: radial-gradient(80% 55% at 50% 54%, rgba(110,140,220,0.34), rgba(8,10,28,0.92) 68%, rgba(3,5,16,0.98)); }
.rpose.view { z-index: 40; animation: gIn .2s ease both; }
.rpose.view, .rpose.view.lose { background-color: #060a1a; }   /* opaque: the result card stays hidden behind */
.rpose.view.out { animation: gOut .22s ease both; }
.rpose .rp-glow { position: absolute; left: 50%; top: 50%; width: 170vmax; height: 170vmax; margin: -85vmax 0 0 -85vmax; pointer-events: none;
  background: repeating-conic-gradient(rgba(255,226,140,0.13) 0deg 7deg, transparent 7deg 20deg); animation: rpSpin 22s linear infinite; }
.rpose.lose .rp-glow { background: repeating-conic-gradient(rgba(140,170,255,0.06) 0deg 5deg, transparent 5deg 24deg); animation-duration: 40s; }
.rpose .rp-title { position: absolute; left: 0; right: 0; top: calc(3.5% + var(--safe-t)); margin: 0; text-align: center; font-size: 56px; font-weight: normal; color: #ffd23a;
  text-shadow: 0 4px 0 #7a3c00, 0 0 22px rgba(255,190,60,0.8); animation: rpTitle .55s cubic-bezier(.2,1.6,.4,1) both; }
.rpose.lose .rp-title { color: #ff7a6a; text-shadow: 0 4px 0 #4a0d10, 0 0 18px rgba(255,90,80,0.6); }
.rpose .rp-art { position: absolute; left: 50%; bottom: calc(15% + var(--safe-b)); height: 68%; width: auto; max-width: 112%; transform: translateX(-50%);
  object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 18px 30px rgba(0,0,0,0.65)); animation: rpIn .65s cubic-bezier(.2,.9,.3,1.15) both; }
.rpose.lose .rp-art { animation-name: rpSink; }
.rpose.view .rp-art { bottom: calc(14% + var(--safe-b)); height: 78%; }
.rpose .rp-cap { position: absolute; left: 6%; right: 6%; bottom: calc(4% + 20px + var(--safe-b)); padding: 9px 13px; border-radius: 16px 16px 16px 4px;
  background: rgba(6,18,48,0.9); border: 2px solid rgba(255,211,107,0.75); font-size: 16px; line-height: 1.4; color: #f4fbff; text-align: left; animation: gTxt .45s .25s ease both; }
.rpose.lose .rp-cap { border-color: rgba(255,150,130,0.7); }
.rpose .rp-cap b { display: block; font-weight: normal; font-size: 13px; color: #ffd36b; margin-bottom: 1px; }
.rpose.lose .rp-cap b { color: #ffb0a6; }
.rpose .rp-tap { position: absolute; left: 0; right: 0; bottom: calc(1.5% + var(--safe-b)); text-align: center; font-size: 13px; color: rgba(233,248,255,0.6); animation: gBlink 1.4s ease-in-out infinite; }
.res-hero .art { cursor: pointer; }
.res-hero .art .zoom { position: absolute; right: 0; bottom: 4px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 13px;
  background: rgba(6,18,48,0.85); border: 1.5px solid rgba(60,200,255,0.8); box-shadow: 0 2px 6px rgba(0,0,0,0.5); }
@keyframes rpSpin { to { transform: rotate(360deg); } }
@keyframes rpTitle { 0% { transform: scale(2.2); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes rpIn { 0% { transform: translateX(-50%) translateY(40px) scale(0.92); opacity: 0; } 100% { transform: translateX(-50%); opacity: 1; } }
@keyframes rpSink { 0% { transform: translateX(-50%) translateY(-24px); opacity: 0; } 100% { transform: translateX(-50%); opacity: 1; } }
.cutin .cut-txt small { display: block; font-size: 16px; color: #bfeaff; }
.cutin .cut-txt b { font-size: 34px; font-weight: normal; letter-spacing: 1px; }
@keyframes cutBand { 0% { transform: translateX(110%) skewY(-7deg); } 14% { transform: translateX(0) skewY(-7deg); } 82% { transform: translateX(0) skewY(-7deg); opacity: 1; } 100% { transform: translateX(-110%) skewY(-7deg); opacity: 0; } }
@keyframes cutHero { 0% { transform: translateX(60%); opacity: 0; } 18% { transform: translateX(0); opacity: 1; } 80% { transform: translateX(-4%); opacity: 1; } 100% { transform: translateX(-30%); opacity: 0; } }
@keyframes cutTxt { 0% { transform: translateX(-40%); opacity: 0; } 20% { transform: none; opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }

/* v3.3 achievement illustrations: a full scene per heroine for perfect / blitz / clutch / close */
.rpose.ach { background: #04060f; --ac1: #fff3b0; --ac2: #ffc21a; --act: #4a2600; --acg: rgba(255,200,60,0.75); --acr: rgba(255,210,90,0.2); }
.rpose.ach.blitz { --ac1: #b8fbff; --ac2: #2bb8ff; --act: #04163f; --acg: rgba(60,200,255,0.75); --acr: rgba(90,210,255,0.2); }
.rpose.ach.clutch { --ac1: #ffd0a0; --ac2: #ff5a2a; --act: #3a0d00; --acg: rgba(255,110,50,0.7); --acr: rgba(255,130,70,0.2); }
.rpose.ach.close { --ac1: #dbe4ff; --ac2: #7086d8; --act: #0d1640; --acg: rgba(130,150,240,0.6); --acr: rgba(150,170,255,0.12); }
.rpose.ach .ach-bg { position: absolute; inset: -40px; background-size: cover; background-position: 50% 40%; filter: blur(16px) brightness(0.42) saturate(1.25); transform: scale(1.08); }
.rpose.ach .rp-glow { opacity: 0.8; background: repeating-conic-gradient(var(--acr) 0deg 6deg, transparent 6deg 22deg); }
.rpose.ach.close .rp-glow { animation-duration: 44s; opacity: 0.45; }
.ach-head { position: absolute; left: 0; right: 0; top: calc(2.6% + var(--safe-t)); text-align: center; z-index: 2; animation: rpTitle .55s cubic-bezier(.2,1.6,.4,1) both; }
.ach-rib { display: inline-flex; align-items: center; gap: 8px; padding: 5px 20px 5px 14px; border-radius: 999px; background: linear-gradient(180deg, var(--ac1), var(--ac2));
  color: var(--act); box-shadow: 0 6px 22px var(--acg), inset 0 -3px 0 rgba(0,0,0,0.18); border: 2px solid rgba(255,255,255,0.75); }
.ach-rib i { font-style: normal; font-size: 24px; }
.ach-rib b { font-weight: normal; font-size: 27px; letter-spacing: 0.5px; white-space: nowrap; }
.ach-sub { margin-top: 7px; font-size: 15px; color: #f4fbff; text-shadow: 0 2px 4px rgba(0,0,0,0.9); }
.ach-frame { position: absolute; left: 50%; top: calc(12.5% + var(--safe-t)); height: min(64%, calc(92vw * 1.5)); aspect-ratio: 2 / 3; transform: translateX(-50%);
  border-radius: 16px; border: 3px solid var(--ac1); box-shadow: 0 0 0 2px rgba(0,0,0,0.5), 0 0 34px var(--acg), 0 20px 40px rgba(0,0,0,0.6);
  animation: achIn .7s cubic-bezier(.2,.9,.3,1.12) both; }
.ach-frame .ach-art { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 13px; animation: achPan 7s ease-out both; }
.ach-frame { overflow: visible; }
.ach-frame::after { content: ''; position: absolute; inset: 0; border-radius: 13px; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.32) 48%, transparent 60%) no-repeat; background-size: 250% 100%; animation: achShine 2.4s .5s ease-out both; }
.ach-new { position: absolute; top: 10px; right: -10px; z-index: 3; padding: 4px 11px; border-radius: 10px; background: linear-gradient(180deg, #ff6f92, #e8164f);
  color: #fff; font-weight: normal; font-size: 15px; border: 2px solid #fff; box-shadow: 0 4px 14px rgba(255,40,90,0.6); transform: rotate(8deg); animation: achNew .5s .55s cubic-bezier(.2,1.8,.4,1) both; }
.rpose.ach .rp-cap { z-index: 2; border-color: var(--ac1); bottom: auto; top: calc(12.5% + var(--safe-t) + min(64%, 138vw) + 14px); }
.rpose.ach.view .rp-cap { top: calc(4% + var(--safe-t) + min(76%, 141vw) + 12px); }
.rpose.ach .rp-cap b { color: var(--ac1); }
.rpose.ach.view .ach-frame { top: calc(4% + var(--safe-t)); height: min(76%, calc(94vw * 1.5)); }
.ach-chip { display: table; margin: 0 0 4px; padding: 1px 9px; border-radius: 999px; font-style: normal; font-size: 12.5px; color: #4a2600; background: linear-gradient(180deg, #fff3b0, #ffc21a); }
.ach-chip.blitz { color: #04163f; background: linear-gradient(180deg, #b8fbff, #2bb8ff); }
.ach-chip.clutch { color: #3a0d00; background: linear-gradient(180deg, #ffd0a0, #ff7a3a); }
.ach-chip.close { color: #0d1640; background: linear-gradient(180deg, #dbe4ff, #8a9ce0); }
@keyframes achIn { 0% { transform: translateX(-50%) translateY(30px) scale(0.9); opacity: 0; } 100% { transform: translateX(-50%); opacity: 1; } }
@keyframes achPan { 0% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes achShine { 0% { background-position: 130% 0; } 100% { background-position: -60% 0; } }
@keyframes achNew { 0% { transform: rotate(8deg) scale(0); } 100% { transform: rotate(8deg) scale(1); } }
/* squad sheet: her achievement album */
.ro-album { flex-basis: 100%; min-width: 0; margin-top: 2px; }   /* min-width 0: the outfit chips scroll inside instead of widening the sheet */
.ro-detail { flex-wrap: wrap; }
.al-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: #ffd36b; margin: 0 2px 5px; }
.al-head b { font-weight: normal; color: #e9f8ff; font-family: var(--num); }
.al-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.al { position: relative; display: flex; flex-direction: column; align-items: stretch; padding: 0; border-radius: 11px; overflow: hidden; border: 2px solid rgba(255,211,107,0.7);
  background: rgba(0,0,0,0.3); color: #f4fbff; font-family: var(--font); cursor: pointer; }
.al img, .al .th { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.al .th { background-repeat: no-repeat; }
/* v3.9 one row per look (default + her outfits) */
.al-looks { display: flex; gap: 5px; overflow-x: auto; margin: 0 0 6px; scrollbar-width: none; }
.al-looks::-webkit-scrollbar { display: none; }
.al-look { flex: none; padding: 4px 9px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,0.18); background: rgba(0,0,0,0.3); color: #cfe6ff;
  font-family: var(--font); font-size: 12px; white-space: nowrap; cursor: pointer; }
.al-look b { font-weight: normal; font-family: var(--num); color: #ffd36b; margin-left: 2px; }
.al-look.on { border-color: #ffd36b; background: rgba(255,211,107,0.16); color: #fff; }
.al span { font-size: 11.5px; padding: 3px 2px 4px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: rgba(6,18,48,0.9); }
.al.off { border-color: rgba(255,255,255,0.16); }
.al.off i { display: grid; place-items: center; aspect-ratio: 2 / 3; font-style: normal; font-size: 26px; filter: grayscale(1) brightness(0.55);
  background: repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 0 8px, rgba(255,255,255,0.02) 8px 16px); }
.al.off span { color: var(--muted); }

/* ── commander outfits (v3.4 announced as silhouettes, v3.5 drawn: .hs-pic shows the outfit art) ── */
.hs-pic { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1.25; border-radius: 10px; overflow: hidden;
  background: linear-gradient(160deg, var(--c1), var(--c2)); }
.hs-pic::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 30%, rgba(10,22,54,0.15), rgba(10,22,54,0.78) 75%); }
.hs-pic img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; }
.hs-pic.big { width: min(64vw, 250px); height: min(44vh, 380px); aspect-ratio: auto; margin: 0 auto; border-radius: 16px; border: 2px solid rgba(255,255,255,0.18); }
.hs-pic.big img { object-fit: contain; object-position: 50% 100%; padding: 6px 4px 0; box-sizing: border-box; }
.hs-pic.mini { width: 54px; height: 62px; aspect-ratio: auto; border-radius: 12px; }
.hs-set { font-style: normal; font-size: 10px; padding: 1px 5px; border-radius: 7px; background: rgba(4,14,40,0.85); color: #cfe3ff; white-space: nowrap; }
.hs-set.combat { color: #ffd36b; }
.hs-set.daily { color: #8fe3ff; }
.hs-set.halloween { color: #ffa25c; }
.hs-set.expedition { color: #78ddc7; }
.hs-set.festival { color: #e8b7ff; }
.hs-card .hs-set { position: absolute; left: 7px; top: 7px; z-index: 2; }
.hs-top .hs-set { font-size: 13px; padding: 2px 10px; border-radius: 10px; margin-right: auto; margin-left: 6px; }
.hs-own-tag { font-size: 13px; padding: 2px 10px; border-radius: 10px; background: #3cc8ff; color: #04233a; }
.hs-price.state { font-family: var(--font); font-size: 11.5px; padding: 0 7px; border-radius: 8px; align-self: center; }
.hs-price.state.worn { background: #3cc8ff; color: #04233a; }
.hs-price.state.own { background: #8ef0a8; color: #06301a; }
.hs-sil { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1.25; border-radius: 10px; overflow: hidden;
  background: radial-gradient(circle at 50% 38%, rgba(255,255,255,0.16), rgba(255,255,255,0) 68%), linear-gradient(180deg, #16295a, #0a1636); }
.hs-sil i { position: absolute; inset: 7% 6% 0; background: linear-gradient(160deg, var(--c1) 12%, var(--c2) 88%); opacity: 0.94;
  -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: 50% 100%; mask-position: 50% 100%; }
.hs-sil i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, rgba(255,255,255,0) 35%, rgba(255,255,255,0.75) 50%, rgba(255,255,255,0) 65%);
  background-size: 260% 100%; animation: hsShine 2.8s linear infinite; }
.hs-sil b { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); font-family: var(--num); font-weight: normal; font-size: 30px; color: #fff;
  text-shadow: 0 2px 0 rgba(0,0,0,0.65), 0 0 14px var(--c2); }
@keyframes hsShine { 0% { background-position: 130% 0; } 100% { background-position: -60% 0; } }
.hs-sil.big { width: min(52vw, 200px); margin: 0 auto; aspect-ratio: 0.62; border-radius: 16px; border: 2px solid rgba(255,255,255,0.18); }
.hs-sil.big b { font-size: 54px; }
.hs-sil.mini { width: 54px; height: 62px; aspect-ratio: auto; border-radius: 12px; }
.hs-sil.mini b { font-size: 20px; }
.hs-price { display: inline-flex; align-items: center; gap: 3px; font-family: var(--num); font-size: 13px; color: #ffe066; white-space: nowrap; }
.hs-price img { width: 16px; height: 16px; object-fit: contain; }
.hs-price.prem { color: #d9c4ff; font-family: var(--font); }
.hs-soon { position: absolute; top: 3px; right: 3px; font-style: normal; font-size: 10.5px; padding: 1px 6px; border-radius: 8px; background: #ff4f6d; color: #fff; z-index: 1; }
/* squad sheet: her outfits under the album */
.ro-skins { flex-basis: 100%; margin-top: 4px; }
.rs-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.rs { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 4px 4px 6px; border-radius: 11px; background: rgba(0,0,0,0.3);
  border: 2px solid rgba(255,255,255,0.16); color: #f4fbff; font-family: var(--font); cursor: pointer; min-width: 0; }
.rs.premium { border-color: rgba(190,150,255,0.75); }
.rs.cur { border-color: rgba(60,200,255,0.75); cursor: default; }
.rs .rs-art img { display: block; width: 100%; aspect-ratio: 1 / 1.25; object-fit: cover; object-position: 50% 12%; border-radius: 8px; }
.rs .rs-n { font-size: 11.5px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs .hs-price { justify-content: center; }
.rs em, .hs-card em { position: absolute; top: 3px; left: 3px; z-index: 2; font-style: normal; font-size: 10.5px; padding: 1px 6px; border-radius: 8px; background: #3cc8ff; color: #04233a; }
.rs em.own, .hs-card em.own { background: #8ef0a8; color: #06301a; }
.hs-card em { left: auto; right: 7px; top: 7px; }
.rs .hs-pic { aspect-ratio: 1 / 1.25; }
/* skins sheet: commander tab */
.sk-tabs { align-self: center; margin-bottom: 2px; flex: none; }
.sk-tabs button i { font-style: normal; font-size: 11px; color: #ff8fa3; font-family: var(--num); }
.hs-note { font-size: 13px; color: var(--muted); margin: 0 2px; line-height: 1.4; }
.hs-list { display: flex; flex-direction: column; gap: 8px; }
.hs-hero { display: grid; grid-template-columns: 64px repeat(3, minmax(0, 1fr)); gap: 6px; align-items: stretch; padding: 8px; border-radius: 16px; background: rgba(255,255,255,0.05); border: 2px solid rgba(255,255,255,0.1); }
.hs-who { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-align: center; min-width: 0; }
.hs-who img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.hs-who b { font-weight: normal; font-size: 14px; line-height: 1.1; }
.hs-who small { font-size: 11px; color: #8fdcff; }
.hs-hero.locked .hs-who img { filter: brightness(0.25) saturate(0); }
.hs-hero.locked .hs-who b { color: var(--muted); }
.hs-card { position: relative; display: flex; flex-direction: column; gap: 4px; align-items: stretch; padding: 5px 5px 7px; border-radius: 12px; background: rgba(0,0,0,0.28);
  border: 2px solid rgba(255,255,255,0.14); color: #f4fbff; font-family: var(--font); min-width: 0; cursor: pointer; }
.hs-card.premium { border-color: rgba(190,150,255,0.7); background: linear-gradient(180deg, rgba(140,100,255,0.18), rgba(0,0,0,0.28)); }
.hs-card .hs-sil, .hs-card .hs-pic { aspect-ratio: 1 / 1.15; }
.hs-card .hs-n { font-size: 12px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-card .hs-price { justify-content: center; }
/* one outfit, full size */
.hs-view { max-height: 92%; overflow-y: auto; }
.hs-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.hs-tier { font-size: 13px; padding: 2px 10px; border-radius: 10px; background: rgba(255,255,255,0.1); color: #ffe066; }
.hs-view.premium .hs-tier { color: #e2d2ff; background: rgba(140,100,255,0.3); }
.hs-soon-tag { font-size: 13px; padding: 2px 10px; border-radius: 10px; background: #ff4f6d; }
.hs-name { font-size: 26px; color: #ffe08a; margin-top: 8px; line-height: 1.15; }
.hs-who2 { font-size: 14px; color: #8fdcff; margin-top: 2px; }
.hs-desc { font-size: 15px; color: #dfe6ff; margin: 8px 0; line-height: 1.45; }
.hs-say { text-align: left; padding: 9px 12px; border-radius: 14px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); font-size: 15px; line-height: 1.4; }
.hs-say b { display: block; font-weight: normal; font-size: 12px; color: #ffd36b; }
.hs-price-row { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 10px; }
.hs-price-row .hs-price { font-size: 18px; }
.hs-price-row .hs-price img { width: 22px; height: 22px; }
.hs-price-row small { font-size: 12px; color: var(--muted); }
.hs-soon-d { font-size: 13px; color: var(--muted); margin: 8px 0 0; line-height: 1.4; }
/* v3.6 outfit perks: card label, the box in the preview, the squad sheet line, the new-leader card */
.hs-perk-s { font-size: 10.5px; line-height: 1.2; text-align: center; color: #ffd36b; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.4em; }
.hs-perk-s.daily { color: #8fe3ff; }
.hs-perk-s.halloween { color: #ffb27a; }
.hs-perk { text-align: left; margin-top: 8px; padding: 9px 12px; border-radius: 14px; background: rgba(255,211,107,0.08); border: 1.5px solid rgba(255,211,107,0.55); }
.hs-perk.daily { background: rgba(143,227,255,0.08); border-color: rgba(143,227,255,0.55); }
.hs-perk.halloween { background: rgba(255,162,92,0.09); border-color: rgba(255,162,92,0.6); }
.hs-perk .hp-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.hs-perk small { font-size: 12px; color: #ffd36b; }
.hs-perk.daily small { color: #8fe3ff; }
.hs-perk.halloween small { color: #ffb27a; }
.hs-perk em { font-style: normal; font-size: 11.5px; padding: 1px 8px; border-radius: 8px; background: rgba(255,255,255,0.12); color: #cfe3ff; white-space: nowrap; }
.hs-perk.on em { background: #8ef0a8; color: #06301a; }
.hs-perk b { display: block; font-weight: normal; font-size: 16.5px; color: #fff; margin-top: 3px; line-height: 1.3; }
.hs-perk p { margin: 4px 0 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
.hs-perk.new { animation: perkNew 1.4s ease-out 2; }
@keyframes perkNew { 0% { box-shadow: 0 0 0 0 rgba(255,224,102,0.9); } 100% { box-shadow: 0 0 0 16px rgba(255,224,102,0); } }
.ro-perk { padding: 6px 10px; border-radius: 12px; background: rgba(255,211,107,0.07); border: 1px solid rgba(255,211,107,0.4); }
.ro-perk.daily { border-color: rgba(143,227,255,0.45); }
.ro-perk.halloween { border-color: rgba(255,162,92,0.5); }
.ro-perk.none { background: rgba(255,255,255,0.04); border-style: dashed; border-color: rgba(255,255,255,0.18); }
.ro-perk small { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 6px; font-size: 11.5px; color: #ffd36b; }
.ro-perk.none small { color: var(--muted); }
.ro-perk small em { flex: none; font-style: normal; font-size: 10.5px; padding: 0 6px; border-radius: 7px; background: rgba(255,255,255,0.12); color: #cfe3ff; white-space: nowrap; }
.ro-perk.on small em { background: #8ef0a8; color: #06301a; }
.ro-perk b { display: block; font-weight: normal; font-size: 14px; color: #e9f8ff; line-height: 1.3; }
.ro-perk.none b { font-size: 12.5px; color: var(--muted); }
.greet .g-skill .g-perk { margin-top: 3px; color: #8fe3ff; }
.up-note.perk-note { color: #8fe3ff; background: rgba(143,227,255,0.09); }
/* shop: outfits banner + purchase terms */
.card.hs-banner { width: 100%; font-family: var(--font); color: inherit; text-align: left; cursor: pointer;
  border-color: rgba(190,150,255,0.8); background: linear-gradient(90deg, rgba(140,100,255,0.24), rgba(60,200,255,0.10)); }
.card.hs-banner .btn { pointer-events: none; min-width: 72px; }
.buy-note { font-size: 13px; color: var(--muted); padding: 2px 6px 10px; line-height: 1.5; text-align: left; }
.buy-note summary { cursor: pointer; color: #9fc3ff; font-size: 14px; margin-bottom: 4px; }
.buy-note a { color: #9fc3ff; }
.st-mail { font-size: 14px; color: var(--muted); }

/* v3.11 enemies: the BREAK! cut-in (she is thrown back from the left), her defeat scene after the victory, the enemy album */
.cutin.foe::before { content: ''; position: absolute; inset: 0; background: #fff; opacity: 0; animation: foeFlash .4s ease-out; }
.cutin.foe .cut-band { top: 29%; height: 29%; background: linear-gradient(90deg, rgba(80,0,16,0) 0%, rgba(190,10,46,0.94) 16%, rgba(255,72,104,0.94) 64%, rgba(80,0,16,0) 100%);
  box-shadow: 0 0 40px rgba(255,40,80,0.7); animation: cutBand 1.8s cubic-bezier(.2,.9,.2,1) forwards !important; }
.cutin.foe img { right: auto; left: -9%; top: 8%; height: 47%; max-width: 104%; object-position: 0 100%; animation: cutHeroL 1.8s cubic-bezier(.2,.9,.2,1) forwards; }
.cutin.foe .cut-txt { left: auto; right: 5%; top: 35%; max-width: 56%; text-align: right; text-shadow: 0 3px 0 #3a000a, 0 0 16px rgba(255,60,90,0.85); animation: cutTxtR 1.8s ease forwards; }
.cutin.foe .cut-txt b { display: block; font-size: 46px; letter-spacing: 3px; color: #fff4f6; }
.cutin.foe .cut-txt small { color: #ffd2da; }
@keyframes foeFlash { 0% { opacity: 0.9; } 100% { opacity: 0; } }
.rpose.ach.foe { --ac1: #ffd6de; --ac2: #ff3355; --act: #3a000c; --acg: rgba(255,50,90,0.7); --acr: rgba(255,80,110,0.16); }
/* a soft red glow, not the rotating ray pattern of the heroines' scenes (no red sunburst behind an enemy) */
.rpose.ach.foe .rp-glow { background: radial-gradient(70% 55% at 50% 42%, rgba(255,60,100,0.34), rgba(0,0,0,0) 72%); animation: none; opacity: 1; }
.npc-tag { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 0 6px; border-radius: 6px; background: #5b6478; font-family: var(--num); font-style: normal; font-size: 11px; line-height: 16px; color: #fff; letter-spacing: 0.5px; }
.rpose.ach.foe.brk .fb-frame { position: absolute; left: 50%; top: calc(14% + var(--safe-t)); width: min(92vw, 62vh); aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 16px; border: 3px solid var(--ac1); box-shadow: 0 0 34px var(--acg), 0 20px 40px rgba(0,0,0,0.6);
  background: radial-gradient(circle at 60% 40%, #ff9fb2, #b0102e 60%, #3a0010); overflow: hidden; animation: achIn .6s cubic-bezier(.2,.9,.3,1.12) both; }
.rpose.ach.foe.brk .fb-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.rpose.ach.foe.brk .fb-frame b { position: absolute; right: 10px; bottom: 6px; font-weight: normal; font-size: 40px; color: #fff; text-shadow: 0 3px 0 #3a000a, 0 0 14px rgba(255,60,90,0.9); }
.rpose.ach.foe.brk .rp-cap { top: calc(14% + var(--safe-t) + min(92vw, 62vh) + 14px); }
.side-btn .ic .new-dot { position: absolute; top: -6px; right: -8px; padding: 1px 5px; border-radius: 8px; background: linear-gradient(180deg, #ff6f92, #e8164f); color: #fff; font-family: var(--num); font-size: 11px; font-weight: normal; border: 1.5px solid #fff; }
.foe-sec { margin-top: 10px; }
.foe-h { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 6px; }
.foe-h b { font-weight: normal; font-size: 17px; color: #ffd6de; }
.foe-h small { font-size: 12px; color: #9fb0d8; }
.foe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.foe-card { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px 7px; border-radius: 12px; background: rgba(30,12,24,0.75); border: 2px solid rgba(255,90,120,0.45); color: #fff; min-width: 0; }
.foe-card.on { border-color: #ffd6de; box-shadow: 0 0 14px rgba(255,80,110,0.6); }
.foe-card .fc-art { position: relative; width: 68px; height: 68px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #7a2a44, #1c0a14); border: 2px solid rgba(255,255,255,0.55); overflow: visible; }
.foe-card .fc-art img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.foe-card .fc-art .npc-tag { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); margin: 0; }
.foe-card b { font-weight: normal; font-size: 12px; line-height: 1.15; text-align: center; margin-top: 4px; overflow-wrap: anywhere; }
.foe-card small { font-size: 11px; color: #ffb3c2; }
.foe-card.locked .fc-art img { filter: grayscale(0.85) brightness(0.55); }
.foe-card.locked b { color: #b9c0d8; }
.foe-detail { display: flex; gap: 12px; align-items: center; text-align: left; }
.foe-detail .fd-face { width: 92px; height: 92px; flex: none; border-radius: 50%; object-fit: cover; background: radial-gradient(circle at 50% 35%, #7a2a44, #1c0a14); border: 3px solid #ffd6de; }
.foe-detail.locked .fd-face { filter: grayscale(0.85) brightness(0.55); }
.foe-detail .fd-txt b { font-weight: normal; font-size: 19px; color: #ffd6de; }
.foe-detail .fd-txt p { margin: 4px 0; font-size: 14px; color: #e8ecff; line-height: 1.35; }
.foe-detail .fd-txt small { font-size: 12px; color: #9fb0d8; }
.foe-views { display: flex; gap: 10px; margin: 12px 0 10px; }
.foe-view { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px; border-radius: 12px; background: rgba(30,12,24,0.75); border: 2px solid rgba(255,90,120,0.55); color: #fff; }
.foe-view .fv-art { width: 100%; aspect-ratio: 2 / 3; border-radius: 9px; background: #1c0a14 center / cover no-repeat; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.foe-view.break .fv-art { aspect-ratio: 1; background-color: #6a0a20; background-size: contain; }
.foe-view b { font-weight: normal; font-size: 14px; }
.foe-view.locked { opacity: 0.6; }
/* v3.11 the boss walks in behind the warning band (her battle sprite from atlas_mob) */
.boss-intro .bi-art { position: absolute; right: -4%; top: 12%; filter: drop-shadow(0 12px 22px rgba(0,0,0,0.7)) brightness(1.05); animation: biArt 2.3s cubic-bezier(.2,.9,.2,1) forwards; }
.boss-intro div small { display: block; font-size: 17px; color: #ffd6de; margin-top: 2px; }
@keyframes biArt { 0% { transform: translateX(45%); opacity: 0; } 16% { transform: translateX(0); opacity: 1; } 82% { opacity: 1; } 100% { transform: translateX(-8%); opacity: 0; } }

/* ── v3.12 lobby: the reference screens (docs/ART_GUIDE.md 10–11) — glass panels, white + the leader's accent (--acc) ── */
.ic { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; display: block; }
.ic.f { fill: currentColor; stroke: none; }
.ic .dot { fill: currentColor; }
.lobby { --glass: linear-gradient(180deg, rgba(22,36,74,0.58), rgba(7,12,30,0.74)); --edge: rgba(var(--acc-rgb), 0.55);
  overflow: hidden; color: var(--text); background: #060b1c; }
.lb-bg { position: absolute; inset: 0; background: #070c1e center/cover no-repeat; }
.lb-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,6,18,0.6) 0%, rgba(3,6,18,0) 15%, rgba(3,6,18,0) 56%, rgba(3,6,18,0.5) 80%, rgba(3,6,18,0.9) 100%); }
.lobby.enter .lb-bg { animation: lbBg .6s ease both; }
@keyframes lbBg { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.lb-glass, .lb-res, .lb-icon, .lb-side .ic, .lb-plate, .lb-mode, .lb-card, .lb-brief, .lb-lead, .lb-sup, .lb-btn2, .ro-detail, .wd-info, .wd-th {
  background: var(--glass); border: 1px solid var(--edge); box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 6px 16px rgba(0,0,0,0.38); }
/* frosted glass only on the big panels (many small blurred layers cost frames on low-end phones) */
.lb-plate, .lb-brief, .ro-detail, .wd-info { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
/* top bar */
.lb-top { position: relative; z-index: 6; display: flex; align-items: center; gap: 8px; padding: calc(8px + var(--safe-t)) 10px 4px; }
.lb-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; font-size: 24px; color: #fff; }
.lb-icon:active, .lb-res:active, .lb-side:active .ic, .lb-btn2:active, .lb-sup:active { transform: translateY(1px) scale(0.97); }
.lb-ava { position: relative; display: flex; align-items: center; flex: none; padding: 0 4px 0 0; }
.lb-ava .ring { width: 52px; height: 52px; border-radius: 50%; padding: 2px; background: conic-gradient(from 200deg, var(--acc), #ffffff, var(--acc)); box-shadow: 0 0 14px rgba(var(--acc-rgb),0.6), 0 4px 10px rgba(0,0,0,0.5); }
.lb-ava .ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: #0b1530; }
.lb-ava .lv { position: absolute; inset-inline-start: 30px; bottom: -6px; display: flex; align-items: baseline; gap: 3px; padding: 1px 7px; border-radius: 9px; background: linear-gradient(180deg, #1a2a5e, #0a1230); border: 1px solid var(--edge); font-family: var(--num); white-space: nowrap; }
.lb-ava .lv small { font-family: var(--font); font-size: 9.5px; color: rgba(225,235,255,0.75); }
.lb-ava .lv b { font-weight: normal; font-size: 14px; color: #fff; }
.lb-ava .xp { position: absolute; inset-inline-start: 56px; top: 13px; width: 46px; height: 5px; border-radius: 3px; background: rgba(0,0,0,0.5); overflow: hidden; }
.lb-ava .xp u { display: block; height: 100%; background: linear-gradient(90deg, var(--acc), #fff); }
.lb-wallet { flex: 1; min-width: 0; display: flex; justify-content: flex-end; gap: 6px; }
.lb-res { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 5px 0 3px; border-radius: 16px; font-family: var(--num); font-size: 15px; color: #fff; min-width: 0; }
.lb-res img { width: 26px; height: 26px; object-fit: contain; }
.lb-res b { font-weight: normal; white-space: nowrap; }
.lb-res i { width: 20px; height: 20px; border-radius: 7px; display: grid; place-items: center; background: rgba(var(--acc-rgb),0.9); font-size: 15px; }
.lb-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.12; text-shadow: 0 2px 6px rgba(0,0,0,0.7); }
.lb-title b { font-weight: normal; font-size: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-title small { font-size: 12.5px; color: rgba(var(--acc-rgb),1); filter: brightness(1.35); }
@media (max-width: 374px) { .lb-title b { font-size: 18px; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.02; }
  .lb-res { font-size: 14px; } .lb-res img { width: 22px; height: 22px; } }
.lb-body { position: relative; z-index: 2; flex: 1; min-height: 0; }
/* bottom nav */
.lb-nav { position: relative; z-index: 6; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(5px + var(--safe-b));
  background: linear-gradient(180deg, rgba(10,16,38,0.78), rgba(4,8,22,0.95)); border-top: 1px solid var(--edge); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
/* --banner-h: the adaptive banner's real height (services/ads.js, AdMob SizeChanged); 60px until it reports */
body.has-banner .lb-nav { padding-bottom: calc(var(--banner-h, 60px) + var(--safe-b)); }
.lb-tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0 2px; font-size: 12px; color: rgba(225,235,255,0.6); }
.lb-tab .ic { font-size: 25px; }
.lb-tab.on { color: #fff; }
.lb-tab.on .ic { color: var(--acc); filter: brightness(1.25) drop-shadow(0 0 6px rgba(var(--acc-rgb),0.9)); }
.lb-tab.on::before { content: ''; position: absolute; top: -7px; left: 26%; right: 26%; height: 3px; border-radius: 2px; background: var(--acc); box-shadow: 0 0 10px var(--acc); }
.lb-dot { position: absolute; top: 0; right: 24%; min-width: 9px; height: 9px; border-radius: 6px; background: #ff4f6d; box-shadow: 0 0 6px rgba(255,79,109,0.8); font-style: normal; }
.lb-dot.n { min-width: 17px; height: 17px; top: -2px; right: 18%; padding: 0 4px; font-family: var(--num); font-size: 11px; line-height: 17px; color: #fff; text-align: center; }
/* home */
.lb-stage-hero { position: absolute; left: 0; right: 0; top: 0; bottom: 0; display: flex; justify-content: center; align-items: flex-end; pointer-events: none; }
.lb-hero { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; pointer-events: auto; }
.lb-hero img { height: 100%; width: auto; max-width: 100vw; object-fit: contain; object-position: 50% 100%; display: block; transform-origin: 50% 100%;
  animation: heroIdle 4.6s ease-in-out infinite; filter: drop-shadow(0 12px 24px rgba(0,0,0,0.55)); }
.lobby.enter .lb-hero img { animation: heroSwap .5s cubic-bezier(.2,.9,.3,1.2), heroIdle 4.6s ease-in-out .5s infinite; }
.lb-hero.hop img { animation: heroHop .55s cubic-bezier(.3,1.5,.5,1), heroIdle 4.6s ease-in-out .55s infinite; }
.lb-talk { position: absolute; left: 60%; top: 9%; width: 34px; height: 30px; display: grid; place-items: center; font-size: 26px; color: #fff; opacity: 0.9;
  filter: drop-shadow(0 0 6px rgba(var(--acc-rgb),0.9)); animation: talkBob 2.4s ease-in-out infinite; }
@keyframes talkBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.lobby .hero-say { left: auto; right: 6%; top: calc(78px + var(--safe-t)); max-width: 64%; }
.lb-col { position: absolute; top: 8px; display: flex; flex-direction: column; gap: 10px; z-index: 3; }
.lb-col.left { left: 8px; } .lb-col.right { right: 8px; }
.lb-side { position: relative; width: 58px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; line-height: 1.1; text-align: center; text-shadow: 0 1px 3px #000, 0 0 6px rgba(0,0,0,0.9); }
.lb-side .ic { position: relative; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 25px; color: #fff; }
.lb-side .ic > img { width: 38px; height: 38px; object-fit: contain; border-radius: 50%; }
.lb-side .ic .lb-dot { top: 1px; right: 1px; }
.lb-side .lbl { max-width: 62px; }
.lb-side .badge { top: -4px; right: -4px; }
.lb-side.dim .ic { filter: grayscale(0.7) brightness(0.75); }
.lb-side .timer { font-family: var(--num); color: #ffe08a; }
.lb-dock { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 4; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.lb-plate { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 6px 12px 7px; border-radius: 14px 14px 14px 4px; line-height: 1.1; min-width: 0; max-width: 46%; }
.lb-plate small { font-size: 11.5px; color: var(--acc); filter: brightness(1.4); }
.lb-plate b { font-weight: normal; font-size: 22px; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.6); }
.lb-plate i { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-style: normal; font-family: var(--num); font-size: 13px; color: rgba(230,240,255,0.85); }
.lb-plate i .ic { font-size: 15px; }
.lb-plate em { margin-left: 4px; padding: 0 5px; border-radius: 7px; background: #ff4f6d; color: #fff; font-style: normal; font-family: var(--font); font-size: 11px; }
.lb-go { display: flex; flex-direction: column; gap: 8px; width: min(48%, 196px); flex: none; }
.lb-mode { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border-color: var(--mc); box-shadow: 0 0 14px color-mix(in srgb, var(--mc) 55%, transparent), 0 6px 16px rgba(0,0,0,0.45); padding: 0; }
/* the cards are cut out of assets/lobby_cards.webp (src/ui/sheets.js) and cover their box; she stands in the left third */
.lb-mode .art, .lb-card .art { position: absolute; inset: 0; background-size: cover; background-position: 8% 50%; background-repeat: no-repeat; }
.lb-mode .art { background-position: 50% 30%; }
.lb-mode::after, .lb-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(2,6,18,0.86)); }
.lb-mode .nm { position: absolute; z-index: 1; left: 9px; bottom: 6px; font-size: 16px; text-shadow: 0 2px 3px #000; }
.lb-mode .chip, .lb-card .chip { position: absolute; z-index: 1; display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px 1px 5px; border-radius: 9px;
  background: rgba(2,8,24,0.78); border: 1px solid color-mix(in srgb, var(--mc) 70%, white 10%); font-family: var(--num); font-size: 13px; color: #fff; }
.lb-mode .chip { top: 6px; left: 6px; }
.chip .ic { font-size: 14px; color: var(--mc); filter: brightness(1.3); }
.chip img { width: 16px; height: 16px; object-fit: contain; }
.chip em { margin-left: 2px; color: #ff6b6b; font-style: normal; }
.chip.out { opacity: 0.75; }
.lb-mode .sw { position: absolute; z-index: 1; right: 7px; bottom: 6px; font-size: 18px; color: #fff; opacity: 0.85; }
.lb-mode .lb-dot { top: 6px; right: 6px; }
.lb-sortie { position: relative; height: 58px; border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #fff;
  background: var(--acc);
  background: linear-gradient(180deg, color-mix(in srgb, var(--acc) 85%, white 15%), color-mix(in srgb, var(--acc) 70%, black 30%));
  border: 1px solid rgba(255,255,255,0.55); box-shadow: inset 0 2px 0 rgba(255,255,255,0.4), inset 0 -4px 0 rgba(0,0,0,0.25), 0 0 22px rgba(var(--acc-rgb),0.65), 0 8px 18px rgba(0,0,0,0.45); overflow: hidden; }
.lb-sortie::after, .lb-start::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,0.45), transparent); animation: shineSweep 3.2s ease-in-out infinite; }
@keyframes shineSweep { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.lb-sortie .ic { font-size: 26px; } .lb-sortie b { font-weight: normal; font-size: 26px; text-shadow: 0 2px 0 rgba(0,0,0,0.35); }
.lb-sortie:active, .lb-start:active { transform: translateY(2px) scale(0.98); }
.lobby.enter .lb-col.left { animation: lbL .45s .1s ease both; } .lobby.enter .lb-col.right { animation: lbR .45s .1s ease both; } .lobby.enter .lb-dock { animation: lbUp .45s .15s ease both; }
@keyframes lbL { from { transform: translateX(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes lbR { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes lbUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
/* mode select */
.lb-modes { position: absolute; inset: 6px 10px 8px; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 10px; overflow-y: auto; }
.lb-card { position: relative; min-height: 112px; border-radius: 14px; overflow: hidden; border: 2px solid var(--mc); padding: 0;
  box-shadow: 0 0 16px color-mix(in srgb, var(--mc) 45%, transparent), 0 8px 18px rgba(0,0,0,0.45); text-align: left; }
.lb-card .nm { position: absolute; z-index: 1; left: 9px; bottom: 36px; font-size: 18px; text-shadow: 0 2px 3px #000; }
.lb-card .d { position: absolute; z-index: 1; left: 9px; right: 6px; bottom: 6px; font-size: 11px; line-height: 1.22; color: rgba(230,240,255,0.86); text-shadow: 0 1px 2px #000;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.lb-card .chip { top: 7px; left: 7px; }
.lb-card .chip.lock .ic { color: #fff; }
.lb-card.locked .art { filter: grayscale(1) brightness(0.4); }
.lb-card.locked { border-color: rgba(255,255,255,0.25); box-shadow: 0 8px 18px rgba(0,0,0,0.45); }
.lb-card.cur { box-shadow: 0 0 0 2px #fff, 0 0 24px var(--mc), 0 8px 18px rgba(0,0,0,0.45); }
.lb-new, .lb-cur { position: absolute; z-index: 2; top: 7px; right: 7px; padding: 1px 7px; border-radius: 8px; font-style: normal; font-size: 11.5px; }
.lb-new { background: #ff4f6d; color: #fff; animation: pulseNew 1.4s ease-in-out infinite; }
.lb-cur { background: rgba(255,255,255,0.92); color: #0a1230; }
.lb-new + .lb-cur { top: 30px; }
.lobby.enter .lb-card { animation: lbUp .4s ease both; }
.lobby.enter .lb-card:nth-child(2) { animation-delay: .05s; } .lobby.enter .lb-card:nth-child(3) { animation-delay: .1s; } .lobby.enter .lb-card:nth-child(4) { animation-delay: .15s; } .lobby.enter .lb-card:nth-child(5) { animation-delay: .2s; } .lobby.enter .lb-card:nth-child(6) { animation-delay: .25s; }
/* sortie prep */
.lv-prep .lb-body { display: flex; flex-direction: column; padding: 4px 10px calc(10px + var(--safe-b)); gap: 8px; }
body.has-banner .lv-prep .lb-body { padding-bottom: calc(var(--banner-h, 60px) + 4px + var(--safe-b)); }
.lb-brief { border-radius: 14px; padding: 8px; flex: none; }
.lb-card-in { display: flex; align-items: center; gap: 10px; }
.lb-card-in .thumb { width: 84px; height: 56px; border-radius: 10px; flex: none; background: center/cover no-repeat; border: 1px solid rgba(255,255,255,0.3); }
.lb-card-in .thumb[style*="lobby_cards"] { background-size: 200% 300%; }
.lb-card-in .thumb.portrait { width: 60px; height: 60px; background-size: contain; border-radius: 50%; background-color: rgba(255,80,80,0.15); }
.lb-card-in .thumb.badge-art { width: 60px; height: 60px; background-size: contain; border: 0; }
.lb-card-in .info { flex: 1; min-width: 0; }
.lb-card-in .ch { font-size: 13px; color: rgba(225,235,255,0.75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-card-in .st { display: flex; align-items: center; gap: 4px; font-family: var(--num); font-size: 24px; line-height: 1.1; }
.lb-card-in .st.small { font-family: var(--font); font-size: 17px; }
.lb-card-in .st .ic { font-size: 20px; color: #ffd54a; }
.lb-card-in .st .ico { width: 24px; height: 24px; object-fit: contain; }
.lb-card-in .st .kind { font-family: var(--font); font-size: 13px; color: #ffcf6a; margin-left: 4px; }
.lb-card-in .sub { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.lb-card-in .sub .tickets { display: inline-flex; align-items: center; gap: 3px; color: #fff; font-family: var(--num); }
.lb-card-in .sub.red { color: #ff8a80; }
.lb-card-in .foe { flex: none; width: 66px; display: flex; flex-direction: column; align-items: center; font-size: 11px; color: #ffb4a8; line-height: 1.1; text-align: center; }
.lb-card-in .foe img { width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0,0,0,0.6)); }
.lb-card-in .foe.opp b { font-weight: normal; font-size: 12px; color: #fff; margin-top: 4px; max-width: 70px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-card-in .foe.opp small { color: #ffcf6a; font-family: var(--num); }
.lb-squad { position: relative; flex: 1; min-height: 150px; display: flex; justify-content: center; align-items: flex-end; gap: 0; }
.lb-pod { position: relative; height: 86%; flex: 0 1 33%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.lb-pod.lead { height: 100%; flex-basis: 38%; z-index: 2; }
.lb-squad.n1 .lb-pod.lead { flex-basis: 70%; }
.lb-pod img { position: relative; z-index: 1; height: calc(100% - 34px); width: auto; max-width: 140%; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 10px 16px rgba(0,0,0,0.55)); }
.lb-pod .base { position: absolute; bottom: 24px; left: 6%; right: 6%; height: 26px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(var(--acc-rgb),0.85), rgba(var(--acc-rgb),0.25) 55%, transparent 72%); box-shadow: 0 0 22px rgba(var(--acc-rgb),0.5); }
.lb-pod.lead .base { background: radial-gradient(ellipse at center, rgba(255,214,90,0.95), rgba(255,190,60,0.3) 55%, transparent 72%); box-shadow: 0 0 26px rgba(255,200,60,0.6); }
.lb-pod .tag { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; line-height: 1.05; margin-top: -2px; text-shadow: 0 1px 3px #000; }
.lb-pod .tag b { font-weight: normal; font-size: 15px; }
.lb-pod .tag small { font-size: 10.5px; color: rgba(225,235,255,0.7); }
.lb-pod .tag em { position: absolute; top: -20px; font-size: 18px; color: #ffd54a; filter: drop-shadow(0 0 6px rgba(255,200,60,0.9)); }
.lobby.enter .lb-pod { animation: lbUp .5s ease both; } .lobby.enter .lb-pod.lead { animation-delay: .08s; }
.lb-lead { border-radius: 12px; padding: 6px 10px; flex: none; display: flex; flex-direction: column; gap: 1px; }
.lb-lead small { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #ffd36b; }
.lb-lead small .ic { font-size: 12px; }
.lb-lead b { font-weight: normal; font-size: 14px; }
.lb-lead b.perk { font-size: 12.5px; color: #c9f0ff; }
.lb-support { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex: none; }
.lb-support.one { grid-template-columns: 1fr; }
.lb-sup { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; text-align: left; min-width: 0; }
.lb-sup img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.lb-sup > .ic { font-size: 22px; opacity: 0.7; }
.lb-sup span { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.lb-sup small { font-size: 10.5px; color: rgba(225,235,255,0.7); }
.lb-sup b { font-weight: normal; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-sup .sw { position: absolute; right: 6px; top: 6px; font-size: 13px; opacity: 0.6; }
.lb-sup.locked { opacity: 0.55; }
.lb-act { display: flex; gap: 8px; align-items: stretch; flex: none; }
.lb-act-side { display: flex; flex-direction: column; gap: 6px; width: 104px; flex: none; }
.lb-btn2 { position: relative; flex: 1; min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 2px 6px; border-radius: 12px; font-size: 13px; line-height: 1.1; color: #fff; text-align: center; }
.lb-btn2 .ic { font-size: 18px; }
.lb-btn2 .ad { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: rgba(0,0,0,0.35); font-style: normal; font-size: 10px; flex: none; }
.lb-btn2 span { white-space: pre-line; }
.lb-btn2.boost { border-color: rgba(80,230,140,0.7); }
.lb-btn2.boost.on { border-color: #ffd54a; box-shadow: 0 0 12px rgba(255,210,60,0.6); }
.lb-btn2 .ok { color: #ffd54a; font-family: var(--num); font-weight: normal; }
.lb-btn2 .badge { top: -6px; right: -4px; }
.lb-btn2 .n { font-family: var(--num); font-weight: normal; font-size: 12px; color: var(--acc); filter: brightness(1.3); }
.lb-start { position: relative; flex: 1; min-height: 86px; border-radius: 18px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff; overflow: hidden;
  background: linear-gradient(180deg, #ffe58a, #ffbf1f 55%, #f29a00); border: 1px solid rgba(255,255,255,0.7); color: var(--gold-ink);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.6), inset 0 -5px 0 var(--gold-3), 0 0 22px rgba(255,190,40,0.55), 0 8px 18px rgba(0,0,0,0.45); }
.lb-start .ic { font-size: 30px; } .lb-start b { font-weight: normal; font-size: 28px; text-shadow: 0 1px 0 rgba(255,255,255,0.6); }
.lb-start[disabled] { filter: grayscale(0.85) brightness(0.7); pointer-events: none; }
/* squad */
.lv-roster .lb-body { display: flex; flex-direction: column; }
.ro-top { position: relative; flex: 1 1 52%; min-height: 0; display: flex; overflow: hidden; }
.ro-top::before { content: ''; position: absolute; inset: 0; background: radial-gradient(70% 60% at 35% 45%, color-mix(in srgb, var(--hc) 38%, transparent), transparent 70%); pointer-events: none; }
.ro-fig { position: relative; flex: 1; min-width: 0; overflow: hidden; display: flex; justify-content: center; }
.ro-fig img { position: absolute; top: 2%; left: 50%; transform: translateX(-50%); height: 168%; width: auto; max-width: none; object-fit: contain; object-position: 50% 0;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.6)); -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 52%, transparent 60%); mask-image: linear-gradient(180deg, #000 0%, #000 52%, transparent 60%); }
.lobby.enter .ro-fig img, .ro-fig img { animation: roIn .45s ease both; }
@keyframes roIn { from { opacity: 0; transform: translateX(-46%); } to { opacity: 1; transform: translateX(-50%); } }
.ro-top.locked .ro-fig img { filter: brightness(0.1) saturate(0); }
.lv-roster .ro-detail { position: relative; z-index: 2; width: 47%; max-width: 230px; flex: none; margin: 4px 10px 10px 0; padding: 10px; border-radius: 14px; display: flex; flex-direction: column; gap: 6px; align-self: flex-start; border-color: color-mix(in srgb, var(--hc) 70%, white 10%);
  max-height: calc(100% - 14px); flex-wrap: nowrap; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; scrollbar-width: thin; }
.lv-roster .ro-detail > * { flex-shrink: 0; }
.lv-roster .ro-role { font-size: 12px; color: var(--hc); filter: brightness(1.35); }
.lv-roster .ro-name { font-size: 26px; }
.lv-roster .ro-skill b { font-size: 14px; }
.lb-btn { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 10px; border-radius: 12px; font-size: 15px; color: #fff;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.3); }
.lb-btn .ic { font-size: 18px; }
.lb-btn img { width: 22px; height: 22px; object-fit: contain; }
.lb-btn.gold { background: linear-gradient(180deg, #ffe58a, #ffbf1f 60%, #f29a00); color: var(--gold-ink); border-color: rgba(255,255,255,0.7); box-shadow: inset 0 -3px 0 var(--gold-3), 0 0 12px rgba(255,190,40,0.45); }
.lb-btn.blue { background: linear-gradient(180deg, #8ec5ff, #2f6df0 60%, #2457d8); border-color: rgba(255,255,255,0.55); box-shadow: inset 0 -3px 0 var(--blue-3); }
.lb-btn.green { background: linear-gradient(180deg, #9dff8a, #22c55e 60%, #16a34a); color: var(--green-ink); border-color: rgba(255,255,255,0.6); box-shadow: inset 0 -3px 0 var(--green-3); font-family: var(--num); font-size: 18px; }
.lb-btn.on { border-color: #ffd54a; color: #ffe08a; }
.lb-btn[disabled] { opacity: 0.85; pointer-events: none; }
.lb-btn.gold[disabled], .lb-btn.green[disabled] { filter: grayscale(0.8) brightness(0.75); }
.lb-btn:active { transform: translateY(2px); }
.ro-more { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.ro-more .lb-btn2 { flex-direction: column; gap: 1px; min-height: 52px; font-size: 12px; }
.ro-list { position: relative; z-index: 2; flex: none; padding: 8px 10px 8px; background: linear-gradient(180deg, rgba(4,8,22,0.25), rgba(4,8,22,0.82) 20%); }
.lv-roster .ro-count { text-align: left; margin: 0 2px 6px; font-size: 12.5px; }
.lv-roster .ro-grid { gap: 7px; }
/* A larger roster keeps the selected commander's detail panel in view. */
.lv-roster .ro-list.ro-many { flex: 0 1 42%; min-height: 140px; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; scrollbar-width: thin; }
.lv-roster .ro-list.ro-many .ro-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.ro-card .nm { max-width: 100%; min-width: 0; }
.ro-card .ro-label { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.lv-roster .ro-card { border-radius: 12px; border: 2px solid color-mix(in srgb, var(--hc) 60%, rgba(255,255,255,0.2)); background: rgba(8,14,34,0.8); }
.lv-roster .ro-card img { aspect-ratio: 1 / 1.05; background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--hc) 45%, #0b1530), #070c1e); }
.lv-roster .ro-card .nm { display: flex; align-items: center; gap: 2px; font-size: 12.5px; margin: 2px 0 1px; }
.lv-roster .ro-card .nm .ic { font-size: 11px; }
.lv-roster .ro-card.sel { border-color: #fff; box-shadow: 0 0 0 2px var(--hc), 0 0 16px var(--hc); }
.lv-roster .ro-card.lead { border-color: #ffd54a; }
.lv-roster .ro-card .ld { display: grid; place-items: center; top: 3px; left: 3px; width: 20px; height: 20px; padding: 0; border-radius: 50%; background: #ffd54a; color: #3a2400; font-size: 12px; }
/* short phones (and any phone with the ad banner): the 12 cards in two rows so her detail panel keeps its room */
@media (max-height: 760px) {
  .ro-list { padding: 6px 8px; }
  .lv-roster .ro-count { margin-bottom: 4px; }
  .lv-roster .ro-grid { grid-template-columns: repeat(6, 1fr); gap: 5px; }
  .lv-roster .ro-card .nm { font-size: 11px; }
  .lv-roster .ro-card .ld { width: 16px; height: 16px; font-size: 10px; }
}
@media (max-height: 860px) {     /* the same once the ad banner takes its ~60px */
  body.has-banner .ro-list { padding: 6px 8px; }
  body.has-banner .lv-roster .ro-count { margin-bottom: 4px; }
  body.has-banner .lv-roster .ro-grid { grid-template-columns: repeat(6, 1fr); gap: 5px; }
  body.has-banner .lv-roster .ro-card .nm { font-size: 11px; }
  body.has-banner .lv-roster .ro-card .ld { width: 16px; height: 16px; font-size: 10px; }
}
/* achievement album sheet */
.album-box .ro-album { margin: 0; }
/* wardrobe */
.lv-wardrobe .lb-body { display: flex; flex-direction: column; }
.wd-stage { position: relative; flex: 1; min-height: 0; }
.wd-stage::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 50% at 42% 55%, color-mix(in srgb, var(--c2) 34%, transparent), transparent 72%); pointer-events: none; }
.wd-fig { position: absolute; left: 0; right: 92px; top: 2%; bottom: 22px; display: flex; justify-content: center; align-items: flex-end; }
.wd-fig img { position: relative; z-index: 1; height: 100%; width: auto; max-width: 100%; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 12px 22px rgba(0,0,0,0.55)); animation: wdIn .45s ease both; }
.wd-fig .ped { position: absolute; bottom: -10px; left: 50%; width: 74%; height: 44px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--c2) 80%, white 20%), color-mix(in srgb, var(--c2) 30%, transparent) 55%, transparent 72%); box-shadow: 0 0 30px color-mix(in srgb, var(--c2) 60%, transparent); }
@keyframes wdIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.wd-arrow { position: absolute; z-index: 3; top: 42%; width: 34px; height: 54px; border-radius: 10px; display: grid; place-items: center; font-size: 22px; color: #fff; background: rgba(4,8,22,0.45); border: 1px solid rgba(255,255,255,0.25); }
.wd-arrow.l { left: 6px; } .wd-arrow.r { right: 98px; }
.wd-pose { position: absolute; z-index: 3; left: 8px; bottom: 10px; display: flex; flex-direction: column; align-items: center; gap: 1px; width: 52px; padding: 6px 0; border-radius: 12px; font-size: 11px; color: #fff; background: rgba(4,8,22,0.55); border: 1px solid rgba(255,255,255,0.3); }
.wd-pose .ic { font-size: 22px; }
.wd-list { position: absolute; z-index: 3; right: 8px; top: 6px; bottom: 6px; width: 84px; display: flex; flex-direction: column; gap: 7px; overflow-y: auto; }
.wd-th { position: relative; flex: none; height: 104px; border-radius: 12px; overflow: hidden; padding: 0; border: 2px solid color-mix(in srgb, var(--c2) 60%, rgba(255,255,255,0.25)); }
.wd-th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; background: linear-gradient(180deg, color-mix(in srgb, var(--c2) 40%, #0b1530), #070c1e); }
.wd-th span { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 2px 2px; font-size: 11px; text-align: center; background: linear-gradient(180deg, transparent, rgba(2,6,18,0.9)); }
.wd-th em { position: absolute; top: 3px; right: 3px; display: inline-flex; align-items: center; gap: 2px; padding: 0 4px; border-radius: 7px; font-style: normal; font-size: 10px; background: rgba(2,6,18,0.8); }
.wd-th em img { position: static; width: 12px; height: 12px; }
.wd-th em.w { background: #ffd54a; color: #3a2400; } .wd-th em.o .ic { font-size: 11px; color: #ffd54a; }
.wd-th.on { border-color: #fff; box-shadow: 0 0 0 2px var(--c2), 0 0 16px var(--c2); }
.wd-info { position: relative; z-index: 3; margin: 0 8px 8px; padding: 10px 12px; border-radius: 16px; display: flex; flex-direction: column; gap: 8px; flex: none; max-height: 47%; text-align: left; }
.wd-scroll { min-height: 0; flex: 0 1 auto; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; touch-action: pan-y; }
.wd-info .hs-perk p { font-size: 11.5px; }
.wd-info .hs-soon-d { margin: 0; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.wd-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.wd-who b { font-weight: normal; font-size: 22px; }
.wd-who small { font-size: 12px; color: var(--muted); }
.wd-who .tags { display: flex; gap: 4px; width: 100%; }
.wd-info .hs-desc { margin: 0; font-size: 13px; line-height: 1.4; color: #dfe9ff; }
.wd-info .hs-say { margin: 0; }
.wd-info .hs-perk { margin: 0; }
.wd-buy { display: flex; gap: 8px; }
.wd-buy .lb-btn { flex: 1; min-height: 48px; font-size: 17px; }

/* v3.12 loading screen (reference l7): key art, a thin glowing bar with the percent, a hexagon spinner and a tip */
.load-foot { position: absolute; left: 6%; right: 6%; bottom: calc(4.5% + var(--safe-b)); display: flex; flex-direction: column; gap: 10px; }
.load-row { display: flex; align-items: center; gap: 10px; }
#loading .load-bar { flex: 1; width: auto; height: 8px; border-radius: 5px; background: rgba(0,0,0,0.55); border: 1px solid rgba(140,190,255,0.6); box-shadow: 0 0 10px rgba(79,141,255,0.35); }
#loading .load-bar i { background: linear-gradient(90deg, #3d7bff, #9fe9ff); box-shadow: 0 0 12px #4f8dff; border-radius: 5px; }
.load-pct { min-width: 30px; text-align: right; font-family: var(--num); font-weight: normal; font-size: 16px; color: #fff; text-shadow: 0 0 8px rgba(79,141,255,0.8); }
.load-hex { width: 22px; height: 24px; flex: none; background: linear-gradient(180deg, #9fe9ff, #3d7bff); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); animation: hexSpin 1.6s linear infinite; opacity: 0.9; }
@keyframes hexSpin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.load-tip { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: linear-gradient(180deg, rgba(22,36,74,0.62), rgba(7,12,30,0.8)); border: 1px solid rgba(140,190,255,0.45); font-size: 14px; line-height: 1.4; color: #e9f2ff; }
.load-tip .ic { font-size: 22px; color: #ffd54a; }
#loading .load-text { font-size: 12px; color: rgba(225,235,255,0.6); text-align: center; text-shadow: none; }

/* v3.13 battle HUD (the user's pick of the 2026-10-17 sample, "절충안"): a portrait dock along the bottom between the champion
   and ultimate buttons with the HP bar inside it, under the portraits — the ground above the dock stays clear for the squad
   on the cannons (on a 640px phone the HP bar above the dock covered their legs); the first-battle tip sits just above the
   dock and the swipe hint above the tip; darker glass pills */
#s-dock { position: absolute; left: 0; right: 0; bottom: 0; height: calc(96px + var(--safe-b)); pointer-events: none; align-items: flex-start; justify-content: center;
  padding-top: 8px; background: linear-gradient(180deg, rgba(8,16,40,0) 0%, rgba(8,16,40,0.62) 26%, rgba(5,10,28,0.94) 100%); border-top: 1px solid rgba(110,190,255,0.45); }
#s-dock .sd-row { display: flex; align-items: flex-end; gap: 10px; }
#s-dock .sd-p { width: 46px; height: 46px; border-radius: 50%; padding: 3px; background: conic-gradient(#59c8ff 0 70%, rgba(89,200,255,0.25) 70% 100%); box-shadow: 0 0 12px rgba(89,200,255,0.6); }
#s-dock .sd-p.lead { width: 56px; height: 56px; background: conic-gradient(#ffd54a 0 85%, rgba(255,213,74,0.25) 85% 100%); box-shadow: 0 0 16px rgba(255,200,60,0.7); }
#s-dock .sd-p img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: #0b1530; }
#hud.siege #s-hp { bottom: calc(6px + var(--safe-b)); z-index: 1; gap: 5px; padding: 2px 10px; border-radius: 12px; background: rgba(4,10,28,0.88); border: 1px solid rgba(110,190,255,0.5); box-shadow: none; }
#hud.siege #s-hp .hp-ico { font-size: 14px; }
#hud.siege #s-hp .hp-track { width: 92px; height: 9px; }
#hud.siege #s-hp.wide .hp-track { width: 108px; }
#hud.siege #s-hp b { font-size: 15px; }
#hud.siege .s-btn { bottom: calc(9px + var(--safe-b)); z-index: 2; }
#hud.siege #drag-hint { bottom: calc(178px + var(--safe-b)); }
#hud.has-boss #s-round { top: calc(124px + var(--safe-t)); left: auto; right: 12px; }   /* not over the boss portrait */
@media (max-width: 374px) {
  #s-dock .sd-row { gap: 7px; }
  #s-dock .sd-p { width: 40px; height: 40px; }
  #s-dock .sd-p.lead { width: 50px; height: 50px; }
  #hud.siege #s-hp .hp-track { width: 80px; }
  #hud.siege #s-hp.wide .hp-track { width: 92px; }
}
#hud.siege .hud-top .stage-pill span { font-size: 15px; letter-spacing: 1px; }
#hud.siege .kill-pill { background: rgba(8,16,40,0.7); border: 1px solid rgba(110,190,255,0.55); }
#hud.siege #btn-pause { background: rgba(8,16,40,0.7); border: 1px solid rgba(110,190,255,0.55); box-shadow: none; }

/* v3.14 Cores (premium currency) and the arsenal of champions / ultimates */
.core-ic { width: 1em; height: 1em; flex: none; filter: drop-shadow(0 0 4px rgba(120,200,255,0.55)); }
.lb-res.core .core-ic { width: 24px; height: 24px; margin: 0 1px 0 2px; }
/* a title beside the wallet (prep screens) gives way first: coins + Cores (+ alloy) need ~150 px at 360 px */
.lb-title + .lb-wallet { flex: 0 1 auto; }
@media (max-width: 374px) { .lb-res.core .core-ic { width: 20px; height: 20px; margin: 0; } }
.lb-res.core b { color: #c9f4ff; }
.lb-sup.prem { border-color: rgba(255,210,90,0.75); box-shadow: inset 0 0 0 1px rgba(255,210,90,0.35); }
.lb-sup .lb-dot { top: 4px; right: 22px; }
.lb-sup.locked { color: inherit; font-family: var(--font); }
.shop-sec { display: flex; align-items: center; gap: 6px; margin: 6px 2px -2px; font-size: 16px; color: #cfe3ff; text-align: left; }
.shop-sec .core-ic { width: 22px; height: 22px; }
.shop-sec span { flex: 1; min-width: 0; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-sec em { font-style: normal; display: inline-flex; align-items: center; gap: 3px; font-family: var(--num); font-size: 15px; color: #c9f4ff; }
.shop-sec em .core-ic { width: 18px; height: 18px; }
.card.core-pack .ci { background: radial-gradient(circle at 50% 45%, rgba(120,200,255,0.30), rgba(120,90,255,0.05)); }
.core-pack .cp { position: relative; display: flex; align-items: flex-end; justify-content: center; }
.core-pack .cp .core-ic { width: 34px; height: 34px; }
.core-pack .cp.n2 .core-ic:nth-child(2) { width: 26px; height: 26px; margin-left: -8px; }
.core-pack .cp.n3 .core-ic { width: 26px; height: 26px; }
.core-pack .cp.n3 .core-ic:nth-child(2) { width: 34px; height: 34px; margin: 0 -7px 6px; position: relative; z-index: 1; }
.core-n { color: #9fe8ff; font-family: var(--num); font-weight: normal; }
.card.arm-banner { width: 100%; font-family: var(--font); color: inherit; text-align: left; cursor: pointer;
  border-color: rgba(255,210,90,0.85); background: linear-gradient(90deg, rgba(255,190,60,0.20), rgba(90,170,255,0.10)); }
.card.arm-banner .btn { pointer-events: none; min-width: 72px; }
.arms .arm-tabs { margin-bottom: 0; }
.arm-wallet { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 14px; background: rgba(120,200,255,0.08); border: 1px solid rgba(120,200,255,0.25); }
.arm-wallet .aw { display: flex; align-items: center; gap: 6px; font-family: var(--num); font-size: 20px; color: #c9f4ff; }
.arm-wallet .aw .core-ic { width: 26px; height: 26px; }
.arm-wallet .aw small { font-family: var(--font); font-size: 13px; color: var(--muted); }
.arm-wallet .btn { min-height: 36px; font-size: 15px; padding: 0 10px; border-radius: 12px; display: inline-flex; align-items: center; gap: 4px; }
.arm-note { font-size: 13px; color: #ffe08a; text-align: center; }
.arm-list { display: flex; flex-direction: column; gap: 8px; }
.arm { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 16px; background: rgba(255,255,255,0.06); border: 2px solid rgba(255,255,255,0.12); text-align: left; }
.arm.prem { border-color: rgba(255,210,90,0.45); background: linear-gradient(90deg, rgba(255,200,70,0.10), rgba(255,255,255,0.04)); }
.arm.on { border-color: rgba(120,220,255,0.95); box-shadow: 0 0 14px rgba(90,200,255,0.35); }
.arm .ai { width: 58px; height: 58px; flex: none; border-radius: 14px; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, rgba(255,255,255,0.18), rgba(255,255,255,0.03)); }
.arm .ai img { width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(0,0,0,0.5)); }
.arm .am { flex: 1; min-width: 0; }
.arm .an { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.arm .an b { font-weight: normal; font-size: 17px; }
.arm .ad { font-size: 12.5px; line-height: 1.3; color: var(--muted); margin-top: 2px; }
.arm-tag { font-style: normal; padding: 0 6px; border-radius: 7px; font-size: 11px; line-height: 17px; color: #3a2600; background: linear-gradient(180deg, #ffe17a, #ffb93a); }
.arm-tag.own { color: #fff; background: rgba(120,220,255,0.35); }
.arm .ab { flex: none; display: flex; align-items: center; }
.arm .ab .btn { min-height: 40px; min-width: 76px; padding: 0 10px; font-size: 16px; border-radius: 12px; }
.arm .arm-buy { display: inline-flex; align-items: center; gap: 4px; font-family: var(--num); }
.arm .arm-buy .core-ic { width: 20px; height: 20px; }
.arm .arm-buy b { font-weight: normal; }
.arm-on, .arm-lock { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; white-space: nowrap; }
.arm-on { color: #9ff0ff; }
.arm-on .ic { color: #ffd23a; font-size: 16px; }
.arm-lock { color: var(--muted); max-width: 92px; white-space: normal; text-align: right; line-height: 1.2; }
.arm-foot { font-size: 12px; color: var(--muted); text-align: center; padding: 2px 8px 6px; }
/* one line: the reasons sit beside the number (a second row pushed tall result cards off 640-px screens) */
.core-gain { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2px 6px; margin: 4px auto 0; padding: 2px 10px; border-radius: 14px;
  width: fit-content; max-width: 100%; background: rgba(120,200,255,0.12); border: 1px solid rgba(120,200,255,0.4); }
.core-gain .core-ic { width: 22px; height: 22px; }
.core-gain b { font-family: var(--num); font-weight: normal; font-size: 20px; color: #c9f4ff; }
.core-gain span { font-size: 14px; color: #c9f4ff; }
.core-gain small { font-size: 12px; color: var(--muted); text-align: center; }
@media (max-width: 374px) {
  .arm .ai { width: 48px; height: 48px; } .arm .ai img { width: 44px; height: 44px; }
  .arm .ab .btn { min-width: 64px; font-size: 15px; }
}
/* Korean wraps between words, not inside one ("한 번 사면 계속" broke as "계 / 속") */
.arm .ad, .arm-foot, .card.arm-banner .cd, .core-gain small, .arm-note, .arm-lock { word-break: keep-all; overflow-wrap: anywhere; }

/* v3.15 after-battle talks (src/ui/talk.js) */
.talk-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 7px; padding: 5px 12px; border-radius: 999px; font: inherit; font-size: 14px; color: #06223d; cursor: pointer;
  background: linear-gradient(180deg, #bff4ff, #4cc8ff); border: 2px solid rgba(255,255,255,0.85); box-shadow: 0 3px 12px rgba(60,200,255,0.55); animation: talkPulse 1.6s ease-in-out infinite; }
.talk-chip small { font-size: 11px; opacity: 0.75; font-family: var(--num); }
@keyframes talkPulse { 0%, 100% { transform: none; } 50% { transform: scale(1.05); } }
.talk-ov { position: absolute; inset: 0; z-index: 40; overflow: hidden; animation: gIn .2s ease both;
  background: radial-gradient(90% 60% at 50% 38%, rgba(70,140,255,0.32), rgba(6,12,34,0.94) 70%, rgba(3,6,18,0.98)); }
.talk-ov.out { animation: gOut .2s ease both; }
.talk-ov .tk-art { position: absolute; left: 50%; bottom: calc(30% + var(--safe-b)); height: 58%; width: auto; max-width: 108%; transform: translateX(-50%);
  object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 16px 26px rgba(0,0,0,0.6)); animation: rpIn .55s cubic-bezier(.2,.9,.3,1.15) both; }
.talk-ov .tk-box { position: absolute; left: 4%; right: 4%; bottom: calc(5% + 18px + var(--safe-b)); padding: 12px 14px 14px; border-radius: 18px;
  background: rgba(6,18,48,0.93); border: 2px solid rgba(120,210,255,0.7); box-shadow: 0 10px 30px rgba(0,0,0,0.55); text-align: left; animation: gTxt .4s .15s ease both; }
.tk-name { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.tk-name b { font-weight: normal; font-size: 15px; color: #8fdcff; }
.tk-name small { font-size: 12px; color: var(--muted); font-family: var(--num); }
.tk-line { font-size: 17px; line-height: 1.45; color: #f4fbff; min-height: 2.9em; word-break: keep-all; overflow-wrap: anywhere; }
.tk-line.reply { animation: gTxt .35s ease both; }
.tk-picks { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.tk-picks .btn { width: 100%; font-size: 16px; padding: 10px 12px; }
.tk-said { font-size: 14px; color: #bfeaff; opacity: 0.85; }
.talk-ov .rp-tap { position: absolute; left: 0; right: 0; bottom: calc(1.5% + var(--safe-b)); text-align: center; font-size: 13px; color: rgba(233,248,255,0.6); animation: gBlink 1.4s ease-in-out infinite; }
.rpose.ach.bond { --ac1: #d9f6ff; --ac2: #58b8ff; --act: #062040; --acg: rgba(90,190,255,0.7); --acr: rgba(140,210,255,0.16); z-index: 41; }
.al-bond { margin-top: 10px; }
.al-bond .al-row { align-items: center; }
.al.bond .th { background-size: cover; background-position: 50% 30%; }
.al-bnote { grid-column: span 3; margin: 0; font-size: 12px; color: var(--muted); text-align: left; word-break: keep-all; }

/* Achievement story scenes: manual pacing, safe areas and an always-visible exit. */
.achievement-scene { position:absolute; inset:0; z-index:48; isolation:isolate; display:flex; flex-direction:column; overflow:hidden; background:#070d1b; color:#eff7ff; font-family:var(--font); outline:none; }
.as-backdrop { position:absolute; inset:-25px; z-index:-2; background-size:cover; background-position:center; filter:blur(22px) brightness(.28); }
.as-illustration { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; object-position:center 32%; z-index:-1; animation:sceneReveal .8s ease-out both; }
.as-header { padding:calc(18px + var(--safe-t)) 18px 22px; background:linear-gradient(#060c1deb,transparent); padding-right:110px; text-shadow:0 2px 8px #000; }
.as-eyebrow { color:#ffd36b; font-size:11px; letter-spacing:1px; }
.as-header h2 { font-weight:normal; font-size:23px; line-height:1.2; margin:7px 0 5px; }
.as-header p { margin:0; font-size:12px; color:#c7d6ec; }
.as-skip { position:absolute; right:12px; top:calc(18px + var(--safe-t)); border:1px solid #b4c7e34d; border-radius:20px; color:#e5edff; background:#101c35b8; padding:10px 11px; font:11px var(--font); cursor:pointer; min-height:44px; max-width:100px; }
.as-dialogue { margin:auto 14px calc(16px + var(--safe-b)); background:linear-gradient(120deg,#112443f5,#091226f5); border:1px solid #7296be; border-radius:18px 18px 18px 4px; padding:15px 17px 11px; box-shadow:0 14px 36px #0008; }
.as-speaker { color:#ffd36b; font-size:16px; }
.as-line { margin:10px 0 14px; font-size:18px; line-height:1.55; min-height:2.9em; overflow-wrap:anywhere; }
.as-dialogue.narration .as-speaker { color:#9fbbdb; font-size:12px; letter-spacing:2px; }
.as-dialogue.narration .as-line { color:#d0dfef; font-size:16px; }
.as-dialogue footer { display:flex; justify-content:space-between; align-items:center; gap:12px; border-top:1px solid #7396bf33; padding-top:9px; }
.as-progress { font:12px var(--num); color:#91acc9; }
.as-next { border:1px solid #a6d1ff; border-radius:10px; padding:10px 20px; min-width:100px; min-height:44px; color:#09182d; background:#bbddff; font:15px var(--font); cursor:pointer; }
.as-next:disabled { opacity:.45; cursor:wait; }
.as-next:focus-visible,.as-skip:focus-visible { outline:3px solid #ffe090; outline-offset:3px; }
.as-loading { position:absolute; top:42%; left:15%; right:15%; padding:18px; border-radius:14px; background:#0a172bea; text-align:center; color:#d0e8ff; z-index:2; }
.as-loading[hidden],.as-illustration[hidden] { display:none; }
.as-loading button { display:block; margin:10px auto 0; font:14px var(--font); padding:10px 18px; border-radius:8px; border:1px solid #b5d7ff; background:#253a59; color:white; }
.ro-album > .al-row { grid-template-columns:repeat(3,minmax(0,1fr)); }
.al small { display:block; font-size:10px; line-height:1.4; padding:5px 4px; color:#a8c4e4; background:#08172b; min-height:36px; }
.al.off small { color:#c5d5e9; }
@keyframes sceneReveal { from { opacity:0; transform:scale(1.025); } to { opacity:1; transform:scale(1); } }
@media (max-height:600px) { .as-header h2{font-size:19px;} .as-dialogue{padding:10px 14px 8px;margin-bottom:calc(8px + var(--safe-b));} .as-line{font-size:16px;margin:6px 0 8px;min-height:2.5em;} .as-dialogue.narration .as-line{font-size:14px;} }
@media (prefers-reduced-motion:reduce) { .as-illustration { animation:none; } }

/* Cinematic events cover the window independently of the portrait combat app. */
#event-layer { position:fixed; inset:0; z-index:1000; pointer-events:none; --safe-l:env(safe-area-inset-left,0px); --safe-r:env(safe-area-inset-right,0px); }
#event-layer > [data-event] { position:absolute; inset:0; width:100%; height:100%; pointer-events:auto; background-color:#070d1b; }
#event-layer > .event-modal { padding:0; overflow:hidden; touch-action:none; backdrop-filter:none; -webkit-backdrop-filter:none; background:#070d1b; }
#event-layer .achievement-scene { position:absolute; inset:0; width:100%; height:100%; }
#event-layer .as-backdrop { filter:blur(6px) brightness(.32); }
#event-layer .as-illustration { object-fit:contain; object-position:center; animation:none; }
#event-layer .as-header { padding-left:calc(18px + var(--safe-l)); }
#event-layer .as-skip { right:calc(12px + var(--safe-r)); }
#event-layer .as-dialogue { width:min(720px,calc(100% - 28px - var(--safe-l) - var(--safe-r))); margin-left:auto; margin-right:auto; max-height:50%; overflow-y:auto; touch-action:pan-y; }
#event-layer .as-loading { left:50%; right:auto; width:min(520px,80%); transform:translateX(-50%); }
#event-layer .rpose { width:100%; height:100%; }
#event-layer .rpose .rp-art { left:0; bottom:0; width:100%; height:100%; max-width:none; object-fit:contain; object-position:center; transform:none; animation:none; filter:none; }
#event-layer .rpose .rp-title { font-size:clamp(30px,5vh,56px); }
#event-layer .rpose .rp-cap { left:max(16px,var(--safe-l)); right:max(16px,var(--safe-r)); top:auto; bottom:calc(40px + var(--safe-b)); width:auto; max-width:720px; margin:0 auto; }
#event-layer .rpose .rp-tap { bottom:calc(14px + var(--safe-b)); }
#event-layer .rpose .rp-glow { opacity:.25; }
#event-layer .rpose.ach .ach-bg { filter:blur(6px) brightness(.34); }
#event-layer .rpose.ach .ach-frame { inset:0; width:100%; height:100%; max-width:none; aspect-ratio:auto; transform:none; border:0; border-radius:0; box-shadow:none; overflow:hidden; animation:none; }
#event-layer .ach-frame .ach-art { width:100%; height:100%; object-fit:contain; object-position:center; border-radius:0; animation:none; }
#event-layer .ach-frame::after { display:none; }
#event-layer .ach-new { right:calc(18px + var(--safe-r)); top:calc(90px + var(--safe-t)); }
#event-layer .rpose.ach.foe.brk .fb-frame { inset:0; width:100%; height:100%; aspect-ratio:auto; transform:none; border:0; border-radius:0; box-shadow:none; }
#event-layer .rpose.ach.foe.brk .fb-frame img { object-fit:contain; }
#event-layer .rpose.ach.foe.brk .fb-frame b { right:24px; bottom:calc(150px + var(--safe-b)); }
#event-layer .greet .g-art { right:0; bottom:0; width:100%; height:100%; max-width:none; max-height:none; object-fit:contain; object-position:center; animation:none; filter:none; }
#event-layer .greet .g-head { left:calc(20px + var(--safe-l)); top:calc(20px + var(--safe-t)); }
#event-layer .greet .g-name b { font-size:clamp(28px,5vh,46px); }
#event-layer .greet .g-foot { left:max(16px,var(--safe-l)); right:max(16px,var(--safe-r)); bottom:calc(46px + var(--safe-b)); max-width:720px; margin:0 auto; }
#event-layer .greet .g-tap { bottom:calc(15px + var(--safe-b)); }
#event-layer .talk-ov .tk-art { left:0; bottom:0; width:100%; height:100%; max-width:none; transform:none; object-fit:contain; object-position:center; filter:none; animation:none; }
#event-layer .talk-ov .tk-box { left:max(16px,var(--safe-l)); right:max(16px,var(--safe-r)); bottom:calc(42px + var(--safe-b)); max-width:720px; margin:0 auto; max-height:55%; overflow-y:auto; touch-action:pan-y; }
#event-layer .talk-ov .rp-tap { bottom:calc(14px + var(--safe-b)); }

/* On wide windows the portrait stays fully visible at the left. Dialogue uses
   the space at the right instead of enlarging/cropping a portrait to landscape. */
@media (min-aspect-ratio:1/1) and (min-width:700px) {
  #event-layer .as-illustration { width:66%; object-position:center; }
  #event-layer .as-header { position:absolute; left:64%; right:0; top:0; padding:calc(72px + var(--safe-t)) calc(28px + var(--safe-r)) 16px 12px; }
  #event-layer .as-skip { top:calc(18px + var(--safe-t)); right:calc(28px + var(--safe-r)); }
  #event-layer .as-dialogue { position:absolute; left:64%; right:calc(28px + var(--safe-r)); bottom:calc(28px + var(--safe-b)); width:auto; margin:0; max-height:calc(100% - 220px - var(--safe-t) - var(--safe-b)); }
  #event-layer .rpose .rp-art, #event-layer .rpose.ach .ach-frame, #event-layer .rpose.ach.foe.brk .fb-frame { left:0; right:auto; width:66%; }
  #event-layer .rpose .rp-title, #event-layer .ach-head { left:64%; right:calc(28px + var(--safe-r)); top:calc(46px + var(--safe-t)); font-size:clamp(28px,4vw,50px); }
  #event-layer .ach-rib { padding:5px 14px; }
  #event-layer .ach-rib b { font-size:clamp(20px,2.5vw,30px); white-space:normal; }
  #event-layer .rpose .rp-cap { left:64%; right:calc(28px + var(--safe-r)); bottom:calc(58px + var(--safe-b)); margin:0; font-size:18px; }
  #event-layer .rpose .rp-tap { left:64%; right:calc(28px + var(--safe-r)); bottom:calc(24px + var(--safe-b)); }
  #event-layer .ach-new { left:calc(24px + var(--safe-l)); right:auto; top:calc(24px + var(--safe-t)); }
  #event-layer .greet .g-art, #event-layer .talk-ov .tk-art { left:0; right:auto; width:66%; }
  #event-layer .greet .g-head { left:64%; right:calc(28px + var(--safe-r)); top:calc(44px + var(--safe-t)); }
  #event-layer .greet .g-foot { left:64%; right:calc(28px + var(--safe-r)); bottom:calc(64px + var(--safe-b)); margin:0; }
  #event-layer .greet .g-tap, #event-layer .talk-ov .rp-tap { left:64%; right:calc(28px + var(--safe-r)); bottom:calc(24px + var(--safe-b)); }
  #event-layer .talk-ov .tk-box { left:64%; right:calc(28px + var(--safe-r)); bottom:calc(64px + var(--safe-b)); margin:0; max-height:calc(100% - 110px - var(--safe-t) - var(--safe-b)); }
}

/* Story reading keeps every line under the player's control. */
.story-talk .tk-heading { position:absolute; top:calc(20px + var(--safe-t)); left:max(20px,var(--safe-l)); right:max(20px,var(--safe-r)); padding-right:72px; text-shadow:0 2px 8px #000; }
.tk-heading h2 { font-size:22px; font-weight:normal; margin:6px 0; }
.tk-heading p,.tk-heading small { font-size:13px; color:#c5d6ed; margin:0; }
.tk-close { position:absolute; right:0; top:0; color:#eef6ff; background:#102039df; border:1px solid #7396bf; border-radius:20px; padding:9px 14px; }
.tk-footer { display:flex; justify-content:space-between; align-items:center; margin-top:12px; gap:12px; }
.tk-footer span { color:#a8bed9; font-size:12px; }
.tk-footer .btn { min-width:100px; padding:9px 15px; font-size:15px; }
.story-talk .tk-line.narration { color:#cbd9eb; font-size:16px; }
.story-talk .tk-said { margin-top:9px; border-left:2px solid #7396bf; padding-left:10px; }
.story-talk [hidden] { display:none !important; }
.story-talk .tk-picks small { color:#abc3e0; }
.story-record { line-height:1.6; color:#d3e3f8; }
.story-profile { display:flex; align-items:center; gap:14px; margin-bottom:16px; }
.story-profile img { width:76px; height:76px; border-radius:50%; object-fit:cover; background:#152941; }
.story-profile h3 { font-size:22px; font-weight:normal; margin:0; color:#fff; }
.story-profile small { color:#b2c9e8; }
.story-record section { margin:14px 0; padding:14px; border:1px solid #4e71914d; background:#0b1b2b99; border-radius:12px; }
.story-record h4 { font-weight:normal; margin:0 0 6px; color:#8cdbed; font-size:15px; }
.story-record p { margin:0; font-size:14px; overflow-wrap:anywhere; }
.story-relations { display:grid; gap:9px; }
.story-relation { border-left:2px solid #527fa7; padding:2px 0 2px 12px; }
.story-relation b { font-weight:normal; color:#fff; }
.story-relation small { display:block; color:#9ec1db; font-size:12px; }
.story-episodes { display:grid; gap:8px; }
.story-episodes button { text-align:left; white-space:normal; font-size:14px; }
@media(min-aspect-ratio:1/1) and (min-width:700px) {
  .story-talk .tk-heading { left:65%; right:calc(28px + var(--safe-r)); top:calc(24px + var(--safe-t)); padding-right:64px; }
  .story-talk .tk-heading h2 { font-size:20px; }
}

/* Display language never mirrors the battlefield or rewrites input geometry. */
#st-language{max-width:60%;min-height:44px;padding:8px 12px;border:1px solid #657799;border-radius:8px;background:#14223b;color:#f1f6ff;font:inherit}
html[dir=rtl] .sheet,html[dir=rtl] .lb-body,html[dir=rtl] .lb-title,html[dir=rtl] .bubble{text-align:start;font-family:'Noto Sans Arabic',Tahoma,Arial,sans-serif}
html[lang=hi] .sheet,html[lang=hi] .lb-body{font-family:'Noto Sans Devanagari','Kohinoor Devanagari',Arial,sans-serif}
html[dir=rtl] #game,html[dir=rtl] #hud,html[dir=rtl] .lb-stage-hero img{direction:ltr}
html[dir=rtl] .lb-res b,html[dir=rtl] .core-n,html[dir=rtl] .num{unicode-bidi:isolate;direction:ltr}
html[dir=rtl] .sheet-head,html[dir=rtl] .setting-row{gap:12px}

/* Web multilingual mobile text: natural word boundaries and room for labels. */
:where(.screen,.modal) :where(h1,h2,h3,.btn,.setting-row,.desc,.name,.title,.nm){overflow-wrap:break-word;word-break:normal;line-height:1.35}
:lang(ko) :where(.screen,.modal) :where(h1,h2,h3,.btn,.desc,.name,.title,.nm){word-break:keep-all}
:lang(ja) :where(.screen,.modal),:lang(zh-Hans) :where(.screen,.modal),:lang(zh-Hant) :where(.screen,.modal){line-break:strict}
:lang(ar) :where(.screen,.modal) :where(.btn,.title,.desc){letter-spacing:normal}
:where(.nav,.mode-tabs,.setting-row,.shop-row,.shop-item,.row)>*{min-width:0}
.btn{white-space:normal;text-align:center;padding-block:9px;height:auto}
.nav .btn{padding-inline:6px;font-size:clamp(12px,3.8vw,18px)}
.mode-tabs .btn{padding-inline:8px;font-size:clamp(13px,4vw,18px)}
.setting-row{gap:12px;flex-wrap:wrap;line-height:1.5}.setting-row select{max-width:100%}
@media(max-width:430px){.btn.big{font-size:clamp(20px,6vw,27px);padding-inline:14px}.modal .col .btn.big{white-space:normal}.modal h2{font-size:clamp(23px,7vw,30px);line-height:1.35}.shop-row .btn{flex-shrink:0;font-size:14px}.cm-web-card{flex-wrap:wrap}.cm-web-card button{margin-inline-start:auto}}

/* Three selectable formation slots and independent combat skill meters. */
.lb-squad button.lb-pod { border: 0; padding: 0; color: inherit; font: inherit; background: transparent; cursor: pointer; }
.lb-squad button.lb-pod:focus-visible { outline: 2px solid #ffe18a; outline-offset: -4px; border-radius: 12px; }
.ro-squad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; flex-shrink: 0; padding: 8px 12px 0; }
.ro-squad button { display: grid; justify-items: center; gap: 4px; min-width: 0; padding: 8px 4px; border: 1px solid #53678d; border-radius: 12px; background: #111e36; color: #e6f1ff; font: inherit; cursor: pointer; }
.ro-squad button.on { border-color: #ffd75e; background: #303043; box-shadow: inset 0 0 0 1px #ffd75e; }
.ro-squad img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.ro-squad b { max-width: 100%; overflow-wrap: anywhere; font-size: 12px; line-height: 1.25; }
.ro-squad small { font-size: 11px; line-height: 1.3; }
.ro-squad-help { margin: 5px 12px; font-size: 11px; line-height: 1.4; color: #b6c8e8; text-align: center; flex-shrink: 0; }
.ro-active { display: grid; gap: 3px; margin: 6px 0; color: #ffe296; font-size: 14px; }
.ro-active small, .ro-active span { font-size: 11px; line-height: 1.3; }
#hud.siege #s-dock { height: calc(122px + var(--safe-b)); padding-top: 10px; z-index: 3; }
#s-dock .sd-hint { position: absolute; bottom: calc(100% + 3px); max-width: 90%; color: #d9e9ff; font-size: 11px; line-height: 1.25; text-align: center; text-shadow: 0 1px 4px #000; }
#s-dock .sd-p { --skill-p: 0deg; position: relative; pointer-events: auto; border: 0; color: #fff; font: inherit; cursor: pointer; touch-action: manipulation; background: conic-gradient(#59c8ff var(--skill-p), #263c60 0); box-shadow: 0 0 8px #0008; }
#s-dock .sd-p.lead { background: conic-gradient(#ffd54a var(--skill-p), #514b35 0); box-shadow: 0 0 8px #0008; }
#s-dock .sd-p.ready { box-shadow: 0 0 12px #7bd7ff; }
#s-dock .sd-p.lead.ready { box-shadow: 0 0 14px #ffd54a; }
#s-dock .sd-p:focus-visible { outline: 2px solid white; outline-offset: 3px; }
#s-dock .sd-p kbd { position: absolute; top: -5px; left: -3px; border-radius: 50%; background: #142440; border: 1px solid #91acd5; width: 16px; height: 16px; font: 10px/14px system-ui; }
#s-dock .sd-charge { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); padding: 1px 5px; border-radius: 5px; min-width: 30px; white-space: nowrap; font-size: 10px; line-height: 14px; background: #0a1730; color: #bcd7ff; }
#s-dock .ready .sd-charge { color: #ffdf7e; }
#s-dock .sd-name { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); width: 62px; font-size: 10px; line-height: 1.15; text-align: center; overflow-wrap: anywhere; color: #e2ecff; text-shadow: 0 1px 3px black; }
@media (max-height: 520px) and (orientation: landscape) {
  .ro-squad { gap: 6px; padding-top: 3px; }
  .ro-squad button { grid-template-columns: 28px 1fr; padding: 4px 6px; align-items: center; text-align: start; }
  .ro-squad img { width: 28px; height: 28px; grid-row: 1 / 3; }
  .ro-squad small, .ro-squad b { font-size: 10px; }
  .ro-squad-help { margin: 2px 12px; }
}
#hud.siege #tip:not(.hidden) ~ #s-dock .sd-hint { visibility: hidden; }
.lv-roster .lb-body { overflow-y: auto; overscroll-behavior: contain; }
.lv-roster .ro-top { min-height: 300px; flex: 1 0 300px; }
.lv-roster .ro-detail { padding: 8px; gap: 4px; }
.lv-roster .ro-more .lb-btn2 { min-height: 38px; font-size: 11px; }
@media (max-height: 520px) and (orientation: landscape) {
  .lv-roster .ro-top { min-height: 280px; flex-basis: 280px; }
}
/* Keep both currencies and all six purchase buttons at the top of the shop. */
.shop-currencies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0; }
.shop-currency { min-width: 0; padding: 10px 8px; border: 1px solid #627ca7; border-radius: 14px; background: #14233a; scroll-margin-top: 12px; }
.shop-currency.cores { border-color: #9f7fcf; background: #251b3a; }
.shop-currency h3 { display: flex; justify-content: center; align-items: center; gap: 5px; margin: 0; font-size: 18px; font-weight: normal; }
.shop-currency h3 img { width: 23px; height: 23px; }
.sc-balance { margin: 5px 0 10px; color: #c0d2ed; font-size: 12px; text-align: center; }
.sc-pack { display: grid; grid-template-columns: 1fr; gap: 3px; justify-items: stretch; text-align: center; margin-top: 8px; padding-top: 6px; border-top: 1px solid #ffffff21; }
.sc-pack > b { font-family: var(--num); font-size: 20px; font-weight: normal; color: #ffe38a; }
.sc-pack .btn { width: 100%; min-width: 0; min-height: 36px; padding: 6px 3px; font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
.currency-note { color: #c1d2ed; margin: 6px 2px 12px; font-size: 12px; line-height: 1.4; }
/* Size the character panel from its content so lower actions remain reachable. */
.lv-roster .ro-top { flex: 0 0 auto; min-height: 340px; }
@media (max-height: 520px) and (orientation: landscape) {
  .lv-roster .ro-top { flex-basis: auto; min-height: 300px; }
}
