/* memories.css — the Memories tab. Owner prefix .me-*, linked from index.html.
   Every colour here is a token from styles.css, so all four theme states come for free and
   nothing needs re-declaring per theme. The two deliberate near-exceptions are the viewer,
   whose chrome sits OVER PHOTOGRAPHS and therefore uses the --on-shot family (declared once
   in bare :root by design — a photo is not themed), and the media-cell placeholders, which
   sit on --surface-2 like every other empty tile in the app.

   Rules this file holds to (V2-NOTES §8, V3-MOTION):
     - no font below 12px, no text quieted by opacity — recede by ink token and weight
     - every tappable thing is 44px to a thumb, by box or by ::before expander
     - state is never hue-only: the not-yet-downloaded mark is a DASHED tray glyph
     - transitions/animations are transform + opacity only; the global reduced-motion
       block in styles.css zeroes all of it */

/* ── the feed's ground (V6-LOOK view 1, item 4) ────────────────────────────────────────
   Darker than the app's --ground in BOTH themes, pulled toward the viewer's scrim, so a
   photograph separates from the page instead of floating on white. Applied through the
   owner class memories.js toggles (feed only — the list keeps the app's paper page,
   "the row ground stays neutral"). Declared per the three-state theme pattern.
   THE INK HAD TO MOVE WITH THE GROUND. This comment used to claim --ink-3 reads 4.8:1 on the
   light value. Re-measured off the rendered page (getComputedStyle + WCAG 2.x — the same
   arithmetic that returns 21.000 for black on white and reproduces §8.6's 16.22:1 for --ink on
   --ground), the app's --ink-3 #665f4a on #ddd2c0 is 4.258:1: UNDER §8.1's 4.5 floor, on
   .me-day and on every .me-tag. The 4.8 belongs to --ink-3 on --surface-2 (5.04 light) — the
   scape is darker than any ground the token had ever been checked against, and nothing
   re-checked it when this ground was introduced.
   So --ink-3 is re-pointed for the feed's subtree, to the value that makes the claim true:
   #5e5742 reads 4.817:1 on #ddd2c0. Dark restates the global value (#978d7e, 6.05:1 on
   #0c0a08), so the dark feed renders exactly as before.
   Scoped to the TOKEN rather than to those two rules on purpose: everything that quiets itself
   inside this ground is then right by construction, and the only other ground in the subtree is
   --surface-2 (the empty state), where a darker ink can only raise contrast (5.04 -> 5.72).

   The TOKEN lives on :root rather than on the scroller for one consumer: the shell's
   .statusbar. That backdrop paints --ground, which in a browser tab is invisible here
   (inset 0, no backdrop) — but standalone on a notched phone it is a 47-59px band of
   app-paper cream sitting on this darker page, a hard seam right at the island. While the
   feed owns #view the backdrop carries the feed's ground instead. :has() is the only way a
   sibling can know (the shell must not know tab internals, and memories.js does not own
   .statusbar); every iOS able to install this app has it, and the fallback is only the
   seam this rule removes. */
