/* Flash Studio, in the Flash VDO identity (brand/flash-vdo): Storm night with one Flash yellow, Cut red for what can't
   be undone, Graphite around the footage. Archivo Expanded Black Italic speaks; Instrument Sans is what you read; Martian
   Mono counts time. Things cut in and settle, and anything that slides leans 10°. Phone first: the editor is monitor,
   timeline and a tool bar, with Flash and the media in drawers; larger screens open it out into columns. */

/* ------------------------------------------------ faces (flashvdo.com's own files; Archivo with its width axis) */
@font-face { font-family: "FS Display"; font-style: italic; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url("/s/site/archivo-italic-vf.woff2") format("woff2"); }
@font-face { font-family: "FS Text"; font-style: normal; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; src: url("/s/site/instrumentsans-vf.woff2") format("woff2"); }
@font-face { font-family: "FS Mono"; font-style: normal; font-weight: 100 800; font-stretch: 75% 112.5%; font-display: swap; src: url("/s/site/martianmono-vf.woff2") format("woff2"); }
@font-face { font-family: "Anek Devanagari"; font-style: normal; font-weight: 100 800; font-stretch: 75% 125%; font-display: swap; src: url("/s/site/anekdevanagari-vf.woff2") format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }

/* ------------------------------------------------ tokens */
:root {
  color-scheme: dark;
  --night: #0A0722; --night-2: #100C33; --panel: #151046; --panel-2: #1C1657; --panel-3: #261D66; --storm: #1B1452; --storm-600: #34297E;
  --line: rgba(220, 217, 240, .10); --line-2: rgba(220, 217, 240, .18); --line-3: rgba(220, 217, 240, .28);
  --fg: #F4F4F8; --fg-2: #B6B0E0; --fg-3: #8F86CC;
  --flash: #FFD23F; --flash-light: #FFF3B8; --flash-dim: rgba(255, 210, 63, .14); --cut: #FF4F3D; --cut-dim: rgba(255, 79, 61, .14);
  --ok: #3DDC97; --info: #6E9BFF;
  --g-950: #0E0E12; --g-900: #16161C; --g-850: #1C1C23; --g-800: #23232B; --g-700: #2E2E38; --g-600: #3C3C48; --g-500: #5A5A68; --g-400: #7E7E8E; --g-300: #A6A6B4; --g-200: #CACAD4;
  --t-video: #6E9BFF; --t-audio: #3DDC97; --t-title: #FF7AB6; --t-effect: #8C7BFF;
  --f-display: "FS Display", "Archivo", "Arial Black", system-ui, sans-serif;
  --f-text: "FS Text", "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "FS Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease-flash: cubic-bezier(.16, 1, .3, 1); --ease-snap: cubic-bezier(.34, 1.56, .64, 1); --ease-strike: cubic-bezier(.7, 0, .84, 0); --ease-glide: cubic-bezier(.65, 0, .35, 1);
  --f4: 67ms; --f8: 133ms; --f12: 200ms; --f18: 300ms; --f30: 500ms; --f48: 800ms;
  --r-s: 6px; --r-m: 10px; --r-l: 14px; --r-xl: 22px;
  --tap: 44px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --shadow: 0 24px 64px -24px rgba(0, 0, 0, .75), 0 0 0 1px var(--line);
}

/* ------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--night); color: var(--fg);
  font: 400 15px/1.5 var(--f-text); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
#app { min-height: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--flash); text-underline-offset: 3px; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--flash); outline-offset: 2px; }
::selection { background: var(--flash); color: var(--storm); }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--fg-2); }
.mono { font-family: var(--f-mono); font-stretch: 87.5%; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.display { font-family: var(--f-display); font-style: italic; font-weight: 900; font-stretch: 125%; text-transform: uppercase; letter-spacing: -.01em; line-height: .95; }
.display em { font-style: inherit; color: var(--flash); }
.hint { margin: 0; color: var(--fg-3); font-size: 13px; line-height: 1.45; }
.label { margin: 14px 0 6px; color: var(--fg-3); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
h4.label { margin: 18px 0 8px; }
.err { margin: 0; color: #FF8A7D; font-size: 14px; min-height: 0; }
.err:empty { display: none; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.show-phone { display: none !important; }
.noscript { padding: 24px; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.ico .a { fill: var(--acc, var(--flash)); stroke: none; }
.ico .as { stroke: var(--acc, var(--flash)); }
.ico .a2 { fill: var(--cut); stroke: none; }
.ico.sm { width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; } }

/* the slug: a skewed yellow label */
.slug { display: inline-block; padding: 3px 12px; background: var(--flash); color: var(--storm); font: 700 12px/1.4 var(--f-text); letter-spacing: .12em; text-transform: uppercase; transform: skewX(-10deg); }
.slug > span { display: inline-block; transform: skewX(10deg); }

/* the lockup */
.lockup { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; }
.lockup img { display: block; }
.lockup b { font-size: 19px; line-height: 1; padding-right: 2px; }
.lockup.sm b { font-size: 15px; }
.beta { font: 600 10px/1 var(--f-text); letter-spacing: .1em; text-transform: uppercase; color: var(--flash); border: 1px solid rgba(255, 210, 63, .45); padding: 4px 7px; border-radius: 999px; }

