/* Play — the front door (play-page.js). House tokens only; the macro tracks wear the Compose ruler's thumb and
   rail (face.css) so a control looks the same on every page. Amber = the current patch and the Play button. */

.play-card { display: none; }
.play-workspace-mode > .card:not(.play-card):not(.welcome-card),
.play-workspace-mode > .research-note,
.play-workspace-mode .dash-vsplit { display: none; }
.play-workspace-mode .play-card {
  display: block; position: absolute; top: 44px; left: 4px; right: 4px; bottom: var(--ws-bottom); z-index: 2;
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  padding: 18px clamp(16px, 2.2vw, 32px) 28px; background: none; border: 0; box-shadow: none;
}
.play-card * , .play-card *::before, .play-card *::after { box-sizing: border-box; }
.play-card > * { max-width: 1480px; margin-left: auto; margin-right: auto; }
.play-card h3 { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--face-quiet); }

/* ── the hero: one well holding the patch and its disc; the macros beside it ── */
.pl-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); gap: 16px; align-items: stretch; }
.pl-stage { position: relative; display: grid; grid-template-columns: minmax(250px, 330px) minmax(0, 1fr); border-radius: var(--radius); background: var(--ae-well); box-shadow: var(--elev-1);
  min-height: clamp(440px, calc(100vh - 340px), 620px); overflow: hidden; }
.pl-disc-wrap { position: relative; min-width: 0; }
.pl-disc { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: pointer; }
.pl-disc:focus-visible { outline: 2px solid var(--face-sel); outline-offset: -4px; border-radius: var(--radius); }

.pl-side { display: flex; flex-direction: column; min-width: 0; }
.pl-now { display: flex; flex-direction: column; padding: 26px 0 22px 28px; min-width: 0; }
.pl-now-tags { display: flex; gap: 6px; min-height: 22px; }
.pl-chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--text2); background: var(--surface2); }
.pl-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--chip, var(--text3)); }
.pl-chip-quiet::before { display: none; }
.pl-name { margin: 12px 0 0; font-size: 30px; line-height: 1.12; font-weight: 600; letter-spacing: -0.015em; color: var(--text); text-wrap: balance; }
.pl-desc { margin: 10px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--text2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pl-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.pl-go, .pl-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 42px; padding: 0 20px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 120ms ease, border-color 120ms ease, color 120ms ease; }
.pl-go svg, .pl-btn svg { width: 17px; height: 17px; flex: none; }
.pl-go { min-width: 108px; color: var(--bg); background: var(--accent); border: 1px solid var(--accent); }
.pl-go:hover { background: var(--accent2); border-color: var(--accent2); }
.pl-go.on { color: var(--accent); background: none; }
.pl-go.on:hover { background: var(--ae-accent-15); }
.pl-btn { color: var(--text); background: var(--surface2); border: 1px solid var(--border2); }
.pl-btn:hover { border-color: var(--text3); }
.pl-go:focus-visible, .pl-btn:focus-visible, .pl-link:focus-visible, .pl-mood:focus-visible, .pl-tile:focus-visible, .pl-door:focus-visible { outline: 2px solid var(--face-sel); outline-offset: 3px; }
.pl-key { margin: auto 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--face-quiet); }
.pl-key span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pl-key i { width: 14px; height: 4px; border-radius: 2px; background: var(--ae-walk-60); }
.pl-key i.k-home { background: var(--rootc); }
.pl-key i.k-surp { background: var(--surp); }

/* ── the macros ── */
.pl-macs { flex: 1; display: flex; flex-direction: column; padding: 14px 22px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.pl-macs-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; min-height: 28px; }
.pl-link { position: relative; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12px; color: var(--text2); background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap; }
.pl-link::before { content: ""; position: absolute; inset: -12px -6px; }
.pl-link svg { width: 14px; height: 14px; }
.pl-link:hover:not(:disabled) { color: var(--text); }
.pl-link:disabled { color: var(--face-quiet); cursor: default; opacity: 0.6; }

