/* =====================================================================
   THE SHARED SHELLS — section 1 of the 17 September 2026 build list.

   Four things every screen in SGE uses, settled once so that the sections
   built on top of this one do not each answer them again:

     A1   a form opens as a centred card over the page it was opened from
     B16  a set of records is a table with a quick view per row
     B17  opening a quick view does not break the page behind it
     B18  no control is left floating in empty space
     B19  buttons look the same everywhere

   NOTHING NEW IS INVENTED HERE. Every colour, space, radius, size and
   duration below is a token already declared in public/style.css, and every
   construction is one DESIGN.md already describes. This file adds no palette,
   no second type scale and no sixth button shape — that is the whole point of
   it. Where DESIGN.md records a disagreement rather than a rule, the note
   beside the rule says which side was taken and why.

   THE ONE COLOUR DECISION, STATED: no pills. DESIGN.md, "Border radius":
   `--r-pill` is retired to 8px on Keith's own instruction of 27 August 2026 —
   "we should all standardize to the square or rectangular with a round
   corner". The build list's own line for B19 calls SGE's primary "a rounded
   pill"; DESIGN.md governs and no capsule is drawn anywhere below.
   ===================================================================== */

/* =====================================================================
   B16 / B17 — A SET OF RECORDS IS A TABLE, AND OPENING A QUICK VIEW DOES
   NOT BREAK THE PAGE BEHIND IT.

   KEITH, on the pattern: "Do you see the standard pattern now. is this how
   the system default to show almost everything with a list."
   KEITH, on what opening one does: "and you see the layout goign wrong. The
   quick view also looks wrong to with missing important infromation to be
   there".

   WHAT WAS WRONG, MEASURED. On /customers/20?tab=contacts at 1440px the
   Contacts table is a table 1337px wide with the panel closed. Open the quick
   view and public/list-preview.css's catch-all for an unwrapped table —
   `main :not(.list-results):not([data-list-scroll]) > table { display: block }`
   — turns it into a block box. A block-level table loses table layout: its
   sections shrink-wrap to their content, so the last column heading stopped at
   x=545 while the panel stood at x=1085. Five hundred and forty pixels of bare
   grey between the table and the panel, which is exactly the fault Keith
   pointed at.

   THE FIX IS THE ONE list-preview.css ALREADY CHOSE FOR LISTS, applied to a
   record's tables: give the table a WRAPPER and scroll the wrapper, so the
   table stays a table, one layout sizes headings and rows together, and it
   fills the column it is given. src/shells.js recordTableHtml() emits that
   wrapper, and because the wrapper carries `data-list-scroll` the catch-all
   above no longer matches — the `[data-list-scroll] > table { min-width:100% }`
   rule beside it does instead. One box, every record table, nothing per screen.
   ===================================================================== */
.record-scroll {
  overflow-x: auto;
  max-width: 100%;
}
.record-scroll > table {
  min-width: 100%;
}
/* THE OFFSET BELONGS TO WHOEVER SCROLLS. The shell pins a column heading at
   `top: var(--appbar-h)`, which describes the window; inside a scrollport that
   number means 56px DOWN from the top of the box. `.acct-scroll` takes the same
   line for the same reason (public/style.css). */
.record-scroll thead th { top: 0; }

/* AND THE BOX IS THE SCROLLER — NOT A SECOND BOX INSIDE IT.
   Two bands of public/style.css make EVERY table its own sideways scroller:
   the iPad band (768–1279, "A TABLE TOO WIDE FOR AN iPAD SCROLLS ITSELF") and
   a narrow desk window (up to 767px with a fine pointer). Both do it with
   `display: block`, and a block-level table shrink-wraps its rows — measured at
   820px on 17 September 2026, the account's Contacts table drew 470px of
   columns in an 800px column with the rest bare.

   A table inside `.record-scroll` already has a scroller, so it stays a TABLE
   and the wrapper does the scrolling. That is the same care public/style.css
   takes for `.acct-scroll` two rules later, and it is why the wrapper exists at
   all. Below 767px with a COARSE pointer these rows are cards rather than a
   table (Keith, 30 August 2026, pointer not width), and nothing here touches
   that band.

   The five `:not()`s are not decoration: they are what the iPad rule carries,
   and without matching them this selector is lighter than the rule it has to
   out-weigh. */
