/* The phone layout (Stage 21): the Phone page of the prototype canvas
   (https://claude.ai/artifact/DwFVJ5CYkTtvDkW9RsTmyh, project/phone.css),
   applied to the editor's own parts when src/phone/viewport.js says "phone"
   (the .ph class on the app; html.nx-phone for the dialogs, which sit in the
   top layer). Loads after editor.css. Every control reaches the touch size
   (44 px). The layout is the visible viewport's box (--vvh, --vvt), not
   100dvh, so the chat's input stays above the keyboard. */

/* The desktop's 1280 px minimum would make a phone browser zoom out before the
   script can switch layouts; the same test as phone/viewport.js isPhone (the
   screen's sides, which no keyboard changes). */
@media (max-width:699px),(pointer:coarse) and (max-device-width:499px),(pointer:coarse) and (max-device-height:499px){.ed.nx-app{min-width:0}}
.ed.nx-app.ph{position:fixed;left:0;right:0;top:var(--vvt,0px);width:100%;height:var(--vvh,100dvh);min-width:0}

/* Touch sizes: every button, box and switch outside the timeline's rows
   (their touch handles are Stage 22) */
.ph .vc-btn,.ph .vc-primary,.ph .vc-chip,.ph .vc-switch{min-height:var(--size-touch)}
.ph .vc-btn,.ph .vc-seg button{min-width:var(--size-touch)}
.ph-sheet button,.ph-chat button,.ph-bar button,.ph .ed-head button,.ph .ed-tl__bar button{min-height:var(--size-touch)}
.ph-sheet input:not([type=range]):not([type=checkbox]):not([type=radio]),.ph-sheet select,.ph .ed-search{min-height:var(--size-touch);height:auto}
.ph .vc-chip{height:var(--size-touch);padding:0 var(--space-16)}
.ph .vc-step{padding-block:var(--space-12)}
.ph .vc-seg button{min-height:var(--size-touch)}
.ph .vc-key{display:none}
.ph-icon{width:var(--size-touch);justify-content:center;padding:0}
.ph .ed-range{height:var(--size-touch);background:linear-gradient(var(--meter-track),var(--meter-track)) center / 100% 4px no-repeat}
.ph .ed-range::-webkit-slider-thumb{width:24px;height:24px}
.ph .ed-range::-moz-range-thumb{width:24px;height:24px}
.ph input,.ph textarea,.ph select{font-size:16px}

/* Header: the name box over the save line, Export always there; the mark
   and the shape menu step out (the shape is in the More sheet). The name is a
   box to type in, so it keeps a 44 px tap height (the canvas's 56 px header
   shows a plain title). */
.ph .ed-head{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;align-content:center;column-gap:var(--space-12);row-gap:0;height:auto;min-height:calc(64px + env(safe-area-inset-top,0px));padding:calc(var(--space-2) + env(safe-area-inset-top,0px)) calc(var(--space-12) + env(safe-area-inset-right,0px)) var(--space-4) calc(var(--space-16) + env(safe-area-inset-left,0px))}
.ph .ed-mark,.ph .ed-divider,.ph .nx-shape{display:none}
.ph .nx-title{grid-column:1;grid-row:1;min-width:0}
.ph .nx-name{width:100%;height:var(--size-touch);font-size:16px;line-height:20px;font-weight:600}
.ph .ed-head>.vc-save{grid-column:1;grid-row:2;min-height:0;gap:var(--space-4);font-size:11px;line-height:14px;flex-wrap:wrap}
.ph .ed-head>.vc-save .vc-icon{width:14px;height:14px}
.ph .ed-head__end{grid-column:2;grid-row:1 / 3;margin-left:0}

/* Body: the preview on top, then the switch, the main area and the bar */
.ph .ed-body{flex:1;min-height:0;position:relative;display:flex}
.ph-body{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column}
.ph .ed-stage{position:relative;flex:none;height:var(--ph-stage-h,264px);padding:var(--space-8) 0;gap:0;justify-content:center}
.ph .ed-video{flex:1 1 0;min-height:0}
.ph .nx-cliptools{display:none}
.ph .ed-transport{position:absolute;left:var(--space-8);right:var(--space-12);bottom:var(--space-8);z-index:3;pointer-events:none}
.ph .ed-transport .vc-readout{margin-left:auto}
.ph .ed-transport>*{pointer-events:auto}
.ph-side{flex:1;min-height:0;min-width:0;display:flex;flex-direction:column}

