/* Sound Check: Prismatic Tour · app styles
   1920×1080 stage, scaled to fit like the game client. */
@font-face { font-family: Beaufort; src: url(/assets/ui_shared/content/fonts/beaufort/font_beaufort/beaufortforlol-bold.otf); font-weight: 700; font-display: swap; }
@font-face { font-family: Beaufort; src: url(/assets/ui_shared/content/fonts/beaufort/font_beaufort/beaufortforlol-bolditalic.otf); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: Spiegel; src: url(/assets/ui_shared/content/fonts/spiegel/font_spiegel/spiegel_regular.otf); font-weight: 400; font-display: swap; }
@font-face { font-family: Spiegel; src: url(/assets/ui_shared/content/fonts/spiegel/font_spiegel/spiegel_semibold.otf); font-weight: 600; font-display: swap; }
@font-face { font-family: Spiegel; src: url(/assets/ui_shared/content/fonts/spiegel/font_spiegel/spiegel_bold.otf); font-weight: 700; font-display: swap; }

:root {
  --gold: #c8aa6e; --gold-hi: #f0e6d2; --gold-lo: #785a28; --gold-line: linear-gradient(180deg, #c8aa6e, #463714);
  --ink: #07061a; --text: #f0e6d2; --soft: #d9d2e8; --muted: #a09bb8; --dim: #6b6589;
  --prism: linear-gradient(100deg, #ff7ad9 0%, #b18cff 22%, #7cc7ff 44%, #8dffd0 64%, #ffe08a 84%, #ff7ad9 100%);
  --bronze: #d08a5c; --silver: #c4d2e0; --goldt: #f2c66d;
  --c1: #9a9aa8; --c2: #1fc38a; --c3: #2f8de0; --c4: #c552e6; --c5: #f5b73a; --c7: #ff6ad5;
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.2, 1.5, .4, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #05040f; }
body { font: 400 20px/1.45 Spiegel, system-ui, sans-serif; color: var(--text); -webkit-font-smoothing: antialiased; user-select: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid #b18cff; outline-offset: 4px; }

#viewport { position: fixed; inset: 0; display: grid; place-items: center; background: #05040f url(/media/app/venue-blur.webp) center/cover; }
#stage { --pulse: 0; --energy: 0; --b1: #b18cff; --b2: #6fe6ff; position: relative; width: 1920px; height: 1080px; flex: none; transform-origin: center; overflow: hidden; background: var(--ink); box-shadow: 0 0 120px rgba(0, 0, 0, .8); }

/* ---------- venue ----------
   Performance: nothing here is filtered or blurred live, and the music only drives opacity (set per element by the frame loop),
   so beats never trigger style recalculation of the stage or a repaint. */
#venue { position: absolute; inset: 0; overflow: hidden; }
#venue > * { position: absolute; pointer-events: none; }
#venue .art { inset: -3%; transform: scale(1.02); transition: transform 2.4s var(--ease); animation: drift 60s ease-in-out infinite alternate; will-change: transform; }
#venue .art i { position: absolute; inset: 0; background: url(/media/app/venue.webp) center 40%/cover; }
#venue .art i.soft { background-image: url(/media/app/venue-soft.webp); opacity: 0; transition: opacity 1.4s var(--ease); }
@keyframes drift { from { translate: -1% 0; } to { translate: 1% -1%; } }
#venue .dim { inset: 0; background: #05040f; opacity: .04; transition: opacity 1.6s var(--ease); }
#venue .glow { left: 0; right: 0; bottom: 0; height: 75%; background: radial-gradient(900px 500px at 50% 100%, color-mix(in srgb, var(--b1) 50%, transparent), transparent 70%); opacity: .36; transition: background 1.2s; }
#venue .tint { inset: 0; background: linear-gradient(180deg, rgba(7, 6, 26, .55), rgba(7, 6, 26, .2) 30%, rgba(7, 6, 26, .85)); }
#venue .heat { inset: 0; background: radial-gradient(1200px 700px at 50% 70%, rgba(255, 70, 40, .22), transparent 70%), linear-gradient(180deg, rgba(60, 0, 10, .25), transparent 40%); opacity: 0; }
#venue .beams { inset: 0; mix-blend-mode: screen; opacity: .12; }
#venue .beams i { position: absolute; bottom: -10%; width: 260px; height: 140%; transform-origin: 50% 100%; background: radial-gradient(50% 100% at 50% 100%, color-mix(in srgb, var(--b1) 70%, white), transparent 85%); opacity: .5; animation: sway 9s ease-in-out infinite alternate; will-change: transform; }
#venue .beams i:nth-child(1) { left: 8%; --r: -24deg; animation-duration: 11s; }
#venue .beams i:nth-child(2) { left: 28%; --r: -10deg; background-image: radial-gradient(50% 100% at 50% 100%, color-mix(in srgb, var(--b2) 70%, white), transparent 85%); animation-duration: 8s; }
#venue .beams i:nth-child(3) { left: 48%; --r: 4deg; animation-duration: 13s; }
#venue .beams i:nth-child(4) { left: 66%; --r: 14deg; background-image: radial-gradient(50% 100% at 50% 100%, color-mix(in srgb, var(--b2) 70%, white), transparent 85%); animation-duration: 10s; }
#venue .beams i:nth-child(5) { left: 84%; --r: 26deg; animation-duration: 12s; }
@keyframes sway { from { transform: rotate(calc(var(--r) - 9deg)); } to { transform: rotate(calc(var(--r) + 9deg)); } }
#venue .floor { left: 50%; top: 58%; width: 1500px; height: 520px; translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--b1) 50%, transparent), color-mix(in srgb, var(--b1) 18%, transparent) 60%, transparent); opacity: 0; }
[data-screen="pick"] #venue .art { transform: scale(1.06); }
[data-screen="show"] #venue .art { transform: scale(1.1); }
[data-screen="pick"] #venue .art i.soft, [data-screen="show"] #venue .art i.soft { opacity: 1; }
[data-screen="pick"] #venue .dim { opacity: .56; }
[data-screen="show"] #venue .dim { opacity: .68; }
[data-phase="battle"] #venue .beams i { animation-duration: 3.2s; }

/* ---------- screens ---------- */
.screen { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .8s, visibility 0s .8s; }
.screen.active { opacity: 1; visibility: visible; transition: opacity .8s .2s, visibility 0s; z-index: 2; }

.label { font: 700 14px/1 Beaufort, serif; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.kicker { display: inline-flex; align-items: center; gap: 14px; font: 700 20px/1 Beaufort, serif; letter-spacing: .32em; text-transform: uppercase; color: var(--gold); }
.kicker img { width: 40px; height: 40px; filter: drop-shadow(0 0 10px rgba(242, 198, 109, .5)); }
h1, h2 { font-family: Beaufort, serif; font-weight: 700; margin: 0; }
em.prism, h1 em, h2 em { font-style: normal; background: var(--prism); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: prism 9s linear infinite; }
@keyframes prism { to { background-position: 220% 0; } }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid rgba(200, 170, 110, .4); background: rgba(10, 8, 30, .55); font: 700 14px/1 Beaufort; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); backdrop-filter: blur(6px); }

/* ---------- title ---------- */
#title .t-wrap { position: absolute; left: 0; right: 0; bottom: 150px; display: flex; flex-direction: column; align-items: center; text-align: center; }
#title::before { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(0deg, rgba(5, 4, 18, .95), rgba(5, 4, 18, .7) 45%, transparent); }
#title .t-wrap > * { position: relative; }
.t-logo { width: 460px; filter: drop-shadow(0 0 40px rgba(177, 140, 255, .6)); margin-bottom: 4px; }
.t-name { font-size: 132px; line-height: 1; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-hi); text-shadow: 0 6px 40px rgba(0, 0, 0, .6); }
.t-name em { font-style: italic; padding-right: .08em; }
.t-tag { margin: 18px 0 0; font-size: 27px; color: var(--soft); max-width: 900px; }
.t-tag b { color: var(--gold-hi); font-weight: 600; }
.t-meta { display: flex; gap: 12px; margin-top: 28px; }
#t-load.done .spin { display: none; }
.spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(200, 170, 110, .3); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.t-link { position: absolute; right: 56px; bottom: 56px; font: 700 16px/1 Beaufort; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); text-decoration: none; transition: color .2s; }
.t-link:hover { color: var(--gold-hi); }
[data-screen="title"] #title .t-wrap > * { animation: rise 1.2s var(--ease) both; }
[data-screen="title"] #title .t-wrap > :nth-child(2) { animation-delay: .12s; } [data-screen="title"] #title .t-wrap > :nth-child(3) { animation-delay: .24s; }
[data-screen="title"] #title .t-wrap > :nth-child(4) { animation-delay: .4s; } [data-screen="title"] #title .t-wrap > :nth-child(5) { animation-delay: .55s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

