/* Mage Arena: a full-bleed WebGL arena with menus and a HUD floating over it. One committed dark-fantasy look. */
:root {
  --ink: #fff6e6;
  --muted: #d9c9ae;
  --dim: #a8987f;
  --panel: rgba(28, 22, 36, 0.86);
  --panel-2: rgba(48, 38, 60, 0.9);
  --edge: rgba(242, 184, 74, 0.38);
  --gold: #f2b84a;
  --ally: #4fa3ff;
  --enemy: #ff5a4a;
  --hp: #3fc35a;
  --mana: #3d7cff;
  --font-display: "Lilita One", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { background: #1b1622; color: var(--ink); font: 700 14px/1.4 var(--font-body); overflow: hidden; -webkit-user-select: none; user-select: none; }
canvas#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.02em; margin: 0; }
small { color: var(--dim); font-weight: 700; }
.dim { color: var(--muted); }

/* ---------- screens ---------- */
#screen { position: fixed; inset: 0; overflow-y: auto; padding: 32px 16px; display: flex; justify-content: center; align-items: flex-start; }
#screen.home, #screen.lobby { background: radial-gradient(ellipse at center, rgba(20, 14, 28, 0.35), rgba(20, 14, 28, 0.75)); }
#screen.hidden { display: none; }
.panel { background: var(--panel); border: 1px solid var(--edge); border-radius: 18px; padding: 24px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); backdrop-filter: blur(6px); }
.panel.wide { width: min(1120px, 100%); }
.panel.queue { width: min(460px, 100%); text-align: center; margin-top: 18vh; display: grid; gap: 12px; }
.hero h1 { font-size: 46px; color: var(--gold); text-shadow: 0 3px 0 #7a4a12; }
.hero p { color: var(--muted); margin: 6px 0 18px; max-width: 640px; }
.row { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; justify-content: space-between; margin-bottom: 18px; }
.name { display: grid; gap: 4px; color: var(--muted); }
.name input { font: inherit; color: var(--ink); background: rgba(0, 0, 0, 0.35); border: 1px solid var(--edge); border-radius: 10px; padding: 10px 12px; width: 240px; }
.go { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.btn { font: 800 15px var(--font-body); color: var(--ink); background: var(--panel-2); border: 1px solid var(--edge); border-radius: 12px; padding: 11px 18px; cursor: pointer; }
.btn:hover:not(:disabled) { border-color: var(--gold); }
.btn.primary { background: linear-gradient(#f6c45a, #d98e24); color: #2b1a06; border-color: #ffd889; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: 0.55; cursor: default; }
.timer { font-family: var(--font-display); font-size: 20px; color: var(--gold); min-width: 130px; text-align: right; }

/* ---------- build editor ---------- */
.bsec { margin-top: 18px; }
.bsec h3 { font-size: 19px; margin-bottom: 8px; }
.bsec h3 small { font-family: var(--font-body); font-size: 13px; margin-left: 8px; }
.schools { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.school { font: inherit; color: var(--ink); display: grid; gap: 4px; justify-items: center; padding: 10px 6px; border-radius: 12px; cursor: pointer;
  background: color-mix(in srgb, var(--c) 12%, rgba(0, 0, 0, 0.35)); border: 2px solid color-mix(in srgb, var(--c) 30%, transparent); }
.school span:first-child { font-family: var(--font-display); font-size: 17px; color: var(--c); }
.school.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 26%, rgba(0, 0, 0, 0.35)); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 40%, transparent); }
.school:disabled { opacity: 0.38; cursor: default; }
.school .mini { display: flex; gap: 3px; }
.picks { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.pick { font: inherit; color: var(--ink); display: flex; gap: 6px; align-items: center; padding: 4px 10px 4px 4px; border-radius: 10px; cursor: pointer; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.08); opacity: 0.6; }
.pick.on { opacity: 1; border-color: var(--gold); background: rgba(242, 184, 74, 0.16); }
.picks em { font-style: normal; font-size: 13px; color: var(--dim, #9aa); margin-left: 4px; }
.picks em.warn { color: #ff8a6a; }
.talents { display: grid; gap: 6px; }
.trow { display: grid; grid-template-columns: 110px repeat(3, minmax(0, 1fr)); gap: 6px; align-items: stretch; }
.tname { color: var(--muted); align-self: center; }
.tal { font: inherit; color: var(--ink); text-align: left; display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; cursor: pointer; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.08); }
.tal.on { border-color: var(--gold); background: rgba(242, 184, 74, 0.16); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px; }
.stat { display: grid; grid-template-columns: 150px 1fr 34px 48px; gap: 10px; align-items: center; }
.stat input { accent-color: var(--gold); width: 100%; }
.stat em { font-style: normal; color: var(--gold); text-align: right; }
.book { display: flex; flex-wrap: wrap; gap: 6px; }

.ic { --c: #ccc; width: 40px; height: 40px; flex: none; display: inline-grid; place-items: center; font-size: 22px; border-radius: 9px;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 70%, #fff 10%), color-mix(in srgb, var(--c) 35%, #120c18) 75%);
  border: 2px solid color-mix(in srgb, var(--c) 70%, #000); box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5); }
.ic.sm { width: 24px; height: 24px; font-size: 13px; border-radius: 6px; border-width: 1px; }
.ic.passive { border-style: dashed; opacity: 0.8; }
/* Hand-drawn SVG icons bring their own tile, rim and glow. */
.ic.svg, .au.svg { background: none; border: 0; box-shadow: none; padding: 0; }
.ic.svg > svg, .au.svg > svg { width: 100%; height: 100%; display: block; }
.ic.svg.passive { opacity: 0.75; filter: saturate(0.7); }
.au.svg.debuff { box-shadow: 0 0 0 1px #ff5a4a; border-radius: 5px; }
.au.svg.cc { box-shadow: 0 0 0 2px #ffd36a; border-radius: 5px; }
.badge { --c: #ccc; display: inline-block; font: 800 11px var(--font-body); color: #140e18; background: var(--c); border-radius: 6px; padding: 1px 6px; vertical-align: middle; }

#tip { position: fixed; z-index: 50; max-width: 300px; pointer-events: none; background: rgba(16, 12, 22, 0.96); border: 1px solid var(--edge); border-radius: 10px; padding: 9px 11px; font-weight: 600; color: var(--muted); box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5); }
#tip b { font-weight: 900; }
.tip-meta { color: var(--dim); font-size: 12px; margin: 2px 0 4px; }
#toast { position: fixed; z-index: 40; left: 50%; top: 22%; transform: translateX(-50%); color: #ff6a5a; font: 900 18px var(--font-body); text-shadow: 0 2px 4px #000; pointer-events: none; }

/* ---------- lobby ---------- */
.lhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.lhead h2 { font-size: 32px; color: var(--gold); }
.vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; margin: 20px 0; }
.vsx { font-family: var(--font-display); font-size: 28px; color: var(--muted); }
.team { display: grid; gap: 6px; padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, 0.25); }
.team.mine { border: 1px solid color-mix(in srgb, var(--ally) 50%, transparent); }
.team.theirs { border: 1px solid color-mix(in srgb, var(--enemy) 50%, transparent); }
.team h4 { font-size: 16px; color: var(--muted); }
.seat { display: flex; gap: 6px; align-items: center; padding: 6px 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); }
.seat.you { background: rgba(242, 184, 74, 0.14); }
.seat span { flex: 1; }
.seat em { color: var(--dim); font-style: normal; }
.rdy { color: var(--hp); }
.tables { display: grid; gap: 14px; }
table.stbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.stbl th { text-align: right; color: var(--dim); font-weight: 800; padding: 4px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
table.stbl td { text-align: right; padding: 5px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-variant-numeric: tabular-nums; }
table.stbl th:first-child, table.stbl td:first-child { text-align: left; }
table.stbl tr.you td { color: var(--gold); }
details.edit { margin-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 12px; }
details.edit summary { cursor: pointer; font-family: var(--font-display); font-size: 18px; }
details.edit summary small { font-family: var(--font-body); font-size: 13px; margin-left: 6px; }

/* ---------- HUD: every widget is placed by layout.ts ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud > * { pointer-events: auto; }
#hud #announce, #hud .edit-grid { pointer-events: none; }
.w { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
#hud:not(.editing) .w.none { visibility: hidden; }
#hud:not(.editing) .w.bar-off { display: none; }
.topbar { display: flex; gap: 18px; padding: 6px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--edge); font-weight: 800; white-space: nowrap; }
#h-time { font-family: var(--font-display); color: var(--gold); font-size: 18px; line-height: 1.2; }
.frames { display: grid; gap: 8px; width: 230px; }
.uf { background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px; padding: 6px 8px 7px; cursor: pointer; position: relative; width: 230px; }
.unitw .uf { width: 250px; }
.uf.ph, .tot.ph { color: var(--dim); text-align: center; min-height: 40px; display: grid; place-items: center; border-style: dashed; }
.uf.me { border-color: color-mix(in srgb, var(--gold) 60%, transparent); }
.uf.ally { border-left: 3px solid var(--ally); }
.uf.enemy { border-left: 3px solid var(--enemy); }
.uf.targeted { outline: 2px solid #fff; }
.uf.focused { box-shadow: 0 0 0 2px #c48cff; }
.uf.dead { opacity: 0.45; }
.uf-top { display: flex; gap: 4px; align-items: center; margin-bottom: 3px; }
.uf-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uf-name small { font-size: 10px; }
.uf-trink { position: relative; width: 20px; height: 20px; flex: none; border-radius: 5px; box-shadow: 0 0 0 1px #6fe08a, 0 0 6px rgba(111, 224, 138, 0.6); }
.uf-trink > svg { width: 100%; height: 100%; display: block; }
/* On cooldown: a dark sweep that shrinks as it comes back, and the seconds left. */
.uf-trink i { position: absolute; inset: 0; border-radius: 5px; background: conic-gradient(rgba(0, 0, 0, 0.72) calc(var(--k, 0) * 360deg), transparent 0); pointer-events: none; }
.uf-trink b { position: absolute; inset: 0; display: grid; place-items: center; font: 900 10px var(--font-body); color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000; pointer-events: none; }
.uf-trink.used { box-shadow: 0 0 0 1px #ff5a4a; }
.uf.trinketed { animation: trinketed 1.2s ease-out; }
@keyframes trinketed { 0% { box-shadow: 0 0 0 3px #fff1c4, 0 0 26px 8px #f2b84a; } 100% { box-shadow: 0 0 0 0 transparent, 0 0 0 0 transparent; } }
.fl.trinket { color: #fff1c4; font: 400 26px var(--font-display); text-shadow: 0 2px 0 #7a4a12, 0 0 14px #f2b84a; }
.ltrink { color: #fff1c4; font-weight: 800; }
.hp { position: relative; height: 16px; background: rgba(0, 0, 0, 0.55); border-radius: 4px; overflow: hidden; }
.hp i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(#5fe07a, #2a9c45); transition: width 0.1s; }
.enemy .hp i { background: linear-gradient(#ff7a6a, #c2382c); }
.hp s { position: absolute; top: 0; bottom: 0; background: rgba(255, 255, 255, 0.55); text-decoration: none; }
.hp span { position: absolute; inset: 0; text-align: center; font-size: 11px; line-height: 16px; text-shadow: 0 1px 2px #000; }
.mp { height: 5px; margin-top: 2px; background: rgba(0, 0, 0, 0.55); border-radius: 3px; overflow: hidden; }
.mp i { display: block; height: 100%; background: var(--mana); }
.uf-cast { position: relative; height: 13px; margin-top: 3px; background: rgba(0, 0, 0, 0.5); border-radius: 3px; overflow: hidden; visibility: hidden; }
.uf-cast i { position: absolute; inset: 0 auto 0 0; opacity: 0.85; }
.uf-cast span { position: absolute; inset: 0; font-size: 10px; line-height: 13px; padding-left: 4px; text-shadow: 0 1px 2px #000; }
.uf-cc { visibility: hidden; position: absolute; right: 8px; top: 26px; font-size: 11px; color: #ffd36a; font-weight: 900; text-shadow: 0 1px 2px #000; }
.auras { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 3px; min-height: 20px; }
.au { --c: #ccc; position: relative; width: 20px; height: 20px; font-size: 11px; display: grid; place-items: center; border-radius: 4px; background: color-mix(in srgb, var(--c) 35%, #0d0912); border: 1px solid var(--c); }
.au.debuff { border-color: #ff5a4a; }
.au.cc { border: 2px solid #ffd36a; }
.au em { position: absolute; right: -2px; bottom: -3px; font: 900 9px var(--font-body); font-style: normal; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.tot { width: 150px; background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 9px; padding: 5px 7px; cursor: pointer; font-size: 12px; }
.tot.ally { border-left: 3px solid var(--ally); } .tot.enemy { border-left: 3px solid var(--enemy); }
.tot .hp { height: 12px; } .tot .hp span { line-height: 12px; font-size: 10px; }
.castbar .cb { position: relative; width: 300px; height: 20px; background: rgba(0, 0, 0, 0.6); border: 1px solid var(--edge); border-radius: 6px; overflow: hidden; visibility: hidden; }
.castbar .cb i { position: absolute; inset: 0 auto 0 0; }
.castbar .cb span { position: absolute; inset: 0; text-align: center; line-height: 20px; font-size: 12px; text-shadow: 0 1px 2px #000; }
.loc-in { min-width: 220px; min-height: 10px; display: grid; justify-items: center; gap: 4px; text-align: center; }
.loc-in.on, .loc-in.demo { padding: 8px 18px 10px; border-radius: 14px; background: rgba(20, 14, 26, calc(0.72 * var(--wa, 1))); border: 1px solid rgba(255, 211, 106, calc(0.5 * var(--wa, 1))); }
.loc-in .ic { width: 58px; height: 58px; font-size: 32px; }
.loc-in b { font: 400 22px var(--font-display); color: #ffd36a; text-shadow: 0 2px 0 #000; }
.loc-in em { font: 900 18px var(--font-body); font-style: normal; }
.loc-bar { display: block; width: 160px; height: 5px; background: rgba(0, 0, 0, 0.5); border-radius: 3px; overflow: hidden; }
.loc-bar i { display: block; height: 100%; background: #ffd36a; }
.bar .bar-body { display: grid; gap: 5px; padding: 7px; background: var(--panel); border: 1px solid var(--edge); border-radius: 14px; }
.ab { position: relative; padding: 0; border: 0; background: none; cursor: pointer; width: 46px; height: 46px; }
.ab .ic { width: 46px; height: 46px; font-size: 24px; }
.ab.empty { border-radius: 9px; background: rgba(0, 0, 0, 0.25); visibility: hidden; }
#hud.editing .ab.empty, #hud.binding .ab.empty { visibility: visible; border: 1px dashed rgba(255, 255, 255, 0.25); }
.ab em { position: absolute; left: 3px; top: 1px; font: 900 11px var(--font-body); font-style: normal; color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000; pointer-events: none; }
.ab .cd { --k: 0; position: absolute; inset: 0; border-radius: 9px; pointer-events: none; background: conic-gradient(rgba(0, 0, 0, 0.72) calc(var(--k) * 360deg), transparent 0); }
.ab .cdt { position: absolute; inset: 0; display: grid; place-items: center; font: 900 17px var(--font-body); color: #fff; text-shadow: 0 0 4px #000; pointer-events: none; }
.ab .chg { position: absolute; right: 3px; bottom: 1px; font: 900 12px var(--font-body); text-decoration: none; color: #fff; text-shadow: 0 0 3px #000; pointer-events: none; }
.ab.bad .ic { filter: saturate(0.4) brightness(0.7); box-shadow: inset 0 0 0 40px rgba(200, 30, 30, 0.35); }
.ab.locked .ic { filter: grayscale(1) brightness(0.5); }
.ab.queued .ic, .ab.kindled .ic { box-shadow: 0 0 0 2px #fff, 0 0 16px 4px var(--gold); }
#hud.binding .ab:hover { outline: 2px solid var(--gold); border-radius: 9px; }
#hud.binding .ab em { color: var(--gold); }
.meter { width: 240px; background: var(--panel); border: 1px solid var(--edge); border-radius: 12px; padding: 6px; font-size: 12px; }
.m-head { display: flex; gap: 4px; margin-bottom: 4px; }
.m-head button { flex: 1; font: 800 11px var(--font-body); color: var(--dim); background: rgba(0, 0, 0, 0.3); border: 0; border-radius: 6px; padding: 3px; cursor: pointer; }
.m-head button.on { color: var(--ink); background: rgba(242, 184, 74, 0.25); }
.m-row { position: relative; display: flex; justify-content: space-between; padding: 2px 6px; margin-top: 2px; border-radius: 4px; overflow: hidden; background: rgba(0, 0, 0, 0.3); }
.m-row i { position: absolute; inset: 0 auto 0 0; opacity: 0.45; }
.m-row.ally i { background: var(--ally); } .m-row.enemy i { background: var(--enemy); } .m-row.me i { background: var(--gold); }
.m-row span, .m-row b { position: relative; text-shadow: 0 1px 2px #000; }
.meter { width: 300px; }
.m-row { cursor: pointer; }
.m-row.open { box-shadow: inset 0 0 0 1px var(--gold); }
.m-row small, .m-sp small { color: var(--muted); font-weight: 600; }
.m-sub { display: flex; gap: 4px; align-items: center; margin-bottom: 2px; }
.m-sub button { font: 700 10px var(--font-body); color: var(--dim); background: none; border: 0; padding: 1px 6px; border-radius: 5px; cursor: pointer; }
.m-sub button.on { color: var(--ink); background: rgba(255, 255, 255, 0.1); }
.m-sub span { margin-left: auto; color: var(--dim); font-size: 11px; }
.m-list { max-height: 360px; overflow-y: auto; scrollbar-width: thin; }
.m-det { margin: 2px 0 6px 8px; padding-left: 6px; border-left: 2px solid rgba(242, 184, 74, 0.4); }
.m-by { display: flex; gap: 4px; margin: 3px 0; }
.m-by button { font: 700 10px var(--font-body); color: var(--dim); background: rgba(0, 0, 0, 0.3); border: 0; border-radius: 5px; padding: 2px 8px; cursor: pointer; }
.m-by button.on { color: var(--ink); background: rgba(242, 184, 74, 0.25); }
.m-sp { position: relative; display: flex; gap: 6px; align-items: center; padding: 2px 6px; margin-top: 2px; border-radius: 4px; overflow: hidden; background: rgba(0, 0, 0, 0.25); cursor: pointer; }
.m-sp i { position: absolute; inset: 0 auto 0 0; opacity: 0.3; }
.m-sp span:not(.ic), .m-sp b { position: relative; text-shadow: 0 1px 2px #000; }
.m-sp b { margin-left: auto; }
.m-sp .ic { position: relative; }
.m-nest { margin-left: 10px; }
.m-cells { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin: 3px 0 5px; }
.m-cells div { background: rgba(0, 0, 0, 0.35); border-radius: 5px; padding: 2px 5px; display: grid; }
.m-cells span { font-size: 9px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.04em; }
.m-cells b { font-size: 12px; }
.m-empty { color: var(--dim); margin: 4px 0; }
.ic.xs { width: 18px; height: 18px; font-size: 11px; border-radius: 4px; border-width: 1px; }
/* combat log */
.log { width: 420px; background: var(--panel); border: 1px solid var(--edge); border-radius: 12px; padding: 6px; font-size: 12px; }
.log.shut { display: none; }
#hud.editing .log.shut { display: block; opacity: 0.5; }
.log-lines { height: 150px; overflow-y: auto; scrollbar-width: thin; line-height: 1.45; }
.log-lines > div { padding: 0 2px; }
.log-lines em { font-style: normal; color: var(--dim); margin-right: 6px; font-size: 11px; }
.log-lines b.me { text-decoration: underline; }
.ldmg { color: #ff9a7a; font-weight: 800; } .lheal { color: #7ef09a; font-weight: 800; } .lcc { color: #ffd76a; font-weight: 700; }
.log-lines u { text-decoration: none; color: #ffd76a; font-weight: 800; }
.ldeath { color: #ff6a6a; cursor: pointer; font-weight: 800; }
.ldeath:hover small { text-decoration: underline; }
/* chat */
.chat { width: 340px; font-size: 13px; }
.chat-lines { max-height: 140px; overflow-y: auto; scrollbar-width: thin; padding: 4px 6px; border-radius: 10px; line-height: 1.4; text-shadow: 0 1px 2px #000; }
.chat-lines .c-team { color: #9fd0ff; } .chat-lines .c-sys { color: var(--gold); }
.chat-lines b.me { color: var(--gold); }
.chat-lines em { font-style: normal; color: #9fd0ff; }
.chat-form { display: flex; gap: 4px; margin-top: 4px; }
.chat-form input { flex: 1; min-width: 0; font: inherit; color: var(--ink); background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 8px; padding: 4px 8px; }
.chat-form input:focus { outline: none; border-color: var(--gold); }
.chat-scope { font: 800 11px var(--font-body); color: var(--ink); background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 8px; padding: 0 8px; cursor: pointer; }
.chat-scope.team { color: #9fd0ff; border-color: #9fd0ff; }
/* In game the chat fades back when you're not using it. */
#hud .chat .chat-lines { background: rgba(20, 16, 28, 0.35); }
#hud .chat:not(.typing):not(.fresh):not(:hover) { opacity: 0.55; }
#hud .chat:not(.typing) .chat-form { opacity: 0.6; }
/* death recap */
.recap { position: absolute; left: 50%; top: 16%; transform: translateX(-50%); width: min(560px, 92vw); background: var(--panel-2); border: 1px solid var(--edge); border-radius: 14px; padding: 12px 14px; font-size: 13px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); z-index: 5; }
.recap-h { display: flex; gap: 10px; align-items: baseline; }
.recap-h b { font: 400 22px var(--font-display); color: #ff7a6a; }
.recap-h span { color: var(--muted); }
.recap-h button { margin-left: auto; background: none; border: 0; color: var(--dim); font-size: 16px; cursor: pointer; }
.recap p { margin: 4px 0 8px; }
.recap table { width: 100%; border-collapse: collapse; }
.recap td { padding: 3px 6px; border-top: 1px solid rgba(255, 255, 255, 0.06); white-space: nowrap; }
.recap td .ic { vertical-align: middle; }
.rhp { display: inline-block; width: 60px; height: 6px; background: rgba(0, 0, 0, 0.5); border-radius: 3px; margin-right: 6px; vertical-align: middle; overflow: hidden; }
.rhp i { display: block; height: 100%; background: var(--hp); }
/* lobby screen: chat beside the meter breakdown */
.lsplit { display: flex; gap: 12px; margin-top: 14px; align-items: flex-start; flex-wrap: wrap; }
.lsplit .chat { flex: 1; min-width: 260px; background: rgba(0, 0, 0, 0.25); border-radius: 12px; padding: 6px; }
.lsplit .chat-lines { height: 160px; max-height: none; }
.lsplit .meter { width: 340px; }
.minimap canvas { display: block; width: 180px; height: 180px; }
#announce { position: absolute; top: 28%; left: 0; right: 0; text-align: center; font: 400 72px var(--font-display); color: var(--gold); text-shadow: 0 4px 0 #7a4a12, 0 0 30px rgba(0, 0, 0, 0.6); opacity: 0; transition: opacity 0.2s; }
#announce.show { opacity: 1; }
#announce.big.win { color: #ffd76a; }
#announce.big.lose { color: #ff7a6a; text-shadow: 0 4px 0 #6a1a12; }
.hud-btns { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 6px; }
.hud-btns > * { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--edge); color: var(--gold); font-weight: 900; cursor: pointer; font-size: 15px; padding: 0; }
#help { cursor: help; }

/* ---------- edit mode ---------- */
.edit-grid { position: absolute; inset: 0; background-image:
  linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
  linear-gradient(rgba(242, 184, 74, 0.35) 1px, transparent 1px), linear-gradient(90deg, rgba(242, 184, 74, 0.35) 1px, transparent 1px);
  background-size: 16px 16px, 16px 16px, 100% 50%, 50% 100%; background-position: 0 0, 0 0, 0 calc(50% - 0.5px), calc(50% - 0.5px) 0; background-color: rgba(10, 6, 16, 0.25); }
.edit-bar { position: absolute; bottom: 34%; left: 50%; transform: translateX(-50%); z-index: 20; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; max-width: 92vw;
  padding: 8px 12px; border-radius: 12px; background: rgba(16, 12, 22, 0.95); border: 1px solid var(--gold); }
.edit-bar span { color: var(--muted); font-size: 12px; }
.btn.sm { padding: 6px 10px; font-size: 12px; border-radius: 9px; }
#hud.editing .w { outline: 1px dashed rgba(242, 184, 74, 0.7); outline-offset: 2px; }
#hud.editing .w.w-hidden { opacity: 0.35; }
#hud.editing .w.w-drag { outline: 2px solid var(--gold); }
.w-handle { position: absolute; left: 0; bottom: 100%; margin-bottom: 4px; display: flex; gap: 6px; align-items: center; white-space: nowrap; padding: 2px 8px; border-radius: 7px; background: var(--gold); color: #2b1a06; font: 900 11px var(--font-body); cursor: grab; z-index: 5; }
.w-handle button { font: 900 11px var(--font-body); border: 0; border-radius: 5px; padding: 0 5px; background: rgba(0, 0, 0, 0.18); color: #2b1a06; cursor: pointer; }
.w-extra { display: flex; gap: 3px; align-items: center; }
.w-extra:empty { display: none; }
.side-panel { position: absolute; left: 50%; top: 12%; transform: translateX(-50%); z-index: 21; width: 380px; max-height: 60vh; overflow: auto; padding: 14px; border-radius: 14px; background: rgba(16, 12, 22, 0.96); border: 1px solid var(--gold); }
.side-panel h4 { font-size: 18px; color: var(--gold); }
.side-panel p { color: var(--muted); font-size: 12px; margin: 4px 0 10px; }
.book-list { display: grid; gap: 4px; }
.book-row { display: flex; gap: 8px; align-items: center; padding: 3px; border-radius: 8px; cursor: grab; }
.book-row:hover { background: rgba(255, 255, 255, 0.06); }
.book-row.placed span { color: var(--dim); }
.bind-list { display: grid; gap: 4px; margin-bottom: 10px; }
.bind-row { font: inherit; color: var(--ink); display: flex; justify-content: space-between; padding: 6px 8px; border-radius: 8px; background: rgba(0, 0, 0, 0.3); border: 1px solid transparent; cursor: pointer; }
.bind-row.picking { border-color: var(--gold); }
kbd { font: 900 12px var(--font-body); color: var(--gold); }
.drag-ghost { position: fixed; z-index: 60; pointer-events: none; opacity: 0.85; }
.drag-ghost .ic { width: 46px; height: 46px; font-size: 24px; }

/* ---------- nameplates and combat text ---------- */
#plates, #floaters { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.plate { position: absolute; left: 0; top: 0; width: 120px; text-align: center; display: flex; flex-direction: column; align-items: stretch; }
.plate .pa { display: flex; justify-content: center; gap: 2px; margin-bottom: var(--pa-gap, 2px); min-height: 0; }
.plate.pa-below .pa { order: 9; margin: var(--pa-gap, 2px) 0 0; }
.plate .au { width: var(--pa-size, 18px); height: var(--pa-size, 18px); font-size: calc(var(--pa-size, 18px) * 0.55); }
.plate .pb, .plate .pc { margin: 0 12px; }
.plate .pn { font-size: 11px; font-weight: 900; text-shadow: 0 1px 2px #000, 0 0 4px #000; white-space: nowrap; }
.plate.enemy .pn { color: #ffb0a6; }
.plate.ally .pn { color: #b6dcff; }
.plate.self .pn, .plate.self .pb, .plate.self .pa { display: none; }
.plate .pb { position: relative; height: 7px; background: rgba(0, 0, 0, 0.6); border-radius: 3px; overflow: hidden; border: 1px solid rgba(0, 0, 0, 0.6); }
.plate .pb i { position: absolute; inset: 0 auto 0 0; background: var(--hp); }
.plate.enemy .pb i { background: var(--enemy); }
.plate .pb s { position: absolute; top: 0; bottom: 0; right: 0; background: rgba(255, 255, 255, 0.6); }
.plate .pc { visibility: hidden; position: relative; height: 10px; margin-top: 2px; background: rgba(0, 0, 0, 0.6); border-radius: 3px; overflow: hidden; }
.plate .pc i { position: absolute; inset: 0 auto 0 0; background: #ffcb5a; }
.plate .pc span { position: absolute; inset: 0; font-size: 8px; line-height: 10px; color: #fff; text-shadow: 0 1px 1px #000; white-space: nowrap; }
.plate.targeted .pb { border-color: #fff; }
.plate.dead { opacity: 0.4; }
.fl { position: absolute; left: 0; top: 0; font: 900 18px var(--font-body); text-shadow: 0 2px 3px #000, 0 0 4px #000; white-space: nowrap; }
.fl.hit { color: #fff; }
.fl.dot { color: #ffd19a; font-size: 14px; }
.fl.crit { color: #ffd23a; font-size: 26px; }
.fl.taken { color: #ff6a5a; }
.fl.heal { color: #6fe08a; }
.fl.cc { color: #e9c8ff; font-size: 15px; }
.fl.zz { color: #cfe0ff; font-size: 16px; }

@media (max-width: 760px) {
  .schools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .trow { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat { grid-template-columns: 110px 1fr 30px 44px; }
  .vs { grid-template-columns: 1fr; }
}

/* accounts */
.acct { display: grid; gap: 4px; }
.acct a { color: var(--gold); }
.signin { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; padding: 12px; background: rgba(0, 0, 0, 0.25); border-radius: 12px; }
.signin h3, .signin p { flex-basis: 100%; margin: 0; }
.signin input { font: inherit; font-size: 16px; color: var(--ink); background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 8px; padding: 8px 10px; min-width: 220px; }
.signin #si-code { letter-spacing: 6px; font-weight: 800; width: 150px; min-width: 0; }
/* replays: the control bar sits across the top, and the HUD moves down to make room */
#hud.replaying { top: 92px; }
#hud.replaying [data-w="chat"], #hud.replaying [data-w="timer"] { display: none; }
#replay-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 20; padding: 8px 14px; background: linear-gradient(rgba(20, 15, 28, 0.95), rgba(20, 15, 28, 0.85)); border-bottom: 1px solid var(--edge); font-size: 13px; display: grid; gap: 6px; }
#replay-bar button { font: 800 13px var(--font-body); color: var(--ink); background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 8px; padding: 3px 9px; cursor: pointer; }
#replay-bar button:hover { background: rgba(255, 255, 255, 0.16); }
.rp-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rp-top > b { font: 400 18px var(--font-display); color: var(--gold); }
.rp-teams { display: flex; gap: 4px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.rp-who { display: inline-flex; gap: 5px; align-items: center; }
.rp-who.t0 { border-color: rgba(79, 163, 255, 0.5) !important; } .rp-who.t1 { border-color: rgba(255, 90, 74, 0.5) !important; }
.rp-who.on { background: rgba(242, 184, 74, 0.3) !important; border-color: var(--gold) !important; }
.rp-row { display: flex; gap: 6px; align-items: center; }
.rp-play { min-width: 40px; }
.rp-speed { min-width: 34px; text-align: center; font-weight: 800; }
.rp-time { min-width: 86px; text-align: center; font-variant-numeric: tabular-nums; color: var(--muted); }
.rp-track { position: relative; flex: 1; height: 22px; cursor: pointer; touch-action: none; }
.rp-track::before { content: ''; position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.15); }
.rp-fill { position: absolute; left: 0; top: 9px; height: 4px; border-radius: 2px; background: var(--gold); pointer-events: none; }
.rp-knob { position: absolute; top: 4px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, 0.6); pointer-events: none; }
.rp-mark { position: absolute; top: 3px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; cursor: pointer; }
.rp-mark.death { background: #ff5a4a; } .rp-mark.big { background: #f2b84a; opacity: 0.8; height: 10px; top: 6px; } .rp-mark.int { background: #9fd0ff; opacity: 0.7; height: 8px; top: 7px; }
.rp-search { position: relative; width: 240px; }
.rp-search input { width: 100%; box-sizing: border-box; font: inherit; color: var(--ink); background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 8px; padding: 4px 8px; }
.rp-results { position: absolute; right: 0; top: 30px; width: 420px; max-height: 360px; overflow-y: auto; background: var(--panel-2); border: 1px solid var(--edge); border-radius: 10px; padding: 4px; }
.rp-results div { padding: 3px 6px; border-radius: 6px; cursor: pointer; display: flex; gap: 6px; align-items: center; }
.rp-results div:hover { background: rgba(255, 255, 255, 0.08); }
.rp-results em { font-style: normal; color: var(--dim); font-size: 11px; min-width: 32px; }
.rp-results p { margin: 6px; }
.rp-x { margin-left: 4px; }
.rp-links { margin: 10px 0 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rp-link { color: var(--ink); text-decoration: none; font-weight: 800; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 8px; padding: 2px 9px; }
.rp-link:hover { border-color: var(--gold); }

.stbl th[data-sort] { cursor: pointer; user-select: none; }
.stbl th[data-sort]:hover { color: var(--ink); }
.stbl th.asc::after { content: ' ▲'; font-size: 9px; } .stbl th.desc::after { content: ' ▼'; font-size: 9px; }

/* website pages: profile, lobby scoreboards, spec stats */
#screen.page { overflow-y: auto; align-items: flex-start; }
.page-panel { margin: 24px auto; }
.pnav { display: flex; gap: 14px; margin-bottom: 8px; font-weight: 800; font-size: 13px; }
.pnav a { color: var(--muted); text-decoration: none; } .pnav a:hover { color: var(--gold); }
.pnav.top { justify-content: flex-end; margin: -4px 0 -18px; }
.page-panel h3 { margin: 18px 0 8px; font-size: 15px; }
.pstats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 10px 0; }
.pstat { background: rgba(0, 0, 0, 0.3); border-radius: 10px; padding: 8px 10px; display: grid; }
.pstat span { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.05em; } .pstat b { font-size: 20px; }
.pcols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .pcols { grid-template-columns: 1fr; } }
.ptbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.ptbl th { text-align: left; color: var(--dim); font-weight: 700; font-size: 11px; padding: 4px 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.ptbl td { padding: 5px 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); white-space: nowrap; }
.ptbl td a { color: var(--ink); } .ptbl td a:hover { color: var(--gold); }
.ptbl tr.won td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.ptbl tr.sep td { padding: 2px; border: 0; }
.ptbl.hist tbody tr { cursor: pointer; } .ptbl.hist tbody tr:hover { background: rgba(255, 255, 255, 0.04); }
.ptbl.grid td.cell { text-align: center; font-weight: 800; border-radius: 4px; }
.ptbl.grid td small { display: block; font-size: 10px; font-weight: 600; opacity: 0.7; }
.ptbl.grid td { text-align: center; } .ptbl.grid td:first-child { text-align: left; }
.wr { position: relative; display: inline-block; width: 120px; height: 16px; background: rgba(0, 0, 0, 0.4); border-radius: 4px; overflow: hidden; vertical-align: middle; }
.wr i { position: absolute; inset: 0 auto 0 0; opacity: 0.7; } .wr b { position: relative; padding-left: 6px; font-size: 11px; text-shadow: 0 1px 2px #000; }
.tag { background: rgba(255, 255, 255, 0.1); border-radius: 5px; padding: 0 5px; color: var(--muted); }
.ptoggle { font-size: 13px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.pfilters { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.pfilters select { font: inherit; color: var(--ink); background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 6px; padding: 2px 6px; }
.rcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; margin-top: 16px; }
.rcard { background: rgba(0, 0, 0, 0.25); border-radius: 12px; padding: 10px; }
.rhead { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; } .rhead .rp-link { margin-left: auto; }

/* training grounds */
#hud.training { top: 46px; }
#hud.training [data-w="timer"] { display: none; }
#training-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 20; padding: 7px 14px; background: linear-gradient(rgba(20, 15, 28, 0.95), rgba(20, 15, 28, 0.85)); border-bottom: 1px solid var(--edge); font-size: 13px; }
.tb-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tb-row > b { font: 400 18px var(--font-display); color: var(--gold); }
.tb-who { margin-right: auto; }
#training-bar button { font: 800 13px var(--font-body); color: var(--ink); background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 8px; padding: 3px 10px; cursor: pointer; }
#training-bar button:hover { background: rgba(255, 255, 255, 0.16); }
.tb-panel { max-height: 70vh; overflow-y: auto; margin-top: 8px; padding: 10px; background: var(--panel-2); border-radius: 12px; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; }

/* Per-widget background opacity (◐ in edit mode): panels and their gold edges scale with --wa. */
#hud [data-w] { --panel: rgba(28, 22, 36, calc(0.86 * var(--wa, 1))); --edge: rgba(242, 184, 74, calc(0.38 * var(--wa, 1))); }
#hud [data-w] .uf, #hud [data-w] .tot { border-color: rgba(255, 255, 255, calc(0.1 * var(--wa, 1))); }

/* Unit frame buff and debuff icons follow the frame's ▣ size setting. */
#hud [data-w] .uf .auras { min-height: var(--au, 20px); }
#hud [data-w] .uf .au { width: var(--au, 20px); height: var(--au, 20px); font-size: calc(var(--au, 20px) * 0.55); }
#hud [data-w] .uf .au em { font-size: calc(7px + var(--au, 20px) * 0.12); }

.tb-panel-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.tb-panel-head .tb-done { margin-left: auto; background: var(--gold) !important; color: #2b1a06 !important; }
#training-bar .tb-leave { color: #ffb0a0; border-color: rgba(255, 120, 100, 0.35); }

/* ---------- Spellstorm ---------- */
/* Card offers: three cards above your bars, picked with 1-3 or a click. */
.cards { display: none; }
.cards.has-offer, #hud.editing .cards { display: block; background: var(--panel); border: 1px solid var(--edge); border-radius: 14px; padding: 8px; }
.cards-head { display: flex; gap: 10px; align-items: baseline; margin: 0 2px 6px; font-size: 13px; }
.cards-head b { font: 400 17px var(--font-display); color: var(--gold); }
.cards-head em { margin-left: auto; font-style: normal; color: var(--muted); font-size: 12px; }
.cards-row { display: flex; gap: 8px; }
.card { display: flex; gap: 8px; align-items: center; width: 210px; text-align: left; font: inherit; color: var(--ink); background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; padding: 6px 8px; cursor: pointer; }
.card:hover { border-color: var(--gold); background: rgba(242, 184, 74, 0.14); }
.card span:last-child { display: grid; min-width: 0; }
.card b { font-size: 13px; } .card small { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .ic { width: 40px; height: 40px; }
.starters { margin: 8px 0 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.how p { color: var(--muted); line-height: 1.5; margin: 0; }

/* Ready spells that are holding (no enemy in range, nobody hurt…) look dimmed; the tooltip says why. */
.ab.waiting .ic { filter: saturate(0.35) brightness(0.65); }
.ab.waiting::after { content: '⏳'; position: absolute; right: 2px; top: 1px; font-size: 11px; pointer-events: none; }
.tip-wait { margin-top: 6px; color: #ffd36a; font-weight: 700; }

/* Card kinds and rarity: rare cards glow blue, epic ones purple; upgrades show the level they lead to. */
.card { position: relative; }
.card.rare { border-color: #4fa3ff; box-shadow: 0 0 10px rgba(79, 163, 255, 0.35); }
.card.epic { border-color: #c77dff; box-shadow: 0 0 14px rgba(199, 125, 255, 0.5); }
.card .lvl { position: absolute; left: 36px; top: 30px; font: 900 11px var(--font-body); font-style: normal; background: var(--gold); color: #2b1a06; border-radius: 6px; padding: 0 4px; }
/* Party frames: who each ally is hitting (→) and crowd-controlling (◆). */
.uf-tgt { font-size: 11px; color: var(--muted); margin-top: 3px; min-height: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uf-tgt:empty { display: none; }
/* Your team's called target, on unit frames: a red outline and a skull badge. (The 3D ring and skull are in game.ts.) */
.uf.called { box-shadow: 0 0 0 2px #ff3a2a, 0 0 14px rgba(255, 58, 42, 0.5); }
.uf.called::after { content: '☠'; position: absolute; right: -8px; top: -10px; font-size: 18px; text-shadow: 0 0 6px #ff2a1a, 0 0 2px #000; }

/* Your build: a small stats strip, and the full panel (B). */
.stats .ministats { display: flex; flex-wrap: wrap; gap: 4px; max-width: 330px; background: var(--panel); border: 1px solid var(--edge); border-radius: 10px; padding: 5px 6px; font-size: 12px; }
.ministats span { display: inline-flex; gap: 3px; align-items: center; background: rgba(0, 0, 0, 0.3); border-radius: 6px; padding: 1px 6px; }
.ministats span.proc { background: rgba(79, 163, 255, 0.2); }
.build-panel { position: absolute; left: 50%; top: 8%; transform: translateX(-50%); width: min(820px, 94vw); max-height: 78vh; overflow-y: auto; background: var(--panel-2); border: 1px solid var(--edge); border-radius: 16px; padding: 14px 16px; z-index: 6; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); font-size: 13px; }
.bp-head { display: flex; gap: 10px; align-items: baseline; }
.bp-head h3 { margin: 0; font: 400 22px var(--font-display); color: var(--gold); }
.bp-head button { margin-left: auto; background: none; border: 0; color: var(--dim); font-size: 16px; cursor: pointer; }
.bp-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; margin-top: 8px; }
@media (max-width: 700px) { .bp-cols { grid-template-columns: 1fr; } }
.build-panel h4 { margin: 10px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dim); }
.bp-spell { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.bp-spell div { display: grid; gap: 1px; } .bp-spell small { font-size: 11px; }
.stars { color: var(--gold); letter-spacing: 1px; font-size: 11px; }
.bp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.bp-stats div { display: flex; justify-content: space-between; background: rgba(0, 0, 0, 0.3); border-radius: 6px; padding: 3px 8px; }
.bp-mod { display: flex; gap: 6px; align-items: baseline; padding: 3px 0; flex-wrap: wrap; }
.bp-mod small { color: var(--dim); font-size: 11px; flex-basis: 100%; padding-left: 22px; }

/* Line icons in HUD buttons and text. */
.ui-ic { display: inline-block; vertical-align: -3px; }
.hud-btns button .ui-ic { vertical-align: middle; }
.ldeath .ui-ic { vertical-align: -2px; color: #ff6a5a; }
.ministats .ic.xs, .bp-stats .ic.xs, .bp-mod .ic.xs { vertical-align: middle; }
.bp-stats span { display: inline-flex; gap: 6px; align-items: center; }
/* Replace cards: pick the spell to give up. */
.card.swap:hover { border-color: #ff6a5a; background: rgba(255, 90, 80, 0.14); }
.replace-row { flex-wrap: wrap; max-width: 700px; }
.replace-row .card { width: 160px; }

/* Brawl: the waiting room's seats. */
.seats-wait { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 16px 0; }
.seat.open { border: 1px dashed rgba(255, 255, 255, 0.15); background: none; }
@media (max-width: 600px) { .seats-wait { grid-template-columns: 1fr; } }
.seat .badge { flex: none; }
.seats-wait + .lsplit .lchat { height: 140px; }

/* Spell upgrade and ultimate cards. */
.card.talent { border-color: #6fe08a; }
.card.ultimate { border-color: #ffd36a; box-shadow: 0 0 18px rgba(255, 211, 106, 0.55); }
