.bw-traces {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  overflow: visible;
  pointer-events: none;
}
.bw-contour, .bw-collector, .bw-courier {
  fill:none; stroke-linecap:round; stroke-linejoin:round; vector-effect:non-scaling-stroke;
}
.bw-contour { stroke:var(--bw-ink);stroke-width:1.5;opacity:.62; }
.bw-collector { stroke:var(--bw-ink);stroke-width:2.2;stroke-dasharray:6 3; }
.bw-metal { transform-box:fill-box; transform-origin:left center; }
.bw-socket { fill:none; }
.bw-socket-wall { stroke:#21141f; stroke-width:3.8; opacity:.78; }
.bw-socket-ring { stroke:var(--bw-ink);stroke-width:2.4; }
.bw-socket-studs { stroke:#fff1b5;stroke-width:2.4;stroke-dasharray:1.2 8;stroke-linecap:round; }
.pg-board .pg-cell[data-bw-count] .pg-face, .ec-board .ec-cell[data-bw-count] .ec-face {
  border-color: var(--bw-ink);
  box-shadow: inset 0 0 0 1px var(--bw-ink), inset 0 0 16px color-mix(in srgb, var(--bw-ink) 25%, transparent);
}
.pg-board .pg-cell[data-bw-tier="4"] .pg-face, .ec-board .ec-cell[data-bw-tier="4"] .ec-face {
  outline: 1px solid var(--bw-ink); outline-offset: -4px;
}
.pg-board .pg-cell[data-bw-tier="5"] .pg-face, .ec-board .ec-cell[data-bw-tier="5"] .ec-face {
  outline: 2px double var(--bw-ink); outline-offset: -5px;
  background-image: radial-gradient(ellipse at 50% 115%, color-mix(in srgb,var(--bw-ink) 36%,transparent),transparent 75%);
}
.pg-board .pg-cell[data-bw-count]:after { display: none; }
.bw-readout {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 3px 6px; margin: 1px 0 5px; min-width: 0;
  font-weight: 650; line-height: 1.2; font-family: inherit;
  font-size: clamp(10px, 1.7vw, 13px); font-variant-numeric: tabular-nums;
}
.bw-readout[hidden] { display: none; }
.bw-chip, .bw-streak {
  display: inline-flex; align-items: center; gap: 5px; min-height: 20px;
  border-radius: 5px; padding: 1px 7px 1px 4px; background: #090d15dc;
  color: #f8f4e8; border: 1px solid color-mix(in srgb, var(--bw-ink,#bfa67c) 55%, transparent);
}
.bw-swatch { width: 19px; height: 19px; object-fit: contain; }
.bw-repeats { color: #d1c8bb; border-left: 1px solid #776f67; padding-left: 5px; font-size: .85em; }
.bw-streak {
  --bw-ink: #efc67a;
  padding: 3px 8px; border-color: #a97a38; color: #ffe2a1;
  background: linear-gradient(100deg,#382818,#1d1720); gap: 6px;
}
.bw-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.bw-bars b { background: currentColor; border-radius: 2px; width: 2px; height: calc(3px + var(--bw-bar) * 1.6px); }
.ec-game[data-game="skyport"][data-event="arrival"] .ec-port.current { box-shadow: 0 0 0 2px #f1cd87, 0 0 14px #eac47788; }
@media (prefers-reduced-motion: no-preference) {
  .bw-traces[data-animate="true"] .bw-metal {
    animation:bw-assembly calc(.32s * var(--bebeto-motion-factor, 1.25)) cubic-bezier(.16,.68,.29,1) calc(var(--joint-delay,0s) * var(--bebeto-motion-factor, 1.25)) backwards;
  }
  .bw-traces[data-animate="true"] .bw-socket-studs { animation:bw-light calc(.22s * var(--bebeto-motion-factor, 1.25)) ease-out backwards; }
  [data-bw-animate="true"] .ec-cell[data-bw-count] .ec-gem,
  [data-bw-animate="true"] .pg-cell[data-bw-count] .pg-icon {
    animation: bw-symbol calc(.38s * var(--bebeto-motion-factor, 1.25)) cubic-bezier(.23,.62,.36,1) calc(var(--bw-lag,0s) * var(--bebeto-motion-factor, 1.25)) both;
  }
  [data-bw-focus][data-bw-animate="true"] .pg-cell[data-bw-count] .pg-icon,
  [data-bw-focus][data-bw-animate="true"] .ec-cell[data-bw-count] .ec-gem {
    animation-name:bw-lift;
    animation-duration:calc(.49s * var(--bebeto-motion-factor, 1.25));
  }
  .bw-bars b { transform-origin: bottom; animation: bw-bar calc(.3s * var(--bebeto-motion-factor, 1.25)) ease-out calc(var(--bw-bar) * 32ms * var(--bebeto-motion-factor, 1.25)) backwards; }
}
[data-bw-animate="false"] .pg-cell[data-bw-count] .pg-icon { animation: none; }
@keyframes bw-assembly { from { transform:scaleX(.08) scaleY(.65); opacity:.12; } 70% {transform:scaleX(1.025) scaleY(1.06);opacity:1;} to{transform:none;} }
@keyframes bw-symbol { 0% { scale: .99; } 50% { scale: 1.075; } 100% { scale: 1; } }
@keyframes bw-lift {
  0% {translate:0 0;scale:.98;rotate:x 5deg;}
  45% {translate:0 calc(var(--bw-rise) - 3%);scale:calc(var(--bw-size) + .045);rotate:x -12deg;}
  75% {translate:0 var(--bw-rise);scale:var(--bw-size);rotate:x 3deg;}
  100% {translate:0 var(--bw-rise);scale:var(--bw-size);rotate:x 0deg;}
}
@keyframes bw-light { from { opacity: 0; } }
@keyframes bw-bar { from { transform: scaleY(.2); } }

/* The scene sits below the field. Winning symbols and their route stay at full contrast. */
.bw-cinematic {
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  object-position:center; opacity:.85; pointer-events:none;
}
[data-bw-focus] :is(.pg-cell,.ec-cell):not([data-bw-count]) img { opacity:.41; }
/* The face, furniture and floating artwork are separate depth planes. Only
   awarded, profitable symbols receive the lit platform; it persists at rest. */
[data-game="goldline"] { --bw-light:#ffd66b;--bw-base:#af7139; }
[data-game="reef"] { --bw-light:#89fff2;--bw-base:#238697;--bw-foot-shape:ellipse(50% 49% at 50% 50%); }
[data-game="jade"] { --bw-light:#caffae;--bw-base:#5c9973; }
[data-game="scarab"] { --bw-light:#ffd775;--bw-base:#bb7841; }
[data-game="orrery"] { --bw-light:#ead0ff;--bw-base:#9479b7;--bw-foot-shape:ellipse(50% 49% at 50% 50%); }
[data-game="magma"] { --bw-light:#ffbf6a;--bw-base:#b4542c; }
[data-game="bluehour"] { --bw-light:#ffafdd;--bw-base:#aa6098;--bw-foot-shape:ellipse(50% 49% at 50% 50%); }
[data-game="skyport"] { --bw-light:#fff0a8;--bw-base:#669988; }
[data-bw-count] { --bw-size:1.13;--bw-rise:-8%;--bw-height:22%;--bw-width:78%; }
[data-bw-tier="2"] { --bw-size:1.05;--bw-rise:-5%;--bw-height:16%;--bw-width:62%; }
[data-bw-tier="4"] { --bw-size:1.18;--bw-rise:-10%;--bw-height:25%;--bw-width:84%; }
[data-bw-tier="5"] { --bw-size:1.22;--bw-rise:-12%;--bw-height:29%;--bw-width:89%; }
.bw-podium { position:absolute;inset:0;z-index:0;pointer-events:none;border-radius:inherit; }
.bw-stage-light { position:absolute;inset:0;border-radius:inherit;overflow:hidden;
  background:radial-gradient(ellipse at 32% 18%,#fffbd5b8,transparent 30%),
    radial-gradient(ellipse at 50% 88%,var(--bw-light) 0%,color-mix(in srgb,var(--bw-light) 64%,transparent) 31%,transparent 75%);
}
[data-bw-tier="5"] .bw-stage-light::after {
  content:"";position:absolute;inset:0;
  background:repeating-conic-gradient(from -40deg at 50% 86%,transparent 0 20deg,#fffae185 22deg,transparent 26deg);
  mask-image:linear-gradient(transparent 1%,#0009 50%,black 82%);
}
.bw-platform,.bw-foot { position:absolute;left:50%;bottom:6%;width:var(--bw-width);height:var(--bw-height);
  translate:-50% 0;filter:drop-shadow(1px 3px 1px #0b0915cf); }
.bw-foot { display:none;bottom:1%;width:91%;height:21%; }
[data-bw-tier="5"] .bw-foot { display:block; }
.bw-platform::before,.bw-foot::before,.bw-platform::after,.bw-foot::after {
  content:"";position:absolute;inset:0;
  clip-path:var(--bw-foot-shape,polygon(13% 0,83% 0,100% 36%,97% 68%,78% 99%,17% 99%,2% 68%,0 37%));
}
.bw-platform::before,.bw-foot::before {
  background:linear-gradient(100deg,#211b37 0%,var(--bw-base) 19%,#ffefbd 33%,var(--bw-base) 47%,#332039 74%,var(--bw-base) 88%,#1b1c32);
}
.bw-platform::after,.bw-foot::after {
  bottom:26%;background:radial-gradient(ellipse at 52% 44%,#191a38 4%,var(--bw-base) 36%,var(--bw-light) 65%,#fffbea 72%,var(--bw-base) 84%);
}
[data-bw-focus] [data-bw-count] :is(.pg-icon,.ec-gem) {
  z-index:1;scale:var(--bw-size);translate:0 var(--bw-rise);transform-origin:50% 70%;
  filter:brightness(1.2) saturate(1.12) drop-shadow(-1px -1px 0 #fffadca3) drop-shadow(2px 4px 1px #100b19df);
}
[data-bw-focus] .ec-wild-mark { z-index:2; }
[data-bw-focus] .pg-wheelcell { --bw-size:1.11;--bw-rise:-9%; }
[data-bw-cinema] :is(.pg-cell,.ec-cell):not([data-bw-count]) :is(.pg-face,.ec-face) {
  background:linear-gradient(160deg,#08101e6b,#080b1475);
  box-shadow:inset 0 0 12px #0c0b162e;
}
.bw-corners {
  --cut:16%; --line:2px; position:absolute; inset:6%; z-index:2; pointer-events:none;
  color:var(--bw-ink); filter:drop-shadow(0 1px 1px #100919);
  background:
    linear-gradient(currentColor,currentColor) left top / var(--cut) var(--line),
    linear-gradient(currentColor,currentColor) left top / var(--line) var(--cut),
    linear-gradient(currentColor,currentColor) right top / var(--cut) var(--line),
    linear-gradient(currentColor,currentColor) right top / var(--line) var(--cut),
    linear-gradient(currentColor,currentColor) left bottom / var(--cut) var(--line),
    linear-gradient(currentColor,currentColor) left bottom / var(--line) var(--cut),
    linear-gradient(currentColor,currentColor) right bottom / var(--cut) var(--line),
    linear-gradient(currentColor,currentColor) right bottom / var(--line) var(--cut);
  background-repeat:no-repeat;
}
[data-bw-tier="2"] .bw-corners { --cut:9%; --line:1px; }
[data-bw-tier="4"] .bw-corners { --cut:23%; }
[data-bw-tier="5"] .bw-corners { --cut:31%; }
.pg-wheelcell .bw-corners { inset:2%; border:1px solid var(--bw-ink); border-radius:50%; background:none; }
.bw-courier { opacity:0; stroke-dasharray:var(--dash) calc(1 - var(--dash)); }
.bw-trail { --dash:.07;stroke:var(--bw-ink);stroke-width:2.2; }
.bw-body { --dash:.011;stroke:var(--bw-ink);stroke-width:7; }
.bw-facet { --dash:.008;stroke:#fffee3;stroke-width:3; }
.bw-traces .bw-secondary { opacity:.64; }
.bw-spray { position:absolute; inset:0; z-index:3; overflow:hidden; pointer-events:none; }
.bw-impact {
  position:absolute; width:26px; height:26px; margin:-13px 0 0 -13px;
  border:1px solid var(--bw-ink); border-radius:50%; opacity:0;
  box-shadow:inset 0 0 3px #fff9,0 0 5px var(--bw-ink);
}
.bw-spray[data-material="reef"] .bw-impact { height:16px; margin-top:-8px; border:2px double #adfcf0; }
.bw-spray[data-material="goldline"] .bw-impact { border-radius:3px; border-style:dashed; }
.bw-spray[data-material="scarab"] .bw-impact { border-radius:50% 2px; }
.bw-spray[data-material="orrery"] .bw-impact { height:14px; margin-top:-7px; border-color:#e7d3ff; }
.bw-spray[data-material="bluehour"] .bw-impact { height:34px; margin-top:-17px; border-inline:0; }
.bw-fleck {
  position:absolute; width:var(--size); height:var(--size); opacity:0; margin:calc(var(--size) * -.5);
  color:var(--bw-ink); background:currentColor; border-radius:50%;
}
.bw-spray[data-material="goldline"] .bw-fleck {
  height:calc(var(--size) * .59); border-radius:1px; border-inline:1px dashed #754914;
  background:linear-gradient(135deg,#fff4b4,#eabc62 48%,#8a5619);
}
.bw-spray[data-material="reef"] .bw-fleck {
  border:1px solid #a3fff8; background:radial-gradient(circle at 32% 28%,white 0 11%,#ffffff12 18% 48%,#52d6cc88 83%);
  box-shadow:0 0 4px #99e7fa99;
}
.bw-spray[data-material="jade"] .bw-fleck {
  border-radius:42%; border-block:1px solid #ffe394;
  background:linear-gradient(90deg,#851e2a,#f79a46 28%,#ffe4a4 43%,#df593f 66%,#8f2239);
  box-shadow:0 0 6px #f6ac4479;
}
.bw-spray[data-material="jade"] .bw-fleck::after {
  content:""; position:absolute; left:46%; top:100%; height:36%; border-left:1px solid #f9ca74;
}
.bw-spray[data-material="scarab"] .bw-fleck {
  clip-path:polygon(50% 0,100% 38%,66% 100%,26% 81%,0 32%);
  background:conic-gradient(from 35deg at 60% 48%,#37aebb,#e7d08a,#168997,#bceef0,#397c80);
}
.bw-spray[data-material="orrery"] .bw-fleck {
  clip-path:polygon(50% 0,62% 38%,100% 50%,62% 61%,50% 100%,38% 62%,0 50%,38% 38%);
  background:linear-gradient(135deg,#fffcef,#c6b0ff);
}
.bw-spray[data-material="magma"] .bw-fleck {
  width:calc(var(--size) * .55); border-radius:80% 10% 55% 25%;
  background:linear-gradient(15deg,#fff9c6,#ffab3f 50%,#eb4612);
  box-shadow:0 0 5px #ff9e33;
}
.bw-spray[data-material="bluehour"] .bw-fleck {
  width:5px; height:4px; border-radius:60%; background:#ffd3f2;
}
.bw-spray[data-material="bluehour"] .bw-fleck::after {
  content:""; position:absolute; right:0; bottom:2px; width:3px; height:6px;
  border-left:1.5px solid #ffd3f2; border-top:2px solid #8cd9fc; transform:translateX(3px);
}
.bw-spray[data-material="skyport"] .bw-fleck {
  clip-path:polygon(0 38%,100% 0,65% 100%,44% 62%,22% 77%,24% 51%);
  background:linear-gradient(145deg,#fffcea 45%,#5b848d 47%,#b9edf2 62%);
}
.bw-chip { padding:3px 8px 3px 4px; border-radius:6px; background:linear-gradient(110deg,color-mix(in srgb,var(--bw-ink,#bfa67c) 18%,#0c1018),#0b0e15 80%); }
.bw-chip .bw-swatch { width:23px; height:23px; }
.bw-chip .bw-count { font:700 1.34em/1 Georgia,serif; color:var(--bw-ink,#f5d698); }
.bw-receipt-map { width:38px; height:22px; margin-left:2px; padding-left:4px; border-left:1px solid #7c766254; }
.bw-pip-on { fill:var(--bw-ink); }
.bw-pip-off { fill:#888483; }
.bw-streak { border-radius:12px 3px; border-left-width:3px; }
@media (prefers-reduced-motion:no-preference) {
  .bw-courier { animation:bw-travel calc(.47s * var(--bebeto-motion-factor, 1.25)) cubic-bezier(.24,.42,.61,1) calc(55ms * var(--bebeto-motion-factor, 1.25)) both; }
  [data-bw-animate="true"] .bw-corners { animation:bw-lock calc(.36s * var(--bebeto-motion-factor, 1.25)) cubic-bezier(.25,.69,.31,1.12) calc(var(--bw-lag) * var(--bebeto-motion-factor, 1.25)) both; }
  .bw-cinematic:has(+ [data-bw-animate="true"]) { animation:bw-scene-in calc(.66s * var(--bebeto-motion-factor, 1.25)) ease-out both; }
  .bw-streak { animation:bw-streak-in calc(.46s * var(--bebeto-motion-factor, 1.25)) cubic-bezier(.19,.7,.3,1) both; }
}
@keyframes bw-travel { 0% {opacity:0;stroke-dashoffset:var(--dash)} 15% {opacity:1} 75% {opacity:1} 100% {opacity:0;stroke-dashoffset:-.94} }
@keyframes bw-lock { from {opacity:0;transform:scale(1.18)} 65% {opacity:1;transform:scale(.97)} to {transform:scale(1)} }
@keyframes bw-scene-in { from {opacity:0;transform:scale(1.025)} to {opacity:.85;transform:scale(1)} }
@keyframes bw-streak-in { from {opacity:0;transform:translateY(6px)} to {opacity:1;transform:translateY(0)} }