:root { --me-scape: #ddd2c0; --me-scape-ink-3: #5e5742; }   /* ink: 4.817:1 on the ground */
/* ONE dark rule, keyed on the FAMILY. This used to be the three-rule pattern — a media query
   plus an explicit [data-theme="dark"] — which meant it knew about exactly two themes and would
   have left the memories feed sitting on cream inside a black app. [data-lum] is set on <html>
   before first paint by the shell for every theme, system included, so one rule now covers all
   of them and there is nothing to update when another is added. */
:root[data-lum="dark"] { --me-scape: #0c0a08; --me-scape-ink-3: #978d7e; }
/* ...and then per theme where the family answer is visibly wrong. The scape is a photographic
   backdrop that should read as the darkest thing on screen; on Void it was LIGHTER than the
   app's own ground, and on Slate it was the one warm rectangle in a cool theme. */
:root[data-theme="void"]  { --me-scape: #000000; }
/* A dark phone with no theme chosen is Void (styles.css's system block). */
:root:not([data-theme])[data-lum="dark"] { --me-scape: #000000; }
:root[data-theme="slate"] { --me-scape: #0b0d10; --me-scape-ink-3: #8d96a3; }
#view.me-scape { background: var(--me-scape); --ink-3: var(--me-scape-ink-3); }
body:has(#view.me-scape) .statusbar { background: var(--me-scape); }

/* ── title row: the tab name and the view toggle share the top line ─────────────────── */
.me-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.me-title {
  font: var(--t-title); letter-spacing: var(--t-title-track);
  margin-bottom: 0;
}

/* ── the view toggle: a segmented control built to carry three views ─────────────────
   Selected is NEVER hue alone (§8.4): the active segment gains a raised surface fill, a
   shadow, heavier type and a heavier glyph stroke — four signals a dark-daltonised eye
   reads without colour. Segments are 36px tall visibly; the ::before expander grows the
   hit box to 46px (§8.2's invisible-expander pattern). */
.me-views {
  flex: 0 0 auto;
  display: flex; gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.me-viewbtn {
  position: relative;
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 36px;
  padding: 0 var(--sp-3);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
}
.me-viewbtn::before { content: ""; position: absolute; inset: -5px 0; }
.me-viewbtn .ico { width: 15px; height: 15px; stroke-width: 2; }
.me-viewbtn[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 750;
  box-shadow: var(--shadow);
}
.me-viewbtn[aria-pressed="true"] .ico { stroke-width: 2.6; }
/* A small phone's view switch (under 375 px): its words alone. Beside the title, the three segments with their
   pictures are about 245 px and ran off a 320 screen; without them they are about 185. The selected one still
   has its raised fill, its shadow and its heavier type. */
@media (max-width: 374px) {
  .me-viewbtn .ico { display: none; }
}

/* ── the view stages: siblings that crossfade (transform + opacity only, from JS with the
     motion tokens; reduced-motion never starts the animation at all) ──────────────────── */
.me-stage { transform-origin: 50% 15%; }
/* An empty board says what the Feed says, on the board itself: a paper card at its middle, readable on any of its
   materials, by day and at Night (memories.js boardEmpty). The camera opens on the whole board, so its middle is
   the stage's. */
/* The board's stage is positioned for its whole life: Save or share, the appearance button and the empty card are
   placed against it. collage.js positions a host only if it finds it static when the board mounts, and a board that
   mounts on an empty trip finds it positioned (by .me-stage-empty); when the first photo arrives the class goes, and
   a static stage would let the buttons land on the page's head. */
.me-stage[data-stage="collage"], .me-stage-empty { position: relative; }
.me-stage-empty > .me-altempty {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5;
  width: min(300px, calc(100% - 64px)); margin: 0; padding: var(--sp-4); box-sizing: border-box;
  background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-lift);
}
/* On a small board (memories.js placeEmpty): the picture goes first, then the sentence. */
.me-stage-empty > .me-altempty-tight { padding: var(--sp-3); }
.me-stage-empty > .me-altempty-tight .me-emptyico { display: none; }
.me-stage-empty > .me-altempty-tighter .meta { display: none; }

/* ── tag filter row (shared .chip supplies the 44px target) ────────────────────────── */
.me-tags { margin-bottom: var(--sp-3); }

/* ── day headers: they stay — a trip feed is read by day — but lighter, floating over
     the ground rather than sitting in a bar (V6-LOOK view 1, item 5). Weight down from
     the eyebrow's 700, ink already --ink-3; still 12px and a token, never an alpha. */
.me-day { margin: var(--sp-6) 0 var(--sp-3); font-weight: 650; letter-spacing: .12em; }
.me-feed > .me-day:first-child { margin-top: var(--sp-2); }

/* ── the memory: media as the surface ─────────────────────────────────────────────────
   No card box, no border, no background — the picture spans the content column and sits
   directly ON the ground (V6-LOOK view 1, items 1-2). Chrome recedes onto the media:
   byline in a corner veil, actions as small veiled discs, both --on-shot because what is
   behind them is a photograph, not a themed surface. */
.me-card { margin-bottom: var(--sp-6); }
.me-shot { position: relative; }

/* The author mark: the same object as a sticky note's face — their note_color with their
   initials on it. Initials carry the identity; the colour reinforces (§8.4). */
.me-ava {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--nc, var(--surface-2));
  color: var(--nc-on, var(--ink-2));
  font-size: 13px; font-weight: 750; letter-spacing: .02em;
}
.me-ava-sm { width: 26px; height: 26px; font-size: 12px; border-radius: 7px; }

/* The corner overlay: author + time in ONE local veil pill, bottom-left of the media —
   a local scrim just strong enough over arbitrary photography (the app's proven
   --on-shot-veil, the same object as the viewer's pills). pointer-events:none — it is
   information, and the cell button underneath keeps its whole tap area. */
.me-over {
  position: absolute; left: var(--sp-2); bottom: var(--sp-2);
  max-width: calc(100% - var(--sp-4));
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: 3px 10px 3px 3px;
  border-radius: 999px;
  background: var(--on-shot-veil);
  color: var(--on-shot);
  pointer-events: none;
}
.me-who {
  min-width: 0; flex: 0 1 auto;
  font-size: 13px; font-weight: 650; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.me-when { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--ink-3); line-height: 1.3; }
.me-over .me-when { color: var(--on-shot); }

/* Actions on the item, not in permanent furniture: 36px veiled discs, hit area grown back
   to 44px by the ::before expander (§8.2); the 16px flex gap keeps the expanded targets
   8px apart. Shape carries the unavailable state elsewhere; here both are always live. */
.me-acts {
  position: absolute; top: var(--sp-2); right: var(--sp-2);
  display: flex; align-items: center; gap: var(--sp-4);
}
.me-obtn {
  position: relative;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--on-shot-veil);
  color: var(--on-shot);
}
.me-obtn::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; }
.me-obtn .ico { width: 18px; height: 18px; stroke-width: 2; }
.me-obtn:active { transform: scale(.94); }
.me-acts .me-savestate { background: var(--on-shot-veil); color: var(--on-shot); }

/* A caption-only memory has no picture to recede onto: its byline stays a plain row on
   the ground, same marks, ground inks instead of --on-shot. */
.me-byline {
  display: flex; align-items: center; gap: var(--sp-2);
  min-height: var(--tap);
}
.me-byline .me-acts { position: static; }

/* ── the media grid — fixed geometry BEFORE any byte of media arrives, so nothing ever
     shifts as thumbs decode. One item keeps its own (clamped) aspect; 2+ are unit cells. */
.me-grid {
  display: grid;
  gap: 3px;
  border-radius: var(--r-md);
  overflow: hidden;
}
.me-grid[data-n="1"] { grid-template-columns: 1fr; }
.me-grid[data-n="2"] { grid-template-columns: 1fr 1fr; }
.me-grid[data-n="3"] { grid-template-columns: 1fr 1fr; }
.me-grid[data-n="4"], .me-grid[data-n="5"] { grid-template-columns: 1fr 1fr; }
.me-grid[data-n="3"] .me-cell:first-child { grid-column: 1 / -1; aspect-ratio: 2.05; }

.me-cell {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  background: var(--surface-2);
  overflow: hidden;
  /* min tap: cells are half the card width (~160px) — far over 44px by construction */
}
.me-grid[data-n="1"] .me-cell { aspect-ratio: var(--me-ar, 1.33); }
.me-cell img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  /* Image (not text) fades in when decoded, so a cell is never a broken-image glyph. */
  opacity: 0;
  transition: opacity .18s ease;
}
.me-cell[data-ok="1"] img { opacity: 1; }
.me-cell:active { filter: brightness(.92); }

/* Not-yet-downloaded (offline, thumb not in cache): the dashed tray, drawn not tinted.
   Shape carries the state; the ink is ordinary --ink-3 at full strength. */
.me-cellmark {
  position: absolute; inset: 0;
  display: none;
  place-items: center;
  color: var(--ink-3);
}
.me-cellmark .ico { width: 26px; height: 26px; }
.me-cell[data-miss="1"] { outline: 2px dashed var(--line-strong); outline-offset: -6px; }
.me-cell[data-miss="1"] .me-cellmark { display: grid; }
.me-cell[data-miss="1"] img { opacity: 0; }

/* Video affordance: a solid play triangle in an --on-shot disc — shape first, and the same
   ink whatever the poster behind it. */
.me-play {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--on-shot);
  pointer-events: none;
}
.me-play .ico {
  width: 44px; height: 44px;
  padding: 10px;
  border-radius: 50%;
  background: var(--on-shot-veil);
}
.me-dur {
  position: absolute; right: 6px; bottom: 6px;
  background: var(--on-shot-veil);
  color: var(--on-shot);
  pointer-events: none;
}
.me-extra {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: var(--on-shot-veil);
  color: var(--on-shot);
  font-size: 21px; font-weight: 700;
  pointer-events: none;
}

.me-cap { margin-top: var(--sp-2); font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }

/* ── tags: a QUIET footer under the media (V6-LOOK view 1, item 3) ─────────────────────
   Quieted with a token colour — --ink-3, measured over the darker feed ground above —
   never with opacity (§8.1), and still 12.5px. Visually bare text with the tag glyph; the
   ::before expander grows each one back to a 44px target (§8.2). The press answers with a
   1px settle (shape) alongside the accent, so the feedback is never hue alone. */
.me-tagline { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); margin-top: var(--sp-2); }
.me-tag {
  position: relative;
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 28px;
  padding: 0;
  color: var(--ink-3);
  font-size: 12.5px; font-weight: 650;
}
.me-tag::before { content: ""; position: absolute; inset: -8px -6px; }
.me-tag .ico { width: 12px; height: 12px; }
.me-tag:active { color: var(--accent); transform: translateY(1px); }

