/* =============================================================================================
   Supwell design foundation ("Grit", MJ's Figma): tokens, Sw* component styles, motion kit.
   Linked right after app.min.css by Supwell/wwwroot/index.html (app) and
   Supwell.Web/Components/App.razor (web). Plain CSS: Tailwind does not compile this file, so
   nothing here needs an app.min.css rebuild. /admin/ui-kit renders every token and component.

   Cascade: app.min.css declares the layers (theme, base, components, utilities). Component
   classes live in @layer components, so a Tailwind utility on the same element still wins.
   Unlayered on purpose: heading sizes (MAUI's css/mobile.css resizes h1-h3 unlayered under
   640px, and only an unlayered class beats it), the toast host, and the motion kit. So a
   heading's size goes on a kit class or an inline style, never only on a Tailwind text-[..]
   utility, and a serif heading uses .sw-display (regular weight, no synthesized bold).

   Colour rule: the hex values below are the ones the feed and marketplace already render;
   app.css @theme mirrors them as Tailwind colours (bg-sw-ground, text-sw-ink...). Keep the
   two in sync. No new hues: restraint over saturation.

   Motion rule: base styles are the FINAL state; new keyframes carry only the "from" state and
   fill backwards, so nothing is left hidden or holding a transform (a transform makes the element
   the containing block of its position:fixed children, and so does a translate/scale animation
   for as long as it runs). Whole pages and layers therefore animate opacity only. One
   reduced-motion switch at the end covers the whole app.

   Contents: 0 Fonts · 1 Tokens · 2 Type · 3 Controls · 4 Components · 5 Motion kit
             6 Legacy animations (moved from app.css / MainLayout) · 7 Reduced motion
   ============================================================================================= */

/* 0. FONTS ------------------------------------------------------------------------------------ */
/* Self-hosted (fonts/*.woff2, SIL OFL 1.1) so the app never waits on Google's CDN and works
   offline. Same files, subsets and weight ranges the Google Fonts link served. */
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("../fonts/space-grotesk-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("../fonts/space-grotesk-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/inter-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/inter-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/instrument-serif-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/instrument-serif-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/instrument-serif-italic-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/instrument-serif-italic-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/jetbrains-mono-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Other scripts Google Fonts served (cyrillic, greek, vietnamese): unicode-range keeps them from downloading unless such text is on screen. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/inter-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/inter-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/inter-greek-ext.woff2") format("woff2"); unicode-range: U+1F00-1FFF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/inter-greek.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/inter-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/jetbrains-mono-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/jetbrains-mono-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/jetbrains-mono-greek.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/jetbrains-mono-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("../fonts/space-grotesk-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }

/* 1. TOKENS ----------------------------------------------------------------------------------- */
:root {
  /* ground and surfaces */
  --sw-ground: #efeae6;      /* page, html/body, WebView, splash (was surface-200 / #EFEAE6) */
  --sw-ground-2: #f5f2ef;    /* sunken: input wells, segmented track, close discs */
  --sw-card: #ffffff;
  --sw-line: #e5e1d9;        /* hairline on cards, inputs, chips */
  --sw-line-2: #c2b7a3;      /* MJ's 0.5px rules: sheet header/footer, stat dividers, grabber */
  --sw-line-3: #9ea796;      /* list dividers in sheets, switch "off" track */
  --sw-scrim: rgba(0, 0, 0, .30);

  /* ink */
  --sw-ink: #2d2d2d;         /* body copy and titles */
  --sw-ink-2: #817d6b;       /* muted copy, meta, labels (4.1:1 on white) */
  --sw-ink-muted: #6e6a59;   /* THE muted AA token: small muted copy (10-13px), meta, labels, footer icons and counts.
                                5.1:1 on white, 4.9:1 on #f5f2ef, 4.5:1 on the ground. Feed, marketplace and the batch-3 pages. */
  --sw-ink-2-aa: var(--sw-ink-muted);   /* the batch-3 pages' name for it (was #6b6756 / #6c6857): one value */
  --sw-ink-3: #9e9e96;       /* placeholders and decoration only, never readable copy */

  /* brand. The olive family is one set now: --sw-olive is the brand (was #373c2b, #374120,
     #3e452f); --sw-olive-2 is Tailwind's olive-800 (#3F4531), still on feed text. */
  --sw-olive: #373c2b;
  --sw-olive-2: #3f4531;
  --sw-on-olive: #ffffff;    /* text on olive, as the marketplace draws it */
  --sw-cream: #f6f3e6;       /* cream text on olive (auth screens, events) */
  --sw-yellow: #fdf312;      /* accent, sparingly: one highlight per screen at most */
  --sw-disabled: #b6b8a8;    /* MJ's disabled primary */
  --sw-olive-wash: rgba(55, 60, 43, .08);
  --sw-olive-line: rgba(55, 60, 43, .22);

  /* semantic, muted on purpose */
  --sw-go: #507a2a;          --sw-go-wash: rgba(80, 122, 42, .12);
  --sw-amber: #a27c07;       --sw-amber-wash: rgba(162, 124, 7, .12);
  --sw-danger: #b3402a;      --sw-danger-wash: rgba(179, 64, 42, .10);

  /* type. --sw-font-body is what the app has always rendered for unclassed text. The style
     guide's split (§3.1): Inter is the UI face (buttons, sheet and confirm titles, segments,
     rows, chips, toasts); Space Grotesk is for page headings and numerals only. */
  --sw-font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --sw-font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --sw-font-head: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --sw-font-serif: "Instrument Serif", "Times New Roman", serif;
  --sw-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sw-font-inter: "Inter", ui-sans-serif, system-ui, sans-serif;  /* = --sw-font-ui; activation.css and the marketplace titles */
  --sw-fs-display: 36px;     /* Instrument Serif heroes */
  --sw-fs-title: 24px;
  --sw-fs-h2: 20px;
  --sw-fs-h3: 16px;
  --sw-fs-body: 15px;
  --sw-fs-small: 13px;
  --sw-fs-label: 11px;       /* JetBrains Mono uppercase labels; the floor for readable copy */
  --sw-fs-micro: 10px;       /* tags and badges only */
  --sw-tracking: -0.43px;    /* MJ's UI tracking */
  --sw-tracking-label: .06em;

  /* shape */
  --sw-r-xs: 4px;            /* tags */
  --sw-r-sm: 10px;           /* thumbs, icon tiles */
  --sw-r-md: 12px;           /* buttons, inputs, chips, segmented */
  --sw-r-card: 14px;         /* cards (feed card radius) */
  --sw-r-sheet: 25px;        /* bottom-sheet top corners */
  --sw-r-pill: 999px;

  /* space */
  --sw-1: 4px; --sw-2: 8px; --sw-3: 12px; --sw-4: 16px; --sw-5: 20px;
  --sw-6: 24px; --sw-8: 32px; --sw-10: 40px; --sw-14: 56px;
  --sw-gutter: 16px;

  /* elevation: cards sit on hairlines; shadows are for things that float */
  --sw-shadow-card: 0 1px 3px rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1);  /* = feed's shadow-sm */
  --sw-shadow-tile: 0 2px 8px rgba(0, 0, 0, .08);   /* THE card shadow: .sw-surface (MJ's marketplace card, the feed's tile) */
  --sw-shadow-float: 0 2px 8px rgba(0, 0, 0, .10);                                   /* glass chips */
  --sw-shadow-pop: 0 8px 24px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .08);      /* menus, toasts */
  --sw-shadow-sheet: 0 -10px 40px rgba(0, 0, 0, .14);

  /* z-index. Legacy page modals sit at 9999 and the Blazor error bar at 10000; sheets and
     toasts go above them so a SwConfirm opened from an old modal is never buried. */
  --sw-z-raised: 2;
  --sw-z-sticky: 30;
  --sw-z-nav: 40;            /* the floating chrome: tab pill (top row +1) */
  --sw-z-sidebar: 50;
  --sw-z-popover: 60;        /* menus, marketplace sheets */
  --sw-z-sheet: 10010;
  --sw-z-modal: 10020;
  --sw-z-toast: 10100;

  /* safe area. Android WebView reports env() as 0; the native bridge writes
     --sw-safe-t-android / --sw-safe-b-android on <html> from the real window insets. The iPhone Duo's
     FoldBridge writes the window's side insets as --sw-safe-l-ios / --sw-safe-r-ios (sw-native.js
     swNative.fold), a fallback in case a screen reports less through env(). */
  --sw-safe-t: max(env(safe-area-inset-top, 0px), var(--sw-safe-t-android, 0px));
  --sw-safe-b: max(env(safe-area-inset-bottom, 0px), var(--sw-safe-b-android, 0px));
  --sw-safe-l: max(env(safe-area-inset-left, 0px), var(--sw-safe-l-ios, 0px));
  --sw-safe-r: max(env(safe-area-inset-right, 0px), var(--sw-safe-r-ios, 0px));
  /* The shell's floating chrome (MainLayout, css/chrome.css). No bars: the top row of glass discs
     and the bottom tab pill float over the page, and the layers pad by these rooms so nothing in a
     page starts or ends under them (the page scrolls under both). */
  --sw-topbar-h: 56px;       /* the floating top row under the status bar: 6px of air, 44px discs, 6px */
  --sw-tabbar-h: 64px;       /* the tab pill (6px padding around 52px cells) */
  --sw-tab-bottom: max(calc(var(--sw-safe-b) - 6px), 12px);   /* pill's gap to the screen edge: clear of the home indicator */
  --sw-top-room: calc(var(--sw-safe-t) + var(--sw-topbar-h));
  --sw-tab-room: calc(var(--sw-tab-bottom) + var(--sw-tabbar-h) + 12px);

  /* glass (the floating chrome): a warm cream frost, never cool grey. --sw-glass is dense enough that
     olive ink and the #4d4a3c tab labels keep AA over a black photo (7:1 / 5.5:1); where blur is not
     available, or the reader asked for less transparency, it is the solid --sw-glass-solid. */
  --sw-glass: rgba(250, 247, 242, .82);
  --sw-glass-solid: #faf7f2;
  --sw-glass-fx: blur(20px) saturate(1.7);
  --sw-glass-edge: rgba(55, 60, 43, .10);
  --sw-glass-sheen: rgba(255, 255, 255, .75);
  --sw-shadow-glass: 0 6px 20px rgba(45, 42, 30, .14), 0 1px 3px rgba(45, 42, 30, .10);

  /* motion. Durations divide by --sw-tempo: set it to .25 on <html> for slow-mo QA. */
  --sw-pop: cubic-bezier(.2, .9, .25, 1.15);   /* things that land: chips, puck, switch, toast */
  --sw-out: cubic-bezier(.16, 1, .3, 1);        /* entries and counts */
  --sw-glide: cubic-bezier(.32, .72, 0, 1);     /* sheets, steps, navigation */
  --sw-tempo: 1;
  --sw-dur-fast: calc(160ms / var(--sw-tempo));
  --sw-dur: calc(280ms / var(--sw-tempo));
  --sw-dur-slow: calc(560ms / var(--sw-tempo));
}
@media (min-width: 768px) { :root { --sw-gutter: 24px; } }
/* The desktop web bar is 64px; the app's floating row stays 56px at every width (an iPad Pro 13 is 1032
   wide), so its layers don't pad for a bar that isn't there. html.sw-app is the app host (index.html). */
@media (min-width: 1024px) { :root { --sw-gutter: 32px; } :root:not(.sw-app) { --sw-topbar-h: 64px; } }

/* The vertical bar (iPhone Duo, html.vbar from sw-native.js swNative.fold). Folded, or open and held
   sideways, the Duo gives an app's bars a strip down the right edge beside the status bar (iOS 27.1
   verticalBarEdge). The tab pill stands in it as a rail and the top discs stack above it
   (css/chrome.css "the vertical bar"); with the pill gone from the bottom, the layers and the comment
   bar keep only the bottom inset. Same element as :root, more specific, so the tokens derived from these
   on :root (--comment-bar-total) follow. */
html.vbar {
  --sw-rail-w: calc(var(--sw-safe-r) - 8px);            /* the rail's width: 4px clear of the strip's sides */
  --sw-rail-cell: 56px;                                 /* one tab */
  --sw-rail-b: calc(var(--sw-safe-b) + 16px);           /* lifted clear of the rounded corner */
  --sw-rail-tabs: calc(var(--sw-rail-cell) * 5 + 12px); /* five cells (Home, Mileage, +, Market, Chat), 6px padding */
  --sw-tab-room: calc(var(--sw-safe-b) + 16px);         /* the layers no longer reserve the bottom pill */
  --comment-bar-bottom: calc(var(--sw-safe-b) + 12px);  /* app.css :root puts it above the pill */
}

/* Scroll lock while a SwSheet is open (sw-ui.js counts nested sheets). */
html.sw-locked { overflow: hidden; }

/* 2. TYPE ------------------------------------------------------------------------------------- */
@layer components {
  .sw-label {
    font: 500 var(--sw-fs-label)/1.3 var(--sw-font-mono); letter-spacing: var(--sw-tracking-label);
    text-transform: uppercase; color: var(--sw-ink-2);
  }
  .sw-body { font: 400 var(--sw-fs-body)/1.5 var(--sw-font-body); color: var(--sw-ink); }
  .sw-small { font: 400 var(--sw-fs-small)/1.45 var(--sw-font-body); color: var(--sw-ink-2); }
  .sw-num { font-variant-numeric: tabular-nums; }
}
/* Headings: unlayered so they beat css/mobile.css's h1-h3 sizes in the app (class > element). */
.sw-display { margin: 0; font: 400 var(--sw-fs-display)/1.05 var(--sw-font-serif); font-synthesis: none; letter-spacing: -.01em; color: var(--sw-olive); text-wrap: balance; }
/* Instrument Serif ships one weight (400, plus a real italic). On an h1/h2 the base layer asks
   for 600-700, and the browser would smear a fake bold over the regular face: never let it.
   The Tailwind serif utilities get the same guard. */
.font-sw-serif, .font-display { font-synthesis: none; }
.sw-title { margin: 0; font: 600 var(--sw-fs-title)/1.15 var(--sw-font-head); letter-spacing: var(--sw-tracking); color: var(--sw-ink); text-wrap: balance; }
.sw-h2 { margin: 0; font: 600 var(--sw-fs-h2)/1.25 var(--sw-font-head); letter-spacing: var(--sw-tracking); color: var(--sw-ink); }
.sw-h3 { margin: 0; font: 600 var(--sw-fs-h3)/1.3 var(--sw-font-ui); letter-spacing: var(--sw-tracking); color: var(--sw-ink); }

