/* GENERATED by Tools/DesignBundle from design/src - do not edit this file.
   Edit the modules, then run: dotnet run --project Tools/DesignBundle
   (docs/internal/conversation-platform/designer-css-plan.md section 2.4; the layer order is design/contract.json's) */

@layer cv.locked, cv.reset, cv.tokens, cv.base, cv.layout, cv.components, cv.skin, cv.device, cv.theme, cv.design, cv.code, cv.host, cv.params;

/* -- design/src/shared/locked.css -- */
@layer cv.locked {
/* THE LOCKED LAYER (layer cv.locked) - designer-css-plan section 5.2. DECLARED FIRST, ON PURPOSE.

   CSS reverses the layer order for !important declarations, so an !important rule in this first layer beats every
   !important a later layer can write - a design (cv.design), a launch code's design (cv.code), a host stylesheet (cv.host)
   or the embed's options (cv.params). That is how the screens that carry a person's consent, confirmation, payment and
   sign-in stay honest whatever a design does.

   WHAT IS PROTECTED (design/contract.json "protected"): every element that carries data-cv-protected - the parts each face
   lists as protected wherever they are drawn (the RCS emulator's verified note; the AI Concierge's secure button, its
   secure sheet and Powered by; the web runner's identity screen), and the screens and moments that are protected as a
   whole (the runner's run page on its confirm, sign-in and payment screens, the staff sign-in, a signature / payment /
   action moment). A design may dress them in COLOURS through the tokens; it may never hide, fake or shrink them.

   WHEN IT BITES: while a design is worn (html.cv-dressed - set by design/face.js once a design's sheet has loaded). Our own
   default look never wears a design, so this layer never moves a pixel of it (Tests/Design/NoVisualChangeTests).

   WHAT CSS HOLDS HERE: visible, opaque, untransformed, unfiltered, unclipped, unmasked and unblended - on the protected
   element itself, and the clipping, masking, filtering and blending on everything inside it (a design that clips a button
   of a confirm screen is held exactly as one that clips the screen). WHAT ONLY THE GUARD CAN HOLD: the 14 px type floor
   and the 4.5 : 1 contrast floor (section 5.3) - CSS has no "at least" for a size or a contrast it does not know, and
   pinning a value here would move our own type and colours - and coverage (nothing slides over a protected part). The
   runtime guard (design/face.js) compares every protected part with the design and without it, and strips a design that
   spoiled one. Tests/Design/ProtectedPartsAreLockedTests holds every rule below in place; mutation-tested.

   THE HOLD: while a design's sheet is on its way (at most 1.5 s - design/face.js) the face is a neutral skeleton - nothing
   of the default look flashes before the design lands. */

html.cv-dressed [data-cv-protected] {
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
  translate: none !important;
  rotate: none !important;
  scale: none !important;
  filter: none !important;
  clip-path: none !important;
  -webkit-mask: none !important;
  mask: none !important;
  mix-blend-mode: normal !important;
}

html.cv-dressed [data-cv-protected] * {
  filter: none !important;
  clip-path: none !important;
  -webkit-mask: none !important;
  mask: none !important;
  mix-blend-mode: normal !important;
}

html.cv-hold {
  background-color: #f2f2f3 !important;
}

html.cv-hold[data-cv-theme="dark"] {
  background-color: #1f1f22 !important;
}

html.cv-hold body {
  visibility: hidden !important;
}
}

/* -- design/src/shared/a11y.css -- */
@layer cv.locked {
/* THE ACCESSIBILITY FLOOR (layer cv.locked) - designer-css-plan sections 5.3 and 9 (P0.5).

   What no design may take away from a person, locked beside the protected screens. The !important here is deliberate:
   in this FIRST layer it beats every !important a later layer can write - a design (cv.design), a launch code's design
   (cv.code), a host stylesheet (cv.host), the embed's options (cv.params) and every unlayered sheet - so no design can
   bring any of it back. Every rule is scoped to a customer face ([data-cv-face] - the shells set it on <html>), and this
   module is only ever bundled into the faces' own sheets (design/bundles.json): the Portal never loads it.

   P0.5 - THE IPHONE ZOOM, FIXED AT THE CAUSE. NEVER BY LOCKING THE VIEWPORT: `maximum-scale` / `user-scalable=no` would
   take pinch-zoom from the people who need it (WCAG 1.4.4), and Safari ignores them anyway
   (Tests/Design/ViewportIsNeverLockedTests). What made a page jump on an iPhone - in the RCS emulator's web overlay above
   all - was Safari zooming into any focused field whose text is under 16 px, and staying zoomed; and a quick double tap on
   a chip zooming the page. So:

   1. On a touch screen ((pointer: coarse) - a phone or a tablet, the only devices whose browsers zoom into a focused
      field), every field a person types into or picks from is at least 16 px - the size Safari leaves alone. A design
      that wants its fields larger sets --cv-field-font-size (a shared token, 16px by default); it can never go under 16.
      A mouse-and-keyboard screen keeps the face's own sizes, so nothing moves on a desktop (the shots hold it).
      Tick boxes, radios, sliders and buttons are not fields here: their text is not typed, and some size by 1em.
   2. touch-action: manipulation on the face's ROOT only (<html>): no double-tap zoom and no tap delay, while pinch-zoom
      and panning still work. Touch-action is not inherited, but the browser intersects an element's touch-action with
      every ancestor's - so the root's value reaches every element below it, and an element that asks for less (the
      signature pad's touch-action: none, a list that pans one way) keeps what it asked for. Never set on every element:
      an !important there would override exactly those.
   3. text-size-adjust: 100% on the root, so iOS never inflates the text when the phone turns.

   Tests/Design/InputsAreSixteenOnPhonesTests holds 1-3 by target on a touch window (every field the runner's markup can
   draw, and every field on the design tour's screens, in every frame); the desktop shots of
   Tests/Design/NoVisualChangeTests hold that a mouse screen did not move.

   P1 adds the rest of the floor here: :focus-visible kept, prefers-reduced-motion honoured, the minimum sizes kept. */

html[data-cv-face] {
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
  touch-action: manipulation !important;
}

@media (pointer: coarse) {
  [data-cv-face] :where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"],
                                  [type="button"], [type="submit"], [type="reset"], [type="image"], [type="hidden"]),
                        textarea, select) {
    font-size: max(16px, var(--cv-field-font-size, 16px)) !important;
  }
}
}

/* -- design/src/shared/reset.css -- */
@layer cv.reset {
/* THE SHARED RESET (layer cv.reset) - designer-css-plan section 2.4.

   The rules every customer face already carried, word for word: the RCS emulator (rcs.css) and the AI Concierge (bot.css)
   both open with exactly these three. A face that adopts the shared modules deletes its own copy and nothing on screen
   moves - the no-visual-change shots (Tests/Design/NoVisualChangeTests) prove it.

   What does NOT belong here: anything only one face does (the concierge's `margin: 0; padding: 0` on every element stays
   in the concierge's own modules), and anything that changes a picture. A rule earns its place in the shared reset only
   when every face already says it. */

* { box-sizing: border-box; }

/* State beats layout: a class that sets `display` would otherwise outrank the hidden ATTRIBUTE's own rule (the RCS sheet's
   backdrop once dimmed the whole page while "hidden"; the concierge's close button once showed on the full page). In this
   early layer the !important also outranks every later layer's !important - no design can show what the shell hid. */
[hidden] { display: none !important; }

html, body { height: 100%; }
}

/* -- design/src/shared/tokens.css -- */
@layer cv.tokens {
/* THE TOKENS (layer cv.tokens) - designer-css-plan section 2.3: ONE vocabulary, --cv-*, for every customer face.

   Three tiers, so a designer can work as broadly or as finely as they like:

   - REFERENCE - the raw brand: colours, type, radius, space, shadow, motion. From P1 the workspace theme fills these
     (--theme-primary -> --cv-color-brand, and so on).
   - SEMANTIC - what things ARE: a surface and the ink on it, the accent and the ink on it, the muted line, the danger,
     the focus ring, the two bubbles. Each reads a reference token, so changing the brand moves everything at once.
   - COMPONENT - one part's own knobs (--cv-chip-bg, --cv-card-radius ...). They live in each face's own token module,
     declared on the face's scope with today's value as the default; the contract (design/contract.json) lists every
     one, per face.

   The values below are the PLATFORM's neutral fallback - what a part would wear if a face named no value of its own. Each
   face's token module redeclares what it needs on its own scope with exactly the value it shows today, which is why
   adopting this file moves nothing.

   ONLY --cv-* IS PUBLIC. The RCS emulator's and the AI Concierge's pre-design-system variable names were retired in P0
   (Kirk, 2026-10-29 - greenfield: no customer stylesheet to keep, and ours were migrated in the same change); the rename
   table for anyone moving a page is RCS-Emulator-Embed.md "Moving from the old names". Components read only --cv-*, and
   whoever sets a look - a host stylesheet, the workspace's brand, the embed's style options, a design - sets --cv-* on the
   face's own scope (Tests/Design/NoLegacyDesignTokensTests holds the old names out of the repository). */

:root {
  /* ── reference ─────────────────────────────────────────────────────────────────────────────────────────────── */
  --cv-color-brand: #1a73e8;
  --cv-color-ink: #1f1f1f;
  --cv-color-paper: #ffffff;
  --cv-font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --cv-font-display: var(--cv-font-body);
  --cv-radius-s: 8px;
  --cv-radius-m: 12px;
  --cv-radius-l: 18px;
  --cv-space-1: 4px;
  --cv-space-2: 8px;
  --cv-space-3: 12px;
  --cv-space-4: 16px;
  --cv-space-5: 24px;
  --cv-space-6: 32px;
  --cv-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.08);
  --cv-shadow-2: 0 4px 14px rgba(0, 0, 0, 0.12);
  --cv-shadow-3: 0 18px 50px rgba(0, 0, 0, 0.16);
  --cv-motion-fast: 120ms;
  --cv-motion-slow: 240ms;

  /* ── semantic ──────────────────────────────────────────────────────────────────────────────────────────────── */
  --cv-surface: var(--cv-color-paper);
  --cv-on-surface: var(--cv-color-ink);
  --cv-accent: var(--cv-color-brand);
  --cv-on-accent: #ffffff;
  --cv-muted: color-mix(in srgb, var(--cv-color-ink) 62%, var(--cv-color-paper));
  --cv-danger: #c5221f;
  --cv-focus: var(--cv-color-brand);
  --cv-bubble-me-bg: var(--cv-accent);
  --cv-bubble-me-ink: var(--cv-on-accent);
  --cv-bubble-them-bg: var(--cv-surface);
  --cv-bubble-them-ink: var(--cv-on-surface);
  /* The text size of every field a person types into or picks from. The accessibility floor (a11y.css, cv.locked) never
     lets it under 16 px - Safari zooms into a smaller field - so a design may raise it, never lower it. */
  --cv-field-font-size: 16px;
}
}

/* -- design/src/shared/base.css -- */
@layer cv.base {
/* THE SHARED BASE (layer cv.base) - designer-css-plan section 2.4.

   The face root's own type and colour, once every face reads the tokens: the root ([data-cv-face]) wears --cv-font-body
   and --cv-on-surface, links and focus read --cv-accent / --cv-focus. It holds NO rules in P0 on purpose: today each face
   sets its own body type and colour, and a shared rule here could only move a picture. The face lanes move their base
   rules in here as they converge - each move proven by the no-visual-change shots. */
}

