* {
  box-sizing: border-box;
}
/* CLAUDE 10-12: the Graphite tokens (DESIGN-SYSTEM.md, approved by the owner 10-11). Every stylesheet reads these; the
   older names below them (--bg, --panel, --accent ...) are kept as aliases so existing rules follow the new palette.
   --accent is now the off-white primary; green is --c-signal, only for what is on, live or done. */
:root {
  color-scheme: dark;
  /* surfaces, lifting in tone as they come closer */
  --c-canvas: #0e0e10;
  --c-surface: #151517;
  --c-raised: #1c1c1f;
  --c-overlay: #242428;
  --c-stage: #09090a;
  --c-line: rgba(255, 255, 255, 0.06);
  --c-line-strong: rgba(255, 255, 255, 0.12);
  /* text: 16.0 / 8.7 / 5.6 : 1 on --c-surface */
  --c-fg: #f2f0eb;
  --c-fg-2: #b5b3ad;
  --c-fg-3: #8f8e89;
  --c-primary: #f2f0eb;
  --c-primary-hover: #ffffff;
  --c-primary-ink: #0e0e10;
  --c-signal: #53fc18;
  --c-signal-soft: rgba(83, 252, 24, 0.12);
  --c-danger: #ff6b6b;
  --c-danger-fill: #c4362f;
  --c-warn: #f5c451;
  --c-focus: rgba(242, 240, 235, 0.72);
  /* type */
  --t-meta: 11px;
  --t-label: 12px;
  --t-body: 13px;
  --t-title: 15px;
  --t-page: 22px;
  --t-input: 16px; /* text inputs on a phone: under 16 px iOS zooms the page on focus */
  /* space, size, shape */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  /* CLAUDE 10-16: a field's hairline is a straight 1 px bottom strip (background: var(--field-line) no-repeat left bottom /
     100% 1px), never an inset box-shadow: that curls up the corners of a rounded field into a crescent */
  --field-line: linear-gradient(var(--c-line-strong), var(--c-line-strong));
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23b5b3ad' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 6.5 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E");
  --h-sm: 28px;
  --h-md: 32px;
  --h-lg: 40px;
  --h-touch: 44px;
  /* CLAUDE 10-19 (owner: "why is everything so square"): one step rounder, CapCut-phone soft, the ONE radius scale.
     Text buttons and chips are pills or near-pills, fields 12, thumbnails / menus 14, cards 20, sheets and dialogs 28.
     Hairline bars, ticks and keyframe diamonds keep their 1-3 px; nothing else hard-codes a radius. */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-field: 12px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;
  --e-float: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
  /* motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
  --d-press: 120ms;
  --d-hover: 140ms;
  --d-ui: 180ms;
  --d-panel: 240ms;
  /* the older names, now aliases */
  --bg: var(--c-canvas);
  --panel: var(--c-surface);
  --line: var(--c-line-strong);
  --muted: var(--c-fg-3);
  --text: var(--c-fg);
  --accent: var(--c-primary);
  --accent-ink: var(--c-primary-ink);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    13px system-ui,
    -apple-system,
    Segoe UI,
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
/* CLAUDE 10-12 Graphite: a button is a ghost (no box unless it carries meaning); the fill appears on hover and press.
   The one primary per area is .primary. */
button {
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--r-md); /* CLAUDE 10-19: a near-pill at 28-32 px, a soft tile when taller */
  background: transparent;
  color: var(--c-fg);
  padding: 7px 12px;
  /* CLAUDE 10-18: the transition list and the press (scale .97, 100 ms down, a spring back) are one definition in
     motion.css; this stays a plain fallback if that file is missing */
  transition:
    background-color var(--d-hover) ease,
    color var(--d-hover) ease;
}
/* CLAUDE 10-18: hover only where there is a hover; on a phone a tap used to leave the fill stuck on */
@media (hover: hover) and (pointer: fine) {
  button:hover {
    background: var(--c-raised);
  }
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed; /* was wait, which says "busy" for a button that is simply off */
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
}
::selection {
  background: rgba(242, 240, 235, 0.22);
}
html {
  caret-color: var(--c-fg);
  scrollbar-color: var(--c-overlay) transparent;
}
/* links in text: the text colour with a soft underline, never the browser's blue */
a {
  color: var(--c-fg);
  text-underline-offset: 3px;
  text-decoration-color: rgba(242, 240, 235, 0.35);
}
a:hover {
  text-decoration-color: currentColor;
}
.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  border-radius: var(--r-pill); /* CLAUDE 10-19: the one primary per area is a pill, as on CapCut / TikTok */
  padding-inline: var(--s-4); /* a pill's label sits clear of its curve (a component's own padding still wins) */
  font-weight: 500;
}
.primary:hover,
.accent:hover {
  background: var(--c-primary-hover);
}
.quiet {
  background: transparent;
}
.accent {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 500;
}
.badge {
  font-size: var(--t-meta);
  letter-spacing: 0.4px;
  color: var(--c-fg-2);
  border: 0;
  border-radius: var(--r-xs);
  padding: 3px 5px;
  vertical-align: middle;
  margin-left: 8px;
}
header {
  height: 80px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 26px;
  border-bottom: 1px solid var(--c-line);
  background: var(--c-canvas);
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  font-size: 18px;
  font-weight: 650;
  min-width: 220px;
}
.brand small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.4px;
}
.project-title {
  flex: 1;
}
.project-title input {
  border: 0;
  background: none;
  font-weight: 550;
  color: var(--text);
  padding: 0;
  width: 100%;
  max-width: 320px;
}
.project-title span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.local-pill {
  font-size: 10px;
  color: #a8a8ab;
  margin-right: 10px;
}
main {
  display: grid;
  grid-template-columns: 258px minmax(330px, 1fr) 318px;
  gap: 20px;
  padding: 22px;
  max-width: 1600px;
  margin: auto;
  height: calc(100vh - 80px);
  min-height: 700px;
}
.panel {
  background: var(--c-surface);
  border: 0;
  border-radius: var(--r-md);
  padding: var(--s-4);
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--t-title);
  font-weight: 600;
  letter-spacing: 0;
  margin-bottom: var(--s-3);
  color: #c7ced9;
}
.section-title span {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0;
  font-weight: 400;
}
.library {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 17px;
}
.import-box {
  border: 1px dashed #4e4e50;
  background: linear-gradient(140deg, #252527, #1c1c1e);
  border-radius: var(--r-md);
  min-height: 134px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  gap: 6px;
}
.import-box:hover,
.import-box.drag {
  border-color: var(--accent);
}
.upload-icon {
  font-size: 25px;
  color: var(--accent);
  line-height: 25px;
}
.import-box strong {
  font-size: 13px;
  font-weight: 600;
}
.import-box small {
  font-size: 10px;
  color: var(--muted);
}
.formats {
  font-size: 8px;
  letter-spacing: 1.2px;
  color: #838386;
  margin-top: 3px;
}
.examples {
  padding: 12px 0;
}
.examples > span {
  font-size: 10px;
  color: var(--muted);
}
.examples > div {
  display: flex;
  gap: 6px;
  margin-top: 7px;
}
.examples button {
  font-size: 10px;
  padding: 6px 9px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 11px;
  color: #bbc3d0;
  margin: 0 0 15px;
}
/* CLAUDE 10-12 Graphite: a field shows no box at rest, only a bottom hairline; hover and focus fill it. :where() keeps
   these at element weight so a component's own field style always wins */
:where(input:not([type='checkbox']):not([type='range']):not([type='color']), select, textarea) {
  background-color: transparent;
  /* CLAUDE 10-18: the hairline is a straight 1 px strip along the bottom (--field-line), not an inset shadow, which curled
     up the rounded corners into the "smile" the owner flagged on the tabs (feedback 27) */
  background-image: var(--field-line);
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 100% 1px;
  color: var(--c-fg);
  border: 1px solid transparent;
  border-radius: var(--r-field);
  padding: 7px 9px;
  width: 100%;
  min-width: 0;
} /* theme */
:where(input:not([type='checkbox']):not([type='range']):not([type='color']), select, textarea):where(:hover, :focus) {
  background-color: var(--c-raised);
  background-image: none;
}
input::placeholder,
textarea::placeholder {
  color: var(--c-fg-3);
}
select {
  cursor: pointer;
}
textarea {
  resize: vertical;
  line-height: 1.5;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 5px 0 18px;
  flex-shrink: 0;
}
.transcription .field {
  margin-bottom: 10px;
}
.pair {
  display: flex;
  gap: 10px;
  align-items: end;
}
.pair > * {
  flex: 1;
  min-width: 0;
}
.transcription .pair {
  gap: 6px;
}
.transcription button {
  font-size: 10px;
  white-space: nowrap;
  margin-bottom: 10px;
  padding: 11px 8px;
}
.transcription small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  display: block;
  margin: 9px 0;
}
.transcription details {
  margin: 0 0 4px;
}
.transcription summary {
  font-size: 10px;
  color: var(--muted);
}
details > textarea {
  margin-top: 8px;
}
summary {
  cursor: pointer;
}
.caption-tools {
  display: flex;
  gap: 8px;
  margin: 4px 0 10px;
}
.caption-tools button {
  font-size: 11px;
  padding: 7px 9px;
}
.caption-tools button:first-child {
  flex: 1;
}
.caption-list {
  overflow: auto;
  flex: 1;
  min-height: 100px;
  padding-right: 3px;
}
.caption-row {
  padding: 10px;
  border: 1px solid #2b303b;
  border-radius: var(--r-sm);
  margin-bottom: 8px;
  background: #191d25;
}
.caption-row.active {
  border-color: #98989b;
  background: #28282a;
}
.caption-row .row-top {
  display: flex;
  gap: 5px;
  align-items: center;
  margin-bottom: 6px;
}
.caption-row .row-top input {
  font-size: 10px;
  padding: 4px !important;
  max-width: 67px;
}
.caption-row textarea {
  font-size: 11px;
  padding: 5px;
  min-height: 48px;
}
.caption-row button {
  padding: 2px 5px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 12px;
}
.caption-row summary {
  font-size: 9px;
  color: #919194;
  margin-top: 5px;
}
.word-row {
  display: grid;
  grid-template-columns: 1fr 50px 50px;
  gap: 3px;
  align-items: center;
  margin: 5px 0;
  font-size: 10px;
}
.word-row input {
  padding: 3px !important;
  font-size: 10px;
}
.empty-captions {
  text-align: center;
  color: #9ba4b2;
  line-height: 1.7;
  padding: 20px 0;
  font-size: 12px;
}
.empty-captions span {
  font-size: 10px;
  color: #667183;
}
.stage {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.stage-heading {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2px 14px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.6px;
  color: #8893a5;
  font-weight: 600;
}
h1 {
  font-size: 22px;
  letter-spacing: -0.5px;
  font-weight: 600;
  margin: 4px 0 0;
}
.format-pill {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  font-size: 10px;
  color: #ccd3de;
}
.format-pill span {
  color: #647184;
  margin: 0 6px;
}
.preview-wrap {
  position: relative;
  flex: 1;
  min-height: 350px;
  max-height: calc(100vh - 280px);
  aspect-ratio: 9/16;
  max-width: 100%;
  overflow: hidden;
  border-radius: var(--r-md);
  border: 1px solid #333b49;
  box-shadow: 0 20px 70px #0007;
  background: radial-gradient(ellipse at 80% 20%, #2d2d2f, #151924 70%);
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#previewEmpty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 15px;
}
.empty-mark {
  font-size: 25px;
  display: grid;
  place-items: center;
  width: 65px;
  height: 65px;
  border: 1px solid #555558;
  border-radius: var(--r-xl);
  color: var(--accent);
  background: #303e2766;
  margin-bottom: 16px;
}
h2 {
  font-size: 18px;
  font-weight: 550;
  letter-spacing: -0.3px;
}
#previewEmpty p {
  font-size: 11px;
  line-height: 1.8;
  color: #929eac;
}
.transport {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 18px 0 12px;
  font-variant-numeric: tabular-nums;
}
.transport button {
  padding: 6px 9px;
}
.transport span {
  font-size: 10px;
  color: #9eabba;
}
.transport input {
  flex: 1;
  min-width: 30px;
}
/* CLAUDE 11-09: the clip range, one quiet strip (it was restyled six times across style / studio / editor /
   editor-chrome.css into 8-10 px words, a bare hairline field and 9 px "Set here"s; this is now its one definition):
   its name, then Start and End as the inspector's small raised number fields, each with a quiet "Set here" */
.trim-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 40px;
  padding: 4px var(--s-3);
  border: 0;
  border-radius: var(--r-md);
  background: var(--c-surface);
  color: var(--c-fg-2);
  font-size: var(--t-label);
}
.trim-bar > .eyebrow {
  margin-right: var(--s-2);
  color: var(--c-fg-2);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0;
}
.trim-bar label {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--c-fg-3);
}
.trim-bar input[type='number'] {
  width: 68px;
  height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--r-xs);
  background: var(--c-raised);
  color: var(--c-fg);
  font-size: var(--t-label);
  text-align: right;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  -moz-appearance: textfield;
}
.trim-bar input[type='number']:hover {
  box-shadow: inset 0 0 0 1px var(--c-line-strong);
}
.trim-bar input[type='number']:focus {
  outline: 0;
  box-shadow: inset 0 0 0 1px var(--c-focus);
}
.trim-bar input[type='number']::-webkit-inner-spin-button,
.trim-bar input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.trim-bar button {
  min-height: 28px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  color: var(--c-fg-2);
  font-size: var(--t-label);
}
.trim-bar button:hover {
  color: var(--c-fg);
}
.trim-line {
  flex: 1;
}
.stage-note {
  color: #657080;
  font-size: 9px;
  margin-top: 10px;
}
.inspector {
  overflow: auto;
  display: flex;
  flex-direction: column;
}
/* CLAUDE 11-09: the saved preset's two actions, quiet text buttons at the row's end under its menu (they were 10 px words
   floating in the middle of the panel) */