.pl-mac { --m: 0; padding: 8px 0 4px; }
.pl-mac + .pl-mac { border-top: 1px solid var(--face-line); }
.pl-mac-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pl-mac-name { font-size: 14px; font-weight: 600; color: var(--text); }
.pl-mac-word { font-size: 12px; color: var(--face-quiet); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl-mac.moved .pl-mac-word { color: var(--text2); }
.pl-mac-track { position: relative; height: 28px; margin: 0 calc(var(--face-thumb-w) / 2); cursor: ew-resize; touch-action: pan-y; outline: none; -webkit-user-select: none; user-select: none; }
.pl-mac-track::before { content: ""; position: absolute; inset: 0 calc(var(--face-thumb-w) / -2); }   /* the whole row is the hit area */
.pl-mac-rail { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--face-base); }
.pl-mac-mid { position: absolute; left: 50%; top: calc(50% - 7px); width: 1px; height: 14px; background: var(--face-tick-major); }
.pl-mac-fill { position: absolute; top: calc(50% - 1.5px); height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--ae-walk) 55%, transparent);
  left: calc(50% + min(0, var(--m)) * 50%); width: calc(max(var(--m), -1 * var(--m)) * 50%); }
.pl-mac-thumb { position: absolute; top: calc(50% - 8px); left: calc(50% + var(--m) * 50%); width: var(--face-thumb-w); height: 16px; margin-left: calc(var(--face-thumb-w) / -2); border-radius: 8px;
  background: var(--ae-walk); box-shadow: 0 0 0 2px var(--knob-ring); transition: transform 120ms ease; }
.pl-mac-thumb::before, .pl-mac-thumb::after { content: ""; position: absolute; top: 5px; width: 1.5px; height: 6px; border-radius: 1px; background: var(--knob-ring); }
.pl-mac-thumb::before { left: 9px; } .pl-mac-thumb::after { left: 13.5px; }
.pl-mac:hover .pl-mac-thumb, .pl-mac.dragging .pl-mac-thumb { transform: scale(1.08); }
.pl-mac-track:focus-visible .pl-mac-thumb { outline: 2px solid var(--face-sel); outline-offset: 3px; }
.pl-mac.dragging .pl-mac-track { cursor: grabbing; }
.pl-mac-ends { display: flex; justify-content: space-between; margin-top: -3px; font-size: 11px; line-height: 14px; color: var(--face-quiet); }

/* what the last macro moved, value by value */
.pl-moved { margin-top: auto; padding-top: 12px; min-height: 124px; border-top: 1px solid var(--face-line); }   /* room for four rows, so the first move never pushes the patches down */
.pl-moved:empty::after { content: "Drag a control. Each one moves several settings at once."; font-size: 12px; color: var(--face-quiet); }
.pl-moved-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text2); margin-bottom: 6px; }
.pl-moved ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.pl-moved li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; column-gap: 7px; align-items: baseline; font-size: 12px; color: var(--face-quiet); }
.pl-moved li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-moved li b { font: 400 12px var(--mono); font-variant-numeric: tabular-nums; color: var(--text2); text-align: right; }
.pl-moved li b.to { color: var(--text); }
.pl-moved li i { font-style: normal; color: var(--face-quiet); }
.pl-moved li.same b { color: var(--face-quiet); }

/* ── the patches ── */
.pl-lib { margin-top: 26px; }
.pl-lib-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 14px; }
.pl-moods { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-mood { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border-radius: 999px; font: inherit; font-size: 13px; color: var(--text2); background: none; border: 1px solid var(--border2); cursor: pointer; }
.pl-mood::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--chip); }
.pl-mood[data-mood="all"]::before { display: none; }
.pl-mood:hover { color: var(--text); border-color: var(--text3); }
.pl-mood.on { color: var(--text); background: var(--surface2); border-color: var(--text3); font-weight: 600; }
.pl-n { font: 400 11px var(--mono); font-variant-numeric: tabular-nums; color: var(--face-quiet); }

.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 10px; content-visibility: auto; contain-intrinsic-size: auto 600px; }
.pl-tile { position: relative; display: grid; grid-template-rows: 46px auto auto; gap: 2px; padding: 10px 12px 11px; text-align: left; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border); cursor: pointer; font: inherit; color: var(--text); transition: border-color 120ms ease, background 120ms ease; }
.pl-tile[hidden] { display: none; }
.pl-tile:hover { border-color: var(--text3); background: var(--surface2); }
.pl-tile.current { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pl-art { width: 100%; height: 40px; color: var(--chip); margin-bottom: 4px; }
.pl-tile-name { font-size: 13px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* On the shelf the name is what tells two patches apart: two lines, never cut mid-word. */
.of-tile .pl-tile-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 2.6em; }
.pl-tile-mood { font-size: 11.5px; color: var(--face-quiet); }

/* ── further ── */
.pl-doors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 26px; }
.pl-door { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left;
  padding: 13px 16px; border-radius: var(--radius-sm); background: none; border: 1px solid var(--border); font: inherit; cursor: pointer; color: var(--text); }
