/* D521, the hard review of 12 November 2026: the create area's fixes, loaded after heritage.css and simple.css. */
/* Scoped to the Video and Pictures views (.v-video, .v-pictures). */

/* the layout's own switches: what the Simple layout hides, what only it shows */
html[data-layout="simple"] :is(.v-video, .v-pictures) .pc-pro { display: none !important; }
html:not([data-layout="simple"]) :is(.v-video, .v-pictures) .pc-simple { display: none !important; }

/* ---------------------------------------------------------------- the ways of working */
/* auto-fit: a hidden way leaves no empty track, so the row ends at the content edge */
:is(.v-video, .v-pictures) .vs-modes { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
/* every title on one line across the row: the icon on top, the name at the card's foot */
:is(.v-video, .v-pictures) .vs-mode { justify-content: space-between; min-height: 92px; }
:is(.v-video, .v-pictures) .vs-mode svg { flex: none; }
html[data-layout="simple"] :is(.v-video, .v-pictures) .vs-mode { min-height: 88px; padding: 14px 16px; }
@media (min-width: 1200px) {
  /* the two groups of the Pictures page side by side, so neither row is half empty */
  .v-pictures .vs-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
  .v-pictures .vs-top > .sx-moretoggle { grid-column: 1 / -1; justify-self: start; }
}
.v-pictures .ps-group .vs-h { margin: 0 0 10px; }
.v-pictures .ps-group + .ps-group .vs-h { margin-top: 0; }
@media (max-width: 1199px) { .v-pictures .ps-group + .ps-group { margin-top: 18px; } }

/* the row on a phone runs to the screen's edge, so a card is cut by the edge, never the gutter */
@media (max-width: 899px) {
  :is(.v-video, .v-pictures) .vs-modes { margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; gap: 10px; }
  :is(.v-video, .v-pictures) .vs-mode { flex: 0 0 140px; }
}

/* "More ways and options" reads as a control: a border, a chevron, a thumb's height */
:is(.v-video, .v-pictures) .sx-moretoggle {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; margin: 4px 0 22px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 10px; color: var(--ink); background: transparent; font-weight: 600;
}
:is(.v-video, .v-pictures) .sx-moretoggle::after {
  content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform .15s ease;
}
html.sx-all :is(.v-video, .v-pictures) .sx-moretoggle::after { transform: translateY(2px) rotate(-135deg); }

/* the Video clip / Picture switch: a thumb's height, the full width on a phone */
html[data-layout="simple"] :is(.v-video, .v-pictures) .sx-segs { margin: 0 0 18px; }
html[data-layout="simple"] :is(.v-video, .v-pictures) .sx-segs button { min-height: 40px; }
@media (max-width: 899px) {
  html[data-layout="simple"] :is(.v-video, .v-pictures) .sx-segs { display: flex; width: 100%; }
  html[data-layout="simple"] :is(.v-video, .v-pictures) .sx-segs button { flex: 1 1 0; min-height: 44px; }
}

/* ---------------------------------------------------------------- the form */
/* the selected way is on its card already: the form does not say it twice */
html[data-layout="simple"] :is(#vsForm, #psForm) > h2,
html[data-layout="simple"] :is(#vsForm, #psForm) > h2 + p.note { display: none; }
:is(#vsForm, #psForm) .lbl { font-size: 13px; }

/* the style select and Improve my prompt: one height, one radius, one centre line */
:is(.v-video, .v-pictures) .vs-improve { align-items: flex-end; }
:is(.v-video, .v-pictures) .vs-improve > button { min-height: 46px; border-radius: 10px; padding: 0 16px; }
:is(.v-video, .v-pictures) .vs-improve select { min-height: 46px; }

/* the length: the value at the right of its label, the slider the whole row */
.v-video .vs-lenlbl { grid-column: 1 / -1; }
.v-video .vs-lenlbl #vsSecs { float: right; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.v-video .vs-lenlbl input[type="range"] { width: 100%; }
/* shapes as one even grid: no option left alone on a row */
#vsForm .formgrid > .lbl:has(> .segs) { grid-column: 1 / -1; }
#vsForm .vs-ratio:not(.vs-order):not(.vs-people) { display: grid; grid-template-columns: repeat(auto-fit, minmax(54px, 1fr)); flex-wrap: nowrap; }
#vsForm .vs-ratio:not(.vs-order):not(.vs-people) button, #psForm .ps-shapes button { padding: 8px 4px; }
@media (max-width: 899px) {
  #vsForm .vs-ratio:not(.vs-order):not(.vs-people) { grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); }
  #psForm .vs-ratio.ps-shapes:not(.ps-fixed) { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* the draft and sound ticks on their own row under the resolution */
#vsForm .vs-ticks { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 18px; margin-top: 14px; }
:is(#vsForm, #psForm, #vsRemake) .tick { align-items: center; min-height: 44px; }
:is(#vsForm, #psForm, #vsRemake) .tick input[type="checkbox"] { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--primary, var(--accent)); }
/* the exact size: a short caption at the right, under the resolution */
#psForm .ps-size { margin: 4px 0 0; text-align: right; font-size: 12.5px; color: var(--faint); }
:is(#vsForm, #psForm) textarea#vsPrompt, :is(#vsForm, #psForm) textarea#psPrompt { resize: none; min-height: 120px; width: 100%; }

/* ---------------------------------------------------------------- price and Make */
/* the price is said beside Make in one footer that stays in view while the form scrolls;
   the check keeps its own copy for a screen reader and for the read-back */
:is(#vsCheck, #psCheck) .vs-price { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:is(#vsForm, #psForm) .vs-go {
  position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 16px -24px -22px; padding: 14px 24px; background: var(--panel); border-top: 1px solid var(--line);
  border-radius: 0 0 var(--r-l, 18px) var(--r-l, 18px);
}
:is(#vsForm, #psForm) .vs-goprice { font: 700 18px/1.3 var(--font); font-variant-numeric: lining-nums tabular-nums; color: var(--ink); min-width: 0; }
:is(#vsForm, #psForm) .vs-go .primary { flex: none; min-width: 200px; min-height: 48px; }
:is(#vsForm, #psForm) .vs-go .primary:disabled { opacity: 1; background: var(--raised); color: var(--faint); box-shadow: none; border-color: var(--line); }
#vsRemake .vs-rmgo .primary:disabled { opacity: 1; background: var(--raised); color: var(--faint); box-shadow: none; border-color: var(--line); }
#vsRemake .vs-price { font: 700 18px/1.3 var(--font); font-variant-numeric: tabular-nums; margin-top: 12px; }
@media (max-width: 899px) {
  :is(#vsForm, #psForm) .vs-go {
    bottom: calc(76px + env(safe-area-inset-bottom)); margin: 16px -18px -18px; padding: 10px 18px; gap: 12px;
    border-radius: 0 0 24px 24px;
  }
  :is(#vsForm, #psForm) .vs-goprice { flex: 1 1 auto; font-size: 14px; line-height: 1.3; }
  :is(#vsForm, #psForm) .vs-go .primary { flex: none; width: auto; min-width: 0; padding: 0 18px; }
}

/* ---------------------------------------------------------------- remake a clip */
#vsRemake .vs-rmfold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 32px; }
#vsRemake .vs-rmfold > summary::-webkit-details-marker { display: none; }
#vsRemake .vs-rmfold > summary::before { display: none !important; content: none; }
#vsRemake .vs-rmfold > summary h2 { margin: 0; flex: 1; text-align: left; font: 600 15px/1.3 var(--font); letter-spacing: 0; text-transform: none; color: var(--ink); }
#vsRemake .vs-rmfold > summary::after {
  content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .15s ease;
}
#vsRemake .vs-rmfold[open] > summary::after { transform: rotate(-135deg); }
#vsRemake .vs-rmfold > p.note { margin: 6px 0 4px; }
#vsRemake .vs-rmrow { margin-top: 14px; }
#vsRemake .vs-slotrow { flex-wrap: nowrap; }
#vsRemake .vs-slotrow > select { flex: 1 1 auto; min-width: 0; }
#vsRemake .vs-slotrow > .btn { flex: none; min-height: 46px; display: inline-flex; align-items: center; }
#vsRemake .segs { margin-top: 6px; }
#vsRemake .vs-rmgo { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
#vsRemake .vs-rmgo > button { min-height: 44px; padding: 0 18px; }
#vsRemake .vs-rmtitle { margin: 22px 0 10px; }

/* ---------------------------------------------------------------- the columns */
:is(.v-video, .v-pictures) .vs-body { column-gap: 24px; }
:is(.v-video, .v-pictures) .vs-galh { margin-top: 0; }
@media (min-width: 1200px) {
  /* the form at the left, the side cards and the open result at the right, and every
     made thing across the whole width below both, so no column ends in a dead area */
  :is(.v-video, .v-pictures) .vs-body {
    grid-template-rows: auto auto auto auto minmax(0, 1fr) auto auto auto; row-gap: 0;
  }
  :is(.v-video, .v-pictures) .vs-body > .vs-form { grid-column: 1; grid-row: 1 / 6; align-self: start; }
  :is(.v-video, .v-pictures) .vs-body > .vs-side { display: contents; }
  :is(.v-video, .v-pictures) .vs-side > .vs-spend { grid-column: 2; grid-row: 1; }
  :is(.v-video, .v-pictures) .vs-side > .vs-remake { grid-column: 2; grid-row: 2; }
  :is(.v-video, .v-pictures) .vs-side > .vs-galh { grid-column: 2; grid-row: 3; margin: 0 0 10px; }
  :is(.v-video, .v-pictures) .vs-side > .vs-gens:has(> .vs-full) { display: contents; }
  :is(.v-video, .v-pictures) .vs-side > .vs-gens:not(:has(> .vs-full)) { grid-column: 2; grid-row: 4; }
  :is(.v-video, .v-pictures) .vs-gens > .vs-full { grid-column: 2; grid-row: 4; align-self: start; min-width: 0; overflow-wrap: anywhere; }
  :is(.v-video, .v-pictures) .vs-gens > .vs-gallery { grid-column: 1 / -1; grid-row: 6; margin-top: 32px; min-width: 0; overflow-wrap: anywhere; }
  :is(.v-video, .v-pictures) .vs-gens > .ps-added { grid-column: 1 / -1; grid-row: 7; min-width: 0; }
  :is(.v-video, .v-pictures) .vs-side > .ps-cannot { grid-column: 1 / -1; grid-row: 8; }
}
@media (max-width: 1199px) {
  /* one column: the clips come before Remake a clip */
  .v-video .vs-side { display: flex; flex-direction: column; }
  .v-video .vs-side > .vs-remake { order: 3; margin-top: 16px; }
}

/* ---------------------------------------------------------------- results and gallery */
/* the open picture in its own shape, never pillarboxed in black */
.v-pictures .ps-main { background: var(--panel-2); }
.v-pictures .ps-main img { width: auto; max-width: 100%; margin: 0 auto; }
:is(.v-video, .v-pictures) .vs-gens .vs-clip { max-height: 62vh; }
:is(.v-video, .v-pictures) .vs-tile img, :is(.v-video, .v-pictures) .vs-tile .vs-nopic { background: var(--panel-2); }
.v-pictures .ps-pic { background: var(--panel-2); }
/* the meta line and the model sentence are quieter than the picture */
:is(.v-video, .v-pictures) .vs-gen p.note.vs-facts { font-size: 12.5px; color: var(--muted); }
html[data-layout="simple"] .v-pictures .ps-gen .ps-model { display: none; }
/* the gallery heading and its search share one centre line */
:is(.v-video, .v-pictures) .vs-galhead { align-items: center; min-height: 44px; }
:is(.v-video, .v-pictures) .vs-galhead h4 { letter-spacing: .08em; }

/* the actions: one primary, then the rest at one height; Delete apart at the end */
:is(.v-video, .v-pictures) .vs-gen .actions { align-items: center; gap: 8px; }
:is(.v-video, .v-pictures) .vs-gen .actions > :is(button, .btn) { min-height: 40px; padding: 0 14px; }
:is(.v-video, .v-pictures) .vs-gen .actions > .ghost:not(.danger) { border-color: var(--line); }
:is(.v-video, .v-pictures) .vs-gen .actions > .pc-del { margin-left: auto; }
:is(.v-video, .v-pictures) .vs-gen .pc-moreacts { display: none; }
/* the Simple layout keeps the main steps in view and the rest behind More actions */
html[data-layout="simple"] :is(.v-video, .v-pictures) .vs-gen:not(.pc-open) .actions > .pc-tert { display: none; }
html[data-layout="simple"] :is(.v-video, .v-pictures) .vs-gen .pc-moreacts { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin-top: 6px; padding: 0 2px; color: var(--muted); }
html[data-layout="simple"] :is(.v-video, .v-pictures) .vs-gen .pc-moreacts::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
html[data-layout="simple"] :is(.v-video, .v-pictures) .vs-gen.pc-open .pc-moreacts::after { transform: translateY(1px) rotate(-135deg); }
@media (max-width: 899px) {
  :is(.v-video, .v-pictures) .vs-gen .actions > :is(button, .btn) { min-height: 44px; flex: 1 1 calc(50% - 8px); }
  :is(.v-video, .v-pictures) .vs-gen .actions > .pc-del { flex: 0 1 auto; margin-left: auto; }
  :is(.v-video, .v-pictures) details > summary { min-height: 44px; display: flex; align-items: center; }
  :is(.v-video, .v-pictures) button.mini, :is(.v-video, .v-pictures) .btn.mini { min-height: 44px; }
}

/* ---------------------------------------------------------------- type */
:is(.v-video, .v-pictures) .vs-h, :is(.v-video, .v-pictures) .card h2 { font-size: 12px; letter-spacing: .08em; }
:is(.v-video, .v-pictures) .segs button[aria-selected="true"] {
  background: color-mix(in srgb, var(--primary, var(--accent)) 22%, var(--panel)); color: var(--ink); font-weight: 600;
  box-shadow: 0 0 0 1.5px var(--primary, var(--accent)) inset;
}

/* D521: the clip card is the clip's still with a play button (D461), its own shape, never cropped */
.vs-gen .vs-clip.vs-rmstill { width: 100%; max-width: 100%; aspect-ratio: 16 / 9; max-height: 62vh; margin: 0 auto;
  border-radius: 12px; background: #000; }
.vs-gen .vs-clip.vs-rmstill img { object-fit: contain; }
.vs-gen .vs-clip.vs-rmstill .playbadge { width: 64px; height: 64px; }
.vs-gen .vs-clip.vs-rmstill .playbadge svg { width: 30px; height: 30px; }
.vs-gen .vs-clip.vs-rmstill:focus-visible { outline: 2px solid var(--accent, #3167ed); outline-offset: 2px; }
/* a choice row inside a form is part of the form: never the tray tabs' sticky bar, which
   rode over the price and Make footer while the Video form scrolled */
:is(#vsForm, #vsRemake, #vsSide) .segs { position: static; box-shadow: none; z-index: auto; }

/* D536: Remake a clip is a way of working of its own; its card takes the form's place */
#vsForm[hidden], #vsRemake[hidden] { display: none !important; }
.vs-body > .vs-remake { min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 1200px) {
  :is(.v-video, .v-pictures) .vs-body > .vs-remake { grid-column: 1; grid-row: 1 / 6; align-self: start; }
}

/* D539: the gallery lists the clips of the way of working chosen, or All */
.vs-galswitch { display: flex; gap: 8px; margin: 4px 0 10px; flex-wrap: wrap; }
.vs-galswitch button { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line, rgba(255,255,255,.18));
  background: transparent; color: inherit; font: inherit; font-size: 14px; cursor: pointer; }
.vs-galswitch button.on { background: var(--primary, #3167ed); border-color: transparent; color: #fff; }

/* Make it real (the founder, 16/11/2026): the read-back's rows on a clip made real, each with its
   verdict as a dot and the reader's words; the upload's bar; the plan's sentence */
.vs-readback { margin: 8px 0 4px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line, rgba(255,255,255,.18)); }
.vs-readback b { display: block; font-size: 13px; opacity: .8; font-weight: 600; margin-bottom: 4px; }
.vs-readback ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.vs-readback li { position: relative; padding-left: 16px; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.vs-readback li::before { content: ''; position: absolute; left: 2px; top: .5em; width: 8px; height: 8px; border-radius: 50%; background: var(--muted, #888); }
.vs-readback li.rb-yes::before { background: var(--ok, #2fa36b); }
.vs-readback li.rb-partly::before { background: var(--warn, #d9a43b); }
.vs-readback li.rb-no::before { background: var(--bad, #e5484d); }
.vs-readback.pending li { opacity: .75; }
.vs-real .vs-realplan .note { margin: 4px 0; }
.vs-real .vs-realupbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.vs-real .vs-realupbar .vs-bar { flex: 1 1 160px; margin: 0; }
#vsRealGo[hidden] { display: none; }
@media (max-width: 899px) {
  .vs-real .vs-rmgo button, .vs-real .vs-realplan button, .vs-real .vs-realup, .vs-gen .actions .vs-tap44 { min-height: 44px; }
}

/* 17/11/2026, Related: a clip and every clip made from it in one row, beside All. A tile whose
   family has two or more clips carries its "N related" chip under it; inside Related each tile
   carries one line saying what it is to the clip it came from */
.vs-tiles > .vs-tilewrap { width: 180px; display: flex; flex-direction: column; gap: 6px; scroll-snap-align: start; flex: 0 0 auto; }
.vs-tilewrap > .vs-tile { width: 100%; }
.vs-relchip { align-self: flex-start; min-height: 32px; padding: 0 12px; border-radius: 999px; font: inherit; font-size: 12.5px;
  font-weight: 600; border: 1px solid var(--accent, #3167ed); background: transparent; color: inherit; cursor: pointer; white-space: nowrap; }
.vs-relchip:hover, .vs-relchip:focus-visible { background: var(--accent, #3167ed); color: #fff; }
.vs-gen .ecm-sect .vs-relchip { margin-left: auto; }
.vs-rel { display: block; padding: 6px 9px 0; font-size: 12px; line-height: 1.3; color: var(--muted, #9aa3ad);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-rel.vs-relhere { color: inherit; }
.vs-tile:has(.vs-relhere) { border-color: var(--accent, #3167ed); }
.vs-relgroup { margin-top: 12px; }
.vs-relgroup .ecm-sect { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.vs-relgroup .ecm-sect h4 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.vs-relgroup .ecm-sect .mini { margin-left: auto; }
.vs-relremake { margin-top: 6px; }
@media (max-width: 899px) {
  .vs-tiles > .vs-tilewrap { width: 42vw; max-width: 180px; }
  .vs-galswitch { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .vs-galswitch button { min-height: 44px; flex: 0 0 auto; padding: 0 12px; }
  .vs-relchip, .vs-relgroup .ecm-sect .mini, .vs-relremake .mini { min-height: 44px; }
}
