/* The computer section: the page's light ground and theme accent, the computer drawn in a true
   30 degree isometric view from flat, skewed faces. Everything here is scoped to #computer. */

@scope (#computer) {
  :scope {
    --bg: var(--ground);
    --body: var(--ink-2);
    --muted: var(--ink-soft);
    --accent-glow: color-mix(in oklab, var(--glow-color) 42%, transparent);
    --iso: matrix(0.8660254, 0.5, 0, 1, 0, 0);
    --iso-side: matrix(0.8660254, -0.5, 0, 1, 0, 0);
    font-size: 1.0625rem;
    line-height: 1.55;
  }

  button {
    font: inherit;
    color: inherit;
  }

  /* ---------- hero ---------- */

  :scope {
    display: grid;
    grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(24px, 3vw, 48px);
    max-width: 1440px;
    min-height: 100svh;
    margin: 0 auto;
    padding: var(--bar-h) clamp(20px, 4vw, 56px) 40px;
  }

  h2 {
    margin: 0;
    font-size: clamp(2.5rem, min(4.2vw, 7.4svh), 4rem);
    font-weight: 520;
    line-height: 1.02;
    letter-spacing: -0.035em;
    text-wrap: balance;
  }

  .lead {
    max-width: 34ch;
    margin: 20px 0 0;
    color: var(--body);
    text-wrap: pretty;
  }

  .beats {
    display: grid;
    gap: 2px;
    margin: clamp(20px, 3.4svh, 32px) 0 0;
    padding: 0;
    list-style: none;
  }

  .beats button {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    align-items: baseline;
    gap: 2px 12px;
    width: 100%;
    padding: clamp(6px, 1.1svh, 9px) 12px clamp(7px, 1.2svh, 10px);
    border: 0;
    border-radius: 12px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background-color 200ms ease, box-shadow 200ms ease, transform 140ms var(--ease-out);
  }

  .beats button:active { transform: scale(0.985); }

  .beat-name { color: var(--muted); font-weight: 600; font-size: 0.9375rem; transition: color 200ms ease; }
  .beat-text { color: var(--muted); font-size: 0.9375rem; line-height: 1.4; transition: color 200ms ease; }

  .beat-bar {
    grid-column: 1 / -1;
    height: 2px;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 2px;
    background: var(--hair);
    opacity: 0;
    transition: opacity 200ms ease;
  }

  .beat-bar i {
    display: block;
    height: 100%;
    background: var(--accent);
    transform-origin: 0 50%;
    transform: scaleX(0);
  }

  .beats [aria-current='step'] button {
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(23, 24, 27, 0.05), 0 8px 24px -12px rgba(23, 24, 27, 0.18), inset 0 0 0 1px var(--hair);
  }

  .beats [aria-current='step'] .beat-name { color: var(--accent-ink); }
  .beats [aria-current='step'] .beat-text { color: var(--ink); }
  .beats [aria-current='step'] .beat-bar { opacity: 1; }

  @media (hover: hover) and (pointer: fine) {
    .beats li:not([aria-current='step']) button:hover { background: rgba(23, 24, 27, 0.035); }
    .beats li:not([aria-current='step']) button:hover .beat-text { color: var(--body); }
    .play:hover { background: var(--bg); }
  }

  .controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin-top: 24px;
  }

  .play {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 140ms var(--ease-out), background-color 160ms ease;
  }

  .play:active { transform: scale(0.97); }
  .play svg { width: 16px; height: 16px; fill: currentColor; }
  .play .icon-play, .play[aria-pressed='true'] .icon-pause { display: none; }
  .play[aria-pressed='true'] .icon-play { display: block; }

  .rule { margin: 0; color: var(--muted); font-size: 0.875rem; }

  /* ---------- scene and stage ---------- */

  /* scene.js scales the 1000 px stage to the column; before that, or without script, it is clipped to it. */
  .scene {
    position: relative;
    width: 100%;
    aspect-ratio: 1000 / 790;
    overflow: clip;
  }

  .stage {
    position: absolute;
    top: 0;
    left: 0;
    width: 1000px;
    height: 790px;
    transform-origin: 0 0;
    transform: scale(0.62);
  }

  .floor { position: absolute; inset: 0; width: 100%; height: 100%; }
  .floor .grid path { stroke: rgba(23, 24, 27, 0.07); stroke-width: 1; fill: none; }

  .shadow { position: absolute; left: 0; top: 0; pointer-events: none; }

  /* Footprints on the floor, pushed away from the light (top left) and softened. */
  .shadow-monitor {
    width: 300px;
    height: 330px;
    transform-origin: 0 0;
    transform: matrix(0.8660254, 0.5, 0.8660254, -0.5, 300, 530);
    background: radial-gradient(closest-side, rgba(30, 31, 33, 0.22), rgba(30, 31, 33, 0) 100%);
    filter: blur(14px);
  }

  .shadow-keyboard {
    width: 420px;
    height: 150px;
    transform-origin: 0 0;
    transform: matrix(0.8660254, 0.5, -0.8660254, 0.5, 150, 495);
    background: radial-gradient(closest-side, rgba(30, 31, 33, 0.16), rgba(30, 31, 33, 0) 100%);
    filter: blur(10px);
  }

  .computer, .monitor, .keyboard { position: absolute; inset: 0; }

  .face {
    position: absolute;
    transform-origin: 0 0;
    box-shadow: inset 0 0 0 1px rgba(23, 24, 27, 0.09);
  }

  /* monitor: front face 420 x 380 at (260, 100), 130 deep, sloping back to 270 */
  .front {
    left: 260px;
    top: 100px;
    width: 420px;
    height: 380px;
    transform: var(--iso);
    background: linear-gradient(180deg, #fbfaf8, #f1efea);
  }

  .top {
    left: 260px;
    top: 100px;
    width: 420px;
    height: 130px;
    transform: matrix(0.8660254, 0.5, 0.8660254, -0.5, 0, 0);
    background: linear-gradient(0deg, #ffffff, #f8f7f4);
  }

  .side {
    left: 623.73px;
    top: 310px;
    width: 270px;
    height: 380px;
    transform: var(--iso-side);
    clip-path: polygon(0 0, 130px 0, 270px 170px, 270px 100%, 0 100%);
    background: linear-gradient(90deg, #e9e7e1, #dedbd4);
  }

  /* the sloped edge of the side needs its own hairline; clip-path cut through the inset one */
  .side::before {
    content: '';
    position: absolute;
    left: 130px;
    top: 0;
    width: 220.23px;
    height: 1px;
    background: rgba(23, 24, 27, 0.12);
    transform-origin: 0 0;
    transform: rotate(50.53deg);
  }

  .vent {
    position: absolute;
    left: 160px;
    width: 86px;
    height: 9px;
    border-radius: 5px;
    background: #d2cfc7;
    box-shadow: inset 0 1px 2px rgba(23, 24, 27, 0.16);
  }

  .vent:nth-child(1) { top: 232px; }
  .vent:nth-child(2) { top: 252px; }
  .vent:nth-child(3) { top: 272px; }

  .base-front {
    left: 287.71px;
    top: 488px;
    width: 372px;
    height: 26px;
    transform: var(--iso);
    background: #ecebe6;
  }

  .base-side {
    left: 609.87px;
    top: 674px;
    width: 180px;
    height: 26px;
    transform: var(--iso-side);
    background: #d9d6cf;
  }

  /* ---------- the screen ---------- */

  .screen {
    position: absolute;
    left: 24px;
    top: 22px;
    width: 372px;
    height: 286px;
    overflow: hidden;
    border-radius: 10px;
    background: #1f2125;
    box-shadow: 0 0 0 1px rgba(23, 24, 27, 0.18), inset 0 0 0 1px rgba(0, 0, 0, 0.3);
  }

  .glass-off {
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 90% at 30% 20%, #34373d, #1d1f23 70%);
  }

  .power {
    position: absolute;
    inset: 0;
    transform-origin: 50% 50%;
    transform: scale(1, 0.004);
    opacity: 0;
  }

  .flash {
    position: absolute;
    inset: 0;
    background: #fff;
    opacity: 0;
    pointer-events: none;
  }

  .glare {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(118deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 34%);
    box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.12);
    pointer-events: none;
  }

  .editor {
    position: absolute;
    inset: 0;
    background: #f9f8f6;
    color: #2a2c31;
    font-size: 7.5px;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
  }

  .titlebar {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 6px 0 8px;
    border-bottom: 1px solid #e7e5e0;
    background: #ffffff;
  }

  .lights { display: flex; gap: 3px; }
  .lights i { width: 5px; height: 5px; border-radius: 50%; background: #dcd9d3; }
  .title { flex: 1; color: #6f727a; font-weight: 500; }

  .export {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 13px;
    overflow: hidden;
    border-radius: 7px;
    background: var(--accent);
    color: #fff;
    font-weight: 650;
    font-size: 7px;
    transition: box-shadow 200ms ease;
  }

  .export-fill {
    position: absolute;
    inset: 0;
    background: var(--accent-ink);
    transform-origin: 0 50%;
    transform: scaleX(0);
  }

  .export-label, .export-done { position: relative; display: inline-flex; align-items: center; gap: 2px; }
  .export-done { display: none; }
  .export-done svg, .toast svg { width: 8px; height: 8px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .export.is-done .export-label { display: none; }
  .export.is-done .export-done { display: inline-flex; }
  .export.is-hover { box-shadow: 0 0 0 2px var(--accent-soft), 0 0 0 3px var(--accent); }

  .pane-title { margin: 0 0 5px; color: #2a2c31; font-weight: 650; font-size: 7.5px; }
  .pane-gap { margin-top: 10px; }

  .bin {
    position: absolute;
    left: 6px;
    top: 26px;
    width: 84px;
    height: 150px;
    padding: 6px 5px;
    border: 1px solid #e7e5e0;
    border-radius: 5px;
    background: #fff;
  }

  .bin-item {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 0 4px;
    align-items: center;
    margin-bottom: 4px;
    padding: 3px;
    border-radius: 4px;
    transition: background-color 160ms ease, box-shadow 160ms ease;
  }

  .bin-item.is-hover { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
  .bin-name { overflow: hidden; font-weight: 500; font-size: 6.5px; white-space: nowrap; text-overflow: ellipsis; }
  .bin-meta { grid-column: 2; color: #8a8d94; font-size: 6px; }

  .thumb { grid-row: span 2; display: block; width: 22px; height: 14px; border-radius: 2px; }
  .thumb-a { background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 30%, #f1ebe4) 0 55%, #5d6169 55% 75%, #9ea6ad 75%); }
  .thumb-b { background: linear-gradient(135deg, #c9ccd1, #8f949c); }
  .thumb-c { background: repeating-linear-gradient(90deg, #cfd2d6 0 1px, #eef0f2 1px 3px); }

  .viewer { position: absolute; left: 96px; top: 26px; width: 180px; height: 150px; }

  .frame {
    position: relative;
    width: 180px;
    height: 101px;
    overflow: hidden;
    border-radius: 4px;
    background: #ecebe7;
  }

  .frame-empty {
    position: absolute;
    inset: 6px;
    display: grid;
    place-items: center;
    border: 1px dashed #c8c6c0;
    border-radius: 3px;
    color: #8a8d94;
    font-size: 7px;
    transition: opacity 240ms ease;
  }

  .frame-shot {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 12%, #f2f2f0), color-mix(in oklab, var(--accent) 34%, #e7e7e4));
    transition: opacity 320ms ease;
  }

  .frame-shot i { position: absolute; display: block; }
  .sun { left: 118px; top: 18px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-light); box-shadow: 0 0 18px var(--accent-light); }
  .ridge-back { left: 0; right: 0; bottom: 30px; height: 46px; background: #9c9ea1; clip-path: polygon(0 100%, 0 60%, 16% 30%, 28% 52%, 44% 8%, 58% 46%, 72% 22%, 86% 50%, 100% 34%, 100% 100%); }
  .ridge-front { left: 0; right: 0; bottom: 26px; height: 32px; background: #4c4e52; clip-path: polygon(0 100%, 0 46%, 12% 62%, 30% 18%, 46% 58%, 62% 36%, 80% 70%, 100% 40%, 100% 100%); }
  .lake { left: 0; right: 0; bottom: 0; height: 27px; background: linear-gradient(180deg, #727477, color-mix(in oklab, var(--accent) 22%, #d9d9da)); }

  .placed .frame-empty { opacity: 0; }
  .placed .frame-shot { opacity: 1; }

  .caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 9px;
    margin: 0;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: -0.01em;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  }

  .caption span {
    display: inline-block;
    padding: 0 2px;
    border-radius: 3px;
    opacity: 0;
    transform: translateY(3px) scale(0.96);
    transition: opacity 180ms var(--ease-out), transform 220ms var(--ease-out), background-color 160ms ease;
  }

  .caption span.is-on { opacity: 1; transform: none; }
  .caption span.is-current { background: var(--accent); text-shadow: none; }

  .transport {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    padding: 0 2px;
    color: #6f727a;
    font-size: 6.5px;
  }

  .buttons { display: flex; gap: 7px; align-items: center; }
  .tri { width: 0; height: 0; border-left: 6px solid #3a3d43; border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent; }
  .tri-back, .tri-fwd { border-left-width: 4px; opacity: 0.55; }
  .tri-back { transform: scaleX(-1); }

  .inspector {
    position: absolute;
    left: 282px;
    top: 26px;
    width: 84px;
    height: 150px;
    padding: 6px;
    border: 1px solid #e7e5e0;
    border-radius: 5px;
    background: #fff;
  }

  .row { display: flex; justify-content: space-between; margin: 0 0 3px; color: #8a8d94; font-size: 6.5px; }
  .row b { color: #2a2c31; font-weight: 600; }

  .render { height: 3px; margin-top: 6px; overflow: hidden; border-radius: 2px; background: #eceae5; }
  .render i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

  .timeline {
    position: absolute;
    left: 6px;
    top: 182px;
    width: 360px;
    height: 98px;
    padding: 0 4px;
    border: 1px solid #e7e5e0;
    border-radius: 5px;
    background: #fff;
  }

  .ruler {
    display: flex;
    justify-content: space-between;
    height: 13px;
    margin-left: 18px;
    padding: 3px 0 0;
    border-bottom: 1px solid #efede8;
    color: #9a9da3;
    font-size: 5.5px;
  }

  .track { position: relative; display: flex; align-items: center; margin-top: 4px; }
  .track-label { width: 18px; color: #8a8d94; font-weight: 600; font-size: 6px; }
  .lane { position: relative; flex: 1; height: 100%; border-radius: 3px; background: #f4f3ef; }
  .track-v1 { height: 26px; }
  .track-c1 { height: 16px; }
  .track-a1 { height: 20px; }

  /* the clip: three pieces that read as one until the cuts show their seams */
  .seg {
    position: absolute;
    top: 2px;
    bottom: 2px;
    opacity: 0;
    background:
      repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px 15px),
      linear-gradient(180deg, color-mix(in oklab, var(--accent) 88%, white), var(--accent));
    transition: box-shadow 160ms ease;
  }

  .seg-a { left: 0; width: 36%; border-radius: 3px 0 0 3px; }
  .seg-b { left: 36%; width: 24%; }
  .seg-c { left: 60%; width: 30%; border-radius: 0 3px 3px 0; }
  .seg.is-selected { box-shadow: inset 0 0 0 1.5px #17181b, 0 2px 6px rgba(23, 24, 27, 0.25); }

  .seam { position: absolute; top: 0; bottom: 0; width: 1.5px; margin-left: -0.75px; background: #fff; opacity: 0; }
  .seam::before { content: ''; position: absolute; top: -3px; left: -2.25px; border: 3px solid transparent; border-top-color: #17181b; }
  .seam-a { left: 36%; }
  .seam-b { left: 60%; }
  .seam.is-on { opacity: 1; }

  .point { position: absolute; top: 50%; width: 0; height: 0; }
  .point-drop { left: 45%; }
  .point-a { left: 36%; }
  .point-b { left: 60%; }

  .chip {
    position: absolute;
    top: 2px;
    bottom: 2px;
    display: grid;
    place-items: center;
    border-radius: 3px;
    background: var(--accent-soft);
    color: var(--accent-ink);
    font-style: normal;
    font-weight: 650;
    font-size: 6px;
    opacity: 0;
    transform: scale(0.94);
    transition: opacity 180ms var(--ease-out), transform 220ms var(--ease-out);
  }

  .chip:nth-child(1) { left: 2%; width: 18%; }
  .chip:nth-child(2) { left: 21%; width: 11%; }
  .chip:nth-child(3) { left: 33%; width: 30%; }
  .chip.is-on { opacity: 1; transform: none; }

  .wave {
    position: absolute;
    top: 3px;
    bottom: 3px;
    opacity: 0;
    background: repeating-linear-gradient(90deg, #b9bcc2 0 1px, transparent 1px 3px);
    mask-image: linear-gradient(180deg, transparent 0 10%, #000 30% 70%, transparent 90%);
    transition: opacity 240ms ease;
  }

  .wave-a { left: 0; width: 36%; }
  .wave-b { left: 36%; width: 24%; }
  .wave-c { left: 60%; width: 30%; }

  .playhead {
    position: absolute;
    left: 22px;
    top: 10px;
    bottom: 4px;
    width: 1px;
    background: #17181b;
    opacity: 0;
    transition: opacity 200ms ease;
  }

  .playhead::before { content: ''; position: absolute; top: -2px; left: -3px; width: 7px; height: 5px; border-radius: 1.5px; background: var(--accent); }
  .placed .playhead { opacity: 1; }

  .toast {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 7px;
    border-radius: 6px;
    background: #17181b;
    color: #fff;
    font-weight: 550;
    font-size: 6.5px;
    box-shadow: 0 6px 16px -4px rgba(23, 24, 27, 0.4);
    opacity: 0;
    transform: translateY(6px) scale(0.97);
    transition: opacity 220ms var(--ease-out), transform 260ms var(--ease-out);
  }

  .toast svg { color: var(--accent-light); }
  .toast.is-on { opacity: 1; transform: none; }

  .ghost {
    position: absolute;
    left: 0;
    top: 0;
    padding: 2px;
    border-radius: 3px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(23, 24, 27, 0.25), 0 0 0 1px var(--accent);
    opacity: 0;
  }

  .ghost .thumb { width: 34px; height: 20px; }

  .contact, .ring {
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
  }

  .contact {
    width: 52px;
    height: 52px;
    margin: -26px 0 0 -26px;
    background: radial-gradient(closest-side, color-mix(in oklab, var(--accent) 70%, transparent), color-mix(in oklab, var(--accent) 22%, transparent) 55%, transparent);
    mix-blend-mode: multiply;
  }

  .ring {
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 1.5px solid var(--accent);
  }

  .chin { position: absolute; left: 24px; right: 24px; top: 314px; height: 50px; display: flex; align-items: center; gap: 14px; }
  .badge { color: #9c9a94; font-weight: 700; font-size: 9px; letter-spacing: 0.24em; }
  .grill { display: flex; gap: 4px; margin-left: auto; }
  .grill i { width: 30px; height: 3px; border-radius: 2px; background: #e2e0da; }
  .led { width: 6px; height: 6px; border-radius: 50%; background: #cfccc5; transition: background-color 200ms ease, box-shadow 200ms ease; }
  .led.is-on { background: var(--accent); box-shadow: 0 0 8px 1px var(--accent-glow); }

  /* ---------- keyboard: 380 x 128 top on the floor in front of the monitor ---------- */

  .kb-top {
    left: 143.95px;
    top: 491px;
    width: 380px;
    height: 128px;
    transform: matrix(0.8660254, 0.5, -0.8660254, 0.5, 0, 0);
    background: #fdfdfc;
  }

  .kb-front {
    left: 33.1px;
    top: 555px;
    width: 380px;
    height: 12px;
    transform: var(--iso);
    background: #ebe9e4;
  }

  .kb-side {
    left: 362.19px;
    top: 745px;
    width: 128px;
    height: 12px;
    transform: var(--iso-side);
    background: #dcd9d2;
  }

  .keys {
    position: absolute;
    inset: 10px;
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 4px;
  }

  .key {
    --glow: 0;
    border-radius: 3px;
    background: color-mix(in oklab, var(--accent) calc(var(--glow) * 100%), #f0efea);
    box-shadow:
      0 1.5px 0 #d6d3cc,
      0 0 calc(var(--glow) * 16px) calc(var(--glow) * 2px) color-mix(in oklab, var(--accent) calc(var(--glow) * 70%), transparent);
  }

  .key-space { grid-column: span 8; }

  /* ---------- orb, beam ---------- */

  .beam { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
  .beam line { stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 2 5; opacity: 0; }

  .orb {
    --orb-tint: var(--accent);
    position: absolute;
    left: 0;
    top: 0;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    transform: translate(844px, 148px);
    will-change: transform;
  }

  /* The halo keeps the dark glass orb crisp on a white ground. */
  .orb::before {
    content: '';
    position: absolute;
    inset: -22px;
    border-radius: 50%;
    background: radial-gradient(closest-side, var(--accent-glow), transparent);
  }

  .orb::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: 0 14px 28px -10px rgba(23, 24, 27, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.7);
    pointer-events: none;
  }

  .orb .orb-motion { --orb-diameter: 96px; --orb-motion-distance: -4px; }
  .orb .orb-chrome { opacity: 0.7; }

  /* MatchLab's CSS glass orb (agent-chat/Orb.tsx), under the WebGL sphere until it draws. */
  .orb .orb-fallback {
    opacity: 1;
    background: radial-gradient(circle at 34% 28%, #ffffff 0%, color-mix(in oklab, var(--orb-tint) 35%, white) 22%, var(--orb-tint) 62%, color-mix(in oklab, var(--orb-tint) 70%, black) 100%);
    transition: opacity 300ms ease;
  }

  .orb .orb-live .orb-fallback { opacity: 0; }
  .orb[data-state='thinking'] .orb-fallback { animation: computer-think 1.6s ease-in-out infinite; }

  /* ---------- small screens ---------- */

  /* One column: the scene comes right after the promise, the steps follow it. */
  @media (max-width: 960px) {
    :scope { grid-template-columns: minmax(0, 1fr); gap: 0; min-height: 0; padding-top: clamp(72px, 12vh, 112px); }
    .copy { display: contents; }
    h2 { order: 1; max-width: 16ch; }
    .lead { order: 2; max-width: 46ch; }
    .scene { order: 3; max-width: 760px; margin: 12px auto 0; }
    .beats { order: 4; max-width: 560px; }
    .controls { order: 5; }
  }

  @media (max-width: 520px) {
    .beats button { grid-template-columns: 4.75rem 1fr; padding-inline: 10px; }
  }

  @media (prefers-reduced-motion: reduce) {
    .orb[data-state='thinking'] .orb-fallback { animation: none; }
    .caption span, .chip, .toast { transform: none; }
  }

  @media (prefers-reduced-transparency: reduce) {
    .glare { display: none; }
  }
}

@keyframes computer-think {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.06); filter: brightness(1.12); }
}
