/* =====================================================================
   Clips: the clip editor as the app draws it (UI/ClipEditor*.swift), on a Mac screen in the light page.
   Numbers follow the app: canvas #0B0C10, card fill w/0.045, hairlines w/0.08, the 300-wide side panel,
   LitSelection tiles, the 36×20 switches, the caption looks from CaptionPainter.swift.
   ===================================================================== */

/* The section sits between the white builders and the paper features: white into paper, with soft colour behind
   the screen so the dark editor reads as an app on a Mac, not a black band across the page. */
.clips-sec { background: linear-gradient(#fff, var(--paper)); overflow: hidden; isolation: isolate; }
.clips-sec::before {
  content: ""; position: absolute; left: 50%; top: 260px; width: min(1500px, 140%); height: 900px; transform: translateX(-50%);
  z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 46% at 24% 52%, rgba(255, 84, 158, .13), transparent 70%),
    radial-gradient(42% 50% at 76% 46%, rgba(33, 97, 255, .16), transparent 70%),
    radial-gradient(36% 40% at 52% 82%, rgba(255, 200, 40, .14), transparent 70%);
}
.clips-head { margin-bottom: 44px; }
.clips-tag { gap: 8px; margin-bottom: 20px; color: #1d4fa8; }
.clips-tag i { width: 7px; height: 7px; border-radius: 50%; background: #2f80f5; box-shadow: 0 0 0 0 rgba(47, 128, 245, .5); animation: clips-dot 2.4s ease-out infinite; }
@keyframes clips-dot { 0% { box-shadow: 0 0 0 0 rgba(47, 128, 245, .55); } 50%, 100% { box-shadow: 0 0 0 6px rgba(47, 128, 245, 0); } }
.clips-head .px-title em { font-style: normal; background: linear-gradient(90deg, #ff8a00, #ff2d78 50%, #2161ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.clips-head .px-sub b { color: #000; font-weight: 600; }

/* the Mac screen the editor sits on: wallpaper, bezel, menu bar, the notch saying the command */
.clips-screen {
  position: relative; margin: 8px auto 0; max-width: 1200px;
  padding: 58px clamp(14px, 3.6vw, 46px) clamp(16px, 3.6vw, 46px);
  border-radius: 22px; overflow: hidden; isolation: isolate;
  background: #b9d3f5 url(../img/wp-imacblue.webp) center / cover no-repeat;
  box-shadow: 0 0 0 8px #0b0b0c, 0 0 0 9px #3a3b40, 0 60px 110px -40px rgba(10, 20, 60, .55), 0 24px 40px -24px rgba(10, 20, 60, .35);
}
.clips-mb {
  position: absolute; left: 0; right: 0; top: 0; z-index: 4; display: flex; align-items: center; gap: 16px;
  height: 26px; padding: 0 16px; font: 500 12.5px/1 var(--font-sf); color: rgba(0, 0, 0, .82);
  background: rgba(255, 255, 255, .42); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
}
.clips-mb svg { width: 13px; height: 14px; fill: currentColor; }
.clips-mb b { font-weight: 700; }
.clips-isl {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 5;
  display: flex; align-items: center; height: 32px; max-width: 76%; padding: 0 18px 0 42px;
  border-radius: 0 0 16px 16px; background: #000; color: #fff;
  box-shadow: 0 10px 26px -8px rgba(255, 170, 60, .6);
}
.clips-isl [data-cat] { position: absolute !important; left: 12px; top: 4px; }
.clips-isl p { margin: 0; font: 600 12.5px/1 var(--font-sf); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clips-try { margin: 22px 0 0; text-align: center; font: 400 13px/1.4 var(--font-mono); color: rgba(0, 0, 0, .6); }

/* ---------- the editor window ---------- */
.ce {
  --accent: #ffd929; --onaccent: #0d0d12; --fs: 20px; --hs: 18px; --tag: 16px; --barh: 4px;
  --mid: #2161ff; --light: #6bb3ff; --core: #dbf0ff; --card: rgba(255,255,255,.045); --hair: rgba(255,255,255,.08);
  position: relative; margin: 0 auto; max-width: 1100px; border-radius: 14px; background: #0b0c10; color: #fff;
  font-family: var(--font-sf); letter-spacing: -.01em; -webkit-user-select: none; user-select: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 0 0 .5px #000, 0 40px 80px -24px rgba(8, 20, 70, .6), 0 12px 30px -12px rgba(0, 0, 0, .5);
  overflow: hidden;
}
.ce::before { /* the header's glow from the top right */
  content: ""; position: absolute; right: -10%; top: -160px; width: 70%; height: 320px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(33, 97, 255, .28), transparent);
}
.ce-tl { position: absolute; left: 14px; top: 13px; display: flex; gap: 8px; z-index: 2; }
.ce-tl i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.ce-tl i:nth-child(2) { background: #febc2e; } .ce-tl i:nth-child(3) { background: #28c840; }
.ce-head { position: relative; display: flex; align-items: baseline; gap: 12px; padding: 38px 22px 14px; }
.ce-head b { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.ce-head small { font-size: 12px; color: rgba(255,255,255,.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-head .ce-btn { margin-left: auto; }
.ce-btn { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 12px; border: 0; border-radius: 999px; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.12); color: #fff; font: 600 12px/1 var(--font-sf); cursor: pointer; white-space: nowrap; transition: background .15s, transform .15s; }
.ce-btn:hover { background: rgba(255,255,255,.16); }
.ce-btn:active { transform: scale(.95); }

.ce-main { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; padding: 0 22px; height: 540px; }
.ce-preview { display: flex; flex-direction: column; min-height: 0; }
.ce-pbox { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; border-radius: 14px; background: rgba(0,0,0,.55); }
.ce-frame { position: relative; border-radius: 8px; overflow: hidden; background: #000; cursor: grab; container-type: inline-size; touch-action: pan-y; }
.ce--wide .ce-frame, .ce--fit .ce-frame { cursor: default; }
.ce-frame:active { cursor: grabbing; }
.ce-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ce-blur { opacity: 0; filter: blur(12px) brightness(.62); transform: scale(1.12); transition: opacity .3s; }
.ce--fit .ce-blur { opacity: 1; }
.ce-sound { position: absolute; inset: 0; display: none; place-items: center; align-content: center; gap: 8px; background: #0b0c10; color: rgba(255,255,255,.6); font-size: 12px; text-align: center; }
.ce-sound svg { width: 40px; height: 40px; color: var(--light); }
.ce--audio .ce-sound { display: grid; }
.ce--audio .ce-frame { aspect-ratio: auto; }

/* the Free tag: the pixel face and "made with Swaey", bottom right */
.ce-tag { position: absolute; right: calc(var(--tag) * .65); bottom: calc(var(--tag) * .65 + var(--barh)); display: inline-flex; align-items: center; gap: calc(var(--tag) * .22); height: var(--tag); padding: 0 calc(var(--tag) * .32); border-radius: 999px; background: rgba(0,0,0,.55); font: 600 calc(var(--tag) * .4)/1 var(--font-sf); color: rgba(255,255,255,.95); white-space: nowrap; pointer-events: none; }
.ce-tag [data-cat] { position: relative; display: inline-block; flex: none; width: calc(var(--tag) * .95) !important; height: calc(var(--tag) * .95) !important; }

/* the progress bar */
.ce-prog { position: absolute; left: 0; right: 0; bottom: 0; height: var(--barh); background: rgba(255,255,255,.28); pointer-events: none; }
.ce-prog i { display: block; height: 100%; width: 0; background: var(--accent); }
.ce--bar-off .ce-prog { display: none; }

/* under the preview: Fill | Fit and Follow faces */
.ce-under { display: flex; align-items: center; gap: 8px; min-height: 34px; padding-top: 8px; font-size: 11.5px; color: rgba(255,255,255,.75); white-space: nowrap; }
.ce-under[hidden] { display: flex; visibility: hidden; }
.ce-status, .ce-fitnote { color: rgba(255,255,255,.5); overflow: hidden; text-overflow: ellipsis; }
.ce-follow { display: inline-flex; align-items: center; gap: 8px; }
.ce-follow[hidden], .ce-fitnote[hidden] { display: none; }

/* segmented controls */
.ce-seg { display: inline-flex; padding: 2px; border-radius: 7px; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.1); }
.ce-seg button { height: 20px; padding: 0 10px; border: 0; border-radius: 5px; background: none; color: rgba(255,255,255,.75); font: 500 11.5px/1 var(--font-sf); cursor: pointer; }
.ce-seg button.on { background: rgba(255,255,255,.2); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.4); }
.ce-seg--full { display: flex; } .ce-seg--full button { flex: 1; }

/* the switch: a lit track through fine cells when on */
.ce-sw { position: relative; flex: none; width: 36px; height: 20px; padding: 0; border: 0; border-radius: 999px; cursor: pointer; background: rgba(255,255,255,.09); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); transition: background .2s, box-shadow .2s; }
.ce-sw:hover { background: rgba(255,255,255,.13); }
.ce-sw::after { content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 1.5px rgba(0,0,0,.35); transition: transform .28s cubic-bezier(.34, 1.4, .5, 1); }
.ce-sw.on { background: linear-gradient(90deg, var(--mid), var(--light)); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.3), 0 0 6px rgba(33,97,255,.6); }
.ce-sw.on::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: repeating-linear-gradient(90deg, transparent 0 5px, rgba(0,0,0,.18) 5px 6px), repeating-linear-gradient(0deg, transparent 0 5px, rgba(0,0,0,.18) 5px 6px); }
.ce-sw.on::after { transform: translateX(16px); }

/* ---------- the side panel ---------- */
.ce-side { display: flex; flex-direction: column; min-height: 0; }
.ce-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; -webkit-mask: linear-gradient(#000 calc(100% - 26px), transparent); mask: linear-gradient(#000 calc(100% - 26px), transparent); }
.ce-sec { margin-bottom: 13px; }
.ce-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.ce-h .ce-sw { margin-left: auto; }
.ce-note { margin: 6px 0 0; font-size: 11px; line-height: 1.35; color: rgba(255,255,255,.5); }
.ce-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ce-tiles--3 { grid-template-columns: repeat(3, 1fr); }
.ce-tile { position: relative; min-width: 0; display: grid; justify-items: center; gap: 2px; padding: 7px 2px; border: 0; border-radius: 10px; background: var(--card); color: #fff; font: 600 11.5px/1.15 var(--font-sf); cursor: pointer; transition: background .15s; }
.ce-tile:hover { background: rgba(255,255,255,.08); }
.ce-tile small { font-size: 10px; font-weight: 400; color: rgba(255,255,255,.5); }
.ce-tile svg { width: 15px; height: 15px; opacity: .9; }
.ce-tile.on { /* LitSelection: Swaey's colour through a fine pixel grid, a glowing edge */
  background: linear-gradient(90deg, rgba(33,97,255,.55), rgba(33,97,255,.08)), rgba(33,97,255,.1);
  box-shadow: inset 0 0 0 .7px rgba(107,179,255,.6), 0 0 8px rgba(33,97,255,.35);
}
.ce-tile.on::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: repeating-linear-gradient(90deg, transparent 0 5px, rgba(11,12,16,.35) 5px 6px), repeating-linear-gradient(0deg, transparent 0 5px, rgba(11,12,16,.35) 5px 6px); }
.ce-tile > * { position: relative; }

/* the seven look tiles: a sample of each look over a grey card */
.ce-looks .ce-tile { padding: 4px 4px 5px; }
.ce-look { display: grid; place-items: center; width: 100%; height: 40px; border-radius: 7px; background: linear-gradient(#3d3d3d, #1a1a1a); overflow: hidden; font-size: 10px; }
.lk-swaey { padding: 2px 6px; border-radius: 999px; background: rgba(0,0,0,.86); font-weight: 800; font-family: ui-rounded, var(--font-sf); color: rgba(255,255,255,.4); }
.lk-swaey b { color: var(--accent); text-shadow: 0 0 5px var(--accent); }
.lk-bold { font-weight: 900; text-transform: uppercase; -webkit-text-stroke: 2.4px #000; paint-order: stroke fill; }
.lk-bold b { color: var(--accent); }
.lk-big { font-weight: 900; font-size: 16px; text-transform: uppercase; transform: rotate(-3deg); color: var(--accent); -webkit-text-stroke: 3px #000; paint-order: stroke fill; }
.lk-box { font-weight: 800; font-family: ui-rounded, var(--font-sf); -webkit-text-stroke: 1.4px #000; paint-order: stroke fill; }
.lk-box b { padding: 0 2px; border-radius: 3px; background: var(--accent); color: var(--onaccent); -webkit-text-stroke: 0; }
.lk-karaoke { font-weight: 900; -webkit-text-stroke: 2px #000; paint-order: stroke fill; }
.lk-karaoke b { color: var(--accent); }
.lk-neon { font-weight: 600; font-family: ui-rounded, var(--font-sf); color: #fff; text-shadow: 0 0 2px var(--accent), 0 0 7px var(--accent), 0 0 12px var(--accent); }
.lk-clean { padding: 1px 5px; border-radius: 3px; background: rgba(0,0,0,.62); font-weight: 600; font-size: 9px; }
.ce-looks .ce-tile > span:last-child { font-size: 10.5px; }

.ce-accents { display: flex; gap: 8px; margin: 10px 0 0; }
.ce-accents button { width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: var(--c); box-shadow: 0 0 0 1px rgba(255,255,255,.15); transition: transform .15s; }
.ce-accents button:hover { transform: scale(1.12); }
.ce-accents button.on { box-shadow: 0 0 0 2px #0b0c10, 0 0 0 4px rgba(255,255,255,.95); }
.ce-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.ce-row svg { width: 13px; height: 13px; color: rgba(255,255,255,.45); flex: none; }
.ce-row input[type=range] { flex: 1; min-width: 0; accent-color: var(--light); }
.ce-heard { margin: 10px 0 6px; font-size: 10.5px; color: rgba(255,255,255,.35); }
.ce-lines { display: grid; gap: 4px; }
.ce-line { display: flex; gap: 6px; padding: 5px 8px; border-radius: 7px; background: rgba(255,255,255,.04); font-size: 12px; line-height: 1.35; }
.ce-line time { flex: none; width: 40px; font: 400 10px/1.6 var(--font-mono); color: rgba(255,255,255,.4); }
.ce-line span { flex: 1; outline: none; border-radius: 3px; cursor: text; -webkit-user-select: text; user-select: text; }
.ce-line span:focus { background: rgba(255,255,255,.08); box-shadow: 0 0 0 2px rgba(33,97,255,.55); }
.ce--caps-off .ce-capson { display: none; }
.ce-capsoff { display: none; }
.ce--caps-off .ce-capsoff { display: block; }

.ce-hookrow { display: flex; gap: 8px; align-items: flex-start; }
.ce-hooktext { flex: 1; min-width: 0; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); color: #fff; font: 600 12.5px/1 var(--font-sf); outline: none; }
.ce-hooktext:focus { box-shadow: inset 0 0 0 1px rgba(107,179,255,.6), 0 0 0 3px rgba(33,97,255,.25); }
.ce--hook-off .ce-hookon { display: none; }
.ce-hookoff { display: none; }
.ce--hook-off .ce-hookoff { display: block; }
.ce-x { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--hair); }
.ce-h + .ce-x { border-top: 0; }
.ce-x div { flex: 1; min-width: 0; }
.ce-x b { display: block; font-size: 12.5px; font-weight: 500; color: rgba(255,255,255,.85); }
.ce-x small { display: block; margin-top: 1px; font-size: 11px; line-height: 1.3; color: rgba(255,255,255,.5); }
.ce-partrow { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; background: linear-gradient(90deg, rgba(33,97,255,.45), rgba(33,97,255,.08)); box-shadow: inset 0 0 0 .7px rgba(107,179,255,.5); font-size: 12px; }
.ce-partrow b { font: 500 12px/1 var(--font-mono); }
.ce-partrow small { margin-left: auto; font-size: 11.5px; color: rgba(255,255,255,.55); }
.ce-addpart { margin-top: 8px; font-size: 12.5px; font-weight: 500; color: var(--light); }

/* the save area, pinned under the panel */
.ce-save { padding-top: 12px; border-top: 1px solid var(--hair); }
.ce-save-go { width: 100%; height: 34px; border: 0; border-radius: 999px; cursor: pointer; background: linear-gradient(var(--core), var(--light)); color: #000; font: 600 13.5px/1 var(--font-sf); box-shadow: 0 0 14px rgba(33,97,255,.35); transition: transform .15s, box-shadow .15s; }
.ce-save-go:hover { transform: scale(1.02); box-shadow: 0 0 22px rgba(33,97,255,.6); }
.ce-save-go:active { transform: scale(.97); }
.ce-playpart { display: block; margin: 7px auto 0; border: 0; background: none; color: rgba(255,255,255,.6); font: 400 12px/1 var(--font-sf); cursor: pointer; }
.ce-free { margin: 8px 0 0; text-align: center; font-size: 11px; color: rgba(255,255,255,.45); }
.ce-free b { font-weight: 400; color: var(--light); }
.ce-saving span { display: block; margin-bottom: 8px; font-size: 12px; color: rgba(255,255,255,.75); }
.ce-saving em { display: block; height: 4px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; }
.ce-saving i { display: block; height: 100%; width: 0; background: var(--light); transition: width .14s; }
.ce-saved { text-align: left; }
.ce-saved p { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 600; }
.ce-saved p svg { width: 20px; height: 20px; color: #61ebb3; }
.ce-saved small { display: block; margin: 3px 0 8px 28px; font-size: 11px; color: rgba(255,255,255,.5); }
.ce-saved div { display: flex; flex-wrap: wrap; gap: 6px; }
.ce-saved .ce-btn { height: 22px; padding: 0 10px; font-size: 11.5px; }

/* ---------- transport and the strips ---------- */
.ce-transport { display: grid; grid-template-columns: 170px 1fr 170px; align-items: center; padding: 14px 22px 0; }
.ce-time { font: 500 13px/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.ce-time small { font: inherit; color: rgba(255,255,255,.4); }
.ce-ctl { display: flex; justify-content: center; align-items: center; gap: 6px; }
.ce-ctl button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; }
.ce-ctl button:hover { background: rgba(255,255,255,.14); }
.ce-ctl .ce-mark { font: 800 17px/1 var(--font-mono); color: var(--light); }
.ce-ctl svg { width: 14px; height: 14px; }
.ce-ctl .ce-play { width: 40px; height: 40px; background: #fff; color: #000; }
.ce-ctl .ce-play:hover { background: #fff; transform: scale(1.05); }
.ce-play .i-pause { display: block; } .ce-play .i-play { display: none; }
.ce--paused .ce-play .i-pause { display: none; } .ce--paused .ce-play .i-play { display: block; }
.ce-speed { justify-self: end; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.85); }

.ce-strips { padding: 10px 22px 18px; }
.ce-strip { position: relative; display: grid; border-radius: 8px; }
.ce-strip--all { grid-template-columns: repeat(16, 1fr); height: 44px; }
.ce-strip--close { grid-template-columns: repeat(12, 1fr); height: 60px; margin-top: 6px; }
.ce-strip canvas { width: 100%; height: 100%; display: block; }
.ce-strip--all canvas:first-child, .ce-strip--close canvas:first-child { border-radius: 8px 0 0 8px; }
.ce-strip--all canvas:last-of-type, .ce-strip--close canvas:last-of-type { border-radius: 0 8px 8px 0; }
.ce-dim { position: absolute; inset: 0; border-radius: 8px; background: rgba(0,0,0,.6); pointer-events: none; }
.ce-part-o { position: absolute; top: -1px; bottom: -1px; border: 2px solid var(--light); border-radius: 4px; box-shadow: 0 0 6px rgba(33,97,255,.8), 0 0 0 999px rgba(0,0,0,.6); }
.ce-strip--all { overflow: hidden; }
.ce-ph-o { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; }
.ce-part-c { position: absolute; left: 33.333%; width: 33.333%; top: -1px; bottom: -1px; border: 2.5px solid var(--light); border-radius: 7px; box-shadow: 0 0 6px rgba(33,97,255,.8); }
.ce-dim--l { right: 66.667%; border-radius: 8px 0 0 8px; } .ce-dim--r { left: 66.667%; border-radius: 0 8px 8px 0; }
.ce-handle { position: absolute; top: -4px; bottom: -4px; width: 9px; margin-left: -4.5px; border-radius: 3px; background: linear-gradient(var(--light), var(--mid)); box-shadow: 0 0 5px rgba(33,97,255,.9); }
.ce-handle::after { content: ""; position: absolute; left: 3.5px; top: 34%; height: 32%; width: 2px; border-radius: 1px; background: rgba(255,255,255,.85); }
.ce-ph { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 3px rgba(0,0,0,.5); }
.ce-ph::before { content: ""; position: absolute; left: -3.5px; top: -4px; width: 9px; height: 9px; border-radius: 50%; background: #fff; }
.ce-ticks { display: flex; justify-content: space-between; margin-top: 5px; font: 400 10px/1 var(--font-mono); color: rgba(255,255,255,.4); }
.ce-ticks b { font: 600 9px/1 var(--font-sf); letter-spacing: .04em; color: rgba(255,255,255,.4); }
.ce-ends { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; color: rgba(255,255,255,.75); white-space: nowrap; }
.ce-ends span.box { min-width: 84px; padding: 4px 0; border-radius: 7px; background: rgba(255,255,255,.07); text-align: center; font: 400 12.5px/1 var(--font-mono); color: #fff; }
.ce-ends b { font-size: 12.5px; font-weight: 600; color: #fff; }
.ce-ends .ce-len2 { color: rgba(255,255,255,.55); }
.ce-ends .ce-keys { margin-left: auto; font-size: 10.5px; color: rgba(255,255,255,.35); }

/* ---------- captions on the frame (CaptionPainter.swift) ---------- */
.ce-caps { position: absolute; left: 8%; right: 8%; top: 70%; transform: translateY(-50%); display: flex; justify-content: center; pointer-events: none; text-align: center; font-size: var(--fs); line-height: 1.04; }
.ce--wide .ce-caps { left: 11%; right: 11%; top: auto; bottom: 10%; transform: none; }
.ce-caps[data-place=top] { top: 20%; }
.ce-caps[data-place=middle] { top: 50%; }
.ce--wide .ce-caps[data-place=top] { top: 8%; bottom: auto; }
.ce--wide .ce-caps[data-place=middle] { top: 50%; bottom: auto; transform: translateY(-50%); }
.ce--caps-off .ce-caps, .ce--audio .ce-caps, .ce--audio .ce-hook, .ce--audio .ce-prog, .ce--audio .ce-tag { display: none; }
.ce-beat { position: relative; display: inline-block; max-width: 100%; text-wrap: balance; opacity: 0; transition: opacity .12s; }
.ce-beat.in { opacity: 1; }
.ce-beat.pop { animation: ce-pop .16s cubic-bezier(.34, 1.9, .6, 1) both; }
@keyframes ce-pop { from { transform: scale(.9); } }
.ce-caps .w { position: relative; display: inline-block; }

/* Bold: heavy capitals, a thick black outline under the fill, the said word in the accent and bigger */
.ce-caps[data-look=bold] { font-weight: 900; color: #fff; letter-spacing: -.01em; word-spacing: .2em; }
.ce-caps[data-look=bold] .w { -webkit-text-stroke: .2em #000; paint-order: stroke fill; filter: drop-shadow(0 .06em .1em rgba(0,0,0,.6)); margin: 0 .02em; transition: transform .14s cubic-bezier(.34, 1.9, .6, 1), margin .14s; }
.ce-caps[data-look=bold] .w.now { color: var(--accent); transform: scale(1.12); margin: 0 .08em; }
/* Big: one word at a time, popping in at a slight tilt, the important words in the accent */
.ce-caps[data-look=big] { font-weight: 900; font-family: ui-rounded, var(--font-sf); color: #fff; }
.ce-caps[data-look=big] .w { -webkit-text-stroke: .2em #000; paint-order: stroke fill; transform: rotate(var(--tilt, 0deg)); animation: ce-big .2s cubic-bezier(.34, 1.7, .6, 1) both; filter: drop-shadow(0 .05em .08em rgba(0,0,0,.6)); }
.ce-caps[data-look=big] .w.key { color: var(--accent); }
@keyframes ce-big { from { transform: scale(.55) rotate(var(--tilt, 0deg)); } }
/* Box: an accent chip slides behind the word being said */
.ce-caps[data-look=box] { font-weight: 800; font-family: ui-rounded, var(--font-sf); color: #fff; word-spacing: .2em; }
.ce-caps[data-look=box] .w { -webkit-text-stroke: .11em #000; paint-order: stroke fill; padding: .04em .2em; margin: 0 -.1em; }
.ce-caps[data-look=box] .w.now { color: var(--onaccent); -webkit-text-stroke: 0; }
.ce-chip { position: absolute; z-index: -1; border-radius: .24em; background: var(--accent); box-shadow: 0 .06em .18em rgba(0,0,0,.45); opacity: 0; transition: left .1s ease-out, top .1s ease-out, width .1s ease-out, opacity .1s; }
.ce-caps[data-look=box] .ce-beat { isolation: isolate; }
/* Karaoke: the whole line, each word filling with the accent as it's said */
.ce-caps[data-look=karaoke] { font-weight: 900; color: #fff; word-spacing: .14em; }
.ce-caps[data-look=karaoke] .w { -webkit-text-stroke: .18em #000; paint-order: stroke fill; }
.ce-caps[data-look=karaoke] .w::after { content: attr(data-t); position: absolute; left: 0; top: 0; width: var(--p, 0%); overflow: hidden; white-space: nowrap; color: var(--accent); -webkit-text-stroke: .18em #000; paint-order: stroke fill; }
.ce-caps[data-look=karaoke] .w.said::after { width: 100%; }
/* Neon: glowing type in the accent, each word brightening as it's said */
.ce-caps[data-look=neon] { font-weight: 600; font-family: ui-rounded, var(--font-sf); color: color-mix(in srgb, var(--accent) 35%, #fff); word-spacing: .12em; }
.ce-caps[data-look=neon] .w { opacity: .45; text-shadow: 0 0 .18em var(--accent), 0 0 .55em var(--accent), 0 .1em .5em rgba(0,0,0,.6); transition: opacity .1s, color .1s; }
.ce-caps[data-look=neon] .w.said, .ce-caps[data-look=neon] .w.now { opacity: 1; }
.ce-caps[data-look=neon] .w.now { color: color-mix(in srgb, var(--accent) 8%, #fff); }
/* Clean: plain subtitles on a soft dark box */
.ce-caps[data-look=clean] { font-weight: 600; color: #fff; line-height: 1.12; }
.ce-caps[data-look=clean] .ce-beat { padding: .22em .42em; border-radius: .32em; background: rgba(0,0,0,.62); }
/* Swaey: on a black pill, each word switching on in accent pixel cells, then settling into white */
.ce-caps[data-look=swaey] { font-weight: 800; font-family: ui-rounded, var(--font-sf); word-spacing: .1em; }
.ce-caps[data-look=swaey] .ce-beat { padding: .26em .5em; border-radius: .6em; background: rgba(0,0,0,.86); box-shadow: 0 0 .4em rgba(0,0,0,.45); }
.ce-caps[data-look=swaey] .w { color: rgba(255,255,255,.3); transition: color .3s; }
.ce-caps[data-look=swaey] .w.said { color: #fff; }
.ce-caps[data-look=swaey] .w.now::after { content: attr(data-t); position: absolute; inset: 0; color: var(--accent); text-shadow: 0 0 .25em var(--accent);
  clip-path: inset(0 calc(100% - var(--p, 0%)) 0 0);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 .06em, transparent .06em .075em), repeating-linear-gradient(0deg, #000 0 .06em, transparent .06em .075em);
  -webkit-mask-composite: source-in; mask-composite: intersect; }

/* ---------- the hook title (ClipHook.swift) ---------- */
.ce-hook { position: absolute; left: 50%; top: 15%; width: 82%; transform: translateX(-50%); transform-origin: 50% 50%; text-align: center; pointer-events: none; font-size: var(--hs); font-weight: 800; line-height: 1.32; }
.ce--wide .ce-hook { top: 13%; width: 62%; }
.ce-hook.ce-hook--low { top: 36%; }
.ce--hook-off .ce-hook { display: none; }
.ce-hook span { padding: .16em .34em; border-radius: .24em; -webkit-box-decoration-break: clone; box-decoration-break: clone; background: #fff; color: #000; box-shadow: 0 .05em .3em rgba(0,0,0,.35); }
.ce-hook[data-look=colour] span { background: var(--accent); color: var(--onaccent); }
.ce-hook[data-look=outline] span { background: none; box-shadow: none; color: #fff; -webkit-text-stroke: .17em #000; paint-order: stroke fill; filter: drop-shadow(0 .08em .2em rgba(0,0,0,.6)); }

/* ---------- the three cards under it (the site's window cards, .mw.rp-tool) ---------- */
.clips-cards { margin-top: 40px; }
.cc-card .cc-pro { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; font: 500 10.5px/1.6 var(--font-mono); color: #1d4fa8; background: rgba(47, 128, 245, .14); vertical-align: 3px; }
.cc-demo {
  position: relative; height: 176px; margin-bottom: 16px; padding: 12px; border-radius: 6px; background: #fff; color: #1c1c1e;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .2), inset 0 1px 2px rgba(0, 0, 0, .12), 0 1px 0 rgba(255, 255, 255, .9);
  font-family: var(--font-sf); overflow: hidden;
}
.cc-find { display: flex; gap: 6px; }
.cc-find span { flex: 1; min-height: 28px; padding: 7px 9px; border-radius: 6px; background: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .22), inset 0 1px 2px rgba(0, 0, 0, .1); font-size: 12px; color: #1c1c1e; }
.cc-find span:empty::before { content: "What it’s about: where he talks about Mars"; color: rgba(0, 0, 0, .35); }
.cc-find b { display: grid; place-items: center; padding: 0 12px; border-radius: 999px; background: linear-gradient(#6fb6ff, #1f7bff); color: #fff; font-size: 12px; font-weight: 600; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .25), 0 1px 2px rgba(0, 60, 160, .3); }
.cc-found { margin-top: 10px; font-size: 11.5px; color: #3a3a3c; }
.cc-found b { color: #000; font-weight: 600; }
.cc-mstrip i { position: absolute; top: 0; bottom: 0; border: 2px solid #2f80f5; border-radius: 5px; box-shadow: 0 0 6px rgba(47, 128, 245, .7), 0 0 0 999px rgba(255, 255, 255, .55); left: 8%; width: 14%; transition: left .6s var(--ease-out), width .6s var(--ease-out); }
.cc-moment { display: grid; grid-template-columns: 14px 1fr auto; gap: 2px 8px; padding: 6px 9px; border-radius: 6px; background: #f3f4f7; font-size: 12px; }
.cc-moment.lit { background: linear-gradient(#5aa9ff, #1f7bff); color: #fff; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .2); }
.cc-moment.lit > b:first-child, .cc-moment.lit strong, .cc-moment.lit time, .cc-moment.lit small { color: #fff; }
.cc-mbtns { display: flex; gap: 6px; margin-top: 8px; }
.cc-mbtns span { height: 22px; padding: 0 11px; border-radius: 999px; background: linear-gradient(#fff, #ececef); box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .25), 0 1px 1px rgba(0, 0, 0, .08); color: #1c1c1e; font-size: 11.5px; font-weight: 600; line-height: 22px; }
.cc-link { display: grid; place-items: start center; background: #b9c6ff url(../img/wp-macblue.webp) center / cover no-repeat; }
.cc-copy { position: absolute; left: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 8px; font-size: 11.5px; color: #1c1c1e; background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .12); }
.cc-url { padding: 3px 8px; border-radius: 6px; background: rgba(47, 128, 245, .14); color: #1d4fa8; font: 400 11px/1.4 var(--font-mono); }
.cc-clipit { flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 999px; background: linear-gradient(#dbf0ff, #6bb3ff); color: #000; font-size: 11.5px; font-weight: 600; box-shadow: 0 0 10px rgba(33,97,255,.5); }
/* scripted parts: switch on in order (retro.js data-seq) */
.cc-demo [data-at] { opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s var(--ease-out); }
.cc-demo [data-at].on { opacity: 1; transform: none; }
.cc-demo .cc-mstrip i { transition: opacity .3s, left .6s var(--ease-out), width .6s var(--ease-out); }
.cc-mstrip { position: relative; height: 36px; margin-top: 12px; border-radius: 6px; overflow: hidden; display: grid; grid-template-columns: repeat(8, 1fr); }
.cc-mstrip canvas { width: 100%; height: 100%; }
.cc-demo.done .cc-mstrip i, .cc-mstrip i.on { left: 46%; width: 24%; }
.cc-moments { display: grid; gap: 5px; }
.cc-moment > b:first-child { font-size: 11px; color: #8e8e93; }
.cc-moment strong { font-weight: 600; color: #1c1c1e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-moment time { font: 400 11px/1.4 var(--font-mono); color: #6e6e73; }
.cc-moment small { grid-column: 2 / -1; font-size: 11px; color: #3a3a3c; }
/* the notch with the copied-link card (UI/ClipLinkCard.swift) */
.cc-isl { position: relative; color: #fff; width: 100%; margin-top: -12px; padding: 18px 12px 12px; border-radius: 0 0 22px 22px; background: #000; box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 14px 30px rgba(0,0,0,.6); transform-origin: 50% 0; }
.cc-isl[data-at] { transform: scaleY(.3) scaleX(.6); }
.cc-isl[data-at].on { transform: none; transition: transform .45s cubic-bezier(.32, 1.25, .5, 1), opacity .2s; }
.cc-isl > [data-cat] { position: absolute; left: 50%; top: 2px; transform: translateX(-50%); }
.cc-card-row { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-top: 6px; }
.cc-thumb { position: relative; flex: none; width: 96px; height: 54px; border-radius: 7px; overflow: hidden; }
.cc-thumb canvas { width: 100%; height: 100%; display: block; }
.cc-thumb em { position: absolute; right: 4px; bottom: 4px; padding: 1px 4px; border-radius: 3px; background: rgba(0,0,0,.75); font: 600 9.5px/1.3 var(--font-sf); font-style: normal; font-variant-numeric: tabular-nums; }
.cc-card-row div { flex: 1 1 96px; min-width: 0; }
.cc-card-row b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; font-weight: 600; line-height: 1.25; }
.cc-card-row small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; font-size: 11px; color: rgba(255,255,255,.55); }

.clips-fine { margin: 26px auto 0; max-width: 52em; text-align: center; font-size: 13px; line-height: 1.55; color: rgba(0, 0, 0, .6); }
.clips-fine a { color: #1d4fa8; }

@media (max-width: 980px) {
  .ce-main { grid-template-columns: minmax(0, 1fr); height: auto; }
  .ce-pbox { height: 440px; flex: none; }
  .ce-side { height: 420px; }
  .ce-transport { grid-template-columns: 1fr auto 1fr; }
  .ce-ends .ce-keys { display: none; }
  .clips-cards { grid-template-columns: minmax(0, 1fr); }
}
/* the menu bar gives up items as the notch reaches them */
@media (max-width: 900px) { .clips-mb span:nth-of-type(3) { display: none; } }
@media (max-width: 780px) { .clips-mb span { display: none; } }
@media (max-width: 640px) { .clips-mb b, .clips-mb svg { display: none; } }
@media (max-width: 560px) {
  .clips-screen { padding: 44px 8px 8px; border-radius: 16px; box-shadow: 0 0 0 5px #0b0b0c, 0 0 0 6px #3a3b40, 0 40px 70px -30px rgba(10, 20, 60, .5); }
  .clips-isl { height: 28px; max-width: 88%; padding: 0 12px 0 34px; }
  .clips-isl [data-cat] { left: 8px; top: 2px; }
  .clips-isl p { font-size: 11px; }
  .ce-head small { display: none; }
  .ce-main, .ce-transport, .ce-strips { padding-left: 12px; padding-right: 12px; }
  .ce-pbox { height: 400px; }
  .ce-transport { grid-template-columns: auto 1fr; }
  .ce-speed { display: none; }
  .ce-ctl { justify-content: flex-end; }
  .ce-ends { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .ce-beat.pop, .ce-caps[data-look=big] .w { animation: none; }
  .cc-isl[data-at].on { transition: none; }
  .clips-tag i { animation: none; }
}