/* 3. CONTROLS --------------------------------------------------------------------------------- */
@layer components {
  .sw-icon { flex: none; display: inline-block; vertical-align: middle; }

  /* SwButton: .sw-btn + kind + size. Busy keeps the colour (aria-busy, never disabled) and
     stacks the label and the busy content in one grid cell, so the width never jumps. */
  .sw-btn {
    --bg: var(--sw-card); --fg: var(--sw-ink); --bd: var(--sw-line);
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 0 18px; border: 1px solid var(--bd); border-radius: var(--sw-r-md);
    background: var(--bg); color: var(--fg); cursor: pointer; text-decoration: none; white-space: nowrap;
    font: 600 16px/1.2 var(--sw-font-ui); letter-spacing: var(--sw-tracking);
    -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
    transition: scale var(--sw-dur-fast) ease, background-color var(--sw-dur) ease, border-color var(--sw-dur) ease, color var(--sw-dur) ease, opacity var(--sw-dur) ease;
  }
  .sw-btn:hover, .sw-btn:visited { color: var(--fg); }
  .sw-btn:active { scale: .97; }
  .sw-btn:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: 2px; }
  .sw-btn__in { display: inline-grid; align-items: center; justify-items: center; }
  .sw-btn__in > * { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 8px; }
  .sw-btn__busy { visibility: hidden; }
  .sw-btn--primary { --bg: var(--sw-olive); --fg: var(--sw-on-olive); --bd: var(--sw-olive); }
  .sw-btn--secondary { --bg: var(--sw-card); --fg: var(--sw-ink); --bd: var(--sw-line); }
  .sw-btn--ghost { --bg: transparent; --fg: var(--sw-olive); --bd: transparent; font-size: 14px; text-transform: uppercase; }
  .sw-btn--destructive { --bg: var(--sw-danger); --fg: #fff; --bd: var(--sw-danger); }
  @media (hover: hover) {
    .sw-btn--primary:hover:not(:disabled) { --bg: var(--sw-olive-2); --bd: var(--sw-olive-2); }
    .sw-btn--secondary:hover:not(:disabled) { --bg: var(--sw-ground-2); }
    .sw-btn--ghost:hover:not(:disabled) { --bg: var(--sw-olive-wash); }
  }
  /* A busy button is natively disabled (no double submit, even as a form's submit button) but
     keeps its colours: only a really disabled one greys out. */
  .sw-btn:disabled { cursor: default; scale: none; }
  .sw-btn--primary:disabled:not([aria-busy="true"]) { --bg: var(--sw-disabled); --bd: var(--sw-disabled); }
  .sw-btn--secondary:disabled:not([aria-busy="true"]), .sw-btn--ghost:disabled:not([aria-busy="true"]), .sw-btn--destructive:disabled:not([aria-busy="true"]) { opacity: .45; }
  .sw-btn[aria-busy="true"] { cursor: progress; }
  .sw-btn[aria-busy="true"] .sw-btn__label { visibility: hidden; }
  .sw-btn[aria-busy="true"] .sw-btn__busy { visibility: visible; }
  .sw-btn--sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
  .sw-btn--lg { min-height: 50px; padding: 0 22px; }
  .sw-btn--block { display: flex; width: 100%; }
  .sw-btn--ghost.sw-btn--sm { font-size: 13px; }

  /* A member's action shown to a free account (freemium; Yowana and MJ 10/22, "grayed out but still
     tappable"): it looks disabled but stays a live button (never the disabled attribute, which would
     swallow the tap), and the tap opens the membership sheet (AccessPolicy.ShowsLocked). A filter,
     not opacity: the create menu's bloom animates opacity and would undo it. A primary SwButton takes
     the disabled primary's colours instead. */
  .sw-member-locked { filter: grayscale(1) opacity(.45); cursor: pointer; }
  .sw-btn--primary.sw-member-locked { filter: none; --bg: var(--sw-disabled); --bd: var(--sw-disabled); }

  /* The comment bar as a free account sees it (LockedComposer): the same glass pill with its + and
     send discs and the prompt, in the disabled colours; the whole pill is one button. */
  .sw-composer-locked {
    display: flex; align-items: flex-end; gap: 8px; width: 100%; padding: 8px; border: 0; border-radius: 16px;
    font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .sw-composer-locked:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: 2px; }
  .sw-composer-locked__disc {
    flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
    background: rgba(237, 233, 227, .6); color: rgba(136, 136, 136, .55);
  }
  .sw-composer-locked__text {
    flex: 1; min-width: 0; padding: 6px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 16px; line-height: 20px; color: var(--sw-disabled);
  }

  /* SwIconButton: 36px disc, 44px target */
  .sw-icon-btn {
    position: relative; flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
    border: 1px solid var(--sw-line); border-radius: 50%; background: var(--sw-card); color: var(--sw-ink);
    cursor: pointer; text-decoration: none; -webkit-tap-highlight-color: transparent;
    transition: scale var(--sw-dur-fast) ease, background-color var(--sw-dur) ease;
  }
  .sw-icon-btn::after { content: ""; position: absolute; inset: -4px; }
  .sw-icon-btn:hover, .sw-icon-btn:visited { color: var(--sw-ink); }
  .sw-icon-btn:active { scale: .92; }
  .sw-icon-btn:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: 2px; }
  .sw-icon-btn:disabled { opacity: .45; cursor: default; scale: none; }
  .sw-icon-btn--plain { border-color: transparent; background: transparent; }
  .sw-icon-btn__dot { position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--sw-go); box-shadow: 0 0 0 2px var(--sw-card); }

  /* SwChip. Filter chip: MJ's 12px-radius tile, olive when on. Status chip (Tone): small wash pill. */
  .sw-chip {
    position: relative; display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 36px; padding: 0 12px;
    border: 1px solid var(--sw-line); border-radius: var(--sw-r-md); background: var(--sw-card); color: var(--sw-ink);
    font: 500 14px/1.2 var(--sw-font-ui); letter-spacing: var(--sw-tracking); white-space: nowrap; text-decoration: none;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: background-color var(--sw-dur) ease, border-color var(--sw-dur) ease, color var(--sw-dur) ease, scale var(--sw-dur-fast) ease;
  }
  .sw-chip::after { content: ""; position: absolute; inset: -4px 0; }
  .sw-chip:hover, .sw-chip:visited { color: var(--sw-ink); }
  .sw-chip:active { scale: .96; }
  .sw-chip:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: 2px; }
  .sw-chip.is-on, .sw-chip.is-on:hover { background: var(--sw-olive); border-color: var(--sw-olive); color: var(--sw-on-olive); }
  .sw-chip__count { color: var(--sw-ink-2); font-variant-numeric: tabular-nums; }
  .sw-chip.is-on .sw-chip__count { color: rgba(255, 255, 255, .75); }
  .sw-chip--status {
    min-height: 24px; padding: 0 9px; border-color: transparent; border-radius: var(--sw-r-pill); cursor: default;
    background: var(--sw-ground-2); color: var(--sw-ink-2); font: 600 12px/1 var(--sw-font-ui); letter-spacing: 0;
  }
  .sw-chip--status::after { content: none; }
  .sw-chip--status:active { scale: none; }
  .sw-chip--olive { background: var(--sw-olive); color: var(--sw-on-olive); }
  .sw-chip--go { background: var(--sw-go-wash); color: var(--sw-go); }
  .sw-chip--amber { background: var(--sw-amber-wash); color: var(--sw-amber); }
  .sw-chip--danger { background: var(--sw-danger-wash); color: var(--sw-danger); }

  /* SwSegmented: --n segments, --i selected; the olive puck slides under the selection */
  .sw-seg {
    --n: 2; --i: 0; position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr));
    padding: 3px; border: 1px solid var(--sw-line); border-radius: var(--sw-r-md); background: var(--sw-ground-2); isolation: isolate;
  }
  .sw-seg__puck {
    position: absolute; z-index: -1; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n));
    border-radius: 9px; background: var(--sw-olive); box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
    transform: translateX(calc(var(--i) * 100%)); transition: transform calc(320ms / var(--sw-tempo)) var(--sw-pop);
  }
  .sw-seg__opt {
    min-width: 0; min-height: 36px; padding: 0 10px; border: 0; border-radius: 9px; background: none; cursor: pointer;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; -webkit-tap-highlight-color: transparent;
    color: var(--sw-ink); font: 600 13px/1 var(--sw-font-ui); letter-spacing: 0; transition: color var(--sw-dur) ease;
  }
  .sw-seg__opt[aria-pressed="true"] { color: var(--sw-on-olive); }
  .sw-seg__opt:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: 1px; }
  /* DistanceUnitToggle: the compact MI | KM pill beside a distance (the run page's hero, Mileage) */
  .sw-seg--units { display: inline-grid; width: auto; flex: none; padding: 2px; border-radius: 999px; }
  .sw-seg--units .sw-seg__puck { top: 2px; bottom: 2px; left: 2px; width: calc((100% - 4px) / var(--n)); border-radius: 999px; }
  .sw-seg--units .sw-seg__opt { min-height: 28px; padding: 0 10px; border-radius: 999px; font: 700 11px/1 var(--sw-font-ui); letter-spacing: .02em; }

  /* SwSwitch: MJ's 40x26 track (olive on, sage off), 22px thumb, 44px target */
  .sw-switch {
    position: relative; flex: none; display: inline-block; width: 40px; height: 26px; padding: 2px; border: 0; border-radius: 25px;
    background: var(--sw-line-3); cursor: pointer; vertical-align: middle; -webkit-tap-highlight-color: transparent;
    transition: background-color var(--sw-dur) ease;
  }
  .sw-switch::before {
    content: ""; display: block; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
    transition: translate calc(260ms / var(--sw-tempo)) var(--sw-pop);
  }
  .sw-switch::after { content: ""; position: absolute; inset: -9px -2px; }
  .sw-switch[aria-checked="true"] { background: var(--sw-olive); }
  .sw-switch[aria-checked="true"]::before { translate: 14px 0; }
  .sw-switch:disabled { opacity: .45; cursor: default; }
  .sw-switch:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: 2px; }

  /* Inputs, MJ's field: white, hairline, 12px radius. 16px text on phones so iOS never zooms. */
  .sw-input {
    width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--sw-line); border-radius: var(--sw-r-md);
    background: var(--sw-card); color: var(--sw-ink); font: 500 16px/1.4 var(--sw-font-body); caret-color: var(--sw-olive);
    -webkit-appearance: none; appearance: none; transition: border-color var(--sw-dur) ease;
  }
  .sw-input::placeholder { color: var(--sw-ink-3); }
  .sw-input:focus { outline: none; border-color: var(--sw-olive); }
  @media (min-width: 768px) { .sw-input { font-size: 14px; } }
  textarea.sw-input { min-height: 96px; resize: vertical; }
  .sw-field { display: grid; gap: 6px; }

  /* Card: white on hairline, the feed card's radius */
  .sw-card { position: relative; border: 1px solid var(--sw-line); border-radius: var(--sw-r-card); background: var(--sw-card); }

  /* THE card shell, one box for the whole app: white, radius 14, no hairline, the tile shadow.
     Feed cards (with .sw-fcard), marketplace cards and detail, alerts, Plans (browse, detail,
     Today, Get started), Calendar, Profile, Shoes and Settings all wear it, so they can't drift.
     Layered (components), so a page's own Tailwind layout and padding utilities still apply. */
  .sw-surface { position: relative; border: 0; border-radius: var(--sw-r-card); background: var(--sw-card); box-shadow: var(--sw-shadow-tile); }
  .sw-card--pad { padding: 16px; }

  /* SwSpinner: one ring in the current colour. Buttons and infinite scroll only; screens use SwSkeleton. */
  .sw-spinner {
    --s: 18px; display: inline-block; flex: none; width: var(--s); height: var(--s); border-radius: 50%; vertical-align: middle;
    border: 2px solid currentColor; border-right-color: transparent; opacity: .9;
    animation: sw-spin calc(800ms / var(--sw-tempo)) linear infinite;
  }
  .sw-spinner.is-idle { animation: none; }

  /* Visually hidden, still read by screen readers */
  .sw-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}

/* 4. COMPONENTS ------------------------------------------------------------------------------- */
@layer components {
  /* SwListGroup + SwListRow */
  .sw-list { margin: 0 0 var(--sw-5); }
  .sw-list__title { display: block; margin: 0 4px 8px; }
  .sw-list__card { overflow: hidden; border: 1px solid var(--sw-line); border-radius: var(--sw-r-card); background: var(--sw-card); }
  .sw-list__foot { margin: 8px 4px 0; color: var(--sw-ink-2); font: 400 var(--sw-fs-small)/1.45 var(--sw-font-body); }
  .sw-row {
    display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px; margin: 0;
    border: 0; border-top: 1px solid var(--sw-line); background: none; color: var(--sw-ink); text-align: left; text-decoration: none;
    font: 500 15px/1.3 var(--sw-font-ui); letter-spacing: var(--sw-tracking); -webkit-tap-highlight-color: transparent;
  }
  .sw-row:first-child { border-top: 0; }
  a.sw-row, button.sw-row { cursor: pointer; transition: background-color var(--sw-dur-fast) ease; }
  a.sw-row:hover, a.sw-row:visited { color: var(--sw-ink); }
  a.sw-row:active, button.sw-row:active { background: var(--sw-ground-2); }
  @media (hover: hover) { a.sw-row:hover, button.sw-row:hover:not(:disabled) { background: var(--sw-ground-2); } }
  .sw-row:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: -2px; }
  .sw-row__icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--sw-r-sm); background: var(--sw-ground-2); color: var(--sw-olive); }
  .sw-row__main { flex: 1 1 auto; min-width: 0; }
  .sw-row__title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sw-row__sub { display: block; margin-top: 2px; color: var(--sw-ink-2); font: 400 var(--sw-fs-small)/1.35 var(--sw-font-body); letter-spacing: 0; }
  .sw-row__trail { flex: none; display: inline-flex; align-items: center; gap: 6px; max-width: 55%; color: var(--sw-ink-2); font-size: 14px; font-weight: 400; }
  .sw-row__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sw-row__chev { color: var(--sw-ink-3); }
  .sw-row.is-danger, .sw-row.is-danger:hover { color: var(--sw-danger); }
  .sw-row.is-danger .sw-row__icon { background: var(--sw-danger-wash); color: var(--sw-danger); }
  .sw-row:disabled, .sw-row[aria-disabled="true"] { opacity: .45; cursor: default; }

  /* SwPageHeader: one pattern for detail pages. Back disc, title, trailing actions. */
  .sw-ph { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 0; }
  .sw-ph--safe { padding-top: calc(var(--sw-safe-t) + 6px); }
  .sw-ph--sticky { position: sticky; top: 0; z-index: var(--sw-z-sticky); background: var(--sw-ground); }
  .sw-ph__titles { flex: 1 1 auto; min-width: 0; }
  .sw-ph__titles > .sw-label { display: block; margin-bottom: 2px; }
  .sw-ph__sub { margin: 2px 0 0; color: var(--sw-ink-2); font: 400 var(--sw-fs-small)/1.35 var(--sw-font-body); }
  .sw-ph__trail { flex: none; display: flex; align-items: center; gap: 8px; }

  /* SwSheet. Phones: bottom sheet, MJ's header (centred 16px title, 0.5px rule, disc close).
     >= 768px: centred dialog. The host is moved to <body> on first render (sw-ui.js). */
  .sw-sheet-host { display: contents; }
  .sw-sheet-root { position: fixed; inset: 0; z-index: var(--sw-z-sheet); display: flex; align-items: flex-end; justify-content: center; padding: 0 var(--sw-safe-r) 0 var(--sw-safe-l); }
  /* z-index -1: paints under the panel, and ranks above it for Android back (index.html picks
     the deepest z-chain), so back taps the scrim, which honours Dismissible. */
  .sw-sheet__scrim { position: absolute; inset: 0; z-index: -1; background: var(--sw-scrim); touch-action: none; animation: sw-fade calc(320ms / var(--sw-tempo)) ease backwards; }
  .sw-sheet {
    position: relative; display: flex; flex-direction: column; width: 100%; max-width: 480px;
    max-height: calc(100vh - var(--sw-safe-t) - 12px); max-height: calc(100dvh - var(--sw-safe-t) - 12px);
    padding-bottom: var(--sw-safe-b); overflow: hidden; outline: none; touch-action: pan-y;
    border-radius: var(--sw-r-sheet) var(--sw-r-sheet) 0 0; background: var(--sw-card); box-shadow: var(--sw-shadow-sheet);
    animation: sw-sheet-up calc(320ms / var(--sw-tempo)) var(--sw-glide) backwards;
  }
  .sw-sheet--foot { padding-bottom: 0; }
  .sw-sheet--tall { height: 88vh; height: 88dvh; }
  .sw-sheet__grab { flex: none; display: grid; place-items: center; height: 20px; cursor: grab; touch-action: none; }
  .sw-sheet__grab::before { content: ""; width: 36px; height: 4px; border-radius: 2px; background: var(--sw-line-2); }
  .sw-sheet__head { flex: none; display: flex; align-items: center; gap: 8px; padding: 0 12px 10px; border-bottom: .5px solid var(--sw-line-2); touch-action: none; }
  .sw-sheet__side { flex: none; display: flex; justify-content: center; width: 32px; }
  .sw-sheet__titles { flex: 1 1 auto; min-width: 0; text-align: center; }
  .sw-sheet__titles > .sw-label { display: block; }
  .sw-sheet__close, .sw-sheet__back {
    position: relative; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%;
    background: var(--sw-ground-2); color: var(--sw-ink); cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .sw-sheet__back { background: none; }
  .sw-sheet__close::after, .sw-sheet__back::after { content: ""; position: absolute; inset: -8px; }
  .sw-sheet__close:disabled { opacity: .45; cursor: default; }
  .sw-sheet__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 20px; }
  .sw-sheet--flush .sw-sheet__body { padding: 0; }
  .sw-sheet__foot {
    flex: none; display: flex; align-items: center; gap: 12px; padding: 10px 12px calc(10px + var(--sw-safe-b));
    border-top: .5px solid var(--sw-line-2); background: var(--sw-card);
  }
  .sw-sheet__foot > .sw-btn--block { flex: 1 1 0; width: auto; }
  @media (min-width: 768px) {
    /* The side insets stay: the iPhone Duo's status strip (open, held sideways) sits in the right one. */
    .sw-sheet-root { align-items: center; padding: 24px calc(24px + var(--sw-safe-r)) 24px calc(24px + var(--sw-safe-l)); }
    .sw-sheet {
      max-width: 520px; max-height: min(760px, 88vh); padding-bottom: 0; border-radius: 18px;
      animation: sw-pop calc(260ms / var(--sw-tempo)) var(--sw-out) backwards;
    }
    .sw-sheet--tall { height: min(760px, 88vh); }
    .sw-sheet__grab { height: 12px; visibility: hidden; }
    .sw-sheet__foot { padding-bottom: 10px; }
  }

  /* SwConfirm (a SwSheet) */
  .sw-sheet--confirm { max-width: 420px; }
  .sw-confirm { padding: 4px 4px 0; text-align: center; }
  .sw-confirm__icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%; background: var(--sw-ground-2); color: var(--sw-olive); }
  .sw-confirm--destructive .sw-confirm__icon { background: var(--sw-danger-wash); color: var(--sw-danger); }
  .sw-confirm__msg { margin: 0; color: var(--sw-ink-2); font: 400 var(--sw-fs-body)/1.45 var(--sw-font-body); text-wrap: pretty; }
  .sw-confirm__error { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--sw-r-md); background: var(--sw-danger-wash); color: var(--sw-danger); font: 500 14px/1.4 var(--sw-font-body); text-align: left; }
  .sw-confirm__actions { display: grid; gap: 6px; margin-top: 20px; }
  @media (min-width: 768px) {
    .sw-sheet--confirm { max-width: 400px; }
    .sw-confirm__actions { grid-template-columns: 1fr 1fr; gap: 10px; }
    .sw-confirm__actions > :first-child { order: 2; }
  }
  /* SwConfirm Layout="sheet" (Feed_DeleteConfirm, Shoes_RemoveSheet): header, preview, message, footer. */
  .sw-sheet--confirm-sheet { max-width: none; }
  .sw-sheet--confirm-sheet .sw-sheet__foot { gap: 30px; }
  .sw-confirm-sheet { display: flex; flex-direction: column; gap: 14px; }
  .sw-confirm-sheet__msg { margin: 0; font: 500 14px/20px var(--sw-font-ui); color: var(--sw-ink); text-wrap: pretty; }
  .sw-confirm-sheet .sw-confirm__error { margin: 0; }
  .sw-confirm-preview { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--sw-ground-2); text-align: left; }
  .sw-confirm-preview__icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: var(--sw-card); color: var(--sw-olive-2); }
  .sw-confirm-preview__text { min-width: 0; display: flex; flex-direction: column; }
  .sw-confirm-preview__title { font: 600 15px/20px var(--sw-font-ui); color: var(--sw-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sw-confirm-preview__meta { font: 500 12px/16px var(--sw-font-ui); color: var(--sw-ink-muted); }
  @media (min-width: 768px) {
    .sw-sheet--confirm-sheet { max-width: 440px; }
  }

  /* SwEmptyState: never a dead end */
  .sw-empty { display: grid; justify-items: center; padding: 40px 24px; text-align: center; }
  .sw-empty--compact { padding: 24px 16px; }
  .sw-empty__icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 14px; border: 1px solid var(--sw-line); border-radius: 50%; background: var(--sw-card); color: var(--sw-olive); }
  .sw-empty__body { max-width: 34ch; margin: 6px 0 0; color: var(--sw-ink-2); font: 400 var(--sw-fs-body)/1.45 var(--sw-font-body); text-wrap: pretty; }
  .sw-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }

  /* SwSkeleton: first load only; a refetch keeps the old content on screen */
  .sw-skel {
    display: block; border-radius: 6px;
    background: linear-gradient(90deg, var(--sw-ground-2) 25%, #faf9f7 50%, var(--sw-ground-2) 75%) 0 0 / 200% 100%;
    animation: sw-shimmer calc(1400ms / var(--sw-tempo)) ease-in-out infinite;
  }
  /* On white the cream base would vanish; step down to the page ground. */
  .sw-card .sw-skel, .sw-list__card .sw-skel, .sw-sheet .sw-skel {
    background-image: linear-gradient(90deg, var(--sw-ground) 25%, var(--sw-ground-2) 50%, var(--sw-ground) 75%);
  }
  .sw-skel--line { height: .8em; border-radius: 5px; }
  .sw-skel--block { border-radius: var(--sw-r-card); }
  .sw-skel--circle { border-radius: 50%; }
  .sw-skel-lines { display: grid; gap: 8px; }

  /* Avatars. Circles for people, rounded squares for shoes and listings (Phil, 3.0.0). Goes on
     the box (an <img>, or a wrapper holding an <img> or initials) next to whatever sets its size,
     colours and type. The photo is pinned to the box: as a flex or grid item in an auto row,
     height:100% falls back to the photo's own ratio and portrait pictures grow tall (4db950d4).
     flex:none so a long name beside it never squeezes the circle into an oval. */
  .sw-avatar { position: relative; flex: none; aspect-ratio: 1; border-radius: 50%; overflow: hidden; object-fit: cover; }
  .sw-avatar > img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }

  /* SwStepper: wizard chrome. Bars fill as you go; each step is re-keyed and slides in from
     the side it came from. */
  .sw-stepper { display: flex; flex-direction: column; min-height: 0; }
  .sw-stepper__top { flex: none; display: flex; align-items: center; gap: 12px; padding: 4px 0 14px; }
  .sw-stepper__spacer { flex: none; width: 36px; height: 36px; }
  .sw-stepper__bars { --n: 3; flex: 1 1 auto; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px; }
  .sw-stepper__bar { position: relative; height: 3px; overflow: hidden; border-radius: 2px; background: var(--sw-line); }
  .sw-stepper__bar::after {
    content: ""; position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--sw-olive);
    transition: width calc(550ms / var(--sw-tempo)) var(--sw-out);
  }
  .sw-stepper__bar.is-done::after, .sw-stepper__bar.is-now::after { width: 100%; }
  .sw-stepper__screen { flex: 1 1 auto; min-height: 0; outline: none; animation: sw-step-in calc(380ms / var(--sw-tempo)) var(--sw-glide) backwards; }
  .sw-stepper__screen.is-back { animation-name: sw-step-back; }
  .sw-stepper__screen.is-first { animation: none; }
  .sw-stepper__screen > .sw-label { display: block; margin-bottom: 4px; }
  .sw-stepper__foot { flex: none; display: flex; align-items: center; gap: 12px; padding-top: 14px; }
  .sw-stepper__foot > .sw-btn--block { flex: 1 1 0; width: auto; }
}

