/* CLAUDE 10-11: Quick edit (quickedit-ui.js): a light editor for one Library clip, in RipClip's dark world (the composer's
   near-black surfaces, green only on the one primary action). Phone first: full screen with the safe areas; on a wide
   screen the same editor is a centred modal. Everything is scoped to .qe so the site's global button, input and dialog
   rules (style.css, studio.css, interface.css) do not leak in. */
.qe {
  /* 10-12 (owner: "what are those green things"): Graphite, as the rest of the app; off-white is the accent */
  --q-bg: var(--c-canvas, #0e0e10);
  --q-surface: var(--c-surface, #151517);
  --q-raised: var(--c-raised, #1c1c1f);
  --q-line: var(--c-line-strong, rgba(255, 255, 255, 0.12));
  --q-text: var(--c-fg, #f2f0eb);
  --q-muted: var(--c-fg-2, #b5b3ad);
  --q-faint: var(--c-fg-3, #8f8e89);
  --q-accent: var(--c-primary, #f2f0eb);
  --q-ink: var(--c-primary-ink, #0e0e10);
  --q-danger: #ff6a6a;
  --q-pad: 14px;
  box-sizing: border-box;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--q-text);
  font: 14px/1.35 inherit;
  font-family: inherit;
  overflow: hidden;
}
.qe[open] {
  display: grid;
  place-items: center;
}
.qe::backdrop {
  background: #000d; /* (the blur is the shared dialog's, motion.css: desktop only, never over the live editor) */
}
.qe *,
.qe *::before,
.qe *::after {
  box-sizing: border-box;
}
.qe [hidden] {
  display: none !important;
}
.qe button,
.qe button:hover,
.qe button:active {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  min-height: 0;
  min-width: 0;
  box-shadow: none;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.qe button:focus-visible,
.qe textarea:focus-visible,
.qe input:focus-visible,
.qe .qe-tl:focus-visible {
  outline: 2px solid var(--q-accent);
  outline-offset: 2px;
}
.qe-card:focus,
.qe-card:focus-visible {
  outline: none !important;
}
.qe-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(460px, 100vw);
  height: min(100dvh, 940px);
  background: var(--q-bg);
  border: 1px solid var(--q-line);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: 0 30px 90px #000a;
}
@media (max-width: 640px), (max-height: 600px) {
  .qe-card {
    width: 100vw;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  }
}

/* top bar */
.qe-top {
  flex: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 56px;
  padding: 0 var(--q-pad);
}
.qe-top h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
}
.qe-cancel,
.qe-save {
  min-height: 44px !important;
  min-width: 64px !important;
  font-size: 15px;
  font-weight: 500;
}
.qe-cancel {
  justify-self: start;
  color: var(--q-text);
}
.qe-save {
  justify-self: end;
  color: var(--q-accent);
  font-weight: 700;
}
/* CLAUDE 10-17: Post beside Save */
.qe-top-r {
  justify-self: end;
  display: flex;
  align-items: center;
}
.qe-post {
  min-height: 44px !important;
  min-width: 56px !important;
  font-size: 15px;
  font-weight: 500;
  color: var(--q-text);
}
.qe-post:disabled {
  color: var(--q-faint);
}
.qe-save:disabled {
  color: var(--q-faint);
  cursor: default;
}
.qe-note {
  flex: none;
  margin: 0 var(--q-pad) 6px;
  color: var(--q-faint);
  font-size: 12px;
}
.qe-note button {
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* the picture */
.qe-stage-wrap {
  position: relative;
  flex: 1 1 0;
  min-height: 140px !important;
  display: grid;
  place-items: center;
  padding: 6px 12px;
}
.qe-stage {
  position: relative;
  background: #000;
  border-radius: var(--r-md);
  overflow: hidden;
  touch-action: manipulation;
}
.qe-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.qe-broll {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.qe-ov {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none; /* 10-18: a finger on the picture moves a layer or the captions, two fingers size them: the page never pans or zooms here */
}
/* the captions' frame (10-18): the layer frame without the turn handle, as the captions only move and size */
.qe-sel.cap .qe-rot,
.qe-sel.cap .qe-hd.ne,
.qe-sel.cap .qe-hd.sw {
  display: none; /* two opposite corners are enough: a caption is a thin strip, four handles would cover it */
}
.qe-readout {
  position: absolute;
  top: 10px;
  left: 50%;
  translate: -50% 0;
  z-index: 2;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: rgba(14, 14, 16, 0.82);
  border: 1px solid var(--q-line);
  color: var(--q-text);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.qe-sel {
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 2px;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.45);
  transform-origin: 50% 50%;
}
/* 11-04: small round handles drawn at 10 px, each with a 44 px touch area (the ::after) */
.qe-hd,
.qe-rot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c-fg);
  border: 1px solid rgba(0, 0, 0, 0.6);
  pointer-events: auto;
  touch-action: none;
}
.qe-hd::after,
.qe-rot::after {
  content: '';
  position: absolute;
  inset: -17px;
}
.qe-hd.nw {
  left: -6px;
  top: -6px;
}
.qe-hd.ne {
  right: -6px;
  top: -6px;
}
.qe-hd.sw {
  left: -6px;
  bottom: -6px;
}
.qe-hd.se {
  right: -6px;
  bottom: -6px;
}
.qe-rot {
  left: calc(50% - 5px);
  top: -28px;
}
.qe-sel.fixed .qe-hd,
.qe-sel.fixed .qe-rot {
  display: none;
}
.qe-skel {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 18px;
  background: #101113;
  text-align: center;
}
.qe-skel-art {
  width: 56%;
  aspect-ratio: 9 / 16;
  max-height: 55%;
  border-radius: var(--r-md);
  background: var(--q-raised);
}
.qe-skel p {
  margin: 0;
  color: var(--q-muted);
  font-size: 13px;
}
.qe-skel.err .qe-skel-art {
  display: none;
}
.qe-skel.err p {
  color: var(--q-text);
  font-size: 14px;
}
.qe-skel progress,
.qe-saving progress {
  width: min(220px, 70%);
  height: 6px;
  accent-color: var(--q-accent);
}
/* CLAUDE 10-18 (design polish B3b): the three loading placeholders of this file shimmer the shared way (the m-skel keyframes in
   motion.css: one light sweep as a transform, no repainted gradient) instead of their own `qe-shimmer` background scroll */
.qe-skel-art,
.qe-song-skel,
.qe-skel-tile {
  position: relative;
  overflow: hidden;
  contain: paint;
}
.qe-skel-art::after,
.qe-song-skel::after,
.qe-skel-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transform: translateX(-100%);
  animation: m-skel var(--d-skel) linear infinite;
}
.qe-fs-exit {
  display: none !important;
  position: absolute;
  top: calc(10px + env(safe-area-inset-top));
  right: 12px;
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #000a !important;
  place-items: center;
}
.qe-stage-wrap:fullscreen,
.qe-card.theater .qe-stage-wrap {
  background: #000;
}
.qe-card.theater .qe-stage-wrap {
  position: fixed;
  inset: 0;
  z-index: 4;
}
.qe-stage-wrap:fullscreen .qe-fs-exit,
.qe-card.theater .qe-fs-exit {
  display: grid !important;
}

/* time, undo / redo, play */
.qe-bar {
  flex: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 52px;
  padding: 0 6px;
}
.qe-ur,
.qe-pf {
  display: flex;
  align-items: center;
}
.qe-pf {
  justify-content: flex-end;
}
.qe-bar button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--q-text);
}
.qe-bar button:active:not(:disabled) {
  background: #ffffff1f;
}
.qe-bar button:disabled {
  color: var(--q-faint);
  opacity: 0.55;
  cursor: default;
}
.qe-time {
  display: grid;
  justify-items: center;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.qe-now {
  font-size: 14px;
  font-weight: 600;
}
.qe-dur {
  font-size: 12px;
  color: var(--q-muted);
}

/* timeline */
.qe-tl {
  position: relative;
  flex: none;
  background: var(--q-surface);
  border-block: 1px solid var(--q-line);
}
.qe-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
}
.qe-scroll::-webkit-scrollbar {
  display: none;
}
.qe-card.loading .qe-scroll,
.qe-card.loading .qe-playhead {
  visibility: hidden;
}
.qe-scroll.grab {
  cursor: grabbing;
}
.qe-inner {
  display: flex;
  width: max-content;
  min-width: 100%;
}
.qe-padl,
.qe-padr {
  flex: none;
}
.qe-track {
  position: relative;
  flex: none;
}
.qe-ruler {
  position: relative;
  height: 22px;
}
.qe-ruler i {
  position: absolute;
  top: 12px;
  width: 1px;
  height: 8px;
  background: var(--q-faint);
}
.qe-ruler b {
  position: absolute;
  bottom: 8px;
  left: 3px;
  font-size: 10px;
  font-weight: 500;
  color: var(--q-muted);
  font-variant-numeric: tabular-nums;
}
.qe-strip {
  position: relative;
  height: 52px;
  background: #000;
}
.qe-cells {
  display: flex;
  height: 100%;
}
.qe-cells canvas {
  flex: none;
  height: 100%;
  background: #17181b;
}
.qe-dim {
  position: absolute;
  top: 0;
  bottom: 0;
  background: #000b;
  pointer-events: none;
}
.qe-dim.l {
  left: 0;
}
.qe-dim.r {
  right: 0;
}
/* CLAUDE 10-15: the parts cut by transcript, shaded and hatched over the filmstrip (played over) */
.qe-cutmarks i {
  position: absolute;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(135deg, #000c 0 4px, #0008 4px 8px);
  pointer-events: none;
}
.qe-win {
  position: absolute;
  top: 0;
  bottom: 0;
  border-block: 2.5px solid var(--q-text);
  pointer-events: none;
}
.qe-h {
  position: absolute;
  top: -2.5px;
  bottom: -2.5px;
  min-width: 0 !important;
  min-height: 0 !important;
  width: 14px;
  background: var(--q-text) !important;
  pointer-events: auto;
  touch-action: none;
  display: grid;
  place-items: center;
}
.qe-h::before {
  content: '';
  width: 2px;
  height: 18px;
  border-radius: 2px;
  background: #3a3d40;
}
.qe-h::after {
  content: '';
  position: absolute;
  inset: -4px -16px;
}
.qe-hl {
  left: -14px;
  border-radius: var(--r-sm) 0 0 var(--r-sm) !important;
}
.qe-hr {
  right: -14px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0 !important;
}
.qe-h:focus-visible {
  outline-offset: 1px;
}
.qe-lane {
  position: relative;
  min-height: 38px !important;
}
.qe-chip {
  position: absolute;
  height: 30px;
  min-width: 0 !important;
  min-height: 0 !important;
  display: flex;
  align-items: center;
  padding: 0 8px;
  overflow: hidden;
  border-radius: var(--r-sm) !important;
  background-color: #2a2a2e !important;
  background-image: var(--art);
  background-repeat: repeat-x;
  background-position: left center;
  background-size: auto 22px;
  border: 1.5px solid var(--c-line-strong) !important;
  touch-action: none;
  text-align: left;
  color: var(--c-fg);
  font-size: 11px;
  font-weight: 600;
}
.qe-chip-t {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: var(--r-sm);
  background: #0b0d0bcc;
  pointer-events: none;
  white-space: nowrap;
}
.qe-chip.on {
  border-color: var(--q-accent) !important;
  box-shadow: 0 0 0 2px rgba(242, 240, 235, 0.25) !important;
}
.qe-chip.locked {
  background-color: #26272b !important;
  border-color: #3b3d42 !important;
  color: var(--q-muted);
}
.qe-playhead {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--q-accent);
  pointer-events: none;
  box-shadow: 0 0 0 1px #0008;
}
.qe-playhead::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -4px;
  width: 10px;
  height: 7px;
  background: var(--q-accent);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* the selected layer's bar, and the three tools */
.qe-layerbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 var(--q-pad);
  background: var(--q-surface);
  border-bottom: 1px solid var(--q-line);
}
.qe-lb-name {
  flex: 1;
  font-weight: 600;
}
.qe-lb-edit,
.qe-lb-del {
  min-height: 36px !important;
  padding: 0 14px !important;
  border-radius: var(--r-xl) !important;
  background: var(--q-raised) !important;
  font-weight: 600;
}
.qe-lb-reset:disabled {
  opacity: 0.4; /* the captions are where the look puts them: nothing to reset */
}
.qe-lb-del {
  display: grid;
  place-items: center;
  width: 44px;
  padding: 0 !important;
  color: var(--q-danger);
}
.qe-tools {
  flex: none;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(64px, 1fr); /* 10-17: more tools than fit a phone: the row scrolls */
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  background: var(--q-bg);
  padding-bottom: env(safe-area-inset-bottom);
}
.qe-tools::-webkit-scrollbar {
  display: none;
}
.qe-card .qe-tools {
  padding-bottom: 0;
}
.qe-tools button {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  min-height: 62px !important;
  font-size: 12px;
  font-weight: 500;
  color: var(--q-muted);
}
.qe-tools button[aria-expanded='true'] {
  color: var(--q-accent);
}
.qe-tools button:active {
  background: #ffffff12 !important;
}

/* sheets */
.qe-sheet {
  flex: none;
  display: flex;
  flex-direction: column;
  height: min(46dvh, 420px);
  min-height: 250px !important;
  background: var(--q-surface);
  border-top: 1px solid var(--q-line);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  translate: 0 var(--shift-lg);
  opacity: 0;
  transition:
    translate var(--d-enter) var(--ease-soft),
    opacity var(--d-ui) ease;
}
.qe-sheet.open {
  translate: 0 0;
  opacity: 1;
}
.qe-sheet-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 var(--q-pad);
}
.qe-sheet h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}
.qe-sheet-done {
  min-height: 44px !important;
  padding: 0 4px !important;
  color: var(--q-accent);
  font-weight: 700;
}
.qe-sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 var(--q-pad) calc(14px + env(safe-area-inset-bottom));
  overscroll-behavior: contain;
}
.qe-card.sheet-open .qe-tl {
  height: 0;
  overflow: hidden;
  visibility: hidden;
  border: 0;
}
.qe-card.sheet-open .qe-tools {
  display: none;
}
.qe-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 12px;
  scrollbar-width: none;
}
.qe-chips button {
  flex: none;
  min-height: 36px !important;
  padding: 0 14px !important;
  border-radius: var(--r-xl) !important;
  background: var(--q-raised) !important;
  color: var(--q-muted);
  font-weight: 600;
}
.qe-chips button[aria-selected='true'] {
  background: var(--q-text) !important;
  color: var(--q-ink);
}
.qe-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.qe-tile {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 6px !important;
  border: 2px solid transparent !important;
  border-radius: var(--r-md) !important;
  background: var(--q-raised) !important;
  text-align: center;
}
.qe-tile[aria-pressed='true'] {
  border-color: var(--q-accent) !important;
}
/* (CLAUDE 10-18, design polish B3b: the presses of this file's buttons are the shared one now, motion.css P1: scale: var(--press)
   with a spring back. Eight of them used `transform: scale(.92 to .99)`, each its own strength, which also stacked with the shared one.) */
