/* Skip the Edit, the app. A tool, so it is built like one: black surfaces told apart by tone, small dense type.
   Same language as the front page (home.css) and Carl's brand picture: black and white only. White means "on" or "press here", a silver edge means "the pointer is here".
   Red is for removing and for what went wrong. Nothing glows. */
:root {
  --bg: #000; --p1: #080808; --p2: #121212; --p3: #1c1c1c; --p4: #2a2a2a; --ln: rgb(255 255 255 / .09); --ln2: rgb(255 255 255 / .17);
  --tx: #fff; --dim: #9c9c9c; --faint: #6a6a6a;
  --ac: #fff; --aci: #000; --acs: rgb(255 255 255 / .1); --kill: #ff6a5e; --bad: #ff9b93; --sig: #ffcf5a; --ok: #7be0a8;
  --silver: linear-gradient(112deg, #f2f2f2 0%, #9d9d9d 24%, #ffffff 46%, #868686 70%, #e0e0e0 100%);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --r: 10px; --h: 36px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--tx); font: 400 13px/1.4 Archivo, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:is(button, input, select, textarea, a, [tabindex], label.btn):focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
* { scrollbar-width: thin; scrollbar-color: var(--p4) transparent; }

/* buttons: a quiet plate, or white for the one thing to press. Under the pointer the white turns to brushed silver. */
.btn { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h); padding: 0 14px; border: 0; border-radius: 8px; background: var(--p3); color: var(--tx); font-weight: 600; white-space: nowrap; cursor: pointer; text-decoration: none; user-select: none; transition: background-color .15s, color .15s, transform .12s; }
.btn:hover:not(:disabled) { background: var(--p4); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.985); }
.btn:disabled { opacity: .38; cursor: not-allowed; }
.btn.pri { background: var(--ac); color: var(--aci); }
.btn.pri::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--silver); opacity: 0; transition: opacity .2s; }
.btn.pri:hover:not(:disabled) { background: var(--ac); }
@media (hover: hover) { .btn.pri:hover:not(:disabled)::before { opacity: 1; } }
/* while a video records, the export button fills from the left */
.btn.pri.is-busy:disabled { opacity: 1; cursor: progress; color: var(--aci); background: linear-gradient(90deg, var(--ac) calc(var(--f, 0) * 100%), #8a8a8a 0); font-variant-numeric: tabular-nums; }
.btn.ghost { background: none; color: var(--dim); }
.btn.ghost:hover:not(:disabled) { color: var(--tx); background: var(--p2); }
.btn.ico { width: var(--h); padding: 0; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn.sm.ico { width: 30px; padding: 0; }
.btn.warn { color: var(--bad); }
.btn[aria-pressed="true"] { background: var(--p4); color: var(--tx); }
.btn.big { height: 48px; font-size: 15px; border-radius: 10px; }

/* fields */
input[type="text"], input[type="number"], input[type="url"], select, textarea { width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 9px; background: var(--p2); box-shadow: inset 0 0 0 1px var(--ln2); }
:is(input[type="text"], input[type="number"], input[type="url"], select, textarea):focus { outline: none; box-shadow: inset 0 0 0 1px var(--ac); }
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }
textarea { height: auto; min-height: 64px; padding: 9px 12px; resize: vertical; line-height: 1.35; }
:is(input, select, textarea):disabled { opacity: .4; cursor: not-allowed; }
/* a slider: a thin track, filled in white up to the knob (--p, set in app.js) */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0; background: none; cursor: pointer; --p: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--ac) calc(var(--p) * 100%), var(--p4) 0); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border: 0; border-radius: 50%; background: #fff; }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--p4); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--ac); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
input[type="range"]:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; border-radius: 6px; }