/* SwToastHost: one host, dropped in under the status bar, above sheets. */
.sw-toast-host {
  position: fixed; z-index: var(--sw-z-toast); top: calc(var(--sw-safe-t) + 8px); left: 0; right: 0;
  display: grid; justify-items: center; padding: 0 calc(12px + var(--sw-safe-r)) 0 calc(12px + var(--sw-safe-l)); pointer-events: none;
}
.sw-toast {
  pointer-events: auto; display: flex; align-items: center; gap: 4px; width: min(100%, 420px); padding: 6px;
  border: 1px solid var(--sw-line); border-radius: var(--sw-r-card); background: var(--sw-card); box-shadow: var(--sw-shadow-pop);
  animation: sw-drop calc(420ms / var(--sw-tempo)) var(--sw-pop) backwards;
}
.sw-toast.is-leaving {
  opacity: 0; translate: 0 -30%;
  transition: opacity calc(220ms / var(--sw-tempo)) ease, translate calc(220ms / var(--sw-tempo)) ease;
}
.sw-toast__main {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px 6px; border: 0;
  background: none; color: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.sw-toast__icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--sw-r-sm); background: var(--sw-ground-2); color: var(--sw-olive); }
.sw-toast--success .sw-toast__icon { background: var(--sw-go-wash); color: var(--sw-go); }
.sw-toast--error .sw-toast__icon { background: var(--sw-danger-wash); color: var(--sw-danger); }
.sw-toast__text { flex: 1 1 auto; min-width: 0; }
.sw-toast__k { display: block; margin-bottom: 1px; }
.sw-toast__t { display: block; font: 600 14px/1.3 var(--sw-font-ui); letter-spacing: var(--sw-tracking); color: var(--sw-ink); text-wrap: pretty; }
.sw-toast__go { flex: none; color: var(--sw-ink-3); }
.sw-toast__action {
  flex: none; min-height: 36px; padding: 0 12px; border: 0; border-radius: var(--sw-r-sm); background: var(--sw-ground-2);
  color: var(--sw-olive); font: 600 13px/1 var(--sw-font-ui); text-transform: uppercase; cursor: pointer;
}

/* Heading sizes inside components (unlayered, see the header note) */
.sw-ph__title { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 var(--sw-fs-h2)/1.2 var(--sw-font-head); letter-spacing: var(--sw-tracking); color: var(--sw-ink); }
.sw-sheet__title { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 var(--sw-fs-h3)/1.3 var(--sw-font-ui); letter-spacing: var(--sw-tracking); color: var(--sw-ink); }
.sw-confirm__title { margin: 0 0 6px; font: 600 var(--sw-fs-h2)/1.25 var(--sw-font-ui); letter-spacing: var(--sw-tracking); color: var(--sw-ink); text-wrap: balance; }
.sw-empty__title { margin: 0; font: 600 18px/1.3 var(--sw-font-ui); letter-spacing: var(--sw-tracking); color: var(--sw-ink); text-wrap: balance; }
.sw-stepper__screen > .sw-h2 { margin-bottom: 14px; }

/* 5. MOTION KIT ------------------------------------------------------------------------------- */
/* New keyframes hold only the "from" state and use the individual translate/scale/rotate
   properties, so they compose with an element's own transform. */
@keyframes sw-rise { from { opacity: 0; translate: 0 var(--rise, 12px); } }
@keyframes sw-fade { from { opacity: 0; } }
@keyframes sw-fade-out { to { opacity: 0; } }
@keyframes sw-pop { from { opacity: 0; scale: .94; } }
@keyframes sw-drop { from { opacity: 0; translate: 0 -120%; } }
@keyframes sw-sheet-up { from { translate: 0 100%; } }
@keyframes sw-step-in { from { opacity: 0; translate: 18px 0; } }
@keyframes sw-step-back { from { opacity: 0; translate: -18px 0; } }
@keyframes sw-shake { 20% { translate: -5px 0; } 40% { translate: 4px 0; } 60% { translate: -3px 0; } 80% { translate: 2px 0; } }
@keyframes sw-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes sw-spin { to { rotate: 360deg; } }

.sw-rise { animation: sw-rise var(--sw-dur-slow) var(--sw-out) backwards; animation-delay: calc(var(--d, 0ms) / var(--sw-tempo)); }
.sw-fade { animation: sw-fade var(--sw-dur) var(--sw-out) backwards; animation-delay: calc(var(--d, 0ms) / var(--sw-tempo)); }
.sw-pop { animation: sw-pop var(--sw-dur) var(--sw-pop) backwards; animation-delay: calc(var(--d, 0ms) / var(--sw-tempo)); }
.sw-shake { animation: sw-shake calc(360ms / var(--sw-tempo)) linear; }

/* Staggered rise for a block's children: 60ms steps, capped at 10. */
.sw-stagger > * { animation: sw-rise var(--sw-dur-slow) var(--sw-out) backwards; }
.sw-stagger > :nth-child(2) { animation-delay: calc(60ms / var(--sw-tempo)); }
.sw-stagger > :nth-child(3) { animation-delay: calc(120ms / var(--sw-tempo)); }
.sw-stagger > :nth-child(4) { animation-delay: calc(180ms / var(--sw-tempo)); }
.sw-stagger > :nth-child(5) { animation-delay: calc(240ms / var(--sw-tempo)); }
.sw-stagger > :nth-child(6) { animation-delay: calc(300ms / var(--sw-tempo)); }
.sw-stagger > :nth-child(7) { animation-delay: calc(360ms / var(--sw-tempo)); }
.sw-stagger > :nth-child(8) { animation-delay: calc(420ms / var(--sw-tempo)); }
.sw-stagger > :nth-child(9) { animation-delay: calc(480ms / var(--sw-tempo)); }
.sw-stagger > :nth-child(10) { animation-delay: calc(540ms / var(--sw-tempo)); }
.sw-stagger > :nth-child(n+11) { animation: none; }

/* Press feedback for anything tappable */
.sw-press { transition: scale var(--sw-dur-fast) ease; }
.sw-press:active { scale: .97; }

/* Scroll-driven rise where supported (Safari 26+, Chrome); elsewhere content is simply there. */
@supports (animation-timeline: view()) {
  .sw-scroll-rise { animation: sw-rise linear backwards; animation-timeline: view(); animation-range: entry 0% entry 40%; }
}

/* Route transitions (MainLayout, sw/sw-shell.js). html[data-sw-nav] is push | back | fade | none, set
   when the path changes; the routed page (.sw-route, re-keyed per path) fades in. Opacity only: an
   animated translate or transform, even at 0, makes the page the containing block of its
   position:fixed UI (comment bar, toasts, covers) for the whole run, so that UI would sit in the page
   and then jump to the viewport. "none" is a history swipe or the browser's own back, which already
   drew its own transition. The start opacity is a variable, not one keyframe per kind: a page already
   on screen keeps its animation-name when the attribute changes, so it never replays, and before the
   first navigation it is 1, so the first paint does not fade. The feed and marketplace family (the
   kept-alive layers and .sw-layer--legacy routes) swaps instantly, as it always has. */
@keyframes sw-route { from { opacity: var(--sw-route-o, 1); } }
html[data-sw-nav] { --sw-route-o: 0; }
html[data-sw-nav="none"] { --sw-route-o: 1; }
.sw-route { animation: sw-route var(--sw-dur) var(--sw-glide) backwards; }
.sw-layer--legacy > .sw-route { animation: none; }

/* View Transitions (swUi.vt): pages name the parts that move with view-transition-name. */
::view-transition-group(*) { animation-duration: calc(380ms / var(--sw-tempo)); animation-timing-function: var(--sw-glide); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: calc(240ms / var(--sw-tempo)); }

/* 5b. CELEBRATION ----------------------------------------------------------------------------- */
/* SwCelebration, a race bib: the white .sw-card with four punched corner holes in the ground
   colour, a mono kicker, the Instrument Serif numeral in olive over ONE yellow marker stroke (the
   sheet's only yellow), Inter caption and detail, and an optional rounded-square photo (a shoe, a
   listing). Hosts render it in <SwSheet Haptic="@null"> and call swUi.celebrate, whose flecks fly
   from .sw-burst, a fixed layer on <body> that no sheet can clip: olive and tan, never yellow.
   Under reduced motion the stroke is simply there and no flecks are thrown (the haptic still is). */
@keyframes sw-mark { from { scale: 0 1; } }

.sw-bib {
  --sw-bib-hole: 5px;     /* punched hole radius */
  --sw-bib-at: 14px;      /* hole centre, from each edge */
  display: grid; justify-items: center; gap: 2px; padding: 30px 24px 24px; text-align: center;
  background-repeat: no-repeat;
  background-image:
    radial-gradient(circle at var(--sw-bib-at) var(--sw-bib-at), var(--sw-ground) calc(var(--sw-bib-hole) - .5px), var(--sw-line-2) var(--sw-bib-hole), transparent calc(var(--sw-bib-hole) + .75px)),
    radial-gradient(circle at calc(100% - var(--sw-bib-at)) var(--sw-bib-at), var(--sw-ground) calc(var(--sw-bib-hole) - .5px), var(--sw-line-2) var(--sw-bib-hole), transparent calc(var(--sw-bib-hole) + .75px)),
    radial-gradient(circle at var(--sw-bib-at) calc(100% - var(--sw-bib-at)), var(--sw-ground) calc(var(--sw-bib-hole) - .5px), var(--sw-line-2) var(--sw-bib-hole), transparent calc(var(--sw-bib-hole) + .75px)),
    radial-gradient(circle at calc(100% - var(--sw-bib-at)) calc(100% - var(--sw-bib-at)), var(--sw-ground) calc(var(--sw-bib-hole) - .5px), var(--sw-line-2) var(--sw-bib-hole), transparent calc(var(--sw-bib-hole) + .75px));
}
.sw-bib__media {
  display: grid; place-items: center; width: 72px; height: 72px; margin: 0 0 12px; overflow: hidden;
  border: 1px solid var(--sw-line); border-radius: var(--sw-r-md); background: var(--sw-ground-2); color: var(--sw-olive);
}
.sw-bib__media > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sw-bib__kicker { color: var(--sw-ink-muted); }
.sw-bib__figure { display: inline-flex; align-items: baseline; justify-content: center; gap: 12px; max-width: 100%; margin: 10px 0 8px; }
/* The numeral: .sw-display at 72px. The stroke sits behind the digits inside the numeral's own
   stacking context (isolation), so it never slips under the card. */
.sw-bib__value { position: relative; isolation: isolate; font-size: 72px; line-height: .95; white-space: nowrap; }
.sw-bib__value::before {
  content: ""; position: absolute; z-index: -1; left: -.08em; right: -.08em; bottom: .06em; height: .34em;
  border-radius: .04em .12em .06em .1em; background: var(--sw-yellow); rotate: -1.5deg; transform-origin: 0 50%;
  animation: sw-mark calc(520ms / var(--sw-tempo)) var(--sw-out) calc(140ms / var(--sw-tempo)) backwards;
}
.sw-bib__unit { font: 600 15px/1 var(--sw-font-mono); letter-spacing: var(--sw-tracking-label); text-transform: uppercase; color: var(--sw-ink-muted); }
.sw-bib__caption { margin: 0; font: 600 18px/1.3 var(--sw-font-ui); letter-spacing: var(--sw-tracking); color: var(--sw-ink); text-wrap: balance; }
.sw-bib__detail { margin: 4px 0 0; font: 400 14px/1.4 var(--sw-font-ui); color: var(--sw-ink-muted); text-wrap: pretty; }
/* Up to two more moments from the same check, under a dashed tear-off line. */
.sw-bib__also { display: grid; justify-items: center; gap: 4px; width: 100%; margin: 16px 0 0; padding: 12px 0 0; border-top: 1px dashed var(--sw-line-2); }
.sw-bib__also > ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.sw-bib__also li { display: flex; align-items: center; justify-content: center; gap: 6px; font: 500 13px/1.35 var(--sw-font-ui); color: var(--sw-ink); }
.sw-bib__also li > .sw-icon { color: var(--sw-olive); }

/* swUi.celebrate's layer (position, size and z-index var(--sw-z-toast) are set inline over the
   card's box) and its 14 flecks. */
.sw-burst { overflow: visible; }
.sw-burst__fleck {
  position: absolute; left: 0; top: 0; width: 10px; height: 5px; margin: -2.5px 0 0 -5px;
  border-radius: 1px; background: var(--sw-olive); will-change: transform, opacity;
}
.sw-burst__fleck--tan { background: var(--sw-line-2); }
.sw-burst__fleck--dot { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; }
@media (prefers-reduced-motion: reduce) { .sw-burst { display: none; } }

/* Anchors for packages that add motion CSS in parallel: each adds its rules directly under its
   own anchor line and never edits the three comment lines that follow it, so every package's
   additions land in a separate hunk and merge cleanly. */
/* 5c motion-micro */
/* 5c: (W1-motion-micro) rules go directly above this line, under the anchor. */
/* 5c: these three lines stay untouched: they keep this anchor's hunk apart */
/* 5c: from the next anchor's, so parallel branches merge without conflicts. */
/* Like and save pop (motion-03), all six entry points: heartPop's frames on the individual scale
   property, so the feed heart is frame-for-frame what it was and the pop composes with :active
   press scales. .is-pop goes on only when a tap turns the state on and stays while it's on
   (Helpers/TapPop.cs), so a re-render never replays it. Reduced motion: section 7, no pop. */