.preset-actions {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
  margin: 0 0 var(--s-3);
}
.preset-actions button {
  min-height: 28px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  color: var(--c-fg-2);
  font-size: var(--t-label);
}
.preset-actions button:hover {
  color: var(--c-fg);
}
@media (max-width: 767.98px) {
  body.pe-on .preset-actions button {
    min-height: var(--h-touch);
  }
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin: 0 -2px 18px;
  gap: 7px;
}
.tabs button {
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 0;
  padding: 10px 12px;
  font-size: 11px;
}
.tabs .active {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}
.font-sample {
  font-size: 20px;
  text-align: center;
  padding: 18px 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #101319;
  white-space: nowrap;
  overflow: hidden;
}
.font-upload {
  display: flex;
  justify-content: space-between;
  font-size: var(--t-label);
  margin: 12px 0;
  cursor: pointer;
  color: var(--c-fg-2);
}
.font-upload span {
  color: var(--c-fg-3);
  font-size: var(--t-meta);
}
/* CLAUDE 10-12 (review): the music upload is an action on its own line, its hint under it */
.font-upload.music-upload {
  display: grid;
  justify-content: start;
  gap: 2px;
  padding: 8px 10px;
  margin: 8px 0;
  border-radius: var(--r-sm);
  transition: background-color var(--d-hover) ease;
}
.font-upload.music-upload:hover {
  background: var(--c-raised);
}
.font-upload.music-upload b {
  color: var(--c-fg);
  font-size: var(--t-body);
  font-weight: 500;
}
.font-sources {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 18px;
}
.font-sources #fontSources {
  max-height: 190px;
  overflow: auto;
}
.font-sources a {
  display: block;
  color: #a1b4c9;
  padding: 5px 0;
}
.toggles {
  display: flex;
  gap: 10px;
  font-size: 9px;
  color: #a8b2c2;
  margin: 3px 0 19px;
  flex-wrap: wrap;
}
.toggles label {
  display: flex;
  gap: 3px;
  align-items: center;
}
input[type='checkbox'] {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
}
input[type='range'] {
  accent-color: var(--accent);
  height: 4px;
  cursor: pointer;
}
.color-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #bcc5d3;
  margin-bottom: 15px;
}
.switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #bac3d2;
  margin: 4px 0 20px;
}
.range-field {
  font-size: 11px;
  color: #b3bdcc;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 13px;
  margin-bottom: 24px;
}
.range-field input {
  grid-column: 1/-1;
  width: 100%;
  margin-inline: 0; /* the default 2px side margin pushed a full-width slider 2px past its field */
}
output {
  font-size: 10px;
  color: var(--accent);
}
.hint {
  font-size: 10px;
  line-height: 1.6;
  color: #778396;
}
.job-card {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 70px;
  padding: 17px;
  background: #202831f5;
  border: 1px solid #58585b;
  border-radius: var(--r-md);
  box-shadow: 0 15px 40px #000a;
  z-index: 5;
}
.job-card > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.job-card small {
  display: block;
  color: #b0bbc8;
  line-height: 1.5;
  max-height: 100px;
  overflow: auto;
}
.job-card progress {
  width: 100%;
  height: 7px;
  accent-color: var(--c-signal);
  margin: 14px 0;
}
.job-card button {
  font-size: 10px;
  padding: 5px 9px;
}
#jobDownloads {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
#jobDownloads a {
  background: var(--accent);
  color: #1c1c1e;
  border-radius: var(--r-xs);
  text-decoration: none;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(650px, 90vw);
  /* CLAUDE 10-18: Graphite (it was the pre-Graphite blue-grey with a border); the enter / exit is in motion.css */
  padding: 10px 16px;
  background: var(--c-overlay);
  color: var(--c-fg);
  border: 0;
  border-radius: var(--r-md);
  z-index: 50;
  box-shadow: var(--e-2, var(--e-float));
  font-size: var(--t-body);
  line-height: 1.5;
}
/* CLAUDE 10-16: "RipClip was updated. Reload" (appupdate.js), shown instead of a quiet reload when there is unsaved work */
.app-update {
  position: fixed;
  bottom: calc(var(--s-4) + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  max-width: calc(100vw - 2 * var(--s-4));
  padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4);
  background: var(--c-overlay);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-md);
  box-shadow: 0 10px 40px #0009;
  color: var(--c-fg);
  font-size: 13px;
  white-space: nowrap;
}
/* inside an open dialog (appupdate.js place()) the bottom is the dialog's own Post / Save row: the bar goes to the top */
dialog .app-update,
body.app-shell.at-home dialog .app-update {
  top: calc(var(--s-3) + env(safe-area-inset-top));
  bottom: auto;
}
.app-update button {
  min-height: 36px;
  padding: 0 var(--s-4);
  border: 0;
  border-radius: var(--r-pill);
  background: var(--c-primary);
  color: var(--c-primary-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.app-update button:hover {
  background: var(--c-primary-hover);
}
.app-update button:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
}
/* CLAUDE 10-18: the plain dialog is Graphite (it was the pre-Graphite blue-grey); its enter and exit are in motion.css */
dialog {
  background: var(--c-overlay);
  color: var(--text);
  border: 0;
  border-radius: var(--r-xl);
  max-width: 400px;
  padding: var(--s-5);
  box-shadow: var(--e-float);
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}
dialog p {
  font-size: var(--t-label);
  color: var(--c-fg-3);
  line-height: 1.6;
}
dialog input {
  margin: 8px 0 20px;
}
dialog form > div {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
dialog h2 {
  margin-top: 0;
}
dialog #loginError {
  color: #f3adab;
}
[hidden] {
  display: none !important;
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--c-overlay);
  border-radius: var(--r-pill);
}
@media (max-width: 1120px) {
  main {
    grid-template-columns: 230px minmax(280px, 1fr) 275px;
    gap: 12px;
    padding: 14px;
  }
  header {
    gap: 12px;
    padding: 0 16px;
  }
  .local-pill {
    display: none;
  }
  .trim-bar > .eyebrow {
    display: none;
  }
  .inspector {
    padding: 14px;
  }
}
@media (max-width: 860px) {
  main {
    height: auto;
    grid-template-columns: 1fr 1fr;
  }
  .stage {
    grid-column: 1/-1;
    grid-row: 1;
  }
  .preview-wrap {
    height: 570px;
    flex: auto;
  }
  .library,
  .inspector {
    max-height: 800px;
  }
  .brand {
    min-width: unset;
  }
  .project-title {
    display: none;
  }
  .header-actions {
    margin-left: auto;
  }
  .header-actions .quiet {
    display: none;
  }
  .stage-heading {
    max-width: 600px;
  }
  .transport,
  .trim-bar {
    max-width: 600px;
  }
}
@media (max-width: 540px) {
  main {
    grid-template-columns: 1fr;
  }
  .stage {
    grid-column: 1;
  }
  .preview-wrap {
    height: 470px;
  }
  .library,
  .inspector {
    max-height: 750px;
  }
  .brand {
    font-size: 15px;
  }
  .header-actions button {
    font-size: 11px;
  }
  .trim-bar {
    flex-wrap: wrap;
  }
  .trim-line {
    display: none;
  }
}