/* Sideways (a phone turned): the preview, the Timeline | Chat switch and the
   bottom bar make the left column, and the timeline or the chat takes the
   whole right side (Stage 26g, review M22: under the header, switch and bar
   the conversation was a 24-70 px strip). A clip's six-button bar spans both
   columns at the foot. The header is one row. */
.ph--wide .ph-body{display:grid;grid-template-columns:44% minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto auto}
.ph--wide .ph-side{display:contents}
.ph--wide .ed-stage{grid-column:1;grid-row:1;height:auto;width:auto;min-height:0;padding:var(--space-8)}
.ph--wide .ph-toggle{grid-column:1;grid-row:2;border-top:1px solid var(--line)}
.ph--wide .ph-bar{grid-column:1;grid-row:3}
.ph--wide .ph-main{grid-column:2;grid-row:1 / -1;border-left:1px solid var(--line)}
.ph--wide .ph-bar--video{grid-column:1 / -1}
.ph--wide .ph-body:has(>.ph-side>.ph-bar--video:not([hidden])) .ph-main{grid-row:1 / 3}
.ph--wide .ed-head{grid-template-columns:minmax(0,1fr) auto auto;grid-template-rows:auto;min-height:calc(48px + env(safe-area-inset-top,0px))}
.ph--wide .ed-head>.vc-save{grid-column:2;grid-row:1;max-width:30vw}
.ph--wide .ed-head__end{grid-column:3;grid-row:1}
/* Sideways with the keyboard up for the chat (review H8: the box and Send were
   below the screen): the header steps out unless its name box is the one
   typed in, and so does the usage line, until the keyboard goes down */
.ph--wide.ph--kb .ed-head:not(:focus-within),.ph--wide.ph--kb .ph-chat .nx-agent-usage{display:none}

/* Timeline | Chat */
.ph-toggle{flex:none;padding:var(--space-6) var(--space-12);background:var(--panel);border-bottom:1px solid var(--line)}
.ph-toggle .vc-seg{display:flex}
.ph-toggle .vc-seg button{flex:1;font-size:13px}
.ph-main{position:relative;flex:1;min-height:0;background:var(--panel)}
.ph-pane{position:absolute;inset:0;display:flex;flex-direction:column;min-height:0}
.ph-pane.is-off{visibility:hidden}

/* The timeline: no Split (the clip's bar has it), snapping or zoom slider
   (pinch to zoom is Stage 22; Fit stays until then); rows tall enough to tap */
.ph .ed-tl{flex:1;min-height:0;border-top:0}
.ph .ed-tl__bar{height:48px;padding:0 var(--space-8) 0 var(--space-4)}
.ph .ed-tl__bar>.vc-btn[data-tl="split"]{display:none}
.ph .ed-tl__end>.vc-field__label,.ph .ed-tl__end>.vc-switch,.ph .ed-tl__end>.vc-sep,.ph .ed-tl__end>.ed-tl__group{display:none}
.ph .ed-tracks{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}
.ph .ed-row--captions,.ph .ed-row--overlay,.ph .ed-row--audio{height:44px}
.ph .ed-row--main{height:56px}
.ph .vc-clip,.ph .ed-row--main .vc-clip{top:5px;bottom:5px}

/* Chat */
.ph .ed-chat.ph-pane{width:auto;border-left:0;background:var(--panel)}
.ph .ph-chat .ed-chat__foot{padding:var(--space-8) var(--space-12)}
.ph .ph-chat .vc-composer{align-items:center;padding:var(--space-2) var(--space-2) var(--space-2) var(--space-6)}
.ph .ph-chat .vc-composer textarea{min-height:var(--size-touch);padding:var(--space-8) var(--space-4);font-size:16px;line-height:22px}
.ph .ph-chat .vc-composer .vc-btn{width:var(--size-touch);justify-content:center;padding:0}
.ph .ph-chat .vc-plan__foot{position:sticky;bottom:0;z-index:1;background:var(--panel-raised);border-radius:0 0 var(--radius-3) var(--radius-3)}
.ph .ph-chat .vc-plan__foot.ed-applied{position:static}
/* With the keyboard up the conversation keeps its room: the AI note and the
   "Learn from my edits" switch step out until it goes down */
.ph--kb .ph-chat .ed-chat__foot>.vc-caption,.ph--kb .ph-chat .nx-agent-learn-slot{display:none}

