* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg0: #060a12;
  --bg1: #0a101d;
  --bg2: #101a2e;
  --panel: rgba(13, 20, 34, 0.78);
  --panel2: rgba(10, 16, 28, 0.85);
  --line: #2a3a57;
  --line2: #1d2a42;
  --text: #e8eef9;
  --dim: #93a4c0;
  --faint: #55688a;
  --gold: #f0c46a;
  --gold2: #c08a2e;
  --goldline: #6e5015;
  --crimson: #e4574a;
  --crimline: #7a3a30;
  --crimtxt: #ff9a8d;
  --azure: #4aa3e0;
  --azline: #2c5878;
  --aztxt: #8fc6ee;
  --good: #46d183;
  --warn: #e6902e;
  --purple: #c98bff;
  --energy: #ffd66b;
  --fury: #ff7b6b;
  --calm: #7bd88f;
  --mind: #6bb7ff;
  --body: #ffab5e;
  --chaos: #c98bff;
  --order: #ffe95e;
}

html, body { height: 100%; }
body {
  background: radial-gradient(1100px 600px at 50% 42%, var(--bg2) 0%, var(--bg1) 55%, var(--bg0) 100%) fixed, var(--bg0);
  color: var(--text);
  font-family: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  overflow: hidden;
}

body, #app, dialog {
  user-select: none; -webkit-user-select: none;
}
img, .dragghost, #bbghost { -webkit-user-drag: none; user-drag: none; }

input, textarea, select, [contenteditable="true"],
.selectable,
#selpanel .selname, #selpanel .seltext, #selpanel .selmeta, #selpanel .selstatus,
.pcol .pname, .pcol .ptext,
#log .entry {
  user-select: text; -webkit-user-select: text;
}
.selectable, #selpanel .selname, #selpanel .seltext, #selpanel .selmeta, #selpanel .selstatus,
.pcol .pname, .pcol .ptext, #log .entry {
  cursor: text;
}
.bbleft, .bbleft * { user-select: text; -webkit-user-select: text; cursor: text; }
.bbleft .bbart, .bbleft .bbart *, .bbleft button, .bbleft .btn, .bbleft .bbchip.clicky {
  user-select: none; -webkit-user-select: none; cursor: pointer;
}
#log .entry .rref, .selectable .rref { cursor: pointer; }
::selection { background: rgba(240, 196, 106, 0.32); color: var(--text); }

body.dragsel, body.dragsel * { user-select: none !important; -webkit-user-select: none !important; }

.disp { font-family: Cinzel, Georgia, serif; }
.label { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--dim); }
.zlabel { font-size: 8px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--faint); }

#app { display: flex; flex-direction: column; height: 100vh; min-width: 1180px; }
#app.railopen { padding-left: 256px; min-width: 1436px; }