/* ------------------------------------------------ controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel-2); color: var(--fg);
  font-size: 14px; font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap; user-select: none;
  transition: background var(--f12), border-color var(--f12), transform var(--f12) var(--ease-snap), opacity var(--f12);
}
.btn:hover:not(:disabled) { background: var(--panel-3); border-color: var(--line-3); }
.btn:active:not(:disabled) { transform: scale(.96); }
.btn:disabled { opacity: .4; }
.btn .ico { width: 18px; height: 18px; }
.btn.primary { background: var(--flash); border-color: var(--flash); color: var(--storm); --acc: var(--storm); }
.btn.primary:hover:not(:disabled) { background: var(--flash-light); border-color: var(--flash-light); }
.btn.danger { background: var(--cut); border-color: var(--cut); color: #fff; --acc: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .06); border-color: transparent; }
.btn.icon { width: 40px; min-width: 40px; padding: 0; }
.btn.icon.on { color: var(--flash); }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn.sm.icon { width: 32px; min-width: 32px; }
.btn.lg { min-height: 52px; font-size: 16px; padding: 0 22px; }
.btn.block { width: 100%; }
.btn.busy { pointer-events: none; }
.btn.busy::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }

.input {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--r-m); border: 1px solid var(--line-2);
  background: var(--night-2); color: var(--fg); outline: none; transition: border-color var(--f12), box-shadow var(--f12);
}
.input::placeholder, .composer-in::placeholder, .chat-in::placeholder { color: var(--fg-3); }
.input:focus { border-color: var(--flash); box-shadow: 0 0 0 3px var(--flash-dim); }
.input.sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.input.lg { min-height: 52px; font-size: 16px; }
textarea.input { resize: vertical; line-height: 1.45; }

.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--night-2); border: 1px solid var(--line-2); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--fg-2); border-radius: 999px; padding: 0 14px; min-height: 34px; font-size: 14px; font-weight: 600; white-space: nowrap; transition: background var(--f12), color var(--f12); }
.seg button:hover { color: var(--fg); }
.seg button[aria-checked="true"] { background: var(--flash); color: var(--storm); --acc: var(--storm); }
.seg button .ico { width: 17px; height: 17px; }
.seg.sm button { min-height: 30px; padding: 0 12px; font-size: 13px; }
.seg.xs { padding: 2px; }
.seg.xs button { min-height: 26px; padding: 0 10px; font-size: 12px; }

.switch { position: relative; width: 44px; height: 26px; border-radius: 999px; border: 0; background: var(--panel-3); flex: none; transition: background var(--f12); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--fg-2); transition: transform var(--f18) var(--ease-snap), background var(--f12); }
.switch[aria-checked="true"] { background: var(--flash); }
.switch[aria-checked="true"]::after { transform: translateX(18px); background: var(--storm); }

.slider { display: grid; gap: 10px; margin: 6px 0 18px; }
.slider-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; }
.slider-head output { color: var(--flash); font-size: 14px; }
.slider input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; --u: 50%; }
.slider input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--flash) var(--u), var(--panel-3) var(--u)); }
.slider input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--flash) var(--u), var(--panel-3) var(--u)); }
.slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: var(--fg); border: 4px solid var(--flash); box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
.slider input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--fg); border: 4px solid var(--flash); }
.marks { display: flex; gap: 6px; flex-wrap: wrap; }
.marks button { border: 1px solid var(--line-2); background: var(--night-2); color: var(--fg-2); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; }
.marks button:hover { color: var(--fg); border-color: var(--line-3); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(10, 7, 34, .72); border: 1px solid var(--line-2); font-size: 12px; font-weight: 600; backdrop-filter: blur(8px); }
.chip .ico { width: 14px; height: 14px; }

.avatar { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0; background: linear-gradient(140deg, var(--flash), #FF8A5C); color: var(--storm); font-weight: 800; font-size: 15px; flex: none; }
.avatar.sm { width: 34px; height: 34px; font-size: 14px; background: var(--panel-3); color: var(--fg); }
.avatar .dot { position: absolute; top: 0; right: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--cut); border: 2px solid var(--night); }

.spin { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid var(--line-3); border-top-color: var(--flash); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state { display: grid; justify-items: center; gap: 8px; padding: 34px 20px; text-align: center; color: var(--fg-2); grid-column: 1 / -1; }
.empty-state .ico { color: var(--fg-3); }
.empty-state b { color: var(--fg); font-size: 16px; }
.empty-state p { margin: 0; max-width: 34ch; font-size: 14px; }
.empty-state.big { padding: 15vh 20px; }
.empty-state.big .btn { margin-top: 8px; }

/* the big tool buttons */
.tool { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-width: 64px; height: 58px; padding: 0 6px; border: 0; border-radius: var(--r-m); background: transparent; color: var(--fg-2); font-size: 11.5px; font-weight: 600; flex: none; transition: background var(--f12), color var(--f12), transform var(--f12) var(--ease-snap); }
.tool .ico { width: 24px; height: 24px; }
.tool:hover:not(:disabled) { background: rgba(255, 255, 255, .06); color: var(--fg); }
.tool:active:not(:disabled) { transform: scale(.92); }
.tool:disabled { opacity: .35; }
.tool.accent { color: var(--flash); }
.tool.accent .ico { filter: drop-shadow(0 0 8px rgba(255, 210, 63, .5)); }

/* ------------------------------------------------ toasts */
.toasts { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); display: grid; gap: 8px; z-index: 300; width: min(440px, calc(100vw - 24px)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--r-l); background: #241C68; border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 14px; font-weight: 500; pointer-events: auto; animation: toast-in var(--f18) var(--ease-flash); }
.toast .ico { color: var(--flash); }
.toast.err { background: #3A1430; border-color: rgba(255, 79, 61, .5); }
.toast.err .ico { color: #FF8A7D; }
.toast.ok .ico { --acc: var(--ok); }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity var(--f12), transform var(--f12); }
.toast-act { border: 0; background: transparent; color: var(--flash); font-weight: 700; padding: 4px 6px; border-radius: 6px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
body:has(.page-editor) .toasts { top: calc(66px + var(--safe-t)); bottom: auto; }
.sheet-card:focus { outline: none; }

/* ------------------------------------------------ sheets (a bottom sheet on a phone, a centred panel elsewhere) */
dialog.sheet { padding: 0; border: 0; background: transparent; color: var(--fg); max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; display: grid; place-items: center; overflow: hidden; }
dialog.sheet:not([open]) { display: none; }
dialog.sheet::backdrop { background: rgba(5, 3, 20, .6); backdrop-filter: blur(4px); animation: fade-in var(--f18); }
.sheet-card { position: relative; display: flex; flex-direction: column; width: min(520px, calc(100vw - 32px)); max-height: min(86vh, 820px); background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--shadow); animation: sheet-pop var(--f18) var(--ease-flash); transition: transform var(--f18) var(--ease-flash); }
dialog.sheet.tall .sheet-card { height: min(86vh, 820px); }
dialog.sheet.compact .sheet-card { width: min(420px, calc(100vw - 32px)); }
dialog.sheet.out .sheet-card { opacity: 0; transform: scale(.97); transition: opacity var(--f8), transform var(--f8); }
dialog.sheet .grab { display: none; }
.sheet-head { display: flex; align-items: flex-start; gap: 10px; padding: 18px 18px 6px 22px; }
.sheet-head h3 { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.3; }
.sheet-head p { margin: 4px 0 0; color: var(--fg-2); font-size: 14px; }
.sheet-head .btn { margin: -6px -6px 0 0; }
.sheet-body { padding: 10px 22px 18px; overflow: auto; flex: 1; overscroll-behavior: contain; }
.sheet-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px 20px; border-top: 1px solid var(--line); }
.sheet-foot .btn.block { flex: 1; }
.lead-p { margin: 4px 0 0; font-size: 16px; line-height: 1.5; color: var(--fg); }
@keyframes sheet-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } }

.acts { display: grid; gap: 2px; margin: 0 -10px; }
.acts hr { border: 0; border-top: 1px solid var(--line); margin: 6px 10px; }
.act { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px; padding: 8px 12px; border: 0; border-radius: var(--r-m); background: transparent; color: var(--fg); text-align: left; text-decoration: none; }
.act:hover, .act.on { background: rgba(255, 255, 255, .05); }
.act .ico { width: 22px; height: 22px; color: var(--fg-2); }
.act b { display: block; font-weight: 600; font-size: 15px; }
.act small { display: block; color: var(--fg-3); font-size: 13px; }
.act.danger, .act.danger .ico { color: #FF8A7D; }
.acts-sheet .sheet-body { padding-top: 4px; }

.menu { position: fixed; z-index: 250; min-width: 230px; max-width: 320px; padding: 6px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r-l); box-shadow: var(--shadow); animation: sheet-pop var(--f12) var(--ease-flash); }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; font-size: 14px; }
.menu button:hover { background: rgba(255, 255, 255, .07); }
.menu button.danger { color: #FF8A7D; }
.menu .ico { width: 18px; height: 18px; color: var(--fg-2); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }

/* ------------------------------------------------ boot */
.page-boot, #app.boot { display: grid; place-items: center; min-height: 100dvh; }
.boot-mark { display: grid; justify-items: center; gap: 16px; color: var(--fg-2); font-size: 14px; }
.boot-mark img { animation: bolt-pulse 1.1s var(--ease-glide) infinite; filter: drop-shadow(0 0 24px rgba(255, 210, 63, .45)); }
.boot-mark p { margin: 0; }
@keyframes bolt-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.92); opacity: .75; } }

