/* No grey box flashing over whatever is tapped on iOS (a seek bar, a row, a button): every control draws its own
   pressed state. Inherited, so this one rule covers the whole page; a component never sets it again (NowPlayingSheet's
   seek bar shipped without it, 2026-11-06, though VideoControls' had it). */
:root {
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f4f3ef;
  --ink: #141414;
  --ink-2: #3d3d3e;
  --ink-3: #75757a;
  --ink-4: #a4a4a9;
  --line: #e8e7e2;
  --line-2: #dcdbd5;
  --accent: #0a84ff;
  --accent-soft: #e7f0ff;
  --accent-alt: #ff9500;
  --warn: #ff3b30;
  --ok: #32c759;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  /* Safe-area insets via variables rather than raw env() so dev tools — e.g.
     ViewportPreview's iPhone simulation — can override them inside a preview
     iframe. Values are identical to the env() calls they wrap. */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  /* Past the top safe area and the blur an iOS home-screen app's status bar casts below it: where anything at the
     screen's top (a banner, a header, the rail, a full-screen view) starts its content. The blur reaches about 26
     points past the inset on an iPhone 17 Pro Max (62) and an iPad Pro 13" (32), in either orientation; 0 wherever
     the inset is (a browser tab, a Mac, a phone in landscape). */
  --safe-top-clear: calc(var(--safe-top) + min(var(--safe-top), 28px));
  /* Default minimum bottom inset to clear the iPhone home-indicator/drag handle.
     Separate from --safe-bottom (the PWA/env-specified inset) — consumers take
     max() of the two so the drag handle never collides with content, while a
     larger PWA-specified inset is still respected. ViewportPreview sets this to
     12px in its iPhone simulation; otherwise 0. */
  --safe-bottom-default: 0px;
  /* Effective bottom inset: the larger of the drag-handle default and the
     PWA/env-specified inset. Bottom-anchored UI (nav, sheets, toasts) uses
     this so the home indicator never collides with content. */
  --safe-bottom-effective: max(var(--safe-bottom-default), var(--safe-bottom));
  /* The flash that shows where a link landed (utils/flash.ts: flashRange; ToolCallBlock's flash):
     this yellow at this strength, mixed into the page's background behind the text alone, held, then
     easing out. One definition, so every flash looks the same. */
  --stratum-flash-color: #ffd60a;
  --stratum-flash-strength: 55%;
  --stratum-flash-hold: 1.2s;
  --stratum-flash-fade: 0.8s;
  /* The easing out: quadratic, so it lingers, then goes (flashRange steps the same curve). */
  --stratum-flash-ease: cubic-bezier(0.5, 1, 0.89, 1);
  /* Code's colors by kind of token (CodeView's syntax highlighting), after GitHub's light theme. */
  --syntax-keyword: #cf222e;
  --syntax-string: #0a3069;
  --syntax-comment: #6e7781;
  --syntax-constant: #0550ae;
  --syntax-function: #8250df;
  --syntax-parameter: #953800;
  --syntax-inserted: #116329;
  --syntax-deleted: #82071e;
  --syntax-changed: #953800;
  /* The line under a glass bar (the mobile header, the bottom nav): 1px scaled to one device pixel. */
  --stratum-hairline-color: rgba(0, 0, 0, 0.2);
  --stratum-hairline-scale: 1;
}
@media (min-resolution: 2dppx) {
  :root {
    --stratum-hairline-scale: 0.5;
  }
}
@media (min-resolution: 3dppx) {
  :root {
    --stratum-hairline-scale: 0.3334;
  }
}

/* flashRange's text, its strength stepped each frame through --stratum-flash-now. Mixed into the
   page's background rather than made translucent: WebKit paints it once per text box, and where two
   overlap, at a line's start, a translucent one doubled up into a darker strip. */
::highlight(stratum-flash) {
  background-color: color-mix(in srgb, var(--stratum-flash-color) var(--stratum-flash-now, var(--stratum-flash-strength)), var(--bg));
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0b;
    --surface: #141416;
    --surface-2: #1e1e21;
    --ink: #f5f5f7;
    --ink-2: #c7c7cc;
    --ink-3: #8e8e93;
    --ink-4: #636366;
    --line: #2a2a2e;
    --line-2: #3a3a3f;
  }
}

/* No focus ring on anything: the apps drive focus themselves (a list's highlight, the composer), and
   the browser's blue outline on a tapped or clicked control - a nav item, a row - only gets in the
   way. Text fields keep their own focus look (TextInput's :focus-within). */
:focus-visible {
  outline: none;
}

/* A button's label is never selected by clicking it: Safari takes two quick clicks (Earlier, Earlier) as a
   double-click and selects its word. Every button, a stratum one or an app's own. */
button {
  -webkit-user-select: none;
  user-select: none;
}
/* Except a button that reads as part of a sentence (a file name in a reply, a text link): its text stays text, so a
   find's highlight paints on it - Safari painted it on the words after instead, and missed the link (2026-11-01) - and
   copying the sentence takes it. */
.stratum-md-file,
.stratum-link-button,
.stratum-diff-path-link {
  -webkit-user-select: text;
  user-select: text;
}

/* Every link reads as stratum's (Markdown's .stratum-md-link): the accent color, underlined on hover - an app's own
   <a> too, with no class, instead of the browser's blue underline (a commit message's links, 2026-11-01). :where()
   keeps it at no specificity, so any class a component or app sets (a link that reads as its line's text) wins. */
:where(a[href]) {
  color: var(--accent);
  text-decoration: none;
}
:where(a[href]):hover {
  text-decoration: underline;
}
.stratum-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  /* Also used on <a>/<Link> (e.g. a "View" link styled as a button) — no default link underline. */
  text-decoration: none;
  border-radius: 8px;
  padding: 6px 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    color 0.15s;
}
/* On a phone a finger needs more: at least 32 px (ui-probe flags a tap target under 30). */
@media (max-width: 767px) {
  .stratum-button {
    min-height: 32px;
  }
}
.stratum-button svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  /* Icons leave their weight to the caller; at the default 1 they read thin beside the label. One
     that sets its own (e.g. i-crop) keeps it. */
  stroke-width: 1.75;
}
.stratum-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.stratum-button--secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.stratum-button--secondary:hover:not(:disabled) {
  background: var(--surface-2);
}

.stratum-button--primary {
  background: var(--accent);
  color: #fff;
}
.stratum-button--primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 88%, black);
}

.stratum-button--destructive {
  background: var(--warn);
  color: #fff;
}
.stratum-button--destructive:hover:not(:disabled) {
  background: color-mix(in srgb, var(--warn) 88%, black);
}

.stratum-button--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--accent);
  padding: 6px 8px;
  /* ghost buttons sit in header/title-row contexts (next to a 28-32px page
     title), not compact toolbars — 15px reads better there than the 13px
     the other variants use. */
  font-size: 15px;
}
.stratum-button--ghost:hover:not(:disabled) {
  background: var(--surface-2);
}

/* An "outline" warn — same chrome as secondary, but warn-tinted border/text
   instead of a solid destructive fill. For a lower-emphasis warning action
   (e.g. "Retry" on a failed row) where the solid `destructive` variant would
   read as too heavy. */
.stratum-button--warn {
  background: var(--surface);
  border-color: rgba(255, 69, 58, 0.25);
  color: var(--warn);
}
.stratum-button--warn:hover:not(:disabled) {
  background: var(--surface-2);
}
.stratum-sheet-backdrop {
  position: fixed;
  inset: 0;
  /* Ends above an iOS on-screen keyboard (hooks/visualViewportVar.ts), so the sheet flex-aligned to its bottom
     edge stays in view; 0 otherwise, the toolbar's show and hide left to Safari's fixed positioning. */
  bottom: var(--stratum-keyboard-inset, 0px);
  z-index: 100;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.stratum-sheet-backdrop.open {
  opacity: 1;
}
@media (min-width: 768px) {
  .stratum-sheet-backdrop {
    align-items: center;
  }
}

.stratum-sheet {
  /* The body's side padding, for content that runs edge to edge (a list's rows, NowPlayingSheet's) to match. */
  --stratum-sheet-edge: 18px;
  width: 100%;
  /* min() with the same live var the backdrop above uses (falls back to
     plain 80dvh when unset) — without this, a sheet tall enough to hit its
     own cap could still overflow past the shrunk backdrop's TOP edge once
     the keyboard eats space below (flexbox doesn't clip by default), rather
     than the body's own overflow-y:auto scrolling internally like it's
     meant to. */
  max-height: min(80dvh, calc(var(--stratum-vvh, 100dvh) * 0.8));
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  /* Its contents cut to its rounded corners: a row run edge to edge (NowPlayingSheet's playing track, tinted) painted
     square past them (2026-11-16). clip, not hidden: it makes no scroll container, and the shadow is outside it. */
  overflow: clip;
}
.stratum-sheet.open {
  transform: translateY(0);
}
@media (min-width: 768px) {
  .stratum-sheet {
    max-width: 380px;
    border-radius: 16px;
    transform: translateY(12px) scale(0.98);
  }
  .stratum-sheet.open {
    transform: translateY(0) scale(1);
  }
  /* Two-class selector for a safe specificity win over the plain .stratum-sheet rule above,
     regardless of source order. See Sheet.tsx's `size` prop doc for when to use this. */
  .stratum-sheet.stratum-sheet--wide {
    max-width: 520px;
  }
}

.stratum-sheet-grip {
  width: 36px;
  height: 4px;
  background: var(--line-2);
  border-radius: 2px;
  margin: 12px auto 10px;
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .stratum-sheet-grip {
    display: none;
  }
}

.stratum-sheet-head {
  flex-shrink: 0;
  padding: 0 18px 8px;
}
@media (min-width: 768px) {
  .stratum-sheet-head {
    padding: 22px 24px 8px;
  }
}
/* When footer sits directly against head with no body in between (a plain
   confirm prompt — ConfirmSheet's own shape, title+description only), the
   footer's own top divider otherwise reads as cramped against the
   description right above it: head's bottom padding (8px, tuned for the
   normal case of a body's own top spacing taking over from there) is much
   smaller than the footer's own top padding below the divider (18px/20px).
   Matches that instead, so the divider sits evenly spaced on both sides.
   Scoped via :has() so it only fires for this exact "straight from head to
   footer" shape — a Sheet WITH body content (MoveVersionSheet,
   SourcePickerSheet, RegionCropSheet, ...) already gets its spacing from
   the body's own padding instead, and is unaffected. */
.stratum-sheet-head:has(+ .stratum-sheet-footer) {
  padding-bottom: 18px;
}
@media (min-width: 768px) {
  .stratum-sheet-head:has(+ .stratum-sheet-footer) {
    padding-bottom: 20px;
  }
}

.stratum-sheet-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* A header action beside the title: centred on its line, the title keeping its own spacing below. */
.stratum-sheet-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.stratum-sheet-title-row .stratum-sheet-title {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}
.stratum-sheet-header-action {
  flex-shrink: 0;
  margin: -6px -6px -6px 0;
}

.stratum-sheet-description {
  margin: 0;
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.5;
  /* Sized to its text. A sheet whose description changes line count at runtime reserves the
     height itself, so the sheet doesn't jump (see RegionCropSheet's description). A long one scrolls in place: the
     head never shrinks, so uncapped it pushes the body and footer out of the sheet. */
  max-height: min(40dvh, calc(var(--stratum-vvh, 100dvh) * 0.4));
  overflow-y: auto;
}

.stratum-sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  /* Top padding is NOT 0 — see the comment below on why a scrollable
     container needs a bit of room on every edge for whatever sits flush
     against it. 6px comfortably covers the accent focus ring's own 4px
     spread (TextInput.css's `:focus-within` box-shadow) with a little to
     spare for anything similar. */
  padding: 6px var(--stratum-sheet-edge) 26px;
}
@media (min-width: 768px) {
  .stratum-sheet-body {
    --stratum-sheet-edge: 24px;
    padding: 6px var(--stratum-sheet-edge) 22px;
  }
}
/* General gotcha this guards against: `overflow-y: auto` clips anything
   painted outside this element's own box, INCLUDING a child's decorative
   bleed (a focus ring's box-shadow/outline, a selection ring, ...) — not
   just the child's actual content. It can't tell "this pixel is the child's
   own box" apart from "this pixel is a shadow/outline the child painted
   outside its box"; both are outside the child's border box, so both get
   clipped the same way once they cross this container's edge. An
   `autoFocus`ed input (or anything else with its own focus/selection ring)
   placed as the FIRST scrollable child — no sibling above it to absorb the
   bleed — will have that ring's top edge clipped flat unless this padding
   (or equivalent room) exists, purely from being flush against the
   scrollable box's own edge, regardless of how the ring itself is drawn.
   Confirmed for real: MoveVersionSheet's TextInput (character-sheet demo)
   had its focus glow cut off at the top before this fix, from `autoFocus`
   landing on it as this body's very first child. Same reasoning applies to
   ANY future scrollable container in this design system that might host a
   focusable/selectable child flush against its edge — pad for the bleed,
   don't rely on the child's own margin (a child can't push itself outside
   its own overflow-clipped ancestor no matter how it's styled). */

.stratum-sheet-footer {
  flex-shrink: 0;
  display: flex;
  gap: 10px;
  padding: 18px 18px calc(18px + var(--safe-bottom-effective));
  border-top: 1px solid var(--line);
}
@media (min-width: 768px) {
  .stratum-sheet-footer {
    flex-direction: row-reverse;
    padding: 20px 24px 20px;
  }
  .stratum-sheet-footer button {
    flex: 1;
  }
}

.stratum-sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* Needed for correct sizing inside `footer` (a row-direction flex
     container there — see SheetActions.tsx's own doc): without an explicit
     width, this div sizes to its own content as a flex ITEM of footer,
     instead of filling it, leaving its buttons narrow rather than the full
     width they get for free when used as Sheet's plain-block `children`
     instead (ConfirmSheet's own usage). Harmless no-op in the `children`
     case, which was already effectively 100% wide there regardless. */
  width: 100%;
}
@media (min-width: 768px) {
  .stratum-sheet-actions {
    flex-direction: row-reverse;
  }
  .stratum-sheet-actions button {
    flex: 1;
  }
}

.stratum-sheet-btn {
  padding: 13px 14px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  border: none;
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.15s;
}
.stratum-sheet-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--surface-2) 92%, black);
}
.stratum-sheet-btn--destructive {
  background: var(--warn);
  color: #fff;
}
.stratum-sheet-btn--destructive:hover:not(:disabled) {
  background: color-mix(in srgb, var(--warn) 88%, black);
}
.stratum-sheet-btn--accent {
  background: var(--accent);
  color: #fff;
}
.stratum-sheet-btn--accent:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 88%, black);
}
.stratum-sheet-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
@media (min-width: 768px) {
  .stratum-sheet-btn {
    padding: 10px 14px;
    font-size: 14px;
  }
}

/* Sheet's destructiveAction: red text under the fields, apart from them, never a footer button. */
.stratum-sheet-destructive {
  margin-top: 18px;
}
.stratum-sheet-destructive-button {
  padding: 4px 0;
  border: none;
  background: none;
  color: var(--warn);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.stratum-sheet-destructive-button:hover:not(:disabled) {
  text-decoration: underline;
}
.stratum-sheet-destructive-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
@media (min-width: 768px) {
  .stratum-sheet-destructive-button {
    font-size: 14px;
  }
}

/* SheetForm: a sheet's fields, 10px apart (the footer's own gap). */
.stratum-sheet-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stratum-toast-wrap {
  position: fixed;
  bottom: calc(80px + var(--safe-bottom-effective));
  left: 16px;
  right: 16px;
  z-index: 200;
  pointer-events: none;
  display: flex;
  justify-content: center;
}
@media (min-width: 768px) {
  .stratum-toast-wrap {
    bottom: 24px;
  }
}

.stratum-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--bg);
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
  pointer-events: auto;
  max-width: 480px;
}
.stratum-toast-msg {
  flex: 1;
}
.stratum-toast-close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.5;
  padding: 0;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.stratum-toast-close:hover {
  opacity: 1;
}
.stratum-select-overlay {
  position: relative;
  display: inline-flex;
}
.stratum-select-overlay select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  /* iOS draws the select itself as its list opens, opacity aside: its default white background flashed as a square
     over the trigger (MediaViewer's Actions, 2026-11-22). Nothing to draw, and the trigger's shape
     (SelectOverlay.tsx sets it from the trigger when the wrapper has none). */
  background: transparent;
  color: transparent;
  border-radius: var(--stratum-select-overlay-radius, inherit);
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
/* The list's own colors, where a browser draws options from the select's (Chrome). */
.stratum-select-overlay option,
.stratum-select-overlay optgroup {
  color: CanvasText;
  background: Canvas;
}
.stratum-select-overlay select:disabled {
  cursor: not-allowed;
}
.stratum-edit-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 36px;
  border-bottom: 1px solid var(--line);
  background: var(--accent-soft);
}
.stratum-edit-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px calc(6px + var(--safe-bottom, 0px));
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: saturate(1.5) blur(20px);
  -webkit-backdrop-filter: saturate(1.5) blur(20px);
}
@media (prefers-color-scheme: dark) {
  .stratum-edit-bar {
    border-top-color: rgba(255, 255, 255, 0.06);
    background: rgba(10, 10, 11, 0.92);
  }
}
@media (min-width: 768px) {
  .stratum-edit-bar {
    display: none;
  }
}
.stratum-edit-count {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.stratum-edit-spacer {
  flex: 1;
}
.stratum-edit-action svg {
  width: 16px;
  height: 16px;
  /* One weight for every action's icon (they leave it to the caller). */
  stroke-width: 2;
}
/* The archive box has more lines than a check or a cross, so it reads heavier at the same weight. */
.stratum-edit-action use[href='#i-archive'] {
  stroke-width: 1.75;
}
.stratum-edit-action--destructive {
  color: var(--warn);
}

/* EditMenu: its root is a <span> (SelectOverlay's), not a form control, so Button's `:disabled` rules
   can't see it - the same values via a class, and its hover held at rest while disabled (the repeated
   class only out-ranks Button's own `:hover:not(:disabled)`). */
.stratum-edit-menu--disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.stratum-button--secondary.stratum-edit-menu.stratum-edit-menu--disabled:hover {
  background: var(--surface);
}
.stratum-button--ghost.stratum-edit-menu.stratum-edit-menu--disabled:hover {
  background: transparent;
}
/* A cut-off end of a scrolling line fades out (useEdgeFade marks which), eased as the app shell's bottom fade;
   growing and shrinking as it scrolls there and back. Sideways, or down a column with --vertical. */
@property --stratum-edge-fade-start {
  syntax: '<length>';
  inherits: false;
  initial-value: 0px;
}
@property --stratum-edge-fade-end {
  syntax: '<length>';
  inherits: false;
  initial-value: 0px;
}
.stratum-edge-fade {
  --fs: var(--stratum-edge-fade-start);
  --fe: var(--stratum-edge-fade-end);
  -webkit-mask-image: var(--stratum-edge-fade-mask);
  mask-image: var(--stratum-edge-fade-mask);
  --stratum-edge-fade-mask: linear-gradient(
    var(--stratum-edge-fade-direction, to right),
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0.28) calc(var(--fs) * 0.5),
    rgba(0, 0, 0, 0.62) calc(var(--fs) * 0.75),
    #000 var(--fs),
    #000 calc(100% - var(--fe)),
    rgba(0, 0, 0, 0.62) calc(100% - var(--fe) * 0.75),
    rgba(0, 0, 0, 0.28) calc(100% - var(--fe) * 0.5),
    rgba(0, 0, 0, 0) 100%
  );
  transition:
    --stratum-edge-fade-start 0.15s,
    --stratum-edge-fade-end 0.15s;
}
.stratum-edge-fade--vertical {
  --stratum-edge-fade-direction: to bottom;
}
.stratum-edge-fade[data-cut-start] {
  --stratum-edge-fade-start: var(--stratum-edge-fade-size, 28px);
}
.stratum-edge-fade[data-cut-end] {
  --stratum-edge-fade-end: var(--stratum-edge-fade-size, 28px);
}
.stratum-filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.stratum-filter-bar::-webkit-scrollbar {
  display: none;
}
.stratum-filter-bar > * {
  flex-shrink: 0;
  white-space: nowrap;
}
.stratum-filter-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1.5px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
}
/* On a phone a finger needs more: at least 32 px (ui-probe flags a tap target under 30). */
@media (max-width: 767px) {
  .stratum-filter-button {
    min-height: 32px;
  }
}
.stratum-filter-button svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.8;
}
.stratum-filter-button-count {
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--accent);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
}
.stratum-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
}
.stratum-filter-chip-remove {
  margin-left: 1px;
  padding: 0;
  border: none;
  background: none;
  font-size: 13px;
  line-height: 1;
  color: var(--ink-3);
  cursor: pointer;
}
.stratum-filter-chip-remove:hover {
  color: var(--ink);
}
.stratum-filter-reset {
  padding: 4px 2px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
}
.stratum-filter-reset:hover {
  text-decoration: underline;
}
/* PillMenu: the pill doesn't shrink beside a search field, and reads as pressable over its menu. */
.stratum-pill-menu {
  flex: none;
}
.stratum-pill-menu .stratum-filter-button:hover,
.stratum-pill-menu:hover .stratum-filter-button {
  border-color: var(--line);
  color: var(--ink);
}
/* No @media (min-width) breakpoint anywhere in this file, on purpose — this
   panel stays bottom-docked at every width, unlike Sheet's mobile/desktop
   split (see BottomPanel.tsx's own doc). */
.stratum-bottom-panel {
  position: fixed;
  /* Above the on-screen keyboard, which iOS Safari doesn't shrink the layout viewport for (an input in the panel,
     CharacterListSheet's "Merge into…" filter); 0 otherwise, so the toolbar showing and hiding on scroll moves it
     with Safari's own fixed positioning, no script in the loop (hooks/visualViewportVar.ts). */
  bottom: var(--stratum-keyboard-inset, 0px);
  /* Its own GPU layer, as AppShellLayout's bottom chrome: rides the toolbar smoothly and stays pinned after a resume. */
  transform: translateY(0);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* Clear of AppShellLayout's rail (desktop), so it centres over the main column - where the page's
     content is - on every page, with nothing to set up. 0 outside the shell, and on mobile. */
  left: var(--stratum-app-shell-rail-width, 0px);
  right: 0;
  z-index: 100;
  margin-inline: auto;
  /* An app can widen (or narrow) every panel under an element at once - e.g. to its content column. */
  max-width: var(--stratum-bottom-panel-max-width, 720px);
  /* Same live-var cap as Sheet.css's own max-height — without it, the
     panel's height allowance (50vh/420px) stays computed against the full
     pre-keyboard viewport even once `bottom` above has moved it up, so on a
     short enough remaining visible area it could still grow past the real
     top of the visible screen instead of scrolling its own body. */
  max-height: min(50vh, 420px, calc(var(--stratum-vvh, 100vh) * 0.9));
  /* It covers the app shell's bottom nav and a page's accessory (a composer), and its body keeps its
     own bottom padding: no page clearance for them in it - an InfiniteScrollFooter or
     AppShellBottomSpacer in it would otherwise leave a page's worth of empty space at its end. */
  --stratum-app-shell-content-inset-bottom: 0px;
  --stratum-app-shell-bottom-chrome: 0px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  border: 1px solid var(--line-2);
  border-bottom: none;
}

/* Docked to a column of the page's own (desktop): inside an element with this class - positioned, e.g.
   `position: relative` - a panel centres over that element instead of the main column, e.g. a reader's
   text column beside a side rail. Already clear of the app shell's rail there, so no offset for it.
   Mobile keeps the viewport. */
@media (min-width: 768px) {
  .stratum-bottom-panel-dock .stratum-bottom-panel {
    position: absolute;
    left: 0;
  }
}

.stratum-bottom-panel-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  /* Fixed floor + vertically centred close button (below), so the header's
     height and the close button's spacing above/below it are identical no
     matter what the title contains (plain text vs. a drill-down back button). */
  min-height: 36px;
  box-sizing: border-box;
  padding: 0 48px 0 20px;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
}

.stratum-bottom-panel-title {
  /* Shrinks within the header (which leaves room for the close button); its text scrolls sideways. */
  display: flex;
  align-items: baseline;
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

/* The title and its actions, side by side on one line (the header itself spreads its children apart). */
.stratum-bottom-panel-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

/* `actions`: muted meta text, an em dash between each piece that renders - by CSS, not by counting
   children, since a switch that doesn't apply renders nothing. The dash is an inline-block, so a
   piece's hover underline doesn't run through it. */
.stratum-bottom-panel-actions {
  display: flex;
  align-items: baseline;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  color: var(--ink-3);
}
.stratum-bottom-panel-actions:empty {
  display: none;
}
.stratum-bottom-panel-actions > * + *::before {
  content: '—';
  display: inline-block;
  margin: 0 0.3em;
  color: var(--ink-3);
}

/* With onBack: the arrow before the title, the close button's size and hover. Negative margins keep
   it from making the header taller than a plain title's (the header sizes to its in-flow content),
   and line the arrow glyph up with the body's left padding. */
.stratum-bottom-panel-title--back {
  /* Lined up by the title's text, the arrow alone centred: a centred row takes its baseline from its
     first item, and the arrow, having no text, would lend its bottom edge instead - dropping the
     actions beside the title too low. */
  display: flex;
  align-items: baseline;
  gap: 6px;
}
/* A long title is one line that scrolls sideways, no scrollbar, its cut-off ends faded (useEdgeFade). */
.stratum-bottom-panel-title-text {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  white-space: nowrap;
  scrollbar-width: none;
  --stratum-edge-fade-size: 20px;
}
.stratum-bottom-panel-title-text::-webkit-scrollbar {
  display: none;
}
.stratum-bottom-panel-back {
  flex-shrink: 0;
  align-self: center;
  width: 28px;
  height: 28px;
  margin: -5px 0 -5px -5px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
}
.stratum-bottom-panel-back:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.stratum-bottom-panel-back svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.stratum-bottom-panel-close {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 14px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--ink-3);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: background-color 0.15s, color 0.15s;
}
.stratum-bottom-panel-close:hover {
  background: var(--surface-2);
  color: var(--ink);
}

/* BottomPanelSubtitle's line, under the header and outside the body, so it stays as the body scrolls.
   Inline text that wraps: an action in it is muted text too (see the app's rule for meta lines). */
.stratum-bottom-panel-subtitle {
  padding: 0 20px 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-3);
}
.stratum-bottom-panel-subtitle:empty {
  display: none;
}

.stratum-bottom-panel-body {
  /* Fills a panel held taller than its content (see BottomPanel's height), so the spare room sits
     inside the scroll region rather than as a gap below it. */
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* max(), not addition — a normal baseline (18px, same as this always was
     before any safe-area handling existed) for desktop/non-PWA contexts,
     where env(safe-area-inset-bottom) is 0px and would otherwise leave NO
     bottom padding at all. On iOS PWA full-screen mode, the actual inset
     (~34px on a notched device) is bigger than 18px and wins instead —
     without max() (i.e. plain addition), that stacked BOTH amounts on top
     of each other, which read as too much. */
  padding: 0 20px max(18px, var(--safe-bottom-effective));
}

/* BottomPanelSwitch: a view switch among the title's actions. */
.stratum-bottom-panel-switch {
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 400;
  color: var(--ink-3);
  cursor: pointer;
}
.stratum-bottom-panel-switch:hover {
  text-decoration: underline;
}
.stratum-bottom-panel-link {
  text-decoration: none;
}

/* BottomPanelSelect: its trigger underlines on hover like a switch - the select laid over it takes the
   hover, so it's the wrapper's. */
.stratum-bottom-panel-select:hover .stratum-bottom-panel-switch {
  text-decoration: underline;
}
/* A column whose ToolOutputs shrink, each by its share of its own height (flex-shrink weighs by
   size), while the rest keeps its height. */
.stratum-fit-height {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.stratum-fit-height > * {
  flex-shrink: 0;
}
/* Each one shrinks down to its floor: its label and Show all, and three lines of its text or all of it
   if less (ToolOutput measures it into --stratum-tool-output-min) - so a one-line command is never
   cut, and the output gives up the room instead. Without a floor of its own, a flex item's minimum is
   its whole content, and it wouldn't shrink at all. */
.stratum-fit-height > .stratum-tool-output {
  flex-shrink: 1;
  min-height: var(--stratum-tool-output-min, 0px);
  display: flex;
  flex-direction: column;
}
.stratum-fit-height > .stratum-tool-output > * {
  flex-shrink: 0;
}
/* A tail output (the one being watched) gives up its height last: the others shrink to their floors
   first, then it does. Weighting them up rather than it down: shrink factors summing under 1 would
   leave part of the overflow unshrunk. */
.stratum-fit-height > .stratum-tool-output:not(.stratum-tool-output--tail) {
  flex-shrink: 1000;
}
/* Show all at its own width, on the left, as outside a FitHeight - not stretched across, centred. */
.stratum-fit-height > .stratum-tool-output > .stratum-tool-output-more {
  align-self: flex-start;
}
.stratum-fit-height > .stratum-tool-output > pre {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
/* Room to spare (--stratum-fit-room, from FitHeight): a tail output's rows reach into it, showing more
   of its latest lines - raising only its cap, so it grows by that much at most and the panel doesn't.
   Output that already shows whole stays as it is. 20px: its padding. */
.stratum-fit-height > .stratum-tool-output--tail > pre {
  max-height: calc(var(--stratum-tool-output-rows, 1e4) * 1lh + 20px + var(--stratum-fit-room, 0px));
}
.stratum-spinner {
  --stratum-spinner-track: var(--line-2);
  --stratum-spinner-arc: var(--accent);
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}
.stratum-spinner svg {
  display: block;
  width: 100%;
  height: 100%;
}
.stratum-spinner circle {
  fill: none;
  stroke-width: 3;
}
.stratum-spinner-track {
  stroke: var(--stratum-spinner-track);
}
/* A quarter of the circle (2πr = 65.97), sent round by its dash offset. */
.stratum-spinner-arc {
  stroke: var(--stratum-spinner-arc);
  stroke-dasharray: 16.49 49.48;
  animation: stratum-spinner-turn 0.7s linear infinite;
}
/* In a line of text: a little gap before the words it's beside. */
.stratum-spinner--sm {
  width: 12px;
  height: 12px;
  margin-right: 6px;
}
.stratum-spinner--md {
  width: 20px;
  height: 20px;
}
.stratum-spinner--md circle {
  stroke-width: 2.4;
}
@keyframes stratum-spinner-turn {
  to {
    stroke-dashoffset: -65.97;
  }
}
/* A box the picture is drawn in: its size from the page (cover, contain) or its own shape (shape), measured by its
   container units. */
.stratum-live-video {
  position: relative;
  overflow: hidden;
  container-type: size;
  background: #000;
}
.stratum-live-video--shape {
  max-width: 100%;
}
/* The picture's element in the picture's own shape (--stratum-live-video-aspect, its width over height), centred: iOS
   draws a camera's first frames letterboxed whatever object-fit says, and an element of the picture's shape leaves it
   no room for bars. Covering the box, or fitting inside it. */
.stratum-live-video-video {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  background: #000;
}
.stratum-live-video--shape .stratum-live-video-video {
  width: 100%;
  height: 100%;
}
.stratum-live-video--cover .stratum-live-video-video {
  width: max(100cqw, calc(100cqh * var(--stratum-live-video-aspect)));
  height: max(100cqh, calc(100cqw / var(--stratum-live-video-aspect)));
}
.stratum-live-video--contain .stratum-live-video-video {
  width: min(100cqw, calc(100cqh * var(--stratum-live-video-aspect)));
  height: min(100cqh, calc(100cqw / var(--stratum-live-video-aspect)));
}
.stratum-live-video-video--mirrored {
  transform: translate(-50%, -50%) scaleX(-1);
}
/* Over the picture until it shows at its final size: the page's colour and a spinner, the video laid out beneath so it
   presents frames. Above the video, which iOS can draw over a later sibling. */
.stratum-live-video-cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--stratum-live-video-cover, var(--surface-2));
}
.stratum-skeleton {
  display: block;
  width: 100%;
  height: 0.9em;
  background: linear-gradient(90deg, var(--surface-2) 25%, color-mix(in srgb, var(--surface-2) 55%, var(--surface)) 50%, var(--surface-2) 75%);
  background-size: 300% 100%;
  animation: stratum-skeleton-shimmer 1.4s ease-in-out infinite;
}
.stratum-skeleton--text {
  border-radius: 6px;
}
.stratum-skeleton--circle {
  border-radius: 50%;
}
.stratum-skeleton--block {
  border-radius: 12px;
}
@keyframes stratum-skeleton-shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: 0 0;
  }
}
/* Until it's loaded and decoded the picture is moved out of the box (an img clips its own content), so
   no part of it paints, while the box shimmers like a Skeleton. !important: a caller's own
   object-position would otherwise bring the half-loaded picture back. */