/* -- design/src/rcs/tokens.css -- */
@layer cv.tokens {
/* THE RCS EMULATOR'S TOKENS (layer cv.tokens) - designer-css-plan section 2.3, the component tier for the RCS face.

   Every coloured or shaped thing on the phone reads a --cv-* token, never a literal and never an old name. Each token is
   declared here, on the scope it lives on, with EXACTLY the value the emulator showed before the design system - so this
   file moves nothing (Tests/Design/NoVisualChangeTests and Tests/RcsEmbedBridgeTests prove it).

   ONLY --cv-* IS PUBLIC. The emulator's pre-design-system names were retired in P0 (Kirk, 2026-10-29 - greenfield, no
   customer stylesheet to keep; the rename table is RCS-Emulator-Embed.md "Moving from the old names"). Whoever sets the
   look - a host stylesheet, the workspace's brand, the embed's style options, a design - sets these tokens themselves, on
   their scope; a later layer (cv.design, cv.host) or the shell's own brand / options blocks win over the values here.

   TWO KINDS OF VALUE BELOW:

   - THE SKIN'S OWN VALUE - --sk-* is private to the shell: set per channel skin and per theme by design/src/rcs/skins/*.css,
     never read by a component and never promised to anyone:

         --cv-chip-bg: var(--sk-chip-bg);

   - A LITERAL THAT WAS BEHIND NO VARIABLE (the typing dots, the shadows, the hover tints, the sheet's quiet colours, the
     error red, Apple's borders, the bezels, the toast) - now a knob with today's value.

   Where a token is declared decides who inherits it: the phone's on .screen, the bottom sheet's on .sheet-wrap (it rises
   inside the screen since 2026-11-06, but keeps a scope of its own - a channel skin never dresses it, only the theme), the
   page's own (the bezel, the toast) on :root. A design sets a token on the same scope or deeper - a token set on :root never
   reaches the phone, because .screen declares its own. */

/* ── the page around the phone ───────────────────────────────────────────────────────────────────────────────────── */
:root {
  --cv-device-bezel: linear-gradient(150deg, #6f7782 0%, #2c3138 26%, #1a1e23 54%, #43494f 82%, #21252a 100%);
  --cv-device-shadow:
    0 0 0 1px rgba(255, 255, 255, .10),
    0 2px 2px rgba(255, 255, 255, .07) inset,
    0 46px 90px -22px rgba(0, 0, 0, .9),
    0 0 130px -30px rgba(120, 190, 255, .22);
  --cv-toast-bg: #14181f;
  --cv-toast-ink: var(--fg);
  --cv-toast-line: var(--line-hot);
  --cv-toast-shadow: 0 18px 40px -14px rgba(0, 0, 0, .8);
}

/* ── the phone ─────────────────────────────────────────────────────────────────────────────────────────────────────── */
.screen {
  /* the screen's type and the accent (chips, card buttons, links, the send button) */
  --cv-font-body: var(--font-device);
  --cv-accent: var(--sk-accent);

  /* the status bar and the app bar - the business's header */
  --cv-header-bg: var(--sk-bar-bg);
  --cv-header-ink: var(--sk-bar-fg);
  --cv-header-line: var(--sk-bar-line);
  --cv-header-shadow: 0 1px 6px rgba(0, 0, 0, .04);
  --cv-verified-shield: var(--sk-shield);
  /* The business's initial. Unset (initial - the guaranteed-invalid value), the avatar wears the workspace's colour (the
     shell's private --brand, set on the avatar itself by rcs.js), else grey - so this token has no default of its own and
     the avatar's rule carries the fallback. The workspace's brand block and a host set it on .screen. */
  --cv-avatar-bg: initial;
  /* the verified-brand header (2026-11-07): the logo's size, corners and the initial's ink; the name's size and weight; the
     verified line's size and its tick's - every value exactly what the header always showed */
  --cv-brand-logo-size: 32px;
  --cv-brand-logo-radius: 50%;
  --cv-brand-logo-ink: #fff;
  --cv-brand-name-size: 15.5px;
  --cv-brand-name-weight: 500;
  --cv-verified-line-size: 11.5px;
  --cv-verified-tick-size: 12px;

  /* the conversation */
  --cv-thread-bg: var(--sk-thread-bg);
  --cv-verified-bg: var(--sk-verified-bg);
  --cv-verified-ink: var(--sk-verified-fg);
  --cv-verified-icon: var(--sk-verified-icon);
  --cv-daymark-bg: var(--sk-daymark-bg);
  --cv-daymark-ink: var(--sk-daymark-fg);
  --cv-receipt-ink: var(--sk-receipt-fg);

  /* the bubbles */
  --cv-bubble-me-bg: var(--sk-bubble-me-bg);
  --cv-bubble-me-ink: var(--sk-bubble-me-fg);
  --cv-bubble-them-bg: var(--sk-bubble-them-bg);
  --cv-bubble-them-ink: var(--sk-bubble-them-fg);
  --cv-bubble-them-shadow: 0 1px 1.5px rgba(0, 0, 0, .09);
  --cv-bubble-radius: 18px;
  --cv-bubble-tail-radius: 5px;
  --cv-bubble-font-size: 14.5px;
  --cv-typing-dot: #9aa0a6;

  /* rich cards, carousels and a card's full page */
  --cv-card-bg: var(--sk-card-bg);
  --cv-card-title-ink: var(--sk-card-title-fg);
  --cv-card-text-ink: var(--sk-card-text-fg);
  --cv-card-line: var(--sk-card-line);
  --cv-card-radius: 17px;
  --cv-card-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 3px 12px -6px rgba(0, 0, 0, .2);
  --cv-card-button-hover-bg: rgba(26, 115, 232, .06);
  --cv-tile-ink: var(--sk-tile-fg);

  /* quick replies - chips follow the accent unless --cv-chip-ink says otherwise */
  --cv-chip-bg: var(--sk-chip-bg);
  --cv-chip-ink: var(--cv-accent);
  --cv-chip-border: var(--sk-chip-border);
  --cv-chip-radius: 18px;
  --cv-chip-hover-bg: rgba(26, 115, 232, .07);
  --cv-chip-hover-shadow: 0 1px 4px rgba(0, 0, 0, .1);

  /* a list-style ask's replies - one panel under the bubble (2026-10-31): the business's bubble, the accent's ink */
  --cv-reply-list-bg: var(--cv-bubble-them-bg);
  --cv-reply-list-ink: var(--cv-accent);
  --cv-reply-list-line: var(--cv-card-line);
  --cv-reply-list-radius: var(--cv-bubble-radius);
  --cv-reply-list-hover-bg: var(--cv-chip-hover-bg);
  /* ... and every other knob of it (2026-11-01 - designers style the list to their heart's content). The panel: how far it
     reaches across the thread, its border (a colour and a width - none until a design names one), its shadow, the gap between
     its rows (0 - one joined panel; open it and give the rows a background and corners of their own for separate buttons).
     The rows: their background and corners, type, alignment and padding, the dividers between them (a width, a style and
     --cv-reply-list-line), the hover, pressed and keyboard looks, the answered row (data-cv-state selected), and an optional
     icon before each reply and chevron after it - any CSS content: a character, an emoji or url() of the design's own picture.
     A token set to initial (the guaranteed-invalid value - the --cv-avatar-bg pattern) has no value of its own: the module
     reads it with its fallback, so until a design names it the row keeps following the token it always read, wherever that
     token is set - a design that sets --cv-reply-list-ink on the panel itself still recolours the hover, the focus ring and
     the answered row with it. */
  --cv-reply-list-width: 79%;
  --cv-reply-list-border: transparent;
  --cv-reply-list-border-width: 0px;
  --cv-reply-list-shadow: initial;
  --cv-reply-list-gap: 0px;
  --cv-reply-list-row-bg: transparent;
  --cv-reply-list-row-radius: 0px;
  --cv-reply-list-font-size: initial;
  --cv-reply-list-font-weight: 500;
  --cv-reply-list-align: center;
  --cv-reply-list-row-padding: 11px 14px;
  --cv-reply-list-line-width: 1px;
  --cv-reply-list-line-style: solid;
  --cv-reply-list-hover-ink: initial;
  --cv-reply-list-pressed-bg: initial;
  --cv-reply-list-focus-line: initial;
  --cv-reply-list-selected-bg: initial;
  --cv-reply-list-selected-ink: initial;
  --cv-reply-list-icon: none;
  --cv-reply-list-icon-ink: currentColor;
  --cv-reply-list-chevron: none;
  --cv-reply-list-chevron-ink: currentColor;

  /* the message field */
  --cv-composer-bg: var(--sk-composer-bg);
  --cv-composer-ink: var(--sk-composer-fg);
  --cv-composer-icon-ink: var(--sk-composer-icon-fg);
  --cv-composer-icon-hover-bg: rgba(0, 0, 0, .05);
  --cv-composer-placeholder-ink: var(--sk-composer-placeholder-fg);
  --cv-composer-shadow: 0 1px 3px rgba(0, 0, 0, .1);
  /* the field's outline - Apple's skin draws one (design/src/rcs/skins/amb.css); the others draw none */
  --cv-composer-line: var(--sk-composer-line);
  --cv-send-bg: var(--cv-accent);
  --cv-send-ink: #fff;

  /* the phone's own chrome */
  --cv-home-bar: var(--sk-home-bar);

  /* ask before the chat - the consent card shown before the conversation starts (2026-11-05): the card (consent-card), its
     words (consent-text), Accept (consent-accept), Decline (consent-decline) and the words left after a Decline
     (consent-declined). Each defaults to the token the card has always read - a rich card's colours, the send button's
     Accept, a quick reply's Decline - on the phone's scope, so a design that dresses those dresses the card too, and one that
     sets these dresses the card alone. PROTECTED: these colour, shape and space the card; nothing may hide it. */
  --cv-consent-bg: var(--cv-card-bg);
  --cv-consent-ink: var(--cv-card-title-ink);
  --cv-consent-border: var(--cv-card-line);
  --cv-consent-radius: var(--cv-card-radius);
  --cv-consent-shadow: var(--cv-card-shadow);
  --cv-consent-padding: 16px 16px 14px;
  --cv-consent-link-ink: var(--cv-accent);
  --cv-consent-button-radius: var(--cv-chip-radius);
  --cv-consent-accept-bg: var(--cv-send-bg);
  --cv-consent-accept-ink: var(--cv-send-ink);
  --cv-consent-decline-bg: var(--cv-chip-bg);
  --cv-consent-decline-ink: var(--cv-chip-ink);
  --cv-consent-decline-border: var(--cv-chip-border);
  --cv-consent-decline-hover-bg: var(--cv-chip-hover-bg);
  --cv-consent-declined-ink: var(--cv-daymark-ink);

  /* related conversations and the wide screen's rail (2026-11-05): the strip under the header (related-strip, each a
     related-bubble - a quick reply's look), the rows of the rail (related-row) and their marks, and the rail itself down the
     left of a wide screen (related-side). The related SHEET is the emulator's own bottom sheet: it wears the sheet's tokens
     (.sheet-wrap, below). */
  --cv-related-strip-bg: var(--cv-header-bg);
  --cv-related-strip-ink: var(--cv-header-ink);
  --cv-related-strip-line: var(--cv-header-line);
  --cv-related-bubble-bg: var(--cv-chip-bg);
  --cv-related-bubble-ink: var(--cv-chip-ink);
  --cv-related-bubble-border: var(--cv-chip-border);
  --cv-related-bubble-radius: var(--cv-chip-radius);
  --cv-related-bubble-hover-bg: var(--cv-chip-hover-bg);
  --cv-related-row-ink: var(--cv-header-ink);
  --cv-related-row-hover-bg: color-mix(in srgb, var(--cv-accent) 9%, transparent);
  --cv-related-mark-bg: color-mix(in srgb, var(--cv-accent) 11%, transparent);
  --cv-related-mark-ink: var(--cv-accent);
  --cv-rail-bg: var(--cv-header-bg);
  --cv-rail-border: var(--cv-header-line);
  --cv-rail-width: 264px;
  --cv-rail-heading-ink: var(--cv-header-ink);

  /* the heard and saved cards (docs/claude/BOT-CONCIERGE.md section 0k): what the customer's typed words landed, above the
     business's message (heard-card, a heard-pill per answer), and the receipt when an Action moment finished or the
     conversation was saved (saved-card). */
  --cv-heard-bg: color-mix(in srgb, var(--cv-accent) 8%, var(--cv-thread-bg));
  --cv-heard-line: color-mix(in srgb, var(--cv-accent) 32%, transparent);
  --cv-heard-ink: var(--cv-bubble-them-ink);
  --cv-heard-title-ink: var(--cv-accent);
  --cv-heard-radius: 16px;
  --cv-heard-pill-bg: color-mix(in srgb, var(--cv-accent) 14%, var(--cv-thread-bg));
  --cv-heard-pill-bg-2: color-mix(in srgb, var(--cv-accent) 21%, var(--cv-thread-bg));
  --cv-heard-pill-bg-3: color-mix(in srgb, var(--cv-accent) 28%, var(--cv-thread-bg));
  --cv-heard-pill-ink: var(--cv-bubble-them-ink);
  --cv-heard-label-ink: color-mix(in srgb, var(--cv-bubble-them-ink) 64%, transparent);
  --cv-saved-mark: #a8741a;
  --cv-saved-bg: color-mix(in srgb, var(--cv-saved-mark) 10%, var(--cv-thread-bg));
  --cv-saved-line: color-mix(in srgb, var(--cv-saved-mark) 44%, transparent);
  --cv-saved-ink: var(--cv-bubble-them-ink);
  --cv-saved-muted: color-mix(in srgb, var(--cv-bubble-them-ink) 64%, transparent);
}

/* ── the bottom sheet (a long list, the + menu, a dropped pin, the related list) - inside the screen, its own scope ──── */
.sheet-wrap {
  --cv-font-body: var(--font-device);
  --cv-accent: #1a73e8;
  --cv-on-accent: #fff;
  --cv-danger: #c5221f;
  --cv-sheet-bg: var(--sk-sheet-bg);
  --cv-sheet-ink: var(--sk-sheet-fg);
  --cv-sheet-muted: var(--sk-sheet-muted);
  --cv-sheet-line: var(--sk-sheet-line);
  --cv-sheet-row-line: var(--sk-sheet-row-line);
  --cv-sheet-row-hover: var(--sk-sheet-hover);
  --cv-sheet-field: var(--sk-sheet-field);
  --cv-sheet-backdrop: rgba(0, 0, 0, .42);
}
}

/* -- design/src/rcs/stage.css -- */
@layer cv.layout {
/* THE STAGE (layer cv.layout) - everything OUTSIDE the glass on go.rcsbuilder.com/rcs/{code}: the dark demo stage, its
   instrument panel and the space the phone stands in. Moved here word for word from the one rcs.css (P0).

   TWO DESIGN LANGUAGES, ON PURPOSE.

   1. THE STAGE (this file) is ours: a cold carrier-instrument panel - near-black, hairline grid, engineered type - so the
      one warm, living thing in the room is the conversation. An embedded conversation never shows it.

   2. THE SCREEN (screen.css and components/) is a deliberate FORENSIC replica of Google Messages / WhatsApp / iMessage
      chrome. Its whole persuasive power is "this is exactly what your customer sees", so it gets their metrics and their
      Roboto, not our brand. Channel skins are variable swaps (skins/) - never a second copy of the layout. */

:root {
  --ink:        #05070a;
  --ink-2:      #0a0d13;
  --line:       rgba(120, 160, 190, .10);
  --line-hot:   rgba(120, 200, 255, .28);
  --fg:         #dfe7ef;
  --fg-dim:     #8697a8;
  --fg-faint:   #5b6875;
  --signal:     #4dd6b0;   /* the live/telemetry accent */
  --warm:       #ffb27a;   /* the human accent */

  --font-display: "Oxanium", "Trebuchet MS", sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;
  --font-body:    "Figtree", "Segoe UI", system-ui, sans-serif;
  --font-device:  "Roboto", "Helvetica Neue", Arial, sans-serif;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── stage atmosphere ─────────────────────────────────────────────────── */

.grid-veil {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 88px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 88px 100%;
  mask-image: radial-gradient(ellipse 90% 75% at 50% 40%, #000 30%, transparent 100%);
  opacity: 0; animation: veil-in 1.6s .1s ease-out forwards;
}
@keyframes veil-in { to { opacity: 1; } }

.glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(46rem 46rem at 72% 46%, rgba(120, 190, 255, .10), transparent 62%),
    radial-gradient(30rem 30rem at 78% 78%, rgba(255, 165, 110, .07), transparent 60%),
    linear-gradient(180deg, #070a0f 0%, var(--ink-2) 55%, #04060a 100%);
}

.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 3; opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── layout ───────────────────────────────────────────────────────────── */

.stage {
  position: relative; z-index: 1;
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(2rem, 6vw, 7rem);
  align-items: center;
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(2rem, 5vh, 5rem) clamp(1.5rem, 5vw, 5rem);
}

/* ── the technical column ─────────────────────────────────────────────── */

.panel > * { animation: rise .7s cubic-bezier(.16,.84,.44,1) both; }
.panel > *:nth-child(1) { animation-delay: .10s; }
.panel > *:nth-child(2) { animation-delay: .18s; }
.panel > *:nth-child(3) { animation-delay: .26s; }
.panel > *:nth-child(4) { animation-delay: .34s; }
.panel > *:nth-child(5) { animation-delay: .42s; }
.panel > *:nth-child(6) { animation-delay: .50s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .69rem; letter-spacing: .19em; text-transform: uppercase;
  color: var(--fg-dim); margin: 0 0 1.6rem;
  display: flex; align-items: center; gap: .6rem;
}
.pip {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--signal); box-shadow: 0 0 0 0 rgba(77, 214, 176, .7);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(77, 214, 176, .55); }
  70%  { box-shadow: 0 0 0 11px rgba(77, 214, 176, 0); }
  100% { box-shadow: 0 0 0 0 rgba(77, 214, 176, 0); }
}

.headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 4.6vw, 3.9rem);
  line-height: .99;
  letter-spacing: -.022em;
  margin: 0 0 1.15rem;
  color: #f2f6fa;
}
.headline em {
  font-style: normal;
  color: var(--warm);
  /* a hand-drawn underline, so the emphasis reads as annotation not italics */
  background: linear-gradient(transparent 72%, rgba(255, 178, 122, .26) 72%);
}