/* ------------------------------------------------ signing in */
.page-auth { position: relative; min-height: 100dvh; overflow: hidden; }
.auth-stage { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(1200px 700px at 78% -10%, rgba(52, 41, 126, .9), transparent 60%), radial-gradient(900px 600px at -10% 110%, rgba(38, 29, 102, .9), transparent 60%), var(--night); }
.grid-fade { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%); opacity: .55; }
.bolt-strike { position: absolute; right: -6vw; top: -8vh; width: 58vw; max-width: 760px; aspect-ratio: 1; background: url("/s/site/mark.svg") center / contain no-repeat; opacity: .08; transform: rotate(-10deg); animation: strike 6s var(--ease-strike) infinite; }
@keyframes strike { 0%, 86%, 100% { opacity: .07; filter: none; } 88% { opacity: .5; filter: drop-shadow(0 0 60px #FFD23F); } 90% { opacity: .1; } 92% { opacity: .35; } }
.auth { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 440px); gap: clamp(32px, 6vw, 96px); align-items: center; max-width: 1180px; min-height: 100dvh; margin: 0 auto; padding: clamp(28px, 5vw, 64px) clamp(18px, 4vw, 48px); }
.auth-hero { display: grid; gap: 22px; align-content: center; }
.auth-hero h1 { margin: 12px 0 0; font-size: clamp(46px, 7.2vw, 96px); }
.lead { margin: 0; color: var(--fg-2); font-size: clamp(16px, 1.6vw, 19px); line-height: 1.55; max-width: 52ch; }
.auth-points { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 12px; }
.auth-points li { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--fg); }
.auth-points .ico { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.auth-card { display: grid; gap: 14px; padding: clamp(22px, 3vw, 34px); background: rgba(21, 16, 70, .82); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.auth-card h2 { margin: 0; font-size: 24px; }
.auth-card > p { margin: -6px 0 6px; font-size: 14px; }
.field { display: grid; gap: 7px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--fg-2); }
.auth-links { margin: 4px 0 0; font-size: 14px; color: var(--fg-2); text-align: center; }
.auth-links .sep { margin: 0 8px; color: var(--fg-3); }

/* ------------------------------------------------ home */
.page-home { min-height: 100dvh; background: radial-gradient(1100px 520px at 50% -160px, rgba(52, 41, 126, .85), transparent 70%), var(--night); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: calc(64px + var(--safe-t)); padding: var(--safe-t) clamp(16px, 4vw, 40px) 0; background: rgba(10, 7, 34, .78); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.home-link { text-decoration: none; }
.home { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) calc(48px + var(--safe-b)); }
.hero { display: grid; justify-items: center; text-align: center; gap: 16px; padding: clamp(36px, 7vw, 84px) 0 clamp(28px, 5vw, 48px); }
.hero h1 { margin: 6px 0 0; font-size: clamp(38px, 6.6vw, 80px); }
.hero .lead { text-align: center; }
.composer-card { width: min(760px, 100%); margin-top: 10px; padding: 14px; text-align: left; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 210, 63, .06); transition: border-color var(--f12), box-shadow var(--f12); }
.composer-card:focus-within { border-color: rgba(255, 210, 63, .55); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), 0 0 0 4px var(--flash-dim); }
.composer-card.drop { border-color: var(--flash); border-style: dashed; }
.composer-in { width: 100%; min-height: 64px; padding: 8px 8px 4px; border: 0; background: transparent; resize: none; outline: none; font-size: 18px; line-height: 1.45; }
.attached { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 6px; }
.attached:empty { display: none; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 4px 4px 4px 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; }
.file-chip.has-thumb::before { content: ""; width: 22px; height: 22px; margin-left: -4px; border-radius: 50%; background: var(--thumb) center / cover; }
.file-chip.has-thumb > .ico:first-child { display: none; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip button { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: var(--fg-3); }
.file-chip button:hover { background: rgba(255, 255, 255, .08); color: var(--fg); }
.file-chip .ico { width: 15px; height: 15px; }
.composer-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 2px 0; }
.make { min-height: 46px; padding: 0 22px; font-size: 15px; }
.ideas { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 820px; }
.idea { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(21, 16, 70, .6); color: var(--fg-2); font-size: 14px; font-weight: 600; transition: color var(--f12), border-color var(--f12), background var(--f12), transform var(--f12) var(--ease-snap); }
.idea:hover { color: var(--fg); border-color: rgba(255, 210, 63, .5); background: var(--panel-2); }
.idea:active { transform: scale(.96); }
.idea .ico { width: 17px; height: 17px; }
.h-sec { margin: 0; font-size: 20px; font-weight: 700; }
.start { padding: 18px 0 8px; }
.start .h-sec { margin-bottom: 14px; }
.blanks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.blank { display: grid; justify-items: center; align-content: start; gap: 4px; padding: 18px 10px 14px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--panel); color: var(--fg); text-align: center; transition: border-color var(--f12), background var(--f12), transform var(--f12) var(--ease-snap); }
.blank:hover { border-color: var(--line-3); background: var(--panel-2); transform: translateY(-2px); }
.blank .frame { display: grid; place-items: center; height: 64px; max-width: 100%; margin-bottom: 8px; border: 2px solid var(--fg-2); border-radius: 6px; font: 600 10px var(--f-mono); color: var(--fg-3); transition: border-color var(--f12), color var(--f12); }
.blank:hover .frame { border-color: var(--flash); color: var(--flash); }
.blank.open .frame { width: 64px; border: 0; color: var(--fg-2); }
.blank.open .frame .ico { width: 34px; height: 34px; }
.blank b { font-size: 15px; }
.blank small { color: var(--fg-3); font-size: 12px; }
.projects { padding-top: 30px; }
.sec-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 16px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.pcard { position: relative; display: grid; gap: 10px; padding: 0 0 4px; border-radius: var(--r-l); cursor: pointer; outline-offset: 4px; }
.pcard .thumb { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 5; border-radius: var(--r-l); background: linear-gradient(160deg, var(--panel-3), var(--night-2)) center / cover; border: 1px solid var(--line); color: var(--fg-3); overflow: hidden; transition: transform var(--f18) var(--ease-flash), border-color var(--f12); }
.pcard .thumb[style*="background-image"] { background-size: cover; background-position: center; }
.pcard:hover .thumb { transform: translateY(-3px); border-color: var(--line-3); }
.pcard .badge { position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(10, 7, 34, .78); font-size: 11px; font-weight: 600; backdrop-filter: blur(6px); }
.pcard .cloud-badge { position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(10, 7, 34, .78); color: var(--fg); }
.pcard .cloud-badge .ico { width: 16px; height: 16px; }
.pcard .meta { display: grid; gap: 2px; padding: 0 2px; min-width: 0; }
.pcard .meta b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.pcard .meta small { color: var(--fg-3); font-size: 13px; }
.pcard .card-more { position: absolute; right: 6px; top: 6px; background: rgba(10, 7, 34, .7); backdrop-filter: blur(6px); opacity: 0; transition: opacity var(--f12); }
.pcard:hover .card-more, .pcard:focus-within .card-more { opacity: 1; }
.pcard.skel .thumb, .pcard.skel .meta b, .pcard.skel .meta small { background: linear-gradient(90deg, var(--panel) 25%, var(--panel-2) 50%, var(--panel) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 8px; color: transparent; }
.pcard.skel .thumb { border-radius: var(--r-l); }
.pcard.skel .meta b { width: 70%; height: 16px; }
.pcard.skel .meta small { width: 45%; height: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------------------------------ the editor */
.page-editor { height: 100dvh; overflow: hidden; }
.editor {
  display: grid; height: 100dvh; background: var(--g-950);
  grid-template-columns: minmax(330px, 384px) minmax(0, 1fr) minmax(290px, 348px);
  grid-template-rows: auto auto minmax(0, 1fr) auto auto minmax(210px, 36vh);
  grid-template-areas: "top top top" "lock lock lock" "flash mon media" "flash live media" "flash tools tools" "flash tl tl";
}
.ed-top { grid-area: top; display: flex; align-items: center; gap: 8px; height: calc(56px + var(--safe-t)); padding: var(--safe-t) 12px 0 8px; background: var(--night); border-bottom: 1px solid var(--line); min-width: 0; }
.ed-mark { margin: 0 4px 0 2px; }
.ed-title { display: grid; min-width: 0; max-width: 420px; flex: 0 1 auto; }
.name-in { min-width: 0; width: 100%; padding: 2px 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; font-size: 16px; font-weight: 700; text-overflow: ellipsis; outline: none; }
.name-in:hover:not([readonly]) { border-color: var(--line-2); }
.name-in:focus { border-color: var(--flash); background: var(--night-2); }
.ed-sub { padding: 0 9px; color: var(--fg-3); font: 500 11px var(--f-mono); font-stretch: 87.5%; white-space: nowrap; }
.hist { display: flex; gap: 2px; }
.sync-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--fg-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.sync-pill .ico { width: 17px; height: 17px; }
.sync-pill:hover { border-color: var(--line-3); color: var(--fg); }
.sync-pill.on { color: var(--fg); --acc: var(--ok); }
.sync-pill.busy .ico { animation: bolt-pulse .9s infinite; }
.sync-pill.bad { color: #FF8A7D; border-color: rgba(255, 79, 61, .45); }
.lockbar { grid-area: lock; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 14px; background: linear-gradient(90deg, var(--storm), var(--panel-2)); border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.lockbar .ico { color: var(--flash); }

/* monitor */
.pane { min-width: 0; min-height: 0; }
.monitor { grid-area: mon; display: grid; grid-template-rows: minmax(0, 1fr) auto; background: var(--g-950); }
.screen { position: relative; min-height: 0; margin: 14px 14px 0; display: grid; place-items: center; overflow: hidden; }
.screen canvas { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; background: #000; border-radius: 4px; box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .9), 0 0 0 1px var(--g-800); }
.screen-tap { position: absolute; inset: 0; border: 0; background: transparent; cursor: pointer; }
.screen .chip.ro { position: absolute; left: 10px; top: 10px; z-index: 2; }
.screen:fullscreen { margin: 0; background: #000; }
.transport { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 8px 14px 10px; }
.tc-box { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.tc { font-size: 15px; color: var(--fg); }
.tc-dur { font-size: 12px; color: var(--g-400); }
.tc-dur::before { content: "/ "; }
.tp-mid { display: flex; align-items: center; gap: 4px; }
.tp-mid .btn.icon { color: var(--g-300); }
.tp-mid .btn.icon:hover { color: var(--fg); }
.tp-right { display: flex; justify-content: flex-end; }
.play-btn { display: grid; place-items: center; width: 50px; height: 50px; margin: 0 6px; border: 0; border-radius: 50%; background: var(--fg); color: var(--storm); box-shadow: 0 0 0 6px rgba(255, 255, 255, .06); transition: transform var(--f12) var(--ease-snap), background var(--f12); --acc: var(--storm); }
.play-btn:hover { background: var(--flash); }
.play-btn:active { transform: scale(.92); }
.play-btn .ico { width: 24px; height: 24px; fill: currentColor; stroke: none; }
.playing .play-btn { background: var(--flash); }

/* Flash's live line */
.flash-live { grid-area: live; display: flex; align-items: center; gap: 10px; margin: 0 14px 8px; padding: 8px 8px 8px 12px; border-radius: 999px; border: 1px solid rgba(255, 210, 63, .35); background: linear-gradient(90deg, rgba(255, 210, 63, .13), rgba(28, 22, 87, .6)); color: var(--fg); font-size: 13.5px; font-weight: 600; text-align: left; min-width: 0; animation: sheet-pop var(--f18) var(--ease-flash); }
.flash-live .live-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-bolt { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--flash); flex: none; }
.live-bolt .ico { width: 15px; height: 15px; --acc: var(--storm); animation: bolt-pulse .8s infinite; }
.live-stop { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 79, 61, .16); flex: none; }
.live-stop .ico { width: 16px; height: 16px; }

/* side panels */
.side-tabs { display: none; }
.pane.flash, .pane.media { display: flex; flex-direction: column; background: var(--night); border-color: var(--line); border-style: solid; border-width: 0; }
.pane.flash { grid-area: flash; border-right-width: 1px; }
.pane.media { grid-area: media; border-left-width: 1px; background: var(--g-900); }
.pane-head { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--line); flex: none; }
.pane-head > b { font-size: 15px; }
.pane-head .grab { display: none; }
.pane-head .count { color: var(--fg-3); font-size: 12px; }
.scrim { display: none; }

/* tool bar */
.toolbar { grid-area: tools; display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 10px; background: var(--g-900); border-top: 1px solid var(--g-800); border-bottom: 1px solid var(--g-800); }
.toolbar .tools { display: flex; align-items: center; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; flex: 1; }
.toolbar .tools::-webkit-scrollbar { display: none; }
.toolbar .tool { height: 50px; min-width: 60px; flex-direction: row; gap: 7px; padding: 0 12px; font-size: 13px; }
.toolbar .tool .ico { width: 20px; height: 20px; }
.toolbar .zoom { display: flex; align-items: center; gap: 2px; flex: none; padding-left: 8px; border-left: 1px solid var(--g-800); }
.toolbar .zoom .btn.icon { color: var(--g-300); }
.toolbar .sel-head { display: flex; align-items: center; gap: 4px; flex: none; max-width: 200px; padding-right: 10px; margin-right: 4px; border-right: 1px solid var(--g-800); }
.toolbar .sel-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; color: var(--flash); }
.toolbar[data-mode="clip"] { background: linear-gradient(90deg, rgba(255, 210, 63, .08), var(--g-900) 40%); }
.toolbar[data-mode="clip"] .tool:last-child { color: #FF8A7D; }
.ico.out .as { display: none; }

/* ------------------------------------------------ timeline */
.pane.tl { grid-area: tl; position: relative; background: var(--g-900); }
.tl-body { position: absolute; inset: 0; display: grid; grid-template-columns: 88px minmax(0, 1fr); }
.tl-heads { overflow: hidden; background: var(--g-900); border-right: 1px solid var(--g-800); z-index: 2; }
.tl-head-ruler { height: 26px; margin-bottom: 4px; border-bottom: 1px solid var(--g-800); }
.tl-head { display: flex; align-items: center; gap: 2px; height: var(--th, 54px); margin-bottom: 4px; padding: 0 4px 0 10px; }
.tl-head.audio { --th: 42px; }
.tl-head.sub { --th: 26px; margin-top: 4px; }
.tl-head b { flex: 1; font: 600 11px var(--f-mono); color: var(--g-300); }
.tl-head.video b { color: var(--t-video); }
.tl-head.audio b { color: var(--t-audio); }
.tl-head.sub b { color: var(--t-title); }
.tl-head button { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--g-400); }
.tl-head button:hover { background: var(--g-800); color: var(--fg); }
.tl-head button .ico { width: 16px; height: 16px; }
.tl-head button.on { color: var(--flash); }
.tl-head.off b { opacity: .45; }
.tl-head-pad { height: 120px; }
.tl-view { position: relative; min-width: 0; overflow: hidden; }
.tl-scroll { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--g-700) transparent; }
.tl-inner { position: relative; min-width: 100%; min-height: 100%; padding-bottom: 60px; }
.tl-ruler { position: sticky; top: 0; z-index: 3; height: 26px; background: var(--g-900); border-bottom: 1px solid var(--g-800); cursor: ew-resize; }
.tl-ruler i { position: absolute; bottom: 0; height: 5px; border-left: 1px solid var(--g-600); font: 500 10px var(--f-mono); font-stretch: 87.5%; font-style: normal; color: var(--g-400); }
.tl-ruler i.maj { height: 10px; border-color: var(--g-500); }
.tl-ruler i:not(:empty) { padding-left: 4px; line-height: 1; }
.tl-ruler i:not(:empty) { height: 26px; padding-top: 5px; border-left-color: var(--g-600); }
.tl-guide { position: absolute; bottom: 0; width: 10px; height: 10px; margin-left: -5px; background: var(--flash); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.tl-subs { position: relative; height: 26px; margin: 4px 0; }
.tl-sub { position: absolute; top: 0; height: 26px; padding: 0 8px; border-radius: 6px; background: rgba(255, 122, 182, .2); border: 1px solid rgba(255, 122, 182, .5); color: #FFC2DC; font-size: 12px; line-height: 24px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.tl-tracks { position: relative; padding-top: 4px; }
.tl-track { position: relative; height: 54px; margin-bottom: 4px; }
.tl-track.audio { height: 42px; }
.tl-track.off { opacity: .45; }
.tl-item {
  position: absolute; top: 0; bottom: 0; border-radius: 8px; overflow: hidden; cursor: grab; touch-action: pan-x pan-y;
  --c: var(--t-video); background-color: #1F2B57; background-image: linear-gradient(180deg, rgba(10, 7, 34, .55), transparent 55%), var(--film, none); background-size: 100% 100%, auto 100%; background-repeat: no-repeat, repeat-x;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), inset 0 2px 0 var(--c); transition: box-shadow var(--f8);
}
.tl-item.audio { --c: var(--t-audio); background-color: #12392F; background-image: repeating-linear-gradient(90deg, rgba(61, 220, 151, .55) 0 2px, transparent 2px 5px); background-size: 100% 46%; background-position: 0 70%; background-repeat: no-repeat; }
.tl-item.title { --c: var(--t-title); background: linear-gradient(90deg, rgba(255, 122, 182, .32), rgba(255, 122, 182, .16)); }
.tl-item.effect { --c: var(--t-effect); background: linear-gradient(90deg, rgba(140, 123, 255, .35), rgba(140, 123, 255, .16)); }
.tl-item.color { background: var(--clip, #333); }
.tl-item .lbl { position: absolute; left: 8px; right: 8px; top: 5px; display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .8); white-space: nowrap; overflow: hidden; pointer-events: none; }
.tl-item .lbl span { overflow: hidden; text-overflow: ellipsis; }
.tl-item .lbl em { font-style: normal; font-size: 10px; padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, .5); color: var(--flash); }
.tl-item .lbl .ico { width: 14px; height: 14px; }
.tl-item.tiny .lbl { display: none; }
.tl-item.disabled { opacity: .35; filter: grayscale(1); }
.tl-item .mix { position: absolute; right: 0; top: 0; bottom: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45)); pointer-events: none; }
.tl-item .fade-in, .tl-item .fade-out { position: absolute; top: 0; bottom: 0; pointer-events: none; }
.tl-item .fade-in { left: 0; background: linear-gradient(to top right, rgba(0, 0, 0, .55) 50%, transparent 50%); }
.tl-item .fade-out { right: 0; background: linear-gradient(to top left, rgba(0, 0, 0, .55) 50%, transparent 50%); }
.tl-item .h { position: absolute; top: 0; bottom: 0; width: 10px; cursor: ew-resize; touch-action: none; z-index: 2; }
.tl-item .h.l { left: 0; } .tl-item .h.r { right: 0; }
.tl-item:hover .h { background: rgba(255, 255, 255, .14); }
.tl-item.sel { box-shadow: inset 0 0 0 2px var(--flash), 0 0 0 1px rgba(0, 0, 0, .6), 0 6px 18px -6px rgba(255, 210, 63, .45); z-index: 3; overflow: visible; }
.tl-item.sel .h { background: var(--flash); width: 12px; }
.tl-item.sel .h.l { border-radius: 8px 0 0 8px; } .tl-item.sel .h.r { border-radius: 0 8px 8px 0; }
.tl-item.sel .h::after { content: ""; position: absolute; left: 50%; top: 50%; width: 2px; height: 14px; margin: -7px 0 0 -1px; border-radius: 1px; background: var(--storm); }
.tl-item.lifted { cursor: grabbing; z-index: 5; box-shadow: inset 0 0 0 2px var(--flash), 0 16px 32px -10px rgba(0, 0, 0, .8); transform-origin: center; }
.tl-item.to-track { outline: 2px dashed var(--flash); outline-offset: 2px; }
.tl-snap { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--flash); box-shadow: 0 0 8px var(--flash); z-index: 6; pointer-events: none; }
.tl-playhead { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--fg); box-shadow: 0 0 10px rgba(255, 243, 184, .8); z-index: 4; pointer-events: none; }
.tl-playhead i, .tl-center i { position: absolute; left: -6px; top: 0; width: 14px; height: 12px; background: var(--flash); clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%); transform: skewX(-10deg); }
.tl-center { display: none; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--fg); box-shadow: 0 0 12px rgba(255, 243, 184, .85); z-index: 5; pointer-events: none; }
.tl-time { position: absolute; left: 50%; top: 30px; transform: translateX(-50%); padding: 3px 8px; border-radius: 6px; background: var(--fg); color: var(--storm); font-size: 11px; font-weight: 600; z-index: 6; opacity: 0; pointer-events: none; transition: opacity var(--f12); }
.tl-time.on { opacity: 1; }
.centered .tl-playhead { display: none; }
.centered .tl-center { display: block; }
.centered .tl-ruler { cursor: default; }
.tl-empty { position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 999px; background: rgba(22, 22, 28, .85); border: 1px solid var(--g-700); backdrop-filter: blur(6px); z-index: 7; white-space: nowrap; }
.is-empty .tl-center, .is-empty .tl-playhead { opacity: .3; }

