/* ===== request 42: repair button in the selection panel ===== */
#selinfo .repairbtn { pointer-events: auto; min-height: 48px; min-width: 112px; padding: 4px 14px 4px 8px; display: flex; align-items: center; gap: 8px; cursor: pointer; color: #f3e6c0; font-family: inherit; font-weight: 900; font-size: max(14px, calc(15px * var(--s))); background: none; border-style: solid; transition: transform .12s, filter .12s; }
/* request 44: the repair wrench and the sell key live in the command panel (right sidebar), in their own row */
#sidetools { display: flex; gap: 4px; }
#sidetools .btn { position: relative; flex: 1 1 0; min-width: 44px; min-height: max(44px, calc(48px * var(--s))); padding: 0 6px; display: flex; align-items: center; justify-content: center; gap: 5px;
  font-size: max(13px, calc(16px * var(--s))); letter-spacing: 0; line-height: 1.05; color: #f3e6c0; overflow: hidden;
  border-image: none; border: 0; border-radius: 4px;
  background: linear-gradient(180deg, #6b5a34 0%, #4a3f22 46%, #3a3119 54%, #2a2312 100%);
  box-shadow: inset 0 0 0 1px #0b0c06, inset 0 0 0 2px #b8954a, inset 0 0 0 3px rgba(20, 16, 6, 0.85), inset 0 4px 0 2px rgba(255, 240, 190, 0.12), 0 2px 0 #0a0b05;
  transition: transform .1s, filter .15s; }
#sidetools .btn::before { content: ""; position: absolute; left: 14%; right: 14%; bottom: 4px; height: 3px; border-radius: 2px; background: #2c2412; box-shadow: inset 0 1px 1px #000; pointer-events: none; transition: background .18s, box-shadow .18s; }
#sidetools .btn i { flex: none; width: max(24px, calc(30px * var(--s))); height: max(24px, calc(30px * var(--s))); background: center / contain no-repeat; filter: drop-shadow(0 2px 0 #000); }
#sidetools .btn .rmw { background-image: url(assets/ui-wrench.webp); }
#sidetools .btn .smw { background-image: url(assets/ui-sell.webp); }
#sidetools .tlb { min-width: 0; overflow-wrap: anywhere; font-weight: 900; text-shadow: var(--ol); }
#sidetools kbd { position: absolute; right: 4px; top: 3px; font: 700 10px/1 monospace; color: #cdb878; opacity: 0.8; }
#sidetools .btn:hover { filter: brightness(1.15); }
#sidetools .btn:active { transform: translateY(2px) scale(0.97); }
/* the chosen tool: a lit plate, a glowing lamp bar and a slow pulse */
#btnRepairMode.on { color: #fff3c8; background: linear-gradient(180deg, #b48a2c 0%, #8a6418 46%, #6e4e10 54%, #4a340a 100%); box-shadow: inset 0 0 0 1px #0b0c06, inset 0 0 0 2px #ffd877, inset 0 0 12px rgba(255, 210, 90, 0.55), 0 0 10px rgba(255, 196, 64, 0.7); animation: toolPulse 1s ease-in-out infinite; }
#btnSellMode.on { color: #fff1e6; background: linear-gradient(180deg, #b0503a 0%, #85301e 46%, #6a2212 54%, #45150a 100%); box-shadow: inset 0 0 0 1px #0b0c06, inset 0 0 0 2px #ffb08a, inset 0 0 12px rgba(255, 140, 90, 0.55), 0 0 10px rgba(255, 110, 70, 0.7); animation: toolPulse 1s ease-in-out infinite; }
#sidetools .btn.on::before { background: #ffe08a; box-shadow: 0 0 6px #ffbf3c, 0 0 2px #fff3c8; }
#sidetools .btn.on i { animation: toolWiggle 0.6s ease-in-out infinite; }
@keyframes toolPulse { 50% { filter: brightness(1.22); } }
@keyframes toolWiggle { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(12deg) scale(1.08); } }
@media (pointer: coarse) { #sidetools kbd { display: none; } }
/* request 69: hold position in the selection panel (G / pad LS) */
#selinfo .holdbtn { position: relative; pointer-events: auto; min-height: 48px; min-width: 104px; padding: 4px 16px 4px 8px; display: flex; align-items: center; gap: 8px; cursor: pointer; color: #f3e6c0; font-family: inherit; font-weight: 900; font-size: max(14px, calc(15px * var(--s))); background: none; border-style: solid; transition: transform .12s, filter .12s; }
#selinfo .holdbtn:hover { filter: brightness(1.18); transform: scale(1.04); }
#selinfo .holdbtn:active { transform: scale(0.95); }
#selinfo .holdbtn.on { filter: hue-rotate(60deg) saturate(1.3) brightness(1.1); }
#selinfo .holdbtn .rcol { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; text-align: left; }
#selinfo .holdbtn small { font-size: 12px; color: var(--khaki, #c9bd8a); font-weight: 700; text-shadow: 0 1px 0 #000; }
#selinfo .holdbtn .shieldic { width: 24px; height: 26px; flex: none; background: #e2c878; clip-path: polygon(50% 0, 100% 16%, 92% 62%, 50% 100%, 8% 62%, 0 16%); box-shadow: inset 0 0 0 3px #3a3119; }
#selinfo .holdbtn.on .shieldic { background: #8fe08f; }
#selinfo .holdbtn kbd { position: absolute; right: 4px; top: 3px; font: 700 10px/1 monospace; color: #cdb878; opacity: 0.8; }
#selinfo .holdtag { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 3px; background: #2f5a2a; color: #d8f5c8; font-size: 12px; line-height: 16px; vertical-align: middle; box-shadow: inset 0 0 0 1px #8fe08f; }
@media (pointer: coarse) { #selinfo .holdbtn kbd { display: none; } }
#toasts .toast.tip { pointer-events: auto; cursor: pointer; }
/* the sell key in the selection panel: press once to arm (it turns red), again to sell */
#selinfo .sellbtn { pointer-events: auto; min-height: 48px; min-width: 104px; padding: 4px 14px 4px 8px; display: flex; align-items: center; gap: 8px; cursor: pointer; color: #f3e6c0; font-family: inherit; font-weight: 900; font-size: max(14px, calc(15px * var(--s))); background: none; border-style: solid; transition: transform .12s, filter .12s; }
#selinfo .sellbtn i { width: 26px; height: 26px; flex: none; background: url(assets/ui-sell.webp) center / contain no-repeat; filter: drop-shadow(0 1px 0 #000); }
#selinfo .sellbtn:hover { filter: brightness(1.18); transform: scale(1.04); }
#selinfo .sellbtn:active { transform: scale(0.95); }
#selinfo .sellbtn.arm { filter: hue-rotate(-40deg) saturate(1.8) brightness(1.1); animation: sellArm 0.5s ease-in-out infinite alternate; }
@keyframes sellArm { to { filter: hue-rotate(-40deg) saturate(2.2) brightness(1.35); transform: scale(1.04); } }

/* the cards screen in the middle of the panel: a sunken CRT with a bezel, scanlines, a faint green glow,
   a slow scan bar and a glass sheen (all overlays ignore the pointer) */
#cardscreen { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 5px; border-radius: 7px;
  background: radial-gradient(ellipse 110% 90% at 50% 40%, rgba(70, 110, 50, 0.28), rgba(4, 8, 3, 0.92) 78%), #060904;
  box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px #8a6c30, inset 0 0 0 3px #241a08, inset 0 0 0 4px rgba(0, 0, 0, 0.9), inset 0 0 16px rgba(0, 0, 0, 0.95), inset 0 0 30px rgba(110, 230, 120, 0.14), 0 1px 0 rgba(255, 240, 190, 0.18), 0 -1px 0 rgba(0, 0, 0, 0.6); }
#cardscreen > #cards { flex: 1; min-height: 0; position: relative; z-index: 1; }
#cardscreen::after { content: ""; position: absolute; inset: 4px; border-radius: 5px; pointer-events: none; z-index: 3;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0.04) 22%, transparent 23%, transparent 70%, rgba(255, 255, 255, 0.035) 71%, transparent 86%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 100% 100% at 50% 50%, transparent 62%, rgba(0, 0, 0, 0.5) 100%);
  box-shadow: inset 0 0 18px rgba(120, 255, 140, 0.1); animation: crtFlick 5s steps(1) infinite; }
#cardscreen::before { content: ""; position: absolute; left: 4px; right: 4px; top: 4px; height: 22%; pointer-events: none; z-index: 2;
  background: linear-gradient(180deg, transparent, rgba(140, 255, 150, 0.07) 70%, rgba(190, 255, 190, 0.12) 96%, transparent);
  animation: crtScan 6s linear infinite; }