.lede {
  margin: 0 0 2.1rem; max-width: 46ch;
  font-size: clamp(.95rem, 1.05vw, 1.03rem);
  line-height: 1.62; color: var(--fg-dim);
}

/* the live readout - instrument rows */
.readout {
  margin: 0 0 2.1rem; padding: .35rem 0;
  border-top: 1px solid var(--line-hot);
  border-bottom: 1px solid var(--line);
  max-width: 27rem;
}
.readout .row {
  display: flex; align-items: baseline; gap: .9rem;
  padding: .5rem 0;
  border-bottom: 1px dashed rgba(120, 160, 190, .08);
}
.readout .row:last-child { border-bottom: 0; }
.readout dt {
  font-family: var(--font-mono); font-size: .66rem;
  letter-spacing: .15em; text-transform: uppercase; color: var(--fg-faint);
  min-width: 8.6rem;
}
.readout dd {
  margin: 0; font-family: var(--font-mono); font-size: .84rem;
  color: var(--signal); font-weight: 500;
  /* a value that just changed flashes once - the panel feels wired in */
  transition: color .2s;
}
.readout dd.bump { animation: bump .5s ease-out; }
@keyframes bump {
  0%   { color: #fff; text-shadow: 0 0 14px rgba(77, 214, 176, .8); }
  100% { color: var(--signal); text-shadow: none; }
}

.ctl-label, .ctl-hint {
  font-family: var(--font-mono); font-size: .66rem;
  letter-spacing: .15em; text-transform: uppercase; color: var(--fg-faint);
  margin: 0 0 .6rem;
}
.ctl-hint { text-transform: none; letter-spacing: .02em; font-size: .74rem; margin: .7rem 0 1.3rem; }

.segmented { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-hot); border-radius: 2px; overflow: hidden; }
.seg {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--fg-dim);
  padding: .62rem 1.05rem; transition: background .18s, color .18s;
  border-right: 1px solid var(--line);
}
.seg:last-child { border-right: 0; }
.seg:hover { background: rgba(120, 190, 255, .07); color: var(--fg); }
.seg.on { background: var(--signal); color: #04120e; font-weight: 500; }
.seg[disabled] { opacity: .38; cursor: not-allowed; }
.seg[disabled]:hover { background: transparent; color: inherit; }

.ghost {
  appearance: none; cursor: pointer;
  background: transparent; color: var(--fg-dim);
  border: 1px solid var(--line-hot); border-radius: 2px;
  font-family: var(--font-mono); font-size: .71rem; letter-spacing: .08em;
  padding: .62rem 1rem; transition: color .18s, border-color .18s, background .18s;
}
.ghost:hover { color: var(--warm); border-color: rgba(255, 178, 122, .45); background: rgba(255, 178, 122, .05); }

.qr-block {
  margin-top: 2.2rem; padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 1.1rem;
}
.qr {
  width: 96px; height: 96px; flex: 0 0 auto;
  background: #f2f6fa; padding: 7px; border-radius: 2px;
}
.qr svg { display: block; width: 100%; height: 100%; }
.qr-title { margin: 0 0 .25rem; font-size: .9rem; font-weight: 600; color: var(--fg); }
.qr-sub {
  margin: 0; font-family: var(--font-mono); font-size: .68rem;
  color: var(--fg-faint); word-break: break-all;
}

/* ── where the phone stands ───────────────────────────────────────────── */

.device-wrap { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; }

.device-caption {
  margin: 0; font-family: var(--font-mono);
  font-size: .66rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--fg-faint); text-align: center;
}
}

/* -- design/src/rcs/screen.css -- */
@layer cv.layout {
/* THE PHONE (layer cv.layout) - the device and the screen's frame: the bezel, the glass, the status bar, the business's
   header, the scrolling thread and its fixed notes, the home bar. What sits IN the thread is components/; the channel's
   colours are skins/; an embed's bezel (iPhone, Pixel, bare) is devices/. Moved here word for word from rcs.css (P0) -
   every colour now reads its --cv-* token (tokens.css), whose default is the value this file carried. */

.device {
  position: relative;
  width: 392px; height: 806px;
  border-radius: 58px;
  padding: 11px;
  /* titanium rail: a light band on the upper-left, shadow on the lower-right */
  background: var(--cv-device-bezel);
  box-shadow: var(--cv-device-shadow);
  animation: device-in 1s .18s cubic-bezier(.16,.84,.44,1) both;
}
@keyframes device-in {
  from { opacity: 0; transform: translateY(30px) scale(.975); }
  to   { opacity: 1; transform: none; }
}

/* a slow specular drift across the glass - the only thing that says "object" */
.specular {
  position: absolute; inset: 11px; border-radius: 47px; overflow: hidden;
  pointer-events: none; z-index: 6;
}
.specular::after {
  content: ""; position: absolute; top: -60%; left: -40%;
  width: 55%; height: 220%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .055) 45%, transparent);
  transform: rotate(14deg);
  animation: drift 13s 2.4s ease-in-out infinite;
}
@keyframes drift {
  0%, 100% { transform: translateX(0) rotate(14deg); }
  50%      { transform: translateX(240%) rotate(14deg); }
}

.screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 47px; overflow: hidden;
  background: var(--cv-thread-bg);
  display: flex; flex-direction: column;
  font-family: var(--cv-font-body);
  /* screens are brighter than rooms */
  animation: power-on .5s .5s ease-out both;
}
@keyframes power-on { from { filter: brightness(.35) saturate(.4); } to { filter: none; } }

.island {
  position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
  width: 84px; height: 25px; border-radius: 13px; background: #000; z-index: 5;
  display: flex; align-items: center; justify-content: flex-end; padding-right: 8px;
}
.island .lens {
  width: 8px; height: 8px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a3b52, #050708 70%);
  box-shadow: 0 0 0 .5px rgba(255, 255, 255, .10);
}

.statusbar {
  height: 47px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 26px 0;
  background: var(--cv-header-bg);
  color: var(--cv-header-ink);
  font-size: 14px; font-weight: 500;
}
.status-right { display: inline-flex; align-items: center; gap: 5px; }
.clock { letter-spacing: -.2px; font-variant-numeric: tabular-nums; }

.appbar {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 4px;
  padding: 6px 8px 9px;
  background: var(--cv-header-bg); color: var(--cv-header-ink);
  border-bottom: 1px solid var(--cv-header-line);
  box-shadow: var(--cv-header-shadow);
}

.ab-icon {
  appearance: none; border: 0; background: none; cursor: default;
  color: currentColor; opacity: .72; padding: 6px; border-radius: 50%;
  display: grid; place-items: center;
}

/* THE WORKSPACE'S CONTACT DETAILS (2026-10-30): the header's Call (contact-call) dials the workspace's number and More
   (contact-more) opens a small menu over the thread, under the header at the right (rcs.js openContactMenu) - call, email,
   the brand's links and its places with directions (contact-item). Each button shows only when the brand block's contact
   holds something for it; the menu wears the card's tokens. */
.contact-call, .contact-more { cursor: pointer; }
.contact-more[aria-expanded="true"] { opacity: 1; }
.contact-menu {
  position: absolute; right: 8px; z-index: 40;
  min-width: 210px; max-width: calc(100% - 16px); max-height: 62%;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 6px 0;
  background: var(--cv-card-bg); color: var(--cv-card-title-ink);
  border: 1px solid var(--cv-card-line); border-radius: 12px;
  box-shadow: var(--cv-card-shadow);
  font-family: var(--cv-font-body);
  animation: fade .14s ease-out both;
}
.contact-item {
  display: block; padding: 9px 14px;
  color: inherit; text-decoration: none;
  font-size: 14px; line-height: 1.3;
  overflow-wrap: anywhere;
}
.contact-item:hover, .contact-item:focus-visible { background: var(--cv-card-button-hover-bg); outline: none; }
.contact-item-title { display: block; font-weight: 500; }
.contact-item-detail { display: block; margin-top: 2px; font-size: 12.5px; color: var(--cv-card-text-ink); }
.contact-item-go { display: block; margin-top: 3px; font-size: 12.5px; font-weight: 500; color: var(--cv-accent); }

/* THE VERIFIED-BRAND HEADER (2026-11-07 - the way a real RCS thread opens): the business's logo (brand-logo - its picture on
   every face, else its initial), its name (brand-name), and under the name the verified tick and its line ("Verified
   business - RCS"). Each knob is a token (design/src/rcs/tokens.css): the logo's size, corners and initial's ink, the name's
   size and weight, the line's size and the tick's size and colour (--cv-verified-shield). An embed may hide the whole bar
   (frame.brandHeader: false - embed.css); the protected verified note in the thread stays. */
