/* Laid over the build packs: the design studio's answers given without a reissued pack.
   Every value is the design system's; this file only says where its parts go.

   Design studio issue 476 (21 November 2026), the viewer pages (P04 to P07) at tablet width
   and shot blocks too narrow for their codes. review-room.js sets fr-tablet on the page and
   fr-unfit on a block; without the script the page keeps the packs' own layout. */

/* The time never wraps. */
.sx-transport__time { white-space: nowrap; }

/* A shot block too narrow for its whole code shows none: its border, current mark and name stay. */
.sx-clip.fr-unfit { color: transparent; }

/* A sheet at its bar size (fr-fold, set by review-room.js) shows its bar until it is opened, and
   opened it keeps to the system's sheet height (.sx-sheet), so its bar stays on the screen. */
.sx-sheet.fr-fold:not(.fr-open) > .sx-sheet__body { display: none; }
.sx-sheet.fr-fold.fr-open { max-height: 72%; }
.sx-sheet.fr-fold > .sx-sheet__bar { cursor: pointer; }

/* From 768 to 1023 pixels the Notes panel folds into the phone's sheet, at its bar size, and
   opens to the whole panel over the page; the player takes the page's width beside the rail. */
.fr-tablet-sheet { display: none; }
@media (min-width: 768px) and (max-width: 1023px) {
  .fr-tablet .fr-at-wide > .sx-body { position: relative; }
  .fr-tablet .fr-tablet-sheet { display: flex; }
  .fr-tablet-sheet .sx-panel { width: auto; border-left: 0; padding: 0; background: transparent; }
}

/* From 1024 to 1279 pixels, with the panel beside the player, the cut's shot label folds away
   first when the transport is short of room, as P05's does (fr-hide-md). */
@media (min-width: 1024px) and (max-width: 1279px) {
  .fr-at-wide .sx-transport > .fr-dim { display: none; }
}

/* Design studio, issue 151 (21 November 2026, 07:23): served from the record, P18's "One at a
   time" has one still. It sits centred at the pack's main still's size, with no empty side
   column; the phone keeps the pack's one column. */
.ps-sheet.fr-one { grid-template-columns: minmax(0, 1fr) minmax(0, 4fr) minmax(0, 1fr); }
.ps-sheet.fr-one > figure { grid-column: 2; }
.ps-phone .ps-sheet.fr-one { grid-template-columns: minmax(0, 1fr); }
.ps-phone .ps-sheet.fr-one > figure { grid-column: auto; }

/* Design studio, issue 161 (21 November 2026, 08:13): with no render the cut has no Play, so
   its two shot arrows sit side by side instead of either side of an empty gap. Scoped to the
   cut's transport (design check of Film PR 270, Film issue 258, 24 November 2026): unscoped it
   overrode P12's steps grid, so a prompt guide's steps stayed in one row on a phone. */
.sx-transport > .fr-steps { display: inline-flex; align-items: center; gap: var(--sx-space-2); }

/* P12's rules as cards on a phone (Film issue 271): the rule's paragraph keeps no margin, as
   the design check of Film PR 270 asked. Scoped to the rules, so the format's drawn evidence
   cards keep the pack's own spacing. */
.fr-rule-cards .fr-note-text { margin: 0; }

/* P12's rules as cards below 1024 pixels too (design studio, Film issue 258, 24 November 2026,
   option A): at tablet width the rules' box is no wider than a large phone, and a source that
   names a file path pushed the three-column table past it (Codex's browser test, PR 276, the
   Wan guide at 820). Only the rules move: steps, the format's evidence cards and every other
   wide and narrow pair keep the 768 switch. Between 768 and 1023 the cards look as they do at
   390, so the system's phone card rules are repeated here for the rules alone, the hidden
   "Rule" header row among them, but for the cell's 2px padding, which the design system has no
   value for (check-system-values refuses a number of our own), so it is 0 here. A source line
   breaks a long path inside the card at any width. */
@media (min-width: 768px) and (max-width: 1023px) {
  .sx-table-box > .fr-at-wide:has(+ .fr-at-narrow > .fr-rule-cards) { display: none; }
  .sx-table-box > .fr-at-narrow:has(> .fr-rule-cards) { display: contents; }
  .fr-rule-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .fr-rule-cards, .fr-rule-cards tbody, .fr-rule-cards tr, .fr-rule-cards td { display: block; }
  .fr-rule-cards tr { padding: var(--sx-space-3) var(--sx-space-4); border-bottom: 1px solid var(--sx-line-row); }
  .fr-rule-cards tr:last-child { border-bottom: 0; }
  .fr-rule-cards td { padding: 0; border: 0; }
}
.fr-rule-cards td > .fr-sub:not(.fr-num) { overflow-wrap: anywhere; }