.stratum-img--loading,
.stratum-img--failed {
  object-position: -99999px 0 !important;
}
.stratum-img--loading {
  background: linear-gradient(90deg, var(--surface-2) 25%, color-mix(in srgb, var(--surface-2) 55%, var(--surface)) 50%, var(--surface-2) 75%);
  background-size: 300% 100%;
  animation: stratum-skeleton-shimmer 1.4s ease-in-out infinite;
}
.stratum-img--failed {
  background: var(--surface-2);
}
/* An animation, not a transition: callers keep their own transition (a hover zoom). */
.stratum-img--fade-in {
  animation: stratum-img-fade-in 0.25s ease;
}
@keyframes stratum-img-fade-in {
  from {
    opacity: 0;
  }
}
/* A few px in from the card below it, on a page (the Sessions list, Settings) - except in a bottom
   panel, below. */
.stratum-section-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 4px 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
/* Kept to one line beside a long label, which wraps instead. */
.stratum-section-label-trailing {
  flex-shrink: 0;
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
/* Its top padding separates it from the section above; first in its container, there's none, and
   the container's own padding (e.g. a page's, under its header) is room enough. */
.stratum-section-label:first-child {
  padding-top: 0;
}

/* A label and what it labels as one block (LabelledSection). The label keeps its space above it -
   it's always first in this block, which would otherwise drop it (:first-child above) - except when
   the block itself comes first in its container. And 8px below it: with the next label's 20px above,
   sections sit 28px apart, wherever they are (a settings page's groups, a list's sections). */
.stratum-labelled-section {
  display: flex;
  flex-direction: column;
  padding-bottom: 8px;
}
.stratum-labelled-section > .stratum-section-label {
  padding-top: 20px;
}
.stratum-labelled-section:first-child > .stratum-section-label {
  padding-top: 0;
}

/* Kept in view while its section scrolls past (`sticky`), at --stratum-sticky-top: under the page header while it
   shows (desktop's or the phone's), near the top once it slides away. It sticks within its LabelledSection, so the next
   section's label takes over. On the page's background, so rows scroll under it unseen; its space above is margin,
   not padding, so the stuck band is only the label's own line. */
/* At --stratum-sticky-top on every width: under the desktop header too, which is pinned over the scroll area and hid a
   label stuck at 0 behind it (the Tickets tab, 2026-11-20). */
.stratum-section-label--sticky {
  position: sticky;
  top: var(--stratum-sticky-top, 0px);
  z-index: 1;
  background: var(--bg);
  transition: top 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.stratum-labelled-section > .stratum-section-label--sticky {
  padding-top: 8px;
  margin-top: 12px;
}
.stratum-labelled-section:first-child > .stratum-section-label--sticky {
  margin-top: 0;
}
/* Stuck, it also hides the strip above it up to the scroll area's top: on a phone it pins 16px under the status bar
   (--stratum-sticky-top), and rows scrolling past showed through that strip under the clock (2026-11-20). */
.stratum-section-label--stuck::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: var(--stratum-sticky-top, 0px);
  background: var(--bg);
}

/* In a bottom panel: flush, lined up with the panel's title just above. */
.stratum-bottom-panel .stratum-section-label {
  padding-inline: 0;
}

/* A count right after the label (`count`). */
.stratum-section-label-count {
  margin-left: 8px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-4);
}

/* Over full-width rows (`inset="rows"`): lined up with the rows' own text, as a page's content is. */
.stratum-section-label--rows {
  padding-inline: 20px;
}
@media (min-width: 768px) {
  .stratum-section-label--rows {
    padding-inline: 36px;
  }
}

/* A settings group keeps its own 8px below it only when it isn't in a labelled section, which has
   that already. */
.stratum-labelled-section > .stratum-settings-group {
  margin-bottom: 0;
}

/* Over plain text (a meeting's notes): no inset, so the label starts where the text does. */
.stratum-section-label--text {
  padding-left: 0;
  padding-right: 0;
}
.stratum-settings-group {
  margin: 0 0 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.stratum-settings-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  text-decoration: none;
}
/* Hairline between rows, starting after the icon column when there is one. A border, not a 1px
   background: at a fractional zoom Chrome rounds a box's edges to whole device pixels, so a 1px
   box at a fractional offset paints 1 or 2 pixels thick depending on the row; a border's width
   rounds the same everywhere. */
.stratum-settings-row + .stratum-settings-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16px;
  right: 0;
  border-top: 1px solid var(--line);
}
.stratum-settings-row--icon + .stratum-settings-row::before {
  left: 58px;
}
.stratum-settings-row--image + .stratum-settings-row::before {
  left: 78px;
}
.stratum-settings-row-image {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--surface-2);
  overflow: hidden;
}
.stratum-settings-row-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.stratum-settings-row-image--pixelated {
  image-rendering: pixelated;
}
.stratum-settings-row-image--opens {
  cursor: zoom-in;
}
.stratum-settings-row--tappable {
  cursor: pointer;
  transition: background 0.12s;
}
.stratum-settings-row--tappable:active {
  background: var(--surface-2);
}

.stratum-settings-row-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
}
.stratum-settings-row-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
}
.stratum-settings-row-icon--neutral {
  background: var(--surface-2);
  color: var(--ink-2);
}
.stratum-settings-row-icon--waiting {
  background: color-mix(in srgb, var(--accent-alt) 14%, transparent);
  color: var(--accent-alt);
}
.stratum-settings-row-icon--warn {
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  color: var(--warn);
}

.stratum-settings-row-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stratum-settings-row-title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--ink);
}
.stratum-settings-row-value {
  font-size: 13px;
  color: var(--ink-3);
  overflow-wrap: anywhere;
}
.stratum-settings-row-value--mono {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: -0.01em;
}
.stratum-settings-row-below {
  display: block;
  margin-top: 8px;
}
.stratum-settings-row-trailing {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* A row whose trailing holds a field (a sign-in code, a site to add): on a phone the field and its button take a line of
   their own under the title, the field as wide as it fits, instead of squeezing the title into a narrow column. */
@media (max-width: 600px) {
  .stratum-settings-row:has(> .stratum-settings-row-trailing :is(input, textarea, select)) {
    flex-wrap: wrap;
    row-gap: 10px;
  }
  .stratum-settings-row:has(> .stratum-settings-row-trailing :is(input, textarea, select)) > .stratum-settings-row-trailing {
    flex: 1 0 100%;
  }
  .stratum-settings-row--icon:has(> .stratum-settings-row-trailing :is(input, textarea, select)) > .stratum-settings-row-trailing {
    padding-left: 42px;
  }
  .stratum-settings-row:has(> .stratum-settings-row-trailing :is(input, textarea, select)) > .stratum-settings-row-trailing > * {
    flex: 1;
  }
  .stratum-settings-row:has(> .stratum-settings-row-trailing :is(input, textarea, select)) > .stratum-settings-row-trailing .stratum-text-input {
    flex: 1;
    width: auto;
  }
}
.stratum-settings-row-opens {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--ink-3);
}
.stratum-settings-row-opens--page {
  transform: rotate(-90deg);
}
/* A loading row's placeholder, on the value's line. */
.stratum-deploy-status-skeleton {
  display: inline-block;
  vertical-align: middle;
}
.stratum-copy-button {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.stratum-copy-button:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.stratum-copy-button svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.75;
}
.stratum-copy-button--copied {
  color: var(--accent);
}
.stratum-copy-button--copied svg {
  stroke-width: 2.25;
}
.stratum-copy-button--failed {
  color: var(--warn);
}

.stratum-copy-text {
  cursor: pointer;
}
.stratum-copy-text:hover {
  text-decoration: underline;
}
.stratum-copy-text--copied {
  color: var(--accent);
}
.stratum-copy-text--failed {
  color: var(--warn);
}
.stratum-detail-list {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.stratum-detail-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.stratum-detail-row:first-child {
  border-top: none;
  padding-top: 2px;
}

.stratum-detail-text {
  flex: 1 1 auto;
  min-width: 0;
}

.stratum-detail-label {
  font-size: 12px;
  color: var(--ink-3);
}

.stratum-detail-value {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.stratum-detail-value--mono {
  font-family: var(--mono);
  font-size: 13px;
  word-break: break-all;
}

.stratum-detail-copy {
  margin-right: -6px;
}
.stratum-text-input {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

/* Focus ring formula matches SignInPage's .si-input/.otp-cell elsewhere in
   media-app-hetzner — .sr-text-input (this component's origin) had no focus
   state at all, a real accessibility gap, so this reuses an existing
   in-codebase pattern rather than inventing a new one. :focus-within, not
   :focus, since focus always lands on the inner <input>, not this wrapper. */
.stratum-text-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}

.stratum-text-input:has(input:disabled) {
  opacity: 0.5;
}

.stratum-text-input input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 9px 10px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}
.stratum-text-input input::placeholder {
  color: var(--ink-4);
}
.stratum-text-input input:disabled {
  cursor: not-allowed;
}

.stratum-text-input-prefix {
  padding: 0 0 0 10px;
  font-size: 14px;
  color: var(--ink-3);
  flex-shrink: 0;
}

.stratum-text-input--area {
  align-items: stretch;
}
.stratum-text-input textarea {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 9px 10px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  outline: none;
  resize: vertical;
}
.stratum-text-input textarea::placeholder {
  color: var(--ink-4);
}

/* onClear's button: a small grey round ×, its hit area the field's height (44px on a phone with its padding). */
.stratum-text-input-clear {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  align-self: stretch;
  margin-right: 2px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}
.stratum-text-input-clear svg {
  width: 18px;
  height: 18px;
  padding: 3px;
  border-radius: 50%;
  background: var(--ink-4);
  color: var(--surface);
  stroke-width: 3;
}
.stratum-text-input-clear:hover svg {
  background: var(--ink-3);
}
.stratum-selection-sheet {
  display: flex;
  flex-direction: column;
}

.stratum-selection-sheet-text {
  font-size: 15px;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.5;
  margin: 0;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stratum-selection-sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.stratum-choice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stratum-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition:
    background-color 0.15s,
    border-color 0.15s;
}
.stratum-choice:hover:not(.stratum-choice--selected) {
  background: var(--surface-2);
}
/* Selected: the accent's border and a tick at the end. */
.stratum-choice--selected {
  border-color: var(--accent);
  background: var(--accent-soft, var(--surface-2));
}
.stratum-choice-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stratum-choice-label {
  font-weight: 500;
}
.stratum-choice-detail {
  font-size: 13px;
  color: var(--ink-3);
}
.stratum-choice-check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  stroke-width: 2.25;
  color: var(--accent);
  visibility: hidden;
}
.stratum-choice--selected .stratum-choice-check {
  visibility: visible;
}
/* --stratum-app-shell-content-inset-bottom (see AppShellLayout) is 0 on
   desktop, where the mobile bottom nav is display:none, so this collapses to
   its flat breathing-room default there without needing a media query. On
   mobile it reserves exactly the bar's real height plus that same default. */
.stratum-infinite-scroll-footer {
  min-height: var(--stratum-app-shell-content-inset-bottom, 0px);
}

/* Clear of the list it follows, as much room above as below. */
.stratum-infinite-scroll-loading {
  padding: 20px 0;
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
}
.stratum-thumb {
  display: block;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  background: var(--surface-2);
}
.stratum-thumb img,
.stratum-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Poster overlay sits under the video and stays visible until the video's
   'playing' event fires (adds .stratum-video-ready) — see MediaThumb.tsx for
   why this replaces the native `poster` attribute. */
.stratum-thumb video {
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.stratum-thumb video.stratum-video-ready {
  opacity: 1;
}
.stratum-thumb-video-poster {
  position: absolute;
  inset: 0;
  z-index: 0;
}
/* A placeholder tile's Skeleton (media's FeedPlaceholders), filling it. */
.stratum-thumb-skeleton.stratum-skeleton {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
}
.stratum-thumb--zoom img,
.stratum-thumb--zoom video {
  transition:
    transform 0.2s ease,
    opacity 0.25s ease;
}
.stratum-thumb--zoom:hover img,
.stratum-thumb--zoom:active img {
  transform: scale(1.03);
}
.stratum-thumb--tall {
  aspect-ratio: 4 / 5;
}
@media (min-width: 768px) {
  .stratum-thumb--tall {
    aspect-ratio: 1;
    border-radius: 12px;
  }
}

.stratum-thumb-novel-cover {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
}
.stratum-thumb-novel-icon {
  width: 30%;
  max-width: 48px;
  aspect-ratio: 1;
  color: var(--ink-3);
}

.stratum-thumb-duration,
.stratum-thumb-char-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 5px;
  backdrop-filter: blur(8px);
}
.stratum-photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  /* Fades (--stratum-photo-viewer-backdrop, 1 to 0) while the image is dragged away to close, so the
     page shows through. */
  background: rgb(0 0 0 / var(--stratum-photo-viewer-backdrop, 1));
  overflow: hidden;
}
.stratum-photo-viewer--light {
  background: rgb(251 250 247 / var(--stratum-photo-viewer-backdrop, 1));
}
/* An image or video, not text: a tap, drag or long press never selects its pill's text, drags the picture
   out or opens iOS's callout. Only MediaViewer has a --dark or --light backdrop;
   FullscreenView shares the base class and keeps its text selectable. */
.stratum-photo-viewer:is(.stratum-photo-viewer--dark, .stratum-photo-viewer--light),
.stratum-photo-viewer:is(.stratum-photo-viewer--dark, .stratum-photo-viewer--light) * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}
.stratum-photo-viewer--dark .stratum-photo-viewer-spinner {
  --stratum-spinner-track: rgba(255, 255, 255, 0.2);
}
/* While the image is dragged away to close: the controls out of the way. */
.stratum-photo-viewer--dismissing .stratum-photo-viewer-glass,
.stratum-photo-viewer--dismissing .stratum-photo-viewer-close,
.stratum-photo-viewer--dismissing .stratum-photo-viewer-copy,
.stratum-photo-viewer--dismissing .stratum-photo-viewer-action {
  opacity: 0;
  pointer-events: none;
}

/* The current video's controls (VideoControls), at the bottom while it's snapped into place. */
.stratum-photo-viewer-video-controls {
  position: absolute;
  left: 50%;
  bottom: max(18px, var(--safe-bottom-effective));
  z-index: 10;
  width: min(520px, calc(100% - 36px));
  transform: translateX(-50%);
}

.stratum-photo-viewer-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
  /* Safari-only bug workaround: WebKit can cache a stale backdrop-filter snapshot of a <canvas>
     that's being redrawn purely via drawImage()/requestAnimationFrame (not a real DOM layout
     change) — the glass buttons over it stop visually updating until something else forces a
     repaint (e.g. switching tabs away and back). Chrome doesn't have this bug. Forcing the canvas
     onto its own GPU compositing layer is the documented fix — translateZ(0) has no visible
     effect on its own (0 offset), it's purely there to trigger layer promotion. */
  transform: translateZ(0);
  will-change: transform;
}

/* Kept mounted (rather than unmounted) while the image loads, so the
   container's real layout size is available for canvas sizing/fit-to-view —
   just not shown until it's actually ready to display. */
.stratum-photo-viewer--loading {
  visibility: hidden;
  pointer-events: none;
}
/* A video before its first frame: the spinner, fading with the backdrop as a drag closes the viewer. Drags start on
   the canvas beneath it. */
.stratum-photo-viewer-spinner {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: auto;
  pointer-events: none;
  opacity: var(--stratum-photo-viewer-backdrop, 1);
}

/* Mobile-first: bottom-right, where a bottom-nav-hiding FAB would sit in the
   consuming app — this overlay always fully covers any bottom nav. */
.stratum-photo-viewer-close {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: saturate(1.5) blur(20px);
  -webkit-backdrop-filter: saturate(1.5) blur(20px);
  /* Part of the same Safari staleness workaround as .stratum-photo-viewer-canvas's own
     transform: translateZ(0) — see that rule's comment. */
  will-change: backdrop-filter;
  color: #fff;
  cursor: pointer;
  transition:
    opacity 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.stratum-photo-viewer-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* Applied when the sampled canvas pixels behind the button read as light
   (e.g. the near-white letterbox around a fitted image) — see MediaViewer.tsx. */
.stratum-photo-viewer-close--on-light {
  border-color: rgba(0, 0, 0, 0.03);
  background: rgba(20, 20, 20, 0.05);
  color: #141414;
}

.stratum-photo-viewer-close--on-light:hover {
  background: rgba(20, 20, 20, 0.1);
}

/* Applied when the backdrop can't be sampled at all (tainted canvas — see
   MediaViewer.tsx). Uses its own dark fill for contrast instead of
   guessing light-vs-dark, so it stays legible over both the image and the
   viewer's light background. */
.stratum-photo-viewer-close--adaptive-fallback {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(20, 20, 20, 0.55);
  color: #fff;
}

.stratum-photo-viewer-close--adaptive-fallback:hover {
  background: rgba(20, 20, 20, 0.68);
}

/* Hidden with the rest of the controls (a tap on the image), at every width. */
.stratum-photo-viewer-close--controls-hidden {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 767px) {
  /* Phones close by dragging the image away instead, unless the viewer asks for the button
     (mobileCloseButton). */
  .stratum-photo-viewer-close--not-mobile {
    display: none;
  }

  /* A video's controls take the bottom edge: a close button there (mobileCloseButton) sits a row above them. */
  .stratum-photo-viewer--video-controls .stratum-photo-viewer-close:not(.stratum-photo-viewer-action) {
    bottom: calc(max(18px, var(--safe-bottom-effective)) + 34px + 14px);
  }
}

@media (min-width: 768px) {
  .stratum-photo-viewer-close {
    top: max(16px, var(--safe-top-clear));
    right: max(16px, var(--safe-right));
    bottom: auto;
    width: 36px;
    height: 36px;
  }
}

/* The copy button (`copyable`) sits beside the close button: left of it on wide screens; on phones in
   its corner, or left of it when mobileCloseButton shows that too. */
.stratum-photo-viewer-copy--beside-close {
  right: 84px;
}

@media (min-width: 768px) {
  .stratum-photo-viewer-copy,
  .stratum-photo-viewer-copy--beside-close {
    right: calc(max(16px, var(--safe-right)) + 44px);
  }
}

/* The app's own buttons (`actions`): on phones in the top-right corner, out of the way of close, copy and a video's
   controls at the bottom, by their index; on wide screens leftward from close and copy, by the slot ViewerControls
   sets. */
@media (max-width: 767px) {
  .stratum-photo-viewer-action {
    top: max(16px, var(--safe-top-clear));
    bottom: auto;
    right: calc(max(16px, var(--safe-right)) + var(--stratum-viewer-action-index, 0) * 48px);
    width: 40px;
    height: 40px;
  }
}

.stratum-photo-viewer-action svg {
  width: 18px;
  height: 18px;
}

/* An action with a menu: the invisible native list fills the round button. */
.stratum-photo-viewer-action-menu {
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
}

@media (min-width: 768px) {
  .stratum-photo-viewer-action {
    right: calc(max(16px, var(--safe-right)) + var(--stratum-viewer-action-slot-wide, 1) * 44px);
  }
}

/* ── Crop mode (MediaViewer's own `crop` prop) ──────────────────────
   Positioned via inline style (left/top/width/height in px), recomputed every draw() call to
   track the image through pan/zoom/pinch — see MediaViewer.tsx's own updateCropOverlay.
   Same spotlight-mask trick as RegionCropSheet.css's own .stratum-region-crop-selection (a single
   element's own box-shadow, spread past the frame's edges and clipped by the viewer container's
   overflow: hidden), just inverted here: RegionCropSheet's frame clips the shadow itself, while
   here the whole .stratum-photo-viewer container does. */
.stratum-photo-viewer-crop-rect {
  position: absolute;
  z-index: 5;
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  cursor: move;
  touch-action: none;
}

/* Corners (MediaViewer's `corners`): the outside dimmed as the crop's, the four sides outlined, and a dot on each
   corner, moved by its translate (MediaViewer's updateCropOverlay). */
.stratum-photo-viewer-quad {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}
.stratum-photo-viewer-quad-dim {
  fill: rgba(0, 0, 0, 0.55);
}
.stratum-photo-viewer-quad-outline {
  fill: none;
  stroke: #fff;
  stroke-width: 1.5px;
}
.stratum-photo-viewer-quad-handle {
  position: absolute;
  z-index: 6;
  top: 0;
  left: 0;
  /* A finger-sized target around the dot it draws. */
  width: 44px;
  height: 44px;
  margin: -22px;
  border-radius: 50%;
  cursor: move;
  touch-action: none;
}
.stratum-photo-viewer-quad-handle::after {
  content: '';
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid rgba(0, 0, 0, 0.35);
}

/* Shared look — shape/position come from the --corner/--edge-h/--edge-v variants below, each
   paired with one of the four --nw/--ne/--sw/--se/--n/--s/--e/--w placement classes (see
   MediaViewer.tsx's own CROP_HANDLES). */
.stratum-photo-viewer-crop-handle {
  position: absolute;
  z-index: 6;
  background: #fff;
  border: 1.5px solid rgba(0, 0, 0, 0.35);
  touch-action: none;
}

/* Corners — round grab dots, resize both of their own two edges at once. */
.stratum-photo-viewer-crop-handle--corner {
  width: 22px;
  height: 22px;
  margin: -11px;
  border-radius: 50%;
}
.stratum-photo-viewer-crop-handle--nw {
  top: 0;
  left: 0;
  cursor: nwse-resize;
}
.stratum-photo-viewer-crop-handle--se {
  bottom: 0;
  right: 0;
  cursor: nwse-resize;
}
.stratum-photo-viewer-crop-handle--ne {
  top: 0;
  right: 0;
  cursor: nesw-resize;
}
.stratum-photo-viewer-crop-handle--sw {
  bottom: 0;
  left: 0;
  cursor: nesw-resize;
}

/* Single-edge handles — pill-shaped bars centered along one side only, for resizing just that
   side without disturbing the other three (the corners already cover "resize two at once"). */
.stratum-photo-viewer-crop-handle--edge-h {
  left: 50%;
  width: 28px;
  height: 10px;
  margin-left: -14px;
  border-radius: 5px;
  cursor: ns-resize;
}
.stratum-photo-viewer-crop-handle--n {
  top: 0;
  margin-top: -5px;
}
.stratum-photo-viewer-crop-handle--s {
  bottom: 0;
  margin-bottom: -5px;
}
.stratum-photo-viewer-crop-handle--edge-v {
  top: 50%;
  width: 10px;
  height: 28px;
  margin-top: -14px;
  border-radius: 5px;
  cursor: ew-resize;
}
.stratum-photo-viewer-crop-handle--w {
  left: 0;
  margin-left: -5px;
}
.stratum-photo-viewer-crop-handle--e {
  right: 0;
  margin-right: -5px;
}

/* No background scrim (tried a linear-gradient here initially) — the buttons themselves already
   carry their own adaptive glass (see --on-light above, sampled per button), same as the plain
   close button relies on with no scrim behind it either; a scrim on top just muddied the glass
   effect (everything behind it read as darker than it actually was) for no legibility benefit
   the per-button adaptation doesn't already cover. */
.stratum-photo-viewer-crop-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 14px max(16px, var(--safe-right)) max(14px, var(--safe-bottom-effective)) max(16px, var(--safe-left));
}
/* CtaButton defaults to width: 100% (sensible for a stacked Sheet footer like
   RegionCropSheet's own, wrong here — this is a floating side-by-side row over the full-screen
   viewer, not a narrow stacked sheet) — width: auto sizes each button to its own label instead of
   stretching to fill this row, and flex: none stops it from being asked to grow/shrink at all. */
.stratum-photo-viewer-crop-footer .stratum-cta-button {
  flex: none;
  width: auto;
}

/* Same translucent glass look as .stratum-photo-viewer-close (the plain-viewer-mode close
   button) — variant="ghost"'s own transparent-background/var(--ink-3) treatment reads as
   invisible-ish against this footer's backdrop, same reason the close button itself isn't styled
   that way either. Shared by both Cancel and Use-this-crop — deliberately no distinct "primary"
   treatment for the confirm action (an accent-tinted variant was tried, and removed as
   unwanted — both read as equally-weighted actions here). */
.stratum-photo-viewer-crop-btn {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: saturate(1.5) blur(20px);
  -webkit-backdrop-filter: saturate(1.5) blur(20px);
  /* Part of the same Safari staleness workaround as .stratum-photo-viewer-canvas's own
     transform: translateZ(0) — see that rule's comment. */
  will-change: backdrop-filter;
  color: #fff;
}
.stratum-photo-viewer-crop-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.28);
}

/* Applied when the canvas pixels sampled behind each button individually (see
   MediaViewer.tsx's own periodic-resample effect, cancelOnLight/confirmOnLight) read as
   light — same light-on-dark → dark-on-light flip as .stratum-photo-viewer-close--on-light, just
   tuned for a text button instead of an icon-only circle. No separate --adaptive-fallback variant
   here (unlike the close button) — if sampling isn't available, staying on the default (white
   text) style is an acceptable fallback rather than adding a third state. */
.stratum-photo-viewer-crop-btn--on-light {
  background: rgba(20, 20, 20, 0.08);
  border-color: rgba(0, 0, 0, 0.05);
  color: #141414;
}
.stratum-photo-viewer-crop-btn--on-light:hover:not(:disabled) {
  background: rgba(20, 20, 20, 0.14);
}

/* Several images (onPrev / onNext / position): which one this is, at the top, and on desktop arrow
   buttons at the sides (phones swipe instead). The same adaptive glass as the close button; tapping
   the image fades them out and back, on desktop too. */
.stratum-photo-viewer-glass {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: saturate(1.5) blur(20px);
  -webkit-backdrop-filter: saturate(1.5) blur(20px);
  will-change: backdrop-filter;
  color: #fff;
  transition:
    opacity 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}
.stratum-photo-viewer-glass--on-light {
  border-color: rgba(0, 0, 0, 0.03);
  background: rgba(20, 20, 20, 0.05);
  color: #141414;
}
.stratum-photo-viewer-glass--fallback {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(20, 20, 20, 0.55);
  color: #fff;
}
.stratum-photo-viewer-glass--hidden {
  opacity: 0;
  pointer-events: none;
}
.stratum-photo-viewer-position {
  position: absolute;
  /* Clear of an iOS PWA's status bar and its blur, as a full-screen view's content is. */
  top: max(18px, var(--safe-top-clear));
  left: 50%;
  z-index: 10;
  transform: translateX(-50%);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.stratum-photo-viewer-nav {
  display: none;
}
@media (min-width: 768px) {
  .stratum-photo-viewer-nav {
    position: absolute;
    top: 50%;
    z-index: 10;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    transform: translateY(-50%);
  }
  .stratum-photo-viewer-nav:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.28);
  }
  .stratum-photo-viewer-glass--on-light.stratum-photo-viewer-nav:hover:not(:disabled) {
    background: rgba(20, 20, 20, 0.1);
  }
  .stratum-photo-viewer-glass--fallback.stratum-photo-viewer-nav:hover:not(:disabled) {
    background: rgba(20, 20, 20, 0.68);
  }
  /* At either end: still there, so the pair doesn't jump around, but its arrow is faint. */
  /* Like stratum-ui's Button when disabled. */
  .stratum-photo-viewer-nav:disabled {
    cursor: not-allowed;
  }
  .stratum-photo-viewer-nav:disabled svg {
    opacity: 0.3;
  }
  .stratum-photo-viewer-nav--prev {
    left: max(18px, var(--safe-left));
  }
  .stratum-photo-viewer-nav--next {
    right: max(18px, var(--safe-right));
  }
}
/* "−10s" / "+20s" on the edge a streak of skips is on (SeekFlash), fading out. Its box is the edge's third of the
   positioned box it sits in (a viewer, an artwork). */
.stratum-seek-flash {
  position: absolute;
  top: 50%;
  z-index: 10;
  width: 33.333%;
  display: flex;
  justify-content: center;
  pointer-events: none;
  transform: translateY(-50%);
  animation: stratum-seek-flash 0.7s ease-out forwards;
}
.stratum-seek-flash--back {
  left: 0;
}
.stratum-seek-flash--forward {
  right: 0;
}
.stratum-seek-flash-label {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.stratum-seek-flash-label--dark {
  background: rgba(20, 20, 20, 0.55);
  color: #fff;
}
@keyframes stratum-seek-flash {
  0%,
  60% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
.stratum-glass-icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
}
.stratum-glass-icon-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}
.stratum-glass-icon-btn--sm {
  width: 28px;
  height: 28px;
}
.stratum-glass-icon-btn--sm svg {
  width: 13px;
  height: 13px;
}
/* On a phone a finger needs more: at least 32 px (ui-probe flags a tap target under 30). */
@media (max-width: 767px) {
  .stratum-glass-icon-btn--sm {
    width: 32px;
    height: 32px;
  }
}
/* As MediaViewer's close button (.stratum-photo-viewer-close:hover). */
.stratum-glass-icon-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}
.stratum-glass-icon-btn.stratum-photo-viewer-glass--on-light:hover {
  background: rgba(20, 20, 20, 0.1);
}
.stratum-video-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* Faded out piece by piece (see VideoControls), so only clicks are off here. */
.stratum-video-controls--hidden {
  pointer-events: none;
}
/* The seek bar and times, in a glass pill as tall as the buttons beside it. */
.stratum-video-controls-bar {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 34px;
  padding: 0 14px;
  box-sizing: border-box;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.stratum-video-controls-time {
  flex: none;
  font-variant-numeric: tabular-nums;
}
/* A thin track in the glass's own color, filled up to where it's got (--stratum-video-progress). */
.stratum-video-controls-seek {
  flex: 1;
  min-width: 0;
  height: 20px;
  margin: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.stratum-video-controls-seek:disabled {
  cursor: default;
}
.stratum-video-controls-seek::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    currentColor var(--stratum-video-progress, 0%),
    color-mix(in srgb, currentColor 30%, transparent) var(--stratum-video-progress, 0%)
  );
}
.stratum-video-controls-seek::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border: none;
  border-radius: 50%;
  background: currentColor;
  -webkit-appearance: none;
  appearance: none;
}
.stratum-video-controls-seek::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: color-mix(in srgb, currentColor 30%, transparent);
}
.stratum-video-controls-seek::-moz-range-progress {
  height: 4px;
  border-radius: 2px;
  background: currentColor;
}
.stratum-video-controls-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 50%;
  background: currentColor;
}
.stratum-cta-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.12s,
    transform 0.08s;
}

/* Size tiers — see CtaButton.tsx's `size` doc for when each applies. Only the
   metrics differ; fill, press feedback and disabled treatment are shared above. */
.stratum-cta-button--md {
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 15px;
}

.stratum-cta-button--compact {
  gap: 8px;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 14px;
}
.stratum-cta-button:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 88%, black);
}
.stratum-cta-button:active:not(:disabled) {
  transform: scale(0.985);
}
.stratum-cta-button:disabled {
  background: var(--line);
  color: var(--ink-4);
  cursor: not-allowed;
}
.stratum-cta-button svg {
  width: 16px;
  height: 16px;
}
.stratum-cta-button--compact svg {
  width: 15px;
  height: 15px;
}