.avatar {
  width: var(--cv-brand-logo-size); height: var(--cv-brand-logo-size); border-radius: var(--cv-brand-logo-radius); flex: 0 0 auto;
  background: var(--cv-avatar-bg, var(--brand, #5f6368));
  color: var(--cv-brand-logo-ink); font-size: 14px; font-weight: 500;
  display: grid; place-items: center; margin: 0 8px 0 2px;
  text-transform: uppercase;
  overflow: hidden;
}
/* The workspace's logo, on every face (rcs.js applyLogo). */
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.who { flex: 1 1 auto; min-width: 0; }
.who-name {
  font-size: var(--cv-brand-name-size); font-weight: var(--cv-brand-name-weight); line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.who-sub {
  display: flex; align-items: center; gap: 3px;
  font-size: var(--cv-verified-line-size); opacity: .68; margin-top: 1px;
}
.vshield { color: var(--cv-verified-shield); flex: 0 0 auto; width: var(--cv-verified-tick-size); height: var(--cv-verified-tick-size); }

.thread {
  flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain;
  padding: 12px 10px 6px;
  background: var(--cv-thread-bg);
  scrollbar-width: none;
}
.thread::-webkit-scrollbar { width: 0; }

.verified-note {
  display: flex; gap: 7px; align-items: flex-start;
  margin: 2px 6px 14px; padding: 9px 11px;
  background: var(--cv-verified-bg);
  border-radius: 10px;
  font-size: 11.5px; line-height: 1.42; color: var(--cv-verified-ink);
}
.verified-note svg { color: var(--cv-verified-icon); flex: 0 0 auto; margin-top: 1px; }

/* "NOT YOU?" (the people directory - people-directory-design.md section 29): when an answer greets a person (a brand's launch
   token named them, or a page's hint) a note right under the verified note says who the conversation takes the visitor to be -
   "Hi Dana" (person) - with the "Not you?" chip beside it (not-you - PROTECTED: a design dresses it in colours, never hides it).
   Outside the bubbles, so it stands whatever the thread shows and whether or not the page shows the business's header. After
   the chip, the note keeps the words that say what happened. Drawn only while someone is greeted (rcs.js applyPerson). */
.person-note {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center;
  margin: -6px 6px 12px;
  font-size: 12px; line-height: 1.35; color: var(--cv-daymark-ink); text-align: center;
}
.person-note .person-hi { min-width: 0; overflow-wrap: anywhere; }
.person-note .not-you {
  padding: 2px 10px; border: 1px solid currentColor; border-radius: 999px;
  background: transparent; color: inherit; font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.person-note .not-you:hover { background: color-mix(in srgb, currentColor 14%, transparent); }
.person-note .not-you:disabled { opacity: 0.6; cursor: default; }

.daymark { text-align: center; margin: 0 0 12px; }
.daymark span {
  font-size: 11px; font-weight: 500; color: var(--cv-daymark-ink);
  background: var(--cv-daymark-bg); padding: 3px 11px; border-radius: 10px;
}

.home-bar {
  flex: 0 0 auto;
  width: 138px; height: 5px; border-radius: 3px;
  background: var(--cv-home-bar);
  margin: 5px auto 8px;
}
}

/* -- design/src/rcs/components/bubbles.css -- */
@layer cv.components {
/* THE BUBBLES (layer cv.components) - a row per turn, the visitor's bubbles and the business's, the typing dots, a picture,
   a clip, a voice note or a file in a bubble. Parts: bubble-me, bubble-them (data-cv-part), each row's turn kind
   (data-cv-turn), typing, document-tile, receipt. Moved here word for word from rcs.css (P0). */

.brow { display: flex; margin: 0 4px 3px; animation: bub .26s cubic-bezier(.16,.84,.44,1) both; }
@keyframes bub { from { opacity: 0; transform: translateY(7px) scale(.985); } to { opacity: 1; transform: none; } }
.brow.me { justify-content: flex-end; }
.brow + .brow { margin-top: 2px; }
.brow.turn-gap { margin-top: 9px; }

.bub {
  max-width: 79%;
  padding: 8px 12px 9px;
  font-size: var(--cv-bubble-font-size); line-height: 1.4;
  border-radius: var(--cv-bubble-radius);
  white-space: pre-wrap; word-break: break-word;
  position: relative;
}

/* A URL a workflow wrote into its copy is TAPPABLE over RCS, so it is tappable
   here. overflow-wrap keeps a long product link inside the bubble instead of
   pushing the thread sideways. */
.bub-link {
  color: var(--cv-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}
.brow.me .bub-link { color: inherit; text-decoration-color: rgba(255, 255, 255, .7); }
.brow.them .bub {
  background: var(--cv-bubble-them-bg); color: var(--cv-bubble-them-ink);
  border-bottom-left-radius: var(--cv-bubble-tail-radius);
  box-shadow: var(--cv-bubble-them-shadow);
}
.brow.me .bub {
  background: var(--cv-bubble-me-bg); color: var(--cv-bubble-me-ink);
  border-bottom-right-radius: var(--cv-bubble-tail-radius);
}
/* a run of same-side bubbles keeps square inner corners, like the real apps */
.brow.them + .brow.them .bub { border-top-left-radius: var(--cv-bubble-tail-radius); }
.brow.me + .brow.me .bub { border-top-right-radius: var(--cv-bubble-tail-radius); }

.receipt {
  text-align: right; font-size: 10.5px; color: var(--cv-receipt-ink);
  margin: 2px 8px 8px;
}

/* typing */
.typing .bub { padding: 12px 14px; }
.dots { display: inline-flex; gap: 4px; }
.dots i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--cv-typing-dot);
  animation: blip 1.25s infinite ease-in-out;
}
.dots i:nth-child(2) { animation-delay: .16s; }
.dots i:nth-child(3) { animation-delay: .32s; }
@keyframes blip {
  0%, 60%, 100% { transform: translateY(0); opacity: .45; }
  30%           { transform: translateY(-4px); opacity: 1; }
}

/* media */
.bub-media { padding: 4px; max-width: 74%; }
.bub-media img, .bub-media video { display: block; width: 100%; border-radius: 15px; }
.bub-media .cap { padding: 5px 8px 3px; font-size: 13.5px; }

.doc-tile {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; border-radius: 12px;
  background: rgba(0, 0, 0, .05); color: inherit;
  text-decoration: none; font-size: 13.5px;
}

/* A visitor's photo kept by the emulator lives an hour; after that its bubble says what it was. */
.media-gone {
  min-width: 120px; padding: 22px 16px; text-align: center;
  font-size: 13px; opacity: .75; border-radius: 15px; background: rgba(0, 0, 0, .06);
}

/* A DOCUMENT TURN - a tappable file row, the way a handset shows an attachment.
   Sized to sit inside .bub-media without stretching the bubble. */
.doc-chip {
  display: flex; align-items: center; gap: .6rem;
  padding: .7rem .8rem; text-decoration: none;
  border: 1px solid var(--line); border-radius: 3px;
  background: rgba(255, 255, 255, .04); color: inherit;
  transition: background .18s, border-color .18s;
}
.doc-chip:hover { background: rgba(120, 190, 255, .09); border-color: var(--line-hot); }
.doc-chip-icon {
  flex: 0 0 auto; font-family: var(--font-mono); font-size: .58rem;
  letter-spacing: .08em; padding: .3rem .38rem; border-radius: 2px;
  background: var(--signal); color: #04120e; font-weight: 600;
}
.doc-chip-name { font-size: .82rem; line-height: 1.25; word-break: break-word; }
}

/* -- design/src/rcs/components/cards.css -- */
@layer cv.components {
/* RICH CARDS AND CAROUSELS (layer cv.components) - a card, a rail of them, the arrows a mouse needs, a card's full page.
   Parts: card, card-media, card-button, carousel, card-detail. Moved here word for word from rcs.css (P0). */

/* THE CAROUSEL, ON A DESKTOP. A phone swipes this rail; a mouse has nothing to
   grab - no scrollbar (hidden, correctly, because a handset has none), and the
   wheel scrolls the page instead. So on hover-capable pointers the rail also
   gets arrows, drag-to-pan and wheel-to-horizontal. None of it is rendered on
   touch, where the swipe already works and chrome would just be in the way. */
.cards-wrap { position: relative; }

.cards {
  display: flex; gap: 9px; overflow-x: auto; padding: 3px 4px 6px;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  /* NO scroll-behavior: smooth here, deliberately. Some embedded engines accept
     it and then never animate, so every programmatic scroll silently no-ops and
     the arrows do nothing (measured in this app's own browser pane). It would
     also animate each pointermove during a drag. Smoothness is asked for per
     call in panBy(), which falls back to a jump when nothing moves. */
}

/* A hint that there IS more - the rail fades at whichever edge has overflow. */
.cards-wrap::after,
.cards-wrap::before {
  content: ""; position: absolute; top: 0; bottom: 6px; width: 26px;
  pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 1;
}
.cards-wrap::before {
  left: 0;
  background: linear-gradient(90deg, var(--cv-thread-bg), transparent);
}
.cards-wrap::after {
  right: 0;
  background: linear-gradient(270deg, var(--cv-thread-bg), transparent);
}
.cards-wrap.can-left::before,
.cards-wrap.can-right::after { opacity: 1; }

.cards-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 2;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .1);
  background: rgba(255, 255, 255, .96);
  color: #1f1f1f;
  display: none;                       /* touch: never */
  place-items: center; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
  transition: opacity .2s, transform .1s;
}
.cards-nav.prev { left: -2px; }
.cards-nav.next { right: -2px; }
.cards-nav:active { transform: translateY(-50%) scale(.94); }
.cards-nav[disabled] { opacity: 0; pointer-events: none; }

/* The affordances are driven by a CLASS the script sets, NOT by a pointer media
   query. Those queries cannot be trusted: this shell is viewed inside embedded
   webviews that report hover:none AND pointer:none AND zero touch points, so a
   `@media (hover: hover)` gate fails CLOSED and the cards past the first edge
   become unreachable with a mouse - the exact bug this fixes. The script instead
   shows the arrows whenever the rail OVERFLOWS (the condition that actually
   matters) and suppresses them only on positive evidence of a touch-only
   device, where the swipe already works. */
.cards-wrap.show-nav .cards-nav { display: grid; }
.cards.pannable { cursor: grab; }
.cards.pannable.dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.cards::-webkit-scrollbar { height: 0; }
.card {
  flex: 0 0 79%; scroll-snap-align: start;
  background: var(--cv-card-bg); border-radius: var(--cv-card-radius); overflow: hidden;
  box-shadow: var(--cv-card-shadow);
  display: flex; flex-direction: column;
}
.card-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--cv-card-line); }
.card-body { padding: 10px 13px 11px; }
.card-title { font-size: 14.5px; font-weight: 500; color: var(--cv-card-title-ink); line-height: 1.3; }
.card-text { font-size: 13px; color: var(--cv-card-text-ink); margin-top: 3px; line-height: 1.4; }

/* Real-RCS card semantics: the description CLAMPS in the card (with a chevron)
   and tapping the card body opens the full-text detail view - the suggestion
   chips under the card are what SELECT. */
.card-body.expandable { position: relative; cursor: pointer; padding-right: 22px; }
.card-body.expandable .card-text {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-chevron {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  color: #9aa0a6; font-size: 18px; line-height: 1;
}

/* The card detail view - the native-style full page a real handset opens. */
.card-detail {
  position: absolute; inset: 0; z-index: 40;
  background: var(--cv-card-bg); color: var(--cv-card-title-ink);
  display: flex; flex-direction: column;
  animation: detail-in 180ms ease;
}
@keyframes detail-in { from { transform: translateY(8%); opacity: 0.4; } to { transform: none; opacity: 1; } }
.card-detail-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 14px 8px;
}
.card-detail-back {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid #e0e0e0; background: var(--cv-card-bg); cursor: pointer;
  font-size: 18px; line-height: 1; color: var(--cv-card-title-ink);
}
.card-detail-head b { font-size: 17px; }
.card-detail-body { padding: 6px 18px 18px; overflow-y: auto; }
.card-detail-body h2 { font-size: 20px; margin: 8px 0 14px; }
.card-detail-body p { font-size: 16px; line-height: 1.45; color: var(--cv-verified-ink); white-space: pre-wrap; margin: 0; }
.card-detail-body img { max-width: 100%; border-radius: 12px; margin-bottom: 12px; }

.card-act {
  appearance: none; width: 100%; border: 0; border-top: 1px solid var(--cv-card-line);
  background: none; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 500;
  color: var(--cv-accent); padding: 11px 8px; letter-spacing: .2px;
  transition: background .15s;
}
.card-act:hover { background: var(--cv-card-button-hover-bg); }
.card-act:disabled { color: #9aa0a6; cursor: default; }
/* A link on a card (a moment's Shop now - opens the page, never an answer) reads as the card's other buttons. */
a.card-act { display: block; box-sizing: border-box; text-align: center; text-decoration: none; }
}

/* -- design/src/rcs/components/heard.css -- */
@layer cv.components {
/* THE HEARD AND SAVED CARDS (layer cv.components) - docs/claude/BOT-CONCIERGE.md section 0k. On the phone emulator: what the
   customer's typed words landed (heard-card, a heard-pill per answer) above the business's message, and the receipt when an
   Action moment finished or the conversation was saved (saved-receipt). rcs.js draws them from the message's own lines - an
   opening ✦ line and its "Label: Value" lines, a ✓ line and the line under it - the very text a real phone shows. */

.heard,
.saved {
  max-width: 82%;
  border-radius: var(--cv-heard-radius);
  font-family: var(--cv-font-body);
}

.heard {
  padding: 9px 11px 11px;
  border: 1px solid var(--cv-heard-line);
  background: var(--cv-heard-bg);
  color: var(--cv-heard-ink);
  animation: cv-heard-in 380ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.heard-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  color: var(--cv-heard-title-ink);
  font-size: 12px;
  font-weight: 650;
}

.heard-title::before {
  content: "\2726";
  font-size: 12.5px;
  line-height: 1;
}

.heard-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.heard-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--cv-heard-pill-bg);
  color: var(--cv-heard-pill-ink);
  font-size: 12.5px;
  line-height: 1.35;
  animation: cv-heard-pill-in 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--heard-i, 0) * 70ms + 120ms);
}

.heard-pill:nth-child(3n + 2) { background: var(--cv-heard-pill-bg-2); }
.heard-pill:nth-child(3n) { background: var(--cv-heard-pill-bg-3); }

.heard-label {
  color: var(--cv-heard-label-ink);
  font-size: 11.5px;
}

.heard-value {
  font-weight: 650;
}

.saved {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 9px;
  align-items: start;
  padding: 9px 13px 10px;
  border: 1px solid var(--cv-saved-line);
  background: var(--cv-saved-bg);
  color: var(--cv-saved-ink);
  animation: cv-heard-in 380ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.saved-mark {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 19px;
  height: 19px;
  margin-top: 1px;
  border: 1.6px solid var(--cv-saved-mark);
  border-radius: 50%;
  color: var(--cv-saved-mark);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
}

.saved-title {
  font-size: 13px;
  font-weight: 650;
}

.saved-line {
  grid-column: 2;
  color: var(--cv-saved-muted);
  font-size: 12px;
}

@keyframes cv-heard-in {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes cv-heard-pill-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .heard,
  .heard-pill,
  .saved { animation: none; }
}
}