/* the frame: top bar, then library | stage | inspector, then the timeline */
.app { display: grid; height: 100vh; height: 100dvh; grid-template-rows: 56px minmax(0, 1fr) auto; }
.bar { display: flex; align-items: center; gap: 6px; padding: 0 16px; border-bottom: 1px solid var(--ln); background: var(--bg); min-width: 0; }
.logo { display: inline-flex; align-items: center; gap: .28em; margin-right: 8px; padding: .34em .58em .34em .68em; border-radius: .36em; box-shadow: inset 0 0 0 .085em currentColor; font-weight: 800; font-stretch: 110%; font-size: 16px; letter-spacing: -0.01em; line-height: 1; white-space: nowrap; text-decoration: none; }
.logo svg { width: .95em; height: .95em; }
.bar .plan { padding: 3px 8px; border-radius: 99px; background: var(--p3); color: var(--dim); font-size: 11px; font-weight: 600; }
.bar .grow { flex: 1 1 0; min-width: 0; }
.bar .status { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .status.err { color: var(--bad); }
.nav2 { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; font-size: 13px; white-space: nowrap; }
.nav2 b { font-weight: 600; padding: 0 6px; font-variant-numeric: tabular-nums; }

.main { display: grid; grid-template-columns: 232px minmax(0, 1fr) 300px; min-height: 0; }
.lib { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr) auto; min-width: 0; border-right: 1px solid var(--ln); background: var(--p1); min-height: 0; }
.ph { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 44px; padding: 0 10px 0 14px; font-weight: 600; font-size: 12px; color: var(--dim); }
.ph b { color: var(--tx); font-weight: 700; }
.clips { list-style: none; margin: 0; padding: 6px; overflow-y: auto; display: grid; align-content: start; gap: 4px; }
.clip { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 9px; align-items: center; padding: 5px; border: 0; border-radius: var(--r); cursor: pointer; text-align: left; background: none; width: 100%; }
.clip:hover { background: var(--p2); }
.clip[aria-current="true"] { background: var(--p3); }
.clip .th { position: relative; width: 64px; aspect-ratio: 16 / 9; border-radius: 5px; background: var(--p3) center / cover no-repeat; overflow: hidden; }
.clip .th .d { position: absolute; right: 3px; bottom: 3px; padding: 0 4px; border-radius: 3px; background: rgb(0 0 0 / .7); font-size: 10px; font-variant-numeric: tabular-nums; }
.clip .nm { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.clip .st { display: flex; align-items: center; gap: 5px; color: var(--dim); font-size: 11px; }
.clip .st i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.clip .st.guess i { background: var(--sig); }
.clip .st.mark i { background: var(--kill); }
.clip .st.done i { background: var(--ok); }
.lib .foot { display: grid; gap: 6px; padding: 8px; }
.lib .foot .btn { width: 100%; }
.libempty { margin: 8px; padding: 14px 10px; border-radius: var(--r); background: var(--p2); color: var(--dim); text-align: center; }

.stage { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; background: var(--bg); }
.ask { display: flex; gap: 8px; padding: 10px 12px; align-items: center; }
.ask .field { position: relative; flex: 1 1 0; min-width: 0; }
.ask .field svg { position: absolute; left: 12px; top: 50%; translate: 0 -50%; color: var(--dim); }
.ask input[type="text"] { height: 40px; padding: 0 12px 0 36px; font-size: 14px; }
.ask .btn { height: 40px; }
.sugg { display: flex; gap: 6px; padding: 0 12px 8px; overflow-x: auto; scrollbar-width: none; }
.sugg::-webkit-scrollbar { display: none; }
.sugg button { flex: none; height: 28px; padding: 0 11px; border: 0; border-radius: 99px; background: var(--p2); color: var(--dim); font-size: 12px; cursor: pointer; }
.sugg button:hover { color: var(--tx); background: var(--p3); }
.view { display: grid; place-items: center; min-height: 0; padding: 14px; overflow: hidden; }
.phone { position: relative; height: 100%; max-height: 100%; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--ln2); }
.phone canvas, .phone video { display: block; width: 100%; height: 100%; }
.log { display: grid; gap: 2px; padding: 8px 14px 10px; max-height: 64px; overflow-y: auto; color: var(--dim); font-size: 12px; }
.log p { margin: 0; }
.log p b { color: var(--tx); font-weight: 600; }
.log p.err { color: var(--bad); }
.drop { position: absolute; inset: 0; display: grid; place-items: center; z-index: 30; background: rgb(0 0 0 / .9); border: 2px dashed var(--ac); border-radius: 12px; margin: 10px; font-size: 18px; font-weight: 700; pointer-events: none; }