/* Bottom bars */
.ph-bar{flex:none;display:flex;flex-wrap:wrap;gap:var(--space-4);padding:var(--space-4) calc(var(--space-8) + env(safe-area-inset-right,0px)) calc(var(--space-12) + env(safe-area-inset-bottom,0px)) calc(var(--space-8) + env(safe-area-inset-left,0px));background:var(--rail);border-top:1px solid var(--line)}
.ph-bar[hidden]{display:none}
.ph-bar__label{flex:1 0 100%;display:flex;justify-content:space-between;gap:var(--space-8);padding:var(--space-4) var(--space-4) 0;font-size:12px;line-height:16px;font-weight:500;min-width:0}
.ph-bar__name{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ph-tool{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-4);min-height:52px;padding:var(--space-4) 0;border:0;border-radius:var(--radius-2);background:transparent;color:var(--fg);font-size:11px;line-height:14px;font-weight:500;letter-spacing:.02em}
.ph-tool:hover{background:var(--control-hover)}
.ph-tool:disabled{color:var(--fg-disabled)}
.ph-tool--danger{color:var(--error)}

/* Sheets: one at a time, over the body, a surface step up, no shadow */
.ph-sheets{position:absolute;inset:0;z-index:30;display:flex;flex-direction:column;justify-content:flex-end}
.ph-sheets[hidden]{display:none}
.ph-scrim{position:absolute;inset:0;border:0;padding:0;background:var(--app-bg);opacity:.72;cursor:default}
.ph-sheet{position:relative;display:flex;flex-direction:column;max-height:78%;min-height:0;padding-bottom:env(safe-area-inset-bottom,0px);background:var(--panel-raised);border:1px solid var(--line-control);border-bottom:0;border-radius:var(--radius-3) var(--radius-3) 0 0}
.ph .vc-panel.ph-sheet{width:auto;max-width:none;border-left:1px solid var(--line-control);border-right:1px solid var(--line-control)}
.ph-grab{flex:none;align-self:center;width:36px;height:4px;margin-top:var(--space-8);border-radius:var(--radius-pill);background:var(--meter-track)}
.ph .ph-sheet__head{flex:none;height:48px;padding:0 var(--space-4) 0 var(--space-16)}
.ph-sheet .ed-panel-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}
.ph-sheet .vc-panel__body{padding-bottom:var(--space-24)}
/* The Clip settings panel brings its own head; the sheet's close sits over
   its collapse arrow (which would deselect) */
.ph-sheet--own .nx-settings{display:flex;flex-direction:column;min-height:0;flex:1}
.ph-sheet--own .ed-settings,.ph .vc-panel.ed-settings{width:auto;flex:1;min-height:0;border:0;background:transparent}
.ph-sheet--own .ed-settings>.vc-panel__head>.vc-btn{visibility:hidden}
.ph-sheet--own>.ph-sheet__close{position:absolute;right:var(--space-4);top:var(--space-12);z-index:2}
.ph-more{display:flex;flex-direction:column;gap:var(--space-16)}
.ph-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-8)}
.ph-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-6);min-height:76px;border:1px solid var(--line);border-radius:var(--radius-2);background:var(--control);color:var(--fg);font-size:12px;line-height:16px;font-weight:500}
.ph-tile:hover{background:var(--control-hover)}
.ph-tile small{font-size:11px;line-height:14px;font-weight:400;color:var(--fg-muted);text-align:center;padding:0 var(--space-4)}
.ph-shape{display:flex;flex-direction:column;gap:var(--space-8)}
.ph-shape .vc-seg{display:flex}
.ph-shape .vc-seg button{flex:1}
.ph .nx-follow .vc-btn{min-height:var(--size-touch)}
/* Stage 26r: the notice sits under the preview, outside it, so the preview keeps its size;
   sideways it floats at the top of the timeline or chat column */
.ph .ph-side>.nx-follow{flex:none;max-height:35%;overflow:auto;margin:var(--space-8) var(--space-12) 0;box-sizing:border-box}
.ph--wide .ph-side>.nx-follow{grid-column:2;grid-row:1;align-self:start;position:relative;z-index:5;max-height:60%}
.ph-crop{display:flex;flex-direction:column;gap:var(--space-8);margin-top:var(--space-4)}