@keyframes sw-tap-pop { 25% { scale: 1.3; } 50% { scale: .95; } 75% { scale: 1.1; } }
.sw-tap-pop.is-pop { animation: sw-tap-pop calc(450ms / var(--sw-tempo)) cubic-bezier(.17, .89, .32, 1.28); }
/* Sold stamp (motion-16): the listing page's SOLD badge lands once when the seller marks it sold
   there (ImageCarousel BadgeClass). Base style is the final state; reduced motion just shows it. */
@keyframes sw-stamp { from { opacity: 0; scale: 1.15; rotate: -6deg; } }
.sw-stamp { animation: sw-stamp calc(260ms / var(--sw-tempo)) var(--sw-pop) backwards; }
/* 5d motion-extras */
/* 5d: (W1-motion-extras) rules go directly above this line, under the anchor. */
/* 5d: these three lines stay untouched: they keep this anchor's hunk apart */
/* 5d: from the next anchor's, so parallel branches merge without conflicts. */
/* Easter eggs (features.easterEggs). The 26.2 CLUB / ULTRA tag (motion-20) in the right slot of
   MileageHeroCard's MILES row on RunDetails, the screen's one yellow. */
.sw-egg-tag {
  flex: none; margin: 0 0 6px 8px; padding: 2px 6px; border-radius: var(--sw-r-xs);
  background: var(--sw-yellow); color: var(--sw-olive);
  font: 700 var(--sw-fs-micro)/14px var(--sw-font-mono); letter-spacing: var(--sw-tracking-label);
  text-transform: uppercase; white-space: nowrap;
}
/* The MILES row carries .sw-egg-row only with a tag. The numeral and the tag don't always fit side
   by side (a marathon's 26.2 CLUB on a 320px phone, a 100-mile ULTRA on a 360px one), so the row
   wraps and the tag takes its own line under the numeral, still on the right, instead of spilling
   past the card's edge. When they fit, the 8px gap and the auto margin keep today's layout. */
.sw-egg-row { flex-wrap: wrap; gap: 4px 8px; }
.sw-egg-row > .sw-egg-tag { margin-left: auto; }
/* The long-press flip on your own This year miles (motion-21): sw-ui.js cycles data-sw-face on
   [data-sw-hold]; the marathons and track-laps faces lie over the miles row and swap with an
   opacity fade (instant under reduced motion, section 7). No text selection, no iOS callout:
   holding is the gesture. The miles stay in the accessibility tree; the other faces are hidden
   from it. */
.sw-egg-flip { position: relative; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.sw-egg-flip > * { transition: opacity var(--sw-dur) var(--sw-out); }
.sw-egg-flip__face {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; gap: 8px;
  opacity: 0; pointer-events: none;
}
.sw-egg-flip__num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sw-egg-flip__unit {
  min-width: 0; padding-bottom: 4px; font: 700 12px/14px var(--sw-font-mono); letter-spacing: var(--sw-tracking-label);
  text-transform: uppercase; color: var(--sw-ink-2); text-wrap: balance;
}
.sw-egg-flip[data-sw-face="1"] > :not(.sw-egg-flip__face),
.sw-egg-flip[data-sw-face="2"] > :not(.sw-egg-flip__face) { opacity: 0; }
.sw-egg-flip[data-sw-face="1"] > .sw-egg-flip__face--1,
.sw-egg-flip[data-sw-face="2"] > .sw-egg-flip__face--2 { opacity: 1; }
/* Directional push/back page transitions, a staging trial (motion-23, features.navTransitions).
   sw-shell.js runs a same-document view transition for a push or an in-app back between two
   routed pages when html[data-sw-vt] is set (MainLayout) and the WebView has the API (Safari 18+,
   Chrome); html.sw-vt-running is on while it runs. The root slides 24px with a fade in the
   direction html[data-sw-nav] gives (push: in from the right; back: the reverse). The floating chrome
   (top row, tab pill) gets its own names and no group animation, so it stays put instead of sliding with the page
   snapshot. The routed page's own fade starts at full opacity meanwhile (its variable, not
   animation:none, so the fade can't start late when the class goes), so nothing animates twice.
   Reduced motion: no transition at all (sw-shell.js, and section 7). */
@keyframes sw-vt-out { to { opacity: 0; transform: translateX(-24px); } }
@keyframes sw-vt-in { from { opacity: 0; transform: translateX(24px); } }
@keyframes sw-vt-back-out { to { opacity: 0; transform: translateX(24px); } }
@keyframes sw-vt-back-in { from { opacity: 0; transform: translateX(-24px); } }
html.sw-vt-running[data-sw-nav] { --sw-route-o: 1; }
html.sw-vt-running::view-transition-old(root) { animation: sw-vt-out calc(280ms / var(--sw-tempo)) var(--sw-glide) both; }
html.sw-vt-running::view-transition-new(root) { animation: sw-vt-in calc(280ms / var(--sw-tempo)) var(--sw-glide) both; }
html.sw-vt-running[data-sw-nav="back"]::view-transition-old(root) { animation-name: sw-vt-back-out; }
html.sw-vt-running[data-sw-nav="back"]::view-transition-new(root) { animation-name: sw-vt-back-in; }
html.sw-vt-running .sw-chrome-top { view-transition-name: sw-topbar; }
html.sw-vt-running .sw-tabbar { view-transition-name: sw-tabbar; }
html.sw-vt-running .sw-sidebar { view-transition-name: sw-sidebar; }
html.sw-vt-running::view-transition-group(sw-topbar),
html.sw-vt-running::view-transition-group(sw-tabbar),
html.sw-vt-running::view-transition-group(sw-sidebar) { animation: none; }
/* Back slide trial (features.navBackSlide): html.sw-vt-slide is on with sw-vt-running when sw-shell.js runs
   the transition as iOS's slide, between routed pages and also to and from the kept-alive tabs. Back: the
   page you leave slides off to the right on top, over the one underneath settling in from a quarter
   width left, lifting out of a slight shade. Push: the reverse. Full opacity and normal blending (the
   default plus-lighter would brighten where the two overlap); the bars keep their names and stay put.
   Reduced motion never starts one (sw-shell.js), and section 7 stills any that does. */
@keyframes sw-slide-in { from { transform: translateX(100%); } }
@keyframes sw-slide-out { to { transform: translateX(100%); } }
@keyframes sw-slide-under-in { from { transform: translateX(-25%); filter: brightness(.94); } }
@keyframes sw-slide-under-out { to { transform: translateX(-25%); filter: brightness(.94); } }
html.sw-vt-running.sw-vt-slide::view-transition-group(*) { animation-duration: calc(240ms / var(--sw-tempo)); }
html.sw-vt-running.sw-vt-slide::view-transition-old(root),
html.sw-vt-running.sw-vt-slide::view-transition-new(root) { mix-blend-mode: normal; animation-duration: calc(240ms / var(--sw-tempo)); animation-timing-function: var(--sw-glide); animation-fill-mode: both; }
html.sw-vt-running.sw-vt-slide::view-transition-old(root) { animation-name: sw-slide-under-out; z-index: 0; }
html.sw-vt-running.sw-vt-slide::view-transition-new(root) { animation-name: sw-slide-in; z-index: 1; box-shadow: var(--sw-shadow-pop); }
html.sw-vt-running.sw-vt-slide[data-sw-nav="back"]::view-transition-old(root) { animation-name: sw-slide-out; z-index: 1; box-shadow: var(--sw-shadow-pop); }
html.sw-vt-running.sw-vt-slide[data-sw-nav="back"]::view-transition-new(root) { animation-name: sw-slide-under-in; z-index: 0; box-shadow: none; }
/* 5e market */
/* 5e: (marketplace packages) rules go directly above this line, under the anchor. */
/* 5e: these three lines stay untouched: they keep this anchor's hunk apart */
/* 5e: from the next anchor's, so parallel branches merge without conflicts. */
/* YOU tag (features.marketplaceSizeDefaults): marks the member's size tile in the size pickers.
   .mkt-you's colours on a small tag across the tile's top edge, absolutely placed, so the tile
   keeps its height and the tag never covers the number. No motion. */
.sw-choice.is-you { position: relative; }
.mkt-you-tag {
  position: absolute; top: -7px; right: 6px; padding: 0 5px; border: 1px solid var(--sw-line); border-radius: 6px;
  background: var(--sw-ground-2); font: 500 10px/12px var(--sw-font-mono); letter-spacing: .02em; color: var(--sw-ink);
  pointer-events: none;
}
/* "Add your shoe size" (features.marketplaceSizePrompt): one card row in the In your size rail's
   slot (.sw-surface). The row opens the size sheet; the x hides it on this device. */
.mkt-size-prompt { display: flex; align-items: center; gap: 2px; padding: 4px 6px 4px 4px; }
.mkt-size-prompt__open {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 56px; margin: 0; padding: 8px 10px;
  border: 0; border-radius: 10px; background: none; color: var(--sw-ink); text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mkt-size-prompt__open:active { background: var(--sw-ground-2); }
.mkt-size-prompt__open:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: -2px; }
.mkt-size-prompt__text { flex: 1 1 auto; min-width: 0; }
.mkt-size-prompt__t { display: block; font: 600 15px/20px var(--sw-font-ui); letter-spacing: var(--sw-tracking); color: var(--sw-ink); }
.mkt-size-prompt__act { display: inline-flex; align-items: center; gap: 2px; margin-top: 2px; font: 600 13px/18px var(--sw-font-ui); color: var(--sw-olive); }
/* 5f follow */
/* 5f: (follow packages) rules go directly above this line, under the anchor. */
/* 5f: these three lines stay untouched: they keep this anchor's hunk apart */
/* 5f: from the section below, so parallel branches merge without conflicts. */
/* Follow (features.follow), FollowButton. Compact is .sw-vis__btn's chip: olive, 36px tall, with
   a 44px hit area from the ::after inset (5px past the 1px border); Following (--on) takes the
   --ghost look plus a check. Full (--full) is the profile's 44px, 12px-radius button that fills
   its column beside Message (no side padding, like Message, so flex-1 splits the row evenly):
   Follow olive, Following white with an olive border. In the
   components layer like section 4, so a parent's placement utilities (flex-1, mt-*) still apply.
   The press scale is a transition, which section 7 turns off under reduced motion. */
@layer components {
  .sw-follow {
    position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    min-height: 36px; padding: 0 14px; border: 1px solid var(--sw-olive); border-radius: 25px;
    background: var(--sw-olive); color: var(--sw-on-olive); font: 600 14px/18px var(--sw-font-ui); white-space: nowrap;
    cursor: pointer; -webkit-tap-highlight-color: transparent; transition: scale var(--sw-dur-fast) ease;
  }
  .sw-follow::after { content: ""; position: absolute; inset: -5px 0; }
  .sw-follow:active { scale: .97; }
  .sw-follow:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: 2px; }
  .sw-follow--on { background: var(--sw-card); border-color: var(--sw-line); color: var(--sw-olive); font-size: 13px; }
  .sw-follow--full {
    flex: 1 1 0%; width: 100%; min-height: 44px; padding: 0; border-radius: var(--sw-r-md); gap: 6px;
    font: 600 16px/24px var(--sw-font-ui); letter-spacing: var(--sw-tracking);
  }
  .sw-follow--full::after { content: none; }
  .sw-follow--full.sw-follow--on { border-color: var(--sw-olive); color: var(--sw-ink); font-size: 16px; }
}

/* 6. LEGACY ANIMATIONS ------------------------------------------------------------------------ */
/* Moved here from app.css and MainLayout's inline <style> so every animation lives in one place.
   Frames, durations and fill modes are exactly what shipped (feed and marketplace must not move a
   pixel); only the curve that equals --sw-out is named, and durations now follow --sw-tempo.
   These keep their explicit "to" frames on purpose: the forwards fill is part of how they render. */

