:root {
  color-scheme: dark;
  --bg: #050506;
  --ink: #f4f1ea;
  --muted: rgba(244, 241, 234, 0.6);
  --line: rgba(255, 255, 255, 0.12);
  --metal: #d8d8d2;
  --base: #050505;
  --core: #7dbfff;
  --core-closed-y: 32px;
  --core-open-y: -420px;
  --base-closed-y: 21px;
  --base-open-y: 67px;
  --ring-open-y: -140px;
  --hero-object-y: 225px;
  --vault-width: 53vw;
  --label-core-top: 38.5%;
  --label-ring-top: 52.5%;
  --label-base-top: 66.5%;
  --core-x: 0px;
  --ring-x: 0px;
  --base-x: 0px;
  --hero-copy-top: 32%;
  --hero-video-progress: 0;
  --hero-video-x: 0%;
  --hero-video-y: -4%;
  --hero-video-scale: 1;
  --hero-video-start-x: -1%;
  --hero-video-end-x: -2%;
  --hero-video-start-y: -6%;
  --hero-video-end-y: -22%;
  --hero-video-start-scale: 1.07;
  --hero-video-end-scale: 0.75;
  --hero-video-dim: 0;
  --hero-video-vignette: 0.73;
  --hero-video-bottom-dim: 0.95;
  --hero-side-shadow: 0.95;
  --final-bg-x: 180%;
  --final-bg-y: 98.5%;
  --final-bg-scale: 1;
  --final-overlay: 0.25;
  --final-side-shadow: 0.64;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

main {
  overflow: clip;
}

.cinematic {
  height: 480vh;
  position: relative;
}

.cinematic-frame {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 46%, rgba(125, 191, 255, 0.14), transparent 24rem),
    radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.08), transparent 30rem),
    #020203;
}

.generated-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 110%;
  object-fit: cover;
  object-position: center center;
  opacity: 0.72;
  filter: saturate(0.9) contrast(1.06) brightness(calc(1 - var(--hero-video-dim)));
  transform: translate(var(--hero-video-x), var(--hero-video-y)) scale(var(--hero-video-scale));
  transform-origin: 50% 50%;
  will-change: transform, filter;
}

.cinematic-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.14) 0%, transparent 26%, rgba(0, 0, 0, var(--hero-video-bottom-dim)) 100%),
    radial-gradient(ellipse at 50% 100%, rgba(0,0,0,calc(var(--hero-video-bottom-dim) + 0.12)), transparent 48%),
    linear-gradient(90deg, rgba(0,0,0,var(--hero-side-shadow)), transparent 24%, transparent 76%, rgba(0,0,0,var(--hero-side-shadow))),
    radial-gradient(ellipse at 50% 50%, transparent 36%, rgba(0,0,0,var(--hero-video-vignette)) 100%);
  z-index: 1;
}