/* Full screen: the dark well fills the screen with the picture in its middle, a phone's too
   (Codex's browser test, PR 189: a phone's picture stayed at the top of the screen). */
.sx-well:fullscreen { align-items: center; justify-content: center; }
/* Codex's browser test on PR 228 (21 November 2026): Takes side by side keeps its pack's
   stretch, so its sized takes area takes the screen's width (centred, it had none, and the
   takes shrank to marks); a phone's well, drawn as a block, becomes a column with its
   pictures in the middle of the screen instead of at its top. */
.ps-well:fullscreen { align-items: stretch; }
.ps-phone-well:fullscreen { display: flex; flex-direction: column; align-items: stretch; justify-content: center; }

/* Design studio issue 488 (21 November 2026, corrected 09:50, pictures 01 to 14): a viewer's
   header leaves out the area place and holds the film as a place. Only the film's name gives
   way and wraps (Signal OSX rule (d)); the other places keep one line and a tag never wraps,
   until Signal OSX 0.20.1 carries these rules (studio OI-309). No film place under 1024 pixels:
   the part menu's first row is the way back. The rules hold only in a header with a film
   place, so P03's film switcher keeps the pack's behaviour (Codex, PR 201). */
.sx-header > .fr-area-place { display: none; }
.sx-header:has(> .fr-film-place) > .sx-switch:not(.fr-film-place) { flex-shrink: 0; }
.sx-header:has(> .fr-film-place) > .sx-switch:not(.fr-film-place),
.sx-header:has(> .fr-film-place) > .sx-switch:not(.fr-film-place) * { white-space: nowrap; }
.sx-header:has(> .fr-film-place) > .sx-switch .sx-tag { white-space: nowrap; }
/* The film menu scrolls inside the screen when the organisation has many films, and the part
   menu when a film holds every part (Codex, PR 201). */
.fr-films-menu, .fr-part-menu { max-height: 70vh; overflow-y: auto; }
/* Never wider than the window, a gap each side (Codex's live browser test on PR 222: a tablet's
   film menu ran off the right edge); review-room.js keeps it in from the right. */
.fr-films-menu, .fr-part-menu { max-width: calc(100vw - 2 * var(--sx-space-2)); }
@media (max-width: 1023px) { .sx-header > .fr-film-place { display: none; } }
/* Design check of PR 201 (studio issue 488, 10:06): under 1024 pixels "Film Platform" may wrap,
   so the header's end stays on the screen in German (until Signal OSX 0.20.1, OI-311); the part
   menu hangs 4 pixels below its switcher, as the system's anchored menu does. */
@media (max-width: 1023px) {
  .sx-header:has(> .fr-film-place) > .sx-switch[data-fr-menu="fr-module-menu"],
  .sx-header:has(> .fr-film-place) > .sx-switch[data-fr-menu="fr-module-menu"] * { flex-shrink: 1; white-space: normal; }
}
.fr-part-menu { margin-top: var(--sx-space-1); }

/* P05 on a wireframe: every box's fill is painted first and every label and outline after, over
   all the fills, so a later box never hides an earlier box's label (Codex's browser test, PR 209,
   21 November 2026: London scene 020's "Sunrise, warm haze" lay under the tower). The markup is
   the pack's; only the fill moves to a layer under the labels. */
.fr-grey--big { isolation: isolate; }
.fr-grey--big .fr-shape { background: transparent; }
.fr-grey--big .fr-shape::before { content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit; background: var(--sx-selected); }

/* The phone viewer's part switcher and its sheet (design studio issue 488, the answer of 13:10 on
   21 November 2026; the studio's set CSS, source/phone.mjs). The back row wraps rather than cuts:
   when the switcher and Stills or Animatic do not fit on one line, Stills or Animatic moves to a
   second line at the right edge; neither shrinks, so nothing is cut or scrolls sideways. */