/* Dialogs (Export, the done card, Save) rise from the bottom like a sheet: the
   bottom of the VISIBLE part (--vvh and --vvt, which phone/viewport.js also
   puts on <html> for these top-layer dialogs), so on an iPhone, where the
   keyboard doesn't shrink the page, their buttons stay above it (Stage 26g,
   review M23) */
html.nx-phone .nx-dialog{box-sizing:border-box;width:100%;max-width:none;max-height:calc(var(--vvh,100dvh) - 24px);margin:0;top:var(--vvt,0px);bottom:auto;transform:translateY(calc(var(--vvh,100dvh) - 100%));padding:var(--space-16) var(--space-16) calc(var(--space-16) + env(safe-area-inset-bottom,0px));border-radius:var(--radius-3) var(--radius-3) 0 0;overflow:auto}
html.nx-phone .nx-dialog .vc-btn,html.nx-phone .nx-dialog .vc-primary,html.nx-phone .nx-dialog .vc-seg button,html.nx-phone .nx-dialog .vc-switch{min-height:var(--size-touch)}
html.nx-phone .nx-dialog input,html.nx-phone .nx-dialog textarea{font-size:16px}
html.nx-phone .nx-confirm{left:var(--space-8) !important;right:var(--space-8);max-width:calc(100vw - 16px);flex-wrap:wrap}
html.nx-phone .nx-confirm .vc-btn{min-height:var(--size-touch)}

/* Touch on the timeline (Stage 22a, src/phone/touch.js), on phones and on any
   touch screen: a swipe scrolls (no page zoom, no text selection or menu from a
   long press); the selected clip's finger grips over its edges (44 px, at most
   30% of the clip inside it), placed by the page; only the selected clip trims,
   so an edge anywhere else is part of the swipe. */