/* -- design/src/rcs/components/link-sheet.css -- */
@layer cv.components {
/* THE RCS WEB OVERLAY (layer cv.components; 2026-10-26) - a link the business opens OVER the thread: an in-phone sheet
   (rcs.js openLinkSheet). The thread stays visible (masked) above a tall or half sheet, as on a handset; full covers the
   screen. Part: link-sheet. Moved here word for word from rcs.css (P0). */
.link-sheet-wrap {
  position: absolute; inset: 0; z-index: 45;
  background: rgba(0, 0, 0, .38);
  display: flex; flex-direction: column; justify-content: flex-end;
  animation: fade .16s ease-out both;
}
.link-sheet {
  height: 86%;
  background: var(--cv-card-bg); color: var(--cv-card-title-ink);
  border-radius: 16px 16px 0 0; overflow: hidden;
  display: flex; flex-direction: column;
  animation: slideup .22s cubic-bezier(.16,.84,.44,1) both;
}
.link-sheet-wrap[data-view="full"] { background: none; }
.link-sheet-wrap[data-view="full"] .link-sheet { height: 100%; border-radius: 0; }
.link-sheet-wrap[data-view="half"] .link-sheet { height: 52%; }
.link-sheet-head {
  display: flex; align-items: center; gap: 10px; flex: 0 0 auto;
  padding: 10px 12px; border-bottom: 1px solid var(--cv-card-line);
  font-size: 13.5px;
}
.link-sheet-wrap[data-view="full"] .link-sheet-head { padding-top: 34px; }
.link-sheet-x {
  appearance: none; border: 0; background: none; cursor: pointer;
  font-size: 24px; line-height: 1; padding: 0 4px; color: var(--cv-card-text-ink);
}
.link-sheet-host {
  flex: 1 1 auto; min-width: 0; text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--cv-card-text-ink);
}
.link-sheet-out {
  font-size: 16px; text-decoration: none; padding: 0 4px;
  color: var(--cv-accent);
}
.link-sheet-frame { flex: 1 1 auto; width: 100%; border: 0; background: #fff; }
}

/* -- design/src/rcs/components/tiles.css -- */
@layer cv.components {
/* CONTACT AND LOCATION TILES (layer cv.components) - a contact card's initial and lines, a location's map pin and address,
   inside a bubble (the row's data-cv-turn says contact or location). Moved here word for word from rcs.css (P0). */
.tile {
  display: flex; align-items: center; gap: 11px;
  padding: 4px 2px;
}
.tile-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto;
  background: var(--cv-chip-border); display: grid; place-items: center; color: var(--cv-tile-ink);
  font-size: 17px; font-weight: 500;
}
.tile-map {
  width: 48px; height: 48px; border-radius: 11px; flex: 0 0 auto;
  background: linear-gradient(135deg, #cfe8d8, #9fd3b4);
  display: grid; place-items: center; font-size: 20px;
}
.tile-name { font-size: 14px; font-weight: 500; }
.tile-line { font-size: 12.5px; color: var(--cv-tile-ink); margin-top: 1px; }
}

/* -- design/src/rcs/components/chips.css -- */
@layer cv.components {
/* QUICK REPLIES (layer cv.components) - the chip rail under the thread. Parts: chip-rail, chip. Moved here word for word
   from rcs.css (P0). */

/* The chip row is a rail like the carousel, so it gets the carousel's affordances:
   edge fades that say there IS more, and arrows on a pointer device. Reusing
   .cards-nav keeps one set of arrow styles - only the geometry differs, because a
   chip row is ~34px tall and a 32px circle centred on it would swallow it. */
.chips-wrap { position: relative; flex: 0 0 auto; }

.chips-wrap::before,
.chips-wrap::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 30px;
  pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 1;
}
.chips-wrap::before { left: 0; background: linear-gradient(90deg, var(--cv-thread-bg), transparent); }
.chips-wrap::after { right: 0; background: linear-gradient(270deg, var(--cv-thread-bg), transparent); }
.chips-wrap.can-left::before,
.chips-wrap.can-right::after { opacity: 1; }

.chips-wrap .cards-nav {
  width: 24px; height: 24px; font-size: 15px; line-height: 1;
  /* The rail carries 9px of top padding for the animation, so centre on the CHIPS
     rather than on the wrap. */
  top: calc(50% + 3px);
}
.chips-wrap .cards-nav.prev { left: 2px; }
.chips-wrap .cards-nav.next { right: 2px; }
.chips-wrap.show-nav .cards-nav { display: grid; }
/* makeRailNavigable marks a mouse-pannable rail; the chip row wants the same grab
   cursor the carousel has, or drag-to-pan is invisible. */
.chips-rail.pannable { cursor: grab; }
.chips-rail.pannable.dragging { cursor: grabbing; }


.chips-rail {
  flex: 0 0 auto;
  display: flex; gap: 7px; overflow-x: auto;
  padding: 9px 12px 3px;
  background: var(--cv-thread-bg);
  scrollbar-width: none;
  animation: chips-in .3s cubic-bezier(.16,.84,.44,1) both;
}
.chips-rail::-webkit-scrollbar { height: 0; }
@keyframes chips-in { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

.chip {
  appearance: none; cursor: pointer; white-space: nowrap; flex: 0 0 auto;
  background: var(--cv-chip-bg); color: var(--cv-chip-ink);
  border: 1px solid var(--cv-chip-border); border-radius: var(--cv-chip-radius);
  font-family: inherit; font-size: 13.5px; font-weight: 500;
  padding: 8px 15px;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.chip:hover { background: var(--cv-chip-hover-bg); box-shadow: var(--cv-chip-hover-shadow); }
.chip:active { transform: scale(.97); }
.chip:disabled { opacity: .5; cursor: default; }
.chip.link { cursor: default; border-style: dashed; }

/* MORE CHIPS THAN A PHONE TAKES (2026-11-24 - Kirk: "let the rcs emulator and rcs embed show more chips than real RCS allows").
   rcs.js sets body.crs-more-chips while the placement asked for more on the RCS skin, so a moment may carry up to 20 chips
   beside its links. A one-line rail of 20 pills hides most of them past the edge, so here the rail WRAPS - every chip in view, a
   long one over two lines - on the page as in the embed, and the block never takes more than half the screen: past that it
   scrolls on its own, by touch, wheel and keyboard (a focused chip scrolls into view), and the thread keeps its room. */
body.crs-more-chips .chips-wrap { max-height: 50%; overflow-y: auto; overscroll-behavior: contain; }
body.crs-more-chips .chips-rail { flex-wrap: wrap; overflow-x: visible; }
body.crs-more-chips .chip { flex: 0 1 auto; max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: center; }
body.crs-more-chips .chips-wrap::before,
body.crs-more-chips .chips-wrap::after,
body.crs-more-chips .chips-wrap .cards-nav { display: none; }
}

/* -- design/src/rcs/components/reply-list.css -- */
@layer cv.components {
/* THE REPLY LIST (layer cv.components) - a list-style ask (2026-10-31). Parts: reply-list, reply-list-row.

   A moment whose author set its Style to "A list" sends the same suggestion chips as any other - the phone decides how to
   draw them, and an iPhone stacks a long menu as a list under the bubble (Kirk's own handset, the RCS MENU). The emulator
   draws it the same way: one rounded panel under the business's last bubble, a full-width row per reply, thin dividers
   between them, each reply in the link colour. Its tokens live on .screen (design/src/rcs/tokens.css) and follow the
   bubbles and the accent unless a design says otherwise. A tap is a quick reply's tap; the panel goes when the thread moves
   on.

   EVERY KNOB IS A TOKEN (2026-11-01 - designers style the list to their heart's content): the panel's reach, border, corners,
   shadow and the gap between its rows (a column of flex items, gap 0 - one joined panel); the rows' background, corners,
   type, alignment, padding, dividers, hover, pressed and keyboard looks; the answered row - the one a tap marked
   data-cv-state="selected" while the others wait disabled; and an icon before each reply (::before) and a chevron after it
   (::after), both "none" - no box at all - until a design names one. A token declared initial in tokens.css is read here
   with the fallback it stands in for, so with no design the list is exactly what it was. */

.reply-list-wrap {
  display: flex;
  margin: 4px 4px 3px;
  animation: bub .26s cubic-bezier(.16,.84,.44,1) both;
}

.reply-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: var(--cv-reply-list-gap);
  flex: 0 1 var(--cv-reply-list-width); max-width: var(--cv-reply-list-width); min-width: 0;
  background: var(--cv-reply-list-bg);
  border: var(--cv-reply-list-border-width) solid var(--cv-reply-list-border);
  border-radius: var(--cv-reply-list-radius);
  box-shadow: var(--cv-reply-list-shadow, var(--cv-bubble-them-shadow));
  overflow: hidden;
}
.reply-list li + li { border-top: var(--cv-reply-list-line-width) var(--cv-reply-list-line-style) var(--cv-reply-list-line); }

.reply-list-row {
  appearance: none; display: block; position: relative; width: 100%; cursor: pointer;
  border: 0; border-radius: var(--cv-reply-list-row-radius); background: var(--cv-reply-list-row-bg);
  text-align: var(--cv-reply-list-align);
  font-family: inherit; font-size: var(--cv-reply-list-font-size, var(--cv-bubble-font-size));
  font-weight: var(--cv-reply-list-font-weight); line-height: 1.3;
  color: var(--cv-reply-list-ink);
  padding: var(--cv-reply-list-row-padding);
  overflow-wrap: anywhere;
  transition: background .15s, color .15s;
}
/* The icon before the reply and the chevron at the row's far end - "none" draws nothing. */
.reply-list-row::before {
  content: var(--cv-reply-list-icon);
  margin-inline-end: .45em;
  color: var(--cv-reply-list-icon-ink);
}
.reply-list-row::after {
  content: var(--cv-reply-list-chevron);
  position: absolute; inset-inline-end: 14px; top: 50%; translate: 0 -50%;
  color: var(--cv-reply-list-chevron-ink);
}
.reply-list-row:hover {
  background: var(--cv-reply-list-hover-bg);
  color: var(--cv-reply-list-hover-ink, var(--cv-reply-list-ink));
}
.reply-list-row:active { background: var(--cv-reply-list-pressed-bg, var(--cv-reply-list-hover-bg)); }
.reply-list-row:focus-visible { outline: 2px solid var(--cv-reply-list-focus-line, var(--cv-reply-list-ink)); outline-offset: -3px; }
/* While an answer travels: the other rows wait (a second tap cannot send a second answer) ... */
.reply-list-row:disabled { opacity: .5; cursor: default; background: var(--cv-reply-list-row-bg); color: var(--cv-reply-list-ink); }
/* ... and the row tapped says so - until the thread moves on and the panel goes. */
.reply-list-row[data-cv-state="selected"] {
  background: var(--cv-reply-list-selected-bg, var(--cv-reply-list-hover-bg));
  color: var(--cv-reply-list-selected-ink, var(--cv-reply-list-ink));
  cursor: default;
}
}

/* -- design/src/rcs/components/composer.css -- */
@layer cv.components {
/* THE MESSAGE FIELD (layer cv.components) - the composer, its icons, the field and the send button. Parts: composer,
   attach, composer-input, camera, send. Moved here word for word from rcs.css (P0). */
.composer {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 2px;
  margin: 6px 9px 4px;
  padding: 3px 4px 3px 3px;
  background: var(--cv-composer-bg); border-radius: 25px;
  box-shadow: var(--cv-composer-shadow);
}
.cmp-icon {
  appearance: none; border: 0; background: none; cursor: pointer;
  color: var(--cv-composer-icon-ink); padding: 8px; border-radius: 50%; display: grid; place-items: center;
}
.cmp-icon:hover { background: var(--cv-composer-icon-hover-bg); }
#input {
  flex: 1 1 auto; min-width: 0;
  border: 0; outline: none; background: none;
  font-family: inherit; font-size: 14.5px; color: var(--cv-composer-ink);
  padding: 10px 2px;
}
#input::placeholder { color: var(--cv-composer-placeholder-ink); }
.send {
  appearance: none; border: 0; cursor: pointer; flex: 0 0 auto;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--cv-send-bg); color: var(--cv-send-ink);
  display: grid; place-items: center;
  transform: scale(.6); opacity: 0; pointer-events: none;
  transition: transform .16s cubic-bezier(.16,.84,.44,1), opacity .16s;
}
.composer.ready .send { transform: none; opacity: 1; pointer-events: auto; }
}

/* -- design/src/rcs/components/sheet.css -- */
@layer cv.components {
/* THE BOTTOM SHEET (layer cv.components) - list-style turns, the + menu, a dropped pin, the related conversations. It rises
   INSIDE the phone's screen, from its bottom edge, as on a handset (2026-11-06 - Kirk: "Shouldn't it come up from the inside
   the frame, not the center of the host page?"): the wrap covers the screen (.screen is position: relative; overflow: hidden,
   so the phone's rounded corners clip it - the web page's sheet, link-sheet.css, has always lived there) and the sheet is at
   most three quarters of the PHONE's height, never the window's. Wherever the phone IS the window (a real handset, RCS Web over a
   chat, an /x/ link, an embed's bare screen) that is the same thing. It keeps its own scope of tokens on .sheet-wrap
   (tokens.css; its light and dark values in skins/rcs.css) - no channel skin reaches it. Parts: sheet, list, sheet-row, error,
   related-sheet. */
.sheet-wrap {
  position: absolute; inset: 0; z-index: 40;
  background: var(--cv-sheet-backdrop);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .16s ease-out both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: min(392px, 100%);
  max-height: 74%;
  background: var(--cv-sheet-bg); color: var(--cv-sheet-ink);
  border-radius: 18px 18px 0 0;
  font-family: var(--cv-font-body);
  display: flex; flex-direction: column;
  animation: slideup .22s cubic-bezier(.16,.84,.44,1) both;
  margin-bottom: env(safe-area-inset-bottom);
}
@keyframes slideup { from { transform: translateY(100%); } to { transform: none; } }
.sheet-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 15px; border-bottom: 1px solid var(--cv-sheet-line);
  font-size: 15px; font-weight: 500;
}
.sheet-x {
  appearance: none; border: 0; background: none; cursor: pointer;
  font-size: 24px; line-height: 1; color: var(--cv-sheet-muted); padding: 0 4px;
}
.sheet-rows { overflow-y: auto; }
.sheet-row {
  appearance: none; display: block; width: 100%; text-align: left;
  border: 0; border-bottom: 1px solid var(--cv-sheet-row-line); background: none; cursor: pointer;
  padding: 13px 17px; font-family: inherit;
}
.sheet-row:hover { background: var(--cv-sheet-row-hover); }
.sheet-row b { display: block; font-size: 14.5px; font-weight: 500; }
.sheet-row span { display: block; font-size: 12.5px; color: var(--cv-sheet-muted); margin-top: 2px; }