/* Ghost variant — same box (size tiers above still apply), no fill/border, muted text. Declared
   after the base/hover/disabled rules above so it wins the specificity tie on `background`/`color`. */
.stratum-cta-button--ghost {
  background: none;
  color: var(--ink-3);
}
.stratum-cta-button--ghost:hover:not(:disabled) {
  background: var(--surface-2);
}
.stratum-cta-button--ghost:disabled {
  background: none;
  color: var(--ink-4);
}
/* The box the page sizes (VideoPlayer's className), in the video's own shape once it's known (an inline
   aspect-ratio); the video fills it, the controls float over its edges. Black only shows before the first frame. */
.stratum-video-player {
  position: relative;
  overflow: hidden;
  background: #000;
  outline: none;
}
.stratum-video-player-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
  /* Its own layer, under the glass controls: without one Safari kept the glass's stale snapshot of a paused video
     after a seek, so the picture only moved once it played (2026-10-31). */
  will-change: transform;
}
/* While it loads, no black: the cover's poster or shimmer is all that shows. */
.stratum-video-player.stratum-video-player--loading {
  background: none;
}
/* Until its opening frame is presented (VideoPlayer's `loaded`): the poster with a spinner, else a shimmer. A cover, not
   the video hidden: a hidden video may present no frame, which is what the cover waits for. */
.stratum-video-player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
}
.stratum-video-player-cover--shimmer {
  background: linear-gradient(90deg, var(--surface-2) 25%, color-mix(in srgb, var(--surface-2) 55%, var(--surface)) 50%, var(--surface-2) 75%);
  background-size: 300% 100%;
  animation: stratum-skeleton-shimmer 1.4s ease-in-out infinite;
}
.stratum-video-player-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
/* Over the controls too: nothing there works. */
.stratum-video-player-cover--failed {
  z-index: 2;
  padding: 16px;
  text-align: center;
  font-size: 14px;
  background: var(--surface-2);
  color: var(--ink-2);
}
.stratum-video-player-spinner.stratum-spinner {
  --stratum-spinner-track: rgba(255, 255, 255, 0.25);
  --stratum-spinner-arc: #fff;
}
.stratum-video-player--idle {
  cursor: none;
}
.stratum-video-player-fullscreen {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
}
.stratum-video-player-controls {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
}
/* ── Mobile sticky header ──
   `fixed`, not `absolute`: this is mobile-only (display:none below, see the media query
   further down), and pinning it to the real viewport rather than a positioned ancestor is
   what keeps it correctly stuck at the top for a page whose ancestor chain grows taller
   than the viewport (AppShellLayout's `scrollMode="native"` opt-in — see its own doc) —
   and renders identically to the old `position: absolute` for every page that ISN'T
   native-scroll, since their containing ancestor stays exactly viewport-sized regardless
   (same reasoning as AppShellLayout.css's own .stratum-app-shell-nav/-fab). */
.stratum-page-header-mobile {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: rgba(251, 250, 247, 0.88);
  backdrop-filter: saturate(1.5) blur(20px);
  -webkit-backdrop-filter: saturate(1.5) blur(20px);
  /* Its own composited layer at all times: see .stratum-page-header-desktop. */
  transform: translateY(0);
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.22s;
}
/* One device pixel, as iOS draws its bars' lines; PageHeaderMobile rounds the header's height to whole
   pixels so it never lands between two and smears over both. */
.stratum-page-header-mobile::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  transform: scaleY(var(--stratum-hairline-scale, 1));
  transform-origin: bottom;
  background: transparent;
  transition: background-color 0.18s;
  pointer-events: none;
}
.stratum-page-header-mobile--scrolled::after {
  background: var(--stratum-hairline-color, rgba(0, 0, 0, 0.2));
}
.stratum-page-header-mobile--hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}
@media (prefers-color-scheme: dark) {
  .stratum-page-header-mobile {
    background: rgba(10, 10, 11, 0.88);
  }
}
@media (min-width: 768px) {
  .stratum-page-header-mobile {
    display: none !important;
  }
}

/* Fills in for the header above once it's slid away (scrolled down): a soft tint + glass blur along the
   top edge, standing in for the scroll-edge effect real iOS now draws itself under the status bar. So it
   exists ONLY inside the dev mobile-view emulator (ViewportPreview marks the emulated app's <html> with
   data-viewport-preview) — never on a real phone, and never in a plain browser window that's merely been
   narrowed to a mobile width. Kept as its own fixed element rather than baked into
   .stratum-page-header-mobile's background so its crossfade can run opposite the header's (visible
   exactly when the header isn't). `pointer-events: none` since it's purely decorative — it never
   intercepts taps meant for the content scrolling underneath it, including PageHeaderMobile's own
   onBackgroundClick handling. Capped at 70% of --bg even at its top edge. The falloff uses several
   intermediate stops (an "eased" gradient) rather than a plain two-stop one — a straight linear gradient
   reads as fading much faster than its opacity numbers suggest, which made the earlier version look like
   it ended in an abrupt line. */
.stratum-page-header-mobile-fade {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: calc(var(--safe-top) + 66px);
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--bg) 70%, transparent) 0%,
    color-mix(in srgb, var(--bg) 61%, transparent) 19%,
    color-mix(in srgb, var(--bg) 48%, transparent) 34%,
    color-mix(in srgb, var(--bg) 34%, transparent) 47%,
    color-mix(in srgb, var(--bg) 21%, transparent) 59%,
    color-mix(in srgb, var(--bg) 12%, transparent) 71%,
    color-mix(in srgb, var(--bg) 6%, transparent) 84%,
    color-mix(in srgb, var(--bg) 2%, transparent) 93%,
    transparent 100%
  );
  /* Slight glass blur behind the tint, faded out toward the bottom by the mask (which clips the
     blur and the gradient alike) so there's no hard edge — the look of iOS's own scroll-edge
     effect. */
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}
.stratum-page-header-mobile-fade--visible {
  opacity: 1;
}
/* Shown only in the emulator (see the doc above). */
html[data-viewport-preview] .stratum-page-header-mobile-fade {
  display: block;
}

/* 30px (not a plain 16px) below the safe-area inset: iOS Safari's standalone
   web apps now blur a strip along the top edge of the screen, which softened
   the top of the title at 16px. .stratum-page-header-spacer measures the header,
   so only its fallback (before the first measure) assumes this. */
.stratum-page-header-mobile-inner {
  padding: calc(30px + var(--safe-top)) 20px 14px;
}
.stratum-page-header-mobile-inner:has(> .stratum-tabs:last-child) {
  padding-bottom: 0;
}

.stratum-page-header-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

/* Top-aligned against the title's cap-height, not bottom-aligned against the
   subtitle's baseline like the row's own `align-items: flex-end` default. */
.stratum-page-header-action {
  align-self: flex-start;
  flex-shrink: 0;
}

.stratum-page-header-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  /* Shrink-wraps to the actual title text instead of a plain block's default `width: auto`
     (which fills the whole column, even past the visible glyphs, whenever a sibling like the
     subtitle needs that width) — still wraps onto multiple lines past this width exactly like
     `auto` did, just without silently widening the div's own (and thus its click target's) box
     beyond the rendered text for a short title. Load-bearing for
     PageHeaderMobile's onBackgroundClick (see its own doc) — without this, tapping to the
     right of a short title still hits this div, not the header's background. */
  width: fit-content;
  max-width: 100%;
  /* Every header title is one line, cut off with an ellipsis; the full title opens in a
     BottomPanel on tap (HeaderTitle in PageHeader.tsx), or scrolls sideways (--scroll). */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stratum-page-header-title--wrap {
  white-space: normal;
  overflow: visible;
}
.stratum-page-header-title--scroll {
  overflow-x: auto;
  overflow-y: hidden;
  text-overflow: clip;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.stratum-page-header-title--scroll::-webkit-scrollbar {
  display: none;
}
.stratum-page-header-title--clickable {
  cursor: pointer;
}
/* The flex item wrapping title + subtitle must be allowed to shrink below its content's width,
   or a long title pushes the action off-screen instead of truncating. */
.stratum-page-header-title-row > div:first-child,
.stratum-page-header-desktop-inner > div:first-child {
  min-width: 0;
}
/* No title yet (still loading): a title and subtitle line's room, blank. */
.stratum-page-header-pending {
  visibility: hidden;
}
/* The page's content still settling (PageHeaderMobileProps.pending): the whole header keeps its room but isn't drawn,
   background and line included, so the placeholders under it show. */
.stratum-page-header--pending {
  visibility: hidden;
}

.stratum-page-header-subtitle {
  font-family: inherit;
  font-size: 13px;
  /* A line of its own height whatever sits in it: a loading spinner and, once loaded, a status dot each stretched it
     differently on the text's baseline, so the header grew 1 px as a page loaded (the nightly load sweep, 2026-11-15). */
  line-height: 16px;
  color: var(--ink-3);
  margin-top: 2px;
}
/* Each piece (a page's own inline-flex host label too) at the line's top, not its text's baseline, which pushes the
   line taller by the piece's height. */
.stratum-page-header-subtitle > * {
  vertical-align: top;
}
.stratum-page-header-subtitle :is(svg, .stratum-spinner, .stratum-status-dot) {
  vertical-align: middle;
}

/* ── Desktop sticky header ──
   Needs to be mounted inside a scrolling ancestor for `position: sticky` to
   stick within it. */
.stratum-page-header-desktop {
  display: none;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid transparent;
  /* The glass is always on, as the mobile header's is, and only its tint comes and goes: a
     backdrop-filter switched on and off as the page leaves the top left Safari, in a tab open a
     while, drawing this header only when scrolling stopped (shown in the DOM, missing on screen).
     It hides by sliding alone, its opacity switched at the slide's end, never faded: a fading glass
     header flickered on screen in a Mac Safari tab while it scrolled, its styles steady (2026-11-22). */
  backdrop-filter: saturate(1.5) blur(20px);
  -webkit-backdrop-filter: saturate(1.5) blur(20px);
  transform: translateY(0);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition:
    background-color 0.18s,
    border-bottom-color 0.18s,
    box-shadow 0.18s,
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0s;
}
/* Pinned over the top of the element its page scrolls in, from outside it (usePinnedDesktopHeader). The host
   lays out nothing itself, so it never takes a cell or a flex slot beside the scrolling element. */
.stratum-page-header-desktop-host {
  display: contents;
}
.stratum-page-header-desktop--pinned {
  position: fixed;
}
.stratum-page-header-desktop-spacer {
  display: none;
}
@media (min-width: 768px) {
  .stratum-page-header-desktop-spacer {
    display: block;
  }
}
.stratum-page-header-desktop-spacer--always-visible {
  display: block;
}
.stratum-page-header-desktop--scrolled {
  background: rgba(255, 255, 255, 0.88);
  border-bottom-color: var(--line);
}
/* Opt-in only (see PageHeaderDesktopProps.hidden) — sticky still reserves
   this box's layout slot at its "home" position in the flow, so hiding the
   visually-pinned instance via transform just reveals the content that was
   underneath it, same visual result as the mobile absolute+transform case. */
.stratum-page-header-desktop--hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition:
    background-color 0.18s,
    border-bottom-color 0.18s,
    box-shadow 0.18s,
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0s 0.22s;
}
@media (prefers-color-scheme: dark) {
  .stratum-page-header-desktop--scrolled {
    background: rgba(20, 20, 22, 0.88);
  }
}
@media (min-width: 768px) {
  .stratum-page-header-desktop {
    display: block;
  }
}

.stratum-page-header-desktop-inner {
  /* An iPad's home-screen app has a status bar over the desktop layout too. */
  padding: calc(24px + var(--safe-top-clear)) 36px 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
/* The bar row (e.g. a FilterBar) under the title, aligned with it. */
.stratum-page-header-desktop-bar {
  margin-top: -10px;
  padding: 0 36px 12px;
}
/* A bar of Tabs ends in the active tab's own underline, so the header stops right under it: no
   padding below, on desktop here and on mobile in the header's inner padding. */
.stratum-page-header-desktop-bar:has(> .stratum-tabs) {
  padding-bottom: 0;
}
/* Tabs under a bar: the bar's own padding below is the gap. */
.stratum-page-header-desktop-bar + .stratum-page-header-desktop-tabs {
  margin-top: 0;
}
.stratum-page-header-desktop .stratum-page-header-title {
  font-size: 32px;
}

/* Reserves the mobile header's height in normal flow, since the header itself
   is position: absolute and would otherwise overlap the content below it. */
.stratum-page-header-spacer {
  /* The fixed mobile header's actual height, measured by PageHeaderMobile (a bar, children, a
     wrapped title all count); the constant is a title and subtitle's, until it's measured. */
  height: var(--stratum-page-header-mobile-height, calc(86px + var(--safe-top)));
}
@media (min-width: 768px) {
  .stratum-page-header-spacer {
    display: none;
  }
}

/* Back crumb (PageHeaderCrumb): reads as part of the subtitle — same font and color — and is
   underlined on hover, like the subtitle's other links. */
.stratum-page-header-crumb {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.stratum-page-header-crumb:hover {
  text-decoration: underline;
}

/* PageHeaderPicker: reads as the subtitle's text, like the crumb, underlined on hover. */
.stratum-page-header-picker,
.stratum-page-header-actions {
  vertical-align: baseline;
}
.stratum-page-header-actions-label {
  cursor: pointer;
}
.stratum-page-header-picker:hover .stratum-page-header-picker-label,
.stratum-page-header-actions:hover .stratum-page-header-actions-label {
  text-decoration: underline;
}

/* Full title in the built-in title panel: wraps freely, at reading size. */
.stratum-page-header-title-full {
  padding-top: 4px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  overflow-wrap: break-word;
}

/* The subtitle's loading Spinner (`loading`): right after its last piece, its gap on that side. */
.stratum-page-header-spinner.stratum-spinner {
  margin-right: 0;
  margin-left: 6px;
}

/* Something kept in view as the page scrolls (a search field, a list's views): pinned under the header - on a phone
   under the mobile header while it shows, at the top once it slides away; on desktop at the top of what scrolls it.
   On the page's background, so what scrolls under it is hidden. */
.stratum-under-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg);
}
@media (max-width: 767px) {
  .stratum-under-header {
    top: var(--stratum-sticky-top, 0px);
    transition: top 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  }
}

/* --stratum-sticky-top: where something pinned in a phone page's scroll (a diff's file head, stratum-under-header) sits -
   under the mobile header while it shows, and under the status bar and Dynamic Island once it slides away, rather than
   at the very top, where the lines scrolling past show through the iOS status bar (2026-11-01). Zero in a scroll area
   that doesn't reach the screen's top (a bottom panel, a full screen view, a rail layout's page) and on desktop. */
@media (max-width: 767px) {
  /* The page's own top padding (PageContent's 16px) under the header, so what pins stays where it sat at the top of the
     page, not right against the header's line. */
  :root {
    --stratum-sticky-top: calc(var(--stratum-page-header-mobile-height, 0px) + 16px);
  }
  /* Below the status bar's blur: it softened a pinned file head's text sitting right at its edge. */
  :root:has(.stratum-page-header-mobile--hidden) {
    --stratum-sticky-top: max(16px, calc(var(--safe-top-clear, 0px) + 4px));
  }
  :root:has(.stratum-page-header-mobile--hidden) .stratum-rail-layout-main {
    --stratum-sticky-top: 0px;
  }
}
/* Desktop: under the pinned header while it shows (its height, measured on the page's scroll area), 24px from the top
   once it slides away (16 read as too close to the window's edge, 2026-11-01). */
@media (min-width: 768px) {
  .stratum-page-header-desktop-scroll {
    --stratum-sticky-top: calc(var(--stratum-page-header-desktop-height, 0px) + 16px);
  }
  :root:has(.stratum-page-header-desktop--hidden) .stratum-page-header-desktop-scroll {
    --stratum-sticky-top: calc(24px + var(--safe-top-clear, 0px));
  }
}
.stratum-bottom-panel-body,
.stratum-fullscreen-body,
.stratum-rail-layout-rail {
  --stratum-sticky-top: 0px;
}
.stratum-middle-ellipsis {
  display: flex;
  min-width: 0;
  white-space: pre;
}
.stratum-middle-ellipsis-head {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stratum-middle-ellipsis-tail {
  flex-shrink: 0;
}
.stratum-checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 0;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}
.stratum-checkbox--checked {
  color: var(--ink);
}
.stratum-checkbox:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.stratum-checkbox-box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--line-2);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    background 0.12s,
    border-color 0.12s;
}
.stratum-checkbox--checked .stratum-checkbox-box {
  background: var(--accent);
  border-color: var(--accent);
}

.stratum-checkbox-box svg {
  width: 11px;
  height: 11px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.1s;
}
.stratum-checkbox--checked .stratum-checkbox-box svg {
  opacity: 1;
}

.stratum-checkbox-label {
  flex: 1;
  min-width: 0;
}
.stratum-checkbox-count {
  flex-shrink: 0;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-4);
}
.stratum-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.stratum-badge--ok {
  background: #dff6e4;
  color: #2b7a3a;
}
.stratum-badge--warn {
  background: #fdf0d5;
  color: #8a5a00;
}
.stratum-badge--accent {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

/* The tag: its outline in its text's color, so each tone sets only the color. Its min-width gives every
   one-letter tag the same box, whatever the letter's own width (an L is narrower than a C). */
.stratum-badge--tag {
  display: inline-block;
  min-width: 1.65em;
  text-align: center;
  padding: 1px 4px;
  border: 1px solid currentColor;
  border-radius: 3px;
  background: none;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  line-height: normal;
}
.stratum-badge--tag.stratum-badge--ok {
  color: #2b7a3a;
}
.stratum-badge--tag.stratum-badge--warn {
  color: var(--warn);
}
.stratum-badge--tag.stratum-badge--accent {
  color: var(--accent);
}
.stratum-date-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  position: relative;
}
.stratum-date-field--has-value {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.stratum-date-field:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}
.stratum-date-field-icon {
  width: 15px;
  height: 15px;
  color: var(--ink-3);
  flex-shrink: 0;
}
.stratum-date-field--has-value .stratum-date-field-icon {
  color: var(--accent);
}
.stratum-date-field-display {
  font-size: 13px;
  color: var(--ink-2);
  flex: 1;
}
.stratum-date-field--has-value .stratum-date-field-display {
  color: var(--accent);
  font-weight: 500;
}
.stratum-date-field input[type='date'] {
  position: absolute;
  inset: 0;
  opacity: 0;
  /* iOS draws a native control as its picker opens, opacity aside (SelectOverlay.css). */
  background: transparent;
  color: transparent;
  cursor: pointer;
  width: 100%;
}
.stratum-date-field input[type='date']:disabled {
  /* Browsers don't reliably show a disabled native input's own `cursor`
     value on hover. Let events fall through to the label instead, whose
     `:has(input:disabled)` rule above already sets not-allowed correctly. */
  pointer-events: none;
}
.stratum-date-field input[type='date']::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.stratum-date-field-clear {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  color: var(--accent);
  padding: 0;
  line-height: 1;
  position: relative;
  z-index: 1;
}
.stratum-date-field-clear:disabled {
  /* Otherwise this more-specific rule would keep showing `pointer` on hover
     even though the button (a separate, higher z-index sibling of the native
     input) is no longer clickable — overriding the label's own
     :has(input:disabled) cursor: not-allowed above. */
  cursor: not-allowed;
}
.stratum-slider-track-wrap {
  position: relative;
  height: 28px;
  margin: 6px 8px 0;
  touch-action: none;
}
.stratum-slider-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  transform: translateY(-50%);
  background: var(--line-2);
  border-radius: 2px;
}
.stratum-slider-fill {
  position: absolute;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  background: var(--line-2);
  border-radius: 2px;
  transition: background 0.15s;
}
.stratum-slider--active .stratum-slider-fill {
  background: var(--accent);
}
/* Hit target is deliberately much bigger than the visible dot (44px is the
   accepted minimum comfortable touch target) — a smaller box makes it easy
   to miss the thumb on a touchscreen and grab the track/nothing instead. */
.stratum-slider-thumb {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  cursor: grab;
  touch-action: none;
}
.stratum-slider-thumb:active {
  cursor: grabbing;
}
.stratum-slider-thumb-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--line-2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: border-color 0.15s;
}
.stratum-slider--active .stratum-slider-thumb-dot {
  border-color: var(--accent);
}
.stratum-slider-vals {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  padding: 4px 6px 0;
  text-transform: capitalize;
}
.stratum-slider--active .stratum-slider-vals {
  color: var(--ink-2);
}
.stratum-range-rail {
  position: relative;
  height: 28px;
  margin: 6px 8px 0;
  touch-action: none;
}
.stratum-range-track,
.stratum-range-fill {
  position: absolute;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  border-radius: 2px;
  background: var(--line-2);
}
.stratum-range-track {
  left: 0;
  right: 0;
}
.stratum-range-fill {
  transition: background 0.15s;
}
.stratum-range--active .stratum-range-fill {
  background: var(--accent);
}
/* The hit target is much bigger than the dot (44px, a comfortable touch target), so a finger
   doesn't grab the track instead. */
.stratum-range-thumb {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  cursor: grab;
  touch-action: none;
}
.stratum-range-thumb:active {
  cursor: grabbing;
}
.stratum-range-thumb-dot {
  width: 16px;
  height: 16px;
  border: 2px solid var(--line-2);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: border-color 0.15s;
}
.stratum-range--active .stratum-range-thumb-dot {
  border-color: var(--accent);
}
.stratum-range-vals {
  display: flex;
  justify-content: space-between;
  padding: 4px 6px 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}
.stratum-range--active .stratum-range-vals {
  color: var(--ink-2);
}
.stratum-range--disabled,
.stratum-range--disabled .stratum-range-thumb {
  pointer-events: none;
  cursor: not-allowed;
}
.stratum-icon-button {
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stratum-icon-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.stratum-icon-button--square {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--ink-2);
  transition: background 0.12s;
}
.stratum-icon-button--square:hover:not(:disabled) {
  background: var(--surface-2);
  color: var(--ink);
}
.stratum-icon-button--square svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.stratum-icon-button--circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--ink-2);
}
.stratum-icon-button--circle:hover:not(:disabled) {
  background: var(--surface-2);
}
.stratum-icon-button--circle svg {
  width: 20px;
  height: 20px;
}

.stratum-icon-button--warn {
  color: var(--warn);
}
.stratum-period-stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
/* The sprite's i-chevron points down: turned to point right for Next, and left for Previous. */
.stratum-period-stepper svg {
  transform: rotate(-90deg);
}
.stratum-period-stepper svg.stratum-period-stepper-back {
  transform: rotate(90deg);
}
/* Chrome comes from IconButton's own .stratum-icon-button classes, and the
   overlay-select mechanism from SelectOverlay's own .stratum-select-overlay
   class (see IconMenu.tsx). IconButton's own :hover never fires here though:
   SelectOverlay's invisible <select> sits on top and receives the pointer
   instead of the button underneath — same issue as RotateControl's
   disabled-hover override. Re-trigger the hover state via the wrapper span. */
.stratum-icon-menu:hover .stratum-icon-button {
  background: var(--surface-2);
  color: var(--ink);
}
.stratum-popover-menu {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
}

/* In <body>, fixed beside the trigger (placed inline from its position). */
.stratum-popover-menu-card {
  position: fixed;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  min-width: 190px;
  padding: 6px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}

.stratum-popover-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.stratum-popover-menu-item:hover {
  background: var(--surface-2);
}
.stratum-popover-menu-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke-width: 1.8;
  color: var(--ink-3);
}
.stratum-tabs {
  display: flex;
  gap: 18px;
  padding-top: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.stratum-tabs::-webkit-scrollbar {
  display: none;
}
.stratum-tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0 7px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--ink-3);
  text-decoration: none;
  cursor: pointer;
}
.stratum-tab:hover {
  color: var(--ink-2);
  text-decoration: none;
}
.stratum-tab--active,
.stratum-tab--active:hover {
  border-bottom-color: var(--accent);
  color: var(--accent);
}
.stratum-tab-count {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
}
/* Tabs' trailing: at the row's right, over the tabs if they scroll under it, centred on the tabs' text. */
.stratum-tabs-trailing {
  position: sticky;
  right: 0;
  flex: none;
  display: flex;
  align-items: center;
  margin-left: auto;
  padding: 0 0 3px 8px;
  background: var(--bg);
}
.stratum-link-button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.stratum-link-button:hover:not(:disabled) {
  text-decoration: underline;
}
.stratum-link-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.stratum-link-button--warn {
  color: var(--warn);
}
.stratum-link-button--inherit {
  color: inherit;
}
.stratum-link-button--regular {
  font-weight: inherit;
}
.stratum-url-link {
  color: var(--ink-3);
  font-family: var(--mono);
  text-decoration: none;
}
.stratum-url-link:hover {
  text-decoration: underline;
}
.stratum-file-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: 1.5px dashed var(--line-2);
  background: var(--surface);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  text-align: left;
  transition:
    background 0.12s,
    border-color 0.12s,
    color 0.12s;
}
.stratum-file-picker svg {
  width: 18px;
  height: 18px;
  color: var(--ink-3);
  flex-shrink: 0;
}
.stratum-file-picker:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.stratum-file-picker--has-files {
  border-style: solid;
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.stratum-file-picker--has-files svg {
  color: var(--accent);
}
.stratum-app-shell {
  /* The rail's width (0 where there's none: mobile), for what's positioned against the viewport but
     belongs over the main column - BottomPanel centres over it, not the whole window. */
  --stratum-app-shell-rail-width: 0px;
  display: flex;
  height: calc(var(--vh, 1vh) * 100);
  background: var(--bg);
  overflow: hidden;
}

/* ── Desktop rail ── */
.stratum-app-shell-rail {
  display: none;
  flex-shrink: 0;
  width: var(--stratum-app-shell-rail-width);
  box-sizing: border-box;
  /* A phone in landscape: clear the Dynamic Island or notch when it's on the left (env() is 0 where
     there's none). Not the bottom inset: the home indicator is centred, nowhere near the rail, and
     clearing it left the primary action floating high (2026-10-26). */
  /* Its first item's highlight 6px above the page title's capitals, where a full-height icon's drawing starts, so the
     rail, a filter rail and the header begin on one line (PageHeader's desktop padding, FilterRail's). */
  padding: calc(var(--safe-top-clear) + 24px) 0 14px var(--safe-left);
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border-right: 1px solid var(--line);
  background: var(--surface-2);
  height: calc(var(--vh, 1vh) * 100);
}
/* Any number of pages: past what fits, they scroll (no scrollbar), as the mobile nav does sideways,
   faded where cut off (useEdgeFade), the primary action pinned below. A wheel over them scrolls them
   then, not the page (useWheelForward in AppShellLayout). */
.stratum-app-shell-rail-pages {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.stratum-app-shell-rail-pages::-webkit-scrollbar {
  display: none;
}
@media (min-width: 768px) {
  .stratum-app-shell {
    --stratum-app-shell-rail-width: calc(72px + var(--safe-left));
  }
  .stratum-app-shell-rail {
    display: flex;
  }
}

.stratum-app-shell-rail-btn {
  /* Never squeezed to fit: the rail scrolls instead. */
  flex-shrink: 0;
  width: 48px;
  height: 52px;
  border: none;
  background: transparent;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--ink-3);
  cursor: pointer;
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
  text-decoration: none;
  transition:
    background 0.15s,
    color 0.15s;
}
.stratum-app-shell-rail-btn svg {
  /* Never squeezed by a label that wraps onto a second line. */
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  stroke-width: 1.7;
  padding: 7px;
  box-sizing: content-box;
  border-radius: 10px;
  transition:
    background 0.15s,
    color 0.15s;
}
.stratum-app-shell-rail-btn:hover:not(.stratum-app-shell-rail-btn--active) {
  color: var(--ink-2);
}
.stratum-app-shell-rail-btn--active {
  color: var(--accent);
  font-weight: 600;
}
.stratum-app-shell-rail-btn--active svg {
  background: var(--accent-soft);
  color: var(--accent);
}

.stratum-app-shell-rail-fab {
  /* Never squeezed to fit: a landscape iPhone's short rail pressed it flat (2026-10-26). */
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.35);
  transition: background-color 0.15s;
}
.stratum-app-shell-rail-fab:hover {
  /* Same color-mix darken-on-hover as Button's primary variant (see
     Button.css) — the FAB previously had no hover feedback at all. */
  background: color-mix(in srgb, var(--accent) 88%, black);
}
.stratum-app-shell-rail-fab svg {
  width: 20px;
  height: 20px;
  /* Same weight as the mobile FAB's icon, without each app setting it on its own svg. */
  stroke-width: 2;
}
.stratum-app-shell-rail-fab--alt {
  background: var(--accent-alt);
  box-shadow: 0 4px 12px rgba(255, 149, 0, 0.35);
}
.stratum-app-shell-rail-fab--alt:hover {
  background: color-mix(in srgb, var(--accent-alt) 88%, black);
}

/* ── Main column ── */
.stratum-app-shell-main {
  flex: 1;
  min-width: 0;
  position: relative;
  height: calc(var(--vh, 1vh) * 100);
  /* The height a page has below the shell's own chrome, for one that needs it as a length (a mobile page
     that bounds itself to the viewport): the viewport, less a banner. Use it, not 100vh or --vh. */
  --stratum-app-shell-page-height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  /* Single shared source of truth for "how much bottom clearance a page's
     own scroll container needs" — nav height (0 on desktop) plus a flat
     breathing-room default. Consumers (AppShellBottomSpacer,
     InfiniteScrollFooter, or a page's own padding-bottom) should read this
     directly rather than re-deriving it from --stratum-app-shell-nav-height
     themselves, so the default only ever needs tuning in one place. */
  --stratum-app-shell-content-inset-bottom: calc(var(--stratum-app-shell-bottom-chrome) + 100px);
  /* Desktop: the height of an accessory's fade band, with `fade` (see below). */
  --stratum-app-shell-accessory-fade: 64px;
  /* What covers the bottom edge of the page: on mobile the nav, and a page's AppShellAccessory on
     top of it; on desktop (no nav) just the accessory. */
  --stratum-app-shell-bottom-chrome: calc(
    var(--stratum-app-shell-nav-height, 0px) + var(--stratum-app-shell-accessory-height, 0px) + var(--stratum-app-shell-bottom-fade, 0px) +
      var(--stratum-app-shell-keyboard-room, 0px)
  );
}
/* Mobile, with an accessory's `mobileFade`: its fade band above the glass covers the page too. */
@media (max-width: 767px) {
  .stratum-app-shell--accessory-mobile-fade .stratum-app-shell-main {
    --stratum-app-shell-bottom-fade: 32px;
  }
}
@media (min-width: 768px) {
  .stratum-app-shell-main {
    display: flex;
    flex-direction: column;
    /* Nothing over the page (an accessory sits under it), except an accessory's fade band (below). */
    --stratum-app-shell-bottom-chrome: 0px;
    /* A phone in landscape: clear the Dynamic Island or notch when it's on the right. */
    box-sizing: border-box;
    padding-right: var(--safe-right);
  }
  .stratum-app-shell--accessory-fade .stratum-app-shell-main {
    --stratum-app-shell-bottom-chrome: var(--stratum-app-shell-accessory-fade);
  }
  /* Without `background` the accessory floats over the end of the page (below), so the page pads its end by it. */
  .stratum-app-shell--has-accessory:not(.stratum-app-shell--accessory-background) .stratum-app-shell-main {
    --stratum-app-shell-bottom-chrome: var(--stratum-app-shell-accessory-height, 0px);
  }
}

/* A phone in landscape (the wide layout on a short touch screen; not a desktop or a tablet): with the
   keyboard up for the accessory, only a strip of the page shows above it, so the page's header stays
   out of the way, scrolling up included, until the keyboard goes down. */
@media (min-width: 768px) and (max-height: 500px) and (pointer: coarse) {
  .stratum-app-shell--keyboard .stratum-page-header-desktop {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
  }
}