@media (min-width: 768px) and (max-width: 1279px) {
  .record-scroll
  > table:not(.cal-week):not(.cal-month):not(.compared):not(.growth-revenue):not(.debrief-dl) {
    display: table;
    overflow-x: visible;
    max-width: none;
  }
}
@media (max-width: 767px) and (pointer: fine) {
  .record-scroll > table.cardlist {
    display: table;
    overflow-x: visible;
    max-width: none;
  }
}

/* =====================================================================
   B18 — NO CONTROL IS LEFT FLOATING IN EMPTY SPACE.

   KEITH: "liek this", pointing at "What the account has had" on the contact
   record — one button alone in the middle of a blank area, measured at
   x=1240 y=760 on a 1440px window with the nearest other control 160px below
   it and outside every card on the screen.

   A CONTROL BELONGS TO SOMETHING. The shell's `.card-actions` row is already
   the bottom-right corner Keith settled on 5 September 2026; what was missing
   is that it has to sit INSIDE the card whose record it acts on, not adrift on
   the page beside it. `.scard > .card-actions` is that: the card's own foot,
   separated from the card's content by the same hairline every other section
   boundary in SGE uses, and never a free-standing paragraph.
   ===================================================================== */
/* A CARD WHOSE CONTENT IS A FORM PUTS ITS ACTION ROW INSIDE THAT FORM — the
   button has to be in the form to submit it — so the row is reached one level
   deeper as well. Same rule, same treatment; nothing about it is a second
   answer. */
.scard > .card-actions,
.scard > form > .card-actions,
.scard > .cx-acts {
  margin-top: var(--sp-md);
  padding-top: var(--sp-sm);
  /* `--line` and not `--line-soft`. DESIGN.md: `--line` is "the one hairline"
     and `--line-soft` is "a soft divider — row separators". This is a section
     boundary, and on the page's own grey ground #f0f0f0 does not draw at all —
     which leaves the control looking exactly as adrift as it did before. */
  border-top: 1px solid var(--line);
}
/* TWO NAMES FOR ONE ROW, AND BOTH GET THE SAME TREATMENT. `.card-actions` is
   the shell's (public/style.css) and `.cx-acts` is the account and contact
   record's (public/customer-record.css); they are the same bottom-right row
   Keith settled on 5 September 2026, written twice. Naming both here is what
   makes B18 one rule instead of a sweep of call sites — converging the two
   names is a tidy-up for whoever rebuilds those tabs, and is not done tonight
   because renaming a class is not a change Keith asked for. */

/* =====================================================================
   B19 — BUTTONS LOOK THE SAME EVERYWHERE.

   KEITH: "Do you see the record button. different from the rest".

   WHAT IS ACTUALLY DIFFERENT, MEASURED rather than assumed. Every primary
   control in SGE computes to `rgb(0, 102, 204) | 8px | 13px | 600`. "Record
   it" on /customers/20/collaborations/new computes to
   `rgb(0, 102, 204) | 8px | 18px | 300` — the same blue and the same corner in
   light mode, but five pixels larger and three weight steps lighter, sitting in
   an action bar FIXED to the foot of the window where the Ask Kate bubble
   covers it. The build list's line for B19 says "a different blue, square
   corners"; in light mode neither is true, and what is true is the size, the
   weight, and the stranding. public/collaborations.css is corrected there.

   THE SECONDARY. DESIGN.md's "Decisions Keith needs to make", item 3, records
   that SGE has FIVE constructions for a non-primary button and that picking one
   is Keith's. This file does not add a sixth: `.btn-secondary` is the shape
   three of the five already share — transparent, one hairline, 8px, 13px/600 —
   so a shell built tonight cannot be the thing that widens the disagreement.
   ===================================================================== */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: var(--tap);
  padding: 11px 22px;
  font-family: var(--font);
  font-size: var(--fs-caption);
  font-weight: 600;
  line-height: 1.29;
  letter-spacing: var(--ls-caption);
  color: var(--t2);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