/* clip finder results */
.clip-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.clip-result {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-sm);
  padding: 8px;
  cursor: pointer;
  font-size: 12px;
}
.clip-result:hover {
  border-color: var(--accent);
}
.clip-result b {
  color: var(--accent);
}
.clip-result small {
  display: block;
  opacity: 0.7;
  margin-top: 3px;
}

/* Kick import */
.kick-import {
  display: flex;
  gap: 6px;
  margin: 8px 0;
}
/* CLAUDE 10-06: "Just want to edit a video? Open the editor →" under the link boxes (app-project.js data-edit-only) */
.edit-bubble {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 10px auto 0;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--c-fg-3);
  font: 400 13px/1.3 inherit;
  font-family: inherit;
  cursor: pointer;
  transition: color var(--d-hover) ease;
}
/* CLAUDE 10-12 Graphite: a quiet text link, not a green pill */
.edit-bubble b {
  color: var(--c-fg);
  font-weight: 500;
  white-space: nowrap;
}
/* the landing's button rules make every button big and full width; this one stays a small pill */
#lp .edit-bubble {
  align-self: center;
  width: auto;
  max-width: 100%;
  min-height: 0;
  height: auto;
  padding: 7px 14px;
  font-size: 13px;
  line-height: 1.3;
  flex-wrap: wrap;
  justify-content: center;
}
.edit-bubble:hover {
  background: transparent;
  color: var(--c-fg-2);
}
.edit-bubble:hover b {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.edit-bubble:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
}
/* CLAUDE 10-06: "By getting clips, you confirm you own this video…" under every link box (a notice, nothing to tick) */
.rights-note {
  cursor: default;
  font-size: 12.5px;
}
/* "I own this video or have permission" under every link box (sent as rights with /api/import_url) */
.rights-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.rights-check input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  margin: 0;
}
.kick-import input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-sm);
  color: inherit;
  padding: 6px 8px;
  font-size: 12px;
}