/* ── save progress readout beside a Save button — a label, not a sentence ──────────── */
.me-savestate { background: var(--accent-soft); color: var(--accent); }

/* ── upload job cards ──────────────────────────────────────────────────────────────── */
.me-jobs:not(:empty) { margin-bottom: var(--sp-3); }
.me-job { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3); }
.me-jobname { font-size: 14px; font-weight: 650; min-width: 0; overflow-wrap: anywhere; }
.me-jobstate { font-weight: 650; white-space: nowrap; }
/* Waiting-for-signal carries the offline shape vocabulary: dashes, plus the word. */
.me-job[data-state="waiting"] .me-jobstate { color: var(--warn); }
.me-job[data-state="failed"] .me-jobstate { color: var(--warn); }
/* Why the server said no, in its own sentence (a full trip: whose room, how much is left, who
   can free it). Body text, not a label: it is two lines on a phone and it must wrap. */
/* In the delete sheet: a shared board shows this memory and stops with it. */
.me-delboards { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
/* Delete and Keep, under what will go. Side by side, each half the row. */
.me-delacts { margin-top: var(--sp-2); }
.me-delacts .btn { flex: 1 1 0; min-width: 0; }
.me-jobwhy { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); overflow-wrap: anywhere; }

/* The bar animates with scaleX — transform only, per V3-MOTION. The track is --surface-2
   with a real border so the empty state is visible; the fill is the accent. */