/* A sheet row that takes typed input (a link, a dropped pin) - in place of a prompt() an embedding frame may block. */
.sheet-input { cursor: default; }
.sheet-input:hover { background: none; }
.sheet-input-line { display: flex; gap: 8px; margin-top: 8px; }
.sheet-input-line input {
  flex: 1 1 auto; min-width: 0;
  border: 1px solid var(--cv-sheet-field); border-radius: 18px; outline: none;
  font-family: inherit; font-size: 14px; padding: 8px 13px; color: var(--cv-sheet-ink);
}
.sheet-input-line input:focus { border-color: var(--cv-accent); }
.sheet-input-line button {
  appearance: none; border: 0; cursor: pointer; flex: 0 0 auto;
  background: var(--cv-accent); color: var(--cv-on-accent); border-radius: 18px;
  font-family: inherit; font-size: 13.5px; font-weight: 500; padding: 8px 15px;
}
.sheet-input span:empty { display: none; }
.sheet-input span { color: var(--cv-danger); }
.sheet-note { padding: 11px 17px 0; font-size: 13px; color: var(--cv-sheet-muted); }
html[data-theme="dark"] .sheet-row { color: inherit; }
html[data-theme="dark"] .sheet-input-line input { background: #1f1f1f; }
}

/* -- design/src/rcs/components/related.css -- */
@layer cv.components {
/* RELATED CONVERSATIONS AND ASK BEFORE THE CHAT (layer cv.components) - filled by RCS Web: the strip of related conversations
   under the header, the rail of a wide screen (its layout is embed.css - crs-rail) and the consent card shown before the
   conversation starts.

   Nothing here draws unless the start answer carries a related list, or the start asks first: every rule below dresses an
   element rcs.js creates only then (or a class it adds only then), so a conversation without either looks exactly as before.
   Every colour, corner and the rail's width read the design tokens of their own on the phone's scope (.screen - tokens.css:
   --cv-consent-*, --cv-related-*, --cv-rail-*), and each of those defaults to the token this module read before them - the
   header's for the strip and the rail, the quick replies' for the bubbles, a rich card's for the consent card - so a design that
   dresses those dresses these too. The header button keeps the quick replies' tokens, and the related sheet is the emulator's
   own bottom sheet (sheet.css, its tokens on .sheet-wrap), rising inside the phone's screen. */

/* ── THE STRIP - [data-cv-part="related-strip"] under the header, each conversation a [data-cv-part="related-bubble"] ───── */
.related-strip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 12px;
  scrollbar-width: none;
  background: var(--cv-related-strip-bg);
  color: var(--cv-related-strip-ink);
  border-bottom: 1px solid var(--cv-related-strip-line);
  font-family: var(--cv-font-body);
}
.related-strip::-webkit-scrollbar { display: none; }

/* The title is a snap point of its own (start), so the strip's very start - the title in full - is where it rests: with only
   the bubbles to snap to, a strip that barely overflows snapped to its far end on load (each bubble's start clamped to the
   end of the scroll), and the title opened cut ("More fitment help" read "help"). The bubbles still snap when a person
   scrolls. */
.related-strip-title {
  flex: 0 0 auto;
  scroll-snap-align: start;
  font-size: 11.5px;
  font-weight: 500;
  opacity: .68;
  white-space: nowrap;
}

.related-bubble {
  appearance: none;
  flex: 0 0 auto;
  scroll-snap-align: start;
  cursor: pointer;
  white-space: nowrap;
  background: var(--cv-related-bubble-bg);
  color: var(--cv-related-bubble-ink);
  border: 1px solid var(--cv-related-bubble-border);
  border-radius: var(--cv-related-bubble-radius);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 13px;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.related-bubble:hover { background: var(--cv-related-bubble-hover-bg); box-shadow: var(--cv-chip-hover-shadow); }
.related-bubble:active { transform: scale(.97); }
.related-bubble:focus-visible { outline: 2px solid var(--cv-accent); outline-offset: 2px; }

/* THE STRIP FOR A MOUSE (2026-11-06): the strip sits in related-strip-wrap, which holds the carousel's arrows (cards-nav) and
   two edge fades that say there is more. A mouse drags the strip (pannable - no text selection while it does), and the arrows
   show while the pointer is over the strip (or a bubble has the focus), each only where there is more to see (show-nav,
   can-left / can-right - rcs.js makeRailNavigable). Touch is never given arrows. */
.related-strip-wrap { position: relative; flex: 0 0 auto; min-width: 0; }
.related-strip-wrap::before,
.related-strip-wrap::after {
  content: ""; position: absolute; top: 0; bottom: 1px; width: 28px;
  pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 1;
}
.related-strip-wrap::before { left: 0; background: linear-gradient(90deg, var(--cv-related-strip-bg), transparent); }
.related-strip-wrap::after { right: 0; background: linear-gradient(270deg, var(--cv-related-strip-bg), transparent); }
.related-strip-wrap.can-left::before,
.related-strip-wrap.can-right::after { opacity: 1; }
.related-strip-wrap .cards-nav { width: 24px; height: 24px; font-size: 15px; line-height: 1; }
.related-strip-wrap .cards-nav.prev { left: 4px; }
.related-strip-wrap .cards-nav.next { right: 4px; }
.related-strip-wrap.show-nav:hover .cards-nav,
.related-strip-wrap.show-nav:focus-within .cards-nav { display: grid; }
.related-strip.pannable { cursor: grab; user-select: none; -webkit-user-select: none; }
.related-strip.pannable.dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }

/* ── THE HEADER BUTTON - [data-cv-part="related-button"], in its own short words; it opens the related sheet ───────────────
   Its words are the list's button (the author's, at most 20 characters, else "Do more" - 2026-11-06), never the list's title,
   which heads the sheet and names the button for a screen reader. It keeps its words up to its cap (longer ones end in an
   ellipsis) - the business's verified line gives way instead, below - so "Do more" never reads "Do m...". */
.ab-related {
  appearance: none;
  flex: 0 0 auto;
  min-width: 2.5rem;
  max-width: 6.5rem;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--cv-chip-bg);
  color: var(--cv-chip-ink);
  border: 1px solid var(--cv-chip-border);
  border-radius: var(--cv-chip-radius);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  margin: 0 2px;
}
.ab-related:hover { background: var(--cv-chip-hover-bg); }
.ab-related:focus-visible { outline: 2px solid var(--cv-accent); outline-offset: 2px; }
/* With the button in the header the verified line keeps to one line (it would wrap into three on a phone's width). */
.appbar:has(.ab-related) .who-sub { white-space: nowrap; min-width: 0; }
.appbar:has(.ab-related) .who-sub > span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* ── THE RAIL - [data-cv-part="related-side"] down the left of a wide screen (rcs.js renderRail; its layout is embed.css) ─────
   New conversation (new-conversation) in the quick replies' own look, the related title, then a row per conversation
   (related-row) with a quiet mark - the header's colours for the column, the accent for the marks. */
.related-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 12px 18px;
  background: var(--cv-rail-bg);
  color: var(--cv-header-ink);
  border-right: 1px solid var(--cv-rail-border);
  font-family: var(--cv-font-body);
  scrollbar-width: thin;
}
/* The rail slides in when it appears (related-side-in) - never again when it is redrawn under the visitor. */
.related-side.related-side-in { animation: rail-in .22s cubic-bezier(.22, 1, .36, 1); }
@keyframes rail-in {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: none; }
}

.related-side-new {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 10px;
  padding: 8px 12px 8px 8px;
  cursor: pointer;
  text-align: left;
  background: var(--cv-chip-bg);
  color: var(--cv-chip-ink);
  border: 1px solid var(--cv-chip-border);
  border-radius: 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, box-shadow .15s, transform .1s;
}
.related-side-new:hover { background: var(--cv-chip-hover-bg); box-shadow: var(--cv-chip-hover-shadow); }
.related-side-new:active { transform: scale(.985); }
.related-side-new:focus-visible { outline: 2px solid var(--cv-accent); outline-offset: 2px; }

.related-side-title {
  margin: 16px 10px 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--cv-rail-heading-ink);
  opacity: .68;
}

.related-side .related-row {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px 7px 7px;
  cursor: pointer;
  text-align: left;
  background: transparent;
  color: var(--cv-related-row-ink);
  border: 0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.3;
  transition: background .15s;
}
.related-side .related-row:hover { background: var(--cv-related-row-hover-bg); }
.related-side .related-row:focus-visible { outline: 2px solid var(--cv-accent); outline-offset: 1px; }
.related-row-name { font-weight: 500; min-width: 0; overflow-wrap: anywhere; }

.related-side-mark {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cv-related-mark-bg);
  color: var(--cv-related-mark-ink);
}
.related-side-mark svg { display: block; }
.related-side-mark-new { background: var(--cv-accent); color: var(--cv-on-accent); border-radius: 9px; }

@media (prefers-reduced-motion: reduce) {
  .related-side.related-side-in { animation: none; }
  .related-side-new,
  .related-side .related-row { transition: none; }
}

/* ── ASK BEFORE THE CHAT - [data-cv-part="consent-card"]: the words (consent-text), Accept (consent-accept), Decline
   (consent-decline); once declined, the declined words (consent-declined). The thread is a column while it shows, so the card
   sits centred in it - or at its top in an inline embed sized to its content (.consent-inline). ──────────────────────────── */
.thread.consent-on { display: flex; flex-direction: column; }

.consent-card {
  margin: auto 6px;
  padding: var(--cv-consent-padding);
  background: var(--cv-consent-bg);
  color: var(--cv-consent-ink);
  border: 1px solid var(--cv-consent-border);
  border-radius: var(--cv-consent-radius);
  box-shadow: var(--cv-consent-shadow);
  font-family: var(--cv-font-body);
}

.consent-text {
  font-size: var(--cv-bubble-font-size);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.consent-text p { margin: 0; }
.consent-text p + p { margin-top: 9px; }
.consent-text strong { font-weight: 600; }
.consent-text a { color: var(--cv-consent-link-ink); }

/* EQUAL WEIGHT (2026-11-06 - a regulated brand expects the two choices to carry the same weight): Accept and Decline share the
   row in two columns of the same width, side by side, with the same type and the same box - Accept filled, Decline outlined,
   each with a 1px border (Accept's transparent, its fill under it) so a stacked pair is the same height too - and on a card
   too narrow for two columns of 8rem they stack, each the card's full width. A word too long for its column (German's
   "Datenschutzeinstellungen") wraps inside its button rather than spilling past it, so the columns stay equal whatever the
   words. */
.consent-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
  gap: 8px;
  margin-top: 14px;
}

.consent-accept,
.consent-decline {
  appearance: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--cv-consent-button-radius);
  padding: 10px 14px;
  overflow-wrap: anywhere;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.consent-accept {
  border: 1px solid transparent;
  background: var(--cv-consent-accept-bg);
  color: var(--cv-consent-accept-ink);
}
.consent-decline {
  background: var(--cv-consent-decline-bg);
  color: var(--cv-consent-decline-ink);
  border: 1px solid var(--cv-consent-decline-border);
}
.consent-decline:hover { background: var(--cv-consent-decline-hover-bg); box-shadow: var(--cv-chip-hover-shadow); }
.consent-accept:active,
.consent-decline:active { transform: scale(.97); }
.consent-accept:focus-visible,
.consent-decline:focus-visible { outline: 2px solid var(--cv-accent); outline-offset: 2px; }

.consent-declined {
  margin: auto 16px;
  text-align: center;
  font-family: var(--cv-font-body);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--cv-consent-declined-ink);
}
.consent-declined p { margin: 0; }
.consent-declined p + p { margin-top: 8px; }

.consent-card.consent-inline,
.consent-declined.consent-inline { margin-top: 0; margin-bottom: 0; }
}

/* -- design/src/rcs/components/toast.css -- */
@layer cv.components {
/* THE TOAST (layer cv.components) - a line the shell says (an error, a refusal), over the page. Part: toast. Moved here
   word for word from rcs.css (P0); its colours are tokens on :root (tokens.css). */
.toast {
  position: fixed; z-index: 50;
  left: 50%; bottom: 2rem; transform: translateX(-50%);
  background: var(--cv-toast-bg); color: var(--cv-toast-ink);
  border: 1px solid var(--cv-toast-line); border-radius: 2px;
  padding: .7rem 1.1rem;
  font-family: var(--font-mono); font-size: .74rem;
  box-shadow: var(--cv-toast-shadow);
  animation: rise .3s ease-out both;
  max-width: min(92vw, 34rem);
}
}

/* -- design/src/rcs/components/preview.css -- */
@layer cv.components {
/* THE BUILDER'S PREVIEW (layer cv.components; PLAN 5.7 - Point & Edit). Only a preview thread's rows carry data-step;
   while the builder asks for a pick, a hovered bubble outlines and a click names its moment back. "Show in preview"
   flashes the bubble once. Reduced motion: the flash is a still outline (phone.css stops animations). Moved here word for
   word from rcs.css (P0). */
.conv-picking .brow[data-step] { cursor: crosshair; }
.conv-picking .brow[data-step]:hover,
.conv-picking .brow[data-step]:focus-within {
  outline: 2px dashed var(--signal); outline-offset: 3px; border-radius: 14px;
}
.brow.conv-shown { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 14px; animation: conv-shown 1.4s ease forwards; }
@keyframes conv-shown { 0% { outline-color: var(--signal); } 100% { outline-color: transparent; } }
@media (prefers-reduced-motion: reduce) { .brow.conv-shown { animation: none; } }
}