/* homepage — black, Kick green, pill link bar (layout after opus.pro's landing) */
#home {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  flex-direction: column;
  background: #000;
  overflow: auto;
}
body.at-home #home {
  display: flex;
}
body.at-home header,
body.at-home main {
  visibility: hidden;
}
/* CLAUDE 10-04: until init picks the page (showPage), nothing shows, so a refresh never flashes the editor or the
   landing; the 10 s reveal is only the safety net if a script fails (2 s was shorter than a slow connection's load) */
body.booting #home {
  opacity: 0;
  animation: boot-reveal 0s 10s forwards;
}
/* CLAUDE 10-17 (phone speed): a visitor with a session (server.index_page) is shown the dashboard, not the landing, yet a
   phone laid the hidden landing out while the HTML parsed (~1 s of the first load at 4x CPU, much of it text shaped in
   fonts not yet loaded). Not laid out until a page is chosen; showPage still shows it (the Clipping tab, an expired
   session). A signed-out visitor keeps the early layout, which overlaps the scripts' download. (content-visibility:
   hidden was tried first: Chrome still laid the landing out when parsing finished, and iOS before 18 lacks it.) */
body.at-home.booting.has-session #lp {
  display: none;
}
@keyframes boot-reveal {
  to {
    opacity: 1;
  }
}
.home-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
}
.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}
.home-nav button {
  background: transparent;
  border: 0;
  color: var(--text);
  font-weight: 600;
  padding: 8px 10px;
}
.home-nav a {
  color: inherit;
  text-decoration: none;
}
.home-tabs {
  display: flex;
  gap: 4px;
}
.home-tabs a {
  padding: 8px 12px;
  border-radius: var(--r-pill);
  color: #bdbdbd;
  font-weight: 600;
  font-size: 14px;
}
.home-tabs a:hover {
  color: var(--text);
  background: #141414;
}
.home-tabs a.active {
  color: var(--accent);
}
.home-tabs .count {
  display: inline-block;
  min-width: 18px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11px;
  text-align: center;
  margin-left: 4px;
}
.home-nav button:hover {
  color: var(--accent);
  background: transparent;
}
.home-page {
  display: flex;
  flex: 1;
  flex-direction: column;
}
#home h1 {
  font-size: clamp(36px, 6vw, 64px);
  margin: 0 0 14px;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-weight: 800;
}
.home-glow {
  position: absolute;
  left: 50%;
  top: -160px;
  width: 900px;
  height: 500px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(242, 240, 235, 0.05), transparent 70%);
  pointer-events: none;
}
@media (max-width: 600px) {
  .home-nav {
    padding: 14px 16px;
  }
}

