#scene { position:fixed; inset:0; width:100%; height:100%; }
#labels { position:fixed; inset:0; pointer-events:none; }
#panel-zoom { top:16px; left:16px; width:258px; }
#panel-helix { top:16px; right:16px; width:262px; }
#panel-sequence { bottom:78px; left:16px; width:300px; }
#panel-pair { bottom:78px; right:16px; width:286px; }
#panel-info { left:50%; right:auto; bottom:64px; transform:translateX(-50%); width:360px; }
.panel { touch-action:pan-y; }
.panel p + p { margin-top:8px; }
.panel .small { font-size:10.5px; opacity:.6; }
.panel button { min-width:0; overflow-wrap:break-word; line-height:1.15; font-family:inherit; }

/* Ebenen-Stufen (Zustände der Zoomreise) */
.levels { display:flex; flex-direction:column; gap:3px; }
.levels button { display:grid; grid-template-columns:18px 1fr auto; align-items:center; gap:9px; width:100%; border:0; border-radius:9px; padding:7px 9px; background:transparent; color:inherit; cursor:pointer; font-size:12px; font-weight:600; text-align:left; transition:background .15s; }
.levels button:hover { background:var(--vk-panel-surface); }
.levels button .dot { width:18px; height:18px; display:flex; align-items:center; justify-content:center; opacity:.55; }
.levels button .dot svg { width:16px; height:16px; }
.levels button small { font-size:10.5px; font-weight:600; opacity:.55; font-variant-numeric:tabular-nums; white-space:nowrap; }
body.theme-dark .levels button.active, body.theme-light .levels button.active { background:var(--vk-ui-active-bg); color:var(--vk-ui-active-ink); }
.levels button.active .dot, .levels button.active small { opacity:1; }
.zoom-row { margin-top:10px; }
.zoom-row input { flex:1; min-width:0; }
#level-text { margin-top:10px; }
.toggles { display:flex; flex-wrap:wrap; gap:8px 14px; margin-top:12px; }
.toggles.col { flex-direction:column; gap:7px; margin-top:0; }
.toggles .check { min-height:22px; }

/* Helix */
.slider-row { font-size:11.5px; }
.slider-row + .slider-row { margin-top:9px; }
.slider-row span { width:74px; flex:none; opacity:.78; }
.slider-row input { flex:1; min-width:0; }
.slider-row b { width:62px; flex:none; text-align:right; font-size:11px; font-weight:650; font-variant-numeric:tabular-nums; }
#groove-hint { margin-top:8px; }
.stats { margin-top:12px; }
.panel .stat { font-size:11.5px; }

/* Sequenz */
.seq-input { width:100%; border:0; border-radius:9px; padding:9px 11px; font:600 14px/1.2 'SF Mono', ui-monospace, Menlo, monospace; letter-spacing:.14em; text-transform:uppercase; color:inherit; background:var(--vk-panel-surface); outline:none; }
.seq-input:focus { box-shadow:none; }
body.theme-dark .seq-input:focus { background:rgba(255,255,255,.1); }
body.theme-light .seq-input:focus { background:rgba(15,23,42,.08); }
.warn { min-height:0; margin-top:6px; }
.warn:empty { display:none; }
.seq-view { display:grid; grid-template-columns:16px 1fr 16px; align-items:center; gap:0 4px; margin-top:10px; font:700 12px/1 'SF Mono', ui-monospace, Menlo, monospace; }
.seq-view .end { font-size:10px; opacity:.55; text-align:center; display:flex; flex-direction:column; justify-content:space-between; align-self:stretch; padding:5px 0; }
.seq-view .cols { display:flex; justify-content:space-between; }
.seq-view .col { flex:1; min-width:0; display:flex; flex-direction:column; align-items:center; gap:3px; padding:4px 0; border:0; border-radius:6px; background:transparent; color:inherit; cursor:pointer; font:inherit; }
.seq-view .col:hover { background:var(--vk-panel-surface); }
body.theme-dark .seq-view .col.sel, body.theme-light .seq-view .col.sel { background:var(--vk-ui-active-bg); }
.seq-view .b { width:100%; text-align:center; }
.seq-view .b.pending { opacity:.18; }
.seq-view .hb { display:flex; flex-direction:column; gap:2px; align-items:center; height:14px; justify-content:center; }
.seq-view .hb i { display:block; width:7px; height:1.5px; border-radius:1px; background:currentColor; opacity:.45; }
.btn-row { display:flex; gap:8px; margin-top:12px; }
.btn-row .act { flex:1.6; margin-top:0; }
.btn-row .ghost { flex:1; }

