/* Rumble Ring - the big screen (brawl-big.js). One 1920x1080 board, scaled to the arena as one piece. Toy theme for
   the plates, cards and pills (--toy-* tokens, the porthole atom); the Pokemon are pixel sprites, drawn crisp. */
#bwArena{ position:fixed; inset:0; z-index:55; overflow:hidden; }
#bwArena .bwb-host{ position:absolute; inset:0; }
.bwb-board{ position:absolute; left:0; top:0; width:1920px; height:1080px; transform-origin:0 0; font-family:'Fredoka',sans-serif; color:var(--toy-ink-color); }
.bwb-board img{ image-rendering:pixelated; }
.bwb-top{ position:absolute; left:28px; right:28px; top:20px; display:flex; align-items:center; gap:14px; z-index:3; }
.bwb-plate{ font-family:'Lilita One',sans-serif; font-size:46px; color:#fff; letter-spacing:1px; padding:6px 28px 10px; background:var(--toy-grad-action);
  border:var(--toy-border-dark); border-radius:22px; transform:rotate(-2deg); -webkit-text-stroke:3px var(--toy-ink-color); paint-order:stroke fill;
  text-shadow:0 3px 0 var(--toy-ink-color), 0 2px 0 var(--toy-ink-color), 0 1px 0 var(--toy-ink-color);
  box-shadow:var(--toy-bevel-sheen); --toy-drop:4px; --toy-drop-c:var(--toy-ink-color); --toy-under:opacity(1);
  filter:var(--toy-fx, opacity(1)) drop-shadow(0 var(--toy-drop, 0px) 0 var(--toy-drop-c, transparent)) var(--toy-under, opacity(1)); }
.bwb-pill{ font-family:'Lilita One',sans-serif; font-size:24px; letter-spacing:1px; padding:7px 18px; background:var(--toy-bg-eggshell); border:var(--toy-border-dark);
  border-radius:99px; white-space:nowrap; box-shadow:none; --toy-drop:4px; --toy-drop-c:var(--toy-ink-color); --toy-under:opacity(1);
  filter:var(--toy-fx, opacity(1)) drop-shadow(0 var(--toy-drop, 0px) 0 var(--toy-drop-c, transparent)) var(--toy-under, opacity(1)); }
.bwb-pill:empty{ display:none; }
.bwb-sp{ flex:1; }
.bwb-clock{ font-family:'Lilita One',sans-serif; font-size:54px; line-height:1; color:#fff; padding:8px 26px 12px; background:linear-gradient(180deg, #3B4A6B, #1E2A44);
  border:var(--toy-border-dark); border-radius:20px; box-shadow:none; --toy-drop:4px; --toy-drop-c:var(--toy-ink-color); --toy-under:opacity(1);
  filter:var(--toy-fx, opacity(1)) drop-shadow(0 var(--toy-drop, 0px) 0 var(--toy-drop-c, transparent)) var(--toy-under, opacity(1)); }
