/* LMG TECH · gemeinsames Layout der Blender → Three.js-Modelle.
   Projektfarben stehen als --accent/--accent-rgb im <style> von index.html. */
:root {
  --ink: #050d16;
  --panel: rgba(7, 17, 30, 0.74);
  --panel-solid: #0a1828;
  --line: rgba(160, 200, 235, 0.16);
  --line-strong: rgba(160, 200, 235, 0.32);
  --text: #e8f0f8;
  --muted: #90a6bd;
  --faint: #5e7690;
  --accent-rgb: 243, 154, 46;
  --accent: rgb(var(--accent-rgb));
  --accent-soft: rgba(var(--accent-rgb), 0.16);
  --accent-ink: #07111d;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --gutter: 20px;
  --radius: 14px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --ctrl-h: 64px;
  --bottom: calc(var(--gutter) + var(--sab));
  --above: calc(var(--bottom) + var(--ctrl-h) + 12px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--text); font-family: var(--sans); overflow: hidden; overscroll-behavior: none; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }

#app { position: fixed; inset: 0; height: 100dvh; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
#dip { position: absolute; inset: 0; background: var(--ink); opacity: 0; pointer-events: none; }

.vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 55% 45%, transparent 55%, rgba(1, 5, 11, 0.72) 100%);
}
.grain {
  position: absolute; inset: -50%; pointer-events: none; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 33%{transform:translate(-3%,2%)} 66%{transform:translate(2%,-3%)} 100%{transform:translate(0,0)} }

/* ---------- brand ---------- */
.brand {
  position: absolute; top: calc(var(--gutter) + var(--sat)); left: calc(var(--gutter) + var(--sal));
  display: flex; gap: 16px; align-items: center; pointer-events: none;
  animation: rise .9s cubic-bezier(.2,.8,.2,1) both .1s;
}
.brand .logo { pointer-events: auto; display: block; flex: none; width: 72px; height: 72px; border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.08); transition: transform .3s; }
.brand .logo:hover { transform: rotate(-4deg) scale(1.04); }
.brand .logo img { width: 100%; height: 100%; display: block; border-radius: inherit; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.brand h1 { font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1; margin: 4px 0 5px; letter-spacing: -0.01em; font-variation-settings: "opsz" 144; }
.brand h1 em { font-style: italic; font-weight: 400; color: var(--accent); }
.brand p { margin: 0; color: var(--muted); font-size: 13px; }

/* ---------- tally (pill, top centre) ---------- */
.tally {
  position: absolute; top: calc(var(--gutter) + var(--sat)); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; padding: 7px 14px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap;
  animation: rise-c .9s cubic-bezier(.2,.8,.2,1) both .3s;
}
.tally .t { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.tally .t i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.tally b { font-weight: 500; font-variant-numeric: tabular-nums; }
.t-lbl { text-transform: uppercase; letter-spacing: .12em; font-size: 10px; color: var(--faint); }

/* ---------- parts index ---------- */
.index {
  position: absolute; left: calc(var(--gutter) + var(--sal)); top: calc(118px + var(--sat)); width: 236px;
  background: var(--panel); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  animation: rise .9s cubic-bezier(.2,.8,.2,1) both .25s;
}
.index-toggle { width: 100%; display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 12px 14px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.index-toggle .count { color: var(--faint); margin-right: auto; }
.index-toggle svg { transition: transform .25s; }
.index.collapsed .index-toggle svg { transform: rotate(-90deg); }
.index ol { list-style: none; margin: 0; padding: 0 6px 8px; max-height: calc(100dvh - 420px); overflow: auto; scrollbar-width: thin; }
.index.collapsed ol { display: none; }
.index li.grp { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); padding: 8px 10px 3px; }
.index li button {
  width: 100%; display: grid; grid-template-columns: 22px 10px 1fr; gap: 8px; align-items: center; text-align: left;
  background: none; border: 0; border-radius: 9px; padding: 6px 8px; font-size: 13.5px; color: var(--text); transition: background .15s, color .15s;
}
.index li button:hover { background: rgba(255,255,255,.05); }
.index li button.active { background: var(--accent-soft); }
.index li .n { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.index li .dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.06); }

/* ---------- hotspots ---------- */
#hotspots { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hs {
  position: absolute; left: 0; top: 0; pointer-events: auto; display: flex; align-items: center; gap: 8px;
  background: none; border: 0; padding: 0; transform-origin: 0 0; will-change: transform; transition: opacity .25s, visibility .25s;
}
.hs .ring {
  position: relative; flex: none; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--mono); font-size: 11px; font-weight: 500;
  color: #07111d; background: var(--c, var(--accent)); box-shadow: 0 0 0 3px rgba(4,10,20,.55), 0 6px 18px rgba(0,0,0,.4);
  transition: transform .2s;
}
.hs .ring::before { content: ''; position: absolute; inset: -9px; border-radius: 50%; }
.hs .ring::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 1.5px solid var(--c, var(--accent));
  opacity: 0; animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(.7); opacity: .8 } 100% { transform: scale(1.7); opacity: 0 } }
