/* style-extra.css — new-enemy banner, kill counter, research, enemy codex, challenges */
/* 挑戰 wait lock (request 26): blocks every press until the fight starts */
.xc-wait { position: absolute; inset: 0; z-index: 44; pointer-events: auto; background: rgba(10,2,1,.38); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 16vh; cursor: progress; animation: lq-fadein .2s ease-out; }
.xc-wbox { display: flex; align-items: center; gap: 12px; padding: 10px 22px; font-size: 20px; color: #fff3d6; }
.xc-wbox b { -webkit-text-stroke: 4px #2a0805; paint-order: stroke fill; font-weight: 900; }
.xc-spin { width: 30px; height: 30px; border-radius: 50%; border: 4px solid rgba(244,197,90,.3); border-top-color: #ffe08a; animation: xc-spin .8s linear infinite; flex: none; }
@keyframes xc-spin { to { transform: rotate(360deg); } }
@keyframes lq-fadein { from { opacity: 0; } }
.xs-seal { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 26px; height: 26px; border-radius: 50%; font-style: normal; font-size: 16px; line-height: 1; color: #ffe9b0;
  background: radial-gradient(circle at 35% 30%, #e0483a, #8a1410 70%); border: 2px solid var(--gold); box-shadow: 0 0 0 1px #2a0805, 0 2px 3px rgba(0,0,0,.5); text-shadow: 0 1px 0 #2a0805; font-weight: 900; font-family: var(--font); }
.xs-seal.sm { width: 22px; height: 22px; font-size: 13px; border-width: 1.5px; }

/* battle HUD kill counter (left of the wave plate, right of the back-button corner) */
.sc-hud > .sc-kills { position: absolute; left: 72px; top: 12px; display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 10px 0 5px; border-radius: 18px; box-sizing: border-box;
  background: linear-gradient(#6a1510, #2a0704); border: 2px solid var(--gold); box-shadow: 0 3px 0 rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,220,140,.3); }
.sc-hud > .sc-kills { top: 54px; }
.sc-hud > .sc-coins { top: 12px; }
.sc-coinimg { width: 26px; height: 26px; object-fit: contain; flex: none; }
.sc-coins b { color: var(--gold-hi) !important; }
.sc-kills b { font-size: 18px; color: #fff4d8; text-shadow: var(--outline); font-variant-numeric: tabular-nums; }
.sc-kills.bump { animation: xs-bump .25s ease-out; }
@keyframes xs-bump { 0% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* ---- info panels (ui-tips.js): a bond's members, a hero's bonds and skill ---- */
.tt-tip { position: fixed; left: 0; top: 0; z-index: 900; display: none; width: max-content; min-width: 200px; max-width: 380px; padding: 0; border-width: 16px; border-image-width: 16px;
  color: var(--cream, #fff4d8); font-family: var(--font); font-size: 13px; line-height: 1.35; pointer-events: auto; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,.55); }
.tt-tip.on { display: block; animation: tt-pop .16s ease-out backwards; }
@keyframes tt-pop { 0% { transform: scale(.88); opacity: 0; } 70% { transform: scale(1.03); opacity: 1; } 100% { transform: scale(1); } }
.tt-tip > * { margin: 0 2px; }
.tt-name { margin: 0; font-size: 16px; color: var(--gold-hi, #ffe08a); text-shadow: var(--outline); white-space: nowrap; }
.tt-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 3px; border-bottom: 1px solid rgba(244,197,90,.45); margin-bottom: 4px; }
.tt-count { flex: none; padding: 1px 8px; border-radius: 9px; background: rgba(0,0,0,.45); border: 1px solid var(--bc, #f4c55a); color: #fff4d8; font-weight: 900; font-size: 12px; }
.tt-desc { margin: 0 2px 5px; font-size: 12px; color: #f2e2c0; word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }
.tt-tiers { display: flex; flex-direction: column; gap: 2px; margin-bottom: 5px; }
.tt-tier { display: flex; gap: 6px; align-items: baseline; padding: 1px 6px; border-radius: 6px; font-size: 12px; opacity: .55; }
.tt-tier b { flex: none; color: var(--gold-hi, #ffe08a); }
.tt-tier.lit { opacity: .85; } .tt-tier.cur { opacity: 1; background: rgba(244,197,90,.25); box-shadow: inset 0 0 0 1px var(--gold, #f4c55a); }
.tt-sub { margin: 3px 2px 3px; font-size: 12px; font-weight: 900; color: #ffd27a; letter-spacing: .04em; }
.tt-roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 4px 3px; max-width: 340px; }
.tt-mem { display: flex; flex-direction: column; align-items: center; gap: 1px; opacity: .42; filter: grayscale(.85); }
.tt-mem.own { opacity: .7; filter: grayscale(.3); }
.tt-mem.on { opacity: 1; filter: none; }
.tt-por { width: 36px; height: 36px; border-radius: 50%; background: #3a120c center 18%/150% no-repeat; box-shadow: 0 0 0 2px var(--rc), 0 2px 3px rgba(0,0,0,.5); }
.tt-mem.on .tt-por { box-shadow: 0 0 0 2px var(--gold-hi, #ffe08a), 0 0 8px var(--gold, #f4c55a); }
.tt-mem span { font-size: 11px; white-space: nowrap; max-width: 52px; overflow: hidden; text-overflow: ellipsis; color: #fff4d8; text-shadow: 0 1px 0 #2a0805; }
.tt-legend { margin-top: 4px; font-size: 11px; color: #d8c49a; }
.tt-hhd { display: flex; gap: 8px; align-items: center; margin-bottom: 5px; }
.tt-hpor { flex: none; width: 50px; height: 50px; border-radius: 10px; background: #3a120c center 15%/140% no-repeat; box-shadow: 0 0 0 2px var(--rc), 0 2px 4px rgba(0,0,0,.5); }
.tt-l1 { display: flex; align-items: center; gap: 5px; }
.tt-gem { flex: none; padding: 0 5px; border-radius: 5px; font-size: 11px; font-weight: 900; color: #fff; text-shadow: 0 1px 0 #000; line-height: 1.5; }
.tt-stars { color: #ffd23a; font-size: 12px; text-shadow: 0 1px 0 #2a0805; }
.tt-l2 { display: flex; gap: 8px; font-size: 12px; font-weight: 700; }
.tt-stats { display: flex; gap: 10px; font-size: 12px; font-weight: 900; margin-top: 1px; }
.tt-atk { color: #ffb070; } .tt-hp { color: #ff8a80; }
.tt-skill { padding: 4px 6px; border-radius: 8px; background: rgba(0,0,0,.32); box-shadow: inset 0 0 0 1px rgba(244,197,90,.4); margin-bottom: 3px; }
.tt-skill b { color: var(--gold-hi, #ffe08a); font-size: 13px; }
.tt-skill .tt-desc { margin: 2px 0 0; max-width: 330px; }
.tt-bond { display: flex; flex-direction: column; padding: 2px 6px 2px 8px; margin-bottom: 2px; border-left: 3px solid var(--bc); border-radius: 4px; background: rgba(0,0,0,.22); }
.tt-bond b { font-size: 12px; color: #fff4d8; } .tt-bond span { font-size: 11px; color: #e8d4a8; }
@media (max-height: 420px) {
  .tt-tip { font-size: 12px; border-width: 12px; border-image-width: 12px; }
  .tt-name { font-size: 14px; } .tt-desc, .tt-tier { font-size: 11px; }
  .tt-por { width: 28px; height: 28px; } .tt-roster { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); max-width: 360px; }
  .tt-hpor { width: 40px; height: 40px; }
}
/* battle HUD bond chips: below the 主公 on the gatehouse terrace (screen left), like the prep list */
.sc-hud > .sc-bonds { position: absolute; left: 8px; top: 51%; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.tt-chip { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 104px; height: 28px; padding: 0 8px 0 10px; box-sizing: border-box; border-radius: 8px; cursor: pointer;
  background: linear-gradient(#5a120c, #2a0704); border: 2px solid rgba(244,197,90,.55); border-left: 4px solid var(--bc); box-shadow: 0 2px 0 rgba(0,0,0,.5); opacity: .8; font-family: var(--font); }
.tt-chip.on { opacity: 1; border-color: var(--gold-hi, #ffe08a); border-left-color: var(--bc); background: linear-gradient(#b02a1c, #6a120c); }
.tt-chip .bn { font-size: 13px; font-weight: 900; color: #fff4d8; text-shadow: var(--outline); white-space: nowrap; }
.tt-chip em { font-style: normal; font-size: 12px; font-weight: 900; color: var(--gold-hi, #ffe08a); text-shadow: var(--outline); }
body.spectating .sc-bonds { display: none; }
/* a price that just went up */
.pp-bump { animation: pp-bump .45s ease-out; }
@keyframes pp-bump { 0% { transform: scale(1); } 25% { transform: scale(1.45); color: #ff7a5a; } 60% { transform: scale(.92); } 100% { transform: scale(1); } }
/* a skill's name floating above the caster */
.dmg-skn { padding: 1px 12px 2px; border-radius: 6px; letter-spacing: .08em; font-family: var(--font) !important;
  background: linear-gradient(90deg, rgba(120,16,10,0), rgba(140,20,12,.85) 18%, rgba(140,20,12,.85) 82%, rgba(120,16,10,0)); border-top: 1px solid rgba(255,214,120,.7); border-bottom: 1px solid rgba(255,214,120,.7); }
.dmg-skn2 { background: linear-gradient(90deg, rgba(150,90,10,0), rgba(170,40,14,.92) 15%, rgba(200,120,20,.92) 50%, rgba(170,40,14,.92) 85%, rgba(150,90,10,0)); box-shadow: 0 0 14px rgba(255,190,60,.6); }

/* new enemy banner */
.xb-layer { position: absolute; inset: 0; pointer-events: none !important; z-index: 26; --xb-top: calc(8px + max(66px, calc(74px*var(--u))) + 6px); }
.xb-layer > * { pointer-events: none !important; }
.xb-banner { position: absolute; left: 50%; display: flex; align-items: center; gap: 10px; box-sizing: border-box; width: max-content; max-width: min(70vw, calc(560px*var(--m))); padding: 6px 16px 6px 8px; border-radius: 16px;
  background: var(--lq-grain), linear-gradient(rgba(132,56,47,.95), rgba(74,32,28,.95)); border: 2px solid rgba(230,194,126,.85); box-shadow: 0 4px 12px rgba(30,12,10,.45), 0 0 18px rgba(255,190,70,.4), inset 0 0 0 2px rgba(0,0,0,.4);
  transform: translate(-50%, 0); animation: xb-in .32s cubic-bezier(.2,1.3,.4,1) both; }
.xb-banner.boss { border-color: #ff7a5a; box-shadow: 0 4px 0 rgba(0,0,0,.55), 0 0 0 2px #2a0805, 0 0 22px rgba(255,70,40,.6); }
.xb-banner.out { animation: xb-out .3s ease-in both; }
@keyframes xb-in { from { transform: translate(-50%, -40px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes xb-out { from { transform: translate(-50%, 0); opacity: 1; } to { transform: translate(-50%, -40px); opacity: 0; } }
.xb-emb { --es: 44px; position: relative; flex: none; width: var(--es); height: var(--es); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-sizing: border-box; font-family: var(--font); font-weight: 900; font-size: calc(var(--es) * .5); color: #fff4d8; text-shadow: var(--outline);
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--cl) 60%, #fff), var(--cl) 55%, color-mix(in srgb, var(--cl) 50%, #000)); border: 3px solid var(--gold); box-shadow: 0 0 0 2px #2a0805, 0 2px 5px rgba(0,0,0,.6), inset 0 0 8px rgba(0,0,0,.4); }
.xb-emb.dark { background: radial-gradient(circle at 35% 30%, #4a3a36, #1a1210); border-color: #6a5a40; color: #9a8a70; filter: grayscale(.8); }
.xb-tx { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.xb-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.xb-name { font-size: max(16px, calc(20px*var(--u))); color: var(--gold-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xb-tag { flex: none; font-size: 12px; padding: 0 8px; border-radius: 8px; background: rgba(0,0,0,.55); border: 1px solid var(--gold); color: #ffd98a; white-space: nowrap; text-shadow: 0 1px 0 #2a0805; font-weight: 900; }
.xb-banner.boss .xb-tag { background: linear-gradient(#ff5a3a, #b0100a); color: #fff; }
.xb-blurb { font-size: 13px; font-weight: 700; line-height: 1.2; color: #fbe9c4; text-shadow: 0 1px 0 #2a0805; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }
.xb-slamwrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 5; }
.xb-slam { position: relative; max-width: 94vw; text-align: center; font-size: max(24px, calc(56px*var(--u))); color: var(--gold-hi); letter-spacing: 2px; padding: 8px 40px 12px; white-space: nowrap; text-shadow: var(--outline), 0 0 24px rgba(255,160,50,.8);
  background: var(--lq-ribbon-bg); border-radius: 999px; box-shadow: var(--lq-ribbon-sh); animation: sc-slam 1.6s both; }

/* research institute */
.xr-modal .sc-panel, .xf-modal .sc-panel, .xc-modal .sc-panel { box-sizing: border-box; gap: 6px; }
.xr-modal .sc-panel, .xf-modal .sc-panel { width: min(96vw, calc(820px*var(--m))); height: min(94vh, calc(640px*var(--m))); max-height: 94vh; overflow: hidden; }
.xr-modal .sc-head, .xf-modal .sc-head { flex: none; flex-wrap: nowrap; }
.xr-modal .sc-head .sc-title, .xf-modal .sc-head .sc-title { white-space: nowrap; min-width: 0; }
.xr-total { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px 0 6px; border-radius: 18px; background: rgba(0,0,0,.5); border: 2px solid var(--gold-dark); font-size: 16px; color: var(--gold-hi); white-space: nowrap; }
.xr-total b { font-size: 16px; }
.xr-modal .uc-note { flex: none; }
.xr-list, .xf-body { flex: 1 1 0; min-height: 0; width: 100%; box-sizing: border-box; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; touch-action: pan-y; overscroll-behavior: contain; padding: 6px; border-radius: 10px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,220,140,.2); display: flex; flex-direction: column; gap: 8px; }
.xr-list::-webkit-scrollbar, .xf-body::-webkit-scrollbar { display: none; }
.xr-row { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: linear-gradient(rgba(118,50,42,.6), rgba(66,28,24,.7)); border: 2px solid var(--gold-dark); }
.xr-row.max { border-color: #8ff0b0; }
.xr-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; text-align: left; }
.xr-rtop { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.xr-name { font-size: 18px; color: var(--gold-hi); white-space: nowrap; }
.xr-lv { font-size: 13px; padding: 0 8px; border-radius: 8px; background: rgba(0,0,0,.55); border: 1px solid var(--gold); color: var(--gold-hi); white-space: nowrap; }
.xr-pips { display: flex; gap: 4px; } .xr-pips i { width: 12px; height: 12px; border-radius: 50%; background: rgba(0,0,0,.6); border: 1px solid var(--gold-dark); }
.xr-pips i.on { background: radial-gradient(circle at 35% 30%, #fff6c8, var(--gold) 50%, #a86a10); box-shadow: 0 0 5px #ffb52e; }
.xr-desc { font-size: 14px; font-weight: 700; line-height: 1.25; color: #fbe9c4; text-shadow: 0 1px 0 #2a0805; word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }
.xr-eff { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; text-shadow: var(--outline); }
.xr-now { color: #fff; } .xr-arrow { color: var(--gold); } .xr-next { color: #8ff0b0; } .xr-max { color: #8ff0b0; }
.xr-act { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.xr-cost { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px 0 3px; border-radius: 12px; background: rgba(0,0,0,.5); font-size: 15px; color: #fff; text-shadow: var(--outline); }
.xr-cost.short { color: #ff8a70; }
.xr-up { min-width: 108px; min-height: 44px; font-size: 16px; padding: 0 6px; }
.xr-up .sc-blabel { font-size: 16px; white-space: nowrap; }
.lq-btn.disabled.xr-up { filter: grayscale(.7) brightness(.7); }

/* enemy codex */
.xf-group { flex: none; display: flex; align-items: center; gap: 10px; font-size: 17px; color: var(--gold-hi); padding: 2px 4px; border-bottom: 2px solid var(--gold-dark); }
.xf-group em { font-style: normal; font-size: 13px; color: #e9d3a8; }
.xf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; flex: none; }
.xf-card { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border-radius: 10px; min-width: 0; background: linear-gradient(rgba(118,50,42,.6), rgba(66,28,24,.7)); border: 2px solid var(--gold-dark); text-align: left; }
.xf-card.unseen { opacity: .8; align-items: center; }
.xf-tx { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.xf-name { font-size: 17px; color: var(--gold-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xf-card.unseen .xf-name { color: #9a8a70; }
.xf-blurb { font-size: 13px; font-weight: 700; line-height: 1.25; color: #fbe9c4; text-shadow: 0 1px 0 #2a0805; word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }
.xf-stats { display: flex; flex-wrap: wrap; gap: 4px; }
.xf-chip { font-size: 12px; padding: 0 7px; border-radius: 8px; background: rgba(0,0,0,.55); border: 1px solid var(--gold); color: var(--gold-hi); white-space: nowrap; text-shadow: var(--outline); }
.xf-chip.type { border-color: #ff9a7a; color: #ffc0a8; }
.xf-elite { font-size: 12px; line-height: 1.25; color: #ffd98a; padding: 3px 6px; border-radius: 6px; background: rgba(0,0,0,.35); border: 1px dashed var(--gold); text-shadow: 0 1px 0 #2a0805; word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }
.xf-elite span { font-weight: 700; color: #fbe9c4; }

/* challenge menu */
.xc-modal .sc-panel { width: min(96vw, calc(820px*var(--m))); padding-bottom: 12px; }
.xc-row { display: flex; gap: 10px; width: 100%; justify-content: center; align-items: stretch; }
.xc-card { flex: 1 1 0; min-width: 0; max-width: 260px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px; border-radius: 12px; background: linear-gradient(rgba(90,20,12,.7), rgba(30,6,3,.8)); border: 2px solid var(--gold-dark); animation: lq-pop .3s ease-out both; }
.xc-card.ready { border-color: var(--gold); box-shadow: 0 0 14px rgba(255,200,90,.6); }
.xc-ico { width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: radial-gradient(circle, rgba(255,230,160,.25), rgba(20,4,2,.75)); border: 2px solid var(--gold); }
.xc-ico img { width: 34px; height: 34px; object-fit: contain; }
.xc-ico .xs-seal { width: 36px; height: 36px; font-size: 22px; }
.xc-name { font-size: 18px; color: var(--gold-hi); text-align: center; line-height: 1.15; }
.xc-desc { flex: 1 1 auto; font-size: 13px; font-weight: 700; line-height: 1.25; text-align: center; color: #fbe9c4; text-shadow: 0 1px 0 #2a0805; word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }
.xc-reward { display: flex; flex-direction: column; align-items: center; gap: 0; font-size: 13px; color: #8ff0b0; text-align: center; text-shadow: var(--outline); word-break: keep-all; overflow-wrap: anywhere; }
.xc-reward em { font-style: normal; color: var(--gold); font-size: 12px; }
.xc-go { min-width: 120px; min-height: 44px; font-size: 16px; padding: 0 6px; }
.xc-go .sc-blabel { font-size: 16px; white-space: nowrap; }
.lq-btn.disabled.xc-go { filter: grayscale(.8) brightness(.65); }
.xc-result .sc-panel { width: min(92vw, calc(520px*var(--m))); padding-bottom: 14px; gap: 8px; }
.xc-tier { font-size: 13px; font-weight: 900; color: #3a1204; background: linear-gradient(#ffe9a0, #e0a83a); border: 1px solid #7a3a10; border-radius: 10px; padding: 1px 10px; letter-spacing: 1px; }
.xc-tierline { margin-top: 8px; font-size: 15px; color: var(--cream); text-align: center; }
.xc-tierline.up { color: #ffd86a; animation: lq-pop 0.4s ease-out both; }
.xc-rws { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.xc-rw { display: flex; align-items: center; gap: 8px; font-size: max(16px, calc(22px*var(--u))); animation: sc-slide .3s both; }
.xc-rwi { width: 32px; height: 32px; object-fit: contain; }

/* prep: challenge button (in the right button row) */
.pp-right .pp-chalbtn, .pp-right .pp-resbtn { flex: 0 0 auto; min-width: 56px; gap: 4px; padding: 0 10px; }
.pp-chalbtn .pp-chtx, .pp-resbtn .pp-chtx { white-space: nowrap; }
.pp-chalbtn .xs-seal, .pp-resbtn .pp-resico { display: none; }
.pp-chalbtn.has-ready, .pp-resbtn.has-ready { animation: pp-pulse 1.5s ease-in-out infinite; }
.pp-resico svg { display: block; }

/* prep HUD: this run's 殺敵數 chip (beside the coins) */
.pp-kdisc { background: radial-gradient(circle at 35% 30%, #e0483a, #8a1410 70%); color: #ffe9b0; font-family: var(--font); font-weight: 900; font-style: normal; font-size: calc(var(--chipH) * .46); line-height: 1; text-shadow: 0 1px 0 #2a0805; border-color: #2a0805; box-shadow: 0 2px 4px rgba(0,0,0,.6), inset 0 0 0 2px var(--gold); }
.pp-hud .pp-khit { pointer-events: auto !important; cursor: pointer; position: absolute; z-index: 4; left: -12px; right: -4px; top: 50%; height: 52px; transform: translateY(-50%); margin: 0; padding: 0; border: 0; background: transparent; -webkit-tap-highlight-color: transparent; }
.pp-hud .pp-kills:has(.pp-khit:active) { transform: scale(.94); }
.pp-kres { display: inline-flex; position: relative; z-index: 1; margin-left: -2px; filter: drop-shadow(0 1px 0 #2a0805); }
.pp-kres svg { display: block; }
.pp-kbadge { right: -8px; top: -8px; min-width: 18px; height: 18px; font-size: 12px; font-style: normal; display: flex; align-items: center; justify-content: center; z-index: 3; }
.pp-kills.has-ready { animation: pp-pulse 1.5s ease-in-out infinite; }
/* small phones: the 殺敵數 chip is the 研究所 button (no room in the bottom row) */
#ui-prep.compact .pp-right .pp-resbtn { display: none; }
.pp-kills b { color: #ffd2c4; min-width: 1.5em; font-size: calc(var(--f16) * 1.1); font-variant-numeric: tabular-nums; display: inline-block; }
.pp-kills.bump b { animation: xs-kbump .3s ease-out; }
@keyframes xs-kbump { 0% { transform: scale(1.4); color: #fff; } 100% { transform: scale(1); } }
.pp-kfloat { position: absolute; left: 60%; top: 50%; z-index: 3; font-style: normal; font-weight: 900; font-family: var(--font); font-size: var(--f16); text-shadow: var(--outline); white-space: nowrap; pointer-events: none; animation: xs-kfloat .9s ease-out forwards; }
.pp-kfloat.minus { color: #ff8a70; } .pp-kfloat.plus { color: #ffe27a; }
@keyframes xs-kfloat { 0% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; } 100% { transform: translate(-50%, 120%); opacity: 0; } }
.pp-kfloat.plus { animation-name: xs-kfloatup; }
@keyframes xs-kfloatup { 0% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; } 100% { transform: translate(-50%, -200%); opacity: 0; } }

@media (max-height: 520px) {
  .xr-modal .sc-panel, .xf-modal .sc-panel { width: 98vw; height: 95vh; max-height: 95vh; gap: 3px; padding: 2px 6px 4px; border-width: 7px; }
  .xr-modal .sc-title, .xf-modal .sc-title, .xc-modal .sc-title { font-size: 18px; padding: 2px 30px 6px; }
  /* prep modals: keep the close button clear of the platform pause button (top-right 64 px) */
  .xr-modal .sc-head, .xc-modal .sc-head { padding-right: 52px; box-sizing: border-box; }
  .xr-row { padding: 5px 8px; gap: 8px; }
  .xr-name { font-size: 16px; } .xr-desc { font-size: 12px; } .xr-eff { font-size: 14px; }
  .xr-up { min-width: 92px; font-size: 14px; } .xr-up .sc-blabel { font-size: 14px; }
  .xf-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .xf-card { padding: 5px; } .xf-name { font-size: 15px; }
  .xc-modal .sc-panel { padding-bottom: 6px; gap: 4px; }
  .xc-card { padding: 6px 6px; gap: 3px; }
  .xc-ico { width: 38px; height: 38px; } .xc-ico img { width: 26px; height: 26px; } .xc-ico .xs-seal { width: 28px; height: 28px; font-size: 17px; }
  .xc-name { font-size: 15px; } .xc-desc { font-size: 12px; } .xc-reward { font-size: 12px; }
  .xb-banner { padding: 4px 12px 4px 6px; gap: 8px; }
  .xb-blurb { font-size: 12px; }
  .pp-chalbtn .xs-seal, .pp-resbtn .pp-resico { display: none; }
  .pp-right .pp-chalbtn, .pp-right .pp-resbtn { flex: 0 0 auto; min-width: 56px; padding: 0 8px; }
  .pp-chalbtn .pp-chtx, .pp-resbtn .pp-chtx { overflow: visible; text-overflow: clip; white-space: nowrap; font-size: 14px; }
  .xb-layer { --xb-top: 66px; }
}