@keyframes crtScan { from { transform: translateY(-100%); } to { transform: translateY(470%); } }
@keyframes crtFlick { 0%, 100% { opacity: 1; } 47% { opacity: 0.86; } 48% { opacity: 1; } 81% { opacity: 0.92; } 82% { opacity: 1; } }

/* the power gauge: a sunken brass-rimmed meter with glossy lit cells, a tick scale under them and a red alarm when low */
#powerpanel { position: relative; background: linear-gradient(#1c2112, #0b0d06); box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px #7a6230, inset 0 0 0 3px rgba(0, 0, 0, 0.85), inset 0 3px 7px rgba(0, 0, 0, 0.8); }
#powercells { position: relative; padding: 2px 2px 5px; border-radius: 2px; background: #050703; box-shadow: inset 0 1px 3px #000, 0 1px 0 rgba(255, 240, 190, 0.12); height: 70%; }
#powercells::after { content: ""; position: absolute; left: 2px; right: 2px; bottom: 1px; height: 3px; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(226, 200, 120, 0.85) 0 1px, transparent 1px calc(100% / 4)), repeating-linear-gradient(90deg, rgba(226, 200, 120, 0.4) 0 1px, transparent 1px calc(100% / 12)); background-size: 100% 3px, 100% 2px; background-repeat: no-repeat; background-position: 0 0, 0 1px; }
#powercells i { box-shadow: inset 0 0 0 1px #262b18; }
#powercells i.free { background: linear-gradient(180deg, #eaffc8 0%, #a6e070 30%, #4f8a26 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 0 5px rgba(150, 240, 100, 0.75); }
#powercells i.use { background: linear-gradient(180deg, #fff2c0 0%, #ffd060 30%, #a8741a 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 0 4px rgba(255, 200, 80, 0.55); }
#powercells i.over { background: linear-gradient(180deg, #ffd0c0 0%, #ff7050 30%, #8a2412 100%); box-shadow: 0 0 5px rgba(255, 90, 60, 0.8); }
#powerpanel .ico.bolt { transition: filter .2s; }
#powerpanel.low { box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px #ff6a4a, inset 0 0 10px rgba(255, 60, 30, 0.55), 0 0 8px rgba(255, 70, 40, 0.6); animation: lowAlarm 0.55s ease-in-out infinite alternate; }
#powerpanel.low .ico.bolt { filter: sepia(1) saturate(6) hue-rotate(-30deg) drop-shadow(0 0 4px #ff4a2a); }
@keyframes lowAlarm { from { filter: brightness(0.9); } to { filter: brightness(1.35); } }
#selinfo .repairbtn:hover { filter: brightness(1.18); transform: scale(1.04); }
#selinfo .repairbtn:active { transform: scale(0.95); }
#selinfo .repairbtn.on { filter: hue-rotate(-25deg) saturate(1.4); animation: rpulse 1s ease-in-out infinite; }
@keyframes rpulse { 50% { filter: hue-rotate(-25deg) saturate(1.4) brightness(1.25); } }
#selinfo .repairbtn .wrench { width: 26px; height: 26px; flex: none; background: radial-gradient(circle at 70% 30%, transparent 5px, #e2c878 6px, #e2c878 8px, transparent 9px), linear-gradient(45deg, transparent 42%, #e2c878 43%, #e2c878 57%, transparent 58%); filter: drop-shadow(0 1px 0 #000); }
#selinfo .repairbtn .rcol { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; text-align: left; }
#selinfo .repairbtn small { font-size: max(12px, calc(12px * var(--s))); color: var(--khaki, #c9bd8a); font-weight: 700; text-shadow: 0 1px 0 #000; }
/* ===== request 15: dropdown fix, the battle sidebar as a command console, signal-strip toasts,
   victory / defeat effects and the results screen in the command room ===== */

