
@font-face { font-family: "Bodoni Moda"; font-style: italic; font-weight: 500 700; font-display: swap; src: url("/studio-assets/free/fonts/bodoni-moda-italic.woff2?v=b737328c13b92784") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/studio-assets/free/fonts/schibsted-grotesk.woff2?v=4c8b93f431d462c6") format("woff2"); }
:root {
  /* One dark practice-room stage. A score-title italic names the piece; a plain grotesk runs the controls.
     The two hand colours carry all the meaning, the felt red marks only the strike line and the playhead. */
  --ebony: #13100d;
  --panel: #1a1612;
  --line: #342c24;
  --ivory: #efe7d6;
  --muted: #a99e8e;
  --left: #56b5a6;
  --right: #e2a64e;
  --felt: #b5304a;
  --display: "Bodoni Moda", Didot, "Bodoni MT", Georgia, serif;
  --ui: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { display: flex; flex-direction: column; background: var(--ebony); color: var(--ivory); font: 400 14px/1.45 var(--ui); overflow: hidden; }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ivory); outline-offset: 2px; }

header { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: baseline; min-width: 0; }
.brand h1 { margin: 0; font: italic 700 25px/1 var(--display); letter-spacing: 0.01em; }
.picker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
select { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; max-width: 100%; }
.btn { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 1px solid var(--muted); border-radius: 6px; padding: 7px 12px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: rgba(239, 231, 214, 0.08); border-color: var(--ivory); }
.btn:focus-within { outline: 2px solid var(--ivory); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 316px; }
.left { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.stage-meta { position: absolute; inset: 0 0 auto; z-index: 1; pointer-events: none; }
#stagebox { position: relative; flex: 1; min-height: 0; }
#stage, #stage3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#stage3d { touch-action: pan-y; cursor: grab; }
#stage3d:active { cursor: grabbing; }
#frame-drag { position: absolute; inset: 0; cursor: move; touch-action: none; user-select: none; }
#frame-drag:focus-visible { outline-offset: -3px; }
.checks.frame-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.frame-tools .btn { padding: 4px 9px; font-size: 12px; }
.frame-tools button:disabled { opacity: .45; cursor: default; }
.moving-frame :is(#view-note,#tutorial-hint) { display:none; }
#stagebox.is3d #stage { visibility: hidden; }
#stagebox:not(.is3d) #stage3d { display: none; }
#stagebox.over::after { content: "Drop a MIDI file or piano recording"; position: absolute; inset: 10px; display: grid; place-items: center; border: 2px dashed var(--ivory); border-radius: 10px; background: rgba(19, 16, 13, 0.82); font: italic 500 24px var(--display); }
.titles { position: absolute; left: 18px; top: 12px; right: 190px; pointer-events: none; }
.titles h2 { margin: 0; font: italic 500 27px/1.12 var(--display); text-wrap: balance; }
.titles p { margin: 5px 0 0; color: var(--muted); font-size: 11.5px; letter-spacing: 0.09em; text-transform: uppercase; }
#status { margin-top: 6px; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ivory); }
#status.bad { color: #ffb3bd; }
.legend { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; font-size: 12px; color: var(--muted); pointer-events: none; padding: 8px 10px; border-radius: 6px; background: rgba(19, 16, 13, 0.78); border: 1px solid var(--line); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 10px; height: 10px; border-radius: 3px; }
.dot.l { background: var(--left); } .dot.r { background: var(--right); }

.transport { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--panel); }
#jump-easing { width: 100%; height: 32px; margin: 0; accent-color: var(--ivory); cursor: pointer; }
.round { width: 42px; height: 42px; flex: none; border-radius: 50%; border: 0; background: var(--ivory); color: var(--ebony); display: grid; place-items: center; cursor: pointer; }
.round:hover { background: #fff; }
.round[aria-pressed="true"] .i-play, .round[aria-pressed="false"] .i-pause { display: none; }
.icon { width: 34px; height: 34px; flex: none; border-radius: 6px; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; cursor: pointer; }
.icon:hover { border-color: var(--muted); }
#mute[aria-pressed="true"] .i-on, #mute[aria-pressed="false"] .i-off { display: none; }
#time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; white-space: nowrap; min-width: 86px; }
.scrub { position: relative; flex: 1; min-width: 60px; height: 38px; border: 1px solid var(--line); border-radius: 6px; background: var(--ebony); overflow: hidden; }
.scrub:focus-within { outline: 2px solid var(--ivory); outline-offset: 2px; }
#overview { position: absolute; inset: 0; width: 100%; height: 100%; }
#head { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--felt); box-shadow: 0 0 0 1px rgba(19, 16, 13, 0.6); }
#seek { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }

aside { overflow: auto; border-left: 1px solid var(--line); background: var(--panel); padding: 16px 16px 24px; display: flex; flex-direction: column; }
aside > section { margin-bottom: 20px; }
.settings-heading { margin: 0; font: italic 600 29px/1.15 var(--display); }
#settings-home, #settings-bar { flex: none; }
#settings-home { padding-top: 4px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 6px; margin: 22px 0 20px; }
.settings-tile { --ink: #dfb67d; display: grid; justify-items: center; align-content: start; gap: 9px; padding: 4px 2px 7px; background: transparent; border: 0; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 500; }
.settings-tile[data-page="camera"] { --ink: #a9c7c9; }
.settings-tile[data-page="hands"] { --ink: #e1aa92; }
.settings-tile[data-page="appearance"] { --ink: #a8d8cb; }
.settings-tile[data-page="effects-settings"] { --ink: #d1b5d6; }
.settings-tile[data-page="sound-panel"] { --ink: #d8c789; }
.settings-disc { display: grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; color: var(--ink); border: 1px solid color-mix(in srgb, var(--ink) 40%, var(--line)); background: radial-gradient(ellipse at 35% 22%, color-mix(in srgb, var(--ink) 13%, var(--panel)), var(--ebony)); transition: border-color .15s, background-color .15s; }
.settings-disc svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.settings-tile:is(:hover,:focus-visible) .settings-disc { border-color: var(--ink); background: color-mix(in srgb, var(--ink) 15%, var(--panel)); }
.settings-tile:is(:hover,:focus-visible) .category-name { color: var(--ink); }
.settings-info, #settings-back { display: flex; align-items: center; gap: 9px; min-height: 44px; background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 13px; }
.settings-info { width: 100%; border-top: 1px solid var(--line); padding: 10px 3px; }
.settings-info svg, #settings-back svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.settings-info:hover, #settings-back:hover { color: var(--ivory); }
#settings-bar { position: sticky; top: -16px; z-index: 2; background: var(--panel); border-bottom: 1px solid var(--line); margin: -6px 0 16px; padding: 0 0 14px; }
#settings-back { padding: 0 3px; }
#settings-title { font-size: 25px; }
#settings-title:focus:not(:focus-visible) { outline: none; }
@media (min-width: 901px) {
  #settings-sidebar { scroll-padding-top: 90px; }
}
#stage-backdrop { margin-top: 18px; }
#camera > section, #stage-settings > section { margin-top: 16px; }
#camera > section:first-child, #stage-settings > section:first-child { margin-top: 0; }
@media (max-width: 900px) {
  #settings-home { width: min(100%, 440px); margin-inline: auto; }
  #settings-bar { position: static; }
}
aside h3 { margin: 0 0 8px; font-size: 11.5px; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.note-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.note-nav output { text-align: center; font-weight: 500; }
.note-nav small { display: block; color: var(--muted); font-variant-numeric: tabular-nums; }
.finger-choices { display: grid; grid-template-columns: repeat(5, 1fr) 1.45fr; gap: 4px; }
.finger-choices button { padding: 6px 0; justify-content: center; min-height: 38px; border-color: var(--line); }
.finger-choices button[aria-pressed="true"] { background: var(--ivory); color: var(--ebony); }
#finger-editor button:disabled { opacity: 0.35; cursor: default; }
#finger-editor [hidden] { display: none; }
[hidden], .marble-mode .pianist-only, body:not(.marble-mode) .marble-only, .flat-view .only-3d { display: none !important; }
.settings-group { flex: none; border-top: 1px solid var(--line); }
.settings-group > summary { display: flex; align-items: center; justify-content: space-between; min-height: 46px; cursor: pointer; font-weight: 500; list-style: none; }
.settings-group > summary::-webkit-details-marker { display: none; }
.settings-group > summary::after { content: ''; width: 7px; height: 7px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); margin-right: 4px; }
.settings-group[open] > summary::after { transform: rotate(45deg); }
.settings-content { display: grid; gap: 16px; padding: 4px 0 20px; }
#appearance .settings-content { gap: 10px; }
#appearance-reset { justify-self: start; }
header .performer-switch { grid-auto-columns: auto; background: var(--panel); }
header .performer-switch label { padding-inline: 14px; white-space: nowrap; }
@media (min-width: 901px) {
  :is(.marble-mode,.pianist-framed,.pianist-scenery,.pianist-styled,.flat-screen) .stage-meta { position: static; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px; }
  :is(.marble-mode,.pianist-framed,.pianist-scenery,.pianist-styled,.flat-screen) :is(.titles,.legend) { position: static; }
  :is(.marble-mode,.pianist-framed,.pianist-scenery,.pianist-styled,.flat-screen) .legend { flex-direction: row; gap: 12px; background: transparent; border: 0; }
}
.hand { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: end; padding: 10px 0; border-top: 1px solid var(--line); }
.hand:last-child { border-bottom: 1px solid var(--line); }
.hand .name { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-weight: 500; }
.bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; height: 58px; align-items: end; }
.bars > div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 3px; }
.bars i { display: block; width: 100%; min-height: 2px; border-radius: 2px 2px 0 0; }
.hand.l .bars i { background: var(--left); } .hand.r .bars i { background: var(--right); }
.bars .col { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.bars b { font-weight: 500; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.facts { margin: 0; font-size: 13px; color: var(--muted); }
.facts b { color: var(--ivory); font-weight: 500; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg label { text-align: center; padding: 7px 6px; cursor: pointer; font-size: 13px; color: var(--muted); border-left: 1px solid var(--line); }
.seg label:first-of-type { border-left: 0; }
.seg input:checked + label { background: var(--ivory); color: var(--ebony); font-weight: 500; }
.seg input:focus-visible + label { outline: 2px solid var(--ivory); outline-offset: -4px; }
.seg input:disabled + label { opacity: 0.4; cursor: not-allowed; }
.note { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.note a { color: var(--ivory); }
.slider { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; margin-top: 12px; }
.slider input { width: 100%; accent-color: var(--ivory); margin: 0; }
#piano-sound { width: 100%; min-width: 0; }
:is(#mp4-dialog,#music-dialog,#short-dialog) { color: var(--ivory); background: var(--panel); border: 1px solid var(--muted); border-radius: 10px; padding: 20px; width: min(390px, calc(100% - 24px)); }
:is(#mp4-dialog,#music-dialog,#short-dialog)::backdrop { background: #090705ad; }
:is(#mp4-dialog,#music-dialog,#short-dialog) h2 { font: italic 600 25px var(--display); margin: 0 0 14px; }
#music-dialog [hidden] { display: none; }
#music-dialog .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#music-dialog progress { width: 100%; accent-color: var(--right); }
#music-dialog a { color: var(--ivory); }
#mp4-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; border: 0; padding: 0; }
#mp4-fields label { display: grid; gap: 4px; }
#mp4-fields input, #mp4-fields select { width: 100%; min-width: 0; background: var(--ebony); border: 1px solid var(--line); border-radius: 5px; padding: 7px; }
#mp4-fields label:last-child { grid-column: 1 / -1; }
#mp4-dialog progress { width: 100%; margin-top: 12px; accent-color: var(--right); }
#mp4-dialog .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
#mp4-save { color: var(--ivory); }
#piano-eq { margin-top: 12px; }
#piano-eq summary { cursor: pointer; }
#piano-eq .eq-actions { display: flex; align-items: center; justify-content: space-between; margin: 8px 0; }
#piano-eq .btn { padding: 4px 8px; font-size: 12px; }
#eq-controls { border: 0; margin: 0; padding: 0; min-width: 0; }
#eq-controls:disabled { opacity: .55; }
#eq-controls details { margin-top: 10px; }
#eq-controls summary { color: var(--muted); font-size: 13px; }
#sound-panel [hidden] { display: none !important; }
#sound-panel .seg { margin: 12px 0; }
#sound-panel details > summary { cursor: pointer; }
.sound-peak { margin-top: 12px; display: grid; grid-template-columns: auto 1fr 6ch; align-items: center; gap: 8px; font-size: 12px; }
.sound-peak meter { width: 100%; accent-color: var(--left); }
.sound-peak output { text-align: right; font-variant-numeric: tabular-nums; }
#sound-panel .checks { margin-top: 10px; }
#sound-panel .fine { margin-top: 12px; }
.mix-module { --mix-accent: #a4decd; min-width: 0; margin-top: 8px; padding: 10px; border: 1px solid #454744; border-radius: 8px; background: linear-gradient(155deg,#292d2c,#1d2120 52%,#202322); color: #f0f1ec; box-shadow: inset 0 1px #ffffff0e; }
.mix-space { --mix-accent: #a3cbef; }
.mix-dynamics { --mix-accent: #edc082; }
.mix-effects { --mix-accent: #c8b3ef; }
.mix-module summary { font-size: 13px; }
.mix-heading { font-size: 13px; font-weight: 550; margin: 0; }
.mix-module .slider { margin-top: 0; }
.mix-plot { display: block; width: 100%; max-height: 145px; margin: 8px 0; background: #101615; border: 1px solid #373e3c; border-radius: 4px; color: var(--mix-accent); }
.mix-grid { stroke: #34403d; stroke-width: .7; }
.mix-plot text { fill: #b4c2bc; font: 10px var(--ui); }
.mix-line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mix-fill { fill: currentColor; opacity: .09; }
.mix-guide { fill: none; stroke: #899591; stroke-dasharray: 3 4; stroke-width: 1; }
.mix-point { fill: #14201c; stroke: currentColor; stroke-width: 1.7; }
.mix-bank { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: start; gap: 10px 4px; margin: 10px 0 2px; }
.mix-bank.pair { grid-template-columns: repeat(2,minmax(0,1fr)); }
.mix-bank.master { grid-template-columns: repeat(4,minmax(0,1fr)); }
.mix-control { min-width: 0; display: grid; justify-items: center; align-content: start; text-align: center; gap: 3px; }
.mix-control label { font-size: 11.5px; line-height: 1.25; }
.mix-control output { grid-row: 2; color: var(--mix-accent); font: 600 11px/1.25 ui-monospace,monospace; font-variant-numeric: tabular-nums; }
.mix-control:has(input:disabled) { opacity: .5; }
.mix-hardware { position: relative; display: grid; place-items: center; grid-row: 1; width: 46px; height: 48px; }
.mix-dial { cursor: ns-resize; touch-action: none; user-select: none; }
.mix-dial::before { content: ""; position: absolute; width: 42px; height: 42px; border-radius: 50%; background: conic-gradient(from 225deg,var(--mix-accent) 0 var(--sweep),#56605c var(--sweep) 270deg,transparent 270deg); }
.mix-dial-face { position: relative; width: 34px; height: 34px; border: 1px solid #121615; border-radius: 50%; background: linear-gradient(150deg,#515956,#303533 52%,#1c201e); box-shadow: 0 2px 3px #000b,inset 0 1px #ffffff35; }
.mix-dial-face::after { content: ""; position: absolute; left: calc(50% - 1px); top: 2px; width: 2px; height: 10px; background: #f5faf5; border-radius: 1px; transform-origin: center 14px; transform: rotate(calc(var(--sweep) - 135deg)); }
.mix-hardware input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; touch-action: none; }
.mix-hardware:has(:focus-visible) { outline: 2px solid var(--mix-accent); outline-offset: 1px; border-radius: 4px; }
.mix-fader { cursor: ns-resize; background: repeating-linear-gradient(to top,#7b837c 0 1px,transparent 1px 6px) center / 22px 38px no-repeat; }
.mix-fader::before { content: ""; width: 7px; height: 38px; border-radius: 4px; background: #101211; box-shadow: inset 1px 1px 2px #000,1px 0 #676e68; }
.mix-fader::after { content: ""; position: absolute; top: var(--cap); width: 22px; height: 10px; border: 1px solid #111; border-radius: 2px; background: linear-gradient(#69706b,#333a36 40%,var(--mix-accent) 42% 55%,#444c47 58%,#242825); box-shadow: 0 1px 3px #000b; pointer-events: none; }
.mix-fader input { writing-mode: vertical-lr; direction: rtl; }
@media (forced-colors: active) {
  .mix-hardware input { opacity: 1; position: static; }
  .mix-dial input { writing-mode: vertical-lr; direction: rtl; }
  .mix-hardware::before, .mix-hardware::after, .mix-dial-face { display: none; }
  .mix-plot { color: CanvasText; }
  .mix-plot text { fill: CanvasText; }
}
.slider.with-value { grid-template-columns: auto minmax(0, 1fr) 4ch; }
.slider output { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.tones { display: flex; gap: 10px; margin-top: 10px; }
.tones label { width: 26px; height: 26px; border-radius: 50%; cursor: pointer; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line); }
.tones input:checked + label { box-shadow: 0 0 0 2px var(--ivory); }
.tones input:focus-visible + label { outline: 2px solid var(--ivory); outline-offset: 3px; }
.tones input:disabled + label { opacity: 0.35; cursor: not-allowed; }
.checks { display: grid; gap: 8px; }
.checks label { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.checks input { width: 16px; height: 16px; accent-color: var(--ivory); margin: 0; }
.checks input:disabled, .checks input:disabled + * { opacity: 0.4; }
.particle-preset { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#stagebox { background-position: center; background-size: cover; background-repeat: no-repeat; }
.social-guide { position:absolute; inset:0; pointer-events:none; overflow:hidden; color:#fff; }
.social-rail,.social-caption { position:absolute; display:flex; background:#0b101d65; border:1px dashed #ffffff8c; }
.social-rail { right:0; bottom:var(--guide-foot); width:var(--guide-right); height:43%; flex-direction:column; align-items:center; justify-content:space-evenly; }
.social-rail svg { width:39%; max-width:26px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.social-caption { bottom:0; left:0; right:0; height:var(--guide-foot); padding:0 6%; flex-direction:column; gap:8%; justify-content:center; }
.social-caption i { width:51%; height:5%; background:#fffc; border-radius:4px; }.social-caption i:last-child {width:32%;}
.tutorial-mode :is(#camera-presets,#follow-row,#full-keyboard-row,#pianist-frame-row) { display:none !important; }
.tutorial-mode #view-note,body:not(.tutorial-mode) #tutorial-hint { display:none; }
.tutorial-mode #stage3d { touch-action:none; }
#tutorial-adjustments { margin-top:10px; }
#tutorial-adjustments summary { cursor:pointer; }
#reset-tutorial-camera { margin-top:10px; }
@media (min-width: 901px) {
  .custom-backdrop .titles { width: fit-content; max-width: calc(100% - 210px); padding: 6px 10px; border-radius: 6px; background: rgba(19,16,13,.82); }
}
:is(#appearance,#stage-backdrop) .fields { display: grid; gap: 8px; }
:is(#appearance,#stage-backdrop) .field { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
:is(#appearance,#stage-backdrop) select { width: 61%; }
#stage-preview { display: block; width: 100%; height: 68px; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 10px; background-size: cover; background-position: center; }
#appearance .particle-slider { margin-top: 0; }
#appearance h4 { margin: 15px 0 8px; font-weight: 500; }
#laser-controls { margin: 8px 0; }
#laser-controls summary { cursor: pointer; }
#laser-controls > .fields { margin-top: 8px; }
:is(#appearance,#stage-backdrop) .swatches { display: flex; gap: 10px; flex-wrap: wrap; }
:is(#appearance,#stage-backdrop) .swatches label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
:is(#appearance,#stage-backdrop) input[type=color] { width: 34px; height: 30px; padding: 2px; background: var(--ebony); border: 1px solid var(--line); border-radius: 5px; cursor: pointer; }
:is(#appearance,#stage-backdrop) .image-tools { display: flex; align-items: center; gap: 8px; }
#appearance [hidden] { display: none; }
#image-status { overflow-wrap: anywhere; }
#particle-controls { border: 0; padding: 0; margin: 10px 0 0; min-width: 0; }
.particle-preview { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--ebony); cursor: pointer; }
.particle-preview canvas { width: 100%; height: 94px; display: block; }
.particle-preview span { position: absolute; bottom: 4px; right: 7px; font-size: 11px; color: var(--muted); background: var(--ebony); padding: 1px 4px; border-radius: 3px; }
.particle-preset { margin: 11px 0 5px; }
.particle-preset select { flex: 1; min-width: 0; }
.particle-preset button { padding: 7px 9px; font-size: 12px; }
.particle-slider { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; margin-top: 8px; }
.particle-slider label { font-size: 13px; }
.particle-slider output { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.particle-slider input { grid-column: 1 / -1; width: 100%; margin: 0; height: 20px; accent-color: var(--right); cursor: pointer; }
#particle-controls details { margin-top: 12px; }
#particle-controls summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.how { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 13px; color: var(--muted); }
.how b { color: var(--ivory); font-weight: 500; }

@media (max-width: 900px) {
  html, body { height: auto; }
  body { overflow: visible; min-height: 100%; }
  main { display: block; }
  #stagebox { flex: none; height: clamp(200px, min(62svh, 100svh - 290px), 640px); }
  aside { border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
  .stage-meta { position: static; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
  .titles { position: static; min-width: 0; overflow-wrap: anywhere; }
  .titles h2 { font-size: 21px; }
  .titles p { margin-top: 2px; }
  #status:empty { margin: 0; }
  .legend { position: static; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 3px 12px; padding: 0; border: 0; background: transparent; }
  .legend .dot { order: -1; }
  .transport { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; grid-template-areas: "restart play time speed mute" "timeline timeline timeline timeline timeline"; gap: 6px; padding: 8px; }
  #restart { grid-area: restart; } #play { grid-area: play; } #time { grid-area: time; min-width: 0; text-align: center; }
  #speed { grid-area: speed; height: 44px; } #mute { grid-area: mute; }
  .transport button { width: 44px; height: 44px; }
  #jump-easing { height: 44px; }
  #finger-editor button { min-height: 44px; }
  .scrub { grid-area: timeline; height: 32px; }
}
@media (max-width: 600px) {
  header { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 6px; padding: 5px 10px; }
  .performer-switch { justify-self: end; }
  header .performer-switch label { min-height: 44px; display: grid; place-items: center; }
  .brand h1 { font-size: 21px; }
  .picker { grid-column: 1 / -1; margin: 0; min-width: 0; flex-wrap: nowrap; gap: 6px; }
  #piece { flex: 1; min-width: 0; text-overflow: ellipsis; }
  .picker .btn { flex: none; width: 44px; height: 44px; justify-content: center; padding: 0; }
  .file-caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (max-width: 900px) and (max-height: 500px) {
  body { height: 100svh; }
  header, .stage-meta, .transport, aside { flex: none; }
  header, .stage-meta, .transport { padding-block: 4px; }
  main { display: flex; flex-direction: column; }
  .left { flex: 0 0 100%; min-height: min-content; }
  #stagebox { height: auto; flex: 1 0 140px; }
}
@media (max-width: 420px) {
  #speed { max-width: 66px; padding-inline: 6px; }
  #time { font-size: 12px; }
}
#stage-slot { display: contents; }
.vertical-short #camera-presets, .marble-pov #camera-presets { display: none; }
:is(.vertical-short,.pianist-framed) #stage-slot { display: grid; place-items: center; container-type: size; flex: 1; min-height: 0; background: #0c0a09; }
:is(.vertical-short,.pianist-portrait) #stagebox { width: min(100cqw, 56.25cqh); height: auto; aspect-ratio: 9 / 16; overflow: hidden; }
.pianist-landscape #stagebox { width: min(100cqw, 177.7778cqh); height: auto; aspect-ratio: 16 / 9; overflow: hidden; }
.pianist-scenery #stage-backdrop { display: none; }
#pianist-stage .slider:first-of-type { margin-top: 0; }
#piano-rotation-row { grid-template-columns: auto minmax(0,1fr) 4.5ch auto; gap: 7px; }
#reset-piano-rotation:disabled { opacity: .4; cursor: default; }
#pianist-stage select { justify-self: end; }
#pianist-stage .checks { margin-top: 12px; }
#pianist-stage [hidden] { display: none; }
body:not(.pianist-scenery) #venue-status { display: none; }
.vertical-short #stage3d, .marble-pov #stage3d { cursor: default; }
@media (max-width: 900px) {
  :is(.vertical-short,.pianist-portrait) #stage-slot { flex: none; height: min(78svh, 177.778vw); }
  .pianist-landscape #stage-slot { flex: none; height: min(78svh, 56.25vw); }
}
.project-actions,.short-choices,#look-library { display:grid; gap:8px; }
.project-actions { margin-top:14px; }
.project-actions .btn { justify-content:center; }
#short-open { background:#e8cf99; border-color:#e8cf99; color:#211b14; font-weight:600; }
.short-choices { margin:12px 0 16px; }
.short-choices button { display:grid; gap:3px; padding:12px 16px; text-align:left; background:var(--ebony); border:1px solid var(--line); border-left:3px solid #8ccac0; border-radius:6px; cursor:pointer; }
.short-choices button[value=wuxia] { border-left-color:#dca963; }
.short-choices button[value=cyber] { border-left-color:#cb90e0; }
.short-choices button:hover { border-color:var(--ivory); }
.short-choices small { color:var(--muted); }
#mp4-credits { margin-top:12px; }
#clip-toggle { grid-area:time; width:auto; height:auto; min-height:34px; display:grid; place-items:center; gap:0; padding:1px 5px; color:var(--ivory); background:none; border:1px solid transparent; border-radius:5px; cursor:pointer; }
#clip-toggle:hover,#clip-toggle[aria-expanded=true] { border-color:var(--line); background:var(--ebony); }
#clip-toggle small { font-size:11px; }
#clip-toggle #time { grid-area:auto; }
#clip-tools { display:flex; align-items:center; flex-wrap:wrap; gap:6px; padding:6px 12px; background:var(--panel); border-top:1px solid var(--line); }
#clip-tools .btn { padding:5px 9px; }
#clip-info { color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; }
#clip-preview-back { position:absolute; z-index:4; bottom:8px; left:50%; transform:translateX(-50%); background:var(--panel); }
#mp4-length { margin:8px 0; font-variant-numeric:tabular-nums; }
#mp4-length.bad { color:#ffad96; }
@media(max-width:700px) { #clip-tools .btn,#clip-toggle { min-height:44px; } }
#mp4-attribution,#look-name { width:100%; color:var(--ivory); background:var(--ebony); border:1px solid var(--line); border-radius:5px; padding:7px; }
#mp4-dialog,#short-dialog { max-height:90dvh; overflow:auto; }
#look-library { padding-block:12px; border-top:1px solid var(--line); }
#look-library .btn { justify-self:start; }

.site-brand {color:inherit;text-decoration:none}.studio-membership {color:var(--ivory);text-decoration:none}