/* ------------------------------------------------ media */
.bin-tools { display: grid; gap: 10px; padding: 12px; border-bottom: 1px solid var(--g-800); }
.bin-filter { display: flex; gap: 8px; align-items: center; min-width: 0; }
.bin-filter .seg { flex: none; }
.bin-filter .input { flex: 1; min-width: 0; }
.bin-grid { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; align-content: start; padding: 12px; overscroll-behavior: contain; }
.media.drop .bin-grid { outline: 2px dashed var(--flash); outline-offset: -8px; border-radius: var(--r-l); background: var(--flash-dim); }
.clip-card { position: relative; display: grid; gap: 6px; border-radius: var(--r-m); cursor: pointer; outline-offset: 3px; }
.clip-card .thumb { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: var(--r-m); background: var(--g-800) center / cover no-repeat; color: var(--g-400); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); transition: transform var(--f12) var(--ease-snap); }
.clip-card:active .thumb { transform: scale(.96); }
.clip-card.t-audio .thumb { background: linear-gradient(160deg, #134A3A, #0E2A23); color: var(--t-audio); }
.clip-card.t-title .thumb { background: linear-gradient(160deg, #5A1E45, #2A0F24); color: var(--t-title); }
.clip-card .dur { position: absolute; right: 6px; bottom: 6px; padding: 2px 6px; border-radius: 5px; background: rgba(0, 0, 0, .7); font-size: 10px; color: #fff; }
.clip-card .used { position: absolute; left: 6px; bottom: 6px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--flash); color: var(--storm); --acc: var(--storm); }
.clip-card .used .ico { width: 13px; height: 13px; stroke-width: 2.5; }
.clip-card .star, .clip-card .add, .clip-card .more { position: absolute; top: 6px; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(10, 7, 34, .72); color: #fff; backdrop-filter: blur(6px); transition: opacity var(--f12), transform var(--f12) var(--ease-snap); }
.clip-card .star { left: 6px; opacity: 0; }
.clip-card .star.on { opacity: 1; }
.clip-card .add { right: 40px; opacity: 0; background: var(--flash); color: var(--storm); }
.clip-card .more { right: 6px; opacity: 0; }
.clip-card:hover .star, .clip-card:hover .add, .clip-card:hover .more, .clip-card:focus-within .star, .clip-card:focus-within .more { opacity: 1; }
.clip-card .star .ico, .clip-card .add .ico, .clip-card .more .ico { width: 16px; height: 16px; }
.clip-card .note { position: absolute; left: 6px; top: 40px; padding: 2px 6px; border-radius: 5px; background: var(--cut); font-size: 10px; font-weight: 700; }
.clip-card .cap { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 0 2px; font-size: 12.5px; }
.clip-card .cap .ico { width: 14px; height: 14px; color: var(--g-400); }
.clip-card .cap b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.clip-card.dragging { opacity: .4; }

/* ------------------------------------------------ Flash's panel */
.flash-av { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--flash); flex: none; }
.flash-av .ico { --acc: var(--storm); width: 20px; height: 20px; }
.working .flash-av .ico { animation: bolt-pulse .8s infinite; }
.flash-name { display: grid; line-height: 1.2; }
.flash-name b { font-size: 15px; }
.flash-state { color: var(--fg-3); font-size: 12px; }
.working .flash-state { color: var(--flash); }
.msgs { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; scroll-behavior: smooth; }
.welcome { display: grid; justify-items: start; gap: 12px; margin: auto 0; padding: 8px 4px 12px; }
.welcome-mark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(140deg, var(--storm-600), var(--panel-2)); border: 1px solid var(--line-2); box-shadow: 0 0 40px -10px rgba(255, 210, 63, .45); }
.welcome h3 { margin: 4px 0 0; font-size: 30px; }
.welcome p { margin: 0; color: var(--fg-2); font-size: 14.5px; }
.sugg { display: grid; gap: 8px; width: 100%; margin-top: 4px; }
.sugg button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--panel); color: var(--fg); text-align: left; font-size: 14px; transition: border-color var(--f12), background var(--f12), transform var(--f12) var(--ease-snap); }
.sugg button:hover { border-color: rgba(255, 210, 63, .45); background: var(--panel-2); }
.sugg button:active { transform: scale(.98); }
.sugg .ico { width: 18px; height: 18px; color: var(--fg-2); }
.msg { display: grid; gap: 6px; max-width: 100%; animation: msg-in var(--f18) var(--ease-flash); }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } }
.msg.user { justify-items: end; }
.msg.user .body { max-width: 86%; padding: 10px 14px; border-radius: 18px 18px 4px 18px; background: var(--storm-600); color: #fff; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.flash .body { padding: 0 2px 0 34px; overflow-wrap: anywhere; font-size: 15px; line-height: 1.55; }
.msg.flash .body p { margin: 0 0 8px; }
.msg.flash .body p:last-child { margin-bottom: 0; }
.msg.flash .body ul { margin: 4px 0 8px; padding-left: 20px; }
.msg.flash .body li { margin: 2px 0; }
.msg.flash .body code { padding: 1px 5px; border-radius: 5px; background: var(--panel-2); font: 500 12.5px var(--f-mono); }
.msg.flash .body b { color: #fff; }
.who { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.who .av { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--agent, var(--flash)); flex: none; }
.who .av .ico { width: 16px; height: 16px; stroke: var(--night); --acc: var(--night); }
.who b { color: var(--agent, var(--flash)); font-weight: 700; }
.thinking { display: flex; align-items: center; gap: 8px; padding-left: 34px; color: var(--fg-3); font-size: 13px; font-style: italic; overflow: hidden; }
.thinking i { width: 7px; height: 7px; border-radius: 50%; background: var(--flash); flex: none; animation: bolt-pulse .8s infinite; }
.thinking span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps { margin-left: 34px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--panel); overflow: hidden; animation: msg-in var(--f18) var(--ease-flash); }
.steps-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; border: 0; background: transparent; color: var(--fg-3); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.steps-head .ico { width: 16px; height: 16px; transition: transform var(--f12); }
.steps.open .steps-head .ico { transform: rotate(180deg); }
.steps:not(.many) .steps-head { display: none; }
.step-list { display: grid; gap: 1px; padding: 6px 0; }
.steps.many:not(.open) .step:not(:nth-last-child(-n+3)), .steps.many:not(.open) .step-pic:not(:nth-last-child(-n+3)) { display: none; }
.step { display: flex; align-items: center; gap: 10px; padding: 5px 12px; font-size: 13.5px; color: var(--fg-2); }
.step .st { width: 15px; height: 15px; stroke-width: 2.4; }
.step.done .st { color: var(--ok); --acc: var(--ok); }
.step.fail { color: #FF8A7D; }
.step.fail .st { color: #FF8A7D; }
.step:not(.done):not(.fail) { color: var(--fg); }
.step-pic { display: block; margin: 2px 12px 6px 37px; padding: 0; border: 0; border-radius: 8px; background: transparent; overflow: hidden; }
.step-pic img { display: block; max-height: 120px; border-radius: 8px; }
.big-pic { display: block; width: 100%; border-radius: var(--r-m); }
.chat-note { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-m); background: var(--panel); color: var(--fg-2); font-size: 13px; }
.chat-note .ico { width: 16px; height: 16px; color: var(--fg-3); }
.chat-note.warn { background: var(--cut-dim); color: #FFB3AA; }
.chat-note.warn .ico { color: #FF8A7D; }
.card { margin-left: 34px; padding: 14px; border-radius: var(--r-l); background: var(--panel); border: 1px solid var(--line-2); animation: msg-in var(--f18) var(--ease-flash); }
.card h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14px; }
.card h4 .ico { width: 18px; height: 18px; color: var(--flash); }
.card .q { margin: 8px 0; font-size: 14.5px; }
.card .row { margin-top: 12px; }
.card.ask { border-color: rgba(255, 210, 63, .4); }
.card.answered { opacity: .7; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.opt { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--night-2); color: var(--fg); font-size: 14px; font-weight: 600; }
.opt small { color: var(--flash); font-size: 11px; }
.opt[aria-pressed="true"] { background: var(--flash); border-color: var(--flash); color: var(--storm); }
.opt[aria-pressed="true"] small { color: var(--storm); }
.plan ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.plan .mark { display: grid; place-items: center; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--line-3); flex: none; }
.plan li.in_progress .mark, .plan li.doing .mark { border-color: var(--flash); border-right-color: transparent; animation: spin .9s linear infinite; }
.plan li.done { color: var(--fg-3); text-decoration: line-through; text-decoration-color: var(--fg-3); }
.plan li.done .mark { background: var(--ok); border-color: var(--ok); }
.plan li.done .mark .ico { width: 12px; height: 12px; stroke: var(--night); --acc: var(--night); stroke-width: 3; }
.script textarea { margin-bottom: 8px; }
.composer { padding: 10px 12px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); flex: none; }
.composer-box { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 22px; background: var(--night-2); border: 1px solid var(--line-2); transition: border-color var(--f12), box-shadow var(--f12); }
.composer-box:focus-within { border-color: rgba(255, 210, 63, .6); box-shadow: 0 0 0 3px var(--flash-dim); }
.chat-in { flex: 1; min-height: 36px; max-height: 160px; padding: 7px 0; border: 0; background: transparent; resize: none; outline: none; font-size: 15px; line-height: 1.45; }
.send { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--flash); color: var(--storm); flex: none; transition: transform var(--f12) var(--ease-snap), opacity var(--f12); --acc: var(--storm); }
.send:disabled { opacity: .3; }
.send:active:not(:disabled) { transform: scale(.9); }
.send .ico { width: 20px; height: 20px; stroke-width: 2.2; }
.send.stop { background: rgba(255, 79, 61, .18); }
.composer-foot { display: flex; align-items: center; gap: 8px; padding: 8px 2px 0; }
.usage { color: var(--fg-3); font-size: 11px; }