/* ---------- 1. dropdown options: the focused / hovered option lights up in place, never grows past the list ---------- */
.ddlist { padding: 8px 10px 10px; }
.ddlist .ddopt:hover, .ddlist .ddopt.focus { transform: none; filter: brightness(1.22) drop-shadow(0 0 4px rgba(226, 200, 120, 0.85)); }
.ddlist .ddopt:active { transform: scale(0.97); }
.ddlist.descs .ddopt { border-width: 6px 7px; border-image: url(assets/ui-button.webp) 76 42 84 42 fill / 9px 7px 11px 7px / 0 stretch; padding: 8px 16px; }
.ddlist.descs .ddopt .dsc { overflow-wrap: anywhere; }

/* ---------- 3. battle sidebar: brass-framed olive steel like the command room's console ---------- */
#sidebar.panel::before {
  border: 0; border-image: none; opacity: 1; border-radius: 7px;
  background:
    radial-gradient(circle, #fff2c4 0 1px, #c9a552 1.6px 2.8px, #3a2a0c 3.4px, transparent 4px) left 4px top 4px / 10px 10px no-repeat,
    radial-gradient(circle, #fff2c4 0 1px, #c9a552 1.6px 2.8px, #3a2a0c 3.4px, transparent 4px) right 4px top 4px / 10px 10px no-repeat,
    radial-gradient(circle, #fff2c4 0 1px, #c9a552 1.6px 2.8px, #3a2a0c 3.4px, transparent 4px) left 4px bottom 4px / 10px 10px no-repeat,
    radial-gradient(circle, #fff2c4 0 1px, #c9a552 1.6px 2.8px, #3a2a0c 3.4px, transparent 4px) right 4px bottom 4px / 10px 10px no-repeat,
    radial-gradient(circle, #fff2c4 0 1px, #c9a552 1.6px 2.8px, #3a2a0c 3.4px, transparent 4px) left 4px center / 10px 10px no-repeat,
    radial-gradient(circle, #fff2c4 0 1px, #c9a552 1.6px 2.8px, #3a2a0c 3.4px, transparent 4px) right 4px center / 10px 10px no-repeat,
    repeating-linear-gradient(180deg, rgba(226, 200, 120, 0.55) 0 1.5px, transparent 1.5px 9px) left calc(var(--pb) / 2 - 3px) top 20% / 6px 22% no-repeat,
    repeating-linear-gradient(180deg, rgba(226, 200, 120, 0.55) 0 1.5px, transparent 1.5px 9px) left calc(var(--pb) / 2 - 3px) bottom 20% / 6px 22% no-repeat,
    repeating-linear-gradient(180deg, rgba(226, 200, 120, 0.55) 0 1.5px, transparent 1.5px 9px) right calc(var(--pb) / 2 - 3px) top 20% / 6px 22% no-repeat,
    repeating-linear-gradient(180deg, rgba(226, 200, 120, 0.55) 0 1.5px, transparent 1.5px 9px) right calc(var(--pb) / 2 - 3px) bottom 20% / 6px 22% no-repeat,
    repeating-linear-gradient(90deg, rgba(226, 200, 120, 0.5) 0 1.5px, transparent 1.5px 8px) center bottom calc(var(--pb) / 2 - 3px) / 46% 6px no-repeat,
    repeating-linear-gradient(90deg, rgba(226, 200, 120, 0.45) 0 1.5px, transparent 1.5px 8px) center top calc(var(--pb) / 2 - 3px) / 62% 6px no-repeat,
    linear-gradient(180deg, rgba(38, 44, 24, 0.94), rgba(22, 26, 13, 0.95)) center / calc(100% - 2 * var(--pb) + 2px) calc(100% - 2 * var(--pb) + 2px) no-repeat,
    linear-gradient(#e0bf6c, #7a5a22) center / calc(100% - 2 * var(--pb) + 6px) calc(100% - 2 * var(--pb) + 6px) no-repeat,
    linear-gradient(160deg, #6f7848 0%, #4b5331 30%, #5d6539 52%, #353b20 78%, #4b5230 100%);
  box-shadow: inset 0 0 0 1px #0b0c06, inset 0 0 0 3px #b8954a, inset 0 0 0 4px #3a2a0c, inset 0 7px 9px rgba(255, 240, 190, 0.1), 0 6px 14px rgba(0, 0, 0, 0.55);
}
/* the lamp strip in the top frame: red / amber / green */
#sidebar.panel::after {
  inset: auto; left: 50%; top: calc(-1 * var(--pb) + (var(--pb) - 10px) / 2); width: 62px; height: 10px; transform: translateX(-50%); z-index: -1;
  border-radius: 999px;
  background:
    radial-gradient(circle, #ffe0d4 0 1px, #ff5a3c 1.8px 3px, #6a1408 3.6px, transparent 4.2px) 6px 0 / 10px 10px no-repeat,
    radial-gradient(circle, #fff2cc 0 1px, #ffbf3c 1.8px 3px, #6a420a 3.6px, transparent 4.2px) 26px 0 / 10px 10px no-repeat,
    radial-gradient(circle, #e0ffe8 0 1px, #4fef8a 1.8px 3px, #0d5a28 3.6px, transparent 4.2px) 46px 0 / 10px 10px no-repeat,
    #0c0e08;
  box-shadow: 0 0 0 1.5px #6d5729, inset 0 1px 2px #000, 0 0 8px rgba(255, 200, 90, 0.25);
  animation: sbLamps 2.4s ease-in-out infinite;
}
@keyframes sbLamps { 0%, 100% { filter: brightness(0.85); } 50% { filter: brightness(1.35); } }

/* tabs and side buttons: riveted olive plates with a brass edge; the chosen tab lights its lamp bar */
#tabs .btn, #sideactions .btn {
  border-image: none; border: 0; border-radius: 4px;
  background: linear-gradient(180deg, #727d46 0%, #4f5832 46%, #3e4527 54%, #2e341b 100%);
  box-shadow: inset 0 0 0 1px #0b0c06, inset 0 0 0 2px #a8884a, inset 0 0 0 3px rgba(20, 22, 10, 0.85), inset 0 4px 0 2px rgba(255, 240, 190, 0.12), 0 2px 0 #0a0b05;
}
#tabs .btn::before, #sideactions .btn::before {
  content: ""; position: absolute; inset: 5px; pointer-events: none;
  background:
    radial-gradient(circle, #f6e2a4 0 0.8px, #8a6a2a 1.4px 2px, transparent 2.6px) left top / 6px 6px no-repeat,
    radial-gradient(circle, #f6e2a4 0 0.8px, #8a6a2a 1.4px 2px, transparent 2.6px) right top / 6px 6px no-repeat,
    radial-gradient(circle, #f6e2a4 0 0.8px, #8a6a2a 1.4px 2px, transparent 2.6px) left bottom / 6px 6px no-repeat,
    radial-gradient(circle, #f6e2a4 0 0.8px, #8a6a2a 1.4px 2px, transparent 2.6px) right bottom / 6px 6px no-repeat;
}
#tabs .tab::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 4px; height: 3px; border-radius: 2px; background: #2c2412; box-shadow: inset 0 1px 1px #000; pointer-events: none; transition: background 0.18s, box-shadow 0.18s; }
#tabs .btn.sel { filter: none; color: #fff3c8; background: linear-gradient(180deg, #8f9d55 0%, #636f3a 46%, #4e592d 54%, #3a4220 100%); }
#tabs .tab.sel::after { background: #ffd877; box-shadow: 0 0 6px #ffbf3c, 0 0 2px #fff3c8; }
#tabs .btn:active, #sideactions .btn:active { transform: translateY(2px) scale(0.97); box-shadow: inset 0 0 0 1px #0b0c06, inset 0 0 0 2px #a8884a, inset 0 3px 6px rgba(0, 0, 0, 0.6); }

/* cards: olive steel plates with a brass hairline, corner rivets and a lamp bar along the bottom */
.card {
  border-radius: 4px;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 3px), radial-gradient(ellipse 90% 70% at 50% 32%, #68753f, #3b4325 60%, #22271a);
  box-shadow: inset 0 0 0 1px #0b0c06, inset 0 0 0 2px #9c7f3e, inset 0 0 0 3px rgba(18, 20, 9, 0.9), inset 0 4px 0 3px rgba(255, 240, 190, 0.07);
}
.card.sig { background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 3px), radial-gradient(ellipse 90% 70% at 50% 32%, #84723a, #463812 60%, #261d0a); box-shadow: inset 0 0 0 1px #0b0c06, inset 0 0 0 2px #e2c070, inset 0 0 0 3px rgba(18, 20, 9, 0.9), inset 0 0 10px rgba(255, 214, 120, 0.25); }
.card.air { background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 3px), radial-gradient(ellipse 90% 70% at 50% 32%, #557580, #263840 60%, #161f24); }
.card::before {
  content: ""; position: absolute; inset: 4px; pointer-events: none;
  background:
    radial-gradient(circle, #f6e2a4 0 0.8px, #8a6a2a 1.4px 2px, transparent 2.6px) left top / 6px 6px no-repeat,
    radial-gradient(circle, #f6e2a4 0 0.8px, #8a6a2a 1.4px 2px, transparent 2.6px) right top / 6px 6px no-repeat,
    radial-gradient(circle, #f6e2a4 0 0.8px, #8a6a2a 1.4px 2px, transparent 2.6px) right bottom / 6px 6px no-repeat;
}
.card::after { left: 12%; right: 12%; top: auto; bottom: 2px; width: auto; height: 3px; border-radius: 2px; background: #2c2412; box-shadow: inset 0 1px 1px #000; opacity: 1; z-index: 0; transition: background 0.15s, box-shadow 0.15s; }
.card .cost { z-index: 1; }
.card.act::after { background: #8ff07a; box-shadow: 0 0 6px #5dff6a, 0 0 2px #e6ffd8; }
.card:hover::after, .card.focus::after { background: #ffd877; box-shadow: 0 0 7px #ffbf3c, 0 0 2px #fff3c8; }
.card.focus { box-shadow: inset 0 0 0 1px #0b0c06, inset 0 0 0 2px #ffd877, inset 0 0 0 3px rgba(18, 20, 9, 0.9), 0 0 8px rgba(255, 210, 110, 0.55); }
.card.fresh, .card.fresh::before { animation: none; }
/* request 63: the title's thin brass loading bar (pictures and models still loading behind the title) */
#title-load { position: absolute; left: 50%; bottom: max(1.6%, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(300px, 46%); display: flex; flex-direction: column; align-items: center; gap: 3px; pointer-events: none; transition: opacity 0.6s; z-index: 3; }
#title-load.done { opacity: 0; }
#title-load span { font: 800 12px/1.2 Impact, "Arial Black", sans-serif; letter-spacing: 0.06em; color: #e6d6a0; text-shadow: 0 1px 0 #000, 0 0 3px #000; white-space: nowrap; }
#title-load b { display: block; width: 100%; height: 5px; border-radius: 3px; background: rgba(14, 16, 8, 0.8); box-shadow: inset 0 0 0 1px #6e5626, 0 1px 0 #000; overflow: hidden; }
#title-load i { display: block; height: 100%; width: 0; background: linear-gradient(180deg, #ffe9a0, #c9993c); box-shadow: 0 0 6px rgba(255, 210, 110, 0.7); transition: width 0.25s; }
/* request 63: a card that has just become buildable slides in from the right, its brass edge flashes once, NEW shows briefly */
.card.unlock { outline: 2px solid transparent; outline-offset: -2px; animation: cardIn 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.2) var(--ud, 0s) both, cardFlash 0.75s ease-out calc(var(--ud, 0s) + 0.28s) both; }
@keyframes cardIn { 0% { opacity: 0; transform: translateX(38px) scale(0.96); } 70% { opacity: 1; transform: translateX(-3px) scale(1); } 100% { opacity: 1; transform: none; } }
@keyframes cardFlash { 0% { outline-color: rgba(255, 226, 140, 0); filter: none; } 25% { outline-color: rgba(255, 226, 140, 1); filter: brightness(1.35); } 100% { outline-color: rgba(255, 226, 140, 0); filter: none; } }
.card .newtag {
  position: absolute; right: 4px; top: 40%; z-index: 3; pointer-events: none;
  padding: 1px 5px 0; border-radius: 2px; font: 900 max(12px, calc(13px * var(--s))) / 1.2 Impact, "Arial Black", sans-serif; letter-spacing: 0.04em;
  color: #1a1406; background: linear-gradient(180deg, #fff0b0, #e0b452 55%, #a77a26); border: 1px solid #4a3812;
  box-shadow: 0 1px 0 #000, 0 0 6px rgba(255, 210, 110, 0.7);
  animation: newTag 1.9s ease-out var(--ud, 0s) both;
}
@keyframes newTag { 0% { opacity: 0; transform: scale(0.3); } 14% { opacity: 1; transform: scale(1.18); } 22% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- 4. toasts: battle-radar alerts, centred right under the battle clock ---------- */
/* centred on the screen like the clock; kept as narrow as the room between the minimap and the sidebar */
#toasts {
  left: 50%; transform: translateX(-50%); align-items: center;
  top: calc(54px * var(--s) + 26px);
  width: max-content; max-width: max(200px, calc(100% - 2 * max(var(--side-w), var(--mm)) - 32px)); gap: 6px;
}
.toast {
  --tc: #ffc24a;
  display: flex; align-items: center; gap: 10px; max-width: 100%; position: relative; overflow: hidden; box-sizing: border-box;
  white-space: normal; text-align: left; line-height: 1.25; overflow-wrap: anywhere;
  font-family: "Consolas", "Lucida Console", "Courier New", ui-monospace, monospace, var(--font);
  font-weight: 700; font-size: max(14px, calc(16px * var(--s))); letter-spacing: 0.05em;
  color: color-mix(in srgb, var(--tc) 70%, #fff); text-shadow: 0 0 6px color-mix(in srgb, var(--tc) 70%, transparent), 0 1px 0 #000;
  padding: 6px 18px 6px 7px; border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--tc) 55%, transparent);
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.28) 0 1px, transparent 1px 3px),
    radial-gradient(120% 160% at 0% 50%, color-mix(in srgb, var(--tc) 16%, transparent), transparent 60%),
    linear-gradient(180deg, rgba(8, 24, 14, 0.93), rgba(3, 10, 6, 0.93));
  box-shadow: inset 0 0 12px color-mix(in srgb, var(--tc) 18%, transparent), 0 0 10px color-mix(in srgb, var(--tc) 22%, transparent), 0 4px 10px rgba(0, 0, 0, 0.55);
  animation: btRadarIn 0.36s cubic-bezier(.2, 1.3, .4, 1) both;
}
/* corner brackets of a radar display */
.toast::before {
  content: ""; position: absolute; inset: 2px; pointer-events: none; opacity: 0.85;
  background:
    linear-gradient(var(--tc), var(--tc)) left top / 7px 1.5px, linear-gradient(var(--tc), var(--tc)) left top / 1.5px 7px,
    linear-gradient(var(--tc), var(--tc)) right top / 7px 1.5px, linear-gradient(var(--tc), var(--tc)) right top / 1.5px 7px,
    linear-gradient(var(--tc), var(--tc)) left bottom / 7px 1.5px, linear-gradient(var(--tc), var(--tc)) left bottom / 1.5px 7px,
    linear-gradient(var(--tc), var(--tc)) right bottom / 7px 1.5px, linear-gradient(var(--tc), var(--tc)) right bottom / 1.5px 7px;
  background-repeat: no-repeat;
}
/* the radar scope: rings, a cross-hair, a rotating sweep and a pulsing blip */
.toast .tl {
  flex: none; position: relative; width: 26px; height: 26px; border-radius: 50%; overflow: hidden; box-sizing: border-box;
  border: 1.5px solid var(--tc);
  background:
    linear-gradient(color-mix(in srgb, var(--tc) 45%, transparent), color-mix(in srgb, var(--tc) 45%, transparent)) center / 100% 1px no-repeat,
    linear-gradient(color-mix(in srgb, var(--tc) 45%, transparent), color-mix(in srgb, var(--tc) 45%, transparent)) center / 1px 100% no-repeat,
    radial-gradient(circle, transparent 0 34%, color-mix(in srgb, var(--tc) 50%, transparent) 36% 40%, transparent 42%),
    #020a05;
  box-shadow: 0 0 8px color-mix(in srgb, var(--tc) 60%, transparent);
}
.toast .tl::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, color-mix(in srgb, var(--tc) 75%, transparent), transparent 85deg);
  animation: btSweep 1.6s linear infinite;
}
.toast .tl b {
  position: absolute; left: 62%; top: 26%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 5px 1px var(--tc); animation: btBlip 1.6s ease-out infinite;
}
.toast .tt { min-width: 0; position: relative; }
/* a blinking terminal cursor after the text */
.toast .tt::after { content: ""; display: inline-block; width: 0.5em; height: 0.95em; margin-left: 0.3em; vertical-align: -0.12em; background: currentColor; animation: btCursor 0.9s steps(2) infinite; }
/* the one-time scan flash that crosses the strip as it arrives */
.toast .tsw {
  position: absolute; top: 0; bottom: 0; left: -30%; width: 30%; pointer-events: none;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--tc) 55%, transparent), transparent);
  animation: btScan 0.5s ease-out 0.05s both;
}
.toast.good { --tc: #5cf28a; }
.toast.warn { --tc: #ff962e; }
.toast.crit { --tc: #ff4636; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.28) 0 1px, transparent 1px 3px), linear-gradient(180deg, rgba(40, 8, 6, 0.94), rgba(14, 3, 2, 0.94)); animation: btRadarIn 0.36s cubic-bezier(.2, 1.3, .4, 1) both, btCrit 0.5s steps(2) 0.36s infinite; }
.toast.crit .tl::before { animation-duration: 0.8s; }
.toast.crit .tl b { animation-duration: 0.8s; }
.toast.out { animation: btDecay 0.5s linear forwards; }
.toast.out .tl::before, .toast.out .tl b, .toast.out .tt::after { animation: none; }
@keyframes btRadarIn {
  0% { opacity: 0; transform: translateY(-12px) scaleX(0.35); filter: brightness(2.4); }
  45% { opacity: 1; transform: translateY(0) scaleX(1.03); filter: brightness(1.9); }
  100% { opacity: 1; transform: none; filter: none; }
}
@keyframes btDecay {
  0% { opacity: 1; filter: none; transform: none; }
  20% { opacity: 0.35; }
  32% { opacity: 0.85; }
  55% { opacity: 0.25; filter: blur(0.6px); }
  70% { opacity: 0.5; }
  100% { opacity: 0; filter: blur(1.5px); transform: scaleY(0.4); }
}
@keyframes btSweep { to { transform: rotate(360deg); } }
@keyframes btBlip { 0%, 8% { opacity: 1; transform: scale(1.4); } 60%, 100% { opacity: 0.15; transform: scale(0.7); } }
@keyframes btCursor { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes btScan { 0% { left: -30%; opacity: 1; } 100% { left: 110%; opacity: 0.6; } }
@keyframes btCrit { 0% { border-color: #ff4636; box-shadow: inset 0 0 14px rgba(255, 70, 54, 0.35), 0 0 14px rgba(255, 70, 54, 0.55), 0 4px 10px rgba(0, 0, 0, 0.55); } 100% { border-color: rgba(255, 70, 54, 0.3); box-shadow: inset 0 0 6px rgba(255, 70, 54, 0.1), 0 0 4px rgba(255, 70, 54, 0.15), 0 4px 10px rgba(0, 0, 0, 0.55); } }

/* ---------- 5. victory / defeat effects ---------- */
#endfx { position: absolute; inset: 0; z-index: 36; pointer-events: none; overflow: hidden; transition: opacity 0.3s; }
#endfx.gone, .efx.gone { opacity: 0; transition: opacity 0.3s; }
.efx > i, .efx .fw > i { position: absolute; display: block; }
.efx .word { position: absolute; left: 0; right: 0; top: 33%; text-align: center; font-weight: 900; line-height: 1.05; letter-spacing: 0.08em; text-transform: uppercase;
  font-size: min(max(54px, calc(118px * var(--s))), 14vw); }
.efx .word span { display: inline-block; padding: 0 0.12em; -webkit-background-clip: text; background-clip: text; color: transparent; }
.efx .band { left: 0; right: 0; top: calc(33% - 2vh); height: calc(min(max(54px, calc(118px * var(--s))), 14vw) * 1.05 + 4vh); background: linear-gradient(90deg, transparent, rgba(10, 12, 5, 0.72) 18%, rgba(10, 12, 5, 0.72) 82%, transparent); animation: efxBand 0.45s ease-out both; }
@keyframes efxBand { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* victory */
.efx.win .glow { inset: 0; background: radial-gradient(ellipse 60% 50% at 50% 42%, rgba(255, 226, 140, 0.55), rgba(255, 190, 70, 0.12) 50%, transparent 75%); animation: efxGlow 0.9s ease-out both; }
@keyframes efxGlow { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0.7; } }
.efx.win .rays { left: 50%; top: 42%; width: 170vmax; height: 170vmax; margin: -85vmax 0 0 -85vmax;
  background: repeating-conic-gradient(from 0deg, rgba(255, 214, 110, 0.34) 0 5deg, transparent 5deg 15deg);
  -webkit-mask: radial-gradient(circle, #000 0 4%, rgba(0, 0, 0, 0.55) 18%, transparent 40%); mask: radial-gradient(circle, #000 0 4%, rgba(0, 0, 0, 0.55) 18%, transparent 40%);
  animation: efxRaysIn 0.7s ease-out both, efxSpin 16s linear infinite; }
@keyframes efxRaysIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes efxSpin { to { transform: rotate(360deg); } }
.efx.win .word span {
  background-image: linear-gradient(100deg, #ffe9a0 0%, #ffcf48 34%, #fffbe8 44%, #ffcf48 54%, #b47c1a 100%); background-size: 300% 100%;
  -webkit-text-stroke: 2px #3a2408; paint-order: stroke fill; filter: drop-shadow(0 6px 0 #1a1004) drop-shadow(0 0 16px rgba(255, 200, 80, 0.6));
  animation: efxWordIn 0.7s cubic-bezier(.2, 1.6, .4, 1) both, efxGloss 1.7s 0.6s ease-in-out infinite; }
@keyframes efxWordIn { 0% { transform: scale(0.2); opacity: 0; } 60% { transform: scale(1.14); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes efxGloss { from { background-position: 100% 0; } to { background-position: -60% 0; } }
.efx .fw { left: var(--x); top: var(--y); width: 0; height: 0; }
.efx .fw > i { left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 6px var(--c), 0 0 2px #fff; opacity: 0;
  animation: efxBurst 1.15s var(--dl) cubic-bezier(.1, .7, .3, 1) both; }
@keyframes efxBurst { 0% { transform: rotate(var(--a)) translateX(0) scale(1.3); opacity: 0; } 6% { opacity: 1; } 100% { transform: rotate(var(--a)) translateX(var(--r)) translateY(14px) scale(0.3); opacity: 0; } }
.efx .cf { left: var(--x); top: -6%; width: var(--w); height: calc(var(--w) * 1.8); border-radius: 1px; background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 60%, #000)); opacity: 0;
  animation: efxFall var(--d) var(--dl) linear both; }
@keyframes efxFall { 0% { transform: translate(0, 0) rotate(0) rotateX(0); opacity: 1; } 100% { transform: translate(var(--dx), 112vh) rotate(var(--r)) rotateX(720deg); opacity: 1; } }
/* defeat */
.efx.lose .red { inset: 0; background: radial-gradient(ellipse at 50% 45%, rgba(90, 10, 4, 0.2), rgba(46, 4, 2, 0.72) 58%, rgba(8, 0, 0, 0.92)); animation: efxFade 1.1s ease-out both; }
.efx.lose .tint { inset: 0; background: #7a1a10; mix-blend-mode: multiply; opacity: 0.55; animation: efxFade 1.4s ease-out both; }
@keyframes efxFade { from { opacity: 0; } }
.efx .boom { left: var(--x); top: var(--y); width: 44vmin; height: 44vmin; margin: -22vmin 0 0 -22vmin; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, rgba(255, 244, 210, 0.95), rgba(255, 150, 50, 0.75) 22%, rgba(200, 40, 10, 0.35) 46%, transparent 68%);
  animation: efxBoom 0.75s var(--dl) ease-out both; }
@keyframes efxBoom { 0% { transform: scale(0.15); opacity: 0; } 14% { opacity: 1; } 100% { transform: scale(1.45); opacity: 0; } }
.efx .cracks { position: absolute; inset: 0; opacity: 0; }
.efx .cracks svg { width: 100%; height: 100%; display: block; }
.efx .cracks path { fill: none; stroke-dasharray: 160; stroke-dashoffset: 160; stroke-linejoin: bevel; stroke-linecap: round; }
.efx .cracks .c1 { stroke: rgba(12, 2, 0, 0.9); stroke-width: 0.5; }
.efx .cracks .c2 { stroke: rgba(255, 150, 100, 0.85); stroke-width: 0.16; }
.efx.landed .cracks { opacity: 1; }
.efx.landed .cracks path { animation: efxCrack 0.5s ease-out forwards; }
@keyframes efxCrack { to { stroke-dashoffset: 0; } }
.efx.landed { animation: efxShake 0.42s ease-out; }
@keyframes efxShake { 0% { transform: translate(0, 0); } 20% { transform: translate(-9px, 6px); } 40% { transform: translate(8px, -5px); } 60% { transform: translate(-5px, 3px); } 80% { transform: translate(3px, -2px); } 100% { transform: none; } }
.efx .smoke { left: var(--x); bottom: -24%; width: 42vmin; height: 42vmin; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, rgba(46, 36, 34, 0.6), rgba(30, 24, 22, 0.3) 40%, transparent 66%);
  animation: efxSmoke var(--d) var(--dl) ease-out both; }
@keyframes efxSmoke { 0% { transform: translateY(0) scale(0.6); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-70vh) scale(1.7); opacity: 0; } }
.efx .ember { left: var(--x); bottom: -2%; width: 4px; height: 4px; border-radius: 50%; background: #ffbe5a; box-shadow: 0 0 6px #ff6a1a, 0 0 2px #fff0c0; opacity: 0;
  animation: efxEmber var(--d) var(--dl) linear both; }
@keyframes efxEmber { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate(var(--dx), -88vh); opacity: 0; } }
.efx.lose .word span {
  color: #ff6a48; -webkit-text-fill-color: #ff6a48; background: none;
  -webkit-text-stroke: 2px #1a0402; text-shadow: 0 2px 0 #7a1408, 0 7px 0 #000, 0 0 22px rgba(255, 60, 30, 0.7);
  animation: efxPress 1.3s cubic-bezier(.55, 0, .8, .2) both; }
@keyframes efxPress { 0% { transform: translateY(-70px) scale(1.8); opacity: 0; letter-spacing: 0.3em; } 55% { opacity: 1; } 100% { transform: none; opacity: 1; letter-spacing: 0.08em; } }

/* ---------- 6. results screen on the command room's big screen ---------- */
.scene.res .bgimg { object-position: left center; }
.scene.res .ov { left: 38%; }
.res .rhead { font-size: calc(var(--fz) * 2.3); font-weight: 900; line-height: 1; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 0.2em; text-shadow: var(--ol); }
.res.win .rhead { color: #ffe08a; }
.res.lose .rhead { color: #ff9a84; }
.res .rsub { font-size: calc(var(--fz) * 0.9); color: #e8dcb4; margin-bottom: 0.45em; text-shadow: 0 1px 0 #000; }
.res .rgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.28em 0.6em; margin: 0.2em 0 0.4em; }
.res .rrow { display: flex; align-items: center; gap: 0.45em; min-width: 0; padding: 0.22em 0.5em; border-radius: 3px;
  background: linear-gradient(90deg, rgba(20, 24, 12, 0.78), rgba(20, 24, 12, 0.35)); box-shadow: inset 3px 0 0 var(--rc, #b8954a), inset 0 0 0 1px rgba(226, 200, 120, 0.22); }
.res .rrow .ri { flex: none; width: 1.3em; text-align: center; font-size: 0.95em; }
.res .rrow .rl { flex: 1; min-width: 0; font-size: calc(var(--fz) * 0.82); color: #d8cca4; font-weight: 700; line-height: 1.15; }
.res .rrow .rv { flex: none; font-size: calc(var(--fz) * 1.12); font-weight: 900; color: #fff1c4; font-variant-numeric: tabular-nums; text-shadow: var(--ol); }
.res .rrow.wide { grid-column: 1 / -1; --rc: #ffd877; }
.res .rrow.wide .rv { font-size: calc(var(--fz) * 1.4); color: #ffe08a; }
.res .rstars { color: #ffd877; letter-spacing: 0.1em; text-shadow: var(--ol); }
.res .rbtns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0.3em; }
.res .rbtns .btn { font-size: max(13px, calc(var(--fz) * 0.78)); padding: 2px 12px; min-height: 44px; text-transform: none; }
/* request 40: every side's colour chip on the results screen */
.res .rsides { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3em; margin: 0 0 0.4em; }
.res .rsides .rsl { font-size: calc(var(--fz) * 0.78); color: #d8cca4; font-weight: 700; margin-right: 0.2em; text-shadow: 0 1px 0 #000; }
.res .rside { display: flex; align-items: center; gap: 0.25em; padding: 0.1em 0.45em 0.1em 0.15em; border-radius: 3px; font-size: calc(var(--fz) * 0.78);
  background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 55%, #10120a), rgba(16, 18, 10, 0.75)); box-shadow: inset 0 0 0 2px var(--tc), 0 1px 0 #000; color: #fff4d6; }
.res .rside .rse { width: 1.4em; height: 1.4em; object-fit: contain; filter: drop-shadow(0 1px 0 #000); }
.res .rside b { font-weight: 900; text-shadow: var(--ol); white-space: nowrap; }
.res .rside i { font-style: normal; font-weight: 900; color: var(--tc); background: rgba(0, 0, 0, 0.55); border-radius: 2px; padding: 0 0.25em; }
.res .rside.me { box-shadow: inset 0 0 0 2px var(--tc), 0 0 0 1px #ffe08a; }
.res .rside.out { opacity: 0.55; filter: grayscale(0.5); }
.res .rside.out b { text-decoration: line-through; }
@container app (max-height: 520px) {
  .scene.res .ov { left: 34%; }
  .res .rgrid { gap: 3px 6px; }
  .res .rrow { padding: 1px 6px; }
  /* request 73: phones held sideways — the medal and supply lines fit on the screen without scrolling */
  .res .rhead { font-size: calc(var(--fz) * 1.75); margin-bottom: 0.1em; }
  .res .rsub { margin-bottom: 0.2em; line-height: 1.2; }
  .res .who { margin-bottom: 0; }
}
@container app (max-height: 440px) {
  .res .who { display: none; } /* the screen's header already says 戰役結算 */
  .scene.res .ov { left: 29%; }
  .res .rhead { font-size: calc(var(--fz) * 1.5); }
  .res .rgrid { gap: 2px 6px; margin: 0 0 0.2em; }
  .res .rrow { padding: 0 6px; }
  .res .rrow .rl { line-height: 1.05; }
  .res .rrow.wide .rv { font-size: calc(var(--fz) * 1.15); }
}

/* ===== request 43: phone layout pass (sideways phones and the handheld console's 704×396 page) ===== */
.crt-in .ov .chip { font-size: max(12px, 0.9em); }
.res .rrow .rl, .res .rsides .rsl, .res .rside { font-size: max(12px, calc(var(--fz) * 0.82)); }
#menu-body .backbtn { max-width: calc(var(--crt-l, 15%) - 12px); min-width: 64px; overflow: hidden; text-overflow: ellipsis; }
@container app (max-height: 520px) {
  /* the platform's own back button takes the top-left 64×64 when a phone is held sideways: ours sits just below it */
  #menu-body .backbtn { top: max(68px, calc(env(safe-area-inset-top) + 60px)); left: max(6px, env(safe-area-inset-left)); font-size: 14px !important; padding: 2px 6px !important; border-width: 8px !important; white-space: nowrap; }
  /* nation keys: the name gets the whole plate (the big screen already shows the commander) */
  .cr .fanbtn.nat .fp { display: none; }
  .cr .fanbtn.nat { font-size: 14px; line-height: 1.05; }
  .cr .fanbtn.nat .fl b { overflow-wrap: anywhere; }
  /* icon keys (Online, Back to maps…): the label alone, so it is never cut at the bottom of the plate */
  .cr .fanbtn.ico .fl b { display: none; }
  .cr .fanbtn.ico .fl small { font-size: 13px; line-height: 1.1; letter-spacing: 0.02em; }
  .cr .fanbtn .fl { line-height: 1.08; }
  .crt-in .ov .tsteps { line-height: 1.25; }
  #title-prompt { font-size: 17px; padding: 6px 30px; bottom: max(7%, env(safe-area-inset-bottom)); }
  #title-logo-wrap { width: min(70%, 960px); top: max(3%, env(safe-area-inset-top)); }
  #toasts .toast { font-size: 14px; white-space: normal; max-width: 70vw; text-align: center; }
  #placehint { font-size: 13px; padding: 4px 14px; max-width: 46%; bottom: 8px; }
}
/* upright screens (when a page ever is taller than wide): the portrait key art and a wider logo */
@container app (max-aspect-ratio: 4/5) {
  #screen-title .bg { background-image: url(assets/cover-bg.webp), url(assets/title-bg2.webp); background-position: center top, center; }
  #title-logo-wrap { width: 84%; top: 5%; }
  #title-logo { max-height: 24cqh; }
  #title-prompt { font-size: 18px; padding: 8px 28px; }
}

/* request 78: context cursors (bomb / garrison), the touch tap icon, the pad cursor's variants and 全部出來 */
#hovcur { position: absolute; z-index: 61; width: 44px; height: 44px; margin: -8px 0 0 -8px; pointer-events: none; }
#hovcur img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 2px #000) drop-shadow(0 2px 3px rgba(0,0,0,.7)); }
#hovcur[data-k="bomb"] img { animation: curBomb .5s ease-in-out infinite alternate; filter: drop-shadow(0 0 2px #000) drop-shadow(0 0 6px rgba(255,150,40,.9)); }
#hovcur[data-k="garrison"] img { animation: curGar .7s ease-in-out infinite alternate; filter: drop-shadow(0 0 2px #000) drop-shadow(0 0 6px rgba(110,255,130,.85)); }
#hovcur.noimg::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 3px solid #ffb040; background: #1a1206; }
#hovcur.noimg[data-k="garrison"]::before { border-color: #7dff8a; }
@keyframes curBomb { from { transform: rotate(-8deg) scale(1); } to { transform: rotate(6deg) scale(1.08); } }
@keyframes curGar { from { transform: translateX(-2px); } to { transform: translateX(3px); } }
#padcursor.cur-bomb, #padcursor.cur-gar { width: 46px; height: 46px; margin: -23px 0 0 -23px; background: center / 34px no-repeat; background-color: rgba(10,10,6,.55); }
#padcursor.cur-bomb { background-image: url(assets/cur-bomb.webp); border-color: #ffb040; box-shadow: 0 0 0 2px #000, 0 0 12px rgba(255,150,40,.8); }
#padcursor.cur-gar { background-image: url(assets/cur-garrison.webp); border-color: #7dff8a; box-shadow: 0 0 0 2px #000, 0 0 12px rgba(110,255,130,.75); }
#padcursor.cur-bomb::after, #padcursor.cur-gar::after { display: none; }
.tapicon { position: absolute; z-index: 45; width: 52px; height: 52px; margin: -52px 0 0 -26px; pointer-events: none; animation: tapIcon 1s ease-out forwards; }
.tapicon img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 2px #000) drop-shadow(0 0 8px rgba(255,170,60,.85)); }
.tapicon.tg img { filter: drop-shadow(0 0 2px #000) drop-shadow(0 0 8px rgba(110,255,130,.85)); }
@keyframes tapIcon { 0% { transform: scale(.3); opacity: 0; } 18% { transform: scale(1.15); opacity: 1; } 32% { transform: scale(1); } 75% { opacity: 1; transform: translateY(-8px); } 100% { opacity: 0; transform: translateY(-16px); } }
#selinfo .exitbtn { position: relative; pointer-events: auto; min-height: 48px; min-width: 104px; padding: 4px 16px 4px 8px; display: flex; align-items: center; gap: 8px; cursor: pointer; color: #f3e6c0; font-family: inherit; font-weight: 900; font-size: max(14px, calc(15px * var(--s))); background: none; border-style: solid; transition: transform .12s, filter .12s; }
#selinfo .exitbtn:hover { filter: brightness(1.18); transform: scale(1.04); }
#selinfo .exitbtn:active { transform: scale(0.95); }
#selinfo .exitbtn.on { filter: hue-rotate(60deg) saturate(1.3) brightness(1.1); }
#selinfo .exitbtn .rcol { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; text-align: left; }
#selinfo .exitbtn small { font-size: 12px; color: #9fe8a0; font-weight: 700; text-shadow: 0 1px 0 #000; }
#selinfo .exitbtn .exitic { width: 28px; height: 28px; flex: none; background: url(assets/ui-exit.webp) center / contain no-repeat; }
#selinfo .exitbtn kbd { position: absolute; right: 4px; top: 3px; font: 700 10px/1 monospace; color: #cdb878; opacity: 0.8; }
@media (pointer: coarse) { #selinfo .exitbtn kbd { display: none; } }