/* Hover steps the surface, never the label — "A button's label is never
   underlined, in any state" (Keith, 4 September 2026; DESIGN.md). */
.btn-secondary:hover {
  background: var(--panel-2);
  color: var(--t1);
  text-decoration: none;
}

/* =====================================================================
   A3 / B53 — A RECORD'S TAGS AND BUTTONS BELONG IN A HEADER, NOT ABOVE
   THE BACK LINK.

   KEITH, of the inbound lead record: "You see the payout issue" — layout.
   KEITH, of the quote request record: "same thing format totally wrong. so
   messy". On both, the stage bar or the state tag and the record's two or
   three buttons sat ABOVE the reference and the back link.

   WHY IT HAPPENS, AND IT IS NOT THESE TWO SCREENS' DOING. The page shell
   lifts the first <h1> out of the body and into the app bar
   (src/app.js hoistPageName), so `rh-top` — which is name, badges and
   actions on one row — is left holding badges and actions with nothing to
   anchor them. Under it comes the nav line. The eye therefore meets a stage
   bar and a button first and the record's own reference second.

   THE ACCOUNT AND CONTACT RECORDS ALREADY SOLVED THIS, in
   public/customer-record.css: `.cx .rh-nav { order: -1 }` puts the way back
   on top and the badges row reads as the header beneath it. These two
   screens are not under `.cx`, so the rule lives here instead of being
   written a third time — and it is OPT-IN, asked for by name, so no record
   page that has not asked changes.
   ===================================================================== */
.recordhead.rh-backfirst {
  display: flex;
  flex-direction: column;
}
.recordhead.rh-backfirst .rh-nav {
  order: -1;
  margin: 0 0 var(--sp-xs);
}
/* The way back is tapped as often as anything on the screen, so the ANCHOR
   carries the 44px target rather than the paragraph around it — the same
   treatment `.cx .rh-nav a` gives it on the account and contact records. */
.recordhead.rh-backfirst .rh-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding-right: var(--sp-xs);
  white-space: nowrap;
}
/* THE RECORD'S OWN REFERENCE, IN THE HEADER ROW, where the hoisted name used
   to be. It is the identifier the catalogue asks a record header to carry,
   and without it the row is a bar and two buttons with no subject. */
.recordhead.rh-backfirst .rh-ref {
  font-size: var(--fs-tagline);
  font-weight: 600;
  line-height: 1.19;
  letter-spacing: var(--ls-tagline);
  color: var(--t1);
  white-space: nowrap;
}

/* =====================================================================
   A1 — A FORM OPENS AS A CENTRED CARD OVER THE PAGE IT WAS OPENED FROM.

   KEITH: "how to redo this format better the empty space inthe middle is
   weird. / Which do you recommend / go with your recommendation."

   THE CARD IS 720px, ITS FIELDS ARE TWO COLUMNS, AND ITS BUTTONS ARE BOTTOM
   RIGHT INSIDE IT. Nothing of the form is pinned to the window: the fixed
   action bar is what put "Record it" underneath the Ask Kate bubble, and a bar
   at the foot of the window is not "with the form".

   MORE THAN EIGHT FIELDS AND IT IS NOT A CARD. A card that scrolls inside a
   page that scrolls is the scroll-inside-a-scroll Keith refused, so a longer
   form takes the whole page instead — `.fc-full` below, which is the same two
   columns and the same bottom-right actions with no scrim and no card.
   src/shells.js counts the fields and chooses; the choice is not a caller's.

   WHERE IT SITS IN THE STACK. The app bar is 20, the navigation rail 30, the
   menus 40, the phone menu sheet 55 and its scrim 60. The card is 51 and its
   scrim 50: over everything a person is reading, under the menu that has to be
   able to cover the whole window. (Ask Kate's bubble held 45 between the menus
   and the card from 16 to 17 September 2026; Keith moved her into the app bar
   — "tonight's decision" — so nothing floats at that level any more.)
   ===================================================================== */