/* library / pricing / support / contact pages */
.page-inner {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 28px 24px 80px;
}
.page-inner.narrow {
  width: min(720px, 100%);
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
/* CLAUDE 10-20 (phone QA P0-3): a long title (a file name with no spaces) wraps instead of widening the page */
.page-head > :first-child {
  min-width: 0;
}
.page-head > :not(:first-child) {
  flex: none;
}
.page-head h2,
.page-head .page-sub {
  overflow-wrap: anywhere;
}
.page-head.center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.page-head h2 {
  font-size: 32px;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.page-sub {
  color: #bdbdbd;
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  max-width: 620px;
}
.lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}
.lib-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.lib-card .thumb {
  position: relative;
  aspect-ratio: 9/16;
  background: #111;
  max-height: 340px;
}
.lib-card .thumb img,
.lib-card .thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lib-card .score {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-sm);
  padding: 4px 8px;
  line-height: 1.05;
  text-align: center;
}
.lib-card .score small {
  display: block;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: #bdbdbd;
}
.lib-card .score b {
  font-size: 18px;
  color: var(--accent);
}
.lib-card .dur {
  position: absolute;
  right: 10px;
  top: 10px;
  background: rgba(0, 0, 0, 0.72);
  border-radius: var(--r-sm);
  padding: 3px 7px;
  font-size: 12px;
}
.lib-card .edited-tag {
  position: absolute;
  left: 10px;
  top: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--r-sm);
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 700;
}
.lib-card .body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.lib-card .title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  min-width: 0;
  overflow-wrap: anywhere; /* CLAUDE 10-20 (phone QA P0-3) */
}
.lib-card .preview {
  color: #bdbdbd;
  font-size: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lib-card .meta {
  color: #8a8a8a;
  font-size: 11px;
  margin-top: auto;
}
.lib-card .meta.soon {
  color: #ffb454;
}
.lib-card .actions {
  display: flex;
  gap: 6px;
  padding: 0 12px 12px;
}
.lib-card .actions a,
.lib-card .actions button {
  flex: 1;
  text-align: center;
  font-size: 12px;
  padding: 8px 6px;
  border-radius: var(--r-sm);
  text-decoration: none;
}
.lib-card .actions a {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}
.lib-empty {
  text-align: center;
  padding: 60px 20px;
  color: #bdbdbd;
}
.lib-empty h3 {
  color: var(--text);
  margin: 10px 0 6px;
}
.lib-empty .empty-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #141414;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 20px;
}
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
}
.plan {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.plan.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(242, 240, 235, 0.08);
}
.plan h3 {
  margin: 0;
  font-size: 18px;
}
.plan .price {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.plan .price span {
  font-size: 14px;
  color: #8a8a8a;
  font-weight: 500;
}
.plan ul {
  margin: 0;
  padding-left: 18px;
  color: #bdbdbd;
  line-height: 1.7;
  flex: 1;
}
.plan button {
  width: 100%;
}
.page-inner details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin-bottom: 10px;
}
.page-inner summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
}
.page-inner details p {
  color: #bdbdbd;
  line-height: 1.55;
  margin: 10px 0 2px;
}
.page-inner details a {
  color: var(--accent);
}
.page-inner code {
  background: #1a1a1a;
  padding: 1px 5px;
  border-radius: var(--r-xs);
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
}
.contact-form .pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.contact-form textarea {
  resize: vertical;
}
.contact-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.contact-actions small {
  color: #bdbdbd;
}
@media (max-width: 760px) {
  .home-tabs {
    display: none;
  }
  .contact-form .pair {
    grid-template-columns: 1fr;
  }
  .page-head {
    flex-direction: column;
  }
}