.pl-door b { font-size: 14px; font-weight: 600; }
.pl-door span { grid-row: 2; font-size: 12px; color: var(--face-quiet); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-door svg { grid-row: 1 / 3; grid-column: 2; width: 16px; height: 16px; color: var(--face-quiet); transition: transform 120ms ease; }
.pl-door:hover { border-color: var(--text3); }
.pl-door:hover svg { transform: translateX(2px); color: var(--text); }

/* ── narrower ── */
@media (max-width: 1279px) {
  .pl-hero { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); }
  .pl-stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(300px, 1fr); }
  .pl-now { padding: 22px 22px 0; }
  .pl-name { font-size: 26px; }
  .pl-key { margin-top: 14px; }
  .pl-doors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .pl-hero { grid-template-columns: minmax(0, 1fr); }
  .pl-stage { grid-template-rows: auto min(78vw, 440px); min-height: 0; }
}
@media (max-width: 699px) {
  .play-workspace-mode .play-card { padding: 12px 12px 24px; }
  .pl-now { padding: 18px 16px 0; }
  .pl-macs { padding-left: 16px; padding-right: 16px; }
  .pl-name { font-size: 24px; }
  .pl-acts > * { flex: 1; }
  .pl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pl-doors { grid-template-columns: minmax(0, 1fr); }
}
@media (pointer: coarse), (max-width: 699px) {
  .pl-mac-track { height: 44px; }
  .pl-mood { height: 40px; }
  .pl-go, .pl-btn { height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .pl-mac-thumb, .pl-door svg, .pl-tile, .pl-go, .pl-btn { transition: none; }
  .pl-mac:hover .pl-mac-thumb, .pl-mac.dragging .pl-mac-thumb, .pl-door:hover svg { transform: none; }
}
/* phone: the page scrolls as Compose's does, under the sticky two-row bar (review PLAY-1 M5: a fixed top: 44px sat under it) */
@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) {
  body.explore-mode:has(.play-workspace-mode) { overflow-y: auto; height: auto; }
  body.explore-mode:has(.play-workspace-mode) #app,
  body.explore-mode:has(.play-workspace-mode) .view { height: auto; min-height: 100dvh; }
  .explore-dashboard.play-workspace-mode { display: block; min-height: 0; height: auto; overflow: visible; }
  .play-workspace-mode .play-card { position: static; overflow: visible; margin-top: 8px; }
  .pl-grid { content-visibility: visible; }
}

/* ── the orb field (orb-field.js; docs/PLAY_ORBS_DESIGN.md) ──
   Colour: the well and hairlines of the disc it replaces; orbs wear their mood hue (data), amber marks the orb that
   keeps the clock and the Play button. Type: the house face; tempo in --mono tabular. Layout: a slim bar, one well
   the orbs hang in left to right in the order they came, the shelf of patches below. */