.hs .lbl {
  margin-top: -13px; white-space: nowrap; font-size: 12.5px; font-weight: 500; letter-spacing: .01em;
  padding: 4px 9px; border-radius: 999px; background: rgba(5, 13, 24, .8); border: 1px solid var(--line);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: opacity .2s, transform .2s;
}
.hide-labels .hs .lbl { opacity: 0; transform: translateX(-4px); pointer-events: none; }
.hide-labels .hs:hover .lbl, .hide-labels .hs.active .lbl { opacity: 1; transform: none; }
.hs:hover .ring, .hs.active .ring { transform: scale(1.15); }
.hs.active .lbl { border-color: var(--c); color: #fff; }
.hs.nolabel .lbl { opacity: 0; transform: translateX(-4px); pointer-events: none; }
.hs.nolabel:hover .lbl { opacity: 1; transform: none; }
.hs.occluded { opacity: .3; }
.hs.occluded .ring::after { animation: none; }
.hs.occluded .lbl { opacity: 0; }
.hs.occluded:hover .lbl, .hs.occluded.active .lbl { opacity: 1; }
.hs.gone { opacity: 0; visibility: hidden; pointer-events: none; }

#hoverTip {
  position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0; transition: opacity .15s;
  font-size: 12px; font-family: var(--mono); letter-spacing: .04em; padding: 4px 8px; border-radius: 6px;
  background: rgba(5,13,24,.88); border: 1px solid var(--line-strong); color: var(--text); white-space: nowrap; z-index: 8;
}
#hoverTip.on { opacity: 1; }

/* ---------- info panel ---------- */
.info {
  position: absolute; right: calc(var(--gutter) + var(--sar)); top: calc(70px + var(--sat)); width: 360px;
  max-height: calc(100dvh - 70px - var(--sat) - 330px); min-height: 0; overflow: auto; overscroll-behavior: contain;
  background: var(--panel); backdrop-filter: blur(18px) saturate(1.25); -webkit-backdrop-filter: blur(18px) saturate(1.25);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px 18px;
  transform: translateX(24px); opacity: 0; pointer-events: none; transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .35s;
  scrollbar-width: thin; z-index: 5;
}
.info.open { transform: none; opacity: 1; pointer-events: auto; }
.info::before { content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c, var(--accent)); }
.info .grab { display: none; }
.info .close { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.07); font-size: 19px; line-height: 1; color: var(--muted); }
.info .close:hover { background: rgba(255,255,255,.13); color: #fff; }
.info-kicker { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-right: 36px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--accent)); }
.info h2 { font-family: var(--serif); font-weight: 600; font-size: 29px; line-height: 1.08; margin: 8px 0 10px; letter-spacing: -.01em; font-variation-settings: "opsz" 144; }
.info p { margin: 0 0 14px; font-size: 14.5px; line-height: 1.6; color: #c9d7e6; }
.live { font-family: var(--mono); font-size: 12px; line-height: 1.65; color: var(--text); background: rgba(255,255,255,.04); border: 1px dashed var(--line-strong); border-radius: 10px; padding: 8px 10px; margin: 0 0 12px; }
.live b { color: var(--c, var(--accent)); font-weight: 500; }
.info dl { margin: 0 0 16px; display: grid; grid-template-columns: auto 1fr; border-top: 1px solid var(--line); }
.info dt, .info dd { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.info dt { color: var(--muted); padding-right: 14px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .02em; }
.info dd { margin: 0; text-align: right; }
.info-actions { display: flex; gap: 8px; }
.btn { border: 1px solid var(--c, var(--accent)); background: var(--c, var(--accent)); color: #07111d; font-weight: 600; font-size: 13px; padding: 8px 14px; border-radius: 999px; transition: filter .15s, transform .15s; }
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-strong); font-weight: 500; min-width: 40px; }
.info-actions .btn:first-child { margin-right: auto; }

/* ---------- readouts ---------- */
.readout {
  position: absolute; right: calc(var(--gutter) + var(--sar) + 64px); bottom: calc(var(--above) + 4px); display: grid; grid-template-columns: auto auto; gap: 3px 14px;
  font-family: var(--mono); font-size: 11.5px; padding: 10px 12px; border-left: 1px solid var(--line-strong);
  animation: rise .9s cubic-bezier(.2,.8,.2,1) both .4s;
}
.readout > div { display: contents; }
.readout .k { color: var(--faint); text-transform: uppercase; letter-spacing: .1em; font-size: 10px; align-self: center; }
.readout .v { color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- zoom ---------- */
.zoom {
  position: absolute; right: calc(var(--gutter) + var(--sar)); bottom: calc(var(--above) + 4px); width: 44px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 0; background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  animation: rise .9s cubic-bezier(.2,.8,.2,1) both .45s;
}
.zoom button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.07); font-size: 18px; line-height: 1; }
.zoom button:hover { background: rgba(255,255,255,.15); }
.zoom input[type=range] {
  writing-mode: vertical-lr; direction: rtl; appearance: none; -webkit-appearance: none; width: 4px; height: 150px;
  background: linear-gradient(to top, var(--line-strong), var(--accent)); border-radius: 4px; margin: 6px 0;
}
.zoom input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.zoom input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }

