* { 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: 306px; min-width: 1486px; }

#siderail {
  position: fixed; left: 12px; top: 12px; bottom: 12px; width: 294px; 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); }
#topbar button { font-size: 14px; padding: 3px 10px; line-height: 1; }

.modalghost { transition: none !important; animation: none !important; }
#modaltab {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 8px; padding: 6px 16px 8px;
  border-radius: 12px 12px 0 0; background: rgba(9, 14, 24, .97);
  border: 1px solid var(--gold); border-bottom: none; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(240, 196, 106, .25), 0 -8px 30px rgba(240, 196, 106, .12);
  font-family: Cinzel, Georgia, serif; font-size: 12px; color: var(--gold); letter-spacing: 1px;
}
#modaltab:hover { background: rgba(20, 28, 44, .98); }
#modaltab .mtarrow { font-size: 10px; color: var(--dim); }
body.holdpass { cursor: progress; }

#drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: 300px; z-index: 45;
  background: rgba(9, 14, 24, .97); border-left: 1px solid var(--goldline);
  box-shadow: -18px 0 44px rgba(0, 0, 0, .6); padding: 12px 16px 16px;
  display: flex; flex-direction: column; gap: 16px; overflow-y: auto;
  animation: drawerIn .18s ease-out;
}
@keyframes drawerIn { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
#drawer .drhead { display: flex; align-items: center; justify-content: space-between; }
#drawer .drname { font-family: Cinzel, Georgia, serif; font-size: 15px; letter-spacing: 2px; color: var(--gold); }
#drawer .closex { padding: 2px 8px; font-size: 12px; }
#drawer .drsec { display: flex; flex-direction: column; gap: 7px; }
#drawer .drtitle { color: var(--faint); }
#drawer .drrow { display: flex; flex-direction: column; gap: 5px; }
#drawer .drrow button { text-align: left; padding: 7px 11px; font-size: 11px; background: rgba(16, 24, 40, .8); }
#drawer .drrow button.on { border-color: var(--gold); color: var(--gold); }
#drawer .drrow button.danger { border-color: var(--crimline); color: var(--crimtxt); }
#drawer .drrow button.danger:hover { background: var(--crimson); color: #fff; }

.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; line-height: 1.25; }
.chainitem .cs { font-size: 8px; letter-spacing: 1px; text-transform: uppercase; }
.chainitem { align-items: flex-start; }
.chainitem .ce { font-size: 9px; color: var(--dim); line-height: 1.3; margin-top: 2px; }
.chainitem .ct { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; margin-top: 3px; }
.chainitem .ctl {
  font-size: 7px; letter-spacing: 1.2px; color: var(--gold2); font-weight: 700;
  border: 1px solid var(--goldline); border-radius: 4px; padding: 0 3px;
}
.chainitem .ctname {
  font-size: 9px; font-weight: 700; color: #d8e2f2;
  border-radius: 4px; padding: 0 4px; background: rgba(255, 255, 255, 0.06);
}
.chainitem .ctname.cr { color: var(--crimtxt); }
.chainitem .ctname.az { color: var(--aztxt); }
.chainitem .ctname.clicky { cursor: pointer; }
.chainitem .ctname.clicky:hover { background: rgba(240, 196, 106, 0.22); color: var(--gold); }

#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: 9px 10px; font-size: 12px; overflow-y: auto; flex: 1 1 auto; min-height: 0;
}
#log .entry {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 0 -10px 5px -10px; padding: 5px 10px 5px 8px;
  color: var(--faint); line-height: 1.45; border-left: 2px solid transparent;
}
#log .entry.recent { color: #b9c8de; }
#log .entry.cr { border-left-color: rgba(228, 87, 74, 0.55); }
#log .entry.az { border-left-color: rgba(74, 163, 224, 0.55); }
#log .lk {
  flex: 0 0 auto; width: 14px; text-align: center; font-size: 10px; line-height: 1.6;
  color: var(--faint); cursor: help; user-select: none; -webkit-user-select: none;
}
#log .lm { min-width: 0; flex: 1 1 auto; }
#log .lbody { min-width: 0; flex: 1 1 auto; }
#log .lline { display: flex; gap: 6px; align-items: baseline; }

#log .kturn { color: var(--gold); font-weight: 700; }
#log .kturn .lk, #log .kgame .lk, #log .kscore .lk { color: var(--gold); }
#log .kplay .lk, #log .kactivate .lk { color: #ffd66b; }
#log .ktrigger .lk { color: var(--purple); }
#log .kcombat .lk, #log .kdamage .lk { color: var(--warn); }
#log .kdeath .lk, #log .kcounter .lk { color: var(--crimtxt); }
#log .kmove .lk, #log .kzone .lk { color: var(--aztxt); }
#log .kresolve .lk { color: var(--good); }
#log .kplay, #log .kactivate, #log .ktrigger, #log .kdeath, #log .kscore, #log .kgame { color: #93a4c0; }
#log .kplay.recent, #log .kactivate.recent, #log .ktrigger.recent,
#log .kdeath.recent, #log .kscore.recent, #log .kgame.recent { color: #dbe5f4; }
#log .kgame, #log .kturn { font-weight: 700; }
#log .kresource, #log .kphase, #log .kmanual, #log .kinfo { opacity: .75; }

#log .lturn {
  display: flex; align-items: center; gap: 8px; margin: 14px -10px 6px -10px; padding: 0 10px;
}
#log .lturn:first-child { margin-top: 0; }
#log .lturnn {
  font-size: 9px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--gold2); font-weight: 700;
}
#log .lturn::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line2); }

#log .lcard {
  font-weight: 700; color: #d8e2f2; cursor: pointer;
  border-bottom: 1px dotted rgba(216, 226, 242, 0.4);
}
#log .lcard.cr { color: var(--crimtxt); border-bottom-color: rgba(255, 154, 141, 0.4); }
#log .lcard.az { color: var(--aztxt); border-bottom-color: rgba(143, 198, 238, 0.4); }
#log .lcard:hover { color: var(--gold); border-bottom-color: var(--gold); }
#log .lcard.groupfocus {
  outline: none; background: rgba(240, 196, 106, 0.16); border-radius: 3px;
  box-shadow: 0 0 0 2px rgba(240, 196, 106, 0.16);
}
#log .lcard.ltarget::before { content: "\25ce "; font-size: 8px; opacity: .8; }

#log .lstrip { flex: 0 0 auto; display: inline-flex; gap: 2px; align-items: flex-start; }
#log .lthumb {
  display: block; border-radius: 3px; border: 1px solid var(--line);
  background-color: #17203260; background-size: cover; background-position: center;
  font-weight: 400; border-bottom: 1px solid var(--line); cursor: pointer;
}
#log .lthumb.lactor { width: 27px; height: 37px; }
#log .lthumb.lactor.lland { width: 37px; height: 25px; margin-top: 6px; }
#log .lthumb.ltarg { width: 22px; height: 30px; }
#log .lthumb.lnoart {
  background-image: repeating-linear-gradient(135deg, #1a2438 0 3px, #131a29 3px 6px);
  display: flex; align-items: center; justify-content: center;
  font-family: Cinzel, Georgia, serif; font-size: 11px; font-weight: 700; color: var(--faint);
}
#log .lthumb:hover { border-color: var(--gold); border-bottom-color: var(--gold); }
#log .lthumb.groupfocus { outline: 2px solid #fff3d6; outline-offset: -1px; }
#log .lmore {
  align-self: center; font-size: 8px; font-weight: 700; color: var(--faint);
  border: 1px solid var(--line2); border-radius: 3px; padding: 0 2px;
}
#log .ltgt { display: flex; gap: 4px; align-items: center; margin-top: 3px; }
#log .larrow { flex: 0 0 auto; display: inline-flex; color: var(--faint); margin-left: 1px; }
#log .lpip {
  flex: 0 0 auto; width: 27px; height: 16px;
  background: radial-gradient(circle at 50% 7px, var(--faint) 0 3.5px, transparent 3.5px);
}
#log .entry.cr .lpip { background: radial-gradient(circle at 50% 7px, var(--crimson) 0 3.5px, transparent 3.5px); }
#log .entry.az .lpip { background: radial-gradient(circle at 50% 7px, var(--azure) 0 3.5px, transparent 3.5px); }

#log .sstrike .lthumb.lactor { box-shadow: 0 0 0 1px rgba(230, 144, 46, 0.45); }
#log .sstrike .larrow { color: var(--warn); }
#log .stravel .lthumb.lactor { opacity: .82; box-shadow: 2px 0 0 rgba(74, 163, 224, 0.5); }
#log .sexit .lthumb.lactor { filter: grayscale(0.75) brightness(0.72); border-color: var(--crimline); }
#log .sarena .lthumb { box-shadow: 0 0 0 1px rgba(240, 196, 106, 0.45); }
#log .sreveal .lthumb.lactor { width: 20px; height: 27px; }
#log .saura { border-left-style: dashed; }
#log .saura .lthumb.lactor { border-style: dashed; opacity: .9; }
#log .snote { padding-left: 43px; opacity: .8; font-style: italic; }

#log .lband {
  display: flex; align-items: center; gap: 8px; margin: 11px -10px 6px -10px; padding: 2px 10px;
  color: var(--dim);
}
#log .lband .lk { width: auto; }
#log .lbandn {
  flex: 0 0 auto; font-size: 9px; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 700;
}
#log .lband::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line2); }
#log .lband.kcombat { color: var(--warn); }
#log .lband.kcombat::after { background: rgba(230, 144, 46, 0.35); }
#log .lband.kgame { color: var(--gold); }
#log .lband.kgame .lbandn { font-size: 10px; letter-spacing: 1.8px; }
#log .lband.kgame::after { background: var(--goldline); }
#log .lband.kphase { color: var(--faint); opacity: .8; }

#logpop {
  position: fixed; z-index: 200; width: 216px; display: none; pointer-events: none;
  border-radius: 12px; background: rgba(8, 12, 20, 0.97); border: 1px solid var(--goldline);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.75); padding: 8px; font-size: 11px;
}
#logpop .logpopart {
  width: 100%; height: 190px; border-radius: 8px; background-size: cover; background-position: center;
  background-color: #1a2438; border: 1px solid var(--line);
}
#logpop .logpopname { font-family: Cinzel, Georgia, serif; color: var(--gold); font-size: 12px; margin: 6px 0 3px; }
#logpop .logpoptext { color: var(--dim); line-height: 1.35; max-height: 96px; overflow: hidden; }

.railhead .railtog {
  flex: 0 0 auto; height: 20px; padding: 0 7px; border-radius: 6px;
  font-size: 8px; letter-spacing: 1.2px; text-transform: uppercase;
}
#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, #matchscreen {
  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; }