.me-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.me-barfill {
  height: 100%;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform .2s ease;
}
.me-job[data-state="waiting"] .me-barfill {
  background: repeating-linear-gradient(90deg, var(--warn) 0 6px, transparent 6px 10px);
}

/* ── FAB ──────────────────────────────────────────────────────────────────────────────
   Geometry lives in styles.css's .fab, shared with Pack's button — see the note there. This
   file keeps the class only as a hook. The `transition: transform .1s` that used to be here
   is gone with it: it animated the press, and Pack's identical button had no transition, so
   the same control felt different depending on which tab you were on. */

/* The Upload button spends most of the composer's life disabled — it is the FIRST thing in
   the sheet with nothing picked yet. styles.css's generic `.btn[disabled] { opacity:.45 }`
   would carry the word "Upload" down with it, which is exactly the alpha-on-text failure §8.1
   was written about. Recede by ink token instead: --ink-3 on --surface-2 measures 5.04:1 in
   light and 4.77:1 in dark, both over the 4.5:1 floor, and the state still reads as off
   because the fill and the weight of the ink both changed. */
.me-go[disabled] {
  opacity: 1;
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--ink-3);
}

/* ── composer rows ─────────────────────────────────────────────────────────────────── */
.me-pickrow {
  display: flex; align-items: center; gap: var(--sp-3);
  min-height: var(--tap);
  padding: var(--sp-1) 0;
}
.me-pickthumb, .me-pickico {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--surface-2);
}
.me-pickico { display: grid; place-items: center; color: var(--ink-2); }
.me-pickico .ico { width: 18px; height: 18px; }
.me-pickname {
  font-size: 14px; font-weight: 550; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.me-tagpick { margin-bottom: var(--sp-2); }
.me-emptyico { width: 40px; height: 40px; color: var(--ink-3); }

/* ══ THE VIEWER ══════════════════════════════════════════════════════════════════════
   Full screen over everything but the toast. Media sits on a true black scrim — a photo
   viewer, not a themed surface — so its chrome uses the --on-shot family throughout.

   Two rules here are load-bearing rather than decorative:

   TOUCH-ACTION IS THE ARBITRATION. The track is `pan-x`, so the horizontal swipe belongs to
   the compositor (momentum and snap for free) while vertical is ours to make a dismiss out
   of. A zoomed slide flips to `none` and takes the whole gesture, which is why panning a
   zoomed photo can never fight the pager: at >1x the pager is not listening. The escape from
   that state is an over-drag, and memories.js documents it in full.

   THE PICTURE IS NEVER FILTERED. The list's stamp gets a decorative CSS wash; the viewer is
   the original, and `filter:none` is pinned on the media so no ancestor rule, no theme and no
   later flourish can reach it. Changing this breaks the promise the whole feature rests on. */
.me-view {
  position: fixed; inset: 0;
  z-index: 22;                     /* over the sheet band start (20), under the toast (30) */
  --me-vchrome: 96px;              /* measured from .me-vbottom at open; see memories.js */
}
.me-vscrim {
  position: absolute; inset: 0;
  background: #000;
  opacity: 1;
}
.me-vpane {
  position: absolute; inset: 0;
  display: flex;
  will-change: transform;
}
.me-vtrack {
  flex: 1 1 auto;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior: contain;
  touch-action: pan-x;             /* horizontal is the browser's; vertical drag is ours */
}
.me-vtrack::-webkit-scrollbar { display: none; }

.me-vitem {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: grid;
  place-items: center;
  touch-action: pan-x;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
.me-vitem[data-zoom="1"] { touch-action: none; }   /* while zoomed the gesture is all ours */
/* A video slide reserves the bottom chrome's exact height so the native scrubber is never
   under the caption block. Constant from the moment the viewer opens — reserving it only
   while the chrome is up would move the picture every time someone tapped it. The slide also
   becomes a centred column so the duration/size pill rides UNDER the video instead of
   floating in the reserved band with nothing to belong to. */
.me-vitem[data-kind="video"] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding-bottom: var(--me-vchrome);
}

.me-vimg {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
  will-change: transform;
}
.me-vvideo {
  width: 100%;
  height: auto;
  max-height: 100%;
  aspect-ratio: 16 / 9;            /* the inline style from the row's own dimensions wins */
  object-fit: contain;
  background: #000;
}
/* The original, unfiltered — see the header. */
.me-vimg, .me-vvideo {
  filter: none !important;
  -webkit-filter: none !important;
  backdrop-filter: none !important;
  mix-blend-mode: normal !important;
}
.me-vmeta {
  flex: 0 0 auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--on-shot-veil);
  color: var(--on-shot);
  font-size: 12.5px; font-weight: 650;
  pointer-events: none;
}
/* An original that cannot load offline: the dashed mark again, over the scrim. */
.me-vitem[data-miss="1"]::after {
  content: "";
  position: absolute; inset: 40%;
  border: 2px dashed var(--on-shot);
  border-radius: var(--r-md);
  pointer-events: none;
}

