/* Tape Recall TR-30 · neon cassette (Nov 20 2026).
   A glowing cassette deck: the take lives in the cassette window between two neon reels,
   an LCD console runs the transport, and every effect keeps its own neon color from the
   FX rack to the lane and the area chips. */

/* Workstation master-console launcher. */
.ak-recall-launcher {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 3px;
  padding: 10px 12px;
  border: 1px solid #ff2fd066;
  border-radius: 10px;
  background: linear-gradient(180deg, #1a1c20, #0d0e10);
  box-shadow: inset 0 1px #ffffff12, 0 0 14px #ff2fd022, 0 6px 14px #0008;
  color: #f5f5f6;
  font: 700 11px/1.1 Orbitron, "Share Tech Mono", ui-monospace, monospace;
  text-align: left;
  letter-spacing: .1em;
  cursor: pointer;
}
.ak-recall-launcher > span:first-child { color: #38f3ff; font-size: 16px; text-shadow: 0 0 8px #38f3ff; }
.ak-recall-launcher small { display: block; margin-top: 3px; color: #b0b4bb; font: 400 9px "Share Tech Mono", ui-monospace, monospace; letter-spacing: .12em; }
.ak-recall-launcher b { margin-left: auto; color: #ff4fd8; font-size: 9px; white-space: nowrap; text-shadow: 0 0 6px #ff2fd0; }
.ak-recall-launcher:hover { border-color: #ff2fd0; box-shadow: inset 0 1px #ffffff12, 0 0 20px #ff2fd055; }
.ak-recall-launcher.is-locked { opacity: .7; }

/* ---------- surface ---------- */
#anvil-tape-recall-overlay {
  --tr-bg: #0d0f11;
  --tr-card: #24282e;
  --tr-raise: #32373f;
  --tr-raise-2: #3b414a;
  --tr-line: #414751;
  --tr-line-2: #58606d;
  --tr-text: #f5f5f6;
  --tr-dim: #c4c7cc;
  --tr-faint: #8e96a4;
  --tr-cyan: #38f3ff;
  --tr-magenta: #ff2fd0;
  --tr-pink: #ff4fd8;
  --tr-yellow: #fff36b;
  --tr-red: #ff2a6d;
  --tr-orange: #ff9e1b;
  --tr-lcd: #7dfcff;
  --tr-display: Orbitron, "Share Tech Mono", ui-monospace, monospace;
  --tr-mono: "Share Tech Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --tr-sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--tr-text);
  font-family: var(--tr-sans);
}
body.ak-recall-open { overflow: hidden; }
#anvil-tape-recall-overlay[hidden] { display: none !important; }
#anvil-tape-recall-overlay:not(.ak-recall-tab-view) {
  position: fixed;
  inset: 0;
  z-index: 2147483640;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(5, 1, 12, .84);
  backdrop-filter: blur(6px);
}
#anvil-tape-recall-overlay:not(.ak-recall-tab-view) .ak-recall-panel {
  width: min(1280px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
}
#anvil-tape-recall-overlay * { box-sizing: border-box; }

.ak-recall-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--tr-line-2);
  border-radius: 18px;
  background:
    radial-gradient(90% 45% at 0% 0%, #ff2fd022, transparent 60%),
    radial-gradient(80% 50% at 100% 100%, #38f3ff16, transparent 60%),
    linear-gradient(180deg, #333840, #282c33 340px, #24272c);
  /* The deck lays itself out by its own width: it sits beside the pads on a desktop. */
  container: tr / inline-size;
  box-shadow: 0 0 0 1px #ffffff0d, 0 0 40px #ff2fd018, 0 30px 70px #0009;
  overflow: hidden;
}
.ak-recall-panel::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--tr-cyan), var(--tr-magenta) 50%, var(--tr-yellow));
  box-shadow: 0 0 12px var(--tr-magenta);
  pointer-events: none;
}

/* ---------- header ---------- */
.ak-recall-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--tr-line);
  background: linear-gradient(180deg, #ffffff0a, transparent);
  overflow: hidden;
}
/* A striped synthwave sun sinking behind the steps. */
.ak-recall-header::after {
  content: '';
  position: absolute;
  right: 92px;
  bottom: -1px;
  width: 132px;
  height: 66px;
  border-radius: 66px 66px 0 0;
  background: linear-gradient(180deg, var(--tr-yellow), var(--tr-orange) 45%, var(--tr-magenta));
  -webkit-mask: repeating-linear-gradient(180deg, #000 0 7px, transparent 7px 10px);
  mask: repeating-linear-gradient(180deg, #000 0 7px, transparent 7px 10px);
  opacity: .32;
  pointer-events: none;
}
.ak-recall-brand { position: relative; z-index: 1; min-width: 0; }
.ak-recall-kicker { margin: 0 0 4px; color: var(--tr-cyan); font: 400 11px var(--tr-mono); letter-spacing: .26em; text-shadow: 0 0 8px #38f3ff88; }
.ak-recall-header h2 {
  margin: 0;
  color: #fff;
  font: 900 26px/1 var(--tr-display);
  letter-spacing: .14em;
  text-shadow: 0 0 2px #fff, 0 0 10px #ff4fd8cc, 0 0 26px #ff2fd070;
  white-space: nowrap;
}
.ak-recall-header h2 small {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 7px;
  border: 1px solid var(--tr-cyan);
  border-radius: 5px;
  color: var(--tr-cyan);
  font: 700 11px var(--tr-display);
  letter-spacing: .12em;
  text-shadow: 0 0 8px var(--tr-cyan);
  box-shadow: 0 0 10px #38f3ff44, inset 0 0 8px #38f3ff22;
  vertical-align: middle;
}
.ak-recall-steps { position: relative; z-index: 1; display: flex; gap: 6px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.ak-recall-steps li { display: flex; align-items: center; gap: 7px; padding: 5px 11px 5px 5px; border: 1px solid var(--tr-line-2); border-radius: 999px; background: #1b1d21cc; color: var(--tr-dim); font: 400 11px var(--tr-mono); letter-spacing: .14em; white-space: nowrap; }
.ak-recall-steps b { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: var(--tr-magenta); color: #fff; font: 700 10px var(--tr-display); box-shadow: 0 0 8px var(--tr-magenta); }
.ak-recall-close {
  position: relative;
  z-index: 1;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--tr-line-2);
  border-radius: 10px;
  background: var(--tr-raise);
  color: var(--tr-text);
  font: 400 20px var(--tr-sans);
  cursor: pointer;
}
.ak-recall-close:hover { border-color: var(--tr-pink); color: var(--tr-pink); box-shadow: 0 0 12px #ff2fd055; }

/* ---------- body ---------- */
.ak-recall-body { display: grid; gap: 12px; padding: 14px; min-width: 0; }
.ak-recall-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  color: var(--tr-dim);
  font: 400 11px var(--tr-mono);
  letter-spacing: .14em;
}
.ak-recall-section-title > span:first-child { flex: none; color: #fff; font: 700 11px var(--tr-display); letter-spacing: .2em; white-space: nowrap; }
.ak-recall-section-title > span:last-child:not(:first-child) { min-width: 0; overflow: hidden; color: var(--tr-faint); text-align: right; text-overflow: ellipsis; white-space: nowrap; }

/* Shared controls. */
.ak-recall-panel button,
.ak-recall-panel .ak-recall-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--tr-line-2);
  border-radius: 9px;
  background: linear-gradient(180deg, #3d424b, #32373f);
  box-shadow: inset 0 1px #ffffff14, 0 1px 2px #0004;
  color: #f1f1f2;
  font: 400 12px var(--tr-mono);
  letter-spacing: .08em;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color .12s, background-color .12s, color .12s, box-shadow .12s;
}
.ak-recall-panel button:hover:not(:disabled),
.ak-recall-panel .ak-recall-file:hover { border-color: var(--tr-cyan); color: #fff; box-shadow: 0 0 12px #38f3ff33; }
.ak-recall-panel button:active:not(:disabled) { transform: translateY(1px); }
.ak-recall-panel button:disabled { opacity: .35; cursor: default; }
.ak-recall-panel :focus-visible { outline: 2px solid var(--tr-cyan); outline-offset: 2px; }
.ak-recall-panel select,
.ak-recall-panel input[type="number"] {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--tr-line-2);
  border-radius: 8px;
  background: var(--tr-bg);
  color: var(--tr-lcd);
  font: 400 14px var(--tr-mono);
}
.ak-recall-panel select option { background: #24282e; color: var(--tr-text); }
.ak-recall-panel input[type="number"] { width: 94px; font-variant-numeric: tabular-nums; }
.ak-recall-panel input[type="range"] { accent-color: var(--tr-magenta); }
.ak-recall-field { display: inline-flex; align-items: center; gap: 8px; color: var(--tr-dim); font: 400 11px var(--tr-mono); letter-spacing: .14em; }

/* Big neon keys. */
.ak-recall-key {
  min-height: 46px !important;
  padding: 0 16px !important;
  border-radius: 10px !important;
  background: linear-gradient(180deg, #32373f, #272b31) !important;
  font: 700 11px var(--tr-display) !important;
  letter-spacing: .14em !important;
}
.ak-recall-key--play { border-color: var(--tr-cyan) !important; color: var(--tr-cyan) !important; text-shadow: 0 0 8px var(--tr-cyan); box-shadow: 0 0 12px #38f3ff33, inset 0 0 12px #38f3ff1f; }
.ak-recall-key--play[data-playing="true"] { background: var(--tr-cyan) !important; color: #080809 !important; text-shadow: none; box-shadow: 0 0 26px #38f3ffaa; }
.ak-recall-key--stop { color: #ecedef !important; }
.ak-recall-key--rec { border-color: var(--tr-red) !important; background: linear-gradient(180deg, #ff2a6d, #c10f4f) !important; color: #fff !important; box-shadow: 0 0 20px #ff2a6d66, inset 0 1px #ffffff40; }
.ak-recall-key--rec:hover { box-shadow: 0 0 28px #ff2a6daa, inset 0 1px #ffffff40 !important; }
.ak-recall-key--export { border-color: #ff7ae3 !important; background: linear-gradient(90deg, var(--tr-magenta), var(--tr-orange)) !important; color: #fff !important; text-shadow: 0 1px 2px #0006; box-shadow: 0 0 22px #ff2fd066, inset 0 1px #ffffff40; }

/* ---------- stage: cassette + console ---------- */
.ak-recall-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 300px); align-items: stretch; gap: 14px; }
/* The deck well the cassette sits in: a lit violet bay, not a black hole. */
.ak-recall-deck {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--tr-line-2);
  border-radius: 20px;
  background:
    radial-gradient(70% 85% at 50% 42%, #59616f 0%, #3a3f48 55%, #2c3036 100%);
  box-shadow: inset 0 1px #ffffff1f, inset 0 0 36px #0006;
}

/* A real C-30: grey molded shell, five screws, write-protect notches, a paper label
   that wraps around the window, hub holes with white toothed hubs and brown tape. */
.ak-recall-cassette {
  position: relative;
  height: 100%;
  padding: 18px 20px 0;
  border: 1px solid #f8f8f9;
  border-radius: 12px;
  background:
    radial-gradient(circle at 14px 14px, #77718a 0 1px, #31363e 1.6px 3.6px, #b4b7bd 4.2px 5.2px, transparent 5.8px),
    radial-gradient(circle at calc(100% - 14px) 14px, #77718a 0 1px, #31363e 1.6px 3.6px, #b4b7bd 4.2px 5.2px, transparent 5.8px),
    radial-gradient(circle at 14px calc(100% - 14px), #77718a 0 1px, #31363e 1.6px 3.6px, #b4b7bd 4.2px 5.2px, transparent 5.8px),
    radial-gradient(circle at calc(100% - 14px) calc(100% - 14px), #77718a 0 1px, #31363e 1.6px 3.6px, #b4b7bd 4.2px 5.2px, transparent 5.8px),
    linear-gradient(180deg, #edeeef 0%, #d6d8dc 46%, #c3c5ca 100%);
  box-shadow:
    inset 0 2px #fff,
    inset 0 -5px #8f939c,
    inset 0 0 0 1px #ffffff70,
    0 0 0 1px #1b1d21,
    0 2px 3px #0005,
    0 20px 40px #0009;
}
/* Write-protect notches along the top edge. */
.ak-recall-cassette::before {
  content: '';
  position: absolute;
  top: 0;
  left: 34px;
  right: 34px;
  height: 5px;
  background: linear-gradient(90deg, #8e88a0 0 16px, transparent 16px calc(100% - 16px), #8e88a0 calc(100% - 16px));
  border-radius: 0 0 3px 3px;
  box-shadow: inset 0 1px 2px #0005;
  pointer-events: none;
}
.ak-recall-cassette__paper {
  position: relative;
  border-radius: 8px;
  background: linear-gradient(180deg,
    #f7f2e7 0 calc(100% - 26px),
    var(--tr-magenta) calc(100% - 26px) calc(100% - 21px),
    var(--tr-orange) calc(100% - 21px) calc(100% - 16px),
    var(--tr-yellow) calc(100% - 16px) calc(100% - 11px),
    var(--tr-cyan) calc(100% - 11px) calc(100% - 6px),
    #f7f2e7 calc(100% - 6px));
  box-shadow: 0 0 0 1px #a2a7af, 0 1px 0 1px #ffffffb0, 0 2px 6px #0002;
}
.ak-recall-cassette__label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 6px;
  color: #212429;
}
.ak-recall-cassette__side { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 5px; background: #212429; color: #fff; font: 900 14px var(--tr-display); box-shadow: inset 0 0 0 1px #ffffff22; }
#ak-recall-source-label {
  min-width: 0;
  overflow: hidden;
  padding-bottom: 2px;
  border-bottom: 1px solid #21242926;
  color: #212429;
  font: 400 16px var(--tr-mono);
  letter-spacing: .08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ak-recall-cassette__type { color: #6e788a; font: 700 9px var(--tr-display); letter-spacing: .18em; white-space: nowrap; }

.ak-recall-tape-bay {
  display: grid;
  grid-template-columns: clamp(76px, 12.5cqi, 116px) minmax(0, 1fr) clamp(76px, 12.5cqi, 116px);
  align-items: center;
  gap: 16px;
  padding: 6px 16px 34px;
}
/* Hub holes punched through the label: brown tape pack, dark interior, a lip of paper. */
.ak-recall-reel {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side, transparent 0 33%, #4a3022 34%, #6e4b34 calc(var(--pack) - 5%), #5a3b28 calc(var(--pack) - 1%), #2d1d14 var(--pack), transparent calc(var(--pack) + .8%)),
    radial-gradient(circle closest-side, #181b1f 0 92%, #2a2e35 93% 100%);
  box-shadow: inset 0 3px 8px #000d, 0 0 0 2px #c9ccd0, 0 1px 0 2px #fff;
  transition: box-shadow .25s;
}
.ak-recall-reel:first-child { --pack: var(--ak-tape-left-pack, 68%); }
.ak-recall-reel:last-child { --pack: var(--ak-tape-right-pack, 42%); }
/* The white plastic hub: outer ring, six drive teeth, the dark spindle hole. */
.ak-recall-reel__wheel {
  position: absolute;
  inset: 27%;
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side, #141619 0 44%, transparent 45% 69%, #f1ede4 70% 100%),
    repeating-conic-gradient(from -6deg, #f1ede4 0 12deg, transparent 12deg 60deg);
  box-shadow: 0 1px 3px #000c, inset 0 -1px 1px #0003;
  will-change: transform;
}
.ak-recall-tape-bay[data-motion="live"] .ak-recall-reel { box-shadow: inset 0 3px 8px #000d, 0 0 0 2px var(--tr-red), 0 0 16px #ff2a6d88; }
.ak-recall-tape-bay[data-motion="preview"] .ak-recall-reel { box-shadow: inset 0 3px 8px #000d, 0 0 0 2px var(--tr-cyan), 0 0 16px #38f3ff88; }
/* The clear window: smoked plastic with a sheen across it. */
.ak-recall-tape-window {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 2px solid #272b31;
  border-radius: 7px;
  background: var(--tr-bg);
  box-shadow: 0 0 0 1px #a2a7af, 0 1px 0 1px #ffffffc0, inset 0 2px 6px #000a;
}
.ak-recall-tape-window::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(112deg, transparent 0 30%, #ffffff12 36%, #ffffff05 46%, transparent 52% 70%, #ffffff0a 76%, transparent 82%);
  pointer-events: none;
}
#ak-recall-wave { display: block; width: 100%; height: 108px; cursor: grab; touch-action: none; }
/* The head opening along the bottom, with capstan and guide holes and the fifth screw. */
.ak-recall-cassette__foot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11%;
  width: 62%;
  height: 30px;
  margin: 12px auto 0;
  padding-top: 4px;
  background: linear-gradient(180deg, #c9ccd0, #b2b6bd);
  clip-path: polygon(5% 0, 95% 0, 100% 100%, 0 100%);
  box-shadow: inset 0 2px #ffffffa0;
}
.ak-recall-cassette__foot i { width: 10px; height: 10px; border-radius: 50%; background: #202328; box-shadow: inset 0 2px 2px #000, 0 1px 0 #ffffffa0; }
.ak-recall-cassette__foot i:first-child,
.ak-recall-cassette__foot i:last-child { width: 13px; height: 9px; border-radius: 2px; }
.ak-recall-cassette__foot b { width: 11px; height: 11px; border-radius: 50%; background: radial-gradient(circle, #77718a 0 1px, #31363e 1.6px 3.6px, #b4b7bd 4.2px 5.2px, transparent 5.8px); }

/* The console: LCD, transport and record. */
.ak-recall-console {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--tr-line-2);
  border-radius: 18px;
  background: linear-gradient(180deg, #353a43, #2b2f36);
  box-shadow: inset 0 1px #ffffff17, 0 10px 24px #0004;
}
.ak-recall-counter {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #12505a;
  border-left: 3px solid var(--fx, #12505a);
  border-radius: 10px;
  background: repeating-linear-gradient(0deg, #ffffff06 0 1px, transparent 1px 3px), #031417;
  box-shadow: inset 0 0 20px #000, 0 0 16px #38f3ff1a;
}
#ak-recall-playhead-status {
  display: block;
  height: 3.9em;
  overflow: hidden;
  color: var(--tr-lcd);
  font: 400 15px/1.3 var(--tr-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
  text-shadow: 0 0 7px #38f3ffaa;
}
#ak-recall-playhead-status[data-playing="false"] { color: #4cc3cc; text-shadow: 0 0 5px #38f3ff55; }
.ak-recall-meter { display: flex; align-items: center; gap: 7px; overflow: hidden; color: #3fa8b1; font: 400 11px var(--tr-mono); letter-spacing: .08em; text-overflow: ellipsis; white-space: nowrap; }
.ak-recall-meter::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: #1d5961; }
#ak-recall-capture-meter[data-signal="live"] { color: #ff7aa3; }
#ak-recall-capture-meter[data-signal="live"]::before { background: var(--tr-red); box-shadow: 0 0 8px var(--tr-red); }

.ak-recall-vu-bank { display: grid; gap: 5px; margin-top: 2px; }
.ak-recall-vu { display: grid; grid-template-columns: 10px 1fr; align-items: center; gap: 6px; color: #3fa8b1; font: 400 10px var(--tr-mono); }
.ak-recall-vu-meter {
  position: relative;
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 1px;
  background: repeating-linear-gradient(90deg, #38f3ff14 0 3px, transparent 3px 5px);
}
.ak-recall-vu-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--tr-cyan) 0 58%, var(--tr-yellow) 76%, var(--tr-red) 92%);
  box-shadow: 0 0 8px #38f3ff88;
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}
.ak-recall-vu-fill::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 3px, #031417 3px 5px); }

.ak-recall-deck-transport { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ak-recall-deck-transport .ak-recall-key { padding: 0 6px !important; }
.ak-recall-loop {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 6px;
  border: 1px solid var(--tr-line-2);
  border-radius: 10px;
  background: linear-gradient(180deg, #32373f, #272b31);
  color: var(--tr-dim);
  font: 700 10px var(--tr-display);
  letter-spacing: .12em;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .12s, color .12s, box-shadow .12s;
}
.ak-recall-loop input { position: absolute; opacity: 0; pointer-events: none; }
.ak-recall-loop__icon { font: 400 16px var(--tr-sans); }
.ak-recall-loop:has(input:checked) { border-color: var(--tr-yellow); color: var(--tr-yellow); text-shadow: 0 0 8px #fff36b99; box-shadow: 0 0 14px #fff36b33, inset 0 0 10px #fff36b1a; }
.ak-recall-loop:has(input:focus-visible) { outline: 2px solid var(--tr-cyan); outline-offset: 2px; }
.ak-recall-loop.is-playing .ak-recall-loop__icon { animation: ak-recall-spin 1.6s linear infinite; }
@keyframes ak-recall-spin { to { transform: rotate(360deg); } }

.ak-recall-deck-source { display: grid; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--tr-line-2); }
.ak-recall-deck-source .ak-recall-field { justify-content: space-between; }
.ak-recall-deck-source select { flex: 0 1 110px; }
.ak-recall-deck-source .ak-recall-key { width: 100%; font-size: 10px !important; }

/* ---------- nudge + trim ---------- */
.ak-recall-tape-tools { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 12px; }
.ak-recall-tape-position,
.ak-recall-trim { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; min-width: 0; padding: 8px; border: 1px solid var(--tr-line); border-radius: 12px; background: var(--tr-card); }
#ak-recall-position-target { padding: 0 4px; color: var(--tr-dim); font: 400 11px var(--tr-mono); letter-spacing: .12em; }
#ak-recall-position-value { min-width: 100px; color: var(--tr-yellow); font: 400 15px var(--tr-mono); font-variant-numeric: tabular-nums; text-align: center; text-shadow: 0 0 8px #fff36b77; }
.ak-recall-trim label { display: inline-flex; align-items: center; gap: 6px; color: var(--tr-dim); font: 400 11px var(--tr-mono); letter-spacing: .12em; }
#ak-recall-trim-length { margin-left: auto; padding-right: 4px; color: var(--tr-faint); font: 400 11px var(--tr-mono); letter-spacing: .06em; }

.ak-recall-ruler { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; color: var(--tr-faint); font: 400 10px var(--tr-mono); letter-spacing: .1em; }
.ak-recall-ruler span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ak-recall-status {
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--tr-line);
  border-left: 3px solid var(--tr-cyan);
  border-radius: 10px;
  background: var(--tr-card);
  color: #e5e7e9;
  font: 500 13px/1.4 var(--tr-sans);
}
.ak-recall-status[data-kind="warn"] { border-left-color: var(--tr-red); color: #ffc7d8; }

/* ---------- FX lane ---------- */
.ak-recall-lane,
.ak-recall-rack,
.ak-recall-inspector,
.ak-recall-volume-editor,
.ak-recall-footer {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--tr-line);
  border-radius: 16px;
  background: linear-gradient(180deg, #30343b, #282b31);
  box-shadow: inset 0 1px #ffffff12, 0 8px 20px #0003;
}
.ak-recall-lane__head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; margin-bottom: 10px; }
.ak-recall-lane__head .ak-recall-section-title { margin-bottom: 0; }
.ak-recall-controls,
.ak-recall-zoom { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.ak-recall-controls label { display: inline-flex; align-items: center; gap: 7px; color: var(--tr-dim); font: 400 11px var(--tr-mono); letter-spacing: .14em; }
#ak-recall-bpm { width: 80px; }
#ak-recall-grid-status { margin-left: auto; color: var(--tr-faint); font: 400 11px var(--tr-mono); letter-spacing: .06em; }
.ak-recall-zoom > span { color: var(--tr-dim); font: 400 11px var(--tr-mono); letter-spacing: .14em; }
.ak-recall-zoom button { min-width: 36px; padding: 0 10px; }
#ak-recall-zoom-level { min-width: 32px; color: var(--tr-yellow); font: 400 14px var(--tr-mono); text-align: center; text-shadow: 0 0 8px #fff36b66; }
#ak-recall-zoom-scroll { flex: 1 1 140px; min-width: 0; }
#ak-recall-zoom-window { color: var(--tr-faint); font: 400 11px var(--tr-mono); }
#ak-recall-route {
  display: block;
  width: 100%;
  height: 220px;
  border: 1px solid var(--tr-line-2);
  border-radius: 12px;
  background: var(--tr-bg);
  box-shadow: 0 0 22px #ff2fd014;
  cursor: crosshair;
  touch-action: none;
}
.ak-recall-area-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.ak-recall-area-list button { min-height: 30px !important; padding: 0 11px !important; border-radius: 999px !important; font-size: 11px !important; }
.ak-recall-area-list button i { width: 8px; height: 8px; border-radius: 50%; background: var(--fx); box-shadow: 0 0 8px var(--fx); }
.ak-recall-area-list button small { color: var(--tr-faint); font: inherit; }
.ak-recall-area-list button.is-selected { border-color: var(--fx) !important; background: color-mix(in srgb, var(--fx) 18%, #23262b) !important; box-shadow: 0 0 12px color-mix(in srgb, var(--fx) 35%, transparent) !important; }

/* ---------- workbench: rack, inspector, level ---------- */
.ak-recall-workbench { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(220px, .8fr) minmax(0, 1.1fr); gap: 12px; }
#ak-recall-armed { color: var(--fx, var(--tr-pink)) !important; text-shadow: 0 0 8px var(--fx, var(--tr-pink)); }
.ak-recall-fx-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.ak-recall-panel .ak-recall-fx {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  justify-content: stretch;
  gap: 2px 9px;
  min-height: 60px;
  padding: 8px 10px;
  border-color: color-mix(in srgb, var(--fx) 34%, #2d3239);
  border-radius: 11px;
  background: linear-gradient(180deg, #2c3138, #23262b);
  text-align: left;
  white-space: normal;
}
.ak-recall-panel .ak-recall-fx:hover:not(:disabled) { border-color: var(--fx); box-shadow: 0 0 14px color-mix(in srgb, var(--fx) 40%, transparent); }
.ak-recall-fx__glyph { grid-row: 1 / 3; min-width: 26px; color: var(--fx); font: 700 15px var(--tr-mono); text-align: center; text-shadow: 0 0 10px var(--fx); }
.ak-recall-fx b { overflow: hidden; color: var(--tr-text); font: 700 10px var(--tr-display); letter-spacing: .1em; text-overflow: ellipsis; white-space: nowrap; }
.ak-recall-fx small { overflow: hidden; color: var(--tr-faint); font: 400 12px var(--tr-mono); letter-spacing: .02em; text-overflow: ellipsis; white-space: nowrap; }
.ak-recall-panel .ak-recall-fx.is-active {
  border-color: var(--fx);
  background: color-mix(in srgb, var(--fx) 18%, #23262b);
  box-shadow: 0 0 20px color-mix(in srgb, var(--fx) 45%, transparent), inset 0 0 16px color-mix(in srgb, var(--fx) 22%, transparent);
}
.ak-recall-panel .ak-recall-fx.is-active b { color: #fff; text-shadow: 0 0 8px var(--fx); }
/* The armed effect (what painting the lane adds) wears a lit LED. */
.ak-recall-panel .ak-recall-fx.is-armed::after { content: ''; position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--fx); box-shadow: 0 0 8px var(--fx); }

.ak-recall-inspector { display: flex; flex-direction: column; gap: 10px; }
.ak-recall-inspector .ak-recall-section-title { margin-bottom: 0; }
.ak-recall-inspector .ak-recall-field { justify-content: space-between; }
.ak-recall-inspector select { flex: 1; min-width: 0; }
.ak-recall-stutter-control[hidden] { display: none !important; }
#ak-recall-stutter-summary { color: var(--tr-cyan); font: 400 11px var(--tr-mono); white-space: nowrap; }
.ak-recall-area-detail { padding: 9px 11px; border: 1px solid #12505a; border-radius: 9px; background: #031417; color: var(--tr-lcd); font: 400 13px/1.4 var(--tr-mono); text-shadow: 0 0 6px #38f3ff77; }
.ak-recall-zone-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: auto; }

#ak-recall-volume { display: block; width: 100%; height: 96px; border: 1px solid var(--tr-line-2); border-radius: 12px; background: var(--tr-bg); cursor: ns-resize; touch-action: none; }
.ak-recall-volume-editor .ak-recall-section-title button { min-height: 28px; padding: 0 10px; font-size: 11px; }

/* ---------- footer ---------- */
.ak-recall-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ak-recall-footer__source,
.ak-recall-export-actions { display: flex; gap: 8px; }
.ak-recall-export-actions { margin-left: auto; }
.ak-recall-mix { display: flex; flex: 1 1 240px; align-items: center; gap: 10px; color: var(--tr-dim); font: 400 11px var(--tr-mono); letter-spacing: .14em; }
.ak-recall-mix input { flex: 1; min-width: 90px; }
#ak-recall-mix-value { min-width: 96px; color: var(--tr-pink); font: 400 13px var(--tr-mono); text-shadow: 0 0 8px #ff2fd077; }
.ak-recall-panel .ak-recall-clear:hover:not(:disabled) { border-color: var(--tr-red); color: #ff9dbb; box-shadow: 0 0 12px #ff2a6d44; }
.ak-recall-topad { display: flex; flex: 1 1 100%; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 11px; border-top: 1px solid var(--tr-line); }
.ak-recall-topad__label { display: flex; flex-direction: column; gap: 2px; margin-right: 4px; color: var(--tr-cyan); font: 400 12px var(--tr-mono); letter-spacing: .16em; text-shadow: 0 0 8px #38f3ff55; }
.ak-recall-topad__label small { color: var(--tr-faint); font-size: 9px; letter-spacing: .12em; text-shadow: none; }
.ak-recall-topad select { flex: 0 1 120px; min-width: 0; }
.ak-recall-panel .ak-recall-key--topad { margin-left: auto; min-width: 150px; border-color: var(--tr-cyan) !important; color: #04161a !important; background: linear-gradient(180deg, #8ff9ff, #38f3ff) !important; box-shadow: 0 0 14px #38f3ff55 !important; text-shadow: none !important; }
.ak-recall-privacy { margin: 0; color: var(--tr-faint); font: 500 11px/1.4 var(--tr-sans); text-align: center; }

/* ---------- responsive (by the deck's own width) ---------- */
@container tr (max-width: 1180px) {
  .ak-recall-workbench { grid-template-columns: minmax(0, 1.3fr) minmax(220px, 1fr); }
  .ak-recall-volume-editor { grid-column: 1 / -1; }
}
@container tr (max-width: 900px) {
  .ak-recall-steps,
  .ak-recall-header::after { display: none; }
  .ak-recall-stage { grid-template-columns: minmax(0, 1fr); }
  .ak-recall-console { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .ak-recall-counter { grid-column: 1 / -1; }
  #ak-recall-playhead-status { height: 2.6em; }
  .ak-recall-deck-source { margin-top: 0; padding-top: 0; border-top: 0; }
  .ak-recall-tape-tools { grid-template-columns: minmax(0, 1fr); }
}
@container tr (max-width: 640px) {
  .ak-recall-header { padding: 12px 12px 11px; gap: 10px; }
  .ak-recall-header h2 { font-size: 19px; letter-spacing: .1em; }
  .ak-recall-header h2 small { margin-left: 5px; padding: 2px 5px; font-size: 9px; }
  .ak-recall-kicker { font-size: 10px; letter-spacing: .18em; }
  .ak-recall-body { gap: 10px; padding: 10px; }
  .ak-recall-console { grid-template-columns: minmax(0, 1fr); padding: 10px; }
  #ak-recall-playhead-status { font-size: 13px; }
  .ak-recall-key { min-height: 44px !important; font-size: 10px !important; letter-spacing: .1em !important; }
  .ak-recall-deck { padding: 10px; }
  .ak-recall-cassette { padding: 14px 10px 0; }
  .ak-recall-cassette::before { left: 22px; right: 22px; }
  .ak-recall-cassette__label { padding: 8px 10px 4px; }
  #ak-recall-source-label { font-size: 14px; }
  .ak-recall-cassette__type { display: none; }
  .ak-recall-tape-bay { grid-template-columns: 1fr 1fr; gap: 10px; padding: 6px 10px 32px; }
  .ak-recall-reel { width: min(100%, 72px); justify-self: center; }
  .ak-recall-reel:first-child { grid-area: 1 / 1; }
  .ak-recall-reel:last-child { grid-area: 1 / 2; }
  .ak-recall-tape-window { grid-area: 2 / 1 / 3 / -1; }
  .ak-recall-cassette__foot { width: 80%; height: 26px; margin-top: 10px; }
  #ak-recall-wave { height: 92px; }
  #ak-recall-route { height: 176px; }
  #ak-recall-volume { height: 84px; }
  .ak-recall-tape-position { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
  #ak-recall-position-target,
  #ak-recall-position-reset { grid-column: 1 / -1; }
  #ak-recall-position-value { min-width: 0; }
  .ak-recall-trim { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ak-recall-trim label { justify-content: space-between; }
  .ak-recall-trim input { width: 100% !important; min-width: 0; }
  #ak-recall-trim-length { margin-left: 0; align-self: center; text-align: right; }
  .ak-recall-field select { flex: 1; min-width: 0; }
  .ak-recall-workbench { grid-template-columns: minmax(0, 1fr); }
  .ak-recall-lane__head .ak-recall-section-title > span:last-child { display: none; }
  .ak-recall-fx small { display: none; }
  .ak-recall-panel .ak-recall-fx { grid-template-columns: minmax(0, 1fr); justify-items: center; min-height: 58px; padding: 7px 4px; gap: 4px 0; text-align: center; }
  .ak-recall-fx__glyph { grid-row: auto; min-width: 0; }
  .ak-recall-fx b { max-width: 100%; font-size: 8.5px; line-height: 1.25; letter-spacing: .06em; white-space: normal; }
  #ak-recall-grid-status { width: 100%; margin-left: 0; }
  .ak-recall-export-actions { width: 100%; margin-left: 0; }
  .ak-recall-export-actions button { flex: 1; }
  .ak-recall-topad select { flex: 1 1 calc(50% - 4px); }
  .ak-recall-panel .ak-recall-key--topad { flex: 1 1 100%; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ak-recall-loop.is-playing .ak-recall-loop__icon { animation: none; }
  .ak-recall-panel button,
  .ak-recall-loop,
  .ak-recall-reel { transition: none; }
}