.qe-sample {
  display: grid;
  place-items: center;
  min-height: 62px !important;
  border-radius: var(--r-sm);
  background: linear-gradient(160deg, #2c3b47, #1a232b);
  color: #fff;
  overflow: hidden;
  line-height: 1.15;
  font-weight: 700;
  padding: 4px;
}
.qe-sample.none {
  color: var(--q-muted);
  font-size: 12px;
}
.qe-lines {
  text-align: center;
  display: inline-block;
}
.qe-lines span {
  display: inline-block;
  transition: transform var(--d-hover) var(--ease-out);
}
.qe-tile-name {
  font-size: 11px;
  line-height: 1.2;
  color: var(--q-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qe-tile-name b {
  font-weight: 600;
}
.qe-lines-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.qe-line {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 8px;
  padding: 6px;
  border-radius: var(--r-md);
  background: var(--q-raised);
  border: 1.5px solid transparent;
}
.qe-line.on {
  border-color: rgba(242, 240, 235, 0.45);
}
.qe-line.out {
  opacity: 0.55;
}
.qe-line-t {
  min-width: 52px !important;
  min-height: 44px !important;
  border-radius: var(--r-sm) !important;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--q-muted);
  background: #ffffff10 !important;
}
.qe-line textarea {
  width: 100%;
  min-height: 44px !important;
  max-height: 140px;
  resize: none;
  padding: 11px 10px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--q-text);
  font: inherit;
  font-size: 15px;
  line-height: 1.3;
  overflow: hidden;
}
.qe-line textarea:focus {
  background: #0b0d0b;
}
.qe-line-x {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--q-faint);
}
.qe-line-x:active {
  color: var(--q-danger);
}
/* CLAUDE 10-15: Captions > Cut (quickedit-ui.js sheetCut): the one-tap clean-up, then each line as tappable words */
.qe-clean {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 52px !important;
  margin-bottom: 12px;
  border-radius: var(--r-md) !important;
  background: var(--q-raised) !important;
}
.qe-clean b {
  font-weight: 600;
}
.qe-clean small {
  font-size: 12px;
  color: var(--q-muted);
}
.qe-clean:disabled {
  min-height: 0 !important;
  padding: 4px 0 8px !important;
  background: transparent !important; /* nothing to do: a quiet line, no box */
}
.qe-clean:disabled b {
  color: var(--q-muted);
  font-weight: 500;
  font-size: 13px;
}
.qe-cut-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.qe-cut-list .qe-line {
  background: transparent;
}
.qe-cut-words {
  margin: 0;
  padding: 8px 0;
  font-size: 16px;
  line-height: 1.9;
}
.qe-cut-words button {
  display: inline;
  min-width: 0 !important; /* words read as a sentence; the line height keeps each tap target ~30 px tall */
  min-height: 0 !important;
  padding: 4px 2px !important;
  border-radius: var(--r-sm) !important;
  background: transparent !important;
  color: var(--q-text);
  font: inherit;
}
.qe-cut-words .qe-w:active {
  background: #ffffff18 !important;
}
.qe-cut-words .qe-w.filler {
  text-decoration: underline dotted var(--q-muted);
  text-underline-offset: 4px;
}
.qe-cut-words .qe-w[aria-pressed='true'] {
  color: var(--q-faint);
  text-decoration: line-through;
}
.qe-cut-words .qe-pause {
  padding: 1px 7px !important;
  border-radius: var(--r-md) !important;
  background: #ffffff10 !important;
  color: var(--q-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.qe-empty,
.qe-hint {
  margin: 14px 0;
  color: var(--q-muted);
  font-size: 13px;
  text-align: center;
}
.qe-hint {
  text-align: left;
  margin: 0 0 10px;
}
.qe-add {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.qe-add button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px !important;
  border-radius: var(--r-md) !important;
  background: var(--q-raised) !important;
  font-weight: 600;
}
/* CLAUDE 10-14: Layout sheet (quickedit-ui.js sheetLayout): a row of eight layout diagrams per scene */
.qe-scene-find {
  width: 100%;
  min-height: 48px !important;
  margin-bottom: 12px;
  border-radius: var(--r-md) !important;
  background: var(--q-raised) !important;
  font-weight: 600;
}
.qe-scenes {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.qe-scenes li {
  display: grid;
  gap: 4px;
}
.qe-scene-at {
  justify-self: start;
  min-height: 32px !important;
  padding: 0 !important;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  opacity: 0.8;
}
.qe-scene-find {
  display: grid;
  gap: 2px;
  justify-items: center;
}
.qe-scene-find small {
  font-weight: 400;
  font-size: 12px;
  opacity: 0.65;
}
.qe-scene-again {
  width: 100%;
  min-height: 40px !important;
  background: transparent !important;
  font-size: 13px;
  opacity: 0.6;
}
.qe-lt-art {
  display: block;
  line-height: 0;
}
.qe-lt-art canvas {
  width: 36px;
  height: 64px;
  border-radius: var(--r-xs);
  outline: 1px solid var(--c-line-strong);
  outline-offset: -1px;
}
.qe-logo {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.qe-logo-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qe-logo-head img,
.qe-logo-again img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: var(--r-xs);
  background: var(--c-line);
}
.qe-logo-again {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px !important;
  background: transparent !important;
  font-size: 13px;
  opacity: 0.8;
}
.qe-scene-kinds {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.qe-scene-kinds button {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 64px;
  padding: 6px 2px !important;
  border-radius: var(--r-md) !important;
  background: transparent !important;
  font-size: 11px;
  line-height: 1.15;
  text-align: center;
  opacity: 0.7;
}
.qe-scene-kinds button[aria-checked='true'] {
  opacity: 1;
  background: var(--q-raised) !important;
  box-shadow: inset 0 0 0 1.5px currentColor;
}
.qe-scene-kinds .qe-pro {
  font-size: 9px;
  letter-spacing: 0.04em;
  opacity: 0.7;
}
.qe-scene-kinds svg rect {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
}
.qe-scene-kinds svg rect.f {
  stroke-opacity: 0.35;
}
.qe-scene-kinds svg rect.f[data-blur] {
  fill: currentColor;
  fill-opacity: 0.18;
}
/* CLAUDE 10-17: Brand sheet (quickedit-ui.js sheetBrand): one row per brand template */
.qe-brands {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.qe-brands button {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px !important;
  padding: 8px 12px !important;
  border-radius: var(--r-md) !important;
  background: transparent !important;
  text-align: left;
}
.qe-brands button:hover,
.qe-brands button[aria-pressed='true'] {
  background: var(--q-raised) !important;
}
.qe-brand-art {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--c-line);
  color: var(--q-muted);
}
.qe-brand-art img {
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
}
.qe-brand-t {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.qe-brand-t b {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 600;
}
.qe-brand-t small {
  color: var(--q-faint);
  font-size: 12px;
}
.qe-layers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.qe-layers button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px !important;
  padding: 6px 10px !important;
  border-radius: var(--r-md) !important;
  background: var(--q-raised) !important;
  text-align: left;
}
.qe-layers img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.qe-ed {
  display: grid;
  gap: 4px;
}
.qe-ed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.qe-del {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px !important;
  padding: 0 12px !important;
  border-radius: var(--r-xl) !important;
  background: var(--q-raised) !important;
  color: var(--q-danger);
  font-weight: 600;
}
.qe-field {
  display: grid;
  grid-template-columns: 64px 1fr 48px;
  align-items: center;
  gap: 10px;
  min-height: 44px !important;
}
.qe-field span {
  color: var(--q-muted);
  font-size: 13px;
}
.qe-field output {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.qe-field input[type='range'] {
  width: 100%;
  height: 28px;
  accent-color: var(--q-accent);
  background: transparent;
}
.qe-seg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 8px;
}
.qe-seg button {
  min-height: 36px !important;
  padding: 0 12px !important;
  border-radius: var(--r-xl) !important;
  background: var(--q-raised) !important;
  font-size: 12px;
}
.qe-seg button[aria-checked='true'] {
  background: var(--q-text) !important;
  color: var(--q-ink);
  font-weight: 700;
}
.qe-pick-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.qe-back {
  min-height: 44px !important;
  padding: 0 8px !important;
  color: var(--q-muted);
  font-weight: 600;
}
.qe-search,
.qe-up {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px !important;
  padding: 0 12px;
  border-radius: var(--r-xl);
  background: var(--q-raised);
  color: var(--q-muted);
  cursor: pointer;
}
.qe-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--q-text);
  font: inherit;
  font-size: 16px;
  height: 40px;
  margin: 0;
  padding: 0;
}
.qe-up {
  justify-content: center;
  color: var(--q-text);
  font-weight: 600;
}
/* CLAUDE 10-17: Shape sheet (quickedit-ui.js sheetShape): one tile per output shape, its outline drawn to scale */
.qe-shapes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}
.qe-shapes button {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  min-height: 112px !important;
  padding: 10px 6px !important;
  border-radius: var(--r-md) !important;
  background: transparent !important;
  text-align: center;
}
.qe-shapes i {
  display: block;
  margin-bottom: 6px;
  border: 1.5px solid currentColor;
  border-radius: var(--r-xs);
  opacity: 0.55;
}
.qe-shapes b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.qe-shapes small {
  color: var(--q-faint);
  font-size: 11px;
  line-height: 1.2;
}
.qe-shapes button:hover {
  background: #ffffff0a !important;
}
.qe-shapes button[aria-checked='true'] {
  background: var(--q-raised) !important;
  box-shadow: inset 0 0 0 1.5px currentColor;
}
.qe-shapes button[aria-checked='true'] i {
  opacity: 1;
}
/* CLAUDE 10-17: Music sheet (quickedit-ui.js sheetMusic): the song on the clip, then the library or your songs */
.qe-song-cur {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--q-line);
}
.qe-song-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 600;
}
.qe-song-name span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.qe-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--q-muted);
  cursor: pointer;
}
.qe-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--q-accent);
}
.qe-cats {
  padding-top: 10px;
}
.qe-cats button[aria-checked='true'] {
  background: var(--q-text) !important;
  color: var(--q-ink);
}
.qe-songs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.qe-songs li {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 56px;
}
.qe-songs .qe-empty {
  grid-column: 1 / -1;
}
.qe-song-play {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-xl) !important;
  background: var(--q-raised) !important;
}
.qe-song-play[aria-pressed='true'] {
  background: var(--q-text) !important;
  color: var(--q-ink);
}
.qe-song-t {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.qe-song-t b,
.qe-song-t small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.qe-song-t b {
  font-weight: 600;
}
.qe-song-t small {
  color: var(--q-faint);
  font-size: 12px;
}
.qe-song-use {
  min-height: 36px !important;
  padding: 0 14px !important;
  border-radius: var(--r-xl) !important;
  background: var(--q-raised) !important;
  font-weight: 600;
}
.qe-song-skel {
  height: 48px;
  margin: 4px 0;
  border-radius: var(--r-md);
  background: var(--q-raised);
}
.qe-songs + .qe-up,
.qe-up + .qe-songs {
  margin-top: 10px;
}
/* CLAUDE 10-17: Title sheet (quickedit-ui.js sheetTitle): the words, the hook writer, its three ideas, look and size */
.qe-title-in {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--q-line);
  border-radius: var(--r-md);
  background: #0b0c0e;
  color: var(--q-text);
  font: inherit;
  font-size: 16px; /* 16 px: an iPhone does not zoom the page on focus */
}
.qe-title-in:focus {
  outline: none;
  border-color: rgba(242, 240, 235, 0.45);
}
.qe-hook {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px !important;
  margin: 10px 0 8px;
  border-radius: var(--r-md) !important;
  background: var(--q-raised) !important;
  font-weight: 600;
}
.qe-hook:disabled {
  color: var(--q-muted);
}
.qe-hook[aria-busy='true'] svg {
  animation: m-spin 1.2s linear infinite; /* the shared spin keyframes (motion.css) */
}
.qe-hook .qe-pro {
  font-size: 10px;
  letter-spacing: 0.04em;
  opacity: 0.7;
}
.qe-hooks {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: grid;
  gap: 4px;
}
.qe-hooks:empty {
  display: none;
}
.qe-hooks button {
  width: 100%;
  min-height: 44px !important;
  padding: 8px 12px !important;
  border-radius: var(--r-md) !important;
  text-align: left;
  font-weight: 600;
}
.qe-hooks button:hover,
.qe-hooks button[aria-pressed='true'] {
  background: var(--q-raised) !important;
}
@media (prefers-reduced-motion: reduce) {
  .qe-hook[aria-busy='true'] svg {
    animation: m-spin 2.4s linear infinite; /* a frozen spinner reads as a hang: it keeps turning, slowly */
  }
}
/* CLAUDE 10-17: B-roll sheet (quickedit-ui.js sheetBroll): a sentence per row, its B-roll on the right */
.qe-sents {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.qe-sents li {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: var(--r-md);
}
.qe-sents li.on {
  background: var(--q-raised);
}
.qe-sent-t {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.qe-sent-add,
.qe-sent-art {
  width: 52px;
  height: 52px;
  border-radius: var(--r-md) !important;
  display: grid;
  place-items: center;
}
.qe-sent-add {
  border: 1.5px dashed var(--q-line) !important;
  color: var(--q-muted);
}
.qe-sent-art {
  background: var(--art) center / cover no-repeat #ffffff10 !important;
}
.qe-sent-q {
  margin: 0 0 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.qe-stock {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 6px;
}
.qe-stock button,
.qe-skel-tile {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-md) !important;
  overflow: hidden;
  background: var(--q-raised) !important;
  padding: 0 !important;
}
.qe-skel-tile {
  display: block;
}
.qe-stock img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.qe-stock small {
  position: absolute;
  right: 5px;
  bottom: 4px;
  padding: 1px 5px;
  border-radius: var(--r-sm);
  background: #000a;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.qe-stock button.busy {
  opacity: 0.5;
  pointer-events: none;
}
.qe-stock .qe-empty {
  grid-column: 1 / -1;
}
.qe-emoji,
.qe-pics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 6px;
}
.qe-pics {
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
}
.qe-emoji button,
.qe-pics button {
  aspect-ratio: 1;
  border-radius: var(--r-md) !important;
  background: var(--q-raised) !important;
  display: grid;
  place-items: center;
  padding: 6px !important;
}
.qe-emoji img,
.qe-pics img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.qe-emoji .qe-empty,
.qe-pics .qe-empty {
  grid-column: 1 / -1;
}

/* messages, saving, discard */
.qe-msg {
  position: absolute;
  left: 50%;
  bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 6;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 28px);
  margin: 0;
  padding: 10px 16px;
  border-radius: var(--r-lg);
  background: #26272bf2;
  border: 1px solid var(--q-line);
  font-size: 13px;
  text-align: center;
  box-shadow: 0 10px 30px #0008;
}
.qe-cover {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #000c; /* (no blur: it sits over the live picture, and a blur re-draws it on every frame) */
}
.qe-panel {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(320px, 100%);
  padding: 24px 22px 20px;
  border-radius: var(--r-xl);
  background: var(--q-surface);
  border: 1px solid var(--q-line);
  text-align: center;
}
.qe-panel h3 {
  margin: 0;
  font-size: 17px;
}
.qe-panel p,
.qe-sub {
  margin: 0;
  color: var(--q-muted);
  font-size: 13px;
}
.qe-ok {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--q-accent);
  color: var(--q-ink);
}
.qe-new {
  width: 96px;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: var(--r-md);
  background: #000;
}
.qe-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}
.qe-row button {
  min-height: 44px !important;
  padding: 0 18px !important;
  border-radius: var(--r-xl) !important;
  background: var(--q-raised) !important;
  font-weight: 600;
}
.qe-row button.primary {
  background: var(--q-accent) !important;
  color: var(--q-ink) !important;
}
.qe-row button.qe-discard {
  background: var(--q-danger) !important;
  color: #1a0000 !important;
}
.qe-skel .qe-row {
  display: flex;
  margin-top: 12px;
}
@media (prefers-reduced-motion: reduce) {
  .qe-sheet {
    transition: opacity var(--d-ui) ease; /* the sheet fades (--shift-lg is 0 here: nothing rises) */
  }
  .qe-skel-art::after,
  .qe-song-skel::after,
  .qe-skel-tile::after {
    animation: none; /* the placeholder stays, still */
  }
  .qe-lines span {
    transition: none;
  }
}
@media (hover: hover) {
  .qe-tile:hover,
  .qe-add button:hover,
  .qe-layers button:hover {
    background: #26272c !important;
  }
}

