/* TrailCut v2.8-S1 — the SIMPLE editor, Phase 1: iPhone held sideways only (body.tcSimple).
   Computers and portrait phones never get body.tcSimple, so nothing here can change them. */
.sStrip,.sTool{display:none}
body.tcSimple{--sOr:var(--sun1,#FF8533);--sPu:#2B1650;--sPu2:#3D2170}

/* ---- layout: top bar · large preview (+ one tool column while a tool is open) · filmstrip · bottom bar ---- */
body.tcSimple.tcLand .ed{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto minmax(0,1fr) auto auto!important;
  grid-template-areas:"top" "center" "strip" "bar"!important;column-gap:10px!important;row-gap:4px!important;padding-bottom:0!important}
body.tcSimple.tcLand.mDock .ed,body.tcSimple.tcLand.sToolOpen .ed{grid-template-columns:minmax(0,1fr) min(42vw,380px)!important;
  grid-template-areas:"top top" "center dock" "strip strip" "bar bar"!important}
body.tcSimple .ed>#edTl,body.tcSimple .ed>.edTabs,body.tcSimple .edCenter>.vTabs,body.tcSimple #mvStrip,body.tcSimple .fStep{display:none!important}
body.tcSimple .ed>.edTop{min-height:36px}
body.tcSimple .ed>.edTop .edName input{font-size:15px;padding:4px 8px}
body.tcSimple .ed>.edTop #edExport{min-height:36px}
body.tcSimple .ed>.edCenter{padding-bottom:0!important;min-height:0}
body.tcSimple .stage .ctrl{min-height:36px}
body.tcSimple .stage .ctrl .playB{width:40px;height:40px}
body.tcSimple .pvWrap{border-radius:10px}
/* tool panels sit in the column beside the preview, never over it */
body.tcSimple .ed>#edInsp,body.tcSimple .ed>#edPanel,body.tcSimple .ed>#sTool{grid-area:dock;max-height:none!important;min-height:0;overflow:auto;overscroll-behavior:contain}
body.tcSimple.sToolOpen .ed>#edInsp,body.tcSimple.sToolOpen .ed>#edPanel{display:none!important}
body.tcSimple .mBar:not([hidden]){margin:0 calc(-1 * max(8px,env(safe-area-inset-left,0px)));border-radius:0;border:0;border-top:1px solid var(--line2);
  padding-left:max(10px,env(safe-area-inset-left,0px));padding-right:max(10px,env(safe-area-inset-right,0px))}
body.tcSimple .mB{min-height:46px;font-size:11.5px}

/* ---- the filmstrip with the fixed orange playhead ---- */
body.tcSimple .sStrip{grid-area:strip;display:block;position:relative;margin:0 calc(-1 * max(8px,env(safe-area-inset-left,0px)));
  background:linear-gradient(180deg,var(--sPu) 0%,var(--bg2,#06111F) 100%);border-top:1px solid rgba(255,255,255,.06)}
.sScroll{overflow-x:auto;overflow-y:hidden;touch-action:pan-x;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.sScroll::-webkit-scrollbar{display:none}
.sIn{position:relative;height:62px}
.sStrip.sLanes .sIn{height:90px}
.sC{position:absolute;top:5px;height:50px;border-radius:9px;background:#1b1b24;box-shadow:inset 0 0 0 1px rgba(255,255,255,.18);cursor:pointer;
  -webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;outline:none}
.sC .sTh{position:absolute;inset:0;display:flex;overflow:hidden;border-radius:9px}
.sC .sTh img{flex:1 1 0;min-width:0;height:100%;object-fit:cover;pointer-events:none;border-right:1px solid rgba(0,0,0,.35)}
.sC.miss{background:repeating-linear-gradient(45deg,#2a1b1b 0 8px,#3a2222 8px 16px)}
.sC.sel{box-shadow:0 0 0 3px var(--sOr),0 0 14px rgba(var(--accRGB),.45);z-index:2}
.sC:focus-visible{box-shadow:0 0 0 3px var(--blue2)}
/* fades drawn as a shading at the clip's ends */
.sFi,.sFo{position:absolute;top:0;bottom:0;pointer-events:none;border-radius:9px}
.sFi{left:0;background:linear-gradient(90deg,rgba(0,0,0,.85),rgba(0,0,0,0))}
.sFo{right:0;background:linear-gradient(270deg,rgba(0,0,0,.85),rgba(0,0,0,0))}
/* trim handles: 22 px visible, 44 px to the finger */
.sHd{position:absolute;top:-3px;bottom:-3px;width:22px;background:var(--sOr);touch-action:none;z-index:3;display:flex;align-items:center;justify-content:center}
.sHd.l{left:-3px;border-radius:9px 3px 3px 9px}
.sHd.r{right:-3px;border-radius:3px 9px 9px 3px}
.sHd::after{content:"";width:3px;height:22px;border-radius:2px;background:rgba(0,0,0,.55)}
.sHd::before{content:"";position:absolute;top:-8px;bottom:-8px;left:-11px;right:-11px}
.sHd.on{background:#FFB37A}
.sC.trim{z-index:4}
/* thin music and text lanes */
.sMu,.sTx{position:absolute;height:13px;border-radius:4px;font:700 9.5px/13px var(--body,Arial);padding:0 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;box-sizing:border-box;
  -webkit-tap-highlight-color:transparent}
.sMu{top:59px;background:rgba(60,207,110,.32);color:#c9f7da;box-shadow:inset 0 0 0 1px rgba(60,207,110,.6)}
.sTx{top:74px;background:rgba(98,176,255,.30);color:#dcecff;box-shadow:inset 0 0 0 1px rgba(98,176,255,.6);z-index:1}
.sMu.sel,.sTx.sel{box-shadow:inset 0 0 0 2px var(--sOr)}
.sMu span,.sTx span{pointer-events:none}
/* the fixed playhead: the strip moves, this line doesn't */
.sPH{position:absolute;left:50%;top:0;bottom:0;width:3px;margin-left:-1.5px;background:var(--sOr);border-radius:2px;pointer-events:none;z-index:5;box-shadow:0 0 0 1px rgba(0,0,0,.35),0 0 10px rgba(var(--accRGB),.6)}
.sPH::before{content:"";position:absolute;top:0;left:50%;transform:translateX(-50%);border:7px solid transparent;border-top:9px solid var(--sOr)}
/* + add */
.sAdd{position:absolute;right:max(8px,env(safe-area-inset-right,0px));top:50%;transform:translateY(-50%);z-index:6;width:46px;height:46px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;gap:6px;background:var(--grad,var(--sOr));color:#fff;box-shadow:0 6px 16px -6px #000;cursor:pointer;overflow:hidden}
.sAdd b{font-size:30px;line-height:1;font-weight:700;margin-top:-3px}
.sAdd .sAddT{display:none;font-weight:800;font-size:15px}
.sAdd input[type=file]{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}
.sStrip.sEmpty .sAdd{right:50%;transform:translate(50%,-50%);width:auto;height:48px;border-radius:24px;padding:0 20px}
.sStrip.sEmpty .sAdd .sAddT{display:inline}
.sStrip.sEmpty .sPH{display:none}

/* ---- the Fade panel ---- */
body.tcSimple .sTool:not([hidden]){display:flex;flex-direction:column;gap:4px;padding:8px 12px;border-radius:14px;background:var(--panel);border:1px solid var(--line2)}
.sToolH{display:flex;align-items:center;justify-content:space-between;gap:8px}
.sToolH b{font-size:17px}
.sDone{min-height:34px;padding:0 18px;border:0;border-radius:17px;background:var(--sOr);color:#111;font:800 15px var(--body,Arial);cursor:pointer}
.sHint{margin:-2px 0 2px;color:var(--muted);font-size:12.5px}
.sRow{display:flex;flex-direction:column;gap:0}
.sRowH{display:flex;justify-content:space-between;align-items:baseline;font-weight:700;font-size:14px}
.sVal{font:800 16px var(--mono,monospace);color:var(--sOr)}
.sRowC{display:flex;align-items:center;gap:8px}
.sStep{flex:none;width:36px;height:36px;border-radius:50%;border:1px solid var(--line2);background:var(--panel3);color:var(--fg);font-size:22px;line-height:1;cursor:pointer;touch-action:manipulation}
.sStep:active{background:rgba(var(--accRGB),.25)}
/* a slider you can always see: solid track, big thumb (no relying on iOS scroll bars) */
.sRange{-webkit-appearance:none;appearance:none;flex:1 1 auto;min-width:0;height:38px;margin:0;background:transparent;touch-action:none}
.sRange::-webkit-slider-runnable-track{height:8px;border-radius:4px;background:linear-gradient(90deg,var(--sOr),var(--sPu2));box-shadow:inset 0 0 0 1px rgba(255,255,255,.25)}
.sRange::-webkit-slider-thumb{-webkit-appearance:none;width:30px;height:30px;margin-top:-11px;border-radius:50%;background:#fff;border:3px solid var(--sOr);box-shadow:0 2px 8px rgba(0,0,0,.5)}
.sRange::-moz-range-track{height:8px;border-radius:4px;background:linear-gradient(90deg,var(--sOr),var(--sPu2))}
.sRange::-moz-range-thumb{width:26px;height:26px;border-radius:50%;background:#fff;border:3px solid var(--sOr)}

/* ================= v2.8-S2: bigger landscape editor (approved on PR #5) =================
   One slim top row (‹ Projects · ▶ time · Export) · edge-to-edge preview · 56 px strip · 44 px tool bar.
   Movie (body.sMovie) stacked; Short (body.sShort) side by side: preview full height on the left, panels/strip/bar on the right. */
body.tcSimple.tcLand .ed{padding-top:env(safe-area-inset-top,0px)!important;row-gap:0!important;column-gap:8px!important}
/* top row */
body.tcSimple .ed>.edTop{height:38px;min-height:38px!important;gap:8px!important;align-items:center}
body.tcSimple .edTop .mobBack{min-height:36px;font-size:14px;padding-right:4px}
body.tcSimple .edTop .edName{flex:0 1 210px!important;min-width:0}
body.tcSimple .edTop .edName input{font-size:14px!important;padding:3px 6px!important;min-width:0}
body.tcSimple .edTop .fmt{display:none!important}
/* "Saved" becomes a small dot (grey = saved, orange = saving, red = not saved) */
body.tcSimple .edTop .saveSt{font-size:0!important;width:8px;height:8px;border-radius:50%;background:var(--ok,#3CCF6E);flex:none;opacity:.8}
body.tcSimple .edTop .saveSt:empty{background:var(--dim,#5D7692)}
body.tcSimple .edTop .saveSt.busy{background:var(--sOr)}
body.tcSimple .edTop .saveSt.err{background:var(--danger,#FF6B6B)}
.sTopCtrl{display:none}
body.tcSimple .sTopCtrl{display:flex;flex:1 1 auto;min-width:0;align-items:center;justify-content:center;gap:8px}
body.tcSimple .sTopCtrl .playB{width:36px!important;height:36px!important;flex:none}
body.tcSimple .sTopCtrl .tm{font-size:13px;white-space:nowrap}
body.tcSimple .edTop #edExport{min-height:32px!important;padding:0 14px!important;font-size:14px!important}
/* preview edge to edge: no panel, padding, rounding or play row around it */
body.tcSimple .ed>.edCenter,body.tcSimple #edStage{padding:0!important;margin:0!important;border:0!important;border-radius:0!important;background:#000!important;box-shadow:none!important;gap:0!important}
body.tcSimple #edStage .ctrl{display:none!important}
body.tcSimple .pvWrap{border-radius:0!important}
/* 56 px strip */
body.tcSimple .sIn{height:56px}
body.tcSimple .sStrip.sLanes .sIn{height:80px}
body.tcSimple .sC{top:4px;height:48px}
body.tcSimple .sMu,body.tcSimple .sTx{height:11px;font-size:9px;line-height:11px}
body.tcSimple .sMu{top:55px}
body.tcSimple .sTx{top:67px}
body.tcSimple .sAdd{width:42px;height:42px}
body.tcSimple .sStrip.sEmpty .sAdd{width:auto;height:44px}
/* 44 px tool bar (still a full finger target) */
body.tcSimple .mBar:not([hidden]){padding-top:0!important;padding-bottom:env(safe-area-inset-bottom,0px)!important}
body.tcSimple .mB{min-height:44px!important;gap:1px!important;padding:2px 2px!important;font-size:10px!important}
body.tcSimple .mB svg{width:20px!important;height:20px!important}
/* the playhead: white centre, orange edge, always above the selected clip */
body.tcSimple .sPH{width:3px;margin-left:-1.5px;background:#fff;box-shadow:0 0 0 1.5px var(--sOr),0 0 8px rgba(0,0,0,.75);z-index:5}
body.tcSimple .sPH::before{border-top-color:var(--sOr)}
/* Start / End marks */
.sMk{position:absolute;top:4px;bottom:4px;width:2px;border-radius:1px;background:rgba(255,255,255,.38);pointer-events:none}
.sMk span{position:absolute;top:50%;transform:translateY(-50%);font:800 9px/1 var(--body,Arial);letter-spacing:.06em;text-transform:uppercase;color:rgba(255,255,255,.55);white-space:nowrap}
.sMk.s span{right:7px}
.sMk.e span{left:7px}

/* ---- Movie 16:9: stacked (a tool panel opens in a column beside the preview) ---- */
body.tcSimple.tcLand.sMovie .ed{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:38px minmax(0,1fr) auto auto!important;
  grid-template-areas:"top" "center" "strip" "bar"!important}
body.tcSimple.tcLand.sMovie.mDock .ed,body.tcSimple.tcLand.sMovie.sToolOpen .ed{grid-template-columns:minmax(0,1fr) min(40vw,360px)!important;
  grid-template-areas:"top top" "center dock" "strip strip" "bar bar"!important}

/* ---- Short 9:16: side by side; the preview keeps its full height whatever is open ---- */
body.tcSimple.tcLand.sShort .ed,body.tcSimple.tcLand.sShort.mDock .ed,body.tcSimple.tcLand.sShort.sToolOpen .ed{
  grid-template-columns:calc((100dvh - 38px - env(safe-area-inset-top,0px)) * 9 / 16) minmax(0,1fr)!important;
  grid-template-rows:38px minmax(0,1fr) auto auto!important;grid-template-areas:"top top" "center dock" "center strip" "center bar"!important}
body.tcSimple.sShort .sStrip,body.tcSimple.sShort .mBar:not([hidden]){margin-left:0!important}
body.tcSimple.sShort .sStrip{border-radius:10px 0 0 0}
body.tcSimple.sShort .ed>#edInsp,body.tcSimple.sShort .ed>#edPanel,body.tcSimple.sShort .ed>#sTool{margin:6px 0 6px!important}
/* the empty right-hand space says what to do next (gone while a tool is open) */
.sNext{display:none}
body.tcSimple.sShort .sNext{grid-area:dock;display:flex;align-items:center;justify-content:center;text-align:center;padding:0 18px;color:var(--muted);font-weight:600;font-size:14px;line-height:1.35}
body.tcSimple.sShort.mDock .sNext,body.tcSimple.sShort.sToolOpen .sNext{display:none}
/* S2 zoom: − [slider] + Fit, in the top row (no extra height) */
.sZoom{display:none}
body.tcSimple .sZoom{display:flex;align-items:center;gap:4px;flex:none}
.sZb{min-width:32px;height:32px;padding:0 8px;border:1px solid var(--line2);border-radius:16px;background:var(--panel3);color:var(--fg);font:800 17px/1 var(--body,Arial);cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.sZb.sZfit{font-size:13px;letter-spacing:.02em}
.sZb:active{background:rgba(var(--accRGB),.25)}
.sZr{-webkit-appearance:none;appearance:none;width:120px;height:32px;margin:0;background:transparent;touch-action:none}
.sZr::-webkit-slider-runnable-track{height:6px;border-radius:3px;background:linear-gradient(90deg,var(--sPu2,#3D2170),var(--sOr));box-shadow:inset 0 0 0 1px rgba(255,255,255,.2)}
.sZr::-webkit-slider-thumb{-webkit-appearance:none;width:24px;height:24px;margin-top:-9px;border-radius:50%;background:#fff;border:3px solid var(--sOr);box-shadow:0 1px 6px rgba(0,0,0,.5)}
.sZr::-moz-range-track{height:6px;border-radius:3px;background:linear-gradient(90deg,var(--sPu2,#3D2170),var(--sOr))}
.sZr::-moz-range-thumb{width:20px;height:20px;border-radius:50%;background:#fff;border:3px solid var(--sOr)}
@media (max-width:860px){.sZr{width:84px}body.tcSimple .edTop .edName{flex-basis:140px!important}}
/* the round + steps aside while a clip is selected (its right trim handle must stay reachable) */
.sStrip.sSel .sAdd{display:none}

/* ================= v2.8-S3 ================= */
/* notice slot above the timeline (the Optimize offer / "didn't play" message never sit on the preview) */
.sNote{display:none}
body.tcSimple .sNote{grid-area:note;display:block;min-width:0}
body.tcSimple .sNote:empty{display:none}
body.tcSimple #sNote .pxNote,body.tcSimple #sNote .pxNote.pxFloat{position:static!important;top:auto!important;bottom:auto!important;left:auto!important;right:auto!important;
  width:auto!important;max-width:none!important;margin:4px 0!important;padding:5px 10px!important;gap:6px!important;font-size:12.5px!important;line-height:1.3;border-radius:10px;box-shadow:none!important}
body.tcSimple #sNote .pxNote .btn{min-height:34px!important;padding:0 12px!important;font-size:13px!important}
body.tcSimple #sNote .pxNote span{flex:1 1 260px}
/* one notice at a time: the "didn't play" message wins, otherwise the newest */
body.tcSimple #sNote>.pxNote:not(:last-child){display:none!important}
body.tcSimple #sNote:has(#pbNote) #pxNote{display:none!important}
body.tcSimple #sNote:has(#pbNote) #pbNote{display:flex!important}
/* grids with the note row */
body.tcSimple.tcLand.sMovie .ed{grid-template-rows:38px minmax(0,1fr) auto auto auto!important;grid-template-areas:"top" "center" "note" "strip" "bar"!important}
body.tcSimple.tcLand.sMovie.mDock .ed,body.tcSimple.tcLand.sMovie.sToolOpen .ed{grid-template-areas:"top top" "center dock" "note note" "strip strip" "bar bar"!important}
body.tcSimple.tcLand.sShort .ed,body.tcSimple.tcLand.sShort.mDock .ed,body.tcSimple.tcLand.sShort.sToolOpen .ed{grid-template-rows:38px minmax(0,1fr) auto auto auto!important;
  grid-template-areas:"top top" "center dock" "center note" "center strip" "center bar"!important}

/* Expanded Playback button (top row, next to the time) */
.sExpB{display:none}
body.tcSimple .sExpB{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;flex:none;border:1px solid var(--line2);border-radius:10px;background:var(--panel3);color:var(--fg2);cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
body.tcSimple .sExpB svg{width:18px;height:18px}
body.tcSimple .sExpB.on{background:var(--sOr);border-color:var(--sOr);color:#111}

/* Expanded Playback: only the picture while playing (whole frame, never cropped); tap or Pause brings everything back */
body.tcSimple.tcLand.sExp .ed,body.tcSimple.tcLand.sMovie.sExp .ed,body.tcSimple.tcLand.sShort.sExp .ed,
body.tcSimple.tcLand.sMovie.mDock.sExp .ed,body.tcSimple.tcLand.sMovie.sToolOpen.sExp .ed,body.tcSimple.tcLand.sShort.mDock.sExp .ed,body.tcSimple.tcLand.sShort.sToolOpen.sExp .ed{
  grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important;grid-template-areas:"center"!important;
  padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)!important;background:#000!important}
body.tcSimple.sExp .ed>.edTop,body.tcSimple.sExp #sStrip,body.tcSimple.sExp #mBar,body.tcSimple.sExp .ed>#edInsp,body.tcSimple.sExp .ed>#edPanel,
body.tcSimple.sExp #sTool,body.tcSimple.sExp .sNext,body.tcSimple.sExp #sNote,body.tcSimple.sExp .mobMore,body.tcSimple.sExp .toast{display:none!important}
body.tcSimple.sExp .ed>.edCenter{width:auto!important}
.sExpInfo{display:none}
body.tcSimple.sExp .sExpInfo{display:block;position:fixed;left:50%;bottom:calc(10px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);z-index:90;padding:5px 12px;border-radius:14px;
  background:rgba(0,0,0,.55);color:rgba(255,255,255,.85);font:600 12px/1.2 var(--mono,monospace);white-space:nowrap;pointer-events:none;animation:sExpFade 3s ease forwards}
@keyframes sExpFade{0%,70%{opacity:1}100%{opacity:.25}}

/* ================= v2.8-S5 ================= */
/* phone video players: fully opaque but tiny and UNDER the preview canvas (WebKit may stop making pictures for an invisible muted
   video); the person never sees them */
.pvWrap>video.tcPv{position:absolute;left:50%;top:50%;width:2px;height:2px;margin:-1px 0 0 -1px;z-index:0;pointer-events:none;opacity:1}
/* only the preview canvas is lifted above the players (the title overlay canvas keeps its own absolute position) */
.pvWrap>video.tcPv~#edCanvas{position:relative;z-index:1}
/* "Sound is off" notice (Safari refused sound): one tap turns it on */
.sndPill{position:fixed;left:50%;top:calc(8px + env(safe-area-inset-top,0px));transform:translateX(-50%);z-index:120;min-height:40px;padding:0 16px;border:0;border-radius:20px;
  background:var(--sun1,#FF8533);color:#111;font:800 14px var(--body,Arial);box-shadow:0 6px 20px rgba(0,0,0,.5);cursor:pointer;white-space:nowrap}
/* v2.8-S6.2.6: messages appear just below the top row, over the picture's top edge, never over Play / Export / zoom */
body.tcSimple[data-route="editor"] .toast{top:calc(52px + env(safe-area-inset-top,0px))!important;bottom:auto!important;left:50%!important;transform:translateX(-50%)!important;max-width:min(60vw,520px)!important;pointer-events:auto}