/* the Set 19 call-to-action button (real client textures) */
.cta { position: relative; width: 408px; height: 150px; margin-top: 30px; background: url(/assets/ui_19/content/home/widgets/setintro/textures/t_button_setannouncement19cta_default.png) center/100% 100% no-repeat; transition: transform .2s var(--ease), filter .3s; filter: drop-shadow(0 0 22px rgba(177, 140, 255, .55)); }
.cta:hover { background-image: url(/assets/ui_19/content/home/widgets/setintro/textures/t_button_setannouncement19cta_hover.png); transform: scale(1.04); }
.cta:active { background-image: url(/assets/ui_19/content/home/widgets/setintro/textures/t_button_setannouncement19cta_pressed.png); transform: scale(.98); }
.cta span { font: 700 30px/1 Beaufort; letter-spacing: .14em; text-transform: uppercase; color: #fff; text-shadow: 0 0 18px rgba(177, 140, 255, .9), 0 2px 2px rgba(0, 0, 0, .5); }

/* ---------- pick ---------- */
.p-head { position: absolute; top: 100px; left: 0; right: 0; text-align: center; }
.p-head h2 { margin-top: 18px; font-size: 76px; line-height: 1; text-transform: uppercase; letter-spacing: .04em; color: var(--gold-hi); text-shadow: 0 4px 30px rgba(0, 0, 0, .6); }
.p-head h2 em { font-style: italic; }
.p-cards { position: absolute; top: 300px; left: 0; right: 0; display: flex; justify-content: center; gap: 36px; perspective: 1600px; }
.p-hint { position: absolute; left: 0; right: 0; top: 252px; display: flex; justify-content: center; align-items: center; gap: 14px; font-size: 20px; color: var(--soft); opacity: 0; transition: opacity .8s .6s; }
#pick.ready .p-hint { opacity: 1; }
.p-hint .key { font: 700 15px/1 Beaufort; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-hi); padding: 7px 12px; border: 1px solid rgba(200, 170, 110, .5); background: rgba(10, 8, 30, .6); }
.p-hint .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); margin: 0 6px; }