/* the Library's three actions on a card, and in the clip viewer */
.lib-card .actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.lib-card .actions button.lib-quick {
  grid-column: 1 / -1;
  min-height: 44px !important;
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: var(--c-primary-ink);
  font-weight: 500;
}
.lib-card .actions button.lib-sec {
  min-height: 44px !important;
  background: transparent;
  border: 1px solid #3e3e40;
  color: #cccccf;
  font-weight: 500;
}
.lib-card .actions button.lib-sec:hover {
  border-color: #6a6a6e;
  color: #fff;
}
.library-player .lp-score {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 12px 0 0;
}
.library-player .lp-score b {
  padding: 2px 10px;
  border: 1px solid #ffffff40;
  border-radius: var(--r-sm);
  font-size: 18px;
  color: #fff;
}
.library-player .lp-actions {
  display: flex;
  justify-content: space-around;
  gap: 8px;
  margin-top: 16px;
}
.library-player .lp-btn {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 64px !important;
  min-height: 44px !important;
  padding: 0;
  color: #edf0f6;
  font-size: 12px;
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.library-player .lp-ico {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #23262e;
}
.library-player .lp-btn.primary .lp-ico {
  background: var(--c-primary, #f2f0eb);
  color: var(--c-primary-ink, #0e0e10);
}
.library-player .lp-lbl {
  font-size: 12px;
  line-height: 1.2;
}