#siderail {
  position: fixed; left: 12px; top: 12px; bottom: 12px; width: 244px; z-index: 36;
  display: flex; flex-direction: column; gap: 6px;
}
.railhead {
  display: flex; align-items: center; gap: 8px; flex: 0 0 auto;
  border-radius: 10px; background: var(--panel); border: 1px solid var(--line2);
  padding: 5px 6px 5px 10px;
}
.railhead h4 {
  flex: 1; font-size: 9px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
}
.railhead .closex {
  width: 20px; height: 20px; padding: 0; border-radius: 6px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.railhead .closex:hover { background: var(--crimson); color: #fff; border-color: var(--crimson); }
#topbar button.on { border-color: var(--gold); color: var(--gold); }

button, .btn {
  background: var(--panel2); color: var(--dim); border: 1px solid var(--line);
  border-radius: 8px; padding: 5px 12px; cursor: pointer; font-size: 11px;
  font-family: inherit; letter-spacing: 1px; white-space: nowrap;
}
button:hover, .btn:hover { border-color: var(--gold); color: var(--text); }
.btn.primary {
  font-family: Cinzel, Georgia, serif; font-weight: 700; letter-spacing: 2px;
  background: linear-gradient(180deg, var(--gold), var(--gold2)); color: #231502;
  border-color: var(--goldline); box-shadow: 0 0 14px rgba(240, 196, 106, 0.3);
}
.btn.primary:hover { color: #000; }
.btn.danger { border-color: var(--crimline); color: var(--crimtxt); }

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px;
  border-radius: 999px; background: var(--panel2); border: 1px solid var(--line);
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.chip.clicky { cursor: pointer; }
.chip.clicky:hover { border-color: var(--gold); }
.res.energy { color: var(--energy); border-color: #5a4a1c; }
.res.any { color: #fff; border-color: #4a5a74; }
.res.fury { color: var(--fury); border-color: #5a2c26; }
.res.calm { color: var(--calm); border-color: #2c4a3a; }
.res.mind { color: var(--mind); border-color: #26405a; }
.res.body { color: var(--body); border-color: #5a3e1c; }
.res.chaos { color: var(--chaos); border-color: #46305a; }
.res.order { color: var(--order); border-color: #5a531c; }

#topbar {
  position: absolute; top: 8px; right: 12px; z-index: 40;
  display: flex; gap: 5px; align-items: center;
}
#topbar button { padding: 4px 9px; font-size: 10px; background: rgba(10, 16, 28, 0.92); }
#topbar .seatchip {
  padding: 4px 9px; font-size: 10px; letter-spacing: 1px; border-radius: 8px;
  background: rgba(10, 16, 28, 0.92); border: 1px solid var(--crimline); color: var(--crimtxt);
}
#topbar .seatchip.vs { border-color: var(--azline); color: var(--aztxt); }

.strip.atbot { margin: 0 14px 9px 14px; }
.strip.opp {
  border: 1px solid var(--azline);
  background: linear-gradient(180deg, rgba(21, 42, 64, 0.85), rgba(10, 20, 34, 0.9));
  box-shadow: inset 0 -26px 50px rgba(74, 163, 224, 0.08), 0 8px 22px rgba(0, 0, 0, 0.5);
}
.strip.mine {
  border: 1px solid var(--crimline);
  background: linear-gradient(0deg, rgba(64, 25, 20, 0.7), rgba(24, 10, 10, 0.85));
  box-shadow: inset 0 26px 50px rgba(228, 87, 74, 0.08), 0 8px 22px rgba(0, 0, 0, 0.5);
}.strip .basetab {
  position: absolute; left: 50%; transform: translateX(-50%); z-index: 2;
  border-radius: 0 0 10px 10px; padding: 1px 20px; font-size: 9px;
  letter-spacing: 2px; text-transform: uppercase;
}
.strip.opp .basetab { top: -1px; background: linear-gradient(180deg, #1d3350, #0d1a2e); border: 1px solid var(--azure); border-top: none; color: var(--aztxt); }
.strip.mine .basetab { bottom: -1px; top: auto; border-radius: 10px 10px 0 0; background: linear-gradient(0deg, #45201a, #200d0a); border: 1px solid var(--crimson); border-bottom: none; color: var(--crimtxt); }
.strip.attop .basetab { top: -1px; bottom: auto; border-radius: 0 0 10px 10px; border-top: none; border-bottom-width: 1px; border-bottom-style: solid; }
.strip.atbot .basetab { bottom: -1px; top: auto; border-radius: 10px 10px 0 0; border-bottom: none; border-top-width: 1px; border-top-style: solid; }
.strip .vdiv { width: 1px; align-self: stretch; background: linear-gradient(180deg, rgba(147, 164, 192, 0), rgba(147, 164, 192, 0.35), rgba(147, 164, 192, 0)); flex: 0 0 auto; }
.strip .units { flex: 1; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; min-height: 100px; padding: 6px 0; }
.strip.highlight { outline: 2px solid var(--good); outline-offset: -2px; }
.strip.clickable-loc { cursor: pointer; }.pid .face { width: 52px; height: 52px; border-radius: 9px; border: 1px solid var(--line); background-size: auto 290%; background-position: 50% 24%; background-color: #16213a; flex: 0 0 auto; }
.pid.az .face { border-color: #3b5a7a; box-shadow: 0 0 12px rgba(74, 163, 224, 0.35); }
.pid.cr .face { border-color: #7a4a3a; box-shadow: 0 0 12px rgba(228, 87, 74, 0.35); }
.pid .pname { font-family: Cinzel, Georgia, serif; font-size: 14px; font-weight: 600; }
.pid.az .pname { color: #9fd0f5; }
.pid.cr .pname { color: var(--crimtxt); }

.crystal {
  width: 36px; height: 42px; flex: 0 0 auto;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  display: flex; align-items: center; justify-content: center;
}
.crystal span { font-family: Cinzel, Georgia, serif; font-size: 15px; font-weight: 700; }
.crystal.az { background: linear-gradient(200deg, #1d3350, #0d1a2e); border: 1px solid var(--azure); }
.crystal.az span { color: #bfe0fa; }
.crystal.cr { background: linear-gradient(200deg, #45201a, #200d0a); border: 1px solid var(--crimson); }
.crystal.cr span { color: #ffc9c2; }
.crystal.win { background: linear-gradient(200deg, #4a3a10, #241a06); border: 2px solid var(--gold); box-shadow: 0 0 18px rgba(240, 196, 106, 0.5); }
.crystal.win span { color: #ffe9c2; }

.card.uplate {
  display: block; width: 64px; height: 90px; border-radius: 8px; flex: 0 0 auto;
  background-size: cover; background-position: center; background-color: #1a2438;
  border: 1px solid #3b4d70; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.55);
  cursor: pointer; position: relative; user-select: none; transition: transform 0.12s ease;
}
.card.uplate:hover { border-color: var(--gold); transform: translateY(-3px); z-index: 4; }
.uplate.exhausted { opacity: 0.6; transform: rotate(6deg); }
.uplate.exhausted:hover { transform: rotate(6deg) translateY(-3px); }
.uplate.champ { border-color: var(--gold); box-shadow: 0 0 12px rgba(240, 196, 106, 0.3), 0 6px 14px rgba(0, 0, 0, 0.55); }

.mv {
  position: absolute; right: -7px; bottom: -7px; width: 22px; height: 22px;
  border-radius: 50%; background: linear-gradient(180deg, var(--gold), #b9812f);
  color: #1c1204; font-weight: 800; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--goldline); z-index: 2;
}
.badges { position: absolute; top: -8px; right: -4px; display: flex; gap: 3px; z-index: 3; }
.badge { border-radius: 999px; font-size: 9px; font-weight: 800; padding: 0 6px; background: var(--gold); color: #201607; border: 1px solid var(--goldline); }
.badge.buff { background: var(--good); color: #0c2a18; border-color: #2c5a40; }
.badge.stun { background: #b78bff; color: #241540; border-color: #5e3f96; }
.badge.emp { background: #ffb347; color: #3a2200; border-color: #a06414; }
.badge.dmg { background: #ff5d4d; color: #fff; border-color: #7a2018; }
.badge.atk { background: #45201a; color: var(--crimtxt); border-color: var(--crimline); }
.badge.def { background: #123048; color: var(--aztxt); border-color: var(--azline); }

.card.selected { outline: 2px solid var(--gold); outline-offset: 1px; }
.card.candidate { outline: 2px solid var(--good); outline-offset: 1px; box-shadow: 0 0 10px rgba(70, 209, 131, 0.5); }
.card.picked { outline: 2px solid var(--warn); outline-offset: 1px; }
.card.illegal { opacity: 0.4; }.rune {
  width: 26px; height: 36px; border-radius: 5px; border: 1px solid var(--line);
  background-size: auto 192%; background-position: 50% 17%; background-color: #1a2438;
  cursor: pointer; flex: 0 0 auto; position: relative;
}
.rune.exhausted { transform: rotate(8deg); opacity: 0.5; }
.rune.selected { outline: 2px solid var(--gold); }
.runesplit { width: 1px; height: 30px; background: var(--line2); margin: 0 3px; }

.cardback {
  background: linear-gradient(155deg, #16203a 0%, #0b1120 55%, #131b30 100%);
  border: 1px solid #3a4c72;
  box-shadow: inset 0 0 0 2px rgba(240, 196, 106, 0.16), inset 0 0 20px rgba(8, 12, 24, 0.9), 0 5px 12px rgba(0, 0, 0, 0.55);
  display: flex; align-items: center; justify-content: center; position: relative;
}

#bfarea { flex: 1 1 auto; display: flex; gap: 12px; padding: 15px 14px 6px 14px; align-items: stretch; position: relative; min-height: 0; }

#phaseribbon {
  position: absolute; left: 50%; top: -13px; transform: translateX(-50%); z-index: 8;
  pointer-events: none; text-align: center;
  background: linear-gradient(180deg, #1b2740, #0e1626);
  box-shadow: 0 0 0 1px var(--line), 0 0 22px rgba(240, 196, 106, 0.14);
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%);
  padding: 4px 24px;
}
#phaseribbon .ph { font-family: Cinzel, Georgia, serif; font-size: 13px; font-weight: 700; letter-spacing: 2.5px; color: var(--gold); }
#phaseribbon .sub { font-size: 8px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--dim); }.battlefield.ctl0 { border-color: var(--crimline); box-shadow: 0 0 0 1px rgba(228, 87, 74, 0.25), 0 0 28px rgba(228, 87, 74, 0.13), 0 12px 26px rgba(0, 0, 0, 0.5); }
.battlefield.ctl1 { border-color: var(--azline); box-shadow: 0 0 0 1px rgba(74, 163, 224, 0.25), 0 0 28px rgba(74, 163, 224, 0.12), 0 12px 26px rgba(0, 0, 0, 0.5); }
.battlefield.contested { border-color: var(--warn); }
.battlefield.showdown { border: 2px solid var(--warn); box-shadow: 0 0 0 1px rgba(230, 144, 46, 0.35), 0 0 36px rgba(230, 144, 46, 0.25); }
.battlefield.combat { border: 2px solid var(--crimson); box-shadow: 0 0 0 1px rgba(228, 87, 74, 0.4), 0 0 40px rgba(228, 87, 74, 0.3); }
.battlefield.highlight { outline: 2px solid var(--good); outline-offset: -2px; cursor: pointer; }
.battlefield.clickable-loc { cursor: pointer; }.bfart .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 10, 18, 0.25) 0%, rgba(11, 18, 32, 0.92) 100%); }
.bfart .bfname { position: absolute; left: 10px; bottom: 16px; font-family: Cinzel, Georgia, serif; font-size: 13px; font-weight: 600; color: #f0e6e2; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9); }
.bfart .bftext { position: absolute; left: 10px; bottom: 3px; right: 96px; font-size: 8px; letter-spacing: 1.2px; text-transform: uppercase; color: #b9a8a2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bfart .bfchips { position: absolute; right: 8px; top: 5px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.bfart .chip { font-size: 9px; padding: 1px 8px; }.bfrow { flex: 1; border-radius: 9px; display: flex; align-items: center; gap: 9px; padding: 8px 10px; flex-wrap: nowrap; overflow: hidden; min-height: 106px; scrollbar-width: none; }
.bfrow::-webkit-scrollbar { display: none; }
.bfrow > * { flex: 0 0 auto; }
.bfrow.crowd1 { gap: 0; }
.bfrow.crowd1 > * + * { margin-left: -14px; }
.bfrow.crowd2 > * + * { margin-left: -30px; }
.bfrow.crowd3 > * + * { margin-left: -42px; }
.bfrow[class*="crowd"] > *:hover { z-index: 3; }
.bfrow.s0 { background: rgba(228, 87, 74, 0.08); border: 1px solid rgba(228, 87, 74, 0.26); }
.bfrow.s1 { background: rgba(74, 163, 224, 0.09); border: 1px solid rgba(74, 163, 224, 0.28); }
.bfrow.empty0 { background: rgba(228, 87, 74, 0.04); border: 1px dashed rgba(228, 87, 74, 0.2); }
.bfrow.empty1 { background: rgba(74, 163, 224, 0.05); border: 1px dashed rgba(74, 163, 224, 0.22); }
.bffdrow.theirsfdrow { bottom: auto; top: 10px; }
.bffd.theirsfd .cardback { opacity: .8; }
.bffd .cardback { width: 34px; height: 48px; border-radius: 5px; border-style: dashed; border-color: var(--goldline); cursor: pointer; }

#chainrail {
  position: absolute; right: 14px; top: 40px; width: 250px; z-index: 6;
  max-height: calc(100% - 52px);
  border-radius: 14px; background: rgba(10, 15, 26, 0.94); border: 1px solid var(--goldline);
  box-shadow: 0 0 26px rgba(240, 196, 106, 0.12), 0 14px 30px rgba(0, 0, 0, 0.6);
  padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto;
}
#chainrail h3 { font-family: Cinzel, Georgia, serif; font-size: 13px; letter-spacing: 2px; color: var(--gold); font-weight: 600; }
.chainitem { border-radius: 9px; border: 1px solid var(--line); background: var(--panel2); padding: 6px 9px; display: flex; gap: 8px; align-items: center; }
.chainitem.top { border-color: var(--goldline); background: linear-gradient(160deg, rgba(45, 35, 16, 0.55), rgba(20, 16, 8, 0.55)); }
.chainitem .thumb { width: 34px; height: 48px; border-radius: 4px; background-size: cover; background-position: center; background-color: #1a2438; border: 1px solid var(--line); flex: 0 0 auto; }
.chainitem .cl { min-width: 0; }
.chainitem .cn { font-size: 11px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chainitem .cs { font-size: 8px; letter-spacing: 1px; text-transform: uppercase; }

#promptbar {
  flex: 0 0 auto; margin: 0 14px 6px 14px; border-radius: 12px;
  position: relative; z-index: 20;
  background: var(--panel); border: 1px solid var(--goldline);
  box-shadow: 0 0 0 1px rgba(240, 196, 106, 0.18), 0 0 20px rgba(240, 196, 106, 0.08);
  padding: 7px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  min-height: 40px;
}
#promptbar h3 { font-family: Cinzel, Georgia, serif; font-size: 13px; font-weight: 600; letter-spacing: 1.5px; color: var(--gold); }
#promptbar .note { color: var(--dim); font-size: 12px; white-space: pre-wrap; max-width: 640px; }
#promptbar .error { color: #ff6b6b; font-size: 12px; font-weight: 700; }
#promptbar .actions { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.assign {
  display: flex; flex-direction: column; gap: 5px;
  flex: 0 0 auto; width: 660px; max-width: 100%;
}
.payauto { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex-wrap: wrap; }
.payauto .note { color: var(--dim); }
.paypanel {
  display: flex; flex-direction: column; gap: 6px;
  flex: 0 0 auto; min-width: 430px; max-width: 100%;
}
.payhead { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.payhead h3 { flex: 0 0 auto; }
.paywhat {
  font-size: 12px; color: #d6dceb; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.payrow { display: flex; align-items: center; gap: 9px; min-height: 24px; }
.paylabel {
  flex: 0 0 34px; font-size: 8px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--faint); text-align: right;
}
.paychips { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; min-width: 0; }
.paychips.empty { opacity: .7; }
.paystatus {
  display: flex; align-items: baseline; gap: 7px; font-size: 12px;
  padding: 5px 9px; border-radius: 8px; line-height: 1.35;
  background: var(--panel2); border: 1px solid var(--line);
}
.paystatus .paydot {
  flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%;
  align-self: center; background: var(--dim);
}
.paystatus.ok { border-color: rgba(70, 209, 131, .4); color: #bfe9d1; }
.paystatus.ok .paydot { background: var(--good); }
.paystatus.warn { border-color: var(--goldline); color: #f0e2c2; }
.paystatus.warn .paydot { background: var(--gold); }
.paystatus.bad { border-color: var(--crimline); color: var(--crimtxt); }
.paystatus.bad .paydot { background: var(--crimson); }
.paypanel .note { font-size: 11px; color: var(--faint); }
.chip.res.unfilled {
  color: var(--faint); border-style: dashed; border-color: var(--line);
  background: transparent; opacity: .82;
}
.chip.res.unfilled .pooltoken { filter: grayscale(1) brightness(.55); }
.chip.res.filled { box-shadow: inset 0 0 0 1px rgba(70, 209, 131, .35); }
.chip.res .slotglyph { display: inline-flex; align-items: center; }
.payrow.sources { align-items: flex-start; }
.payrow.sources .paylabel { padding-top: 6px; }
.paysrcs {
  display: flex; align-items: flex-start; gap: 7px; flex-wrap: wrap;
  min-width: 0; max-height: 214px; overflow-y: auto; padding: 1px;
}
.paysrc {
  display: flex; flex-direction: column; align-items: center; gap: 4px; width: 72px;
  padding: 6px 5px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line);
}
.paysrc.on { border-color: var(--goldline); background: rgba(240, 196, 106, .07); }
.paysrc.spent .paysrcart { opacity: .5; transform: rotate(8deg); }
.paysrcart {
  width: 38px; height: 52px; border-radius: 6px; border: 1px solid var(--line);
  background-color: #1a2438; background-size: auto 192%; background-position: 50% 17%;
  flex: 0 0 auto;
}
.paysrc.legend .paysrcart {
  border-color: var(--goldline); background-size: cover; background-position: center;
}
.paysrcfoot { display: flex; align-items: center; gap: 4px; min-width: 0; }
.paysrcdom {
  font-size: 8px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.paysrcpills { display: flex; flex-direction: column; gap: 3px; align-self: stretch; }
.paypill {
  font: inherit; font-size: 9px; font-weight: 700; letter-spacing: .3px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 3px;
  padding: 3px 5px; border-radius: 6px; color: var(--dim);
  background: transparent; border: 1px solid var(--line);
}
.paypill svg { flex: 0 0 auto; }
.paypill .pilltxt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paypill:hover { border-color: var(--gold); color: #f0e2c2; }
.paypill.on { color: #08131f; border-color: transparent; }
.paypill.exhaustRune.on { background: var(--energy); }
.paypill.recycleRune.on { background: var(--good); }
.paypill.legend.on { background: var(--gold); }
.paypill.on svg { fill: #08131f; }
.payactions {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
  margin-top: 2px; padding-top: 7px; border-top: 1px solid var(--line);
}
.payactions .btn.ghost { margin-left: auto; border-color: transparent; color: var(--faint); }
.payactions .btn.ghost:hover { border-color: var(--line); color: var(--dim); }
.paypick { outline: 2px dashed rgba(240, 196, 106, .55); outline-offset: 1px; }
.paystaged { outline: 2px solid var(--gold); box-shadow: 0 0 11px rgba(240, 196, 106, .45); }
.payex { box-shadow: 0 0 11px rgba(255, 214, 107, .55); }
.payrec { outline-color: var(--good); box-shadow: 0 0 11px rgba(70, 209, 131, .5); }
.payex.payrec { outline-color: var(--good); box-shadow: 0 0 11px rgba(255, 214, 107, .55), 0 0 16px rgba(70, 209, 131, .5); }
.runedeckpile { cursor: pointer; }
.runedeckpile:hover .rdcard { border-color: var(--gold); }
.ahead { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ahead h3 { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apool { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; margin-left: auto; }
.atok {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 34% 30%, #ff8b7e, #b73628); border: 1px solid #7a2018;
}
.atok.spent { background: #24303f; border-color: var(--line); }
.acount {
  font-family: Cinzel, Georgia, serif; font-weight: 700; color: var(--gold); margin-left: 6px;
  min-width: 6.2em; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.acount.full { color: var(--good); }

.arow {
  display: flex; align-items: center; gap: 8px;
  border-radius: 10px; padding: 5px 8px;
  background: rgba(10, 16, 28, 0.55); border: 1px solid var(--line2);
}
.arow.tank { background: rgba(228, 87, 74, 0.12); border-color: var(--crimline); }
.arow.part { background: rgba(240, 196, 106, 0.1); border-color: var(--goldline); box-shadow: 0 0 16px rgba(240, 196, 106, 0.12); }
.arow.done { background: rgba(228, 87, 74, 0.13); border-color: rgba(228, 87, 74, 0.42); }
.arow.locked {
  border-style: dashed; border-color: var(--line);
  background: repeating-linear-gradient(135deg, rgba(19, 28, 44, 0.55) 0 9px, rgba(11, 17, 32, 0.55) 9px 18px);
}
.arow.locked .asp { filter: saturate(0.2); opacity: 0.55; }
.arow.locked .anm { opacity: 0.6; }
.arow.locked .adots { opacity: 0.3; }

.asp {
  width: 40px; height: 40px; border-radius: 7px; flex: none; position: relative;
  border: 1px solid #3b4d70; background-color: #131c2c; cursor: pointer;
}
.arow.tank .asp, .arow.done .asp { border-color: var(--crimson); }
.arow.part .asp { border-color: var(--gold); }
.asp .mv {
  position: absolute; right: -6px; bottom: -6px; width: 19px; height: 19px; border-radius: 50%;
  background: linear-gradient(180deg, var(--gold), #b9812f); color: #1c1204;
  font-weight: 800; font-size: 10px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--goldline);
}

.anm { width: 158px; flex: none; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.anm .n { font-size: 12px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.anm .tag {
  align-self: flex-start; font-size: 8px; font-weight: 800; letter-spacing: 1.3px;
  padding: 1px 7px; border-radius: 999px;
}
.anm .tag.tank { background: #45201a; color: var(--crimtxt); border: 1px solid var(--crimline); }
.anm .tag.back { background: #1a2336; color: #6c7f9d; border: 1px solid var(--line); }

.adots {
  display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; overflow: hidden;
  flex: 1 1 0; min-width: 0; height: 22px;
}
.adots.num {
  font-family: Cinzel, Georgia, serif; font-weight: 700; color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.adot { width: 15px; height: 15px; border-radius: 50%; flex: none; border: 1.5px dashed #3b4d70; }
.adot.hit {
  border: 1px solid #7a2018; background: radial-gradient(circle at 34% 30%, #ff8b7e, #b73628);
  box-shadow: 0 0 7px rgba(228, 87, 74, 0.5);
}
.adot.old { border: 1px solid #6b2a20; background: #4a1d16; }
.adot.over { border: 1px solid var(--goldline); background: radial-gradient(circle at 34% 30%, #ffd98b, #b9812f); }
.asplit { width: 1px; height: 15px; background: #3b4d70; flex: none; }

.aval, .alock {
  width: 26px; height: 22px; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.aval { font-family: Cinzel, Georgia, serif; font-size: 17px; font-weight: 700; color: #ffc9c2; font-variant-numeric: tabular-nums; }
.arow.part .aval { color: var(--gold); }
.alock { color: var(--faint); }

.astep {
  width: 28px; height: 28px; flex: none; border-radius: 7px; cursor: pointer;
  background: rgba(20, 29, 46, 0.9); border: 1px solid var(--line); color: var(--gold);
  font-family: inherit; font-size: 14px; font-weight: 800; line-height: 1;
}
.astep:hover:not(:disabled) { border-color: var(--goldline); background: rgba(45, 35, 16, 0.6); }
.astep:disabled { opacity: 0.22; cursor: default; color: var(--dim); }

.aerr {
  color: #ff6b6b; font-size: 12px; font-weight: 700; line-height: 15px;
  min-height: 15px; overflow: hidden;
}

.station {
  flex: 0 0 auto; display: flex; align-items: stretch; gap: 14px;
  padding: 12px 18px; height: 146px; position: relative;
}
.station.top { align-items: flex-start; }
.station.bot { align-items: flex-end; }
.stgroup { display: flex; align-items: inherit; gap: 14px; flex: 0 0 auto; }
.station.cr { background: linear-gradient(0deg, rgba(64, 25, 20, 0.32), rgba(6, 10, 18, 0)); }
.station.az { background: linear-gradient(180deg, rgba(21, 42, 64, 0.32), rgba(6, 10, 18, 0)); }
.station.bot.az { background: linear-gradient(0deg, rgba(21, 42, 64, 0.32), rgba(6, 10, 18, 0)); }
.station.top.cr { background: linear-gradient(180deg, rgba(64, 25, 20, 0.32), rgba(6, 10, 18, 0)); }

.bigslot { position: relative; flex: 0 0 auto; }
.bigcard {
  width: 78px; height: 109px; border-radius: 9px; border: 1px solid #3b4d70;
  background-size: cover; background-position: center; background-color: #16213a;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.6); cursor: pointer; position: relative;
}
.bigcard.gold { border-color: var(--goldline); box-shadow: 0 0 16px rgba(240, 196, 106, 0.25), 0 10px 22px rgba(0, 0, 0, 0.6); }
.bigcard.dashed { border: 1px dashed var(--line); background: rgba(16, 24, 40, 0.5); box-shadow: none; display: flex; align-items: center; justify-content: center; text-align: center; padding: 6px; }

.pilestack { width: 78px; height: 109px; position: relative; }
.pilestack.clicky { cursor: pointer; }
.pilecard {
  position: absolute; left: 0; top: 0; right: 0; bottom: 0; border-radius: 9px;
  border: 1px solid #3b4d70; background-size: cover; background-position: center;
  background-color: #16213a;
}
.pilecard.topcard { box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6); }
.pilestack.clicky:hover .topcard { border-color: var(--gold); }
.pilecard.undercard { background: #101827; opacity: 0.85; }
.pilecard.emptypile {
  border: 1px dashed var(--line2); background: rgba(10, 16, 28, 0.45);
  display: flex; align-items: center; justify-content: center; box-shadow: none;
}

.slotplate {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: -8px; z-index: 2;
  border-radius: 999px; font-size: 8px; font-weight: 800; letter-spacing: 1.3px;
  padding: 1px 9px; white-space: nowrap; border: 1px solid var(--line);
  background: #131b30; color: var(--dim);
}
.station.top .slotplate { top: -8px; bottom: auto; }
.slotplate.ready { background: #123020; color: var(--good); border-color: #2c5a40; }
.slotplate.used { background: #2a3346; color: var(--dim); border-color: #3b4d70; }
.slotplate.play { background: #45201a; color: var(--crimtxt); border-color: var(--crimline); }

.handfan {
  flex: 1; display: flex; align-items: inherit; justify-content: center;
  position: relative; overflow: visible; min-width: 0;
}
.handfan .fan { display: flex; align-items: inherit; }
.handfan .handplate { left: 50%; }
.station.bot .handfan .handplate { bottom: -8px; }
.card.hcard {
  width: 86px; height: 120px; border-radius: 9px; border: 1px solid #3b4d70;
  background-size: cover; background-position: center; background-color: #1c2740;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6); cursor: pointer; position: relative;
  flex: 0 0 auto; transition: transform 0.12s ease;
}
.handfan .card.hcard { margin-left: -20px; }
.handfan .card.hcard:first-child { margin-left: 0; }
.card.hcard:hover { transform: translateY(-14px); z-index: 5; }
.station.top .card.hcard:hover { transform: translateY(14px); }
.hback {
  width: 60px; height: 84px; border-radius: 7px; flex: 0 0 auto; margin-left: -24px;
}
.hback:first-child { margin-left: 0; }
.hcard .hname {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 5px;
  background: linear-gradient(0deg, rgba(5, 8, 15, 0.92), rgba(5, 8, 15, 0));
  font-size: 9px; font-weight: 700; border-radius: 0 0 8px 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card.fullcard {
  width: 200px; height: 280px; border-radius: 12px; border: 1px solid #3b4d70;
  background-size: cover; background-position: center; background-color: #1c2740;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6); cursor: pointer; position: relative;
  flex: 0 0 auto;
}
.fullcard .hname {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 8px;
  background: linear-gradient(0deg, rgba(5, 8, 15, 0.92), rgba(5, 8, 15, 0));
  font-size: 12px; font-weight: 700; border-radius: 0 0 11px 11px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fullcard .hcost { position: absolute; left: -6px; top: -6px; z-index: 2; width: 24px; height: 24px; border-radius: 50%; background: #10203a; border: 1px solid var(--mind); color: #9ecbff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.hcard .hcost { position: absolute; left: -5px; top: -5px; z-index: 2; width: 19px; height: 19px; border-radius: 50%; background: #10203a; border: 1px solid var(--mind); color: #9ecbff; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; }

#log {
  border-radius: 10px; background: rgba(10, 15, 26, 0.94); border: 1px solid var(--line2);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6);
  padding: 6px 10px; font-size: 11px; overflow-y: auto; flex: 1 1 auto; min-height: 0;
}
#log .entry { margin-bottom: 1px; color: var(--faint); line-height: 1.4; }
#log .entry.recent { color: #b9c8de; }
#manualpanel { border-radius: 10px; background: rgba(10, 15, 26, 0.94); border: 1px solid var(--line2); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6); flex: 0 0 auto; }
#manualpanel summary { padding: 4px 10px; cursor: pointer; color: var(--faint); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; }
#manualpanel .mbody { padding: 5px 8px; display: flex; flex-wrap: wrap; gap: 3px; max-height: 150px; overflow-y: auto; }
#manualpanel button { font-size: 9px; padding: 2px 6px; }
#manualpanel select { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 2px 4px; font-size: 10px; }

#selpanel {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 400px; z-index: 30;
  border-radius: 14px; background: rgba(10, 15, 26, 0.97); border: 1px solid var(--goldline);
  box-shadow: 0 0 0 1px rgba(240, 196, 106, .12), 0 18px 44px rgba(0, 0, 0, 0.72); padding: 12px 14px;
  max-height: calc(100vh - 40px); overflow-y: auto;
}#selpanel img { width: 100%; border-radius: 12px; margin-bottom: 8px; display: block; box-shadow: 0 10px 24px rgba(0, 0, 0, .6); }
#selpanel .seltext { font-size: 13px; color: #d6dceb; white-space: pre-wrap; margin-bottom: 8px; line-height: 1.5; }
#selpanel .actions { display: flex; flex-wrap: wrap; gap: 4px; }
#selpanel .closex {
  position: absolute; right: 7px; top: 7px; width: 24px; height: 24px; padding: 0;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: rgba(228, 87, 74, 0.16); border: 1px solid var(--crimline);
  color: var(--crimtxt); z-index: 2;
}
#selpanel .closex:hover { background: var(--crimson); color: #fff; border-color: var(--crimson); }
#selpanel .selname { font-family: Cinzel, Georgia, serif; font-size: 16px; font-weight: 600; color: var(--gold); margin-bottom: 5px; padding-right: 30px; }
#selpanel .note { font-size: 10px; color: var(--faint); margin-bottom: 6px; }

#replaybar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 5px 18px;
  background: rgba(8, 12, 20, 0.92); border-top: 1px solid var(--line2);
}
#replaybar input[type=range] { flex: 1; accent-color: var(--gold); }
#replaybar .stat { color: var(--dim); font-size: 11px; font-weight: 700; }
#replaybar .viewing { color: var(--warn); font-weight: 700; font-size: 11px; }
#replaybar button { padding: 2px 9px; font-size: 10px; }

dialog {
  background: #0d1524; color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; padding: 18px; max-width: 720px;
}
dialog::backdrop { background: rgba(0, 0, 0, 0.7); }
dialog h3 { font-family: Cinzel, Georgia, serif; letter-spacing: 1.5px; color: var(--gold); font-weight: 600; }
dialog .note { color: var(--dim); font-size: 12px; margin-top: 4px; }
dialog .cardrow { display: flex; flex-wrap: wrap; gap: 8px; max-height: 60vh; overflow-y: auto; }
dialog .actions { display: flex; gap: 8px; }
dialog textarea { font-family: Consolas, monospace; font-size: 11px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }

.gameover {
  font-family: Cinzel, Georgia, serif; font-size: 15px; font-weight: 700;
  letter-spacing: 2px; color: var(--gold);
}

.aichip {
  display: inline-block; font-size: 8px; font-weight: 800; letter-spacing: 1px;
  color: #0b0f18; background: var(--gold); border-radius: 3px; padding: 1px 4px;
  vertical-align: 2px; margin-left: 4px;
}

#menuscreen, #builderscreen, #homescreen, #onlinescreen, #lobbyscreen {
  flex: 1; min-height: 0; position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  background:
    radial-gradient(820px 480px at 10% 104%, rgba(228, 87, 74, .16), transparent 64%),
    radial-gradient(700px 420px at 96% -6%, rgba(240, 196, 106, .11), transparent 62%),
    radial-gradient(1300px 760px at 50% 42%, #111c31 0%, #0a101d 54%, #05080f 100%);
}
.msweave {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: repeating-linear-gradient(114deg, rgba(255, 255, 255, .02) 0 1px, transparent 1px 5px);
}
.msbev { clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px)); }.mspane { background: linear-gradient(158deg, #38496a 0%, #16223a 46%, #24334e 100%); padding: 1px; min-height: 0; }
.mspanein {
  background: linear-gradient(178deg, rgba(15, 24, 41, .93), rgba(7, 12, 21, .95));
  width: 100%; height: 100%; display: flex; flex-direction: column; min-height: 0;
}
.mslbl { font-size: 9px; letter-spacing: 2.2px; text-transform: uppercase; color: var(--dim); font-weight: 700; }
.msnum { font-family: Consolas, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; }

.mstop { position: relative; display: flex; align-items: center; gap: 16px; height: 64px; flex: 0 0 auto; padding: 0 18px; }
.mstop::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(102deg, rgba(228, 87, 74, .14) 0 16%, transparent 30%, rgba(240, 196, 106, .09) 62%, transparent 78%);
}
.mshair {
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, rgba(240, 196, 106, .75), rgba(228, 87, 74, .35) 34%, rgba(42, 58, 87, .5) 70%, transparent);
}
.msbrand { position: relative; display: flex; flex-direction: column; gap: 3px; }
.msbrand h1 {
  font-family: Cinzel, Georgia, serif; font-size: 23px; font-weight: 700; letter-spacing: 7px;
  color: var(--gold); text-shadow: 0 0 26px rgba(240, 196, 106, .35); margin: 0;
}
.mstopacts { position: relative; margin-left: auto; display: flex; align-items: center; gap: 10px; }

.mscnt {
  position: relative; display: flex; align-items: baseline; gap: 8px; height: 32px; padding: 0 14px 0 12px;
  background: linear-gradient(90deg, rgba(16, 26, 46, .95), rgba(10, 16, 28, .75));
  border-left: 2px solid var(--gold); transform: skewX(-14deg); flex: 0 0 auto;
}
.mscnt > * { transform: skewX(14deg); }
.mscnt.warn { border-left-color: var(--crimson); }
.mscntn { font-size: 15px; font-weight: 800; color: var(--text); }
.mscntn i { font-style: normal; font-size: 11px; color: var(--faint); }
.mscntn.bad { color: var(--crimtxt); }

.msrib {
  position: relative; display: flex; align-items: center; gap: 9px;
  min-height: 28px; padding: 3px 12px 3px 13px; flex: 0 0 auto; overflow: visible;
}
.msrib > * { position: relative; }
.msribt { font-family: Cinzel, Georgia, serif; font-size: 12px; font-weight: 700; letter-spacing: 3px; color: #f4d391; line-height: 1.5; overflow: visible; }
.msribn { margin-left: auto; }
.msrib.bbrib {
  min-height: 32px; padding: 4px 13px 4px 14px; margin-bottom: 1px;
  border-left: 3px solid var(--gold);
  background: linear-gradient(90deg, rgba(240, 196, 106, .18), rgba(240, 196, 106, .04) 44%, transparent 82%);
  box-shadow: inset 0 -1px 0 rgba(240, 196, 106, .16);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}
.msrib.bbrib .msribt {
  font-size: 15px; letter-spacing: 4.4px; color: var(--gold);
  text-shadow: 0 0 16px rgba(240, 196, 106, .4);
}
.msrib.bbrib .msribn {
  font-family: Consolas, "SF Mono", Menlo, monospace; font-size: 12px; font-weight: 800;
  letter-spacing: 1.6px; color: #e8eef9; text-transform: none;
}

.msbody { display: flex; flex: 1; min-height: 0; gap: 12px; padding: 12px 18px 18px; align-items: stretch; }
.mslist { flex: 1; min-width: 0; }
.mslistin { padding: 14px; gap: 12px; }
.msgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 12px; flex: 1; min-height: 0; overflow-y: auto; align-content: start; padding-right: 2px;
}
.msdeck {
  position: relative; overflow: hidden; height: 214px; padding: 15px 17px; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px; text-align: left;
  border: 1px solid #22304a; background: linear-gradient(90deg, rgba(12, 19, 33, .9), rgba(8, 13, 23, .7));
}
.msdeck:hover { border-color: #3b5170; }
.msdeck.on { border-color: var(--goldline); box-shadow: 0 0 0 1px rgba(240, 196, 106, .45), 0 0 26px rgba(240, 196, 106, .16); }
.msdeckart {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: 50% 8%; opacity: .42;
}
.msdeckfade {
  position: absolute; inset: 0;
  background: linear-gradient(96deg, rgba(5, 8, 15, .94) 12%, rgba(5, 8, 15, .46) 58%, rgba(5, 8, 15, .86));
}
.msdeckhead, .msdeckname, .msdeckfoot { position: relative; }
.msdeckname {
  font-family: Cinzel, Georgia, serif; font-size: 20px; font-weight: 700;
  letter-spacing: 1.6px; color: #f4d391; line-height: 1.15;
}
.msdeckhead { display: flex; align-items: center; gap: 8px; }
.msdeckfoot { display: flex; align-items: baseline; gap: 16px; margin-top: auto; flex-wrap: wrap; }
.mstally { display: flex; align-items: baseline; gap: 5px; }
.mstally b { font-family: Consolas, "SF Mono", Menlo, monospace; font-size: 13px; font-weight: 800; color: var(--gold); }
.mstally b.bad { color: var(--crimtxt); }
.mstally b i { font-style: normal; font-size: 10px; color: var(--faint); }

.msdp {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  width: 19px; height: 19px; flex: 0 0 auto; border: 1px solid var(--line2);
}
.msdp svg { width: 11px; height: 11px; }
.msdp.big { width: 24px; height: 24px; }
.msdp.big svg { width: 14px; height: 14px; }
.msdp.fury { color: var(--fury); background: rgba(255, 123, 107, .14); border-color: #5a2c26; }
.msdp.calm { color: var(--calm); background: rgba(123, 216, 143, .14); border-color: #2c4a3a; }
.msdp.mind { color: var(--mind); background: rgba(107, 183, 255, .14); border-color: #26405a; }
.msdp.body { color: var(--body); background: rgba(255, 171, 94, .14); border-color: #5a3e1c; }
.msdp.chaos { color: var(--chaos); background: rgba(201, 139, 255, .14); border-color: #46305a; }
.msdp.order { color: var(--order); background: rgba(255, 233, 94, .14); border-color: #5a531c; }

.msflag {
  display: inline-flex; align-items: center; height: 18px; padding: 0 8px; font-size: 9px;
  font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase;
  clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
}
.msflag.ok { color: #0d1a10; background: linear-gradient(180deg, #9bebae, #46d183); }
.msflag.bad { color: #2a0b07; background: linear-gradient(180deg, #ffb0a4, #e4574a); }

.msrail { width: 384px; flex: 0 0 auto; }
.msrailin { padding: 13px 13px 0; gap: 10px; overflow-y: auto; }
.mshero { position: relative; height: 132px; flex: 0 0 auto; overflow: hidden; border: 1px solid #22304a; }
.msheroart {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: 50% 10%; opacity: .6;
}
.msherofade {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(5, 8, 15, .97) 6%, rgba(5, 8, 15, .45) 62%, rgba(5, 8, 15, .55));
}
.msherotop { position: absolute; left: 11px; right: 11px; top: 10px; display: flex; align-items: center; gap: 7px; }
.msherotext { position: absolute; left: 13px; right: 13px; bottom: 10px; display: flex; flex-direction: column; gap: 2px; }
.msherotext .msname {
  font-family: Cinzel, Georgia, serif; font-size: 19px; font-weight: 700;
  letter-spacing: 1.4px; color: #f4d391; line-height: 1.15;
}
.msherotext .mslbl { letter-spacing: 1.4px; text-transform: none; font-size: 10px; }
.msrow { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.msmeta .mscnt { flex: 1; }
.mssect { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.mstiles { display: grid; gap: 6px; }
.msct {
  position: relative; aspect-ratio: 744 / 1039; overflow: hidden; border-radius: 3px;
  background: #0a1020; border: 1px solid #253349; contain: paint;
}
.msct.land { aspect-ratio: 744 / 533; }
.msct.sel { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 18px rgba(240, 196, 106, .5); }
.msct.dim img { opacity: .3; filter: saturate(.25); }
.msdp.clicky { cursor: pointer; }
.msdp.clicky:hover { border-color: var(--gold); }
.msdp.off { color: #3a4d6d !important; background: rgba(10, 16, 28, .7) !important; border-color: var(--line2) !important; }
.msct img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mstagline { font-size: 11px; color: var(--dim); font-style: italic; line-height: 1.4; }
.msclamp {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; flex: 0 0 auto;
}
.msbfrow { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.msbfthumb { width: 104px; flex: 0 0 auto; }
.msbfmeta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.msbfname { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.2; }
.msmanage { display: flex; gap: 6px; flex: 0 0 auto; }
.msmanage .btn { flex: 1; }

.mslaunch {
  position: relative; margin: auto -13px 0; padding: 12px 13px 13px; flex: 0 0 auto;
  display: flex; flex-direction: column; gap: 7px;
  background: linear-gradient(180deg, rgba(4, 8, 15, .55), rgba(10, 16, 28, .9));
  border-top: 1px solid #23324c;
}
.mslaunch::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px;
  background: linear-gradient(90deg, rgba(240, 196, 106, .8) 0 34%, rgba(42, 58, 87, .4) 68%, transparent);
}
.mspilot { display: flex; align-items: center; gap: 7px; }
.mspilot .mslbl { width: 66px; flex: 0 0 auto; }
.mspilot button { flex: 1; min-width: 0; }
.mspilot select { flex: 1; min-width: 0; }
.msempty { display: flex; align-items: center; justify-content: center; flex: 1; color: var(--faint); font-size: 12px; }

.msui .btn, .msui button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 30px;
  padding: 0 16px; font-size: 11px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--dim); background: rgba(12, 19, 33, .9); border: 1px solid var(--line);
  border-radius: 0; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.msui .btn:hover, .msui button:hover { color: var(--text); border-color: var(--gold); }
.msui .btn.primary {
  font-family: inherit; color: #1c1204; background: linear-gradient(180deg, #f7d68f, #c9992f);
  border-color: var(--goldline); box-shadow: 0 0 18px rgba(240, 196, 106, .28);
}
.msui .btn.primary:hover { color: #000; }
.msui .btn.on { color: #1c1204; background: linear-gradient(180deg, #f7d68f, #d0a044); border-color: var(--goldline); }
.msui .btn.danger { color: var(--crimtxt); border-color: var(--crimline); background: transparent; }
.msui .btn.ghost { color: var(--dim); background: transparent; }
.msui .btn.big { height: 42px; font-size: 12px; letter-spacing: 2.4px; margin-top: 3px; }
.msui .btn.small { height: 26px; padding: 0 8px; font-size: 10px; letter-spacing: 1.2px; }
.msui .btn:disabled, .msui button:disabled { opacity: .35; cursor: not-allowed; }
#menuscreen .msdeck, #menuscreen .msnew {
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px));
}
#menuscreen .msnew {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  height: 214px; width: 100%; padding: 0; letter-spacing: 2.6px;
  border: 1px dashed #2f4062; background: rgba(9, 14, 25, .5); color: var(--faint);
}
#menuscreen .msnew:hover { border-color: var(--gold); color: var(--gold); }
.msui select {
  background: rgba(6, 11, 20, .8); color: var(--text); border: 1px solid #23324c;
  border-bottom-color: #3b5170; border-radius: 0; padding: 7px 9px; font-size: 12px;
  font-family: inherit; width: 100%; height: 32px;
}.deckselect {
  background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: 7px 9px; font-size: 13px; font-family: inherit; width: 100%;
}.deckerr { font-size: 11px; color: #ff9a8d; }.btn.big { font-size: 15px; padding: 10px 26px; letter-spacing: 1px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }.bbleft { flex: 0.71 1 0; min-width: 268px; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.bbdetailpane { flex: 1 1 auto; min-height: 0; }
.bbcurvepane { flex: 0 0 auto; }
.bbmid { flex: 1 1 0; min-width: 0; }
.bbright { flex: 1.07 1 0; min-width: 0; }

.msui .bbback { padding: 0 14px 0 10px; }
.bbname {
  background: transparent; border: 0; border-bottom: 1px dashed var(--line2); border-radius: 0;
  font-family: Cinzel, Georgia, serif; font-size: 19px; font-weight: 700; letter-spacing: 3px;
  color: var(--gold); padding: 3px 26px 4px 6px; width: 100%; cursor: text; line-height: 1.4; height: auto;
}
.bbnamewrap:hover .bbname { border-bottom-color: var(--gold2); background: rgba(6, 11, 20, .55); }
.bbname:focus { outline: none; border-bottom-style: solid; border-bottom-color: var(--gold); background: rgba(6, 11, 20, .7); }
.bbname::placeholder { color: var(--faint); letter-spacing: 2px; }
.bbident { display: flex; align-items: center; gap: 6px; padding-left: 6px; }

.bbhead { display: flex; align-items: baseline; gap: 8px; flex: 0 0 auto; }
.bbhead > .mslbl:first-child { margin-right: auto; }
.bbcode { font-size: 10px; color: var(--faint); }

.bbdetail { padding: 11px; gap: 9px; }
.bbart {
  position: relative; padding: 0; flex: 1 1 auto; min-height: 120px;
  display: flex; align-items: center; justify-content: center;
}
.bbartglow {
  position: absolute; left: 22px; right: 22px; top: 14px; bottom: 10px;
  background: radial-gradient(closest-side, rgba(240, 196, 106, .32), transparent 78%); filter: blur(16px);
}
.bbartimg {
  position: relative; display: block; width: 100%; height: 100%;
  object-fit: contain; border-radius: 5px;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .6));
}
.bbnames { display: flex; flex-direction: column; justify-content: center; gap: 2px; flex: 0 0 auto; height: 42px; overflow: hidden; }
.bbcname.empty { color: var(--faint); font-family: inherit; font-size: 13px; font-style: italic; letter-spacing: .4px; }
.bbartempty { border: 1px dashed #2b3a58; background: rgba(9, 14, 25, .5); }
.bbartempty .mslbl { color: var(--faint); }
.bbcname {
  font-family: Cinzel, Georgia, serif; font-size: 17px; font-weight: 600; letter-spacing: 1.4px; color: #f4d391;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bbcsub { letter-spacing: 3px; color: var(--crimtxt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bbchips { display: flex; flex-wrap: nowrap; gap: 5px; flex: 0 0 auto; height: 21px; overflow: hidden; }
.bbchips .bbchip { flex: 0 0 auto; }
.bbchip {
  display: inline-flex; align-items: center; height: 21px; padding: 0 9px;
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--dim); background: rgba(10, 16, 28, .8); border: 1px solid #23324c;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.bbchip.hot { color: #ffd9d2; background: linear-gradient(180deg, rgba(228, 87, 74, .34), rgba(146, 37, 28, .34)); border-color: var(--crimline); }
.bbchip.on { color: #1c1204; background: linear-gradient(180deg, #f7d68f, #d0a044); border-color: var(--goldline); }
.bbchip.clicky { cursor: pointer; }
.bbchip.clicky:hover { color: var(--text); border-color: var(--gold); }
.bbchip.bbreset { margin-left: auto; }
.bbstats { display: flex; gap: 6px; flex: 0 0 auto; }
.bbstat {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px;
  background: rgba(9, 14, 25, .7); border: 1px solid var(--line2);
}
.bbstatrow { display: flex; align-items: center; gap: 4px; }
.bbstatnum { font-size: 17px; font-weight: 800; color: var(--gold); line-height: 1; }
.bbrarname { font-size: 11px; font-weight: 800; letter-spacing: 1.4px; line-height: 1.45; color: var(--dim); }
.bbep {
  display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px;
  font-size: 11px; font-weight: 800; color: var(--energy); background: rgba(255, 214, 107, .1);
  border: 1px solid #5a4a1c; flex: 0 0 auto;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.bbep.off { color: var(--faint); background: rgba(10, 16, 28, .7); border-color: #23324c; }
.bbep.clicky { cursor: pointer; }
.bbep.clicky:hover { color: var(--text); }
.bbstep {
  display: flex; align-items: center; height: 32px; flex: 0 0 auto; margin-top: 1px;
  border: 1px solid var(--line); background: rgba(9, 14, 25, .8);
}
.msui .bbstepb {
  width: 34px; height: 100%; padding: 0; flex: 0 0 auto; clip-path: none; border: none;
  border-right: 1px solid var(--line2); background: transparent; color: var(--dim);
  font-size: 16px; font-weight: 800; letter-spacing: 0;
}
.msui .bbstepb.plus { border-right: none; border-left: 1px solid var(--line2); color: var(--gold); }
.msui .bbstepb:hover:not(:disabled) { background: rgba(240, 196, 106, .1); color: var(--text); }
.bbstepn { display: flex; align-items: baseline; gap: 6px; margin-right: 10px; }
.bbstepn .msnum { font-size: 13px; font-weight: 800; color: var(--gold); }
.bbpips { display: flex; gap: 4px; margin: 0 auto; }
.bbpip { width: 9px; height: 9px; transform: rotate(45deg); border: 1px solid #33445f; background: #0d1526; }
.bbpip.on { background: linear-gradient(180deg, #f7d68f, #c08a2e); border-color: var(--goldline); }

.bbcurve { padding: 11px; gap: 8px; }
.bbavg { display: flex; align-items: baseline; gap: 6px; }
.bbavg .msnum { font-size: 13px; font-weight: 800; color: var(--gold); }
.bbchart { display: flex; align-items: stretch; gap: 5px; flex: 0 0 auto; height: 104px; }
.bbcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; justify-content: flex-end; min-width: 0; }
.bbtrack { flex: 1 1 auto; width: 100%; min-height: 0; display: flex; align-items: flex-end; }
.bbcoln { font-size: 10px; color: #cfdcf0; }
.bbcole { font-size: 9px; color: var(--faint); }
.bbbar {
  width: 100%; background: linear-gradient(180deg, #f7d68f, #b9812f);
  border: 1px solid var(--goldline); border-bottom: none;
}
.bbsplit { display: flex; height: 8px; border: 1px solid #1b2740; background: #0c1424; flex: 0 0 auto; }
.bbseg { height: 100%; }
.bblegend { display: flex; gap: 14px; flex-wrap: wrap; flex: 0 0 auto; }
.bblegitem { display: flex; align-items: center; gap: 5px; }
.bblegitem .msnum { font-size: 11px; color: #cfdcf0; }
.bbdot { width: 8px; height: 8px; flex: 0 0 auto; }

.bbdeckpane { padding: 12px; gap: 10px; }
.bbhero {
  position: relative; display: flex; align-items: stretch; height: 118px; flex: 0 0 auto;
  padding: 11px 15px; overflow: hidden; border: 1px solid #22304a;
  background: linear-gradient(90deg, rgba(60, 20, 16, .55), rgba(10, 16, 28, .4) 60%);
}
.bbheroart {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: 50% 22%; opacity: .26;
}
.bbherofade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 15, .92) 6%, rgba(5, 8, 15, .74) 44%, rgba(5, 8, 15, .93)),
    linear-gradient(180deg, rgba(5, 8, 15, .3), rgba(5, 8, 15, .55));
}
.bbslots { position: relative; display: flex; align-items: stretch; width: 100%; }
.bbslotrow { position: relative; display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1 1 0; padding: 0 16px; }
.bbslotrow:first-child { padding-left: 0; }
.bbslotrow:last-child { padding-right: 0; }
.bbslotrow + .bbslotrow::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 1px;
  background: linear-gradient(180deg, transparent, var(--line) 26%, var(--line) 74%, transparent);
}
.bbslotmeta { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; flex: 1; }
.bbslotkey { color: var(--faint); letter-spacing: 1.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bbslotname {
  font-family: Cinzel, Georgia, serif; font-size: 14px; font-weight: 700; letter-spacing: 1.1px;
  color: #f4d391; line-height: 1.2; overflow: hidden;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
}
.bbslotname.empty { color: var(--faint); font-family: inherit; font-size: 12px; font-style: italic; letter-spacing: .4px; }
.bbslotsub { display: flex; align-items: center; gap: 5px; min-width: 0; height: 14px; }
.bbslotsub .mslbl { letter-spacing: 1.4px; text-transform: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.bbslot {
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 4px;
  border-style: dashed; border-color: #2f4062; background: rgba(9, 14, 25, .5);
}

.bbmain { flex: 1 1 auto; min-height: 0; }
.bbgrid {
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(0, 1fr)); gap: 6px;
  flex: 1 1 auto; min-height: 0; align-content: stretch;
}
.bbgrid > .msct { width: 100%; height: 100%; aspect-ratio: auto; }
.bbspan { grid-column: 1 / -1; grid-row: 1; width: 100%; }
.msui .bbdrop {
  position: absolute; right: 2px; top: 2px; width: 18px; height: 18px; padding: 0;
  display: none; align-items: center; justify-content: center; font-size: 14px; line-height: 1;
  clip-path: none; border-radius: 3px;
  color: var(--crimtxt); background: rgba(8, 12, 21, .92); border: 1px solid var(--crimline);
}
.msui .msct:hover .bbdrop { display: flex; }
.msui .bbdrop:hover { background: var(--crimson); color: #fff; }

.bblower { display: flex; gap: 14px; align-items: flex-start; flex: 0 0 auto; }
.bbrunesect { flex: 1; min-width: 0; gap: 6px; }
.bbrunes { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.bbruneadd { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.bbruneadd .mslbl { margin-right: 2px; }.bbtools { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.bbtools .btn:last-child { margin-left: auto; }

.bbcollection { padding: 12px; gap: 9px; }
.bbsearch {
  display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 11px; flex: 0 0 auto;
  background: rgba(6, 11, 20, .8); border: 1px solid #23324c; border-bottom-color: #3b5170;
}
.bbsearchicon { display: flex; color: var(--faint); flex: 0 0 auto; }
.bbsearchicon svg { width: 15px; height: 15px; }
.bbsearch input {
  flex: 1; min-width: 0; background: transparent; border: none; outline: none;
  color: var(--text); font-family: inherit; font-size: 13px;
}
.bbsearch input::placeholder { color: var(--faint); }
.bbfilters {
  display: flex; flex-direction: column; gap: 8px; padding: 10px 11px; flex: 0 0 auto;
  background: rgba(7, 12, 21, .62); border: 1px solid #1b2740;
}
.bbfrow { display: flex; gap: 10px; align-items: center; }
.bbfkey { width: 52px; flex: 0 0 auto; }
.bbfvals { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; flex: 1; }
.bbrar {
  width: 11px; height: 11px; transform: rotate(45deg); border: 1px solid rgba(0, 0, 0, .5);
  opacity: .4; flex: 0 0 auto;
}
.bbrar.on { opacity: 1; box-shadow: 0 0 0 1px rgba(240, 196, 106, .7); }
.bbrar.clicky { cursor: pointer; }
.bbcolhead .bbcolnum { font-size: 13px; font-weight: 800; color: var(--gold); }
.bbpool {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px;
  flex: 0 0 auto; align-content: start; justify-items: stretch;
}
.bbqty {
  position: absolute; right: 0; bottom: 0; height: 16px; min-width: 24px; padding: 0 5px 0 8px;
  display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800;
  background: linear-gradient(180deg, #f7d68f, #c08a2e); color: #1c1204;
  clip-path: polygon(9px 0, 100% 0, 100% 100%, 0 100%);
}
.bbin {
  position: absolute; left: 0; top: 0; height: 15px; padding: 0 7px 0 4px; display: flex;
  align-items: center; font-size: 9px; font-weight: 800; letter-spacing: .6px;
  background: linear-gradient(180deg, #e4574a, #92251c); color: #fff;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.bbpager { display: flex; align-items: center; justify-content: center; gap: 6px; flex: 0 0 auto; margin-top: auto; padding-top: 6px; }
.bbpg {
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--dim); border: 1px solid transparent; cursor: pointer;
}
.bbpg:hover { color: var(--text); border-color: var(--line); }
.bbpg.on { color: #1c1204; background: linear-gradient(180deg, #f7d68f, #c9992f); border-color: var(--goldline); }
.bbpginfo { margin-left: 12px; letter-spacing: 1.4px; }

#fxlayer {
  position: fixed; inset: 0; pointer-events: none; z-index: 90;
  overflow: hidden;
}
.flycard {
  position: absolute; border-radius: 9px; border: 1px solid #3b4d70;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .7), 0 0 20px rgba(240, 196, 106, .18);
  background-color: #16213a; background-size: cover; background-position: center;
  z-index: 92; opacity: 0; transform-origin: 50% 50%; will-change: transform, opacity;
}
.fxslotghost { pointer-events: none; }
.flycard.fxplaceholder { opacity: 1; box-shadow: 0 6px 18px rgba(0, 0, 0, .55); }
.flycard.back {
  background: linear-gradient(155deg, #16203a 0%, #0b1120 55%, #131b30 100%);
  border-color: #3a4c72;
  box-shadow: inset 0 0 0 2px rgba(240, 196, 106, .16), inset 0 0 20px rgba(8, 12, 24, .9), 0 8px 20px rgba(0, 0, 0, .6);
}
.flycard.burnfly { z-index: 96; }
.fxbanner, .fxbig {
  position: fixed; left: 50%; transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(14, 20, 34, .96), rgba(9, 13, 24, .96));
  border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 7px 18px; font-size: 13px; letter-spacing: .4px;
  z-index: 94; white-space: nowrap; box-shadow: 0 8px 26px rgba(0, 0, 0, .5);
  animation-name: fxbanner; animation-timing-function: ease; animation-fill-mode: both;
}
.fxbanner { top: 64px; }
.fxbig {
  top: 40%; font-family: Cinzel, Georgia, serif; font-size: 24px; font-weight: 700;
  letter-spacing: 4px; color: var(--gold); padding: 14px 34px;
  border-color: rgba(240, 196, 106, .5);
  box-shadow: 0 0 60px rgba(240, 196, 106, .18), 0 12px 40px rgba(0, 0, 0, .6);
}
.fxbanner.gold, .fxbig.gold { color: var(--gold); border-color: rgba(240, 196, 106, .5); }
.fxbanner.red, .fxbig.red { color: #ff8d7e; border-color: rgba(228, 87, 74, .55); }
@keyframes fxbanner {
  0% { opacity: 0; margin-top: -8px; }
  12% { opacity: 1; margin-top: 0; }
  85% { opacity: 1; }
  100% { opacity: 0; }
}
.fxpop {
  position: fixed; transform: translateX(-50%); z-index: 95;
  font-weight: 800; font-size: 15px; letter-spacing: .5px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .9);
  animation-name: fxpop; animation-timing-function: ease-out; animation-fill-mode: both;
  white-space: nowrap;
}
.fxpop.dmg { color: #ff6b5b; font-size: 18px; }
.fxpop.death { color: #ff8d7e; font-size: 13px; }
.fxpop.stun { color: #ffd66b; font-size: 12px; }
.fxpop.buff { color: #46d183; }
.fxpop.gold { color: var(--gold); font-size: 17px; }
@keyframes fxpop {
  0% { opacity: 0; margin-top: 6px; }
  15% { opacity: 1; margin-top: 0; }
  80% { opacity: 1; margin-top: -14px; }
  100% { opacity: 0; margin-top: -20px; }
}
@media (prefers-reduced-motion: reduce) {
  .fxsheen, .fxland, .fxriffle, .fxring, .fxburst, .fxmote { display: none !important; }
  .fxbanner, .fxbig, .fxpop { animation-duration: 220ms !important; }
}

.predictreveal { display: flex; gap: 16px; align-items: flex-start; margin-top: 6px; }
.predictreveal img {
  width: 130px; border-radius: 8px; border: 2px solid var(--gold);
  box-shadow: 0 0 26px rgba(240, 196, 106, .3), 0 10px 30px rgba(0, 0, 0, .55);
}
.predictreveal .pcol { display: flex; flex-direction: column; gap: 6px; max-width: 460px; }
.predictreveal .pname { font-family: Cinzel, Georgia, serif; font-size: 15px; color: var(--gold); }
.predictreveal .ptext { font-size: 11px; color: var(--text); white-space: pre-wrap; }

.prearrive { opacity: 0 !important; pointer-events: none; }
.arrive { animation: arrivein 150ms ease-out; }
@keyframes arrivein {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.dragghost {
  position: fixed; width: 68px; height: 68px; z-index: 96; pointer-events: none;
  border-radius: 8px; border: 2px solid var(--gold); background-color: #101a2e;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .7), 0 0 24px rgba(240, 196, 106, .3);
  opacity: .92;
}
body.dragging { cursor: grabbing; }
body.dragging .card { cursor: grabbing; }
.dropok {
  outline: 2px dashed rgba(240, 196, 106, .55) !important; outline-offset: -3px;
  animation: droppulse 1.1s ease-in-out infinite;
}
.drophover {
  outline: 3px solid var(--gold) !important; outline-offset: -3px;
  animation: none;
  box-shadow: 0 0 30px rgba(240, 196, 106, .35) !important;
}
@keyframes droppulse {
  0%, 100% { outline-color: rgba(240, 196, 106, .35); }
  50% { outline-color: rgba(240, 196, 106, .75); }
}

.rune.candidate { outline: 2px solid var(--good); box-shadow: 0 0 10px rgba(70, 209, 131, 0.5); }
.rune.picked { outline: 2px solid var(--warn); }

.flycard.flip {
  background: none; border: none; box-shadow: none;
  perspective: 780px; z-index: 93;
}
.flipinner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d; transform: rotateY(180deg);
  border-radius: inherit;
}
.flipface {
  position: absolute; inset: 0; backface-visibility: hidden; overflow: hidden;
  border-radius: 9px; border: 1px solid #3b4d70; background-color: #16213a;
  background-size: cover; background-position: center;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .7), 0 0 20px rgba(240, 196, 106, .18);
}
.flipface.backside {
  transform: rotateY(180deg);
  background: linear-gradient(155deg, #16203a 0%, #0b1120 55%, #131b30 100%);
  border-color: #3a4c72;
  box-shadow: inset 0 0 0 2px rgba(240, 196, 106, .16), inset 0 0 20px rgba(8, 12, 24, .9), 0 10px 26px rgba(0, 0, 0, .7);
}
.fxsheen {
  position: absolute; inset: -30% -60%; opacity: 0; pointer-events: none;
  background: linear-gradient(103deg, rgba(255, 255, 255, 0) 38%, rgba(255, 240, 205, .6) 50%, rgba(255, 255, 255, 0) 62%);
}
.morphfly { border: none; background: none; box-shadow: none; }
.morphfly .flipface, .morphfly .flipinner { border-radius: inherit; }
.fxcrop {
  position: absolute; inset: 0; opacity: 0; border-radius: inherit;
  background-size: auto 192%; background-position: 50% 17%;
}
.fxland {
  position: absolute; height: 12px; margin-top: -6px; opacity: 0; z-index: 91;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(240, 196, 106, .55), rgba(240, 196, 106, 0));
}
.fxring {
  position: absolute; border-radius: 7px; border: 2px solid var(--gold);
  opacity: 0; z-index: 94; pointer-events: none;
}
.fxburst {
  position: absolute; border-radius: 50%; opacity: 0; z-index: 91; pointer-events: none;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 244, 214, .95), rgba(240, 196, 106, .5) 42%, rgba(240, 196, 106, 0) 72%);
}
.fxmote {
  position: absolute; width: 6px; height: 6px; border-radius: 50%; opacity: 0;
  z-index: 95; pointer-events: none; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, #fff6db, var(--gold));
  box-shadow: 0 0 8px rgba(240, 196, 106, .9);
}
.flycard.spawnfly { z-index: 93; }
.fxdim {
  position: fixed; inset: 0; z-index: 95; opacity: 0; pointer-events: none;
  background: radial-gradient(46vw 42vh at 50% 42%, rgba(6, 10, 18, .12), rgba(6, 10, 18, .74));
}
.fxember {
  position: absolute; border-radius: 11px; opacity: 0; z-index: 91; pointer-events: none;
  box-shadow: 0 0 30px 8px rgba(228, 87, 74, .7);
}
.fxpip {
  position: absolute; transform: translate(-50%, -50%); z-index: 95;
  font-weight: 800; font-size: 15px; letter-spacing: .4px; color: var(--gold);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .9); white-space: nowrap; pointer-events: none;
}
.fxshufhalf { position: fixed; z-index: 93; pointer-events: none; }
.fxriffle {
  position: fixed; height: 3px; border-radius: 2px; opacity: 0; z-index: 94; pointer-events: none;
  background: linear-gradient(90deg, rgba(240, 196, 106, 0), rgba(240, 196, 106, .9) 45%, rgba(255, 236, 196, .95) 55%, rgba(240, 196, 106, 0));
}
.slotplate.fxtick { animation: platetick 400ms ease; }
@keyframes platetick {
  0% { border-color: var(--line); color: var(--dim); box-shadow: none; }
  22% { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 13px rgba(240, 196, 106, .45); }
  100% { border-color: var(--line); color: var(--dim); box-shadow: none; }
}
.slotplate.fxtick.fxtick-bad { animation-name: platetickbad; }
@keyframes platetickbad {
  0% { border-color: var(--line); color: var(--dim); box-shadow: none; }
  22% { border-color: var(--crimson); color: var(--crimtxt); box-shadow: 0 0 14px rgba(228, 87, 74, .5); }
  100% { border-color: var(--line); color: var(--dim); box-shadow: none; }
}
.slotplate.fxtick.fxtick-good { animation-name: platetickgood; }
@keyframes platetickgood {
  0% { border-color: var(--line); color: var(--dim); box-shadow: none; }
  22% { border-color: var(--good); color: var(--good); box-shadow: 0 0 14px rgba(70, 209, 131, .45); }
  100% { border-color: var(--line); color: var(--dim); box-shadow: none; }
}

.menuerr {
  position: relative;
  margin: 0 18px;
  padding: 8px 14px;
  flex: 0 0 auto;
  background: rgba(228, 87, 74, .1);
  border: 1px solid var(--crimline);
  color: var(--crimtxt);
  max-width: 680px;
  text-align: center;
  line-height: 1.5;
  border-radius: 10px;
}
#cardmenu, #choicemenu {
  position: fixed; z-index: 60; min-width: 210px; max-width: 320px;
  border-radius: 12px; background: rgba(9, 14, 24, 0.97);
  border: 1px solid var(--goldline);
  box-shadow: 0 0 0 1px rgba(240, 196, 106, .12), 0 18px 44px rgba(0, 0, 0, .72);
  padding: 7px; display: flex; flex-direction: column; gap: 3px;
}
#cardmenu { left: -9999px; top: -9999px; }
#choicemenu {
  left: 50%; top: 46%; transform: translate(-50%, -50%);
  min-width: 300px; max-width: min(1080px, 92vw); padding: 12px 14px;
  border-color: var(--gold); align-items: stretch;
  box-shadow: 0 0 0 1px rgba(240, 196, 106, .25), 0 0 46px rgba(240, 196, 106, .16), 0 18px 44px rgba(0, 0, 0, .75);
}
#choicemenu .menutitle { text-align: center; font-size: 13px; padding-bottom: 8px; }
#choicemenu .menuhint { text-align: center; font-size: 11px; color: var(--dim); padding-bottom: 8px; }
#choicemenu .menunote { text-align: center; }
.optstrip { display: flex; gap: 8px; justify-content: center; padding: 2px 0 2px; }
.choicestrip {
  display: flex; gap: 12px; padding: 4px 2px 6px; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: thin; justify-content: center;
}
.choicestrip::-webkit-scrollbar { height: 7px; }
.choicestrip::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.choicecard {
  flex: 0 0 auto; width: 112px; cursor: pointer;
  display: flex; flex-direction: column; gap: 5px;
  transition: transform 120ms ease;
}
.choicecard:hover { transform: translateY(-4px); }
.choicecard .cart {
  position: relative; width: 112px; height: 156px; border-radius: 9px;
  background-size: cover; background-position: center; background-color: #16213a;
  border: 2px solid var(--line); box-shadow: 0 8px 20px rgba(0, 0, 0, .55);
}
.choicecard:hover .cart { border-color: var(--gold); box-shadow: 0 0 22px rgba(240, 196, 106, .35); }
.choicecard.picked .cart {
  border-color: var(--warn);
  box-shadow: 0 0 24px rgba(230, 144, 46, .5), 0 8px 20px rgba(0, 0, 0, .55);
}
.choicecard .cart.baseart {
  background: linear-gradient(160deg, #2a1a16, #140b09);
  border-color: var(--crimline);
}
.choicecard .cmight {
  position: absolute; right: -7px; bottom: -7px; width: 26px; height: 26px;
  border-radius: 50%; background: linear-gradient(180deg, var(--gold), #b9812f);
  color: #1c1204; font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--goldline);
}
.choicecard .ccheck {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 40px; height: 40px; border-radius: 50%; background: rgba(230, 144, 46, .92);
  color: #1c1204; font-size: 22px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 18px rgba(230, 144, 46, .6);
}
.choicecard .ccap { text-align: center; }
.choicecard .cn {
  font-size: 11px; font-weight: 700; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.choicecard .cs { font-size: 9px; color: var(--dim); line-height: 1.3; }
#choicemenu .menufoot { justify-content: center; }
.menutitle {
  font-family: Cinzel, Georgia, serif; font-size: 12px; color: var(--gold);
  letter-spacing: 1px; padding: 3px 8px 6px; border-bottom: 1px solid var(--line2);
  margin-bottom: 3px;
}
.menunote { font-size: 10px; color: var(--dim); padding: 2px 8px 5px; }
.menurow {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 8px;
  cursor: pointer; font-size: 12px; border: 1px solid transparent; background: var(--panel2);
}
.menurow:hover { border-color: var(--gold); background: rgba(240, 196, 106, .09); }
.menurow.primary .ml { color: var(--gold); font-weight: 700; }
.menurow.off { cursor: default; opacity: .5; background: transparent; }
.menurow.off:hover { border-color: transparent; background: transparent; }
.menurow.picked { border-color: var(--warn); background: rgba(230, 144, 46, .12); }
.menurow .ml { flex: 1; }
.menurow .mw { font-size: 9px; color: var(--faint); max-width: 130px; text-align: right; line-height: 1.25; }.menurow .ms { font-size: 9px; color: var(--dim); letter-spacing: .4px; }.menufoot { display: flex; gap: 6px; padding-top: 6px; margin-top: 3px; border-top: 1px solid var(--line2); }
#selpanel .selmeta { font-size: 11px; color: var(--faint); letter-spacing: .4px; }
#selpanel .selstatus { font-size: 11px; color: var(--gold); margin-top: 5px; }

.chainitem.clicky { cursor: pointer; }
.chainitem.clicky:hover { border-color: var(--gold); }
.chainitem.selected { border-color: var(--gold); box-shadow: 0 0 14px rgba(240, 196, 106, .35); }

#tbscreen { display: flex; flex-direction: column; height: 100vh; padding: 14px 18px; gap: 12px; }
.tbhead { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.tbhead h1 { font-size: 22px; letter-spacing: 4px; color: var(--gold); font-weight: 700; }
.tbtabs { display: flex; gap: 4px; }
.tbprog { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 160px; }
.tbprogbar {
  height: 8px; border-radius: 4px; overflow: hidden; display: flex;
  background: var(--bg2); border: 1px solid var(--line2);
}
.tbseg-pass { background: var(--good); }
.tbseg-fail { background: var(--crimson); }
.tbprogtxt { font-size: 10px; color: var(--dim); letter-spacing: .5px; }
.tbdot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.tbdot.on { background: var(--good); box-shadow: 0 0 8px var(--good); }
.tbdot.off { background: var(--crimson); }
.tbstatus {
  flex: 0 0 auto; padding: 6px 12px; border-radius: 8px; font-size: 12px;
  background: var(--panel); border: 1px solid var(--goldline); color: var(--gold);
}
.tbbody { flex: 1; display: flex; gap: 14px; min-height: 0; }
.tblist {
  flex: 0 0 40%; display: flex; flex-direction: column; gap: 8px; min-height: 0;
  background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; padding: 10px;
}
.tbfilters { display: flex; flex-direction: column; gap: 6px; }
.tbmodes { max-width: 180px; }
.tblist input[type=text], .tbquick input[type=text], .tbbarrow input[type=text] {
  background: var(--bg1); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); padding: 6px 10px; font-size: 12px; font-family: inherit;
}
.tbchips { display: flex; gap: 4px; }
.tbchip {
  flex: 1; padding: 4px 0; border-radius: 7px; border: 1px solid var(--line2);
  background: transparent; color: var(--dim); font-size: 10px; letter-spacing: .8px;
  text-transform: uppercase; cursor: pointer; font-family: inherit;
}
.tbchip.on { border-color: var(--gold); color: var(--gold); }
.tbchipn { opacity: .7; font-weight: 700; margin-left: 2px; }
.tbrows { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; scrollbar-width: none; }
.tbrows::-webkit-scrollbar { display: none; }
.tbsethead {
  position: sticky; top: 0; z-index: 3; margin: 4px 0 3px;
  padding: 3px 8px; border-radius: 6px;
  background: var(--bg2); border: 1px solid var(--line2);
  font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--gold);
  font-weight: 700; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 5px;
}
.tbsethead:hover { border-color: var(--goldline); }
.tbsethead.folded { color: var(--dim); }
.tbsetarrow { color: var(--faint); font-size: 9px; }
.tbsetcount { margin-left: auto; color: var(--faint); letter-spacing: 0; }
.tbsettag { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); margin: 2px 0 4px; }
.tblist .tbgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; padding: 2px 2px 8px; }
.tbcell {
  position: relative; cursor: pointer; border-radius: 4.5% / 3.2%;
  border: 2px solid transparent; user-select: none; min-height: 40px;
}
.tbcell img { display: block; width: 100%; border-radius: 4.5% / 3.2%; }
.tbcell:hover { border-color: var(--line); }
.tbcell.sel { border-color: var(--gold); box-shadow: 0 0 14px rgba(240, 196, 106, .4); }
.tbcell.noimg {
  background: var(--bg2); border: 1px dashed var(--line);
  display: flex; align-items: center; justify-content: center; aspect-ratio: 744 / 1039;
}
.tbcellname { padding: 8px; text-align: center; font-size: 11px; color: var(--dim); }
.tbcell .tbcellstat {
  position: absolute; top: 6px; right: 6px; width: 12px; height: 12px;
  box-shadow: 0 0 0 2px rgba(6, 10, 18, .85);
}
.tbcell .tbcellstat.todo { background: rgba(6, 10, 18, .7); border-color: var(--dim); }
.tbrow {
  display: flex; align-items: center; gap: 6px; padding: 4px 7px; border-radius: 7px;
  cursor: pointer; border: 1px solid transparent; font-size: 12px; line-height: 1.5;
  user-select: none;
}
.tbrow:hover { background: var(--bg2); }
.tbrow.sel { border-color: var(--gold); background: rgba(240, 196, 106, .08); }
.tbstat { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; display: inline-block; }
.tbstat.todo { border: 1px solid var(--faint); }
.tbstat.pass { background: var(--good); }
.tbstat.fail { background: var(--crimson); }
.tbrcost { flex: 0 0 16px; text-align: center; color: var(--energy); font-weight: 700; font-size: 11px; }
.tbrname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbscript {
  font-size: 8px; letter-spacing: 1px; text-transform: uppercase; padding: 1px 6px;
  border-radius: 6px; border: 1px solid var(--line); color: var(--dim); flex: 0 0 auto;
}.tbscript-manual { border-color: var(--crimline); color: var(--crimtxt); }
.tbscript-error { border-color: var(--crimson); color: var(--crimson); }
.tbmain {
  flex: 1; min-width: 0; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; padding: 16px;
}
.tbempty { padding: 30px; text-align: center; font-size: 11px; }
.tbcard { display: flex; gap: 20px; }
.tbimg { flex: 0 0 380px; }
.tbimg img { width: 380px; border-radius: 18px; border: 1px solid var(--line); display: block; }
.tbinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.tbinfo h2 { font-size: 20px; color: var(--text); letter-spacing: 1px; }
.tbtypeline { font-size: 11px; color: var(--dim); letter-spacing: .6px; text-transform: capitalize; }
.tbtext { font-size: 13px; line-height: 1.55; color: var(--text); }
.tbscriptline { font-size: 11px; color: var(--dim); }
.tbexpected {
  border: 1px solid var(--goldline); border-left: 3px solid var(--gold);
  border-radius: 8px; padding: 10px 12px; background: rgba(240, 196, 106, .05);
  display: flex; flex-direction: column; gap: 6px; font-size: 12px; line-height: 1.5;
}
.tbscenarios { display: flex; flex-direction: column; gap: 8px; }
.tbscen {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px;
  border: 1px solid var(--line2); border-radius: 10px; background: var(--panel2);
}
.tbscen > .btn { flex: 0 0 auto; }
.tbscentxt { min-width: 0; }
.tbscentitle { font-size: 13px; font-weight: 700; }
.tbquick { display: flex; flex-direction: column; gap: 8px; max-width: 460px; }
.tbverdicts { display: flex; gap: 6px; }
.tbv-pass { border-color: var(--good); color: var(--good); }
.tbv-pass:hover { background: var(--good); color: #000; }
.tbv-fail { border-color: var(--crimson); color: var(--crimtxt); }
.tbv-fail:hover { background: var(--crimson); color: #fff; }
.tbreasons { display: flex; flex-wrap: wrap; gap: 5px; }
.tbreason {
  display: flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 7px;
  border: 1px solid var(--line2); background: transparent; color: var(--dim);
  font-size: 10px; letter-spacing: .8px; text-transform: uppercase;
  cursor: pointer; font-family: inherit;
}
.tbreason:hover { border-color: var(--crimline); color: var(--crimtxt); }
.tbreason.on { border-color: var(--crimson); color: var(--crimtxt); background: rgba(200, 60, 70, .12); }
.tbtag {
  margin-left: 5px; padding: 1px 6px; border-radius: 6px;
  border: 1px solid var(--crimline); color: var(--crimtxt);
  font-size: 9px; letter-spacing: .6px; text-transform: uppercase;
}
.tbhist { display: flex; flex-direction: column; gap: 5px; }
.tbhistrow { font-size: 11px; color: var(--dim); display: flex; align-items: center; gap: 6px; }
.tbhistrow .tbstat { margin-right: 2px; }
.tbhistts { margin-left: auto; color: var(--faint); font-size: 10px; }
.tboffline {
  margin: auto; max-width: 420px; text-align: center; display: flex; flex-direction: column;
  gap: 16px; padding: 40px; background: var(--panel); border: 1px solid var(--line2);
  border-radius: 14px; font-size: 13px; line-height: 1.6;
}
.tboffline code {
  background: var(--bg1); border: 1px solid var(--line2); border-radius: 6px;
  padding: 2px 8px; color: var(--gold); font-size: 12px;
}
.tbe, .tbm, .tbx {
  display: inline-block; min-width: 15px; text-align: center; font-size: 10px; font-weight: 800;
  border-radius: 50%; padding: 1px 3px; border: 1px solid var(--goldline); color: var(--energy);
}
.tbm { color: var(--crimtxt); border-color: var(--crimline); }
.tbx { color: var(--dim); border-color: var(--line); }
.tbr {
  display: inline-block; width: 15px; text-align: center; font-size: 9px; font-weight: 800;
  border-radius: 50%; border: 1px solid var(--line);
}
.tbr-fury { color: var(--fury); border-color: var(--fury); }
.tbr-calm { color: var(--calm); border-color: var(--calm); }
.tbr-mind { color: var(--mind); border-color: var(--mind); }
.tbr-body { color: var(--body); border-color: var(--body); }
.tbr-chaos { color: var(--chaos); border-color: var(--chaos); }
.tbr-order { color: var(--order); border-color: var(--order); }
.tbr-rainbow { color: var(--purple); border-color: var(--purple); }
.tbcov { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow: hidden; }
.covcols { display: flex; gap: 20px; min-height: 0; flex: 1 1 auto; }

.covsum {
  border: 1px solid var(--line2); border-radius: 12px; background: var(--panel2);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; flex: 0 0 auto;
}
.covsumhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.covsumsub {
  font-size: 12px; color: var(--dim); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.covsumpct { display: flex; align-items: baseline; gap: 6px; }
.covsumnum { font-family: Cinzel, Georgia, serif; font-size: 30px; font-weight: 700; color: var(--gold); line-height: 1; }
.covsumunit { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--dim); }
.covstats { display: flex; gap: 20px; flex-wrap: wrap; }
.covstat { display: flex; align-items: baseline; gap: 6px; }
.covstatn { font-size: 15px; font-weight: 700; color: var(--text); }
.covstatl { font-size: 11px; color: var(--dim); letter-spacing: .5px; }

.covbar {
  display: flex; height: 8px; border-radius: 999px; overflow: hidden;
  background: var(--bg2); box-shadow: inset 0 0 0 1px var(--line2);
}
.covseg { flex: 1 1 0; min-width: 2px; transition: flex-grow .25s ease; }
.covseg.cov-scripted { background: linear-gradient(180deg, var(--gold), var(--gold2)); }
.covseg.cov-manual { background: var(--line); }
.covseg.cov-empty { background: transparent; }

.covdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.covdot.cov-scripted { background: var(--gold); }
.covdot.cov-manual { background: var(--line); }

.covlegend { display: flex; gap: 14px; padding-top: 2px; flex: 0 0 auto; }
.covlegitem { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--dim); }

.covsets {
  flex: 0 0 300px; display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto; min-height: 0; padding-right: 4px;
}
.covset {
  border: 1px solid var(--line2); border-radius: 10px; background: var(--panel2);
  padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.covset:hover { border-color: var(--line); background: var(--bg2); }
.covset.sel { border-color: var(--gold); box-shadow: 0 0 14px rgba(240, 196, 106, .12); }
.covsettop { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.covsetname { font-family: Cinzel, Georgia, serif; font-weight: 700; font-size: 13px; letter-spacing: 1px; }
.covsetpct { font-size: 12px; font-weight: 700; color: var(--gold); }
.covsetmeta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.covsetcount { font-size: 11px; color: var(--faint); margin-right: auto; }
.covchip {
  font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  border: 1px solid var(--line2); color: var(--dim);
}
.covchip.cov-scripted { color: var(--gold); border-color: var(--goldline); }
.covchip.cov-manual { color: var(--dim); border-color: var(--line); }
.covchip.cov-error { color: var(--crimtxt); border-color: var(--crimline); }

.tbcovdet {
  flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 10px;
  border: 1px solid var(--line2); border-radius: 12px; background: var(--panel2); padding: 14px 16px;
}
.covdethead {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 26px; flex: 0 0 auto;
}
.covdettitle { font-family: Cinzel, Georgia, serif; font-weight: 700; letter-spacing: 1.5px; font-size: 14px; }
.covfilters { display: flex; gap: 4px; }
.covfilter {
  background: transparent; border: 1px solid var(--line2); color: var(--dim);
  border-radius: 999px; padding: 3px 11px; font-size: 11px; letter-spacing: .5px; cursor: pointer;
}
.covfilter:hover { border-color: var(--line); color: var(--text); }
.covfilter.on { border-color: var(--gold); color: var(--gold); background: rgba(240, 196, 106, .08); }
.covsearch {
  background: var(--bg1); border: 1px solid var(--line2); border-radius: 8px;
  padding: 6px 10px; color: var(--text); font-family: inherit; font-size: 12px;
}
.covsearch:focus { outline: none; border-color: var(--gold); }
.tbcovlist {
  flex: 1 1 auto; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 2px;
  font-size: 12px; padding-right: 4px;
}
.tbcovcard {
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  height: 42px; padding: 4px 8px; border-radius: 7px; border: 1px solid transparent;
}
.tbcovcard:hover { background: var(--bg2); border-color: var(--line2); }
.tbcovname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbcovid { color: var(--faint); font-size: 10px; margin-left: 6px; }

.covtools { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.covtools .covsearch { flex: 1 1 auto; min-width: 0; }
.covshapesel {
  flex: 0 0 auto; max-width: 260px;
  background: var(--bg1); border: 1px solid var(--line2); border-radius: 8px;
  padding: 6px 10px; color: var(--text); font-family: inherit; font-size: 12px; cursor: pointer;
}
.covshapesel:focus { outline: none; border-color: var(--gold); }
.covshapesel:disabled { opacity: .4; cursor: default; }

.tbcovrow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tbcovwhy {
  font-size: 11px; color: var(--dim); line-height: 15px; padding-left: 16px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#tbbar {
  position: fixed; top: 46px; left: 50%; transform: translateX(-50%); z-index: 60;
  min-width: 460px; max-width: 720px; border-radius: 12px;
  background: var(--panel2); border: 1px solid var(--goldline);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .5); padding: 8px 12px;
  display: flex; flex-direction: column; gap: 7px;
}
.tbbarhead { display: flex; align-items: center; gap: 10px; }
.tbbarlabel { font-size: 9px; letter-spacing: 2px; color: var(--gold); font-weight: 700; }
.tbbarname { font-size: 14px; font-weight: 700; }
.tbbarscen { font-size: 11px; color: var(--dim); flex: 1; }
.tbbartoggle { padding: 1px 8px; }
.tbbarexp {
  font-size: 11.5px; line-height: 1.5; color: var(--text);
  border-left: 2px solid var(--gold); padding-left: 10px;
}
.tbbarrow { display: flex; gap: 6px; align-items: center; }
.tbbarrow input { flex: 1; }
.mv.up { background: linear-gradient(180deg, var(--good), #2c8a54); color: #05230f; border-color: #2c5a40; }
.mv.down { background: linear-gradient(180deg, var(--crimson), #8a2c24); color: #fff; border-color: var(--crimline); }
.badge.tmight { background: #1a3a2a; color: var(--good); border-color: #2c5a40; }
.rref { color: var(--gold); border-bottom: 1px dotted var(--goldline); cursor: pointer; }
.rref:hover { color: #fff; border-bottom-color: var(--gold); }
#tbrules {
  position: fixed; right: 12px; top: 56px; bottom: 12px; width: 380px; z-index: 70;
  background: var(--panel2); border: 1px solid var(--goldline); border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .55); padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.tbruleshead { display: flex; align-items: center; justify-content: space-between; }
#tbrules input[type=text] {
  background: var(--bg1); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); padding: 6px 10px; font-size: 12px; font-family: inherit;
}
.tbrulestitle { font-size: 11px; color: var(--gold); letter-spacing: .5px; font-weight: 700; }
.tbruleslist { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.tbrule { font-size: 11.5px; line-height: 1.45; display: flex; gap: 8px; align-items: baseline; }
.tbrulenum { color: var(--aztxt); font-weight: 700; flex: 0 0 auto; font-size: 10.5px; }
.tbruletext { color: var(--text); }
.bffd.playable { cursor: pointer; }
.bffd.playable .cardback {
  border-color: var(--gold); box-shadow: 0 0 12px rgba(240, 196, 106, .55);
  animation: fdpulse 1.6s ease-in-out infinite;
}
.bffd.playable .zlabel { color: var(--gold); }
@keyframes fdpulse {
  0%, 100% { box-shadow: 0 0 6px rgba(240, 196, 106, .35); }
  50% { box-shadow: 0 0 16px rgba(240, 196, 106, .75); }
}

#grouptray {
  position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 21;
  min-width: 470px; max-width: calc(100% - 60px); border-radius: 12px;
  background: rgba(10, 15, 26, 0.94); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--goldline);
  box-shadow: 0 0 0 1px rgba(240, 196, 106, 0.18), 0 14px 34px rgba(0, 0, 0, 0.65);
  padding: 8px 16px 9px; display: flex; flex-direction: column; gap: 7px;
}
#grouptray .gthead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
#grouptray h3 {
  font-family: Cinzel, Georgia, serif; font-size: 13px; font-weight: 600;
  letter-spacing: 1.5px; color: var(--gold); flex: 0 0 auto;
}
#grouptray .note { color: var(--dim); font-size: 12px; }
#grouptray .error { color: #ff6b6b; font-size: 12px; font-weight: 700; }
#grouptray .actions {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
  padding-top: 7px; border-top: 1px solid var(--line2);
}
#grouptray .gtsprites {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  min-height: 58px; margin-top: -1px;
}
#grouptray .gtsprites .zlabel { color: var(--faint); font-size: 11px; }
#grouptray .gtsprite {
  position: relative; width: 40px; height: 56px; border-radius: 6px; flex: 0 0 auto;
  background-size: cover; background-position: center; background-color: #1a2438;
  border: 1px solid var(--gold); cursor: pointer;
  box-shadow: 0 0 8px rgba(240, 196, 106, .35);
}
#grouptray .gtsprite .gtord {
  position: absolute; top: -6px; left: -6px; width: 17px; height: 17px; border-radius: 50%;
  background: var(--gold); color: #1a1206; font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .6);
}
#grouptray .gtsprite .gtdrop {
  position: absolute; inset: 0; border-radius: 5px; opacity: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(228, 87, 74, .72); color: #fff; font-size: 15px; font-weight: 800;
}
#grouptray .gtsprite:hover .gtdrop { opacity: 1; }
#grouptray .gtsprite.bad { border-color: var(--crimson); box-shadow: 0 0 8px rgba(228, 87, 74, .45); }
#grouptray .gtsprite.bad .gtord { background: var(--crimson); color: #fff; }
body.dragging #grouptray { pointer-events: none; opacity: .55; }

.card.groupsel {
  outline: 3px solid var(--gold) !important; outline-offset: -2px;
  box-shadow: 0 0 16px rgba(240, 196, 106, .55) !important;
}
.card.groupfocus { outline: 3px solid #fff3d6 !important; outline-offset: -2px; }
.card.groupok { outline: 2px dashed rgba(240, 196, 106, .45); outline-offset: -2px; cursor: copy; }
.card.groupwarn { outline: 2px dashed rgba(228, 87, 74, .5); outline-offset: -2px; cursor: not-allowed; }
.groupbadge {
  position: absolute; top: -7px; left: -7px; z-index: 5;
  width: 20px; height: 20px; padding: 0; border-radius: 50%;
  background: var(--gold); color: #1a1206; font-weight: 800; font-size: 12px;
  border: 1px solid #ffe9b8; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .6);
}
.groupbadge:hover { background: var(--crimson); color: #fff; border-color: #ffd9d4; }
.dragghost .ghostcount {
  position: absolute; right: -7px; top: -7px;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--gold); color: #1a1206; font-weight: 800; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .6);
}

#choicemenu .menusrc {
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 2px;
}
.fxprompt { display: block; font-weight: 700; color: #f4e8c8; margin: 2px 0 4px; }

.poolgroup { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.pooltoken { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.pooltoken.en {
  width: 19px; height: 19px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe9a8, var(--energy) 55%, #b98a1f);
  box-shadow: 0 0 8px rgba(255, 214, 107, .45), inset 0 -2px 4px rgba(0, 0, 0, .3);
}
.pooltoken.pw {
  width: 16px; height: 21px;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  box-shadow: inset 0 2px 5px rgba(255, 255, 255, .3);
}
.pooltoken.pw.fury { background: linear-gradient(160deg, #ffc3b8, var(--fury) 45%, #8f2f24); }
.pooltoken.pw.calm { background: linear-gradient(160deg, #c9f0d2, var(--calm) 45%, #2c6a42); }
.pooltoken.pw.mind { background: linear-gradient(160deg, #c6e2ff, var(--mind) 45%, #2a5a94); }
.pooltoken.pw.body { background: linear-gradient(160deg, #ffe0c2, var(--body) 45%, #965a1f); }
.pooltoken.pw.chaos { background: linear-gradient(160deg, #ead0ff, var(--chaos) 45%, #6a3a94); }
.pooltoken.pw.order { background: linear-gradient(160deg, #fff7c2, var(--order) 45%, #948a1f); }
.pooltoken.pw.any {
  background: conic-gradient(from 210deg, #ff6b6b, #ffb45e, #ffe95e, #6bd88f, #6bb7ff, #c98bff, #ff6b6b);
}
.rwrap {
  display: inline-flex; padding: 2px; border-radius: 6px;
  outline: 2px dashed var(--gold); outline-offset: -1px;
  background: rgba(240, 196, 106, .08);
}
.runedeckpile { position: relative; width: 34px; height: 42px; flex: 0 0 auto; margin: 0 4px 0 2px; }
.runedeckpile .rdcard {
  position: absolute; left: 4px; top: 3px; width: 26px; height: 36px; border-radius: 5px;
}
.runedeckpile .rdcard.emptypile {
  border: 1px dashed var(--line); background: none; box-shadow: none;
}
.runedeckpile .rdcount {
  position: absolute; right: -5px; bottom: -4px; z-index: 2;
  background: var(--panel2); border: 1px solid var(--goldline); border-radius: 999px;
  font-size: 9px; font-weight: 700; color: var(--gold); padding: 0 5px; line-height: 14px;
}

.hcost.cheap { border-color: var(--good); color: #7de8a8; background: #0d2418; }
.hcost.pricey { border-color: #ff5d4d; color: #ff9c8f; background: #2e1210; }

.kwchips {
  position: absolute; bottom: -7px; left: 4px; right: 4px;
  display: flex; gap: 3px; flex-wrap: wrap; z-index: 3; pointer-events: none;
}
.kwchip {
  border-radius: 4px; font-size: 8px; font-weight: 800; letter-spacing: .4px;
  padding: 0 4px; line-height: 12px;
  background: #101c30; color: #8fb4e8; border: 1px solid #2b4368;
}
.kwchip.active {
  background: #2e2410; color: var(--gold); border-color: var(--goldline);
  box-shadow: 0 0 8px rgba(240, 196, 106, .35);
}

.fxrevealcard {
  position: absolute; z-index: 95; opacity: 0;
  perspective: 780px; transform-origin: 50% 50%; will-change: transform, opacity;
}
.fxrevealcard .fxfloat {
  position: relative; width: 100%; height: 100%; transform-style: preserve-3d;
}
.fxrevealcap {
  position: fixed; left: 50%; transform: translateX(-50%);
  font-family: Cinzel, Georgia, serif; font-size: 15px; letter-spacing: 2px;
  color: var(--gold); z-index: 96; white-space: nowrap;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .8);
}
@media (prefers-reduced-motion: reduce) {
  .fxdim, .fxlink { display: none !important; }
}

.choicecard .trignum {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 26px; border-radius: 50%; z-index: 2;
  background: var(--gold); color: #201607; border: 2px solid #fff3d6;
  font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .6);
}

.eqpair { display: inline-flex; align-items: center; position: relative; }
.eqpair > .uplate { position: relative; z-index: 1; }
.card.eqtab {
  width: 34px; height: 48px; box-sizing: border-box; margin-left: -6px; border-radius: 0 6px 6px 0;
  background-size: cover; background-position: center; background-color: #1d1a12;
  border: 1px solid var(--goldline); cursor: pointer; user-select: none; position: relative; flex: 0 0 auto;
}
.card.eqtab + .card.eqtab { margin-left: -1px; }
.eqpair:hover .card.eqtab, .card.eqtab:hover { border-color: var(--gold); box-shadow: 0 0 8px rgba(240, 196, 106, .35); }
.eqchip {
  position: absolute; bottom: -7px; left: 4px; z-index: 3; pointer-events: none;
  border-radius: 4px; font-size: 8px; font-weight: 800; letter-spacing: .4px; padding: 0 4px; line-height: 12px;
  background: #2e2410; color: var(--gold); border: 1px solid var(--goldline);
}

#cardmenu.pilemenu { min-width: 240px; }
#cardmenu.pilemenu .menutitle { color: var(--gold); }

.fxrimflash { position: absolute; inset: 0; border-radius: inherit; background: rgba(255, 222, 170, .6); opacity: 0; pointer-events: none; }
.flycard.chainfly { z-index: 96; }
.fxsheenclip { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.fxlink {
  position: absolute; left: -12px; top: -12px; z-index: 2; opacity: 0; pointer-events: none;
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--gold);
  background: radial-gradient(closest-side, #2a2008, #0b0f18);
  color: #ffe9c2; font-family: Cinzel, Georgia, serif; font-size: 17px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 16px rgba(240, 196, 106, .7);
}
.fxplate {
  position: fixed; left: 50%; top: calc(42% + 92px); transform: translate(-50%, 0); z-index: 97; opacity: 0;
  min-width: 220px; max-width: 520px; padding: 8px 18px; border-radius: 10px; text-align: center;
  background: linear-gradient(90deg, rgba(60, 44, 12, .95), rgba(14, 20, 34, .96)); border: 1px solid var(--goldline);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .55); pointer-events: none;
}
.fxplate-t { font-family: Cinzel, Georgia, serif; font-size: 16px; font-weight: 700; letter-spacing: 3px; color: #ffe9c2; text-shadow: 0 0 14px rgba(240, 196, 106, .6); }
.fxplate-s { font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--dim); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fxband {
  position: fixed; left: 0; right: 0; top: calc(40% - 28px); height: 56px; z-index: 97; opacity: 0; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(90deg, rgba(240, 196, 106, 0), rgba(60, 44, 12, .95) 20%, rgba(24, 18, 8, .97) 50%, rgba(60, 44, 12, .95) 80%, rgba(240, 196, 106, 0));
  border-top: 1px solid rgba(240, 196, 106, .6); border-bottom: 1px solid rgba(240, 196, 106, .6);
}
.fxband span { font-family: Cinzel, Georgia, serif; font-size: 24px; font-weight: 700; letter-spacing: 6px; color: #ffe9c2; text-shadow: 0 0 18px rgba(240, 196, 106, .8); }
.fxslash { position: absolute; width: 124px; height: 4px; border-radius: 2px; opacity: 0; z-index: 95; transform-origin: center center; pointer-events: none; }
.fxemberdot { position: absolute; width: 5px; height: 5px; border-radius: 50%; opacity: 0; z-index: 95; pointer-events: none; }
.fxwash { position: absolute; opacity: 0; z-index: 95; filter: blur(1px); border-radius: 8px; pointer-events: none; }
.fxglyph { position: absolute; z-index: 95; overflow: visible; pointer-events: none; filter: drop-shadow(0 0 5px rgba(107, 183, 255, .8)); }
.fxsnap { position: absolute; border-radius: 12px; border: 2px solid #cfe6ff; opacity: 0; z-index: 95; pointer-events: none; }
.fxdust { position: absolute; width: 96px; height: 30px; border-radius: 50%; border: 2px solid var(--gold); opacity: 0; z-index: 95; pointer-events: none; }
.fxcrack { position: absolute; width: 62px; height: 2px; opacity: 0; z-index: 95; transform-origin: left center; pointer-events: none; }
.fxshard { position: absolute; z-index: 95; pointer-events: none; margin: 0; }
.fxshard.fxghost { filter: sepia(1) hue-rotate(230deg) saturate(4); mix-blend-mode: screen; }
.fxpillar { position: absolute; width: 48px; opacity: 0; z-index: 94; transform-origin: top center; filter: blur(1px); pointer-events: none; }
.fxflare { position: absolute; width: 184px; height: 3px; opacity: 0; z-index: 95; transform-origin: center center; pointer-events: none; }
.fxgem {
  position: absolute; width: 18px; height: 22px; opacity: 0; z-index: 96; pointer-events: none;
  background: linear-gradient(180deg, #fff3cf, var(--gold) 50%, #b9812f);
  clip-path: polygon(50% 0, 100% 35%, 80% 100%, 20% 100%, 0 35%);
  filter: drop-shadow(0 0 8px rgba(240, 196, 106, .9));
}
.fxclaimwash { position: absolute; opacity: 0; z-index: 93; border-radius: 10px; pointer-events: none; mix-blend-mode: screen; }
.fxclaimring { border-width: 3px; border-radius: 10px; z-index: 95; }
.fxclaimstamp {
  position: absolute; z-index: 97; opacity: 0; pointer-events: none; white-space: nowrap;
  transform: translate(-50%, -50%);
  font-family: Cinzel, Georgia, serif; font-size: 30px; font-weight: 700; letter-spacing: 5px;
  padding: 4px 16px; border: 3px solid var(--gold); border-radius: 6px;
  background: rgba(10, 14, 24, .55);
}
.fxcorpse {
  position: absolute; z-index: 95; margin: 0; pointer-events: none; transition: none;
  will-change: transform, opacity, filter;
}
.card.fxcorpse { position: absolute; transition: none; }
.fxfrag { z-index: 96; }
.fxseam {
  position: absolute; height: 2px; opacity: 0; z-index: 96; pointer-events: none;
  background: #fff4d0; box-shadow: 0 0 10px #ffb861; transform-origin: center center;
}
.fxscorch {
  position: absolute; opacity: 0; z-index: 90; pointer-events: none; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(28, 10, 6, .95), rgba(28, 10, 6, 0));
}
.fxtrail { position: absolute; height: 2px; opacity: 0; z-index: 94; transform-origin: left center; filter: blur(1px); pointer-events: none; background: linear-gradient(90deg, rgba(240, 196, 106, .8), rgba(240, 196, 106, 0)); }
.fxhexglow {
  position: absolute; width: 52px; height: 54px; opacity: 0; z-index: 94; pointer-events: none;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: rgba(240, 196, 106, .55);
}
.bigslot.deckamber .slotplate { color: #ffd7a1; border-color: #ffab5e; animation: deckamber 1.6s ease-out infinite; }
.bigslot.deckred .slotplate { color: #ff9a8d; border-color: var(--crimson); animation: deckred 1.1s ease-out infinite; }
@keyframes deckamber { 0% { box-shadow: 0 0 0 0 rgba(255, 171, 94, .55); } 100% { box-shadow: 0 0 0 10px rgba(255, 171, 94, 0); } }
@keyframes deckred { 0% { box-shadow: 0 0 0 0 rgba(228, 87, 74, .7); } 100% { box-shadow: 0 0 0 12px rgba(228, 87, 74, 0); } }
body.burnwarn::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 89;
  box-shadow: inset 0 0 90px rgba(228, 87, 74, .45); animation: burnedge 2.2s ease-in-out infinite;
}
@keyframes burnedge { 0%, 100% { opacity: .35; } 50% { opacity: .75; } }
@media (prefers-reduced-motion: reduce) {
  .fxslash, .fxwash, .fxglyph, .fxsnap, .fxdust, .fxcrack, .fxshard, .fxpillar, .fxflare, .fxtrail, .fxhexglow, .fxclaimwash, .fxclaimring { display: none !important; }
  .fxcorpse, .fxfrag, .fxseam, .fxscorch { display: none !important; }
  .bigslot.deckamber .slotplate, .bigslot.deckred .slotplate, body.burnwarn::after { animation: none !important; }
}

.strip { flex: 0 0 auto; margin: 9px 14px 0 14px; min-height: 112px; border-radius: 12px;
  display: flex; align-items: center; gap: 10px; padding: 5px 14px; position: relative;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5); overflow: hidden; --d1: var(--dim); --d2: var(--dim); --legendart: none; }
.strip.opp, .strip.mine {
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(90deg, rgba(6, 10, 18, 0.98) 0%, rgba(6, 10, 18, 0.96) 48%, rgba(6, 10, 18, 0.78) 68%, rgba(6, 10, 18, 0.5) 84%, rgba(6, 10, 18, 0.35) 100%),
    var(--legendart) right 18% / 46% auto no-repeat,
    #0a101d;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55);
}
.strip.opp { background-position: 0 0, right 14%; }.strip > * { position: relative; z-index: 1; }.strip .basetab { background: rgba(6, 10, 18, 0.85); border-color: var(--d2); color: var(--d2); }
.strip.mine .basetab, .strip.opp .basetab { background: rgba(6, 10, 18, 0.85); border-color: var(--d2); color: var(--d2); }
.strip .vdiv { background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)); }
.pid { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; min-width: 190px; }.pid .pname { color: #f6efe6; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9); }
.pid.az .pname, .pid.cr .pname { color: #f6efe6; }
.pid .zlabel { color: var(--d2); letter-spacing: 1.8px; }
.crystal.az, .crystal.cr { background: linear-gradient(200deg, #2b2410, #120d04); border: 1px solid var(--gold); box-shadow: 0 0 12px rgba(240, 196, 106, 0.35); }
.crystal.az span, .crystal.cr span { color: #ffe9c2; }
.runegroup { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; padding: 5px 8px; border-radius: 10px; background: rgba(6, 10, 18, 0.55); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--d2) 30%, transparent), 0 0 18px color-mix(in srgb, var(--d2) 20%, transparent); }

.battlefield {
  flex: 1;
  border-radius: 16px;
  overflow: hidden;
  background: #0b1220;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.5);
  position: relative;
  min-width: 0;
}
.bfsprite { position: absolute; inset: 0; z-index: 0; filter: saturate(0.7) brightness(0.52) contrast(1.08); }.battlefield.ctl0 .bfpennant { background: linear-gradient(180deg, rgba(228, 87, 74, 0.1), var(--crimson) 60%); box-shadow: 0 0 14px rgba(228, 87, 74, 0.7); }
.battlefield.ctl0 .bfveil { background: linear-gradient(180deg, rgba(6, 10, 18, 0.6) 0%, rgba(6, 10, 18, 0.1) 30%, rgba(64, 25, 20, 0.25) 65%, rgba(90, 30, 22, 0.7) 100%); }
.battlefield.ctl1 .bfpennant { background: linear-gradient(0deg, rgba(74, 163, 224, 0.1), var(--azure) 60%); box-shadow: 0 0 14px rgba(74, 163, 224, 0.7); }
.battlefield.ctl1 .bfveil { background: linear-gradient(0deg, rgba(6, 10, 18, 0.72) 0%, rgba(6, 10, 18, 0.1) 32%, rgba(21, 42, 64, 0.3) 66%, rgba(18, 48, 80, 0.75) 100%); }bfart .shade { display: none; }
.bfart .bfname { bottom: 14px; }
.bfart .bftext { color: #cdbfb8; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9); }bfrow.s0, .bfrow.empty0 { align-items: flex-end; }
.bfrow.s1, .bfrow.empty1 { align-items: flex-start; }
.bfrow .zlabel { opacity: 0.55; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9); }.card.uplate { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 6px 14px rgba(0, 0, 0, 0.6); }
.bfrow.s0 .card.uplate { box-shadow: 0 0 0 1px rgba(228, 87, 74, 0.55), 0 6px 14px rgba(0, 0, 0, 0.6); }
.bfrow.s1 .card.uplate { box-shadow: 0 0 0 1px rgba(74, 163, 224, 0.55), 0 6px 14px rgba(0, 0, 0, 0.6); }

.pside { position: relative; overflow: hidden; flex: 0 0 auto; display: flex; flex-direction: column; background: rgba(7, 11, 19, 0.35); }
.pside .psideart {
  position: absolute; top: -2%; left: -30px; height: 280%; width: auto; opacity: 0.3;
  filter: grayscale(1) contrast(1.1); pointer-events: none; user-select: none;
}
.pside.top .psideart { left: auto; right: -30px; }
.pside .psidefade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(7, 11, 19, 0.35) 0%, rgba(7, 11, 19, 0.9) 34%, rgba(7, 11, 19, 0.98) 60%, rgba(7, 11, 19, 0.98) 100%); }
.pside.top .psidefade { background: linear-gradient(270deg, rgba(7, 11, 19, 0.35) 0%, rgba(7, 11, 19, 0.9) 34%, rgba(7, 11, 19, 0.98) 60%, rgba(7, 11, 19, 0.98) 100%); }
.pside .psidefloor { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, color-mix(in srgb, var(--d1) 9%, transparent) 100%); }
.pside.top .psidefloor { background: linear-gradient(0deg, rgba(0, 0, 0, 0) 40%, color-mix(in srgb, var(--d1) 9%, transparent) 100%); }
.pside .psideedge { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; pointer-events: none; background: linear-gradient(90deg, var(--d1), var(--d2) 50%, var(--d1)); }
.pside.top .psideedge { bottom: auto; top: 0; }
.pside > .strip, .pside > .station { position: relative; z-index: 1; }

.pside .strip.opp, .pside .strip.mine {
  background: rgba(6, 10, 18, 0.18); border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--d1) 13%, transparent), 0 6px 16px rgba(0, 0, 0, 0.35);
}
.pside .strip.highlight { outline: 2px solid var(--good); outline-offset: -2px; }
.pside .station { background: none; }
.pside .stgroup {
  border-radius: 12px; padding: 12px 14px; background: rgba(6, 10, 18, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.16); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
.pside .handfan { position: relative; }
.pside .handfan::before {
  content: ""; position: absolute; left: 20%; right: 20%; bottom: -20px; height: 60px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.55); filter: blur(18px); pointer-events: none;
}
.pside .station.top .handfan::before { bottom: auto; top: -20px; }
.pside .card.uplate, .pside .bigcard, .pside .rune, .pside .card.hcard, .pside .pilecard.topcard {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.5);
}
.pside .uplate.champ, .pside .bigcard.gold { box-shadow: 0 0 12px rgba(240, 196, 106, 0.3), 0 8px 18px rgba(0, 0, 0, 0.7); }
.pside .bigcard.dashed, .pside .pilecard.emptypile { box-shadow: none; }

.bfsprite {
  position: absolute; inset: -34% -7%; z-index: 0; background-size: cover; background-position: center 46%;
  filter: saturate(0.72) brightness(0.62) contrast(1.05);
}
.bfveil { position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, rgba(6, 10, 18, 0.55) 0%, rgba(6, 10, 18, 0.08) 30%, rgba(6, 10, 18, 0.08) 62%, rgba(6, 10, 18, 0.72) 100%); pointer-events: none; box-shadow: inset 0 0 70px rgba(4, 7, 14, 0.85); }
.battlefield.ctl0 .bfveil { background: linear-gradient(180deg, rgba(6, 10, 18, 0.55) 0%, rgba(6, 10, 18, 0.08) 30%, rgba(64, 25, 20, 0.25) 65%, rgba(90, 30, 22, 0.7) 100%); }
.battlefield.ctl1 .bfveil { background: linear-gradient(0deg, rgba(6, 10, 18, 0.72) 0%, rgba(6, 10, 18, 0.08) 32%, rgba(21, 42, 64, 0.3) 66%, rgba(18, 48, 80, 0.75) 100%); }
.battlefield.combat .bfsprite { filter: saturate(0.55) brightness(0.5) contrast(1.15) sepia(0.25) hue-rotate(-20deg); }
.bfpennant { position: absolute; left: -1px; top: 0; bottom: 0; width: 5px; z-index: 3; pointer-events: none; }
.battlefield.ctl0 .bfpennant { background: linear-gradient(180deg, rgba(228, 87, 74, 0.1), var(--crimson) 60%, var(--crimson)); box-shadow: 0 0 14px rgba(228, 87, 74, 0.7); }
.battlefield.ctl1 .bfpennant { background: linear-gradient(0deg, rgba(74, 163, 224, 0.1), var(--azure) 60%, var(--azure)); box-shadow: 0 0 14px rgba(74, 163, 224, 0.7); }
.bfart { height: 40px; position: relative; overflow: visible; flex: 0 0 auto; background-size: 115% auto; background-position: 61% 30%; background-color: #101a2e; background: none; z-index: 2; }
.bfart .shade { background: none; }
.bfart .bfname { text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95); }
.bfart .bftext { color: #cdbfb8; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9); }
.bfrows { flex: 1; display: flex; flex-direction: column; gap: 0; padding: 0 8px 6px 8px; min-height: 0; z-index: 2; position: relative; }
.bfrows::after {
  content: ""; position: absolute; left: 22px; right: 22px; top: 50%; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, rgba(240, 196, 106, 0), rgba(240, 196, 106, 0.45), rgba(240, 196, 106, 0));
}
.battlefield.showdown .bfrows::after, .battlefield.combat .bfrows::after {
  height: 2px; margin-top: -1px;
  background: linear-gradient(90deg, rgba(230, 144, 46, 0), #ffb85e 30%, #ffb85e 70%, rgba(230, 144, 46, 0));
  box-shadow: 0 0 12px rgba(255, 184, 94, 0.8);
}
.bfrow, .bfrow.s0, .bfrow.s1, .bfrow.empty0, .bfrow.empty1 { background: none; border: none; border-radius: 0; }
.bfrow.s0 { align-items: flex-start; }
.bfrow.s1 { align-items: flex-end; }
.bfrow .card.uplate { box-shadow: 0 8px 18px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.5); }
.bfrow.s0 .card.uplate { box-shadow: 0 0 0 1px rgba(228, 87, 74, 0.55), 0 8px 18px rgba(0, 0, 0, 0.7); }
.bfrow.s1 .card.uplate { box-shadow: 0 0 0 1px rgba(74, 163, 224, 0.55), 0 8px 18px rgba(0, 0, 0, 0.7); }
.bffdrow { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: row-reverse; align-items: flex-end; gap: 6px; z-index: 4; }
.bffd { display: flex; flex-direction: column; align-items: center; gap: 2px; }

#bfarea { padding-bottom: 14px; }
#bfarea #promptbar {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); margin: 0;
  width: max-content; max-width: calc(100% - 60px); z-index: 20;
  background: rgba(10, 15, 26, 0.94); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 0 0 1px rgba(240, 196, 106, 0.18), 0 14px 34px rgba(0, 0, 0, 0.65);
}
#bfarea #promptbar:empty { display: none; }

.bbslotpick { display: flex; align-items: center; justify-content: center; height: 100%; width: 84px; flex: 0 0 auto; }
.bbslotpick > .msct { height: 100%; width: auto; aspect-ratio: 744 / 1039; flex: 0 0 auto; }
.bbslotpick > .msct.land { height: auto; width: 100%; aspect-ratio: 744 / 533; }
.bbslotpick.picking > .msct { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.bbfilters.bblocked { opacity: .3; pointer-events: none; }

.bbpickbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
  padding: 7px 10px;
  background: rgba(240, 196, 106, .1);
  border: 1px solid var(--goldline);
}

.bbpickmsg { flex: 1; font-size: 12px; color: var(--gold); }
.bbpool.picking .msct { cursor: pointer; }

[data-zone] { transition: background .15s, box-shadow .15s; }
[data-zone].dropok { background: rgba(240, 196, 106, .05); box-shadow: inset 0 0 0 1px rgba(240, 196, 106, .3); }
[data-zone].drophover { background: rgba(240, 196, 106, .12); box-shadow: inset 0 0 0 1px rgba(240, 196, 106, .66); }
[data-zone].rmok { background: rgba(228, 87, 74, .045); box-shadow: inset 0 0 0 1px rgba(228, 87, 74, .26); }
[data-zone].rmhover { background: rgba(228, 87, 74, .12); box-shadow: inset 0 0 0 1px rgba(228, 87, 74, .62); }

body.bbdragging { cursor: grabbing; }
body.bbdragging .msct { cursor: grabbing; }

#bbghost {
  position: fixed;
  z-index: 9000;
  pointer-events: none;
  width: 76px;
  aspect-ratio: 744 / 1039;
  border: 1px solid var(--gold);
  box-shadow: 0 14px 32px rgba(0, 0, 0, .7);
  transform: translate(-50%, -54%) rotate(-3deg);
  background: #070c16;
  overflow: hidden;
}

#bbghost img { display: block; width: 100%; height: 100%; object-fit: cover; }
#bbghost.rm { border-color: var(--crimson); }
#bbghost.no { border-color: var(--faint); filter: grayscale(.9) brightness(.5); }

.bbghostqty {
  position: absolute;
  right: -8px;
  top: -8px;
  min-width: 23px;
  height: 21px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  font-family: Consolas, "SF Mono", Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  background: var(--gold);
  color: #221803;
  border: 1px solid #7d5c17;
}

#bbghost.rm .bbghostqty { background: var(--crimson); color: #2a0a06; border-color: #7a3a30; }
#bbghost.no .bbghostqty { background: var(--faint); color: #0a0f18; border-color: #333f56; }

#builderscreen { overflow: hidden; }
#builderscreen .msbody { padding: 12px 16px 16px; gap: 12px; flex: 1 1 auto; min-height: 0; align-items: stretch; }
#builderscreen .mspane, #builderscreen .mspanein { min-height: 0; }
#builderscreen .bbdetail,
#builderscreen .bbcurve,
#builderscreen .bbdeckpane,
#builderscreen .bbcollection { overflow: hidden; }
#builderscreen .bbright { overscroll-behavior: contain; }

@media (max-width: 1620px) {
  .bbhero { height: 148px; padding: 10px 12px; }
  .bbslotrow { flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; padding: 0 8px; text-align: center; }
  .bbslotrow + .bbslotrow::before { top: 2px; bottom: 2px; }
  .bbslotpick { width: 100px; height: 74px; flex: 0 0 auto; }
  .bbslotmeta { flex: 0 0 auto; width: 100%; align-items: center; gap: 2px; }
  .bbslotname { font-size: 12px; letter-spacing: .5px; -webkit-line-clamp: 2; }
  .bbslotsub { justify-content: center; }
}

@media (max-height: 940px) and (min-width: 1621px) {
  .bbhero { height: 104px; padding: 9px 13px; }
  .bbslotpick { width: 84px; }
}

@media (max-height: 940px) {
  .bbdeckpane { gap: 8px; }
  .bbdetail, .bbcurve { padding: 9px; gap: 7px; }
}

.bbslottile { position: relative; cursor: pointer; }
.bbslottile:hover { border-color: var(--gold); }
.bbslotpick.picking .bbslottile {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 0 14px rgba(240, 196, 106, .45);
}

.bbslothint {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 0;
  font-size: 8px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase;
  text-align: center; color: #cfdcf0; background: rgba(5, 8, 15, .82);
  pointer-events: none;
}

.bbslotpick.picking .bbslothint { color: #1c1204; background: var(--gold); }

.bbnamewrap { position: relative; display: flex; align-items: center; width: 340px; max-width: 34vw; }
.bbnamepen {
  position: absolute; right: 6px; display: flex; color: var(--faint);
  pointer-events: none; transition: color .15s;
}
.bbnamewrap:hover .bbnamepen { color: var(--gold); }
.bbname:focus ~ .bbnamepen { color: var(--gold); }

.msui img.art { opacity: 0; transition: opacity .22s ease; background: #0b1220; }
.msui img.art.ready { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .msui img.art { transition: none; }
}
.badge.linger { background: #2a2f5a; color: #c9d2ff; border-color: #5b66b8; }
.fxbanner.linger { background: #2a2f5a; color: #c9d2ff; border-color: #5b66b8; }
.namebox { display: flex; flex-direction: column; gap: 6px; min-width: 260px; }
.nameinput { font: inherit; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--goldline); background: rgba(0, 0, 0, 0.35); color: inherit; outline: none; }
.nameinput:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(240, 196, 106, 0.2); }
.namelist { display: flex; flex-wrap: wrap; gap: 4px; max-width: 520px; }
.namelist .namehit.known { border-color: var(--gold); }
.namelist .note.bad { color: var(--crimtxt); }
.assign.split .aerr { opacity: 0.8; }

.hmbrand { position: relative; text-align: center; margin: 12vh 0 34px; }
.hmbrand h1 { font-size: 46px; letter-spacing: 12px; color: var(--gold); font-weight: 700; }
.hmbrand .mslbl { margin-top: 8px; }
.hmmenu {
  position: relative; margin: 0 auto; width: min(880px, 92vw);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
}
.hmtile {
  display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; text-decoration: none;
  background: linear-gradient(158deg, rgba(56, 73, 106, .55) 0%, rgba(22, 34, 58, .8) 46%, rgba(36, 51, 78, .55) 100%);
  border: 1px solid var(--line2); color: var(--text);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
.hmtile:hover { border-color: var(--gold); background: linear-gradient(158deg, rgba(78, 98, 137, .6), rgba(28, 42, 70, .85)); }
.hmtitle { font-size: 19px; letter-spacing: 4px; color: var(--gold); }
.hmdesc { font-size: 12px; color: var(--dim); line-height: 1.5; }

.oblist, .oblobby { position: relative; margin: 0 auto 28px; width: min(880px, 92vw); flex: 1; min-height: 0; }
.oblistin, .oblobbyin { padding: 14px 16px 18px; gap: 10px; overflow: auto; }
.obname { display: flex; align-items: center; gap: 8px; }
.obnameinput {
  height: 30px; width: 190px; padding: 0 9px; background: #0a101d; color: var(--text);
  border: 1px solid var(--line); font: inherit; font-size: 12px;
}
.obnameinput:focus { border-color: var(--gold); outline: none; }
.obrow {
  display: flex; align-items: center; gap: 14px; padding: 10px 12px;
  border: 1px solid var(--line2); background: rgba(10, 16, 28, .6);
}
.obrow:hover { border-color: var(--line); }
.obrowmain { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.obrowname { font-size: 14px; color: var(--text); }
.obseats { font-family: Consolas, "SF Mono", Menlo, monospace; color: var(--dim); font-size: 12px; }

.obseats2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.obseat {
  display: flex; flex-direction: column; gap: 5px; padding: 14px 16px;
  border: 1px solid var(--line2); background: rgba(10, 16, 28, .6);
}
.obseat.mine { border-color: var(--goldline); }
.obseat.ready { background: rgba(70, 209, 131, .07); }
.obseatname { font-size: 17px; color: var(--text); }
.obseatflag { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; }
.obseatflag.ok { color: var(--good); }
.obseatflag.bad { color: var(--faint); }
.obdeck { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.obdecksel { height: 32px; background: #0a101d; color: var(--text); border: 1px solid var(--line); font: inherit; font-size: 12px; padding: 0 8px; }
.obacts { display: flex; justify-content: flex-end; margin-top: auto; padding-top: 12px; }
.obwait {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  height: 100vh; color: var(--dim); font-size: 14px; letter-spacing: 3px;
}

.ovresult {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  background: rgba(4, 7, 13, .82);
}
.ovcard {
  display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 34px 54px;
  background: linear-gradient(178deg, rgba(15, 24, 41, .97), rgba(7, 12, 21, .98));
  border: 1px solid var(--goldline);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}
.ovtitle { font-size: 34px; letter-spacing: 10px; color: var(--gold); }
.ovwho { font-size: 13px; color: var(--dim); }