.ph .ed-tracks{touch-action:pan-x pan-y;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
/* z-index 1: over the clips, under the sticky ruler row (2) and the playhead (3) */
.nx-grip{display:none;position:absolute;top:0;bottom:0;z-index:1;touch-action:none}
/* Nov 2026 clip-handle design: a 12px fg tab with grip ticks just outside each edge of the
   selected clip, inside the 44px grip (drawGrips sets --nx-tab, the tab's x in the grip). */
.nx-grip::before{content:"";position:absolute;left:var(--nx-tab,16px);top:2px;bottom:2px;width:12px;background:var(--fg) linear-gradient(to right,transparent 4px,var(--ink-inverse) 4px 5px,transparent 5px 7px,var(--ink-inverse) 7px 8px,transparent 8px) no-repeat center/12px 14px;pointer-events:none}
.nx-grip--l::before{border-radius:4px 0 0 4px}
.nx-grip--r::before{border-radius:0 4px 4px 0}
.ed-tracks.is-trimming[data-trim-side="l"] .nx-grip--l::before,.ed-tracks.is-trimming[data-trim-side="r"] .nx-grip--r::before{background-color:var(--playhead)}
.ph .nx-grip{display:block}
.ph .vc-clip:not(.is-selected) .nx-trim{display:none}
/* A touch screen whose main pointer is a trackpad: from its first touch on */
html.nx-touch .ed .ed-tracks{touch-action:pan-x pan-y;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
html.nx-touch .ed .nx-grip{display:block}
html.nx-touch .ed .vc-clip:not(.is-selected) .nx-trim{display:none}
@media (pointer:coarse){
  .ed .ed-tracks{touch-action:pan-x pan-y;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
  .ed .nx-grip{display:block}
  .ed .vc-clip:not(.is-selected) .nx-trim{display:none}
}
/* The phone's playhead: a 44 px grip over the flag (Q9: draggable). The zoom
   is a pinch, so the bar shows its caption instead of Fit. */
.nx-ph-grip{display:none}
.ph .nx-ph-grip{display:block;position:absolute;top:0;left:50%;width:var(--size-touch);height:var(--size-touch);margin-left:calc(var(--size-touch) / -2);pointer-events:auto;touch-action:none}
.nx-pinch{display:none;white-space:nowrap}
.ph .nx-pinch{display:inline}
.ph .ed-tl__end>.nx-fit{display:none}

/* Lines over the phone's preview (Stage 22b): the preview's message (a held
   cutaway, playback stalled, footage expired) takes its own line above Play
   and the time, and the upload / transcript line sits above that row, so
   neither squeezes the time onto two lines over the picture. */
.ph .ed-transport{flex-wrap:wrap;row-gap:var(--space-4)}
.ph .ed-transport .vc-readout{white-space:nowrap}
.ph .ed-transport .nx-pv-note:empty{display:none}
.ph .ed-transport .nx-pv-note{order:-1;flex:1 0 100%;padding:var(--space-2) var(--space-8);border-radius:var(--radius-1);background:rgba(0,0,0,.66);color:#fff;text-align:center}
.ph .nx-txstatus{position:absolute;left:var(--space-8);right:var(--space-8);bottom:calc(var(--space-8) + var(--ph-tp-h,var(--size-touch)) + var(--space-4));z-index:3;border-radius:var(--radius-1);background:rgba(0,0,0,.66);color:#fff}
/* Oct 24: the line wraps in its own box (it ran past both edges of the 9:16 frame's side column)
   and sits above Play and the time at their measured height (--ph-tp-h, ui/layout.js phoneSizes:
   they take two lines at 360 px) */
.ph .nx-txstatus,.ph .nx-txstatus.is-note{white-space:normal;text-align:center}
/* Stage 23a: the J/L glyph takes a finger; its box rises from the bottom, full width, as the other dialogs */
html.nx-phone .nx-seam{width:32px;height:32px;margin:-16px 0 0 -16px}
html.nx-phone .nx-jl{left:8px !important;right:8px;width:auto;top:auto !important;bottom:calc(8px + env(safe-area-inset-bottom,0px))}
html.nx-phone .nx-jl .vc-seg button,html.nx-phone .nx-jl .vc-btn{min-height:var(--size-touch)}
/* Stage 23a: no preview speed on phones, as classic (.ed-mobile .ed-speed) */
.ph .nx-pv-speed{display:none}
/* Stage 23a: Projects and Sign in move to the More sheet on a phone; Save stays beside Export */
.ph .nx-projects,.ph .nx-projects-div,.ph .nx-signin-slot{display:none}
.ph-links{display:flex;flex-wrap:wrap;gap:var(--space-8)}
.ph-links .vc-btn{text-decoration:none}
/* Stage 24: Spanish and Portuguese words are longer, so on a phone Undo and Redo show their icons only (the buttons keep
   their names for screen readers) and the length and clip count stay on one line */
.ph:lang(es) .ed-tl__bar .nx-tl-word,.ph:lang(pt) .ed-tl__bar .nx-tl-word{display:none}
.ph .ed-tl__bar .nx-tl-meta{white-space:nowrap}
/* Stage 27: Show cuts is its scissors on a phone (its name stays the button's label) */
.ph .ed-tl__bar .nx-cuts .nx-tl-word{display:none}
.ph .ed-tl__bar>.vc-sep{display:none}
@media (max-width:370px){.ph .ed-tl__bar .nx-tl-word{display:none}}

/* Stage 26k (the Oct 19 trial's phone fixes) */
/* The chat on a 640-667 px phone: the request it answers in one line (a tap
   shows it all), so the plan and its Apply keep the room (the preview is
   smaller and the bottom bar steps out on this tab: ui/layout.js) */
.ph .ph-chat .ed-pinned{gap:var(--space-2);padding:var(--space-6) var(--space-12) var(--space-8);cursor:pointer}
.ph .ph-chat .ed-pinned:not(.is-open) .vc-msg--user{max-width:100%;min-width:0}
.ph .ph-chat .ed-pinned:not(.is-open) .vc-msg__text{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* The plan's hint under its steps on a phone (in the foot on the desktop) */
.nx-plan-hint{display:none}
.ph .ph-chat .nx-plan-hint{display:block;margin:0;padding:var(--space-4) var(--space-12) var(--space-8)}
.ph .ph-chat .nx-plan-uncheck{display:none}
/* With the keyboard on screen the conversation keeps its room: the header
   steps out unless its name box is the one typed in, and so do the pinned
   request and the usage line, until the keyboard goes down (as sideways,
   review H8). On screen = the visible height shrank (phone/viewport.js
   keyboardShown), not only a box with focus. */
.ph--kbshown .ed-head:not(:focus-within),.ph--kbshown .ph-chat .ed-pinned,.ph--kbshown .ph-chat .nx-agent-usage{display:none}
/* ...and on a short phone the chat takes the preview's place */
.ph--tight .ed-stage{height:0;padding:0;overflow:hidden;visibility:hidden}
/* The first screen (an empty project): the drop box is the whole preview, not
   a 9:16 frame 107 px wide, and Play and the time (nothing to play) step out */
.ph--empty .ed-frame{width:100%;aspect-ratio:auto}
.ph--empty .ed-transport{display:none}
.ph .nx-empty{justify-content:safe center;overflow:auto;gap:var(--space-6);padding:var(--space-12) var(--space-16)}
.ph .nx-empty .vc-caption{max-width:36ch}
.ph--kb .nx-empty>.vc-caption,.ph--kb .nx-empty>.vc-btn{display:none}
/* Where new audio lands (the Audio sheet; the playhead is under it) */
.nx-audio-at{display:none}
.ph .nx-audio-at:not([hidden]){display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-8);margin-top:var(--space-4);padding:var(--space-8) var(--space-12);border-radius:var(--radius-2);background:var(--control)}
.ph .nx-audio-at__text{flex:1 1 180px;color:var(--fg)}

/* Stage 26r (phone fixes) */
/* The name gets the header's room: Export shows its word only (the dialog says the resolution) */
.ph:not(.ph--wide) .ed-head .nx-xp-btn .vc-primary__meta{display:none}
/* Stage 26y (Melvin's Oct 23 trial 7: at 360 x 640 the card showed 104 px between the request and
   its Apply bar): while a plan or questions are up on a short phone the AI note steps out (as with
   the keyboard), the request sits on one row and the Apply bar is slimmer */
.ph--reading .ph-chat .ed-chat__foot>.vc-caption,.ph--reading .ph-chat .nx-agent-learn-slot{display:none}
.ph--reading .ph-chat .vc-plan__foot{padding-top:var(--space-6);padding-bottom:var(--space-6)}
.ph--reading .ph-chat .ed-pinned:not(.is-open){flex-direction:row;align-items:center;gap:var(--space-8);padding-top:var(--space-4);padding-bottom:var(--space-4)}
.ph--reading .ph-chat .ed-pinned:not(.is-open)>*{min-width:0}
.ph--reading .ph-chat .ed-pinned:not(.is-open)>:first-child{flex:none;white-space:nowrap}
/* The Captions tiles on a phone: 12px whole words, so "Cinematográfico" fits a 360 px phone's tile (desktop: editor.css) */
.ph .nx-cap-picker .vcc-picker-editor .vcc-tile{font-size:12px;padding-left:2px;padding-right:2px;hyphens:none;overflow-wrap:normal}
/* An empty project on the Chat tab: the drop box keeps its title and Choose a video (its line steps out) */
.ph--empty.ph--chat .nx-empty>.vc-caption{display:none}

/* Oct 25 (the phone layout plan's Option A; replaces Stage 26r's ph--side): held upright, the
   Timeline | Chat switch sits above the preview; a project's picture spans the screen's width at
   its shape (--ph-pic-h, ui/layout.js phoneSizes), a 9:16 frame centred between dark bands; Play
   and the time take their own row under it and the upload line sits under that row, so neither
   covers the picture or its captions. The overlay notice stays between the preview and the
   timeline or chat. Sideways (ph--wide) is as before. */
.ph:not(.ph--wide) .ph-side{display:contents}
.ph:not(.ph--wide) .ph-toggle{order:0}
.ph:not(.ph--wide) .ed-stage{order:1}
.ph:not(.ph--wide) .ph-side>.nx-follow{order:2}
.ph:not(.ph--wide) .ph-main{order:3}
.ph:not(.ph--wide) .ph-bar{order:4}
.ph--stack .ed-stage{height:auto;padding:0;background:var(--app-bg);border-bottom:1px solid var(--line)}
.ph--stack .ed-video{flex:none;height:var(--ph-pic-h,219px)}
.ph--stack .ed-transport{order:1;position:static;flex:none;box-sizing:border-box;width:100%;min-height:48px;padding:var(--space-2) var(--space-12) var(--space-2) var(--space-4);background:var(--panel);border-top:1px solid var(--line)}
.ph--stack .ed-transport .nx-pv-note{padding:var(--space-2) var(--space-8);background:transparent;color:var(--fg)}
.ph--stack .nx-txstatus{order:2;position:static;flex:none;align-self:stretch;box-sizing:border-box;margin:0;padding:var(--space-4) var(--space-12);border-radius:0;background:var(--panel);color:var(--fg-muted);border-top:1px solid var(--line)}