.msfilters { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.msfind {
  width: 220px; height: 30px; padding: 0 10px; flex: 0 0 auto;
  background: rgba(6, 11, 20, .8); color: var(--text); border: 1px solid #23324c;
  border-bottom-color: #3b5170; border-radius: 0; font-family: inherit; font-size: 12px;
}
.msfind::placeholder { color: var(--faint); }
.msruneset { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.msruneset .msct { width: 24px; cursor: pointer; }
.msruneset .msct:hover { border-color: var(--gold); }
.msct.off { opacity: .32; filter: grayscale(.7); }
.msviews { display: flex; align-items: center; gap: 1px; flex: 0 0 auto; }
.msfilterseg { margin-left: auto; }

.msroster {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px; flex: 1 1 auto; min-height: 0; overflow: hidden; align-content: start;
}
.msroster .msempty.msspan { grid-column: 1 / -1; }
.msrosterpager { flex: 0 0 auto; }
.mschamp {
  position: relative; aspect-ratio: 146 / 206; overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column; justify-content: flex-end;
  border: 1px solid #22304a; background: linear-gradient(180deg, rgba(12, 19, 33, .9), rgba(8, 13, 23, .7));
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px));
}
.mschamp.hide { display: none; }
.mschamp:hover { border-color: #3b5170; }
.mschamp.on { border-color: var(--goldline); box-shadow: 0 0 0 1px rgba(240, 196, 106, .45), 0 0 26px rgba(240, 196, 106, .16); }
.mschampart {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: 50% 34%; opacity: .78;
}
.mschampfade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5, 8, 15, .14) 30%, rgba(5, 8, 15, .86) 68%, rgba(5, 8, 15, .97));
}
.mschamptop { position: relative; display: flex; align-items: flex-start; gap: 4px; padding: 7px; margin-bottom: auto; }
.mschampruns .msct { width: 17px; }
.mschampn {
  margin-left: auto; display: inline-flex; align-items: center; justify-content: center;
  height: 18px; padding: 0 7px; font-size: 11px; font-weight: 800; color: var(--gold);
  background: rgba(6, 11, 20, .88); border: 1px solid #3b5170;
}
.msstarbtn { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; flex: 0 0 auto; color: #26344f; cursor: pointer; }
.msstarbtn svg { width: 100%; height: 100%; }
.msstarbtn.on { color: var(--gold); }
.msstarbtn:hover { color: #f4d391; }
.msstar { width: 30px; }
.mschampfav { margin-left: auto; display: inline-flex; width: 13px; height: 13px; color: var(--gold); flex: 0 0 auto; }
.mschampfav svg { width: 100%; height: 100%; }
.mschamptop .mschampfav + .mschampn { margin-left: 5px; }
.mschamptext { position: relative; padding: 0 9px 9px; display: flex; flex-direction: column; gap: 2px; }
.mschampname {
  font-family: Cinzel, Georgia, serif; font-size: 15px; font-weight: 700;
  letter-spacing: 1.1px; color: #f4d391; line-height: 1.1;
}
.mschampsub { font-size: 10px; color: var(--dim); letter-spacing: .4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mschamp.empty { justify-content: center; align-items: center; border-style: dashed; border-color: #243350; }
.mschamp.empty .mschampart { opacity: .13; filter: grayscale(1); }
.mschamp.empty .mschampfade { background: linear-gradient(180deg, rgba(5, 8, 15, .72), rgba(5, 8, 15, .93)); }
.mschamp.empty .mschamptext { align-items: center; text-align: center; padding-bottom: 0; }
.mschamp.empty .mschampname { color: var(--faint); font-size: 13px; }
.msfirst {
  display: flex; align-items: center; gap: 5px; margin-top: 8px; color: var(--faint);
  font-size: 9px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase;
}
.msfirst svg { width: 11px; height: 11px; }

.mschead {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; flex: 0 0 auto;
  border-bottom: 1px solid var(--line2);
  background: linear-gradient(120deg, rgba(240, 196, 106, .07), transparent 60%);
}
.mscheadart { width: 84px; flex: 0 0 auto; border-color: var(--goldline); box-shadow: 0 0 20px rgba(240, 196, 106, .16); }
.mscheadmeta { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mscheadname {
  font-family: Cinzel, Georgia, serif; font-size: 26px; font-weight: 700;
  letter-spacing: 3px; color: #f4d391; line-height: 1;
}
.mscheaddoms { display: flex; align-items: center; gap: 7px; min-width: 0; }
.mscheaddoms .mslbl { letter-spacing: 1.4px; text-transform: none; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mscheadruns .msct { width: 20px; }
.mscheadstats { display: flex; flex-wrap: wrap; gap: 6px; }
.mscheadstats .mscnt { height: 26px; }
.mscheadstats .mscntn { font-size: 13px; }

.msvars { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; padding: 10px 14px 0; }
.msvar {
  display: flex; flex-direction: column; gap: 7px; padding: 9px 10px; cursor: pointer; flex: 0 0 auto;
  border: 1px solid #22304a; background: linear-gradient(180deg, rgba(12, 19, 33, .92), rgba(8, 13, 23, .66));
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.msvar:hover { border-color: #3b5170; }
.msvar.on {
  border-color: var(--goldline); box-shadow: 0 0 0 1px rgba(240, 196, 106, .35);
  background: linear-gradient(180deg, rgba(240, 196, 106, .08), rgba(8, 13, 23, .66));
}
.msvartop { display: flex; align-items: center; gap: 8px; }
.msvarname { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: .3px; }
.msvarspread { display: flex; align-items: flex-start; gap: 8px; }
.msvarchamp { display: flex; flex-direction: column; gap: 4px; width: 25%; min-width: 0; flex: 0 0 auto; }
.msvarchamp .mslbl { letter-spacing: 1.2px; text-transform: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msvarid { width: 100%; border-color: var(--goldline); }
.msvarbfs { display: flex; gap: 4px; flex: 1; min-width: 0; }
.msvarbfs .msct { width: calc((100% - 8px) / 3); flex: 0 0 auto; }
.msruneline { display: flex; align-items: center; gap: 3px; flex-wrap: nowrap; }
.msvarrunes .msct { width: calc((100% - 33px) / 12); flex: 0 0 auto; }
.msct.msslot, .plrune.empty, .plbfimg.empty { border-style: dashed; border-color: #2f4062; background: rgba(9, 14, 25, .5); }
.msvarfoot { display: flex; align-items: baseline; gap: 14px; }
.msvarnew {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; flex: 0 0 auto;
  border: 1px dashed #2f4062; background: rgba(9, 14, 25, .5); color: var(--faint);
  font-size: 10px; font-weight: 800; letter-spacing: 2.2px; text-transform: uppercase;
}
.msvarnew:hover { border-color: var(--gold); color: var(--gold); }

.msdensein { padding: 0; }
.msdscroll { flex: 1; min-height: 0; overflow: auto; }
table.msdense { border-collapse: collapse; width: 100%; }
.msdense th {
  position: sticky; top: 0; z-index: 2; text-align: left; padding: 7px 12px; white-space: nowrap;
  font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--faint); font-weight: 700;
  background: #0a1019; border-bottom: 1px solid #22304a;
}
.msdense td { padding: 0 12px; height: 44px; white-space: nowrap; border-bottom: 1px solid rgba(29, 42, 66, .6); font-size: 12px; color: #cddaee; }
.msdense tr.msgrp td {
  height: 38px; border-bottom: 1px solid #22304a;
  background: linear-gradient(90deg, rgba(240, 196, 106, .10), rgba(10, 16, 28, .2) 60%, transparent);
}
.msgrpname { display: flex; align-items: center; gap: 9px; }
.msgrpname b { font-family: Cinzel, Georgia, serif; font-size: 14px; font-weight: 700; letter-spacing: 2.6px; color: var(--gold); }
.msgrpname .mslbl { letter-spacing: 1.6px; }
.msgrpart { width: 22px; flex: 0 0 auto; }
.msgrpruns .msct { width: 18px; }
.msdense tr.msrowd { cursor: pointer; }
.msdense tr.msrowd:hover td { background: rgba(30, 44, 70, .35); }
.msdense tr.msrowd.on td { background: rgba(240, 196, 106, .07); }
.msdense tr.msrowd.on .mspin { box-shadow: inset 3px 0 0 -1px var(--gold); }
.mspin { width: 6px; padding: 0 !important; }
.msbname { color: var(--text); font-weight: 700; }
.msdim { color: var(--dim); }
.mslgdcell { display: flex; align-items: center; gap: 8px; }
.msdthumb { width: 22px; flex: 0 0 auto; border-color: var(--goldline); }
.msdbfs { gap: 4px; }
.msdbfs .msct { width: 44px; }
.msdrunes { gap: 10px; }
.msrunegrp { display: inline-flex; align-items: center; gap: 4px; }
.msrunegrp .msct { width: 20px; }
.msrunegrp b { font-family: Consolas, "SF Mono", Menlo, monospace; font-size: 12px; font-weight: 800; color: #cddaee; }
.msstatus { display: flex; align-items: center; gap: 7px; }
.msdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.msdot.ok { background: var(--good); }
.msdot.bad { background: var(--crimson); }
.msdacts .msmanage { justify-content: flex-end; }
.msdacts .msmanage .btn { flex: 0 0 auto; }
.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); }


.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: clamp(330px, 30vw, 460px); flex: 0 0 auto; }
.msrailin { padding: 0 0 12px; overflow: hidden; }
.mssect { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.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); }
.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;
}
.msmanage { display: flex; gap: 6px; flex: 0 0 auto; }
.msmanage .btn { flex: 1; }
.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; }
.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); }
.bbpip.side { background: linear-gradient(180deg, #6f86ad, #33455f); border-color: #52688c; }
.bbsidestep {
  display: flex; align-items: center; gap: 7px; flex: 0 0 auto;
  padding: 7px 9px; background: rgba(7, 12, 21, .62); border: 1px solid #1b2740;
}
.bbsidestep .mslbl { margin-right: auto; }
.bbsidestep .msnum { min-width: 12px; text-align: center; }

.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; }
.bbsidesect { flex: 1.5; min-width: 0; gap: 6px; }
#builderscreen .bblower .msribt { white-space: nowrap; }
#builderscreen .bblower .msribn { white-space: nowrap; padding-left: 8px; }
.bbside { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
.bbside > .msct { width: 100%; height: auto; }
.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: 1 1 auto; min-height: 0; align-content: start; justify-items: stretch;
}
.msrunei { width: 16px; flex: 0 0 auto; }
.msrunei.big { width: 24px; }
.msrunei.clicky { cursor: pointer; }
.msrunei.clicky:hover { border-color: var(--gold); }
.bbfieldrow { gap: 12px; }
.bbfieldmeta { flex: 0 0 auto; max-width: 96px; }
.bbfields { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; height: 100%; }
.bbfields .bbslotpick { width: auto; flex: 1 1 0; min-width: 0; height: auto; align-self: center; }
.bbfields .bbslotpick > .msct.land { width: 100%; height: auto; }
.bbpg.off { opacity: .3; cursor: default; }
.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; }

dialog.bbio { display: flex; flex-direction: column; gap: 10px; width: min(720px, 92vw); }
dialog.bbio:not([open]) { display: none; }
dialog.bbio textarea {
  width: 100%; min-height: 200px; box-sizing: border-box; resize: vertical;
  background: #0a101d; color: #dde5f2; user-select: text; -webkit-user-select: text;
}
dialog.bbio .bbioname {
  width: 100%; box-sizing: border-box; padding: 7px 10px; font: inherit; font-size: 13px;
  color: var(--text); background: #0a101d; border: 1px solid var(--line); border-radius: 8px;
}
dialog.bbio .bbioname:focus { outline: none; border-color: var(--gold); }
dialog.bbio .bbioname::placeholder { color: var(--faint); }
dialog.bbio .bbhead { align-items: center; }
dialog.bbio .bbhead .btn { margin-left: auto; }
.bbiocode {
  font-family: Consolas, monospace; font-size: 11px; line-height: 1.5; word-break: break-all;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #0a101d; color: #dde5f2;
}
.bbioprevwrap { min-height: 44px; }
.bbiopreview { display: flex; flex-direction: column; gap: 8px; }
.bbiostats { display: flex; flex-wrap: wrap; gap: 6px; }
.bbiostat {
  display: flex; flex-direction: column; gap: 2px; padding: 5px 9px; min-width: 76px;
  border: 1px solid var(--line); border-radius: 8px; background: rgba(9, 14, 25, .6);
}
.bbiostat.bad { border-color: var(--crimline); }
.bbiostat.bad .bbiostatv { color: var(--crimtxt); }
.bbiostatv { font-size: 13px; font-weight: 800; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.bbiolist { display: flex; flex-direction: column; gap: 2px; max-height: 120px; overflow-y: auto; font-size: 12px; }
.bbiolist.bad .bbioline { color: var(--crimtxt); }
.bbiolist.warn .bbioline { color: var(--warn); }
.bbioline { font-family: Consolas, monospace; font-size: 11px; }
dialog.bbio .note.good { color: var(--gold); }

#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; }
}

.fxcine {
  position: fixed; inset: 0; z-index: 99; pointer-events: auto; cursor: pointer;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.fxcine-bg {
  position: absolute; inset: 0;
  background: radial-gradient(52vw 52vh at 50% 44%, rgba(10, 16, 30, .30), rgba(2, 4, 9, .72));
  backdrop-filter: blur(3px) saturate(.7);
}
.fxcine-stage {
  position: relative; z-index: 3;
  width: min(78vw, 1000px); height: min(74vh, 740px); overflow: visible;
  will-change: transform, filter;
  display: flex; align-items: center; justify-content: center;
}
.fxcine-media {
  position: relative; z-index: 2;
  max-width: 100%; max-height: 100%; width: 100%; height: 100%;
  border-radius: 10px; background: transparent;
  filter: drop-shadow(0 18px 60px rgba(0, 0, 0, .75));
}
.fxcine-art {
  position: relative; z-index: 2; height: 100%; aspect-ratio: 744 / 1039;
  background-size: cover; background-position: center; overflow: hidden;
  border-radius: 14px; border: 1px solid var(--goldline);
  box-shadow: 0 0 90px rgba(240, 196, 106, .28), 0 24px 60px rgba(0, 0, 0, .8);
}
.fxcine-glare {
  position: absolute; inset: -20% -60%; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 245, 220, 0), rgba(255, 245, 220, .55) 48%, rgba(255, 245, 220, 0));
}
.fxcine-aura {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
.fxcine-rings {
  height: 74%; aspect-ratio: 1; overflow: visible;
  transform-box: view-box; transform-origin: center;
  filter: drop-shadow(0 0 6px rgba(240, 196, 106, .45));
}
.fxcine-ring { transform-box: view-box; transform-origin: center; }
.fxcine-ring.outer { opacity: .5; }
.fxcine-ring.inner { opacity: .68; }
.fxcine-ringline {
  fill: none; stroke: #f0c46a; stroke-width: .5;
}
.fxcine-ringline.thin { stroke: rgba(240, 196, 106, .45); stroke-width: .28; }
.fxcine-rune {
  fill: none; stroke: #ffe1a0; stroke-width: .62; stroke-linecap: round; stroke-linejoin: round;
}
.fxcine-tick { fill: none; stroke: rgba(240, 196, 106, .55); stroke-width: .3; }
.fxcine-bloom {
  position: absolute; left: 50%; top: 50%; width: 74%; aspect-ratio: 1;
  transform: translate(-50%, -50%); mix-blend-mode: screen;
  background: radial-gradient(closest-side,
    rgba(255, 244, 214, .20), rgba(240, 196, 106, .09) 46%, rgba(240, 196, 106, 0) 74%);
}
.fxcine-flash {
  position: fixed; inset: 0; z-index: 6; pointer-events: none; opacity: 0;
  background: radial-gradient(40vmax 40vmax at 50% 46%, #fffaf0, rgba(255, 244, 214, .55) 46%, rgba(255, 236, 190, 0) 78%);
  mix-blend-mode: screen;
}
.fxcine-shock {
  position: fixed; left: 50%; top: 46%; width: 62vmin; height: 62vmin; z-index: 5;
  border-radius: 50%; pointer-events: none; opacity: 0;
  border: 3px solid rgba(255, 246, 222, .95);
  box-shadow: 0 0 40px rgba(240, 196, 106, .8), inset 0 0 40px rgba(240, 196, 106, .5);
}
.fxcine-shock.thin { border-width: 1px; border-color: rgba(240, 196, 106, .8); box-shadow: 0 0 26px rgba(240, 196, 106, .55); }
.fxcine-mote {
  position: fixed; bottom: -8vh; z-index: 1; pointer-events: none; opacity: 0; border-radius: 40%;
  background: linear-gradient(180deg, rgba(255, 248, 226, 0), rgba(255, 240, 205, .95), rgba(240, 196, 106, 0));
  will-change: transform, opacity;
}
.fxcine-mote.front { z-index: 4; filter: blur(2.5px); }
.fxcine-ghost {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; pointer-events: none;
  font-family: Cinzel, Georgia, serif; font-size: 30px; font-weight: 700; letter-spacing: 9px;
  color: #fffaf0; white-space: nowrap; opacity: 0; text-shadow: 0 0 30px rgba(255, 244, 214, .9);
}
.fxcine-plate {
  position: fixed; left: 50%; bottom: 11vh; transform: translateX(-50%); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 0 20px; white-space: nowrap; pointer-events: none; text-align: center;
}
.fxcine-rule {
  width: 260px; height: 1px; transform-origin: 50% 50%;
  background: linear-gradient(90deg, rgba(240, 196, 106, 0), rgba(255, 240, 205, .95) 50%, rgba(240, 196, 106, 0));
  box-shadow: 0 0 12px rgba(240, 196, 106, .7);
}
.fxcine-name {
  position: relative; font-family: Cinzel, Georgia, serif; font-size: 30px; font-weight: 700; letter-spacing: 9px;
  color: #fff4dc; text-shadow: 0 0 26px rgba(240, 196, 106, .8), 0 0 60px rgba(240, 196, 106, .35), 0 3px 12px rgba(0, 0, 0, .95);
}
.fxcine-ch { display: inline-block; will-change: transform, opacity, filter; }
.fxcine-sub { display: flex; align-items: center; gap: 14px; }
.fxcine-title {
  font-family: Cinzel, Georgia, serif; font-style: italic; font-size: 14px; letter-spacing: 4px;
  color: var(--gold); text-shadow: 0 2px 10px rgba(0, 0, 0, .9);
}
.fxcine-might {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 11px; border-radius: 999px;
  border: 1px solid rgba(240, 196, 106, .5); background: rgba(10, 14, 24, .72);
  box-shadow: 0 0 18px rgba(240, 196, 106, .22);
}
.fxcine-mightn {
  font-family: Cinzel, Georgia, serif; font-size: 17px; font-weight: 700; color: #fff4dc;
  min-width: 15px; text-align: right; font-variant-numeric: tabular-nums;
}
.fxcine-mighti .tbm { font-size: 11px; }
@media (max-width: 760px) {
  .fxcine-name { font-size: 18px; letter-spacing: 4px; }
  .fxcine-title { font-size: 11px; letter-spacing: 2px; }
  .fxcine-rule { width: 180px; }
}
@media (prefers-reduced-motion: reduce) {
  .fxcine { display: none !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 calc(150ms * var(--fxk, 1)) 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 calc(400ms * var(--fxk, 1)) 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; }
#choicemenu.band {
  width: min(1120px, 86vw); max-width: none; padding: 8px 14px 6px;
  flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 2px;
}
#choicemenu.band .menusrc { margin: 0; }
#choicemenu.band .menutitle { border: none; padding: 0; font-size: 12px; }
#choicemenu.band .menuhint, #choicemenu.band .menunote { flex: 0 1 auto; padding: 0; }
#choicemenu.band .menufoot { margin-left: auto; order: 0; padding: 0; }
#choicemenu.band .menufoot .btn { padding: 3px 10px; font-size: 10px; }
#choicemenu.band .choicestrip { flex: 1 0 100%; order: 1; }
#choicemenu.band .choicecard .cs { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#choicemenu.band .choicestrip {
  justify-content: flex-start; gap: 9px; padding: 4px 4px 10px;
  scrollbar-width: thin; scrollbar-color: var(--gold) rgba(240, 196, 106, .08);
}
#choicemenu.band .choicestrip > .choicecard:first-child { margin-left: auto; }
#choicemenu.band .choicestrip > .choicecard:last-child { margin-right: auto; }
#choicemenu.band .choicestrip::-webkit-scrollbar { height: 6px; }
#choicemenu.band .choicestrip::-webkit-scrollbar-track { background: rgba(240, 196, 106, .08); border-radius: 3px; }
#choicemenu.band .choicestrip::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #b9812f, var(--gold), #b9812f); border-radius: 3px;
  box-shadow: 0 0 6px rgba(240, 196, 106, .5);
}
#choicemenu.band .choicecard { width: 76px; gap: 3px; }
#choicemenu.band .choicecard .cart { width: 76px; height: 106px; border-radius: 7px; }
#choicemenu.band .choicecard .cmight { width: 20px; height: 20px; font-size: 11px; right: -5px; bottom: -5px; }
#choicemenu.band .choicecard .ccheck { width: 30px; height: 30px; font-size: 17px; }
#choicemenu.band .choicecard .cn { font-size: 9.5px; }
#choicemenu.band .choicecard .cs { font-size: 8px; }
#choicemenu.band .menutitle { padding-bottom: 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, .choicecard.groupfocus .cart { border-color: #fff3d6; box-shadow: 0 0 22px rgba(255, 243, 214, .45); }
.choicecard.groupfocus { outline: none; }
.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; }
.tbscennotes { font-size: 12px; line-height: 1.45; color: var(--dim); margin-top: 3px; }
.tbscen:has(.tbscennotes) { align-items: flex-start; }
.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; }
.groupfocus { outline: 2px solid #fff3d6; 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); }

.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; }