/* find moments in a link */
.find { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; width: 100%; }
.find .btn { height: 40px; }
.find.small { gap: 6px; padding: 8px; }
.find.small input[type="url"] { height: 34px; font-size: 12px; }
.find.small .btn { height: 34px; width: 34px; padding: 0; }
.find.small .findnote { grid-column: 1 / -1; }
.findnote { margin: 0; color: var(--dim); font-size: 12px; text-align: left; }
.findnote:empty { display: none; }
.findnote.err { color: var(--bad); }
.hello .findnote { font-size: 14px; text-align: center; }
.linkbtn, .lnk { color: var(--tx); text-decoration: underline; text-decoration-color: rgb(255 255 255 / .45); text-underline-offset: 3px; cursor: pointer; }
.lnk:hover { color: #fff; text-decoration-color: #fff; }
/* before any clip is open: no second finder in the library, and no settings for a clip that is not there */
.app:not(.has-clip) .find.small, .app:not(.has-clip) .lib .foot, .app:not(.has-clip) .insp .pane > :not(h2):not(#clipinfo) { display: none; }

/* the start: the same words and the same link box as the front page, then a place to drop a file */
.hello { display: grid; justify-items: center; gap: 14px; width: 100%; max-width: 660px; padding: 24px; text-align: center; }
.hello h1 { margin: 0; font-weight: 800; font-stretch: 120%; font-size: clamp(30px, 4.6vw, 54px); line-height: 1; letter-spacing: -0.02em; text-wrap: balance; }
.hello > p { margin: 0 0 10px; max-width: 48ch; color: var(--dim); font-size: 16px; line-height: 1.5; }
.find.big { position: relative; gap: 8px; padding: 7px; border-radius: 14px; background: #0a0a0a; box-shadow: 0 0 0 1px var(--ln2); transition: box-shadow .2s; }
.find.big::before { content: ""; position: absolute; inset: -1px; padding: 1px; border-radius: 15px; pointer-events: none; background: var(--silver);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .25s; }
@media (hover: hover) { .find.big:hover::before { opacity: 1; } }
.find.big:focus-within { box-shadow: 0 0 0 1px var(--ac); }
.find.big:focus-within::before { opacity: 0; }
.find.big input[type="url"] { height: 52px; padding: 0 14px; background: none; box-shadow: none; font-size: 17px; font-weight: 500; }
.find.big .btn { height: 52px; padding: 0 22px; font-size: 15px; border-radius: 9px; }
.dropzone { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 18px; border-radius: 12px; background: var(--p1); color: var(--dim); font-size: 13px; text-align: left; cursor: pointer; transition: background-color .15s, color .15s; }
.dropzone:hover { background: var(--p2); color: var(--tx); }
.dropzone b { display: block; color: var(--tx); font-size: 14px; }
.dropzone svg.i { width: 20px; height: 20px; }
@media (max-width: 599px) { .find.big { grid-template-columns: minmax(0, 1fr); } .hello { padding: 16px 4px; } }

/* videos being searched */
.sources { list-style: none; margin: 0; padding: 6px 6px 0; display: grid; gap: 6px; }
.sources:empty { display: none; }
.src { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px; border-radius: var(--r); background: var(--p2); }
.src .th { width: 64px; aspect-ratio: 16 / 9; border-radius: 5px; background: var(--p3) center / cover no-repeat; }
.src .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 12px; }
.src .tx { margin-top: 4px; color: var(--dim); font-size: 11px; }
.src.bad .tx { color: var(--bad); }
/* progress on a source: a real bar when the percent is known, a moving one when it is not */
.pbar { position: relative; display: block; height: 4px; margin-top: 7px; border-radius: 2px; background: var(--p4); overflow: hidden; }
.pbar i { display: block; height: 100%; width: 0; background: var(--ac); transition: width .5s ease; }
.pbar.busy i { width: 35% !important; animation: slide 1.2s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
.src.ok .pbar i { background: var(--ok); }
.src.bad .pbar i { background: var(--kill); }
.board .sources { padding: 0; margin: 0 0 18px; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 10px; }
.board .src { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 10px; border-radius: 12px; }
.board .src .th { width: 112px; border-radius: 7px; }
.board .src .nm { font-size: 14px; }
.board .src .tx { font-size: 13px; }

/* inspector (the advanced editor) */
.insp { display: grid; grid-template-rows: auto minmax(0, 1fr); border-left: 1px solid var(--ln); background: var(--p1); min-height: 0; }
.tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; padding: 8px 8px 0; }
.tab, .etab { height: 36px; padding: 0 4px; border: 0; border-radius: 8px; background: none; color: var(--dim); font-weight: 600; font-size: 13px; cursor: pointer; transition: background-color .15s, color .15s; }
.tab { font-size: 12px; }
:is(.tab, .etab):hover { color: var(--tx); background: var(--p2); }
:is(.tab, .etab)[aria-selected="true"] { color: var(--tx); background: var(--p3); }
.pane { padding: 14px 12px; display: grid; align-content: start; gap: 12px; overflow-y: auto; }
.pane h2 { margin: 0; font-size: 14px; font-weight: 700; }
.pane p { margin: 0; color: var(--dim); font-size: 12px; }
.f { display: grid; gap: 6px; min-width: 0; }
.f > label, .f > .lab, .lab { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 600; color: var(--dim); }
.f > label output { color: var(--tx); font-variant-numeric: tabular-nums; font-weight: 500; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.row { display: flex; flex-wrap: wrap; gap: 6px; }
/* a choice of a few: the chosen one sits on a lighter plate */
.seg3 { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 3px; border-radius: 10px; background: var(--p2); }
.seg3 button { height: 32px; padding: 0 4px; border: 0; border-radius: 7px; background: none; color: var(--dim); font-size: 13px; font-weight: 600; cursor: pointer; transition: background-color .15s, color .15s; }
.seg3 button:hover:not(:disabled) { color: var(--tx); }
.seg3 button:disabled { opacity: .4; cursor: not-allowed; }
.seg3 button[aria-pressed="true"] { background: var(--p4); color: var(--tx); }
.sw { display: flex; gap: 9px; }
.sw button { width: 28px; height: 28px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .2); }
.sw button:disabled { opacity: .4; cursor: not-allowed; }
.sw button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--p1), 0 0 0 4px #fff; }
/* a switch: white when it is on */
.tog { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 10px; background: var(--p2); font-weight: 600; cursor: pointer; }
.tog input { width: 36px; height: 20px; margin: 0; -webkit-appearance: none; appearance: none; border-radius: 99px; background: var(--p4); position: relative; cursor: pointer; flex: none; transition: background-color .15s; }
.tog input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #cfcfcf; transition: translate .15s, background-color .15s; }
.tog input:checked { background: var(--ac); }
.tog input:checked::after { translate: 16px 0; background: var(--aci); }
.tog.mini { min-height: 0; padding: 0; background: none; }
.tlist { display: grid; gap: 4px; }
.tlist button { justify-content: flex-start; overflow: hidden; text-overflow: ellipsis; display: block; text-align: left; }
.chips { display: grid; gap: 6px; }
.chip { display: block; width: 100%; min-height: 38px; padding: 9px 12px; border: 0; border-radius: 9px; background: var(--p2); color: var(--tx); font-size: 13px; line-height: 1.3; text-align: left; cursor: pointer; transition: background-color .15s; }
.chip:hover:not(:disabled) { background: var(--p3); }
.chip:disabled { opacity: .4; cursor: not-allowed; }
.note { padding: 10px 12px; border-radius: 9px; background: var(--p2); color: var(--dim); font-size: 12px; }

/* the timeline (the advanced editor) */
.tl { border-top: 1px solid var(--ln); background: var(--p1); min-width: 0; }
.tools { display: flex; align-items: center; gap: 6px; padding: 8px 10px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tools::-webkit-scrollbar { display: none; }
.tools .time { flex: none; padding: 0 6px; min-width: 104px; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.tools .grow { flex: 1 1 0; }
.tools .div { width: 1px; height: 20px; background: var(--ln2); flex: none; }
.guide { margin: 0; padding: 8px 14px; background: var(--acs); font-weight: 600; font-size: 12px; }
.guide b { color: #fff; }
.tl__scroll { overflow-x: auto; padding: 0 10px 10px; height: 176px; }
.tl__inner { position: relative; min-width: 100%; user-select: none; -webkit-user-select: none; }
.tl__ruler { position: relative; height: 24px; cursor: ew-resize; touch-action: none; }
.tick { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--ln); padding-left: 4px; color: var(--faint); font-size: 10px; line-height: 22px; font-variant-numeric: tabular-nums; pointer-events: none; }
.track { position: relative; margin-top: 6px; }
.track[data-t="text"] { min-height: 26px; }
.track[data-t="video"] { height: 48px; }
.track[data-t="song"] { height: 34px; }
.track::before { content: attr(data-empty); position: absolute; inset: 0; display: flex; align-items: center; padding-left: 8px; color: var(--faint); font-size: 11px; border-radius: 6px; background: rgb(255 255 255 / .03); pointer-events: none; }
.blk { position: absolute; top: 0; bottom: 0; border-radius: 6px; overflow: hidden; cursor: pointer; touch-action: none; }
.blk.sel { box-shadow: inset 0 0 0 2px #fff; z-index: 2; }
.blk .h { position: absolute; top: 0; bottom: 0; width: 12px; cursor: ew-resize; z-index: 3; touch-action: none; }
.blk .h.l { left: 0; } .blk .h.r { right: 0; }
.blk .h::after { content: ""; position: absolute; top: 25%; bottom: 25%; left: 4px; width: 4px; border-radius: 2px; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .4); opacity: 0; }
.blk:hover .h::after, .blk.sel .h::after { opacity: 1; }
.seg { background: #161616; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .14); }
.seg canvas { display: block; width: 100%; height: 100%; }
.seg .tag { position: absolute; left: 15px; bottom: 3px; padding: 0 5px; border-radius: 4px; background: rgb(0 0 0 / .7); font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums; pointer-events: none; white-space: nowrap; }
.txt { height: 22px; background: #ececec; color: #000; font-weight: 700; font-size: 11px; line-height: 22px; padding: 0 14px; white-space: nowrap; text-overflow: ellipsis; }
.txt.sel { box-shadow: inset 0 0 0 2px var(--ac); }
.txt .h::after { background: #000; }
.sng { background: #101010; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .3); }
.sng canvas { display: block; width: 100%; height: 100%; }
.sng .tag { position: absolute; left: 7px; top: 2px; font-size: 10px; font-weight: 600; text-shadow: 0 0 3px #000; pointer-events: none; white-space: nowrap; }
.sng .dropline { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--sig); pointer-events: none; }
.kill { position: absolute; top: 24px; bottom: 0; width: 2px; margin-left: -1px; background: var(--kill); pointer-events: none; z-index: 4; }
.kill::before { content: "moment"; position: absolute; top: -19px; left: 0; padding: 0 5px; border-radius: 4px; background: var(--kill); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; }
.head { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; pointer-events: none; z-index: 5; }
.head::before { content: ""; position: absolute; top: 0; left: -5px; width: 12px; height: 12px; border-radius: 2px 2px 7px 7px; background: #fff; }

/* the dialog for many videos */
dialog { width: min(520px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 14px; background: var(--p2); color: var(--tx); box-shadow: 0 0 0 1px var(--ln2), 0 30px 80px -20px #000; }
dialog::backdrop { background: rgb(0 0 0 / .66); }
dialog .dh { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 4px 18px; font-weight: 700; font-size: 16px; }
dialog .db { display: grid; gap: 12px; padding: 10px 18px 14px; }
dialog .db .tog { background: var(--p3); }
dialog .df { display: flex; justify-content: flex-end; gap: 8px; padding: 6px 18px 18px; }
.prog { height: 4px; border-radius: 2px; background: var(--p4); overflow: hidden; }
.prog i { display: block; height: 100%; width: 0; background: var(--ac); transition: width .2s; }
.jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 220px; overflow-y: auto; }
.jobs li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 7px; background: var(--p3); font-size: 12px; }
.jobs li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.jobs li span:last-child { color: var(--dim); white-space: nowrap; }
.jobs li.ok span:last-child { color: var(--ok); }
.jobs li.bad span:last-child { color: var(--bad); }

/* ================= simple mode (the default): start, a board of moments, one moment at a time ================= */
.app.simple .lib, .app.simple .insp, .app.simple .tl, .app.simple .ask, .app.simple .sugg, .app.simple .log, .app.simple .plan, .app.simple .stage > div:first-child { display: none !important; }
.app:not(.simple) .player { grid-template-rows: minmax(0, 1fr); gap: 0; }
.app.simple .main { grid-template-columns: minmax(0, 1fr); }
.app.simple[data-mode="edit"] .main { grid-template-columns: 116px minmax(0, 1fr) 400px; }
.app.simple .stage { grid-template-rows: minmax(0, 1fr); }
.app.simple .view { padding: 20px; }
.app:not([data-mode="edit"]) #export, .app:not([data-mode="board"]) #many, .app.simple #export { display: none; }
.app:not(.simple) :is(.board, .cmd, .strip, .mini) { display: none !important; }
.app.simple .bar .status { visibility: hidden; }

/* the board: every moment as the finished short */
.board { align-self: start; justify-self: stretch; max-height: 100%; width: 100%; max-width: 1240px; margin: 0 auto; overflow-y: auto; padding: 16px 8px 56px; }
.board__head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.board__head h1 { margin: 0; font-weight: 800; font-stretch: 116%; font-size: clamp(26px, 3vw, 36px); line-height: 1.05; letter-spacing: -0.015em; }
.board__head p { margin: 8px 0 0; color: var(--dim); font-size: 14px; }
.board__head .find.small { width: min(380px, 100%); padding: 0; }
.board__head .find.small input[type="url"] { height: 40px; font-size: 13px; }
.board__head .find.small .btn { height: 40px; width: 40px; }
.board > .findnote { margin: 0 0 14px; font-size: 13px; }
.grp { margin-top: 40px; }
.grp:first-child { margin-top: 0; }
.grp__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.grp__t { min-width: 0; }
.grp__t h2 { margin: 0; font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70ch; }
.grp__t p { margin: 3px 0 0; color: var(--dim); font-size: 13px; }
.grp__act { display: flex; gap: 6px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 24px 18px; }
.cards > li { min-width: 0; }
.card { position: relative; display: block; }
.card__open { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; width: 100%; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.card__open:focus-visible { outline: none; }
.card__v { position: relative; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: var(--p2); transition: transform .25s var(--ease); }
/* the silver edge: on a moment, a caption style or a thumbnail the pointer is on */
:is(.card__v, .cs, .sthumb)::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; padding: 1px; pointer-events: none; background: var(--silver);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .2s; }
.card__v::after { padding: 2px; }
@media (hover: hover) {
  .card__open:hover .card__v { transform: translateY(-3px); }
  .card__open:hover .card__v::after, .capstyles button:hover:not(:disabled) .cs::after, .sthumb:hover::after { opacity: 1; }
}
.card__open:focus-visible .card__v { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ac); }
.card__v img, .card__v video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card__v .d { position: absolute; left: 8px; top: 8px; z-index: 1; padding: 3px 7px; border-radius: 6px; background: rgb(0 0 0 / .78); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.card__t { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; font-weight: 600; font-size: 14px; }
.card__t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.card__t span { flex: none; color: var(--dim); font-weight: 500; font-size: 12px; }
.card.made .card__t span { color: var(--ok); }
.card--wait .card__v { display: grid; place-items: center; color: var(--dim); font-size: 13px; text-align: center; padding: 16px; }
.card--wait .card__v::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / .05) 50%, transparent 70%); background-size: 200% 100%; animation: sheen 1.4s linear infinite; }
@keyframes sheen { to { background-position: -200% 0; } }
.card__act { position: absolute; top: 8px; right: 8px; z-index: 3; display: flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.card:hover .card__act, .card:focus-within .card__act { opacity: 1; }
.card__act .btn { background: rgb(0 0 0 / .82); }
.card__act .btn:hover:not(:disabled) { background: #fff; color: #000; }
.card__exp { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 1; height: 4px; border-radius: 2px; background: rgb(0 0 0 / .5); overflow: hidden; display: none; }
.card__exp i { display: block; height: 100%; width: 0; background: var(--ac); transition: width .2s; }
.card.exporting .card__exp { display: block; }
@media (hover: none) { .card__act { opacity: 1; } }

/* one moment: its neighbours down the left, the short in the middle with its play line and the box you type changes into, the settings on the right */
.strip { display: none; }
.app.simple[data-mode="edit"] .strip { display: flex; flex-direction: column; gap: 10px; min-height: 0; padding: 20px 14px 20px 20px; overflow-y: auto; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.sthumb { position: relative; flex: none; display: block; width: 100%; aspect-ratio: 9 / 16; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--p2); cursor: pointer; }
.sthumb img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: .5; transition: opacity .15s; }
.sthumb:hover img, .sthumb[aria-current="true"] img { opacity: 1; }
.sthumb[aria-current="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ac); }
.sthumb[aria-current="true"]::after { display: none; }
.sthumb .n { position: absolute; left: 5px; top: 5px; z-index: 1; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 5px; background: rgb(0 0 0 / .78); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }

.player { display: grid; grid-template-rows: minmax(0, 1fr) auto auto; justify-items: center; gap: 14px; height: 100%; width: 100%; min-height: 0; }
/* the short always fits its space whole: the frame is measured, and the picture takes the largest 9 by 16 that fits both ways */
.player .phone { container-type: size; display: grid; place-items: center; width: 100%; height: 100%; max-height: none; aspect-ratio: auto; border-radius: 0; overflow: visible; background: none; box-shadow: none; }
.player .phone :is(canvas, video) { grid-area: 1 / 1; width: min(100cqw, calc(100cqh * 9 / 16)); height: auto; aspect-ratio: 9 / 16; border-radius: 16px; background: #000; box-shadow: 0 0 0 1px var(--ln2); }
.mini { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: min(560px, 100%); }
.mini .btn.ico { width: 40px; height: 40px; border-radius: 50%; background: var(--tx); color: var(--aci); }
.mini .btn.ico:hover:not(:disabled) { background: #fff; }
.mini .btn.ico svg.i { width: 18px; height: 18px; }
.mini span { min-width: 92px; color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }
.cmd { width: min(560px, 100%); margin: 0; }
.easy__field { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px; padding: 5px 5px 5px 14px; border-radius: 12px; background: var(--p2); box-shadow: 0 0 0 1px var(--ln2); transition: box-shadow .2s; }
.easy__field:focus-within { box-shadow: 0 0 0 1px var(--ac); }
.easy__field > svg.i { color: var(--dim); }
.easy__field input[type="text"] { height: 40px; padding: 0 8px; background: none; box-shadow: none; font-size: 14px; }
.easy__field .btn { height: 40px; padding: 0 16px; border-radius: 8px; background: var(--p4); }
.easy__field .btn:hover:not(:disabled) { background: #3a3a3a; }
.easy__say { margin: 8px 2px 0; min-height: 1.4em; color: var(--dim); font-size: 12px; text-align: left; }
.easy__say.err { color: var(--bad); }

.easy { display: none; }
.app.simple[data-mode="edit"] .easy { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; border-left: 1px solid var(--ln); background: var(--p1); }
.etabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 12px 14px 0; }
.epanes { min-height: 0; overflow-y: auto; padding: 20px 20px 28px; }
.easy__sec { display: grid; align-content: start; gap: 20px; min-width: 0; }
.g { display: grid; gap: 9px; min-width: 0; }
.easy h2 { margin: 0; font-size: 18px; font-weight: 700; font-stretch: 108%; letter-spacing: -0.005em; }
.easy h3, .g > .lab { margin: 0; display: block; font-size: 12px; font-weight: 600; color: var(--dim); }
.easy__h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.easy__row { display: flex; gap: 8px; }
.easy__row .grow, .grow { flex: 1 1 0; min-width: 0; }
.easy__vibe { margin: 0; color: var(--dim); font-size: 12px; line-height: 1.45; }
.easy__vibe:empty { display: none; }
.easy__togs { display: grid; gap: 6px; }
.capstyles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; }
.capstyles button { display: grid; gap: 6px; padding: 0; border: 0; background: none; color: var(--dim); font-size: 12px; font-weight: 600; cursor: pointer; }
.capstyles button:disabled { opacity: .4; cursor: not-allowed; }
.capstyles button[aria-pressed="true"] { color: var(--tx); }
/* each tile shows its style the way it lands on the video, in the colour that is chosen (--cap, app.js) */
.cs { position: relative; display: grid; place-items: center; height: 62px; border-radius: 10px; background: #2c2c2c; font-style: normal; font-size: 15px; line-height: 1; color: #fff; overflow: hidden; white-space: nowrap; }
.capstyles button[aria-pressed="true"] .cs { box-shadow: 0 0 0 2px var(--p1), 0 0 0 4px var(--ac); }
.capstyles button[aria-pressed="true"] .cs::after { display: none; }
.cs b { font-weight: inherit; color: var(--cap, #ffe14a); }
.cs--bold { font-weight: 900; -webkit-text-stroke: 3px #000; paint-order: stroke fill; }
.cs--clean { font-weight: 700; text-shadow: 0 2px 6px rgb(0 0 0 / .9); }
.cs--box u { text-decoration: none; padding: 3px 5px; margin: 0 1px; border-radius: 4px; background: #0a0a0a; font-weight: 900; font-size: 13px; }
.cs--box u.on { background: var(--cap, #ffe14a); color: #0d0d0d; }
.cs--kara { font-weight: 800; -webkit-text-stroke: 2px #000; paint-order: stroke fill; color: rgb(255 255 255 / .9); }
.cs--pop { font-weight: 900; font-stretch: 75%; font-size: 24px; -webkit-text-stroke: 3px #000; paint-order: stroke fill; color: var(--cap, #ffe14a); }
.cs--sub { align-content: end; padding-bottom: 9px; }
.cs--sub > span { padding: 3px 8px; border-radius: 5px; background: rgb(0 0 0 / .65); font-weight: 700; font-size: 11px; }
#ehook { height: 44px; font-size: 14px; font-weight: 600; }
/* the presets: what each one sets, in words */
.looks { display: grid; gap: 6px; }
.looks button { display: grid; gap: 3px; padding: 11px 12px; border: 0; border-radius: 10px; background: var(--p2); color: var(--tx); text-align: left; cursor: pointer; transition: background-color .15s; }
.looks button:hover { background: var(--p3); }
.looks button[aria-pressed="true"] { background: var(--p3); box-shadow: inset 0 0 0 1.5px var(--ac); }
.looks b { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 600; }
.looks b em { flex: none; font-style: normal; font-weight: 500; font-size: 12px; color: var(--tx); }
.looks b em::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.looks span { color: var(--dim); font-size: 12px; line-height: 1.4; }
.looks button:disabled { opacity: .45; cursor: default; }
.looks button:disabled:hover { background: var(--p2); }
/* a click on the picture plays and pauses: the sign of what happened shows for a moment */
.tapfx { grid-area: 1 / 1; position: relative; z-index: 2; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: rgb(0 0 0 / .6); color: #fff; pointer-events: none; opacity: 0; }
.tapfx .i { width: 30px; height: 30px; }
.tapfx.go { animation: tapfx .55s ease-out; }
@keyframes tapfx { 0% { opacity: 1; scale: .82; } 25% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: 1.14; } }
@keyframes tapfx-still { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tapfx.go { animation: tapfx-still .55s linear; } }
/* trending sounds */
.tr { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tr li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 7px 8px 7px 10px; border-radius: 9px; background: var(--p2); }
.tr__n { color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.tr__t { min-width: 0; display: grid; }
.tr__t b, .tr__t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr__t b { font-size: 13px; font-weight: 600; }
.tr__t span { color: var(--dim); font-size: 11px; }
.easy__foot { display: grid; gap: 8px; padding: 14px 20px 20px; border-top: 1px solid var(--ln); background: var(--p1); }

/* narrower screens */
@media (max-width: 1199px) {
  .main { grid-template-columns: 200px minmax(0, 1fr) 270px; }
  .app.simple[data-mode="edit"] .main { grid-template-columns: 96px minmax(0, 1fr) 360px; }
  .app.simple[data-mode="edit"] .strip { padding: 16px 10px 16px 14px; }
}
/* one column, the preview first */
@media (max-width: 899px) {
  body { overflow: auto; }
  .app { display: flex; flex-direction: column; height: auto; min-height: 100dvh; }
  .bar { order: 0; min-height: 56px; position: sticky; top: 0; z-index: 20; }
  .bar, .stage, .tl, .lib, .insp { min-width: 0; width: 100%; }
  .stage > div:first-child { min-width: 0; }
  .main { display: contents; }
  .stage { order: 1; }
  .view { height: min(58vh, 540px); }
  .tl { order: 2; }
  .lib { order: 3; border-right: 0; border-top: 1px solid var(--ln); }
  .clips { grid-auto-flow: column; grid-auto-columns: 200px; overflow-x: auto; overflow-y: hidden; }
  .insp { order: 4; border-left: 0; border-top: 1px solid var(--ln); }
  .pane { overflow: visible; }
  .app.simple .view { height: auto; min-height: calc(100dvh - 56px); padding: 16px; }
  .app.simple[data-mode="board"] .view { place-items: start stretch; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .board { overflow: visible; max-height: none; padding: 4px 0 40px; }
  .grp__t h2 { white-space: normal; }
}
/* between a phone and a small laptop the cards keep a normal size: only a phone has two across */
@media (min-width: 600px) and (max-width: 899px) { .cards { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } }
/* a tablet or a narrow window: one moment still has the short and its settings side by side */
@media (min-width: 720px) and (max-width: 899px) {
  .app.simple[data-mode="edit"] { display: grid; height: 100vh; height: 100dvh; min-height: 0; }
  .app.simple[data-mode="edit"] .main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; min-height: 0; }
  .app.simple[data-mode="edit"] .stage { order: 0; }
  .app.simple[data-mode="edit"] .view { height: auto; min-height: 0; padding: 16px; }
  .app.simple[data-mode="edit"] .strip { display: none; }
  .epanes { padding: 18px 16px 24px; }
  .easy__foot { padding: 12px 16px 16px; }
  .etabs { padding: 10px 10px 0; }
  .etab { font-size: 12px; }
}
/* a phone: the short first, its settings under it, the export button always in reach */
@media (max-width: 719px) {
  .app.simple[data-mode="edit"] .view { min-height: 0; height: min(78vh, 720px); padding: 14px 16px; }
  .app.simple[data-mode="edit"] .strip { display: none; }
  .app.simple[data-mode="edit"] .easy { order: 5; display: block; border-left: 0; border-top: 1px solid var(--ln); }
  .epanes { overflow: visible; padding: 18px 16px 24px; }
  .etabs { padding: 10px 10px 0; }
  .easy__foot { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 10px 16px 12px; }
  .easy__foot .btn.big { order: 2; flex: 1 1 0; height: 46px; }
  .easy__foot .easy__row { order: 1; }
  .easy__foot .easy__row .btn { flex: none; height: 46px; }
  #enext { display: none; }
}
@media (max-width: 599px) { .nav2 b { display: none; } }
/* a narrow phone: the bar keeps its icons, the words go */
@media (max-width: 479px) {
  .bar { gap: 4px; padding: 0 10px; }
  .bar .plan, .bar .hide-s { display: none; }
  #toboard, #export, #many { width: 36px; padding: 0; font-size: 0; gap: 0; }
  .ask { flex-wrap: wrap; }
  .tools .time { min-width: 0; }
  .mini span { min-width: 0; }
  .etab { font-size: 12px; }
}
/* a low screen, like a phone on its side: the short stands at full height at the left, the play row and the prompt beside it */
@media (min-width: 560px) and (max-height: 519px) {
  .app.simple[data-mode="edit"] .view { padding: 12px 16px; }
  .app.simple .player { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 18px; }
  .app.simple .player .phone { grid-row: 1 / -1; width: calc((100vh - 80px) * 9 / 16); width: calc((100dvh - 80px) * 9 / 16); height: calc(100vh - 80px); height: calc(100dvh - 80px); }
  .app.simple .mini { align-self: end; width: 100%; }
  .app.simple .cmd { align-self: start; width: 100%; }
  .mini span { min-width: 0; }
  .epanes { padding: 14px 16px 18px; }
  .easy__foot { display: flex; gap: 8px; padding: 10px 16px 12px; }
  .easy__foot .btn.big { order: 2; flex: 1 1 0; height: 44px; }
  .easy__foot .easy__row { order: 1; }
  .easy__foot .easy__row .btn { flex: none; height: 44px; }
  #enext { display: none; }
}
/* the same on a small phone on its side, where the settings sit under the short: the short has the whole screen first */
@media (min-width: 560px) and (max-width: 719px) and (max-height: 519px) {
  .app.simple[data-mode="edit"] .view { height: calc(100vh - 56px); height: calc(100dvh - 56px); }
  .easy__foot { position: static; }
}
/* the advanced editor on a low screen, like a laptop: the rows around the preview give it their space */
@media (min-width: 900px) and (max-height: 859px) {
  .app:not(.simple) .sugg { display: none; }
  .app:not(.simple) .ask { padding: 6px 12px; }
  .app:not(.simple) .view { padding: 8px; }
  .app:not(.simple) .log { max-height: 46px; padding: 4px 14px 6px; }
  .app:not(.simple) .tools { padding: 4px 10px; }
  .app:not(.simple) .tl__scroll { height: 160px; }
  .app:not(.simple) .track[data-t="video"] { height: 40px; }
  .app:not(.simple) .track[data-t="song"] { height: 28px; }
}
/* a phone has the simple editor only: the advanced one needs a wide screen and a mouse, so its switch is not offered there.
   The start says where the app works best and offers to send its own address to a computer */
.pcnote { display: none; }
@media (pointer: coarse) and (max-width: 719px), (pointer: coarse) and (max-height: 519px) {
  #advanced { display: none !important; }
  .pcnote { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; width: 100%; padding: 14px 18px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--ln2); text-align: left; }
  .pcnote p { flex: 1 1 220px; margin: 0; color: var(--dim); font-size: 13px; line-height: 1.45; }
  .pcnote p b { display: block; color: var(--tx); font-size: 14px; }
  .pcnote .btn { flex: none; height: 44px; }
  .pcnote .say { flex-basis: 100%; }
  .pcnote .say:empty { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .pbar.busy i { animation: none; width: 100% !important; opacity: .5; }
  .card--wait .card__v::before { animation: none; }
  .card__open:hover .card__v { transform: none; }
}

.easy__row .btn { height: 40px; }