.bcard { --tilt: 0deg; position: relative; width: 316px; height: 552px; text-align: left; transform-style: preserve-3d; opacity: 0; transform: translateY(70px) rotateY(-80deg); transition: transform .55s var(--ease), opacity .4s, filter .4s; }
.bcard.dealt { opacity: 1; transform: none; }
.bcard .face { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(180deg, #17123c, #0a0820); border: 2px solid transparent; border-image: var(--gold-line) 1; box-shadow: 0 30px 60px rgba(0, 0, 0, .55); transition: box-shadow .4s, border-image .4s; }
.bcard .art { position: absolute; left: 0; right: 0; top: 0; height: 306px; }
.bcard .art i { position: absolute; left: 0; right: 0; height: 140px; background: center 30%/cover; filter: saturate(.95) brightness(.92); transition: filter .4s, transform .6s var(--ease); }
.bcard .art i:nth-child(1) { top: 0; clip-path: polygon(0 0, 100% 0, 100% 72%, 0 100%); }
.bcard .art i:nth-child(2) { top: 92px; clip-path: polygon(0 34%, 100% 0, 100% 72%, 0 100%); }
.bcard .art i:nth-child(3) { top: 182px; height: 124px; clip-path: polygon(0 38%, 100% 4%, 100% 100%, 0 100%); }
.bcard .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, #0a0820 98%), linear-gradient(100deg, color-mix(in srgb, var(--b1) 30%, transparent), transparent 60%); mix-blend-mode: normal; }
.bcard .seam { position: absolute; left: -10px; right: -10px; height: 3px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--b1) 80%, white), transparent); z-index: 1; opacity: .8; }
.bcard .seam.s1 { top: 115px; transform: rotate(-4.9deg); } .bcard .seam.s2 { top: 206px; transform: rotate(-5.2deg); }
.bcard .hexwrap { position: absolute; left: 50%; top: 252px; translate: -50% 0; z-index: 2; }
.bcard .hexwrap .hex { width: 104px; height: 104px; }
.bcard .body { position: absolute; left: 0; right: 0; top: 364px; padding: 0 26px; text-align: center; }
.bcard .genre { font: 700 14px/1 Beaufort; letter-spacing: .3em; text-transform: uppercase; color: color-mix(in srgb, var(--b1) 70%, white); }
.bcard .name { margin-top: 10px; font: 700 42px/1 Beaufort; text-transform: uppercase; letter-spacing: .04em; color: var(--gold-hi); white-space: nowrap; }
.bcard .name.long { font-size: 34px; letter-spacing: .02em; padding-top: 4px; height: 42px; }
.bcard .line { margin-top: 10px; font-size: 18px; line-height: 1.4; color: var(--soft); min-height: 50px; }
.bcard .live { position: absolute; left: 26px; right: 26px; bottom: 22px; height: 30px; display: flex; align-items: center; gap: 10px; font: 700 13px/1 Beaufort; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); transition: color .3s; }
.bcard .live .bars { flex: 1; display: flex; align-items: center; gap: 3px; height: 100%; }
.bcard .live .bars b { flex: 1; height: 100%; transform: scaleY(.15); will-change: transform; background: color-mix(in srgb, var(--b1) 60%, white); opacity: .25; border-radius: 1px; transition: height .08s; }
.bcard:hover, .bcard:focus-visible, .bcard.on { z-index: 2; }
.bcard.dealt:hover, .bcard.dealt:focus-visible, .bcard.dealt.on { transform: translateY(-16px) scale(1.03); }
.bcard.on .face { border-image: linear-gradient(180deg, color-mix(in srgb, var(--b1) 60%, white), var(--b2)) 1; box-shadow: 0 30px 60px rgba(0, 0, 0, .55), 0 0 44px color-mix(in srgb, var(--b1) 50%, transparent); }
.bcard .pulse { position: absolute; inset: -6px; box-shadow: 0 0 60px 6px color-mix(in srgb, var(--b1) 70%, transparent); opacity: 0; pointer-events: none; }
.bcard.on .art i { filter: saturate(1.15) brightness(1.08); }
.bcard.on .live { color: var(--gold-hi); }
.bcard.on .live .bars b { opacity: 1; }
.p-cards.has-on .bcard.dealt:not(.on) { filter: brightness(.6) saturate(.7); }
.bcard .badge { position: absolute; top: 18px; left: 50%; translate: -50% 0; z-index: 3; padding: 8px 18px; font: 700 15px/1 Beaufort; letter-spacing: .26em; text-transform: uppercase; color: #120c2c; background: var(--prism); opacity: 0; transform: scale(1.6); transition: opacity .3s, transform .5s var(--spring); }
.bcard.chosen { transform: translateY(-20px) scale(1.07) !important; filter: none !important; transition: transform .7s var(--spring); }
.bcard.chosen .badge { opacity: 1; transform: none; }
.bcard.chosen .face { animation: flash 1s var(--ease); }
@keyframes flash { 0% { filter: brightness(2.4); } 100% { filter: none; } }
.bcard.gone { opacity: 0 !important; transform: translateY(90px) scale(.92) !important; transition: transform .6s var(--ease), opacity .5s; }

/* ---------- hex trait badge (client frames) ---------- */
.hex { position: relative; width: 64px; height: 64px; display: grid; place-items: center; flex: none; background: url(/assets/ui_traits/content/textures/t_trait_frame_pc_tier_0.png) center/contain no-repeat; transition: transform .3s, filter .3s; }
.hex img { width: 58%; height: 58%; object-fit: contain; opacity: .75; }
.hex.t1 { background-image: url(/assets/ui_traits/content/textures/t_trait_frame_pc_tier_1.png); }
.hex.t2 { background-image: url(/assets/ui_traits/content/textures/t_trait_frame_pc_tier_2.png); }
.hex.t3 { background-image: url(/assets/ui_traits/content/textures/t_trait_frame_pc_tier_3.png); }
.hex.t4 { background-image: url(/assets/ui_traits/content/textures/t_trait_frame_pc_tier_4.png); }
.hex.t5 { background-image: url(/assets/ui_traits/content/textures/t_trait_frame_pc_tier_5.png); }
.hex:is(.t1, .t2, .t3, .t4, .t5) img { filter: brightness(0); opacity: .9; }
.hex.lit { filter: drop-shadow(0 0 10px rgba(255, 216, 119, .5)); }
.hex.pop { animation: hexpop .7s var(--spring); }
@keyframes hexpop { 0% { transform: scale(.5); } 60% { transform: scale(1.22); } 100% { transform: scale(1); } }

/* ---------- show: the board ---------- */
#board-wrap { position: absolute; left: 50%; top: 212px; width: 1000px; height: 640px; translate: -50% 0; will-change: transform; perspective: 2000px; perspective-origin: 50% 0%; }
#board { position: absolute; left: 50%; top: 50px; transform-style: preserve-3d; transform: translateX(-50%) rotateX(48deg); transform-origin: 50% 0%; }
.hx { position: absolute; width: 128px; height: 148px; margin: -74px 0 0 -64px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: linear-gradient(180deg, rgba(200, 170, 110, .38), rgba(120, 90, 40, .25)); transition: background .25s; }
.hx::before { content: ""; position: absolute; inset: 3px; clip-path: inherit; background: radial-gradient(circle at 50% 40%, rgba(40, 30, 90, .82), rgba(12, 10, 34, .9)); transition: background .25s; }
.hx.even::before { background: radial-gradient(circle at 50% 40%, rgba(46, 36, 100, .82), rgba(14, 12, 40, .9)); }
.hx.target { background: var(--prism); background-size: 300% 100%; animation: prism 4s linear infinite; }
.hx.target::before { background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--b1) 40%, rgba(20, 14, 60, .9)), rgba(12, 10, 34, .92)); animation: breathe 1.2s ease-in-out infinite alternate; }
@keyframes breathe { to { filter: brightness(1.6); } }
.hx.over { background: #fff; }
.hx.over::before { background: radial-gradient(circle, color-mix(in srgb, var(--b1) 70%, white), rgba(20, 14, 60, .9)); }
#board.dragging .hx:not(.taken)::before { filter: brightness(1.25); }
.hx.beat::before { filter: brightness(1.5); transition: none; }

.unit { position: absolute; width: 0; height: 0; transform-style: preserve-3d; }
.unit .base { position: absolute; left: -54px; top: -54px; width: 108px; height: 108px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--b1) 75%, white), color-mix(in srgb, var(--b1) 40%, transparent) 60%, transparent); opacity: .35; transform: scale(.8); will-change: transform, opacity; }
.unit .cue { position: absolute; left: -62px; top: -62px; width: 124px; height: 124px; border-radius: 50%; background: conic-gradient(var(--gold-hi) calc(var(--k, 0) * 360deg), rgba(255, 255, 255, .12) 0); -webkit-mask: radial-gradient(closest-side, transparent 84%, #000 86%); mask: radial-gradient(closest-side, transparent 84%, #000 86%); opacity: 0; transition: opacity .2s; }
.unit.cueing .cue { opacity: 1; }
.unit .shock { position: absolute; left: -60px; top: -60px; width: 120px; height: 120px; border-radius: 50%; border: 4px solid color-mix(in srgb, var(--b1) 60%, white); opacity: 0; }
.unit.burst .shock { animation: shock 1s var(--ease); }
@keyframes shock { 0% { opacity: 1; transform: scale(.4); } 100% { opacity: 0; transform: scale(2.6); } }
.unit .stand { position: absolute; left: -68px; bottom: 0; width: 136px; transform-origin: 50% 100%; transform: rotateX(-48deg); display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.unit .stand > .in { width: 100%; display: flex; flex-direction: column; align-items: center; animation: land .7s var(--spring) both; }
@keyframes land { 0% { transform: translateY(-160px) scale(1.15); opacity: 0; } 55% { opacity: 1; } 100% { transform: none; } }
.unit .pc { width: 136px; height: 82px; border: 3px solid var(--cc, var(--c1)); background: #111 center 25%/cover; position: relative; box-shadow: 0 12px 24px rgba(0, 0, 0, .6); }
.unit .halo { position: absolute; left: 50%; top: 0; width: 136px; height: 82px; translate: -50% 0; box-shadow: 0 0 34px 6px color-mix(in srgb, var(--b1) 70%, transparent); opacity: 0; }
.unit .plate { margin-top: -2px; padding: 6px 12px 7px; min-width: 112px; text-align: center; background: linear-gradient(180deg, #1b1640, #0c0a24); border: 1px solid rgba(200, 170, 110, .55); font: 700 15px/1 Beaufort; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.unit .plate small { display: block; margin-top: 4px; font: 700 11px/1 Beaufort; letter-spacing: .22em; color: color-mix(in srgb, var(--b1) 65%, white); }
.unit .stars { margin-top: 3px; font-size: 13px; line-height: 1; color: #ffd877; text-shadow: 0 0 6px rgba(255, 216, 119, .8), 0 1px 2px #000; }
[data-cost="1"] { --cc: var(--c1); } [data-cost="2"] { --cc: var(--c2); } [data-cost="3"] { --cc: var(--c3); } [data-cost="4"] { --cc: var(--c4); } [data-cost="5"] { --cc: var(--c5); } [data-cost="7"] { --cc: var(--c7); }

/* ---------- show: panels ---------- */
.panel { position: absolute; background: linear-gradient(180deg, rgba(20, 16, 52, .86), rgba(9, 8, 28, .92)); border: 2px solid transparent; border-image: var(--gold-line) 1; box-shadow: 0 30px 70px rgba(0, 0, 0, .45); transition: opacity .6s, transform .8s var(--ease); }
#show:not(.ready) .panel, #show:not(.ready) #shop { opacity: 0; transform: translateY(16px); }

#traits { left: 56px; top: 150px; width: 340px; padding: 18px 18px 16px; }
#traits .label { margin: 2px 4px 14px; }
.trow { display: grid; grid-template-columns: 62px 1fr auto; gap: 14px; align-items: center; padding: 10px 12px; background: rgba(0, 0, 0, .35); border-left: 3px solid rgba(200, 170, 110, .25); transition: background .5s, border-color .5s; }
.trow.active { background: linear-gradient(90deg, color-mix(in srgb, var(--b1) 28%, transparent), rgba(0, 0, 0, .3)); border-left-color: var(--b1); }
.trow .hex { width: 62px; height: 62px; }
.trow .tn { font: 700 21px/1 Beaufort; text-transform: uppercase; letter-spacing: .05em; }
.trow .bp { display: flex; gap: 6px; margin-top: 8px; font: 700 16px/1 Beaufort; color: var(--dim); }
.trow .bp b { color: var(--gold-hi); }
.trow .bp i { font-style: normal; opacity: .5; }
.trow .cnt { font: 700 28px/1 Beaufort; color: var(--gold-hi); min-width: 28px; text-align: right; }
.trow .cnt small { font-size: 18px; color: var(--muted); }
.others { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.others span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px 5px 5px; background: rgba(0, 0, 0, .3); font: 600 14px/1 Spiegel; color: var(--muted); }
.others img { width: 20px; height: 20px; opacity: .7; }
.others .more { padding: 5px 9px; }
.tp-note { margin: 14px 4px 0; font-size: 15px; line-height: 1.4; color: var(--dim); }

#mix { right: 56px; top: 150px; width: 420px; padding: 18px 20px 16px; }
.mx-head { display: flex; justify-content: space-between; align-items: baseline; margin: 2px 2px 12px; }
.mx-scene { font: 700 14px/1 Beaufort; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.mx-row { position: relative; display: grid; grid-template-columns: 62px 1fr 112px; gap: 14px; align-items: center; height: 92px; padding: 0 12px; margin-bottom: 8px; background: rgba(0, 0, 0, .3); border: 1px dashed rgba(200, 170, 110, .25); transition: background .6s, border-color .6s; overflow: hidden; }
.mx-row .av { width: 62px; height: 62px; border-radius: 50%; border: 2px dashed rgba(200, 170, 110, .35); background: center 25%/cover; transition: border-color .4s; }
.mx-row .ln { font: 700 22px/1 Beaufort; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); transition: color .4s; }
.mx-row .sub { margin-top: 6px; font-size: 15px; line-height: 1.25; color: var(--dim); }
.mx-row .who { margin-top: 4px; font: 600 15px/1.2 Spiegel; color: color-mix(in srgb, var(--b1) 60%, white); min-height: 18px; }
.mx-row canvas { width: 112px; height: 48px; }
.mx-row.on { border: 1px solid color-mix(in srgb, var(--b1) 60%, transparent); background: linear-gradient(90deg, color-mix(in srgb, var(--b1) 30%, transparent), rgba(10, 8, 30, .5)); }
.mx-row.on .av { border: 2px solid color-mix(in srgb, var(--b1) 70%, white); box-shadow: 0 0 16px color-mix(in srgb, var(--b1) 60%, transparent); }
.mx-row.on .ln { color: var(--gold-hi); }
.mx-row.new { animation: rowin 1.1s var(--ease); }
@keyframes rowin { 0% { filter: brightness(2.6); transform: translateX(-14px); } 100% { filter: none; transform: none; } }
.mx-row.cueing::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--k, 0) * 100%); background: var(--gold-hi); }
.mx-foot { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 0 2px; font: 700 14px/1 Beaufort; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.beats { display: flex; gap: 4px; }
.beats i { width: 16px; height: 5px; background: rgba(255, 255, 255, .15); }
.beats i.on { background: var(--gold-hi); box-shadow: 0 0 8px var(--gold); }
#mx-bpm { margin-left: auto; color: var(--gold); }

/* shop */
#shop { position: absolute; left: 50%; bottom: 46px; translate: -50% 0; display: flex; align-items: stretch; gap: 18px; padding: 14px 16px 14px 22px; background: linear-gradient(180deg, rgba(20, 16, 52, .88), rgba(8, 7, 24, .94)); border: 2px solid transparent; border-image: var(--gold-line) 1; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); transition: opacity .6s, transform .8s var(--ease); }
.sh-label { width: 170px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.sh-label b { font: 700 24px/1 Beaufort; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-hi); }
.sh-label span { font-size: 16px; line-height: 1.35; color: var(--muted); }
.sh-slots { display: flex; gap: 10px; }
.slot { position: relative; width: 256px; height: 196px; background: rgba(0, 0, 0, .35); border: 1px dashed rgba(200, 170, 110, .25); display: grid; place-items: center; font: 700 14px/1 Beaufort; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.slot .wait { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.slot .wait .bar { width: 150px; height: 4px; background: rgba(255, 255, 255, .1); }

.scard { position: absolute; inset: 0; border: 3px solid var(--cc, var(--c1)); background: #0c0a22; cursor: grab; overflow: hidden; touch-action: none; transform-origin: 50% 100%; animation: roll .55s var(--ease); transition: transform .2s, filter .2s, box-shadow .3s; box-shadow: 0 0 0 0 transparent; }
.scard:hover { transform: translateY(-6px); filter: brightness(1.12); box-shadow: 0 0 30px color-mix(in srgb, var(--b1) 50%, transparent); }
.scard.lifted { opacity: .3; filter: grayscale(1); cursor: grabbing; }
@keyframes roll { from { transform: translateY(30px) scaleY(.2); opacity: 0; } 60% { opacity: 1; } }
.scard .art { height: 150px; background: center/cover; }
.scard .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; display: flex; align-items: center; padding: 0 12px; background: linear-gradient(180deg, #16122f, #0a0820); border-top: 1px solid rgba(200, 170, 110, .3); }
.scard .nm { font: 700 20px/1 Beaufort; text-transform: uppercase; letter-spacing: .04em; }
.scard .cost { margin-left: auto; display: flex; align-items: center; gap: 5px; font: 700 20px/1 Beaufort; color: #ffd877; }
.scard .cost::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6c9, #f5b73a 55%, #8a5a10); }
.scard .tr { position: absolute; left: 8px; top: 8px; display: flex; flex-direction: column; gap: 4px; }
.scard .tr span { display: flex; align-items: center; gap: 6px; padding: 3px 8px 3px 4px; background: rgba(0, 0, 0, .65); font: 600 13px/1 Spiegel; }
.scard .tr img { width: 18px; height: 18px; }
.scard .role { position: absolute; left: 8px; bottom: 48px; padding: 6px 10px; font: 700 13px/1 Beaufort; letter-spacing: .16em; text-transform: uppercase; color: #120c2c; background: color-mix(in srgb, var(--b1) 55%, white); box-shadow: 0 0 16px color-mix(in srgb, var(--b1) 55%, transparent); }

/* drag ghost (lives outside the scaled stage) */
#drag-layer { position: fixed; inset: 0; pointer-events: none; z-index: 100; }
.ghost-card { position: absolute; width: 152px; height: 92px; border: 3px solid var(--cc, var(--c1)); background: #111 center 25%/cover; box-shadow: 0 20px 40px rgba(0, 0, 0, .6), 0 0 30px rgba(177, 140, 255, .5); transform-origin: 50% 50%; rotate: -4deg; }

/* hint */
#hint { position: absolute; left: 50%; bottom: 274px; translate: -50% 0; padding: 12px 20px; font: 700 17px/1 Beaufort; letter-spacing: .16em; text-transform: uppercase; color: #120c2c; background: var(--gold-hi); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); opacity: 0; transform: translateY(10px); transition: opacity .4s, transform .5s var(--ease); pointer-events: none; white-space: nowrap; }
#hint::after { content: ""; position: absolute; left: 50%; bottom: -10px; translate: -50% 0; border: 10px solid transparent; border-top-color: var(--gold-hi); border-bottom: 0; }
#hint.show { opacity: 1; transform: none; animation: nudge 1.6s ease-in-out .6s infinite; }
@keyframes nudge { 50% { transform: translateY(-6px); } }

/* trait activation burst */
#trait-burst { position: absolute; left: 50%; top: 380px; translate: -50% -50%; display: grid; justify-items: center; pointer-events: none; opacity: 0; z-index: 5; }
#trait-burst.show { animation: burst 3.2s var(--ease) both; }
#trait-burst .rays { position: absolute; left: 50%; top: 90px; width: 640px; height: 640px; translate: -50% -50%; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--b1) 50%, transparent) 0 6deg, transparent 6deg 18deg); -webkit-mask: radial-gradient(closest-side, #000 20%, transparent); mask: radial-gradient(closest-side, #000 20%, transparent); animation: rot 12s linear infinite; }
@keyframes rot { to { rotate: 360deg; } }
#trait-burst .hex { width: 180px; height: 180px; }
#trait-burst .tb-name { position: relative; margin-top: 10px; font: 700 64px/1 Beaufort; text-transform: uppercase; letter-spacing: .06em; color: #fff; text-shadow: 0 0 30px color-mix(in srgb, var(--b1) 80%, transparent), 0 4px 10px rgba(0, 0, 0, .6); }
#trait-burst .tb-tier { position: relative; margin-top: 10px; font: 700 20px/1 Beaufort; letter-spacing: .4em; text-transform: uppercase; }
@keyframes burst { 0% { opacity: 0; transform: scale(1.5); } 12% { opacity: 1; transform: scale(1); } 78% { opacity: 1; transform: scale(1.02); } 100% { opacity: 0; transform: scale(.96); } }
.tier-bronze { color: var(--bronze); } .tier-silver { color: var(--silver); } .tier-gold { color: var(--goldt); }

/* ---------- HUD ---------- */
#hud { position: absolute; z-index: 30; left: 0; right: 0; top: 0; height: 96px; display: flex; align-items: center; gap: 30px; padding: 0 56px; background: linear-gradient(180deg, rgba(4, 3, 14, .88), transparent); transition: opacity .6s; }
[data-screen="title"] #hud { opacity: 0; pointer-events: none; }
.brand { display: flex; align-items: center; gap: 12px; width: 300px; }
.brand img { width: 34px; height: 34px; }
.brand span { font: 700 18px/1 Beaufort; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
#setlist { flex: 1; display: flex; justify-content: center; align-items: center; gap: 26px; }
.act { display: flex; align-items: center; gap: 12px; opacity: .4; transition: opacity .5s; }
.act.cur { opacity: 1; } .act.done { opacity: .75; }
.act img { width: 34px; height: 34px; filter: drop-shadow(0 0 8px rgba(242, 198, 109, .4)); }
.act .an { font: 700 16px/1 Beaufort; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-hi); }
.act .pips { display: flex; gap: 5px; margin-top: 7px; }
.act .pips i { width: 22px; height: 4px; background: rgba(240, 230, 210, .18); transition: background .4s, width .4s; }
.act .pips i.done { background: var(--gold); }
.act .pips i.cur { width: 36px; background: var(--prism); box-shadow: 0 0 10px rgba(177, 140, 255, .8); }
.act .lock { font: 700 11px/1 Beaufort; letter-spacing: .2em; color: var(--dim); text-transform: uppercase; margin-top: 7px; }
.sep { width: 40px; height: 1px; background: rgba(200, 170, 110, .35); }
.hud-r { display: flex; align-items: center; gap: 12px; width: 580px; justify-content: flex-end; }
#np { display: flex; align-items: center; gap: 12px; padding: 8px 14px; width: 400px; overflow: hidden; border: 1px solid rgba(200, 170, 110, .25); background: rgba(10, 8, 30, .55); }
#np-eq { width: 72px; height: 32px; }
#np-title { font: 700 13px/1 Beaufort; letter-spacing: .14em; color: var(--gold); text-transform: uppercase; white-space: nowrap; }
#np-sub { margin-top: 5px; font: 600 15px/1.2 Spiegel; color: var(--text); white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.iconbtn { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid rgba(200, 170, 110, .5); background: rgba(0, 0, 0, .35); font-size: 20px; color: var(--gold-hi); transition: background .2s; }
.iconbtn:hover, .ghost:hover { background: rgba(80, 60, 160, .45); }
.ghost { white-space: nowrap; height: 46px; padding: 0 18px; border: 1px solid rgba(200, 170, 110, .5); background: rgba(0, 0, 0, .35); font: 700 15px/1 Beaufort; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-hi); transition: background .2s; }

/* ---------- DJ Sona's booth ---------- */
#booth { position: absolute; z-index: 25; left: 56px; bottom: 46px; width: 600px; pointer-events: none; transition: opacity .8s, transform .8s var(--ease); }
[data-screen="title"] #booth { opacity: 0; transform: translateY(30px); }
#booth .cam { position: relative; width: 268px; pointer-events: auto; }
#booth .halo { position: absolute; left: 0; top: 0; width: 268px; height: 134px; box-shadow: 0 0 44px 10px rgba(177, 140, 255, .6); opacity: 0; }
#booth .pic { width: 268px; height: 134px; background: #0c0a22 center/cover; border: 2px solid transparent; border-image: var(--prism) 1; box-shadow: 0 0 22px rgba(177, 140, 255, .4), 0 20px 40px rgba(0, 0, 0, .5); position: relative; overflow: hidden; transition: background-image .4s; }
#booth .pic::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 3px), linear-gradient(0deg, rgba(7, 6, 26, .6), transparent 50%); }
#booth .pic.swap { animation: swap .9s var(--ease); }
@keyframes swap { 0% { filter: brightness(3) saturate(0); } 100% { filter: none; } }
.cam-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: rgba(8, 7, 24, .92); border: 1px solid rgba(200, 170, 110, .35); border-top: 0; }
.cam-bar img { width: 20px; height: 20px; opacity: .85; }
.cam-bar b { white-space: nowrap; font: 700 15px/1 Beaufort; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-hi); }
.cam-bar span { white-space: nowrap; font: 700 11px/1 Beaufort; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cam-bar canvas { margin-left: auto; width: 48px; height: 18px; flex: none; }
#notes { position: absolute; left: 0; bottom: 186px; width: 470px; }
[data-screen="pick"] #notes { left: 296px; bottom: 6px; width: 540px; }
[data-screen="pick"] .note::after { left: -14px; bottom: 44px; border: 14px solid transparent; border-right-color: #f6f1e6; border-left: 0; }
.note { position: absolute; left: 0; bottom: 0; width: 100%; padding: 18px 22px 20px; background: linear-gradient(180deg, rgba(253, 250, 242, .98), rgba(238, 230, 214, .98)); color: #1d1540; box-shadow: 0 20px 50px rgba(0, 0, 0, .55); animation: notein .6s var(--ease) both; }
.note::after { content: ""; position: absolute; left: 54px; bottom: -14px; border: 14px solid transparent; border-top-color: #eee6d6; border-bottom: 0; }
.note::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--prism); }
.note .nh { display: flex; align-items: center; gap: 8px; font: 700 12px/1 Beaufort; letter-spacing: .26em; text-transform: uppercase; color: #6a5a9c; }
.note .nh img { width: 16px; height: 16px; filter: brightness(0) saturate(100%) invert(36%) sepia(23%) saturate(1000%) hue-rotate(220deg); }
.note p { margin: 10px 0 0; font: 600 23px/1.38 Spiegel; }
.note p span { opacity: 0; animation: word .35s var(--ease) forwards; animation-delay: calc(var(--i) * 45ms + .15s); display: inline-block; white-space: pre; }
@keyframes word { from { opacity: 0; transform: translateY(6px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes notein { from { opacity: 0; transform: translateY(20px) scale(.97); } }
.note.out { animation: noteout .45s var(--ease) forwards; }
@keyframes noteout { to { opacity: 0; transform: translateY(-14px) scale(.98); } }

/* ---------- chapter card ---------- */
.overlay { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; background: radial-gradient(1000px 600px at 50% 50%, rgba(20, 12, 60, .55), rgba(5, 4, 18, .9)); opacity: 0; visibility: hidden; transition: opacity .8s, visibility 0s .8s; }
.overlay.show { opacity: 1; visibility: visible; transition: opacity .8s, visibility 0s; }
.chap { width: 1180px; padding: 46px 60px 44px; text-align: center; background: linear-gradient(180deg, rgba(24, 18, 60, .94), rgba(9, 8, 28, .97)); border: 2px solid transparent; border-image: var(--prism) 1; box-shadow: 0 40px 100px rgba(0, 0, 0, .6), 0 0 80px rgba(177, 140, 255, .28); }
.overlay.show .chap > * { animation: rise .9s var(--ease) both; }
.overlay.show .chap > :nth-child(2) { animation-delay: .1s; } .overlay.show .chap > :nth-child(3) { animation-delay: .2s; } .overlay.show .chap > :nth-child(4) { animation-delay: .32s; } .overlay.show .chap > :nth-child(5) { animation-delay: .44s; } .overlay.show .chap > :nth-child(6) { animation-delay: .56s; }
.chap .kicker { display: flex; justify-content: center; }
.chap .ic { width: 96px; height: 96px; filter: drop-shadow(0 0 24px rgba(242, 198, 109, .6)); }
.chap h2 { margin-top: 10px; font-size: 64px; line-height: 1; text-transform: uppercase; letter-spacing: .05em; color: var(--gold-hi); }
.chap .lede { margin: 16px auto 0; max-width: 860px; font-size: 23px; color: var(--soft); }
.recap { display: flex; justify-content: center; gap: 22px; margin-top: 30px; }
.rc { width: 236px; text-align: left; background: rgba(0, 0, 0, .35); border: 1px solid rgba(200, 170, 110, .3); }
.rc .art { height: 120px; background: center 25%/cover; border-bottom: 3px solid var(--cc); }
.rc .t { padding: 12px 14px 14px; }
.rc .l { font: 700 13px/1 Beaufort; letter-spacing: .24em; text-transform: uppercase; color: color-mix(in srgb, var(--b1) 60%, white); }
.rc .n { margin-top: 6px; font: 700 22px/1 Beaufort; text-transform: uppercase; }
.chap .meta { margin-top: 22px; font: 700 15px/1 Beaufort; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.chap .next { margin: 30px auto 0; display: flex; align-items: center; gap: 18px; width: fit-content; padding: 16px 22px; text-align: left; background: rgba(0, 0, 0, .3); border: 1px dashed rgba(200, 170, 110, .35); }
.chap .next img { width: 52px; height: 52px; }
.chap .next b { display: block; font: 700 20px/1 Beaufort; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-hi); }
.chap .next span { font-size: 17px; color: var(--muted); }
.chap .btns { display: flex; justify-content: center; gap: 14px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 15px 30px; font: 700 18px/1 Beaufort; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-hi); background: linear-gradient(180deg, #1e2328, #0d0f14); border: 2px solid transparent; border-image: linear-gradient(180deg, #c8aa6e, #785a28) 1; transition: filter .2s, transform .15s; text-decoration: none; }
.btn:hover { filter: brightness(1.3); }
.btn:active { transform: translateY(1px); }
.btn.prism { background: linear-gradient(180deg, rgba(60, 34, 130, .95), rgba(24, 14, 60, .95)); border-image: var(--prism) 1; box-shadow: 0 0 30px rgba(177, 140, 255, .42); }
.btn[disabled] { opacity: .45; cursor: default; filter: none; }

/* ---------- misc ---------- */
#wipe { position: absolute; inset: -10%; z-index: 45; pointer-events: none; background: var(--prism); opacity: 0; transform: translateX(-120%) skewX(-18deg); mix-blend-mode: screen; filter: blur(30px); }
#wipe.go { animation: wipe 1s cubic-bezier(.6, 0, .3, 1); }
@keyframes wipe { 0% { opacity: 0; transform: translateX(-120%) skewX(-18deg); } 30% { opacity: .6; } 100% { opacity: 0; transform: translateX(120%) skewX(-18deg); } }
#toast { position: absolute; z-index: 60; left: 50%; top: 120px; transform: translate(-50%, -10px); padding: 14px 26px; font: 700 17px/1 Beaufort; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-hi); background: rgba(10, 8, 30, .94); border: 1px solid var(--gold); opacity: 0; pointer-events: none; transition: opacity .4s, transform .4s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#legal { position: absolute; z-index: 31; right: 56px; bottom: 12px; max-width: 1100px; text-align: right; font-size: 12px; color: #6b6589; pointer-events: none; }
[data-screen="show"] #legal { opacity: .7; }

.qa *, .qa *::before, .qa *::after { transition: none !important; animation-duration: 0s !important; animation-delay: 0s !important; }
@media (prefers-reduced-motion: reduce) {
  #venue .art, #venue .beams i, #trait-burst .rays { animation: none; }
}

[data-done] #skip { visibility: hidden; }

/* =====================================================================
   The Tour: Main Act + Encore pieces
   ===================================================================== */
/* listening slot (between steps) */
.slot.wait > div { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.slot.wait .bar { width: 150px; height: 4px; background: rgba(255, 255, 255, .1); }
.slot.wait .bar i { display: block; height: 100%; background: var(--gold); transform-origin: 0 50%; transform: scaleX(0); }
.slot.big { width: 420px; border-style: solid; border-color: rgba(200, 170, 110, .35); background: radial-gradient(closest-side, color-mix(in srgb, var(--b1) 22%, transparent), rgba(0, 0, 0, .35)); }
.bigbtn { padding: 22px 38px; font-size: 22px; animation: nudge 1.6s ease-in-out infinite; }
.btn.fight { color: #fff; background: linear-gradient(180deg, #a3262a, #4c0c14); border-image: linear-gradient(180deg, #ffb27a, #8a2a14) 1; box-shadow: 0 0 30px rgba(255, 90, 60, .5); }
.scard.bought { opacity: 0; transform: translateY(-30px) scale(.9); pointer-events: none; transition: opacity .3s, transform .4s var(--ease); }
.scard.sold { opacity: 0; transform: translateY(40px); pointer-events: none; transition: opacity .4s, transform .5s var(--ease); }

/* units: who's playing, who's sitting out, who's backing */
.unit.idle .pc { filter: grayscale(.85) brightness(.55); }
.unit.idle .plate { opacity: .7; }
.unit.idle .plate small { color: var(--dim); }
.unit.support .plate small { color: var(--muted); }
.unit .pc { transition: filter .6s; }

/* trait panel extras */
.trow + .trow { margin-top: 8px; }
.trow .tag { display: inline-block; margin-left: 10px; padding: 4px 7px; vertical-align: 3px; font: 700 10px/1 Beaufort; letter-spacing: .2em; text-transform: uppercase; color: #120c2c; background: color-mix(in srgb, var(--b1) 50%, white); }
.trow:not(.active) .tag { color: var(--muted); background: rgba(255, 255, 255, .08); }
.trow:not(.active) .tn { color: var(--muted); }
#trait-burst .tb-song { position: relative; margin-top: 12px; padding: 8px 16px; font: 700 15px/1 Beaufort; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-hi); background: rgba(8, 7, 24, .8); border: 1px solid rgba(200, 170, 110, .4); }

/* A/B: who plays the harmony */
.mx-row .ab { display: flex; gap: 6px; margin-top: 8px; }
.mx-row .ab:empty { display: none; }
.mx-row .ab button { padding: 6px 10px; font: 700 12px/1 Beaufort; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); background: rgba(0, 0, 0, .45); border: 1px solid rgba(200, 170, 110, .35); transition: background .2s, color .2s; }
.mx-row .ab button:hover { color: var(--gold-hi); background: rgba(80, 60, 160, .5); }
.mx-row .ab button.on { color: #120c2c; background: color-mix(in srgb, var(--b1) 55%, white); border-color: transparent; }
.mx-row .ab.nudge button:not(.on) { animation: abnudge 1.2s ease-in-out infinite; }
@keyframes abnudge { 50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--b1) 70%, white); color: var(--gold-hi); } }
.mx-row:has(.ab:not(:empty)) { height: 104px; }
.mx-row:has(.ab:not(:empty)) .who { font-size: 14px; }
.mx-row[data-layer="solo"].on { border-color: rgba(255, 216, 119, .6); background: linear-gradient(90deg, rgba(255, 216, 119, .2), rgba(10, 8, 30, .5)); }

/* planning ⇄ combat bar (the round tracker) */
#phase { position: absolute; left: 50%; top: 104px; translate: -50% 0; z-index: 6; display: flex; align-items: center; gap: 16px; padding: 8px 8px 8px 12px; background: linear-gradient(180deg, rgba(20, 16, 52, .9), rgba(8, 7, 24, .94)); border: 2px solid transparent; border-image: var(--gold-line) 1; box-shadow: 0 14px 40px rgba(0, 0, 0, .5); opacity: 0; transform: translateY(-14px); pointer-events: none; transition: opacity .5s, transform .6s var(--ease); }
#phase.show { opacity: 1; transform: none; pointer-events: auto; }
#phase .ph-ic { width: 34px; height: 34px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: linear-gradient(180deg, #5b8cff, #24307a); }
[data-phase="battle"] #phase .ph-ic { background: linear-gradient(180deg, #ff7a5c, #8a1e22); }
#phase .ph-name { font: 700 18px/1 Beaufort; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-hi); }
#phase .ph-round { margin-top: 4px; font: 700 11px/1 Beaufort; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
#phase .ph-bar { width: 180px; height: 6px; background: rgba(255, 255, 255, .1); }
#phase .ph-bar i { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, #ffb27a, #ff5a3c); }
#phase .btn { padding: 10px 16px; font-size: 14px; }
#ph-btn.nudge { animation: abnudge 1.2s ease-in-out infinite; }
[data-phase="battle"] #ph-btn { opacity: .75; }

/* combat: the venue heats up */
#banner { position: absolute; left: 0; right: 0; top: 400px; z-index: 7; text-align: center; font: 700 120px/1 Beaufort; letter-spacing: .3em; text-transform: uppercase; color: #fff; text-shadow: 0 0 40px rgba(255, 90, 60, .9), 0 6px 18px rgba(0, 0, 0, .7); opacity: 0; pointer-events: none; }
#banner.show { animation: banner 1.6s var(--ease) both; }
@keyframes banner { 0% { opacity: 0; transform: scaleX(1.6); letter-spacing: .8em; } 15% { opacity: 1; transform: none; letter-spacing: .3em; } 70% { opacity: 1; } 100% { opacity: 0; transform: scale(1.05); } }

/* Top 4 */
#top4 { position: absolute; inset: 0; z-index: 41; display: grid; place-items: center; background: radial-gradient(900px 600px at 50% 50%, rgba(40, 20, 90, .6), rgba(3, 2, 12, .96)); opacity: 0; visibility: hidden; pointer-events: none; }
#top4.show { animation: t4 4.4s var(--ease) both; }
@keyframes t4 { 0% { opacity: 0; visibility: visible; } 10% { opacity: 1; } 78% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
#top4 .t4-rays { position: absolute; left: 50%; top: 50%; width: 1600px; height: 1600px; translate: -50% -50%; background: repeating-conic-gradient(from 0deg, rgba(255, 216, 119, .22) 0 4deg, transparent 4deg 14deg); -webkit-mask: radial-gradient(closest-side, #000 15%, transparent); mask: radial-gradient(closest-side, #000 15%, transparent); animation: rot 20s linear infinite; }
#top4 .t4-in { position: relative; text-align: center; }
#top4.show .t4-in { animation: t4in 1.2s var(--spring) .2s both; }
@keyframes t4in { from { opacity: 0; transform: scale(2); filter: blur(20px); } }
#top4 .t4-k { font: 700 22px/1 Beaufort; letter-spacing: .5em; text-transform: uppercase; color: var(--gold); }
#top4 .t4-n { margin-top: 16px; font: 700 200px/1 Beaufort; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-hi); text-shadow: 0 0 60px rgba(255, 216, 119, .6); }
#top4 .t4-n b { background: var(--prism); -webkit-background-clip: text; background-clip: text; color: transparent; }
#top4 .t4-s { margin-top: 20px; font: 700 26px/1 Beaufort; letter-spacing: .4em; text-transform: uppercase; color: var(--soft); }

/* Sona features a band */
#booth.feat .cam-bar span { color: color-mix(in srgb, var(--b1) 60%, white); }

/* curtain call */
.chap .chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chap .chips span { padding: 8px 14px; font: 700 14px/1 Beaufort; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-hi); background: rgba(0, 0, 0, .35); border: 1px solid rgba(200, 170, 110, .35); }
.chap .lineup { display: flex; justify-content: center; gap: 10px; margin-top: 26px; }
.chap .lineup i { width: 92px; height: 92px; border: 3px solid var(--cc, var(--c1)); background: #111 center 20%/cover; box-shadow: 0 10px 20px rgba(0, 0, 0, .5); }
.overlay.show .chap .lineup i { animation: rise .7s var(--ease) both; }
.overlay.show .chap .lineup i:nth-child(n) { animation-delay: calc(.4s + var(--n, 0) * .06s); }
.chap.curtain h2 em { background: var(--prism); -webkit-background-clip: text; background-clip: text; color: transparent; }
#toast { top: 176px; }
.trow .tag { display: block; width: fit-content; margin: 6px 0 0; vertical-align: 0; }
.trow .tn { white-space: nowrap; }
.trow .tn:has(+ .bp) { line-height: 1; }
.mx-row .ab button { white-space: nowrap; }
#trait-burst::before { content: ""; position: absolute; left: 50%; top: 56%; width: 980px; height: 560px; translate: -50% -50%; background: radial-gradient(closest-side, rgba(5, 4, 18, .88), rgba(5, 4, 18, .6) 55%, transparent); }
#trait-burst .tb-tier { font-size: 24px; text-shadow: 0 2px 8px #000; }

/* =====================================================================
   Polish pass (v0.3): motion, transitions, density
   ===================================================================== */
/* screen wipe: soft edges come from a mask, not a live 30px blur over the whole screen */
#wipe { filter: none; inset: -10% -30%; background: linear-gradient(100deg, transparent 22%, rgba(255, 122, 217, .55) 36%, rgba(177, 140, 255, .7) 44%, rgba(124, 199, 255, .65) 52%, rgba(141, 255, 208, .5) 60%, transparent 76%); will-change: transform, opacity; }

/* standees: 124 wide on a 128 hex, so neighbours never overlap */
.unit .stand { left: -62px; width: 124px; }
.unit .pc, .unit .halo { width: 124px; height: 76px; }
.unit .plate { max-width: 132px; min-width: 104px; padding: 5px 8px 6px; font-size: 14px; letter-spacing: .03em; overflow: hidden; text-overflow: ellipsis; }
.unit .plate small { font-size: 10px; letter-spacing: .16em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ghost-card { width: 124px; height: 76px; }
.unit .shock { border-width: 3px; }
.unit.burst .stand > .in .pc { animation: pcflash .9s var(--ease); }
@keyframes pcflash { 0% { filter: brightness(2.2) saturate(1.3); } 100% { filter: none; } }

/* the show assembles itself: panels in from their sides, shop up from the floor */
#show .panel, #show #shop { transition: opacity .7s var(--ease), transform .9s var(--ease), translate .9s var(--ease); }
#show:not(.ready) #traits { opacity: 0; transform: translateX(-30px); }
#show:not(.ready) #mix { opacity: 0; transform: translateX(30px); }
#show:not(.ready) #shop { opacity: 0; transform: translateY(40px); }
#show.ready #mix { transition-delay: .12s; }
#show.ready #shop { transition-delay: .24s; }
#board-wrap { transition: opacity .9s var(--ease) .1s; }
#show:not(.ready) #board-wrap { opacity: 0; }

/* trait count bumps when it changes */
.trow .cnt.bump { animation: bump .6s var(--spring); }
@keyframes bump { 0% { transform: scale(1.7); color: #fff; } 100% { transform: none; } }

/* idle shop: what's next */
.slot.wait .up { margin-top: 2px; font: 600 15px/1.2 Spiegel; letter-spacing: 0; text-transform: none; color: var(--muted); }
.slot.wait .up b { color: var(--gold-hi); font-weight: 600; }

/* curtain lineup: one by one */
.overlay.show .chap .lineup i { animation-delay: calc(.35s + var(--n, 0) * .07s); }
.chap .lineup i:hover { transform: translateY(-4px); transition: transform .2s; }

/* producer burst: prismatic */
#trait-burst.prod .tb-name { background: var(--prism); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .6)); }
#trait-burst.prod .rays { background: repeating-conic-gradient(from 0deg, rgba(255, 122, 217, .35) 0 5deg, transparent 5deg 12deg, rgba(124, 199, 255, .35) 12deg 17deg, transparent 17deg 24deg); }
#trait-burst .tb-art { position: relative; width: 240px; height: 142px; background: center 25%/cover; border: 3px solid var(--c7); box-shadow: 0 0 40px rgba(255, 106, 213, .6); }

/* buttons press like the client */
.btn { transition: filter .2s, transform .12s var(--ease); }
.btn:active, .bigbtn:active { transform: translateY(2px) scale(.98); }

/* everything that moves, less of it */
@media (prefers-reduced-motion: reduce) {
  #venue .art, #venue .beams i, #top4 .t4-rays, .bigbtn, #hint.show, .mx-row .ab.nudge button, #ph-btn.nudge { animation: none !important; }
  #wipe { display: none; }
}
.cam-bar { overflow: hidden; }
.cam-bar canvas { width: 40px; }
.p-hint { transition: opacity .25s; }
#pick.ready .p-hint { transition: opacity .8s .6s; }
