.playfield-stage{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(220px,280px);align-items:center;justify-content:center;gap:22px;min-height:500px;width:min(100%,860px);margin:0 auto}.playfield-stage .board-wrap{grid-column:2;grid-row:1}.playfield-stage .rhythm-panel{grid-column:3;grid-row:1;align-self:center}.playfield-stage .trainer-guide-book{grid-column:3;grid-row:2;justify-self:start}.trainer-main{width:100%;min-width:0}.play-panel{width:100%;display:flex;justify-content:center}

/* 180 Boost meter: compact B2B-style feedback for successful 180s. */
.bonus-meter{display:flex;flex-direction:column;gap:7px;transform:translateY(-2px)}
.bonus-topline{display:flex;align-items:baseline;justify-content:space-between;padding:0 5px}.bonus-label{font:900 13px ui-monospace,monospace;letter-spacing:.18em;color:#d8c9ff;text-shadow:0 0 12px #9d7cff88}
.bonus-vessel{position:relative;height:54px;overflow:hidden;border:1px solid #574775;border-radius:12px;background:linear-gradient(180deg,#15111f,#0f0d16);box-shadow:inset 0 1px 0 #bca5ff18,inset 0 -5px 12px #0008,0 0 0 1px #09070e,0 10px 28px #7c55cf18}.bonus-vessel::before{content:'';position:absolute;inset:5px;border:1px solid #a98cff22;border-radius:8px;pointer-events:none;z-index:3}
.bonus-liquid{position:absolute;left:0;top:0;bottom:0;width:0;border-radius:10px;background:linear-gradient(90deg,#5b2ca8 0%,#7c3fd0 24%,#9a5bea 48%,#c08cff 72%,#ead9ff 100%);background-size:180% 100%;box-shadow:inset 0 1px 0 #fff8,inset 0 -5px 12px #25104488,0 0 18px #8f5be866;transition:width 180ms cubic-bezier(.2,.8,.2,1)}.bonus-liquid.boosting{animation:bonusBoostGlow 520ms ease-out}.bonus-liquid::after{content:'';position:absolute;left:9px;right:9px;top:7px;height:2px;border-radius:99px;background:#eee7ff88;filter:blur(.2px)}
.bonus-glint{position:absolute;z-index:4;left:13px;right:13px;top:9px;height:1px;background:linear-gradient(90deg,transparent,#ffffff55,transparent);pointer-events:none}.bonus-number{position:absolute;z-index:5;inset:0;display:flex;align-items:center;justify-content:center;font:900 30px/1 ui-monospace,monospace;color:#f2edff;font-variant-numeric:tabular-nums;letter-spacing:-.04em;text-shadow:0 2px 8px #08050f,0 0 14px #c7afff66;pointer-events:none}
@keyframes bonusBoostGlow{0%{filter:brightness(1);background-position:0% 50%;box-shadow:inset 0 1px 0 #fff8,inset 0 -5px 12px #25104488,0 0 10px #6e3bcf88}35%{filter:brightness(1.3);background-position:50% 50%;box-shadow:inset 0 1px 0 #fff8,inset 0 -5px 12px #25104488,0 0 30px #b98cffcc}70%{filter:brightness(1.08);background-position:100% 50%;box-shadow:inset 0 1px 0 #fff8,inset 0 -5px 12px #25104488,0 0 22px #8e5deaaa}100%{filter:brightness(1);background-position:50% 50%;box-shadow:inset 0 1px 0 #fff8,inset 0 -5px 12px #25104488,0 0 18px #8f5be866}}.bonus-meter.breaking .bonus-vessel{animation:bonusVesselBreak 340ms ease}.bonus-meter.breaking .bonus-number{animation:bonusNumberBreak 340ms ease}@keyframes bonusVesselBreak{0%{transform:translateX(0);filter:brightness(1)}22%{transform:translateX(-4px);filter:brightness(1.3)}44%{transform:translateX(4px);filter:brightness(.72)}66%{transform:translateX(-2px);filter:brightness(1.15)}100%{transform:translateX(0);filter:brightness(1)}}@keyframes bonusNumberBreak{0%{transform:scale(1);opacity:1}25%{transform:scale(.9);opacity:.65}50%{transform:scale(1.08);opacity:.45}75%{transform:scale(.96);opacity:.72}100%{transform:scale(1);opacity:1}}

.board-wrap{position:relative;padding:7px;background:#15141b;border:1px solid #302b3a;border-radius:5px}.board{display:grid;grid-template-columns:repeat(10,calc(var(--cell) + 2px));grid-template-rows:repeat(20,calc(var(--cell) + 2px));gap:0;position:relative;background:#111016;perspective:1000px;perspective-origin:50% 50%;overflow:visible}.active-piece-svg{position:absolute;left:0;top:0;overflow:visible;pointer-events:none;z-index:4;width:100%;height:100%}.active-piece-svg .side-face,.turn-face .side-face{fill:#59458e;stroke:#44336e;stroke-width:.8;stroke-linejoin:round}.active-piece-svg .front-face,.turn-face .front-face{stroke:#ded0ff;stroke-width:1.15;stroke-linejoin:round}.turn-face .back-face{stroke:#3b2f78;stroke-width:1;stroke-linejoin:round}.active-piece-svg .seam,.turn-face .seam{fill:none;stroke:#8c72d3;stroke-width:.9;opacity:.8}.turn-layer{position:absolute;z-index:5;pointer-events:none;overflow:visible}.turn-scene{position:relative;transform-style:preserve-3d;transform-origin:50% 50%;animation:halfFlip var(--turn-duration) cubic-bezier(.22,.78,.32,1) both}.turn-face{position:absolute;inset:0;display:block;overflow:visible;backface-visibility:hidden;-webkit-backface-visibility:hidden;transform-style:preserve-3d}.turn-front{transform:translateZ(1px)}.turn-back{transform:rotateX(180deg) translateZ(1px)}@keyframes halfFlip{0%{transform:translate3d(0,0,0) rotateX(0deg)}45%{transform:translate3d(calc(var(--turn-shift-x)*.45),calc(var(--turn-shift-y)*.45),0) rotateX(86deg)}55%{transform:translate3d(calc(var(--turn-shift-x)*.55),calc(var(--turn-shift-y)*.55),0) rotateX(94deg)}100%{transform:translate3d(var(--turn-shift-x),var(--turn-shift-y),0) rotateX(180deg)}}

.cell{width:calc(var(--cell) + 2px);height:calc(var(--cell) + 2px);border-radius:0;background:#191720;border:0;position:relative;box-sizing:border-box}.cell.ghost{background:#373044;border:1px dashed #71628d;opacity:var(--shadow-opacity,.6);filter:brightness(var(--shadow-brightness,1))}.cell.t{background:transparent;border-color:transparent;box-shadow:none}.invisible-ghost-piece .cell.ghost{visibility:hidden!important;background:transparent!important;border-color:transparent!important;box-shadow:none!important;opacity:0!important}.colored-ghost-piece .cell.ghost{background:transparent!important;border:1px solid transparent!important;border-style:solid!important;box-shadow:none!important;filter:brightness(var(--shadow-brightness,1))!important}.colored-ghost-piece .cell.ghost-i{border-color:#8bd5ff!important}.colored-ghost-piece .cell.ghost-o{border-color:#ffe68a!important}.colored-ghost-piece .cell.ghost-t{border-color:#d7a1ff!important}.colored-ghost-piece .cell.ghost-s{border-color:#8be7a7!important}.colored-ghost-piece .cell.ghost-z{border-color:#ff8d9c!important}.colored-ghost-piece .cell.ghost-j{border-color:#73a9ff!important}.colored-ghost-piece .cell.ghost-l{border-color:#ffb05f!important}.colored-ghost-piece .cell.ghost{background:var(--ghost-color)!important;border:0!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.12),inset 0 -2px 0 rgba(0,0,0,.28)!important;filter:brightness(var(--shadow-brightness,1))!important;opacity:.62!important}.colored-ghost-piece .cell.ghost-i{--ghost-color:#2f86b8}.colored-ghost-piece .cell.ghost-o{--ghost-color:#b8891f}.colored-ghost-piece .cell.ghost-t{--ghost-color:#7d4ca9}.colored-ghost-piece .cell.ghost-s{--ghost-color:#2f8a50}.colored-ghost-piece .cell.ghost-z{--ghost-color:#ad3f52}.colored-ghost-piece .cell.ghost-j{--ghost-color:#2e61ad}.colored-ghost-piece .cell.ghost-l{--ghost-color:#b9651d}.cell.locked{border:0;border-radius:0;box-shadow:inset 0 1px 0 rgba(255,255,255,.16),inset 0 -2px 0 rgba(0,0,0,.22)}.cell.locked-i{background:linear-gradient(135deg,#a9e5ff 0%,#67c5f4 52%,#3e9bd8 100%)}.cell.locked-o{background:linear-gradient(135deg,#fff0a8 0%,#ffd75b 52%,#dcae32 100%)}.cell.locked-t{background:linear-gradient(135deg,#e8c8ff 0%,#c68af2 52%,#9459ce 100%)}.cell.locked-s{background:linear-gradient(135deg,#b1f3c5 0%,#70d990 52%,#43aa68 100%)}.cell.locked-z{background:linear-gradient(135deg,#ffb3bd 0%,#f47788 52%,#cf4e61 100%)}.cell.locked-j{background:linear-gradient(135deg,#a8c9ff 0%,#6fa6f5 52%,#3a72c8 100%)}.cell.locked-l{background:linear-gradient(135deg,#ffd09a 0%,#ffad59 52%,#dc7722 100%)}.cell .front{position:absolute;inset:0;border-radius:2px;background:linear-gradient(135deg,#b6aaff,#8172ff);transform:translate(calc(var(--depth)*-.55),calc(var(--depth)*-.55));border:1px solid #d7d0ff;box-shadow:2px 2px 0 #6559c7}.cell.t::before,.cell.t::after{display:none}.back-link{position:absolute;top:0;left:0;color:#a39bb8;text-decoration:none;font-family:"Courier New",monospace;font-size:14px;font-weight:600;padding:8px 12px}.back-link:hover{color:#c4a7ff}

.cell.jol-chunk{outline:2px solid #f3e9ff;outline-offset:-2px;box-shadow:2px 2px 0 #24549f,inset 0 0 0 1px #ffffff88,0 0 8px #d8c9ff66}.cell.locked-o.jol-chunk{box-shadow:2px 2px 0 #a47d1d,inset 0 0 0 1px #ffffff88,0 0 8px #d8c9ff66}.cell.locked-l.jol-chunk{box-shadow:2px 2px 0 #a24f12,inset 0 0 0 1px #ffffff88,0 0 8px #d8c9ff66}

@media(max-width:850px){.playfield-stage{grid-template-columns:1fr;grid-template-rows:auto auto auto;min-height:0;gap:14px}.playfield-stage .bonus-meter{position:relative;left:auto;top:auto;grid-column:1;grid-row:1;width:min(320px,100%);justify-self:center;transform:none}.playfield-stage .board-wrap{grid-column:1;grid-row:2}.playfield-stage .trainer-guide-book{grid-column:1;grid-row:3;justify-self:center}}
.playfield-stage .trainer-guide-book{z-index:6}.playfield-stage .board-wrap{z-index:2}.trainer-main{max-width:860px}.play-panel{min-width:0}.playfield-stage>*{min-width:0}

.trainer-actions{display:flex;align-items:center;justify-content:center;gap:14px;margin:12px 0 4px;flex-wrap:wrap}.trainer-restart{appearance:none;border:1px solid #5a4a76;background:#191522;color:#ddd2f4;border-radius:7px;padding:7px 14px;font:800 12px ui-monospace,monospace;letter-spacing:.08em;cursor:pointer}.trainer-restart:hover{background:#241d31;border-color:#8068a8}.trainer-restart:focus-visible{outline:2px solid #b9a0ff;outline-offset:2px}.trainer-controls{color:#777083;font:600 11px ui-monospace,monospace;text-align:center;line-height:1.5}@media(max-width:850px){.trainer-controls{font-size:10px}}

.jol-hud{display:none;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:0 0 8px;padding:7px 6px;border:1px solid #302b3a;border-radius:7px;background:#15131b}.jol-hud:not([hidden]){display:grid}.jol-hud div{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:0}.jol-hud-label{font:800 8px/1 ui-monospace,monospace;letter-spacing:.12em;color:#827a91}.jol-hud strong{font:900 12px/1.1 ui-monospace,monospace;color:#eee8fb;font-variant-numeric:tabular-nums}.jol-hud + .board{margin-top:0}

.rhythm-panel{display:none;margin:0;padding:24px 20px 18px;border:2px solid #3b3150;border-radius:18px;background:linear-gradient(180deg,#1d1728,#121019);box-shadow:inset 0 1px 0 #ffffff10,0 12px 28px #08060c66;min-height:230px;justify-content:center;align-items:center;flex-direction:column;text-align:center}.rhythm-panel:not([hidden]){display:flex}.rhythm-kicker{font:900 11px/1 ui-monospace,monospace;letter-spacing:.2em;color:#a896bd;margin-bottom:12px}.rhythm-status{font:900 22px/1.05 system-ui,sans-serif;letter-spacing:.08em;color:#e9ddff;text-transform:uppercase}.rhythm-countdown{font:900 clamp(54px,7vw,86px)/.88 system-ui,sans-serif;letter-spacing:-.07em;color:#f7efff;font-variant-numeric:tabular-nums;text-shadow:0 4px 0 #594775,0 10px 26px #0009;margin:8px 0 2px}.rhythm-unit{font:900 12px/1 ui-monospace,monospace;letter-spacing:.22em;color:#8f829d}.rhythm-window-label{margin-top:18px;padding:8px 12px;border:1px solid #4a3d5e;border-radius:999px;background:#17121f;color:#d9c9ed;font:900 10px/1 ui-monospace,monospace;letter-spacing:.12em}.rhythm-meter{width:min(210px,100%);height:5px;margin-top:16px;overflow:hidden;border-radius:99px;background:#0d0b10}.rhythm-meter span{display:block;height:100%;width:0;border-radius:99px;background:#b18be0;transform-origin:left center}.rhythm-help{margin:10px 0 0;color:#81778b;font:700 10px/1.35 system-ui,sans-serif}.rhythm-panel.reveal{border-color:#587555;background:linear-gradient(180deg,#1a241b,#121713)}.rhythm-panel.reveal .rhythm-status{color:#dfffdc}.rhythm-panel.reveal .rhythm-countdown{text-shadow:0 4px 0 #3f633c,0 10px 26px #0009}.rhythm-panel.reveal .rhythm-window-label{color:#e1ffdf;border-color:#405d43;background:#172019}.rhythm-panel.reveal .rhythm-meter span{background:#79b877}

.board.jol-rhythm-hidden .active-piece-svg,.board.jol-rhythm-hidden .turn-layer{visibility:hidden}.board.jol-rhythm-hidden .cell.locked,.board.jol-rhythm-hidden .cell.ghost{visibility:hidden}

@media(max-width:850px){.playfield-stage{grid-template-columns:1fr;grid-template-rows:auto auto auto;gap:14px}.playfield-stage .rhythm-panel{grid-column:1;grid-row:1;width:min(360px,100%);justify-self:center}.playfield-stage .board-wrap{grid-column:1;grid-row:2}.playfield-stage .trainer-guide-book{grid-column:1;grid-row:3;justify-self:center}.rhythm-panel{min-height:190px;padding:18px 16px}.rhythm-countdown{font-size:58px}}
@media(max-width:520px){.jol-hud{gap:2px;padding:6px 3px}.jol-hud strong{font-size:11px}.jol-hud-label{font-size:7px}.rhythm-panel{padding:16px 12px;min-height:175px}.rhythm-countdown{font-size:52px}.rhythm-window-label{font-size:9px}}
@media(prefers-reduced-motion:reduce){.bonus-liquid,.bonus-liquid.boosting,.bonus-meter.breaking .bonus-vessel,.bonus-meter.breaking .bonus-number,.turn-scene,.rhythm-sequence span{animation:none!important;transition:none!important}}

/* Real tetromino previews for Hold / Next. */
.next-preview{align-items:center}.mini-piece{width:42px;height:42px;display:grid;place-items:center;border:0;background:transparent}.mini-grid{display:grid;gap:2px}.mini-grid-4x1{grid-template-columns:repeat(4,8px);grid-template-rows:8px}.mini-grid-4x2{grid-template-columns:repeat(4,8px);grid-template-rows:repeat(2,8px)}.mini-grid-3x2{grid-template-columns:repeat(3,8px);grid-template-rows:repeat(2,8px)}.mini-block{width:8px;height:8px;border-radius:1px;box-sizing:border-box;border:1px solid currentColor;box-shadow:inset 0 1px 0 #ffffff66}.mini-i{color:#8bd5ff;background:#8bd5ff}.mini-o{color:#ffe68a;background:#ffe68a}.mini-t{color:#d7a1ff;background:#d7a1ff}.mini-s{color:#8be7a7;background:#8be7a7}.mini-z{color:#ff8d9c;background:#ff8d9c}.mini-j{color:#73a9ff;background:#73a9ff}.mini-l{color:#ffb05f;background:#ffb05f}

/* Theme-aware piece materials; gameplay geometry is untouched. */
.cell.locked{position:relative;isolation:isolate;overflow:hidden}.cell.locked::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:1;opacity:0}
.cell.locked-i{background:linear-gradient(135deg,var(--piece-i-light,#a9e5ff),var(--piece-i-dark,#3e9bd8))}.cell.locked-o{background:linear-gradient(135deg,var(--piece-o-light,#fff0a8),var(--piece-o-dark,#dcae32))}.cell.locked-t{background:linear-gradient(135deg,var(--piece-t-light,#e8c8ff),var(--piece-t-dark,#9459ce))}.cell.locked-s{background:linear-gradient(135deg,var(--piece-s-light,#b1f3c5),var(--piece-s-dark,#43aa68))}.cell.locked-z{background:linear-gradient(135deg,var(--piece-z-light,#ffb3bd),var(--piece-z-dark,#cf4e61))}.cell.locked-j{background:linear-gradient(135deg,var(--piece-j-light,#a8c9ff),var(--piece-j-dark,#3a72c8))}.cell.locked-l{background:linear-gradient(135deg,var(--piece-l-light,#ffd09a),var(--piece-l-dark,#dc7722))}
/* Skin palettes: high-contrast face colors; shadows intentionally use fixed neutral colors below. */
:root[data-piece-theme="glass"]{--piece-i-light:#f0ffff;--piece-i-dark:#2ca9d1;--piece-o-light:#fff9dc;--piece-o-dark:#d6a83c;--piece-t-light:#f7edff;--piece-t-dark:#9868d9;--piece-s-light:#e3fff4;--piece-s-dark:#3aa987;--piece-z-light:#ffe9f2;--piece-z-dark:#d85e91;--piece-j-light:#e7f0ff;--piece-j-dark:#537ed0;--piece-l-light:#fff0e4;--piece-l-dark:#ce7b4c}
:root[data-piece-theme="nature"]{--piece-i-light:#c6f7e5;--piece-i-dark:#147d70;--piece-o-light:#fff0a6;--piece-o-dark:#a87819;--piece-t-light:#f0d9b5;--piece-t-dark:#89532f;--piece-s-light:#d9ff9b;--piece-s-dark:#3c7f2b;--piece-z-light:#ffc1ad;--piece-z-dark:#b94336;--piece-j-light:#b7edc0;--piece-j-dark:#286343;--piece-l-light:#ffd18a;--piece-l-dark:#a95020}
:root[data-piece-theme="space"]{--piece-i-light:#a9f5ff;--piece-i-dark:#0879bd;--piece-o-light:#fff29a;--piece-o-dark:#c57a10;--piece-t-light:#f0b6ff;--piece-t-dark:#7a36ce;--piece-s-light:#a5ffcf;--piece-s-dark:#087f80;--piece-z-light:#ffadd9;--piece-z-dark:#b11e78;--piece-j-light:#a8c0ff;--piece-j-dark:#3047b8;--piece-l-light:#ffc08a;--piece-l-dark:#c74735}
:root[data-piece-theme="generic"]{--piece-i-light:#a9e5ff;--piece-i-dark:#3e9bd8;--piece-o-light:#fff0a8;--piece-o-dark:#dcae32;--piece-t-light:#e8c8ff;--piece-t-dark:#9459ce;--piece-s-light:#b1f3c5;--piece-s-dark:#43aa68;--piece-z-light:#ffb3bd;--piece-z-dark:#cf4e61;--piece-j-light:#a8c9ff;--piece-j-dark:#3a72c8;--piece-l-light:#ffd09a;--piece-l-dark:#dc7722}
:root[data-piece-theme="glass"] .cell.locked{border:1px solid #e6ffffaa;box-shadow:inset 1px 1px 0 #ffffffc9,inset -2px -2px 0 #174e6b44,0 0 7px #8aeaff30}
:root[data-piece-theme="glass"] .cell.locked::after{opacity:1;background:linear-gradient(125deg,#ffffff77 0%,#ffffff12 27%,transparent 44%,#baf7ff20 68%,#ffffff08 100%);border-top:1px solid #ffffffb5;border-left:1px solid #ffffff70}
:root[data-piece-theme="nature"] .cell.locked{border:1px solid #e4ffd15c;box-shadow:inset 1px 1px 0 #ffffff50,inset 0 -3px 0 #142d1c38}
:root[data-piece-theme="nature"] .cell.locked::after{opacity:.7;background:repeating-linear-gradient(135deg,transparent 0 7px,#e8ffd11c 8px,#153e2010 9px,transparent 11px)}
:root[data-piece-theme="space"] .cell.locked{border:1px solid #d9f6ff66;box-shadow:inset 1px 1px 0 #ffffff80,inset 0 -3px 0 #05071f66,0 0 5px #4f91ff24}
:root[data-piece-theme="space"] .cell.locked::after{opacity:.85;background:radial-gradient(circle at 24% 28%,#ffffffd9 0 1px,transparent 1.6px),radial-gradient(circle at 72% 66%,#c4eaffcc 0 1px,transparent 1.6px),linear-gradient(135deg,#ffffff20,transparent 50%)}
:root[data-piece-theme="generic"] .cell.locked{border:0;box-shadow:inset 0 1px 0 rgba(255,255,255,.16),inset 0 -2px 0 rgba(0,0,0,.22)}:root[data-piece-theme="generic"] .cell.locked::after{display:none}
/* Distinct material signatures apply only to live/locked pieces, never ghost shadows. */
:root[data-piece-theme="glass"] .active-piece-svg .front-face,:root[data-piece-theme="glass"] .turn-face .front-face{stroke:#f4ffff;stroke-width:1.65;filter:drop-shadow(0 0 1.2px rgba(180,250,255,.5))}
:root[data-piece-theme="nature"] .active-piece-svg .front-face,:root[data-piece-theme="nature"] .turn-face .front-face{stroke:#eaffc9;stroke-width:1.2}
:root[data-piece-theme="space"] .active-piece-svg .front-face,:root[data-piece-theme="space"] .turn-face .front-face{stroke:#e0faff;stroke-width:1.3;filter:drop-shadow(0 0 1px rgba(110,170,255,.35))}
:root[data-piece-theme="glass"] .active-piece-svg .seam,:root[data-piece-theme="glass"] .turn-face .seam{stroke:#f4ffff;opacity:.95}
:root[data-piece-theme="nature"] .active-piece-svg .seam,:root[data-piece-theme="nature"] .turn-face .seam{stroke:#eaffc9;opacity:.82}
:root[data-piece-theme="space"] .active-piece-svg .seam,:root[data-piece-theme="space"] .turn-face .seam{stroke:#e0faff;opacity:.9}
:root[data-piece-theme="glass"] .cell.locked{box-shadow:inset 0 1px 0 rgba(255,255,255,.8),inset 0 -2px 0 rgba(12,54,78,.25),inset 2px 0 0 rgba(255,255,255,.24)}
:root[data-piece-theme="nature"] .cell.locked{box-shadow:inset 0 1px 0 rgba(255,255,255,.38),inset 0 -2px 0 rgba(29,62,24,.34)}
:root[data-piece-theme="space"] .cell.locked{box-shadow:inset 0 1px 0 rgba(255,255,255,.5),inset 0 -2px 0 rgba(8,15,58,.4),0 0 5px rgba(79,122,255,.12)}

/* Preview swatches and colored ghost share the active theme palette. */
.mini-i{color:var(--piece-i-light,#8bd5ff);background:var(--piece-i-light,#8bd5ff)}
.mini-o{color:var(--piece-o-light,#ffe68a);background:var(--piece-o-light,#ffe68a)}
.mini-t{color:var(--piece-t-light,#d7a1ff);background:var(--piece-t-light,#d7a1ff)}
.mini-s{color:var(--piece-s-light,#8be7a7);background:var(--piece-s-light,#8be7a7)}
.mini-z{color:var(--piece-z-light,#ff8d9c);background:var(--piece-z-light,#ff8d9c)}
.mini-j{color:var(--piece-j-light,#73a9ff);background:var(--piece-j-light,#73a9ff)}
.mini-l{color:var(--piece-l-light,#ffb05f);background:var(--piece-l-light,#ffb05f)}
/* Shadow/ghost pieces are deliberately theme-independent. */
.colored-ghost-piece .cell.ghost-i{--ghost-color:#2f86b8}
.colored-ghost-piece .cell.ghost-o{--ghost-color:#b8891f}
.colored-ghost-piece .cell.ghost-t{--ghost-color:#7d4ca9}
.colored-ghost-piece .cell.ghost-s{--ghost-color:#2f8a50}
.colored-ghost-piece .cell.ghost-z{--ghost-color:#ad3f52}
.colored-ghost-piece .cell.ghost-j{--ghost-color:#2e61ad}
.colored-ghost-piece .cell.ghost-l{--ghost-color:#b9651d}


/* Retro piece skin: crisp arcade palette, hard pixel edges and cabinet-like shadows. */
:root[data-piece-theme="retro"] {
  --piece-i-light:#8be9fd; --piece-i-dark:#00a8cc;
  --piece-o-light:#fff1a8; --piece-o-dark:#e0a800;
  --piece-t-light:#d8b4fe; --piece-t-dark:#8b35d1;
  --piece-s-light:#a7f3a0; --piece-s-dark:#16a34a;
  --piece-z-light:#ff9aa2; --piece-z-dark:#e11d48;
  --piece-j-light:#93c5fd; --piece-j-dark:#2563eb;
  --piece-l-light:#ffc078; --piece-l-dark:#ea580c;
}
:root[data-piece-theme="retro"] .cell.locked {
  border: 1px solid #170d2a;
  border-radius: 0;
  box-shadow: inset 2px 2px 0 #ffffff55, inset -3px -3px 0 #12091d55, 2px 2px 0 #05030b;
}
:root[data-piece-theme="retro"] .cell.locked::after {
  opacity: .85;
  background: linear-gradient(135deg,#ffffff20 0 18%,transparent 18% 72%,#09051b30 72%);
}
:root[data-piece-theme="retro"] .active-piece-svg .front-face,
:root[data-piece-theme="retro"] .turn-face .front-face {
  stroke: #180d2a;
  stroke-width: 1.6;
  stroke-linejoin: miter;
}
:root[data-piece-theme="retro"] .active-piece-svg .seam,
:root[data-piece-theme="retro"] .turn-face .seam {
  stroke: #fff4d6;
  stroke-width: 1;
  opacity: .9;
}
:root[data-piece-theme="retro"] .cell.locked {
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.32), inset -3px -3px 0 rgba(8,4,18,.36), 2px 2px 0 #05030b;
}


/* Fruity piece skin: juicy citrus, berry, grape and melon colors. */
:root[data-piece-theme="fruity"] {
  --piece-i-light:#8ff7e5; --piece-i-dark:#08bda5;
  --piece-o-light:#fff19a; --piece-o-dark:#f3ad18;
  --piece-t-light:#e6b5ff; --piece-t-dark:#a34de0;
  --piece-s-light:#d0fa83; --piece-s-dark:#68bd28;
  --piece-z-light:#ffb1c8; --piece-z-dark:#ef477b;
  --piece-j-light:#a8c7ff; --piece-j-dark:#557be8;
  --piece-l-light:#ffc28a; --piece-l-dark:#f07836;
}
:root[data-piece-theme="fruity"] .cell.locked {
  border: 1px solid #572a57;
  border-radius: 3px;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.48), inset -3px -3px 0 rgba(71,23,70,.22);
}
:root[data-piece-theme="fruity"] .cell.locked::after {
  opacity: .8;
  background: linear-gradient(135deg,rgba(255,255,255,.25) 0 20%,transparent 20% 72%,rgba(70,20,65,.12) 72%);
}
:root[data-piece-theme="fruity"] .active-piece-svg .front-face,
:root[data-piece-theme="fruity"] .turn-face .front-face {
  stroke: #572a57;
  stroke-width: 1.25;
  stroke-linejoin: round;
}
:root[data-piece-theme="fruity"] .active-piece-svg .seam,
:root[data-piece-theme="fruity"] .turn-face .seam {
  stroke: #fff9e9;
  stroke-width: 1;
  opacity: .88;
}