/* Library dashboard (projects / collections), after OpusClip's "My projects" */
.page-inner.wide {
  width: min(1400px, 100%);
}
.lib-title {
  font-size: var(--t-page);
  margin: 0 0 var(--s-1);
  letter-spacing: -0.01em;
}
.lib-tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}
.lib-tabs a {
  color: #9a9a9a;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 2px 10px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.lib-tabs a.active {
  color: var(--text);
  border-bottom-color: var(--text);
}
.sec-title {
  color: #9a9a9a;
  font-weight: 600;
  font-size: 13px;
  margin: 0 0 12px;
}
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.sec-head .sec-title {
  margin: 0;
}
.storage {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9a9a9a;
  font-size: 12px;
}
.storage .pill {
  background: #141414;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 4px 8px;
  color: #9a9a9a;
}
.storage .pill.on {
  color: var(--text);
}
.coll-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.coll-custom {
  display: contents;
}
.coll-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 270px;
  height: 54px;
  padding: 0 18px;
  border-radius: var(--r-md);
  background: var(--panel);
  border: 1px solid var(--line);
  text-align: left;
}
.coll-tile.add {
  background: transparent;
  border-style: dashed;
  color: #bdbdbd;
}
.coll-tile .plus {
  font-size: 18px;
  color: #bdbdbd;
}
.coll-tile .coll-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1f1f1f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}
.coll-tile b {
  display: block;
  font-size: 14px;
}
.coll-tile small {
  color: #9a9a9a;
}
.coll-tile:hover {
  border-color: #3a3a3a;
  background: #161616;
}
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px 16px;
}
.proj-tile {
  cursor: pointer;
}
.proj-tile .cover {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #111;
  border: 1px solid var(--line);
}
.proj-tile .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.proj-tile .cover .foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 8px 5px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  font-size: 10px;
  color: #cfcfcf;
  text-align: center;
}
.proj-tile .cover .foot b {
  color: #ff6a3d;
  font-weight: 600;
}
.proj-tile .cover .badge-new {
  position: absolute;
  right: 8px;
  top: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--r-xs);
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
}
.proj-tile .cover .processing {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* CLAUDE 10-06 (the owner, OpusClip's projects): a progress ring in the middle of the picture, the % inside */
@property --p {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}
.proj-tile .cover .ring {
  --p: 0;
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, rgba(0, 0, 0, 0.62) 85%, transparent 87%),
    conic-gradient(var(--c-signal) calc(var(--p) * 1%), rgba(255, 255, 255, 0.22) 0);
  transition: --p 0.6s;
}
.proj-tile .cover .ring b {
  color: #fff;
  font-size: 18px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.proj-tile .cover .processing::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}
.proj-tile .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.proj-tile .name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.proj-tile .info {
  color: #9a9a9a;
  font-size: 13px;
  margin-top: 4px;
}
.proj-tile .info b {
  color: #cfcfcf;
  font-weight: 500;
}
.proj-tile .dots,
.lib-card .dots {
  background: transparent;
  border: 0;
  color: #9a9a9a;
  font-size: 18px;
  line-height: 1;
  padding: 2px 6px;
}
.proj-tile .dots:hover,
.lib-card .dots:hover {
  color: var(--text);
  background: transparent;
}
.upload-tile {
  aspect-ratio: 16/9;
  border: 1px dashed #3a3a3a;
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #bdbdbd;
  background: transparent;
  font-size: 13px;
}
.upload-tile:hover {
  border-color: #5a5a5a;
  background: #0f0f0f;
}
.upload-tile .plus {
  font-size: 22px;
}
.lib-back {
  display: inline-block;
  color: #bdbdbd;
  text-decoration: none;
  margin-bottom: 14px;
}
.lib-back:hover {
  color: var(--text);
}
.lib-card .fav {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 15px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lib-card .fav.on {
  color: #ff4d6d;
  border-color: #ff4d6d;
}
.lib-card .title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.card-menu {
  position: absolute;
  z-index: 80;
  background: var(--c-overlay);
  border: 0;
  border-radius: var(--r-md);
  padding: 6px;
  min-width: 200px;
  box-shadow: var(--e-float);
}
.card-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 13px;
}
.card-menu button:hover {
  background: rgba(255, 255, 255, 0.05);
}
.card-menu .danger {
  color: var(--c-danger);
}
.card-menu .label {
  color: var(--c-fg-3);
  font-size: var(--t-meta);
  padding: 6px 10px 2px;
}
@media (max-width: 760px) {
  .lib-tabs {
    gap: 14px;
  }
  .coll-tile {
    min-width: 100%;
  }
}

/* transcript editor + speech cleanup + preset tiles (session 20, after the OpusClip editor inspection) */
.transcript-tools {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.transcript-tools button {
  padding: 6px 9px;
  font-size: 12px;
}
.transcript-tools #filterDeleted[aria-pressed='true'] {
  background: var(--accent);
  color: var(--accent-ink);
}
.transcript {
  line-height: 2.05;
  font-size: 14px;
  padding: 10px 6px;
  max-height: 52vh;
  overflow: auto;
  outline: none;
  user-select: none;
}
.transcript .w {
  display: inline-block;
  padding: 0 3px;
  border-radius: var(--r-xs);
  cursor: pointer;
  margin: 0 1px;
}
.transcript .w:hover {
  background: #1c1c1c;
}
.transcript .w.active {
  background: var(--accent);
  color: var(--accent-ink);
}
.transcript .w.deleted {
  display: none;
  text-decoration: line-through;
  color: #7a7a7a;
  opacity: 0.7;
}
.transcript.show-deleted .w.deleted {
  display: inline-block;
}
.transcript .w.filler {
  color: #d7c76a;
}
.transcript .w.selected {
  outline: 2px solid var(--accent);
}
/* captions v2: keywords marked by hand (★) and found by the auto keywords; right-click toggles */
.transcript .w.kw {
  color: #ffe14d;
  box-shadow: inset 0 -2px 0 #ffe14d;
  border-radius: var(--r-xs) var(--r-xs) 0 0; /* CLAUDE 10-16: square along the underline, so it doesn't curl into a crescent */
}
.transcript .w.kw::after {
  content: '★';
  font-size: 0.7em;
  margin-left: 1px;
  vertical-align: super;
}
.transcript .w.kw-auto {
  color: #e8d77a;
}
.transcript .w.kw-off {
  text-decoration: line-through dotted #8f8f8f;
}
.capfx-translate {
  display: grid;
  gap: 8px;
}
.capfx-status {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.transcript .pause {
  display: inline-block;
  background: #1f1f1f;
  border: 1px solid #2e2e2e;
  color: #9a9a9a;
  border-radius: var(--r-sm);
  padding: 0 6px;
  font-size: 11px;
  line-height: 1.6;
  margin: 0 3px;
  cursor: pointer;
  vertical-align: middle;
}
.transcript .pause:hover {
  border-color: var(--accent);
  color: var(--text);
}
.transcript .pause.cut {
  display: none;
}
.transcript.show-deleted .pause.cut {
  display: inline-block;
  text-decoration: line-through;
}
.transcript .sent {
  display: block;
  height: 6px;
}
.word-menu {
  position: fixed;
  z-index: 90;
  background: #161616;
  border: 1px solid #2c2c2c;
  border-radius: var(--r-md);
  padding: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
  max-width: 320px;
}
.word-menu button {
  padding: 6px 9px;
  font-size: 12px;
  border-radius: var(--r-sm);
  background: #1f1f1f;
  border: 1px solid #2c2c2c;
}
.word-menu button.danger {
  color: #ff6a6a;
}
.word-menu input {
  width: 70px;
  padding: 4px 6px;
  font-size: 12px;
}
.word-menu .edit-text {
  width: 160px;
}
.cleanup-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 12px;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}
.cleanup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cleanup-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #bdbdbd;
}
.cleanup-row input {
  width: 64px;
  padding: 4px 6px;
}
.cleanup-row small {
  color: #9a9a9a;
  max-width: 60%;
  text-align: right;
}
/* CLAUDE 10-05: bad-takes removal (app-transcript.js renderRetakes) */
.transcript .w.retake {
  text-decoration: line-through;
  text-decoration-color: #d7c76a;
}
.retake-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 160px;
  overflow: auto;
}
.retake-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.retake-list span {
  flex: 1;
  min-width: 0;
  cursor: pointer;
  color: #cfcfcf;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.retake-list s {
  color: #d7c76a;
}
.retake-list em {
  font-style: normal;
  color: var(--muted);
  font-size: 11px;
}
.retake-list button {
  padding: 2px 10px;
}
.cleanup-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cleanup-actions small {
  color: #9a9a9a;
  margin-left: auto;
}
.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
/* CLAUDE 10-12 Graphite: a preset is its sample (the picture) with the name under it; no outline, the chosen one gets
   the light ring */