/* Basenpaar */
.chart { display:block; width:100%; border-radius:10px; touch-action:none; }
body.theme-dark .chart, body.theme-light .chart { background:var(--vk-panel-surface); }
#pair-canvas { height:178px; }
.verdict { font-size:11.5px; line-height:1.45; font-weight:600; margin-top:9px; }
.verdict.bad { color:#ef4444; }
body.theme-light .verdict.bad { color:#dc2626; }
.probe { display:grid; grid-template-columns:repeat(3,1fr); gap:3px; padding:3px; border-radius:9px; background:var(--vk-panel-surface); margin-bottom:8px; }
.probe button { border:0; border-radius:7px; padding:6px 4px; background:transparent; color:inherit; cursor:pointer; font:650 11px/1.15 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; opacity:.7; }
.probe button:hover { opacity:1; }
.probe button.bad { opacity:.55; }
body.theme-dark .probe button.active, body.theme-light .probe button.active { background:var(--vk-ui-active-bg); color:var(--vk-ui-active-ink); opacity:1; }

/* Maßstabsleiste (Szenen-Annotation) */
#scalebar { position:fixed; top:16px; left:50%; transform:translateX(-50%); z-index:15; display:flex; align-items:center; gap:12px; padding:7px 13px; border-radius:12px; font:650 11px/1 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; pointer-events:none; white-space:nowrap; backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); }
body.theme-dark #scalebar { background:rgba(10,13,26,.55); color:#e6e8f2; }
body.theme-light #scalebar { background:rgba(255,255,255,.7); color:#1e293b; }
#sb-level { opacity:.6; text-transform:uppercase; letter-spacing:.06em; font-size:10px; }
.sb { display:flex; align-items:center; gap:8px; }
#sb-bar { display:block; height:8px; position:relative; border-bottom:2px solid currentColor; border-left:2px solid currentColor; border-right:2px solid currentColor; border-radius:0 0 2px 2px; transition:width .12s; }
#sb-len { font-variant-numeric:tabular-nums; min-width:44px; }

/* Szenen-Beschriftungen */
.tag { position:absolute; padding:4px 8px; border-radius:7px; font:600 11px/1.2 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; white-space:nowrap; transform:translate(-50%,-50%); }
body.theme-dark .tag { background:rgba(10,13,26,.8); color:#e6e8f2; }
body.theme-light .tag { background:rgba(255,255,255,.9); color:#1e293b; }
.tag::before { content:''; display:inline-block; width:6px; height:6px; border-radius:50%; margin-right:6px; vertical-align:middle; background:var(--dot, currentColor); }
.tag.plain::before { display:none; }
.tag.end { padding:3px 7px; font-size:12px; font-weight:750; }
.tag.small { font-size:10px; padding:3px 6px; }
.tag.sel { font-size:12px; }

@media(max-width:768px) {
  #panel-zoom,#panel-helix,#panel-sequence,#panel-pair,#panel-info { width:auto; max-height:56vh; }
  #scalebar { top:12px; gap:10px; padding:6px 11px; }
  .tag { font-size:10px; padding:3px 6px; }
  .tag.end { font-size:11px; }
}
/* Scrollbalken wie heyprof global — für JEDEN Scroll-Container. */
@supports (-moz-appearance: none) {
  * { scrollbar-width: thin; }
  body.theme-light { scrollbar-color: rgba(0,0,0,0.15) transparent; }
  body.theme-dark  { scrollbar-color: rgba(255,255,255,0.15) transparent; }
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; margin: 10px 0; }
.panel::-webkit-scrollbar-track { margin: 15px 0; }
::-webkit-scrollbar-thumb { border-radius: 4px; }
::-webkit-scrollbar-button { display: none; height: 0; width: 0; }
body.theme-light ::-webkit-scrollbar-thumb { background-color: rgba(0,0,0,0.15); }
body.theme-light ::-webkit-scrollbar-thumb:hover { background-color: rgba(0,0,0,0.30); }
body.theme-dark  ::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,0.15); }
body.theme-dark  ::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,0.30); }
html::-webkit-scrollbar-thumb { background-color: rgba(127,127,160,0.35); }

/* Film, Interagieren: Blick führt der Film, gedreht wird durch Ziehen */
body.buehne-film #view-seg { display: none; }
body.buehne-film #view-seg + .stats { margin-top: 12px; }