/* ---------- scale bar ---------- */
.scalebar { position: absolute; right: calc(var(--gutter) + var(--sar) + 70px); bottom: calc(var(--above) + 118px); display: flex; flex-direction: column; align-items: flex-end; gap: 5px; pointer-events: none; }
.scalebar .bar { height: 6px; border: 1.5px solid var(--text); border-top: 0; width: 100px; transition: width .2s; }
.scalebar span { font-family: var(--mono); font-size: 12px; color: var(--text); }

/* ---------- phase caption ---------- */
.phase {
  position: absolute; left: calc(var(--gutter) + var(--sal)); bottom: var(--above); width: min(440px, calc(100vw - 2 * var(--gutter)));
  padding: 13px 16px 14px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: rise .9s cubic-bezier(.2,.8,.2,1) both .35s;
}
.phase-top { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.phase-no { color: var(--accent); font-size: 12px; }
.phase-nav { margin-left: auto; display: flex; gap: 4px; }
.phase-nav button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font-size: 17px; line-height: 1; padding: 0 0 2px; }
.phase-nav button:hover { border-color: var(--accent); color: #fff; }
.phase h3 { font-family: var(--serif); font-weight: 600; font-size: 22px; margin: 4px 0 4px; letter-spacing: -.005em; }
.phase h3.swap { animation: swap .45s cubic-bezier(.2,.8,.2,1); }
@keyframes swap { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }
.phase p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.55; color: #c4d3e3; min-height: 3.1em; }
.phase-track { display: flex; gap: 3px; height: 4px; }
.phase-track i { position: relative; flex: var(--w) 0 0; background: rgba(255,255,255,.1); border-radius: 2px; overflow: hidden; }
.phase-track i b { position: absolute; inset: 0; width: var(--p, 0%); background: var(--accent); }

/* ---------- controls ---------- */
.controls {
  position: absolute; left: calc(var(--gutter) + var(--sal)); right: calc(var(--gutter) + var(--sar)); bottom: var(--bottom); height: var(--ctrl-h);
  display: flex; align-items: center; gap: 14px; padding: 0 12px 0 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  animation: rise .9s cubic-bezier(.2,.8,.2,1) both .5s; z-index: 6;
}
.play { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--accent); display: grid; place-items: center; box-shadow: 0 6px 20px rgba(var(--accent-rgb),.35); transition: transform .15s; }
.play:hover { transform: scale(1.06); }
.play svg { width: 20px; height: 20px; fill: var(--accent-ink); }
.play .i-play { display: none; }
.play.paused .i-play { display: block; }
.play.paused .i-pause { display: none; }
.timeline { position: relative; flex: 1; min-width: 0; height: 34px; display: flex; align-items: center; }
.timeline input { position: relative; z-index: 2; width: 100%; appearance: none; -webkit-appearance: none; background: transparent; height: 34px; margin: 0; }
.timeline input::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--accent) var(--p, 0%), rgba(255,255,255,.14) var(--p, 0%)); }
.timeline input::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255,255,255,.14); }
.timeline input::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--accent); }
.timeline input::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(var(--accent-rgb),.35); }
.timeline input::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: #fff; }
.ticks { position: absolute; left: 8px; right: 8px; top: 0; bottom: 0; pointer-events: none; }
.ticks i { position: absolute; top: 22px; width: 1px; height: 6px; background: var(--line-strong); }
.ticks span { position: absolute; top: 1px; transform: translateX(-50%); font-family: var(--mono); font-size: 9px; color: var(--faint); }
.opts { display: flex; align-items: center; gap: 8px; }
.opts-btn { display: none; flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--text); place-items: center; }
.controls.opts-open .opts-btn { background: var(--accent-soft); border-color: var(--accent); }
.sel { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sel select { background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; font-family: var(--mono); font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--text); }
.sel select option { background: var(--panel-solid); }
.chip { flex: none; border: 1px solid var(--line-strong); background: transparent; border-radius: 999px; padding: 7px 13px; font-size: 12.5px; color: var(--muted); transition: all .15s; white-space: nowrap; }
.chip:hover { color: var(--text); border-color: var(--text); }
.chip.on { background: var(--accent-soft); border-color: rgba(var(--accent-rgb),.6); color: #fff; }
.chip.cycle { color: var(--text); }
.chip.cycle b { font-weight: 600; color: var(--accent); }

/* ---------- loader ---------- */
#loader { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(60% 60% at 50% 50%, #0d1d33, var(--ink)); z-index: 20; transition: opacity .8s; }
#loader.done { opacity: 0; pointer-events: none; }
.loader-inner { display: grid; justify-items: center; gap: 12px; }
.loader-inner img { border-radius: 16px; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) } }
.loader-title { font-family: var(--serif); font-size: 22px; font-style: italic; }
.loader-bar { width: 220px; height: 3px; background: rgba(255,255,255,.1); border-radius: 3px; overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.loader-pct { font-family: var(--mono); font-size: 11px; color: var(--muted); }

@keyframes rise { from { opacity: 0; transform: translateY(12px) } to { opacity: 1; transform: none } }
@keyframes rise-c { from { opacity: 0; transform: translate(-50%, 12px) } to { opacity: 1; transform: translateX(-50%) } }

/* =========================================================
   responsive
   ========================================================= */
@media (max-width: 1180px) {
  .readout { display: none; }
  .scalebar { bottom: calc(var(--above) + 6px); right: calc(var(--gutter) + var(--sar) + 64px); }
  .opts-btn { display: grid; }
  .opts {
    position: absolute; right: 0; bottom: calc(100% + 10px); width: min(340px, calc(100vw - 2 * var(--gutter)));
    flex-wrap: wrap; gap: 8px; padding: 14px; border-radius: 18px;
    background: var(--panel-solid); border: 1px solid var(--line-strong); box-shadow: 0 18px 50px rgba(0,0,0,.5);
    opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s, transform .25s cubic-bezier(.2,.8,.2,1);
  }
  .controls.opts-open .opts { opacity: 1; transform: none; pointer-events: auto; }
  .opts .sel { width: 100%; justify-content: space-between; padding-bottom: 6px; }
  .opts .chip { flex: 1 1 calc(50% - 4px); padding: 10px 12px; font-size: 13px; text-align: center; }
  .opts .chip.wide { flex-basis: 100%; }
}

@media (max-width: 820px) {
  :root { --gutter: 12px; --ctrl-h: 58px; }
  .brand { gap: 10px; }
  .brand .logo { width: 44px; height: 44px; border-radius: 12px; }
  .eyebrow { display: none; }
  .brand h1 { font-size: 22px; margin: 0 0 4px; }
  .brand p { font-size: 10.5px; font-family: var(--mono); }

  .tally { left: calc(var(--gutter) + var(--sal)); right: auto; top: calc(var(--gutter) + var(--sat) + 56px); transform: none;
    padding: 5px 11px; gap: 10px; font-size: 11.5px; animation-name: rise; }

  .index { left: auto; right: calc(var(--gutter) + var(--sar)); top: calc(var(--gutter) + var(--sat) + 4px); width: min(300px, calc(100vw - 2 * var(--gutter))); z-index: 7; }
  .index.collapsed { width: auto; }
  .index-toggle { letter-spacing: .1em; }
  .index.collapsed .index-toggle { padding: 10px 12px; }
  .index.collapsed .index-toggle .count { display: none; }
  .index ol { max-height: min(60dvh, calc(100dvh - 240px)); }
  .index li button { padding: 9px 8px; font-size: 14.5px; }

  .scalebar { right: calc(var(--gutter) + var(--sar) + 2px); bottom: auto; top: calc(var(--gutter) + var(--sat) + 100px); }
  .scalebar span { font-size: 11px; }

  .zoom { bottom: auto; top: 50%; transform: translateY(-50%); width: 42px; gap: 6px; padding: 6px 0; animation: none; }
  .zoom input[type=range] { display: none; }
  .zoom button { width: 32px; height: 32px; }

  .phase { left: var(--gutter); right: var(--gutter); width: auto; padding: 10px 12px 11px 14px; cursor: pointer; }
  .phase h3 { font-size: 18px; margin: 3px 0 3px; }
  .phase p { font-size: 13px; line-height: 1.45; min-height: 0; margin-bottom: 9px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .phase.expanded p { -webkit-line-clamp: unset; display: block; }
  .phase-nav button { width: 34px; height: 34px; font-size: 19px; }
  body.info-open .phase { opacity: 0; pointer-events: none; }

  .controls { gap: 8px; padding: 0 7px; }
  .play { width: 44px; height: 44px; }
  .ticks span { display: none; }

  .info {
    left: var(--gutter); right: var(--gutter); top: auto; bottom: var(--above); width: auto;
    max-height: min(58dvh, calc(100dvh - var(--above) - 90px)); padding: 16px 16px 14px 18px; border-radius: 20px;
    transform: translateY(30px); transition: transform .4s cubic-bezier(.2,.8,.2,1), opacity .3s;
  }
  .info.open { transform: none; }
  .info .grab { display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: -6px auto 10px; }
  .info h2 { font-size: 24px; }
  .info p { font-size: 14px; line-height: 1.55; }
  .info-actions .btn { padding: 10px 16px; }

  .hs .ring { width: 28px; height: 28px; margin: -14px 0 0 -14px; font-size: 12px; }
  .hs .lbl { margin-top: -14px; font-size: 11.5px; }
}

@media (max-height: 500px) and (orientation: landscape) {
  :root { --gutter: 10px; --ctrl-h: 52px; }
  .brand .logo { width: 38px; height: 38px; border-radius: 10px; }
  .brand h1 { font-size: 19px; }
  .eyebrow, .brand p { display: none; }
  .tally { left: 50%; right: auto; top: calc(var(--gutter) + var(--sat)); transform: translateX(-50%); animation-name: rise-c; }
  .tally .t-lbl { display: none; }
  .index { right: calc(var(--gutter) + var(--sar)); left: auto; top: calc(var(--gutter) + var(--sat)); width: min(280px, 45vw); }
  .index ol { max-height: calc(100dvh - 130px); }
  .scalebar { top: calc(var(--gutter) + var(--sat) + 48px); }
  .phase { left: calc(var(--gutter) + var(--sal)); right: auto; width: min(360px, 48vw); }
  .phase p { display: none; }
  .phase.expanded p { display: block; }
  body.info-open .phase { opacity: 1; pointer-events: auto; }
  .info { left: auto; right: calc(var(--gutter) + var(--sar)); width: min(380px, 48vw); top: calc(var(--gutter) + var(--sat) + 50px); bottom: var(--above); max-height: none; }
  .info .grab { display: none; }
  body.info-open .tally { opacity: 0; }
  .zoom { right: calc(var(--gutter) + var(--sar)); }
  body.info-open .zoom { display: none; }
  .play { width: 40px; height: 40px; }
  .opts-btn { width: 40px; height: 40px; }
}

@media (max-width: 380px) {
  .brand h1 { font-size: 19px; }
  .brand .logo { width: 40px; height: 40px; }
  .tally { font-size: 10.5px; gap: 7px; top: calc(var(--gutter) + var(--sat) + 52px); }
  .tally .t-lbl { display: none; }
}

@media (hover: none) {
  .brand .logo:hover, .btn:hover, .play:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .grain, .hs .ring::after { animation: none; }
}