.preset-tile {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
}
.preset-tile:hover {
  background: transparent;
}
.preset-tile:hover .sample {
  background: var(--c-overlay);
}
.preset-tile.active {
  border-color: transparent;
  box-shadow: 0 0 0 1.5px var(--c-fg);
}
.preset-tile .sample {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-raised);
  border-radius: var(--r-sm);
  transition: background-color var(--d-hover) ease;
  padding: 6px;
  text-align: center;
  line-height: 1.05;
  text-wrap: balance; /* a long look wraps to two lines (TO GET / STARTED, as Opus's tiles) instead of being cut off */
  overflow: hidden;
}
.preset-tile .name {
  padding: 6px 2px 4px;
  font-size: var(--t-label);
  color: var(--c-fg-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.preset-tile .name b {
  color: var(--text);
  font-weight: 500;
}
.preset-tile .name small {
  color: var(--c-fg-3);
}

/* accounts: the sign-in / sign-up dialog is styled in auth.css (CLAUDE 10-19) */
.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #bdbdbd;
}
.account-chip b {
  color: var(--text);
  font-weight: 600;
}

/* CLAUDE 10-02: the sign-up gate (signupgate.js): two choices. CLAUDE 10-04: the free account is the green one, the
   trial the quieter one under it */
.gate {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gate h2 {
  margin-bottom: 0;
}
.gate-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid #262626;
  border-radius: var(--r-md);
  background: #161616;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.gate-choice:hover {
  border-color: #3a3a3a;
}
.gate-choice b {
  font-size: 15px;
}
.gate-choice span {
  font-size: 13px;
  color: #bdbdbd;
}
.gate-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--c-primary-ink);
}
.gate-primary:hover {
  border-color: var(--c-primary-hover);
  background: var(--c-primary-hover);
}
.gate-primary span {
  color: #3a3a3e;
}
.gate-alt {
  margin-top: 6px;
  padding: 10px 14px;
}
.gate-alt b {
  font-size: 14px;
}
.gate-fine {
  padding-top: 10px;
  border-top: 1px solid #222;
  font-size: 11.5px;
  color: #9a9a9a;
}
.gate-choice:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
}
.gate-terms {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #bdbdbd;
}
.gate-terms b {
  color: var(--text);
}
.turnstile {
  min-height: 65px; /* Cloudflare's widget height: the button doesn't jump when it appears */
  margin: 4px 0 10px;
}
#gateNote {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-raised);
}

/* library polish — cards sized like a phone thumbnail, badges only when meaningful */
.lib-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 230px)) !important;
  gap: 18px !important;
  justify-content: start;
}
/* CLAUDE 10-20 (phone QA P0-3): on a phone the clip card is the width of the screen, not 2/3 of it */
@media (max-width: 480px) {
  .lib-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
.lib-card .thumb {
  max-height: none;
}
.lib-card .full-tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-sm);
  padding: 4px 8px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #cfcfcf;
}
.lib-card .preview {
  font-size: 12px;
  color: #a8a8a8;
}
.workspace-top #crumb {
  color: #bdbdbd;
  letter-spacing: 0;
  text-transform: none;
  font-size: 13px;
}

/* setup page */
.setup-page {
  width: min(640px, 100%);
  margin: 0 auto;
  padding: 40px 20px 80px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}
/* CLAUDE 10-12: plain text tabs (the active one in full white), no card under them */
.setup-tabs {
  display: flex;
  gap: 18px;
  margin-top: 10px;
  border-bottom: 1px solid var(--c-line);
}
.setup-tabs button {
  background: transparent;
  border: 0;
  border-radius: 0; /* CLAUDE 10-16 (the tab "smile"): a rounded button's border-bottom curves into a crescent */
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 8px 0;
  color: var(--c-fg-3);
  font-weight: 600;
  font-size: 13px;
}
.setup-tabs button.active {
  color: var(--c-fg);
  border-bottom-color: var(--c-fg);
}
.setup-tabs.small button {
  font-size: 12px;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.switch i {
  width: 34px;
  height: 18px;
  border-radius: var(--r-pill);
  background: #333;
  position: relative;
  display: inline-block;
  transition: background 0.15s;
}
.switch i::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #bbb;
  transition:
    transform 0.15s,
    background 0.15s;
}
.switch input:checked + i {
  background: var(--c-signal);
}
.switch input:checked + i::after {
  transform: translateX(16px);
  background: #000;
}
.switch {
  position: relative;
  cursor: pointer;
}
.setup-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.setup-block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #bdbdbd;
}
.setup-block-head a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.setup-block-head .chip {
  background: #2d2d2f;
  color: var(--accent);
  border-radius: var(--r-xs);
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
}
.setup-block input[type='text'] {
  background: #0b0b0b;
  border: 1px solid #2a2a2a;
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 13px;
}
.setup-note {
  margin: 0;
  font-size: 12px;
  color: #ffb454;
}
/* CLAUDE 10-05: saved words hint and "Find moments about…" (app-base.js) */
.setup-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.setup-hint a {
  color: var(--accent);
}
.setup-find,
.moment-search {
  display: flex;
  gap: 8px;
}
.setup-find input {
  flex: 1;
  min-width: 0;
}
.moment-search {
  margin: 8px 0;
}
.moment-search input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-sm);
  color: inherit;
  padding: 6px 8px;
  font-size: 12px;
}
/* setup settings in groups (Clips / Look / Transcription) under More settings */
.setup-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid #222;
}
.setup-section h3 {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a8a8a;
}
.setup-section.is-off,
.setup-toggle.is-off {
  opacity: 0.4;
  pointer-events: none;
}
/* CLAUDE 10-06: the two main switches in view, the rest folded under More settings (10-12: no box; `.page-inner
   details` in style.css and studio.css would give it one) */
.page-inner .setup-more {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
.setup-more > summary {
  display: inline-flex;
  align-self: center;
  padding: 8px 24px 8px 4px;
  color: var(--c-fg-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
}
.setup-more-foot {
  margin: 0;
}
.setup-more > summary::-webkit-details-marker {
  display: none;
}
.setup-more > summary::after {
  content: '';
  position: absolute;
  right: 6px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -5px;
  border-right: 2px solid #9a9a9d;
  border-bottom: 2px solid #9a9a9d;
  transform: rotate(45deg);
  transition: transform 0.15s;
}
.setup-more[open] > summary::after {
  transform: rotate(225deg);
  margin-top: -2px;
}
.setup-more[open] > summary {
  margin-bottom: 4px;
}
.setup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px 18px;
}
.setup-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #d0d0d0;
}
.setup-field select {
  padding: 8px 10px;
  border: 1px solid #2a2a2a;
  border-radius: var(--r-sm);
  background: #0b0b0b;
  color: var(--text);
  font-size: 13px;
}
.setup-field small,
.setup-toggle small,
.srt-upload small {
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  color: #8a8a8a;
}
.setup-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: #d0d0d0;
}
.setup-toggle > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.setup-toggle i {
  flex: none;
}
.range-pair {
  position: relative;
  height: 22px;
}
.range-pair input {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  margin: 0;
  pointer-events: none;
  background: transparent;
  -webkit-appearance: none;
  height: 22px;
}
/* CLAUDE 10-06 (the owner: "the line through the circle is the issue"): the two inputs are stacked, so the top one's
   track crossed the other's handle. The track is drawn once, under both, with the chosen part green (--a/--b set by
   app-base.js updateRange); the inputs' own tracks are invisible. */