/* -- design/src/rcs/skins/rcs.css -- */
@layer cv.skin {
/* THE RCS SKIN - Google Messages (layer cv.skin), light and dark, and THE DEFAULT every other skin starts from: they change
   only what differs. Variables only - one --sk-NAME per value the phone shows, private to the shell (never read by a
   component, never promised: components read the --cv-* tokens, tokens.css). The dark theme is the embed's `style.theme`
   "dark" (or "auto" on a dark device), which sets html[data-theme="dark"] - the standalone page never sets it, so it never
   changes. Moved here word for word from rcs.css (P0). */
.screen {
  --sk-bar-bg: #fff; --sk-bar-fg: #1f1f1f; --sk-bar-line: rgba(0, 0, 0, .07); --sk-shield: #1a73e8;
  --sk-thread-bg: #f1f3f4; --sk-accent: #1a73e8;
  --sk-bubble-me-bg: #1a73e8; --sk-bubble-me-fg: #fff; --sk-bubble-them-bg: #fff; --sk-bubble-them-fg: #1f1f1f;
  --sk-verified-bg: rgba(26, 115, 232, .07); --sk-verified-fg: #3c4043; --sk-verified-icon: #1a73e8;
  --sk-daymark-bg: rgba(0, 0, 0, .045); --sk-daymark-fg: #5f6368; --sk-receipt-fg: #80868b;
  --sk-card-bg: #fff; --sk-card-title-fg: #1f1f1f; --sk-card-text-fg: #5f6368; --sk-card-line: #e8eaed;
  --sk-chip-bg: #fff; --sk-chip-border: #dadce0;
  --sk-composer-bg: #fff; --sk-composer-fg: #1f1f1f; --sk-composer-icon-fg: #5f6368; --sk-composer-placeholder-fg: #80868b;
  --sk-tile-fg: #5f6368; --sk-home-bar: rgba(0, 0, 0, .28);
}

html[data-theme="dark"] .screen {
  --sk-bar-bg: #1f1f1f; --sk-bar-fg: #e3e3e3; --sk-bar-line: rgba(255, 255, 255, .08); --sk-shield: #a8c7fa;
  --sk-thread-bg: #121212; --sk-accent: #a8c7fa;
  --sk-bubble-me-bg: #a8c7fa; --sk-bubble-me-fg: #062e6f; --sk-bubble-them-bg: #2d2f31; --sk-bubble-them-fg: #e3e3e3;
  --sk-verified-bg: rgba(168, 199, 250, .10); --sk-verified-fg: #c4c7c5; --sk-verified-icon: #a8c7fa;
  --sk-daymark-bg: rgba(255, 255, 255, .08); --sk-daymark-fg: #c4c7c5; --sk-receipt-fg: #9aa0a6;
  --sk-card-bg: #2d2f31; --sk-card-title-fg: #e3e3e3; --sk-card-text-fg: #c4c7c5; --sk-card-line: #444746;
  --sk-chip-bg: #1f1f1f; --sk-chip-border: #444746;
  --sk-composer-bg: #2d2f31; --sk-composer-fg: #e3e3e3; --sk-composer-icon-fg: #c4c7c5; --sk-composer-placeholder-fg: #9aa0a6;
  --sk-tile-fg: #c4c7c5; --sk-home-bar: rgba(255, 255, 255, .35);
}

/* The bottom sheet rises inside the phone but keeps its own scope, so it wears no channel skin - only the theme. */
.sheet-wrap {
  --sk-sheet-bg: #fff; --sk-sheet-fg: #1f1f1f; --sk-sheet-muted: #5f6368;
  --sk-sheet-line: #e8eaed; --sk-sheet-row-line: #f1f3f4; --sk-sheet-hover: #f8f9fa; --sk-sheet-field: #dadce0;
}
html[data-theme="dark"] .sheet-wrap {
  --sk-sheet-bg: #2d2f31; --sk-sheet-fg: #e3e3e3; --sk-sheet-muted: #c4c7c5;
  --sk-sheet-line: #444746; --sk-sheet-row-line: #3c4043; --sk-sheet-hover: #37393b; --sk-sheet-field: #5f6368;
}
}