.cinematic-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  backdrop-filter: blur(10px);
  background:
    linear-gradient(to bottom, transparent 0 78%, rgba(0,0,0,0.2) 100%),
    linear-gradient(90deg, rgba(0,0,0,0.16), transparent 12%, transparent 88%, rgba(0,0,0,0.16));
  -webkit-mask:
    linear-gradient(to bottom, transparent 0 72%, #000 100%),
    linear-gradient(90deg, #000 0, transparent 13%, transparent 87%, #000 100%);
  -webkit-mask-composite: source-over;
  mask:
    linear-gradient(to bottom, transparent 0 72%, #000 100%),
    linear-gradient(90deg, #000 0, transparent 13%, transparent 87%, #000 100%);
  mask-composite: add;
}

.reference-glow {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: url("./renders/on table ref.jpeg");
  background-size: cover;
  background-position: center;
  filter: blur(22px) saturate(0.55);
  transform: scale(1.08);
}

.topbar {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 40px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand {
  color: white;
}

nav {
  display: flex;
  gap: 28px;
  color: rgba(255, 255, 255, 0.56);
}

.vault-stage {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-items: center;
  perspective: 1300px;
}

.vault-object {
  --open: 0;
  width: min(var(--vault-width), 560px);
  aspect-ratio: 1;
  position: relative;
  z-index: 1;
  transform-style: preserve-3d;
  transform: translateY(calc(var(--hero-object-y) - var(--open) * var(--hero-object-y))) rotateX(calc(60deg - var(--open) * 22deg)) rotateZ(calc(-8deg + var(--open) * 8deg)) scale(calc(0.82 + var(--open) * 0.08));
  transition: transform 120ms linear;
}

.cinematic .vault-object {
  display: none;
}

.mini-object {
  --open: 0;
  width: min(46vw, 560px);
  aspect-ratio: 1;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 120ms linear;
}

.part {
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
  transition: transform 120ms linear, filter 120ms linear;
}

.outer-ring {
  transform: translateX(var(--ring-x)) translateY(calc(var(--open) * var(--ring-open-y))) translateZ(70px);
  background:
    repeating-conic-gradient(from 4deg, rgba(0,0,0,0.42) 0 0.65deg, transparent 0.65deg 1.55deg),
    radial-gradient(circle, transparent 0 47%, var(--metal) 48% 70%, #8b8b88 71% 73%, transparent 74%);
  box-shadow: inset 0 0 38px rgba(255,255,255,0.38), 0 34px 80px rgba(0,0,0,0.78);
}

.binary-ring {
  display: none;
}

.glass-core {
  inset: 29%;
  transform: translateX(var(--core-x)) translateY(calc(var(--core-closed-y) + var(--open) * var(--core-open-y))) translateZ(calc(92px + var(--open) * 18px));
  background: radial-gradient(circle at 50% 45%, rgba(166, 220, 255, 0.9), rgba(24, 54, 84, 0.82) 46%, rgba(7, 13, 21, 0.96) 72%);
  border: 2px solid rgba(202, 234, 255, 0.28);
  box-shadow: inset 0 0 34px rgba(125, 191, 255, 0.42), 0 0 60px rgba(96, 175, 255, 0.3);
}

.chip {
  position: absolute;
  inset: 37%;
  border-radius: 8px;
  background: linear-gradient(145deg, #0a0b0d, #25282a);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.1), 0 12px 24px rgba(0,0,0,0.5);
}

.glass-core i {
  position: absolute;
  width: 12%;
  height: 7%;
  border-radius: 3px;
  background: rgba(223, 246, 255, 0.92);
  box-shadow: 0 0 18px rgba(119, 196, 255, 0.9);
}

.glass-core i:nth-child(2) { left: 17%; top: 26%; }
.glass-core i:nth-child(3) { right: 18%; top: 22%; }
.glass-core i:nth-child(4) { left: 23%; bottom: 24%; }
.glass-core i:nth-child(5) { right: 23%; bottom: 25%; }
.glass-core i:nth-child(6) { left: 45%; top: 14%; }
.glass-core i:nth-child(7) { left: 45%; bottom: 15%; }
.glass-core i:nth-child(8) { left: 14%; top: 49%; }
.glass-core i:nth-child(9) { right: 14%; top: 49%; }

.base-disc {
  inset: 18%;
  transform: translateX(var(--base-x)) translateY(calc(var(--base-closed-y) + var(--open) * var(--base-open-y))) translateZ(8px);
  background:
    radial-gradient(circle at 50% 32%, color-mix(in srgb, var(--base), white 24%), color-mix(in srgb, var(--base), white 10%) 45%, var(--base) 70%, #020202);
  box-shadow: inset 0 -22px 50px rgba(255,255,255,0.13), 0 38px 78px rgba(0,0,0,0.9);
}

.layer {
  position: absolute;
  z-index: 7;
  left: 50%;
  width: min(46vw, 560px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
  opacity: 0;
  transform: translateX(-50%);
  mix-blend-mode: screen;
}

.layer::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, calc(-100% - 8px));
  color: rgba(255,255,255,0.64);
  text-shadow: 0 1px 10px rgba(0,0,0,0.9);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.label-ring { top: var(--label-ring-top); }
.label-core { top: var(--label-core-top); }
.label-base { top: var(--label-base-top); }

.hero-copy,
.exploded-copy {
  position: absolute;
  z-index: 5;
  left: 50%;
  width: min(760px, calc(100vw - 48px));
  transform: translateX(-50%);
  text-align: center;
}

.hero-copy {
  top: var(--hero-copy-top);
}

.exploded-copy {
  bottom: 7%;
  opacity: 0;
}

.exploded-copy .eyebrow {
  display: none;
}

.eyebrow {
  margin: 0 0 14px;
  color: rgba(255,255,255,0.48);
  font-size: 10px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(3.1rem, 8vw, 8.8rem);
}

h2 {
  font-size: clamp(2.1rem, 5vw, 5rem);
}

p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-copy p:last-child,
.exploded-copy p:last-child {
  max-width: 560px;
  margin: 22px auto 0;
}

.scroll-hint {
  position: absolute;
  z-index: 6;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.5);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.constructor,
.final-section,
.table-section {
  min-height: 100svh;
  display: grid;
  align-items: center;
  gap: 6vw;
  padding: 10vh 7vw;
}

.table-section {
  position: relative;
  min-height: 82svh;
  background-image:
    linear-gradient(90deg, rgba(0,0,0,0.95), rgba(0,0,0,0.1) 46%, rgba(0,0,0,0.88)),
    linear-gradient(to bottom, rgba(0,0,0,0.92), transparent 24%, rgba(0,0,0,0.94)),
    url("./renders/on table ref.jpeg");
  background-size: cover;
  background-position: center;
}

.table-section > div {
  max-width: 560px;
  position: relative;
  z-index: 1;
}

.constructor {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 460px);
  background:
    radial-gradient(circle at 28% 44%, rgba(125, 191, 255, 0.16), transparent 24rem),
    #050506;
}

.constructor-preview {
  min-height: 620px;
  position: relative;
  display: grid;
  place-items: center;
}

.mini-object {
  width: min(42vw, 520px);
  transform: none;
  filter: drop-shadow(0 50px 90px rgba(0,0,0,0.72));
}

.mini-ring,
.mini-core,
.mini-base {
  position: absolute;
  border-radius: 50%;
}

.mini-ring {
  inset: 9%;
  background:
    repeating-conic-gradient(from 1deg, rgba(0,0,0,0.28) 0 0.42deg, transparent 0.42deg 1.05deg),
    radial-gradient(circle, transparent 0 48%, var(--metal) 49% 71%, color-mix(in srgb, var(--metal), black 36%) 72% 74%, transparent 75%);
  box-shadow:
    inset 0 0 36px rgba(255,255,255,0.3),
    inset 0 -18px 28px rgba(0,0,0,0.24),
    0 24px 70px rgba(0,0,0,0.5);
  z-index: 2;
}

.mini-core {
  inset: 29%;
  background:
    radial-gradient(circle at 50% 42%, rgba(180, 225, 255, 0.88), rgba(58, 107, 150, 0.7) 24%, rgba(16, 31, 50, 0.94) 54%, #060b12 76%);
  border: 1px solid rgba(212, 241, 255, 0.26);
  box-shadow:
    inset 0 0 34px rgba(130, 202, 255, 0.34),
    0 0 54px rgba(104, 187, 255, 0.32),
    0 18px 45px rgba(0,0,0,0.54);
  z-index: 4;
  animation: coreBreath 5.8s ease-in-out infinite;
}

.mini-base {
  inset: 14%;
  background:
    radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--base), white 22%), color-mix(in srgb, var(--base), white 7%) 50%, var(--base) 68%, #020202);
  box-shadow:
    inset 0 0 34px rgba(255,255,255,0.08),
    inset 0 -28px 46px rgba(0,0,0,0.72),
    0 34px 80px rgba(0,0,0,0.72);
  z-index: 1;
}

.mini-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22%;
  height: 22%;
  border-radius: 7px;
  background: linear-gradient(145deg, #08090b, #24282a);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.12),
    0 12px 24px rgba(0,0,0,0.5);
  transform: translate(-50%, -50%);
}

.mini-core i {
  position: absolute;
  width: 12%;
  height: 7%;
  border-radius: 3px;
  background: rgba(224, 247, 255, 0.95);
  box-shadow: 0 0 17px rgba(125, 203, 255, 0.95);
  transform: translate(-50%, -50%);
  animation: diodePulse 4.8s ease-in-out infinite;
}

.mini-core i:nth-child(3),
.mini-core i:nth-child(6),
.mini-core i:nth-child(8) {
  animation-delay: -1.6s;
}

.mini-core i:nth-child(4),
.mini-core i:nth-child(7),
.mini-core i:nth-child(9) {
  animation-delay: -3.2s;
}

@keyframes coreBreath {
  0%, 100% {
    box-shadow:
      inset 0 0 34px rgba(130, 202, 255, 0.3),
      0 0 48px rgba(104, 187, 255, 0.24),
      0 18px 45px rgba(0,0,0,0.54);
  }
  50% {
    box-shadow:
      inset 0 0 40px rgba(146, 213, 255, 0.42),
      0 0 68px rgba(104, 187, 255, 0.4),
      0 18px 45px rgba(0,0,0,0.54);
  }
}

@keyframes diodePulse {
  0%, 100% {
    opacity: 0.78;
    box-shadow: 0 0 12px rgba(125, 203, 255, 0.58);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 22px rgba(160, 222, 255, 0.96);
  }
}

.mini-core i:nth-child(2) { left: 50%; top: 12.5%; }
.mini-core i:nth-child(3) { left: 76.5%; top: 23.5%; transform: translate(-50%, -50%) rotate(45deg); }
.mini-core i:nth-child(4) { left: 87.5%; top: 50%; transform: translate(-50%, -50%) rotate(90deg); }
.mini-core i:nth-child(5) { left: 76.5%; top: 76.5%; transform: translate(-50%, -50%) rotate(135deg); }
.mini-core i:nth-child(6) { left: 50%; top: 87.5%; }
.mini-core i:nth-child(7) { left: 23.5%; top: 76.5%; transform: translate(-50%, -50%) rotate(45deg); }
.mini-core i:nth-child(8) { left: 12.5%; top: 50%; transform: translate(-50%, -50%) rotate(90deg); }
.mini-core i:nth-child(9) { left: 23.5%; top: 23.5%; transform: translate(-50%, -50%) rotate(135deg); }

.engraving-orbit {
  position: absolute;
  width: min(42vw, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  z-index: 5;
  border: 0;
  box-shadow:
    inset 0 0 28px rgba(255,255,255,0.04),
    0 0 42px rgba(125, 191, 255, 0.06);
  pointer-events: none;
}

.engraving-orbit span {
  position: absolute;
  --digit-size: 10px;
  color: color-mix(in srgb, var(--metal), black 52%);
  font: 800 var(--digit-size)/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-shadow: 0 1px 2px rgba(255,255,255,0.18);
}

.constructor-panel {
  border-left: 1px solid var(--line);
  padding-left: 42px;
}

.order-hint {
  min-height: 20px;
  margin: 18px 0 -14px;
  color: rgba(255,255,255,0.46);
  font-size: 12px;
}

.control-group {
  margin-top: 34px;
}

.control-group label {
  display: block;
  margin-bottom: 12px;
  color: rgba(255,255,255,0.58);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.swatches,
.color-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: var(--swatch);
  cursor: pointer;
}

.swatch.active {
  outline: 2px solid white;
  outline-offset: 4px;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  color: white;
  padding: 14px 15px;
  font: inherit;
}

input[type="color"] {
  width: 56px;
  height: 42px;
  padding: 3px;
}

#colorValue {
  color: rgba(255,255,255,0.56);
  font: 12px ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
}

.binary-strip {
  margin-top: 12px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px;
  color: rgba(255,255,255,0.62);
  background: linear-gradient(90deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025));
  font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}

.cta,
form button {
  display: inline-flex;
  justify-content: center;
  margin-top: 34px;
  border: 0;
  border-radius: 4px;
  background: white;
  color: #050506;
  padding: 14px 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
}

.final-section {
  position: relative;
  min-height: 100svh;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 480px);
  background-image:
    linear-gradient(90deg, rgba(0,0,0,0.88), rgba(0,0,0,0.32) 48%, rgba(0,0,0,0.78)),
    linear-gradient(to bottom, rgba(0,0,0,0.85), transparent 32%, rgba(0,0,0,0.88));
  overflow: hidden;
}

.final-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("./renders/on human ref.jpeg");
  background-size: cover;
  background-position: var(--final-bg-x) var(--final-bg-y);
  transform: scale(var(--final-bg-scale));
  transform-origin: var(--final-bg-x) var(--final-bg-y);
  filter: brightness(calc(1 - var(--final-overlay) * 0.45)) saturate(0.96);
}

.final-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,var(--final-side-shadow)), transparent 24%, transparent 76%, rgba(0,0,0,var(--final-side-shadow))),
    linear-gradient(90deg, rgba(0,0,0,var(--final-overlay)), rgba(0,0,0,0.28) 48%, rgba(0,0,0,calc(var(--final-overlay) * 0.9))),
    linear-gradient(to bottom, rgba(0,0,0,0.82), transparent 34%, rgba(0,0,0,0.86));
}