/* The routed page: the whole main column, less a desktop accessory's room below it. */
.stratum-app-shell-page {
  height: 100%;
}
/* Not positioned, on purpose: something a page docks with position: absolute (a BottomPanel kept off
   the rail) then docks to the main column, accessory included, so it opens over the accessory. */
/* Desktop: a column, as the main column itself is, so a page's own children lay out as they did when
   they sat straight in it - a scroll container with `flex: 1; min-height: 0` gets the page's height
   (and scrolls) instead of growing to its content, which the main column would clip unscrollably. */
@media (min-width: 768px) {
  .stratum-app-shell-page {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
}

/* ── A page's AppShellAccessory ──
   Mobile: the top of the bottom chrome, above the nav (.stratum-app-shell-bottom carries the glass).
   Desktop: in the main column, under the page. */
.stratum-app-shell-accessory:empty {
  display: none;
}
.stratum-app-shell-accessory {
  flex-shrink: 0;
}
/* Desktop: no nav, so only a page's accessory, under the page. Not glass: the page's own background
   (`background`, the default) or nothing at all; with `fade`, a band above it where the page fades
   out into it, as on claude.ai. Only its content
   takes clicks; the rest (the fade, the room around the content) lets them through to the page, its
   scrollbar included. */
@media (min-width: 768px) {
  .stratum-app-shell-accessory {
    pointer-events: none;
    /* A phone in landscape: above the home indicator. Part of the accessory, so its measured height
       (what a page clears, and what sits just above it) counts this room too. */
    padding-bottom: var(--safe-bottom);
  }
  /* Not with the keyboard up: it covers the home indicator, and the accessory sits right on it. */
  .stratum-app-shell--keyboard .stratum-app-shell-accessory {
    padding-bottom: 0;
  }
  /* The page's background behind it (AppShellAccessory's `background`, on by default). */
  .stratum-app-shell--accessory-background .stratum-app-shell-accessory {
    background: var(--bg);
  }
  /* Without it, nothing to sit in: it floats over the bottom of the page, which runs on behind it, as the
     mini player does (media's Library showed an empty band under its last row, 2026-11-10). */
  .stratum-app-shell--has-accessory:not(.stratum-app-shell--accessory-background) .stratum-app-shell-accessory {
    position: absolute;
    left: 0;
    right: var(--safe-right);
    bottom: 0;
    z-index: 5;
  }
  .stratum-app-shell-accessory > * {
    pointer-events: auto;
  }
  /* The fade (AppShellAccessory's `fade`, on by default): a band above it, over the end of the page, fading from
     transparent into the page's background - eased, so it starts barely there and only turns solid
     at the accessory. Paints only; takes no clicks, so the page's scrollbar under it still works. */
  .stratum-app-shell--accessory-fade .stratum-app-shell-accessory {
    position: relative;
  }
  .stratum-app-shell--accessory-fade .stratum-app-shell-accessory::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: var(--stratum-app-shell-accessory-fade);
    background: linear-gradient(
      to bottom,
      color-mix(in srgb, var(--bg) 0%, transparent) 0,
      color-mix(in srgb, var(--bg) 8%, transparent) 25%,
      color-mix(in srgb, var(--bg) 28%, transparent) 50%,
      color-mix(in srgb, var(--bg) 62%, transparent) 75%,
      var(--bg) 100%
    );
    pointer-events: none;
  }
}

/* Desktop, a page with an accessory (a chat's composer): its bottom panels dock to the main column -
   not the viewport, which would center them across the rail too - so they open over the accessory, in
   line with the page. Absolute against the main column, so the page mustn't position an ancestor of
   them (.stratum-app-shell-page isn't, on purpose). Their width: the accessory's `width`, so they line up with
   it (World chat's panels kept the default while the session page's matched its composer by hand, 2026-11-16). */
@media (min-width: 768px) {
  .stratum-app-shell--has-accessory:not(.stratum-app-shell--accessory-persistent) .stratum-bottom-panel {
    position: absolute;
    /* Already inside the main column: no rail to clear. */
    left: 0;
    max-width: var(--stratum-app-shell-accessory-width, var(--stratum-bottom-panel-max-width, 720px));
  }
}

/* ── Native-scroll opt-in (see AppShellLayoutProps.scrollMode's own doc) ──
   Mobile only (max-width: 767px) — desktop always keeps the 'nested' layout above,
   regardless of scrollMode, since the bug this exists for (iOS Safari's native
   text-selection UI breaking inside a scrolled nested container) is mobile-Safari-specific.
   Lets `children`'s own content grow past the viewport height instead of being clipped by
   this shell, so the real `document`/`body` becomes the scrolling element — pairs with the
   consuming page's own CSS relaxing ITS scroll container's height/overflow the same way
   (see media/frontend's ReadPage.css for the first example), and with
   media/frontend/src/index.css's `body.read-native-scroll` override, which the consumer is
   responsible for toggling (this component has no way to reach `document.body` itself). */
@media (max-width: 767px) {
  .stratum-app-shell--native-scroll {
    height: auto;
    overflow: visible;
  }
  .stratum-app-shell--native-scroll .stratum-app-shell-main,
  .stratum-app-shell--native-scroll .stratum-app-shell-page {
    height: auto;
    overflow: visible;
  }
}

/* ── Mobile bottom chrome: a page's accessory (if any) on top of the nav, as ONE pane ──
   The glass (background + backdrop blur), the top line and the slide-away live on this one
   container, not on the accessory and the nav separately: two elements blurring what's behind them
   each blur only their own box, so they meet at a visible seam however alike they're styled. */
.stratum-app-shell-bottom {
  /* `fixed`, not `absolute`: correct once .stratum-app-shell-main can grow taller than the
     viewport (see --native-scroll above) — it needs to stay pinned to the actual viewport bottom
     while the document scrolls underneath it, not the bottom of the full (possibly much taller)
     content. On pages that AREN'T native-scroll, .stratum-app-shell-main stays exactly
     viewport-sized regardless, so `fixed` vs `absolute` render identically there too. */
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: rgba(251, 250, 247, 0.88);
  backdrop-filter: saturate(1.5) blur(20px);
  -webkit-backdrop-filter: saturate(1.5) blur(20px);
  /* Always-on (not just while --hidden is animating): forces this onto its own GPU-composited
     layer, same reasoning as .stratum-app-shell-fab's own base `transform: translateY(0)` above —
     a plain, non-composited position:fixed element is the one observed to desync from the real
     viewport bottom on iOS Safari PWAs after the WKWebView is suspended in the background for a
     while and then resumed without a full reload (it renders mid-content instead of pinned to the
     true bottom; only fully closing/reopening the PWA — a fresh paint — fixes it otherwise). */
  transform: translateY(0);
  /* `will-change`/`backface-visibility` (confirmed, separate from the resume-desync issue above):
     rapidly reversing this transition — the real trigger is scrolling direction flipping back and
     forth, e.g. while reading, which flips useScrollHeader's `navHidden` mid-slide — can leave
     this element visually STUCK partway through the animation on iOS Safari, since
     interrupting/reversing a `transform` transition forces WebKit to re-derive this element's
     `backdrop-filter` compositing on the fly. Pinning it to a stable, dedicated layer up front
     avoids that recompute. Confirmed via a real device reproduction. */
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
.stratum-app-shell-bottom--hidden {
  transform: translateY(100%);
}
/* One device pixel, as .stratum-page-header-mobile's line. */
.stratum-app-shell-bottom::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  transform: scaleY(var(--stratum-hairline-scale, 1));
  transform-origin: top;
  background: var(--stratum-hairline-color, rgba(0, 0, 0, 0.2));
  pointer-events: none;
}
.stratum-app-shell-bottom.stratum-app-shell-bottom--borderless::after {
  content: none;
}
@media (prefers-color-scheme: dark) {
  .stratum-app-shell-bottom {
    background: rgba(10, 10, 11, 0.88);
  }
}
/* Desktop: none of the mobile chrome - no nav, no glass, no line - just a page's accessory, in the
   main column under the page, which ends right above it, as if this container weren't there.
   Nothing at all without an accessory. */
@media (min-width: 768px) {
  .stratum-app-shell-bottom {
    display: contents;
  }
  .stratum-app-shell-bottom::after {
    content: none;
  }
  .stratum-app-shell:not(.stratum-app-shell--has-accessory) .stratum-app-shell-bottom {
    display: none;
  }
}
.stratum-app-shell--edit-mode .stratum-app-shell-bottom {
  display: none;
}
/* Mobile, with an accessory's `mobileFade` (on by default): the glass reaches up a band further
   than the accessory, and a mask fades that band in - transparent at its top, full glass by the
   accessory - so content scrolling down fades into the glass rather than meeting its edge. One
   element (one blur), masked, so there's no seam; the accessory and nav sit below the band,
   untouched. The band takes no clicks. Eased, like the desktop fade. */
@media (max-width: 767px) {
  .stratum-app-shell--accessory-mobile-fade .stratum-app-shell-bottom {
    padding-top: var(--stratum-app-shell-bottom-fade, 32px);
    --stratum-app-shell-fade-mask: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0,
      rgba(0, 0, 0, 0.08) calc(var(--stratum-app-shell-bottom-fade, 32px) * 0.25),
      rgba(0, 0, 0, 0.28) calc(var(--stratum-app-shell-bottom-fade, 32px) * 0.5),
      rgba(0, 0, 0, 0.62) calc(var(--stratum-app-shell-bottom-fade, 32px) * 0.75),
      #000 var(--stratum-app-shell-bottom-fade, 32px)
    );
    -webkit-mask-image: var(--stratum-app-shell-fade-mask);
    mask-image: var(--stratum-app-shell-fade-mask);
    pointer-events: none;
  }
  .stratum-app-shell--accessory-mobile-fade .stratum-app-shell-bottom > * {
    pointer-events: auto;
  }
}

.stratum-app-shell-nav {
  display: flex;
  padding: 6px;
  /* Home-indicator clearance: the real safe-area inset on device (34px on
     modern iPhones), the simulated one inside ViewportPreview's iPhone frame.
     env() is 0 where there's no inset, so this is a no-op on desktop. Total bottom
     padding is capped at 24px: on a real iOS PWA the OS already clears the
     home indicator, so the full 34px manual inset is unnecessary — the
     retained 18px keeps a reasonable minimum in simulated views, while
     smaller/no insets keep their natural smaller value. */
  padding-bottom: calc(6px + min(var(--safe-bottom-effective), 18px));
  /* Any number of pages: past what fits, the row scrolls sideways (no scrollbar) rather than
     squeezing each button narrower. */
  overflow-x: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}
.stratum-app-shell-nav::-webkit-scrollbar {
  display: none;
}
@media (min-width: 768px) {
  .stratum-app-shell-nav {
    display: none !important;
  }
}

.stratum-app-shell-nav-btn {
  /* A few grow evenly to fill the row; many keep this width and scroll (see the nav above). */
  flex: 1 0 60px;
  padding: 8px 0 6px;
  border: none;
  background: transparent;
  color: var(--ink-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border-radius: 10px;
}
.stratum-app-shell-nav-btn svg {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
}
.stratum-app-shell-nav-btn--active {
  color: var(--accent);
}

/* ── Mobile floating primary action ── */
/* Hides via `transform`, not `bottom`, to match the nav bar above: iOS
   Safari's WebKit doesn't reliably repaint an absolute-positioned element
   inside an overflow:hidden ancestor when only top/bottom/left/right
   changes, so an animated `bottom` can visually "stick" on real iOS
   devices even though the transition fires fine in desktop responsive
   mode. `transform` is GPU-composited and layout-independent, so it
   always animates smoothly. */
.stratum-app-shell-fab {
  /* fixed, not absolute — same reasoning as .stratum-app-shell-nav's own doc above. */
  position: fixed;
  right: 18px;
  /* 8px above the nav bar's top edge: nav base height (content + padding = 67px:
     54px button + 6px top pad + 6px bottom pad + 1px border) + effective
     safe-area + 8px gap. Scales with safe-area automatically; no
     standalone-specific override needed. */
  --fab-bottom: calc(75px + var(--safe-bottom-effective));
  --fab-hidden-bottom: 18px;
  bottom: var(--fab-bottom);
  z-index: 30;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  box-shadow:
    0 6px 16px rgba(10, 132, 255, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: translateY(0);
  transition:
    transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.15s;
}
.stratum-app-shell-fab:hover {
  /* Same color-mix darken-on-hover as Button's primary variant (see
     Button.css) — the FAB previously had no hover feedback at all. */
  background: color-mix(in srgb, var(--accent) 88%, black);
}
.stratum-app-shell-fab--nav-hidden {
  transform: translateY(calc(var(--fab-bottom) - var(--fab-hidden-bottom)));
}
/* Above a persistent accessory (a mini player) on the nav, by its measured height. */
.stratum-app-shell--accessory-persistent .stratum-app-shell-fab {
  --fab-bottom: calc(75px + var(--safe-bottom-effective) + var(--stratum-app-shell-accessory-height, 0px));
}
.stratum-app-shell-fab--alt {
  background: var(--accent-alt);
  box-shadow:
    0 6px 16px rgba(255, 149, 0, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.1);
}
.stratum-app-shell-fab--alt:hover {
  background: color-mix(in srgb, var(--accent-alt) 88%, black);
}
.stratum-app-shell-fab:active {
  transition-duration: 0.15s;
  transform: scale(0.94);
}
.stratum-app-shell-fab--nav-hidden:active {
  transform: translateY(calc(var(--fab-bottom) - var(--fab-hidden-bottom))) scale(0.94);
}
.stratum-app-shell-fab svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}
/* FAB is hidden on desktop (nav is mobile-only). */
@media (min-width: 768px) {
  .stratum-app-shell-fab {
    display: none;
  }
}
.stratum-app-shell--edit-mode .stratum-app-shell-fab {
  display: none;
}

/* Opt-in (AppShellLayoutProps.navBorderless). Two classes so it also beats the
   dark-mode border color above. */

/* ── Nav item badge (AppShellNavItem.badge) ── */
.stratum-app-shell-nav-icon {
  position: relative;
  display: flex;
  flex-shrink: 0;
}
.stratum-app-shell-badge {
  position: absolute;
  top: -3px;
  right: -7px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  box-sizing: border-box;
  border-radius: 8px;
  background: var(--warn);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px var(--bg);
}
/* A standing count (badgeTone="count"): grey, so it doesn't read as something new. */
.stratum-app-shell-badge--count {
  background: var(--ink-3);
}
/* The rail's icon is padded for its active highlight, so the badge sits on the padding box. */
.stratum-app-shell-rail-btn .stratum-app-shell-badge {
  top: 2px;
  right: 1px;
  box-shadow: 0 0 0 2px var(--surface-2);
}

/* The document, frozen while a page has an accessory (mobile): nothing to scroll, so nothing - an
   on-screen keyboard coming up - can scroll it. The page scrolls its own container. :root (not
   html) out-ranks an app's own mobile body rules (e.g. `html:not(.x) body { overflow: visible }`). */
@media (max-width: 767px) {
  :root.stratum-frozen-document {
    overflow: hidden;
  }
  :root.stratum-frozen-document body {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
  }
}

/* ── A banner above the page ──
   The main column becomes a column on a phone too, so the page takes what the banner leaves instead of
   the full height. The banner takes the notch's room, so the page's own header (which clears it with
   --safe-top) doesn't clear it twice. */
.stratum-app-shell-banner {
  flex-shrink: 0;
  /* Over the mobile page header, which is fixed to the top of the viewport and slides up under it. */
  position: relative;
  z-index: 11;
  background: var(--bg);
  padding-top: var(--safe-top-clear);
}
/* A strip across the column, not a card: the banner's own border and corners go, leaving a line under it. */
.stratum-app-shell-banner > .stratum-status-banner {
  border-width: 0 0 1px;
  border-radius: 0;
  padding: 9px 16px;
}
.stratum-app-shell--has-banner .stratum-app-shell-main {
  display: flex;
  flex-direction: column;
  /* What a page that must be viewport-tall (not just fill its parent) gets less the banner. */
  --stratum-app-shell-page-height: calc(var(--vh, 1vh) * 100 - var(--stratum-app-shell-banner-height, 0px));
}
.stratum-app-shell--has-banner .stratum-app-shell-page {
  --safe-top: 0px;
  --safe-top-clear: 0px;
  flex: 1 1 0;
  min-height: 0;
  /* What the banner leaves of the column, as a length rather than the flex size alone: a page's own
     height: 100% only resolves against a definite height, which a flexed one isn't in every browser
     (Safari left the scroll container as tall as its content, so it never scrolled). */
  height: calc(100% - var(--stratum-app-shell-banner-height, 0px));
}
/* The mobile page header (fixed to the viewport's top) starts below the banner. */
.stratum-app-shell--has-banner .stratum-page-header-mobile,
.stratum-app-shell--has-banner .stratum-page-header-mobile-fade {
  top: var(--stratum-app-shell-banner-height, 0px);
}
.stratum-app-shell-bottom-spacer {
  height: calc(var(--stratum-app-shell-content-inset-bottom, 0px) + var(--stratum-app-shell-bottom-spacer-extra, 0px));
}
.stratum-recording-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

/* Reset native <button> chrome — the pill itself is the stop button when a stop action is
   available (see RecordingIndicator.tsx), not just the small red mark inside it.
   `font-family: inherit` only, NOT the `font` shorthand — `font` resets every sub-property
   including size/weight, and since this class has the same specificity as (and is declared
   after) .stratum-recording-indicator above, it silently won: the pill's own
   font-size/font-weight never actually applied whenever a stop action was present (i.e. always,
   while actually recording), it just inherited whatever size the surrounding header happened to
   use. Only font-family needs resetting here — buttons get a distinct UA-default font stack that
   visually clashes with the page's own; size/weight are this component's own explicit choices. */
.stratum-recording-indicator--button {
  border: none;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s;
}
.stratum-recording-indicator--button:hover {
  background: color-mix(in srgb, var(--ink) 8%, var(--surface-2));
}

.stratum-recording-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warn);
  flex-shrink: 0;
  animation: stratum-recording-pulse 1.4s ease-in-out infinite;
}

.stratum-recording-indicator-label {
  color: var(--warn);
  letter-spacing: 0.04em;
}

/* width is set inline per-render (see RecordingIndicator.tsx) — inline-block so it actually
   reserves that space instead of being ignored the way a plain inline element would. Explicit
   left-align since the parent pill is a flex container (default cross-axis centering doesn't
   apply here, but pinning it removes any doubt/sub-pixel drift as the digits inside redraw each
   second — otherwise-identical-width text can still visibly wobble a fraction of a pixel if the
   browser centers it within the box on every re-render). */
.stratum-recording-indicator-time {
  display: inline-block;
  text-align: left;
}

.stratum-recording-indicator-stop {
  /* Now the ONLY red mark in the pill (the status dot is dropped whenever this button is
     present — see RecordingIndicator.tsx) — safe to be a plain solid circle again since
     there's no second red shape left for it to be confused with. A plain <span> now, not its
     own nested button — the whole pill is the button (.stratum-recording-indicator--button),
     this is just its visual mark. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  margin-left: 1px;
  border-radius: 50%;
  background: var(--warn);
  color: #fff;
}
.stratum-recording-indicator-stop svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

@keyframes stratum-recording-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.85);
  }
}

/* Frame picker sheet (FramePickerSheet.tsx): live preview, filmstrip scrub bar, step/random controls. */

.stratum-frame-picker-frame {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Captured frame of a real video: fills its tile, cropped like the app's thumbnails. */
.stratum-frame-picker-frame--real {
  background: #111;
}
.stratum-frame-picker-frame--loading {
  background: linear-gradient(90deg, #111 25%, #2a2a2a 50%, #111 75%);
  background-size: 300% 100%;
  animation: stratum-frame-picker-shimmer 1.4s ease-in-out infinite;
}
@keyframes stratum-frame-picker-shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: 0 0;
  }
}
.stratum-frame-picker-frame--real img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* The live preview letterboxes instead, so a portrait clip shows whole. */
.stratum-frame-picker-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  /* Its own layer, zoomed and panned by a transform (FramePreview's zoom). */
  will-change: transform;
}
/* ── The picker sheet ── */
.stratum-frame-picker-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  /* One finger still scrolls the sheet; two are the zoom's (FramePreview). */
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
/* Zoomed in, every gesture is the zoom's: a drag pans. */
.stratum-frame-picker-preview--zoomed {
  touch-action: none;
  cursor: grab;
}
/* Time sits on the frame itself (like a video player's) instead of a separate heavy readout. */
.stratum-frame-picker-preview-time {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font: 600 13px var(--mono);
  font-variant-numeric: tabular-nums;
}
.stratum-frame-picker-preview-total {
  font-weight: 400;
  opacity: 0.7;
}
/* The shared Spinner, white over the video. */
.stratum-frame-picker-spinner.stratum-spinner {
  position: absolute;
  top: 10px;
  right: 10px;
  --stratum-spinner-track: rgba(255, 255, 255, 0.35);
  --stratum-spinner-arc: #fff;
}

/* The zoomable timeline under the preview. */
.stratum-frame-picker-preview + .stratum-zoom-timeline,
.stratum-frame-picker-preview + .stratum-trim-sheet-ends + .stratum-zoom-timeline {
  margin-top: 16px;
}

/* Stepper: one segmented pill instead of loose links. */
.stratum-frame-picker-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 22px;
}
.stratum-frame-picker-stepper {
  display: inline-flex;
  border-radius: 999px;
  background: var(--surface-2);
  padding: 3px;
}
.stratum-frame-picker-stepper button {
  border: 0;
  background: none;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--ink);
  font: 500 13px var(--mono);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.stratum-frame-picker-stepper button:hover {
  background: var(--bg);
}
.stratum-frame-picker-stepper button:active {
  transform: scale(0.96);
}
.stratum-zoom-timeline {
  display: flex;
  flex-direction: column;
  gap: 6px;
  user-select: none;
  -webkit-user-select: none;
}

/* The frames, the dimmed outside of a trim, the marks and handles, all placed by the time they show. */
.stratum-zoom-timeline-track {
  position: relative;
  /* TRACK_PX in ZoomTimeline.tsx. */
  height: 52px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-2, #eceae4);
  cursor: pointer;
  /* Two fingers zoom and pan the timeline (usePanZoomGestures); one drags a handle. */
  touch-action: none;
  outline: none;
}
.stratum-zoom-timeline-track:focus-visible {
  box-shadow: 0 0 0 2px var(--accent, #2f6fed);
}
.stratum-zoom-timeline-tiles {
  position: absolute;
  inset: 0;
}
.stratum-zoom-timeline-tile {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}
/* A caller's frame (frameAt) fills its tile. */
.stratum-zoom-timeline-tile > * {
  width: 100%;
  height: 100%;
}
/* Nothing in a tile is dragged or pressed on its own: the track takes the pointer. */
.stratum-zoom-timeline-tile img {
  -webkit-user-drag: none;
  pointer-events: none;
}
.stratum-zoom-timeline-tile > .stratum-zoom-timeline-frame {
  flex: none;
  background-repeat: no-repeat;
}
.stratum-zoom-timeline-frame--loading {
  background: color-mix(in srgb, currentColor 8%, transparent);
}

.stratum-zoom-timeline-dim {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgb(0 0 0 / 0.55);
  pointer-events: none;
}

.stratum-zoom-timeline-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  margin-left: -2px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 0 0 1.5px var(--accent), 0 2px 6px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
/* A trim's ends: a wider grip on the kept side. */
.stratum-zoom-timeline-handle--start,
.stratum-zoom-timeline-handle--end {
  width: 6px;
  background: var(--accent, #2f6fed);
  box-shadow: none;
}
.stratum-zoom-timeline-handle--start {
  margin-left: 0;
  border-radius: 3px 0 0 3px;
}
.stratum-zoom-timeline-handle--end {
  margin-left: -6px;
  border-radius: 0 3px 3px 0;
}
.stratum-zoom-timeline-handle--active {
  box-shadow: 0 0 0 2px #fff;
}

/* A mark (where the current thumbnail is): a dashed line through the frames, a button to go back there. Narrow, so
   it takes little of the track. */
.stratum-zoom-timeline-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: 10px;
  margin-left: -5px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.stratum-zoom-timeline-mark::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 4px;
  border-left: 2px dashed rgba(255, 255, 255, 0.95);
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.7));
}
.stratum-zoom-timeline-mark:hover::after {
  border-left-color: var(--accent);
}

