/* ============================================================
   כתוביות לעצלנים
   Warm black, cream, one hot orange — deliberately not the
   blue-on-slate that every AI tool ships with.
   ============================================================ */
:root{
  --ink:#0D0B0A; --surface:#17130F; --raised:#221C17; --high:#2E251E;
  --line:rgba(255,240,225,.09); --line2:rgba(255,240,225,.17);
  --cream:#F7EFE6; --dim:#A79684; --faint:#6E5F52;
  --hot:#FF5A1F; --hot-dim:rgba(255,90,31,.15);
  --sun:#FFC93C; --mint:#3ED598; --rose:#FF4D6D; --sky:#5AA9FF;
  --r:20px; --shadow:0 22px 54px rgba(0,0,0,.6);
  /* Measured from the real nav by syncChrome(); the sticky layers below key
     off it instead of guessing. The literal here is only the value used for
     the first frame, before JS runs. */
  --navH:66px;
}
/* dvh follows the browser chrome as it collapses; vh does not, which is why
   a "42vh" player was taller than 42% of what the user could actually see. */
@supports (height:100dvh){ :root{ --vh:1dvh } }
@supports not (height:100dvh){ :root{ --vh:1vh } }
*{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--ink);color:var(--cream);
  font:15px/1.65 "Rubik",-apple-system,"SF Hebrew",system-ui,sans-serif;
  -webkit-font-smoothing:antialiased;padding-bottom:env(safe-area-inset-bottom)}
h1,h2,h3,.display{font-family:"Secular One","Rubik",system-ui,sans-serif;font-weight:400}
button{font:inherit;color:inherit;border:0;background:none;cursor:pointer}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:#332921;border-radius:99px;border:3px solid var(--ink)}
svg{display:block}

/* ---------- chrome ---------- */
.nav{position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:12px;
  padding:calc(12px + env(safe-area-inset-top)) 24px 12px;
  background:rgba(13,11,10,.86);backdrop-filter:blur(20px);border-bottom:1px solid var(--line)}
.meChip{display:inline-flex;align-items:center;gap:7px;max-width:140px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.meChip img{width:20px;height:20px;border-radius:50%;flex:0 0 auto;display:block}
@media(max-width:960px){.meChip{max-width:92px;padding:7px 9px}
  .meChip img{width:18px;height:18px}}
.touchOnly{display:none}
body.touch .touchOnly{display:inline-flex}
.brand{display:flex;align-items:center;gap:10px;font-family:"Secular One",sans-serif;
  font-size:19px;letter-spacing:-.01em}
.brand .mark{height:26px;width:auto;display:block;flex:0 0 auto}
.nav .sp{margin-inline-start:auto;display:flex;align-items:center;gap:6px}
.ghost{padding:8px 14px;border-radius:12px;font-size:13.5px;color:var(--dim);
  border:1px solid transparent;transition:.15s;text-decoration:none;display:inline-block}
.ghost:hover{color:var(--cream);background:var(--raised);border-color:var(--line)}
.btn{padding:11px 20px;border-radius:14px;font-size:14px;font-weight:600;
  background:var(--raised);border:1px solid var(--line2);transition:.16s;
  display:inline-flex;align-items:center;gap:8px;justify-content:center}
.btn:hover:not(:disabled){border-color:var(--hot);transform:translateY(-1px)}
.btn:disabled{opacity:.38;cursor:default}
.btn.cta{background:linear-gradient(135deg,var(--hot),#FF8A3D);border:0;color:#1A0E06;
  font-weight:700;box-shadow:0 10px 26px rgba(255,90,31,.34)}
.btn.cta:hover:not(:disabled){box-shadow:0 14px 34px rgba(255,90,31,.46)}
.btn.sm{padding:7px 12px;font-size:12.5px;border-radius:11px;font-weight:500}
.btn.wide{width:100%}
.row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.wrap{max-width:1200px;margin:0 auto;padding:26px 24px 90px}

/* ---------- library ---------- */
.hero{text-align:center;padding:26px 0}
.hero h1{font-size:46px;margin:0 0 10px;letter-spacing:-.02em;line-height:1.1}
.hero h1 em{font-style:normal;color:var(--hot)}
.hero p{color:var(--dim);margin:0;font-size:16.5px}
.drop{border:2px dashed var(--line2);border-radius:26px;background:var(--surface);
  padding:40px 26px;text-align:center;cursor:pointer;transition:.2s}
.drop:hover,.drop.hot{border-color:var(--hot);background:#1D1611;box-shadow:0 0 0 5px var(--hot-dim)}
.drop .ic{width:60px;height:60px;margin:0 auto 14px;border-radius:20px;display:grid;
  place-items:center;background:linear-gradient(150deg,var(--hot),var(--sun));
  box-shadow:0 10px 26px rgba(255,90,31,.3)}
.drop b{display:block;font-family:"Secular One",sans-serif;font-size:21px;margin-bottom:5px}
.drop span{color:var(--dim);font-size:13.5px}
.tabs{display:flex;gap:4px;margin:28px 0 6px;background:var(--surface);
  border:1px solid var(--line);border-radius:16px;padding:4px;width:max-content}
.tab{padding:9px 22px;border-radius:12px;font-size:14px;font-weight:600;color:var(--dim);transition:.15s}
.tab:hover{color:var(--cream)}
.tab.on{background:var(--raised);color:var(--cream);box-shadow:0 2px 8px rgba(0,0,0,.5)}
.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:30px}
@media(max-width:720px){.steps{grid-template-columns:1fr}}
.step{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:20px}
.step .ic{width:38px;height:38px;border-radius:13px;display:grid;place-items:center;
  margin-bottom:12px;font-family:"Secular One",sans-serif;font-size:16px}
.step b{display:block;font-family:"Secular One",sans-serif;font-size:17px;margin-bottom:4px}
.step span{color:var(--dim);font-size:13px;line-height:1.7}
.reassure{text-align:center;color:var(--faint);font-size:13px;margin-top:20px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:16px;margin-top:24px}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  overflow:hidden;cursor:pointer;transition:.2s;position:relative}
.card:hover{border-color:var(--line2);transform:translateY(-3px);box-shadow:var(--shadow)}
.card .th{aspect-ratio:9/16;background:#100D0B center/cover no-repeat;position:relative}
.card .th::after{content:"";position:absolute;inset:0;
  background:linear-gradient(180deg,transparent 50%,rgba(0,0,0,.9))}
.card .meta{position:absolute;bottom:0;inset-inline:0;padding:12px 13px;z-index:2}
.card .meta b{display:block;font-size:13.5px;font-weight:600;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}
.card .meta span{font-size:11.5px;color:var(--dim)}
.pill{position:absolute;top:10px;inset-inline-start:10px;z-index:3;font-size:11px;font-weight:700;
  padding:5px 11px;border-radius:99px;backdrop-filter:blur(10px);background:rgba(0,0,0,.62);
  border:1px solid var(--line2)}
.pill.work{color:var(--sun)}.pill.ok{color:var(--mint)}.pill.bad{color:var(--rose)}
.pill .dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:currentColor;
  margin-inline-end:5px;animation:pulse 1.4s infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.25}}