/* ------------------------------------------------ sheets' contents */
.title-preview { display: grid; place-items: center; aspect-ratio: 16 / 7; margin-bottom: 12px; padding: 12px; border-radius: var(--r-m); background: linear-gradient(160deg, #3A2E8F, #FF8A5C 70%, #2A1F55); overflow: hidden; font-size: 28px; line-height: 1.15; text-align: center; }
.title-preview[data-pos="lower_third"] { place-items: end start; }
.title-in { font-size: 17px; }
.style-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.style-chip { display: grid; justify-items: center; gap: 4px; padding: 10px 6px; border-radius: var(--r-m); border: 1px solid var(--line-2); background: var(--night-2); color: var(--fg-2); }
.style-chip span { font-size: 22px; line-height: 1; font-weight: 800; color: #fff; }
.style-chip small { font-size: 12px; font-weight: 600; }
.style-chip[aria-pressed="true"] { border-color: var(--flash); background: var(--flash-dim); color: var(--fg); }
.style-chip.s-flash span { font-family: var(--f-display); font-style: italic; color: var(--flash); }
.style-chip.s-box span { background: var(--flash); color: var(--storm); padding: 0 6px; border-radius: 3px; }
.style-chip.s-lower span { border-left: 3px solid var(--flash); padding-left: 6px; }
.style-chip.s-type span { font-family: var(--f-mono); font-weight: 500; }
.style-chip.s-outline span { color: transparent; -webkit-text-stroke: 1.5px #fff; }
.magic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.magic-card { display: grid; gap: 6px; align-content: start; padding: 14px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--night-2); color: var(--fg); text-align: left; transition: border-color var(--f12), background var(--f12), transform var(--f12) var(--ease-snap); }
.magic-card:hover { border-color: rgba(255, 210, 63, .5); background: var(--panel-2); }
.magic-card:active { transform: scale(.97); }
.magic-card .ico { color: var(--flash); }
.magic-card b { font-size: 15px; }
.magic-card small { color: var(--fg-3); font-size: 12.5px; line-height: 1.4; }
.big-pick { display: grid; justify-items: center; gap: 6px; width: 100%; padding: 22px; border-radius: var(--r-l); border: 1.5px dashed var(--line-3); background: var(--night-2); color: var(--fg); }
.big-pick:hover { border-color: var(--flash); }
.big-pick .ico { color: var(--flash); }
.big-pick small { color: var(--fg-3); }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; }
.export-head { display: grid; place-items: center; margin-bottom: 12px; }
.export-poster { width: auto; max-width: 100%; height: min(34vh, 260px); border-radius: var(--r-m); background: var(--g-850) center / cover no-repeat; box-shadow: var(--shadow); }
.export-run { position: relative; display: grid; place-items: center; margin-bottom: 12px; }
.export-run .export-poster { filter: brightness(.45) saturate(.8); }
.ring { position: absolute; display: grid; place-items: center; width: 108px; height: 108px; border-radius: 50%; background: conic-gradient(var(--flash) calc(var(--u) * 360deg), rgba(255, 255, 255, .14) 0); }
.ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: rgba(10, 7, 34, .88); }
.ring b { position: relative; font-size: 20px; color: var(--fg); }
.export-status { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 0 0 4px; color: var(--fg-2); font-size: 14px; text-align: center; }
.export-status.ok { color: var(--ok); font-weight: 600; --acc: var(--ok); }
.export-video { display: block; max-width: 100%; max-height: 52vh; margin: 0 auto 12px; border-radius: var(--r-m); background: #000; }
.export .seg { width: 100%; }
.export .seg button { flex: 1; justify-content: center; }
.share-intro { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 10px 0; }
.share-intro .ico { color: var(--flash); }
.share-intro p { margin: 0; }
.loading-row { display: flex; align-items: center; gap: 10px; color: var(--fg-2); padding: 20px 0; }
.add-people { display: grid; gap: 8px; }
.person-ctl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.add-people .person-ctl { justify-content: flex-end; }
.share-people { display: grid; gap: 4px; }
.person { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; }
.person .who { display: grid; }
.person .who b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; }
.person .who small { color: var(--fg-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.owner-tag { color: var(--fg-3); font-size: 13px; }
.chip-toggle { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--fg-3); font-size: 12px; font-weight: 600; }
.chip-toggle .ico { width: 14px; height: 14px; }
.chip-toggle.on { border-color: var(--flash); color: var(--flash); background: var(--flash-dim); }
.access { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; padding: 12px; border-radius: var(--r-l); background: var(--night-2); border: 1px solid var(--line); }
.access-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--panel-3); flex: none; }
.access.open .access-ic { background: rgba(61, 220, 151, .18); color: var(--ok); }
.access .grow { display: grid; gap: 6px; }
.access small { color: var(--fg-3); font-size: 12.5px; }
.links { display: grid; gap: 6px; }
.linkrow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-m); background: var(--night-2); }
.linkrow .grow { display: grid; }
.linkrow small { color: var(--fg-3); font-size: 12px; }
.linkrow.revoked { opacity: .5; }
.newlink { display: grid; gap: 8px; margin-top: 4px; padding: 10px; border-radius: var(--r-m); border: 1px dashed var(--line-2); }
.newlink .person-ctl { justify-content: flex-end; }
.notices { display: grid; gap: 8px; }
.notice { display: flex; gap: 12px; padding: 12px; border-radius: var(--r-l); background: var(--night-2); border: 1px solid var(--line); }
.notice.unread { border-color: rgba(255, 210, 63, .4); }
.notice p { margin: 0 0 4px; font-size: 14.5px; }
.notice small { color: var(--fg-3); font-size: 12.5px; }
.notice .row { margin-top: 10px; }
.n-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--panel-3); flex: none; }
.n-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 14px; font-weight: 600; }
.n-link .ico { width: 15px; height: 15px; }
.drive-sum { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; padding: 16px; border-radius: var(--r-l); background: linear-gradient(140deg, var(--storm-600), var(--panel-2)); }
.drive-sum .ico { color: var(--flash); }
.drive-sum b { display: block; font-size: 22px; }
.drive-sum small { color: var(--fg-2); }