.range-pair::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    #3a3a3a var(--a, 0%),
    var(--accent) var(--a, 0%),
    var(--accent) var(--b, 100%),
    #3a3a3a var(--b, 100%)
  );
}
.range-pair input::-webkit-slider-runnable-track {
  height: 3px;
  background: transparent;
  border-radius: 2px;
}
.range-pair input::-moz-range-track {
  background: transparent;
}
.range-pair input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f3f3f3;
  border: 2px solid #000;
  margin-top: -6.5px;
  pointer-events: auto;
  cursor: pointer;
}
.range-labels {
  display: flex;
  justify-content: space-between;
}
.range-labels span {
  background: #0b0b0b;
  border: 1px solid #2a2a2a;
  border-radius: var(--r-sm);
  padding: 6px 12px;
  font-size: 12px;
}
.setup-presets {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 2px;
  /* CLAUDE 10-06 (the owner's iPhone showed an empty Quick presets card): a scrolling row inside a flex column can
     be squeezed to nothing in Safari (min-height auto is 0 once overflow isn't visible); keep it a tile tall */
  flex: none;
}
.setup-presets:has(.preset-tile) {
  min-height: 170px;
}
.setup-presets .preset-tile {
  flex: 0 0 150px;
}
.setup-presets .preset-tile .sample {
  height: 120px;
  background: linear-gradient(180deg, #2c2c2c, #101010);
}

/* readable dropdowns: the native option list takes the options' colours (set below), so the select itself can be a
   ghost with one chevron (CLAUDE 10-12 Graphite) */
select {
  color-scheme: dark;
  appearance: none;
  -webkit-appearance: none;
  background: transparent var(--chev) no-repeat right 8px center;
  padding-right: 30px;
  color: var(--c-fg);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
}
select:hover,
select:focus {
  background-color: var(--c-raised);
}
select option {
  background: var(--c-overlay);
  color: var(--c-fg);
}

.triple {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* brand tab */
.logo-preview {
  background: repeating-conic-gradient(#222 0 25%, #181818 0 50%) 0 0/16px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px;
  margin: 6px 0;
  display: flex;
  justify-content: center;
}
.logo-preview img {
  max-height: 60px;
  max-width: 100%;
}
.template-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.template-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #111;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  font-size: 12px;
}
.template-row button {
  padding: 4px 8px;
  font-size: 11px;
}
.setup-presets .tpl-tile .sample {
  flex-direction: column;
  gap: 6px;
}
.setup-presets .tpl-tile .hl {
  font-size: 10px;
  letter-spacing: 0.05em;
  color: #fff;
  background: #000;
  padding: 2px 6px;
  border-radius: var(--r-xs);
}

/* CLAUDE 10-11: the upload progress card (uploadprog.js): a centred dialog on desktop, a bottom sheet on a phone. Every
   line keeps its height whatever it says, so nothing jumps as the stages change. */
dialog.upl {
  width: min(440px, calc(100vw - 32px));
  max-width: none;
  padding: 22px 22px 18px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-xl);
  background: var(--c-raised);
  box-shadow: var(--e-float);
  font-variant-numeric: tabular-nums;
}
/* (CLAUDE 10-18: the centred card's enter and exit are motion.css's dialog recipe; only the phone sheet slide is here) */
/* CLAUDE 11-04: the picked video's own picture (a muted loop made in the browser from the File) leads the card; the icon
   is only for a video this browser cannot play and for a failure */
.upl-prev {
  display: grid;
  place-items: center;
  height: min(220px, 34vh);
  margin-bottom: 16px;
  border-radius: var(--r-md);
  background: var(--c-stage);
  overflow: hidden;
}
.upl-prev[hidden] {
  display: none;
}
.upl-prev video {
  max-width: 100%;
  max-height: 100%;
}
dialog.upl.has-prev .upl-ico {
  display: none;
}
.upl-head {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}
.upl-ico {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--c-overlay);
  color: var(--c-fg);
}
dialog.upl.bad .upl-ico {
  background: #2a1414;
  color: #ff6a6a;
}
.upl-names {
  min-width: 0;
}
dialog.upl h2 {
  margin: 0 0 3px;
  font-size: 18px;
  font-weight: 650;
}
dialog.upl .upl-file {
  display: flex;
  margin: 0;
  color: var(--c-fg-2);
  font-size: 13px;
  line-height: 1.4;
  white-space: pre;
}
.upl-file span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}
.upl-file span:last-child {
  flex: none;
}
.upl-bar {
  position: relative;
  overflow: hidden;
  height: 4px;
  margin: 20px 0 10px;
  border-radius: var(--r-pill);
  background: var(--c-line-strong);
}
.upl-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: var(--c-fg);
}
.upl-bar.ind i {
  width: 38%;
  animation: upl-slide 1.15s ease-in-out infinite;
}
@keyframes upl-slide {
  from {
    left: -38%;
  }
  to {
    left: 100%;
  }
}
dialog.upl.bad .upl-bar i {
  width: 100%;
  background: #ff6a6a;
  animation: none;
}
.upl-meta {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 2.8em;
  color: var(--c-fg-2);
  font-size: 14px;
  line-height: 1.4;
}
dialog.upl.bad .upl-meta {
  color: #ffb4b4;
}
.upl-meta b {
  flex: none;
  color: var(--c-fg);
  font-weight: 650;
}
.upl-sr {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  white-space: nowrap;
}
.upl-btns {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  min-height: 42px;
  margin-top: 16px;
}
.upl-btns button {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--c-fg);
  font-weight: 500;
}
.upl-btns button:hover {
  background: var(--c-overlay);
}
.upl-btns button.primary {
  background: var(--c-primary);
  color: var(--c-primary-ink);
}
@media (max-width: 767.98px) {
  dialog.upl {
    width: 100%;
    max-height: none;
    margin: auto 0 0;
    padding: 20px 16px calc(16px + env(safe-area-inset-bottom));
    border-width: 1px 0 0;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
  }
  dialog.upl[open] {
    animation: upl-up var(--d-panel) var(--ease-out);
  }
  @keyframes upl-up {
    from {
      transform: translateY(24px);
      opacity: 0;
    }
  }
  .upl-btns button {
    flex: 1;
    min-height: 46px;
  }
}
@media (prefers-reduced-motion: reduce) {
  dialog.upl[open] {
    animation: none;
  }
  .upl-bar.ind i {
    left: 0;
    width: 100%;
    animation: upl-pulse 1.6s ease-in-out infinite alternate;
  }
  @keyframes upl-pulse {
    from {
      opacity: 0.35;
    }
  }
}
