/* EdgeRift — layout + components (concept/DESIGN-BRIEF.md §2.1–2.10, incl. §2.10 "EA touches")
   3 of 3 shared stylesheets. Class map and markup: concept/_partials.md; the chrome itself is rendered by
   templates/partials/*.twig. No colour literals here; tokens only. Page-only rules go in pages/*.css
   inside @layer pages { … }.
   text-transform:uppercase is allowed ONLY through the classes in this file (display roles, .eyebrow,
   .cta, .btn, nav, menus, breadcrumb, footer titles). Apple names inside them go through caps_safe()
   (.case-as-written), so they keep their own case. */

/* ======================================================================
   LAYOUT: bands, widths, type roles, stacks
   ====================================================================== */
@layer layout {
  main { display: block; }
  .wrap { max-width: calc(var(--w-content) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

  /* A band = one idea. White by default; alternate with --grey; --dark for themes / Pro hero. */
  .band { position: relative; overflow: hidden; padding: var(--section-y) var(--gutter); background: var(--c-bg); }
  .band--grey { background: var(--c-band); }
  .band--dark { background: var(--c-surface-dark); color: var(--c-on-dark); }
  .band--midnight { background: var(--c-midnight); background-image: var(--grad-midnight); color: var(--c-on-dark); }
  .band--short { padding-block: calc(var(--section-y) * .75); }
  .band--hero { padding-top: calc(var(--section-y) * .5); }
  .band--bleed { padding-bottom: 0; }           /* a device bleeds off the bottom edge */
  .band__inner { max-width: var(--w-content); margin-inline: auto; }
  .band__inner--copy { max-width: var(--w-copy); }
  .band__inner--wide { max-width: var(--w-wide); }

  /* Type roles (§2.3 + §2.10). Display roles are Rajdhani 700 UPPERCASE, set by CSS: the DOM keeps
     sentence case ("Real Solitaire for <span class="case-as-written">iPhone</span>"). Tracking tightens only
     at ≥32px: -1px on hero/headline and -.5px on tile titles from 1024. Sub-copy stays Roboto. */
  .display, .headline, .tile-title { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; text-wrap: balance; }
  .display { font-size: var(--t-hero); line-height: 1; letter-spacing: -.5px; }
  .headline { font-size: var(--t-headline); line-height: 1.04; letter-spacing: -.5px; }
  .tile-title { font-size: var(--t-tile); line-height: 1.06; letter-spacing: 0; }
  @media (min-width: 1024px) {
    .display, .headline { letter-spacing: -1px; }
    .tile-title { letter-spacing: -.5px; }
  }
  .title { font-family: var(--f-display); font-weight: 700; font-size: var(--t-title); line-height: 1.15; letter-spacing: .005em; }
  .number { font-family: var(--f-display); font-weight: 600; font-size: var(--t-number); line-height: 1; font-variant-numeric: tabular-nums; }
  .sub { font-size: var(--t-sub); line-height: 1.2; text-wrap: balance; }
  .body-lg { font-size: var(--t-body-lg); line-height: 1.45; color: var(--c-muted); max-width: 34em; }
  .center .body-lg, .body-lg.center { margin-inline: auto; }
  .price-line { font-size: var(--t-small); line-height: 1.4; color: var(--c-muted); }
  .band--dark .body-lg, .band--dark .price-line { color: var(--c-on-dark-muted); }
  .band--midnight .price-line { color: var(--c-on-midnight-muted); }   /* 4.5:1 at the gradient's bluest stop */
  .band--midnight .body-lg, .band--midnight .sub { color: var(--c-on-midnight-muted); }

  /* Vertical rhythm inside a text stack */
  :is(h1, h2, h3, .display, .headline, .tile-title, .title) + :is(.sub, .body-lg) { margin-top: var(--gap-head-sub); }
  .title + .display { margin-top: 8px; }
  .display + .sub { margin-top: calc(var(--gap-head-sub) + 4px); }
  /* Product heroes are two lines max (owner, 2026-10-07): name + pill, then the display line. On phones the
     display line shrinks to fit one line (--chars = its length; Rajdhani caps run ~.43em a character). */
  @media (max-width: 767px) {
    .display--fit { white-space: nowrap; font-size: min(var(--t-hero), calc((100vw - 2 * var(--gutter)) / (var(--chars) * .46))); }
  }
  .cta-row { margin-top: var(--gap-sub-cta); }
  .cta-row + .price-line { margin-top: 12px; }
  .media { margin-top: var(--gap-cta-media); }
  .sub + .body-lg { margin-top: 8px; }
  .stars + .sub { margin-top: 20px; }

  /* EA eyebrow: small tracked caps ABOVE a title. It adds information (platform, price, year), never
     repeats the title, and is never red. Slash separators: <span class="eyebrow__sep" aria-hidden="true">/</span> */
  .eyebrow {
    font-family: var(--f-display); font-weight: 700; font-size: var(--t-eyebrow); line-height: 1.2;
    letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--c-muted);
  }
  .eyebrow__sep { margin-inline: .2em; opacity: .6; }   /* write spaces around it in the HTML so it reads "Free iPhone" */
  :is(.tile--dark, .band--dark) .eyebrow { color: var(--c-on-dark-muted); }
  .band--midnight .eyebrow { color: var(--c-on-midnight-muted); }
  .eyebrow + :is(h1, h2, h3, .display, .headline, .tile-title, .title) { margin-top: 10px; }
  /* Product-hero H1: the product name set as a large ink eyebrow above the display line
     (the way Apple sets "iPad Air" small above "Whoosh."). */
  .eyebrow--product { font-size: clamp(15px, .38vw + 13.5px, 19px); color: var(--c-ink); }
  :is(.tile--dark, .band--dark, .band--midnight) .eyebrow--product { color: var(--c-on-dark); }
  .eyebrow--product + .display { margin-top: 12px; }

  /* EA red bar: 60×4, centred under a title; left-aligned in .split__text or with .has-bar--left.
     At most ONE per band (Home: the hero H1 and the Company title only). */
  .has-bar::after {
    content: ""; display: block; width: var(--bar-w); height: var(--bar-h);
    margin: 14px auto 0; border-radius: 2px; background: var(--c-red);
  }
  .has-bar--left::after, .split__text .has-bar::after { margin-left: 0; }
  .has-bar + :is(.sub, .body-lg) { margin-top: 20px; }

  /* Split: text 5 cols / device 7 cols at ≥1024; stacked below. */
  .split { display: grid; gap: var(--gap-cta-media); max-width: var(--w-wide); margin-inline: auto; }
  .split__text { text-align: center; }
  .split__media { align-self: end; }
  .band--bleed .split__text { padding-top: 0; }
  @media (min-width: 1024px) {
    .split { grid-template-columns: 5fr 7fr; gap: 24px; align-items: center; }
    .split__text { text-align: left; padding-bottom: var(--section-y); }
    .split__text .body-lg { margin-inline: 0; }
    .split--mirror .split__text { order: 2; }
  }
}

/* ======================================================================
   COMPONENTS
   ====================================================================== */
@layer components {

  /* ---------- Links + buttons (§2.7) ---------- */
  /* EA text CTA: LEARN MORE › in Rajdhani 600 caps, tracked, red. */
  .cta {
    display: inline-block; padding-block: 6px;
    font-family: var(--f-display); font-weight: 600; font-size: var(--t-cta); line-height: 1.2;
    letter-spacing: var(--track-nav); text-transform: uppercase; color: var(--c-red-text);
    transition: color var(--d-fast) var(--ease);
  }
  .cta:hover, .cta:focus-visible { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .24em; }
  /* The › / ↗ glyphs use the system face: ↗ is in neither Rajdhani nor Roboto's latin subset. */
  .cta > [aria-hidden="true"] { font-family: var(--f-symbol); letter-spacing: 0; }
  .tile--dark .cta, .band--dark .cta { color: var(--c-red-on-dark); }
  /* On the midnight gradient the lighter red keeps 4.5:1 down to its bluest stop */
  .band--midnight .cta { color: var(--c-red-on-midnight); }
  /* Quiet CTA: the second link of a pair (APP STORE ↗ beside LEARN MORE ›). Ink, so one red link leads. */
  .cta--quiet { color: var(--c-ink); }
  /* A product that's coming soon (owner, 2026-10-13: config products): "Coming soon" where Learn more would be, in the
     CTA's type but muted and not a link */
  .cta.cta--soon { margin: 0; cursor: default; color: var(--c-muted); }
  .cta.cta--soon:hover { text-decoration: none; }
  :is(.tile--dark, .band--dark, .tile--retro, .games-retro) .cta.cta--soon { color: var(--c-on-dark-muted); }
  :is(.tile--dark, .band--dark, .band--midnight) .cta--quiet { color: var(--c-on-dark); }
  .cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 28px; }
  .split__text .cta-row { justify-content: flex-start; }

  .btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    height: 44px; padding: 0 22px; border-radius: var(--radius-btn);
    background: var(--c-red); color: var(--c-on-red);
    font-family: var(--f-display); font-size: 16px; font-weight: 700; line-height: 1; white-space: nowrap;
    letter-spacing: var(--track-nav); text-transform: uppercase;
    transition: background-color var(--d-fast) var(--ease);
  }
  .btn:hover { background: var(--c-red-press); text-decoration: none; }
  .btn--s { height: 32px; padding: 0 14px; font-size: 14px; letter-spacing: .08em; }
  .btn--s::after { content: ""; position: absolute; inset: -6px -4px; }   /* 44px hit area */

  .store-badge { display: inline-block; padding: 2px; border-radius: 9px; }
  .store-badge img { height: 40px; width: auto; }
  @media (min-width: 768px) { .store-badge img { height: 44px; } }

  .icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%; color: var(--c-ink);
  }
  .icon-btn svg { width: 20px; height: 20px; }
  .icon-btn:hover { background: var(--c-row-active); text-decoration: none; }

  /* ---------- Header: the compact EA-style navbar (§2.9, §2.10) ----------
     White, 72px (56 below 768), hairline rule, static (scrolls away). Logo left, nav centred,
     search right. Content width = the footer's (--w-wide) so logo and manifesto line up. */
  .site-header { position: relative; z-index: 50; background: var(--c-bg); border-bottom: 1px solid var(--c-hairline); }
  .site-header__bar {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    height: var(--header-h); max-width: calc(var(--w-wide) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter);
  }
  /* The logo behaves as a link, not a picture (owner, 2026-10-13: "sometimes selects the image"): the image takes no
     pointer events, so every click, drag and long-press lands on the link (a drag carries the URL, the context menu
     offers the link), and nothing in it can be selected or dragged out as an image */
  .site-logo {
    justify-self: start; display: inline-flex; padding: 6px 0; border-radius: 6px;
    -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
  }
  .site-logo img { height: 28px; width: auto; }
  .site-logo > * { pointer-events: none; -webkit-user-drag: none; }
  @media (min-width: 768px) { .site-logo img { height: 36px; } }
  .site-header__actions { grid-column: 3; justify-self: end; display: flex; align-items: center; margin-right: -10px; }

  .site-nav { display: none; }
  @media (min-width: 768px) {
    .site-nav { display: block; }
    .header-menu { display: none; }
  }
  .site-nav__list { display: flex; gap: 40px; list-style: none; margin: 0; padding: 0; }
  .site-nav__item { position: relative; }
  /* Label = a real link; the chevron = a separate <button aria-expanded> that opens the panel.
     Both stay visible: GAMES ⌄  COMPANY ⌄  SUPPORT ⌄ */
  .site-nav__trigger { display: flex; align-items: center; height: var(--header-h); }
  .site-nav__link {
    display: inline-flex; align-items: center; padding: 8px 0;
    font-family: var(--f-display); font-weight: 600; font-size: var(--t-nav); line-height: 1;
    letter-spacing: var(--track-nav); text-transform: uppercase; color: var(--c-ink);
    transition: color var(--d-fast) var(--ease);
  }
  .site-nav__toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 32px; margin-left: 3px; border-radius: 4px; color: var(--c-ink);
    transition: color var(--d-fast) var(--ease);
  }
  .site-nav__toggle svg { width: 10px; height: 10px; transition: transform var(--d-fast) var(--ease); }
  .site-nav__link:hover { text-decoration: none; }
  .site-nav__item:hover .site-nav__link, .site-nav__item:hover .site-nav__toggle,
  [data-open] > .site-nav__trigger > *, .site-nav__link[aria-current] { color: var(--c-red-text); }
  [data-open] > .site-nav__trigger .site-nav__toggle svg { transform: rotate(180deg); }

  /* Dropdown panel: a small white card under its item (EA .dropdown-menu, calmed down). */
  .dropdown {
    position: absolute; top: calc(100% - 10px); left: -16px; z-index: 60;
    width: 320px; padding: 14px 10px; text-align: left;
    background: var(--c-menu); border: 1px solid var(--c-hairline); border-radius: var(--radius-menu); box-shadow: var(--shadow-menu);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity var(--d-base) var(--ease), transform var(--d-base) var(--ease), visibility 0s linear var(--d-base);
  }
  .site-nav__item:last-child > .dropdown { left: auto; right: -12px; }
  [data-open] > .dropdown,
  html:not(.js) .site-nav__item:hover > .dropdown,
  html:not(.js) .site-nav__item:focus-within > .dropdown {
    visibility: visible; opacity: 1; transform: none; transition-delay: 0s;
  }
  .dropdown__label {
    padding: 6px 12px 6px; font-family: var(--f-display); font-weight: 700; font-size: 12px; line-height: 1.2;
    letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--c-muted);
  }
  .dropdown ul { list-style: none; margin: 0; padding: 0; }
  .dropdown a:not(.cta) {
    display: block; padding: 8px 12px; border-radius: 6px;
    font-size: 15px; line-height: 1.35; color: var(--c-ink);
    transition: background-color var(--d-fast) var(--ease);
  }
  .dropdown a:not(.cta):hover { background: var(--c-row-active); text-decoration: none; }
  .dropdown a[aria-current] { font-weight: 500; }
  .dropdown__rule { height: 1px; margin: 10px 12px; border: 0; background: var(--c-hairline); }
  /* The Games menu: each game's icon left of its name (owner, 2026-10-07), in a 40 × 28 box so every name starts
     on the same line: square app and pixel icons 28 px, the 5:3 tvOS icon 40 px wide, "All games" a small grid.
     The phone menu copies these links, icons included (site.js). */
  #menu-games { width: 360px; }
  .dropdown a:not(.cta):has(> .nav-icon), .menu-list__sub a:has(> .nav-icon) { display: flex; align-items: center; gap: 12px; }
  .nav-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 28px; }
  .nav-icon picture { display: contents; }
  .nav-icon img { display: block; width: 28px; height: 28px; border-radius: 22.37%; box-shadow: 0 0 0 1px rgb(0 0 0 / .32); }   /* a firm 1px ring keeps the small icons crisp against the menu (owner) */
  .nav-icon--tv img { width: 40px; height: 24px; border-radius: 12% / 20%; }
  .nav-icon--pixel img { border-radius: 0; box-shadow: none; image-rendering: pixelated; }
  .nav-icon--all svg { width: 24px; height: 24px; fill: var(--c-muted); }
  /* A product that's coming soon (owner, 2026-10-13): listed with its icon, "Coming soon" under its name, no link */
  .nav-item--soon { display: flex; align-items: center; gap: 12px; padding: 8px 12px; font-size: 15px; line-height: 1.35; color: var(--c-ink); cursor: default; }
  .menu-list__sub .nav-item--soon { padding: 9px 0; font-size: 17px; color: var(--c-link-quiet); }
  .nav-soon { display: block; margin-top: 2px; font-family: var(--f-display); font-weight: 600; font-size: 11px; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--c-muted); }

  /* ---------- EA breadcrumb bar (inner pages, under the header) ----------
     Midnight strip (EA masthead), uppercase Rajdhani, red slashes; the last crumb is the current page in white.
     Pages with a local nav don't stack a breadcrumb too: use .local-nav__crumb instead. */
  .breadcrumb { background: var(--c-midnight); border-bottom: 0; }
  .breadcrumb__list {
    display: flex; flex-wrap: wrap; align-items: center; min-height: var(--crumb-h);
    max-width: calc(var(--w-wide) + var(--gutter) * 2); margin: 0 auto; padding: 4px var(--gutter); list-style: none;
    font-family: var(--f-display); font-weight: 600; font-size: 13px; line-height: 1.2;
    letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--c-muted);
  }
  @media (min-width: 768px) { .breadcrumb__list { font-size: 14px; } }
  .breadcrumb__list li { display: inline-flex; align-items: center; }
  /* The slash ends the crumb before it, so a crumb that wraps (320 px) never starts its line with "/" */
  .breadcrumb__list li:not(:last-child)::after { content: "/"; content: "/" / ""; margin-inline: .7em; color: var(--c-red-on-dark); }
  .breadcrumb__list a { display: inline-block; padding: 6px 0; color: var(--c-on-midnight-muted); transition: color var(--d-fast) var(--ease); }
  .breadcrumb__list a:hover { color: var(--c-on-midnight); text-decoration: none; }
  .breadcrumb__list [aria-current] { color: var(--c-on-midnight); }
  /* A middle crumb with no page (Home / Apps / AllSecure; owner, 2026-10-13): the links' colour, not a link */
  .breadcrumb__plain { display: inline-block; padding: 6px 0; color: var(--c-on-midnight-muted); }

  /* ---------- Mobile menu (<768): full-height <dialog> built by site.js ---------- */
  .menu-dialog {
    position: fixed; inset: 0; width: 100%; height: 100%; margin: 0;
    background: var(--c-bg); color: var(--c-ink); overflow-y: auto;
    padding: 0 var(--gutter) 40px;
  }
  .menu-dialog[open] { animation: fade-in var(--d-base) var(--ease); }
  .menu-dialog::backdrop { background: var(--c-bg); }
  .menu-dialog__top { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); margin-right: -10px; }
  .menu-dialog .search-field { margin: 8px 0 16px; }
  .menu-list { list-style: none; margin: 0; padding: 0; }
  .menu-list__row { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
  .menu-list__row > a { font-family: var(--f-display); font-weight: 700; font-size: 24px; line-height: 1.1; padding: 10px 0; letter-spacing: var(--track-nav); text-transform: uppercase; }
  .menu-list > li + li { border-top: 1px solid var(--c-hairline); }
  .menu-list__row > button { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; margin-right: -10px; border-radius: 50%; }
  .menu-list__row > button svg { width: 14px; height: 14px; transition: transform var(--d-fast) var(--ease); }
  .menu-list__row > button[aria-expanded="true"] svg { transform: rotate(180deg); }
  .menu-list__sub { list-style: none; margin: 0 0 16px; padding: 0; }
  .menu-list__sub a { display: block; padding: 9px 0; font-size: 17px; color: var(--c-link-quiet); }
  .menu-list__label {
    padding: 14px 0 4px; font-family: var(--f-display); font-weight: 700; font-size: 12px;
    letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--c-muted);
  }
  .menu-list__sub li:first-child.menu-list__label { padding-top: 2px; }

  /* ---------- Search field (Support hero, 404, mobile menu) ---------- */
  .search-field { position: relative; max-width: 560px; margin-inline: auto; }
  .search-field__glyph { position: absolute; left: 18px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--c-muted); pointer-events: none; }
  .search-field__input {
    width: 100%; height: 52px; padding: 0 18px 0 48px; border-radius: 12px;
    border: 1px solid transparent; background: var(--c-bg); color: var(--c-ink); font-size: 17px;
    -webkit-appearance: none; appearance: none;
  }
  .search-field__input::placeholder { color: var(--c-muted); opacity: 1; }
  .search-field__input:focus-visible { outline: 2px solid var(--c-red-on-dark); outline-offset: 2px; }
  .search-field--light .search-field__input { background: var(--c-band); border-color: var(--c-field-border); }
  .search-field--light .search-field__input:focus-visible { outline-color: var(--c-red); }
  .search-field__input::-webkit-search-cancel-button { -webkit-appearance: none; }

  /* ---------- Segmented link row (.seg): a filter of plain links in a grey track, the current one the white thumb
     (the FAQ results page's game filter; drawn like the TV page's controls). <ul class="seg"><li><a aria-current>.
     Links, not tabs: each loads its own URL. The labels are uppercase here, so names go through caps_safe(); a
     count follows a dot in lighter, untracked type ("PRO iPAD · 3"), so it never reads as part of a device's name.
     The track is at most the results column wide (760 px) and wraps into centred rows, smaller below 1100 px.
     Phones (< 680): no track, a centred wrapping row of plain links, the current one ink and underlined; no
     sideways scrolling. ---------- */
  .seg {
    display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 2px; max-width: min(100%, 760px); margin: 0; padding: 4px;
    border-radius: 24px; background: var(--c-seg-track); list-style: none;
  }
  .seg a {
    display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 18px 8px;
    border-radius: 999px; font-family: var(--f-display); font-weight: 700; font-size: 15px; line-height: 1.2;
    letter-spacing: var(--track-caps); text-transform: uppercase; white-space: nowrap;
    color: var(--c-link-quiet);   /* 8.2:1 on the track (--c-muted would be 4.15:1) */
    transition: background-color var(--d-fast) var(--ease), color var(--d-fast) var(--ease), box-shadow var(--d-fast) var(--ease);
  }
  .seg a:hover { color: var(--c-ink); text-decoration: none; }
  .seg a[aria-current="page"] { background: var(--c-bg); color: var(--c-ink); box-shadow: var(--shadow-seg); }
  .seg a:focus-visible { outline-offset: -2px; }   /* inside the track */
  .seg__count { font-weight: 400; font-size: .87em; letter-spacing: 0; font-variant-numeric: tabular-nums; }
  @media (max-width: 1099px) {
    .seg a { min-height: 36px; padding: 7px 14px 6px; font-size: 14px; }
  }
  @media (max-width: 679px) {
    .seg { display: flex; gap: 2px 18px; padding: 0; border-radius: 0; background: none; }
    .seg a { min-height: 32px; padding: 6px 2px; border-radius: 0; font-size: 13px; }
    .seg a[aria-current="page"] {
      background: none; box-shadow: none;
      text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .4em;
    }
    .seg a:focus-visible { outline-offset: 2px; }
  }
  @media (forced-colors: active) {
    .seg a[aria-current="page"] { outline: 2px solid CanvasText; outline-offset: -2px; }
  }

  /* ---------- ⌘K search dialog (built by site.js) ---------- */
  .search-dialog {
    width: min(640px, calc(100% - 32px)); margin: 120px auto auto; border-radius: 20px;
    background: var(--c-menu); color: var(--c-ink); box-shadow: var(--shadow-dialog); overflow: hidden;
  }
  .search-dialog[open] { animation: dialog-in var(--d-base) var(--ease); }
  .search-dialog::backdrop { background: var(--c-scrim); }
  .search-dialog__field { position: relative; display: flex; align-items: center; border-bottom: 1px solid var(--c-hairline); }
  .search-dialog__field > svg { position: absolute; left: 22px; width: 20px; height: 20px; color: var(--c-muted); pointer-events: none; }
  .search-dialog__input {
    flex: 1; min-width: 0; height: 64px; padding: 0 12px 0 56px; border: 0; background: none;
    font-size: 20px; color: var(--c-ink); -webkit-appearance: none; appearance: none;
  }
  .search-dialog__input:focus-visible { outline: none; }   /* the field's red underline is the focus ring */
  .search-dialog__field:focus-within { box-shadow: inset 0 -2px 0 var(--c-red); }
  .theme-dark .search-dialog__field:focus-within { box-shadow: inset 0 -2px 0 var(--c-red-on-dark); }
  .search-dialog__input::placeholder { color: var(--c-muted); opacity: 1; }
  .search-dialog__input::-webkit-search-cancel-button { -webkit-appearance: none; }
  .search-dialog__close { margin-right: 10px; flex: none; }
  .search-dialog__body { max-height: min(60vh, 520px); overflow-y: auto; padding: 16px 12px 20px; }
  .search-dialog__label { padding: 4px 12px 8px; font-family: var(--f-text); font-size: var(--t-fine); font-weight: 400; color: var(--c-muted); }
  .search-dialog__quick ul, .search-results { list-style: none; margin: 0; padding: 0; }
  .search-dialog__quick a { display: block; padding: 10px 12px; border-radius: 10px; font-size: 17px; }
  .search-dialog__quick a:hover { background: var(--c-row-active); text-decoration: none; }
  .search-result { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
  .search-result[aria-selected="true"] { background: var(--c-row-active); box-shadow: inset 3px 0 0 var(--c-ink); }
  .search-result__title { font-size: 17px; line-height: 1.3; }
  .search-result__section { font-size: var(--t-fine); color: var(--c-muted); }
  .search-dialog__empty { padding: 12px; font-size: 17px; color: var(--c-muted); }
  .search-dialog__all { padding: 8px 12px 0; }
  .search-dialog__all a { font-size: var(--t-small); font-weight: 500; color: var(--c-red-text); }
  /* Opened from a game's Support page: "Answers for <game> only", and the switch to every result */
  .search-dialog__scope { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 0 12px 10px; font-size: var(--t-small); line-height: 1.4; color: var(--c-muted); }
  .search-dialog__scope strong { font-weight: 500; color: var(--c-ink); }
  .search-dialog__scope button { min-height: 24px; text-decoration: underline; text-underline-offset: .2em; color: var(--c-link-quiet); }
  .search-dialog__scope button:hover { color: var(--c-ink); }
  /* Shortcut hint + the switch for the "/" shortcut (WCAG 2.1.4). Keyboard-and-pointer devices only. */
  .search-dialog__foot {
    display: none; align-items: center; gap: 4px 12px; flex-wrap: wrap;
    padding: 10px 24px 12px; border-top: 1px solid var(--c-hairline);
    font-size: var(--t-fine); line-height: 1.45; color: var(--c-muted);
  }
  @media (hover: hover) and (pointer: fine) { .search-dialog__foot { display: flex; } }
  .search-dialog__foot kbd {
    display: inline-block; min-width: 20px; padding: 0 5px; border: 1px solid var(--c-hairline); border-radius: 4px;
    font-size: 12px; line-height: 18px; text-align: center; color: var(--c-ink);
  }
  .search-dialog__foot button { min-height: 24px; text-decoration: underline; text-underline-offset: .2em; color: var(--c-link-quiet); }
  .search-dialog__foot button:hover { color: var(--c-ink); }
  @media (max-width: 767px) {
    .search-dialog { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; border-radius: 0; }
    .search-dialog__body { max-height: none; }
  }

  /* ---------- Device frames (§2.6): generic, logo-free, drawn in CSS ---------- */
  .device {
    --bezel: calc(var(--w) * .022); --radius: calc(var(--w) * .05);
    width: var(--w); padding: var(--bezel); border-radius: var(--radius);
    background: var(--c-device); background-image: linear-gradient(180deg, var(--c-device-top), var(--c-device));
    box-shadow: inset 0 0 0 1px var(--c-device-edge), var(--shadow-device);
  }
  /* Phone: the 5.5-inch creatives have square screens and the cards start ~10 source px below the
     crop, so the screen radius stays small (.06w) or the corner cards get clipped. */
  .device--phone { --bezel: calc(var(--w) * .034); --radius: calc(var(--w) * .13); }
  .device img { width: 100%; height: auto; border-radius: calc(var(--radius) - var(--bezel)); }
  .device--phone img { border-radius: calc(var(--w) * .06); }
  .device picture { display: block; }
  .band--dark .device, .tile--dark .device { background: var(--c-device-dark); background-image: none; box-shadow: inset 0 0 0 1px var(--c-device-edge-dark); }
  /* iPad Pro (M5, 13-inch) for the home page's iPad features (owner, 2026-10-13: "a rendering of the latest iPad Pro").
     From Apple's published measurements (215.5 × 281.6 mm; display 2064 × 2752 at 264 ppi): a uniform black glass bezel
     3.9% of the width, concentric corners (6% outside, 2.1% on the screen), a thin aluminium edge (space black on
     light, silver on dark tiles) and the front camera on the long edge. Logo-free like every device here. */
  .device--ipad-pro {
    --edge: max(1.5px, calc(var(--w) * .004)); --bezel: calc(var(--w) * .039); --radius: calc(var(--w) * .06);
    position: relative; padding: calc(var(--bezel) - var(--edge)); border: var(--edge) solid transparent;
    background:
      linear-gradient(var(--c-pro-glass), var(--c-pro-glass)) padding-box,
      linear-gradient(145deg, var(--c-pro-alu-hi), var(--c-pro-alu) 28%, var(--c-pro-alu) 72%, var(--c-pro-alu-hi)) border-box;
    box-shadow: inset 0 0 0 1px var(--c-device-edge), var(--shadow-device);
  }
  .device--ipad-pro img { border-radius: calc(var(--w) * .021); }
  /* The front camera is on the long edge with the volume buttons and the Apple Pencil magnet: upright (top button up),
     the middle of the right bezel, as the Simulator's own iPad Pro chrome puts the volume buttons (owner, 2026-10-13:
     "check that the camera is positioned properly") */
  .device--ipad-pro::before {
    content: ""; position: absolute; top: 50%; right: calc((var(--bezel) - var(--edge)) / 2);
    width: calc(var(--w) * .009); aspect-ratio: 1; border-radius: 50%; transform: translate(50%, -50%);
    background: var(--c-pro-camera); box-shadow: 0 0 0 1px var(--c-pro-camera-ring);
  }
  /* On its side (owner, 2026-10-13: "the screenshots need to be in landscape mode on ipad"): the same device measured
     off the long edge (each share × 215.5 / 281.6 = .765), the front camera centred on the left bezel (owner,
     2026-10-13: "landscape phones and tablets should have camera on left side"). The screen (.94 × .705 of the
     width) is the 2752 × 2064 display's own 4:3. */
  .device--ipad-pro.device--landscape { --edge: max(1.5px, calc(var(--w) * .003)); --bezel: calc(var(--w) * .0298); --radius: calc(var(--w) * .0459); }
  .device--ipad-pro.device--landscape img { border-radius: calc(var(--w) * .0161); }
  .device--ipad-pro.device--landscape::before { top: 50%; right: auto; left: calc((var(--bezel) - var(--edge)) / 2); width: calc(var(--w) * .0069); transform: translate(-50%, -50%); }
  :is(.band--dark, .tile--dark) .device--ipad-pro {
    background:
      linear-gradient(var(--c-pro-glass), var(--c-pro-glass)) padding-box,
      linear-gradient(145deg, var(--c-pro-silver-hi), var(--c-pro-silver) 28%, var(--c-pro-silver) 72%, var(--c-pro-silver-hi)) border-box;
    box-shadow: inset 0 0 0 1px var(--c-device-edge-dark), var(--shadow-device);
  }
  /* iPhone 18 Pro for the home page's iPhone features (owner, 2026-10-13: "a real solitaire iPhone feature on an iPhone
     18 Pro mockup"). From Apple's specs (150.0 × 71.9 mm; 6.3-inch 2622 × 1206 at 460 ppi): a black bezel 3.7% of the
     width all round, concentric corners (16.4% outside, 12.7% on the screen), the aluminium unibody's edge (black on
     light, silver on dark tiles) and the Dynamic Island. Its screens: images/devices/iphone18pro-*. */
  .device--iphone-pro {
    --edge: max(1.5px, calc(var(--w) * .008)); --bezel: calc(var(--w) * .037); --radius: calc(var(--w) * .164);
    position: relative; padding: calc(var(--bezel) - var(--edge)); border: var(--edge) solid transparent;
    background:
      linear-gradient(var(--c-pro-glass), var(--c-pro-glass)) padding-box,
      linear-gradient(145deg, var(--c-pro-alu-hi), var(--c-pro-alu) 28%, var(--c-pro-alu) 72%, var(--c-pro-alu-hi)) border-box;
    box-shadow: inset 0 0 0 1px var(--c-device-edge), var(--shadow-device);
  }
  .device--iphone-pro img { border-radius: calc(var(--w) * .127); }
  .device--iphone-pro::before {
    content: ""; position: absolute; z-index: 1; left: 50%; top: calc(var(--bezel) - var(--edge) + var(--w) * .025);
    width: calc(var(--w) * .29); height: calc(var(--w) * .086); transform: translateX(-50%);
    border-radius: 999px; background: var(--c-pro-glass);
  }
  :is(.band--dark, .tile--dark) .device--iphone-pro {
    background:
      linear-gradient(var(--c-pro-glass), var(--c-pro-glass)) padding-box,
      linear-gradient(145deg, var(--c-pro-silver-hi), var(--c-pro-silver) 28%, var(--c-pro-silver) 72%, var(--c-pro-silver-hi)) border-box;
    box-shadow: inset 0 0 0 1px var(--c-device-edge-dark), var(--shadow-device);
  }
  /* A bleed stage shows a fixed share of the frame; the band/tile (overflow:hidden) cuts the rest. */
  .bleed { --show: .76; width: var(--w); height: calc(var(--w) * var(--show)); margin-inline: auto; }
  .bleed--phone { --show: 1.2; }
  .bleed--hero { --w: clamp(300px, 40vw + 144px, 720px); }           /* product hero tablet */
  .split .bleed { --w: clamp(300px, 24.76vw + 203px, 560px); }       /* split-section tablet */
  .split .bleed--phone { --w: clamp(200px, 5.7vw + 178px, 260px); }

  /* ---------- Home: hero + tiles (§3.1) ---------- */
  .tile {
    position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center;
    padding: var(--tile-pad-top) var(--gutter) 0; background: var(--c-band); text-align: center;
  }
  .tile--dark { background: var(--c-surface-dark); color: var(--c-on-dark); }
  /* A home feature is one link (owner, 2026-10-13): .tile__link covers the tile; the links and badge sit above it.
     Hovering anywhere on the tile underlines its Learn more, the link it stands for. */
  .tile__link { position: absolute; inset: 0; z-index: 1; }
  .tile .cta-row { position: relative; z-index: 2; pointer-events: none; }   /* the gaps between the links open the tile too */
  .tile .cta-row > * { pointer-events: auto; }
  .tile:has(> .tile__link:hover) .cta-row .cta:not(.cta--quiet) { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .24em; }
  .tile__media { margin-top: auto; padding-top: var(--gap-cta-media); width: 100%; }
  .tile .sub { font-size: clamp(19px, .38vw + 17.5px, 24px); }
  .tile--hero .sub { font-size: var(--t-sub); }
  .tile .eyebrow + .tile-title { margin-top: 8px; }
  .tiles { display: grid; gap: var(--tile-gap); padding-block: var(--tile-gap); }
  @media (min-width: 768px) { .tiles { padding: var(--tile-gap); } }
  @media (min-width: 1024px) {
    .tiles { grid-template-columns: 1fr 1fr; }
    .tile--wide { grid-column: 1 / -1; }
  }

  /* Home placements (config home.featured, partials/home-feature.twig): one product each. A tablet or phone
     bleeds off the tile's bottom edge; both half tiles get ~the same stage height at 1024+. */
  /* The iPads lie in landscape (owner, 2026-10-13). A half tile's shows as much height as the iPhone's beside it
     (300px at 1024, 340–350 at 1440); on phones and tablets, where tiles stack, most of the tile's width. */
  .tile--tablet .bleed { --w: min(88vw, 440px); --show: .66; }
  /* The iPhone as Apple sizes a single phone in a tile (owner, 2026-10-13: "can the iphone be larger?"): about half the
     tile's width, cut off by the tile's foot, its visible height level with the iPad Pro beside it */
  .tile--phone .bleed { --w: 240px; --show: 1.05; }
  @media (min-width: 768px) { .tile--tablet .bleed { --w: 520px; --show: .62; } .tile--phone .bleed { --w: 300px; --show: 1; } }
  @media (min-width: 1024px) {
    .tile--tablet .bleed { --w: clamp(484px, 18.3vw + 297px, 560px); --show: .62; }
    .tile--phone .bleed { --w: clamp(300px, 9.6vw + 202px, 340px); --show: 1; }
  }
  .tile--wide.tile--phone .bleed { --show: 1; }
  /* The hero iPad as Apple sizes one (owner, 2026-10-13: "can we make the main feature ipad larger?"): in landscape,
     about two thirds of a 1440 window (960px; 980 at most), nearly the full width on phones, its foot under the
     tile's edge so the screen rises into view (.66 of the width shows: the whole table, the toolbar below the fold). */
  .tile--hero.tile--tablet .bleed { --w: min(88vw, clamp(340px, 46vw + 300px, 980px)); --show: .66; }
  .tile--hero.tile--phone .bleed { --w: clamp(280px, 8vw + 200px, 380px); --show: 1; }
  /* A tile tinted to its screen (HomeController tints; owner, 2026-10-13: concept 1 "Day into night"): a night sky
     behind Pro's Night theme, a sunset cream behind the iPhone's Province */
  .tile.tile--tint-night { background: radial-gradient(70% 60% at 50% 85%, var(--c-tile-night-glow) 0%, var(--c-tile-night) 55%, var(--c-tile-night-edge) 100%); }
  .tile.tile--tint-sunset { background: linear-gradient(180deg, var(--c-tile-sunset-top) 0%, var(--c-tile-sunset-bottom) 100%); }
  /* Home and Games titles: REAL SOLITAIRE [▯ iPad] (owner, 2026-10-13, Option A of proposal/headline/; the Games page's
     section headings too, the large titles only: its apps keep their name and device line), and the product pages'
     hero and closing names (owner, 2026-10-14). The product pages'
     pill (.platform-pill, below) at a big title's scale: the label .42 of the title, its caps centred on the title's
     caps (Rajdhani cap height .643em: lift .3215em × (1 − .42) / .42 = .444em), and a 2px ring to match the weight. */
  .tile > :is(.display, .tile-title) > .platform-pill, :is(.games-device, .games-tvapp) > .tile-title .platform-pill,
  :is(.product-hero__name, .closing__name) > .platform-pill { font-size: .42em; top: -.444em; margin-left: .5em; padding: .3em .78em .22em .62em; letter-spacing: .02em; }
  .tile > :is(.display, .tile-title) > .platform-pill::before, :is(.games-device, .games-tvapp) > .tile-title .platform-pill::before,
  :is(.product-hero__name, .closing__name) > .platform-pill::before { border-width: 2px; opacity: .28; }
  .tile--dark > :is(.display, .tile-title) > .platform-pill::before, .games-device.band--dark > .tile-title .platform-pill::before,
  .band--dark > :is(.product-hero__name, .closing__name) > .platform-pill::before { opacity: .4; }
  /* Games headings (owner, 2026-10-13: "make the pill taller on games page"): the label .46 of the title and .12em more
     air above and below, so the pill stands a little taller than the title's caps; still centred on them
     (lift .3215 × (1 − .46) / .46 = .377em) */
  :is(.games-device, .games-tvapp) > .tile-title .platform-pill { font-size: .46em; top: -.377em; padding: .42em .92em .34em .74em; }
  /* A narrow screen drops the pill under a whole name (REAL SOLITAIRE / [iPad]), never REAL / SOLITAIRE [iPad]; a
     name with no pill (Real Solitaire Retro) still wraps as it needs */
  .tile > :is(.display, .tile-title) > .product-title__name:not(:only-child), :is(.games-device, .games-tvapp) > .tile-title .product-title__name:not(:only-child),
  :is(.product-hero__name, .closing__name) > .product-title__name:not(:only-child) { white-space: nowrap; }

  /* TV: a black flat-panel TV playing the game, with the focused tvOS icon and the Siri Remote in front of it,
     on a soft spotlight. Sized off the stage's own width (container units). */
  .tile--tv { background: radial-gradient(60% 55% at 50% 60%, var(--c-tvos-stage-center) 0%, var(--c-tvos-stage-mid) 45%, var(--c-tvos-stage-edge) 100%); }
  .tvstage.tvstage--tv { display: block; container-type: inline-size; width: min(92%, 560px); margin: 0 auto 64px; }
  .tile--hero .tvstage.tvstage--tv { width: min(94%, 720px); margin-bottom: 80px; }
  .tvset { position: relative; }
  .tvset__screen { aspect-ratio: 16 / 9; padding: 1.1cqw; border-radius: 1.6cqw; background: linear-gradient(180deg, var(--c-tv-bezel-top), var(--c-tv-bezel-bottom) 30%);
    box-shadow: inset 0 0 0 1px var(--c-tv-ring), 0 1px 0 var(--c-tv-black), 0 34px 50px -30px rgb(0 0 0 / .55); }
  .tvset__screen picture, .tvset__screen img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: .5cqw; }
  .tvset__stand { position: relative; display: block; width: 30%; height: 4.6cqw; margin: 0 auto; }
  .tvset__stand::before { content: ""; position: absolute; left: 44%; right: 44%; top: 0; height: 75%; background: linear-gradient(90deg, var(--c-tv-stand), var(--c-tv-stand-light) 50%, var(--c-tv-stand)); }
  .tvset__stand::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; border-radius: 1cqw 1cqw .4cqw .4cqw;
    background: linear-gradient(180deg, var(--c-tv-base-top), var(--c-tv-base-bottom)); box-shadow: 0 10px 14px -8px rgb(0 0 0 / .5); }
  .tvstage__front { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 6cqw; margin-top: -13cqw; }
  .tvstage--tv .tvapp-icon { width: 38cqw; box-shadow: 0 2px 0 rgba(0, 0, 0, .06), 0 26px 40px -16px rgba(0, 0, 0, .55); }
  .tvstage--tv .tvstage__remote { height: 24cqw; }
  .tvstage--tv .tvstage__controller { width: 26cqw; }

  /* Retro: the night stage with the compact color Mac (neon rim glow) */
  .tile--retro { isolation: isolate; color: var(--c-on-dark);
    background: var(--c-night); background-image: radial-gradient(70% 45% at 50% 72%, var(--c-night-dusk), transparent 72%), linear-gradient(180deg, var(--c-night-deep) 0%, var(--c-night) 40%, var(--c-night) 78%, var(--c-night-deep) 100%); }
  .tile--retro > :not(.night-floor):not(.night-glow):not(.tile__link):not(.cta-row) { position: relative; z-index: 1; }
  /* Its full-tile link above the night and the art, its links above that (owner, 2026-10-13: the whole Retro feature opens /retro) */
  .tile--retro > .tile__link { z-index: 2; }
  .tile--retro > .cta-row { position: relative; z-index: 3; }
  .tile--retro .night-floor { height: 150px; } .tile--retro .night-glow { top: 62%; }
  .tile--retro .eyebrow { color: var(--c-on-dark-muted); } .tile--retro .eyebrow--product, .tile--retro .display { color: var(--c-on-dark); }
  .tile--retro .sub { color: var(--c-on-night-sub); }
  .tile--retro .cta { color: var(--c-red-on-dark); }
  .tile-retro__machine { display: block; width: min(400px, 80%); height: auto; margin: 0 auto 36px;
    filter: var(--filter-neon-machine); }
  .tile--hero .tile-retro__machine { width: min(520px, 82%); margin-bottom: 56px; }
  .tile--hero.tile--retro .night-floor { height: 200px; }

  /* ---------- Shared product stages (Home tiles + Games bands) ---------- */
  /* Real Solitaire for TV stage: an Apple-style product shot; the tvOS icon
     (focused: lifted, glossy sheen) with a silver Siri Remote beside it, both reflected on a glossy floor
     (-webkit-box-reflect: Safari and Chromium; elsewhere simply no reflection). Icon corners are concentric
     with the art's felt: felt radius 119 + rail 34 = 153 of 1280 x 768 → 12% / 20%. */
  .tvstage { display: flex; justify-content: center; align-items: flex-end; gap: clamp(28px, 4vw, 56px); margin: 0 auto 104px; }
  /* The mirror image (owner, 2026-10-07: "doesn't render right"): the reflection is on the picture, not the link,
     so the link's drop shadow isn't mirrored into a square box; the icon images have transparent corners in the
     same 12% / 20% shape, and the corners are rounded on the picture, image and sheen rather than by an overflow
     clip, which box-reflect ignores. No hover zoom (owner, 2026-10-07): the icon stays still. */
  .tvapp-icon { position: relative; display: block; width: 250px; border-radius: 12% / 20%;
    box-shadow: 0 2px 0 rgba(0, 0, 0, .05), 0 30px 46px -20px rgba(0, 0, 0, .45); }
  .tvapp-icon picture { display: block; border-radius: inherit;
    -webkit-box-reflect: below 14px linear-gradient(transparent 74%, rgba(255, 255, 255, .26)); }
  .tvapp-icon img { display: block; width: 100%; height: auto; border-radius: inherit; }
  .tvapp-icon::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
    background: linear-gradient(118deg, rgba(255, 255, 255, .38) 0%, rgba(255, 255, 255, .08) 32%, transparent 46%); }
  .tvstage__remote { width: auto; height: 132px; flex: none; transform: rotate(-8deg); transform-origin: 50% 100%;
    filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .22));
    -webkit-box-reflect: below 10px linear-gradient(transparent 78%, rgba(255, 255, 255, .22)); }
  /* A generic, logo-free game controller to the right of the remote (the tvOS app supports extended and micro
     gamepads: RealSolitaire-tvOS/Info.plist GCSupportedGameControllers). Sized like the real thing: about 1.1x
     the remote's length; the same shadow and floor reflection. */
  .tvstage__controller { width: 146px; height: auto; flex: none; transform: rotate(4deg); transform-origin: 50% 100%;
    filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .22));
    -webkit-box-reflect: below 10px linear-gradient(transparent 78%, rgba(255, 255, 255, .22)); }
  @media (min-width: 768px) { .tvapp-icon { width: 340px; } .tvstage__remote { height: 178px; } }
  @media (min-width: 768px) { .tvstage__controller { width: 196px; } }
  /* Phones (Games band): icon, remote and controller shrink together so the row never overflows. */
  @media (max-width: 767px) {
    .tvstage:not(.tvstage--tv) { gap: 4vw; }
    .tvstage:not(.tvstage--tv) .tvapp-icon { width: 44vw; }
    .tvstage:not(.tvstage--tv) .tvstage__remote { height: 26vw; }
    .tvstage:not(.tvstage--tv) .tvstage__controller { width: 29vw; }
  }


  /* Real Solitaire Retro night stage: the Retro page's sunset glow and pink perspective grid floor (decorative). */
  .night-glow { position: absolute; left: 50%; top: 40%; z-index: 0; width: min(900px, 140%); aspect-ratio: 2 / 1; transform: translate(-50%, -50%);
    background: radial-gradient(closest-side, rgb(242 54 91 / .30), rgb(229 63 180 / .12) 55%, transparent 100%); pointer-events: none; }
  .night-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 180px; z-index: 0; overflow: hidden; pointer-events: none;
    perspective: 260px; perspective-origin: 50% 0;
    -webkit-mask-image: linear-gradient(to bottom, black 0, black 55%, transparent 100%); mask-image: linear-gradient(to bottom, black 0, black 55%, transparent 100%); }
  .night-floor::before { content: ""; position: absolute; left: -150%; right: -150%; top: 0; height: 300%;
    transform: rotateX(78deg); transform-origin: 50% 0;
    background-image: linear-gradient(to right, rgb(229 63 180 / .55) 1.5px, transparent 1.5px), linear-gradient(to bottom, rgb(229 63 180 / .55) 1.5px, transparent 1.5px);
    background-size: 56px 56px; background-position: 50% 0;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, black 18%); mask-image: linear-gradient(to bottom, transparent 0, black 18%); }
  .night-floor::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
    background: linear-gradient(90deg, transparent 8%, rgb(255 106 61 / .8) 35%, rgb(255 106 61 / .8) 65%, transparent 92%); }

  /* ---------- Local nav (product pages, §2.9) ---------- */
  html:has(.local-nav) { scroll-padding-top: 68px; }
  .local-nav { position: sticky; top: 0; z-index: 40; background: var(--c-bg); border-bottom: 1px solid var(--c-hairline); }
  /* Dark pages: a translucent bar, so a lit stage glows through as it scrolls under (solid without blur support). */
  .theme-dark .local-nav { background: var(--c-localnav-glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
  @supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .theme-dark .local-nav { background: var(--c-bg); } }
  .local-nav__inner {
    position: relative; display: flex; align-items: center; gap: 12px; height: var(--localnav-h);
    max-width: calc(var(--w-wide) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter);   /* lines up with the header logo */
  }
  .local-nav__lead { margin-right: auto; display: flex; align-items: center; min-width: 0; }
  /* Optional EA crumb before the title, so product pages don't stack a breadcrumb bar too. */
  .local-nav__crumb {
    flex: none; padding: 6px 0; font-family: var(--f-display); font-weight: 600; font-size: 13px;
    letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--c-muted);
  }
  .local-nav__crumb::after { content: "/"; content: "/" / ""; margin-inline: .7em; color: var(--c-sep); }
  .local-nav__crumb:hover { color: var(--c-red-text); text-decoration: none; }
  /* A flex row (product_title(): name + pill), so a name too long for the bar ends in "…" and the pill stays whole. */
  .local-nav__title {
    display: flex; align-items: baseline; margin-right: auto; padding: 6px 0; white-space: nowrap; overflow: hidden;
    font-family: var(--f-display); font-weight: 700; font-size: 18px; line-height: 1.1;
    letter-spacing: .06em; text-transform: uppercase;
  }
  .local-nav__title .product-title__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .local-nav__title .platform-pill { flex: none; }
  .local-nav__lead .local-nav__title { margin-right: 0; }
  /* The Themes icon (pm.icon('themes'); owner, 2026-10-19): the iOS apps' own Themes game button, palette and brush,
     baked by realsolitaire-ipad-v7 tools/make-game-button-icons.swift (its Theme tip cut, @3x: 144px, sharp up to
     48px at 3x). A white mask over the text colour, so it tints like the line icons it sits with. */
  .icon--themes { background: currentColor; -webkit-mask: url("../../images/icons/themes.png") center / contain no-repeat; mask: url("../../images/icons/themes.png") center / contain no-repeat; }

  /* Platform pill after a product name (product_title()): REAL SOLITAIRE (▯ iPhone). A hairline capsule in the text
     colour, so it works on light, dark-hero and Retro pages, with a line glyph of the device; the platform keeps its
     own case. Optically centred on the title's caps (Rajdhani cap height .643em): line-height 1.1 and .25/.19em
     padding centre the box on the label's caps, and top lifts it by .3215em × (1 − .68) / .68 onto the title's.
     position: relative rather than vertical-align, so it lines up the same in the hero (inline) and the nav (flex).
     The label never drops below 11px (Rajdhani's small x-height): at 15–16px titles the lift is then up to .4px
     high, which doesn't show. */
  .platform-pill {
    position: relative; top: -.151em; isolation: isolate;
    display: inline-block; margin-left: .62em; padding: .25em .64em .19em .52em; border-radius: 999px;
    font-family: var(--f-display); font-weight: 700; font-size: max(.68em, 11px); line-height: 1.1; letter-spacing: .03em;
    text-transform: none; white-space: nowrap; color: inherit;
  }
  /* The ring: the text colour at 30% (36% on dark), drawn by a pseudo-element because color-mix() is past the
     Safari 15.4 floor. A border, not a shadow, so it survives forced colours. */
  .platform-pill::before {
    content: ""; position: absolute; inset: 0; z-index: -1; border: 1px solid currentColor; border-radius: inherit; opacity: .3;
  }
  :is(.theme-dark, .tile--dark, .band--dark, .band--midnight) .platform-pill::before { opacity: .36; }
  .platform-pill__glyph {
    display: inline-block; width: auto; height: .9em; margin-right: .34em; vertical-align: -.128em; overflow: visible;
    fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  }
  .local-nav__title:hover { text-decoration: none; }
  /* Phones: the longest names ("Real Solitaire Pro for iPhone") fit down to 360 px instead of ending in "…" */
  @media (max-width: 429px) { .local-nav .local-nav__title { font-size: 16px; letter-spacing: .02em; } }
  @media (max-width: 374px) {
    .local-nav .local-nav__title { font-size: 15px; letter-spacing: .01em; }
    /* 320: the full "REAL SOLITAIRE PRO (iPhone)" fits; "…" is the last resort. The pill drops its glyph and tightens,
       and the bar's gaps go from 12 to 8px (the toggle keeps its 44px target). */
    .local-nav__inner { gap: 8px; }
    .local-nav__title .platform-pill { margin-left: .45em; padding-inline: .45em; }
    .local-nav__title .platform-pill__glyph { display: none; }
  }
  .local-nav__links { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
  .local-nav__links a {
    display: inline-block; padding: 6px 0; font-family: var(--f-display); font-weight: 600; font-size: 14px;
    letter-spacing: .1em; text-transform: uppercase; color: var(--c-ink); opacity: .8;
  }
  .local-nav__links a:hover, .local-nav__links a[aria-current] { opacity: 1; }
  .local-nav__links a[aria-current] { box-shadow: inset 0 -1px 0 var(--c-ink); }
  .local-nav__toggle { display: none; }
  .local-nav .btn { margin-left: 12px; }
  @media (max-width: 767px) {
    .local-nav__toggle { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; }
    .local-nav__toggle svg { width: 12px; height: 12px; transition: transform var(--d-fast) var(--ease); }
    .local-nav__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
    .local-nav__title { font-size: 17px; }
    .local-nav__crumb { display: none; }
    .local-nav .btn { margin-left: 0; }
    .local-nav__menu {
      position: absolute; left: 0; right: 0; top: 100%; padding: 8px var(--gutter) 16px;
      background: var(--c-menu); border-bottom: 1px solid var(--c-hairline); box-shadow: var(--shadow-flyout);
      visibility: hidden; opacity: 0; transform: translateY(-8px);
      transition: opacity var(--d-base) var(--ease), transform var(--d-base) var(--ease), visibility 0s linear var(--d-base);
    }
    .local-nav[data-open] .local-nav__menu, html:not(.js) .local-nav__inner:focus-within .local-nav__menu { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
    .local-nav__links { flex-direction: column; gap: 0; }
    .local-nav__links a { display: block; padding: 12px 0; font-size: 16px; opacity: 1; }
    .local-nav__links a[aria-current] { box-shadow: none; font-weight: 500; }
  }

  /* ---------- Rating (typographic, product pages) ---------- */
  .stars {
    --star: clamp(22px, .76vw + 19px, 30px);
    --star-path: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.2l2.95 6.3 6.85.8-5.08 4.7 1.36 6.8L12 17.4l-6.08 3.4 1.36-6.8L2.2 9.3l6.85-.8z'/%3E%3C/svg%3E");
    position: relative; width: calc(var(--star) * 5); height: var(--star); margin: 16px auto 0;
  }
  .stars::before, .stars::after {
    content: ""; position: absolute; inset: 0; background: var(--c-ink);
    -webkit-mask: var(--star-path) 0 0 / var(--star) var(--star) repeat-x; mask: var(--star-path) 0 0 / var(--star) var(--star) repeat-x;
  }
  .stars::before { opacity: .22; }
  .stars::after { right: auto; width: calc(var(--rating) / 5 * 100%); }

  /* ---------- Theme picker (CSS-only, product pages) ---------- */
  .theme-picker__dots { display: flex; justify-content: center; gap: 4px; margin-top: var(--gap-sub-cta); }
  .theme-dot { position: relative; display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; }
  .theme-dot input {
    -webkit-appearance: none; appearance: none; margin: 0; width: 32px; height: 32px; border-radius: 50%;
    background: var(--sw); box-shadow: 0 0 0 1px var(--swatch-ring); cursor: pointer;
    transition: box-shadow var(--d-fast) var(--ease);
  }
  .theme-dot input:checked { box-shadow: 0 0 0 1px var(--swatch-ring), 0 0 0 3px var(--c-surface-dark), 0 0 0 5px var(--c-on-dark); }
  .theme-dot input:focus-visible { outline: 2px solid var(--c-red-on-dark); outline-offset: 7px; }
  .theme-picker__names { margin-top: 8px; font-size: 17px; color: var(--c-on-dark); min-height: 1.5em; }
  .theme-picker__names > span { display: none; }            /* without :has() the radios' own labels carry the names */
  .theme-picker .bleed { --w: clamp(280px, 22.86vw + 191px, 520px); margin-top: var(--gap-cta-media); }
  .theme-screen + .theme-screen { margin-top: 12px; }        /* fallback: the screens simply stack */
  @supports selector(:has(a)) {
    .theme-picker__screens { display: grid; }
    .theme-screen, .theme-screen + .theme-screen { grid-area: 1 / 1; margin: 0; opacity: 0; transition: opacity var(--d-theme) var(--ease); }
    /* Dots, names and screens pair up by position (up to eight themes), so a new theme needs no CSS */
    .theme-picker:has(.theme-dot:nth-of-type(1) :checked) .theme-screen:nth-child(1),
    .theme-picker:has(.theme-dot:nth-of-type(2) :checked) .theme-screen:nth-child(2),
    .theme-picker:has(.theme-dot:nth-of-type(3) :checked) .theme-screen:nth-child(3),
    .theme-picker:has(.theme-dot:nth-of-type(4) :checked) .theme-screen:nth-child(4),
    .theme-picker:has(.theme-dot:nth-of-type(5) :checked) .theme-screen:nth-child(5),
    .theme-picker:has(.theme-dot:nth-of-type(6) :checked) .theme-screen:nth-child(6),
    .theme-picker:has(.theme-dot:nth-of-type(7) :checked) .theme-screen:nth-child(7),
    .theme-picker:has(.theme-dot:nth-of-type(8) :checked) .theme-screen:nth-child(8) { opacity: 1; }
    .theme-picker:has(.theme-dot:nth-of-type(1) :checked) .theme-picker__names > :nth-child(1),
    .theme-picker:has(.theme-dot:nth-of-type(2) :checked) .theme-picker__names > :nth-child(2),
    .theme-picker:has(.theme-dot:nth-of-type(3) :checked) .theme-picker__names > :nth-child(3),
    .theme-picker:has(.theme-dot:nth-of-type(4) :checked) .theme-picker__names > :nth-child(4),
    .theme-picker:has(.theme-dot:nth-of-type(5) :checked) .theme-picker__names > :nth-child(5),
    .theme-picker:has(.theme-dot:nth-of-type(6) :checked) .theme-picker__names > :nth-child(6),
    .theme-picker:has(.theme-dot:nth-of-type(7) :checked) .theme-picker__names > :nth-child(7),
    .theme-picker:has(.theme-dot:nth-of-type(8) :checked) .theme-picker__names > :nth-child(8) { display: inline; }
  }

  /* (Compare, "Free or Pro?": assets/css/pages/product-compare.css) */

  /* ---------- App grid (Games: four apps, no cards) ---------- */
  .app-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px 16px; max-width: var(--w-wide); margin: var(--gap-cta-media) auto 0; list-style: none; padding: 0; text-align: center; }
  @media (min-width: 1024px) { .app-grid { grid-template-columns: repeat(4, 1fr); gap: 32px; } }
  .app__icon { display: block; width: clamp(112px, 4.57vw + 94px, 160px); aspect-ratio: 1; margin: 0 auto 20px; border-radius: 22.37%; }
  .app__icon img { width: 100%; height: 100%; border-radius: 22.37%; }   /* the img sits in <picture>, so inherit would get 0 */
  .app__icon--empty { visibility: hidden; }                          /* Pro icons not fetched: keep the baseline */
  .app__name span { display: block; color: var(--c-muted); font-weight: 600; }
  /* An app's icon and name are links to its page (games.twig, owner 2026-10-13): the name keeps its colours; the icon
     behaves as a link, not a picture (nothing in it can be dragged out or selected, as the header logo); pointing at
     either underlines the app's Learn more, as the home tiles do */
  .app__name a { color: inherit; text-decoration: none; }
  .app__name a:hover { text-decoration: none; }
  :is(.app__icon, .retro-icon) { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
  :is(.app__icon, .retro-icon) > * { pointer-events: none; -webkit-user-drag: none; }
  .app:has(> :is(a.app__icon, a.retro-icon):hover, > .app__name a:hover) .cta:not(.cta--quiet) { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .24em; }
  .app__tagline { margin-top: 8px; font-size: var(--t-body); }
  .app .price-line { margin-top: 4px; }
  .app .cta-row { margin-top: var(--gap-sub-cta); flex-direction: column; gap: 0; }   /* the site's one text-to-links gap (owner: consistent everywhere) */
  @media (min-width: 768px) { .app .cta-row { flex-direction: row; gap: 4px 20px; } }

  /* ---------- Specs ---------- */
  .specs { max-width: var(--w-content); margin: var(--gap-cta-media) auto 0; border-bottom: 1px solid var(--c-hairline); }
  .specs__row { display: grid; gap: 4px; padding: 18px 0; border-top: 1px solid var(--c-hairline); }
  .specs__row dt { font-size: var(--t-small); color: var(--c-muted); }
  .specs__row dd { margin: 0; font-size: var(--t-body); }
  @media (min-width: 768px) {
    .specs__row { grid-template-columns: 30% 70%; gap: 0; padding: 20px 0; }
    .specs__row dt { font-size: var(--t-body); color: var(--c-ink); font-weight: 500; }
  }

  /* ---------- Footer (§2.9) ---------- */
  .site-footer { background: var(--c-band); color: var(--c-muted); font-size: var(--t-fine); line-height: 1.45; }
  .site-footer__inner { max-width: calc(var(--w-wide) + var(--gutter) * 2); margin-inline: auto; padding: 24px var(--gutter) 32px; }
  .site-footer a { color: var(--c-link-quiet); }
  .footnotes { margin: 0 0 20px; padding: 0 0 20px 1.2em; border-bottom: 1px solid var(--c-hairline); }
  .footnotes li + li { margin-top: 6px; }
  .footer-dir { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; padding: 8px 0 28px; }
  .footer-dir__brand { grid-column: 1 / -1; max-width: 34em; }
  .footer-dir__brand p + p { margin-top: 6px; }
  .footer-dir__brand .footer-manifesto + p { margin-top: 10px; }
  .footer-manifesto { font-family: var(--f-display); font-weight: 700; font-size: 14px; line-height: 1.2; letter-spacing: var(--track-caps); color: var(--c-red-text); }
  /* Founding stamp under the manifesto copy: "EST. 2008 ◆ SEATTLE, WA", like the stamp on a card box. */
  .footer-dir__brand .footer-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px;
    font-family: var(--f-display); font-weight: 600; font-size: 13px; line-height: 1;
    letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--c-ink);
  }
  .footer-meta__sep { width: 6px; height: 6px; background: var(--c-red); transform: rotate(45deg); flex: none; }
  .site-footer a.footer-meta__place { display: inline-flex; align-items: center; gap: 6px; padding-block: 6px; margin-block: -6px; color: var(--c-ink); text-decoration: none; }   /* 25px tall target, same line box */
  .site-footer a.footer-meta__place:hover { color: var(--c-red-text); }
  .site-footer a.footer-meta__place:hover span { text-decoration: underline; text-underline-offset: 3px; }
  /* Social icon links (Facebook, Instagram, Bluesky): quiet 40px round targets, ink on hover. The row sits 16px
     (glyph to text) under the stamp, and -10px left so the first glyph lines up with the text above.
     .footer-dir-scoped so the directory's `ul { margin: 0 }` reset can't override it. */
  .footer-dir .footer-social { display: flex; gap: 8px; margin: 6px 0 0 -10px; padding: 0; list-style: none; }
  .site-footer a.footer-social__link {
    display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
    color: var(--c-muted); transition: color var(--d-fast) var(--ease), background-color var(--d-fast) var(--ease);
  }
  .site-footer a.footer-social__link:hover { color: var(--c-ink); background: rgba(0, 0, 0, .06); text-decoration: none; }
  .footer-social__link svg { width: 20px; height: 20px; }
  .footer-dir h2 {
    font-family: var(--f-display); font-size: 13px; font-weight: 700; line-height: 1.45;
    letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--c-ink); margin-bottom: 6px;
  }
  /* Below 768: Company + Support share one cell, so the directory is two columns (Games | the pair). */
  .footer-dir__pair { display: grid; gap: 28px; align-content: start; }
  @media (min-width: 768px) { .footer-dir__pair { display: contents; } }
  .footer-dir ul, .footer-legal ul { list-style: none; margin: 0; padding: 0; }
  .footer-dir li a { display: inline-block; padding: 4px 0; }
  @media (min-width: 768px) {
    .footer-dir { grid-template-columns: repeat(3, 1fr); }
  }
  @media (min-width: 1024px) {
    .footer-dir { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px 32px; }
    .footer-dir__brand { grid-column: auto; padding-right: 48px; }
  }
  .footer-legal { padding-top: 16px; border-top: 1px solid var(--c-hairline); display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 24px; }
  .footer-legal ul { display: flex; flex-wrap: wrap; }
  .footer-legal li + li::before { content: "|"; margin: 0 10px; color: var(--c-hairline); }
  .footer-legal li a { display: inline-block; padding: 4px 0; }
  .footer-credit { flex-basis: 100%; margin-top: 6px; }

  /* ---------- Forced colours ---------- */
  @media (forced-colors: active) {
    .btn { border: 1px solid ButtonText; }
    .stars::before, .stars::after { background: CanvasText; forced-color-adjust: none; }
    .theme-dot input { forced-color-adjust: none; border: 1px solid ButtonText; }
    .theme-dot input:checked { outline: 2px solid Highlight; outline-offset: 3px; }
    :focus-visible { outline-color: Highlight; }
  }
}

@keyframes fade-in { from { opacity: 0; } }
@keyframes dialog-in { from { opacity: 0; transform: scale(.98); } }