/* ------------------------------------------------ tablet: monitor and a side panel over the timeline */
@media (max-width: 1199px) and (min-width: 761px) {
  .welcome h3 { font-size: 24px; }
  .welcome .sugg button { padding: 9px 12px; }
  .editor {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    grid-template-rows: auto auto minmax(0, 1fr) auto auto minmax(200px, 34vh);
    grid-template-areas: "top top" "lock lock" "mon side" "live side" "tools tools" "tl tl";
  }
  .side-tabs { display: flex; grid-area: side; align-self: start; z-index: 2; margin: 10px; width: calc(100% - 20px); }
  .side-tabs button { flex: 1; justify-content: center; }
  .pane.flash, .pane.media { grid-area: side; border-width: 0 0 0 1px; padding-top: 56px; }
  .editor[data-side="flash"] .pane.media, .editor[data-side="media"] .pane.flash { display: none; }
  .pane.flash .pane-head, .pane.media .pane-head { display: none; }
  .blanks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ------------------------------------------------ phone: monitor, timeline, tool bar; Flash and media in drawers */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .hide-phone { display: none !important; }
  .show-phone { display: inline-flex !important; }
  .show-phone.hist { display: flex !important; }
  .btn { min-height: var(--tap); }
  .btn.icon { width: var(--tap); min-width: var(--tap); }
  .btn.sm { min-height: 36px; }

  .toasts { bottom: calc(18px + var(--safe-b)); }
  body:has(.page-editor) .toasts { top: calc(62px + var(--safe-t)); }

  dialog.sheet { place-items: end stretch; }
  .sheet-card { width: 100%; max-width: none; max-height: 92dvh; border-radius: var(--r-xl) var(--r-xl) 0 0; border-width: 1px 0 0; animation: sheet-up var(--f18) var(--ease-flash); padding-bottom: var(--safe-b); }
  dialog.sheet.compact .sheet-card { width: 100%; }
  dialog.sheet.tall .sheet-card { height: 88dvh; }
  dialog.sheet.out .sheet-card { transform: translateY(100%); opacity: 1; transition: transform var(--f12) var(--ease-strike); }
  dialog.sheet .grab { display: block; width: 40px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: var(--line-3); flex: none; touch-action: none; }
  .sheet-head { padding: 10px 14px 4px 20px; touch-action: none; }
  .sheet-body { padding: 8px 20px 16px; }
  .sheet-foot { padding: 12px 20px 14px; flex-wrap: wrap; }
  .sheet-foot .btn { flex: 1; }
  @keyframes sheet-up { from { transform: translateY(100%); } }

  /* sign in */
  .auth { grid-template-columns: 1fr; align-content: start; gap: 26px; padding-top: calc(28px + var(--safe-t)); }
  .auth-hero { gap: 14px; }
  .auth-hero h1 { font-size: clamp(42px, 13vw, 64px); }
  .auth-points { display: none; }
  .bolt-strike { width: 90vw; right: -30vw; top: -6vh; }

  /* home */
  .topbar { height: calc(56px + var(--safe-t)); }
  .lockup b { font-size: 16px; }
  .hero { padding: 28px 0 22px; justify-items: stretch; text-align: left; }
  .hero .slug { justify-self: start; }
  .hero h1 { font-size: clamp(38px, 11.5vw, 56px); }
  .hero .lead { text-align: left; font-size: 15.5px; }
  .composer-card { padding: 12px; border-radius: 20px; }
  .composer-in { font-size: 17px; min-height: 84px; }
  .composer-row { gap: 8px; }
  .composer-row .grow { display: none; }
  .fmt-seg { order: -1; width: 100%; }
  .fmt-seg button { flex: 1; justify-content: center; }
  .composer-row > .btn:not(.make) { flex: 1; }
  .make { flex: 1.4; }
  .ideas { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
  .ideas::-webkit-scrollbar { display: none; }
  .idea { flex: none; }
  .blanks { display: flex; overflow-x: auto; margin: 0 -16px; padding: 0 16px 6px; scrollbar-width: none; }
  .blanks::-webkit-scrollbar { display: none; }
  .blank { flex: 0 0 116px; }
  .sec-row { gap: 10px; }
  .ptabs { width: 100%; }
  .ptabs .seg { width: 100%; }
  .ptabs .seg button { flex: 1; justify-content: center; padding: 0 8px; }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pcard .card-more { opacity: 1; }

  /* the editor */
  .editor {
    grid-template-columns: 100%;
    grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
    grid-template-areas: "top" "lock" "mon" "live" "tl" "tools";
  }
  .ed-top { height: calc(54px + var(--safe-t)); padding: var(--safe-t) 6px 0 2px; gap: 4px; }
  .ed-mark, .ed-sub { display: none; }
  .ed-title { flex: 1; max-width: none; }
  .name-in { font-size: 15px; padding: 4px 6px; }
  .sync-pill { padding: 0 9px; min-height: 32px; }
  .sync-pill span { display: none; }
  .ed-top .btn.primary { padding: 0 14px; }
  .hide-xs { display: none !important; }
  .monitor { grid-template-rows: auto auto; }
  .screen { height: clamp(170px, 38dvh, 440px); margin: 8px 8px 0; }
  .transport { padding: 4px 6px 6px; gap: 4px; }
  .tc { font-size: 13px; }
  .tc-dur { display: block; font-size: 11px; }
  .tc-dur::before { content: ""; }
  .tc-box { flex-direction: column; gap: 0; align-items: flex-start; padding-left: 6px; }
  .play-btn { width: 48px; height: 48px; margin: 0 2px; }
  .flash-live { margin: 0 8px 6px; }

  .toolbar { position: relative; z-index: 6; padding: 4px 4px calc(4px + var(--safe-b)); background: var(--night); border-top: 1px solid var(--line); border-bottom: 0; flex-direction: column; align-items: stretch; gap: 0; }
  .toolbar .tools { gap: 0; justify-content: space-between; }
  .toolbar .tool { flex-direction: column; height: 60px; min-width: 62px; padding: 0 4px; gap: 4px; font-size: 11px; flex: 1 0 auto; }
  .toolbar .tool .ico { width: 24px; height: 24px; }
  .toolbar .sel-head { max-width: none; padding: 4px 6px 0; margin: 0; border: 0; }
  .toolbar[data-mode="clip"] { background: var(--night); }
  .toolbar[data-mode="clip"] .tools { justify-content: flex-start; }

  .tl-body { grid-template-columns: 46px minmax(0, 1fr); }
  .tl-head { flex-direction: column; justify-content: center; padding: 0; gap: 0; }
  .tl-head b { flex: none; font-size: 10px; text-align: center; }
  .tl-head .lockbtn { display: none; }
  .tl-head button { width: 30px; height: 26px; }
  .tl-track { height: 52px; }
  .tl-head { --th: 52px; }
  .tl-track.audio, .tl-head.audio { height: 38px; --th: 38px; }
  .tl-item .h { width: 4px; }
  .tl-item.sel .h { width: 22px; }
  .tl-item.sel .h.l { left: -10px; } .tl-item.sel .h.r { right: -10px; }
  .tl-item.sel .h::after { height: 18px; margin-top: -9px; }
  .tl-empty { top: 58%; padding: 8px; gap: 8px; }
  .tl-empty .btn { min-height: 40px; }

  .scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(5, 3, 20, .55); opacity: 0; pointer-events: none; transition: opacity var(--f18); }
  .editor[data-drawer] .scrim { opacity: 1; pointer-events: auto; }
  .pane.flash, .pane.media {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: min(88dvh, 760px);
    border-radius: var(--r-xl) var(--r-xl) 0 0; border-width: 1px 0 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, .6);
    transform: translateY(105%); transition: transform var(--f30) var(--ease-flash); visibility: hidden;
  }
  .pane.media { height: min(78dvh, 680px); background: var(--g-900); }
  .editor[data-drawer="flash"] .pane.flash, .editor[data-drawer="media"] .pane.media { transform: none; visibility: visible; }
  .pane-head { min-height: 58px; padding-top: 16px; position: relative; }
  .pane-head .grab { display: block; position: absolute; left: 50%; top: 6px; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--line-3); }
  .bin-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-bottom: calc(16px + var(--safe-b)); }
  .clip-card .more { opacity: 1; width: 28px; height: 28px; }
  .clip-card .star { opacity: 1; }
  .clip-card .star:not(.on) { opacity: .0; }
  .card, .steps { margin-left: 0; }
  .msg.flash .body { padding-left: 2px; }
  .thinking { padding-left: 2px; }
  .step-pic { margin-left: 12px; }
  .magic-grid { grid-template-columns: 1fr 1fr; }
  .style-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* very narrow phones */
@media (max-width: 380px) {
  .hide-tiny { display: none !important; }
  .toolbar .tool { min-width: 54px; font-size: 10.5px; }
  .bin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* short landscape phones: the monitor beside the timeline would be too cramped; give the timeline its room */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 1000px) {
  .screen { height: 46dvh; }
}