#homescreen {
  --seamx: 50%;
  --seamc: transparent;
  --seamd: transparent;
  --dim: #a6b7d2;
  --faint: #7188ae;
  --line: #35486b;
  --line2: #26364f;
  background:
    radial-gradient(820px 480px at 6% 108%, rgba(228, 87, 74, .14), transparent 62%),
    radial-gradient(1300px 760px at 44% 44%, #0e1729 0%, #080d18 54%, #03060c 100%);
}
#homescreen .msweave { opacity: .32; }
#homescreen .mspane {
  background:
    linear-gradient(90deg, transparent calc(var(--seamx) - 110px), var(--seamc) var(--seamx), transparent calc(var(--seamx) + 110px)),
    linear-gradient(158deg, #4e6491 0%, #1a2740 46%, #2d3f63 100%);
}
.hmcomet { stroke: var(--accHi); }
.hmembers { fill: var(--accHi); }
.hmflash {
  position: absolute; left: var(--fx-x, 50%); top: var(--fx-y, 50%);
  width: 1180px; height: 1180px; margin: -590px 0 0 -590px;
  pointer-events: none; mix-blend-mode: screen; z-index: 4;
  background: radial-gradient(closest-side, var(--accS90), var(--accS22) 40%, transparent 72%);
}
#homescreen .mspanein {
  background: linear-gradient(178deg, rgba(21, 32, 54, .96), rgba(12, 19, 33, .97));
  box-shadow: inset 0 1px 0 rgba(151, 179, 224, .12), inset 0 -26px 48px rgba(3, 6, 13, .4);
}
#homescreen .mshair {
  background: linear-gradient(90deg, var(--accS90), rgba(228, 87, 74, .35) 34%, rgba(42, 58, 87, .5) 70%, transparent);
}
.hmkeyart { position: absolute; right: 0; top: 0; width: 56%; height: 100%; pointer-events: none; color: var(--acc); opacity: .62; }
.hmkeyart svg { display: block; width: 100%; height: 100%; }
.hmvig {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 100% at 44% 46%, transparent 28%, rgba(2, 5, 10, .78) 100%);
}

