/* Option 1: media / canvas / inspector. Existing control styling remains shared. */
[hidden] { display: none !important; }
body { height: 100dvh; }
.topbar { height: 70px; padding: 14px 24px; background: var(--bg); }
.topbar .brand { display: flex; align-items: center; gap: 10px; font-size: 25px; letter-spacing: -.045em; }
.topbar .brand .mark { color: var(--ink); }
.topbar .preset-switch { flex: 0 1 210px; }
.preset-switch select { width: 100%; background-color: transparent; border-color: transparent; border-radius: 6px; font-size: 13px; }
.preset-switch select:hover { border-color: var(--line-2); }
.workspace { grid-template-columns: 260px minmax(0,1fr) 310px; grid-template-rows: minmax(0,1fr); }
.media-panel { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.workbench-tabs { display: flex; height: 56px; flex-shrink: 0; border-bottom: 1px solid var(--line); padding: 0 16px; gap: 20px; background: var(--surface); }
.workbench-tabs button { font-size: 13px; padding: 0 8px; color: var(--muted); border-bottom: 2px solid transparent; }
.workbench-tabs button[aria-pressed=true] { color: var(--ink); border-color: var(--primary); }
.media-pane, .preset-pane { padding: 20px 14px; overflow-y: auto; min-height: 0; flex: 1; }
.media-pane { display: flex; flex-direction: column; }
.deck-head { margin: 0 4px 14px; }
.deck-lab { font-size: 12px; text-transform: none; letter-spacing: 0; }
.deck-count { font-size: 10px; }
.deck-add { margin: 0 0 20px; min-height: 82px; border-color: var(--line-2); flex: none; font-size: 12px; }
.deck-list { max-height: none; overflow-y: auto; min-height: 90px; flex: 1; gap: 9px; padding: 2px; }
.deck-item { min-height: 76px; background: transparent; border-color: transparent; border-radius: 8px; }
.deck-item:hover { background: var(--surface-2); }
.deck-item.sel { border-color: var(--primary); background: oklch(.84 .09 298 / .06); }
.di-grip { width: 20px; height: 44px; }
.di-thumb { width: 45px; height: 48px; border-radius: 4px; }
.di-select { gap: 10px; padding: 8px 0; }
.di-name { font-size: 11px; }
.di-meta { font-size: 9px; }
.di-check { display: none; }
.di-acts { flex-direction: column; gap: 2px; padding: 0 4px; }
.di-act { width: 24px; height: 24px; }
.deck-hint { margin: 16px 4px 0; font-size: 10px; }
.workspace-note { padding: 16px 18px; border-top: 1px solid var(--line); font-size: 10px; color: var(--faint); line-height: 1.6; }
.preset-pane input { width: 100%; min-height: 38px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 6px; padding: 8px 10px; font-size: 12px; margin-bottom: 16px; }
.library-preset { display: grid; grid-template-columns: 30px 1fr; gap: 2px 10px; width: 100%; text-align: left; padding: 12px 8px; border: 1px solid transparent; border-radius: 6px; font-size: 12px; }
.library-preset:hover { background: var(--surface-2); }
.library-preset[aria-pressed=true] { border-color: var(--primary); background: oklch(.84 .09 298 / .07); }
.preset-glyph { grid-row: span 2; font-size: 25px; color: var(--primary); }
.library-preset small { grid-column: 2; color: var(--faint); font-size: 10px; }
.stage-wrap { padding: 70px 20px 88px; background: radial-gradient(ellipse at 50% 45%, var(--surface-2), var(--bg) 75%); }
.stage-glow { display: none; }
.stage { box-shadow: none; outline: 1px solid var(--line); border-radius: 8px; background: oklch(.16 .004 275); }
.preview-heading { position: absolute; top: 0; left: 0; right: 0; height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.preview-heading > span { font-size: 12px; color: var(--muted); flex: 1; }
.preview-heading select { background: transparent; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 6px; font-size: 12px; }
.preview-heading #orbitReset { width: 32px; height: 32px; border-radius: 6px; }
.stage-hint { top: auto; bottom: 72px; white-space: nowrap; font-family: var(--font-sans); font-size: 10px; text-transform: none; letter-spacing: 0; }
.stage-toolbar { bottom: 18px; border-radius: 9px; padding: 4px 14px; gap: 18px; background: var(--surface); backdrop-filter: none; width: max-content; max-width: calc(100% - 32px); }
.stage-toolbar #replayBtn { font-size: 0; padding: 0; width: 32px; justify-content: center; border: 0; }
.stage-toolbar #playBtn { border-radius: 50%; background: var(--surface-3); width: 36px; height: 36px; }
#previewDeckCount { color: var(--muted); font-size: 11px; border-left: 1px solid var(--line-2); padding-left: 18px; }
#transportLoop { font-size: 12px; color: var(--faint); padding: 6px; }
#transportLoop[aria-pressed=true] { color: var(--primary); }
.panel { background: var(--surface); border-left: 1px solid var(--line); }
.inspector-tabs { position: sticky; top: 0; z-index: 7; gap: 12px; justify-content: space-between; }
.section-group > summary { padding: 20px; }
.section-group > summary .s-lab { font-family: var(--font-sans); font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 500; }
.section-group > summary .s-ico { display: none; }
.section-group > .section-body { padding: 0 20px 24px; gap: 16px; }
.ctrl .lab { font-size: 12px; margin-bottom: 12px; }
.ctrl .lab .val { font-family: var(--font-sans); font-size: 11px; }
.framing { background: none; margin: 0; padding: 20px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.framing-head { margin-bottom: 18px; }
.framing-lab { text-transform: none; letter-spacing: 0; color: var(--ink); font-size: 12px; font-weight: 500; }
.framing-reset { color: var(--muted); font-size: 11px; }
#cropPreview { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: contain; background: var(--bg); border-radius: 6px; margin-bottom: 22px; }
.framing .ctrl { margin-bottom: 20px; }
.field label { font-size: 11px; }
.field input[type=text], .field select, .field textarea { background-color: var(--bg); border-color: var(--line-2); font-size: 12px; }
.seg, .seg button { border-radius: 6px; }
.seg button { font-size: 11px; }
input[type=range] { height: 4px; accent-color: var(--primary); }
input[type=range]:focus-visible { outline: 2px solid var(--primary); outline-offset: 7px; }
.modal { max-height: calc(100dvh - 40px); overflow-y: auto; }
@media (min-width: 1600px) { .workspace { grid-template-columns: 290px minmax(0,1fr) 340px; } .di-thumb { width: 56px; } .di-name { font-size: 12px; } }
@media (max-width: 1100px) and (min-width: 761px) { .workspace { grid-template-columns: 205px minmax(0,1fr) 265px; } .media-pane { padding: 14px 8px; } .di-meta { display: none; } .di-thumb { width: 32px; height: 40px; } .di-select { gap: 6px; } .di-name { font-size: 10px; } .workbench-tabs { gap: 6px; padding-inline: 12px; } .stage-toolbar { gap: 10px; padding-inline: 8px; } #previewDeckCount { padding-left: 10px; } }
@media (max-width: 760px) {
  html, body { height: auto; min-height: 100dvh; overflow-y: auto; }
  body { display: block; }
  .topbar { position: sticky; top: 0; height: 60px; padding: 10px 12px; }
  .topbar .brand { display: flex; font-size: 0; gap: 0; }
  .topbar .brand svg { width: 22px; }
  .topbar .divider-v { display: none; }
  .topbar .left, .topbar .right { gap: 6px; }
  .topbar .btn { padding: 0 12px; height: 36px; font-size: 12px; }
  .topbar .btn svg { width: 14px; }
  .preset-switch select { padding-left: 4px; font-size: 11px; }
  .workspace { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: auto; }
  .stage-wrap { grid-row: 1; height: min(65dvh, 500px); min-height: 360px; }
  .media-panel { grid-row: 2; border-right: 0; border-block: 1px solid var(--line); }
  .media-pane { max-height: 410px; }
  .deck-list { max-height: 240px; flex: auto; }
  .deck-item { min-height: 62px; }
  .di-name { font-size: 12px; }
  .deck-add { min-height: 50px; margin-bottom: 12px; }
  .workspace-note { display: none; }
  .preset-pane { max-height: 400px; }
  .panel { grid-row: 3; max-height: none; overflow: visible; border-left: 0; }
  .inspector-tabs { top: 60px; }
  #cropPreview { max-height: 180px; }
}

/* Account controls need their own row on narrow studio screens. */
@media (max-width:640px) {
  .topbar:has([data-account-link]) { height:auto; flex-wrap:wrap; }
  .topbar:has([data-account-link]) .left { flex-basis:100%; flex-wrap:wrap; }
  .topbar:has([data-account-link]) .right { margin-inline-start:auto; }
  .topbar .membership-menu-panel { right:0; }
}