/* chrome bars fade as a UNIT — hidden entirely, never "quieted" with opacity. Hidden means
   hidden: opacity 0, no pointer events, `visibility:hidden` once the fade is over (so it is
   out of the a11y tree, not merely invisible), and memories.js puts `inert` on both bars in
   the same breath so nothing in them can still be reached by a keyboard or a screen reader. */
.me-vtop, .me-vbottom {
  position: absolute; left: 0; right: 0;
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  color: var(--on-shot);
  visibility: visible;
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.me-vtop {
  top: 0;
  padding-top: calc(var(--safe-top) + var(--sp-2));
  background: linear-gradient(rgba(0,0,0,.55), transparent);
}
.me-vbottom {
  bottom: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-1);
  padding-bottom: calc(var(--sa-bottom) + var(--sp-4));
  background: linear-gradient(transparent, rgba(0,0,0,.6));
}
.me-view[data-chrome="0"] .me-vtop,
.me-view[data-chrome="0"] .me-vbottom {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              visibility 0s linear var(--dur-fast);
}
.me-view[data-chrome="0"] .me-vtop { transform: translateY(-8px); }
.me-view[data-chrome="0"] .me-vbottom { transform: translateY(8px); }
@media (prefers-reduced-motion: reduce) {
  /* styles.css zeroes durations globally but not delays; the chrome swaps instantly here. */
  .me-vtop, .me-vbottom,
  .me-view[data-chrome="0"] .me-vtop,
  .me-view[data-chrome="0"] .me-vbottom { transition: none; }
}