.card .x{position:absolute;top:8px;inset-inline-end:8px;z-index:4;width:28px;height:28px;
  border-radius:10px;display:grid;place-items:center;background:rgba(0,0,0,.66);opacity:0;
  transition:.15s;font-size:13px;color:var(--dim)}
.card:hover .x{opacity:1}
.card .x:hover{background:var(--rose);color:#fff}
/* There is no hover on a touch screen, so this was the only control in the
   app with no way to reach it at all from a phone: deleting a project was
   simply impossible there. */
@media (hover:none){
  .card .x{opacity:1;width:36px;height:36px;background:rgba(0,0,0,.72);font-size:15px}
}

/* Once there are projects, the headline and the drop zone are 374px of
   things the returning user already knows — measured, they pushed the first
   card to y=558 on an 844px phone. Keep the door open, just smaller. */
body.hasProjects .hero{padding:10px 0}
body.hasProjects .hero h1{font-size:26px;margin-bottom:2px}
body.hasProjects .hero p{display:none}
body.hasProjects .drop{padding:16px 20px;display:flex;align-items:center;
  gap:12px;text-align:start;border-radius:18px}
body.hasProjects .drop .ic{width:38px;height:38px;border-radius:13px;margin:0;flex:0 0 auto}
body.hasProjects .drop .ic svg{width:19px;height:19px}
body.hasProjects .drop b{font-size:15px;margin:0}
body.hasProjects .drop span{font-size:12px}
body.hasProjects .tabs{margin-top:16px}
.folderbar{display:flex;gap:7px;flex-wrap:wrap;align-items:center;margin:20px 0 4px}
.fchip{padding:8px 15px;border-radius:99px;border:1px solid var(--line);background:var(--surface);
  font-size:13px;color:var(--dim);transition:.15s;display:flex;align-items:center;gap:7px}
.fchip:hover{border-color:var(--line2);color:var(--cream)}
.fchip.on{background:var(--hot-dim);border-color:var(--hot);color:var(--cream)}
.fchip .n{font-size:11px;opacity:.7;font-variant-numeric:tabular-nums}
.fchip.add{border-style:dashed}
.vcard .foot{display:flex;gap:6px;padding:10px 11px;border-top:1px solid var(--line)}
.vcard .foot button,.vcard .foot a{flex:1;text-align:center;padding:8px 0;border-radius:10px;
  font-size:12px;border:1px solid var(--line);color:var(--dim);text-decoration:none}
.vcard .foot button:hover,.vcard .foot a:hover{border-color:var(--hot);color:var(--cream)}

/* ---------- editor ---------- */
.editor{display:grid;grid-template-columns:1fr minmax(300px,380px);gap:26px;align-items:start}
/* max-width, not just min-width:0 — as a flex item this still resolved to
   its content's width and dragged the layout viewport wider than the phone. */
.panel{display:flex;flex-direction:column;gap:16px;min-width:0;max-width:100%;
  min-height:calc(100 * var(--vh) - 120px)}
.stageWrap{position:sticky;top:calc(var(--navH) + 12px);z-index:5;background:var(--ink);
  max-height:calc(100 * var(--vh) - var(--navH) - 28px);
  overflow-y:auto;overflow-x:hidden;padding-bottom:6px}
/* pan-y, not none. touch-action:none meant a finger dragged upward over the
   player did not scroll the page — it silently dragged the caption to the top
   of the frame instead. The picture is the top third of a phone screen, so
   that is where people naturally put their thumb to scroll. Placing a caption
   by touch is an explicit mode (.moving) that turns the gesture back off. */
.player{position:relative;border-radius:var(--r);overflow:hidden;background:#000;
  border:1px solid var(--line);box-shadow:var(--shadow);line-height:0;cursor:grab;
  touch-action:pan-y;user-select:none;-webkit-user-select:none}
.player.moving{touch-action:none;outline:2px solid var(--hot);outline-offset:-2px}
.player.dragging{cursor:grabbing}
.player video,.player img.poster{width:100%;display:block}
/* A one-shot glyph confirming a tap landed, since a paused frame looks the
   same whether or not the tap registered. */
.tapcue{position:absolute;inset:0;display:grid;place-items:center;z-index:7;
  font-size:34px;color:#fff;text-shadow:0 4px 20px rgba(0,0,0,.9);
  opacity:0;pointer-events:none;transition:opacity .18s}
.player.cue .tapcue{opacity:.92;transition:none}
/* In the controls, not on the picture: as a labelled chip over the frame it
   wrapped to two lines and covered a third of a portrait player. */
.moveChip{min-height:40px;padding:0 11px;flex:0 0 auto;border-radius:13px;
  display:flex;align-items:center;justify-content:center;gap:6px;font-size:12px;
  font-weight:600;line-height:1;
  background:var(--raised);border:1px solid var(--line);color:var(--dim)}
.moveChip svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.moveChip:hover{border-color:var(--hot);color:var(--cream)}
.moveChip.on{background:var(--hot);border-color:var(--hot);color:#1A0E06}
body.touch .moveChip{display:flex}
.savedTag{height:16px;margin-top:6px;font-size:11.5px;color:var(--mint);
  text-align:center;opacity:0;transition:opacity .2s}
.savedTag.on{opacity:1}
.overlay{position:absolute;inset:0;pointer-events:none;overflow:hidden;direction:ltr}
#stage{position:absolute;top:0;left:0;transform-origin:top left}
.guide{position:absolute;inset-inline:0;top:50%;border-top:2px dashed rgba(255,90,31,.9);
  opacity:0;transition:opacity .15s;z-index:5;pointer-events:none}
.player.dragging .guide{opacity:1}
/* One line, never two: a portrait player is 152px wide on an iPhone SE and
   a second line of this ran back over the first. */
.hintbar{position:absolute;inset-inline:0;bottom:9px;text-align:center;z-index:6;font-size:11.5px;
  color:rgba(255,255,255,.72);pointer-events:none;text-shadow:0 2px 8px rgba(0,0,0,.95);
  opacity:0;transition:.2s;padding:0 10px;white-space:nowrap;overflow:hidden;
  text-overflow:ellipsis}
.player:hover .hintbar{opacity:1}
/* The hint is for someone deciding what to do, not for someone watching. */
.player.playing .hintbar{opacity:0!important}
.touchHint{display:none}
body.touch .mouseHint{display:none}
body.touch .touchHint{display:inline}
.player.moving .hintbar .touchHint::after{content:" · גרור למקום"}
.transport{display:flex;align-items:center;gap:11px;margin-top:12px;flex-wrap:wrap}
.pp{width:42px;height:42px;border-radius:14px;background:var(--raised);border:1px solid var(--line);
  display:grid;place-items:center;flex:0 0 auto}
.pp:hover{border-color:var(--hot)}
.scrub{flex:1;height:6px;border-radius:99px;background:var(--high);position:relative;cursor:pointer}
.scrub i{position:absolute;inset-inline-start:0;top:0;bottom:0;border-radius:99px;
  background:var(--hot);width:0}
.tc{font:12px/1 ui-monospace,SFMono-Regular,monospace;color:var(--dim);direction:ltr;
  min-width:86px;text-align:center;font-variant-numeric:tabular-nums}
#exportBox{margin-top:16px}

/* ---------- sections ---------- */
/* Style is layer 1: always open, never a header you can collapse. */
.styleHero{margin-bottom:2px}
.styleHead{display:flex;align-items:baseline;gap:12px;margin-bottom:14px;flex-wrap:wrap}
.styleHead h2{font-family:"Secular One",sans-serif;font-weight:400;font-size:26px;
  letter-spacing:-.015em;margin:0}
.styleHead .note{margin:0}

/* min-width:0 all the way down the flex chain. A flex item defaults to
   min-width:auto, which floors it at its content's min-content width — so
   the horizontal scrollers below (.styles, .toolbar) pushed their full
   content width up through .cols and stretched the whole layout viewport
   instead of scrolling inside it. */
/* Deliberately a block, not a flex column: block children take the parent's
   width and let their content overflow into their own scroller, whereas
   flex items would each re-introduce the min-width:auto floor. */
.cols{min-width:0}
.cols > * + *{margin-top:16px}
.stylesCarousel{position:relative;min-width:0}
.styles{display:flex;gap:10px;min-width:0;max-width:100%;overflow-x:auto;
  padding:4px 2px 8px;scroll-snap-type:inline mandatory;scrollbar-width:none;
  -webkit-overflow-scrolling:touch}
.styles::-webkit-scrollbar{display:none}
.style{flex:0 0 calc(20% - 8px);scroll-snap-align:start}
.styleNav{position:absolute;z-index:6;top:50%;width:44px;height:44px;
  transform:translateY(-50%);display:grid;place-items:center;border-radius:50%;
  background:rgba(13,11,10,.92);border:1px solid var(--line2);
  box-shadow:0 8px 24px rgba(0,0,0,.5);color:var(--cream)}
.styleNav:hover{border-color:var(--hot);background:var(--surface)}
.styleNav svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;
  stroke-linecap:round;stroke-linejoin:round}
.styleNext{inset-inline-end:-8px}
.stylePrev{inset-inline-start:-8px}
.stylesCarousel::before,.stylesCarousel::after{content:"";position:absolute;z-index:5;
  top:0;bottom:0;width:38px;pointer-events:none;opacity:0;transition:opacity .15s}
.stylesCarousel::before{inset-inline-start:0;background:linear-gradient(to left,var(--ink),transparent)}
.stylesCarousel::after{inset-inline-end:0;background:linear-gradient(to right,var(--ink),transparent)}
.stylesCarousel.hasBack::before,.stylesCarousel.hasMore::after{opacity:1}
.style{position:relative;border-radius:16px;overflow:hidden;background:var(--raised);
  cursor:pointer;text-align:center;transition:.15s}
.style:hover{border-color:var(--line2)}
/* The frame is a plain <img> from the server. It replaced a <canvas> fed by a
   hidden <video>, which Safari refuses to decode at all — on an iPhone every
   card was a black square, and the QA never caught it because headless
   Chrome happily decodes one. */
.style .prev{position:relative;overflow:hidden;background:#100D0B}
.style .prev img.shot{width:100%;height:100%;object-fit:cover;display:block}
.style .mini{position:absolute;inset:0;direction:ltr;overflow:hidden}
.style .mini > div{position:absolute;top:0;left:0;transform-origin:top left}
.loadingCard{display:flex;align-items:center;gap:10px;justify-content:center;
  padding:44px 20px;color:var(--faint);font-size:13.5px}
.style .cap{padding:9px 6px 10px}
.style .cap b{display:block;font-size:13px;font-weight:700}
.style .cap span{display:block;font-size:11px;color:var(--dim);margin-top:2px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.style .rec{position:absolute;top:8px;inset-inline-end:8px;z-index:3;background:var(--hot);
  color:#1A0E06;font-size:9.5px;font-weight:800;padding:3px 7px;border-radius:99px}
.style .tick{position:absolute;top:8px;inset-inline-start:8px;z-index:3;width:20px;height:20px;
  border-radius:50%;background:var(--hot);color:#1A0E06;display:grid;place-items:center;
  font-size:12px;font-weight:800}

/* Layer 2: five tools, one panel. Opening one closes the last, so the
   column never grows the way six stacked accordions did. */
.toolbar{display:flex;overflow-x:auto;background:var(--surface);border:1px solid var(--line);
  border-radius:18px;scrollbar-width:thin;min-width:0;max-width:100%}
.tool{position:relative;padding:13px 8px;text-align:center;flex:1 0 104px;white-space:nowrap;
  transition:.15s;border-inline-start:1px solid var(--line)}
.tool:first-child{border-inline-start:0}
.tool:hover{background:rgba(255,255,255,.03)}
.tool .tt{font-size:14px;font-weight:600}
.tool .sum{font-size:11px;color:var(--dim);margin-top:3px;overflow:hidden;
  text-overflow:ellipsis;max-width:100%}
.tool.on .tt{color:var(--cream)}
.tool.on::after{content:"";position:absolute;inset-inline:0;bottom:0;height:2px;background:var(--hot)}
.toolPanel{background:var(--surface);border:1px solid var(--line);border-radius:18px;
  padding:16px 18px}
.toolBody[hidden]{display:none}

.dotpulse{display:inline-block;width:9px;height:9px;border-radius:50%;background:var(--sun);
  animation:pulse 1.4s infinite;flex:0 0 auto}

/* Layer 3: status and export, pinned to the bottom of the column. */
/* Content scrolls underneath, so it fades out rather than being chopped
   off mid-row against a hard edge. */
.pinned{position:sticky;bottom:0;z-index:12;margin-top:auto;
  padding:18px 0 calc(4px + env(safe-area-inset-bottom));
  background:linear-gradient(180deg,transparent,var(--ink) 20px)}
#statusBar:not(:empty){margin-bottom:10px}
.ic-hot{background:var(--hot-dim);color:var(--hot)}
.ic-sun{background:rgba(255,201,60,.15);color:var(--sun)}
.ic-mint{background:rgba(62,213,152,.14);color:var(--mint)}
.ic-rose{background:rgba(255,77,109,.14);color:var(--rose)}
.ic-sky{background:rgba(90,169,255,.14);color:var(--sky)}
.ctrl{padding:12px 0;border-bottom:1px solid rgba(255,255,255,.05)}
.ctrl:last-child{border:0}
.ctrl > .lbl{display:flex;justify-content:space-between;font-size:13px;color:var(--dim);margin-bottom:9px}
.ctrl > .lbl b{color:var(--cream);font-variant-numeric:tabular-nums;font-weight:600}
input[type=range]{width:100%;-webkit-appearance:none;appearance:none;height:28px;
  background:transparent;display:block}
input[type=range]::-webkit-slider-runnable-track{height:6px;border-radius:99px;background:var(--high)}
input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:24px;height:24px;border-radius:50%;
  background:var(--cream);margin-top:-9px;box-shadow:0 2px 10px rgba(0,0,0,.6);cursor:grab}
select,input[type=text],input[type=number]{background:var(--raised);border:1px solid var(--line);
  color:var(--cream);border-radius:12px;padding:10px 12px;font:inherit;font-size:15px;width:100%}
select:focus,input:focus{outline:none;border-color:var(--hot)}
.swatches{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.sw{display:flex;flex-direction:column;align-items:center;gap:5px;cursor:pointer}
.sw input[type=color]{width:46px;height:36px;border:1px solid var(--line2);border-radius:11px;
  background:none;padding:2px;cursor:pointer}
.sw b{font-size:10.5px;font-weight:500;color:var(--faint)}
.seg{display:flex;gap:5px;background:var(--raised);border:1px solid var(--line);
  border-radius:13px;padding:4px}
.seg button{flex:1;padding:9px 6px;border-radius:10px;font-size:12.5px;color:var(--dim)}
.seg button.on{background:var(--high);color:var(--cream);font-weight:600}

/* ---------- cutting ---------- */
/* pan-y, not none: selecting a range here is a horizontal gesture, so the
   browser can keep the vertical one. With touch-action:none a finger that
   landed on this 56px band could not scroll the page at all. */
.strip{position:relative;height:56px;border-radius:14px;overflow:hidden;border:1px solid var(--line);
  background:#100D0B;cursor:crosshair;touch-action:pan-y;display:flex}
.strip .fr{flex:1;background-size:cover;background-position:center;opacity:.8;min-width:0}
.strip .cut{position:absolute;top:0;bottom:0;background:rgba(255,77,109,.45);
  border-inline:2px solid var(--rose);cursor:pointer}
.strip .cut:hover{background:rgba(255,77,109,.62)}
.strip .sel{position:absolute;top:0;bottom:0;background:rgba(255,90,31,.34);
  border-inline:2px solid var(--hot)}
.strip .ph{position:absolute;top:0;bottom:0;width:2px;background:#fff;
  box-shadow:0 0 8px rgba(0,0,0,.9);pointer-events:none}
.striprow{display:flex;align-items:center;gap:9px;margin-top:9px}
.striprow .note{flex:1}

/* ---------- transcript ---------- */
.rows{max-height:min(56vh,620px);overflow:auto;margin:0 -11px;padding:0 5px}
.rw{display:flex;gap:10px;padding:10px 11px;border-radius:14px;transition:.12s;align-items:flex-start}
.rw:hover{background:rgba(255,255,255,.03)}
.rw.on{background:var(--hot-dim);box-shadow:inset 3px 0 0 var(--hot)}
.rw.gone{opacity:.34}
.rw.gone .ws{text-decoration:line-through;text-decoration-color:var(--rose);
  text-decoration-thickness:2px}
.rw .t{font:11.5px/2 ui-monospace,monospace;color:var(--faint);direction:ltr;min-width:42px;
  cursor:pointer;font-variant-numeric:tabular-nums;flex:0 0 auto}
.rw .t:hover{color:var(--hot)}
.ws{display:flex;flex-wrap:wrap;gap:4px;align-items:center;flex:1;min-width:0}
.wd{padding:3px 8px;border-radius:9px;font-size:15px;cursor:pointer;border:1px solid transparent;
  transition:.1s;white-space:pre}
.wd:hover{background:rgba(255,255,255,.08)}
.wd.low{box-shadow:inset 0 -2px 0 var(--sun)}
/* These follow the caption palette, set by paintTranscriptColors(). The list
   is a preview of the video, so a highlight colour chosen in Design has to
   show up here too — it used to stay the app's own rose for ever. */
.wd.k-punch{background:var(--capPunchBg,var(--rose));color:var(--capPunchText,#fff);font-weight:600}
.wd.k-strike{background:rgba(255,77,109,.16);text-decoration:line-through;
  text-decoration-color:var(--rose);text-decoration-thickness:2px}
.wd.k-brand{background:rgba(255,77,109,.14);color:var(--capBrand,#FF9BB0);font-weight:600}
.rw.on .ws .wd.k-word{color:inherit}
.wd.k-emoji{font-size:18px}
.rwact{display:flex;gap:3px;opacity:0;transition:.12s;flex:0 0 auto}
.rw:hover .rwact,.rw.on .rwact,.rw.gone .rwact{opacity:1}
.ic-btn{width:30px;height:30px;border-radius:10px;display:grid;place-items:center;
  color:var(--faint);border:1px solid transparent}
.ic-btn:hover{background:var(--raised);border-color:var(--line);color:var(--cream)}
.ic-btn.danger:hover{background:rgba(255,77,109,.16);border-color:var(--rose);color:var(--rose)}

/* ---------- word sheet ---------- */
.pop{position:fixed;z-index:160;background:var(--raised);border:1px solid var(--line2);
  border-radius:18px;padding:13px;box-shadow:var(--shadow);width:min(340px,92vw);
  transform:translate(-50%,-100%) translateY(-10px)}
.pop input{margin-bottom:10px;text-align:center;font-size:16px}
.pop .acts{display:flex;gap:6px;flex-wrap:wrap}
.pop button{padding:10px 13px;border-radius:11px;font-size:13px;white-space:nowrap;
  color:var(--dim);border:1px solid var(--line);min-height:40px}
.pop button:hover{background:var(--high);color:var(--cream)}
.pop button.on{background:var(--rose);color:#fff;border-color:var(--rose)}
.pop button.sug{border-color:var(--hot);background:var(--hot-dim)}
.pop .grow{flex:1}
.popBack{position:fixed;inset:0;z-index:159;background:rgba(8,6,5,.55)}
@media(max-width:720px){
  /* --kb is the keyboard's height, measured from visualViewport in
     studio.js. Without it the sheet sits at bottom:0 — underneath the keys
     on iOS, so you were typing at a field you could not see. */
  .pop{left:0!important;right:0;bottom:var(--kb,0px);top:auto!important;width:100%;
    transform:none;border-radius:24px 24px 0 0;
    padding:16px 16px calc(16px + env(safe-area-inset-bottom));
    animation:sheet .22s cubic-bezier(.22,1,.36,1);
    transition:bottom .18s;max-height:70vh;overflow:auto}
  body.kb .pop{padding-bottom:16px}
  .sheet{bottom:var(--kb,0px);transition:bottom .18s}
  @keyframes sheet{from{transform:translateY(100%)}}
}

/* ---------- the offer, and what is left of it ---------- */
.signedOutOnly{display:none}
body.signedOut .signedOutOnly{display:flex}
body.signedOut .hasProjectsOnly{display:none}
.pitch{flex-direction:column;align-items:center;gap:8px;margin-top:18px;
  color:var(--dim);font-size:13.5px;text-align:center}
.freeTag{display:inline-flex;align-items:center;gap:7px;padding:8px 16px;
  border-radius:99px;font-size:13.5px;font-weight:700;color:#1A0E06;
  background:linear-gradient(135deg,var(--hot),var(--sun));
  box-shadow:0 8px 24px rgba(255,90,31,.32)}
.allowance{margin:14px auto 0;width:max-content;padding:7px 14px;border-radius:99px;
  font-size:12.5px;color:var(--dim);background:var(--surface);
  border:1px solid var(--line)}
.allowance.low{color:var(--sun);border-color:rgba(255,201,60,.4)}
.allowance.out{color:#FFB3C0;border-color:rgba(255,77,109,.4)}

/* ---------- the gate ----------
   Shown after a video has been dropped, never before: asking who somebody is
   before they have seen what the thing does is the fastest way to lose them. */
.sheet.gate{text-align:center}
.sheet.gate .gateArt{margin:2px auto 14px}
.sheet.gate .gateArt img{height:46px;width:auto;display:block;margin:0 auto}
.sheet.gate b{font-size:19px;margin-bottom:8px}
.sheet.gate .note{margin-bottom:16px;font-size:13.5px}
.sheet.gate .note strong{color:var(--sun);font-weight:700}
.gateWhy{display:flex;flex-direction:column;gap:6px;margin-bottom:18px;
  color:var(--faint);font-size:12.5px;text-align:start;
  padding:12px 14px;border-radius:14px;background:var(--surface);
  border:1px solid var(--line)}
.btn.google{background:#fff;color:#1f1f1f;border:0;font-weight:600;min-height:52px}
.btn.google:hover:not(:disabled){background:#f2f2f2;transform:translateY(-1px)}
.ghost.wide{width:100%;text-align:center}
.gateErr{background:rgba(255,77,109,.1);border:1px solid rgba(255,77,109,.32);
  color:#FFB3C0;border-radius:12px;padding:10px 13px;font-size:12.5px;
  margin-top:12px;text-align:start;line-height:1.6}

/* ---------- toast + dialogs ----------
   These replace prompt/confirm/alert, which are unstyled OS sheets on a
   phone and are suppressed outright inside some in-app browsers — the
   folder buttons simply did nothing there, with no way to tell why. */
#toast{position:fixed;z-index:180;inset-inline:0;bottom:calc(22px + env(safe-area-inset-bottom));
  margin-inline:auto;width:max-content;max-width:min(420px,calc(100vw - 32px));
  background:var(--high);border:1px solid var(--line2);color:var(--cream);
  border-radius:14px;padding:12px 18px;font-size:13.5px;text-align:center;
  box-shadow:var(--shadow);opacity:0;transform:translateY(14px);
  transition:.22s cubic-bezier(.22,1,.36,1);pointer-events:none}
#toast.up{opacity:1;transform:none}
#toast.bad{border-color:rgba(255,77,109,.5);color:#FFB3C0}

.sheetBack{position:fixed;inset:0;z-index:190;background:rgba(8,6,5,.62);
  backdrop-filter:blur(3px)}
.sheet{position:fixed;z-index:191;left:50%;top:50%;transform:translate(-50%,-50%);
  width:min(400px,calc(100vw - 32px));background:var(--raised);
  border:1px solid var(--line2);border-radius:20px;padding:20px;box-shadow:var(--shadow)}
.sheet b{display:block;font-family:"Secular One",sans-serif;font-size:18px;margin-bottom:6px}
.sheet .note{margin-bottom:12px}
.sheet input{margin:6px 0 14px}
.sheetList{display:flex;flex-direction:column;gap:6px;margin:4px 0 12px;
  max-height:44vh;overflow:auto}
.sheetItem{text-align:start;padding:12px 14px;border-radius:12px;border:1px solid var(--line);
  background:var(--surface);font-size:14px;min-height:46px}
.sheetItem:hover{border-color:var(--hot);background:var(--high)}
.sheetAct{display:flex;gap:8px}
.sheetAct .btn{flex:1}
.btn.danger{background:var(--rose);border:0;color:#fff;font-weight:700}
@media(max-width:720px){
  .sheet{left:0;top:auto;bottom:0;transform:none;width:100%;
    border-radius:24px 24px 0 0;padding:18px 18px calc(18px + env(safe-area-inset-bottom));
    animation:sheet .22s cubic-bezier(.22,1,.36,1)}
}

/* ---------- hooks ---------- */
.hooklist{display:flex;flex-direction:column;gap:8px;margin-bottom:10px}
.hookrow{display:flex;align-items:center;gap:10px;padding:11px 12px;border-radius:14px;
  background:var(--raised);border:1px solid var(--line);cursor:pointer}
.hookrow.on{border-color:var(--hot);background:var(--hot-dim)}
.hookrow .tx{flex:1;font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap}
.hookrow .tm{font:11.5px/1 ui-monospace,monospace;color:var(--faint);direction:ltr}
.hookEd{margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip{width:30px;height:30px;border-radius:50%;border:2px solid transparent;cursor:pointer;
  padding:0;min-height:0}
.chip.on{border-color:var(--cream);transform:scale(1.12)}

/* ---------- one player, two views ---------- */
.viewSwitch{display:flex;gap:4px;margin-top:10px;background:var(--surface);
  border:1px solid var(--line);border-radius:13px;padding:3px;align-self:center}
.viewSwitch button{padding:7px 18px;border-radius:10px;font-size:13px;
  font-weight:600;color:var(--dim);transition:.15s}
.viewSwitch button.on{background:var(--raised);color:var(--cream);
  box-shadow:0 2px 8px rgba(0,0,0,.5)}
.player.isResult{outline:2px solid var(--mint);outline-offset:-2px}

/* ---------- what "improve" actually does ---------- */
/* Written next to the switch that turns it on, because the old version was a
   button called "improve and download" that changed your captions and your
   sound without saying so until after it had done it. */
.prep{background:var(--surface);border:1px solid var(--line);border-radius:18px;
  padding:14px 16px;margin-bottom:12px}
.prepHead{font-family:"Secular One",sans-serif;font-size:14px;color:var(--dim);
  margin-bottom:10px}
.opt + .opt{margin-top:14px;padding-top:14px;border-top:1px solid rgba(255,255,255,.05)}
.optTop{display:flex;align-items:center;gap:10px;margin-bottom:5px;flex-wrap:wrap}
.optTop b{font-size:14px;font-weight:600}
.optTop .seg{margin-inline-start:auto}
.seg.sm button{padding:6px 10px;font-size:11.5px}
.sw2{margin-inline-start:auto;position:relative;width:46px;height:27px;flex:0 0 auto;cursor:pointer}
.sw2 input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}
.sw2 i{position:absolute;inset:0;border-radius:99px;background:var(--high);
  border:1px solid var(--line2);transition:.18s}
.sw2 i::after{content:"";position:absolute;top:3px;inset-inline-start:3px;width:19px;height:19px;
  border-radius:50%;background:var(--cream);transition:.18s}
.sw2 input:checked + i{background:var(--hot);border-color:var(--hot)}
/* inset-inline flips with the writing direction on its own, so the knob
   travels from the start edge to the end edge in both RTL and LTR. */
.sw2 input:checked + i::after{inset-inline-start:auto;inset-inline-end:3px}
.sw2 input:focus-visible + i{outline:2px solid var(--hot);outline-offset:2px}

/* ---------- saved looks + recent colours ---------- */
.recents{display:flex;align-items:center;gap:7px;margin-top:10px;flex-wrap:wrap}
.recents .note{margin-inline-end:2px}
.looks{display:flex;gap:7px;flex-wrap:wrap}
.look{display:inline-flex;align-items:center;gap:7px;padding:8px 12px;border-radius:99px;
  border:1px solid var(--line);background:var(--raised);font-size:12.5px;
  color:var(--dim);transition:.15s;min-height:38px}
.look:hover{border-color:var(--hot);color:var(--cream)}
.look i{width:11px;height:11px;border-radius:50%;flex:0 0 auto;display:block}
.look .rm{opacity:.45;font-size:11px;margin-inline-start:2px}
.look .rm:hover{opacity:1;color:var(--rose)}
.look.add{border-style:dashed}

/* ---------- misc ---------- */
.note{color:var(--faint);font-size:12.5px;line-height:1.85}
.banner{border-radius:15px;padding:13px 15px;font-size:13.5px;line-height:1.7}
.banner.bad{background:rgba(255,77,109,.1);border:1px solid rgba(255,77,109,.32);color:#FFB3C0}
.banner.ok{background:rgba(62,213,152,.09);border:1px solid rgba(62,213,152,.3);color:#A6EBCC}
.okdot{width:26px;height:26px;border-radius:50%;background:var(--mint);color:#08251A;
  display:grid;place-items:center;font-weight:800;flex:0 0 auto}
.banner.ok b{font-family:"Secular One",sans-serif;font-size:17px}
.banner.info{background:var(--raised);border:1px solid var(--line);color:var(--dim)}
.bar{height:6px;border-radius:99px;background:var(--high);overflow:hidden}
.bar>i{display:block;height:100%;width:0;border-radius:99px;
  background:linear-gradient(90deg,var(--hot),var(--sun));transition:width .35s}
/* Before the first measurement there is no percentage to show, and an empty
   bar looks like nothing is happening. */
.bar.idle{background:linear-gradient(90deg,var(--high) 40%,var(--hot) 50%,var(--high) 60%)
  var(--high);background-size:250% 100%;animation:sweep 1.6s linear infinite}
@keyframes sweep{from{background-position:150% 0}to{background-position:-50% 0}}
.eta{white-space:nowrap;font-variant-numeric:tabular-nums}
.spin{display:inline-block;width:13px;height:13px;border:2px solid var(--line2);
  border-top-color:var(--hot);border-radius:50%;animation:sp .7s linear infinite;
  vertical-align:-2px;margin-inline-end:7px}
@keyframes sp{to{transform:rotate(360deg)}}
.slide{animation:slide .35s cubic-bezier(.22,1,.36,1)}
@keyframes slide{from{opacity:0;transform:translateY(9px)}}
.empty{color:var(--faint);text-align:center;padding:42px 20px;font-size:13.5px}
kbd{background:var(--raised);border:1px solid var(--line);border-radius:6px;padding:1px 6px;
  font:11px/1.7 ui-monospace,monospace}
#offline{position:fixed;inset:0;z-index:200;display:grid;place-content:center;text-align:center;
  gap:6px;background:rgba(13,11,10,.95);backdrop-filter:blur(8px)}
#offline b{font-family:"Secular One",sans-serif;font-size:22px}
#offline div{color:var(--dim);font-size:13.5px}
#offline code{background:var(--raised);border:1px solid var(--line);border-radius:7px;
  padding:3px 9px;direction:ltr;display:inline-block;font-size:12.5px}

/* ---------- tour ---------- */
#tourMask{position:fixed;inset:0;z-index:150}
#tourHole{position:absolute;border-radius:18px;box-shadow:0 0 0 9999px rgba(8,6,5,.8);
  pointer-events:none;outline:2px solid var(--hot);outline-offset:4px}
#tourCard{position:fixed;z-index:151;width:min(340px,calc(100vw - 28px));background:var(--raised);
  border:1px solid var(--line2);border-radius:20px;padding:17px 19px;box-shadow:var(--shadow)}
#tourCard b{display:block;font-family:"Secular One",sans-serif;font-size:17px;margin-bottom:6px}
#tourCard p{margin:0;color:var(--dim);font-size:13.5px;line-height:1.75}
#tourCard .foot{display:flex;align-items:center;gap:9px;margin-top:15px}
#tourCard .dots{display:flex;gap:5px;margin-inline-end:auto}
#tourCard .dots i{width:6px;height:6px;border-radius:50%;background:var(--line2)}
#tourCard .dots i.on{background:var(--hot);width:17px;border-radius:99px}

/* ---------- phone: last, so it wins ----------
   The vertical budget is the whole problem here. Measured on the old build:
   nav 88 + player 354 + transport 54 + pinned footer 206 = 702 of an iPhone
   14's 844px, leaving 142px to actually edit in — and 73px on an SE. Every
   number below is chosen against that budget, and qa/qa.js asserts the
   result stays above 30% of the screen. */
@media(max-width:960px){
  .editor{grid-template-columns:1fr;gap:14px;display:flex;flex-direction:column}
  /* Slimmer chrome: the brand does not need 88px of a phone. */
  /* One row, always. A second row here costs the editor 22px and pushes the
     sticky player out of step with the offset it is positioned against. */
  .nav{padding:calc(8px + env(safe-area-inset-top)) 12px 8px;gap:6px;flex-wrap:nowrap}
  .nav .sp{gap:3px;flex:0 0 auto}
  .brand{font-size:15px;min-width:0;overflow:hidden;text-overflow:ellipsis;
    white-space:nowrap}
  .brand .mark{height:21px}
  .ghost{padding:7px 9px;font-size:12.5px;white-space:nowrap}
  /* The avatar is enough to say whose account this is; the name is not
     worth a row of the screen. */
  .meChip{font-size:0;gap:0;padding:6px}
  .meChip img{width:22px;height:22px}
  #navLib{font-size:0;padding:7px 10px}
  #navLib::before{content:"←";font-size:15px}

  /* align-self/width, or the wrapper shrink-wraps to the player and takes
     the player with it to the inline edge instead of centring. */
  .stageWrap{order:0;position:sticky;top:var(--navH);z-index:20;max-height:none;
    overflow:visible;display:flex;flex-direction:column;align-items:center;
    align-self:stretch;width:100%;padding-top:8px}
  /* Drive the box off its aspect ratio, not off the media's intrinsic size:
     a 1080-wide video with width:auto lays out 1080 wide and drags the whole
     layout viewport out with it. fit() already publishes --ar.

     Size the WIDTH and let the ratio set the height. Fixing the height and
     capping the width instead over-constrained the box, so a 16:9 clip sat
     in a 9:16-tall frame with 67px of black above and below it. */
  .stageWrap{--phMax:min(30 * var(--vh),280px)}
  .player{width:min(100%,calc(var(--phMax) * var(--ar,.5625)));
    aspect-ratio:var(--ar,.5625);height:auto;max-height:var(--phMax);
    margin-inline:auto}
  .player video,.player img.poster{width:100%;height:100%;object-fit:contain}
  /* No hover on touch, so the one line that teaches the core gesture was
     invisible on exactly the devices that needed it most. */
  .hintbar{opacity:.85;font-size:10.5px;bottom:6px}
  .transport{align-self:stretch;margin-top:8px;gap:8px}
  .transport .scrub{height:8px}
  .savedTag{margin-top:2px}
  /* Only shown once a result exists, but when it is, it competes with the
     transcript for the same pixels. */
  .viewSwitch{margin-top:7px;padding:2px}
  .viewSwitch button{padding:6px 14px;font-size:12px}

  .panel{order:1;min-height:0}
  /* A pinned footer is worth about 90px of a phone, not 206. One action and
     one line of status stay; the second button and all the prose move up
     into the flow, where scrolling past them costs nothing. */
  .pinned{padding:10px 0 calc(4px + env(safe-area-inset-bottom))}
  .pinned .banner{padding:9px 12px;font-size:12.5px}
  .pinned .banner .note,.pinned .banner .row .note{display:none}
  /* A finished project's banner was 13px taller than a ready one's, which is
     enough to drop an iPhone below the editing-space floor. The tick and the
     display face are decoration; the switch above already says there is a
     result. */
  .pinned .okdot{display:none}
  .pinned .banner.ok b{font-family:inherit;font-size:13.5px}
  .pinned > #exportBox > .note{display:none}
  .pinned .btn{padding:13px 16px}
  .pinned .btn.cta{font-size:16px}

  .style{flex:0 0 40vw;max-width:160px;scroll-snap-align:start}
  .styleNav{width:42px;height:42px}
  .styleHero{margin-bottom:0}
  .styleHead{margin-bottom:10px}
  .styleHead h2{font-size:19px}
  .styleHead .note{display:none}

  /* Five tools, five equal columns, no scroller. It used to be
     flex:1 0 104px — 480px of tabs in a 345px viewport, so "חיתוך" and
     "הוק פותח" were off-screen with nothing to say they existed. */
  .toolbar{overflow:visible}
  .tool{flex:1 1 0;min-width:0;padding:10px 3px}
  .tool .tt{font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .tool .sum{display:none}
  .toolPanel{padding:14px 13px}

  .wrap{padding:14px 14px 40px}
  .hero h1{font-size:30px}
  .pitch{margin-top:14px;font-size:12.5px}
  .freeTag{font-size:12.5px;padding:7px 14px}
  /* Two columns. At one column a 9:16 card is 644px tall, so a phone showed
     exactly ONE project per screen and ten projects meant ten screens of
     scrolling. 4/5 keeps the vertical feel and fits three rows. */
  .grid{grid-template-columns:repeat(2,1fr);gap:10px;margin-top:16px}
  .card .th{aspect-ratio:4/5}
  .card .meta{padding:9px 10px}
  .card .meta b{font-size:12.5px}
  .card .meta span{font-size:10.5px}
  .pill{font-size:10px;padding:4px 9px;top:7px;inset-inline-start:7px}
  body.hasProjects .drop span{display:none}
  body.hasProjects .drop b{font-size:14.5px}
  .tabs{margin:14px 0 0}
  .tab{padding:8px 18px;font-size:13.5px}
  .rows{max-height:none}
  .ic-btn{width:38px;height:38px}
  .pp{width:46px;height:46px;border-radius:13px}
  /* track is 6px and the thumb 28px, so the offset is -(28-6)/2 = -11.
     It said -19, which floated the thumb 8px above the track it controls. */
  input[type=range]{height:44px}
  input[type=range]::-webkit-slider-thumb{margin-top:-11px;width:28px;height:28px}
  .wd{font-size:16px;padding:6px 10px}
  .rwact{opacity:1}
  .ctrl{padding:10px 0}
}

/* An iPhone SE is 667px tall, so the same proportions that leave an iPhone 14
   comfortable leave it cramped. Below 720px the player and the footer both
   give up a little more, which is the right trade: on the small screen the
   list of words matters more than the size of the preview. */
@media(max-width:960px) and (max-height:720px){
  .stageWrap{--phMax:min(24 * var(--vh),215px)}
  .transport{margin-top:6px}
  .savedTag{display:none}
  .pinned{padding:8px 0 calc(2px + env(safe-area-inset-bottom))}
  .pinned .banner{padding:7px 11px;font-size:12px;border-radius:11px}
  #statusBar:not(:empty){margin-bottom:7px}
  .pinned .btn{padding:11px 14px}
  .styleHead{margin-bottom:8px}
}

/* Short screens: the footer gives up its prose first, and on a landscape
   phone — where the old build produced a NEGATIVE amount of usable space —
   the layout goes back to two columns, which is what a wide short screen
   actually wants. */
@media(max-width:960px) and (max-height:560px){
  .pinned{position:static;background:none;padding-top:8px}
  .stageWrap{position:static}
}
@media(max-width:960px) and (max-height:560px) and (orientation:landscape){
  .editor{flex-direction:row;align-items:flex-start;gap:14px}
  .stageWrap{order:1;flex:0 0 min(38vw,320px);width:auto;align-self:flex-start;
    position:sticky;top:var(--navH)}
  /* Only the budget changes here; the box still takes its shape from the
     video through the base rule above. */
  .stageWrap{--phMax:calc(100 * var(--vh) - var(--navH) - 92px)}
  .panel{order:0;flex:1 1 auto;min-width:0}
  .styles{gap:8px}
  .style{flex:0 0 132px}
  .nav{padding:calc(5px + env(safe-area-inset-top)) 14px 5px}
}

/* ---------- accessibility ---------- */
/* Keyboard focus had no visible target at all: every control here is a
   bare <button> or a div, and the UA outline is suppressed by the resets
   above. :focus-visible keeps it off for mouse clicks. */
:focus-visible{outline:2px solid var(--hot);outline-offset:2px;border-radius:4px}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;
    transition-duration:.01ms!important;scroll-behavior:auto!important}
  .pill .dot{animation:none;opacity:1}
}