.stratum-zoom-timeline-scale {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font: 11px var(--mono);
  color: var(--ink-3);
}
.stratum-zoom-timeline-zoom {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.stratum-zoom-timeline-span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
/* Each end of the scale: the time there, and a button to the video's own start or end, zoomed in. */
.stratum-zoom-timeline-edge {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.stratum-zoom-timeline-edge button,
.stratum-zoom-timeline-zoom button {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--line, #ddd);
  border-radius: 6px;
  background: var(--surface, #fff);
  color: inherit;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.stratum-zoom-timeline-zoom button:disabled {
  opacity: 0.4;
  cursor: default;
}
/* Every option in the one grid cell: the cell is the widest, and only the shown text is seen. */
.stratum-stable-text {
  display: inline-grid;
  justify-items: center;
}
.stratum-stable-text > * {
  grid-area: 1 / 1;
  white-space: nowrap;
}
.stratum-stable-text-sizer {
  visibility: hidden;
}
/* Start and End: which handle the preview, the arrow keys and the steppers are on. */
.stratum-trim-sheet-ends {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.stratum-trim-sheet-end {
  display: flex;
  flex: 1;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: 13px var(--mono);
  cursor: pointer;
}
.stratum-trim-sheet-end:hover:not(.stratum-trim-sheet-end--active) {
  background: var(--surface-2);
}
.stratum-trim-sheet-end--active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.stratum-trim-sheet-end-label {
  font-family: var(--sans, inherit);
  color: var(--ink-3);
}
.stratum-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 40px 24px;
}
.stratum-empty-state-icon {
  width: 32px;
  height: 32px;
  stroke-width: 1.5;
  color: var(--ink-4);
  margin-bottom: 6px;
}
.stratum-empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.stratum-empty-state-description {
  max-width: 360px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-3);
}
.stratum-empty-state-action {
  margin-top: 10px;
}
.stratum-camera {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stratum-camera-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
}
/* The picture over the whole frame. */
.stratum-camera-live {
  position: absolute;
  inset: 0;
}
.stratum-camera-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stratum-camera-viewfinder {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(60%, 260px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  --stratum-camera-corner: 28px;
  background:
    linear-gradient(#fff, #fff) top left / var(--stratum-camera-corner) 3px,
    linear-gradient(#fff, #fff) top left / 3px var(--stratum-camera-corner),
    linear-gradient(#fff, #fff) top right / var(--stratum-camera-corner) 3px,
    linear-gradient(#fff, #fff) top right / 3px var(--stratum-camera-corner),
    linear-gradient(#fff, #fff) bottom left / var(--stratum-camera-corner) 3px,
    linear-gradient(#fff, #fff) bottom left / 3px var(--stratum-camera-corner),
    linear-gradient(#fff, #fff) bottom right / var(--stratum-camera-corner) 3px,
    linear-gradient(#fff, #fff) bottom right / 3px var(--stratum-camera-corner);
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}
.stratum-camera-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0 4px;
  font-size: 13px;
  color: var(--ink-3);
}
.stratum-camera-meta-icon {
  flex: none;
  width: 15px;
  height: 15px;
  stroke-width: 1.75;
}
.stratum-camera-meta-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-2);
}
.stratum-camera-meta-size {
  flex: none;
  font-family: var(--mono);
  font-size: 12px;
}
.stratum-camera-meta-pick {
  flex: none;
  margin-left: auto;
}
.stratum-qr-code {
  display: block;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.stratum-qr-code--too-long {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--warn);
  background: var(--surface-2);
}
.stratum-line-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.stratum-line-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.stratum-line-chart-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-3);
  font: inherit;
  font-size: 13px;
}
button.stratum-line-chart-chip {
  cursor: pointer;
}
button.stratum-line-chart-chip:hover:not(.stratum-line-chart-chip--on) {
  background: var(--surface-2);
}
.stratum-line-chart-chip--on {
  border-color: var(--line-2);
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 500;
}
.stratum-line-chart-chip:not(.stratum-line-chart-chip--on) .stratum-line-chart-swatch {
  opacity: 0.35;
}
.stratum-line-chart-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.stratum-line-chart-swatch {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.stratum-line-chart-swatch--marker {
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 2px var(--surface) inset;
  border: 1px solid var(--ink);
}
.stratum-line-chart-swatch--band {
  background: var(--line-2);
}
.stratum-line-chart-swatch--reference {
  height: 0;
  border-radius: 0;
  border-top: 1.5px dashed var(--ink-2);
}
.stratum-line-chart-band {
  fill: var(--line-2);
  opacity: 0.8;
}
.stratum-line-chart-reference {
  stroke: var(--ink-2);
  stroke-width: 1;
  stroke-dasharray: 4 3;
}
.stratum-line-chart-plot {
  position: relative;
  width: 100%;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.stratum-line-chart-plot svg {
  display: block;
  overflow: visible;
}
.stratum-line-chart-grid {
  stroke: var(--line);
  stroke-width: 1;
}
.stratum-line-chart-grid--zero {
  stroke: var(--line-2);
}
.stratum-line-chart-tick {
  fill: var(--ink-3);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.stratum-line-chart-line {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.stratum-line-chart-end {
  fill: var(--ink-2);
  font-size: 11px;
  font-weight: 500;
}
.stratum-line-chart-marker-line,
.stratum-line-chart-crosshair {
  stroke: var(--ink-4);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}
.stratum-line-chart-crosshair {
  stroke: var(--ink-3);
  stroke-dasharray: none;
}
.stratum-line-chart-marker {
  fill: var(--ink);
  stroke: var(--surface);
  stroke-width: 2;
}
.stratum-line-chart-hover-dot {
  stroke: var(--surface);
  stroke-width: 2;
}
.stratum-line-chart-hit {
  fill: transparent;
  cursor: crosshair;
}
.stratum-line-chart-tooltip {
  position: absolute;
  top: 4px;
  min-width: 150px;
  max-width: min(240px, 70%);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  font-size: 12.5px;
  color: var(--ink-2);
  pointer-events: none;
}
.stratum-line-chart-tooltip-heading {
  margin-bottom: 4px;
  font-weight: 600;
  color: var(--ink);
}
.stratum-line-chart-tooltip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.6;
}
.stratum-line-chart-tooltip-label {
  flex: 1;
  min-width: 0;
}
.stratum-line-chart-tooltip-value {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
}
.stratum-line-chart-tooltip-footer {
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 12px;
}
.stratum-comparison-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  user-select: none;
  -webkit-user-select: none;
}
.stratum-comparison-rows {
  display: grid;
  grid-template-columns: fit-content(42%) minmax(0, 1fr);
}
.stratum-comparison-row {
  display: contents;
}
.stratum-comparison-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 28px;
  padding: 3px 10px 3px 0;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.25;
  text-align: right;
}
.stratum-comparison-plot {
  position: relative;
  min-height: 28px;
}
.stratum-comparison-plot > svg {
  position: absolute;
  inset: 0;
  overflow: visible;
}
.stratum-comparison-axis .stratum-comparison-plot,
.stratum-comparison-axis .stratum-comparison-label {
  min-height: 22px;
}
.stratum-comparison-row--hover .stratum-comparison-label {
  color: var(--ink);
}
.stratum-comparison-row--hover .stratum-comparison-plot {
  background: var(--surface-2);
}
.stratum-comparison-grid {
  stroke: var(--line);
  stroke-width: 1;
}
.stratum-comparison-grid--zero {
  stroke: var(--ink-4);
}
.stratum-comparison-bar {
  fill: var(--stratum-comparison-bar-color, var(--accent));
}
.stratum-comparison-dot {
  fill: var(--ink);
  stroke: var(--surface);
  stroke-width: 1.5;
}
.stratum-comparison-value,
.stratum-comparison-compare,
.stratum-comparison-tick {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.stratum-comparison-value {
  fill: var(--stratum-comparison-value-text, var(--ink-2));
  font-weight: 500;
}
.stratum-comparison-compare {
  fill: var(--stratum-comparison-compare-text, var(--ink-2));
  font-weight: 500;
}
.stratum-comparison-tick {
  fill: var(--ink-3);
}
.stratum-comparison-swatch {
  background: var(--stratum-comparison-bar-color, var(--accent));
}
.stratum-comparison-dot-key {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
}
.stratum-comparison-tooltip {
  position: absolute;
  top: calc(100% + 2px);
  z-index: 2;
  min-width: 150px;
  max-width: min(240px, 90vw);
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  font-size: 12.5px;
  color: var(--ink-2);
  pointer-events: none;
}
.stratum-comparison-tooltip--above {
  top: auto;
  bottom: calc(100% + 2px);
}
.stratum-comparison-tooltip-heading {
  margin-bottom: 2px;
  font-weight: 600;
  color: var(--ink);
}
.stratum-comparison-tooltip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.6;
  white-space: nowrap;
}
.stratum-comparison-tooltip-label {
  flex: 1;
  min-width: 0;
}
.stratum-comparison-tooltip-value {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
}
/* A changed file's name and letter, colored by how it changed (changeStatus.ts), as in VS Code. */
.stratum-change--modified {
  color: var(--accent-alt);
}
.stratum-change--added,
.stratum-change--untracked {
  color: var(--ok);
}
.stratum-change--deleted,
.stratum-change--conflicted {
  color: var(--warn);
}
.stratum-change--renamed {
  color: var(--accent);
}
.stratum-change-letter {
  flex: none;
  width: 14px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
}
.stratum-file-tree {
  display: flex;
  flex-direction: column;
  min-width: 0;
  /* Its own width decides what a row shows (below), not the screen's: a desktop rail is as narrow as a phone. */
  container-type: inline-size;
}
.stratum-file-tree-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding-right: 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
  font-size: 14px;
  -webkit-user-select: none;
  user-select: none;
}
.stratum-file-tree-row:hover:not(.stratum-file-tree-row--selected) {
  background: var(--surface-2);
}
.stratum-file-tree-row--selected {
  background: var(--accent-soft);
}
.stratum-file-tree-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
/* The row's start, its indent included (its width set per depth): the whole of it opens or closes a folder, the arrow
   at its end, and it reaches over the gap before the icon, so no tap left of the name goes into the folder. */
.stratum-file-tree-chevron {
  flex: none;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  margin-right: -6px;
  padding: 0 6px 0 0;
  border: none;
  border-radius: 8px 0 0 8px;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
}
.stratum-file-tree-chevron svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
  /* i-chevron points down: a closed folder's points right. */
  transform: rotate(-90deg);
  transition: transform 120ms ease;
}
.stratum-file-tree-chevron--open svg {
  transform: none;
}
.stratum-file-tree-icon {
  flex: none;
  width: 17px;
  height: 17px;
  stroke-width: 1.75;
}
.stratum-file-tree-icon--dir {
  color: var(--accent);
}
.stratum-file-tree-icon--file {
  color: var(--ink-3);
}
.stratum-file-tree-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stratum-file-tree-link {
  color: var(--ink-3);
}
.stratum-file-tree-meta {
  flex: none;
  display: flex;
  gap: 10px;
  color: var(--ink-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.stratum-file-tree-size {
  min-width: 48px;
  text-align: right;
}
.stratum-file-tree-date {
  min-width: 82px;
  text-align: right;
}
@container (max-width: 520px) {
  /* A narrow tree (a phone, a desktop rail) gives the name the row: one column stays, the date sorted by date, else
     the size. In a 340px rail both left a name 81px, 2026-11-01. */
  .stratum-file-tree:not(.stratum-file-tree--by-date) .stratum-file-tree-date,
  .stratum-file-tree--by-date .stratum-file-tree-size {
    display: none;
  }
}
.stratum-file-tree-note {
  padding-top: 8px;
  padding-bottom: 8px;
  color: var(--ink-3);
  font-size: 13px;
}
/* A folder with changed files somewhere in it: its name in the modified color, as VS Code's explorer has it. */
.stratum-file-tree-name--holds-changes {
  color: var(--accent-alt);
}
/* A first load's placeholder row: a row's height, no hover. */
.stratum-file-tree-row--placeholder {
  padding-left: 30px;
  cursor: default;
  pointer-events: none;
}
/* A heading over a group of the root's entries (groups): its text lined up with the names' column's start, room
   above it after the group before. */
.stratum-file-tree-group {
  padding: 16px 6px 4px;
}
.stratum-file-tree-group:first-child {
  padding-top: 4px;
}
.stratum-path-bar {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}
.stratum-path-bar::-webkit-scrollbar {
  display: none;
}
.stratum-path-bar-segment {
  display: inline-flex;
  align-items: center;
  flex: none;
}
.stratum-path-bar-sep {
  width: 12px;
  height: 12px;
  margin: 0 2px;
  stroke-width: 2;
  color: var(--ink-4);
  /* i-chevron points down: a separator points on, to the right. */
  transform: rotate(-90deg);
}
.stratum-path-bar-button {
  padding: 4px 6px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--ink-3);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.stratum-path-bar-button:hover:not(.stratum-path-bar-button--current) {
  background: var(--surface-2);
  color: var(--ink);
}
.stratum-path-bar-button--last {
  color: var(--ink);
  font-weight: 600;
}
.stratum-path-bar-button--current {
  cursor: default;
}
.stratum-file-search {
  display: flex;
  flex-direction: column;
  min-width: 0;
  /* Its rows' meta drops a column in a narrow list (below). */
  container-type: inline-size;
}
.stratum-file-search section + section {
  margin-top: 12px;
}
.stratum-file-search-label {
  padding: 8px 4px 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.stratum-file-search-status {
  padding: 10px 4px;
  font-size: 13px;
  color: var(--ink-3);
}
.stratum-file-search-row,
.stratum-file-search-line {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  border: none;
  border-radius: 8px;
  background: none;
  font: inherit;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}
.stratum-file-search-row {
  min-height: 40px;
  padding: 0 6px;
  font-size: 14px;
}
.stratum-file-search-line {
  min-height: 32px;
  padding: 0 6px 0 30px;
  font-size: 13px;
}
.stratum-file-search-row:hover,
.stratum-file-search-line:hover {
  background: var(--surface-2);
}
.stratum-file-search-icon {
  flex: none;
  width: 17px;
  height: 17px;
  stroke-width: 1.75;
}
.stratum-file-search-icon--dir {
  color: var(--accent);
}
.stratum-file-search-icon--file {
  color: var(--ink-3);
}
.stratum-file-search-name {
  flex: none;
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stratum-file-search-where {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: rtl;
  text-align: left;
  font-size: 12px;
  color: var(--ink-3);
}
.stratum-file-search-number {
  flex: none;
  min-width: 32px;
  text-align: right;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
.stratum-file-search-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 12px;
}
/* The same soft yellow as a find's matches in a file (CodeView's .stratum-code-match). */
.stratum-file-search mark {
  border-radius: 2px;
  background: color-mix(in srgb, #ffd60a 45%, transparent);
  color: inherit;
}
/* A heading over a group of names (groups), as the tree's. */
.stratum-file-search-group {
  padding: 10px 6px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.stratum-file-search-group-count {
  margin-left: 4px;
  font-weight: 500;
  color: var(--ink-4);
}
/* Size and date, as the tree's rows have them. */
.stratum-file-search-meta {
  flex: none;
  display: flex;
  gap: 10px;
  color: var(--ink-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.stratum-file-search-size,
.stratum-file-search-date {
  text-align: right;
}
@container (max-width: 520px) {
  /* Narrow (a rail, a phone): only the one the sort is by, the date by date, the size otherwise. */
  .stratum-file-search-meta:not(.stratum-file-search-meta--by-date) .stratum-file-search-date,
  .stratum-file-search-meta--by-date .stratum-file-search-size {
    display: none;
  }
}
.stratum-file-places {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
/* A section's label, as a search's (FileSearchResults), with the chevron that folds it. */
.stratum-file-places-label {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 8px 4px 6px 6px;
  border: none;
  background: none;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.stratum-file-places-count {
  margin-left: 4px;
  font-weight: 500;
  color: var(--ink-4);
}
.stratum-file-places-chevron {
  flex: none;
  width: 14px;
  height: 14px;
  stroke-width: 2;
  /* i-chevron points down: a folded section's points right. */
  transform: rotate(-90deg);
  transition: transform 120ms ease;
}
.stratum-file-places-chevron--open {
  transform: none;
}
.stratum-file-places-row {
  display: flex;
  align-items: center;
  min-height: 40px;
  border-radius: 8px;
}
.stratum-file-places-row:hover:not(.stratum-file-places-row--selected) {
  background: var(--surface-2);
}
.stratum-file-places-row--selected {
  background: var(--accent-soft);
}
.stratum-file-places-open {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  align-self: stretch;
  /* Its icon and name in the tree's columns below (a root row's chevron space). */
  padding: 0 6px 0 30px;
  border: none;
  background: none;
  font: inherit;
  font-size: 14px;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}
.stratum-file-places-icon {
  flex: none;
  width: 17px;
  height: 17px;
  stroke-width: 1.75;
  color: var(--ink-3);
}
.stratum-file-places-icon--dir {
  color: var(--accent);
}
.stratum-file-places-name {
  flex: none;
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Its folder's end in view when cut ("…/Documents/notes"). */
.stratum-file-places-where {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: rtl;
  text-align: left;
  font-size: 12px;
  color: var(--ink-3);
}
.stratum-file-places-empty {
  padding: 4px 6px 8px 30px;
  font-size: 13px;
  color: var(--ink-3);
}
.stratum-change-list {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.stratum-change-list-status {
  padding: 10px 4px;
  font-size: 13px;
  color: var(--ink-3);
}
.stratum-change-list-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0 6px;
  border: none;
  border-radius: 8px;
  background: none;
  font: inherit;
  font-size: 14px;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}
.stratum-change-list-row:hover:not(.stratum-change-list-row--selected) {
  background: var(--surface-2);
}
.stratum-change-list-row--selected {
  background: var(--accent-soft);
}
.stratum-change-list-icon {
  flex: none;
  width: 17px;
  height: 17px;
  stroke-width: 1.75;
  color: var(--ink-3);
}
.stratum-change-list-name {
  flex: none;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stratum-change-list-name--deleted {
  text-decoration: line-through;
}
.stratum-change-list-where {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: rtl;
  text-align: left;
  font-size: 12px;
  color: var(--ink-3);
}
.stratum-change-list-counts {
  flex: none;
  display: flex;
  gap: 4px;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
/* The row that opens every change on one page. */
.stratum-change-list-row--all .stratum-change-list-name {
  font-weight: 600;
}
.stratum-commit-graph {
  display: flex;
  flex-direction: column;
  min-width: 0;
  /* The lanes' colors, cycled through by graphLayout (GRAPH_COLORS). */
  --stratum-graph-0: #0a84ff;
  --stratum-graph-1: #ff2d55;
  --stratum-graph-2: #ff9500;
  --stratum-graph-3: #34c759;
  --stratum-graph-4: #af52de;
  --stratum-graph-5: #00c7be;
  --stratum-graph-6: #a2845e;
  --stratum-graph-7: #5856d6;
}
.stratum-commit-graph-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 6px 0 0;
  border: none;
  border-radius: 8px;
  background: none;
  font: inherit;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}
.stratum-commit-graph-row:hover:not(.stratum-commit-graph-row--selected) {
  background: var(--surface-2);
}
.stratum-commit-graph-row--selected {
  background: var(--accent-soft);
}
.stratum-commit-graph-lanes {
  flex: none;
  overflow: visible;
}
.stratum-commit-graph-lanes path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.stratum-commit-graph-node {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 2;
}
/* HEAD's commit: a ring around a dot, as VS Code marks where you are. */
.stratum-commit-graph-node--head {
  fill: var(--bg);
  stroke-width: 2.5;
}
/* Incoming: on the upstream, not here yet. */
.stratum-commit-graph-node--incoming {
  fill: var(--bg);
  stroke-dasharray: 2 2;
}
.stratum-commit-graph-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}
.stratum-commit-graph-subject {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
}
.stratum-commit-graph-row--incoming .stratum-commit-graph-subject {
  color: var(--ink-2);
}
.stratum-commit-graph-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 11.5px;
  color: var(--ink-3);
}
.stratum-commit-graph-by {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stratum-commit-graph-mark {
  flex: none;
  font-weight: 600;
  color: var(--accent);
}
.stratum-ref-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 160px;
  padding: 0 6px 0 4px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 17px;
  color: #fff;
  background: var(--ink-3);
}
.stratum-ref-badge svg {
  flex: none;
  width: 11px;
  height: 11px;
  stroke-width: 2;
}
.stratum-ref-badge-name {
  overflow: hidden;
  text-overflow: ellipsis;
}
.stratum-ref-badge--branch {
  background: var(--accent);
}
.stratum-ref-badge--remote {
  background: #8e6bd8;
}
.stratum-ref-badge--tag {
  background: var(--accent-alt);
}
.stratum-commit-graph-lanes .stratum-graph-0 {
  color: var(--stratum-graph-0);
}
.stratum-commit-graph-lanes .stratum-graph-1 {
  color: var(--stratum-graph-1);
}
.stratum-commit-graph-lanes .stratum-graph-2 {
  color: var(--stratum-graph-2);
}
.stratum-commit-graph-lanes .stratum-graph-3 {
  color: var(--stratum-graph-3);
}
.stratum-commit-graph-lanes .stratum-graph-4 {
  color: var(--stratum-graph-4);
}
.stratum-commit-graph-lanes .stratum-graph-5 {
  color: var(--stratum-graph-5);
}
.stratum-commit-graph-lanes .stratum-graph-6 {
  color: var(--stratum-graph-6);
}
.stratum-commit-graph-lanes .stratum-graph-7 {
  color: var(--stratum-graph-7);
}
.stratum-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-width: 0;
  user-select: none;
  -webkit-user-select: none;
}
.stratum-bar-chart-plot {
  position: relative;
  width: 100%;
}
.stratum-bar-chart svg {
  display: block;
  overflow: visible;
}
.stratum-bar-chart svg:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}
.stratum-bar-chart-grid {
  stroke: var(--line);
  stroke-width: 1;
}
.stratum-bar-chart-grid--zero {
  stroke: var(--line-2);
}
.stratum-bar-chart-tick,
.stratum-bar-chart-label {
  fill: var(--ink-3);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.stratum-bar-chart-bar path {
  fill: var(--stratum-bar-chart-color, var(--accent));
  opacity: 0.35;
  transition: opacity 120ms ease;
}
.stratum-bar-chart-bar--picked path {
  opacity: 1;
}
.stratum-bar-chart-bar--pickable {
  cursor: pointer;
}
.stratum-bar-chart-bar--pickable:hover:not(.stratum-bar-chart-bar--picked) path {
  opacity: 0.6;
}
.stratum-bar-chart-bar--picked .stratum-bar-chart-label {
  fill: var(--ink);
  font-weight: 600;
}
.stratum-bar-chart-cut {
  stroke: var(--surface);
  stroke-width: 2;
  pointer-events: none;
}
.stratum-bar-chart-hit {
  fill: transparent;
}
.stratum-bar-chart-hover-band {
  fill: var(--surface-2);
}
.stratum-bar-chart-line {
  color: var(--ink);
  pointer-events: none;
}
.stratum-bar-chart-line path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.stratum-bar-chart-line circle {
  fill: currentColor;
}
.stratum-bar-chart .stratum-line-chart-reference,
.stratum-bar-chart-end {
  pointer-events: none;
}
.stratum-bar-chart-end {
  fill: var(--ink-2);
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.stratum-bar-chart-swatch {
  background: var(--stratum-bar-chart-color, var(--accent));
}
.stratum-bar-chart-line-key {
  position: relative;
  flex: none;
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  color: var(--ink);
}
.stratum-bar-chart-line-key::after {
  content: '';
  position: absolute;
  left: 5px;
  top: -2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.stratum-bar-chart-tooltip {
  position: absolute;
  top: 0;
  min-width: 110px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  font-size: 12.5px;
  color: var(--ink-2);
  pointer-events: none;
}
.stratum-bar-chart-tooltip-heading {
  font-weight: 600;
  color: var(--ink);
}
.stratum-bar-chart-tooltip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.6;
  white-space: nowrap;
}
.stratum-bar-chart-tooltip-label {
  flex: 1;
  min-width: 0;
}
.stratum-bar-chart-tooltip-value {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
}
.stratum-bar-chart-tooltip-detail {
  color: var(--ink-3);
}
.stratum-multi-bar-chart-divider {
  stroke: var(--line-2);
  stroke-width: 1;
}
.stratum-multi-bar-chart-group {
  fill: var(--ink-2);
}
.stratum-multi-bar-chart-marker {
  stroke: var(--surface);
  stroke-width: 1.5;
}
.stratum-multi-bar-chart-tooltip-total {
  margin-top: 2px;
  padding-top: 2px;
  border-top: 1px solid var(--line);
  color: var(--ink);
}
/* A card of horizontal bars: each row its name and value on one line, its bar under them. */
.stratum-bar-list {
  display: flex;
  flex-direction: column;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.stratum-bar-list-label {
  padding: 4px 8px 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.stratum-bar-list-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  font: inherit;
  text-align: left;
  color: inherit;
}
button.stratum-bar-list-row {
  cursor: pointer;
}
button.stratum-bar-list-row:hover:not(.stratum-bar-list-row--selected) {
  background: var(--surface-2);
}
.stratum-bar-list-text {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}
.stratum-bar-list-name {
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stratum-bar-list-value {
  flex: none;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.stratum-bar-list-track {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--surface-2);
}
.stratum-bar-list-bar {
  display: block;
  min-width: 4px;
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
}
/* Another bar picked: this one recedes, as BarChart's unpicked bars do. */
.stratum-bar-list-row--dim .stratum-bar-list-bar {
  opacity: 0.35;
}
.stratum-bar-list-row--dim .stratum-bar-list-name {
  color: var(--ink-3);
}
.stratum-stat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-align: center;
}
.stratum-stat-tile-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.stratum-stat-tile-value {
  font-size: 44px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stratum-stat-tile-detail {
  max-width: 420px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-3);
}
/* Grid of thumbnail-forward tiles (screen-share-picker style, e.g. Chrome's "Share your
   screen" dialog) — the thumbnail is the primary visual element, title/app name are a small
   caption below it, not the other way around like a typical settings-style list row. */
.stratum-source-picker-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stratum-source-picker-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  /* The classic grid/flexbox "min-width: auto" trap: a grid item's default minimum width is
     based on its content's intrinsic (unshrinkable) size, so a column whose caption text is
     longer than the other (e.g. "Weekly Sync — Zoom Meeting") can force its own track wider,
     stealing width from the sibling column at wide (desktop-dialog) sheet widths — confirmed by
     hand: narrow/mobile widths looked fine, wide ones didn't. Zeroing it here lets the row (and
     its ellipsis-truncated text below) actually shrink to the grid's intended equal 1fr split. */
  min-width: 0;
}

.stratum-source-picker-thumb {
  position: relative;
  width: 100%;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  overflow: hidden;
  background: var(--surface-2);
  transition: border-color 0.12s;
}
/* Classic padding-top aspect-ratio technique (16:10 → 10/16 = 62.5%) instead of the `aspect-ratio`
   property directly on this box — nested inside a CSS Grid row (whose cells stretch to match
   each other's cross-axis size by default), a 100%-width `aspect-ratio` box can resolve its
   height ambiguously (definite cross-size from the grid's own stretch vs. the width-driven size
   `aspect-ratio` wants) — confirmed by hand: these tiles rendered at a fraction of their intended
   height, plainly wider than 16:10, until switched to this. The padding-top hack has no such
   ambiguity: it's a plain percentage of the box's own width, unrelated to any cross-axis stretch. */
.stratum-source-picker-thumb::before {
  content: '';
  display: block;
  padding-top: 62.5%;
}
/* :not(...selected) here isn't just belt-and-suspenders: `:hover` gives this selector one MORE
   simple selector than the plain `.stratum-source-picker-row--selected` rule below, so without
   it this rule's higher specificity wins even when the row is selected too — hovering a selected
   tile would visibly clear its accent outline back to the plain hover color. Confirmed by hand. */
.stratum-source-picker-row:hover:not(.stratum-source-picker-row--selected) .stratum-source-picker-thumb {
  border-color: var(--line-2);
}
.stratum-source-picker-row--selected .stratum-source-picker-thumb {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.stratum-source-picker-thumb-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-4);
}
.stratum-source-picker-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.stratum-source-picker-thumb svg {
  width: 28px;
  height: 28px;
}

/* Overlaid on the thumbnail's corner rather than trailing the row — only shown once selected
   (an empty-circle affordance on every unselected tile read as clutter across a whole grid of
   them, unlike the single-column list this replaced). */
.stratum-source-picker-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity 0.12s,
    transform 0.12s;
}
.stratum-source-picker-row--selected .stratum-source-picker-check {
  opacity: 1;
  transform: scale(1);
}
.stratum-source-picker-check svg {
  width: 11px;
  height: 11px;
}

.stratum-source-picker-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  padding: 0 2px;
}

.stratum-source-picker-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stratum-source-picker-app {
  font-size: 11px;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Loading state (SourcePickerSheet's `loading` prop) — same grid/tile shape as the real content
   (thumb box at the same 16:10 padding-top ratio, two text-line placeholders sized to roughly
   match the title/app rows below it), so nothing jumps in size once the real sources replace it. */
.stratum-source-picker-skeleton {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stratum-source-picker-skeleton-thumb {
  width: 100%;
  padding-top: 62.5%;
  border-radius: 10px;
  background: var(--surface-2);
  animation: stratum-source-picker-skeleton-pulse 1.4s ease-in-out infinite;
}
.stratum-source-picker-skeleton-line {
  height: 12px;
  border-radius: 4px;
  background: var(--surface-2);
  animation: stratum-source-picker-skeleton-pulse 1.4s ease-in-out infinite;
}
.stratum-source-picker-skeleton-line--short {
  width: 60%;
  height: 10px;
}
@keyframes stratum-source-picker-skeleton-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Shown instead of the grid when `sources` is empty (and not `loading`) — a caller whose list can
   legitimately come back with nothing (e.g. narrowed to a specific allowlist of apps/windows, none
   of which happen to be open right now) previously left this area a silent blank gap between the
   description and the footer buttons, indistinguishable from a bug. */
.stratum-source-picker-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 32px 16px;
  color: var(--ink-3);
}
.stratum-source-picker-empty svg {
  width: 28px;
  height: 28px;
  color: var(--ink-4);
}
.stratum-source-picker-empty p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  max-width: 320px;
}

.stratum-source-picker-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}
/* Both footer buttons are CtaButton instances now (the confirm action and a `variant="ghost"`
   Cancel — see SourcePickerSheet.tsx), so a single rule targeting the shared class covers both,
   rather than two near-duplicate one-off classNames. Outranks Sheet.css's own
   `.stratum-sheet-footer button` desktop rule (which would otherwise stretch these via flex: 1,
   splitting the footer's height between them in this column layout) regardless of stylesheet
   import order — two classes beats one. */
.stratum-source-picker-footer .stratum-cta-button {
  flex: none;
}
.stratum-region-crop-frame {
  display: block;
  position: relative;
  width: 100%;
  /* No fixed aspect-ratio, no object-fit — the frame is just a plain wrapper around the `<img>`
     below, which renders at its own natural aspect ratio (`height: auto`). Normal block flow
     then makes the frame exactly as tall as the rendered image, every time. (The skeleton
     variant below still needs its own placeholder aspect ratio, since there's no image yet to
     size around.) */
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  /* Reset default <button> chrome — this is a plain clickable preview, not a styled button. */
  border: none;
  padding: 0;
  font: inherit;
  text-align: inherit;
  appearance: none;
}
.stratum-region-crop-frame img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

/* Loading state (RegionCropSheet's `loading` prop, or `imageSrc` not ready yet) — needs its own
   placeholder aspect ratio since there's no real image yet for the frame to size around. */
.stratum-region-crop-frame--skeleton {
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
  cursor: default;
  animation: stratum-region-crop-skeleton-pulse 1.4s ease-in-out infinite;
}
@keyframes stratum-region-crop-skeleton-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Spotlight-mask trick: a single element's own box-shadow, spread far past the frame's edges
   and clipped by the frame's `overflow: hidden`, dims everything outside the selection without
   needing separate mask elements for each of the four surrounding edges. */
.stratum-region-crop-selection {
  position: absolute;
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.stratum-region-crop-reset {
  display: block;
  margin: 10px auto 0;
  background: none;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  cursor: pointer;
  transition:
    color 0.12s,
    background-color 0.12s;
}
.stratum-region-crop-reset:hover:not(:disabled) {
  color: var(--ink);
  background: var(--surface-2);
}
.stratum-region-crop-reset:disabled {
  color: var(--ink-4);
  cursor: not-allowed;
}

.stratum-region-crop-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}
/* Same "grid the shared class" convention as SourcePickerSheet.css's own footer — see its
   comment for why this beats Sheet.css's own `.stratum-sheet-footer button` desktop rule. */
.stratum-region-crop-footer .stratum-cta-button {
  flex: none;
}

.stratum-region-crop-description {
  display: block;
  min-height: calc(1.5em * 2);
}
/* The frame and its corners' preview, sized by the image, as RegionCropSheet's. */
.stratum-corner-picker-frame {
  display: block;
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  border: none;
  padding: 0;
  font: inherit;
  text-align: inherit;
  appearance: none;
}
.stratum-corner-picker-frame img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}
.stratum-corner-picker-frame--skeleton {
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  cursor: default;
  animation: stratum-corner-picker-pulse 1.4s ease-in-out infinite;
}
@keyframes stratum-corner-picker-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.stratum-corner-picker-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.stratum-corner-picker-dim {
  fill: rgba(0, 0, 0, 0.55);
}
.stratum-corner-picker-outline {
  fill: none;
  stroke: #fff;
  stroke-width: 1.5px;
}

/* As RegionCropSheet's reset and footer. */
.stratum-corner-picker-reset {
  display: block;
  margin: 10px auto 0;
  background: none;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  cursor: pointer;
  transition:
    color 0.12s,
    background-color 0.12s;
}
.stratum-corner-picker-reset:disabled {
  color: var(--ink-4);
  cursor: not-allowed;
}

.stratum-corner-picker-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.stratum-corner-picker-links {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 10px;
}
.stratum-corner-picker-links .stratum-corner-picker-reset {
  margin: 0;
}
.stratum-transcript-feed {
  flex: 1 1 auto;
  min-height: 240px;
  max-height: 100%;
  overflow-y: auto;
  /* Rows of flex lines, not a grid with subgrid lines: Safari didn't resize a subgrid row when its content changed (a
     translation arriving drew the next line over it, 2026-10-25). The text still starts in one place on every line:
     each time is at least --stratum-transcript-time-width, the widest one's, which TranscriptFeed measures. */
  display: flex;
  flex-direction: column;
  /* Between separate transcript entries (each its own .stratum-transcript-line), not the gap
     within one — that's .stratum-transcript-text-group's own smaller gap between a line's text
     and its translation. Bumped from 10px: felt cramped once furigana/word-spacing was rendering
     (a genuine multi-row segment already reads as visually dense on its own) — a clearer gap here
     helps tell "a new wrapped row of the same segment" apart from "a whole new segment." */
  row-gap: 20px;
  padding: 0;
  /* Font size and line-height both match dictionary-lookup demo's .dl-paragraph
     (stratum-ui-demos) — this is Japanese transcript text by default (see the app's ja_JP
     locale). This component renders plain text on its own, but a `renderText` consumer (electron's
     RecorderApp, via useTranscriptDictionary.tsx) annotates it with real furigana — 2.2 gives
     that reading row room without the wrapped rows of one long segment visibly crowding into the
     row above them (confirmed cramped at a plain-text-tuned 1.6 once real ruby/rt readings were
     actually rendering). A consumer with no furigana at all would find this roomier than it
     needs, but there isn't currently one — TranscriptFeed has exactly one real consumer today. */
  font-size: 20px;
  line-height: 2.2;
}

/* scrollsWithPage: the page around it scrolls instead. */
.stratum-transcript-feed--inline {
  flex: none;
  min-height: 0;
  max-height: none;
  overflow: visible;
}

/* The feed's gap before it would add 20px even while no panel is open: pull it back. */
.stratum-transcript-feed-panel-room {
  flex: none;
  height: var(--stratum-bottom-panel-height, 0px);
  margin-top: -20px;
}

.stratum-transcript-feed-end {
  flex: none;
  height: 1px;
  margin-top: -20px;
}

.stratum-transcript-feed-empty {
  margin: auto;
  color: var(--ink-4);
  font-size: 14px;
}

.stratum-transcript-line {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.stratum-transcript-time {
  flex-shrink: 0;
  min-width: var(--stratum-transcript-time-width, 34px);
  box-sizing: border-box;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-4);
  border-radius: 4px;
  /* Horizontal padding (not a fixed width) so longer timestamps like 61:20
     grow the pill instead of touching its edges. */
  padding: 2px 6px;
  /* Left, so every line's time starts in the same place in the shared column (a speaker after it varies). */
  text-align: left;
  transition: background-color 0.15s, color 0.15s;
}

/* When the timestamp is hidden and only the suffix (e.g. speaker indicator) shows,
   left-align it instead of the timestamp pill's centered text. */
.stratum-transcript-time--suffix-only {
  flex-basis: 100%;
  text-align: left;
  min-width: 0;
  padding-left: 0;
  padding-right: 0;
  margin-bottom: 0;
}

/* Replay-only (WatchPage): badges the segment matching the video's current playback position —
   scoped to just the timestamp, not the whole line (a real, confirmed problem: recoloring the
   WHOLE LINE's background/text made ordinary transcript text read as a hyperlink/highlighted
   content, and made the entire line look like one big click target when only the timestamp
   actually is one — see onSegmentClick's own doc). A small colored badge on the time itself reads
   as "here's where we are" without implying anything about the line's own text. */
.stratum-transcript-time--active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

/* Replay-only (WatchPage): only the timestamp is a seek target when onSegmentClick is passed —
   not the whole line, which is where a separate word-click-to-look-up interaction lives instead. */
.stratum-transcript-time--clickable {
  cursor: pointer;
}
/* The hover wash is for idle timestamps only — the active line's own blue pill keeps its
   color on hover instead of flashing gray. */
.stratum-transcript-time--clickable:not(.stratum-transcript-time--active):hover {
  background: var(--surface-2);
}

.stratum-transcript-text-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  /* Lets the text/translation spans wrap and ellipsis correctly inside the flex row instead of
     forcing the row wider than its container — the classic flex min-width:auto trap. */
  min-width: 0;
}

.stratum-transcript-text {
  color: var(--ink);
}

/* Deliberately no distinct styling for .stratum-transcript-line--volatile .stratum-transcript-text
   — an earlier version dimmed it to var(--ink-3) to signal "in progress", but for Japanese text
   (this app's ja_JP locale) that read as low-contrast/harder to parse rather than as a status
   indicator, so the in-progress line is now fully opaque, same as a finalized one. Also no
   font-style: italic for the same reason CJK has no real italic tradition — browsers just
   synthetically skew the glyphs, which reads as broken rather than stylistic. */

.stratum-transcript-translation {
  /* Dimmer than the main text — a translation is always secondary to its source line, finalized
     or not. Same no-italics reasoning as above extended to translated text too, for visual
     consistency between the two lines rather than because English itself lacks an italic
     tradition. Sizing matches dictionary-lookup demo's own .dl-line-translation proportion under
     its same 20px/2.2 main line. */
  color: var(--ink-4);
  font-size: 15px;
  line-height: 1.6;
}

/* Mobile: timestamp on its own row above the text, like a divider between
   entries. Translation on its own row below the Japanese, matching desktop.
   Placed at end of file so it wins the cascade over the base rules above. */
@media (max-width: 767px) {
  .stratum-transcript-line {
    display: block;
  }
  .stratum-transcript-time {
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
    min-width: 0;
    padding: 0;
    margin-bottom: 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: none;
    border-radius: 0;
    text-align: left;
    color: var(--ink-3);
  }
  .stratum-transcript-time--active {
    background: none;
    color: var(--accent);
  }
  .stratum-transcript-time--clickable:not(.stratum-transcript-time--active):hover {
    background: none;
  }
  .stratum-transcript-text-group {
    display: block;
  }
  .stratum-transcript-translation {
    display: block;
    margin-top: 6px;
  }
}

/* No desktop padding override — .stratum-transcript-feed has padding: 0,
   .wpd-body (or the consumer) provides all spacing to avoid stacking. */

/* DictLookupSheet passes BottomPanel a fixed `maxHeight="180px"` inline style,
   sized for desktop's wider column where entries rarely wrap. Mobile's narrower
   width makes the same content wrap onto more lines, so 180px feels cramped
   there — bump it a bit for mobile only. `:has()` scopes this to the dict
   panel specifically (SelectionPromptSheet is also a bare BottomPanel with its
   own 180px), and `!important` is required since an inline `style` always
   outranks a stylesheet rule regardless of specificity. */
@media (max-width: 767px) {
  .stratum-bottom-panel:has(.dict-lookup-body) {
    max-height: 240px !important;
  }
}

/* No max-height/overflow here — BottomPanel's own body region
   (.stratum-bottom-panel-body) already caps height and scrolls; nesting a
   second scroll container would just double up. */
.dict-lookup-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dict-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-3);
  padding: 8px 0;
}

.dict-entry {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dict-entry-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.dict-entry-word {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}
.dict-entry-reading {
  color: var(--ink-3);
  font-size: 14px;
}
.dict-entry-reason {
  font-size: 13px;
  color: var(--ink-3);
  font-style: italic;
}

.dict-pos-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.dict-pos-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-2);
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 10px;
  line-height: 1.5;
}

.dict-senses {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}
.dict-sense {
  display: flex;
  gap: 6px;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
}
.dict-sense-num {
  color: var(--ink-3);
  flex-shrink: 0;
}

/* Separates stacked entries when a lookup returns more than one — a plain
   top border rather than gap+background, matching how other list rows in
   this app (e.g. .read-chapter-item) separate without a full card look. */
.dict-entry + .dict-entry {
  padding-top: 12px;
  border-top: 1px solid var(--line-2);
}

.dict-kanji-section {
  border-top: 1px solid var(--line-2);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dict-kanji-heading {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  margin: 0;
}

.dict-kanji-entry {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.dict-kanji-char {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}
.dict-kanji-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.dict-kanji-onkun {
  font-size: 13px;
  color: var(--ink-3);
}
.dict-kanji-meanings {
  font-size: 14px;
  color: var(--ink);
}
/* Sizes are :where() rules, so an app's own class for its text size wins whatever order the CSS loads in. */

/* A reader's page, as media's novel reader sets a chapter: its text and translation sizes, for every page of
   reading (the reader's chapter, title and fields, and transcripts) to share. */
:root {
  --stratum-reading-size: 16px;
  --stratum-reading-translation-size: 15px;
}
@media (min-width: 768px) {
  :root {
    --stratum-reading-size: 24px;
    --stratum-reading-translation-size: 20px;
  }
}
.stratum-reading-text {
  font-size: var(--stratum-reading-size);
  line-height: 1.9;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}
.stratum-reading-text .stratum-reading-translation {
  font-size: var(--stratum-reading-translation-size);
}

/* ReadingToken: the gap is a margin, never a space character, so a selection or copy is the text itself. */
.stratum-reading-token {
  margin-right: 0.4em;
}
.stratum-reading-token:last-child {
  margin-right: 0;
}

/* Furigana is never selected or copied, and a tap on it falls through to the word under it (Safari's ruby-text box
   needs the prefixed property too). */
.stratum-reading-token rt {
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}

/* Always half the text: Safari raises a relative size below its 9px minimum (rt's default 50% of 13px text drew at
   82%), and a calc() size isn't raised. */
:where(.stratum-reading-token) rt {
  font-size: calc(0.5em + 0px);
}

/* The dictionary's match: it can span several words (a conjugated verb split in two), so the background bridges each
   gap with an equal-colored shadow, rounded only at the run's ends. */
.stratum-reading-token.stratum-reading-token--match {
  background: rgba(255, 200, 0, 0.4);
  box-shadow: 0.4em 0 0 0 rgba(255, 200, 0, 0.4);
  border-radius: 0;
}
.stratum-reading-token.stratum-reading-token--match:not(.stratum-reading-token--match + .stratum-reading-token--match) {
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;
}
.stratum-reading-token.stratum-reading-token--match:not(:has(+ .stratum-reading-token--match)) {
  border-top-right-radius: 3px;
  border-bottom-right-radius: 3px;
  box-shadow: none;
}

/* ReadingTranslation: beneath its line, muted, on its own line. */
:where(.stratum-reading-translation) {
  font-size: 0.94em;
}
.stratum-reading-translation {
  margin: 4px 0;
  line-height: 1.7;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
  cursor: default;
  transition:
    filter 0.18s ease,
    opacity 0.18s ease;
}

/* The reveal button's positioning context, as wide as the text: a short translation gets the button over it, not
   at the middle of the column. */
.stratum-reading-translation-body {
  position: relative;
  display: inline-block;
  vertical-align: top;
  min-width: 40px;
  max-width: 100%;
}

/* Blurred with a filter, not covered, so revealing it moves nothing; not selectable meanwhile, no iOS callout. */
.stratum-reading-translation--blurred {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.stratum-reading-translation--blurred .stratum-reading-translation-text {
  filter: blur(6px);
}
/* Room inside the box for the blur's halo (else its left edge is cut off sharply on iPhone), the negative margins
   keeping the text where it is unblurred: same width, same wrapping. About 3x the blur. */
.stratum-reading-translation.stratum-reading-translation--blurred {
  padding: 0 18px;
  margin: 4px -18px;
}
/* ReadingParagraph's translationFade, for a container that clips at the column's edges, where the room above would be
   cut off sharply: no room, the blur faded out at its sides instead, the text as wide blurred as revealed. Its box
   reaches past the text above and below, the mask covering it there, so the halo's top and bottom aren't cut. */
.stratum-reading-translation.stratum-reading-translation--fade.stratum-reading-translation--blurred {
  padding: 0;
  margin: 4px 0;
}
.stratum-reading-translation--fade.stratum-reading-translation--blurred .stratum-reading-translation-text {
  display: block;
  padding-block: 12px;
  margin-block: -12px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 18px, #000 calc(100% - 18px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 18px, #000 calc(100% - 18px), transparent);
}

/* RevealButton: centered over its blurred translation's text (the positioning context), translucent so it stays quiet;
   manipulation drops the double-tap-zoom delay on it alone. */
.stratum-reveal-button {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  color: var(--ink-2);
  cursor: pointer;
  touch-action: manipulation;
  opacity: 1;
  transition:
    opacity 0.18s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
  animation: stratum-reveal-button-in 0.18s ease;
}
.stratum-reveal-button:hover {
  border-color: color-mix(in srgb, var(--ink) 32%, transparent);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  color: var(--ink);
}
.stratum-reveal-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* With a meter: a 2.5px ring around the eye, as full as the meter (a conic fill masked to a band at the edge, as
   media's peek ring on its floating button), over the button's own border; red, and no hover, while it can't pay. */
/* The ring a soft grey, not the eye's ink, so it stays out of the way while reading; red only while short. */
.stratum-reveal-button--meter {
  --stratum-reveal-ring: color-mix(in srgb, var(--ink) 25%, transparent);
  border-color: color-mix(in srgb, var(--ink) 10%, transparent);
}
.stratum-reveal-button--meter::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  pointer-events: none;
  /* 361deg, not a turn: full, the fill runs past its start, so there's no seam at 12 o'clock. */
  background: conic-gradient(var(--stratum-reveal-ring) calc(var(--stratum-reveal-fraction, 1) * 361deg), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 1.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 1.5px));
}
.stratum-reveal-button--short,
.stratum-reveal-button--short:hover {
  --stratum-reveal-ring: var(--warn);
  color: var(--warn);
  cursor: default;
}
@keyframes stratum-reveal-button-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.stratum-reading-translation--pending {
  color: var(--ink-3);
}

/* ReadingPanel's text. */
:where(.stratum-reading-panel-text) {
  font-size: 16px;
}
.stratum-reading-panel-text {
  padding-top: 4px;
  line-height: 2;
  color: var(--ink);
  overflow-wrap: break-word;
}

/* ReadingParagraph: its text takes the line height furigana needs. */
.stratum-reading-paragraph-text {
  line-height: 2;
}
/* useTranscriptDictionary's lines: its words are ReadingTokens and its translations ReadingTranslations (the novel
   reader's look, ReadingText.css); only these are its own. */

/* Zero-width furigana spacer prepended to every line — invisible, so it shouldn't act like real
   selectable/interactive text either. */
.wt-furigana-spacer {
  user-select: none;
  cursor: default;
}

/* Underlines whichever word is playing (activeWordRange): an underline, since a background is the dictionary's
   match. */
.stratum-reading-token.wt-token--playing {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
/* Set as the novel reader sets a chapter (.stratum-reading-text): its size and line height rather than the feed's own,
   a blank line between lines as between its paragraphs, and no time column. */
.stratum-live-transcript .stratum-transcript-feed {
  font-size: inherit;
  line-height: inherit;
  gap: 1.9em;
}
.stratum-live-transcript .stratum-transcript-line {
  display: block;
  border-radius: 4px;
  transition: background-color 0.15s, box-shadow 0.15s;
}
.stratum-live-transcript .stratum-transcript-time {
  display: none;
}
.stratum-live-transcript .stratum-transcript-text-group {
  display: block;
}
/* A line's text as one block (the dictionary hook's outer span): a tap beside a short line still lands on it. */
.stratum-live-transcript .stratum-transcript-text > [data-line-key] {
  display: block;
  cursor: text;
}

/* An English line's Japanese: drawn as a Japanese line (its size, furigana and spacing), in a translation's color. */
.stratum-live-transcript-japanese-translation {
  display: block;
  margin-top: 4px;
  color: var(--ink-2);
}

/* The line playing in a replay: a soft background drawn past its edges, so marking it moves nothing. */
.stratum-live-transcript .stratum-transcript-line:has(> .stratum-transcript-time--active) {
  background: var(--accent-soft);
  box-shadow: 0 0 0 6px var(--accent-soft);
}

/* A replay's English is what jumps to its line. */
.stratum-live-transcript--seekable .stratum-reading-translation {
  cursor: pointer;
}
/* A bounded, nested-scroll layout (not the document scrolling): the main column scrolls itself under a header pinned
   to its top, so on a phone the rail stacked above stays in view. height: 100% fills the app shell's main area. */
.stratum-rail-layout {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.stratum-rail-layout-rail {
  flex: 0 0 auto;
  overflow-y: auto;
}

.stratum-rail-layout-rail-inner {
  /* Phone: clear of the status bar and its blur. */
  padding: var(--safe-top-clear) 16px 16px;
}

/* A video in the rail (or a VideoPlayer): full width, rounded, black behind its letterbox (a VideoPlayer's own, once
   it's loaded: before, its poster or shimmer). */
.stratum-rail-layout-rail-inner > video,
.stratum-rail-layout-rail-inner > .stratum-video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
}
.stratum-rail-layout-rail-inner > video {
  background: #000;
}
.stratum-rail-layout-rail-inner > audio {
  display: block;
  width: 100%;
}

/* A wide invisible hit area with a thin line down its middle, thicker and accent while hovered or dragged. */
.stratum-rail-layout-divider {
  position: relative;
  flex-shrink: 0;
}

.stratum-rail-layout-main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Anchors the mobile header pinned below. */
  position: relative;
}

/* PageHeaderMobile is fixed to the viewport, which would float it over the rail: pin it to the main column's top
   instead, and drop the safe-area padding it keeps for the top of the screen (the rail is there now). */
.stratum-rail-layout-main .stratum-page-header-mobile {
  position: absolute;
}
.stratum-rail-layout-main .stratum-page-header-mobile-inner {
  padding-top: 0;
}
.stratum-rail-layout-main .stratum-page-header-spacer {
  height: 56px;
}
/* The top of the screen is the rail's, never the header's, so the status-bar fade stays on rather than standing in
   for the header only while it's hidden. */
.stratum-rail-layout-main .stratum-page-header-mobile-fade {
  opacity: 1;
}

@media (min-width: 768px) {
  .stratum-rail-layout {
    flex-direction: row;
  }
  .stratum-rail-layout-rail {
    width: var(--stratum-rail-width);
    height: 100%;
  }
  .stratum-rail-layout-rail-inner {
    padding: 20px 16px 40px;
  }
  .stratum-rail-layout-divider {
    width: 6px;
    cursor: col-resize;
    touch-action: none;
  }
  .stratum-rail-layout-divider::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 1px;
    background: var(--line);
    transition: background 0.12s, width 0.12s;
  }
  /* The rail over the whole width; the page kept laid out beneath it at its own width (its scroll and layout as they
     were), out of sight. */
  .stratum-rail-layout--rail-full {
    position: relative;
  }
  .stratum-rail-layout--rail-full > .stratum-rail-layout-rail {
    flex: 1 1 auto;
    width: auto;
  }
  .stratum-rail-layout--rail-full > .stratum-rail-layout-divider {
    display: none;
  }
  .stratum-rail-layout--rail-full > .stratum-rail-layout-main {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    visibility: hidden;
  }
  .stratum-rail-layout-divider:hover::after,
  .stratum-rail-layout-divider--active::after {
    width: 3px;
    background: var(--accent);
  }
}

/* Phone: the divider is a hairline under the rail, as the header's own, shown only once the header has slid away
   (while it's there, the header's line separates them once the page is scrolled). */
@media (max-width: 767px) {
  .stratum-rail-layout-rail {
    width: 100%;
  }
  .stratum-rail-layout-divider {
    width: 100%;
    height: 1px;
    pointer-events: none;
    background: var(--stratum-hairline-color);
    transform: scaleY(var(--stratum-hairline-scale, 1));
    transform-origin: top;
    opacity: 0;
    transition: opacity 0.15s;
  }
  .stratum-rail-layout:has(.stratum-page-header-mobile--hidden) .stratum-rail-layout-divider {
    opacity: 1;
  }
}
/* How far what's shown keeps its content (a table's header labels) down from the screen's top: past
   the safe area, and past the blur an iOS PWA's status bar casts below it. */
.stratum-fullscreen {
  --stratum-fullscreen-top-inset: var(--safe-top-clear);
}
/* The page's own background, not MediaViewer's black: what's shown here is page content (a table, a
   file, a diagram) drawn in the page's colors. */
.stratum-photo-viewer.stratum-fullscreen {
  background: var(--bg);
}
/* MediaViewer's backdrop (.stratum-photo-viewer), holding what's shown edge to edge. */
.stratum-fullscreen-body {
  width: 100%;
  height: 100%;
}
/* The title: MediaViewer's position pill, but tappable (a menu) and cut short when long. */
.stratum-fullscreen-title {
  max-width: calc(100% - 140px);
  pointer-events: auto;
}
.stratum-fullscreen-title.stratum-photo-viewer-glass--hidden {
  pointer-events: none;
}
.stratum-fullscreen-title-text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stratum-fullscreen-title-chevron {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
}
/* controls="bottom": the title, the content's own controls (the slot) and Close in one row along the
   bottom, on every screen - Close keeps its size (a phone's large one, desktop's small one) and its
   hiding (with the rest on a phone, never on desktop). */
.stratum-fullscreen-bar {
  position: absolute;
  left: max(18px, var(--safe-left, 0px));
  right: max(18px, var(--safe-right, 0px));
  bottom: max(18px, var(--safe-bottom, 0px));
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.stratum-fullscreen-bar .stratum-fullscreen-title {
  position: static;
  min-width: 0;
  max-width: none;
  overflow: hidden;
  transform: none;
}
.stratum-fullscreen-bar-slot {
  display: flex;
  min-width: 0;
  pointer-events: auto;
}
.stratum-fullscreen-bar .stratum-photo-viewer-close {
  position: static;
  flex-shrink: 0;
  margin-left: auto;
  /* The row passes taps through to what's under it; its controls take their own. */
  pointer-events: auto;
}
@media (max-width: 767px) {
  .stratum-fullscreen-bar .stratum-photo-viewer-close--controls-hidden {
    pointer-events: none;
  }
}

/* Controls hidden (a tap on what's shown): what's in the bottom row's slot, and whatever the content
   marks as a control, fade out with the title - and stop taking taps. Each fades itself, never a
   wrapper around it: glass (backdrop-filter) under a fading ancestor can't blur what's behind it until
   that ancestor is opaque again, so it would fade in unblurred and then pop - mark the glass element
   itself. Close has its own rule (hidden with them on a phone, never on desktop). */
.stratum-fullscreen .stratum-fullscreen-bar-slot > *,
.stratum-fullscreen [data-fullscreen-control] {
  /* As the glass's own (MediaViewer.css): its tone changes ease too. */
  transition:
    opacity 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}
.stratum-fullscreen--controls-hidden .stratum-fullscreen-bar-slot > *,
.stratum-fullscreen--controls-hidden [data-fullscreen-control] {
  opacity: 0;
  pointer-events: none;
}

/* A table fills the screen edge to edge, as a diagram does, under its controls along the bottom
   (controls="bottom", its row count among them): its header row sticks at the top, clear of the status
   bar's area in an iOS PWA (which blurs what's under it) by its own padding, its background still
   reaching the screen's top; and past its last row, when it overflows, there's room to scroll it above
   the controls. */
.stratum-fullscreen .stratum-csv--full {
  border-radius: 0;
  --stratum-csv-top-inset: var(--stratum-fullscreen-top-inset);
  --stratum-csv-end-room: calc(64px + var(--safe-bottom, 0px));
}
.stratum-fullscreen .stratum-csv--full .stratum-csv-scroll {
  border-radius: 0;
}
@media (max-width: 767px) {
  .stratum-fullscreen .stratum-csv--full {
    --stratum-csv-end-room: calc(86px + var(--safe-bottom, 0px));
  }
}
.stratum-csv {
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
}
.stratum-csv--full {
  height: 100%;
  min-height: 0;
}
/* Floating over the table's bottom corners: the row count (left), the controls (right). Lifted clear
   of the home indicator when the table reaches the screen's bottom edge (FileViewer in a panel). */
.stratum-csv-count,
.stratum-csv-actions {
  position: absolute;
  bottom: calc(10px + var(--stratum-csv-bottom-inset, 0px));
  z-index: 3;
}
.stratum-csv-count {
  left: 10px;
  max-width: calc(100% - 80px);
  padding: 7px 12px;
  border-radius: 999px;
  overflow: hidden;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: none;
}
/* In a full screen's row of controls (FullscreenView controls="bottom"): laid out in the row. */
.stratum-csv-count--in-bar {
  position: static;
  max-width: 100%;
}
/* A full screen on a phone has no room for it beside the title and Close. */
@media (max-width: 767px) {
  .stratum-csv--full .stratum-csv-count,
  .stratum-csv-count--in-bar {
    display: none;
  }
}
.stratum-csv-actions {
  right: 10px;
  display: flex;
  gap: 6px;
}
/* Past the last row, when the rows overflow: room to scroll it above the floating count and controls. */
.stratum-csv-end {
  height: var(--stratum-csv-end-room, calc(52px + var(--stratum-csv-bottom-inset, 0px)));
}
/* No rubber band: pulled past its top on iOS, the sticky header slid down off the top and the scroll
   indicator showed in the gap above it - an overlay scrollbar draws over any content, so no background
   there could hide it. */
.stratum-csv-scroll {
  overflow: auto;
  overscroll-behavior: none;
  max-height: var(--stratum-csv-max-height, 320px);
  border-radius: 8px;
  background: var(--surface-2);
}
.stratum-csv--full .stratum-csv-scroll {
  flex: 1;
  min-height: 0;
  max-height: none;
}
.stratum-csv-scroll {
  display: grid;
  grid-template-columns: var(--stratum-csv-gutter) minmax(var(--stratum-csv-body-w), 1fr);
  grid-template-rows: auto minmax(var(--stratum-csv-body-h), 1fr) auto;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-2);
}
/* The header row sticks at the very top. Under something floating over the table's top (a full
   screen's title), it's taller by that much, its labels below it: the title floats on the header's own
   background, and no row ever shows above the header. */
.stratum-csv-corner,
.stratum-csv-head {
  position: sticky;
  top: 0;
  grid-row: 1;
  box-sizing: border-box;
  height: calc(27px + var(--stratum-csv-top-inset, 0px));
  background: var(--surface-2);
  box-shadow: inset 0 -1px 0 var(--line-2);
}
.stratum-csv-corner {
  left: 0;
  z-index: 3;
  grid-column: 1;
}
.stratum-csv-head {
  z-index: 2;
  grid-column: 2;
}
/* Row numbers stick at the left. */
.stratum-csv-nums {
  position: sticky;
  left: 0;
  z-index: 1;
  grid-column: 1;
  grid-row: 2;
  background: var(--surface-2);
}
.stratum-csv-body {
  position: relative;
  grid-column: 2;
  grid-row: 2;
}
.stratum-csv-end {
  grid-column: 1 / -1;
  grid-row: 3;
}
.stratum-csv-th,
.stratum-csv-num,
.stratum-csv-td {
  position: absolute;
  box-sizing: border-box;
  padding: 4px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stratum-csv-th {
  bottom: 0;
  height: 27px;
  font-weight: 600;
  color: var(--ink);
}
.stratum-csv-num,
.stratum-csv-td {
  border-bottom: 1px solid var(--line);
}
.stratum-csv-num {
  left: 0;
  right: 0;
  color: var(--ink-4);
  text-align: right;
  user-select: none;
}
.stratum-md {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.stratum-md > * {
  margin: 0 0 12px;
}
.stratum-md > :last-child {
  margin-bottom: 0;
}
.stratum-md h3,
.stratum-md h4,
.stratum-md h5 {
  margin-top: 18px;
  font-weight: 600;
  line-height: 1.35;
}
.stratum-md h3 {
  font-size: 17px;
}
.stratum-md h4 {
  font-size: 15px;
}
.stratum-md h5 {
  font-size: 14px;
  color: var(--ink-2);
}
.stratum-md > :first-child {
  margin-top: 0;
}
.stratum-md ul,
.stratum-md ol {
  padding-left: 22px;
}
.stratum-md li + li {
  margin-top: 4px;
}
/* A list nested in an item: just under its text, spaced as items are. */
.stratum-md li > ul,
.stratum-md li > ol {
  margin: 4px 0 0;
}
.stratum-md hr {
  border: none;
  border-top: 1px solid var(--line);
}
.stratum-md-code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--surface-2);
}
.stratum-md-pre {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface-2);
  overflow-x: auto;
}
.stratum-md-codeblock {
  position: relative;
}
.stratum-md-codeblock > .stratum-md-pre {
  margin: 0;
}
.stratum-md-pre--wrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
/* Wrap and Copy, over the block's top right: shown on hover with a mouse, always on a touch screen. */
.stratum-md-codeblock-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 10px;
  background: var(--surface-2);
}
.stratum-md-codeblock-actions .stratum-copy-button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
.stratum-md-codeblock-actions .stratum-copy-button:hover {
  background: var(--surface);
}
.stratum-md-codeblock-actions svg {
  width: 15px;
  height: 15px;
}
.stratum-md-wrap--on {
  color: var(--accent);
}
@media (hover: hover) {
  .stratum-md-codeblock-actions {
    opacity: 0;
    transition: opacity 0.15s;
  }
  .stratum-md-codeblock:hover .stratum-md-codeblock-actions,
  .stratum-md-codeblock-actions:focus-within {
    opacity: 1;
  }
}
/* On a touch screen they're always there, so they get a row of their own under the code, in its box. */
@media (hover: none) {
  .stratum-md-codeblock {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    background: var(--surface-2);
  }
  .stratum-md-codeblock-actions {
    position: static;
    align-self: flex-end;
    padding: 0 4px 4px;
    background: none;
  }
  .stratum-md-codeblock > .stratum-md-pre {
    padding-bottom: 0;
  }
}
/* A CSV block shown as a table: its buttons in a row under it, always there, so they never cover the header. An app
   that widens a reply's .stratum-md-table-box by its path (rinkagu's SessionPage.css) names this block too. */
.stratum-md-codeblock.stratum-md-codeblock--table {
  display: flex;
  flex-direction: column;
  background: none;
}
.stratum-md-codeblock--table > .stratum-md-codeblock-actions {
  position: static;
  align-self: flex-end;
  padding: 2px 0 0;
  background: none;
  opacity: 1;
}
.stratum-md-link {
  color: var(--accent);
  text-decoration: none;
}
.stratum-md-link:hover {
  text-decoration: underline;
}
.stratum-md-ref {
  color: var(--accent);
}
/* A file reference that opens (onFileRef): a link's look, as a button. */
.stratum-md-file {
  display: inline;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: var(--accent);
  text-align: inherit;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.stratum-md-file:hover {
  text-decoration: underline;
}
.stratum-md-file .stratum-md-code {
  color: var(--accent);
}

/* A table keeps its natural width - words whole, long text wrapping at a readable width - and
   scrolls sideways when that's wider than the column, rather than squeezing its columns down to a
   letter each (the text above may break anywhere; a table's cells don't). */
.stratum-md-table-wrap {
  overflow-x: auto;
  /* Swiped or trackpad-scrolled sideways, without a scrollbar under the table. */
  scrollbar-width: none;
}
.stratum-md-table-wrap::-webkit-scrollbar {
  display: none;
}
.stratum-md-table {
  width: max-content;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.45;
}
/* Table cells ignore max-width, so their content carries it: past this, text wraps. A word longer
   than that (a class name in `code`) widens the cell to fit it instead of spilling over the next one:
   min-width wins over max-width. */
.stratum-md-cell {
  max-width: 24em;
  min-width: min-content;
  overflow-wrap: normal;
}
.stratum-md-table th,
.stratum-md-table td {
  padding: 6px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.stratum-md-table th {
  font-weight: 600;
  background: var(--surface-2);
}

/* Front matter's fields: across the column, keys in a muted column of their own, values wrapping anywhere (a long
   address breaks rather than widening the table), a block string's lines kept. */
.stratum-md-frontmatter {
  width: 100%;
  font-size: 13px;
}
.stratum-md-frontmatter th {
  width: 1%;
  white-space: nowrap;
  font-weight: 500;
  color: var(--ink-3);
}
.stratum-md-frontmatter td {
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.stratum-md-frontmatter-sub {
  color: var(--ink-3);
}

/* tableFullscreen: a wide table's full-screen button, floating at its bottom right (as a diagram's). */
.stratum-md-table-box {
  position: relative;
}
/* The last column wider by the button's room, so scrolled to the end, the button sits over the
   column's own empty edge - its borders and header running under it - not its text. */
.stratum-md-table-box--expandable > .stratum-md-table-wrap > .stratum-md-table :is(th, td):last-child {
  padding-right: calc(12px + 36px);
}
.stratum-md-table-expand {
  position: absolute;
  right: 8px;
  bottom: 8px;
}
/* The table over the whole screen: scrolling both ways, kept clear of an iOS PWA's status bar (which
   blurs what's under it) by the top padding, with room past its last row to scroll it clear of the
   controls along the bottom. */
.stratum-md-table-full {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  overflow: auto;
  padding: var(--stratum-fullscreen-top-inset, 0px) 16px calc(96px + var(--safe-bottom, 0px));
  /* The viewer's own backdrop shows through, as under an image or a diagram. */
  background: transparent;
}
/* Centred on the screen while it's smaller than it, both ways (auto margins in a flex column); a
   larger one starts at the top left and scrolls, the margins giving way. */
.stratum-md-table-full {
  display: flex;
  flex-direction: column;
}
.stratum-md-table-full .stratum-md-table {
  margin: auto;
}
/* Its header row pins below the status bar's area once it scrolls, the rows passing under it hidden
   there by the backdrop's colour above each header cell - invisible while the table sits lower down
   (a short one, centred), where its header needs no room above it. */
.stratum-md-table-full .stratum-md-table th {
  position: sticky;
  top: var(--stratum-fullscreen-top-inset, 0px);
  z-index: 1;
}
.stratum-md-table-full .stratum-md-table th::before {
  content: '';
  position: absolute;
  left: -1px;
  right: -1px;
  bottom: calc(100% + 1px);
  height: var(--stratum-fullscreen-top-inset, 0px);
  background: var(--bg);
}

.stratum-md blockquote {
  padding-left: 12px;
  border-left: 3px solid var(--line);
  color: var(--ink-2);
}
.stratum-md blockquote > * {
  margin: 0 0 8px;
}
.stratum-md blockquote > :last-child {
  margin-bottom: 0;
}
/* Paragraphs in a list item that has several: spaced as the item's own lines. */
.stratum-md li > p {
  margin: 0;
}
.stratum-md li > p + p,
.stratum-md li > p + .stratum-md-codeblock,
.stratum-md li > .stratum-md-codeblock {
  margin-top: 6px;
}
/* A task list's checkbox, read-only, before its item's text. */
.stratum-md-task {
  margin: 0 6px 0 0;
  vertical-align: -1px;
}

/* An image shown in place (showImages): fitting the column, centered, rounded like the app's cards. */
.stratum-md-img {
  display: block;
  max-width: 100%;
  margin: 12px auto;
  border-radius: 10px;
}
/* A marked line's block (Markdown's highlight): CodeView's marked line tint, drawn a little past the text by a shadow
   so it moves nothing. */
.stratum-md .stratum-md-marked {
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent-alt) 18%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-alt) 18%, transparent);
}
.stratum-chat-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.stratum-chat-msg--user {
  align-items: flex-end;
}
.stratum-chat-msg--user .stratum-chat-msg-body {
  max-width: min(560px, 85%);
  padding: 10px 14px;
  border-radius: 18px 18px 6px 18px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* A `> ` quote in a plain-text message, as Markdown's blockquote; its bar darker than --line, which the bubble's tint hides. */
.stratum-chat-msg-quote {
  margin: 0;
  padding-left: 12px;
  border-left: 3px solid var(--ink-4);
  color: var(--ink-2);
}

.stratum-chat-msg-body--button {
  border: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.stratum-chat-msg-body--button:hover {
  text-decoration: underline;
}

/* Its own body only: a peer message shown inside a reply keeps a peer's. */
.stratum-chat-msg--assistant > .stratum-chat-msg-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.stratum-chat-msg-meta {
  font-size: 11px;
  color: var(--ink-4);
  padding: 0 4px;
}

/* Someone else's message: on the left like the assistant's, outlined rather than tinted so it never
   reads as one the user sent, the user bubble's corner mirrored. */
.stratum-chat-msg--peer {
  align-items: flex-start;
}
.stratum-chat-msg--peer .stratum-chat-msg-body {
  max-width: min(640px, 92%);
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 18px 18px 18px 6px;
  background: var(--surface);
  color: var(--ink);
  overflow-wrap: anywhere;
}
/* collapsedLines: the body cut to that many of Markdown's lines (15px at 1.6), fading out where it's cut. */
.stratum-chat-msg-clip--closed {
  max-height: calc(var(--stratum-chat-msg-lines) * 24px);
  overflow: hidden;
}
.stratum-chat-msg-clip--cut {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent);
}
/* Reads as the muted text around it, a link only on hover. */
.stratum-chat-msg-more {
  display: block;
  margin-top: 6px;
  text-align: left;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--ink-3);
  cursor: pointer;
}
.stratum-chat-msg-more:hover {
  text-decoration: underline;
}

.stratum-chat-msg-author {
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-3);
}

.stratum-chat-msg--note .stratum-chat-msg-body {
  /* Same size as the thread's text (Markdown); italic marks it as the harness talking. */
  font-size: 15px;
  font-style: italic;
  line-height: 1.6;
  color: var(--ink-3);
  overflow-wrap: anywhere;
}
.stratum-chat-divider {
  align-self: center;
  padding: 4px 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-4);
}
.stratum-composer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.stratum-composer:focus-within {
  border-color: var(--line-2);
}
.stratum-composer--disabled {
  opacity: 0.6;
}

.stratum-composer-input {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  padding: 8px 6px;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  font: inherit;
  /* The chat's own 15px (ChatMessage). Under 16px, iOS Safari zooms the page into a focused field
     unless the viewport sets maximum-scale=1, as momo and the demos do. */
  font-size: 15px;
  line-height: 20px;
  color: var(--ink);
  /* When the text overflows and scrolls, don't chain past its ends into the page. */
  overscroll-behavior: contain;
  text-overflow: ellipsis;
}
/* A phone in landscape (the wide layout on a short touch screen): two lines at most, scrolling past
   that, so a long message leaves the strip of chat above the keyboard in view. Wins over the height
   the field grows to (ChatComposer's maxHeight). */
@media (min-width: 768px) and (max-height: 500px) and (pointer: coarse) {
  .stratum-composer-input {
    box-sizing: border-box;
    max-height: 56px;
  }
}
/* On a phone, once the text wraps: the text above at full width, the buttons in a row beneath, + on
   the left and the rest on the right. */
@media (max-width: 767px) {
  .stratum-composer--expanded .stratum-composer-attachments {
    order: -2;
  }
  .stratum-composer--expanded .stratum-composer-input {
    order: -1;
    flex-basis: 100%;
  }
  .stratum-composer--expanded .stratum-composer-input + * {
    margin-left: auto;
  }
}
.stratum-composer-input::placeholder {
  color: var(--ink-4);
  /* Always one line: a placeholder too long for the field is cut with an ellipsis, not wrapped. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stratum-composer-btn,
.stratum-composer-send {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}
.stratum-composer-btn {
  background: transparent;
  color: var(--ink-3);
}
.stratum-composer-btn--disabled {
  cursor: default;
  opacity: 0.5;
}
.stratum-composer-btn:hover:not(:disabled, .stratum-composer-btn--disabled) {
  background: var(--surface-2);
  color: var(--ink);
}
.stratum-composer-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

/* Dictating: the mic itself, red and pulsing - a stop icon would read as a second Stop next to
   the running one. Tapping it again stops. */
.stratum-composer-btn--dictating,
.stratum-composer-btn--dictating:hover:not(:disabled) {
  background: var(--warn);
  color: var(--surface);
  animation: stratum-composer-pulse 1.2s ease-in-out infinite;
}

.stratum-composer-send {
  background: var(--ink);
  color: var(--surface);
  transition: opacity 0.15s;
}
.stratum-composer-send:disabled {
  opacity: 0.25;
  cursor: default;
}
.stratum-composer-send svg {
  width: 18px;
  height: 18px;
}
.stratum-composer-send--stop svg {
  width: 18px;
  height: 18px;
}

/* Images attached to the next message: a row of thumbnails across the top of the composer. */
.stratum-composer-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  padding: 4px 4px 2px;
}
.stratum-composer-attachment {
  position: relative;
}
.stratum-composer-attachment-img {
  display: block;
  width: 56px;
  height: 56px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  cursor: pointer;
}
.stratum-composer-attachment-img img,
.stratum-composer-attachment-img video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.stratum-composer-attachment-img {
  position: relative;
}
/* Over a video's frame: a play mark, or its upload's percent on a dimmed frame. */
.stratum-composer-attachment-play,
.stratum-composer-attachment-progress {
  position: absolute;
  inset: 0;
  margin: auto;
}
.stratum-composer-attachment-play {
  width: 18px;
  height: 18px;
  color: #fff;
  fill: #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}
.stratum-composer-attachment-progress {
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.stratum-composer-attachment-progress--failed {
  background: color-mix(in srgb, var(--warn) 80%, transparent);
  font-size: 11px;
}
.stratum-composer-attachment-img--loading {
  animation: stratum-composer-pulse 1.2s ease-in-out infinite;
  cursor: default;
}
@keyframes stratum-composer-pulse {
  50% {
    opacity: 0.5;
  }
}
.stratum-composer-attachment-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--ink);
  color: var(--surface);
  cursor: pointer;
}
.stratum-composer-attachment-remove svg {
  width: 10px;
  height: 10px;
  stroke-width: 3;
}

/* Clear text: TextInput's small grey round ×, in a 28px target beside the field's last line. */
.stratum-composer-clear {
  flex-shrink: 0;
  align-self: flex-end;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 36px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}
.stratum-composer-clear svg {
  width: 18px;
  height: 18px;
  padding: 3px;
  border-radius: 50%;
  background: var(--ink-4);
  color: var(--surface);
  stroke-width: 3;
}
.stratum-composer-clear:hover svg {
  background: var(--ink-3);
}
/* One line of text — name, a space, summary — cut off with an ellipsis as a whole. */
.stratum-tool {
  display: block;
  width: 100%;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 5px 0;
  border: none;
  background: none;
  font: inherit;
  /* Same size and color as the thread's text (Markdown), so a row reads as part of it. */
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  /* Selectable, so a line can be quoted or referenced: a selection stopping inside this clipped line blanked
     Safari's paint in October 2026, and no longer did on 2026-11-20 (word by word back into a cut-off row). */
  -webkit-user-select: text;
  user-select: text;
}

.stratum-tool-name {
  font-weight: 600;
}

/* Running shows as a trailing ellipsis, so a new call doesn't flash. Failure shows in the name. */
.stratum-tool-ellipsis {
  color: var(--ink-3);
}
.stratum-tool--error .stratum-tool-name {
  color: var(--warn);
}
.stratum-tool--denied .stratum-tool-name {
  color: var(--ink-4);
  text-decoration: line-through;
}
.stratum-tool--active .stratum-tool-name {
  color: var(--accent);
}

/* `flash`: the same flash as flashRange's (utils/flash.ts), from the same variables
   (styles/tokens.css): the text alone, as tall as its line and as wide as its words, held for
   --stratum-flash-hold (the delay, filled backwards), then easing out over --stratum-flash-fade. */
.stratum-tool-text--flash {
  animation: stratum-tool-flash var(--stratum-flash-fade) var(--stratum-flash-ease) var(--stratum-flash-hold) both;
}
@keyframes stratum-tool-flash {
  from {
    background-color: color-mix(in srgb, var(--stratum-flash-color) var(--stratum-flash-strength), var(--bg));
  }
  to {
    background-color: color-mix(in srgb, var(--stratum-flash-color) 0%, var(--bg));
  }
}

/* Screen-reader-only status. */
.stratum-tool-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
}

.stratum-tool-output,
.stratum-tool-section {
  min-width: 0;
}
.stratum-tool-output-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-4);
  margin-bottom: 4px;
}
.stratum-tool-output pre {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.stratum-tool-output-text {
  display: block;
}
/* Loading: placeholder lines at the text's own line height (1.5 x 12px), so the block is the size the
   lines it stands in for would be. */
.stratum-tool-output-placeholder {
  display: flex;
  align-items: center;
  height: 1.5em;
}
/* The bars sit on the block's own --surface-2 background, which is Skeleton's colour too: a step
   darker here, so they show (as CodeView's placeholder does). */
.stratum-tool-output-loading .stratum-skeleton {
  background: linear-gradient(90deg, var(--line) 25%, color-mix(in srgb, var(--line) 35%, var(--surface-2)) 50%, var(--line) 75%);
  background-size: 300% 100%;
}
/* Its latest lines at the bottom: past its rows (--stratum-tool-output-rows, from maxLines) or cut to fit
   (FitHeight), it loses its first ones. Rows on screen, not lines, so lines that wrap don't change its
   height; and never shorter than it has been (--stratum-tool-output-held), so live output stays put.
   20px: its padding. */
.stratum-tool-output--tail pre {
  display: flex;
  flex-direction: column;
  max-height: calc(var(--stratum-tool-output-rows, 1e4) * 1lh + 20px);
  min-height: var(--stratum-tool-output-held, 0px);
  overflow: auto;
}
/* Short text sits at the bottom; auto, not flex-end centring, so the part above stays scrollable. */
.stratum-tool-output--tail .stratum-tool-output-text {
  margin-top: auto;
}
/* Its first rows on screen (--stratum-tool-output-rows, from maxRows), wrapped ones counted, the rest
   scrolls inside. */
.stratum-tool-output--rows pre {
  max-height: calc(var(--stratum-tool-output-rows) * 1lh + 20px);
  overflow: auto;
}
.stratum-tool-output--error pre {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 8%, var(--surface-2));
}
.stratum-tool-output-more {
  margin-top: 4px;
  padding: 2px 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
}
.stratum-tool-output-more:hover {
  text-decoration: underline;
}

/* With an action: the row keeps its one-line cut-off, the action at its end. */
.stratum-tool-with-action {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.stratum-tool-with-action > .stratum-tool {
  flex: 1 1 auto;
  width: auto;
}
.stratum-tool-action {
  flex-shrink: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
}
.stratum-tool-action:hover {
  text-decoration: underline;
}
/* Syntax highlighting (syntax.ts), for CodeView and DiffView: each kind of token Shiki finds, in
   stratum's colors. Plain text and punctuation keep the code's own --ink-2. */
::highlight(stratum-syntax-keyword) {
  color: var(--syntax-keyword);
}
::highlight(stratum-syntax-string),
::highlight(stratum-syntax-string-expression) {
  color: var(--syntax-string);
}
::highlight(stratum-syntax-comment) {
  color: var(--syntax-comment);
}
::highlight(stratum-syntax-constant) {
  color: var(--syntax-constant);
}
::highlight(stratum-syntax-function) {
  color: var(--syntax-function);
}
::highlight(stratum-syntax-parameter) {
  color: var(--syntax-parameter);
}
::highlight(stratum-syntax-link) {
  color: var(--accent);
}
::highlight(stratum-syntax-inserted) {
  color: var(--syntax-inserted);
}
::highlight(stratum-syntax-deleted) {
  color: var(--syntax-deleted);
}
::highlight(stratum-syntax-changed) {
  color: var(--syntax-changed);
}

/* The same colors as classes, for a long file's lines, which carry their spans in the line itself (useLineSpans). Kept
   apart from the rules above: a browser without ::highlight drops a whole rule it can't read. */
.stratum-syntax-keyword {
  color: var(--syntax-keyword);
}
.stratum-syntax-string,
.stratum-syntax-string-expression {
  color: var(--syntax-string);
}
.stratum-syntax-comment {
  color: var(--syntax-comment);
}
.stratum-syntax-constant {
  color: var(--syntax-constant);
}
.stratum-syntax-function {
  color: var(--syntax-function);
}
.stratum-syntax-parameter {
  color: var(--syntax-parameter);
}
.stratum-syntax-link {
  color: var(--accent);
}
.stratum-syntax-inserted {
  color: var(--syntax-inserted);
}
.stratum-syntax-deleted {
  color: var(--syntax-deleted);
}
.stratum-syntax-changed {
  color: var(--syntax-changed);
}
/* FindBar: a pill of its own; where it sits, and its glass, are the consumer's. */
.stratum-find-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  width: min(420px, calc(100% - 24px));
  padding: 4px 4px 4px 14px;
  box-sizing: border-box;
  border-radius: 999px;
  cursor: default;
  user-select: auto;
}
.stratum-find-bar-input {
  flex: 1;
  min-width: 0;
  padding: 6px 0;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  /* 16px: iOS zooms the page into smaller inputs on focus. */
  font-size: 16px;
  color: inherit;
}
.stratum-find-bar-input::placeholder {
  color: inherit;
  opacity: 0.55;
}
.stratum-find-bar-count {
  flex-shrink: 0;
  padding: 0 6px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}
.stratum-find-bar-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.stratum-find-bar-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.stratum-find-bar-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}
.stratum-find-bar-btn--up svg {
  transform: rotate(180deg);
}
.stratum-code {
  min-width: 0;
  border-radius: 8px;
  /* clip, not hidden: hidden would make it the scroll box its sticky head sticks in. Clip doesn't round
     what it cuts in every browser (Safari), so the head and body round their own outer corners. */
  overflow: clip;
  background: var(--surface-2);
}
/* Stays at the top of what scrolls the code (a panel's body) as the reader scrolls down - in a page, under its header
   or a phone's status bar (--stratum-sticky-top, PageHeader.css). */
.stratum-code-head {
  position: sticky;
  top: var(--stratum-sticky-top, 0px);
  z-index: 1;
  background: var(--surface-2);
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
/* One line, scrolling sideways when it's longer - opened at its end (the file's name), see CodeView. */
.stratum-code-path {
  min-width: 0;
  font-family: var(--mono);
  color: var(--ink-2);
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.stratum-code-path::-webkit-scrollbar {
  display: none;
}
/* Pinned, the box carries on above the panel's top edge, under the head - so its rounding would show
   the code scrolling past, not the panel: the corners outside the curve are painted in what's behind
   the box (a panel's surface; --stratum-code-backdrop for another). */
.stratum-code-head::before,
.stratum-code-head::after {
  content: '';
  position: absolute;
  top: 0;
  width: 8px;
  height: 8px;
  pointer-events: none;
}
.stratum-code-head::before {
  left: 0;
  background: radial-gradient(circle at 100% 100%, transparent 7.5px, var(--stratum-code-backdrop, var(--surface)) 8px);
}
.stratum-code-head::after {
  right: 0;
  background: radial-gradient(circle at 0 100%, transparent 7.5px, var(--stratum-code-backdrop, var(--surface)) 8px);
}
.stratum-code-note {
  color: var(--ink-3);
}
.stratum-code-body {
  margin: 0;
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
  padding: 6px 0;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-2);
  overflow-x: auto;
}
/* Every line as wide as the longest (and at least the box), so a marked line's background runs the
   whole way when scrolled sideways, not just across the part first in view. */
.stratum-code-lines {
  width: max-content;
  min-width: 100%;
}
/* Wrapping (wrap): lines as wide as the box, each wrapping within its text, beside its number. */
.stratum-code--wrap .stratum-code-lines {
  width: auto;
}
/* A long file's lines (VirtualLines): only the ones near the screen are mounted, each placed by a transform inside a box as
   tall as all of them (its height set in the style). */
.stratum-code-lines--virtual {
  position: relative;
}
.stratum-code-lines--virtual > .stratum-code-line {
  position: absolute;
  top: 0;
  left: 0;
  width: max-content;
  min-width: 100%;
}
.stratum-code--wrap .stratum-code-lines--virtual > .stratum-code-line {
  width: 100%;
}
.stratum-code--wrap .stratum-code-line {
  display: flex;
  white-space: pre-wrap;
}
.stratum-code--wrap .stratum-code-num {
  flex-shrink: 0;
}
.stratum-code--wrap .stratum-code-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}
.stratum-code-line {
  padding: 0 12px 0 0;
  white-space: pre;
}
.stratum-code-num {
  display: inline-block;
  width: var(--stratum-code-gutter, 4ch);
  padding-right: 1ch;
  box-sizing: border-box;
  text-align: right;
  color: var(--ink-4);
  -webkit-user-select: none;
  user-select: none;
}
.stratum-code-line--marked {
  background: color-mix(in srgb, var(--accent-alt) 18%, transparent);
}
.stratum-code-line--marked .stratum-code-num {
  color: var(--ink-2);
}
/* Loading: placeholder lines at the code's line height, so the frame doesn't change size once the
   text arrives. */
/* Cut to fit what scrolls it (see CodeView), so the lines past its bottom edge are hidden. */
.stratum-code-loading {
  overflow: hidden;
}
.stratum-code-loading .stratum-code-line {
  display: flex;
  align-items: center;
  height: calc(12px * 1.55);
  overflow: hidden;
}
.stratum-code-loading .stratum-code-num {
  flex-shrink: 0;
}
/* The placeholder bars sit on the code's own --surface-2 background, which is Skeleton's colour too:
   a step darker here, so they show. */
.stratum-code-loading .stratum-skeleton {
  background: linear-gradient(90deg, var(--line) 25%, color-mix(in srgb, var(--line) 35%, var(--surface-2)) 50%, var(--line) 75%);
  background-size: 300% 100%;
}
/* Couldn't be shown: the placeholder lines held still, faded, with the message in a card centred over
   them (they fit what scrolls them, so it's centred in view). */
.stratum-code--failed {
  position: relative;
}
.stratum-code--failed .stratum-skeleton {
  animation: none;
  opacity: 0.6;
}
.stratum-code-message {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
}
/* A long message (many files to pick from) scrolls inside the card, since the frame doesn't scroll. */
.stratum-code-message-card {
  box-sizing: border-box;
  max-width: 420px;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 18px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
  text-align: center;
  overflow-wrap: anywhere;
}
/* An EmptyState as the message (an icon, a title, the details) sits on the card's own padding. */
.stratum-code-message-card .stratum-empty-state {
  padding: 4px 0;
}

/* Find (CodeView's `find`): its bar at the screen's foot, and every match in soft yellow, the current one in solid
   orange, as a browser's find does (DiagramView's colors). */
.stratum-code-find {
  position: fixed;
  bottom: calc(16px + var(--safe-bottom, 0px));
  left: 50%;
  z-index: 20;
  transform: translateX(-50%);
}
.stratum-code-match {
  background: color-mix(in srgb, #ffd60a 45%, transparent);
  color: inherit;
  border-radius: 2px;
}
.stratum-code-match--current {
  background: var(--accent-alt);
  color: #1c1c1e;
}

/* `actions`: floating at the view's bottom right, held at the bottom of what scrolls it (a panel's body) as it
   scrolls, as a table's and a diagram's are: a sticky strip after the code, its controls rising from it 10px up. */
.stratum-code-actions {
  position: sticky;
  /* 10px from the bottom, as a table's controls are (CsvTable.css), clear of an iOS PWA's home indicator. */
  bottom: max(var(--safe-bottom-default, 0px), calc(var(--safe-bottom, 0px) - 16px));
  z-index: 2;
  /* Room under the code's last line (a page, not a panel), the controls 10px above the card's bottom edge there. */
  height: 10px;
  display: flex;
  justify-content: flex-end;
  /* Held at the strip's bottom, the controls rise above it. */
  align-items: flex-end;
  pointer-events: none;
}
.stratum-code-actions > * {
  display: flex;
  gap: 6px;
  margin: 0 10px 10px 0;
  pointer-events: auto;
}
/* In a panel, as high above the panel's bottom edge as a table's are (10px, the table reaching that edge), past the
   body's own bottom padding (BottomPanel.css), which the sticky offset is measured inside. */
.stratum-bottom-panel-body .stratum-code-actions {
  height: 0;
  bottom: calc(max(var(--safe-bottom-default, 0px), calc(var(--safe-bottom, 0px) - 16px)) - max(18px, var(--safe-bottom-effective, 0px)));
}

/* The head while pinned in a page (CodeView marks it): the page's color from it up to the top, so the lines scrolling
   past go under it. A shadow, spread half the offset each way and raised by the other half: it follows the head's
   rounded corners and leaves its ::before and ::after, which draw them, alone (a ::before strip squared the left one,
   2026-11-01). */
.stratum-code-head--stuck {
  box-shadow: 0 calc(var(--stratum-sticky-top, 0px) / -2) 0 calc(var(--stratum-sticky-top, 0px) / 2) var(--bg);
}
.stratum-diagram {
  min-width: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
}
.stratum-diagram--full {
  height: 100%;
  border-radius: 0;
  background: transparent;
}
.stratum-diagram-viewport {
  position: relative;
  height: var(--stratum-diagram-height, 300px);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}
.stratum-diagram--full .stratum-diagram-viewport {
  height: 100%;
}
.stratum-diagram-viewport:active {
  cursor: grabbing;
}
.stratum-diagram-canvas {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  /* Its own compositing layer, so the glass over it (backdrop-filter) follows every pan and zoom:
     Safari otherwise keeps blurring a stale picture, as with MediaViewer's canvas. */
  will-change: transform;
}
.stratum-diagram-canvas > svg,
.stratum-diagram-canvas > img {
  display: block;
  max-width: none;
}
/* A heavy drawing's bitmap, over it while it moves (DiagramView's stand-in). */
.stratum-diagram-stand-in {
  position: absolute;
  top: 0;
  left: 0;
  visibility: hidden;
  pointer-events: none;
}
/* Labels select as text (a drag from one doesn't pan); everything else grabs. */
.stratum-diagram-viewport {
  user-select: none;
  -webkit-user-select: none;
}
.stratum-diagram-canvas text {
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
}
/* Find highlights: under their label, never taking the pointer. */
.stratum-diagram-canvas rect.stratum-diagram-hit {
  fill: color-mix(in srgb, #ffd60a 45%, transparent);
  pointer-events: none;
}
.stratum-diagram-canvas rect.stratum-diagram-hit--current {
  fill: var(--accent-alt);
}
/* The small view's own controls (a full-screen button), in its corner. */
.stratum-diagram-actions {
  position: absolute;
  right: 10px;
  /* Lifted clear of the home indicator when it reaches the screen's bottom edge (FileViewer). */
  bottom: calc(10px + var(--stratum-diagram-bottom-inset, 0px));
  display: flex;
  gap: 6px;
  cursor: default;
}
/* Find: a glass bar under the full-screen title (at the top once the controls hide). */
.stratum-diagram-find {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 11;
  transform: translateX(-50%);
}
.stratum-diagram--full .stratum-diagram-find {
  top: 64px;
  transition: top 0.18s ease;
}
.stratum-diagram--full .stratum-diagram-find--lifted {
  top: 18px;
}
.stratum-diagram--error {
  padding: 14px;
}
.stratum-diagram-error {
  font-size: 13px;
  color: var(--ink-3);
}
/* A round glass pad (MediaViewer's glass) and its knob; a drag on it is its own, never the page's scroll or a pan. */
.stratum-joystick {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
/* `floating`: the window's lower-left corner, right of the rail; its bottom is set from where the bottom chrome is
   drawn (Joystick.tsx useAboveBottomChrome). */
.stratum-joystick--floating {
  position: fixed;
  left: calc(var(--stratum-app-shell-rail-width, 0px) + 20px);
  z-index: 25;
}
.stratum-joystick-knob {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
.stratum-mini-player {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px 8px 10px;
  min-width: 0;
}
/* Desktop: a card under the page, the width of a column of content. */
@media (min-width: 768px) {
  .stratum-mini-player {
    max-width: 720px;
    margin: 0 auto 12px;
    padding: 8px 10px 10px 12px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition:
      opacity 0.2s ease,
      transform 0.2s ease;
  }
  /* The full player open over the page: out of the way, faded and dropped a little, until it closes. */
  .stratum-mini-player--hidden {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
  }
}

.stratum-mini-player-open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.stratum-mini-player-art {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
}
.stratum-mini-player-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.stratum-mini-player-art svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.stratum-mini-player-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.stratum-mini-player-title,
.stratum-mini-player-subtitle {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stratum-mini-player-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.stratum-mini-player-subtitle {
  font-size: 12px;
  color: var(--ink-3);
}

.stratum-mini-player-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.stratum-mini-player-btn:hover:not(:disabled) {
  background: var(--surface-2);
}
.stratum-mini-player-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.stratum-mini-player-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* How far it's got: a hairline along the bottom, filled from the left. */
.stratum-mini-player-progress {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(to right, var(--ink-2) var(--stratum-mini-player-progress, 0%), var(--line) 0);
  pointer-events: none;
}
@media (min-width: 768px) {
  .stratum-mini-player-progress {
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0;
  }
}
.stratum-now-playing {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 8px;
}

.stratum-now-playing-art {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  /* A double tap on it skips 10 s (useArtworkSkip), never zooms the page. */
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.stratum-now-playing-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* The song's video over its picture, faded in once a frame of it is on screen (the picture covers it until then).
   Fit, not filled, over a clear background: a song's video is often its square cover, which the picture (YouTube's
   16:9 thumbnail, its side bars drawn in) frames the same way, so the two line up. */
.stratum-now-playing-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.stratum-now-playing-video--shown {
  opacity: 1;
}
.stratum-now-playing-art svg {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.stratum-now-playing-titles {
  min-width: 0;
  margin-top: 4px;
}
.stratum-now-playing-title {
  font-size: 18px;
  font-weight: 650;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.stratum-now-playing-subtitle {
  margin-top: 2px;
  font-size: 14px;
  color: var(--ink-3);
}

/* A track in the page's ink, filled up to where it's got (--stratum-now-playing-progress). */
.stratum-now-playing-seek {
  width: 100%;
  height: 24px;
  margin: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.stratum-now-playing-seek:disabled {
  cursor: default;
}
.stratum-now-playing-seek::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, currentColor var(--stratum-now-playing-progress, 0%), var(--line-2) var(--stratum-now-playing-progress, 0%));
}
.stratum-now-playing-seek::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border: none;
  border-radius: 50%;
  background: currentColor;
  -webkit-appearance: none;
  appearance: none;
}
.stratum-now-playing-seek::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--line-2);
}
.stratum-now-playing-seek::-moz-range-progress {
  height: 4px;
  border-radius: 2px;
  background: currentColor;
}
.stratum-now-playing-seek::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: currentColor;
}

.stratum-now-playing-times {
  display: flex;
  justify-content: space-between;
  margin-top: -8px;
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.stratum-now-playing-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}
.stratum-now-playing-btn {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.stratum-now-playing-btn:hover:not(:disabled):not(.stratum-now-playing-btn--main) {
  background: var(--surface-2);
}
.stratum-now-playing-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.stratum-now-playing-btn svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}
.stratum-now-playing-btn svg.stratum-now-playing-stroke {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.stratum-now-playing-btn--toggle {
  color: var(--ink-3);
}
.stratum-now-playing-btn--on {
  color: var(--accent);
}
.stratum-now-playing-btn--main {
  width: 64px;
  height: 64px;
  background: var(--ink);
  color: var(--bg);
}
.stratum-now-playing-btn--main svg {
  width: 30px;
  height: 30px;
}

.stratum-now-playing-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.stratum-now-playing-queue {
  margin-top: 8px;
}
.stratum-now-playing-queue-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}
/* The lists run to the sheet's edges, their rows padded by the sheet's own margin: the text lines up with the
   titles and controls above, and a row's highlight spans the sheet, as music apps draw them. */
.stratum-now-playing-queue ul {
  list-style: none;
  margin: 0 calc(-1 * var(--stratum-sheet-edge, 18px));
  padding: 0;
}
.stratum-now-playing-queue-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px var(--stratum-sheet-edge, 18px);
  border: none;
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.stratum-now-playing-queue-row:hover {
  background: var(--surface-2);
}
.stratum-now-playing-queue-art {
  flex-shrink: 0;
  width: 56px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-2);
}
/* A phone: bigger pictures, easier to tell apart and to tap. */
@media (max-width: 767px) {
  .stratum-now-playing-queue-art {
    width: 96px;
    border-radius: 8px;
  }
  .stratum-now-playing-queue-row {
    gap: 12px;
  }
  .stratum-now-playing-queue-title {
    font-size: 15px;
  }
  .stratum-now-playing-queue-subtitle {
    font-size: 13px;
  }
}
.stratum-now-playing-queue-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.stratum-now-playing-queue-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.stratum-now-playing-queue-title,
.stratum-now-playing-queue-subtitle {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stratum-now-playing-queue-title {
  font-size: 14px;
  color: var(--ink);
}
.stratum-now-playing-queue-subtitle {
  font-size: 12px;
  color: var(--ink-3);
}

/* A mix's tracks: a time and a name a row, edge to edge like the queue's; the one playing tinted and in the accent
   color (no playing icon: the user found one distracting, 2026-11-11). A tap jumps to it. */
.stratum-now-playing-track {
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px var(--stratum-sheet-edge, 18px);
  border: none;
  border-radius: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.stratum-now-playing-track:hover {
  background: var(--surface-2);
}
.stratum-now-playing-track--current,
.stratum-now-playing-track--current:hover {
  background: var(--accent-soft);
}
.stratum-now-playing-track-time {
  flex-shrink: 0;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
/* Wrapped, not cut off: a name with no spaces (Japanese, Korean) breaks anywhere. */
.stratum-now-playing-track-title {
  min-width: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
/* Its time in the accent color and the row tinted, the name kept dark, as YouTube marks a chapter: the whole row in
   blue on the tint read faintly (2026-11-11). Never bold: that set the name wider, so it wrapped elsewhere and moved
   the rows below each time a new track began. */
.stratum-now-playing-track--current .stratum-now-playing-track-time {
  color: var(--accent);
}
@media (max-width: 767px) {
  .stratum-now-playing-track {
    font-size: 15px;
    padding: 10px var(--stratum-sheet-edge, 18px);
  }
}
/* Why a file shows as text instead of in its viewer (a .puml that won't draw). */
.stratum-file-viewer-hint {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--ink-3);
}

/* In a panel's title: switches between a file's viewer and its text. Reads as the title's muted meta
   text - no button look - and only underlines on hover. */

/* A table or diagram fills the rest of a BottomPanel, down to its bottom edge as a long text runs: the
   panel body, and whatever wraps the viewer in it (a page, an app's body div), become a column it
   grows in - not a PageStack page, which stays boxless (display: contents), and not for a viewer on a
   hidden page under the one showing. Its floating controls lift
   clear of the home indicator instead of the body padding that would stop it short. */
.stratum-bottom-panel-body:has(.stratum-file-viewer-fill:not([hidden] *)),
.stratum-bottom-panel-body :has(.stratum-file-viewer-fill:not([hidden] *)):not(.stratum-page-stack-page) {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.stratum-bottom-panel-body:has(.stratum-file-viewer-fill:not([hidden] *)),
.stratum-bottom-panel-body :has(.stratum-file-viewer-fill:not([hidden] *)):not(.stratum-page-stack-page) {
  /* And whatever wraps it (an app's body div with its own padding): the viewer reaches the panel's bottom edge. */
  padding-bottom: 0;
}
.stratum-file-viewer-fill {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 200px;
  /* Partly into the home indicator's area (an iOS PWA's inset), not wholly above it. */
  --stratum-csv-bottom-inset: max(var(--safe-bottom-default), calc(var(--safe-bottom) - 16px));
  --stratum-diagram-bottom-inset: max(var(--safe-bottom-default), calc(var(--safe-bottom) - 16px));
}
/* Only in a panel, whose body bounds it: elsewhere (a page) nothing would, and a table would mount every row. */
.stratum-bottom-panel-body .stratum-file-viewer-fill > .stratum-csv,
.stratum-bottom-panel-body .stratum-file-viewer-fill > .stratum-diagram {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.stratum-bottom-panel-body .stratum-file-viewer-fill .stratum-csv-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.stratum-bottom-panel-body .stratum-file-viewer-fill .stratum-diagram-viewport {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}


/* A file's text full screen: edge to edge from the screen's top, scrolling under the title (which names it, so the
   code's own path header goes), with room at its foot for the find bar and, on a phone, Close. */
.stratum-file-viewer-code-full {
  height: 100%;
  overflow: auto;
  padding: calc(var(--stratum-fullscreen-top-inset, 0px) + 12px) 0 calc(88px + var(--safe-bottom, 0px));
  background: var(--surface-2);
}
/* Scrolled sideways by the screen's box too, not the code's own, so the sideways scrollbar sits at the screen's foot
   wherever the reader is in the file, not under its last line. */
.stratum-file-viewer-code-full .stratum-code {
  border-radius: 0;
  overflow: visible;
}
.stratum-file-viewer-code-full .stratum-code:not(.stratum-code--wrap) {
  width: max-content;
  min-width: 100%;
}
.stratum-file-viewer-code-full .stratum-code-body {
  overflow: visible;
}
.stratum-file-viewer-code-full .stratum-code-head {
  display: none;
}
@media (max-width: 767px) {
  /* Clear of Close, in the bottom right corner on a phone. */
  .stratum-file-viewer-code-full .stratum-code-find {
    bottom: calc(76px + var(--safe-bottom, 0px));
  }
}

/* A file's text fills the panel down to its edge as a table does, and grows past it (the panel's body scrolling it)
   when longer; its floating controls sit as a table's do. */
.stratum-bottom-panel-body .stratum-file-viewer-fill--code > .stratum-code {
  flex: 1 0 auto;
  /* A column, the code's body growing, so the floating controls after it reach the bottom of a short file's card. */
  display: flex;
  flex-direction: column;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.stratum-bottom-panel-body .stratum-file-viewer-fill--code > .stratum-code > .stratum-code-body {
  flex: 1 0 auto;
}
.stratum-bottom-panel-body .stratum-file-viewer-fill--code .stratum-code-actions {
  /* The controls' own 10px margin (CodeView.css) puts them 10px up, as a table's. */
  bottom: var(--stratum-csv-bottom-inset, 0px);
}

/* Room past its last line for the full-screen button (34px and its 10px margin) and a gap, so scrolled to the end the
   text sits clear above it. */
.stratum-file-viewer-md > .stratum-md {
  padding-bottom: 56px;
}
/* A Markdown file's full-screen button, floating at its bottom right and held at the bottom of what scrolls it (a
   panel's body) as it scrolls, as a file's text's is (CodeView.css). */
.stratum-file-viewer-md-actions {
  position: sticky;
  bottom: max(var(--safe-bottom-default, 0px), calc(var(--safe-bottom, 0px) - 16px));
  z-index: 2;
  height: 10px;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  pointer-events: none;
}
.stratum-file-viewer-md-actions > * {
  display: flex;
  margin: 0 10px 10px 0;
  pointer-events: auto;
}
.stratum-bottom-panel-body .stratum-file-viewer-md-actions {
  height: 0;
  bottom: calc(max(var(--safe-bottom-default, 0px), calc(var(--safe-bottom, 0px) - 16px)) - max(18px, var(--safe-bottom-effective, 0px)));
}
/* A Markdown file full screen: a reading column, scrolling under the title, with room at its foot for Close on a phone. */
.stratum-file-viewer-md-full {
  height: 100%;
  overflow: auto;
  padding: calc(var(--stratum-fullscreen-top-inset, 0px) + 64px) 20px calc(96px + var(--safe-bottom, 0px));
}
.stratum-file-viewer-md-full > .stratum-md > * {
  max-width: 760px;
  margin-inline: auto;
}
/* A table may widen past the column to the whole screen, centred; one narrower stays on the column's left edge. */
.stratum-file-viewer-md-full > .stratum-md > .stratum-md-table-wrap {
  width: fit-content;
  min-width: min(760px, 100%);
  max-width: 100%;
  /* A collapsed table's outer border draws half outside its box, which the wrap's scroll would clip. */
  padding-right: 1px;
}
/* A page adds no box of its own: its content lays out as if it were the panel body's child. */
.stratum-page-stack-page {
  display: contents;
}
.stratum-page-stack-page[hidden] {
  display: none;
}
.stratum-diff {
  min-width: 0;
  border-radius: 8px;
  background: var(--surface-2);
}
.stratum-diff-head-in {
  border-radius: 8px 8px 0 0;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
/* The path: one line that scrolls sideways to show the rest (no scrollbar), fading where it's cut off
   (useEdgeFade), as the patch heading does. */
.stratum-diff-path {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  color: var(--ink-2);
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.stratum-diff-path::-webkit-scrollbar {
  display: none;
}
.stratum-diff-count {
  font-family: var(--mono);
  font-weight: 600;
}
.stratum-diff-count--add {
  color: var(--ok);
}
.stratum-diff-count--del {
  color: var(--warn);
}
.stratum-diff-body {
  /* Its own corners: .stratum-diff can't clip (overflow would stop a PatchView's heads sticking). */
  border-radius: 0 0 8px 8px;
  margin: 0;
  padding: 6px 0;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-2);
  overflow-x: auto;
}
/* Every line as wide as the longest (and at least the box), so an added or removed line's background
   runs the whole way when scrolled sideways, not just across the part first in view (as CodeView's). */
.stratum-diff-lines {
  width: max-content;
  min-width: 100%;
}
.stratum-diff-line {
  padding: 0 12px 0 0;
  white-space: pre;
}
.stratum-diff-op {
  display: inline-block;
  width: 24px;
  text-align: center;
  color: var(--ink-4);
  user-select: none;
}
.stratum-diff-line--add {
  background: color-mix(in srgb, var(--ok) 14%, transparent);
}
.stratum-diff-line--add .stratum-diff-op {
  color: var(--ok);
}
.stratum-diff-line--del {
  background: color-mix(in srgb, var(--warn) 12%, transparent);
}
.stratum-diff-line--del .stratum-diff-op {
  color: var(--warn);
}

/* PatchView: a patch's files, one DiffView-like block each. */
.stratum-patch {
  display: flex;
  flex-direction: column;
  /* Each file's box apart from the next by at least the 12px blocks keep (ui-probe's gaps). */
  gap: 14px;
}
/* A file far off screen isn't laid out until it nears it: a commit's 50 files re-laid out at each width halved the
   frame rate of a rail drag beside them (2026-11-01). Its last size holds its place. */
.stratum-patch > .stratum-diff {
  content-visibility: auto;
  contain-intrinsic-size: auto 400px;
}
.stratum-diff-note {
  color: var(--ink-3);
}
.stratum-diff-line--hunk {
  padding: 4px 12px;
  color: var(--ink-4);
}
.stratum-diff-line--hunk:not(:first-child) {
  margin-top: 4px;
  border-top: 1px solid var(--line);
}
.stratum-diff-empty {
  margin: 0;
  color: var(--ink-3);
}

/* wrap: lines as wide as the box, each wrapping within its text, beside its +/− (as CodeView's wrap). */
.stratum-diff--wrap .stratum-diff-lines {
  width: auto;
}
.stratum-diff--wrap .stratum-diff-line:not(.stratum-diff-line--hunk) {
  display: flex;
}
.stratum-diff--wrap .stratum-diff-op {
  flex-shrink: 0;
}
.stratum-diff--wrap .stratum-diff-text,
.stratum-diff--wrap .stratum-diff-line--hunk {
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* PatchView scrolled: its heading at the top of what scrolls it, and each file's head under that while
   the file's changes go by (the next file's pushes it on). Backgrounds so the changes pass beneath. */
.stratum-patch {
  --stratum-patch-heading-height: 0px;
}
.stratum-patch--heading {
  --stratum-patch-heading-height: 30px;
}
.stratum-patch-heading {
  position: sticky;
  top: var(--stratum-sticky-top, 0px);
  z-index: 2;
  box-sizing: border-box;
  height: var(--stratum-patch-heading-height);
  margin: 0;
  padding: 4px 0 6px;
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-3);
  background: var(--surface);
}
.stratum-patch .stratum-diff-head {
  position: sticky;
  top: calc(var(--stratum-patch-heading-height) + var(--stratum-sticky-top, 0px));
  z-index: 1;
  /* Square, in the panel's own color, around the rounded head: stuck over the changes, its corners
     show the panel, not the lines scrolling under them (and at the file's top, the same as before). */
  background: var(--surface);
}
/* Its text: one line that scrolls sideways to show the rest (no scrollbar), fading where it's cut off
   (useEdgeFade). Masked on its own, so the heading's background stays solid over the changes. */
.stratum-patch-heading-text {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.stratum-patch-heading-text::-webkit-scrollbar {
  display: none;
}

/* A patch's line numbers (as in the file: the new one, the old one for a removed line), muted, before
   the +/-; kept beside its line when it wraps. */
.stratum-diff-num {
  display: inline-block;
  min-width: 3ch;
  padding: 0 4px 0 12px;
  text-align: right;
  color: var(--ink-4);
  user-select: none;
}
.stratum-diff--wrap .stratum-diff-num {
  flex-shrink: 0;
}
/* onHunk: a hunk's header is a link to the whole file there - plain text, underlined on hover. */
.stratum-diff-line--hunk-link {
  display: block;
  width: 100%;
  border: none;
  border-radius: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.stratum-diff-line--hunk-link:hover {
  color: var(--ink-2);
  text-decoration: underline;
}

/* onFile: a file's path is a link to the file as it is now - the same mono text, underlined on hover. */
.stratum-diff-path-link {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  white-space: nowrap;
  text-align: left;
  cursor: pointer;
}
.stratum-diff-path-link:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* A folded file of a patch (big or generated): its head, then a button to show its changes. */
.stratum-diff-folded {
  padding: 8px 12px;
  border-radius: 0 0 8px 8px;
  background: var(--surface-2);
}
.stratum-diff-more {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 12.5px;
  color: var(--accent);
  cursor: pointer;
}
.stratum-diff-more:hover {
  text-decoration: underline;
}
.stratum-diff-more--rest {
  display: block;
  margin: 6px 12px 2px;
}
/* A file's place before its lines are built (PatchView builds them as it nears the screen). */
.stratum-diff-placeholder {
  border-radius: 0 0 8px 8px;
  background: var(--surface-2);
}

/* A file's head while pinned in a phone page (PatchView marks it): the page's color from it up to the screen's top, so
   the lines scrolling past it go under it rather than on up behind the status bar - over the page's full width. */
.stratum-patch .stratum-diff-head--stuck::before {
  content: '';
  position: absolute;
  left: -50vw;
  right: -50vw;
  bottom: 100%;
  height: calc(var(--stratum-patch-heading-height) + var(--stratum-sticky-top, 0px));
  background: var(--bg);
  pointer-events: none;
}
.stratum-thinking {
  align-self: flex-start;
  padding: 2px 0;
  font-size: 14px;
}
.stratum-thinking-label {
  background: linear-gradient(90deg, var(--ink-3) 0%, var(--ink-4) 40%, var(--ink) 50%, var(--ink-4) 60%, var(--ink-3) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: stratum-thinking-shimmer 1.6s linear infinite;
}
@keyframes stratum-thinking-shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -150% 0;
  }
}
.stratum-permission {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent-alt) 45%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent-alt) 6%, var(--surface));
  min-width: 0;
}
.stratum-permission--allowed,
.stratum-permission--denied {
  border-color: var(--line);
  background: var(--surface);
}

.stratum-permission-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stratum-permission-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
  color: var(--accent-alt);
}
.stratum-permission--allowed .stratum-permission-icon,
.stratum-permission--denied .stratum-permission-icon {
  color: var(--ink-3);
}
.stratum-permission-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.stratum-permission-tool {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-2);
}

.stratum-permission-body {
  min-width: 0;
}

.stratum-permission-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.stratum-permission-decision {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
}
.stratum-permission--allowed .stratum-permission-decision {
  color: var(--ok);
}
/* Desktop only: below 768px the page shows its filters in a Sheet instead. */
.stratum-filter-rail {
  display: none;
}
@media (min-width: 768px) {
  .stratum-filter-rail {
    display: block;
    width: 260px;
    flex-shrink: 0;
    border-right: 1px solid var(--line);
    height: 100%;
    overflow-y: auto;
    scrollbar-width: none;
  }
  .stratum-filter-rail::-webkit-scrollbar {
    display: none;
  }
  .stratum-filter-rail--collapsed {
    width: 0;
    border-right: none;
    overflow: hidden;
  }
}
.stratum-filter-rail-inner {
  /* Its title's capitals on the page title's (24px of header padding, then 6.5px to a 32px title's capitals). */
  padding: calc(27px + var(--safe-top-clear)) 16px 40px;
}
.stratum-filter-rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 16px;
}
.stratum-filter-rail-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.stratum-filter-rail-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
}
.stratum-filter-rail-reset {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
}
.stratum-filter-rail-reset:hover {
  text-decoration: underline;
}

/* Groups as media's search filters draw them: a hairline between each, its label above. */
.stratum-filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.stratum-filter-group:first-child {
  border-top: none;
  padding-top: 0;
}
.stratum-filter-group-label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.stratum-filter-group-aux {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-3);
}

/* FilterSheetFooter: media's search sheet footer. */
.stratum-filter-footer {
  /* Fills the Sheet's footer row, which lays its children out as a row of their own widths. */
  flex: 1;
  width: 100%;
  display: flex;
  gap: 10px;
}
.stratum-filter-footer-reset {
  padding: 12px 18px;
  border: 1.5px solid var(--line-2);
  border-radius: 12px;
  background: transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
}
.stratum-filter-footer-show {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
}
.stratum-filter-footer-count {
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  font-size: 13px;
}
/* Same card as PermissionPrompt: tinted while it needs an answer, plain once answered. */
.stratum-question {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent-alt) 45%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent-alt) 6%, var(--surface));
  min-width: 0;
}
/* The questions: spaced as the card spaces its parts. */
.stratum-question-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.stratum-question--answered {
  border-color: var(--line);
  background: var(--surface);
}
.stratum-question-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stratum-question-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
  color: var(--accent-alt);
}
.stratum-question--answered .stratum-question-icon {
  color: var(--ink-3);
}
.stratum-question-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.stratum-question-item {
  margin: 0;
  padding: 0;
  border: none;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stratum-question-text {
  padding: 0;
  /* A legend sits outside the fieldset's flex gap, so it needs its own space below. */
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
}
.stratum-question-chip {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: 2px;
  color: var(--ink-2);
}

.stratum-question-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stratum-question-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}
.stratum-question-item:disabled .stratum-question-option {
  cursor: default;
}
.stratum-question-option--unpicked {
  opacity: 0.55;
}
.stratum-question-option--selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}
.stratum-question-option > input {
  margin: 3px 0 0;
  accent-color: var(--accent);
}
.stratum-question-option-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stratum-question-option-label {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
}
.stratum-question-option-description {
  font-size: 13px;
  color: var(--ink-3);
}
.stratum-question-other {
  margin-top: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  outline: none;
}
.stratum-question-other:focus {
  border-color: var(--accent);
}

