/* Volume Video on the web: what the browser version adds to the app's own style.css.
   Mostly the phone layout (one column: preview, buttons, timeline, then clips). */

.web-back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px;
  border-radius: var(--r-pill); border: 1px solid var(--line-strong); color: var(--ink-2);
  text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap;
}
.web-back:hover { color: var(--ink); border-color: var(--ink-2); }
.web-back:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

html.web, html.web body { height: 100%; }
html.web body { min-height: 100dvh; }

/* A note under the clips: nothing leaves the device. */
.web-note { color: var(--ink-3); font-size: 12.5px; line-height: 1.45; padding: 2px 4px 0; }

@media (max-width: 820px) {
  html.web body { height: auto; min-height: 100dvh; }
  html.web .top { padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top, 0px)); gap: 10px; position: sticky; top: 0; z-index: 5; }
  html.web .top .logo { width: 30px; height: 30px; }
  html.web .brand h1 { font-size: 17px; }
  html.web .brand p { display: none; }
  html.web .web-back span { display: none; }
  html.web .web-back { padding: 0; width: 44px; justify-content: center; }
  html.web #export { min-height: 44px; }

  /* One column: the work area first, the clips under it. */
  html.web main { flex-direction: column-reverse; min-height: 0; }
  html.web .side { width: auto; border-right: 0; border-top: 1px solid var(--line); padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  html.web .work { flex: none; }
  html.web .stage { flex: none; height: min(46dvh, 56vw + 60px); margin: 10px 10px 0; }
  html.web .bar { flex-wrap: wrap; gap: 8px; padding: 10px; }
  html.web .bar .btn, html.web .bar #play { min-height: 44px; min-width: 64px; }
  html.web .bar .gap { display: none; }
  html.web .bar .time { flex: 1 0 auto; text-align: right; }
  html.web .bar .zoom { flex: 1 1 100%; order: 9; }
  html.web .bar .zoom input { flex: 1; width: auto; height: 32px; }
  html.web .timeline { height: 168px; }
  html.web .handle { width: 22px; }
  html.web .clip-body { inset: 0 22px; }
  html.web .clip-add, html.web #import, html.web #record { min-height: 44px; }
  html.web .clips { max-height: none; }
  html.web .dialog { width: min(92vw, 420px); }
  html.web .dialog-buttons .btn { min-height: 44px; }
}

@media (max-width: 380px) {
  html.web .brand h1 { font-size: 15px; }
  html.web .bar .btn, html.web .bar #play { min-width: 56px; padding-inline: 10px; }
}

@media (max-width: 820px) {
  /* Tools: three equal buttons across; the open panel sits right under them. */
  html.web .tools { padding: 0 10px 10px; }
  html.web .tool { flex: 1 1 0; min-width: 0; height: 46px; font-size: 15px; }
  html.web .panel { margin: 0 10px 10px; padding: 12px; }
  html.web .chip { height: 44px; }
  html.web .fill { min-height: 44px; }
  html.web .fill input { width: 22px; height: 22px; }
  html.web .panel .vol { min-height: 44px; }
  html.web .panel .vol input { flex: 1; width: auto; height: 32px; }
  html.web .panel .btn, html.web .panel select, html.web .text-input { min-height: 44px; }
  html.web .music-row { flex-wrap: wrap; }
  html.web .music-row .vol { flex: 1 1 60%; }
  html.web .text-input { flex: 1 1 100%; font-size: 16px; }
  html.web .text-row select { flex: 1 1 30%; }
  html.web .timeline.has-texts { height: 206px; }
  html.web .tl-texts { top: 132px; height: 44px; }
  html.web .tl-text { height: 40px; }
  /* The zoom slider shares the transport row instead of taking its own. */
  html.web .bar .zoom { flex: 1 1 40%; order: 9; }
  html.web .bar #fit { order: 10; }
}

/* Making a clip from a stream replay (web-replay.js) */
.stream-card { gap: 10px; }
.stream-card .hint { overflow-wrap: anywhere; }
.stream-at { display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); font-size: 14px; }
.stream-at[hidden], .stream-card .btn[hidden] { display: none; }
.stream-at .time { margin-left: 0; color: var(--ink); }
.stream-at input { width: 100%; height: 44px; accent-color: var(--signal); margin: 0; }
.stream-card .btn.big { width: 100%; }
.limit-note { margin: 0 10px; padding: 0 4px 8px; font-variant-numeric: tabular-nums; }
.limit-note.over { color: var(--danger-hi); }
.limit-note[hidden] { display: none; }
@media (max-width: 820px) {
  html.web .dialog-buttons { flex-wrap: wrap; }
  html.web .dialog-buttons .btn { flex: 1 1 auto; }
}
@media (max-width: 820px) {
  html.web .work > .stream-card { margin: 10px 10px 0; padding: 12px; gap: 8px; }
}