/* Centred legacy modals (MainLayout prompts, ContactSellerModal, admin Shoes) */
@keyframes modal-panel-slide-up {
  from { opacity: 0; transform: translateY(1rem); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-modal-backdrop { animation: sw-fade calc(200ms / var(--sw-tempo)) ease-out forwards; }
.animate-modal-panel { animation: modal-panel-slide-up calc(300ms / var(--sw-tempo)) var(--sw-out) forwards; }

/* Header search panel (MainLayout) */
@keyframes searchSlideDown {
  from { opacity: 0; transform: translateY(-100%); }
  to { opacity: 1; transform: translateY(0); }
}
.search-panel-enter { animation: searchSlideDown calc(200ms / var(--sw-tempo)) ease-out forwards; }

/* Bottom-nav create menu (MainLayout): the bloom and its backdrop. Bespoke curves, kept. */
@keyframes createMenuBloom {
  0% { opacity: 0; transform: scale(0) translateY(40px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes createMenuCollapse {
  0% { opacity: 1; transform: scale(1) translateY(0); }
  100% { opacity: 0; transform: scale(0) translateY(40px); }
}
.create-menu-item { animation: createMenuBloom calc(350ms / var(--sw-tempo)) cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.create-menu-item.closing { animation: createMenuCollapse calc(250ms / var(--sw-tempo)) cubic-bezier(0.55, 0, 1, 0.45) both; }
.create-menu-backdrop { animation: sw-fade calc(300ms / var(--sw-tempo)) ease-out both; }
.create-menu-backdrop.closing { animation: sw-fade-out calc(250ms / var(--sw-tempo)) ease-in both; }

/* 6b. MARKETPLACE KIT ----------------------------------------------------------------------- */
/* Sits apart from the feed's section 8 and shares its names wherever both describe the same
   thing: --sw-shadow-tile and --sw-ink-muted are section 1 tokens, and the card shell is the one
   .sw-surface (section 4). The marketplace's anchored popover is .sw-pop-menu; .sw-menu belongs
   to the feed. */
@layer components {
  .sw-label--strong { color: var(--sw-ink-muted); }
  /* Mono section label inside a card: DESCRIPTION, QUESTIONS (2), WATCHING (2). */
  .sw-section-label {
    display: block; margin: 0; font: 700 12px/15px var(--sw-font-mono); letter-spacing: var(--sw-tracking);
    text-transform: uppercase; color: var(--sw-ink-muted);
  }
  /* Field label in a sheet: Inter 12/16 bold caps, 6px above its control. */
  .sw-flabel {
    display: block; margin: 0 0 6px; font: 700 12px/16px var(--sw-font-ui); letter-spacing: -.2px;
    text-transform: uppercase; color: var(--sw-ink-muted);
  }
  .sw-hint { margin: 6px 0 0; font: 500 12px/16px var(--sw-font-ui); color: var(--sw-ink-muted); }
  .sw-hint--ok { display: flex; align-items: center; gap: 6px; color: var(--sw-olive); }
  .sw-hint--error { color: var(--sw-danger); }

  /* Anchored popover menu (MJ's Market_ViewMenu): the view menu, the sort menus, a listing's kebab
     and a saved search's menu. Opens 10px under its trigger inside a position:relative wrapper;
     --end anchors it to the trigger's right edge, --up opens it above. Not .sw-menu: that is the
     feed's fixed, JS-placed panel, and the two must not share rules. */
  .sw-pop-menu {
    position: absolute; z-index: var(--sw-z-popover); top: calc(100% + 10px); left: 0; min-width: 200px; padding: 6px 12px;
    /* The same near-opaque warm white as .sw-menu, so a photo behind can't tint it. */
    border-radius: var(--sw-r-card); background: rgba(255, 253, 250, .96);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: var(--sw-shadow-pop);
    transform-origin: top left; animation: sw-pop calc(180ms / var(--sw-tempo)) var(--sw-out) backwards;
  }
  .sw-pop-menu--end { left: auto; right: 0; transform-origin: top right; }
  .sw-pop-menu--up { top: auto; bottom: calc(100% + 10px); transform-origin: bottom right; }
  .sw-pop-menu__row {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; margin: 0; padding: 0 4px;
    border: 0; border-bottom: .5px solid var(--sw-line-3); background: none; text-align: left; text-decoration: none; cursor: pointer;
    font: 500 15px/1.2 var(--sw-font-ui); letter-spacing: var(--sw-tracking); color: var(--sw-olive-2);
    -webkit-tap-highlight-color: transparent; transition: background-color var(--sw-dur-fast) ease;
  }
  .sw-pop-menu__row:last-child { border-bottom: 0; }
  .sw-pop-menu__row:active { background: var(--sw-olive-wash); }
  .sw-pop-menu__row:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: -2px; border-radius: 6px; }
  .sw-pop-menu__row:disabled { opacity: .45; cursor: default; }
  .sw-pop-menu__row.is-danger { color: var(--sw-danger); }
  .sw-pop-menu__label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sw-pop-menu__check { flex: none; margin-left: auto; color: var(--sw-olive); }
  .sw-pop-menu__sep { height: 6px; margin: 0 -12px 6px; border-bottom: .5px solid var(--sw-line-3); }
  .sw-pop-menu__k {
    margin: 0; padding: 8px 4px 4px; font: 500 11px/14px var(--sw-font-mono); letter-spacing: .06em;
    text-transform: uppercase; color: var(--sw-ink-muted);
  }
  .sw-pop-menu-catch {
    position: fixed; inset: 0; z-index: calc(var(--sw-z-popover) - 1); width: 100%; height: 100%; margin: 0; padding: 0;
    border: 0; background: rgba(0, 0, 0, .08); cursor: default; -webkit-tap-highlight-color: transparent;
    animation: sw-fade calc(180ms / var(--sw-tempo)) ease backwards;
  }
  @media (min-width: 1024px) { .sw-pop-menu-catch { background: transparent; } }

  /* Pills: the view pill (the page's title on phones) and the sort pill. 40px, never collapses.
     The chrome's glass (tokens above; fallback in css/chrome.css), as they stick right under it. */
  .sw-pill {
    position: relative; display: inline-flex; align-items: center; gap: 6px; flex: none; height: 40px; max-width: 100%; padding: 0 12px;
    border: 1px solid var(--sw-glass-edge); border-radius: 25px; background: var(--sw-glass); color: var(--sw-olive-2);
    -webkit-backdrop-filter: var(--sw-glass-fx); backdrop-filter: var(--sw-glass-fx);
    box-shadow: var(--sw-shadow-glass), inset 0 1px 0 var(--sw-glass-sheen);
    font: 500 14px/18px var(--sw-font-ui); letter-spacing: var(--sw-tracking); white-space: nowrap; cursor: pointer;
    -webkit-tap-highlight-color: transparent; transition: scale var(--sw-dur-fast) ease, background-color var(--sw-dur) ease;
  }
  .sw-pill:active { scale: .97; }
  .sw-pill:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: 2px; }
  .sw-pill--view { font-size: 15px; font-weight: 700; }
  .sw-pill--sort { gap: 8px; }
  .sw-pill__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .sw-pill__chev { flex: none; transition: rotate calc(160ms / var(--sw-tempo)) var(--sw-out); }
  .sw-pill[aria-expanded="true"] .sw-pill__chev { rotate: 180deg; }

  /* Liquid-glass circle (filter, alerts, back, kebab), in the chrome's glass. Active = a filter or
     menu is on. */
  .sw-glass-btn {
    position: relative; flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0;
    border: 1px solid var(--sw-glass-edge); border-radius: 50%; color: var(--sw-olive-2); cursor: pointer; text-decoration: none;
    background: var(--sw-glass);
    -webkit-backdrop-filter: var(--sw-glass-fx); backdrop-filter: var(--sw-glass-fx);
    box-shadow: var(--sw-shadow-glass), inset 0 1px 0 var(--sw-glass-sheen);
    -webkit-tap-highlight-color: transparent; transition: scale var(--sw-dur-fast) ease, background-color var(--sw-dur) ease;
  }
  .sw-glass-btn:hover, .sw-glass-btn:visited { color: var(--sw-olive-2); }
  .sw-glass-btn:active { scale: .92; }
  .sw-glass-btn:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: 2px; }
  .sw-glass-btn.is-active, .sw-glass-btn[aria-expanded="true"] {
    background: rgba(55, 60, 43, .18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 2px 8px rgba(0, 0, 0, .10);
  }
  .sw-glass-btn__badge {
    position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
    background: var(--sw-olive); box-shadow: 0 0 0 2px var(--sw-ground); color: #fff; text-align: center;
    font: 700 11px/18px var(--sw-font-ui); letter-spacing: 0; font-variant-numeric: tabular-nums; pointer-events: none;
    animation: sw-pop calc(280ms / var(--sw-tempo)) var(--sw-pop) backwards;
  }

  /* Removable filter chip: the whole chip removes its filter. 32px tall, 44px to the finger. */
  .sw-chip--removable {
    min-height: 32px; height: 32px; padding: 0 8px 0 12px; border-radius: 25px; font-size: 13px; letter-spacing: -.2px; gap: 6px;
  }
  .sw-chip--removable::after { inset: -6px 0; }
  .sw-chip--removable > .sw-icon:last-child { color: var(--sw-ink-muted); }
  .sw-chip--removable.is-leaving { opacity: 0; scale: .9; pointer-events: none; transition: opacity calc(160ms / var(--sw-tempo)) ease, scale calc(160ms / var(--sw-tempo)) ease; }
  .sw-chip--pill { min-height: 32px; height: 32px; border-radius: 25px; }

  /* Choice tile (Ships from, Miles, sizes, ±½): 40px+, olive when on, ink when off. */
  .sw-choice {
    display: inline-flex; align-items: center; justify-content: center; min-width: 0; min-height: 40px; padding: 0 6px;
    border: 1px solid var(--sw-line); border-radius: var(--sw-r-md); background: var(--sw-card); color: var(--sw-ink);
    font: 500 14px/1.2 var(--sw-font-ui); letter-spacing: var(--sw-tracking); white-space: nowrap; cursor: pointer;
    -webkit-tap-highlight-color: transparent; font-variant-numeric: tabular-nums;
    transition: background-color var(--sw-dur) ease, border-color var(--sw-dur) ease, color var(--sw-dur) ease, scale var(--sw-dur-fast) ease;
  }
  .sw-choice:active { scale: .96; }
  .sw-choice:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: 2px; }
  .sw-choice[aria-pressed="true"], .sw-choice[aria-checked="true"], .sw-choice.is-on { border-color: var(--sw-olive); background: var(--sw-olive); color: var(--sw-on-olive); }
  .sw-choice.is-near, .sw-choice.is-between { border-color: var(--sw-line); background: var(--sw-ground-2); color: var(--sw-ink); }
  .sw-choice:disabled { opacity: .45; cursor: default; }
  .sw-choice--lg { min-height: 44px; }
  .sw-choice--tile { min-height: 48px; font-size: 15px; font-weight: 600; }
  .sw-choice__sub { display: block; margin-top: 2px; font-size: 10px; font-weight: 500; color: var(--sw-ink-muted); }
  .sw-choice[aria-pressed="true"] .sw-choice__sub { color: rgba(255, 255, 255, .75); }

  /* Picker row: a field that opens a sub-view (Brand, Size, Status). */
  .sw-picker {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 0 10px 0 12px;
    border: 1px solid var(--sw-line); border-radius: var(--sw-r-md); background: var(--sw-card); color: var(--sw-ink); text-align: left;
    font: 500 16px/1.3 var(--sw-font-ui); letter-spacing: var(--sw-tracking); cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: border-color var(--sw-dur) ease;
  }
  .sw-picker:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: 2px; }
  .sw-picker__value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sw-picker__value.is-empty { color: var(--sw-ink-3); }
  .sw-picker__sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 12px/16px var(--sw-font-ui); color: var(--sw-ink-muted); }
  .sw-picker > .sw-icon:last-child { color: var(--sw-line-3); }
  @media (min-width: 768px) { .sw-picker { font-size: 15px; } }

  /* .sw-input drops the native look, so a select gets its chevron back. */
  select.sw-input {
    padding-right: 34px; cursor: pointer;
    background: var(--sw-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ea796' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 18px 18px;
  }

  /* Switch row on an inset well (Save this search, Alert me). */
  .sw-switch-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px;
    border: 1px solid var(--sw-line); border-radius: var(--sw-r-md); background: var(--sw-ground-2); text-align: left;
  }
  .sw-switch-row.is-off { opacity: .5; }
  .sw-switch-row__t { display: block; font: 600 15px/1.3 var(--sw-font-ui); letter-spacing: var(--sw-tracking); color: var(--sw-ink); }
  .sw-switch-row__s { display: block; font: 500 12px/16px var(--sw-font-ui); color: var(--sw-ink-muted); }

  /* Check row in a picker sub-view (brands, categories, statuses). */
  .sw-check-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 48px; padding: 0;
    border: 0; border-bottom: .5px solid var(--sw-line-3); background: none; text-align: left; cursor: pointer;
    font: 500 15px/1.3 var(--sw-font-ui); letter-spacing: var(--sw-tracking); color: var(--sw-ink); -webkit-tap-highlight-color: transparent;
  }
  .sw-check-row:last-child { border-bottom: 0; }
  .sw-check-row:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: -2px; }
  .sw-check-box {
    flex: none; display: grid; place-items: center; width: 22px; height: 22px; border: 1.5px solid var(--sw-line-2); border-radius: 6px;
    background: var(--sw-card); color: transparent; transition: background-color var(--sw-dur-fast) ease, border-color var(--sw-dur-fast) ease;
  }
  [aria-checked="true"] > .sw-check-box { border-color: var(--sw-olive); background: var(--sw-olive); color: #fff; }
  .sw-check-box--round { border-radius: 50%; }

  /* Inline ring for pull-to-refresh (22px, olive on a sand track). */
  .sw-ring {
    --s: 22px; display: inline-block; flex: none; width: var(--s); height: var(--s); border-radius: 50%;
    border: 2px solid var(--sw-line-2); border-top-color: var(--sw-olive-2);
    animation: sw-spin calc(800ms / var(--sw-tempo)) linear infinite;
  }

  /* SwEmptyState in MJ's form: no icon disc, 120px of air on a page (32px in a sheet). */
  .sw-empty--mj { padding: 120px 24px 0; }
  .sw-sheet .sw-empty--mj, .sw-empty--mj.sw-empty--compact { padding: 32px 12px 8px; }
  .sw-empty--mj .sw-empty__body { max-width: 300px; margin-top: 10px; font: 500 13px/19px var(--sw-font-ui); color: var(--sw-ink-muted); }
  /* The CTA hugs its label as the empty-state CTA (7.4: 14/600, padding 10/18), the same as Feed's,
     with a text button under it when there is one (Alerts_Empty). A filled pair (primary and
     secondary) stacks in a 240px column so the two line up (Market_EmptyFilters, Alerts_NoResults). */
  .sw-empty--mj .sw-empty__actions { flex-direction: column; flex-wrap: nowrap; align-items: center; width: auto; max-width: 100%; gap: 8px; margin-top: 18px; }
  .sw-empty--mj .sw-empty__actions > .sw-btn { min-height: 40px; padding: 10px 18px; font-size: 14px; line-height: 20px; }
  .sw-empty--mj .sw-empty__actions > .sw-btn--ghost { padding: 10px; line-height: 16px; }
  .sw-empty--mj .sw-empty__actions:has(> .sw-btn--secondary) { align-items: stretch; width: 240px; }
  .sw-empty--mj .sw-empty__actions:has(> .sw-btn--secondary) > .sw-btn { width: 100%; min-height: 44px; padding: 0 18px; font-size: 16px; line-height: 1.2; }
}
/* Unlayered: beats MAUI's css/mobile.css h2 size (a section label is often an h2). */
.sw-empty--mj .sw-empty__title { font: 600 16px/21px var(--sw-font-ui); letter-spacing: var(--sw-tracking); }
h2.sw-section-label, h3.sw-section-label { font: 700 12px/15px var(--sw-font-mono); }

/* --- Marketplace --------------------------------------------------------------------------- */
@layer components {
  /* Applied-filter row under the header: one line, scrolls sideways, fades out at the right. */
  .mkt-chiprow {
    display: flex; align-items: center; gap: 8px; height: 44px; margin: -6px 0 6px; padding: 6px 0; overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  .mkt-chiprow::-webkit-scrollbar { display: none; }

  /* A refetch keeps the list on screen, dimmed, until the new one swaps in. */
  .mkt-body { transition: opacity calc(160ms / var(--sw-tempo)) ease; }
  .mkt-body[aria-busy="true"] { opacity: .5; pointer-events: none; }
  /* First page: staggered rise (60ms steps, capped). Appended pages and refetches: a short fade. */
  .mkt-in { animation: sw-rise var(--sw-dur-slow) var(--sw-out) backwards; animation-delay: calc(var(--d, 0ms) / var(--sw-tempo)); }
  .mkt-in--fade { animation: sw-fade calc(200ms / var(--sw-tempo)) var(--sw-out) backwards; }
  .mkt-fade { animation: sw-fade var(--sw-dur) var(--sw-out) backwards; }

  /* Paging footer: same 128px whatever it shows, so nothing shifts. */
  .mkt-more { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 128px; padding: 24px 0; text-align: center; color: var(--sw-olive-2); }
  .mkt-more__text { margin: 0; font: 500 13px/19px var(--sw-font-ui); color: var(--sw-ink-muted); }
  .mkt-end { margin: 0; padding: 32px 0; text-align: center; font: 500 13px/19px var(--sw-font-ui); color: var(--sw-ink-muted); }

  /* Listing-card skeleton: the card's exact geometry. */
  .mkt-skel-card { display: flex; height: 120px; overflow: hidden; }
  .mkt-skel-card .mkt-skel-card__photo { flex: none; width: 120px; height: 120px; border-radius: 0; }
  .mkt-skel-card__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 10px; }
  .mkt-skel-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
  .mkt-skel-card__lines { display: flex; flex-direction: column; gap: 8px; width: 60%; padding-top: 6px; }
  .mkt-skel-card__stats { display: flex; gap: 10px; padding-top: 7px; border-top: 1px solid var(--sw-line); }

  /* Search result row (the listing wizard's shoe and brand pickers). */
  .mkt-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 16px/20px var(--sw-font-ui); letter-spacing: var(--sw-tracking); color: var(--sw-ink); }
  .mkt-result {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 6px 0; border: 0; border-bottom: .5px solid var(--sw-line-3);
    background: none; color: var(--sw-ink); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .mkt-result:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: -2px; }
  .mkt-result__act { flex: none; display: inline-flex; align-items: center; gap: 4px; font: 600 14px/1 var(--sw-font-ui); color: var(--sw-olive); }

  /* Listing detail */
  .mkt-stat__k { margin: 0; font: 500 10px/13px var(--sw-font-mono); color: var(--sw-ink-muted); }
  .mkt-stat__v { margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 16px/18px var(--sw-font-mono); color: var(--sw-ink); }
  .mkt-you { flex: none; border-radius: 6px; background: var(--sw-ground-2); padding: 4px 8px; font: 500 11px/13px var(--sw-font-mono); color: var(--sw-ink); }
  .mkt-safe-link {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px; border: 0; background: none; cursor: pointer;
    font: 600 13px/1 var(--sw-font-ui); color: var(--sw-olive-2); text-decoration: underline; text-underline-offset: 2px;
  }

  /* The marketplace's own sheets (filter, listing wizard) wear SwSheet's chrome and motion. */
  .mkt-sheet { animation: sw-sheet-up calc(320ms / var(--sw-tempo)) var(--sw-glide) backwards; box-shadow: var(--sw-shadow-sheet); }
  .mkt-sheet__scrim { animation: sw-fade calc(320ms / var(--sw-tempo)) ease backwards; }
  .mkt-bars { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 4px; margin-bottom: 16px; }
  .mkt-bars > span { position: relative; height: 3px; overflow: hidden; border-radius: 2px; background: var(--sw-line); }
  .mkt-bars > span::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--sw-olive); transition: width calc(550ms / var(--sw-tempo)) var(--sw-out); }
  .mkt-bars > span.is-done::after { width: 100%; }
}
/* Unlayered: the listing title is an h1 and the card title an h3, which MAUI's css/mobile.css
   would otherwise resize (the h1 to 28px, wrapping long titles onto three lines). */
.mkt-title { margin: 2px 0 0; font: 600 22px/27px var(--sw-font-ui); letter-spacing: var(--sw-tracking); color: var(--sw-ink); overflow-wrap: anywhere; }
.mkt-card-title { margin: 0; font: 600 18px/23px var(--sw-font-ui); letter-spacing: var(--sw-tracking); color: var(--sw-ink); }
/* A listing's ⋯ (MarketplaceListingMenu). The desktop web's top bar is one flat bar across the screen,
   where the ⋯ sat at the far right with no disc, a long way from the listing, and sellers couldn't
   find Delete or Mark as sold (Trello 11/18). From 1024px on the web it sits in the info card beside
   the price instead; phones and the app (any width) keep the top bar's glass disc. Unlayered, like
   .mkt-title. */
.mkt-menu-card { display: none; }
@media (min-width: 1024px) {
  :where(html:not(.sw-app)) .mkt-menu-card { display: block; }
  :where(html:not(.sw-app)) .mkt-menu-bar { display: none; }
}
.mkt-menu-card__btn {
  display: grid; place-items: center; width: 44px; height: 44px; margin: -10px -12px -10px 0; padding: 0; border: 0; border-radius: 50%;
  background: none; color: var(--sw-ink); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--sw-dur-fast) ease;
}
.mkt-menu-card__btn:hover, .mkt-menu-card__btn[aria-expanded="true"] { background: var(--sw-olive-wash); }
.mkt-menu-card__btn:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: -2px; }
@media (min-width: 1024px) {
  .mkt-sheet-host.mkt-web .mkt-sheet { animation: sw-pop calc(260ms / var(--sw-tempo)) var(--sw-out) backwards; }
}
@media (prefers-reduced-motion: reduce) {
  .sw-ring { animation: none !important; }
}

/* 7. REDUCED MOTION --------------------------------------------------------------------------- */
/* The one switch for the whole app. Animations still run, in .01ms and once, so anything that
   ends on a forwards fill lands visible instead of staying hidden. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important;
  }
  .sw-skel, .sw-scroll-rise { animation: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* 8. FEED ------------------------------------------------------------------------------------- */
/* The feed family (Feed_* boards): one card shell for posts, runs, listings, the Get Started card
   and the detail pages; the header, footer, menus, refetch bar, pull to refresh, skeleton and
   states around it. Unlayered on purpose: the titles are h1/h3 and must beat css/mobile.css's
   element sizes in the app, and nothing here should lose to a stray Tailwind utility. */
:root {
  --sw-danger-mj: #b84c41;           /* liked heart, destructive rows, delete button */
  --sw-tan: rgba(171, 148, 126, .98);
  --sw-tile: #f0e9e6;                /* stat tile */
  --sw-fs-card-title: 18px;
  --sw-fs-detail-title: 22px;
  --sw-feed-w: 600px;               /* Feed_Desktop: the feed's column, controls included */
}
/* The controls, hint and progress line share the cards' column on wide screens. The bar must
   stay a direct child of the scrolling layer to stay sticky, so it's narrowed here, not wrapped. */