.final-section > * {
  position: relative;
}

.final-section .final-copy,
.final-section .waitlist-form {
  z-index: 2;
}

.final-section {
  box-shadow: inset 0 42px 56px rgba(0,0,0,0.92);
}

.final-copy,
.waitlist-form {
  position: relative;
  z-index: 1;
}

.final-copy {
  max-width: 620px;
}

.waitlist-form {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  background: rgba(3, 4, 5, 0.48);
  backdrop-filter: blur(16px);
}

.order-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.order-summary span {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.09);
  padding-bottom: 8px;
}

.order-summary b {
  color: rgba(255,255,255,0.45);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.order-summary em {
  color: rgba(255,255,255,0.82);
  font-style: normal;
  font-size: 12px;
  text-align: right;
}

.waitlist-form button {
  margin-top: 4px;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: rgba(255,255,255,0.64);
  font-size: 12px;
}

@media (max-width: 900px) {
  :root {
    --core-closed-y: 18px;
    --core-open-y: -176px;
    --base-closed-y: 24px;
    --base-open-y: 76px;
    --ring-open-y: -20px;
    --hero-object-y: 122px;
    --vault-width: 72vw;
    --label-core-top: 38.5%;
    --label-ring-top: 52.5%;
    --label-base-top: 66.5%;
    --hero-video-start-x: -1.5%;
    --hero-video-end-x: -2%;
    --hero-video-start-y: -10%;
    --hero-video-end-y: -24.5%;
    --hero-video-end-scale: 0.95;
    --hero-side-shadow: 0;
    --final-bg-x: 56.5%;
    --final-bg-y: 95.5%;
    --final-side-shadow: 0;
  }

  .topbar {
    padding: 22px;
  }

  nav {
    display: none;
  }

  .layer {
    z-index: 12;
    width: 82vw;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.78), transparent);
  }

  .layer::after {
    left: 50%;
    top: 50%;
    transform: translate(-50%, calc(-100% - 7px));
    font-size: 8px;
    letter-spacing: 0.16em;
    color: rgba(255,255,255,0.82);
    text-shadow: 0 1px 12px rgba(0,0,0,1), 0 0 18px rgba(0,0,0,0.95);
  }

  .cinematic-frame::before {
    background: linear-gradient(to bottom, transparent 0 78%, rgba(0,0,0,0.2) 100%);
    -webkit-mask: linear-gradient(to bottom, transparent 0 72%, #000 100%);
    mask: linear-gradient(to bottom, transparent 0 72%, #000 100%);
  }

  .exploded-copy {
    bottom: 8%;
  }

  .exploded-copy h2 {
    font-size: clamp(1.55rem, 7.4vw, 2.45rem);
    line-height: 1.06;
  }

  .exploded-copy p:last-child {
    margin-top: 14px;
    font-size: 12px;
    line-height: 1.45;
  }

  .constructor,
  .final-section {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    top: var(--hero-copy-top);
  }

  .table-section {
    min-height: 72svh;
    background-position: center;
  }

  .constructor-panel {
    border-left: 0;
    padding-left: 0;
  }

  .constructor-preview {
    min-height: 420px;
  }

  .mini-object,
  .engraving-orbit {
    width: 82vw;
  }

  .final-section {
    align-content: end;
    box-shadow: none;
  }
}

.tuner {
  position: fixed;
  z-index: 100;
  right: 14px;
  bottom: 14px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tuner-toggle,
.tuner button {
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  background: rgba(8, 10, 12, 0.84);
  color: white;
  font: 700 10px/1 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

.tuner-toggle {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 11px 13px;
  backdrop-filter: blur(16px);
}

.tuner-panel {
  display: none;
  width: min(360px, calc(100vw - 28px));
  max-height: min(720px, calc(100svh - 28px));
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px;
  background: rgba(5, 6, 8, 0.92);
  box-shadow: 0 24px 80px rgba(0,0,0,0.55);
  backdrop-filter: blur(18px);
}

.tuner.is-open .tuner-panel {
  display: block;
}

.tuner.is-open .tuner-toggle {
  display: none;
}

.tuner-head,
.tuner-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tuner-head {
  margin-bottom: 12px;
}

.tuner-head strong {
  font-size: 12px;
  letter-spacing: 0.08em;
}

.tuner-head span {
  color: rgba(255,255,255,0.55);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tuner-control {
  display: grid;
  grid-template-columns: 1fr 64px;
  gap: 8px 12px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.tuner-control label {
  color: rgba(255,255,255,0.72);
  font-size: 11px;
}

.tuner-control output {
  color: rgba(255,255,255,0.58);
  font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: right;
}

.tuner-control input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: white;
}

#tunerOutput {
  width: 100%;
  min-height: 126px;
  margin: 12px 0;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.72);
  padding: 10px;
  font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  resize: vertical;
}

.tuner-actions button {
  padding: 10px 11px;
}