.bwb-clock:empty{ display:none; }
.bwb-body{ position:absolute; left:0; top:120px; right:0; bottom:0; }
.bwb-call{ width:fit-content; margin:20px auto 0; padding:4px 34px 12px; text-align:center; font-family:'Lilita One',sans-serif; font-size:58px; color:#fff;
  -webkit-text-stroke:4px var(--toy-ink-color); paint-order:stroke fill;
  text-shadow:0 5px 0 var(--toy-ink-color), 0 4px 0 var(--toy-ink-color), 0 3px 0 var(--toy-ink-color), 0 2px 0 var(--toy-ink-color), 0 1px 0 var(--toy-ink-color);
  /* on the clock's navy plate: over the bright sky and the bunting the outline alone went soft mid-line */
  background:linear-gradient(180deg, #3B4A6B, #1E2A44); border:var(--toy-border-dark); border-radius:22px; box-shadow:none; --toy-drop:5px; --toy-drop-c:var(--toy-ink-color); --toy-under:opacity(1);
  filter:var(--toy-fx, opacity(1)) drop-shadow(0 var(--toy-drop, 0px) 0 var(--toy-drop-c, transparent)) var(--toy-under, opacity(1)); }
/* THE HOOK (fewer backers, a bigger boost): a cream pill, so it reads over the grass and the sparkles */
.bwb-sub{ width:fit-content; margin:26px auto 0; padding:8px 26px 10px; text-align:center; font-size:28px; font-weight:600; color:var(--toy-ink-color); background:var(--toy-bg-eggshell);
  border:var(--toy-border-dark); border-radius:99px; box-shadow:none; --toy-drop:4px; --toy-drop-c:var(--toy-ink-color); --toy-under:opacity(1);
  filter:var(--toy-fx, opacity(1)) drop-shadow(0 var(--toy-drop, 0px) 0 var(--toy-drop-c, transparent)) var(--toy-under, opacity(1)); }
.bwb-ty{ font-family:'Lilita One',sans-serif; font-size:16px; letter-spacing:.5px; color:#fff; padding:2px 10px 3px; border-radius:99px; border:2.5px solid var(--toy-ink-color); text-transform:uppercase; }

/* PICK: the lineup's cards */
.bwb-cards{ display:flex; flex-direction:column; align-items:center; gap:26px; padding:30px 60px 0; }
.bwb-row{ display:flex; justify-content:center; gap:26px; }
.bwb-card{ width:280px; display:flex; flex-direction:column; align-items:center; gap:10px; padding:16px 14px 18px; background:var(--toy-bg-eggshell); border:var(--toy-border-dark);
  border-radius:26px; box-shadow:none; --toy-drop:6px; --toy-drop-c:var(--toy-ink-color); --toy-under:opacity(1);
  filter:var(--toy-fx, opacity(1)) drop-shadow(0 var(--toy-drop, 0px) 0 var(--toy-drop-c, transparent)) var(--toy-under, opacity(1)); }
.bwb-pt{ width:150px; height:150px; border-radius:22px; --toy-art-scale:.883; }   /* the 64 px sprite at exactly 2x in the 145 px window: crisp pixels, and
   ~14 px clear of the rim (at the porthole's default 1.15 Cubone's bone and Pikachu's ears ran into it) */
.bwb-nm{ font-family:'Lilita One',sans-serif; font-size:32px; line-height:1; }
.bwb-tys{ display:flex; gap:6px; }
.bwb-reveal{ display:none; align-items:center; gap:10px; font-family:'Lilita One',sans-serif; font-size:22px; }
.bwb-card.revealed .bwb-reveal{ display:flex; }
.bwb-card.out{ --toy-fx:grayscale(1); opacity:.55; }
.bwb-boost{ font-family:'Lilita One',sans-serif; font-size:20px; padding:1px 9px 3px; border-radius:10px; border:2.5px solid var(--toy-ink-color); background:var(--toy-gold); }
.bwb-boost:empty{ display:none; }
.bwb-boost.lo{ background:#E2E8F0; }

/* THE FINALS DRAFT: a column per finalist, their name plate over their three cards (one card width whatever the count) */
.bwb-hands{ display:flex; justify-content:center; align-items:flex-start; gap:28px; padding:28px 40px 0; }
.bwb-hand{ width:300px; display:flex; flex-direction:column; align-items:stretch; gap:14px; }
.bwb-hands.n5 .bwb-hand{ width:282px; }
.bwb-hands.n6 .bwb-hand{ width:262px; }
.bwb-hands.n6{ gap:20px; }
/* two or three finalists: the stage is theirs, so the cards grow into it */
.bwb-hands.n2 .bwb-hand, .bwb-hands.n3 .bwb-hand{ width:420px; gap:18px; }
.bwb-hands.n2 .bwb-dcard .bwb-pt, .bwb-hands.n3 .bwb-dcard .bwb-pt{ width:128px; height:128px; }
.bwb-hands.n2 .bwb-dinfo .bwb-nm, .bwb-hands.n3 .bwb-dinfo .bwb-nm{ font-size:34px; }
.bwb-hands.n2 .bwb-hname, .bwb-hands.n3 .bwb-hname{ font-size:36px; }
.bwb-hname{ align-self:center; max-width:100%; box-sizing:border-box; white-space:nowrap; overflow:hidden; font-family:'Lilita One',sans-serif; font-size:30px; color:#fff; letter-spacing:.5px;
  padding:4px 20px 8px; background:linear-gradient(180deg, #3B4A6B, #1E2A44); border:var(--toy-border-dark); border-radius:16px; box-shadow:none; --toy-drop:4px; --toy-drop-c:var(--toy-ink-color); --toy-under:opacity(1);
  filter:var(--toy-fx, opacity(1)) drop-shadow(0 var(--toy-drop, 0px) 0 var(--toy-drop-c, transparent)) var(--toy-under, opacity(1)); }
.bwb-card.bwb-dcard{ width:auto; flex-direction:row; flex-wrap:wrap; align-items:center; gap:4px 14px; padding:10px 14px; border-radius:20px; --toy-drop:5px; }
.bwb-dcard .bwb-pt{ width:96px; height:96px; flex:none; border-radius:16px; }
.bwb-dinfo{ flex:1; min-width:0; display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
.bwb-dinfo .bwb-nm{ font-size:28px; max-width:100%; white-space:nowrap; }
.bwb-dinfo .bwb-tys{ flex-wrap:wrap; }
/* four or five columns: two type chips must still fit inside the card (FLYING and FAIRY ran off its edge) */
.bwb-hands.n4 .bwb-dcard .bwb-ty, .bwb-hands.n5 .bwb-dcard .bwb-ty, .bwb-hands.n6 .bwb-dcard .bwb-ty{ font-size:12px; padding:1px 6px 2px; border-width:2px; }
.bwb-hands.n4 .bwb-dcard .bwb-pt, .bwb-hands.n5 .bwb-dcard .bwb-pt, .bwb-hands.n6 .bwb-dcard .bwb-pt{ width:84px; height:84px; }
.bwb-hands.n4 .bwb-card.bwb-dcard, .bwb-hands.n5 .bwb-card.bwb-dcard, .bwb-hands.n6 .bwb-card.bwb-dcard{ gap:4px 10px; padding:10px 10px; }
.bwb-card.bwb-dcard{ position:relative; }
/* PICKED sits on the card's bottom rim, so a flip never changes the column's height (it pushed the hint line down) */
.bwb-dcard .bwb-reveal{ position:absolute; left:50%; bottom:0; transform:translate(-50%, 50%); }
.bwb-dcard .bwb-bk{ font-size:18px; color:#fff; background:var(--toy-ink-color); padding:1px 12px 3px; border-radius:99px; }
.bwb-dcard .bwb-bk:empty{ display:none; }
.bwb-card.picked{ background:#FFF3BF; outline:5px solid #FFE066; outline-offset:2px; }
/* the flip: the pick turns over and pops forward; its finalist's plate lights with it */
.bwb-card.flip{ animation:bwbFlip .55s cubic-bezier(.2,.9,.3,1.3) both; }
@keyframes bwbFlip{ 0%{ transform:perspective(600px) rotateY(90deg) scale(.9); } 55%{ transform:perspective(600px) rotateY(0) scale(1.12); } 100%{ transform:perspective(600px) rotateY(0) scale(1); } }
.bwb-hand.flipped .bwb-hname{ background:linear-gradient(180deg, #F59F00, #E8590C); }
.bwb-hand.nopick::after{ content:'NO PICK'; align-self:center; font-family:'Lilita One',sans-serif; font-size:22px; color:#fff; background:#C92A2A;
  border:3px solid var(--toy-ink-color); border-radius:99px; padding:2px 16px 4px; margin-top:-4px; }
.bwb-bbk.bwb-own{ font-family:'Lilita One',sans-serif; }

/* FIGHT: benches either side, the arena between. Both benches size their cards for the LONGER one (--bwb-rows, set by
   brawl-big.js) and start on the same top line, the same width and inset from each edge: 7 fighters (4 + 3) leave the
   short bench's last slot empty at the bottom, never a bench pushed down */
.bwb-board.fighting .bwb-call{ display:none; }
.bwb-bench{ --bwb-gap:14px; position:absolute; top:10px; bottom:40px; width:330px; display:flex; flex-direction:column; justify-content:flex-start; gap:var(--bwb-gap); box-sizing:border-box; min-width:0; }
.bwb-bench.l{ left:24px; } .bwb-bench.r{ right:24px; }
.bwb-bench-card{ position:relative; flex:none; height:min(190px, calc((100% - (var(--bwb-rows, 4) - 1) * var(--bwb-gap)) / var(--bwb-rows, 4)));
  box-sizing:border-box; display:flex; align-items:center; gap:12px; padding:10px 14px 10px 10px; background:var(--toy-bg-eggshell);
  border:var(--toy-border-dark); border-radius:20px; box-shadow:none; --toy-drop:4px; --toy-drop-c:var(--toy-ink-color); --toy-under:opacity(1);
  filter:var(--toy-fx, opacity(1)) drop-shadow(0 var(--toy-drop, 0px) 0 var(--toy-drop-c, transparent)) var(--toy-under, opacity(1)); }
.bwb-bench-card.ko{ --toy-fx:grayscale(1); background:#e4dfd4; }
.bwb-bench-card.ko .bwb-bpt, .bwb-bench-card.ko .bwb-btys, .bwb-bench-card.ko .bwb-hp, .bwb-bench-card.ko .bwb-meter{ opacity:.4; }
.bwb-bench-card.ko .bwb-bhead .bwb-boost{ opacity:.55; }
.bwb-bpt{ width:84px; height:84px; flex:none; border-radius:16px; --toy-art-scale:.86; }   /* wide sprites (Magnemite, Aron) clear the rim */
.bwb-bpt img{ width:100%; height:100%; object-fit:contain; }
.bwb-binfo{ flex:1; min-width:0; display:grid; grid-template-rows:auto auto 14px 8px; row-gap:7px; }
.bwb-bhead{ display:flex; align-items:center; gap:8px; min-width:0; font-size:25px; }
.bwb-bnm{ flex:1; min-width:0; font-family:'Lilita One',sans-serif; font-size:1em; line-height:1.05; white-space:nowrap; }
.bwb-bhead .bwb-boost{ flex:none; font-size:.8em; }
.bwb-brow{ display:flex; align-items:center; gap:.4em; min-width:0; font-size:15px; }   /* em inside: FitType steps the row down as one */
.bwb-btys{ display:flex; gap:.25em; flex:none; }
.bwb-brow .bwb-ty{ font-size:.8em; padding:.08em .55em .16em; }
.bwb-bbk{ margin-left:auto; display:inline-flex; align-items:center; gap:.25em; font-weight:600; font-size:.93em; white-space:nowrap; }
.bwb-bbk b{ font-family:'Lilita One',sans-serif; font-weight:400; font-size:1.28em; }
.bwb-crowd{ width:1.4em; height:1.05em; fill:var(--toy-ink-color); flex:none; }
.bwb-hp, .bwb-meter{ height:14px; box-sizing:border-box; border-radius:99px; background:#3a3440; border:2px solid var(--toy-ink-color); overflow:hidden; }
.bwb-meter{ height:8px; border-width:1.5px; }
.bwb-hp i, .bwb-meter i{ display:block; height:100%; width:100%; background:linear-gradient(180deg, #8CE99A, #2F9E44); }
.bwb-hp i.mid{ background:linear-gradient(180deg, #FFE066, #F59F00); } .bwb-hp i.low{ background:linear-gradient(180deg, #FF8787, #E03131); }
.bwb-meter i{ background:linear-gradient(90deg, #74C0FC, #A5D8FF); width:0; }
/* the KO stamp: angled across the portrait, red ink with a white rim - the name and backers beside it stay readable */
.bwb-tag{ display:none; position:absolute; left:52px; top:50%; transform:translate(-50%, -50%) rotate(-14deg); font-family:'Lilita One',sans-serif; font-size:36px;
  line-height:1; letter-spacing:2px; color:#E03131; padding:2px 16px 4px; border:4px solid #E03131; border-radius:12px; background:rgba(255,255,255,.85);
  box-shadow:0 0 0 3px var(--toy-ink-color); --toy-drop:0px; --toy-drop-c:transparent; --toy-under:opacity(1); pointer-events:none; }
.bwb-bench-card.ko .bwb-tag{ display:block; }

/* THE ARENA: brawl-pixel.js's 560x392 canvas at exactly 2x, every pixel crisp, set into a toy stadium board - a chunky ink
   frame with solid depth, a packed-dirt track around the floor, the floor sunk into it */
.bwb-arena{ position:absolute; left:368px; top:40px; width:1184px; height:844px; box-sizing:border-box; padding:24px 26px; border-radius:30px;
  background:repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 4px, transparent 4px 12px), linear-gradient(180deg, #D9A866 0%, #C08A45 55%, #A8733A 100%);
  border:6px solid var(--toy-ink-color);
  box-shadow:inset 0 3px 0 rgba(255,236,200,.55), inset 0 -4px 0 rgba(80,48,16,.35); --toy-drop:8px; --toy-drop-c:var(--toy-ink-color); --toy-under:opacity(1);
  filter:var(--toy-fx, opacity(1)) drop-shadow(0 var(--toy-drop, 0px) 0 var(--toy-drop-c, transparent)) var(--toy-under, opacity(1)); }
/* the floor, sunk into the track: an ink lip and an inner shadow along its top edge */
.bwb-floor{ position:relative; width:1120px; height:784px; border-radius:10px; overflow:hidden;
  /* the sand: a checker of darker grains at the canvas's own 2x pixel size, as a handheld would dither it */
  background:#ead7a0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='8' y='0' width='4' height='4' fill='%23dcc68a'/%3E%3Crect x='0' y='8' width='4' height='4' fill='%23dcc68a'/%3E%3C/svg%3E") 0 0 / 16px 16px; box-shadow:0 0 0 4px #6E4A22, 0 0 0 7px var(--toy-ink-color); --toy-drop:0px; --toy-drop-c:transparent; --toy-under:opacity(1); }
.bwb-floor::after{ content:''; position:absolute; inset:0; pointer-events:none; border-radius:10px;
  box-shadow:inset 0 10px 14px -6px rgba(40,24,6,.45), inset 0 -4px 8px -4px rgba(40,24,6,.25); --toy-drop:0px; --toy-drop-c:transparent; --toy-under:opacity(1); }
.bwb-chalk{ position:absolute; inset:0; width:1120px; height:784px; }
.bwb-cv{ position:relative; display:block; width:1120px; height:784px; image-rendering:pixelated; }

/* RESULT */
.bwb-results{ display:flex; flex-direction:column; gap:12px; width:1100px; margin:30px auto 0; }
.bwb-res{ display:flex; align-items:center; gap:18px; padding:8px 22px 8px 12px; background:var(--toy-bg-eggshell); border:var(--toy-border-dark); border-radius:20px;
  box-shadow:none; --toy-drop:4px; --toy-drop-c:var(--toy-ink-color); --toy-under:opacity(1);
  filter:var(--toy-fx, opacity(1)) drop-shadow(0 var(--toy-drop, 0px) 0 var(--toy-drop-c, transparent)) var(--toy-under, opacity(1)); }
.bwb-res.first{ background:#FFF3BF; }
.bwb-res.out{ --toy-fx:grayscale(.8); opacity:.75; }
.bwb-place{ font-family:'Lilita One',sans-serif; font-size:40px; width:50px; text-align:center; }
.bwb-rpt{ width:72px; height:72px; flex:none; border-radius:14px; }
.bwb-rpt img{ width:100%; height:100%; object-fit:contain; }
.bwb-rnm{ font-family:'Lilita One',sans-serif; font-size:32px; flex:1; }
.bwb-rbk{ font-size:24px; font-weight:600; }
.bwb-rout{ font-family:'Lilita One',sans-serif; font-size:28px; width:90px; text-align:right; color:#2F9E44; }
.bwb-res.out .bwb-rout{ color:#E03131; }