.stratum-question-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.stratum-question-note {
  margin: 0;
  font-size: 13px;
  color: var(--ink-3);
}

/* "2 of 4", at the end of the title row while answering several. */
.stratum-question-step {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
}

/* Answerable: never taller than most of the screen still visible (above an on-screen keyboard, see
   --stratum-vvh), the questions scrolling inside, the title row and the buttons staying put. */
.stratum-question--interactive {
  display: flex;
  flex-direction: column;
  max-height: calc(var(--stratum-vvh, 100vh) * 0.6);
}
.stratum-question--interactive .stratum-question-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.stratum-question--interactive .stratum-question-head,
.stratum-question--interactive .stratum-question-actions {
  flex-shrink: 0;
}
.stratum-status-dot {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-4);
}
.stratum-status-dot--busy {
  background: var(--accent-alt);
}
/* Working: a short arc circling the dot. Kept with Reduce Motion on - it's what tells working apart
   from the steady 'tasks'. Drawn outside the dot, so it doesn't change the dot's size in a layout. */
.stratum-status-dot--busy::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 1.5px solid transparent;
  border-top-color: var(--accent-alt);
  border-radius: 50%;
  animation: stratum-status-dot-orbit 0.9s linear infinite;
}
.stratum-status-dot--tasks {
  background: var(--accent-alt);
}
.stratum-status-dot--attention {
  background: var(--accent);
}
.stratum-status-dot--waiting {
  background: var(--accent-alt);
}
.stratum-status-dot--error {
  background: var(--warn);
}
.stratum-status-dot--ok {
  background: var(--ok);
}
.stratum-status-dot--offline {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--ink-4);
}
@keyframes stratum-status-dot-orbit {
  to {
    transform: rotate(360deg);
  }
}
.stratum-meter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}
.stratum-meter-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stratum-meter-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.stratum-meter-bar > span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
}
.stratum-meter-bar--warning > span {
  background: var(--accent-alt);
}
.stratum-meter-bar--critical > span {
  background: var(--warn);
}
.stratum-meter-percent {
  min-width: 4ch;
  text-align: right;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.stratum-meter-caption {
  font-size: 13px;
  color: var(--ink-3);
}
/* MediaViewer's glass position counter (.stratum-photo-viewer-position and -glass), without its placement. */
.stratum-progress-pill {
  display: inline-grid;
  box-sizing: border-box;
  overflow: hidden;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: saturate(1.5) blur(20px);
  -webkit-backdrop-filter: saturate(1.5) blur(20px);
  will-change: backdrop-filter;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}
.stratum-progress-pill--on-light {
  border-color: rgba(0, 0, 0, 0.03);
  background: rgba(20, 20, 20, 0.05);
  color: #141414;
}

.stratum-progress-pill-row {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.stratum-progress-pill .stratum-progress-pill-spinner {
  margin: 0;
  --stratum-spinner-track: color-mix(in srgb, currentColor 30%, transparent);
  --stratum-spinner-arc: currentColor;
}
.stratum-progress-pill-mark {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.stratum-progress-pill-value {
  display: inline-block;
  text-align: right;
}

/* Overlaps the row in the same grid cell, pulled out over the padding to the pill's bottom edge. */
.stratum-progress-pill-bar {
  grid-area: 1 / 1;
  align-self: end;
  height: 2px;
  margin: 0 -12px -5px;
  background: color-mix(in srgb, currentColor 18%, transparent);
}
.stratum-progress-pill-fill {
  display: block;
  height: 100%;
  background: currentColor;
  transition: width 0.25s ease;
}

/* As a button: 36px tall, its hit area grown to 44px by ::after, a long label cut with an ellipsis. */
.stratum-progress-pill--action {
  position: relative;
  overflow: visible;
  margin: 0;
  padding: 9px 14px;
  max-width: min(280px, calc(100vw - 32px));
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
}
.stratum-progress-pill--action::after {
  content: '';
  position: absolute;
  inset: -4px;
}
.stratum-progress-pill--action .stratum-progress-pill-row {
  min-width: 0;
}
.stratum-progress-pill--action .stratum-progress-pill-label {
  overflow: hidden;
  text-overflow: ellipsis;
}
.stratum-progress-pill--action:hover {
  background: rgba(255, 255, 255, 0.28);
}
.stratum-progress-pill--action.stratum-progress-pill--on-light:hover {
  background: rgba(20, 20, 20, 0.1);
}
.stratum-progress-pill--action:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.stratum-todo-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.stratum-todo {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 5px 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
}
/* A ring the size of a Checkbox's box, lined up with the text's first line. */
.stratum-todo-mark {
  width: 16px;
  height: 16px;
  margin-top: 1.5px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
}
.stratum-todo-mark svg {
  width: 10px;
  height: 10px;
}
.stratum-todo--done .stratum-todo-mark {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.stratum-todo--done .stratum-todo-text {
  color: var(--ink-3);
  text-decoration: line-through;
}
.stratum-todo--active .stratum-todo-mark {
  border-color: var(--accent);
  animation: stratum-todo-pulse 1.6s ease-in-out infinite;
}
.stratum-todo--active .stratum-todo-text {
  font-weight: 600;
}
@keyframes stratum-todo-pulse {
  50% {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
  }
}
.stratum-page-content {
  padding: 16px 20px var(--stratum-app-shell-content-inset-bottom, 0px);
}
@media (min-width: 768px) {
  .stratum-page-content {
    padding: 16px 36px var(--stratum-app-shell-content-inset-bottom, 0px);
  }
}
/* A readable column (`maxWidth`), centered inside the padding. */
.stratum-page-content-column {
  margin-inline: auto;
}
/* Full-width rows pad themselves (`fullWidth`). */
.stratum-page-content.stratum-page-content--full-width {
  padding-inline: 0;
}
/* An infinite list's footer reserves the nav's room itself (InfiniteScrollFooter); in a PageContent,
   whose own bottom padding already does, it doesn't again - wherever it is, nested in the page's own wrapper or not (loading placeholders
   can follow it). */
.stratum-page-content .stratum-infinite-scroll-footer {
  min-height: 0;
}
/* Takes the scroll area's place in its column. A one-cell grid that lays the cover over the scroll
   area in that same cell - not positioned, so it never becomes what a docked BottomPanel (absolute
   against the main column, over a page's accessory) or anything else inside positions against. */
.stratum-settle-cover {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}
.stratum-settle-cover > * {
  grid-area: 1 / 1;
  min-height: 0;
}
/* Over the scroll area, not in it: it never moves while the content does. Under the page header, which
   is fixed and above it. The page's own background, so nothing behind shows through. */
/* The header waits with the content: blank, its room kept (as PageHeader with no title yet), so it
   doesn't show the page's title and status over a skeleton and then again over the content. */
.stratum-settle-cover--settling .stratum-page-header-mobile-inner,
.stratum-settle-cover--settling .stratum-page-header-desktop-inner,
.stratum-settle-cover--settling .stratum-page-header-desktop-bar {
  visibility: hidden;
}
.stratum-settle-cover > .stratum-settle-cover-over {
  z-index: 1;
  overflow: hidden;
  background: var(--bg);
}
.stratum-reorderable-row {
  display: flex;
  align-items: stretch;
  background: var(--surface);
}
.stratum-reorderable-row + .stratum-reorderable-row {
  border-top: 1px solid var(--line);
}
/* A row that opens something lights up whole on hover, its handle too, as a plain SessionList row does. */
.stratum-reorderable-row:hover:has(.stratum-session-row--link, button.stratum-session-row) {
  background: var(--surface-2);
}
.stratum-reorderable-content {
  flex: 1;
  min-width: 0;
}
/* The handle's own margin around its icon is the gap, so the row's text starts right after it. */
.stratum-reorderable-content > .stratum-session-row {
  padding-left: 0;
}
.stratum-reorderable-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink-3);
  cursor: grab;
  /* A touch on the handle drags the row rather than scrolling the page. */
  touch-action: none;
}
.stratum-reorderable-row--dragging {
  position: relative;
  z-index: 1;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
}
.stratum-reorderable-row--dragging .stratum-reorderable-handle {
  cursor: grabbing;
}
.stratum-session-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
}

.stratum-session-row {
  display: flex;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
}
.stratum-session-row + .stratum-session-row {
  border-top: 1px solid var(--line);
}
button.stratum-session-row,
.stratum-session-row--link {
  cursor: pointer;
}
/* A link row (to): no underline or link colour; the text inside sets its own. */
.stratum-session-row--link {
  color: inherit;
  text-decoration: none;
}
/* Hover never applies to a selected row (here and in a Sheet below), which keeps its accent tint. */
button.stratum-session-row:hover:not(.stratum-session-row--selected),
.stratum-session-row--link:hover:not(.stratum-session-row--selected) {
  background: var(--surface-2);
}
/* Selected (e.g. in a select mode): the accent tint, so it doesn't read as hover. */
.stratum-session-row--selected {
  background: var(--accent-soft);
}

/* Part of a run of rows made by one thing (grouped): an accent border down the left edge, drawn inside the
 * row so nothing shifts. */
.stratum-session-row--grouped {
  --group-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--group-color);
}
.stratum-session-row--grouped-1 {
  --group-color: var(--accent-alt);
}
.stratum-session-row--grouped-2 {
  --group-color: var(--ok);
}
.stratum-session-row--grouped-3 {
  --group-color: #af52de;
}
/* The list's corner is square where a grouped row meets it, so the border runs straight to the edge
 * instead of tapering along the curve. */