.fr-phone-context:has(> .fr-part-switch-phone) { flex-wrap: wrap; row-gap: var(--sx-space-1); padding: var(--sx-space-1) var(--sx-space-4); }
.fr-phone-context > .fr-part-switch-phone { flex: none; min-height: 36px; padding: 0 var(--sx-space-2); gap: var(--sx-space-2); }
.fr-phone-context:has(> .fr-part-switch-phone) > .sx-seg { flex: none; }
.fr-phone-context:has(> .fr-part-switch-phone) > .sx-seg button { white-space: nowrap; }
.fr-phone-context > .fr-part-switch-phone .sx-tag { white-space: nowrap; }
.fr-part-scrim { position: fixed; inset: 0; z-index: 20; background: var(--sx-scrim); }
.fr-part-sheet { position: fixed; z-index: 21; max-height: 80%; }
.fr-part-sheet .sx-sheet__body { padding: var(--sx-space-2) var(--sx-space-2) var(--sx-space-4); gap: 0; }
.fr-part-sheet .sx-menu { min-width: 0; padding: 0; background: none; box-shadow: none; }
.fr-part-sheet .sx-menu.fr-part-menu { max-height: none; max-width: none; overflow: visible; margin-top: 0; }
.fr-part-sheet .sx-menu__item { min-height: 44px; }
.fr-part-sheet .sx-menu__item > svg:first-child + span:last-child { margin-left: 0; }

/* Design studio, design check of P15 to P19 (21 November 2026, should-fix 2): on a phone, a
   take's card with no recipe line and no checks shrinks to its head. Its list holds nothing
   shown (at most the pack's spacer row, hidden on a phone), so it takes no room or gap. */
.ps-phone .fr-card > .sx-take__meta:not(:has(> li:not(.ps-pad))) { display: none; }

/* P24 Studio rigs (build pack v10): a style the record holds no preview strip for (the Lab keeps no
   picture of a style at light, medium and strong yet) leaves its strip out, and its row keeps
   only the name and the strength, so the name does not sit squeezed into the strip's column
   (sheet.md: a part the record does not hold is left out; for the studio's design check). */
.rc-srow:not(:has(> .rc-strip)) { grid-template-columns: minmax(0, 1fr) auto; }

/* P17's shot list (design studio issue 507, the redraw of 21 November 2026, studio commit 37ce768,
   OI-316), as the drawing sets it: the list hangs from the shot's switch, as wide as its longest
   line from 360 pixels up to the window less 32, never cut; each row is the shot's name, what it
   waits on in the system's small line and the tick of the shot in view, whose space every row
   keeps so the small lines end on one edge; only the shots scroll. On a phone it is the same list
   in a bottom sheet with rows 44 pixels high, the way back to the film at its top and the Shot
   board at its foot, and the page behind does not scroll. The shots keep the menu's own gap
   between rows (the system's .sx-menu, which the drawing gives as 2 pixels). */
.fr-shot-menu { display: flex; flex-direction: column; width: max-content; min-width: 360px; max-width: calc(100vw - 32px); }
.fr-shot-item > small { overflow: visible; text-overflow: clip; margin-left: auto; text-align: right; }
.fr-shot-scroll { display: flex; flex-direction: column; gap: inherit; overflow-y: auto; min-height: 0; flex: 1 1 auto; }
.sx-menu__item.fr-shot-item > .sx-icon:last-child:not(:first-child), .sx-menu__item.fr-shot-item > .fr-tick-space:last-child:not(:first-child) { flex: none; width: 16px; height: 16px; margin-left: 0; }
.fr-shot-menu .sx-menu__item > svg:first-child + span:last-child, .fr-shot-sheet .sx-menu__item > svg:first-child + span:last-child { margin-left: 0; }
.fr-shot-sheet { position: fixed; z-index: 21; max-height: 80%; display: flex; flex-direction: column; }
.fr-shot-sheet .sx-sheet__body { display: flex; flex-direction: column; padding: var(--sx-space-2) var(--sx-space-2) var(--sx-space-4); gap: 0; min-height: 0; overflow: hidden; }
.fr-shot-sheet .sx-menu { display: flex; flex-direction: column; min-width: 0; min-height: 0; max-height: none; max-width: none; margin-top: 0; padding: 0; background: none; box-shadow: none; }
.fr-shot-sheet .sx-menu__item { min-height: 44px; }
.fr-sheet-open, .fr-sheet-open body { overflow: hidden; }
/* A film's name longer than the list may be wide wraps in the way back to the film rather than
   running off the sheet's or the window's edge (a long name is not drawn; for the design check). */
.fr-shot-menu > .sx-menu__item:first-child, .fr-shot-sheet .sx-menu > .sx-menu__item:first-child { white-space: normal; padding-block: var(--sx-space-1); }