.fc-scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--t1) 45%, transparent);
}
@supports not (background: color-mix(in srgb, red 50%, transparent)) {
  .fc-scrim { background: rgba(0, 0, 0, 0.45); }
}
/* THE PAGE BEHIND IS STILL THE PAGE. It is dimmed by the scrim above it and
   made inert, so a click lands on the scrim and nothing underneath can be
   tabbed into while the card is open. */
.fc-behind {
  pointer-events: none;
  user-select: none;
}

.fc-card {
  position: fixed;
  z-index: 51;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100vw - (2 * var(--sp-lg))));
  max-height: calc(100vh - (2 * var(--sp-lg)));
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
}
/* THE WAY BACK KEEPS ITS OWN LINE, above the card's name and never among its
   buttons — DESIGN.md's rule for a record header, which holds for a card for
   the same reason: one place a person looks for it. */
.fc-nav {
  margin: 0 0 var(--sp-xxs);
  font-size: var(--fs-caption);
  line-height: 1.43;
  letter-spacing: var(--ls-caption);
}
.fc-title,
.fc-card .fc-title {
  margin: 0;
  font-size: var(--fs-tagline);
  font-weight: 600;
  line-height: 1.19;
  letter-spacing: var(--ls-tagline);
  color: var(--t1);
}
/* ONE SHORT LINE, AND ONLY WHERE THE FORM ALREADY HAD ONE. "Fields and very
   few words" — a card does not gain a paragraph by being a card. */
.fc-lede {
  margin: var(--sp-xxs) 0 0;
  font-size: var(--fs-caption);
  line-height: 1.43;
  letter-spacing: var(--ls-caption);
  color: var(--t3);
}
.fc-body { margin-top: var(--sp-md); }

/* TWO COLUMNS. A field that holds a sentence — a textarea, an address — takes
   both by carrying `.fc-wide`, because a paragraph in a half-column reads as a
   narrow strip and that is the fault this whole section exists to remove. */
.fc-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-sm) var(--sp-lg);
  align-items: start;
}
.fc-fields > .fc-wide { grid-column: 1 / -1; }

/* THE BUTTONS, BOTTOM RIGHT, INSIDE THE CARD. Not a bar, not fixed, not at the
   foot of the window: `.card-actions` is the shell's own bottom-right row and
   this is it, given the card's foot rule so it reads as part of the card. */
.fc-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-xs);
  margin-top: var(--sp-lg);
  padding-top: var(--sp-sm);
  border-top: 1px solid var(--line);
}
/* The doubled class lifts this above `.visit-form button[type="submit"]` and
   `.manage-form button[type="submit"]` (public/style.css), which put a 0.6rem
   top margin on a stand-alone submit button and, being class-plus-attribute,
   used to beat this rule — leaving Save lower than Cancel in the same row. */
.fc-foot.fc-foot > :is(button, .btn-primary, .btn-secondary, a) { width: auto; margin: 0; flex: 0 0 auto; }

/* THE FULL-PAGE FORM — more than eight fields. Same two columns, same
   bottom-right actions, no card and no scrim. */
.fc-full .fc-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-sm) var(--sp-lg);
  align-items: start;
}
.fc-full .fc-fields > .fc-wide { grid-column: 1 / -1; }

/* THE FULL-PAGE FORM IS THE CARD'S SHAPE WITHOUT THE SCRIM — EVERY ONE OF THEM.
   KEITH, 21 October 2026, on /projects/new: "What is this layout!!! come one..
   i hate to keep telling you on the alignment / Don't you have any sense of
   standarisation for a system.. / you do what is right ok."

   `.fc-boxed` below fixed this for the address forms alone, so every other
   full-page form still ran edge to edge with its action row outside anything.
   The same limit, panel and field rule now belong to `.fc-full` itself, so a
   form that crosses eight fields is the same 720px panel as one that does not,
   with both columns the same width, every box the width of its column and the
   actions bottom right INSIDE the panel. The values are `.fc-boxed`'s own, so
   the address forms do not move. */
