/* VALBLOX Cases + Case Battles pages, on top of styles.css (same tokens, plates, buttons and fields; mines.css is
   not loaded, so the few field styles these pages share with Mines are repeated here).
   Rarity plates are cut like every other plate (iron rim, top-lit bands, inset face) and carry their rarity as a
   tinted face, a glow behind the item and a lit lip along the foot. Colourway glows come from the case's own
   colour. Values: brand/viking/src/page/cases_palette.py. */

/* ---------------------------------------------------------------- rarity + colourway tokens */
.r-common { --r: #8997A6; --r-rgb: 137, 151, 166; --r-hi: #B3BFCC; --r-lo: #414F5D; --r-deep: #26313D; }
.r-uncommon { --r: #56C78D; --r-rgb: 86, 199, 141; --r-hi: #98E1B6; --r-lo: #18754B; --r-deep: #054D2E; }
.r-rare { --r: #6DB3FA; --r-rgb: 109, 179, 250; --r-hi: #A9D2FE; --r-lo: #32669A; --r-deep: #1B4267; }
.r-epic { --r: #B09DFC; --r-rgb: 176, 157, 252; --r-hi: #CEC5FE; --r-lo: #65569B; --r-deep: #413668; }
.r-legendary { --r: #EAB771; --r-rgb: 234, 183, 113; --r-hi: #F4CD9A; --r-lo: #996E30; --r-deep: #64471A; }
.cw-ember { --cw: #FC8B5D; --cw-rgb: 252, 139, 93; --cw-glow-rgb: 254, 190, 147; }
.cw-bronze { --cw: #EAB771; --cw-rgb: 234, 183, 113; --cw-glow-rgb: 253, 228, 196; }
.cw-emerald { --cw: #4DBC92; --cw-rgb: 77, 188, 146; --cw-glow-rgb: 207, 242, 222; }
.cw-frost { --cw: #8FD4F3; --cw-rgb: 143, 212, 243; --cw-glow-rgb: 238, 249, 254; }
.cw-iron { --cw: #8997A6; --cw-rgb: 137, 151, 166; --cw-glow-rgb: 204, 236, 252; }
.cw-storm { --cw: #8898D4; --cw-rgb: 136, 152, 212; --cw-glow-rgb: 212, 236, 253; }
.cw-aurora { --cw: #BA9CEF; --cw-rgb: 186, 156, 239; --cw-glow-rgb: 152, 225, 182; }
.cw-gold { --cw: #D7AF45; --cw-rgb: 215, 175, 69; --cw-glow-rgb: 242, 232, 201; }
/* migration 024: 22 more cases (brand/viking/src/page/cases_palette.py prints these) */
.cw-ash { --cw: #BAAB9F; --cw-rgb: 186, 171, 159; --cw-glow-rgb: 254, 189, 153; }
.cw-jade { --cw: #98BE49; --cw-rgb: 152, 190, 73; --cw-glow-rgb: 224, 239, 201; }
.cw-tide { --cw: #53C2C1; --cw-rgb: 83, 194, 193; --cw-glow-rgb: 206, 240, 237; }
.cw-raven { --cw: #949FCE; --cw-rgb: 148, 159, 206; --cw-glow-rgb: 225, 231, 255; }
.cw-heather { --cw: #D493D8; --cw-rgb: 212, 147, 216; --cw-glow-rgb: 249, 222, 245; }
.cw-oak { --cw: #CFA576; --cw-rgb: 207, 165, 118; --cw-glow-rgb: 243, 231, 206; }
.cw-moss { --cw: #9DAD6C; --cw-rgb: 157, 173, 108; --cw-glow-rgb: 230, 236, 204; }
.cw-honey { --cw: #E1A01D; --cw-rgb: 225, 160, 29; --cw-glow-rgb: 245, 230, 201; }
.cw-blood { --cw: #F96E79; --cw-rgb: 249, 110, 121; --cw-glow-rgb: 255, 223, 222; }
.cw-chain { --cw: #A7AFB7; --cw-rgb: 167, 175, 183; --cw-glow-rgb: 254, 186, 180; }
.cw-pearl { --cw: #BEB5D1; --cw-rgb: 190, 181, 209; --cw-glow-rgb: 224, 232, 246; }
.cw-rose { --cw: #F286B2; --cw-rgb: 242, 134, 178; --cw-glow-rgb: 255, 222, 233; }
.cw-serpent { --cw: #53B69E; --cw-rgb: 83, 182, 158; --cw-glow-rgb: 205, 242, 228; }
.cw-bone { --cw: #C1B79B; --cw-rgb: 193, 183, 155; --cw-glow-rgb: 178, 221, 156; }
.cw-magma { --cw: #D68D6C; --cw-rgb: 214, 141, 108; --cw-glow-rgb: 254, 191, 139; }
.cw-mist { --cw: #93B7AF; --cw-rgb: 147, 183, 175; --cw-glow-rgb: 218, 237, 231; }
.cw-sky { --cw: #60B6FA; --cw-rgb: 96, 182, 250; --cw-glow-rgb: 216, 235, 249; }
.cw-smoke { --cw: #A5AFBE; --cw-rgb: 165, 175, 190; --cw-glow-rgb: 229, 232, 239; }
.cw-cinder { --cw: #C8878B; --cw-rgb: 200, 135, 139; --cw-glow-rgb: 254, 186, 182; }
.cw-sapphire { --cw: #709AFB; --cw-rgb: 112, 154, 251; --cw-glow-rgb: 220, 233, 255; }
.cw-ivory { --cw: #C9B997; --cw-rgb: 201, 185, 151; --cw-glow-rgb: 242, 231, 206; }
.cw-obsidian { --cw: #A39372; --cw-rgb: 163, 147, 114; --cw-glow-rgb: 244, 231, 201; }

.content--cases > section { width: 100%; }
.num { font-family: "Skranji", sans-serif; font-weight: 700; letter-spacing: .6px; color: var(--white); }

/* ---------------------------------------------------------------- page head */
.phead { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 20px; min-height: 44px; margin-bottom: 20px; }
.phead__t { gap: 12px; }
.phead__t .ic { width: 28px; height: 28px; color: var(--lilac); }
.phead__cta .ic { width: 20px; height: 20px; }
.phead__cta.btn--sm .ic { width: 18px; height: 18px; }

/* recessed fields (as on the Mines page) */
.minput {
  --c: 11px; --n: 4px; --rim: var(--rim-iron); --bt: rgba(5, 8, 12, .5); --bb: rgba(var(--hi), .34);
  --face: linear-gradient(180deg, #19202B 0%, #1D2531 100%);
  height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 14px;
}
.minput:focus-within { --rim: rgba(var(--lilac-rgb), .8); --glow: inset 0 0 12px rgba(var(--lilac-rgb), .18); }
.minput > .ic { width: 18px; height: 18px; color: var(--muted); flex: none; }
.minput input, .minput select {
  flex: 1; min-width: 0; height: 100%; padding: 0 0 2px; border: 0; background: transparent; outline: 0; color: var(--white);
  font-family: "Skranji", sans-serif; font-size: 15px; letter-spacing: .5px;
}
.minput input::placeholder { color: var(--muted); opacity: .62; }
.minput input::-webkit-search-cancel-button { filter: grayscale(1) brightness(1.4); }
.ctools { display: flex; gap: 10px; }
.csearch { width: 260px; }
.csort { width: 232px; position: relative; padding-right: 10px; }
.csort select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 26px; color: var(--lilac-light); }
.csort select option { background: var(--dropdown); color: var(--white); }
.csort__lbl { flex: none; font-size: 12px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; padding-bottom: 1px; }
.csort__chev { position: absolute; right: 12px; top: 50%; width: 18px !important; height: 18px !important; margin-top: -9px; pointer-events: none; color: var(--lilac); }
/* the cases list's Low / High Price toggle (as rablox): the sort mark, then the two buttons at the search's height */
.csortseg { display: flex; align-items: center; gap: 10px; }
.csortseg__ic { width: 20px; height: 20px; flex: none; color: var(--muted); }
.csortseg .btn { height: 44px; padding: 0 16px 4px; }
.mseg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.mseg .btn { height: 40px; padding: 0 12px 4px; font-size: 14px; letter-spacing: 1px; --c: 9px; --n: 3px; }
.mseg .btn[aria-pressed="true"] {
  color: var(--lilac-light); --rim: rgba(var(--lilac-rgb), .75);
  --face: linear-gradient(rgba(var(--lilac-rgb), .2) 0%, rgba(var(--lilac-rgb), .04) 100%), var(--raised);
  --glow: inset 0 0 14px rgba(var(--lilac-rgb), .22); text-shadow: 0 0 10px rgba(var(--lilac-rgb), .45);
}
.merr {
  display: flex; align-items: center; gap: 6px; margin-top: 8px;
  font-family: "Skranji", sans-serif; font-size: 13px; line-height: 17px; letter-spacing: .4px; color: var(--salmon);
}
.merr[hidden] { display: none; }
.merr::before {
  content: "!"; width: 15px; height: 15px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: var(--red); color: #1A0D0B; font-size: 11px; font-weight: 700; line-height: 1;
}
.btn:disabled, .btn[aria-disabled="true"] { filter: saturate(.4) brightness(.72); cursor: default; }
.avatar--xs { width: 20px; height: 20px; padding: 1px; clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px); }
.avatar--xs img, .avatar--xs .ph { width: 18px; height: 18px; clip-path: polygon(4.6px 0, calc(100% - 4.6px) 0, 100% 4.6px, 100% calc(100% - 4.6px), calc(100% - 4.6px) 100%, 4.6px 100%, 0 calc(100% - 4.6px), 0 4.6px); }
.avatar--xs.avatar--mark img { padding: 2px; }
.avatar--bot .ic { width: 35px; height: 35px; padding: 7px; background: var(--avatar-bg); color: var(--lilac);
  clip-path: polygon(8.2px 0, calc(100% - 8.2px) 0, 100% 8.2px, 100% calc(100% - 8.2px), calc(100% - 8.2px) 100%, 8.2px 100%, 0 calc(100% - 8.2px), 0 8.2px); }
.avatar--xs.avatar--bot .ic { width: 18px; height: 18px; padding: 3px; clip-path: polygon(4.6px 0, calc(100% - 4.6px) 0, 100% 4.6px, 100% calc(100% - 4.6px), calc(100% - 4.6px) 100%, 4.6px 100%, 0 calc(100% - 4.6px), 0 4.6px); }
.cempty { margin: 28px 0 8px; text-align: center; font-family: "Skranji", sans-serif; font-size: 15px; letter-spacing: .5px; color: var(--muted); }
.cempty[hidden] { display: none; }

/* ---------------------------------------------------------------- rarity plate (item cards everywhere)
   Uses the shared plate (class="plate rplate"): a 1px iron rim instead of the forged one, the face tinted toward the
   rarity at its foot, a soft rarity glow behind the item, and a 3px lit lip along the bottom edge (it follows the
   face polygon, so it stops at the chamfers). */
.rplate {
  --c: 10px; --rw: 1px; --n: 3px; background: var(--rim); --rim: #0E131B;
  --bt: rgba(var(--hi), .3); --bb: rgba(var(--lo), .6);
  --face:
    linear-gradient(0deg, var(--r) 0 2px, var(--r-hi) 2px 3px, rgba(var(--r-rgb), 0) 3px),
    radial-gradient(58% 48% at 50% 46%, rgba(var(--r-rgb), .28) 0%, rgba(var(--r-rgb), 0) 100%),
    linear-gradient(180deg, #1B222E 0%, #1E2633 52%, rgba(var(--r-rgb), .2) 100%), #1E2633;
}

/* ---------------------------------------------------------------- cases.html */
.cpage { container: cpage / inline-size; }
.drops {
  position: relative; isolation: isolate; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 18px;
  padding: 12px 12px 12px 22px; margin-bottom: 24px;
}
.drops > .plate { --c: 14px; --n: 5px; --bt: rgba(var(--hi), .24); --bb: rgba(var(--lo), .56); --face: linear-gradient(96deg, var(--card) 0%, var(--card-b) 100%); }
.drops__t { display: flex; align-items: center; gap: 10px; width: 112px; font-size: 15px; line-height: 19px; letter-spacing: 1px; color: var(--gold); text-transform: uppercase; }
.drops__live { position: relative; width: 12px; height: 12px; flex: none; display: grid; place-items: center; }
.drops__live i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(var(--green-rgb), .7); }
.drops__live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(var(--green-rgb), .35); }   /* a still dot, no pulse */
.drops__track {
  list-style: none; margin: 0; padding: 2px 0; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent 100%); mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
}
.drops__track::-webkit-scrollbar { display: none; }
.drop { flex: none; width: 238px; height: 68px; display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; }
.drop__art { grid-row: 1 / -1; position: relative; isolation: isolate; width: 64px; height: 64px; display: grid; place-items: center; }
.drop__txt { min-width: 0; display: flex; flex-direction: column; gap: 3px; align-self: end; }
.drop__name { font-size: 13px; line-height: 16px; letter-spacing: .8px; color: var(--r-hi); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drop__who { display: flex; align-items: center; gap: 6px; font-family: "Skranji", sans-serif; font-size: 12px; letter-spacing: .4px; color: var(--player); min-width: 0; }
.drop__who > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop__val { display: flex; align-items: center; gap: 6px; align-self: start; margin-top: 3px; min-width: 0; }
.drop__val img { width: 14px; height: 15px; }
.drop__val .num { font-size: 14px; }
.drop__case { font-family: "Skranji", sans-serif; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drop__case::before { content: "from "; opacity: .7; }
.drop.is-new { animation: drop-in .5s ease-out; }
@keyframes drop-in { from { opacity: 0; transform: translateX(-24px); } }

/* the create summary's pay amount (battle-create.html) */
.csum__pay { display: inline-flex; align-items: center; gap: 6px; font-family: "Skranji", sans-serif; font-weight: 700; font-size: 17px; letter-spacing: .6px; color: var(--white); }
.csum__pay img { width: 18px; height: 19px; }
/* case.html and the cases list's cards: case-open.css (co- prefix), loaded on those two pages only */

/* ---------------------------------------------------------------- fairness dialog */
.fair { padding: 0; border: 0; background: none; color: inherit; width: min(540px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: visible; }
.fair::backdrop { background: rgba(7, 10, 15, .66); }
.fair__in { position: relative; isolation: isolate; display: flex; flex-direction: column; gap: 12px; padding: 26px 30px 28px; }
.fair__in > .plate {
  --c: 16px; --n: 6px; --bt: rgba(var(--hi), .3); --bb: rgba(var(--lo), .6);
  --face: radial-gradient(70% 90% at 50% 0%, rgba(var(--lilac-rgb), .12) 0%, rgba(var(--lilac-rgb), 0) 100%), linear-gradient(180deg, #2A3446 0%, #1F2734 100%);
}
.fair__t { font-size: 22px; line-height: 30px; color: var(--lilac-light); text-transform: uppercase; }
.fair__in p { font-family: "Skranji", sans-serif; font-size: 14px; line-height: 20px; letter-spacing: .4px; color: var(--muted); }
.fair__in p b { font-weight: 400; color: var(--lilac-light); }
.fair__vals { margin: 2px 0; display: flex; flex-direction: column; gap: 8px; }
.fair__vals div { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 10px; align-items: center; }
.fair__vals dt { font-size: 12px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }
.fair__vals dd { margin: 0; min-width: 0; padding: 6px 10px 7px; background: #171D27; box-shadow: inset 0 2px 0 rgba(5, 8, 12, .5);
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px); }
.fair__vals code { display: block; font: 12px/16px ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--white); overflow-wrap: anywhere; }
.fair__in .fair__demo { color: var(--gold); }
.fair__x { align-self: center; margin-top: 4px; height: 40px; }

/* ---------------------------------------------------------------- battles.html: lobby */
.lobby { container: lobby / inline-size; }
.lbar { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; margin-bottom: 18px; }
.lfilter { width: 452px; }
.lbar__count { margin-left: auto; font-family: "Skranji", sans-serif; font-size: 14px; letter-spacing: .5px; color: var(--muted); }
/* the cases track stops growing at six thumbs; on wide screens the spare room opens before the action, not inside the row */
.lhead, .lrow { display: grid; grid-template-columns: 150px minmax(0, 420px) 124px 252px minmax(0, 1fr) 176px; align-items: center; column-gap: 16px; }
.lrow__act { grid-column: -2; }
.lhead { padding: 0 20px 8px 22px; font-family: "Skranji", sans-serif; font-size: 14px; letter-spacing: .5px; color: var(--muted); }
.llist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.lrow { position: relative; isolation: isolate; min-height: 92px; padding: 12px 20px 12px 22px; }
.lrow[hidden] { display: none; }
.lrow > .plate {
  --c: 14px; --n: 5px; --bt: rgba(var(--hi), .24); --bb: rgba(var(--lo), .56);
  --face: linear-gradient(96deg, var(--card) 0%, var(--card-b) 100%);
}
.lrow::before {   /* status accent along the left edge, inside the rim */
  content: ""; position: absolute; z-index: 1; left: 2px; top: 22%; bottom: 22%; width: 3px;
  background: linear-gradient(rgba(var(--accent), 0), rgb(var(--accent)) 50%, rgba(var(--accent), 0));
}
.lrow.is-waiting { --accent: var(--lilac-rgb); }
.lrow.is-rolling { --accent: var(--gold-rgb); }
.lrow.is-completed { --accent: 99, 108, 124; }
.lrow.is-completed > :not(.plate):not(.lrow__act) { opacity: .78; }
.lrow__mode { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 8px; }   /* mode over format (+ Crazy) */
.mbadge { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--lilac-light); }
.mbadge .ic { width: 18px; height: 18px; }
.mbadge--showdown { color: var(--lilac-light); }
.mbadge--group { color: var(--green); }
.mbadge--jackpot { color: var(--gold); }
.crazy {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px 1px 5px; margin-left: 2px;
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--salmon); background: rgba(var(--salmon-rgb), .12);
  clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px);
}
.crazy .ic { width: 13px; height: 13px; }
.lrow__mode .mbadge { flex-basis: 100%; }
.lrow__mode .crazy { order: 2; margin-left: 0; }
.lrow__fmt { order: 1; font-family: "Skranji", sans-serif; font-size: 13px; letter-spacing: .5px; color: var(--muted); }
.lrow__cases { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; }
.lcase { position: relative; width: 64px; height: 64px; flex: none; display: grid; place-items: center; }
.lcase__img { width: 64px; height: 64px; object-fit: contain; }
.lrow__cost { display: flex; flex-direction: column; gap: 3px; }
.lrow__lbl { display: none; }
.lrow__amt { display: flex; align-items: center; gap: 7px; }
.lrow__amt img { width: 16px; height: 17px; }
.lrow__amt .num { font-size: 17px; color: var(--gold); }
.lrow__rounds { font-family: "Skranji", sans-serif; font-size: 13px; letter-spacing: .4px; color: var(--muted); }
.lrow__seats { display: flex; align-items: center; gap: 4px; }
.lteam { display: contents; }   /* a side's seats (and the VS before it): one block when a narrow row wraps */
.lrow__seats .vs { width: 24px; height: 24px; font-size: 9px; }
.lseat { width: 39px; height: 39px; flex: none; display: grid; place-items: center; }
.lseat .avatar { width: 39px; height: 39px; }
.lseat--open {
  color: rgba(var(--lilac-rgb), .7); background: rgba(var(--lilac-rgb), .06);
  box-shadow: inset 0 0 0 1px rgba(var(--lilac-rgb), .35);
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px);
}
.lseat--open .ic { width: 16px; height: 16px; }
/* six seats (3v3, 2v2v2) fit the players column: smaller portraits and VS badges, the chamfers scaled with them */
.lrow__seats[data-n="6"] { gap: 2px; }
.lrow__seats[data-n="6"] .vs { width: 20px; height: 20px; font-size: 8px; }
.lrow__seats[data-n="6"] .lseat, .lrow__seats[data-n="6"] .lseat .avatar { width: 32px; height: 32px; }
.lrow__seats[data-n="6"] .lseat .avatar, .lrow__seats[data-n="6"] .lseat--open {
  padding: 1.5px; clip-path: polygon(7.4px 0, calc(100% - 7.4px) 0, 100% 7.4px, 100% calc(100% - 7.4px), calc(100% - 7.4px) 100%, 7.4px 100%, 0 calc(100% - 7.4px), 0 7.4px);
}
.lrow__seats[data-n="6"] .avatar img, .lrow__seats[data-n="6"] .avatar--bot .ic {
  width: 29px; height: 29px; clip-path: polygon(6.8px 0, calc(100% - 6.8px) 0, 100% 6.8px, 100% calc(100% - 6.8px), calc(100% - 6.8px) 100%, 6.8px 100%, 0 calc(100% - 6.8px), 0 6.8px);
}
.lrow__seats[data-n="6"] .avatar--bot .ic { padding: 6px; }
.lrow__seats[data-n="6"] .lseat--open .ic { width: 14px; height: 14px; }
.lrow__act { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.lrow__btn { height: 40px; min-width: 132px; padding: 0 14px 3px; gap: 8px; --c: 9px; }
.lrow__btn .ic { width: 20px; height: 20px; }
.lrow__btn img { width: 16px; height: 17px; }
.lrow__btn .num { font-size: 15px; }
/* the one-line row: a seat price can run to 1,200,000.00 (the server's seat limit), so the cost and Join columns are
   sized for twelve characters and their figures are a size smaller than the folded rows' */
@container lobby (min-width: 960px) {
  .lrow__amt .num { font-size: 16px; }
  .lrow__btn { padding: 0 12px 3px; gap: 6px; }
  .lrow__btn .num { font-size: 14px; }
}
.bstate { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.bstate i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.bstate--waiting { color: var(--lilac); }
.bstate--rolling { color: var(--gold); }
.bstate--rolling i { box-shadow: 0 0 6px rgba(var(--gold-rgb), .6); }   /* a still dot, no pulse */
.bstate--completed { color: #7C8698; }

/* narrower lobbies: the row folds into three lines (mode + actions, cases, cost + players) */
@container lobby (max-width: 959px) {
  .lhead { display: none; }
  .lrow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "mode act" "cases cases" "cost seats"; row-gap: 12px; padding: 16px 18px; }
  .lrow__mode { grid-area: mode; }
  .lrow__act { grid-area: act; flex-direction: row; align-items: center; gap: 14px; }
  .lrow__cases { grid-area: cases; }
  .lrow__cost { grid-area: cost; flex-direction: row; align-items: center; gap: 12px; }
  .lrow__seats { grid-area: seats; justify-self: end; }
  .lrow__mode .mbadge { flex-basis: auto; }
}
@container lobby (max-width: 520px) {
  .lrow { grid-template-areas: "mode mode" "cases cases" "cost cost" "seats act"; padding: 14px 14px 16px; }
  .lrow__act { flex-direction: column; align-items: flex-end; gap: 6px; }
  .lrow__btn { min-width: 0; }
  .lrow__seats { justify-self: start; flex-wrap: wrap; }
  .lteam { display: flex; align-items: center; gap: inherit; }
  .lcase, .lcase__img { width: 52px; height: 52px; }
  .lfilter { width: 100%; }
  .lfilter .btn { padding: 0 4px 4px; font-size: 13px; letter-spacing: .6px; }
  .lbar__count { margin-left: 0; }
}

/* ---------------------------------------------------------------- battle-create.html */
.cwrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.cmain { min-width: 0; display: flex; flex-direction: column; gap: 28px; container: cmain / inline-size; }
.cset { position: relative; isolation: isolate; display: flex; flex-direction: column; gap: 18px; padding: 22px 24px 24px; }
.cset > .plate { --c: 16px; --n: 6px; --bt: rgba(var(--hi), .24); --bb: rgba(var(--lo), .56); --face: linear-gradient(122deg, var(--card) 0%, var(--card-b) 100%); }
.cset__grp { min-width: 0; display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 7px 18px; }
.cset__grp > * { grid-column: 2; }
.cset__grp > .cset__lbl { grid-column: 1; }
.cset__lbl { font-family: "Skranji", sans-serif; font-size: 15px; letter-spacing: .5px; color: var(--muted); }
.cset__hint { font-family: "Skranji", sans-serif; font-size: 13px; letter-spacing: .4px; color: var(--muted); opacity: .85; }
.cseg .btn { padding: 0 6px 4px; font-size: 14px; }
.cseg--fmt .btn { font-family: "Skranji", sans-serif; font-weight: 700; font-size: 15px; letter-spacing: .5px; text-transform: none; }
.cseg--mode .btn { gap: 7px; }
.cseg--mode .btn .ic { width: 17px; height: 17px; }
.ctogs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }   /* same columns as the Mode buttons above */
@container cmain (max-width: 600px) {
  .cset__grp { grid-template-columns: minmax(0, 1fr); }
  .cset__grp > *, .cset__grp > .cset__lbl { grid-column: 1; }
  .ctogs { grid-template-columns: minmax(0, 1fr); }
  .cseg--fmt { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); }   /* six formats: two rows of three */
}
.ctog {
  position: relative; isolation: isolate; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 12px 7px; border: 0; text-align: left;
  color: var(--muted); background: none;
}
/* recessed bay: the shared field plate drawn with plain layers (the switch stays unclipped). Built like .plate
   (styles.css): ::before is the rim octagon (--wr, cut 6px), ::after the face inset by the rim width (--ww) with
   the cut pulled in by ww * 0.4142, so the rim runs on along every chamfer at the same width as the straight edges. */
.ctog { --wr: var(--rim-iron); --ww: 1px; }
.ctog::before, .ctog::after { content: ""; position: absolute; pointer-events: none; }
.ctog::before {
  inset: 0; z-index: -2; background: linear-gradient(var(--wr) 0 0), linear-gradient(180deg, #19202B, #1D2531);
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
}
.ctog::after {
  --wc: calc(6px - var(--ww) * 0.4142);
  inset: var(--ww); z-index: -1; background: linear-gradient(180deg, #19202B, #1D2531);
  box-shadow: inset 0 1px 0 rgba(5, 8, 12, .5), inset 0 -1px 0 rgba(var(--hi), .34);
  clip-path: polygon(var(--wc) 0, calc(100% - var(--wc)) 0, 100% var(--wc), 100% calc(100% - var(--wc)),
                     calc(100% - var(--wc)) 100%, var(--wc) 100%, 0 calc(100% - var(--wc)), 0 var(--wc));
}
.ctog__ic { width: 30px; height: 30px; flex: none; display: grid; place-items: center; color: var(--muted); }
.ctog__ic .ic { width: 19px; height: 19px; }
.ctog__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ctog__txt span { font-size: 14px; letter-spacing: 1px; color: var(--lilac-light); text-transform: uppercase; }
.ctog__txt small { font-family: "Skranji", sans-serif; font-size: 12px; letter-spacing: .3px; line-height: 15px; }
.ctog__sw { --sr: var(--rim-iron); --sf: var(--track); --ss: inset 0 1px 0 rgba(0, 0, 0, .35);
  position: relative; isolation: isolate; width: 36px; height: 20px; flex: none; }
.ctog__sw::before, .ctog__sw::after { content: ""; position: absolute; pointer-events: none; }
.ctog__sw::before {   /* the track's rim octagon (cut 5px), the face 1px in with its cut pulled in to match */
  inset: 0; z-index: -2; background: var(--sr);
  clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px); }
.ctog__sw::after {
  inset: 1px; z-index: -1; background: var(--sf); box-shadow: var(--ss);
  clip-path: polygon(4.586px 0, calc(100% - 4.586px) 0, 100% 4.586px, 100% calc(100% - 4.586px), calc(100% - 4.586px) 100%, 4.586px 100%, 0 calc(100% - 4.586px), 0 4.586px); }
.ctog__sw i { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; background: linear-gradient(#4B5B71 0 50%, #323E4F 50%); transition: transform .15s ease;
  clip-path: polygon(3px 0, calc(100% - 3px) 0, 100% 3px, 100% calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 0 calc(100% - 3px), 0 3px); }
.ctog[aria-checked="true"] .ctog__sw { --sr: rgba(var(--lilac-rgb), .6); --sf: linear-gradient(rgba(var(--lilac-rgb), .3) 0 0), #1B222E; --ss: none; }   /* face made opaque over the bay's mid tone so the rim layer under it does not show through */
.ctog[aria-checked="true"] .ctog__sw i { transform: translateX(16px); background: linear-gradient(var(--lilac-lighter) 0 50%, var(--lilac) 50%); }
.ctog[aria-checked="true"] .ctog__ic { color: var(--lilac); }
.ctog[aria-checked="true"] { --wr: rgba(var(--lilac-rgb), .55); }
.ctog:hover .ctog__txt span { color: var(--lilac-lighter); }
.ctog:focus-visible { outline: none; }
.ctog:focus-visible { --wr: var(--lilac); --ww: 2px; }

.cpick__head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 14px; }
.cpick__t { font-size: 22px; line-height: 30px; letter-spacing: 1px; color: var(--white); text-transform: uppercase; }
.cpick__hint { font-family: "Skranji", sans-serif; font-size: 13px; letter-spacing: .4px; color: var(--muted); }
.pgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@container cmain (max-width: 600px) { .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.pcard { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; padding: 8px 10px 12px; text-align: center; }
.pcard .plate {
  --c: 14px; --n: 5px; --bt: rgba(var(--hi), .24); --bb: rgba(var(--lo), .56);
  --face: radial-gradient(64% 46% at 50% 38%, rgba(var(--cw-rgb), .18) 0%, rgba(var(--cw-rgb), 0) 100%), linear-gradient(180deg, var(--card-b) 0%, var(--card) 100%);
}
.pcard.is-on .plate { --rim: rgba(var(--lilac-rgb), .85); --glow: inset 0 0 18px rgba(var(--lilac-rgb), .2); background: var(--rim); }
.pcard__art { width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.pcard__img { width: 92%; height: 92%; object-fit: contain; transition: filter .2s; }
.pcard.is-on .pcard__img { filter: brightness(1.1); }
.pcard__name { font-size: 15px; line-height: 20px; letter-spacing: .8px; color: var(--white); text-transform: uppercase; }
.pcard__price { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; }
.pcard__price img { width: 14px; height: 15px; }
.pcard__price .num { font-size: 14px; color: var(--gold); }
.pstep { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; align-items: center; gap: 6px; width: 100%; max-width: 150px; margin-top: 10px; }
.pstep .btn { width: 36px; height: 34px; padding: 0 0 3px; --c: 8px; --n: 3px; color: var(--lilac); }
.pstep .btn .ic { width: 16px; height: 16px; }
.pstep__n { font-family: "Skranji", sans-serif; font-weight: 700; font-size: 17px; color: var(--muted); text-align: center; }
.pcard.is-on .pstep__n { color: var(--lilac-lighter); }

.csum { position: sticky; top: calc(var(--bar-h) + 16px); isolation: isolate; display: flex; flex-direction: column; gap: 14px; padding: 20px 20px 22px; }
.csum > .plate { --c: 16px; --n: 6px; --bt: rgba(var(--hi), .24); --bb: rgba(var(--lo), .56); --face: radial-gradient(80% 50% at 50% 0%, rgba(var(--gold-rgb), .08), rgba(var(--gold-rgb), 0)), linear-gradient(180deg, var(--card-b) 0%, var(--card) 100%); }
.csum__t { font-size: 20px; line-height: 26px; letter-spacing: 1px; color: var(--gold); text-transform: uppercase; }
.csum__rounds { list-style: none; margin: 0; padding: 8px; min-height: 64px; max-height: 172px; overflow: auto; display: flex; flex-wrap: wrap; gap: 6px;
  background: #171D27; box-shadow: inset 0 2px 0 rgba(5, 8, 12, .5), inset 0 -1px 0 rgba(var(--hi), .3);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px); }
.csum__rounds li { position: relative; width: 46px; height: 46px; display: grid; place-items: center; }
.csum__rounds li img { width: 46px; height: 46px; object-fit: contain; }
.csum__rounds li .xn { right: -3px; bottom: -1px; min-width: 20px; height: 16px; font-size: 11px; }
.csum__rounds .csum__empty { width: 100%; height: auto; place-items: center; font-family: "Skranji", sans-serif; font-size: 13px; color: var(--muted); }
.csum__nums { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.csum__nums div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.csum__nums dt { font-family: "Skranji", sans-serif; font-size: 14px; letter-spacing: .4px; color: var(--muted); }
.csum__nums dd { margin: 0; display: flex; align-items: center; gap: 6px; font-family: "Skranji", sans-serif; font-weight: 700; font-size: 16px; color: var(--white); }
.csum__nums dd img { width: 16px; height: 17px; }
.csum__pot { padding-top: 8px; border-top: 1px solid rgba(var(--hi), .5); }
.csum__pot .num { color: var(--gold); font-size: 18px; }
/* a seven-figure cost does not fit beside the label: it wraps to a second line inside the same button */
.csum__go { height: 54px; width: 100%; flex-wrap: wrap; align-content: center; gap: 0 12px; padding-left: 16px; padding-right: 16px; font-size: 17px; line-height: 21px; letter-spacing: 1.3px; --c: 12px; --n: 5px; }
.csum__bal { display: flex; align-items: center; justify-content: center; gap: 6px; font-family: "Skranji", sans-serif; font-size: 13px; color: var(--muted); }
.csum__bal img { width: 16px; height: 17px; }
.csum__bal b { font-weight: 700; color: var(--white); }
.csum .merr { margin-top: -4px; }

/* ---------------------------------------------------------------- battle.html: the room
   Laid out as diceblox's battle room, in valblox's iron and frost: one top bar, one stage (a carved well with the
   heavy Norse rim) holding every seat's lane, and the seats' slots over the stage's foot with their drops under
   them. The wait, the countdown, the jackpot or tie spin and the result all play inside the stage, which keeps its
   size from the first frame to the last, so nothing on the page moves at the reveal. The room is the size
   container for the top bar's tiers and ase.gg's lane geometry (bstage). */
.arena { position: relative; display: flex; flex-direction: column; min-width: 0; container: arena bstage / inline-size; }

/* the top bar: back | the mode | the case card | the value, the demo balance, Fairness, Share. One row from a
   980 px room (the labels go first), the case card on a row of its own below that, three rows under 700 px */
.atop { position: relative; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-height: 70px; }
.atop .btn--icon .ic { width: 19px; height: 19px; }
.atop__back { order: 1; flex: none; height: 44px; padding: 0 18px 4px 14px; gap: 8px; }
.atop__back .ic { width: 18px; height: 18px; }
.amode { order: 2; --mc: var(--lilac-light); --mc-rgb: 185, 232, 254; display: flex; align-items: center; gap: 10px; min-width: 0; }
.amode--group { --mc: var(--green); --mc-rgb: var(--green-rgb); }
.amode--jackpot { --mc: var(--gold); --mc-rgb: var(--gold-rgb); }
.amode.is-crazy { --mc: var(--salmon); --mc-rgb: var(--salmon-rgb); }
.amode__ic {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center; color: var(--mc);
  background: linear-gradient(180deg, rgba(var(--mc-rgb), .16) 0%, rgba(var(--mc-rgb), .02) 100%), var(--card-b);
  box-shadow: inset 0 3px 0 rgba(var(--hi), .55), inset 0 -3px 0 rgba(var(--lo), .7), inset 0 0 0 1px var(--rim-iron);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
}
.amode__ic .ic { width: 22px; height: 22px; filter: drop-shadow(0 0 6px rgba(var(--mc-rgb), .5)); }
.amode__txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.amode__fmt { font-weight: 400; font-size: 17px; line-height: 20px; letter-spacing: 1.2px; color: var(--white); text-transform: uppercase; white-space: nowrap; }
.amode__m { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: "Skranji", sans-serif; font-size: 12px; line-height: 15px; letter-spacing: .7px; color: var(--mc); text-transform: uppercase; }
.amode__flags { display: flex; gap: 6px; color: var(--lilac); }
.amode__flags > span { display: grid; place-items: center; width: 26px; height: 26px; background: #171D27;
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px); }
.amode__flags .ic { width: 15px; height: 15px; }

/* the case card: the rounds as a strip that slides so the case now sits near the middle, its name and price beside
   it and the round count under them */
.acase {
  order: 3; position: relative; isolation: isolate; flex: none; width: 352px; height: 70px; margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "rail txt" "rail n";
  align-content: center; align-items: center; column-gap: 12px; row-gap: 4px; padding: 6px 14px 6px 6px;
}
.acase > .plate { --c: 12px; --n: 5px; --bt: rgba(var(--hi), .3); --bb: rgba(var(--lo), .6); --face: linear-gradient(180deg, var(--card-b) 0%, var(--card) 100%); }
.acase__strip {
  grid-area: rail; position: relative; height: 58px; overflow: hidden; background: #171D27; box-shadow: inset 0 2px 0 rgba(5, 8, 12, .5), inset 0 0 0 1px var(--rim-iron);
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
}
.acase.is-over .acase__strip {
  -webkit-mask: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
          mask: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
}
.acase__rail { list-style: none; margin: 0; display: flex; align-items: center; gap: 2px; height: 100%; padding: 0 6px; transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
.around { position: relative; flex: none; width: 34px; height: 52px; display: grid; place-items: center; }
.around.is-now { width: 56px; }
.around img { width: 52px; height: 52px; max-width: none; object-fit: contain; opacity: .6; transform: scale(.62); transition: transform .3s ease-out, opacity .3s; }
.around.is-now img { opacity: 1; transform: scale(1.04); filter: drop-shadow(0 0 8px rgba(var(--lilac-rgb), .4)); }
.around.is-done img { opacity: .3; }
.around__ok { display: none; position: absolute; left: 50%; bottom: 5px; width: 6px; height: 6px; margin-left: -3px; transform: rotate(45deg); background: var(--green); }
.around.is-done .around__ok { display: block; }
.acase__txt { grid-area: txt; align-self: end; display: flex; flex-direction: column; gap: 2px; min-width: 0; max-width: 140px; }
.acase__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 16px; letter-spacing: 1px; color: var(--white); text-transform: uppercase; }
.acase__price { display: flex; align-items: center; gap: 5px; }
.acase__price img { width: 14px; height: 15px; }
.acase__price .num { font-size: 13px; line-height: 16px; color: var(--gold); }
.acase__n {
  grid-area: n; align-self: start; justify-self: start; display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 6px 1px;
  font-family: "Skranji", sans-serif; font-weight: 700; font-size: 11px; line-height: 1; letter-spacing: .4px; color: var(--lilac); white-space: nowrap;
  background: rgba(var(--lilac-rgb), .12); clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
}
.acase__n .ic { width: 10px; height: 10px; color: var(--green); }
.apot { order: 4; display: flex; flex-direction: column; gap: 3px; }
.apot__lbl { font-family: "Skranji", sans-serif; font-size: 11px; line-height: 14px; letter-spacing: .6px; color: var(--muted); text-transform: uppercase; }
.apot__amt { display: flex; align-items: center; gap: 6px; }
.apot__amt img { width: 20px; height: 21px; }
.apot__amt .num { font-size: 18px; line-height: 22px; color: var(--gold); }
.abal {
  order: 5; display: flex; align-items: center; gap: 7px; height: 44px; padding: 0 8px 0 12px; background: #171D27;
  box-shadow: inset 0 2px 0 rgba(5, 8, 12, .5), inset 0 -1px 0 rgba(var(--hi), .4), inset 0 0 0 1px var(--rim-iron);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
}
.abal__lbl { font-family: "Skranji", sans-serif; font-size: 12px; letter-spacing: .5px; color: var(--muted); text-transform: uppercase; }
.abal img { width: 16px; height: 17px; }
.abal .num { font-size: 15px; color: var(--white); }
.abal__refill { margin-left: 2px; color: var(--gold); }
.abal__refill[hidden] { display: none; }
.atop__fair { order: 6; }
.atop__share { order: 7; position: relative; }
.atop__tip {
  position: absolute; z-index: 2; top: calc(100% + 8px); right: 0; display: flex; align-items: center; gap: 8px; padding: 7px 10px 8px;
  font-family: "Skranji", sans-serif; font-size: 13px; line-height: 16px; letter-spacing: .4px; color: var(--green); white-space: nowrap;
  background: #171D27; box-shadow: inset 0 0 0 1px rgba(var(--hi), .7), 0 10px 24px rgba(4, 7, 12, .5);
}
.atop__tip[hidden] { display: none; }
.atop__link { width: min(260px, 60vw); height: 30px; padding: 0 8px; border: 1px solid rgba(var(--hi), .9); background: #10151D; color: var(--white); font: 12px/1 "Skranji", sans-serif; }
@container arena (width < 1240px) {
  .atop__back { width: 44px; padding: 0 0 4px; }
  .atop__back span, .abal__lbl { display: none; }
}
@container arena (width < 980px) {
  .acase { order: 10; flex: 1 1 100%; width: auto; margin: 0; }
  .acase__txt { max-width: 220px; }
  .apot { margin-left: auto; }
}
@container arena (width < 700px) {
  .atop { gap: 10px 8px; }
  .amode { flex: 1 1 0; gap: 8px; }
  .amode__ic { width: 40px; height: 40px; }
  .amode__fmt { font-size: 15px; line-height: 18px; }
  .amode__flags { display: none; }
  .atop__fair { order: 3; }
  .atop__share { order: 4; }
  .acase__txt { max-width: 130px; }
  .apot { order: 11; margin-left: 0; flex-direction: row; align-items: center; gap: 8px; }
  .abal { order: 12; margin-left: auto; }
}

/* the stage: ase.gg's battle reel in valblox's well
   ase.gg's reel-geometry-battle-column (styles/globals.css), measured against the room's width: a 300/328/364 px
   lane, a 12 px inset, art 86/92/96 px in a 104/110/116 px slot on a pitch of art x 1.25 (with one or two seats
   ase.gg's two-seat size, 104, or 120 from 940 px). No box round the art: a rarity bloom behind it, neighbours faded
   by distance (the engine's near/far) under a soft vignette, no centre line; the separators between lanes carry the
   centre and the pointers either side point at it. The art never outgrows its lane: --la is capped by the lane's
   width, so the drawn art (x --ak) at the spin's focus scale (x 1.15) still leaves 4 px each side; a lane under
   150 px narrows the inset to 6 px first. Under a 700 px room (with 520 px of height) the lanes are rows (battle.js
   sets data-axis), as ase.gg's stacked lanes.
   --ak: the art is drawn 8% over ase.gg's box because these renders leave more air round the item (median content
   88% of the box against ase.gg's 96%), so the item shows at ase.gg's size. */
.astage {
  --lh: 300px; --li: 12px; --la0: 86px; --ls: 104px; --lift: 16px; --ak: 1.08; --pt: 20px; --pb: 40px;
  position: relative; isolation: isolate; margin-top: 18px; padding: var(--pt) 20px var(--pb);
}
.astage > .plate {   /* the carved well: dark along the top, lit along the foot, the heavy rim (edge-heavy) */
  --c: 16px; --n: 6px; --bt: rgba(var(--lo), .62); --bb: rgba(var(--hi), .3);
  --face: radial-gradient(62% 56% at 50% 44%, #202A39 0%, #141B28 100%);
}
.astage.is-teams { --pt: 48px; }
.astage:is([data-lanes="1"], [data-lanes="2"]) { --la0: 104px; --ls: 126px; }
@container bstage (width >= 700px) { .astage { --lift: 20px; } }
@container bstage (width >= 940px) {
  .astage { --lh: 328px; --la0: 92px; --ls: 110px; }
  .astage:is([data-lanes="1"], [data-lanes="2"]) { --la0: 120px; --ls: 145px; }
}
@container bstage (width >= 1040px) { .astage { --lh: 364px; --la0: 96px; --ls: 116px; --lift: 24px; } }
@media (max-height: 519.98px) {
  .astage { --lh: 176px; --li: 6px; --la0: 52px; --ls: 64px; }
  .astage:is([data-lanes="1"], [data-lanes="2"]) { --la0: 64px; --ls: 77px; }
}
.astage__lanes { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(var(--lanes, 2), minmax(0, 1fr)); height: var(--lh); }
.alane { position: relative; min-width: 0; container: blane / inline-size; }
.astage.is-teams .alane { background: linear-gradient(180deg, rgba(var(--side), .08) 0%, rgba(var(--side), 0) 46%); }
.alane.is-open::before {
  content: ""; position: absolute; inset: 8px 10px; background: rgba(var(--lilac-rgb), .025); box-shadow: inset 0 0 0 1px rgba(var(--lilac-rgb), .16);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}
.lane {
  --la: min(var(--la0), calc((100cqi - 2 * var(--li) - 8px) / (var(--ak) * 1.15))); --lp: calc(var(--la) * 1.25);
  position: absolute; inset: 0; transition: opacity .3s;
}
@container blane (max-width: 149.98px) { .lane { --li: 6px; } }
.lane[hidden] { display: none; }
.arena[data-state="waiting"] .lane { opacity: .72; }
.arena[data-state="starting"] .lane { opacity: .35; }
.arena:is([data-state="jackpot"], [data-state="tie"]) .lane { opacity: .2; }
.arena[data-state="completed"] .lane { opacity: .55; }
.arena[data-state="completed"] .alane.is-loser .lane { opacity: .28; }
/* the clip, and ase.gg's reel-vignette as a mask: clear to half the radius, then fading to the well */
.vreel {
  position: absolute; inset: var(--li); overflow: hidden;
  -webkit-mask-image: radial-gradient(145.9% 50% at 50% 50%, #000 50.2%, transparent 100%);
          mask-image: radial-gradient(145.9% 50% at 50% 50%, #000 50.2%, transparent 100%);
}
.vreel__strip { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-direction: column; align-items: center; will-change: transform; }
/* slot (moved and faded by the engine) > item (scaled by the engine): bloom + art */
.lslot { position: relative; flex: none; display: flex; align-items: center; justify-content: center; width: var(--ls); height: var(--lp); }
.astage[data-axis="row"] .lslot { width: var(--lp); height: var(--la); }
.lslot__item { position: relative; flex: none; width: var(--la); height: var(--la); will-change: transform; }
.lslot__bloom {   /* ase.gg's ItemRarityBloom: a blurred rarity glow the size of the plate, lit from the top */
  position: absolute; left: 50%; top: 50%; width: calc(var(--la) * 1.21 + 72px); height: calc(var(--la) * .83 + 72px); transform: translate(-50%, -50%);
  background: radial-gradient(closest-side at 50% 44%, rgba(var(--r-rgb), .26) 0%, rgba(var(--r-rgb), .1) 52%, rgba(var(--r-rgb), 0) 100%);
}
@container bstage (width < 700px) { .lslot__bloom { display: none; } }
.lslot__img { position: absolute; left: 50%; top: 50%; width: calc(var(--la) * var(--ak)); height: calc(var(--la) * var(--ak)); max-width: none; transform: translate(-50%, -50%); object-fit: contain; }
/* the caption under the won item (ase.gg's case-reel-caption.tsx, battle scope): the engine fades it in as the lane
   settles. The name shows from a 700 px room (940 with four or more seats); the price pill always */
.blane__cap {
  position: absolute; z-index: 2; left: 0; right: 0; top: calc(50% + var(--la) / 2 + 8px - var(--lift));
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 4px; pointer-events: none;
}
.blane__name {
  display: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0;
  font-size: 12px; line-height: 16px; letter-spacing: .8px; color: var(--r-hi); text-transform: uppercase;
}
.blane__price {
  display: flex; align-items: center; gap: 4px; max-width: 100%; height: 20px; padding: 0 7px 1px 6px; opacity: 0; transform-origin: 50% 50%;
  background: rgba(13, 18, 26, .88); box-shadow: inset 0 0 0 1px rgba(var(--hi), .16);
  clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px);
}
.blane__price img { width: 12px; height: 13px; flex: none; }
.blane__price .num { font-size: 11px; letter-spacing: .3px; color: var(--white); white-space: nowrap; }
@container bstage (width >= 700px) {
  .blane__cap { gap: 6px; padding: 0 8px; }
  .blane__name { display: block; }
  .astage:is([data-lanes="4"], [data-lanes="5"], [data-lanes="6"]) .blane__name { display: none; }
  .blane__price { height: 24px; padding: 0 9px 1px 8px; }
  .blane__price img { width: 14px; height: 15px; }
  .blane__price .num { font-size: 12px; }
}
@container bstage (width >= 940px) {
  .blane__name, .astage:is([data-lanes="4"], [data-lanes="5"], [data-lanes="6"]) .blane__name { display: block; font-size: 14px; line-height: 18px; }
  .blane__price { height: 28px; gap: 6px; padding: 0 12px 1px; }
  .blane__price img { width: 18px; height: 19px; }
  .blane__price .num { font-size: 14px; }
}
/* whose row it is, at the start of a stacked row (ase.gg's battle-reel-identity): a 28 px avatar and the name */
.blane__who { display: none; }
.blane__who .avatar { width: 28px; height: 28px; padding: 2px;
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px); }
.blane__who .avatar img, .blane__who .avatar--bot .ic { width: 24px; height: 24px;
  clip-path: polygon(5.8px 0, calc(100% - 5.8px) 0, 100% 5.8px, 100% calc(100% - 5.8px), calc(100% - 5.8px) 100%, 5.8px 100%, 0 calc(100% - 5.8px), 0 5.8px); }
.blane__who .avatar--mark img { padding: 2px; }
.blane__who .avatar--bot .ic { padding: 4px; }
.blane__who b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; font-size: 12px; line-height: 16px; letter-spacing: .8px;
  color: var(--player); text-transform: uppercase; }
/* lane separators (ase.gg's battle-arena-separators.tsx) on each lane's right edge: crossed axes between opponents,
   the team mark between teammates; the stage's two pointers point at the centre line from either side */
.bsep { position: absolute; z-index: 3; top: var(--li); bottom: var(--li); right: 0; width: 24px; transform: translateX(50%); pointer-events: none; color: rgba(150, 161, 182, .12); }
.bsep::before, .bsep::after {
  content: ""; position: absolute; left: 50%; width: 1.25px; margin-left: -.625px;
  background: linear-gradient(180deg, transparent 0%, currentColor 25%, currentColor 75%, transparent 100%);
}
.bsep::before { top: 0; bottom: calc(50% + 24px); }
.bsep::after { top: calc(50% + 24px); bottom: 0; }
.bsep__ic { position: absolute; left: 0; top: 50%; width: 24px; height: 24px; margin-top: -12px; perspective: 700px; }
.bsep__spin { display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.22, 1, .36, 1); }
.bsep__spin .ic { display: block; width: 100%; height: 100%; color: #3A4556; backface-visibility: hidden; transform: translateZ(1px); }
.bsep.is-ally .bsep__spin .ic { color: var(--lilac); opacity: .5; }
.bptr { position: absolute; z-index: 4; top: 50%; width: 30px; height: 25px; margin-top: -12.5px; pointer-events: none; filter: drop-shadow(0 2px 2px rgba(4, 7, 12, .5)); }
.bptr--a { left: -11px; }
.bptr--b { right: -11px; }

/* an open seat, in its lane: Join (with the seat's price) or Call Bot */
.alane__open { position: absolute; z-index: 2; left: 10px; right: 10px; top: calc(50% + 34px); transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.alane__open[hidden] { display: none; }
.alane__ol { font-size: 13px; line-height: 18px; letter-spacing: 1.4px; color: var(--lilac); text-transform: uppercase; }
.alane__note { font-family: "Skranji", sans-serif; font-size: 13px; line-height: 18px; letter-spacing: .4px; color: var(--muted); }   /* someone else's battle, once you sit */
.alane__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; }
.alane__btns .btn { flex: 0 1 auto; min-width: 0; height: 44px; padding: 0 14px 4px; gap: 8px; }
.alane__btns .btn .ic { width: 18px; height: 18px; }
.alane__btns .btn img { width: 16px; height: 17px; }
.alane__btns .btn .num { font-size: 14px; }
@container blane (max-width: 239.98px) { .alane__btns { flex-direction: column; align-items: stretch; } }
.alane__open .merr { max-width: 280px; margin-top: 0; text-align: left; }
/* the inline Refill in a message (a seat you can't pay for here; Create on battle-create.html, the demo wallet empty) */
:is(.alane__refill, .csum__refill) { padding: 0; border: 0; background: none; color: var(--gold); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
:is(.alane__refill, .csum__refill):focus-visible { outline: 2px solid var(--lilac-light); outline-offset: 2px; }

/* the teams over their lanes: the name and the total, across the team's columns */
.astage__teams { display: none; }
.astage.is-teams[data-axis="column"] .astage__teams {
  position: absolute; z-index: 2; top: 14px; left: 20px; right: 20px; display: grid; grid-template-columns: repeat(var(--lanes, 2), minmax(0, 1fr)); height: 26px;
}
.aband {
  display: flex; align-items: center; justify-content: center; gap: 12px; min-width: 0; margin: 0 14px; padding: 0 12px 1px;
  background: linear-gradient(180deg, rgba(var(--side), .2) 0%, rgba(var(--side), .06) 100%); box-shadow: inset 0 0 0 1px rgba(var(--side), .3);
  clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px);
}
.aband__n { font-size: 12px; line-height: 16px; letter-spacing: 1.4px; color: rgb(var(--side)); text-transform: uppercase; white-space: nowrap; }
.aband__tot { display: flex; align-items: center; gap: 5px; }
.aband__tot img { width: 14px; height: 15px; }
.aband__tot .num { font-size: 13px; line-height: 16px; color: var(--gold); }

/* the wait: over the top of the stage while seats are open (with Fill with Bots); on stacked rows a band over them
   that says what is on */
.await {
  position: absolute; z-index: 5; top: var(--pt); left: 20px; right: 20px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 16px 16px 26px; text-align: center; pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 27, 40, .94) 0%, rgba(20, 27, 40, .86) 62%, rgba(20, 27, 40, 0) 100%);
}
.await > * { pointer-events: auto; }
.astage[data-axis="column"] .await.is-band { display: none; }
.await__t { font-size: 24px; line-height: 30px; letter-spacing: 1.4px; color: var(--gold); text-transform: uppercase; text-shadow: 0 0 16px rgba(var(--gold-rgb), .3), 0 3px 0 rgba(0, 0, 0, .3); }
.await__row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 18px; max-width: 820px; }
.await__sub { max-width: 540px; font-family: "Skranji", sans-serif; font-size: 14px; line-height: 19px; letter-spacing: .4px; color: var(--muted); }
.await .merr { max-width: 540px; margin-top: 0; text-align: left; }
.await__fill { flex: none; }
.await__fill .ic { width: 18px; height: 18px; }
.await__line { font-family: "Skranji", sans-serif; font-size: 13px; line-height: 18px; letter-spacing: .4px; color: var(--lilac); }

/* the stage's message layer: the countdown, the jackpot or tie spin, the result plate; it sits over the lanes (not
   the seats' slots) and never changes the stage's size */
.astage__msg { position: absolute; z-index: 6; inset: 0 0 24px; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 16px 20px; outline: none; pointer-events: none; }
.astage__msg > * { pointer-events: auto; }
/* the countdown (ase.gg's battle-countdown.tsx): "Starting in" over the dial, a gold-rimmed heavy plate */
.acount { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.acount__l { font-size: 14px; line-height: 18px; letter-spacing: 2px; color: var(--lilac-light); text-transform: uppercase; text-shadow: 0 2px 0 rgba(0, 0, 0, .4); }
.acount__dial { position: relative; isolation: isolate; display: grid; place-items: center; width: 104px; height: 104px; }
.acount__dial > .plate {
  --cap-c: 100px; --cap-n: 100px; --c: 22px; --n: 6px; --rw: 2px; --rim: rgba(var(--gold-rgb), .6);
  --bt: rgba(var(--gold-hi), .36); --bb: rgba(var(--gold-lo), .56); --glow: inset 0 0 20px rgba(var(--gold-rgb), .22);
  --face: radial-gradient(80% 80% at 50% 25%, rgba(var(--gold-rgb), .2) 0%, rgba(var(--gold-rgb), 0) 100%), linear-gradient(180deg, #273042 0%, #1C2330 100%);
}
.acount__n {
  grid-area: 1 / 1; padding-bottom: 4px; font-family: "Skranji", sans-serif; font-weight: 700; font-size: 52px; line-height: 1; color: var(--gold);
  font-variant-numeric: tabular-nums; text-shadow: 0 0 16px rgba(var(--gold-rgb), .45), 0 3px 0 rgba(0, 0, 0, .3);
}

/* the jackpot reel: each side's tiles by its chance, run under the pointer; the legend under it */
.ajack { position: relative; isolation: isolate; width: min(760px, 100%); display: flex; flex-direction: column; gap: 12px; padding: 16px 22px 18px; }
.ajack > .plate { --c: 16px; --n: 6px; --bt: rgba(var(--hi), .3); --bb: rgba(var(--lo), .6); --face: linear-gradient(96deg, var(--card) 0%, var(--card-b) 100%); }
.ajack__t { font-size: 15px; line-height: 20px; letter-spacing: 1px; color: var(--gold); text-align: center; text-transform: uppercase; }
.ajack__bar { position: relative; height: 40px; margin-top: 26px; background: var(--track); box-shadow: inset 0 2px 0 rgba(0, 0, 0, .35); }
.ajack__win {
  position: absolute; z-index: 1; left: 0; right: 0; top: -9px; bottom: -9px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%);
}
.ajack__strip { position: absolute; left: 0; top: 9px; bottom: 9px; display: flex; will-change: transform; }
.ajack__tile { flex: none; display: flex; }
.ajack__seg { position: relative; flex: 1 1 0; min-width: 2px; display: grid; place-items: center; overflow: hidden; font-family: "Skranji", sans-serif; font-weight: 700; font-size: 13px; color: #10151D; white-space: nowrap;
  background: linear-gradient(180deg, var(--seg-hi) 0 30%, var(--seg) 30% 70%, var(--seg-lo) 70% 100%); box-shadow: inset -2px 0 0 rgba(16, 21, 29, .55); will-change: transform; }
.ajack__seg > span { max-width: 100%; padding: 0 8px; overflow: hidden; text-overflow: ellipsis; }
.ajack__ptr { position: absolute; z-index: 2; top: -30px; left: 50%; width: 32px; margin-left: -16px; }
.ajack__ptr img { width: 32px; height: 38px; }
.ajack__ptr::after { content: ""; position: absolute; left: 15px; top: 30px; width: 2px; height: 40px; background: var(--white); box-shadow: 0 0 6px rgba(255, 255, 255, .6); }
.ajack__legend { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px;
  font-family: "Skranji", sans-serif; font-size: 13px; letter-spacing: .4px; color: var(--muted); }
.ajack__legend li { display: inline-flex; align-items: center; gap: 7px; transition: opacity .3s ease; }
.ajack__sw { width: 12px; height: 12px; flex: none; background: linear-gradient(180deg, var(--seg-hi) 0 30%, var(--seg) 30% 70%, var(--seg-lo) 70% 100%);
  clip-path: polygon(3px 0, calc(100% - 3px) 0, 100% 3px, 100% calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 0 calc(100% - 3px), 0 3px); }
.ajack__who { color: var(--player); text-transform: uppercase; transition: color .3s ease; }
.ajack__legend b { font-weight: 700; color: var(--white); }
.ajack__legend:has(.is-win) li:not(.is-win) { opacity: .5; }
.ajack__legend li.is-win .ajack__who { color: var(--gold); }

/* the result plate, in the middle of the stage (a heavy plate): the kicker, the winners and the title, what they
   take, the split, the viewer's own line, Replay and Recreate */
.aend { position: relative; isolation: isolate; width: min(560px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 24px 22px; text-align: center; }
.aend > .plate {
  --c: 16px; --n: 6px; --bt: rgba(var(--hi), .3); --bb: rgba(var(--lo), .6);
  --face: radial-gradient(60% 90% at 50% 0%, rgba(var(--gold-rgb), .18) 0%, rgba(var(--gold-rgb), 0) 100%), linear-gradient(180deg, #2A3446 0%, #1F2734 100%);
}
.aend.is-group > .plate { --face: radial-gradient(60% 90% at 50% 0%, rgba(var(--green-rgb), .13) 0%, rgba(var(--green-rgb), 0) 100%), linear-gradient(180deg, #2A3446 0%, #1F2734 100%); }
.aend__k { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; letter-spacing: 1.4px; color: var(--lilac); text-transform: uppercase; }
.aend__k .ic { width: 15px; height: 15px; color: var(--gold); }
.aend.is-group .aend__k .ic { color: var(--green); }
.aend__who { display: flex; align-items: center; justify-content: center; gap: 12px; min-width: 0; max-width: 100%; }
.aend__avs { display: flex; flex: none; }
.aend__avs .avatar { background: var(--gold); }
.aend__avs .avatar + .avatar { margin-left: -10px; }
.aend.is-group .aend__avs .avatar { background: rgba(var(--green-rgb), .7); }
.aend__t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; outline: none; font-weight: 400; font-size: 26px; line-height: 32px; letter-spacing: 1.3px;
  color: var(--gold); text-transform: uppercase; text-shadow: 0 0 18px rgba(var(--gold-rgb), .35), 0 3px 0 rgba(0, 0, 0, .3); }
.aend.is-group .aend__t { color: var(--green); text-shadow: 0 0 18px rgba(var(--green-rgb), .25), 0 3px 0 rgba(0, 0, 0, .3); }
.aend__pay { display: flex; align-items: center; gap: 8px; }
.aend__lbl { font-family: "Skranji", sans-serif; font-size: 12px; line-height: 16px; letter-spacing: .6px; color: var(--muted); text-transform: uppercase; }
.aend__pay img { width: 20px; height: 21px; }
.aend__pay .num { font-size: 26px; line-height: 30px; color: var(--gold); }
.aend__sub { max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  font-family: "Skranji", sans-serif; font-size: 13px; line-height: 18px; letter-spacing: .3px; color: var(--muted); }
.aend__note { width: 100%; padding-top: 10px; border-top: 1px solid rgba(var(--hi), .7); font-family: "Skranji", sans-serif; font-size: 14px; line-height: 19px; letter-spacing: .4px; color: var(--muted); }
.aend__note.is-won { color: var(--green); }
.aend__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 2px; }
.aend__btns .btn .ic { width: 20px; height: 20px; }
/* won items: ase.gg's drop cards (battle-seat-column.tsx, battle-drop-card.tsx, battle-drop-slot.tsx). Every round
   has its slot from the start (#N, a "?"), so nothing shifts as drops land; the list shows 3-5 rows (about 618 px)
   and follows the newest row (battle.js). A card at least 230 px wide puts the art beside the text. */
.seat__drops {
  list-style: none; margin: 16px 2px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(167px, 100%), 1fr)); gap: 12px 16px;
  overflow-y: auto; overflow-anchor: none; scrollbar-width: none; transition: opacity .3s ease-out;
}
.seat__drops::-webkit-scrollbar { display: none; }
.seat__drops:focus-visible { outline: 1px solid var(--lilac); outline-offset: -1px; }
@container seat (min-width: 240px) { .seat__drops { margin-top: 12px; } }
.bdl { min-width: 0; container: drop / inline-size; }
.bdrop { position: relative; isolation: isolate; display: grid; align-content: start; padding: 11px; }
.bdrop > .plate { --c: 8px; --n: 3px; }
.bdrop.is-slot > .plate { --face: linear-gradient(180deg, #1B222E 0%, #1E2633 100%); }
.bdrop__meta {
  grid-column: 1; grid-row: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 16px; min-width: 0;
  font-family: "Skranji", sans-serif; font-weight: 700; font-size: 12px; line-height: 16px; color: var(--muted); white-space: nowrap;
}
.bdrop.is-slot .bdrop__meta { opacity: .25; }
.bdrop__n { font-size: 16px; line-height: 16px; color: var(--white); }
.bdrop__odds { color: var(--r-hi); }
.bdrop__art { grid-column: 1; grid-row: 2; justify-self: center; position: relative; width: 80px; height: 80px; display: grid; place-items: center; }
.bdrop__art img { width: calc(80px * 1.08); height: calc(80px * 1.08); max-width: none; object-fit: contain; }
.bdrop__q { font-size: 64px; line-height: 1; color: rgba(150, 161, 182, .16); text-shadow: -3px 3px 0 rgba(0, 0, 0, .25); }
.bdrop__name {
  grid-column: 1; grid-row: 3; margin-top: 16px; height: 32px; min-width: 0; overflow: hidden;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  font-size: 13px; line-height: 16px; letter-spacing: .6px; color: var(--white); text-transform: uppercase;
}
.bdrop__price { grid-column: 1; grid-row: 4; margin-top: 12px; display: flex; align-items: center; gap: 6px; height: 18px; }
.bdrop__price img { width: 17px; height: 18px; flex: none; }
.bdrop__price .num { font-size: 14px; letter-spacing: .3px; color: var(--gold); }
.bdrop__rule {   /* a hairline along the top of a wide card */
  display: none; position: absolute; top: 0; left: 11px; right: 8px; height: 1.25px; color: rgb(150, 161, 182); opacity: .1;
  background: linear-gradient(90deg, transparent 0%, currentColor 25%, currentColor 75%, transparent 100%);
}
@container drop (min-width: 230px) {
  .bdrop { grid-template-columns: minmax(0, 1fr) 96px; align-items: center; column-gap: 12px; }
  .bdrop__meta { justify-content: flex-start; gap: 12px; font-size: 14px; }
  .bdrop__n { font-size: 14px; }
  .bdrop__art { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
  .bdrop__name { grid-row: 2; }
  .bdrop__price { grid-row: 3; }
  .bdrop__rule { display: block; }
}
/* a fresh card drops in (ase.gg's battle-drop, 380 ms, on a calm ease with no overshoot) with a rarity ring flash (value-flash) */
.bdrop.is-fresh { animation: bdrop-in .38s cubic-bezier(.2, .8, .3, 1) backwards; }
.bdrop__flash {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0;
  box-shadow: inset 0 0 0 1.5px var(--r), inset 0 0 16px rgba(var(--r-rgb), .4);
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
  animation: bdrop-flash .52s ease-out both;
}
@keyframes bdrop-in { from { opacity: 0; transform: translateY(-12px) scale(.94); } }
@keyframes bdrop-flash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
/* the seats: a slot per seat over the stage's foot (diceblox: 24 px over it), lined up on the lanes, the drops under
   each. A slot is a light plate: the avatar (and level), the name over its sub line, the running total; a side's
   colour runs along its top in a team or jackpot game */
.aseats {
  list-style: none; position: relative; z-index: 3; display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); align-items: start;
  column-gap: 16px; row-gap: 18px; margin: -24px 0 0; padding: 0 28px;   /* 28 = the stage's 20 + half the gap: each slot centres on its lane */
}
.aseat { position: relative; min-width: 0; display: flex; flex-direction: column; gap: 12px; container: seat / inline-size; }
.aseat ~ .aseat::before { content: ""; position: absolute; left: -8.5px; top: 88px; bottom: 0; width: 1px; pointer-events: none; background: linear-gradient(180deg, rgba(var(--hi), .9) 0%, rgba(var(--hi), 0) 100%); }
.aslot {
  position: relative; isolation: isolate; display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-areas: "av lvl name name" "av lvl sub tot";
  align-items: center; min-height: 71px; padding: 11px 14px 11px 12px; transition: filter .3s;
}
.aslot > .plate { --c: 12px; --n: 5px; --bt: rgba(var(--hi), .3); --bb: rgba(var(--lo), .6); --face: linear-gradient(180deg, var(--card-b) 0%, var(--card) 100%); }
.aseat.is-banded .aslot::before { content: ""; position: absolute; top: 2px; left: 14px; right: 14px; height: 3px; pointer-events: none; background: rgb(var(--side)); opacity: .85; }
.aslot__who, .aslot__name { display: contents; }
.aslot__who .avatar { grid-area: av; margin-right: 10px; }
.aslot__who .lvl { grid-area: lvl; margin-right: 9px; width: 24px; height: 24px; font-size: 12px; }
.aslot__ghost { grid-area: av; width: 39px; height: 39px; margin-right: 10px; display: grid; place-items: center; color: rgba(var(--lilac-rgb), .6);
  background: rgba(var(--lilac-rgb), .05); box-shadow: inset 0 0 0 1px rgba(var(--lilac-rgb), .35);
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px); }
.aslot__ghost .ic { width: 16px; height: 16px; }
.aslot__name b { grid-area: name; align-self: end; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; font-size: 15px; line-height: 19px; letter-spacing: 1px; color: var(--player); text-transform: uppercase; }
.aslot__name small { grid-area: sub; align-self: start; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-family: "Skranji", sans-serif; font-size: 12px; line-height: 18px; color: var(--muted); white-space: nowrap; }
.aseat.is-banded .aslot__name small { color: rgb(var(--side)); }
.aslot__tot { grid-area: tot; justify-self: end; display: flex; align-items: center; gap: 6px; min-height: 22px; margin-left: 10px; }
.aslot__tot img { width: 16px; height: 17px; }
.aslot__tot .num { font-size: 16px; color: var(--gold); }
.aslot__pay {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px 1px; white-space: nowrap;
  font-family: "Skranji", sans-serif; font-weight: 700; font-size: 13px; line-height: 1; letter-spacing: .5px; color: var(--muted);
  background: #171D27; box-shadow: inset 0 2px 0 rgba(5, 8, 12, .5), inset 0 0 0 1px var(--rim-iron);
  clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px);
}
.aslot__pay.is-paid { color: #2A2114; background: linear-gradient(180deg, #F4CD9A 0%, #EAB670 55%, #996E30 100%); box-shadow: none; }
.aseat.is-split .aslot__pay.is-paid { color: #0B2A20; background: linear-gradient(180deg, #A8FFE0 0%, #58FFC3 55%, #1E9E75 100%); }
.aslot__crown {   /* the winner's crown on the slot's top edge */
  position: absolute; z-index: 3; top: -14px; left: 50%; width: 32px; height: 26px; transform: translateX(-50%); display: grid; place-items: center;
  color: #2A2114; background: linear-gradient(180deg, #F4CD9A 0%, #EAB670 50%, #996E30 100%);
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px);
}
.aslot__crown .ic { width: 18px; height: 18px; }
.aseat.is-open .aslot > .plate { --face: linear-gradient(180deg, #1F2733 0%, #1A212B 100%); }
.aseat.is-open .aslot__name b { color: var(--muted); }
.aseat.is-you .aslot__name b { color: var(--gold); }
.aseat.is-you .aslot__who .avatar { background: var(--gold); }
.aseat.is-lead .aslot__tot .num { text-shadow: 0 0 12px rgba(var(--gold-rgb), .5); }
.aseat.is-lead .aslot__tot::after { content: ""; width: 6px; height: 6px; margin-left: 2px; transform: rotate(45deg); background: var(--gold); box-shadow: 0 0 8px rgba(var(--gold-rgb), .7); }
.aseat.is-winner .aslot > .plate { --rim: var(--gold); --glow: inset 0 0 22px rgba(var(--gold-rgb), .18); }
.aseat.is-split .aslot > .plate { --rim: rgba(var(--green-rgb), .7); --glow: inset 0 0 18px rgba(var(--green-rgb), .1); }
.aseat.is-loser .aslot { filter: brightness(.55); }
.aseat.is-loser .seat__drops { opacity: .45; }
@container arena (width < 970px) {
  .aslot { padding: 10px 10px 10px 10px; }
  .aslot__who .avatar { width: 30px; height: 30px; margin-right: 8px; padding: 2px;
    clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px); }
  .aslot__who .avatar img, .aslot__who .avatar--bot .ic { width: 26px; height: 26px;
    clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px); }
  .aslot__who .avatar--bot .ic { padding: 5px; }
  .aslot__ghost { width: 30px; height: 30px; margin-right: 8px; }
}
@container seat (max-width: 199.98px) {   /* a narrow seat: the total under the name, no level */
  .aslot { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "av name" "av tot"; }
  .aslot__who .lvl, .aslot__name small { display: none; }
  .aslot__tot { justify-self: start; margin-left: 0; }
  .aslot__name b { font-size: 14px; letter-spacing: .6px; }
}

/* stacked rows (under a 700 px room): the lanes are rows in the stage (ase.gg's [data-reel-stack] sizes, dense from
   five seats), whose row it is at its start, the wait and the round as a band over them; the seats follow below,
   two a row (one with three seats, three from 420 px with five or six) */
.astage[data-axis="row"] { --lh: 124px; --pt: 12px; --pb: 12px; display: flex; flex-direction: column; padding: 14px 12px 12px; }
.astage[data-axis="row"][data-dense] { --lh: 100px; }
@container bstage (width >= 520px) {
  .astage[data-axis="row"] { --lh: 144px; }
  .astage[data-axis="row"][data-dense] { --lh: 116px; }
}
.astage[data-axis="row"] .lane { --la: 72px; --lp: 88px; --li: 6px; }
.astage[data-axis="row"][data-dense] .lane { --la: 56px; --lp: 68px; }
@container bstage (width >= 520px) {
  .astage[data-axis="row"] .lane { --la: 88px; --lp: 108px; }
  .astage[data-axis="row"][data-dense] .lane { --la: 68px; --lp: 84px; }
}
.astage[data-axis="row"] .astage__lanes { display: flex; flex-direction: column; height: auto; min-height: 286px; }
.astage[data-axis="row"] .alane { flex: 1 0 var(--lh); }
.astage[data-axis="row"].is-teams .alane { background: linear-gradient(90deg, rgba(var(--side), .1) 0%, rgba(var(--side), 0) 40%); }
.astage[data-axis="row"] .vreel {
  -webkit-mask-image: radial-gradient(50% 50% at 50% 50%, #000 50.2%, transparent 100%);
          mask-image: radial-gradient(50% 50% at 50% 50%, #000 50.2%, transparent 100%);
}
.astage[data-axis="row"] .vreel__strip { right: auto; bottom: 0; flex-direction: row; }
.astage[data-axis="row"] .blane__cap { display: none; }
.astage[data-axis="row"] .blane__who {
  position: absolute; z-index: 2; left: 6px; top: 50%; display: flex; align-items: center; gap: 6px; max-width: calc(50% - var(--la) * .55 - 14px);
  padding: 4px 16px 4px 4px; transform: translateY(-50%); pointer-events: none;
  background: linear-gradient(90deg, rgba(20, 27, 40, .94) 0%, rgba(20, 27, 40, .94) 62%, rgba(20, 27, 40, 0) 100%);
}
.astage[data-axis="row"] .bsep { top: auto; left: var(--li); right: var(--li); bottom: 0; width: auto; height: 16px; transform: translateY(50%); }
.astage[data-axis="row"] .bsep::before, .astage[data-axis="row"] .bsep::after {
  top: 50%; bottom: auto; width: auto; height: 1.25px; margin: -.625px 0 0;
  background: linear-gradient(90deg, transparent 0%, currentColor 25%, currentColor 75%, transparent 100%);
}
.astage[data-axis="row"] .bsep::before { left: 0; right: calc(50% + 16px); }
.astage[data-axis="row"] .bsep::after { left: calc(50% + 16px); right: 0; }
.astage[data-axis="row"] .bsep__ic { left: 50%; top: 0; width: 16px; height: 16px; margin: 0 0 0 -8px; }
.astage[data-axis="row"] .bptr { top: auto; left: 50%; width: 25px; height: 30px; margin: 0 0 0 -12.5px; }
.astage[data-axis="row"] .bptr--a { top: -11px; }
.astage[data-axis="row"] .bptr--b { bottom: -11px; }
.astage[data-axis="row"] .alane.is-open::before { inset: 6px 8px; }
.astage[data-axis="row"] .alane__open { top: 50%; left: 8px; right: 8px; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 6px 10px; }
.astage[data-axis="row"] .alane__btns { flex-direction: row; flex-wrap: nowrap; width: auto; }
.astage[data-axis="row"] .alane__btns .btn { height: 40px; padding: 0 12px 4px; font-size: 13px; }
.astage[data-axis="row"] .alane__ol, .astage[data-axis="row"] .alane__note, .astage[data-axis="row"] .alane__open .merr { flex-basis: 100%; }
.astage[data-axis="row"] .alane__open .merr { justify-content: center; max-width: none; }
.astage[data-axis="row"] .await { order: -1; position: static; padding: 2px 6px 16px; gap: 8px; background: none; }
.astage[data-axis="row"] .await__t { font-size: 18px; line-height: 22px; }
.astage[data-axis="row"] .await__sub { font-size: 13px; line-height: 18px; }
.astage[data-axis="row"] .astage__msg { inset: 0; padding: 12px; }
.astage[data-axis="row"] .acount__dial { width: 84px; height: 84px; }
.astage[data-axis="row"] .acount__n { font-size: 42px; }
.astage[data-axis="row"] .ajack { padding: 14px 12px 12px; }
.astage[data-axis="row"] .aend { gap: 8px; padding: 16px 14px; }
.astage[data-axis="row"] .aend__t { font-size: 20px; line-height: 24px; }
.astage[data-axis="row"] .aend__pay .num { font-size: 20px; line-height: 26px; }
.astage[data-axis="row"] .aend__note { padding-top: 8px; font-size: 13px; line-height: 18px; }
.astage[data-axis="row"] .aend__btns { width: 100%; gap: 8px; }
.astage[data-axis="row"] .aend__btns .btn { flex: 1 1 auto; height: 42px; padding: 0 12px 4px; }
.astage[data-axis="row"] + .aseats { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; row-gap: 16px; margin-top: 16px; padding: 0; }
.astage[data-axis="row"] + .aseats[data-n="3"] { grid-template-columns: minmax(0, 1fr); }
@container arena (width >= 420px) {
  .astage[data-axis="row"] + .aseats:is([data-n="5"], [data-n="6"]):not([data-ts]) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.astage[data-axis="row"] + .aseats .aseat ~ .aseat::before { display: none; }
/* a team game on stacked rows: each team's seats are a block under its header (the team's name and total, in its
   colour), Team A then B then C, so no row mixes two teams; two columns, three for teams of three from 420 px */
.aseats__team { display: none; }
.astage[data-axis="row"] + .aseats[data-ts] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.astage[data-axis="row"] + .aseats[data-ts] .aseats__team {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; height: 30px; margin-bottom: -6px; padding: 0 12px 1px;
  background: linear-gradient(180deg, rgba(var(--side), .2) 0%, rgba(var(--side), .06) 100%); box-shadow: inset 0 0 0 1px rgba(var(--side), .3);
  clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px);
}
.astage[data-axis="row"] + .aseats[data-ts] .aseat ~ .aseats__team { margin-top: 8px; }
@container arena (width >= 420px) {
  .astage[data-axis="row"] + .aseats[data-ts="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container arena (width < 420px) {
  .astage[data-axis="row"] .aend__avs { display: none; }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1360px) {
  .cwrap { grid-template-columns: minmax(0, 1fr) 290px; }
}
@media (max-width: 900px) {
  .cwrap { grid-template-columns: minmax(0, 1fr); }
  .csum { position: static; }
}
@media (max-width: 600px) {
  .phead { margin-bottom: 16px; }
  .phead__t .ic { width: 22px; height: 22px; }
  .ctools { width: 100%; flex-wrap: wrap; }
  .csearch { flex: 1; width: auto; min-width: 0; }
  .csort { width: 170px; }
  .csort__lbl { display: none; }
  .csortseg { flex: 1 1 100%; }   /* the sort toggle gets its own row, full width */
  .csortseg .mseg { flex: 1; }
  .drops { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px 0 12px 14px; }
  .drops__t { width: auto; }
  .drop { width: 220px; }
  .fair__in { padding: 22px 18px 22px; }
  .fair__vals div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  /* create: the summary becomes a bar on the foot of the screen. The numbers and Create share a row while both fit at
     their own widths (Create at its size on the right); when they don't (a phone, or a big pot), Create wraps to its
     own row across the bar instead of sliding over the numbers. The page keeps room under it for the two rows. */
  .create { padding-bottom: calc(128px + env(safe-area-inset-bottom)); }
  .csum { position: fixed; z-index: 7; left: 0; right: 0; bottom: 0; top: auto; display: flex; flex-flow: row wrap; align-items: center; gap: 8px 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--header); box-shadow: inset 0 4px 0 var(--header-edge), 0 -10px 24px rgba(4, 7, 12, .45); }
  .csum > .plate, .csum__t, .csum__rounds, .csum__bal, .csum__nums > div:not(.csum__pot):not(:first-child) { display: none; }
  .csum__nums { flex: 999 0 auto; flex-direction: row; gap: 14px; }   /* takes the row's spare width, so Create keeps its own */
  .csum__nums div { flex-direction: column; align-items: flex-start; gap: 0; }
  .csum__pot { padding-top: 0; border-top: 0; }
  .csum__nums dt { font-size: 12px; }
  .csum__go { flex: 1 0 auto; width: auto; height: 48px; padding: 0 16px 4px; font-size: 15px; gap: 10px; }   /* alone on its row: across the bar */
  .csum .merr { flex: 1 1 100%; margin-top: 0; }
  .cset { padding: 18px 16px 20px; }
  .cseg .btn { font-size: 13px; padding: 0 2px 4px; }
  .cseg--mode .btn .ic { display: none; }
  .pcard__name { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .drop.is-new { animation: none; }
  .lane, .aslot, .acase__rail, .around img, .bsep__spin { transition: none; }
  .bdrop.is-fresh { animation: bdrop-fade .12s ease-out backwards; }
  .bdrop__flash { display: none; }
}
@keyframes bdrop-fade { from { opacity: 0; } }

/* Borrow badges (docs/api.md 4.1c): a lobby row's (beside Crazy, in frost) and the battle room's (after the mode).
   The creator's percent: every seat paid that much less and every drop pays that much less. */
.crazy.lborrow { color: var(--lilac-light); background: rgba(var(--lilac-rgb), .12); padding: 0 7px 1px; }
.lrow__mode .lborrow { order: 3; }
.aborrow {
  flex: none; display: inline-flex; align-items: center; height: 24px; padding: 0 8px 1px;
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; color: var(--lilac-light); background: rgba(var(--lilac-rgb), .12);
  clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px);
}
.aborrow--row { display: none; order: 11; }
.aborrow--row[hidden] { display: none !important; }
@container arena (width < 700px) {
  .amode .aborrow { display: none; }
  .aborrow--row { display: inline-flex; }
}