.play-workspace-mode .of-card { display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.of-card > * { width: 100%; }
.of-hero { position: absolute; z-index: 2; top: 22px; left: 26px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; max-width: min(46ch, 60%); }
.of-tempo { pointer-events: auto; align-self: flex-start; display: inline-flex; align-items: baseline; gap: 7px; cursor: ns-resize; touch-action: none; -webkit-user-select: none; user-select: none; border-radius: var(--radius-sm); }
.of-tempo-n { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 46px; line-height: 1; font-weight: 500; letter-spacing: -0.02em; color: var(--text); }
.of-tempo-u { font-size: 13px; color: var(--face-quiet); }
.of-well.empty .of-tempo { display: none; }
.of-tempo:hover .of-tempo-n { color: var(--accent2); }
.of-tempo:focus-visible, .of-hit:focus-visible { outline: 2px solid var(--face-sel); outline-offset: 4px; }
.of-key { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.of-key b { font-size: 17px; font-weight: 600; color: var(--text); }
.of-key span { font-size: 13px; line-height: 1.45; color: var(--text2); }
/* Empty stage: the one action that fills it, under the idle orb. */
.of-start { position: absolute; z-index: 2; left: 0; right: 0; bottom: 64px; width: max-content; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.of-start > span { font-size: 13px; color: var(--text2); }
/* Empty, the heading lives with its one action (judges: heading top-left, button centre, the eye travels). */
.of-well.empty .of-hero { display: none; }
.of-start > b { font-size: 19px; font-weight: 600; color: var(--text); }
.of-start > .of-start-sub { margin: -4px 0 6px; font-size: 13.5px; color: var(--text2); }
.of-acts { position: absolute; z-index: 6; top: 22px; right: 22px; display: flex; gap: 8px; }
.of-well { position: relative; flex: 1; min-height: clamp(360px, 60vh, 760px); border-radius: var(--radius); background: var(--ae-well); box-shadow: var(--elev-1); overflow: hidden; }
.of-well.drop { box-shadow: var(--elev-1), inset 0 0 0 2px var(--face-sel); }
.of-canvas, .of-arcs { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.of-arcs { pointer-events: none; overflow: visible; z-index: 5; }   /* the dial is always above every orb and its buttons */
.of-hits { position: absolute; inset: 0; z-index: 1; }   /* its own layer, under the dial: a hovered orb can rise within it, never over the arcs */
.of-slot { position: absolute; }
.of-hit { position: absolute; inset: 0; border-radius: 50%; border: 0; padding: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* the one-click buttons — lead, new take, mute, solo — sit in a curved row under the orb (and under its dial when selected). On hover (touch: once selected)
   they bloom out of the rim one after another, with a little give; a mute or solo that is on stays out, filled. */
.of-rb { position: absolute; z-index: 1; width: 24px; height: 24px; margin: -12px 0 0 -12px; display: grid; place-items: center; padding: 0; border-radius: 50%;
  font: 700 10.5px/1 var(--font); letter-spacing: 0.02em; color: var(--text2); background: var(--surface); border: 1px solid var(--border2); cursor: pointer;
  opacity: 0; pointer-events: none; transform: translate(var(--fx), var(--fy)) scale(0.35);
  /* folding back waits a moment, so a pointer that overshoots on its way to a button does not lose it */
  transition: transform 200ms ease 220ms, opacity 160ms ease 220ms, color 120ms ease, border-color 120ms ease, background 120ms ease; }
.of-rb svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.of-rb:hover { color: var(--text); border-color: var(--text3); }
.of-rb:focus-visible { outline: 2px solid var(--face-sel); outline-offset: 2px; }
.of-rb:focus-visible, .of-hit:focus-visible ~ .of-rb, .of-mute.on, .of-solo.on { opacity: 1; pointer-events: auto; transform: none; }
.of-lead { color: var(--accent); }
.of-lead svg { width: 12px; height: 12px; stroke-width: 1.4; }
.of-lead svg .in { fill: currentColor; stroke: none; }
.of-lead:hover { color: var(--accent); border-color: var(--accent); }
.of-mute.on, .of-solo.on { color: var(--bg); border-color: transparent; }
.of-mute.on { background: var(--text2); }
.of-solo.on { background: var(--text); }
@media (hover: hover) {
  .of-slot:hover .of-rb { opacity: 1; pointer-events: auto; transform: none;
    transition: transform 240ms cubic-bezier(.34, 1.5, .64, 1) calc(var(--i, 0) * 45ms), opacity 160ms ease calc(var(--i, 0) * 45ms), color 120ms ease, border-color 120ms ease, background 120ms ease; }
  /* a hover bridge: once the orb is hovered, an invisible cup under it, over its row of buttons, keeps it hovered across the gap */
  .of-slot::after { content: ""; position: absolute; z-index: -1; pointer-events: none;
    left: min(0px, calc(50% - 70px)); right: min(0px, calc(50% - 70px)); top: 55%; bottom: calc(var(--r) * -0.62 - 44px);
    border-radius: 0 0 50% 50% / 0 0 70% 70%; }
  .of-slot:hover::after { pointer-events: auto; }
  .of-slot:hover { z-index: 60 !important; }
}
@media (hover: none) { .of-slot.sel .of-rb { opacity: 1; pointer-events: auto; transform: none; } }
.of-well.dragging .of-rb { opacity: 0 !important; pointer-events: none !important; }
@media (pointer: coarse) { .of-rb { width: 34px; height: 34px; margin: -17px 0 0 -17px; font-size: 12px; } }
.of-hit { touch-action: none; }
.of-well.dragging, .of-well.dragging .of-hit { cursor: grabbing; }
/* the bin: only while an orb is held; it opens when the orb is over it */
.of-bin { position: absolute; z-index: 4; left: 22px; bottom: 22px;   /* the corner away from the panel */
  display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none;
  opacity: 0; transform: translateY(10px) scale(0.9); transition: opacity 160ms ease, transform 220ms cubic-bezier(.34, 1.5, .64, 1); }
.of-bin svg { width: 30px; height: 30px; padding: 15px; box-sizing: content-box; border-radius: 50%; fill: none; stroke: var(--text2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  background: var(--surface); border: 1px solid var(--border2); transition: stroke 120ms ease, border-color 120ms ease, background 120ms ease; }
.of-bin .lid { transform-origin: 19px 7px; transition: transform 160ms ease; }
.of-bin span { font-size: 11.5px; color: var(--face-quiet); }
.of-bin.show { opacity: 1; transform: none; }
.of-bin.hot svg { stroke: var(--red); border-color: var(--red); background: var(--surface2); }
.of-bin.hot .lid { transform: translateY(-1.5px) rotate(20deg); }   /* hinged at its right end: the left end lifts open */
.of-bin.hot span { color: var(--text); }
@media (prefers-reduced-motion: reduce) { .of-rb, .of-bin, .of-bin .lid { transition: none; } }
.of-arc { pointer-events: auto; cursor: grab; outline: none; }
.of-arc-hit { fill: none; stroke: transparent; stroke-width: 26; }
.of-tick { stroke: var(--face-base); stroke-width: 1.25; stroke-linecap: round; transition: stroke 160ms ease; }
.of-tick.mid { stroke: var(--face-tick-major); }
.of-tick.on { stroke: var(--hue, var(--text2)); }
.of-arc:hover .of-tick:not(.on) { stroke: var(--face-tick-major); }
.of-arc-thumb { stroke: var(--hue, var(--text)); stroke-width: calc(2.5px + var(--lv, 0) * 1.5px); stroke-linecap: round; }
.of-arc:hover .of-arc-thumb { stroke-width: calc(3.5px + var(--lv, 0) * 1.5px); }
.of-arc-name { fill: var(--face-quiet); font-size: 12px; font-weight: 600; }
.of-arc.moved .of-arc-name, .of-arc:hover .of-arc-name { fill: var(--text); }
.of-arc:focus-visible .of-arc-thumb { stroke-width: 6px; }
.of-arc:focus-visible .of-tick { stroke: var(--face-sel); }
.of-arc:focus-visible .of-arc-rail { stroke: var(--face-sel); }
.of-panel { position: absolute; z-index: 3; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border2); box-shadow: var(--elev-1); }
.of-p-name { margin: 0 0 4px; font-size: 15px !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--text) !important; }
.of-p-line, .of-p-hint { margin: 0 0 10px; font-size: 12.5px; line-height: 1.45; color: var(--text2); }
.of-p-hint { color: var(--face-quiet); }
.of-moved { margin: 8px 0 10px; padding-top: 8px; border-top: 1px solid var(--face-line); }
.of-moved-head { font-size: 12.5px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.of-moved p { margin: 0; font-size: 12px; color: var(--text2); }
.of-moved ul { list-style: none; margin: 0; padding: 0; }
.of-moved li { display: flex; gap: 6px; align-items: baseline; font-size: 12px; line-height: 20px; color: var(--text2); }
.of-moved li > span { flex: 1; }
.of-moved li b { font-weight: 500; color: var(--text2); font-variant-numeric: tabular-nums; }
.of-moved li b.to { color: var(--text); }
.of-moved li.same { opacity: 0.6; }
.of-p-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.of-p-acts .pl-btn { height: 32px; padding: 0 12px; font-size: 12.5px; }
.of-shelf { flex: none; display: flex; flex-direction: column; gap: 8px; }
.of-tiles { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 4px; }
.of-tile { cursor: grab; }
@media (max-width: 640px) {
  .of-hero { top: 14px; left: 16px; max-width: 58%; }
  .of-tempo-n { font-size: 34px; }
  .of-key b { font-size: 15px; } .of-key span { display: none; }
  .of-acts { top: 14px; right: 14px; left: 14px; flex-wrap: wrap; justify-content: flex-end; }   /* a row of its own; the readout sits under it */
  .of-hero { max-width: none; right: 16px; }
  .of-tiles { grid-auto-columns: 128px; }
}
@media (pointer: coarse) { .of-p-acts .pl-btn { height: 44px; } }
.pl-go:disabled, .pl-btn:disabled { opacity: 0.45; cursor: default; }
@media (max-width: 640px) {
  .of-panel { overflow-y: auto; overscroll-behavior: contain; padding: 12px 14px; }
  .of-p-hint { display: none; }
}


/* the "every patch" dial in the panel, round a small picture of the field */
.of-fdial { display: block; margin: 2px auto 4px; overflow: visible; --hue: var(--text2); }
.of-fdots circle { opacity: 0.9; }
/* placement: one pad for pan and level */
.of-place { margin: 6px 0 8px; }
.of-pad { display: block; margin: 0 auto; cursor: crosshair; touch-action: none; border-radius: var(--radius-sm); outline: none; }
.of-pad:focus-visible { outline: 2px solid var(--face-sel); outline-offset: 4px; }
.of-pad-ring, .of-pad-spoke { fill: none; stroke: var(--face-line); stroke-width: 1; }
.of-pad-centre { stroke: var(--face-tick-major); stroke-width: 1; stroke-dasharray: 2 3; }
.of-pad-lbl { fill: var(--face-quiet); font-size: 11px; font-weight: 600; }
.of-pad-you { fill: none; stroke: var(--text2); stroke-width: 1.5; stroke-linecap: round; }
.of-pad-tether { stroke: var(--hue); stroke-width: 1; opacity: 0.45; }
.of-pad-halo { fill: none; stroke: var(--hue); stroke-width: 1.25; opacity: 0.5; }
.of-pad-dot { fill: var(--hue); }
.of-pad-words { margin: 4px 0 0; text-align: center; font-size: 12px; color: var(--text2); font-variant-numeric: tabular-nums; }
.of-moved:empty { display: none; }
.of-roll svg { width: 14px; height: 14px; stroke-width: 1.2; fill: none; stroke: currentColor; }
.of-roll svg .in { fill: currentColor; stroke: none; }
.of-roll.spin svg { animation: of-roll 420ms cubic-bezier(.34, 1.4, .64, 1); }
@keyframes of-roll { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .of-roll.spin svg { animation: none; } }
/* the palette menu: save the field, bring one back, take it into Arrange */
.of-palbtn svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.of-acts { align-items: flex-start; }
.of-palmenu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 8; width: 300px; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border2); box-shadow: var(--elev-1);
  display: flex; flex-direction: column; gap: 10px; }
.of-palsave { display: flex; gap: 6px; }
.of-palsave input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--border2); background: var(--bg); color: var(--text); font: inherit; font-size: 13px; }
.of-palsave input:focus-visible { outline: 2px solid var(--face-sel); outline-offset: 1px; }
.of-palsave .pl-btn, .of-palstudio { height: 34px; padding: 0 12px; font-size: 13px; }
.of-palhead { margin: 2px 0 -4px; font-size: 12px; font-weight: 600; color: var(--face-quiet); }
.of-palnone { margin: 0; font-size: 12.5px; color: var(--text2); }
.of-pallist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; max-height: 220px; overflow-y: auto; }
.of-pallist li { display: flex; align-items: stretch; border-radius: var(--radius-sm); }
.of-pallist li:hover { background: var(--surface2); }
.of-palload { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 8px; background: none; border: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; border-radius: var(--radius-sm); }
.of-palload b { font-size: 13px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.of-palload span { font-size: 11.5px; color: var(--face-quiet); font-variant-numeric: tabular-nums; }
.of-paldel { width: 30px; background: none; border: 0; color: var(--face-quiet); font-size: 16px; cursor: pointer; border-radius: var(--radius-sm); }
.of-paldel:hover { color: var(--text); }
.of-palload:focus-visible, .of-paldel:focus-visible, .of-palstudio:focus-visible { outline: 2px solid var(--face-sel); outline-offset: -2px; }
.of-palstudio { height: auto !important; padding: 9px 12px !important; flex-direction: column; align-items: flex-start !important; gap: 2px !important; border-radius: var(--radius-sm) !important; text-align: left; }
.of-palstudio span { font-size: 11.5px; font-weight: 400; color: var(--text2); }
.of-palmenu[hidden], .of-panel[hidden] { display: none; }

/* buttons keep one size whatever the orb's depth or growth (the slot scales with the orb) */
.of-rb { scale: var(--inv, 1); }
/* a selected orb: its buttons sit in a row under its dial and stay out; no hover cap, so the dial is free to grab */
.of-slot.sel .of-rb { opacity: 1; pointer-events: auto; transform: none; }
.of-slot.sel::after { display: none; }
/* unpredictability (predictability.js): a heat dial — cool (the same every time round) to hot (new every time) in
   five flat steps — and the percentage */
.of-heat { display: block; overflow: visible; }
.of-heat path { fill: none; stroke-width: var(--sw); stroke-linecap: butt; }
.of-heat .hd-s0 { stroke: var(--res); } .of-heat .hd-s1 { stroke: var(--spc); } .of-heat .hd-s2 { stroke: var(--gen); }
.of-heat .hd-s3 { stroke: var(--exc); } .of-heat .hd-s4 { stroke: var(--eff); }
.of-heat .hd-n { stroke: var(--text); stroke-width: 1.5; stroke-linecap: round; }
.of-heat .hd-h { fill: var(--text); }
.of-tile-pred { float: right; display: inline-flex; align-items: flex-end; gap: 4px; margin-top: -2px; }
.of-tile-pred b { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 11px; font-weight: 500; color: var(--text2); line-height: 1; }
.of-tile-pred:empty { display: none; }
.of-p-pred { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; }
.of-p-pred > div { display: grid; grid-template-columns: auto 1fr; column-gap: 6px; align-items: baseline; }
.of-p-pred b { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 500; color: var(--text); line-height: 1.1; }
.of-p-pred span { font-size: 12.5px; color: var(--text2); }
.of-p-pred small { grid-column: 1 / -1; font-size: 12px; color: var(--face-quiet); line-height: 1.4; }

/* ── the patch forge (patch-forge.js): the machine, in 3D, makes the new patch ──
   Colour: the model's own materials and the new patch's hue (--hue); nothing is drawn over the picture. Layout: the
   film fills the screen; everything else eases out of the way and back. Motion: calm — fades and slow eases only. */
.forge { position: fixed; inset: 0; z-index: 400; opacity: 0; transition: opacity 700ms ease; }
.forge.in { opacity: 1; }
.forge.leaving { pointer-events: none; }
.forge-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: opacity 1200ms ease; }
.forge.leaving .forge-gl { opacity: 0; }
.forge-over { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }   /* the cell, handed from the film to the page */
.forge-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.forge.plain { background: var(--display); }
.forge.out { opacity: 0; }

/* everything else eases out of the way while the machine works, and back as the cell comes down */
.app-topbar, .of-hero, .of-acts, .of-start, .of-shelf, .of-panel { transition: transform 700ms cubic-bezier(.4, 0, .2, 1), opacity 600ms ease; }
body.forging .app-topbar { transform: translateY(-24px); opacity: 0; }
body.forging .of-hero, body.forging .of-acts, body.forging .of-start { transform: translateY(-20px); opacity: 0; }
body.forging .of-shelf { transform: translateY(28px); opacity: 0; }
body.forging .of-panel { transform: translateX(24px); opacity: 0; }
.of-newbtn svg { width: 15px; height: 15px; fill: currentColor; }
@media (prefers-reduced-motion: reduce) {
  .forge, .forge-gl, .app-topbar, .of-hero, .of-acts, .of-shelf, .of-panel { transition: none; }
}
/* The Palette button shows that its menu is open. */
.of-palbtn[aria-expanded="true"] { border-color: var(--text2); background: var(--surface2); }