.stratum-session-list:has(> .stratum-session-row--grouped:first-child) {
  border-top-left-radius: 0;
}
.stratum-session-list:has(> .stratum-session-row--grouped:last-child) {
  border-bottom-left-radius: 0;
}

.stratum-session-row-dot {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  width: 8px;
  padding-top: 7px;
}

.stratum-session-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.stratum-session-row-top {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.stratum-session-row-title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* scrollTitle: scrolls sideways instead of ending in an ellipsis (no scrollbar), fading where cut off. */
.stratum-session-row-title--scroll {
  overflow-x: auto;
  text-overflow: clip;
  scrollbar-width: none;
}
.stratum-session-row-title--scroll::-webkit-scrollbar {
  display: none;
}
.stratum-session-row-time {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--ink-3);
}
.stratum-session-row-preview {
  font-size: 14px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stratum-session-row-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.stratum-session-row-meta {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* A row whose whole text is the point: its lines wrap instead of ending in an ellipsis, a long id or path breaking
   where it must. */
.stratum-session-row--wrap .stratum-session-row-title,
.stratum-session-row--wrap .stratum-session-row-preview,
.stratum-session-row--wrap .stratum-session-row-meta {
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
}
.stratum-session-row--wrap .stratum-session-row-bottom {
  align-items: flex-start;
}
.stratum-session-row-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
}

/* Inside a Sheet (white surface), a white bordered card barely separates from it: use the inset
   grouped look instead — soft grey fill, no border, slightly stronger dividers. */
.stratum-sheet .stratum-session-list {
  border-color: transparent;
  background: var(--surface-2);
}
.stratum-sheet .stratum-session-row + .stratum-session-row {
  border-top-color: var(--line-2);
}
.stratum-sheet button.stratum-session-row:hover:not(.stratum-session-row--selected),
.stratum-sheet .stratum-session-row--link:hover:not(.stratum-session-row--selected) {
  background: color-mix(in srgb, var(--ink) 5%, var(--surface-2));
}

.stratum-status-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  min-width: 0;
}
.stratum-status-banner--warn {
  border-color: color-mix(in srgb, var(--warn) 30%, var(--line));
  background: color-mix(in srgb, var(--warn) 6%, var(--surface));
}
.stratum-status-banner-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
  color: var(--ink-3);
}
.stratum-status-banner--warn .stratum-status-banner-icon {
  color: var(--warn);
}
.stratum-status-banner-lead {
  flex-shrink: 0;
  display: flex;
  width: 18px;
  justify-content: center;
}
.stratum-status-banner-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.stratum-status-banner-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
/* One line, scrolling sideways when it's longer: banners sit above the composer on phones, where
   every line of height counts. */