.hmrail {
  position: relative; flex: 0 0 auto; height: 58px; display: flex; align-items: center; gap: 18px; padding: 0 34px;
  background: linear-gradient(180deg, rgba(5, 9, 17, .78), rgba(5, 9, 17, 0));
}
.hmmark { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.hmmark > svg { width: 22px; height: 22px; color: var(--acc); }
.hmmarkw { font-family: Cinzel, Georgia, serif; font-size: 13px; font-weight: 700; letter-spacing: 4.4px; color: var(--accHi); }
.hmattune { display: flex; align-items: center; gap: 10px; margin-left: 26px; }
.hmpips { display: flex; align-items: center; gap: 5px; }
.hmui .hmpip {
  width: 34px; height: 34px; padding: 0; border: 0; background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: #445c86; clip-path: none;
  transition: color .16s ease, transform .16s ease;
}
.hmui .hmpip svg { width: 26px; height: 26px; }
.hmui .hmpip:hover { color: var(--p); transform: translateY(-1px); border: 0; }
.hmui .hmpip.on { color: var(--p); filter: drop-shadow(0 0 9px var(--pS90)); }
.hmrailstats { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.hmstat {
  display: flex; align-items: baseline; gap: 6px; height: 24px; padding: 0 11px; flex: 0 0 auto;
  background: rgba(16, 25, 43, .94); border: 1px solid var(--line); border-left: 2px solid var(--accS90);
  transform: skewX(-14deg);
}
.hmstat > * { transform: skewX(14deg); }
.hmstatn { font-family: Consolas, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 800; color: var(--text); }
.hmstatl { font-size: 8.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--faint); font-weight: 700; }

.hmbody {
  position: relative; flex: 1; min-height: 0; display: flex; gap: 32px;
  padding: 30px 34px 28px; overflow-y: auto; overflow-x: hidden;
}
.hmcol { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.hmleft { flex: 1; }
.hmright { width: clamp(336px, 27vw, 404px); flex: 0 0 auto; gap: 16px; }

.hmhero { flex: 0 0 auto; margin-bottom: 26px; }
.hmheroover { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.hmheroover .mslbl { color: var(--acc); }
.hmheroline { height: 1px; width: 92px; background: linear-gradient(90deg, var(--accS90), transparent); }
.hmui .hmplay {
  position: relative; overflow: hidden; flex: 0 0 auto; margin-top: 30px;
  display: flex; align-items: center; gap: 20px; text-align: left;
  width: min(548px, 100%); height: 96px; padding: 0 24px 0 22px;
  border: 1px solid var(--acc); cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 400; letter-spacing: normal; text-transform: none;
  background: linear-gradient(100deg, var(--accS40) 0%, rgba(13, 21, 36, .94) 66%);
  clip-path: polygon(18px 0, 100% 0, calc(100% - 18px) 100%, 0 100%);
  transition: transform .2s cubic-bezier(.2, .8, .3, 1), border-color .2s ease;
}
.hmui .hmplay:hover { transform: translateY(-2px); border-color: var(--accHi); }
.hmui .hmplay:active { transform: translateY(0); }
.hmplayfill {
  position: absolute; inset: 0; transform: translateX(-101%);
  background: linear-gradient(100deg, var(--accHi) 0%, var(--acc) 52%, var(--accLo) 100%);
  transition: transform .38s cubic-bezier(.2, .8, .3, 1);
}
.hmui .hmplay:hover .hmplayfill { transform: none; }
.hmplayseal, .hmplaytext, .hmplaygo { position: relative; }
.hmplayseal { width: 54px; height: 54px; flex: 0 0 auto; color: var(--accHi); transition: color .2s ease; }
.hmplayseal svg { display: block; width: 100%; height: 100%; }
.hmplaytext { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.hmplayw {
  font-family: Cinzel, Georgia, serif; font-size: 34px; font-weight: 700;
  letter-spacing: 11px; line-height: 1; color: var(--accHi); transition: color .2s ease;
}
.hmplaytrack { display: flex; gap: 4px; }
.hmplaypip {
  width: 9px; height: 11px; flex: 0 0 auto; background: var(--acc); opacity: .34;
  clip-path: polygon(50% 0, 100% 26%, 100% 74%, 50% 100%, 0 74%, 0 26%);
  transition: background .22s ease, opacity .22s ease;
}
.hmui .hmplay:hover .hmplaypip { background: #140d02; opacity: .92; }
.hmplaysub {
  font-size: 10px; font-weight: 800; letter-spacing: 2.2px; text-transform: uppercase;
  color: var(--dim); transition: color .2s ease;
}
.hmplaygo { margin-left: auto; display: flex; color: var(--acc); transition: color .2s ease; }
.hmplaygo svg { width: 22px; height: 22px; }
.hmui .hmplay:hover .hmplayseal,
.hmui .hmplay:hover .hmplayw,
.hmui .hmplay:hover .hmplaygo { color: #140d02; }
.hmui .hmplay:hover .hmplaysub { color: rgba(20, 13, 2, .74); }

@media (prefers-reduced-motion: reduce) {
  .hmui .hmplay, .hmplayfill, .hmplaypip { transition: none; }
}

.hmwordmark {
  font-family: Cinzel, Georgia, serif; font-weight: 700; font-size: clamp(58px, 6.1vw, 88px);
  line-height: .96; letter-spacing: clamp(9px, .97vw, 14px); white-space: nowrap;
  background: linear-gradient(178deg, var(--accHi) 4%, var(--acc) 46%, var(--accLo) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 40px var(--accS40)) drop-shadow(0 3px 14px rgba(2, 5, 11, .82));
}

.hmribbon {
  display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 16px; flex: 0 0 auto;
  border-bottom: 1px solid var(--line2); background: linear-gradient(102deg, var(--accS22) 0 22%, transparent 46%);
}
.hmribt { font-family: Cinzel, Georgia, serif; font-size: 10.5px; letter-spacing: 3px; text-transform: uppercase; color: var(--accHi); }
.hmribline, .plribline { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(62, 82, 119, .85), transparent); }
.hmplates {
  display: flex; gap: 14px; margin-top: auto; padding-top: 26px; flex: 0 0 auto;
  filter: drop-shadow(0 12px 20px rgba(2, 5, 11, .58));
}
.hmui .hmplate {
  position: relative; flex: 1 1 0; min-width: 0; min-height: 158px; height: auto; padding: 15px 16px 14px;
  text-align: left; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
  font-family: inherit; font-size: 13px; font-weight: 400; letter-spacing: normal; text-transform: none;
  color: var(--text); border: 1px solid var(--line);
  background:
    linear-gradient(90deg, transparent calc(var(--seamx) - 78px), var(--seamd) var(--seamx), transparent calc(var(--seamx) + 78px)),
    linear-gradient(158deg, rgba(74, 95, 136, .62) 0%, rgba(25, 38, 64, .95) 48%, rgba(45, 62, 94, .62) 100%);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  transition: border-color .16s ease, transform .16s ease, background .16s ease;
}
.hmui .hmplate:hover {
  border-color: var(--acc); transform: translateY(-3px); color: var(--text);
  background:
    linear-gradient(90deg, transparent calc(var(--seamx) - 78px), var(--seamd) var(--seamx), transparent calc(var(--seamx) + 78px)),
    linear-gradient(158deg, rgba(96, 121, 167, .7), rgba(31, 47, 78, .96));
}
.hmplateico { width: 24px; height: 24px; color: var(--acc); }
.hmplatet { font-family: Cinzel, Georgia, serif; font-size: 15.5px; font-weight: 700; letter-spacing: 3.2px; color: var(--accHi); }
.hmplated { font-size: 11.5px; color: var(--dim); line-height: 1.45; }
.hmplatefoot { margin-top: auto; display: flex; align-items: baseline; gap: 6px; }
.hmplaten { font-family: Consolas, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 800; color: var(--text); }
.hmplatel { font-size: 8.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.hmplatelocal { position: absolute; top: 0; right: 0; padding: 4px 21px 5px 10px; font-size: 7.5px; letter-spacing: 1.6px; font-weight: 800; color: var(--faint); }

.hmrpane { flex: 1 1 0; min-height: 0; }
.hmrpane .mspanein { padding: 0; }
.hmrbody { padding: 14px 16px 15px; display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; }
.hmresumehead { display: flex; align-items: baseline; gap: 10px; }
.hmlegends { display: flex; align-items: center; gap: 10px; }
.hmface { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.hmface.flip { flex-direction: row-reverse; }
.hmface .hmfacea { width: 32px; flex: 0 0 auto; }
.hmfacel {
  min-width: 0; font-family: Cinzel, Georgia, serif; font-size: 11.5px; letter-spacing: 1.1px;
  color: var(--accHi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hmresumen { font-family: Cinzel, Georgia, serif; font-size: 19px; font-weight: 700; letter-spacing: 1.6px; color: var(--text); }
.hmresumev { font-family: Cinzel, Georgia, serif; font-size: 12px; letter-spacing: 2px; color: var(--faint); }
.hmmetarow { display: flex; flex-wrap: wrap; gap: 6px; }
.hmmchip {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px;
  border: 1px solid #2d3e5e; background: rgba(18, 28, 47, .92);
  font-size: 9.5px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: #93a6c6;
}
.hmmchip.warn { border-color: var(--crimline); color: var(--crimtxt); }
.hmscores { display: flex; flex-direction: column; gap: 7px; }
.hmscore { display: flex; align-items: center; gap: 9px; }
.hmscoren {
  width: 74px; flex: 0 0 auto; font-size: 9.5px; font-weight: 800; letter-spacing: 1.4px;
  text-transform: uppercase; color: #93a6c6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hmscorev {
  width: 36px; flex: 0 0 auto; text-align: right; font-family: Consolas, "SF Mono", Menlo, monospace;
  font-variant-numeric: tabular-nums; font-size: 12.5px; font-weight: 800; color: var(--text);
}
.hmscorev i { font-style: normal; font-size: 9.5px; color: var(--faint); }
.hmtrackbar { position: relative; flex: 1; height: 4px; background: rgba(38, 54, 84, .95); }
.hmtrackfill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--accLo), var(--acc)); }
.hmscore.foe .hmtrackfill { background: linear-gradient(90deg, #45598a, #7590c0); }
.hmtrackpip { position: absolute; top: -3px; width: 1px; height: 10px; background: rgba(66, 88, 127, .9); }
.hmempty { font-size: 11.5px; color: var(--faint); font-style: italic; line-height: 1.45; }
.hmempty.bad { color: var(--crimtxt); font-style: normal; }
.hmbtnrow { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.hmui .hmbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 32px; padding: 0 16px;
  border: 1px solid var(--line); background: rgba(20, 31, 52, .94); color: var(--dim); cursor: pointer;
  font-family: inherit; font-size: 10.5px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.hmui .hmbtn:hover { color: var(--text); border-color: var(--acc); }
.hmui .hmbtn svg { width: 13px; height: 13px; }
.hmui .hmbtn.acc { color: var(--accHi); border-color: var(--accLine); background: linear-gradient(180deg, var(--accS40), rgba(16, 25, 43, .92)); }
.hmui .hmbtn:disabled { opacity: .35; cursor: not-allowed; }

.hmtables { display: flex; flex-direction: column; gap: 7px; filter: drop-shadow(0 4px 9px rgba(2, 5, 11, .45)); }
.hmtable {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #2d3e5e;
  background: linear-gradient(180deg, rgba(24, 36, 60, .94), rgba(14, 22, 38, .9)); cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.hmtable:hover { border-color: var(--acc); }
.hmtable.full { cursor: default; opacity: .55; }
.hmtavatar {
  width: 26px; height: 26px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); color: var(--acc);
}
.hmtavatar svg { width: 15px; height: 15px; }
.hmtmeta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hmtname { font-size: 12.5px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hmtsub { font-size: 10px; color: var(--faint); letter-spacing: .4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hmtjoin { margin-left: auto; font-size: 9px; font-weight: 800; letter-spacing: 1.6px; color: var(--acc); }


@media (max-width: 1340px) {
  .hmbody { gap: 22px; padding: 22px 24px 22px; }
  .hmrail { padding: 0 24px; gap: 12px; }
  .hmattune { margin-left: 12px; }
  .hmhero { margin-bottom: 18px; }
  .hmplates { gap: 10px; padding-top: 18px; }
  .hmui .hmplay { height: 86px; }
}
@media (max-height: 820px) {
  .hmhero { margin-bottom: 16px; }
  .hmui .hmplate { min-height: 132px; }
  .hmui .hmplay { height: 80px; margin-top: 20px; }
  .hmplayw { font-size: 28px; letter-spacing: 8px; }
  .hmplayseal { width: 44px; height: 44px; }
}
.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); }
.msseatlbl {
  font-family: Cinzel, Georgia, serif; font-size: 13px; font-weight: 700;
  letter-spacing: 3px; color: #f4d391;
}
.msgo {
  position: relative; flex: 0 0 auto; display: flex; flex-direction: column;
  align-items: center; gap: 6px; padding: 0 18px 18px;
}
.msgo .btn.big { width: min(420px, 100%); margin-top: 0; }
.msgonote { font-size: 11px; color: var(--crimtxt); text-align: center; }

#noticetoast {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 200; max-width: min(680px, calc(100vw - 32px));
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 10px 9px 14px; border-radius: 12px;
  background: rgba(14, 18, 28, 0.96); border: 1px solid var(--goldline);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
  color: #ffcf7a; font-size: 12px; font-weight: 700; line-height: 1.45;
  animation: noticein 180ms ease-out;
}
#noticetoast .noticetext { flex: 1 1 auto; min-width: 0; }
#noticetoast .noticeclose {
  flex: 0 0 auto; background: none; border: none; cursor: pointer;
  color: var(--dim); font-size: 16px; line-height: 1; padding: 1px 4px; border-radius: 6px;
}
#noticetoast .noticeclose:hover { color: var(--gold); background: rgba(240, 196, 106, 0.12); }
@keyframes noticein { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }

#log .lfold { cursor: pointer; }
#log .lfold:hover { background: rgba(240, 196, 106, 0.06); }
#log .lfoldn {
  flex: 0 0 auto; align-self: center; margin-left: 4px; padding: 0 5px;
  font-size: 9px; font-weight: 700; line-height: 15px; color: var(--gold2);
  border: 1px solid var(--goldline); border-radius: 7px;
  user-select: none; -webkit-user-select: none;
}
#log .lfold:hover .lfoldn { color: var(--gold); border-color: var(--gold); }
#log .lfoldn.on { background: rgba(240, 196, 106, 0.16); color: var(--gold); }
#log .lsep { color: var(--faint); opacity: .7; padding: 0 1px; }
#log .ltname { color: #d8e2f2; font-weight: 700; }
#log .entry.lsub {
  margin-left: 14px; margin-bottom: 2px; padding-top: 2px; padding-bottom: 2px;
  opacity: .78; border-left-color: var(--line2);
}

.trtabs { display: flex; gap: 8px; margin: 0 0 14px; flex-wrap: wrap; }
.trtabs .btn { min-width: 110px; }
.trpanel { display: flex; flex-direction: column; gap: 12px; }
.trgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.trfield { display: flex; flex-direction: column; gap: 5px; }
.trfield select { width: 100%; }
.trlist { display: flex; flex-direction: column; gap: 8px; }
.tritem { padding: 10px 12px; border: 1px solid rgba(201, 163, 79, .25); background: rgba(10, 16, 30, .45); }
.tritem .disp { font-size: 15px; }
.trmuted { opacity: .7; }

.rvrating {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 14px; border: 1px solid var(--goldline); background: rgba(10, 16, 30, .55);
}
.rvratleft { display: flex; flex-direction: column; gap: 2px; }
.rvratv { font-size: 28px; color: var(--gold); line-height: 1; }
.rvspark { width: 160px; height: 34px; }
.rvsparkline { fill: none; stroke: var(--gold); stroke-width: 1.5; }
.rvanchors { margin-left: auto; }
.rvhist { display: flex; gap: 6px; flex-wrap: wrap; flex: 1 0 100%; }
.rvhchip {
  font-size: 11px; padding: 2px 7px; border: 1px solid var(--line);
  border-radius: 9px; color: var(--dim);
}
.rvhchip.rvwin { color: var(--good); border-color: rgba(70, 209, 131, .45); }
.rvhchip.rvloss2 { color: var(--crimtxt); border-color: var(--crimline); }

.rvitem { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; }
.rvitem .disp { grid-column: 1; }
.rvitem .mslbl { grid-column: 1; }
.rvitem .btn { grid-column: 2; grid-row: 1 / span 2; }

.rvgames { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.rvgame { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; }
.rvgameacts { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.rvbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rvpill {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; padding: 2px 8px;
  border: 1px solid var(--line); border-radius: 9px; color: var(--dim);
}
.rvpill.rvwin { color: var(--good); border-color: rgba(70, 209, 131, .45); }
.rvpill.rvloss2 { color: var(--crimtxt); border-color: var(--crimline); }

.rvstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.rvstat { padding: 10px 12px; border: 1px solid var(--line2); background: rgba(10, 16, 30, .45); }
.rvstatv { font-size: 22px; color: var(--text); line-height: 1.1; }
.rvstat.rvblunder .rvstatv { color: var(--crimtxt); }
.rvstat.rvmistake .rvstatv { color: var(--warn); }

.rvcurve { display: flex; flex-direction: column; gap: 6px; }
.rvhead { display: flex; flex-direction: column; gap: 2px; }
.rvsvg { border: 1px solid var(--line2); background: rgba(6, 10, 18, .6); padding: 6px; }
.rvchart { display: block; width: 100%; height: auto; }
.rvgrid { stroke: var(--line2); stroke-width: 1; }
.rvmid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 5 5; }
.rvarea { fill: rgba(240, 196, 106, .12); stroke: none; }
.rvline { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linejoin: round; }
.rvdot { fill: var(--gold2); stroke: var(--bg0); stroke-width: 1.5; cursor: pointer; }
.rvdot.rvblunder { fill: var(--crimson); }
.rvdot.rvmistake { fill: var(--warn); }
.rvdot.rvunscored { fill: var(--faint); }
.rvdot.rvend { fill: var(--azure); cursor: default; }
.rvaxis { display: flex; justify-content: space-between; font-size: 11px; }

.rvlist { display: flex; flex-direction: column; gap: 8px; }
.rvrow { padding: 10px 12px; border: 1px solid var(--line2); border-left-width: 3px; background: rgba(10, 16, 30, .45); }
.rvrow.rvblunder { border-left-color: var(--crimson); }
.rvrow.rvmistake { border-left-color: var(--warn); }
.rvrow.rvfine { border-left-color: var(--line); }
.rvrow.rvunscored { border-left-color: var(--faint); opacity: .75; }
.rvrowhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rvloss { font-weight: 700; font-size: 15px; min-width: 62px; color: var(--dim); }
.rvrow.rvblunder .rvloss { color: var(--crimtxt); }
.rvrow.rvmistake .rvloss { color: var(--warn); }
.rvwhere { font-size: 11px; }
.rvrowhead .btn { margin-left: auto; }
.rvcmp { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-top: 8px; }
.rvopt { padding: 8px 10px; border: 1px solid var(--line2); font-size: 13px; }
.rvopt.rvchosen { border-color: var(--azline); }
.rvopt.rvbest { border-color: var(--goldline); }
.rvmore { margin-top: 8px; font-size: 12px; }
.rvmore summary { cursor: pointer; color: var(--dim); }
.rvcands { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.rvcand { display: flex; gap: 8px; align-items: baseline; }
.rvcandv { color: var(--gold); font-weight: 700; min-width: 46px; }
.rvcandn { margin-left: auto; font-size: 11px; }

.revbar {
  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(--goldline);
}
.revbar .revnote { color: var(--dim); font-size: 11px; }
.revbar button { padding: 2px 9px; font-size: 10px; }
.ovrev { border-top: none; background: none; padding: 4px 0; justify-content: center; flex-wrap: wrap; }

#trainerscreen { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
#trainerscreen > .mspane { flex: 1; min-height: 0; }
#trainerscreen .trpanel:has(.lab) { flex: 1; min-height: 0; }

.lab {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; gap: 12px; padding-right: 6px;
}
.lab .menuerr { cursor: pointer; }
.labhead, .mghead { display: flex; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line2); }
.labhead { margin-top: 8px; padding-bottom: 5px; }
.labhead h2, .mghead h2 {
  font-family: Cinzel, Georgia, serif; font-size: 14px; font-weight: 600;
  letter-spacing: 2.6px; text-transform: uppercase; color: var(--gold);
}
.labfields { display: flex; gap: 8px; flex-wrap: wrap; }
.labsum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.labstat {
  display: flex; flex-direction: column; gap: 3px; padding: 8px 11px;
  border: 1px solid var(--line2); background: rgba(10, 16, 30, .5);
}
.labstatv { font-size: 13px; color: var(--text); }

.labshares { display: flex; flex-direction: column; gap: 6px; }
.labshare { display: flex; align-items: center; gap: 11px; }
.labface {
  width: 40px; height: 40px; object-fit: cover; object-position: 50% 22%;
  border: 1px solid var(--goldline); flex: 0 0 auto; border-radius: 2px;
}
.labsharebody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.labsharetop { display: flex; align-items: baseline; gap: 10px; }
.labsharename { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.labsharepct { margin-left: auto; color: var(--gold); font-size: 12px; }
.labtrack { height: 7px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line2); overflow: hidden; }
.labfill { height: 100%; background: linear-gradient(90deg, var(--gold2), var(--gold)); }

.lablists { display: flex; flex-direction: column; gap: 7px; }
.lablist {
  display: flex; align-items: center; gap: 11px; padding: 8px 11px;
  border: 1px solid rgba(201, 163, 79, .22); background: rgba(10, 16, 30, .45);
}
.lablistbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lablistname { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.labshareval { color: var(--gold); font-size: 13px; width: 58px; text-align: right; flex: 0 0 auto; }
.labtuned { color: var(--gold); margin-top: 2px; }
.labacts { display: flex; gap: 7px; flex-wrap: wrap; flex: 0 0 auto; }

.labblock { display: flex; flex-direction: column; gap: 7px; }
.labscroll { overflow-x: auto; max-width: 100%; }
.labmatrix, .labtable { border-collapse: collapse; font-size: 12px; }
.labmatrix th, .labtable th {
  font-size: 9px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--dim);
  font-weight: 700; padding: 5px 7px; text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--line2);
}
.labmatrix .labcorner { color: var(--faint); }
.labmatrix .labcol { text-align: center; padding: 4px; }
.labmatrix .labrow { display: table-cell; }
.labmatrix .labrow, .labtable .labname {
  display: table-cell; white-space: nowrap; color: var(--text);
  font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 400;
}
.labchip {
  width: 22px; height: 22px; object-fit: cover; object-position: 50% 20%;
  border: 1px solid var(--goldline); vertical-align: middle; margin-right: 6px; border-radius: 2px;
}
.labmatrix .labcell {
  padding: 6px 9px; text-align: center; font-family: Consolas, "SF Mono", Menlo, monospace;
  font-variant-numeric: tabular-nums; border: 1px solid rgba(0, 0, 0, .35); color: var(--text); cursor: default;
}
.labmatrix th.labfw, .labmatrix td.labfw { border-left: 2px solid var(--goldline); font-weight: 700; }
.labtable td {
  padding: 6px 9px; border-bottom: 1px solid var(--line2); color: var(--text);
}
.labtable td.msnum { text-align: right; }
.labtable tr:hover td { background: rgba(255, 255, 255, .035); }

.labbest { display: flex; gap: 14px; align-items: stretch; }
.labbestart {
  width: 92px; height: 128px; object-fit: cover; object-position: 50% 18%;
  border: 1px solid var(--goldline); flex: 0 0 auto;
}
.labbestbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.labbesttitle { font-family: Cinzel, Georgia, serif; font-size: 16px; color: var(--text); }
.labbestwr { font-size: 24px; color: var(--gold); line-height: 1; }
.labbestwr .labci { font-size: 12px; color: var(--dim); }
.labchanges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.labchg {
  font-size: 11px; padding: 2px 7px; border: 1px solid var(--line2);
  background: rgba(10, 16, 30, .6); color: var(--dim);
}
.labchg.up { color: var(--good); border-color: rgba(70, 209, 131, .4); }
.labchg.down { color: var(--crimtxt); border-color: var(--crimline); }
.labper { display: flex; flex-direction: column; gap: 5px; }
.labperrow { display: flex; align-items: center; gap: 9px; }
.labpername { font-size: 12px; color: var(--dim); width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.labperrow .labtrack { flex: 1; }
.labperval { width: 54px; text-align: right; color: var(--text); font-size: 12px; }

.labrun { display: flex; flex-direction: column; gap: 12px; }
.labnum {
  width: 100%; height: 30px; padding: 0 9px; background: rgba(6, 11, 20, .8);
  color: var(--text); border: 1px solid #23324c; font-family: inherit; font-size: 12px;
}
.labjobs { display: flex; flex-direction: column; gap: 6px; }
.labjob { padding: 7px 10px; border: 1px solid var(--line2); background: rgba(10, 16, 30, .45); }
.labjob.running { border-color: var(--goldline); }
.labjobhead { display: flex; align-items: baseline; gap: 10px; }
.labjobkind { font-size: 12px; color: var(--text); text-transform: capitalize; }
.labjobstatus {
  margin-left: auto; font-size: 9px; letter-spacing: 1.8px; text-transform: uppercase; font-weight: 700;
}
.labjobstatus.running { color: var(--gold); }
.labjobstatus.done { color: var(--good); }
.labjobstatus.failed { color: var(--crimtxt); }
.labjobprog { font-size: 11px; color: var(--dim); margin-top: 3px; }

#metagamescreen .labbody, .labbody {
  display: flex; flex-direction: column; gap: 14px;
  padding: 18px 26px 34px; max-width: 1180px; width: 100%; margin: 0 auto;
}
.mslbl.f { color: var(--faint); }
.mgtabs {
  position: relative; display: flex; align-items: stretch; gap: 0; height: 40px; flex: 0 0 auto;
  padding: 0 22px; border-bottom: 1px solid var(--line2); background: rgba(6, 10, 18, .45);
}
.mgtab {
  display: flex; align-items: center; gap: 8px; padding: 0 14px; font-family: Cinzel, Georgia, serif;
  font-size: 10.5px; letter-spacing: 2.2px; text-transform: uppercase; color: var(--faint);
  border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; background: transparent;
  cursor: pointer; font-weight: 700;
}
.mgtab.on { color: var(--gold); border-bottom-color: var(--gold); }
.mgtab:hover:not(.on) { color: var(--dim); }
.mgtabmeta { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.mgtabmeta .mgsep { width: 1px; height: 14px; background: var(--line2); }
.mgtabmetav { font-size: 12px; color: var(--text); }
.mgtabmetav.dim { color: var(--dim); }

.mgbody {
  display: flex; flex-direction: column; gap: 16px; padding: 18px 22px 30px;
  max-width: 1232px; width: 100%; margin: 0 auto; overflow-y: auto; flex: 1; min-height: 0;
}
.mghead { padding-bottom: 6px; }
.mghead h2 { margin: 0; }
.mghead .sp { margin-left: auto; }

.mgheal { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.mgtile {
  display: flex; flex-direction: column; gap: 5px; padding: 10px 13px 11px;
  border: 1px solid var(--line2); background: rgba(255, 255, 255, .02);
}
.mgtile.warn { border-color: rgba(230, 144, 46, .45); background: rgba(230, 144, 46, .06); }
.mgtile.bad { border-color: var(--crimline); background: rgba(228, 87, 74, .07); }
.mgtilehead { display: flex; align-items: center; gap: 7px; }
.mgtilehead .mslbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mgdot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; }
.mgtilev { font-size: 21px; line-height: 1.05; color: var(--gold); }
.mgtilev.warn { color: var(--warn); }
.mgtilev.bad { color: var(--crimtxt); }
.mgtilem { font-size: 10px; line-height: 1.35; color: var(--faint); text-wrap: pretty; }
.mgalert {
  display: flex; align-items: center; gap: 10px; padding: 9px 13px; font-size: 12px;
  border: 1px solid var(--crimline); background: rgba(228, 87, 74, .08); color: var(--crimtxt);
}

.mgcols { display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.mgmain { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; }
.mgrail { width: 360px; flex: 0 0 auto; display: flex; flex-direction: column; gap: 16px; }

.mgcolhead { display: flex; align-items: flex-end; gap: 11px; padding: 0 12px 5px; }
.mgcolhead > * { flex: 0 0 auto; }
.mgcolhead .mslbl { font-size: 8px; letter-spacing: 1.2px; white-space: nowrap; }
.mgch-rank { width: 20px; }
.mgch-face { width: 40px; }
.mgch-nm { flex: 1 1 auto; min-width: 0; }
.mgch-pip { width: 17px; }
.mgch-rate { width: 182px; display: flex; flex-direction: column; gap: 2px; }
.mgch-wr { width: 54px; text-align: center; }
.mgch-shr { width: 90px; text-align: right; }
.mgruler { display: block; position: relative; height: 12px; margin-left: 52px; }
.mgruler span {
  position: absolute; top: 0; font-size: 8px; color: var(--faint);
  font-family: Consolas, "SF Mono", Menlo, monospace; transform: translateX(-50%);
}
.mgruler i { position: absolute; top: 9px; width: 1px; height: 3px; background: var(--line2); }

.mgtiergrp { display: flex; align-items: center; gap: 12px; margin: 8px 0 2px; }
.mgtiergrp:first-child { margin-top: 2px; }
.mgtierl {
  font-family: Cinzel, serif; font-size: 20px; font-weight: 700; color: var(--gold); width: 22px;
  text-align: center; line-height: 1; padding-bottom: 3px; border-bottom: 2px solid var(--goldline);
}
.mgtierrule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line2), transparent); }

.mgrow {
  display: flex; align-items: center; gap: 11px; height: 44px; padding: 0 12px; text-decoration: none;
  border: 1px solid var(--line2); background: rgba(255, 255, 255, .015); color: var(--text);
  margin-bottom: 4px; cursor: pointer;
}
.mgrow:hover { background: rgba(255, 255, 255, .05); border-color: var(--goldline); }
.mgrow.lead {
  border-color: var(--goldline);
  background: linear-gradient(90deg, rgba(240, 196, 106, .09), rgba(255, 255, 255, .015) 42%);
}
.mgrank { width: 20px; flex: 0 0 auto; font-size: 11px; color: var(--faint); text-align: right; }
.mgface {
  width: 40px; height: 40px; flex: 0 0 auto; object-fit: cover; object-position: 50% 16%;
  border: 1px solid var(--goldline); border-radius: 2px; background: #0b1220;
}
.mgname { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mgnamen { font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mgnamesep { color: var(--faint); margin: 0 5px; }
.mgnamesub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: var(--faint); }
.mgpips { display: flex; gap: 3px; align-items: center; flex: 0 0 auto; }
.mgpip { width: 7px; height: 7px; transform: rotate(45deg); border-radius: 1px; opacity: .9; }
.mgrate { width: 182px; flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.mgratev { width: 44px; text-align: right; font-size: 14px; color: var(--gold); font-family: Consolas, "SF Mono", Menlo, monospace; }
.mgratetk { position: relative; width: 130px; height: 14px; }
.mgratetk::before { content: ""; position: absolute; left: 0; right: 0; top: 6.5px; height: 1px; background: var(--line2); }
.mgratewh { position: absolute; top: 5px; height: 4px; background: rgba(240, 196, 106, .30); border-radius: 2px; }
.mgratedt {
  position: absolute; top: 3.5px; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 2px rgba(10, 16, 29, .9);
}
.mgwr {
  width: 54px; flex: 0 0 auto; text-align: center; font-size: 12px; padding: 4px 0;
  border: 1px solid rgba(0, 0, 0, .35); font-family: Consolas, "SF Mono", Menlo, monospace;
}
.mgshr { width: 90px; flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.mgshrtk { width: 44px; height: 5px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line2); }
.mgshrfl { display: block; height: 100%; background: linear-gradient(90deg, var(--gold2), var(--gold)); }
.mgshrv { width: 40px; text-align: right; font-size: 11px; color: var(--dim); font-family: Consolas, "SF Mono", Menlo, monospace; }

.mgpanel {
  border: 1px solid var(--line2); background: rgba(10, 16, 30, .5); padding: 13px 14px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.mgpanelh { display: flex; align-items: baseline; gap: 10px; }
.mgpanelh h3 {
  margin: 0; font-family: Cinzel, Georgia, serif; font-size: 11px; font-weight: 600;
  letter-spacing: 2.2px; text-transform: uppercase; color: var(--gold);
}
.mgpanelh .mslbl { margin-left: auto; }
.mgpanelnote { font-size: 10.5px; line-height: 1.45; color: var(--faint); text-wrap: pretty; }

.mgcomp { display: flex; flex-direction: column; gap: 7px; }
.mgcomprow { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.mgcompface {
  width: 22px; height: 22px; object-fit: cover; object-position: 50% 16%; flex: 0 0 auto;
  border: 1px solid var(--goldline); border-radius: 2px; background: #0b1220;
}
.mgcompnm { width: 74px; flex: 0 0 auto; font-size: 11.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mgcomptk { flex: 1; height: 6px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line2); }
.mgcompfl { display: block; height: 100%; background: linear-gradient(90deg, var(--gold2), var(--gold)); }
.mgcompv { width: 38px; flex: 0 0 auto; text-align: right; font-size: 11px; color: var(--dim); font-family: Consolas, "SF Mono", Menlo, monospace; }
.mgcomptag { width: 15px; flex: 0 0 auto; text-align: center; font-family: Cinzel, serif; font-size: 10px; font-weight: 700; color: var(--faint); }

.mgmeth { display: flex; flex-direction: column; gap: 6px; }
.mgmethrow { display: flex; align-items: baseline; gap: 10px; font-size: 11.5px; }
.mgmethrow .mslbl { width: 96px; flex: 0 0 auto; font-size: 8.5px; letter-spacing: 1.6px; }
.mgmethrow span:last-child { color: var(--dim); flex: 1; min-width: 0; text-wrap: pretty; }

.mgscale { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mgscaleb { display: flex; }
.mgscaleb span { width: 26px; height: 12px; box-shadow: inset 0 0 0 1px rgba(6, 10, 18, .55); }
.mgscalew { display: flex; flex-direction: column; gap: 3px; }
.mgscalet { position: relative; height: 9px; width: 182px; }
.mgscalet span {
  position: absolute; top: 0; transform: translateX(-50%); font-size: 8px; color: var(--faint);
  font-family: Consolas, "SF Mono", Menlo, monospace;
}
.mgfoot { display: flex; align-items: center; gap: 18px; padding-top: 4px; flex-wrap: wrap; }
.mgfoot .mslbl { letter-spacing: 1.6px; }
.mgkey { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--faint); }
.mgkeysw { width: 22px; height: 12px; box-shadow: inset 0 0 0 1px rgba(6, 10, 18, .55); flex: 0 0 auto; }

.mgmx { border-collapse: separate; border-spacing: 0; }
.mgmx th, .mgmx td { padding: 0; }
.mgmxch { width: 44px; height: 100px; vertical-align: bottom; padding-bottom: 6px; }
.mgmxchin { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.mgmxchn {
  writing-mode: vertical-rl; transform: rotate(180deg); font-size: 10.5px; color: var(--dim);
  letter-spacing: .2px; height: 60px; white-space: nowrap; overflow: hidden;
}
.mgmxchip {
  width: 24px; height: 24px; object-fit: cover; object-position: 50% 16%;
  border: 1px solid var(--goldline); border-radius: 2px; background: #0b1220;
}
.mgmxrh { width: 210px; height: 34px; text-align: left; cursor: pointer; }
.mgmxrhin { display: flex; align-items: center; gap: 8px; padding-right: 10px; }
.mgmxrf {
  width: 24px; height: 24px; flex: 0 0 auto; object-fit: cover; object-position: 50% 16%;
  border: 1px solid var(--goldline); border-radius: 2px; background: #0b1220;
}
.mgmxrn { font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.mgmx .mgmxrt {
  width: 56px; text-align: right; padding-right: 12px; font-size: 11.5px; color: var(--gold);
  font-family: Consolas, "SF Mono", Menlo, monospace;
}
.mgmxc {
  width: 44px; height: 34px; text-align: center; font-size: 11.5px;
  font-family: Consolas, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums;
  box-shadow: inset 0 0 0 1px rgba(6, 10, 18, .55);
}
.mgmxdiag { background: #0b111d; color: var(--faint); }
.mgmx tbody tr:hover .mgmxc {
  box-shadow: inset 0 0 0 1px rgba(6, 10, 18, .55), inset 0 1px 0 var(--gold), inset 0 -1px 0 var(--gold);
}
.mgmx tbody tr:hover .mgmxrn, .mgmx tbody tr:hover .mgmxrt { color: var(--gold); }
.mgmx tbody tr:hover .mgmxrh { box-shadow: inset 2px 0 0 var(--gold); }
.mgmxsep td, .mgmxsep th { border-top: 1px solid var(--goldline); }

.mgcrumb { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--faint); }
.mgcrumb a { color: var(--dim); cursor: pointer; }
.mgcrumb a:hover { color: var(--gold); }
.mgdcols { display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.mgdleft { width: 360px; flex: 0 0 auto; display: flex; flex-direction: column; gap: 14px; }
.mgdright { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }

.mghero { display: flex; gap: 16px; align-items: flex-start; }
.mgheroart {
  width: 150px; height: 210px; flex: 0 0 auto; object-fit: cover; object-position: 50% 14%;
  border: 1px solid var(--goldline); border-radius: 3px; background: #0b1220;
  box-shadow: 0 0 26px rgba(240, 196, 106, .14);
}
.mgherobody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding-top: 2px; }
.mgbadge {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; height: 24px; padding: 0 10px;
  border: 1px solid var(--goldline); background: rgba(240, 196, 106, .10);
}
.mgbadget { font-family: Cinzel, serif; font-size: 13px; font-weight: 700; color: var(--gold); line-height: 1; }
.mgbadgen { font-size: 10px; color: var(--dim); font-family: Consolas, "SF Mono", Menlo, monospace; }
.mgheroname { font-family: Cinzel, Georgia, serif; font-size: 24px; font-weight: 700; letter-spacing: 1px; color: var(--text); line-height: 1.1; }
.mgherolg { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--gold); }
.mgheroev { font-size: 11px; line-height: 1.45; color: var(--faint); text-wrap: pretty; }

.mgstats2 { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.mgstat2 {
  border: 1px solid var(--line2); background: rgba(255, 255, 255, .02); padding: 9px 12px 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.mgstatv { font-size: 20px; color: var(--gold); font-family: Consolas, "SF Mono", Menlo, monospace; line-height: 1.05; }
.mgstatv em { font-style: normal; font-size: 11px; color: var(--faint); margin-left: 4px; }
.mgstatv.plain { color: var(--text); }

.mglst {
  border: 1px solid var(--line2); background: rgba(10, 16, 30, .5); padding: 11px 13px 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.mglstrow { display: flex; align-items: baseline; gap: 10px; font-size: 12px; }
.mglstrow .mslbl { width: 84px; flex: 0 0 auto; font-size: 8.5px; letter-spacing: 1.6px; }
.mglstrow span:last-child { color: var(--text); }
.mgacts { display: flex; gap: 9px; }

.mgspread { display: flex; flex-direction: column; }
.mgaxis { position: relative; height: 16px; margin-left: 150px; }
.mgaxis i { position: absolute; top: 10px; width: 1px; height: 6px; background: var(--line2); }
.mgaxis span {
  position: absolute; top: 0; transform: translateX(-50%); font-size: 8px; color: var(--faint);
  font-family: Consolas, "SF Mono", Menlo, monospace;
}
.mgsrow { display: flex; align-items: center; gap: 9px; height: 30px; cursor: pointer; }
.mgsrow:hover { background: rgba(255, 255, 255, .035); }
.mgsface {
  width: 22px; height: 22px; flex: 0 0 auto; object-fit: cover; object-position: 50% 16%;
  border: 1px solid var(--goldline); border-radius: 2px; background: #0b1220;
}
.mgsnm { width: 108px; flex: 0 0 auto; font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mgsbar { position: relative; flex: 1; min-width: 0; height: 30px; }
.mgsbar::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line); }
.mgsbar i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line2); }
.mgsfill { position: absolute; top: 10px; height: 10px; border-radius: 2px; }
.mgsfill.thin { background-image: repeating-linear-gradient(45deg, rgba(6, 10, 18, .55) 0 2px, transparent 2px 6px); }
.mgsci { position: absolute; top: 13.5px; height: 3px; background: rgba(232, 238, 249, .30); border-radius: 2px; }
.mgsv { width: 46px; flex: 0 0 auto; text-align: right; font-size: 12px; font-family: Consolas, "SF Mono", Menlo, monospace; }
.mgsn { width: 44px; flex: 0 0 auto; text-align: right; font-size: 10px; color: var(--faint); font-family: Consolas, "SF Mono", Menlo, monospace; }

.mgempty {
  border: 1px solid var(--line2); background: rgba(10, 16, 30, .5); padding: 26px 30px 28px;
  display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center;
}
.mgemptyh { font-family: Cinzel, Georgia, serif; font-size: 17px; letter-spacing: 2px; color: var(--gold); }
.mgemptyp { font-size: 12.5px; line-height: 1.55; color: var(--dim); max-width: 470px; text-wrap: pretty; }
.mgpipe { display: flex; align-items: center; gap: 0; flex-wrap: wrap; justify-content: center; }
.mgstep { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 138px; }
.mgstepd {
  width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: rgba(6, 10, 18, .7); font-size: 11px; color: var(--faint);
  font-family: Consolas, "SF Mono", Menlo, monospace;
}
.mgstep.done .mgstepd { border-color: rgba(70, 209, 131, .5); color: var(--good); background: rgba(70, 209, 131, .10); }
.mgstep.now .mgstepd { border-color: var(--gold); color: var(--gold); background: rgba(240, 196, 106, .12); box-shadow: 0 0 14px rgba(240, 196, 106, .28); }
.mgstepn { font-size: 11.5px; color: var(--text); }
.mgsteps { font-size: 9.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.mgstep.done .mgsteps { color: var(--good); }
.mgstep.now .mgsteps { color: var(--gold); }
.mgpipel { width: 42px; height: 1px; background: var(--line2); margin-bottom: 26px; }
.oblobbyname { flex: 1; width: auto; }
.msgonote.bad { color: var(--crimtxt); }
.msgonote { color: var(--dim); }

#matchscreen .mtbody { gap: 12px; flex: 1 1 auto; min-height: 0; align-items: stretch; }
#matchscreen .mspane, #matchscreen .mspanein { min-height: 0; }
#matchscreen .msribt { white-space: nowrap; }
#matchscreen .msribn { white-space: nowrap; padding-left: 10px; }
.mtleft { flex: 0 0 400px; min-width: 0; }
.mtright { flex: 1 1 auto; min-width: 0; }
#matchscreen .mspanein { padding: 13px; gap: 12px; overflow-y: auto; }
.mtside { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.mtlast { padding: 0 18px 6px; color: var(--dim); font-size: 11px; }
.mtbfrow { display: flex; gap: 8px; }
.mtorder { justify-content: center; align-items: center; }
.mtorder .mspane { width: min(760px, 100%); }
.mtbfcell { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; align-items: center; }
.mtbfcell .msct { width: 100%; }
.mtbfname { font-size: 12px; color: var(--text); text-align: center; }
.mtroll { font-size: 12px; color: var(--dim); padding: 2px 0 6px; }
.mtbftile { flex: 1; min-width: 0; cursor: pointer; position: relative; }
.mtbftile.dim { cursor: default; }
.mtchoice { display: flex; gap: 8px; }
.mtchoice .btn { flex: 1; }
.mtcols { display: flex; gap: 10px; min-height: 0; flex: 1 1 auto; }
.mtcol { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.mtlist { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; flex: 1 1 auto; min-height: 0; padding-right: 3px; }
.mtrow {
  display: flex; align-items: center; gap: 7px; padding: 3px 6px; cursor: pointer;
  background: rgba(7, 12, 21, .62); border: 1px solid #1b2740;
}
.mtrow:hover { border-color: var(--goldline); background: rgba(20, 30, 48, .8); }
.mtrow.champ { border-left: 2px solid var(--gold); }
.mtqty { width: 14px; color: var(--gold); font-weight: 700; flex: 0 0 auto; }
.mtart { width: 34px; height: 24px; object-fit: cover; flex: 0 0 auto; border: 1px solid #22304a; }
.mtname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.mtcost { color: var(--dim); flex: 0 0 auto; }
.mtrow .btn { flex: 0 0 auto; }
.mtchamp { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mtfoot { display: flex; align-items: center; gap: 10px; }
.mtnote { font-size: 11px; }
.mtnote.bad { color: var(--crimtxt); }
.mtnote.ok { color: var(--dim); }
.mtwarn { font-size: 11px; color: var(--crimtxt); }
.mthand { margin: auto; width: min(520px, 92vw); }
.mthand .mspanein { align-items: center; justify-content: center; gap: 14px; padding: 34px 24px; }
.mtbig { font-family: Cinzel, Georgia, serif; font-size: 24px; letter-spacing: 3px; color: var(--gold); margin: 0; text-align: center; }
.mtbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 74px; z-index: 40;
  display: flex; align-items: center; gap: 12px; padding: 8px 14px;
  background: rgba(7, 12, 21, .94); border: 1px solid var(--goldline);
}

@media (max-width: 900px) {
  #matchscreen .mtbody { flex-direction: column; overflow-y: auto; }
  .mtleft { flex: 0 0 auto; }
  .mtcols { flex-direction: column; }
}


#playscreen {
  flex: 1; min-height: 0; position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  --line: #35486b; --line2: #26364f; --dim: #a6b7d2; --faint: #7188ae;
  --accL: #ff7b6b; --accLHi: #ffd4cc; --accLLo: #b8483c; --accLLine: #7a3a30; --accLS22: #ff7b6b38;
  --accR: #7bd88f; --accRHi: #d3f5da; --accRLo: #3f9455; --accRLine: #2c4a3a; --accRS22: #7bd88f38;
  background:
    radial-gradient(820px 480px at 6% 108%, rgba(228, 87, 74, .12), transparent 62%),
    radial-gradient(1300px 760px at 44% 44%, #0e1729 0%, #080d18 54%, #03060c 100%);
}
.plui img.art { opacity: 0; transition: opacity .22s ease; background: #0b1220; }
.plui img.art.ready { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .plui img.art { transition: none; }
}
.plaura {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(720px 660px at -8% 56%, var(--accLS22), transparent 64%),
    radial-gradient(720px 660px at 108% 56%, var(--accRS22), transparent 64%);
}
.plweave {
  position: absolute; inset: 0; pointer-events: none; opacity: .32;
  background-image: repeating-linear-gradient(114deg, rgba(255, 255, 255, .02) 0 1px, transparent 1px 5px);
}
.plvig {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(122% 104% at 50% 46%, transparent 26%, rgba(2, 5, 10, .8) 100%);
}

.plrail {
  position: relative; z-index: 3; flex: 0 0 58px;
  display: flex; align-items: center; gap: 18px; padding: 0 34px;
  background: linear-gradient(180deg, rgba(5, 9, 17, .82), rgba(5, 9, 17, 0));
}
.plhair {
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, var(--accL), rgba(228, 87, 74, .3) 26%, rgba(42, 58, 87, .55) 54%, var(--accR));
  opacity: .8;
}
.plback {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 13px 0 9px;
  border: 1px solid var(--line2); background: rgba(10, 16, 28, .7); color: var(--faint); cursor: pointer;
  font-size: 9px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.plback:hover { color: var(--text); border-color: var(--gold); }
.plback svg { width: 13px; height: 13px; }
.plmark { display: flex; align-items: center; gap: 10px; }
.plmark > svg { width: 22px; height: 22px; color: var(--gold); }
.plmarkt { display: flex; flex-direction: column; gap: 2px; }
.plmarkw { font-family: Cinzel, Georgia, serif; font-size: 13px; font-weight: 700; letter-spacing: 4.4px; color: #f4d391; }
.plmarksub { font-size: 8.5px; letter-spacing: 2.2px; text-transform: uppercase; color: var(--faint); font-weight: 800; }
.plrailr { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.plrailname {
  height: 30px; width: 208px; padding: 0 12px; border: 1px solid var(--line2);
  background: rgba(8, 13, 24, .86); color: var(--text); outline: none;
  font-family: Cinzel, Georgia, serif; font-size: 13px; font-weight: 700; letter-spacing: 1.8px;
}
.plrailname::placeholder {
  font-family: inherit; font-size: 10px; font-weight: 800; letter-spacing: 1.8px;
  text-transform: uppercase; color: #4b5f81;
}
.plrailname:focus { border-color: var(--gold); }
.plhb {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 30px; padding: 0 15px;
  border: 1px solid var(--line); background: rgba(20, 31, 52, .94); color: var(--dim); cursor: pointer;
  font-size: 10px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.plhb:hover { color: var(--text); border-color: var(--gold); }
.plhb svg { width: 13px; height: 13px; }
.plhb.sm { height: 26px; padding: 0 11px; }
.plhb.ico { width: 26px; padding: 0; clip-path: none; }

.plerr {
  position: relative; z-index: 3; flex: 0 0 auto; margin: 10px 34px 0; padding: 9px 13px;
  border: 1px solid var(--crimline); background: rgba(122, 58, 48, .22); color: var(--crimtxt); font-size: 12px;
}

.pltable { position: relative; z-index: 3; flex: 1 1 auto; min-height: 0; display: flex; padding: 14px 34px 0; }
.plseat {
  flex: 1 1 0; min-width: 0; position: relative; padding: 1px;
  background: linear-gradient(158deg, #4e6491 0%, #1a2740 46%, #2d3f63 100%);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}
.plseat.alert { background: linear-gradient(158deg, #e4574a 0%, #7a3a30 48%, #e4574a 100%); }
.plseat.l { --acc: var(--accL); --accHi: var(--accLHi); --accLo: var(--accLLo); --accLine: var(--accLLine); --accS22: var(--accLS22); }
.plseat.r { --acc: var(--accR); --accHi: var(--accRHi); --accLo: var(--accRLo); --accLine: var(--accRLine); --accS22: var(--accRS22); }
.plseatin {
  position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  background: linear-gradient(178deg, rgba(21, 32, 54, .96), rgba(12, 19, 33, .97));
  box-shadow: inset 0 1px 0 rgba(151, 179, 224, .12), inset 0 -26px 48px rgba(3, 6, 13, .4);
}
.plrib {
  flex: 0 0 34px; display: flex; align-items: center; gap: 11px; padding: 0 14px;
  border-bottom: 1px solid var(--line2);
  background: linear-gradient(102deg, var(--accS22) 0 20%, transparent 48%);
}
.plribt {
  flex: 0 0 auto; white-space: nowrap;
  font-family: Cinzel, Georgia, serif; font-size: 10.5px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase; color: var(--accHi);
}
.plseg { display: flex; gap: 4px; flex: 0 0 auto; }
.plsegb {
  height: 22px; padding: 0 10px; border: 1px solid var(--line2); background: rgba(10, 16, 28, .7);
  color: var(--faint); cursor: pointer; font-size: 8.5px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
}
.plsegb:hover { color: var(--dim); border-color: var(--line); }
.plsegb.on { color: #0b0f18; background: linear-gradient(180deg, var(--accHi), var(--acc)); border-color: var(--accLine); }

.plbody { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 9px; padding: 12px; }

.plpilot { flex: 0 0 46px; display: flex; align-items: center; gap: 8px; }
.plwho {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; height: 100%; padding: 0 14px;
  border: 1px solid var(--line2); background: rgba(10, 16, 28, .62);
}
.plwhon {
  flex: 0 1 auto; min-width: 0;
  font-family: Cinzel, Georgia, serif; font-size: 17px; font-weight: 700; letter-spacing: 2.4px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.plwhotag { margin-left: auto; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8.5px; font-weight: 800; letter-spacing: 1.7px; text-transform: uppercase; color: var(--faint); }

.plmodes { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; height: 100%; }
.plmode {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 1px solid var(--line2); background: rgba(10, 16, 28, .62); color: var(--faint); cursor: pointer;
}
.plmode svg { width: 17px; height: 17px; }
.plmode span { font-size: 8px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; }
.plmode:hover { color: var(--dim); border-color: var(--line); }
.plmode.on { color: var(--accHi); border-color: var(--accLine); background: linear-gradient(180deg, var(--accS22), rgba(10, 16, 28, .7)); }
.plmode.off { opacity: .45; }

.plhero { position: relative; flex: 1 1 216px; min-height: 118px; overflow: hidden; border: 1px solid #22304a; }
.plheroart { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 14%; opacity: .62; }
.plherofade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5, 8, 15, .97) 6%, rgba(5, 8, 15, .38) 64%, rgba(5, 8, 15, .5)); }
.plherotop { position: absolute; left: 12px; right: 12px; top: 11px; display: flex; align-items: center; gap: 8px; }
.plherotext { position: absolute; left: 16px; right: 98px; bottom: 11px; display: flex; flex-direction: column; gap: 4px; }
.plheron {
  font-family: Cinzel, Georgia, serif; font-size: 25px; font-weight: 700; letter-spacing: 1.1px;
  line-height: 1.08; color: var(--accHi);
}
.plherosub { font-size: 9.5px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: var(--dim); }
.plherochamp { position: absolute; right: 16px; bottom: 12px; width: 68px; display: flex; flex-direction: column; gap: 4px; }
.plherochampart {
  position: relative; width: 100%; aspect-ratio: 744 / 1039; overflow: hidden;
  border: 1px solid var(--accLine); background: #0a1020; box-shadow: 0 0 18px rgba(0, 0, 0, .6);
}
.plherochampart.empty { border-style: dashed; border-color: #2f4062; }
.plherochampl { font-size: 7.5px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--faint); text-align: center; }
.plflag {
  height: 20px; display: inline-flex; align-items: center; padding: 0 10px;
  font-size: 8.5px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase;
  color: #2a0b07; background: linear-gradient(180deg, #ffb0a4, #e4574a);
}

.plrrow { flex: 0 0 62px; display: flex; align-items: stretch; gap: 5px; }
.plrune {
  position: relative; height: 100%; aspect-ratio: 744 / 1039; flex: 0 1 auto; min-width: 0; overflow: hidden;
  border: 1px solid #253349; background: #0a1020;
}

.plfrow { flex: 1 1 158px; min-height: 84px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.plbf { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.plbfimg { position: relative; flex: 1; min-height: 0; overflow: hidden; border: 1px solid #253349; background: #0a1020; }
.plbfn { flex: 0 0 auto; font-size: 9.5px; letter-spacing: .5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plbfn.empty { color: #4b5f81; font-style: italic; }

.plcrow { flex: 0 0 91px; display: flex; flex-direction: column; gap: 6px; }
.plbars { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; align-items: stretch; }
.plbar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; min-width: 0; }
.plbarn {
  font-family: Consolas, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums;
  font-size: 9.5px; font-weight: 800; color: var(--dim); line-height: 1;
}
.plbart { width: 100%; flex: 1; min-height: 0; display: flex; align-items: flex-end; background: rgba(19, 29, 48, .8); border-bottom: 1px solid var(--line2); }
.plbarf { width: 100%; background: linear-gradient(180deg, var(--acc), var(--accLo)); opacity: .88; }
.plbarx { font-size: 8px; font-weight: 800; letter-spacing: 1px; color: var(--faint); line-height: 1; }
.plcread { flex: 0 0 auto; font-size: 10.5px; letter-spacing: .3px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plcread.bad { color: var(--crimtxt); }

.placts { flex: 0 0 34px; display: flex; gap: 8px; margin-top: auto; }
.plabtn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 34px;
  border: 1px solid var(--line); background: rgba(20, 31, 52, .94); color: var(--dim); cursor: pointer;
  font-size: 10px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.plabtn:hover { color: var(--text); border-color: var(--acc); }
.plabtn svg { width: 13px; height: 13px; flex: 0 0 auto; }
.plabtn.acc { color: var(--accHi); border-color: var(--accLine); background: linear-gradient(180deg, var(--accS22), rgba(16, 25, 43, .92)); }

.plempty {
  display: flex; align-items: center; justify-content: center; padding: 18px 12px; flex: 0 0 auto;
  border: 1px dashed #2f4062; background: rgba(9, 14, 25, .5); color: var(--faint); font-size: 11px; letter-spacing: .4px;
}
.plhint { flex: 0 0 auto; font-size: 11px; line-height: 1.5; color: var(--faint); letter-spacing: .3px; }
.plhint.bad { color: var(--crimtxt); }

.pllob { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.plslbl {
  flex: 0 0 auto; display: flex; align-items: center; gap: 9px;
  font-size: 8.5px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--faint);
}
.plsline { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(50, 68, 102, .8), transparent); }
.plurl {
  flex: 0 0 auto; font-family: Consolas, "SF Mono", Menlo, monospace; font-size: 11px; word-break: break-all;
  background: #080e1a; border: 1px solid var(--line2); padding: 9px 11px; color: var(--accHi);
}
.plseatcard { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line2); background: rgba(10, 16, 28, .6); }
.plseatcard.ready { border-color: var(--accLine); background: linear-gradient(180deg, var(--accS22), rgba(10, 16, 28, .6)); }
.plscmain { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.plscn { font-family: Cinzel, Georgia, serif; font-size: 16px; letter-spacing: 1.2px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plscd { font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--faint); font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plscflag { flex: 0 0 auto; font-size: 9px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; }
.plscflag.ok { color: var(--good); }
.plscflag.bad { color: var(--faint); }
.pltables { flex: 0 0 auto; display: flex; flex-direction: column; gap: 7px; }
.pltrow {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid #2d3e5e;
  background: linear-gradient(180deg, rgba(24, 36, 60, .94), rgba(14, 22, 38, .9)); cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.pltrow:hover { border-color: var(--acc); }
.pltrow.full { opacity: .5; cursor: default; }
.pltmeta { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.pltname { font-size: 13px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pltsub { font-size: 10px; color: var(--faint); letter-spacing: .4px; }
.pltjoin { flex: 0 0 auto; font-size: 9px; font-weight: 800; letter-spacing: 1.6px; color: var(--acc); }
.plnameinput {
  flex: 0 0 auto; height: 32px; padding: 0 11px; border: 1px solid var(--line2);
  background: rgba(8, 13, 24, .86); color: var(--text); outline: none; font: inherit; font-size: 12px;
}
.plnameinput:focus { border-color: var(--gold); }

.plspine { position: relative; width: 112px; flex: 0 0 auto; display: flex; flex-direction: column; }
.plsphead { flex: 0 0 34px; }
.plspbody { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 9px; padding: 12px 0; }
.plspseam { position: absolute; left: 50%; top: 28px; bottom: 28px; width: 2px; margin-left: -1px; display: flex; }
.plspseam i { flex: 1; }
.plspseam i.l { background: linear-gradient(180deg, transparent, var(--accL) 14%, var(--accL) 86%, transparent); opacity: .5; }
.plspseam i.r { background: linear-gradient(180deg, transparent, var(--accR) 14%, var(--accR) 86%, transparent); opacity: .5; }
.plsprow { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.plsprow.r-pilot { flex: 0 0 46px; }
.plsprow.r-hero { flex: 1 1 216px; min-height: 118px; }
.plsprow.r-runes { flex: 0 0 62px; }
.plsprow.r-fields { flex: 1 1 158px; min-height: 84px; }
.plsprow.r-curve { flex: 0 0 91px; }
.plsprow.r-acts { flex: 0 0 34px; }
.plsplbl {
  display: inline-flex; align-items: center; justify-content: center; height: 20px; padding: 0 10px;
  background: #080d18; border: 1px solid var(--line2);
  font-size: 8px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--faint);
}
.plspine.dim .plsplbl { opacity: .42; }
.plvsmark {
  font-family: Cinzel, Georgia, serif; font-size: 22px; font-weight: 700; letter-spacing: 3px; color: var(--gold);
  text-shadow: 0 0 22px rgba(240, 196, 106, .4); background: #080d18; padding: 4px 8px;
}
.plvsbadge {
  display: inline-flex; align-items: center; justify-content: center; height: 24px; padding: 0 12px;
  border: 1px solid var(--goldline); background: #080d18;
  font-family: Cinzel, Georgia, serif; font-size: 11px; font-weight: 700; letter-spacing: 1.6px; color: var(--gold);
}
.plvsopen { display: flex; flex-direction: column; align-items: center; gap: 5px; background: #080d18; padding: 4px 6px; }
.plvsopen svg { width: 26px; height: 18px; }
.plvsopen span { font-size: 7.5px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; }
.plvsopen.you { color: var(--accL); }
.plvsopen.foe { color: var(--accR); }
.plvsopen.roll { color: var(--gold); }
.plvsopen.roll svg { width: 22px; height: 22px; }
.plspine.dim .plvsopen { opacity: .42; }

.pllaunch {
  position: relative; z-index: 3; flex: 0 0 84px; margin: 14px 34px 18px; display: flex; padding: 1px;
  background: linear-gradient(96deg, var(--accL) 0%, #24344f 34%, #24344f 62%, var(--accR) 100%);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
.pllaunchin { flex: 1; min-width: 0; display: flex; align-items: stretch; background: linear-gradient(178deg, rgba(19, 29, 49, .97), rgba(9, 15, 26, .98)); }
.pllgrp { flex: 0 0 auto; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 0 22px; }
.pllgrp.fmt { padding-left: 26px; }
.pllglbl { font-size: 8.5px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--faint); }
.plfseg { display: flex; gap: 5px; }
.plfbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 28px; padding: 0 14px; border: 1px solid var(--line2); background: rgba(10, 16, 28, .7);
  color: var(--faint); cursor: pointer; font-family: Cinzel, Georgia, serif; font-size: 11px; font-weight: 700; letter-spacing: 1.4px;
}
.plfbtn:hover { color: var(--dim); border-color: var(--line); }
.plfbtn.on { color: #1c1204; background: linear-gradient(180deg, #f7d68f, #d0a044); border-color: var(--goldline); }
.plfbtn.dead { opacity: .3; cursor: not-allowed; }
.plfbtn.dead:hover { color: var(--faint); border-color: var(--line2); }
.plfbtn svg { width: 14px; height: 14px; }
.pllsum { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 7px; padding: 0 24px; }
.pllsumt {
  font-family: Cinzel, Georgia, serif; font-size: 20px; font-weight: 700; letter-spacing: 1.2px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pllsumhint {
  font-size: 10.5px; line-height: 1.4; letter-spacing: .3px; color: var(--faint);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.pllsumt em { font-style: normal; font-size: 12px; letter-spacing: 2.4px; color: var(--faint); padding: 0 6px; }
.plwarn {
  display: inline-flex; align-items: center; gap: 9px; max-width: 100%; height: 28px; padding: 0 12px; align-self: flex-start;
  border: 1px solid var(--crimline); background: rgba(122, 58, 48, .24); color: var(--crimtxt); cursor: pointer;
  font-size: 10px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
}
.plwarn:hover { border-color: var(--crimson); }
.plwarn svg { width: 13px; height: 13px; flex: 0 0 auto; }
.plwarn span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plwarn u { flex: 0 0 auto; text-decoration: none; color: var(--gold); border-bottom: 1px solid rgba(240, 196, 106, .5); }

.plplate {
  position: relative; overflow: hidden; width: 360px; flex: 0 0 auto; display: flex; align-items: center; gap: 16px;
  padding: 0 20px; border: 0; cursor: pointer; text-align: left; color: var(--text);
  background: linear-gradient(100deg, var(--accLS22) 0%, rgba(13, 21, 36, .5) 72%);
}
.plplatefill {
  position: absolute; inset: 0; transform: translateX(-101%);
  background: linear-gradient(100deg, var(--accLHi) 0%, var(--accL) 52%, var(--accLLo) 100%);
  transition: transform .38s cubic-bezier(.2, .8, .3, 1);
}
.plplate:hover .plplatefill { transform: none; }
.plplateseal, .plplatetext, .plplatego { position: relative; }
.plplateseal { width: 46px; height: 46px; flex: 0 0 auto; color: var(--accLHi); transition: color .2s ease; }
.plplateseal svg { display: block; width: 100%; height: 100%; }
.plplatetext { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.plplatew {
  font-family: Cinzel, Georgia, serif; font-size: 17px; font-weight: 700; letter-spacing: 3.6px; line-height: 1;
  color: var(--accLHi); transition: color .2s ease; white-space: nowrap;
}
.plptrack { display: flex; gap: 4px; }
.plptrack i {
  width: 9px; height: 11px; flex: 0 0 auto; background: var(--accL); opacity: .34;
  clip-path: polygon(50% 0, 100% 26%, 100% 74%, 50% 100%, 0 74%, 0 26%);
  transition: background .22s ease, opacity .22s ease;
}
.plplate:hover .plptrack i { background: #140d02; opacity: .92; }
.plplatesub { font-size: 8.5px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--dim); transition: color .2s ease; }
.plplatego { margin-left: auto; display: flex; color: var(--accL); transition: color .2s ease; }
.plplatego svg { width: 22px; height: 22px; }
.plplate:hover .plplateseal, .plplate:hover .plplatew, .plplate:hover .plplatego { color: #140d02; }
.plplate:hover .plplatesub { color: rgba(20, 13, 2, .74); }
.plplate.off { cursor: not-allowed; filter: grayscale(.85); opacity: .4; }
.plplate.off .plplatefill { display: none; }
@media (prefers-reduced-motion: reduce) {
  .plplatefill, .plptrack i, .plplateseal, .plplatew, .plplatego, .plplatesub { transition: none; }
}

.pldrawer {
  position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column;
  background: linear-gradient(178deg, rgba(12, 20, 35, .985), rgba(6, 11, 20, .992));
}
.pldrawhead { flex: 0 0 44px; display: flex; align-items: center; gap: 11px; padding: 0 12px; border-bottom: 1px solid var(--line2); }
.pldrawt { font-family: Cinzel, Georgia, serif; font-size: 11px; font-weight: 700; letter-spacing: 2.6px; text-transform: uppercase; color: var(--accHi); }
.pldrawn { flex: 0 0 auto; font-size: 8.5px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: var(--faint); }
.pldrawtools { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px 0; }
.pldsearch { position: relative; flex: 1 1 190px; min-width: 0; display: flex; align-items: center; }
.pldsearch svg { position: absolute; left: 9px; width: 14px; height: 14px; color: var(--faint); pointer-events: none; }
.pldsearch input {
  width: 100%; height: 30px; padding: 0 10px 0 30px; border: 1px solid var(--line2);
  background: rgba(8, 13, 24, .86); color: var(--text); outline: none; font: inherit; font-size: 12px;
}
.pldsearch input:focus { border-color: var(--acc); }
.pldtabs { display: flex; gap: 4px; flex: 0 0 auto; }
.pldtab {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px;
  border: 1px solid var(--line2); background: rgba(10, 16, 28, .7); color: var(--faint); cursor: pointer;
  font-size: 8.5px; font-weight: 800; letter-spacing: 1.3px; text-transform: uppercase;
}
.pldtab svg { width: 11px; height: 11px; }
.pldtab i { font-style: normal; font-size: 9px; color: var(--faint); opacity: .75; }
.pldtab:hover { color: var(--dim); border-color: var(--line); }
.pldtab.on { color: var(--accHi); border-color: var(--accLine); background: linear-gradient(180deg, var(--accS22), rgba(10, 16, 28, .7)); }
.pldtab.on i { color: var(--accHi); }
.pldrunes { display: flex; gap: 4px; flex: 0 0 auto; }
.pldrune {
  position: relative; width: 17px; height: 24px; flex: 0 0 auto; overflow: hidden;
  border: 1px solid #253349; background: #0a1020;
}
.pldrune.pick { cursor: pointer; }
.pldrune.pick:hover { border-color: var(--gold); }
.pldrune.off { opacity: .32; filter: grayscale(.7); }
.pldrawlist { flex: 1; min-height: 0; overflow-y: auto; padding: 11px 12px; display: flex; flex-direction: column; gap: 7px; }
.pldrow {
  flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 8px 11px; border: 1px solid var(--line2);
  background: linear-gradient(180deg, rgba(24, 36, 60, .9), rgba(14, 22, 38, .86)); cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.pldrow:hover { border-color: var(--acc); }
.pldrow.cur { border-color: var(--accLine); background: linear-gradient(180deg, var(--accS22), rgba(14, 22, 38, .9)); }
.pldthumb { position: relative; width: 34px; height: 47px; flex: 0 0 auto; overflow: hidden; border: 1px solid #253349; background: #0a1020; }
.pldthumb img { object-position: 50% 24%; }
.pldruns { display: flex; gap: 3px; flex: 0 0 auto; }
.pldmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pldname { font-size: 13.5px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pldsub { font-size: 10px; color: var(--faint); letter-spacing: .3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pldcurve { display: flex; align-items: flex-end; gap: 2px; height: 22px; flex: 0 0 auto; }
.pldcb { width: 5px; background: var(--acc); opacity: .5; }
.pldstar { display: inline-flex; width: 14px; height: 14px; flex: 0 0 auto; color: #26344f; cursor: pointer; }
.pldstar svg { width: 100%; height: 100%; }
.pldstar.on { color: var(--gold); }
.pldstar:hover { color: #f4d391; }
.pldsrc {
  flex: 0 0 auto; font-size: 8px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--faint); border: 1px solid var(--line2); padding: 3px 7px;
}
.pldot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; }
.pldot.ok { background: var(--good); }
.pldot.bad { background: var(--crimson); }

.plrune img, .plbfimg img, .plherochampart img, .pldthumb img, .pldrune img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}
.plrune img { object-position: 50% 42%; }
.plbfimg img { object-position: 50% 50%; }
.plherochampart img { object-position: 50% 22%; }

@media (max-width: 1340px) {
  .pltable { padding-left: 18px; padding-right: 18px; }
  .pllaunch { margin-left: 18px; margin-right: 18px; }
  .plrail { padding: 0 18px; }
  .plspine { width: 92px; }
  .pllgrp { padding: 0 14px; }
  .pllgrp.fmt { padding-left: 16px; }
  .pllsum { padding: 0 16px; }
  .plplate { width: 292px; gap: 12px; padding: 0 16px; }
  .plrailname { width: 168px; }
}

@media (max-height: 820px) {
  .plrail { flex-basis: 52px; }
  .pltable { padding-top: 10px; }
  .plrrow { flex-basis: 54px; }
  .plcrow { flex-basis: 78px; }
  .plsprow.r-runes { flex-basis: 54px; }
  .plsprow.r-curve { flex-basis: 78px; }
  .pllaunch { flex-basis: 76px; margin: 10px 34px 12px; }
}
