:root {
  --room: #EDEDED;
  --room-low: #F6F6F6;
  --face: #F4F4F4;
  --well: #E9E9E9;
  --key: #F8F8F8;
  --key-low: #E8E8E8;
  --line: #D2D2D2;
  --hair: #DEDEDE;
  --ink: #161616;
  --muted: #626262;
  --bezel: #0B0B0B;
  --glass: #1C1C1C;
  --glass-hi: #2A2A2A;
  --rec: #D04A4A;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --key-shadow: 0 2px 3px rgb(0 0 0 / .10), 0 0 0 1px rgb(0 0 0 / .02), inset 0 1px 0 rgb(255 255 255 / .95);
  --key-shadow-down: 0 1px 1px rgb(0 0 0 / .08), inset 0 1px 2px rgb(0 0 0 / .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html, body { overflow-x: clip; }
body {
  min-height: 100vh;
  min-height: 100svh;
  overscroll-behavior-y: none;
  background: linear-gradient(180deg, var(--room) 0%, var(--room-low) 100%) fixed;
  color: var(--ink);
  font-family: Inter, -apple-system, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }

.stage {
  width: min(1000px, 100% - 40px);
  margin: 0 auto;
  padding: 40px 0 56px;
}

/* ---------- header ---------- */
.top { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: clamp(48px, 13vh, 128px); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.brand-mark { width: 28px; height: 28px; color: var(--ink); align-self: center; }
.tagline { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- device ---------- */
.device {
  border-radius: 64px;
  background: var(--bezel);
  padding: 10px;
  box-shadow: 0 50px 90px -40px rgb(0 0 0 / .35), 0 18px 30px -18px rgb(0 0 0 / .25);
  animation: rise .9s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.face {
  border-radius: 54px;
  background: linear-gradient(180deg, #F7F7F7 0%, var(--face) 40%, #F0F0F0 100%);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .9), inset 0 0 0 2px #E2E2E2, inset 0 3px 8px rgb(0 0 0 / .05);
}

/* timeline */
.timeline {
  position: relative;
  height: 120px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.timeline canvas {
  display: block; width: 100%; height: 100%;
  -webkit-mask: linear-gradient(90deg, transparent 0, #000 56px, #000 calc(100% - 56px), transparent);
          mask: linear-gradient(90deg, transparent 0, #000 56px, #000 calc(100% - 56px), transparent);
}

.deck {
  display: grid;
  grid-template-columns: minmax(0, 420px) 1fr auto;
  align-items: center;
  gap: 44px;
  padding: 44px 72px 44px 60px;
}
.left { display: flex; flex-direction: column; gap: 16px; }

.well {
  background: var(--well);
  border-radius: 18px;
  box-shadow: inset 0 1px 2px rgb(0 0 0 / .05);
}
.info { display: grid; grid-template-columns: 220px 1fr; gap: 12px; padding: 8px; }

/* screen */
.screen {
  position: relative;
  height: 152px;
  border-radius: 12px;
  background: linear-gradient(112deg, var(--glass-hi) 0 46%, var(--glass) 46% 100%);
  color: #fff;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .04);
}
.view {
  position: absolute; inset: 0;
  padding: 12px 13px;
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(8px);
  pointer-events: none;
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.view.is-on { opacity: 1; transform: none; pointer-events: auto; }

.scr-top { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 500; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fff; color: var(--ink);
  border-radius: 999px; padding: 2px 7px 2px 6px;
  font-size: 11px; font-weight: 600; letter-spacing: .01em;
}
.badge i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink); }
.badge.rec i { background: var(--rec); }
.badge.paused { animation: blink 1s steps(2, start) infinite; }
.badge.play i { width: 5px; height: 6px; border-radius: 0; background: var(--ink); clip-path: polygon(0 0, 100% 50%, 0 100%); }
@keyframes blink { 50% { opacity: .35; } }
.q { color: rgb(255 255 255 / .9); }
.count { margin-left: auto; color: rgb(255 255 255 / .85); font-size: 11px; }
.scr-bottom { margin-top: auto; }
.status { font-size: 11px; color: rgb(255 255 255 / .8); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status.flash { color: #fff; }
.clock { display: flex; align-items: baseline; gap: 4px; font-size: 34px; font-weight: 400; letter-spacing: -.02em; line-height: 1; }
.clock small { font-size: 11px; font-weight: 500; color: rgb(255 255 255 / .6); margin: 0 10px 0 1px; letter-spacing: 0; }
.clock small:last-child { margin-right: 0; }

.scr-head { display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; letter-spacing: .06em; color: rgb(255 255 255 / .7); margin-bottom: 8px; }
.rows { list-style: none; margin: 0; padding: 0; overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.rows li {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 11px; font-weight: 500;
  padding: 4px 8px; border-radius: 6px;
  color: rgb(255 255 255 / .85); cursor: pointer;
  white-space: nowrap;
}
.rows li span:first-child { overflow: hidden; text-overflow: ellipsis; }
.rows li span:last-child { color: rgb(255 255 255 / .5); }
.rows li.sel { background: #fff; color: var(--ink); }
.rows li.sel span:last-child { color: #666; }
.rows li.warn.sel { background: var(--rec); color: #fff; }
.rows li.warn.sel span:last-child { color: rgb(255 255 255 / .8); }
.rows .none { color: rgb(255 255 255 / .45); cursor: default; }
.scr-input {
  width: 100%; border: 0; outline: 0;
  background: rgb(255 255 255 / .08); color: #fff;
  border-radius: 6px; padding: 6px 8px; margin-bottom: 6px;
  font: 500 12px Inter, system-ui, sans-serif;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12);
}
.scr-input:focus { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .45); }

/* meta + meters */
.meta { padding: 8px 8px 6px 4px; display: flex; flex-direction: column; min-width: 0; }
.fname { font-size: 15px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fsize { font-size: 11px; font-weight: 500; margin-top: 4px; }
.meters { margin-top: auto; display: flex; flex-direction: column; gap: 5px; }
.mrow { display: grid; grid-template-columns: 10px 1fr 40px; align-items: center; gap: 6px; font-size: 11px; font-weight: 500; }
.ch { font-size: 11px; }
.db { text-align: right; font-size: 11px; }
.meter {
  position: relative; height: 9px;
  background:
    repeating-linear-gradient(90deg, #D9D9D9 0 1px, transparent 1px 3px) 0 50% / 100% 5px no-repeat;
}
.meter .fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 3px);
  transition: width .06s linear;
}
.meter::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 45%;
  background: repeating-linear-gradient(90deg, #C9C9C9 0 1px, transparent 1px 3px);
  opacity: .0;
}
.meter .peak { position: absolute; top: -1px; bottom: -1px; width: 3px; border-radius: 1px; background: var(--ink); left: 0; opacity: 0; transition: left .08s linear; }
.scale { position: relative; height: 10px; margin: 2px 46px 2px 16px; font-size: 11px; height: 13px; color: var(--muted); }
.scale span { position: absolute; transform: translateX(-50%); top: 0; }
.scale .mark { color: var(--ink); font-weight: 500; }

/* keys */
.toolbar { display: flex; align-items: center; gap: 6px; padding: 6px; }
.key {
  height: 40px; border: 0; cursor: pointer;
  font-size: 13px; font-weight: 500; letter-spacing: .02em;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
  user-select: none;
}
.key.pill, .key.sq {
  background: linear-gradient(180deg, #FAFAFA 0%, #ECECEC 100%);
  box-shadow: var(--key-shadow), 0 0 0 1px var(--line);
  border-radius: 14px;
}
.key.pill { flex: 1; padding: 0 18px; }
.key.sq { width: 40px; border-radius: 12px; display: grid; place-items: center; }
.key.flat { background: transparent; border-radius: 12px; padding: 0 12px; }
.key:active, .key.down {
  transform: translateY(1px);
  transition-duration: .08s;
}
.key.pill:active, .key.sq:active, .key.pill.down, .key.sq.down {
  background: linear-gradient(180deg, #E9E9E9 0%, #F4F4F4 100%);
  box-shadow: var(--key-shadow-down), 0 0 0 1px var(--line);
}
.key.flat:active, .key.flat.down { background: rgb(0 0 0 / .06); }
.key.on { box-shadow: var(--key-shadow-down), 0 0 0 1px #BDBDBD; background: linear-gradient(180deg, #E9E9E9 0%, #F3F3F3 100%); }

button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* wheel */
.wheel { display: grid; place-items: center; perspective: 700px; }
.ring {
  position: relative;
  width: 222px; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #FBFBFB 0%, #EFEFEF 60%, #E4E4E4 100%);
  box-shadow: 0 0 0 1px var(--line), 0 3px 6px rgb(0 0 0 / .08), 0 14px 24px -14px rgb(0 0 0 / .25), inset 0 2px 0 #fff;
  transition: transform .16s var(--ease);
  transform-style: preserve-3d;
}
.ring.t-up { transform: rotateX(6deg); }
.ring.t-down { transform: rotateX(-6deg); }
.ring.t-left { transform: rotateY(-6deg); }
.ring.t-right { transform: rotateY(6deg); }
.wbtn {
  position: absolute; border: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center; color: var(--ink);
  width: 56px; height: 56px; border-radius: 50%;
}
.wbtn.up { top: 4px; left: 50%; margin-left: -28px; }
.wbtn.down { bottom: 4px; left: 50%; margin-left: -28px; }
.wbtn.left { left: 4px; top: 50%; margin-top: -28px; }
.wbtn.right { right: 4px; top: 50%; margin-top: -28px; }
.center {
  position: absolute; left: 50%; top: 50%;
  width: 92px; height: 92px; margin: -46px 0 0 -46px;
  border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(180deg, #FAFAFA 0%, #EDEDED 100%);
  box-shadow: 0 0 0 1px var(--line), 0 2px 4px rgb(0 0 0 / .10), inset 0 1px 0 #fff,
    0 0 0 8px rgb(0 0 0 / .018), 0 0 0 9px rgb(0 0 0 / .035), 0 0 0 10px rgb(255 255 255 / .7);
  display: grid; place-items: center; color: var(--ink);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease);
}
.center svg { margin-left: 2px; }
.center.is-pause svg { margin-left: 0; }
.center:active, .center.down { transform: scale(.97); box-shadow: 0 0 0 1px var(--line), inset 0 1px 3px rgb(0 0 0 / .1), 0 0 0 8px rgb(0 0 0 / .018), 0 0 0 9px rgb(0 0 0 / .035); transition-duration: .08s; }

/* transport */
.side { display: flex; flex-direction: column; gap: 26px; align-items: center; }
.transport { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.round {
  width: 82px; height: 82px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(180deg, #FAFAFA 0%, #ECECEC 100%);
  box-shadow: 0 0 0 1px var(--line), 0 2px 4px rgb(0 0 0 / .10), inset 0 1px 0 #fff,
    0 0 0 6px #ECECEC, 0 0 0 7px #DCDCDC, 0 10px 18px -8px rgb(0 0 0 / .22);
  display: grid; place-items: center;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease);
}
.round:active, .round.down { transform: translateY(1px) scale(.98); box-shadow: 0 0 0 1px var(--line), inset 0 1px 3px rgb(0 0 0 / .1), 0 0 0 6px #ECECEC, 0 0 0 7px #DCDCDC; transition-duration: .08s; }
.stop-sq { width: 15px; height: 15px; border-radius: 2px; background: var(--ink); }
.rec-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--rec); box-shadow: inset 0 -1px 1px rgb(0 0 0 / .15); }
.rec-dot.live { animation: breathe 1.6s ease-in-out infinite; }
.rec-dot.paused { animation: blink 1s steps(2, start) infinite; }
@keyframes breathe { 50% { transform: scale(.82); opacity: .75; } }
.cap { font-size: 13px; font-weight: 500; letter-spacing: .02em; }

/* ---------- tray ---------- */
.tray { margin-top: clamp(72px, 14vh, 140px); }
.tray-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; padding: 0 8px; }
.tray-head h2 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.tray-note { font-size: 12px; color: var(--muted); }
.takes { list-style: none; margin: 0; padding: 6px; display: flex; flex-direction: column; gap: 4px; background: var(--well); border-radius: 18px; box-shadow: inset 0 1px 2px rgb(0 0 0 / .05); }
.take {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) 110px auto; align-items: center; gap: 14px;
  padding: 8px 8px 8px 8px; border-radius: 12px;
  transition: background .16s var(--ease);
}
.take.cur { background: #F7F7F7; box-shadow: 0 0 0 1px #E0E0E0; }
.take .ix { font-size: 11px; color: var(--muted); text-align: center; }
.take .nm { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.take .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.take canvas { width: 110px; height: 28px; display: block; }
.take .acts { display: flex; gap: 6px; }
.mini {
  height: 32px; min-width: 32px; padding: 0 10px; border-radius: 10px; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12px; font-weight: 500;
  background: linear-gradient(180deg, #FAFAFA 0%, #ECECEC 100%);
  box-shadow: var(--key-shadow), 0 0 0 1px var(--line);
  transition: transform .16s var(--ease);
}
.mini:active { transform: translateY(1px); box-shadow: var(--key-shadow-down), 0 0 0 1px var(--line); }
.mini.ghost { background: transparent; box-shadow: none; color: #555; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty svg { color: var(--ink); opacity: .6; }
.empty p { margin: 10px 0 0; font-size: 13px; }

.keys { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; font-size: 12px; color: var(--muted); }
kbd {
  font: 500 11px Inter, system-ui, sans-serif; color: var(--ink);
  background: linear-gradient(180deg, #FAFAFA, #ECECEC); border-radius: 6px; padding: 2px 6px; margin-right: 3px;
  box-shadow: 0 0 0 1px var(--line), 0 1px 1px rgb(0 0 0 / .08);
}

/* ---------- responsive ---------- */
/* ---------- details from reference 2 ---------- */
.device { position: relative; box-shadow: 0 6px 0 #262626, 0 50px 90px -40px rgb(0 0 0 / .35), 0 18px 30px -18px rgb(0 0 0 / .25); }
.screen {
  background:
    repeating-linear-gradient(0deg, rgb(255 255 255 / .028) 0 1px, transparent 1px 3px),
    linear-gradient(112deg, var(--glass-hi) 0 46%, var(--glass) 46% 100%);
}
.clock { font-weight: 300; }
.deck { padding-top: 40px; padding-bottom: 18px; }
.base { display: flex; align-items: center; gap: 14px; padding: 0 72px 28px 60px; }
.pill-status {
  display: inline-flex; align-items: center; gap: 7px;
  height: 26px; padding: 0 12px; border-radius: 7px;
  background: var(--bezel); color: #fff;
  font-size: 12px; font-weight: 500; min-width: 84px;
  border: 0; cursor: pointer; font-family: inherit;
}
.pill-status:active { transform: translateY(1px); }
.grille {
  flex: 1; height: 22px;
  background: radial-gradient(circle, #444 1px, transparent 1.4px) 0 0 / 5px 5px;
  -webkit-mask: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
          mask: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
  opacity: .85;
}
.knob {
  position: absolute; right: -9px; top: 50%; margin-top: -40px;
  width: 12px; height: 80px; border-radius: 0 5px 5px 0;
  background:
    repeating-linear-gradient(180deg, rgb(0 0 0 / .18) 0 1px, transparent 1px 4px),
    linear-gradient(90deg, #9a9a9a, #e9e9e9 45%, #cfcfcf 70%, #8d8d8d);
  background-position: 0 var(--knurl, 0px), 0 0;
  box-shadow: 1px 0 2px rgb(0 0 0 / .25);
  cursor: ns-resize; touch-action: none;
}
.knob:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }


/* ---------- tablet ---------- */
@media (max-width: 940px) {
  .deck { grid-template-columns: 1fr auto; grid-template-areas: "left left" "wheel side"; padding: 36px 40px 18px; gap: 32px; }
  .left { grid-area: left; }
  .wheel { grid-area: wheel; }
  .side { grid-area: side; }
}

/* ---------- phone: the whole unit fits one screen, transport in the thumb zone ---------- */
@media (max-width: 600px) {
  .stage {
    width: 100%;
    padding: calc(10px + env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  }
  .top { margin: 0 4px 12px; flex-wrap: nowrap; align-items: center; }
  .brand { font-size: 14px; gap: 8px; }
  .brand-mark { width: 24px; height: 24px; }
  .tagline { font-size: 12px; text-align: right; }
  .tagline .long { display: none; }

  .device { border-radius: 40px; padding: 6px; animation-duration: .5s; }
  .face { border-radius: 34px; }
  .timeline { height: 84px; }

  .deck {
    grid-template-columns: 1fr auto;
    grid-template-areas: "left left" "wheel side";
    padding: 12px 12px 12px; gap: 12px;
  }
  .left { gap: 10px; }
  .info { grid-template-columns: 1fr; gap: 6px; padding: 6px; border-radius: 16px; }
  .screen { height: 124px; }
  .view { padding: 11px 12px; }
  .clock { font-size: 32px; }
  .meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; padding: 4px 6px 4px; }
  .fname { font-size: 14px; }
  .fsize { margin-top: 0; align-self: center; color: var(--muted); }
  .meters { grid-column: 1 / -1; margin-top: 8px; gap: 3px; }

  .toolbar { gap: 4px; padding: 5px; border-radius: 16px; }
  .key { height: 44px; font-size: 12px; letter-spacing: 0; }
  .key.flat { padding: 0 6px; flex: 1; }
  .key.pill { padding: 0 6px; min-width: 0; flex: 1.3; }
  .key.sq { width: 44px; flex: none; }

  /* controls row sized from the width so it never overflows small phones */
  .wheel { justify-self: start; }
  .ring { width: min(calc(50vw - 2px), 196px); }
  .center { width: 38%; height: 38%; margin: 0; left: 31%; top: 31%; }
  .wbtn { width: 52px; height: 52px; }
  .wbtn.up, .wbtn.down { margin-left: -26px; }
  .wbtn.left, .wbtn.right { margin-top: -26px; }

  /* transport becomes the tile keypad of reference 2 */
  .side { align-self: stretch; justify-content: stretch; gap: 3px; background: var(--bezel); padding: 3px; border-radius: 18px; width: min(32vw, 132px); }
  .transport { flex: 1; justify-content: center; background: #E6E6E6; border-radius: 15px; padding: 8px 6px; gap: 6px; width: 100%; }
  .round {
    width: 58px; height: 58px;
    background: radial-gradient(circle at 50% 30%, #F2F2F2, #DADADA);
    box-shadow: inset 0 2px 3px rgb(0 0 0 / .10), 0 1px 0 #fff;
  }
  .round:active, .round.down { box-shadow: inset 0 3px 5px rgb(0 0 0 / .16); }
  .cap { font-size: 11px; }

  .base { padding: 0 14px 16px; gap: 10px; }
  .pill-status { height: 32px; min-width: 0; }
  .grille { height: 18px; }
  .knob { right: -7px; width: 10px; }

  .timeline canvas {
    -webkit-mask: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent);
            mask: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent);
  }

  .tray { margin-top: 40px; }
  .tray-head { padding: 0 6px; }
  .takes { padding: 4px; }
  .take { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 6px 6px 6px 12px; }
  .take .ix, .take canvas { display: none; }
  .take .nm { min-height: 24px; }
  .mini { height: 44px; min-width: 44px; padding: 0 12px; border-radius: 12px; }
}

/* very small phones (iPhone SE, 320 wide Androids) */
@media (max-width: 360px) {
  .key { font-size: 11px; }
  .key.flat { padding: 0 3px; }
  .mini .lbl { display: none; }
}

/* short phones (iPhone SE, mini): trim the screen and strip so REC stays above the fold */
@media (max-width: 600px) and (max-height: 760px) {
  .top { margin-bottom: 8px; }
  .timeline { height: 68px; }
  .screen { height: 104px; }
  .clock { font-size: 28px; }
  .status { margin-bottom: 2px; }
  .deck { gap: 10px; padding: 10px 10px 10px; }
  .left { gap: 8px; }
  .meters { margin-top: 4px; }
  .ring { width: min(calc(46vw - 2px), 172px); }
  .round { width: 50px; height: 50px; }
  .transport { gap: 4px; padding: 6px; }
  .base { padding-bottom: 12px; }
  .grille { height: 14px; }
  .pill-status { height: 28px; }
}

/* landscape phones: keep the desktop arrangement, just tighter */
@media (max-height: 520px) and (orientation: landscape) {
  .stage { width: min(1000px, 100% - 24px); padding: 8px max(12px, env(safe-area-inset-right)) 24px max(12px, env(safe-area-inset-left)); }
  .top { margin-bottom: 8px; }
  .device { border-radius: 40px; padding: 6px; }
  .face { border-radius: 34px; }
  .timeline { height: 70px; }
  .deck { grid-template-columns: minmax(0, 360px) 1fr auto; grid-template-areas: "left wheel side"; padding: 12px 36px 14px 28px; gap: 18px; }
  .left { gap: 8px; }
  .info { grid-template-columns: 180px 1fr; }
  .screen { height: 116px; }
  .clock { font-size: 26px; }
  .clock small { margin-right: 6px; }
  .key { height: 40px; }
  .ring { width: 172px; }
  .center { width: 68px; height: 68px; margin: -34px 0 0 -34px; }
  .round { width: 60px; height: 60px; }
  .side { gap: 12px; }
  .transport { gap: 8px; }
  .base { display: none; }
}

/* ---------- touch ---------- */
.device, .keys { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
button, .rows li { touch-action: manipulation; }
.timeline { touch-action: pan-y; }   /* sideways drag scrubs, vertical still scrolls the page */
.knob::before { content: ""; position: absolute; inset: -10px -14px; } /* bigger grab area than the drawn knob */
@media (hover: hover) {
  .key.flat:hover { background: rgb(0 0 0 / .035); }
  .key.pill:hover, .key.sq:hover { background: linear-gradient(180deg, #FFF 0%, #EFEFEF 100%); }
  .wbtn:hover { background: rgb(0 0 0 / .025); }
  .take .nm:hover { color: #000; }
  .mini.ghost:hover { background: rgb(0 0 0 / .04); color: var(--ink); }
}
@media (hover: none) {
  .scr-input { font-size: 16px; }   /* iOS zooms into inputs under 16px */
  .keys { display: none; }        /* keyboard shortcuts mean nothing on a phone */
  .wbtn:active { background: rgb(0 0 0 / .05); }
  .rows li:active { background: rgb(255 255 255 / .12); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ?debug diagnostics */
.diag { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 50; margin: 0; padding: 8px 10px; border-radius: 10px; background: rgb(11 11 11 / .88); color: #e8e8e8; font: 500 11px/1.45 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; pointer-events: none; }