/* -- design/src/rcs/skins/whatsapp.css -- */
@layer cv.skin {
/* THE WHATSAPP SKIN (layer cv.skin) - light and dark, only what differs from the RCS default (skins/rcs.css). The screen
   carries data-skin="WhatsApp" (and the root data-cv-skin="whatsapp"). Moved here word for word from rcs.css (P0); the
   send button's own white was the default already (--cv-send-ink), so its WhatsApp repeat is gone. */
.screen[data-skin="WhatsApp"] {
  --sk-bar-bg: #075e54; --sk-bar-fg: #fff; --sk-bar-line: rgba(255, 255, 255, .12); --sk-shield: #a7f3d0;
  --sk-thread-bg: #ece5dd; --sk-accent: #075e54;
  --sk-bubble-me-bg: #dcf8c6; --sk-bubble-me-fg: #111b21; --sk-bubble-them-bg: #fff; --sk-bubble-them-fg: #111b21;
  --sk-verified-bg: rgba(7, 94, 84, .08); --sk-verified-icon: #075e54;
  --sk-home-bar: rgba(0, 0, 0, .22);
}
html[data-theme="dark"] .screen[data-skin="WhatsApp"] {
  --sk-bar-bg: #1f2c34; --sk-bar-fg: #e9edef; --sk-bar-line: rgba(255, 255, 255, .08); --sk-shield: #00a884;
  --sk-thread-bg: #0b141a; --sk-accent: #00a884;
  --sk-bubble-me-bg: #005c4b; --sk-bubble-me-fg: #e9edef; --sk-bubble-them-bg: #202c33; --sk-bubble-them-fg: #e9edef;
  --sk-verified-bg: rgba(0, 168, 132, .10); --sk-verified-icon: #00a884;
  --sk-card-bg: #202c33; --sk-chip-bg: #1f2c34; --sk-composer-bg: #202c33;
  --sk-home-bar: rgba(255, 255, 255, .30);
}

/* A link in the visitor's own (pale green) bubble is WhatsApp's teal, not the white the other skins' blue bubble takes. */
.screen[data-skin="WhatsApp"] .brow.me .bub-link { color: #075e54; text-decoration-color: currentColor; }
}

/* -- design/src/rcs/skins/amb.css -- */
@layer cv.skin {
/* THE APPLE MESSAGES FOR BUSINESS SKIN (layer cv.skin) - light and dark, only what differs from the RCS default
   (skins/rcs.css), plus Apple's own shape: a centred header with one icon, and an outlined message field with no shadow.
   The screen carries data-skin="AMB" (and the root data-cv-skin="amb"). Moved here word for word from rcs.css (P0); the
   field's outline is now the --cv-composer-line token (light #d1d1d6, dark #3a3a3c), and the composer's background - the
   default's already - is no longer repeated. */
.screen[data-skin="AMB"] {
  --sk-bar-bg: #f7f7f7; --sk-thread-bg: #fff; --sk-accent: #007aff;
  --sk-bubble-me-bg: #007aff; --sk-bubble-me-fg: #fff; --sk-bubble-them-bg: #e9e9eb; --sk-bubble-them-fg: #000;
  --sk-verified-bg: #f2f2f7; --sk-verified-icon: #007aff;
  --sk-composer-line: #d1d1d6;
}
html[data-theme="dark"] .screen[data-skin="AMB"] {
  --sk-bar-bg: #1c1c1e; --sk-bar-fg: #fff; --sk-thread-bg: #000; --sk-accent: #0a84ff;
  --sk-bubble-me-bg: #0a84ff; --sk-bubble-me-fg: #fff; --sk-bubble-them-bg: #26252a; --sk-bubble-them-fg: #fff;
  --sk-verified-bg: #1c1c1e; --sk-verified-icon: #0a84ff;
  --sk-card-bg: #1c1c1e; --sk-chip-bg: #1c1c1e; --sk-composer-bg: #1c1c1e;
  --sk-composer-line: #3a3a3c;
}

.screen[data-skin="AMB"] .appbar { justify-content: center; position: relative; }
.screen[data-skin="AMB"] .ab-icon:nth-of-type(n+2) { display: none; }
.screen[data-skin="AMB"] .composer { border: 1px solid var(--cv-composer-line); box-shadow: none; }
}

/* -- design/src/rcs/phone.css -- */
@layer cv.device {
/* THE PHONE, ON A PHONE (layer cv.device) - the standalone page's own sizes: a narrower stage, then on a real handset no
   stage and no bezel at all. A frame drawn around a real handset is a joke at the viewer's expense - so below the fold of
   a tablet the stage and the bezel simply leave, the thread becomes the whole viewport, and the OS supplies the real
   chrome. In cv.device - after the components and the skins it resizes, before the embed (embed.css), which overrides it
   for a frame on someone else's page. Moved here word for word from rcs.css (P0), with the reduced-motion rule. */

@media (max-width: 1080px) {
  .stage { grid-template-columns: 1fr; justify-items: center; gap: 3rem; }
  .panel { max-width: 42rem; order: 2; }
  .device-wrap { order: 1; }
}

@media (max-width: 860px), (max-height: 700px) and (orientation: portrait) {
  .grid-veil, .glow, .grain { display: none; }
  body { background: #f1f3f4; overflow: hidden; }
  .stage { display: block; max-width: none; margin: 0; padding: 0; }
  .panel, .device-caption { display: none; }

  .device-wrap { gap: 0; }
  .device {
    width: 100vw; height: 100dvh;
    border-radius: 0; padding: 0;
    background: none; box-shadow: none; animation: none;
  }
  .specular, .island, .statusbar, .home-bar { display: none; }
  .screen {
    border-radius: 0; height: 100dvh; animation: none;
    padding-top: env(safe-area-inset-top);
  }
  .appbar { padding-top: 10px; }
  .composer { margin-bottom: calc(6px + env(safe-area-inset-bottom)); }
  .bub { max-width: 84%; font-size: 15.5px; }
  .card { flex-basis: 74%; }
  .toast { bottom: calc(1rem + env(safe-area-inset-bottom)); }

  /* THE KEYBOARD AND THE WEB OVERLAY ON A REAL HANDSET (P0.5 - never an embed: its frame's host owns the page). iOS lays
     the keyboard OVER the page instead of shrinking it, so rcs.js follows visualViewport and writes the height the
     keyboard covers to --rcs-keyboard on <html> (0px with no keyboard - nothing moves): the screen ends above the keyboard,
     so the composer stays in sight, and the bottom sheet (a link, a dropped pin) rises with its field - it lives inside the
     screen (sheet.css), so it ends where the screen ends with no offset of its own. The in-phone web sheet (the runner's
     overlay) is the screen's own too, so it sizes with the dynamic viewport; its full view clears the real status bar (the
     safe area) - not the drawn one, which a real handset does not have - and nothing sits under the home indicator. */
  body:not(.crs-embed) .screen { height: calc(100dvh - var(--rcs-keyboard, 0px)); }
  body:not(.crs-embed) .link-sheet { padding-bottom: env(safe-area-inset-bottom); }
  body:not(.crs-embed) .link-sheet-wrap[data-view="full"] .link-sheet-head { padding-top: calc(10px + env(safe-area-inset-top)); }
}

/* RCS WEB OVER THE CHAT (2026-10-30 - go.rcsbuilder.com/rcs/run, the page a thread's start card opens over the real chat; <html>
   carries data-cv-mode="overlay") and RCS WEB AS A LINK (go.rcsbuilder.com/x/{code} - a page on a bare device): the real-handset
   face above, at EVERY width - no stage, no bezel, no drawn status bar, the brand header and the thread filling the window, the
   keyboard and the safe areas as on a phone. It IS the person's phone screen. */
html:is([data-cv-mode="overlay"], [data-cv-mode="page"][data-cv-device="bare"]) body { background: #f1f3f4; overflow: hidden; }
html:is([data-cv-mode="overlay"], [data-cv-mode="page"][data-cv-device="bare"]) .grid-veil,
html:is([data-cv-mode="overlay"], [data-cv-mode="page"][data-cv-device="bare"]) .glow,
html:is([data-cv-mode="overlay"], [data-cv-mode="page"][data-cv-device="bare"]) .grain,
html:is([data-cv-mode="overlay"], [data-cv-mode="page"][data-cv-device="bare"]) .panel,
html:is([data-cv-mode="overlay"], [data-cv-mode="page"][data-cv-device="bare"]) .device-caption,
html:is([data-cv-mode="overlay"], [data-cv-mode="page"][data-cv-device="bare"]) .specular,
html:is([data-cv-mode="overlay"], [data-cv-mode="page"][data-cv-device="bare"]) .island,
html:is([data-cv-mode="overlay"], [data-cv-mode="page"][data-cv-device="bare"]) .statusbar,
html:is([data-cv-mode="overlay"], [data-cv-mode="page"][data-cv-device="bare"]) .home-bar { display: none; }
html:is([data-cv-mode="overlay"], [data-cv-mode="page"][data-cv-device="bare"]) .stage { display: block; max-width: none; margin: 0; padding: 0; }
html:is([data-cv-mode="overlay"], [data-cv-mode="page"][data-cv-device="bare"]) .device-wrap { gap: 0; }
html:is([data-cv-mode="overlay"], [data-cv-mode="page"][data-cv-device="bare"]) .device {
  width: 100vw; height: 100dvh;
  border-radius: 0; padding: 0;
  background: none; box-shadow: none; animation: none;
}
html:is([data-cv-mode="overlay"], [data-cv-mode="page"][data-cv-device="bare"]) .screen {
  border-radius: 0; animation: none;
  height: calc(100dvh - var(--rcs-keyboard, 0px));
  padding-top: env(safe-area-inset-top);
}
html:is([data-cv-mode="overlay"], [data-cv-mode="page"][data-cv-device="bare"]) .appbar { padding-top: 10px; }
html:is([data-cv-mode="overlay"], [data-cv-mode="page"][data-cv-device="bare"]) .composer { margin-bottom: calc(6px + env(safe-area-inset-bottom)); }
html:is([data-cv-mode="overlay"], [data-cv-mode="page"][data-cv-device="bare"]) .bub { max-width: 84%; font-size: 15.5px; }
html:is([data-cv-mode="overlay"], [data-cv-mode="page"][data-cv-device="bare"]) .card { flex-basis: 74%; }
html:is([data-cv-mode="overlay"], [data-cv-mode="page"][data-cv-device="bare"]) .toast { bottom: calc(1rem + env(safe-area-inset-bottom)); }
html:is([data-cv-mode="overlay"], [data-cv-mode="page"][data-cv-device="bare"]) .link-sheet { padding-bottom: env(safe-area-inset-bottom); }
html:is([data-cv-mode="overlay"], [data-cv-mode="page"][data-cv-device="bare"]) .link-sheet-wrap[data-view="full"] .link-sheet-head { padding-top: calc(10px + env(safe-area-inset-top)); }
/* On a wide screen (an /x/ link opened on a laptop, a tablet) the thread stays full width and the bubbles keep a phone's size -
   as Messages for web draws it - so a picture, a video or a carousel card never grows to the width of the window. */
@media (min-width: 720px) {
  html:is([data-cv-mode="overlay"], [data-cv-mode="page"][data-cv-device="bare"]) .bub { max-width: min(84%, 560px); }
  html:is([data-cv-mode="overlay"], [data-cv-mode="page"][data-cv-device="bare"]) .bub-media { max-width: min(84%, 400px); }
  html:is([data-cv-mode="overlay"], [data-cv-mode="page"][data-cv-device="bare"]) .card { flex-basis: min(74%, 300px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::after { animation-duration: .001s !important; animation-delay: 0s !important; }
  .specular::after { animation: none; }
}
}

/* -- design/src/rcs/embed.css -- */
@layer cv.device {
/* THE WEB EMBED (layer cv.device; 2026-10-08 - docs/public/Integrators/RCS-Emulator-Embed.md). rcs.js sets body.crs-embed
   ONLY when the page runs inside a host's frame with ?embed=1 and a declared origin; the standalone page never carries the
   class, so nothing below applies to it. The stage leaves, the device fills the frame, data-chrome shows or hides the
   status bar, the camera and the home bar, and devices/ draws the bezel data-device picks (iphone | pixel | none). The
   frame's own size, corners and shadow are the host's (embed.js). In cv.device - after the skins, so the field's focus ring
   still shows on Apple's outlined field, and after phone.css, whose real-handset sizes it overrides inside a frame. Moved
   here word for word from rcs.css (P0). */

body.crs-embed { background: transparent; overflow: hidden; }
body.crs-embed .grid-veil,
body.crs-embed .glow,
body.crs-embed .grain,
body.crs-embed .panel,
body.crs-embed .device-caption { display: none; }
/* THE PHONE IS THE FRAME'S WIDTH, whatever it holds (2026-10-09 - Kirk, a Replit page: long date chips blew the runner out,
   the thread cut off on both sides). The narrow-screen rule's justify-items: center reaches this block stage, and a browser
   that aligns block boxes then sizes the phone to its widest content - a row of chips - and centres it past both edges.
   So the stage stops centring and the phone takes the frame's width. */
body.crs-embed .stage { display: block; height: 100%; min-height: 0; max-width: none; margin: 0; padding: 0; justify-items: normal; }
body.crs-embed .device-wrap { display: block; height: 100%; width: 100%; min-width: 0; }
body.crs-embed .device { width: 100%; height: 100%; animation: none; box-shadow: none; }
body.crs-embed .screen { height: 100%; padding-top: 0; animation: none; }
/* The phone's own metrics at any frame width (a narrow frame is not a real phone - the real-phone rules above are). */
body.crs-embed .bub { max-width: 79%; font-size: var(--cv-bubble-font-size); }
body.crs-embed .card { flex-basis: 79%; }
/* On a page the quick replies WRAP (Kirk, 2026-10-09: "the long buttons need to wrap so it doesn't blow out the runner") -
   every choice in view, a long one over two lines, never a rail to pan inside someone else's page. The standalone page keeps
   the handset's one-line rail. */
body.crs-embed .chips-rail { flex-wrap: wrap; overflow-x: visible; }
body.crs-embed .chip { flex: 0 1 auto; max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: center; }
body.crs-embed .chips-wrap::before,
body.crs-embed .chips-wrap::after,
body.crs-embed .chips-wrap .cards-nav { display: none; }
body.crs-embed .composer { margin-bottom: 4px; }
/* The message field shows where the keyboard is - the standalone page leaves it to the composer. */
body.crs-embed .composer:focus-within { box-shadow: 0 0 0 2px var(--cv-accent); }

/* chrome - on: the status bar, the camera, the home bar and the glass; off: the conversation alone. */
body.crs-embed[data-chrome="on"] .statusbar { display: flex; }
body.crs-embed[data-chrome="on"] .home-bar { display: block; }
body.crs-embed[data-chrome="on"] .appbar { padding-top: 6px; }
body.crs-embed[data-chrome="on"]:not([data-device="none"]) .island { display: flex; }
body.crs-embed[data-chrome="on"]:not([data-device="none"]) .specular { display: block; }
body.crs-embed[data-chrome="off"] .statusbar,
body.crs-embed[data-chrome="off"] .home-bar,
body.crs-embed[data-chrome="off"] .island,
body.crs-embed[data-chrome="off"] .specular { display: none; }
body.crs-embed[data-chrome="off"] .appbar { padding-top: 10px; }

/* THE BUSINESS'S HEADER OFF (2026-11-07 - frame.brandHeader: false, the fragment's header=0): a page that shows the business
   itself hides the header bar - the logo, the name, the verified tick and line, and its buttons (back, Call, More, expand).
   The verified note in the thread is protected and stays. */
body.crs-embed[data-brand-header="off"] .appbar { display: none; }

/* A floating panel the host can close: the app bar's back arrow closes it (the host is told - embed.js). */
body.crs-embed[data-closable="1"] .ab-back { cursor: pointer; }

/* THE EXPAND BUTTON (expand-button, 2026-11-05) - at the end of a floating panel's app bar, only while the window has room for
   the wide panel: arrows out to go wide, arrows in (aria-pressed="true") to come back. */
body.crs-embed .ab-expand { cursor: pointer; }
body.crs-embed .ab-expand .expand-narrow { display: none; }
body.crs-embed .ab-expand[aria-pressed="true"] .expand-wide { display: none; }
body.crs-embed .ab-expand[aria-pressed="true"] .expand-narrow { display: block; }

/* THE WIDE DESKTOP (2026-11-05 - Kirk: "let our desktop be sexy"). rcs.js sets body.crs-wide when the embed's frame is 880 px or
   wider on the bare screen or in a floating panel: the thread, the quick replies and the composer keep a readable measure in
   the middle of the screen. With related conversations it also sets body.crs-rail: the screen becomes a grid - the app bar
   across the top with the business standing over the rail, the rail down the left, the conversation beside it. */
body.crs-embed.crs-wide .thread,
body.crs-embed.crs-wide .chips-wrap {
  padding-left: max(24px, calc((100% - 720px) / 2));
  padding-right: max(24px, calc((100% - 720px) / 2));
}
body.crs-embed.crs-wide .composer {
  margin-left: max(18px, calc((100% - 720px) / 2));
  margin-right: max(18px, calc((100% - 720px) / 2));
  margin-bottom: 12px;
}
body.crs-embed.crs-wide .consent-card,
body.crs-embed.crs-wide .consent-declined { width: 100%; max-width: 560px; margin-left: auto; margin-right: auto; }
/* A rich card and a picture keep a phone's width on the wide screen - a picture, not a billboard. */
body.crs-embed.crs-wide .card { flex-basis: min(79%, 340px); }
body.crs-embed.crs-wide .bub-media { max-width: min(79%, 360px); }

/* Every in-flow child of the screen has its own row - the status bar and the home bar too, which a bare inline embed shows
   when the page asks for chrome (left to auto-placement they would fall in below the composer); hidden, their rows are empty. */
body.crs-embed.crs-rail .screen {
  display: grid;
  grid-template-columns: var(--cv-rail-width) minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
}
body.crs-embed.crs-rail .statusbar { grid-column: 1 / -1; grid-row: 1; }
body.crs-embed.crs-rail .appbar { grid-column: 1 / -1; grid-row: 2; position: relative; }
body.crs-embed.crs-rail .related-side { grid-column: 1; grid-row: 3 / span 3; }
body.crs-embed.crs-rail .thread { grid-column: 2; grid-row: 3; }
body.crs-embed.crs-rail .chips-wrap { grid-column: 2; grid-row: 4; }
/* MORE CHIPS beside the rail: the wrapped block's cap is half the SCREEN. In this grid a percentage would resolve against the
   chips' own auto row - half the block itself, cut every time - so the cap is half the frame's height (the rail shows only on
   the bare embed, where the screen is the whole frame). */
body.crs-embed.crs-rail.crs-more-chips .chips-wrap { max-height: 50vh; max-height: 50dvh; }
body.crs-embed.crs-rail .composer { grid-column: 2; grid-row: 5; }
body.crs-embed.crs-rail .home-bar { grid-column: 1 / -1; grid-row: 6; }
/* The business's name keeps to the rail's width and the line beside the rail runs on up through the app bar. */
/* Its room is the rail's width less the back arrow, the avatar and a little air before the line (116 px - 148 px at the default
   264 px), so a design that widens or narrows the rail (--cv-rail-width) moves the name's room with the line. */
body.crs-embed.crs-rail .appbar .who { flex: 0 1 max(0px, calc(var(--cv-rail-width) - 116px)); margin-right: auto; }
body.crs-embed.crs-rail .appbar::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--cv-rail-width) - 1px);
  width: 1px;
  background: var(--cv-rail-border);
  pointer-events: none;
}
}

/* -- design/src/rcs/devices/iphone.css -- */
@layer cv.device {
/* THE IPHONE (layer cv.device) - an embed's default bezel: the titanium rail and the island, the standalone page's own
   phone (body.crs-embed[data-device="iphone"]; the root says data-cv-device="iphone"). The rail is the --cv-device-bezel
   token (tokens.css). Moved here word for word from rcs.css (P0). */
body.crs-embed[data-device="iphone"] .device {
  border-radius: 58px; padding: 11px;
  background: var(--cv-device-bezel);
}
body.crs-embed[data-device="iphone"] .screen { border-radius: 47px; }
}

/* -- design/src/rcs/devices/pixel.css -- */
@layer cv.device {
/* THE PIXEL (layer cv.device) - a flatter, squarer bezel with a punch-hole camera (body.crs-embed[data-device="pixel"];
   the root says data-cv-device="pixel"). Its rail sets the --cv-device-bezel token for this device, so a design can still
   set it here. Moved here word for word from rcs.css (P0). */
body.crs-embed[data-device="pixel"] .device {
  --cv-device-bezel: linear-gradient(160deg, #3d4148 0%, #1d2024 45%, #2b2f34 100%);
  border-radius: 44px; padding: 9px;
  background: var(--cv-device-bezel);
}
body.crs-embed[data-device="pixel"] .screen { border-radius: 36px; }
body.crs-embed[data-device="pixel"] .specular { inset: 9px; border-radius: 36px; }
body.crs-embed[data-device="pixel"] .island {
  top: 13px; width: 13px; height: 13px; border-radius: 50%; padding: 0; justify-content: center;
}
body.crs-embed[data-device="pixel"] .island .lens { width: 6px; height: 6px; }
}

/* -- design/src/rcs/devices/bare.css -- */
@layer cv.device {
/* BARE (layer cv.device) - the screen alone, edge to edge: an embed's device "none" (body.crs-embed[data-device="none"];
   the root says data-cv-device="bare"). No bezel, no camera, no glass. Moved here word for word from rcs.css (P0). */
body.crs-embed[data-device="none"] .device { border-radius: 0; padding: 0; background: none; }
body.crs-embed[data-device="none"] .screen { border-radius: 0; }
body.crs-embed[data-device="none"] .specular,
body.crs-embed[data-device="none"] .island { display: none; }

/* THE WIDE PANEL WEARS THE BARE SCREEN (2026-11-05): a floating panel gone wide (body.crs-wide in a closable frame) is the
   screen alone whatever device the page named - a phone's bezel is a phone's, never a desktop's. */
body.crs-embed.crs-wide[data-closable="1"] .device { border-radius: 0; padding: 0; background: none; }
body.crs-embed.crs-wide[data-closable="1"] .screen { border-radius: 0; }
body.crs-embed.crs-wide[data-closable="1"] .specular,
body.crs-embed.crs-wide[data-closable="1"] .island,
body.crs-embed.crs-wide[data-closable="1"] .statusbar,
body.crs-embed.crs-wide[data-closable="1"] .home-bar { display: none; }
body.crs-embed.crs-wide[data-closable="1"] .appbar { padding-top: 10px; }
}