.me-vbtn {
  display: grid; place-items: center;
  width: var(--tap); height: var(--tap);
  border-radius: 50%;
  background: var(--on-shot-veil);
  color: var(--on-shot);
}
.me-vbtn .ico { width: 21px; height: 21px; stroke-width: 2; }
.me-vbtn:active { transform: scale(.94); }
/* §8.1 again: unavailable is said with SHAPE — the veil drops away and a ring takes its
   place — never by fading the glyph, which is what an alpha would do to it over a photo. */
.me-vbtn[disabled] {
  pointer-events: none;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--on-shot);
}

.me-vcount {
  flex: 1 1 auto;
  text-align: center;
  font-size: 14px; font-weight: 650;
  text-shadow: 0 1px 3px var(--on-shot-halo);
}
.me-vwho {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: 14px; font-weight: 650;
  text-shadow: 0 1px 3px var(--on-shot-halo);
}
.me-vcap {
  font-size: 15px; line-height: 1.45;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 3px var(--on-shot-halo);
}
.me-vwhen {
  font-size: 12.5px; font-weight: 600;
  color: var(--on-shot);
  text-shadow: 0 1px 3px var(--on-shot-halo);
}

/* ── the framing sheet (02-COLLAGE §2f) ────────────────────────────────────────────────
   A crop and a loop window, set on the item you are looking at. Nothing here re-encodes
   anything: these controls write five numbers beside the media and the bytes never move. */
.me-fr { display: flex; flex-direction: column; gap: var(--sp-2); }
/* The preview is the whole point of the sheet, so it gets the room. 4:3 rather than the
   media's own aspect: the crop is being judged INSIDE a window, and a preview shaped like the
   source would show a crop that never happens. */
.me-frbox {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r-2);
  background: var(--surface-2);
  /* The drag is the interaction. Without this the browser decides it is a scroll before any
     JS runs, exactly as on the tab-bar handle. */
  touch-action: none;
  cursor: grab;
}
.me-frbox:active { cursor: grabbing; }
.me-frmedia { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* Thirds, faint. Enough to aim with, not enough to look at. */
.me-frgrid {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to right, transparent calc(33.333% - 1px), rgb(255 255 255 / .28) calc(33.333% - 1px) 33.333%, transparent 33.333%),
    linear-gradient(to right, transparent calc(66.666% - 1px), rgb(255 255 255 / .28) calc(66.666% - 1px) 66.666%, transparent 66.666%),
    linear-gradient(to bottom, transparent calc(33.333% - 1px), rgb(255 255 255 / .28) calc(33.333% - 1px) 33.333%, transparent 33.333%),
    linear-gradient(to bottom, transparent calc(66.666% - 1px), rgb(255 255 255 / .28) calc(66.666% - 1px) 66.666%, transparent 66.666%);
  mix-blend-mode: difference;
}
.me-frhint { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-3); }
.me-frhead { margin: var(--sp-3) 0 var(--sp-1); }
.me-frrange { width: 100%; }