.stratum-status-banner-description {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  white-space: nowrap;
  font-size: 13px;
  color: var(--ink-3);
}
.stratum-status-banner-description::-webkit-scrollbar {
  display: none;
}
.stratum-status-banner-action {
  flex-shrink: 0;
}
/* Lines spaced like body text, paragraphs a line apart. */
.stratum-text-placeholders {
  display: flex;
  flex-direction: column;
  gap: 1.4em;
  width: 100%;
}
.stratum-text-placeholders--padded {
  padding: 24px 0;
}
.stratum-text-placeholders-title {
  margin-bottom: 0.4em;
}
.stratum-text-placeholders-paragraph {
  display: flex;
  flex-direction: column;
  gap: 0.75em;
}
.stratum-sign-in-form {
  margin: 0;
}

.stratum-sign-in-form-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  margin: 0;
  padding: 2px 16px 16px;
  border: none;
}

.stratum-sign-in-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stratum-sign-in-form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
.stratum-sign-in-form-field .stratum-text-input input {
  padding: 10px 12px;
  font-size: 15px;
}

.stratum-sign-in-form-error {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--warn);
}

.stratum-sign-in-form-submit {
  margin-top: 2px;
}
/* Busy keeps the accent (dimmed), rather than the grey of a button that can't be pressed yet. */
.stratum-cta-button.stratum-sign-in-form-submit--busy:disabled {
  background: var(--accent);
  color: #fff;
  opacity: 0.7;
  cursor: progress;
}
.stratum-sign-in-form-spinner.stratum-spinner {
  margin: 0;
  --stratum-spinner-track: rgba(255, 255, 255, 0.4);
  --stratum-spinner-arc: #fff;
}

.stratum-sign-in-form-footer {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-3);
}
.stratum-sign-in-form-footer button {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.stratum-sign-in-form-footer button:hover:not(:disabled) {
  text-decoration: underline;
}

/* A SettingsRow after the form in the same group gets the rows' hairline. */
.stratum-sign-in-form + .stratum-settings-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16px;
  right: 0;
  border-top: 1px solid var(--line);
}
/* Shared dev-only mobile viewport preview (see ViewportPreview.tsx) — an iPhone
 * impersonation for reviewing mobile layouts on desktop: Dynamic Island, a mock
 * iOS status bar and home indicator, plus simulated iPhone PWA safe areas inside
 * the iframe (see the component's applySafeAreaSim). Deliberately quiet: this is
 * a dev tool, not app chrome. */

.vp-toggle {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.vp-toggle:hover {
  border-color: var(--ink-3);
}
.vp-toggle-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* Closed but loaded: laid out at full size (the app inside needs its real viewport) and invisible. */
.vp-stage--hidden {
  visibility: hidden;
  pointer-events: none;
}
.vp-stage {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px;
  background: color-mix(in srgb, var(--ink) 7%, var(--bg));
}

/* Phone body — the black bezel around the screen. Thinner bezels to match
   iPhone 17 Pro Max's edge-to-edge display. */
.vp-device {
  /* Sized by its width and aspect ratio alone: the screen inside is 125% tall (scaled back to 80%), and
     without this a browser counts that 125% towards the device's own height, so the device comes out
     taller than the phone and runs off the window. */
  contain: size;
  max-width: calc(100vw - 40px);
  padding: 8px;
  border-radius: 48px;
  background: #101012;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.35),
    inset 0 0 0 2px rgba(255, 255, 255, 0.06);
}
/* Opt-out of the iPhone look: plain rounded frame like the old preview. */
.vp-device--plain {
  padding: 0;
  border-radius: 36px;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}
.vp-device--plain .vp-screen {
  border-radius: 36px;
}

.vp-screen {
  position: relative;
  width: 125%;
  height: 125%;
  border-radius: 40px;
  overflow: hidden;
  background: var(--bg);
  /* Zoom everything inside the screen (app content + device chrome) to 80% —
     matches the iOS Safari Page Zoom many users set on their PWAs.
     transform-origin top-left with the 1/0.8 size boost keeps it filling
     the device frame. */
  transform: scale(0.8);
  transform-origin: top left;
}
/* The device's 48px outer curve and the screen's 40px curve leave a
   lens-shaped gap at each corner (the padding box's inner corners are sharp,
   not rounded) where the stage shows through. An 8px black ring following the
   screen's own 40px curve — its outer edge lands exactly at 48px — seals it. */
.vp-device:not(.vp-device--plain) .vp-screen {
  box-shadow: 0 0 0 8px #101012;
}
/* The frame's page gets a whole-pixel viewport inside a fluid, fractional frame: the frame's own background shows
   in the sub-pixel strip left at its right and bottom edges, so it's the bezel's, not a light line over a dark page. */
.vp-device:not(.vp-device--plain) .vp-screen,
.vp-device:not(.vp-device--plain) .vp-frame {
  background: #101012;
}
.vp-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: var(--bg);
}

/* Dynamic Island — always pure black, like the real thing. Sized for iPhone 17
   Pro Max: ~20.76mm wide (vs ~25mm on older models), slimmer profile.
   Counter-scaled to 90% (1.125x within the 80% screen) so it reads slightly
   larger than the app content. */
.vp-island {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%) scale(1.125);
  transform-origin: top center;
  width: 117px;
  height: 32px;
  border-radius: 16px;
  background: #000;
  pointer-events: none;
}

/* Mock iOS status bar: drawn over the app like the real PWA status bar, inside
   the simulated 59px top safe area. Ink-colored so it adapts to dark mode.
   Counter-scaled to 90% (1.125x within the 80% screen); width is 100/1.125 so
   the scaled width still fills the screen. */
.vp-statusbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 88.889%;
  height: 59px;
  display: grid;
  grid-template-columns: 1fr 117px 1fr;
  align-items: center;
  color: var(--ink);
  pointer-events: none;
  transform: scale(1.125);
  transform-origin: top left;
}
.vp-statusbar-time {
  grid-column: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}
.vp-statusbar-icons {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.vp-home {
  position: absolute;
  bottom: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  border-radius: 3px;
  background: var(--ink);
  pointer-events: none;
}

.vp-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.vp-exit {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.vp-exit:hover {
  border-color: var(--ink-3);
}

/* On real touch devices and narrow viewports the page is already in its
 * mobile layout, so the preview toggle would just sit on top of app chrome. */
@media (pointer: coarse), (max-width: 700px) {
  .vp-toggle {
    display: none;
  }
}
* {
  box-sizing: border-box;
}

html,
body,
#root {
  margin: 0;
  padding: 0;
  height: calc(var(--vh, 1vh) * 100);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.page {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.page-center {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
/*$vite$:1*/