
/* Media surfaces use the same source in both modes. */
.mode-tabs { display:flex; gap:8px; margin:16px 0 0; }
.mode-tabs button { border:1px solid #657284; background:#222a36; color:#f5f4ed; }
.mode-tabs button[aria-pressed="true"] { background:#dff776; color:#141b13; border-color:#dff776; }
#watchIntro { margin:10px 0 0; color:#cbd9e9; }
.watch-controls { border:1px solid #59667a; background:#181f2a; padding:9px; border-radius:8px; margin-top:10px; }
.watch-controls label,.watch-range { display:inline-flex; flex-wrap:wrap; align-items:center; gap:6px; }
.watch-controls select,.watch-controls input { color:#f5f4ed; background:#242e3d; border:1px solid #68768b; border-radius:5px; padding:7px; font:inherit; }
.watch-controls input { width:6ch; }
#watchNote { color:#edc9a7; }
#watchClock { font-variant-numeric:tabular-nums; color:#dce8fa; }
.studio-layout.layout { align-items:start; }
body[data-mode="watch"] .studio-layout { grid-template-columns:minmax(0,1fr) minmax(255px,30%); }
body[data-mode="watch"] .media-stage { grid-area:1/1; }
body[data-mode="watch"] .action-sheet { grid-area:1/2; }
body[data-mode="play"] .action-sheet { grid-column:1/-1; }
body[data-mode="play"] .action-cards { grid-template-columns:repeat(auto-fit,minmax(90px,1fr)); }
body[data-dance="active"] .action-sheet { display:none; }
body[data-mode="watch"] .live-reference { display:none; }
body[data-mode="play"] .studio-layout { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
#playCue { grid-column:1/-1; margin:0; padding:8px 12px; background:#1a2330; border-radius:7px; }
#playCue .cue-stats { display:grid; gap:5px; align-content:start; justify-items:end; flex:none; font-variant-numeric:tabular-nums; }
body[data-mode="play"] .studio-heading h1 { font-size:clamp(27px,4vw,46px); }
#playfield { grid-column:1/-1; }
#playfield .track { height:clamp(235px,34vh,315px); }
#playControls { margin-top:9px; }
#mediaSurface.video {
  display:block; background:#0e151e; padding:8px; min-width:0; min-height:0; aspect-ratio:auto;
}
.action-sheet { padding:12px; min-width:0; border:1px solid #536073; border-radius:10px; background:#181e28; }
.action-sheet-header { display:flex; justify-content:space-between; align-items:baseline; gap:8px; }
.action-sheet-header h2 { margin:0; font-size:1rem; }
#actionSheetCount { flex:none; color:#dff776; font-size:.78rem; }
#actionSheetNote { color:#cbd8e8; margin:5px 0 10px; font-size:.8rem; }
.action-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); padding:0; margin:0; gap:6px; list-style:none; }
.action-cards { max-height:clamp(245px,56vh,510px); overflow:auto; scrollbar-color:#536073 #181e28; }
body[data-mode="play"] .action-cards { max-height:205px; }
.action-card { display:grid; grid-template-columns:1fr auto; width:100%; height:100%; align-content:start; align-items:baseline; gap:2px 4px; padding:6px 7px; border:1px solid #536073; background:#111923; color:#f5f4ed; text-align:left; }
.action-card:hover:not(:disabled),.action-card[aria-current="step"] { border-color:#dff776; background:#212e28; }
.action-card:focus-visible { outline:2px solid #dff776; outline-offset:2px; }
.action-card-position,.action-card-time { color:#c3cfe0; font-size:.73rem; font-weight:600; font-variant-numeric:tabular-nums; }
.action-card-position { color:#dff776; }
.action-card canvas { display:block; grid-column:1/-1; width:100%; max-width:124px; height:52px; margin:auto; object-fit:contain; }
.action-card strong { grid-column:1/-1; font-size:.8rem; line-height:1.2; text-align:center; font-weight:700; }
#mediaSurface #officialStage { width:100%; }
#mediaSurface #officialStage iframe,#mediaSurface #localClip {
  display:block; width:min(100%,var(--source-span,1022px),calc(70vh * var(--source-ratio,1.7778))); height:auto;
  aspect-ratio:var(--source-ratio,1.7778); max-height:70vh; min-height:200px;
  margin:0 auto; border:0; object-fit:contain;
}
body[data-mode="play"] #mediaSurface #officialStage iframe,body[data-mode="play"] #mediaSurface #localClip { max-height:58vh; }
#mediaSurface[data-orientation="portrait"] #officialStage iframe,#mediaSurface[data-orientation="portrait"] #localClip {
  width:min(100%,var(--source-span),calc(65vh * var(--source-ratio))); min-width:min(100%,200px);
}
body[data-mode="play"] #mediaSurface[data-orientation="portrait"] #officialStage iframe,
body[data-mode="play"] #mediaSurface[data-orientation="portrait"] #localClip {
  width:min(100%,var(--source-span),calc(58vh * var(--source-ratio))); min-width:min(100%,200px);
}
#playerStage { min-width:0; }
#playerStage h2,.media-stage h2 { font-size:14px; color:#dae7f6; margin:0 0 7px; }
body[data-mode="watch"] .media-stage h2 { display:none; }
#playerStage .camera-preview {
  margin:0; width:100%; aspect-ratio:16/9; max-height:58vh; min-height:195px;
  border:1px solid #72829a; border-radius:8px; background:#131d29;
}
#playerStage .camera-preview output { right:auto; max-width:calc(100% - 12px); }
#cameraPlaceholder { display:grid; place-items:center; height:100%; padding:16px; text-align:center; }
.camera-guide { position:absolute; inset:7% 21% 9%; border:1px dashed #c4e2ffaa; border-radius:10px; pointer-events:none; }
#playerStage .tracking-summary { font-weight:700; color:#d6e7f8; margin:8px 0 0; }
#playerStage .tracking-summary small { display:block; font-size:.83rem; margin-top:3px; font-weight:500; }
.player-label { display:flex; justify-content:space-between; gap:7px; align-items:baseline; }
.match-feedback { color:#cbd8e8; font-size:.86rem; font-weight:750; }
.match-feedback.matched { color:#dff776; }
.live-reference { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px; margin-top:8px; }
.live-reference > div { min-width:0; padding:6px; }
.live-reference canvas { height:85px; width:auto; max-width:100%; display:block; margin:auto; object-fit:contain; }
.live-reference output,.live-reference span { display:block; text-align:center; font-size:12px; color:#ace4ff; }
.live-reference .next-guide { display:grid; justify-items:center; align-content:center; border:1px solid #5c7792; border-radius:8px; }
.live-reference .next-guide span { color:#dff776; }
#actionDetail { font-size:.86rem; margin:4px 0 0; color:#cbd8e8; }
.watch-controls [hidden],.studio-layout [hidden],#watchControls[hidden],#playControls[hidden],#watchIntro[hidden],#playResult[hidden] { display:none !important; }
.profile-choice { display:inline-flex; gap:6px; align-items:center; }
.profile-choice select { color:#f5f4ed; background:#222a36; border:1px solid #657284; padding:8px; border-radius:5px; font:inherit; }
@media(max-width:800px) {
  body[data-mode="watch"] .studio-layout { grid-template-columns:minmax(0,1fr); }
  body[data-mode="watch"] .action-sheet { grid-area:auto; }
  body[data-mode="watch"] .media-stage { grid-area:auto; }
  .action-cards,body[data-mode="play"] .action-cards { grid-template-columns:repeat(auto-fit,minmax(72px,1fr)); }
  .action-card { padding-inline:4px; }
  .action-card canvas { height:38px; }
}
@media(max-width:720px) {
  body[data-mode="play"] .studio-layout { grid-template-columns:1fr; }
  #mediaSurface #officialStage iframe,#mediaSurface #localClip { max-height:65vh; }
  #playerStage .camera-preview { max-height:54vh; }
}
@media(max-width:540px) {
  .mode-tabs button { flex:1; font-size:.83rem; padding:10px 5px; white-space:nowrap; }
}
@media (max-width:720px) and (orientation:landscape) {
  body[data-mode="play"] .studio-layout { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
}

/* A dark rehearsal room with a single bright control color. */
body {
  --room:#0d0b16;
  --panel:#1a1627;
  --surface:#131020;
  --edge:#3a314b;
  --subtle:#bcb2d0;
  --acid:#e1fa73;
  --lilac:#cfb7ff;
  --rose:#ff9ab4;
  background:radial-gradient(ellipse at 86% 0,#231733 0,transparent 38rem),var(--room);
  color:#f6f1ff;
  min-height:100dvh;
}
main { max-width:1376px; padding:0 clamp(14px,3.5vw,48px) 40px; }
button { background:var(--acid); color:#171325; border-radius:8px; transition:background .16s,border-color .16s; }
button:focus-visible,summary:focus-visible,a:focus-visible,select:focus-visible { outline:2px solid var(--acid); outline-offset:3px; }
button.secondary { background:#231d35; color:#f6f1ff; border:1px solid var(--edge); }
button.secondary:hover:not(:disabled) { background:#342746; border-color:#8e78ab; }
a { color:var(--lilac); }
.studio-bar { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:12px; min-height:68px; border-bottom:1px solid #352943; }
.studio-bar .studio-name { display:flex; align-items:center; gap:4px; color:#f7f2ff; font:800 clamp(13px,1.8vw,22px)/1 Bahnschrift,Arial,sans-serif; letter-spacing:.06em; white-space:nowrap; }
.studio-name::before { content:""; width:15px; height:17px; background:linear-gradient(135deg,var(--acid) 0 40%,transparent 41% 51%,var(--acid) 52% 100%); transform:skewX(-13deg); margin-right:5px; }
.studio-name span { color:var(--acid); }
.studio-bar #clipImport { justify-self:end; font-size:.82rem; padding:8px 12px; white-space:nowrap; }
.studio-bar .mode-tabs { margin:0; padding:3px; gap:4px; border:1px solid var(--edge); border-radius:10px; background:#141020; }
.studio-bar .mode-tabs button { flex:auto; background:transparent; border:0; color:var(--subtle); padding:7px 16px; font-size:.8rem; white-space:nowrap; }
.studio-bar .mode-tabs button span { font:750 .72rem/1 Bahnschrift,Arial,sans-serif; letter-spacing:.08em; margin-right:3px; }
.studio-bar .mode-tabs [aria-pressed="true"] { background:#37294a; color:#f7f1ff; }
.studio-heading { min-height:215px; margin:17px 0 13px; padding:clamp(18px,3.2vw,40px); border-radius:18px; position:relative; isolation:isolate; overflow:hidden; align-items:flex-end; background:linear-gradient(120deg,#231936 15%,#352249 58%,#542d54); }
.studio-heading[data-collection="workout"] { background:linear-gradient(120deg,#29213d 15%,#462340 58%,#6c3450); }
.studio-heading::after { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(90deg,#1c142cee 12%,#24183190 48%,#24183115 82%),linear-gradient(0deg,#150e21d9 0,transparent 66%); pointer-events:none; }
.studio-heading .track-cover { width:70%; height:auto; min-height:100%; position:absolute; top:50%; right:0; transform:translateY(-50%); object-fit:cover; object-position:center; opacity:.75; z-index:-2; mask-image:linear-gradient(90deg,transparent,#000 31%); }
.studio-heading .track-cover[hidden] { display:none; }
.track-heading-copy { min-width:0; }
#songCategory { color:var(--acid); font-size:.84rem; font-weight:800; }
.studio-heading[data-collection="workout"] #songCategory { color:var(--rose); }
.studio-heading h1 { font:800 clamp(38px,7.4vw,92px)/.94 Bahnschrift,"Arial Narrow","Microsoft YaHei",sans-serif; letter-spacing:-.036em; margin:9px 0 12px; overflow-wrap:anywhere; }
.studio-heading .studio-source { color:#e3d9f0; font-size:clamp(.85rem,1.3vw,1rem); }
#watchIntro { margin:0; }
#watchStart { min-height:48px; display:flex; align-items:center; gap:18px; padding-inline:17px; }
#watchStart span { font-size:1.2rem; }
body[data-mode="play"] .studio-heading { min-height:124px; padding-block:19px; }
body[data-mode="play"] .studio-heading h1 { font-size:clamp(31px,5vw,61px); margin:6px 0 9px; }
.music-library { display:flex; flex-wrap:wrap; gap:7px 9px; align-items:center; position:relative; }
.library-picker { flex:1 1 auto; min-width:0; }
.library-picker label { display:flex; align-items:center; gap:8px; font-size:.84rem; color:var(--subtle); }
.music-library select,#playControls select,.watch-controls select,.watch-controls input { max-width:100%; color:#f6f1ff; background:#1d172c; border:1px solid var(--edge); border-radius:8px; font:inherit; padding:8px 10px; }
.music-library select { max-width:min(340px,76vw); }
.music-library details { margin:0; padding:0; border:0; background:none; position:relative; }
.music-library summary { cursor:pointer; font-size:.84rem; color:#f7efff; font-weight:750; border:1px solid var(--edge); border-radius:8px; padding:8px 10px; background:#1c152b; }
.music-library .workout-catalog summary { color:var(--rose); border-color:#57374d; }
.music-library details[open] summary { border-color:#9778ae; }
#workoutCount,#catalogDate { margin-left:4px; color:var(--subtle); font-size:.72rem; font-weight:500; }
.catalog-popover { position:absolute; z-index:8; top:calc(100% + 7px); right:0; width:min(850px,81vw); background:#1d162d; border:1px solid #554369; border-radius:14px; padding:12px; box-shadow:0 15px 34px #040309c7; }
#creatorStage:empty { display:none; }
#creatorStage iframe { display:block; width:min(100%,780px); height:clamp(580px,90vh,820px); margin-inline:auto; border:0; }
body[data-creator-preview] :is(#watchControls,#watchIntro,.action-sheet) { display:none; }
body[data-creator-preview] .studio-layout.layout { grid-template-columns:minmax(0,1fr); grid-template-areas:"reference"; }
#creatorActions { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 8px; }
#creatorActions button { min-height:44px; }
#creatorActions a { display:inline-flex; align-items:center; min-height:44px; padding:6px; }
.catalog-rail { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(168px,1fr); gap:8px; overflow-x:auto; scroll-snap-type:x proximity; }
.catalog-rail .catalog-row { min-width:168px; display:grid; align-content:start; gap:6px; padding:0 0 8px; border:1px solid #453755; border-radius:9px; overflow:hidden; background:#151020; scroll-snap-align:start; }
.catalog-rail .catalog-row[data-selected] { border-color:var(--acid); }
.catalog-row img { width:100%; height:82px; object-fit:cover; object-position:center; }
.catalog-row .catalog-copy { padding:1px 8px; min-width:0; }
.catalog-row strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.88rem; }
.catalog-row small { color:var(--subtle); line-height:1.3; }
.catalog-row .catalog-action { margin:0 8px; justify-self:start; font-size:.76rem; }
.catalog-row a.catalog-action { display:inline-block; padding:7px 8px; border-radius:7px; background:#231d35; border:1px solid var(--edge); text-decoration:none; }
.catalog-row a.catalog-action:hover { border-color:#8e78ab; }
#status { color:var(--subtle); font-size:.81rem; margin:8px 0; }
.watch-controls,#playControls { margin:0; border:0; padding:6px 0; gap:8px; border-top:1px solid #30263f; border-radius:0; background:none; }
.watch-controls button,#playControls button { padding:8px 12px; font-size:.84rem; }
.watch-controls label,#playControls label { font-size:.82rem; }
#watchClock,#songProgress { font-variant-numeric:tabular-nums; color:var(--lilac); }
.studio-layout.layout { margin-top:12px; gap:12px; }
#mediaSurface.video { padding:0; background:#080611; border:1px solid var(--edge); border-radius:15px; }
.action-sheet { border-color:var(--edge); background:linear-gradient(150deg,#211831,#161022 75%); padding:14px; border-radius:15px; }
.action-sheet-header h2 { font-size:1.08rem; }
#actionSheetCount { color:var(--acid); }
#actionSheetNote { color:var(--subtle); }
.action-cards { scrollbar-color:#5b4772 #171023; }
.action-card { background:#191225; border-color:#3b2e4a; min-width:0; }
.action-card:hover:not(:disabled),.action-card[aria-current="step"] { border-color:var(--acid); background:#302943; }
.action-card-position { color:var(--rose); }
.action-card-time { color:#d4c6e7; }
#playCue { border:1px solid #524267; border-radius:14px; padding:11px 14px; background:linear-gradient(100deg,#2b2040,#1a142a 75%); }
#cue { font-size:clamp(1rem,2.5vw,1.5rem); color:#fff4ff; }
#countdown { color:var(--rose); }
#actionDetail { color:var(--subtle); }
#playerStage .camera-preview,.reference-view,.live-reference .next-guide { border-color:var(--edge); background:#191326; }
#playerStage .camera-preview { border-radius:15px; }
#playerStage .camera-preview.avatar { background:radial-gradient(ellipse at 50% 61%,#3d305b,#191226 70%); }
.camera-guide { border-color:#cfb7ffbb; }
.live-reference .next-guide { background:#201a2e; }
#playfield .track { border-color:var(--edge); border-radius:15px; background:repeating-linear-gradient(90deg,#171124 0 32.8%,#423456 32.8% 33.33%); }
#mediaCredit { font-size:.8rem; }
@media(max-width:800px) {
  .music-library details { position:static; }
  .catalog-popover { right:0; left:0; width:auto; top:100%; }
  .studio-heading { min-height:165px; }
  .studio-heading .track-cover { width:82%; }
}
@media(max-width:540px) {
  .studio-bar { grid-template-columns:auto 1fr auto; gap:5px; min-height:57px; }
  .studio-bar .studio-name { gap:2px; font-size:13px; }
  .studio-name::before { width:9px; height:13px; margin-right:2px; }
  .studio-bar .mode-tabs { justify-self:center; }
  .studio-bar .mode-tabs button { font-size:.73rem; padding:6px; }
  .studio-bar .mode-tabs button span { display:none; }
  .studio-bar #clipImport { font-size:.72rem; padding:7px; }
  .studio-heading { margin-top:11px; gap:12px; }
  .studio-heading h1 { font-size:clamp(33px,12vw,51px); }
  #watchStart { min-height:38px; font-size:.87rem; }
  .library-picker { flex-basis:100%; }
  .music-library select { min-width:0; }
}
@media(prefers-reduced-motion:reduce) { button { transition:none; } }

.pose-sequence { min-width:0; background:#140f20; border:1px solid #554369; padding:8px; border-radius:9px; }
.action-sheet .pose-sequence { margin:7px 0 10px; }
.pose-sequence p { margin:0 0 5px; color:#e7d8ff; font-size:.78rem; font-weight:750; }
.pose-sequence-frames { display:grid; grid-template-columns:repeat(auto-fit,minmax(58px,1fr)); gap:4px; }
.pose-sequence figure { margin:0; min-width:0; background:#20182d; border-radius:6px; overflow:hidden; }
.pose-sequence canvas { width:100%; height:auto; max-height:82px; object-fit:contain; display:block; }
.pose-sequence figcaption { padding:3px 2px; color:#e0f396; text-align:center; font:600 .66rem/1.25 system-ui,sans-serif; font-variant-numeric:tabular-nums; }
.phase-replay { display:block; width:100%; padding:0; border-radius:4px; background:transparent; }
.phase-replay:hover { background:#382747; }
#liveBreakdown { flex:0 1 300px; }
#liveBreakdown canvas { max-height:62px; }
body:not([data-dance="active"]) #liveBreakdown { display:none; }
@media(max-width:800px) {
  #playCue { flex-wrap:wrap; }
  #liveBreakdown { flex:1 0 100%; order:4; }
}

#danceScore { color:#e1fa73; font-size:.8rem; }
#danceScore b { font-size:clamp(1.35rem,3.2vw,2.15rem); line-height:1; }
#playfield #track[data-motion="dance"] { height:auto; padding:42px 10px 10px; background:#171124; }
#track[data-motion="dance"] :is(.rails,.line,.target,#gates,#runner) { display:none; }
#track[data-motion="dance"] #feedback { top:7px; left:13px; font-size:clamp(.95rem,2.2vw,1.3rem); }
#danceSequence { position:relative; z-index:2; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
#danceSequence:has(#previousDance:not([hidden])) { grid-template-columns:repeat(3,minmax(0,1fr)); }
#previousDance { order:-1; }
.dance-card { min-width:0; display:grid; grid-template-columns:minmax(42px,88px) minmax(0,1fr); align-items:center; gap:8px; padding:6px 9px; background:#241b34f2; border:1px solid #503e66; border-radius:9px; }
.dance-card canvas { width:100%; height:auto; display:block; }
.dance-card small { display:block; color:#d0bce9; font-size:.71rem; }
.dance-card strong { display:block; color:#fbf6ff; font-size:.94rem; overflow-wrap:anywhere; }
#danceTiming { display:block; width:min(100%,165px); height:5px; margin-top:8px; accent-color:#e1fa73; }
#track[data-timing="now"] #currentDance { border-color:#e1fa73; }
#track[data-timing="now"] #currentDance small { color:#e1fa73; }
@media(max-width:540px) {
  .dance-card { grid-template-columns:minmax(33px,52px) minmax(0,1fr); padding-inline:5px; gap:4px; }
  .dance-card strong { font-size:.8rem; }
}

.studio-actions { display:flex; justify-self:end; align-items:center; gap:6px; }
.studio-actions button { min-height:44px; min-width:44px; padding:7px 10px; font-size:.81rem; white-space:nowrap; }
.studio-bar .mode-tabs button,.watch-controls button,.watch-controls select,#playControls button,#playControls select { min-height:44px; }
.studio-bar .mode-tabs button { min-width:44px; }

body[data-mode="play"] {
  --stage-panel-height:clamp(222px,39vh,500px);
}
@supports (height:1dvh) {
  body[data-mode="play"] { --stage-panel-height:clamp(222px,39dvh,500px); }
}
body[data-mode="play"] main { padding-inline:clamp(14px,2.2vw,30px); }
body[data-mode="play"] .studio-heading {
  min-height:0; margin:8px 0; padding:0; border-radius:0; background:none;
}
body[data-mode="play"] .studio-heading::after,body[data-mode="play"] .studio-heading .track-cover { display:none; }
body[data-mode="play"] .track-heading-copy { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; }
body[data-mode="play"] .studio-heading h1 { font-size:clamp(21px,3vw,34px); line-height:1.12; margin:0; }
body[data-mode="play"] .studio-source { margin:0; color:var(--subtle); }
body[data-mode="play"] #songCategory { display:none; }
body[data-mode="play"] .studio-layout.layout {
  grid-template-columns:minmax(0,3fr) minmax(0,2fr);
  grid-template-areas:"reference player" "cue cue" "sequence sequence" "sheet sheet";
  margin-top:7px; gap:8px 12px;
}
body[data-mode="play"] .media-stage { grid-area:reference; min-width:0; }
body[data-mode="play"] #playerStage { grid-area:player; }
body[data-mode="play"] #playCue { grid-area:cue; }
body[data-mode="play"] #playfield { grid-area:sequence; }
body[data-mode="play"] .action-sheet { grid-area:sheet; }
body[data-mode="play"] #mediaSurface.video,
body[data-mode="play"] #playerStage #cameraPreview {
  height:var(--stage-panel-height); max-height:none; min-height:0; aspect-ratio:auto;
}
body[data-mode="play"] #mediaSurface #officialStage { height:100%; }
body[data-mode="play"] #mediaSurface[data-orientation] :is(#localClip,#officialStage iframe) {
  width:100%; min-width:0; height:100%; min-height:0; max-height:none; aspect-ratio:auto; object-fit:contain;
}
body[data-mode="play"] .media-stage h2,body[data-mode="play"] .player-label {
  min-height:22px; margin:0 0 4px; align-items:center;
}
#playerStage .player-label h2 { margin:0; }
#playerStage > label { display:inline-flex; min-height:30px; align-items:center; gap:7px; font-size:.8rem; color:var(--subtle); }
#playerStage > label input { accent-color:var(--acid); }
#cameraPreview:not(.avatar) #skeleton { opacity:.61; }
#playerStage .camera-preview.avatar { background:radial-gradient(ellipse at 50% 46%,#2d263b,#171422 74%); }
body[data-mode="play"] .live-reference,body[data-mode="play"] #liveBreakdown,
body[data-mode="play"][data-dance="active"] :is(#mediaCredit,.tracking-summary,.music-library) { display:none; }
body[data-mode="play"][data-dance="active"] .studio-bar { min-height:54px; }
body[data-mode="play"][data-dance="active"] #playControls :is(label,#start) { display:none; }
#playerStage #motionScoreDetails { display:none; }
body[data-mode="play"] #mediaCredit { margin:5px 0 0; }
body[data-mode="play"] #status { margin:3px 0; }
body[data-mode="play"] #playControls { margin:0; padding:4px 0; }
body[data-mode="play"] #playCue { align-items:center; gap:12px; margin:0; padding:6px 10px; background:#1a1726; }
body[data-mode="play"] #playCue .cue-stats { display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:end; }
body[data-mode="play"] #cue { font-size:clamp(16px,2.1vw,23px); }
body[data-mode="play"] #actionDetail { font-size:.81rem; margin-top:2px; }
body[data-mode="play"] #playfield #track[data-motion="dance"] { padding:8px; }
#track[data-motion="dance"] #feedback {
  top:auto; left:auto; right:auto; position:relative; z-index:2; min-height:0; padding:0; margin-top:0;
  font-size:.86rem;
}
#track[data-motion="dance"] #feedback:not(:empty) { margin:5px 4px 0; }
#danceSequence { grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); }
#danceSequence:has(#previousDance:not([hidden])) { grid-template-columns:minmax(0,.7fr) minmax(0,1.7fr) minmax(0,1fr); }
.dance-card { grid-template-columns:minmax(38px,78px) minmax(0,1fr); min-height:76px; }
#currentDance {
  grid-template-columns:minmax(82px,175px) minmax(0,1fr); padding:3px 11px;
  border-color:#707c48; background:#262b26;
}
#currentDance canvas { height:clamp(88px,17vh,152px); height:clamp(88px,17dvh,152px); width:100%; object-fit:contain; }
#currentDance small { color:#e1fa73; }
#currentDance strong { font-size:clamp(1rem,2.4vw,1.46rem); }
#motionSignal,#upcomingBeat,#previousDanceResult { display:block; font-size:.79rem; margin-top:3px; color:#e1fa73; font-variant-numeric:tabular-nums; }
#upcomingBeat { color:var(--subtle); }
#track[data-timing="now"] #currentDance { border-color:#e1fa73; background:#323b2a; }
#danceTiming { height:6px; width:min(100%,220px); }
html[data-focused] body[data-mode="play"] :is(.studio-heading,.music-library) { display:none; }
html[data-focused] body[data-mode="watch"] :is(.studio-heading,.music-library) { display:none; }
@media (orientation:portrait) and (max-width:820px) {
  body[data-mode="play"] .studio-layout.layout { grid-template-columns:minmax(0,1fr); grid-template-areas:"reference" "player" "cue" "sequence" "sheet"; }
}
@media(max-width:540px) {
  .studio-actions { gap:3px; }
  .studio-bar .studio-actions button { font-size:.72rem; padding-inline:5px; }
  #danceSequence:has(#previousDance:not([hidden])) { grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); }
  #previousDance { display:none; }
  #currentDance { grid-template-columns:minmax(45px,84px) minmax(0,1fr); padding-inline:4px; }
  .dance-card { grid-template-columns:minmax(26px,48px) minmax(0,1fr); }
  #motionSignal,#upcomingBeat { font-size:.7rem; }
}

body[data-bilibili] :is(#watchControls,#watchIntro) { display:none; }
#biliStage:empty { display:none; }
#mediaSurface #biliStage iframe { display:block; width:100%; height:clamp(280px,61vh,580px); border:0; }
#danceReward { position:absolute; z-index:3; top:10px; left:10px; padding:7px 12px; border-radius:8px; background:#dcfc66; color:#162206; font-size:clamp(17px,2.6vw,30px); font-weight:900; pointer-events:none; }
#slowFigure { margin:8px 0; text-align:center; background:#151321; border-radius:8px; }
#slowFigure canvas { display:block; width:100%; max-height:190px; object-fit:contain; filter:grayscale(1) brightness(1.18); }
#slowFigure figcaption { font-size:.78rem; color:var(--subtle); padding-bottom:7px; }
body[data-mode="play"] #slowFigure { display:none; }
#biliActions[hidden] { display:none; }
#biliActions button { min-height:44px; }