.fc-full {
  max-width: 720px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
}
.fc-full .fc-fields :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]), select, textarea) {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
}
.fc-full .fc-fields > * { min-width: 0; }

/* A FORM WHOSE BOXES FILL THEIR COLUMN — `.fc-boxed`, the address forms.
   KEITH, 21 October 2026: "What is this layout!!! come one.. i hate to keep
   telling you on the alignment".

   WHY `.fc-wide` SEEMED NOT TO WORK. The label did span both columns; the box
   inside it did not. public/style.css caps every single-line input at the
   reading width (34rem = 544px) and sizes a <select> to its longest option, so
   Address 1 stopped at 544px under a label 1100px wide and Type drew at the
   width of "Showroom" beside a Label that filled its column. In a grid the box
   takes its cell, so inside `.fc-boxed` it does.

   THE FULL-PAGE SHAPE BECOMES A CARD WITH A WIDTH LIMIT — the same panel,
   border, radius and padding as `.fc-card` — rather than running edge to edge.
   `.fc-trio` is three equal columns on one row inside the two-column grid. */
.fc-boxed label :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  width: 100%;
  max-width: none;
}
/* The state control not in use is hidden: the field rules above set `display`,
   which outranks the browser's own [hidden]. */
.fc-boxed label [data-region-state][hidden] { display: none; }
/* THE SAME FOR EVERY FULL-PAGE FORM, WHETHER OR NOT ITS BOX IS A <label>. New
   project draws State in a plain <div>, so the rule above never reached it and
   the unused free-text State box stood empty and unlabelled under the real one
   (Keith, 21 October 2026). */
.fc-full .fc-fields [data-region-state][hidden] { display: none; }
.fc-full.fc-boxed {
  max-width: 720px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
}
/* A LONG FORM USES THE PAGE. KEITH, 28 October 2026, on the Edit RFQ Request
   page: "And why is it like that? so many empty space". src/shells.js marks a
   full-page form of more than eleven fields `data-form-width="page"`; it keeps
   the panel's border, radius and padding and drops only the 720px limit. A form
   of nine to eleven fields keeps the 720px panel above. This NARROWS the 21
   October rule; it does not remove it. After `.fc-full.fc-boxed` so it wins. */
.fc-full[data-form-width="page"],
.fc-full.fc-boxed[data-form-width="page"] { max-width: none; }
.fc-trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-sm) var(--sp-lg);
  align-items: start;
}

/* A FORM INSIDE A SECTION CARD — `.fc-inline`. KEITH, 21 October 2026, on
   /plan: "Don't you have any sense of standarisation for a system.." and "What
   is this layout!!! come one.. i hate to keep telling you on the alignment".

   It is the SAME GRID as the address form and the New project form
   (`.fc-fields` / `.fc-wide` above, and their box rule: every box fills its
   column), drawn inside a card of the shared stack (`.cx-pcards`,
   public/customer-record.css) rather than as a card of its own. The form takes
   the card's own inner padding, and its action row is the card's foot — the
   hairline runs the full width of the card, the buttons sit bottom right, and a
   short helper line may stand at the left of the same row. The date field is
   the one control that is not a plain box: it fills its column too, picker
   button at the end, so it lines up with the boxes above and below it. */