.feed-layer > .feed-controls-bar { max-width: var(--sw-feed-w); margin-left: auto; margin-right: auto; }
/* Its own rule: a WebView without :has() drops only this one. */
.feed-controls-bar:has(+ .sw-detail-stack) { max-width: var(--sw-feed-w); margin-left: auto; margin-right: auto; }

/* List: every child (announcements, Get Started, cards) on one 12px rhythm */
.sw-feed { max-width: var(--sw-feed-w); margin: 0 auto; padding-top: 4px; transition: opacity var(--sw-dur-fast) ease; }
.sw-feed.is-refetching { opacity: .5; pointer-events: none; }
.sw-feed__list { display: flex; flex-direction: column; gap: 12px; }
.sw-feed__list > * { margin: 0; }
.sw-feed.is-fading { animation: sw-fade calc(200ms / var(--sw-tempo)) var(--sw-out) backwards; }

/* Feed card: the one card shell (.sw-surface, section 4) plus the feed's clip and colour. Markup
   is always class="sw-surface sw-fcard". */
.sw-fcard { display: block; overflow: hidden; color: var(--sw-ink); -webkit-tap-highlight-color: transparent; }
.sw-fcard--tap { cursor: pointer; }
.sw-fcard-in { animation: sw-rise var(--sw-dur) var(--sw-out) backwards; --rise: 8px; animation-delay: calc(var(--d, 0ms) / var(--sw-tempo)); }
.sw-fcard-add { animation: sw-fade var(--sw-dur-fast) var(--sw-out) backwards; }
.sw-fcard__media { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; background: var(--sw-line); overflow: hidden; cursor: pointer; }
.sw-fcard__media > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sw-fcard__media--video { aspect-ratio: auto; cursor: default; background: #000; }
.sw-fcard__media--sold img { filter: grayscale(1); }
.sw-fcard__media--flush { aspect-ratio: auto; cursor: default; background: none; }
@media (min-width: 768px) { .sw-fcard__media { max-height: 360px; } .sw-fcard__media--video, .sw-fcard__media--flush { max-height: none; } }
.sw-fcard__badge {
  position: absolute; left: 12px; bottom: 12px; z-index: 2; padding: 4px 8px; border-radius: 4px; background: var(--sw-olive);
  font: 700 10px/15px var(--sw-font-mono); letter-spacing: var(--sw-tracking); text-transform: uppercase; color: #fff; pointer-events: none;
}
.sw-fcard__count {
  position: absolute; right: 12px; bottom: 12px; z-index: 2; padding: 4px 10px; border-radius: var(--sw-r-pill); background: rgba(0, 0, 0, .6);
  font: 500 12px/16px var(--sw-font-ui); color: #fff; pointer-events: none; font-variant-numeric: tabular-nums;
}
.sw-fcard__body { padding: 14px 14px 0; }
/* A post or run with media (Yowana 11/19): header and title above the media, the words and footer
   below it. The first thing under the media starts at the body's own padding. */
.sw-fcard__body--top { padding-bottom: 12px; }
.sw-fcard__body--after > :first-child { margin-top: 0; }
.sw-fcard__body--after > .sw-fcard__foot:first-child { margin-top: -6px; border-top: 0; }
.sw-fcard__title {
  margin: 10px 0 0; font: 600 var(--sw-fs-card-title)/24px var(--sw-font-head); letter-spacing: var(--sw-tracking);
  color: var(--sw-ink); text-wrap: pretty; overflow-wrap: anywhere;
}
/* A listing's title is Inter on the feed too, as on the marketplace card (MJ #973). */
.sw-fcard__title--listing { font-family: var(--sw-font-ui); }
.sw-fcard__brand { margin: 10px 0 0; font: 700 12px/16px var(--sw-font-mono); letter-spacing: var(--sw-tracking); color: var(--sw-ink); text-transform: uppercase; }
.sw-fcard__brand + .sw-fcard__title { margin-top: 2px; }
.sw-fcard__event + .sw-fcard__title { margin-top: 8px; }
.sw-fcard__text {
  margin: 4px 0 0; font: 400 15px/22px var(--sw-font-ui); color: var(--sw-ink); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.sw-fhead + .sw-fcard__text { margin-top: 10px; }
.sw-fcard__text--2 { -webkit-line-clamp: 2; }
.sw-fcard__date {
  margin-top: 10px; font: 400 10px/12px var(--sw-font-head); letter-spacing: var(--sw-tracking); text-transform: uppercase;
  color: var(--sw-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sw-fcard__strip { margin-top: 6px; }
.sw-fcard__shoe { margin-top: 8px; }
.sw-fcard__foot { margin-top: 12px; border-top: 1px solid var(--sw-line); display: flex; align-items: center; min-height: 44px; }
.sw-fcard__event {
  margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; background: var(--sw-ground-2);
  font: 500 11px/14px var(--sw-font-mono); text-transform: uppercase; color: var(--sw-ink); text-decoration: none;
}
.sw-fcard__event .sw-icon { color: var(--sw-olive-2); }
/* Section card (comments) */
.sw-fcard--section { padding: 14px 14px 6px; }
.sw-fsec-h { margin: 0; font: 700 12px/15px var(--sw-font-mono); letter-spacing: var(--sw-tracking); color: var(--sw-ink-muted); text-transform: uppercase; }

/* Header */
.sw-fhead { display: flex; align-items: center; gap: 10px; }
.sw-fhead__av {
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0;
  background: var(--sw-line); box-shadow: 0 0 0 2px var(--sw-ground); cursor: pointer;
  font: 700 14px/1 var(--sw-font-ui); color: var(--sw-ink); -webkit-tap-highlight-color: transparent;
}
.sw-fhead__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.sw-fhead__name {
  max-width: 100%; margin: 0; padding: 0; border: 0; background: none; text-align: left; cursor: pointer;
  font: 600 15px/20px var(--sw-font-ui); color: var(--sw-olive-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sw-fhead__meta { max-width: 100%; font: 500 13px/18px var(--sw-font-ui); color: var(--sw-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-fhead__pill {
  flex: none; align-self: flex-start; margin-top: 2px; padding: 4px 10px; border: 1px solid rgba(171, 148, 126, .6); border-radius: var(--sw-r-pill);
  font: 600 10px/15px var(--sw-font-ui); letter-spacing: .025em; text-transform: uppercase; color: var(--sw-olive-2);
}

/* Footer controls: every one a 44px target */
.sw-fbtn {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 44px; margin: 0; padding: 0 10px; border: 0; background: none;
  color: var(--sw-ink-muted); font: 600 14px/20px var(--sw-font-ui); font-variant-numeric: tabular-nums; cursor: pointer;
  -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;
}
.sw-fbtn:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: -4px; border-radius: 10px; }
.sw-fbtn--heart { padding: 0 6px 0 0; transition: color var(--sw-dur-fast) ease, scale var(--sw-dur-fast) ease; }
.sw-fbtn--heart:active { scale: .92; }
.sw-fbtn--heart[aria-pressed="true"] { color: var(--sw-danger-mj); }
.sw-fbtn--heart[aria-pressed="true"] .sw-icon { fill: var(--sw-danger-mj); }
.sw-fbtn--heart.is-pop .sw-icon { animation: sw-tap-pop calc(450ms / var(--sw-tempo)) cubic-bezier(.17, .89, .32, 1.28); }
.sw-fbtn--count { padding: 0 10px 0 0; }
.sw-fbtn--lead { padding-left: 0; }
.sw-fbtn__avs { display: inline-flex; margin-left: 2px; }
.sw-fbtn__avs img { width: 20px; height: 20px; box-sizing: border-box; border: 1.5px solid #fff; background: var(--sw-line); }
.sw-fbtn__avs > * + * { margin-left: -6px; }
.sw-fbtn--icon { width: 44px; justify-content: center; padding: 0; }
.sw-fbtn--more { width: 44px; justify-content: center; padding: 0; margin-right: -12px; }
.sw-fspacer { flex: 1 1 auto; }

/* Reactions (features.reactions; Components/Likes/ReactionScope, ReactionSummary, sw-ui.js [data-sw-react]).
   The like button's wrapper: a long press opens the picker, so no text selection, no iOS callout and
   no double-tap zoom on it. */
.sw-react { position: relative; display: inline-flex; align-items: center; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
.sw-react > button { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.sw-react--text { vertical-align: middle; }
.sw-fbtn__emoji, .sw-react-emoji { display: block; font-size: 20px; line-height: 1; }
.sw-fbtn--heart.is-pop .sw-fbtn__emoji { animation: sw-tap-pop calc(450ms / var(--sw-tempo)) cubic-bezier(.17, .89, .32, 1.28); }
/* The picker: a glass pill of six reactions fixed over the button (swUi.reactShow places it and sets
   its transform origin), springing up with each reaction rising a beat after the last. The catcher
   under it takes the tap that closes it (and Android back, data-back-close). It opens under the finger
   that is still holding the button, so it can't be selected or called out either: iOS's own long-press
   selection, which comes a beat after the picker, landed on it and highlighted the whole page (Phil 11/27).
   sw-ui.js also stops any selection that starts while a press on the button or the picker is live. */
.sw-react-catch {
  position: fixed; inset: 0; z-index: calc(var(--sw-z-popover) - 1); background: transparent; -webkit-tap-highlight-color: transparent; touch-action: none;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
}
.sw-react-tray {
  position: fixed; z-index: var(--sw-z-popover); left: 0; top: 0; display: flex; gap: 2px; padding: 5px;
  border: 1px solid var(--sw-glass-edge); border-radius: var(--sw-r-pill); background: var(--sw-glass-solid); box-shadow: var(--sw-shadow-glass);
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
  animation: sw-react-in calc(260ms / var(--sw-tempo)) var(--sw-pop) backwards;
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .sw-react-tray { background: var(--sw-glass); -webkit-backdrop-filter: var(--sw-glass-fx); backdrop-filter: var(--sw-glass-fx); }
}
@keyframes sw-react-in { from { opacity: 0; scale: .6; } }
.sw-react-tray:not([data-placed]) { visibility: hidden; }  /* until reactShow has placed it */
.sw-react-tray__opt {
  position: relative; display: grid; place-items: center; width: 42px; height: 42px; margin: 0; padding: 0; border: 0; border-radius: 50%;
  background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; --rise: 10px;
  animation: sw-rise calc(320ms / var(--sw-tempo)) var(--sw-pop) backwards; animation-delay: calc(var(--i, 0) * 28ms / var(--sw-tempo));
  transition: scale var(--sw-dur-fast) var(--sw-pop), background-color var(--sw-dur-fast) ease;
}
.sw-react-tray__emoji { display: block; font-size: 26px; line-height: 1; }
.sw-react-tray__opt:active { scale: 1.25; }
@media (hover: hover) { .sw-react-tray__opt:hover { scale: 1.18; } }
.sw-react-tray__opt.is-on { background: var(--sw-olive-wash); box-shadow: inset 0 0 0 1.5px var(--sw-olive-line); }
.sw-react-tray__opt:focus { outline: none; }
.sw-react-tray__opt:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: 1px; }
/* Its name over a reaction while it's hovered, pressed or focused from the keyboard. */
.sw-react-tray__label {
  position: absolute; left: 50%; bottom: calc(100% + 6px); translate: -50% 0; padding: 3px 8px; border-radius: var(--sw-r-pill);
  background: var(--sw-olive); color: var(--sw-on-olive); font: 600 11px/14px var(--sw-font-ui); letter-spacing: .01em; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity var(--sw-dur-fast) ease;
}
.sw-react-tray__opt:active .sw-react-tray__label, .sw-react-tray__opt:focus-visible .sw-react-tray__label { opacity: 1; }
@media (hover: hover) {
  .sw-react-tray__opt:hover .sw-react-tray__label { opacity: 1; }
  /* One name at a time: the pointer's wins over the keyboard's. */
  .sw-react-tray:hover .sw-react-tray__opt:not(:hover) .sw-react-tray__label { opacity: 0; }
}
/* A summary: the top types as overlapping discs before the total. */
.sw-react-sum { display: inline-flex; align-items: center; }
.sw-react-sum__dot {
  position: relative; display: grid; place-items: center; width: 22px; height: 22px; box-sizing: border-box; border-radius: 50%;
  background: var(--sw-card); box-shadow: 0 0 0 1.5px var(--sw-card), 0 0 0 2px var(--sw-line); font-size: 13px; line-height: 1;
}
/* The most-used on top. */
.sw-react-sum__dot:nth-child(1) { z-index: 3; }
.sw-react-sum__dot:nth-child(2) { z-index: 2; }
.sw-react-sum__dot + .sw-react-sum__dot { margin-left: -6px; }
.sw-react-sum--sm .sw-react-sum__dot { width: 18px; height: 18px; font-size: 11px; }
.sw-react-sum--sm .sw-react-sum__dot + .sw-react-sum__dot { margin-left: -5px; }
.sw-react-sum--sm { margin-right: 3px; vertical-align: middle; }
.sw-liker__react { flex: none; font-size: 20px; line-height: 1; }
/* ReactionIcon: the drawn reactions (a 40x40 disc at 1em). Bigger than the emoji they replace, which sat inside their glyph box. */
.sw-ricon { display: block; flex: none; }
.sw-fbtn__emoji.sw-ricon, .sw-react-emoji .sw-ricon { width: 22px; height: 22px; }
.sw-react-tray__emoji.sw-ricon { width: 34px; height: 34px; }
.sw-react-sum__dot .sw-ricon { width: 100%; height: 100%; }
.sw-liker__react .sw-ricon { width: 22px; height: 22px; }
.sw-ricon--text { display: inline-block; width: 1.4em; height: 1.4em; vertical-align: -0.38em; margin-right: 4px; }

/* Post extras: review chip, link preview */
.sw-fchip {
  margin-top: 10px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--sw-ground-2);
  color: var(--sw-ink); text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.sw-fchip:hover, .sw-fchip:visited { color: var(--sw-ink); }
.sw-fchip__thumb { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; overflow: hidden; background: #fff; color: var(--sw-ink-muted); }
.sw-fchip__thumb img { width: 100%; height: 100%; object-fit: contain; }
.sw-fchip__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.sw-fchip__k { font: 700 10px/13px var(--sw-font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--sw-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-fchip__t { font: 600 14px/20px var(--sw-font-ui); color: var(--sw-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-fchip__chev { flex: none; color: var(--sw-line-3); }
.sw-flink {
  margin-top: 10px; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: var(--sw-ground-2);
  color: var(--sw-ink); text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.sw-flink:hover, .sw-flink:visited { color: var(--sw-ink); }
.sw-flink__thumb { flex: none; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--sw-line); }
.sw-flink__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sw-flink__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-right: 4px; }
.sw-flink__k { display: flex; align-items: center; gap: 4px; font: 700 10px/13px var(--sw-font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--sw-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-flink__t { font: 600 14px/19px var(--sw-font-ui); color: var(--sw-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }

/* Listing stats row */
.sw-fstats { margin-top: 10px; display: flex; border-top: 1px solid var(--sw-line-2); padding-top: 6px; white-space: nowrap; letter-spacing: var(--sw-tracking); color: var(--sw-ink); font-family: var(--sw-font-mono); }
.sw-fstats__col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 5px; padding: 0 4px 0 6px; border-right: .5px solid var(--sw-line-2); }
.sw-fstats__col:first-child { padding-left: 0; }
.sw-fstats__col:last-child { border-right: 0; padding-right: 0; }
.sw-fstats__k { margin: 0; font: 500 10px/10px var(--sw-font-mono); color: var(--sw-ink-muted); }
.sw-fstats__v { margin: 0; display: flex; align-items: flex-end; gap: 5px; min-width: 0; }
.sw-fstats__n { font: 700 16px/16px var(--sw-font-mono); overflow: hidden; text-overflow: ellipsis; }
.sw-fstats__u { flex: none; font: 500 10px/16px var(--sw-font-mono); }

/* Announcement banner (and its photo variant) */
.sw-fann {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 44px; box-sizing: border-box; padding: 0 14px; margin: 0; border: 0;
  border-radius: var(--sw-r-card); background: var(--sw-olive); color: #f6f3e6; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.sw-fann__pin { flex: none; color: rgba(246, 243, 230, .7); }
.sw-fann__t { flex: 1 1 auto; min-width: 0; font: 600 14px/20px var(--sw-font-ui); color: #f6f3e6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-fann__chev { flex: none; color: rgba(246, 243, 230, .6); }
.sw-fann-photo { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--sw-r-card); overflow: hidden; background: var(--sw-olive); box-shadow: var(--sw-shadow-tile); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sw-fann-photo__img { display: block; width: 100%; aspect-ratio: 16 / 9; background: rgba(55, 60, 43, .4); }
.sw-fann-photo__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sw-fann-photo .sw-fann { border-radius: 0; }

/* Delete-failed notice at the bottom of a card */
.sw-fnotice { display: flex; align-items: center; gap: 10px; padding: 0 14px; background: var(--sw-ground-2); border-top: 1px solid var(--sw-line); }
.sw-fnotice > .sw-icon { color: var(--sw-danger-mj); }
.sw-fnotice__t { flex: 1 1 auto; min-width: 0; padding: 10px 0; font: 500 13px/18px var(--sw-font-ui); color: var(--sw-ink); }

/* Text link button ("Try again", "Show all"): underlined olive, 44px tall by padding */
.sw-flinkbtn {
  flex: none; margin: 0; padding: 13px 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  font: 600 13px/18px var(--sw-font-ui); color: var(--sw-olive); text-decoration: underline; text-underline-offset: 2px;
}
.sw-flinkbtn:disabled { opacity: .5; cursor: default; }

/* Controls bar (Feed and PageActionsBar), the filter dot, the hint row and the refetch bar */
.sw-glass-dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--sw-olive); box-shadow: 0 0 0 2px #fff; pointer-events: none; }
.sw-glass-on, .sw-glass-on:active { background: rgba(55, 60, 43, .12); box-shadow: inset 0 0 0 1px rgba(55, 60, 43, .18); }
.sw-sort-chev { transition: rotate var(--sw-dur-fast) ease; }
.sw-sort-chev.is-open { rotate: 180deg; }
.sw-fhint { display: flex; align-items: center; flex-wrap: wrap; gap: 0 6px; max-width: var(--sw-feed-w); margin: -10px auto -6px; padding: 0 2px; font: 500 13px/18px var(--sw-font-ui); color: var(--sw-ink-muted); }
.sw-fhint b { font-weight: 600; color: var(--sw-ink); }
.sw-fprogress { position: relative; height: 2px; max-width: calc(var(--sw-feed-w) - 4px); margin: 6px auto 2px; border-radius: 2px; background: var(--sw-line); overflow: hidden; }
.sw-fprogress::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 38%; border-radius: 2px; background: var(--sw-olive);
  animation: sw-fslide calc(1100ms / var(--sw-tempo)) linear infinite;
}
@keyframes sw-fslide { from { translate: -100% 0; } to { translate: 265% 0; } }

/* Menus: one thick-glass panel for the sort, the filter and every kebab. Fixed and placed by
   feedControls.js against its trigger, so no card's overflow can clip it. */
.sw-menu-catch { position: fixed; inset: 0; z-index: 59; background: transparent; -webkit-tap-highlight-color: transparent; }
.sw-menu {
  position: fixed; z-index: 60; top: 0; left: 0; min-width: 208px; max-width: min(300px, calc(100vw - 24px)); overflow: hidden; border-radius: 12px;
  /* Near-opaque warm white with no saturation boost, so a photo behind never tints the panel. */
  background: rgba(255, 253, 250, .96);
  -webkit-backdrop-filter: blur(30px) saturate(100%); backdrop-filter: blur(30px) saturate(100%); border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -1px 0 rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .08);
  text-align: left; outline: none;
}
.sw-menu:not([data-placed]) { visibility: hidden; }
.sw-menu[data-placed] { animation: sw-pop var(--sw-dur-fast) var(--sw-out) backwards; }
.sw-menu__k { margin: 0; padding: 12px 16px 4px; font: 700 11px/14px var(--sw-font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--sw-ink-muted); }
.sw-menu__row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; box-sizing: border-box; margin: 0; padding: 10px 16px;
  border: 0; border-top: 1px solid rgba(229, 224, 216, .4); background: none; color: var(--sw-olive-2); text-align: left; cursor: pointer;
  font: 500 14px/20px var(--sw-font-ui); -webkit-tap-highlight-color: transparent; transition: background-color var(--sw-dur-fast) ease;
}
.sw-menu__row:first-child, .sw-menu__k + .sw-menu__row { border-top: 0; }
.sw-menu__row:active { background: rgba(63, 69, 49, .08); }
@media (hover: hover) { .sw-menu__row:hover:not(:disabled):not([aria-disabled="true"]) { background: rgba(0, 0, 0, .04); } }
.sw-menu__row:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: -2px; }
.sw-menu__row.is-selected { background: rgba(63, 69, 49, .06); font-weight: 600; }
.sw-menu__row.is-danger { color: var(--sw-danger-mj); }
.sw-menu__row[aria-disabled="true"], .sw-menu__row:disabled { opacity: .45; cursor: default; }
.sw-menu__main { flex: 1 1 auto; min-width: 0; }
.sw-menu__label { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-menu__sub { display: block; margin-top: 1px; font: 500 12px/16px var(--sw-font-ui); color: var(--sw-ink-muted); white-space: normal; }
.sw-menu__check { flex: none; color: var(--sw-olive-2); }
.sw-menu__box { flex: none; display: block; }
.sw-menu__foot { margin: 0; padding: 10px 16px 12px; border-top: 1px solid rgba(229, 224, 216, .4); font: 500 12px/16px var(--sw-font-ui); color: var(--sw-ink-muted); }
/* Plain kebab trigger (comments): 32px glyph box with a 44px target */
.sw-kebab { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; background: none; color: var(--sw-ink-muted); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sw-kebab::after { content: ""; position: absolute; inset: -6px; }

/* Pull to refresh: a floating disc under the top chrome; nothing in the flow moves */
.sw-ptr {
  position: fixed; z-index: 45; left: 50%; top: 0; width: 40px; height: 40px; margin-left: -20px; border-radius: 50%; background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .14); display: grid; place-items: center; opacity: 0; pointer-events: none; visibility: hidden;
}
.sw-ptr.is-on { visibility: visible; }
.sw-ptr.is-settling { transition: translate var(--sw-dur) var(--sw-out), opacity var(--sw-dur) ease; }
.sw-ptr__arrow { transition: rotate var(--sw-dur-fast) var(--sw-pop); transform-origin: 13px 13px; transform-box: view-box; }
.sw-ptr.is-armed .sw-ptr__arrow { rotate: 180deg; }
.sw-ptr.is-busy .sw-ptr__arrow { opacity: 0; }
.sw-ptr.is-busy .sw-ptr__svg { animation: sw-spin calc(800ms / var(--sw-tempo)) linear infinite; }

/* "N new" pill after a background refresh while scrolled down */
.sw-newpill {
  position: fixed; z-index: 45; left: 50%; translate: -50% 0; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 12px;
  border: 0; border-radius: var(--sw-r-pill); background: var(--sw-olive); color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
  font: 600 13px/18px var(--sw-font-ui); cursor: pointer; animation: sw-pop var(--sw-dur) var(--sw-pop) backwards; -webkit-tap-highlight-color: transparent;
}

/* First-load skeleton: blocks in the page ground inside the white card */
.sw-fskel-media { display: block; height: 180px; border-radius: 0 !important; }
.sw-fskel-row { display: flex; align-items: center; gap: 10px; }
.sw-fskel-foot { margin-top: 14px; height: 44px; border-top: 1px solid var(--sw-line); display: flex; align-items: center; gap: 18px; }
.sw-fcard .sw-skel { background-image: linear-gradient(90deg, var(--sw-ground) 25%, var(--sw-ground-2) 50%, var(--sw-ground) 75%); }

/* States: empty, error, signed out, filtered, detail not found */
.sw-fempty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 96px 24px 0; text-align: center; }
.sw-fempty--tight { padding-top: 72px; }
.sw-fempty__icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 4px; border: 1px solid var(--sw-line); border-radius: 50%; background: #fff; color: var(--sw-olive-2); }
.sw-fempty__t { margin: 0; font: 600 16px/22px var(--sw-font-ui); letter-spacing: var(--sw-tracking); color: var(--sw-ink); }
.sw-fempty__b { margin: 0; max-width: 280px; font: 500 13px/19px var(--sw-font-ui); color: var(--sw-ink-muted); text-wrap: pretty; }
.sw-fcta {
  margin-top: 8px; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 12px; background: var(--sw-olive); color: #fff; cursor: pointer;
  font: 600 14px/20px var(--sw-font-ui); -webkit-tap-highlight-color: transparent; transition: scale var(--sw-dur-fast) ease;
}
.sw-fcta:active { scale: .97; }
.sw-fcta:disabled { opacity: .5; cursor: default; }
.sw-fend { display: flex; align-items: center; gap: 12px; padding: 12px 4px 0; font: 500 13px/18px var(--sw-font-ui); color: var(--sw-ink-muted); }
.sw-fend::before, .sw-fend::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--sw-line-2); opacity: .6; }
.sw-fmore { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 0; }
.sw-fmore__t { margin: 0; font: 500 13px/18px var(--sw-font-ui); color: var(--sw-ink-muted); }
.sw-fmore .sw-flinkbtn { padding: 12px 16px; font-size: 14px; }

/* Detail pages (post, run): same shell, a bigger title, the full body */
.sw-detail-stack { display: flex; flex-direction: column; gap: 12px; max-width: var(--sw-feed-w); margin: 0 auto; padding: 4px 0 16px; }
.sw-detail-title { margin: 12px 0 0; font: 600 var(--sw-fs-detail-title)/28px var(--sw-font-head); letter-spacing: var(--sw-tracking); color: var(--sw-ink); text-wrap: pretty; overflow-wrap: anywhere; }
.sw-detail-text { margin-top: 8px; font: 400 16px/25px var(--sw-font-ui); color: var(--sw-ink); overflow-wrap: anywhere; }
.sw-detail-label { margin-top: 12px; font: 400 10px/12px var(--sw-font-head); letter-spacing: var(--sw-tracking); text-transform: uppercase; color: var(--sw-ink-muted); }
.sw-vis { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; }
.sw-vis > .sw-icon { color: var(--sw-ink-muted); }
.sw-vis--shared > .sw-icon { color: var(--sw-olive); }
.sw-vis__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.sw-vis__t { font: 600 14px/19px var(--sw-font-ui); color: var(--sw-ink); }
.sw-vis__s { font: 500 12px/16px var(--sw-font-ui); color: var(--sw-ink-muted); }
.sw-vis__btn { flex: none; min-height: 36px; padding: 0 14px; border: 0; border-radius: 25px; background: var(--sw-olive); color: #fff; font: 600 14px/18px var(--sw-font-ui); cursor: pointer; }
.sw-vis__btn--ghost { background: #fff; border: 1px solid var(--sw-line); color: var(--sw-olive); font-size: 13px; }

/* Comments (CommentItem) */
.sw-cmt { display: flex; gap: 10px; padding: 10px 0; }
.sw-cmt__av { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; background: var(--sw-line); font: 700 10px/1 var(--sw-font-ui); color: var(--sw-ink); cursor: pointer; }
.sw-cmt__body { flex: 1 1 auto; min-width: 0; }
.sw-cmt__head { display: flex; align-items: center; gap: 6px; min-height: 20px; }
.sw-cmt__name { min-width: 0; margin: 0; padding: 0; border: 0; background: none; font: 600 14px/20px var(--sw-font-ui); color: var(--sw-olive-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; text-align: left; }
.sw-cmt__meta { flex: none; font: 500 12px/16px var(--sw-font-ui); color: var(--sw-ink-muted); }
/* Tag chip after the name ("SELLER" on a listing's Questions). */
.sw-cmt__tag { flex: none; border-radius: 4px; background: #F5F2EF; padding: 1px 5px; font: 700 10px/14px var(--sw-font-mono); text-transform: uppercase; color: #2D2D2D; }
.sw-cmt__text { margin-top: 2px; font: 400 15px/22px var(--sw-font-ui); color: var(--sw-ink); overflow-wrap: anywhere; }
.sw-cmt__acts { display: flex; align-items: center; gap: 16px; margin-top: 2px; min-height: 32px; }
.sw-cmt__act { margin: 0; padding: 8px 0; border: 0; background: none; cursor: pointer; font: 600 12px/16px var(--sw-font-ui); letter-spacing: .02em; text-transform: uppercase; color: var(--sw-ink-muted); -webkit-tap-highlight-color: transparent; }
.sw-cmt__act[aria-pressed="true"] { color: var(--sw-danger-mj); }
.sw-cmt__likes { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; text-transform: none; letter-spacing: 0; }
.sw-cmt__likes .sw-icon { color: var(--sw-danger-mj); fill: var(--sw-danger-mj); }
.sw-cmt__kebab { margin: -6px -8px -6px 0; }

/* Likers sheet rows */
.sw-liker { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 0; margin: 0; border: 0; border-top: .5px solid var(--sw-line-3); background: none; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sw-liker:first-child { border-top: 0; }
.sw-liker__av { display: grid; place-items: center; width: 40px; height: 40px; background: var(--sw-line); font: 700 14px/1 var(--sw-font-ui); color: var(--sw-ink); }
.sw-liker__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.sw-liker__n { font: 600 15px/20px var(--sw-font-ui); letter-spacing: var(--sw-tracking); color: var(--sw-olive-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-liker__s { font: 500 12px/16px var(--sw-font-ui); color: var(--sw-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-liker__chev { flex: none; color: var(--sw-line-3); }

/* Composer (Feed_Composer) and share sheet field labels */
.sw-composer__label { display: block; font: 700 12px/26px var(--sw-font-ui); letter-spacing: var(--sw-tracking); color: var(--sw-ink-muted); }
.sw-composer .sw-sheet__body { padding: 12px 12px 30px; }
/* Composer's reviewed-shoe row (Feed_Composer) and its picker sheet (Feed_ComposerShoe) */
.sw-pickrow {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; margin: 0; padding: 9px 10px; box-sizing: border-box;
  border: 1px solid var(--sw-line); border-radius: 12px; background: var(--sw-card); text-align: left; cursor: pointer;
  font: 500 15px/26px var(--sw-font-ui); letter-spacing: var(--sw-tracking); color: var(--sw-ink-muted);
  -webkit-tap-highlight-color: transparent; transition: border-color calc(160ms / var(--sw-tempo)) var(--sw-out);
}
.sw-pickrow:active { border-color: var(--sw-line-2); }
.sw-pickrow__label { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-pickrow__chev { flex: none; color: var(--sw-ink-3); }
.sw-pickrow--set { cursor: default; padding-right: 4px; color: var(--sw-ink); }
.sw-pickrow--set > .sw-icon:first-child { flex: none; color: var(--sw-olive); }
.sw-pickrow__open { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; margin: 0; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.sw-pickrow__brand { font: 700 11px/14px var(--sw-font-mono); letter-spacing: var(--sw-tracking); text-transform: uppercase; color: var(--sw-ink-muted); }
.sw-pickrow__name { font: 600 15px/20px var(--sw-font-ui); letter-spacing: var(--sw-tracking); color: var(--sw-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-shoepick { display: flex; flex-direction: column; gap: 10px; max-width: 420px; margin: 0 auto; }
.sw-shoepick__search {
  display: flex; align-items: center; gap: 8px; padding: 0 8px 0 12px; border: 1px solid var(--sw-ink-muted); border-radius: 12px; background: var(--sw-card); color: var(--sw-ink-muted);
}
.sw-shoepick__search:focus-within { border-color: var(--sw-olive); }
.sw-shoepick__search input { flex: 1 1 auto; min-width: 0; height: 44px; margin: 0; padding: 0; border: 0; outline: 0; background: transparent; font: 500 16px/24px var(--sw-font-ui); color: var(--sw-ink); }
.sw-shoepick__search input::placeholder { color: var(--sw-ink-3); }
.sw-shoepick__clear { flex: none; position: relative; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: var(--sw-line); color: var(--sw-ink); cursor: pointer; }
.sw-shoepick__clear::after { content: ""; position: absolute; inset: -11px; }
.sw-shoepick__h { margin: 6px 0 0; font: 700 12px/15px var(--sw-font-mono); letter-spacing: var(--sw-tracking); text-transform: uppercase; color: var(--sw-ink-muted); }
.sw-shoepick__note { margin: 4px 0 0; font: 500 14px/20px var(--sw-font-ui); color: var(--sw-ink-muted); }
.sw-shoepick__card {
  display: flex; align-items: center; gap: 10px; width: 100%; margin: 0; padding: 10px; box-sizing: border-box; border: 1px solid var(--sw-line); border-radius: 12px;
  background: var(--sw-card); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color calc(160ms / var(--sw-tempo)) var(--sw-out);
}
.sw-shoepick__card[aria-checked="true"] { border-color: var(--sw-olive); }
.sw-shoepick__img { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--sw-ground-2); color: var(--sw-ink-muted); }
.sw-shoepick__img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sw-shoepick__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.sw-shoepick__brand { font: 700 12px/16px var(--sw-font-mono); letter-spacing: var(--sw-tracking); text-transform: uppercase; color: var(--sw-ink); }
.sw-shoepick__name { font: 600 16px/20px var(--sw-font-ui); letter-spacing: var(--sw-tracking); color: var(--sw-ink); overflow-wrap: anywhere; }
.sw-shoepick__meta { font: 500 12px/16px var(--sw-font-ui); color: var(--sw-ink-muted); }
.sw-shoepick__radio { flex: none; display: grid; place-items: center; width: 20px; height: 20px; box-sizing: border-box; border: 1px solid var(--sw-line-2); border-radius: 50%; color: #fff; }
.sw-shoepick__card[aria-checked="true"] .sw-shoepick__radio { border-color: var(--sw-olive); background: var(--sw-olive); }
.sw-shoepick-sheet .sw-sheet__foot { gap: 30px; }
/* The comments card clears the sticky back row when a #comments link lands on it. Under the floating
   chrome there is no back row (PageActionsBar's disc is in the chrome) and the layer's scroll-padding
   already clears the chrome (app.css, APP SHELL), so the card only needs a little air. */
.sw-fcard--section[id] { scroll-margin-top: 64px; }
.sw-main--bar .sw-fcard--section[id] { scroll-margin-top: 12px; }

/* Notifications (NotificationBell, Alerts_Notifications): the bell's dot, then the sheet's tabs and
   rows. Inbox-row language: 44px photo, 14/600 line over a 13/500 muted line, time and an 8px
   #507A2A dot on the right, 0.4 hairlines between rows. */
.sw-nb__bell-dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: #507A2A; box-shadow: 0 0 0 2px #fff; }
.sw-nb { min-height: 100%; letter-spacing: var(--sw-tracking); }
.sw-nb__tabs { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; padding: 0 8px; border-bottom: .5px solid var(--sw-line-2); background: #fff; }
.sw-nb__tab { position: relative; flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; margin: 0; padding: 10px 4px; border: 0; background: none; cursor: pointer; font: 600 14px/18px var(--sw-font-ui); letter-spacing: var(--sw-tracking); color: var(--sw-ink-muted); -webkit-tap-highlight-color: transparent; }
.sw-nb__tab[aria-selected="true"] { color: var(--sw-ink); }
.sw-nb__tab[aria-selected="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--sw-olive); }
.sw-nb__count { border-radius: 10px; background: var(--sw-line); padding: 1px 6px; font: 600 11px/15px var(--sw-font-ui); letter-spacing: 0; color: var(--sw-ink); }
.sw-nb__tab[aria-selected="true"] .sw-nb__count { background: var(--sw-olive); color: #fff; }
.sw-nb__gear { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; background: none; color: var(--sw-ink-muted); cursor: pointer; }
.sw-nb__list { padding: 0 16px 24px; }
.sw-nb__day { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; min-height: 20px; }
.sw-nb__day + .sw-nb__row { margin-top: 0; }
.sw-nb__daylabel { margin: 0; font: 500 11px/14px var(--sw-font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--sw-ink-muted); }
.sw-nb__markread { position: relative; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; font: 600 14px/16px var(--sw-font-ui); letter-spacing: var(--sw-tracking); color: var(--sw-olive); }
.sw-nb__markread::after { content: ""; position: absolute; inset: -12px -8px; }
.sw-nb__row { display: flex; align-items: flex-start; gap: 12px; width: 100%; margin: 0; padding: 12px 0; border: 0; border-bottom: 1px solid rgba(229, 223, 217, .4); background: none; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sw-nb__thumb { position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--sw-ground-2); color: var(--sw-ink-muted); }
/* A person (photo or initial) is a circle; marketplace / bell icons keep the rounded square. No overflow:hidden here, the badge
   hangs off the corner, so the photo carries the radius. Pinned to the box: as a grid item in an auto-sized row, height:100%
   fell back to the photo's own ratio, so portrait avatars grew tall (4db950d4). */
.sw-nb__thumb--person { border-radius: 50%; }
.sw-nb__thumb > img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; display: block; }
.sw-nb__initial { font: 600 16px/1 var(--sw-font-ui); color: var(--sw-olive-2); }
.sw-nb__badge { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--sw-line); color: var(--sw-olive); }
.sw-nb__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sw-nb__line { margin: 0; font: 600 14px/18px var(--sw-font-ui); letter-spacing: var(--sw-tracking); color: var(--sw-ink); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sw-nb__sub { margin: 0; font: 500 13px/17px var(--sw-font-ui); letter-spacing: 0; color: var(--sw-ink-muted); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sw-nb__side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding-top: 2px; }
.sw-nb__time { font: 400 12px/1 var(--sw-font-ui); letter-spacing: 0; color: rgba(63, 69, 49, .5); white-space: nowrap; }
.sw-nb__row.is-unread .sw-nb__time { font-weight: 700; color: var(--sw-olive-2); }
.sw-nb__dot { width: 8px; height: 8px; border-radius: 50%; background: #507A2A; }
.sw-nb__manage { display: flex; align-items: center; justify-content: space-between; width: 100%; margin: 12px 0 0; padding: 12px; border: 0; border-radius: 12px; background: var(--sw-ground-2); text-align: left; cursor: pointer; }
.sw-nb__prefs { padding: 14px 16px 24px; }
.sw-nb__pref { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(229, 223, 217, .4); }
.sw-nb__pref:last-child { border-bottom: 0; }
.sw-nb__pref .sw-nb__sub { margin-top: 2px; }

/* Desktop top bar page title (MainLayout): the same heading style as SwPageHeader */
.sw-desk-title { font: 600 20px/24px var(--sw-font-head); letter-spacing: var(--sw-tracking); color: var(--sw-ink); }

/* DM long-press menu (MessagesV2, #1001). While a bubble's menu is open the thread scroller is
   lifted over the floating header and composer, and the scrim and the pressed row (with its menu)
   stack inside it. One stacking context for all three, on every WebView: on iOS the scroller is a
   stacking context anyway (it inherits -webkit-overflow-scrolling: touch from html/body), and a
   scrim outside it covered the menu, so Unsend's tap landed on the scrim. */
#v2-thread-scroll[data-menu-open] { z-index: 10031; }

/* DM reactions (features.messageReactions, Yowana 11/18; MessagesV2, messagesThread.js). Only while
   the thread's scroller carries data-dm-reactions (the flag on):
   - a bubble takes a double tap: touch-action: manipulation, so no double-tap zoom and no 300ms
     click delay, and no grey tap flash;
   - the reactions sit under the bubble as chips (one per type, a count from two up), overlapping its
     bottom edge on the side it hangs from; your own is ringed and is a button that takes it back;
   - a hold shows the picker's row alone beside the bubble (.sw-react-tray, placed in the flow here
     instead of fixed over a like button), with a ⋯ at the end that swaps in the message menu, and
     no dim behind it (Yowana 11/20: MessagesV2's dismiss layer is clear while the flag is on);
   - a double tap's like pops a heart over the bubble once;
   - the web (a mouse) gets a round button beside the bubble on hover that opens the same menu. */
[data-dm-reactions] [data-bubble] { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.sw-dm-reacts { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 4px; margin-top: -8px; padding: 0 8px; }
.sw-dm-reacts--mine { justify-content: flex-end; }
.sw-dm-chip {
  display: inline-flex; align-items: center; gap: 3px; height: 24px; margin: 0; padding: 0 3px; box-sizing: border-box;
  border: 1px solid var(--sw-line); border-radius: var(--sw-r-pill); background: var(--sw-card); color: var(--sw-olive);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08); font: 600 11px/1 var(--sw-font-ui); -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  animation: sw-react-in calc(260ms / var(--sw-tempo)) var(--sw-pop) backwards;
}
.sw-dm-chip .sw-ricon { width: 18px; height: 18px; }
.sw-dm-chip__n { padding-right: 3px; }
button.sw-dm-chip { cursor: pointer; touch-action: manipulation; transition: scale var(--sw-dur-fast) var(--sw-pop); }
button.sw-dm-chip:active { scale: .92; }
.sw-dm-chip.is-mine { border-color: var(--sw-olive-line); box-shadow: inset 0 0 0 1px var(--sw-olive-line), 0 1px 3px rgba(0, 0, 0, .08); }
.sw-dm-chip:focus { outline: none; }
.sw-dm-chip:focus-visible { outline: 2px solid var(--sw-olive); outline-offset: 1px; }
.sw-react-tray.sw-dm-tray { position: relative; left: auto; top: auto; z-index: auto; width: max-content; max-width: calc(100vw - 16px); }
.sw-dm-tray .sw-react-tray__opt { width: 38px; height: 38px; }
.sw-dm-tray .sw-react-tray__emoji.sw-ricon { width: 30px; height: 30px; }
/* The bar's ⋯ (aria-label "More"): narrower than a reaction, set off by a hairline. */
.sw-dm-tray .sw-dm-tray__more { width: 32px; margin-left: 2px; color: var(--sw-olive); }
.sw-dm-tray .sw-dm-tray__more::before { content: ""; position: absolute; left: -3px; top: 9px; bottom: 9px; width: 1px; background: var(--sw-line); }
/* Over the chips (z-index 1) when the menu opens below a bubble that has some. */
.sw-dm-menu { z-index: 2; display: flex; flex-direction: column; align-items: flex-start; }
.sw-dm-menu--end { align-items: flex-end; }
@keyframes sw-dm-heart { 0% { opacity: 0; scale: .3; } 25% { opacity: 1; scale: 1.15; } 45% { scale: .95; } 70% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: 1.1; } }
.sw-dm-heart {
  position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; z-index: 2; pointer-events: none;
  opacity: 0; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .18));
  animation: sw-dm-heart calc(700ms / var(--sw-tempo)) var(--sw-out) forwards;
}
.sw-dm-heart .sw-ricon { width: 100%; height: 100%; }
.sw-dm-react-open {
  display: none; flex: none; align-self: center; width: 28px; height: 28px; margin: 0; padding: 0; border: 1px solid var(--sw-line);
  border-radius: 50%; background: var(--sw-card); color: var(--sw-olive); cursor: pointer; place-items: center;
  opacity: 0; transition: opacity var(--sw-dur-fast) ease;
}
.sw-dm-react-open .sw-ricon { width: 18px; height: 18px; }
@media (hover: hover) and (pointer: fine) {
  .sw-dm-react-open { display: grid; }
  .sw-dm-row:hover .sw-dm-react-open, .sw-dm-react-open:focus-visible { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .sw-dm-chip { animation: none; }
  .sw-dm-heart { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sw-fprogress::after { animation: none !important; display: none; }
  .sw-fcard-in, .sw-fcard-add, .sw-feed.is-fading, .sw-menu[data-placed], .sw-newpill { animation: none !important; }
  .sw-ptr.is-busy .sw-ptr__svg { animation: none !important; }
}

/* Photos (features.photoCrop) ------------------------------------------------------------------ */
/* Last in the file and unlayered, so these beat .sw-fcard__media's 4:3 frame and 360px cap.
   Feed card (ImageCarousel, sw-photo--card): the cover's shape, 4:5 to 1.91:1, set inline. Detail page
   (sw-photo--detail): the whole photo, contained, over a blurred copy of itself. */
.sw-photo--card { max-height: none; }
@media (min-width: 768px) { .sw-photo--card { max-height: min(640px, 80vh); } }
.sw-photo--detail { max-height: 80vh; background: #1d1f19; }
.sw-photo--detail > img:not(.sw-photo__bg) { position: relative; z-index: 1; object-fit: contain; }
.sw-photo__bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: blur(24px) saturate(1.1); transform: scale(1.15); opacity: .55; pointer-events: none;
}
/* Photos fade in over their frame as they decode instead of popping (Phil 11/4). The frame is already
   sized (a known size, else 4:3), so only opacity changes. img[data-sw-fade] stays hidden until its own
   onload adds data-in; sw-ui.js marks one that arrives already decoded before it paints, so a photo the
   feed just showed doesn't blink on its page. Reduced motion: it just appears. */
img[data-sw-fade] { transition: opacity calc(150ms / var(--sw-tempo)) ease-out; }
img[data-sw-fade]:not([data-in]) { opacity: 0; }
@media (prefers-reduced-motion: reduce) { img[data-sw-fade] { transition: none; } }

/* PhotoPicker: the cover as the feed will frame it, then the tile strip. */
/* --r is the feed frame (PhotoAspect.Card); a tall one narrows rather than grows past 360px. */
.sw-pcover {
  position: relative; margin: 0 auto; width: min(100%, calc(360px * var(--r, 1.3333))); aspect-ratio: var(--r, 1.3333);
  border-radius: 12px; overflow: hidden; background: var(--sw-line);
}
.sw-pcover > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sw-pcover__busy { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .45); color: var(--sw-olive); }
.sw-pcover__note { margin: -2px 0 0; font: 500 12px/16px var(--sw-font-ui); color: var(--sw-ink-muted); text-align: center; }
.sw-ptile { position: relative; flex: none; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; background: var(--sw-line); }
.sw-ptile > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sw-ptile__busy { position: absolute; inset: 0; display: grid; place-items: center; background: var(--sw-line); }
.sw-ptile > img + .sw-ptile__busy { background: rgba(255, 255, 255, .55); }
.sw-ptile__cover {
  position: absolute; left: 4px; top: 4px; z-index: 1; padding: 2px 6px; border-radius: var(--sw-r-xs); background: var(--sw-olive);
  font: 700 9px/13px var(--sw-font-mono); letter-spacing: var(--sw-tracking); text-transform: uppercase; color: #fff; pointer-events: none;
}
.sw-ptile__crop {
  position: absolute; left: 4px; bottom: 4px; z-index: 1; display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 7px 3px 6px; border: 0; border-radius: var(--sw-r-pill); background: rgba(0, 0, 0, .62); color: #fff;
  font: 600 11px/14px var(--sw-font-ui); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.sw-ptile__crop::after { content: ""; position: absolute; inset: -8px; }
.sw-ptile__crop:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

/* PhotoCropSheet: a dark stage that fills the sheet, the controls on the card below it. The photo
   and the frame are positioned by photoCrop.js; the frame's wide shadow dims everything outside it. */
.sw-crop .sw-sheet__body { display: flex; flex-direction: column; overflow: hidden; }
.sw-crop__stage {
  position: relative; flex: 1 1 auto; min-height: 260px; overflow: hidden; background: #121310;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: grab; outline: none;
}
.sw-crop__stage.is-dragging { cursor: grabbing; }
.sw-crop__stage:focus-visible { box-shadow: inset 0 0 0 2px var(--sw-yellow); }
.sw-crop__img { position: absolute; left: 0; top: 0; max-width: none; max-height: none; transform-origin: 0 0; will-change: transform; pointer-events: none; }
.sw-crop__frame { position: absolute; box-shadow: 0 0 0 9999px rgba(18, 19, 16, .62); outline: 1px solid rgba(255, 255, 255, .9); pointer-events: none; }
/* Rule of thirds while the photo moves. */
.sw-crop__frame::before, .sw-crop__frame::after {
  content: ""; position: absolute; opacity: 0; pointer-events: none; transition: opacity var(--sw-dur-fast) ease;
}
.sw-crop__frame::before { top: 0; bottom: 0; left: 33.333%; right: 33.333%; border-left: 1px solid rgba(255, 255, 255, .45); border-right: 1px solid rgba(255, 255, 255, .45); }
.sw-crop__frame::after { left: 0; right: 0; top: 33.333%; bottom: 33.333%; border-top: 1px solid rgba(255, 255, 255, .45); border-bottom: 1px solid rgba(255, 255, 255, .45); }
.sw-crop__stage.is-dragging .sw-crop__frame::before, .sw-crop__stage.is-dragging .sw-crop__frame::after { opacity: 1; }
.sw-crop__controls { flex: none; display: flex; flex-direction: column; gap: 10px; padding: 12px 16px 14px; background: var(--sw-card); }
.sw-crop__zoom { display: block; width: 100%; margin: 0; accent-color: var(--sw-olive); }
.sw-crop__zoom:disabled { opacity: .4; }
.sw-crop__aspects { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.sw-crop__aspects::-webkit-scrollbar { display: none; }
.sw-crop__hint { margin: 0; font: 500 12px/16px var(--sw-font-ui); color: var(--sw-ink-muted); text-align: center; }

/* Team badge (Common/TeamBadge.razor): a small olive tag after a member's name, wherever names
   render (feed header, comments, profile, messages). Inline so it sits on the name's baseline. */
.sw-team-badge {
  display: inline-flex; align-items: center; flex: none; vertical-align: middle;
  margin-left: 6px; padding: 2px 6px; border-radius: var(--sw-r-xs);
  background: var(--sw-olive); color: var(--sw-on-olive);
  font: 700 var(--sw-fs-micro)/12px var(--sw-font-mono); letter-spacing: var(--sw-tracking-label); text-transform: uppercase;
  white-space: nowrap; -webkit-user-select: none; user-select: none;
}
/* Feed header: name and badge share a row so the name still ellipsizes. */
.sw-fhead__namerow { display: flex; align-items: center; max-width: 100%; min-width: 0; }
.sw-fhead__namerow .sw-fhead__name { min-width: 0; }
/* In a flex row with its own gap (comment head), the gap spaces it. */
.sw-cmt__head .sw-team-badge, .sw-fhead__namerow .sw-team-badge { margin-left: 0; }
.sw-fhead__namerow { gap: 6px; }
/* Under a block-level name (CompactCommentItem). */
.sw-team-badge--block { margin: 2px 0 0; }
/* Profile title: "Supwell Team" on its own line under the 22px name, left-aligned with it. */
.sw-team-badge--lg { display: flex; width: fit-content; margin: 6px 0 0; padding: 3px 7px; font-size: var(--sw-fs-label); line-height: 13px; }
/* A name that truncates with the badge kept beside it (messages inbox rows). */
.sw-namerow { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sw-namerow > :first-child { min-width: 0; }
.sw-team-badge--flush { margin-left: 0; }

/* 99. THE FOLD (iPhone Duo) ------------------------------------------------------------------------ */
/* sw-native.js swNative.fold sets html.fold-active while the Duo is partly open, with fold-v (a book: the
   fold runs top to bottom, the device held sideways) or fold-h (a tent: left to right), and
   --sw-fold-end-x / -y where the second pane starts. Apple's rule: scrolling content may cross the fold,
   controls may not. So only fixed controls move, into the second pane; everything else lays out as on any
   wide screen. Flat, iOS reports no active fold and none of this applies; nor on any other device.
   The tab pill and top discs: css/chrome.css. Page sheets, panels and bars: app.css. */
/* SwSheet: from 768px a centred dialog, now centred in the second pane; in a tent it rises from the lower
   pane and stops short of the fold. sw-ui.js's own 768px check is a width check and stays. */
html.fold-active.fold-v .sw-sheet-root { padding-left: calc(var(--sw-fold-end-x) + 16px); padding-right: calc(var(--sw-safe-r) + 16px); }
html.fold-active.fold-h .sw-sheet { max-height: calc(100dvh - var(--sw-fold-end-y) - 12px); }
html.fold-active.fold-h .sw-sheet--tall { height: calc(100dvh - var(--sw-fold-end-y) - 12px); }
/* Toasts drop in at the top of the second pane. */
html.fold-active.fold-v .sw-toast-host { left: var(--sw-fold-end-x); }