.cx-pcards > .scard > form.fc-inline {
  margin: 0;
  padding: var(--sp-sm) var(--sp-md);
}
.cx-pcards > .scard > form.fc-inline > .card-actions {
  margin: var(--sp-sm) calc(-1 * var(--sp-md)) calc(-1 * var(--sp-sm));
  padding: var(--sp-sm) var(--sp-md);
}
form.fc-inline > .card-actions > button[type="submit"] { margin: 0; }
form.fc-inline > .card-actions > .muted { margin: 0 auto 0 0; }
.fc-inline .fc-fields :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="date"]):not(.dfield-text), select, textarea) {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
}
.fc-inline .fc-fields > * { min-width: 0; }
.fc-inline .fc-fields > label > .dfield { display: flex; flex-wrap: nowrap; }
.fc-inline .dfield > .dfield-text { width: auto; flex: 1 1 auto; min-width: 0; }
/* A sentence standing directly in a card of the plan's stack is padded as the
   card's other content is. */
.plan-cards > .scard > p { margin: 0; padding: var(--sp-sm) var(--sp-md); }

/* A PHONE TAKES THE WHOLE WINDOW. 767px is the application's own compact
   boundary (public/style.css), and below it a 720px card with two columns is
   neither. One column, the whole window, and the actions still bottom right —
   so the form is never a scroll inside a scroll on a phone. */
@media (max-width: 767px) {
  .fc-card {
    top: 0; left: 0;
    transform: none;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border: 0;
    border-radius: 0;
    padding: var(--sp-md);
  }
  .fc-fields,
  .fc-full .fc-fields,
  .fc-trio { grid-template-columns: minmax(0, 1fr); }
  .fc-full { padding: var(--sp-md); }
}

/* Reduced motion changes nothing here — the card does not animate in. It is
   said explicitly so a later hand does not add one without reading this. */

/* =====================================================================
   THE PHOTOGRAPH ROW — src/photo-row.js. KEITH, 28 October 2026: "it should be
   able to preview on ths page. like a bigger thumbnail. And user can open it.
   to see earlier. and when more it can be scrolled".

   ONE ROW THAT SCROLLS SIDEWAYS. It never wraps onto a second line and never
   shrinks: a thumbnail is 160px by 160px at every width, cropped to the square,
   so a portrait phone photograph and a landscape plan sit on one line. 160px is
   the largest square that still shows the edge of the next one on a 390px phone
   (two squares and a gap are 332px of the card's ~356px) — the cut-off picture
   IS the sign that there is more. Gap, corner and edge are the shell's tokens
   (--sp-sm, --radius-sm, --line), the three `.thumb` already used.

   THE SQUARE IS RESERVED BEFORE THE PICTURE ARRIVES (the border and --panel-2
   fill sit on the link, not the image), so the row does not jump as pictures
   land. If a picture cannot be shown, public/photo-row.js marks its link and
   the words below take the square's place — nothing is silently blank. */
.ph-row {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding: var(--sp-xs) 0;
}
.cx-pcards > .scard > .ph-row { padding: var(--sp-sm) var(--sp-md); }
.ph-list {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--sp-sm);
  list-style: none;
  margin: 0;
  padding: 0;
  width: max-content;
}
.ph-item { flex: 0 0 160px; scroll-snap-align: start; scroll-margin-inline: var(--sp-md); }
.ph-thumb {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 160px;
  height: 160px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  overflow: hidden;
}
.ph-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph-thumb.ph-failed img { visibility: hidden; }
.ph-thumb.ph-failed::after {
  content: "This photograph could not be shown.";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-xs);
  text-align: center;
  font-size: var(--fs-caption);
  line-height: 1.43;
  color: var(--t3);
}

/* THE LARGE VIEW is the form card's own surface (.fc-scrim + .fc-card above):
   the same scrim, the same stacking, the same Escape. The picture is never
   scaled up past its own pixels and never taller than the window allows. */
.ph-fig { margin: var(--sp-sm) 0 0; }
.ph-big {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 62vh;
  margin: 0 auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
}
.ph-stamp {
  margin-top: var(--sp-xs);
  text-align: center;
  font-size: var(--fs-caption);
  line-height: 1.43;
  color: var(--t3);
}
.ph-view .fc-foot { flex-wrap: wrap; }
.ph-view .ph-orig {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  margin-right: auto;
  font-size: var(--fs-caption);
}
