/* ── Home: page head + mode switch over one play window, then one grid section, About and the FAQ ──
   The top (spec 2026-10-14 §2): six tabs over one window; CPS is server-rendered and woken by
   landing-play.mjs, the other modes load their real game page in embed mode (hub.js). Below: one 12-column
   grid (News, Community, Top 5; Guides at the side), then About and the canonical FAQ. */
/* No bottom padding: the footer's own top margin closes the page. */
.hub { padding-block: var(--space-4) 0; }
@media (min-width: 1080px) { .hub { padding-block-start: var(--space-5); } }

/* Live neon of the CPS window's readouts. */
.hub [data-accent="cyan"] { --neon: var(--neon-cyan); }

/* ── Mode switch (spec 2026-10-14 §2; Task 14b console) ──
   Six tabs over one window: a Hull bar naming the mode (icon, name, goal, "Open full game") over one Deck stage.
   CPS is server-rendered; embedded games drop their own chrome (assets/play/play.css). Phones: tabs scroll. */
.ic-sprite { position: absolute; inline-size: 0; block-size: 0; overflow: hidden; }
.ic { flex: none; inline-size: 24px; block-size: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ic-a { stroke: var(--accent, var(--primary)); }
.ic-f { fill: var(--accent, var(--primary)); stroke: none; }
[dir="rtl"] .ic--go { transform: scaleX(-1); }
.modes { display: flex; gap: var(--space-2); margin-block-end: var(--space-3); overflow-x: auto; overscroll-behavior-x: contain; scroll-padding-inline: 48px; scrollbar-width: none; }
.modes::-webkit-scrollbar { display: none; }
/* When the row overflows (phones, long locales) its clipped edge fades out, so the row reads as one that scrolls:
   hub.js sets data-fade="end" while more tabs wait past the inline end, "start" once scrolled from the start (both
   in the middle); the mask follows the reading direction. An affordance, not decoration: the one mask on the
   console (ruling in .impeccable/surfaces/src-pages-index-html.md), nothing paints it. The row's 48px scroll padding
   keeps a tab that takes focus (arrow keys, Tab; hub.js scrolls it into view) clear of the 40px fade. */
.modes { --fade-s: 0px; --fade-e: 0px; --fade-to: right; }
[dir="rtl"] .modes { --fade-to: left; }
.modes[data-fade] { -webkit-mask-image: linear-gradient(to var(--fade-to), transparent, #000 var(--fade-s), #000 calc(100% - var(--fade-e)), transparent); mask-image: linear-gradient(to var(--fade-to), transparent, #000 var(--fade-s), #000 calc(100% - var(--fade-e)), transparent); }
.modes[data-fade~="start"] { --fade-s: 40px; }
.modes[data-fade~="end"] { --fade-e: 40px; }
.modes__tab { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-block-size: 48px; padding-inline: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-1); color: var(--text-muted); font: 600 var(--step-0)/1.2 var(--font-body); white-space: nowrap; cursor: pointer; transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.modes__tab .ic { inline-size: 22px; block-size: 22px; }
.modes__tab:hover { border-color: var(--border-strong); background: var(--surface-2); color: var(--text); }
/* The row scrolls (overflow clips anything outside it): the focus ring sits inside the tab. */
.modes__tab:focus-visible { outline: 2px solid var(--focus); outline-offset: -4px; }
/* Selected: the category accent as a 2px underline; surfaces stay violet-neutral. */
.modes__tab[aria-selected="true"] { border-color: var(--border-strong); background: var(--surface-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
@media (min-width: 1024px) { .modes__tab { flex: 1 1 auto; } }
/* The desktop CPS window fits the first screen from its measured top (--cps-top, hub.mjs CPS_FIT, set before
   first paint, so nothing moves when the scripts wake); without it, the old fixed offset (324 + 16 = 340). The landing
   has no Community / News row under the header (its search row carries the two links), so nothing above the window
   changes when the tabs switch. A game tab sizes from its own measured offset (--mode-top, hub.js), a little taller
   on big screens. */
.mode-window { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); block-size: clamp(400px, calc(100vh - var(--cps-top, 324px) - 16px), 680px); block-size: clamp(400px, calc(100svh - var(--cps-top, 324px) - 16px), 680px); overflow: hidden; border: 0; border-radius: var(--radius-lg); background: var(--bg-raised); }
.mode-window:not([data-mode-current="cps"]) { block-size: clamp(400px, calc(100svh - var(--mode-top, 340px) - 16px), 760px); }
.mode-bar { display: flex; align-items: center; gap: var(--space-3); min-block-size: 60px; padding: var(--space-2) var(--space-3); border-block-end: 1px solid var(--border); background: var(--bg-raised); }
.mode-bar__icon, .home-top__icon { display: grid; flex: none; place-items: center; inline-size: 40px; block-size: 40px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); color: var(--text); }
.mode-bar__text { display: grid; flex: 1; min-inline-size: 0; margin: 0; }
.mode-bar__text b { color: var(--text); font: 600 var(--step-1)/1 var(--font-display); letter-spacing: 0.02em; text-transform: uppercase; }
.mode-bar__text span { overflow: hidden; color: var(--text-muted); font-size: var(--step--1); line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.mode-bar__open { display: inline-flex; flex: none; align-items: center; gap: var(--space-2); min-block-size: 44px; padding-inline: var(--space-4) var(--space-3); border: 1px solid var(--border-strong); border-radius: var(--radius-md); color: var(--text); font-weight: 600; text-decoration: none; }
.mode-bar__open:hover { background: var(--surface-2); color: var(--text); }
.mode-bar__open .ic { inline-size: 18px; block-size: 18px; color: var(--accent); }
/* "Open full game" on wide screens; phones show the short "Full game" (the long name stays for assistive tech). */
.mode-bar__open-short { display: none; }
.mode-stage { position: relative; min-block-size: 0; }
.mode-panel { position: absolute; inset: 0; }
.mode-panel[hidden] { display: none; }
.mode-embed__frame { position: absolute; inset: 0; display: block; inline-size: 100%; block-size: 100%; border: 0; transition: opacity 240ms var(--ease); }
/* Loading: the mode's pictogram over a two-line skeleton until the game's page has loaded. */
.mode-embed[data-loading] .mode-embed__frame { opacity: 0; }
.mode-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: var(--space-4); }
.mode-embed:not([data-loading]) .mode-loading { display: none; }
.mode-loading__icon { display: grid; place-items: center; inline-size: 72px; block-size: 72px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface-2); color: var(--text); }
.mode-loading__icon .ic { inline-size: 40px; block-size: 40px; }
.mode-loading__bars { display: grid; justify-items: center; gap: var(--space-2); }
.mode-loading__bars i { display: block; inline-size: 200px; block-size: 10px; border-radius: var(--radius-pill); background: var(--surface-3); animation: mode-pulse 1.1s var(--ease) infinite alternate; }
.mode-loading__bars i + i { inline-size: 128px; animation-delay: 180ms; }
.mode-loading__text { color: var(--text-muted); font-size: var(--step--1); }
@keyframes mode-pulse { to { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .mode-loading__bars i { animation: none; } .mode-embed__frame, .modes__tab { transition: none; } }
.mode-cps { --pad-min: 160px; display: grid; grid-template-rows: auto minmax(var(--pad-min), 1fr) auto; gap: var(--space-3); padding: var(--space-4); }
.mode-cps__readouts, .mode-cps__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; }
.mode-cps__readouts > div, .mode-cps__stats > div { min-inline-size: 0; padding: var(--space-2); text-align: center; }
.mode-cps__stats > div + div { border-inline-start: 1px solid var(--border); }
.mode-cps__stats { padding-block-start: var(--space-2); border-block-start: 1px solid var(--border); }
.mode-cps dt { color: var(--text-muted); font: 600 var(--step--1)/1.2 var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; }
.mode-cps dd { margin: 0; color: var(--text); font: 600 var(--step-3)/0.9 var(--font-display); font-variant-numeric: tabular-nums; }
.mode-cps__readouts > div:first-child dd { color: var(--neon, var(--cyan)); }
.mode-cps__stats dd { font-size: var(--step-2); }
/* Two full-size duration controls, with narrower targets on phones. */
.mode-cps__readouts > div { display: grid; align-content: center; gap: 2px; }
.mode-cps__readouts dd { display: grid; place-items: center; min-block-size: 44px; }
.mode-cps__readouts .mode-cps__timer {
  grid-template-columns: 44px minmax(2rem, max-content) 44px;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}
.mode-cps__timer button {
  display: grid; place-items: center; inline-size: 44px; block-size: 44px;
  padding: 0; border: 0; border-radius: var(--radius-sm); background: none;
  color: inherit; cursor: pointer;
}
.mode-cps__timer button:hover:not([aria-disabled="true"]) { background: var(--surface-2); }
.mode-cps__timer button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.mode-cps__timer button[aria-disabled="true"] { opacity: .45; cursor: default; }
.mode-cps__timer .line-icon { inline-size: 18px; block-size: 18px; }
[data-cps-duration-step="-1"] .line-icon, [dir="rtl"] [data-cps-duration-step="1"] .line-icon { transform: scaleX(-1); }
[dir="rtl"] [data-cps-duration-step="-1"] .line-icon { transform: none; }
.mode-cps:not([data-duration-ready]) [data-cps-duration-step] { visibility: hidden; }
/* Keep the pad's track in the grid so the result cannot move the readouts or stats. */
.mode-cps__playfield { position: relative; display: grid; grid-template-rows: minmax(0, 1fr); min-inline-size: 0; }
.mode-cps[data-state="done"] .mode-cps__pad { visibility: hidden; }
.mode-cps__result {
  position: absolute; inset: 0; display: grid; align-content: safe center; justify-items: center;
  gap: var(--space-4); overflow: auto; padding: var(--space-3);
  border: 2px solid color-mix(in srgb, var(--cyan) 58%, var(--border)); border-radius: var(--radius-md);
  background: radial-gradient(ellipse at 50% 0, color-mix(in srgb, var(--cyan) 13%, transparent), transparent 74%), var(--bg-raised);
  text-align: center;
}
.mode-cps__result:focus-visible { outline-offset: -5px; }
.mode-cps__result-readouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); inline-size: min(100%, 16rem); margin: 0; }
.mode-cps__result-readouts > div { display: grid; gap: 4px; min-inline-size: 0; }
.mode-cps__result-score { grid-column: 1 / -1; }
.mode-cps__result-readouts dd { font-size: var(--step-2); line-height: 1; }
.mode-cps__result-score dd { color: var(--cyan); font-size: var(--step-4); }
.mode-cps__result-actions { display: flex; align-items: center; justify-content: center; gap: var(--space-3); }
.mode-cps__record { color: var(--lime); font-size: var(--step--1); font-weight: 600; line-height: 1.2; }
.mode-cps__retry {
  min-block-size: 44px; padding-inline: var(--space-5); border: 1px solid transparent; border-radius: var(--radius-md);
  background: var(--cyan); color: var(--primary-ink); font-weight: 700; line-height: 1.2;
}
.mode-cps__retry:hover { background: color-mix(in srgb, var(--cyan) 85%, white); }
@media (min-width: 600px) and (max-height: 820px), (max-width: 599.98px) and (max-height: 740px) {
  .mode-cps__result {
    grid-template-columns: minmax(0, 16rem) auto; align-items: center; justify-content: center;
    gap: var(--space-2); padding: 4px var(--space-2);
  }
  .mode-cps__result-readouts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
  .mode-cps__result-score { grid-column: auto; }
  .mode-cps__result-readouts dd { font-size: var(--step-1); }
  .mode-cps__result-score dd { font-size: var(--step-2); }
  .mode-cps__result-actions { flex-direction: column; gap: 4px; }
  .mode-cps__retry { padding-inline: var(--space-3); }
}
/* The pad is the playfield: a dark well on the Deck stage, like every hosted game's board. */
.mode-cps__pad { position: relative; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: color-mix(in srgb, var(--bg-raised) 94%, var(--accent)); color: var(--text); font: 600 var(--step-2)/1.1 var(--font-display); text-transform: uppercase; touch-action: manipulation; user-select: none; cursor: pointer; }
.mode-cps__pad:hover { border-color: var(--border-control); }
.mode-cps__pad:active { background: var(--surface-2); }
.mode-cps__bar { position: absolute; inset: auto 0 0; block-size: 4px; background: var(--surface-3); }
.mode-cps__bar > i { display: block; block-size: 100%; background: var(--neon, var(--cyan)); transform: scaleX(0); transform-origin: left; }
[dir="rtl"] .mode-cps__bar > i { transform-origin: right; }
/* Character Wheel for guests (owner: the wheel stays sign-in only): an invitation, not a wall. The real wheel in a
   round window, what you get, the Sign-in Button, and a way to play right now (the CPS tab). */
.mode-signin { display: grid; place-content: safe center; justify-items: center; gap: var(--space-3); padding: var(--space-5); text-align: center; overflow-y: auto; }
.mode-signin__wheel { position: relative; inline-size: 168px; block-size: 168px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--bg-raised); box-shadow: var(--shadow-1); }
/* The play shot is 640x360 with the wheel centred near (320, 250): this window shows a 210px disc of it. */
.mode-signin__wheel img { position: absolute; top: -69%; left: -102.4%; inline-size: 304.8%; max-inline-size: none; block-size: auto; }
.mode-signin h2 { margin: var(--space-1) 0 0; font: 600 var(--step-3)/0.95 var(--font-display); text-transform: uppercase; }
.mode-signin p { margin: 0; max-inline-size: 46ch; color: var(--text-muted); }
.mode-signin__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-2) var(--space-4); margin-block-start: var(--space-1); }
.mode-signin__try { display: inline-flex; align-items: center; min-block-size: 44px; padding-inline: var(--space-2); color: var(--primary); font-weight: 600; }
@media (max-width: 599.98px) {
  /* --mode-bar-h: the bar's measured height (hub.js), so a bar whose name wraps (fr Character Wheel at 320px) gives
     the stage up rather than push the window past the screen under the sticky header. */
  .modes { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  /* Let the page scroll on short phones while the game retains a usable playfield. */
  .mode-window { block-size: auto; grid-template-rows: auto auto; margin-inline: calc(-1 * var(--gutter)); border-inline: 0; border-radius: 0; }
  .mode-window[data-mode-current="cps"] .mode-cps {
    position: relative;
    min-block-size: clamp(380px, calc(100svh - var(--cps-top, 252px) - 68px), 580px);
  }
  .mode-window:not([data-mode-current="cps"]) { grid-template-rows: auto minmax(var(--mode-stage-min, 520px), 1fr); }
  .mode-window[data-mode-current="blocks"] { --mode-stage-min: clamp(520px, calc(100vw + 168px), 760px); }
  .mode-window:has(.mode-signin:not([hidden])) { --mode-stage-min: 348px; }
  .mode-bar { min-block-size: 56px; padding-inline: var(--gutter); }
  .mode-bar__icon { inline-size: 36px; block-size: 36px; }
  /* The goal wraps onto a second line instead of being cut. */
  .mode-bar__text span { display: -webkit-box; overflow: hidden; white-space: normal; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
  /* The link shows the short "Full game" beside the arrow; its full name stays for assistive tech. */
  .mode-bar { gap: var(--space-2); }
  .mode-bar__open { gap: 6px; padding-inline: var(--space-3) 10px; font-size: var(--step--1); }
  .mode-bar__open-long { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .mode-bar__open-short { display: inline; white-space: nowrap; }
  .mode-signin { gap: var(--space-2); padding: var(--space-4) var(--gutter); }
  .mode-signin__wheel { inline-size: 128px; block-size: 128px; }
  .mode-signin h2 { font-size: var(--step-2); }
}
/* Short screens from 600px up (a 700px tablet, a 768px laptop): the window can be down to its 400px floor, so the
   CPS console tightens its spacing and lets the pad give way first; Best / Last / Runs stay inside the window. */
@media (min-width: 600px) and (max-height: 820px) {
  .mode-cps { --pad-min: 120px; gap: var(--space-3); padding: var(--space-4); }
}
/* The narrowest phones give the bar's icon tile up so the goal keeps its two lines beside "Full game" (the selected
   tab above already shows the icon). */
@media (max-width: 374.98px) {
  .mode-bar__icon { display: none; }
  .mode-signin__wheel { inline-size: 96px; block-size: 96px; }
  .mode-cps { gap: var(--space-3); padding: var(--space-3); }
  .mode-cps dd { font-size: var(--step-2); }
}
/* Compact the surrounding controls on short phones to leave more room for the pad. */
@media (max-width: 599.98px) and (max-height: 740px) {
  .mode-bar { min-block-size: 48px; padding-block: 2px; }
  .mode-bar__icon { inline-size: 32px; block-size: 32px; }
  .mode-cps { gap: var(--space-2); padding: var(--space-2) var(--gutter); }
  .mode-cps__readouts, .mode-cps__stats { gap: var(--space-2); }
  .mode-cps__readouts > div, .mode-cps__stats > div { padding: 6px var(--space-2); }
  .mode-cps dd { font-size: var(--step-2); }
  .mode-cps__stats dd { font-size: var(--step-1); }
}
@media (max-width: 599.98px) {
  .mode-cps { --pad-min: clamp(200px, 30svh, 280px); }
  html[data-ads="on"]:not([data-ad-unavailable~="native"], [data-ads-skip~="native"])
  [data-ad-place="landing-below-play"]:not([hidden], [data-ad-crowded], [data-ad-width-unavailable]) + .home-grid {
    margin-block-start: var(--space-5);
  }
}

/* ── Home grid (design review 2): News and Community are the main event, two equal columns from 1024px (one below); then
   Guides and Top 5 share their own row from 1200px (stacked below, where Top 5's three columns need the whole width),
   the Pocket Games row, and About + FAQ last. ── */
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-8) var(--space-6);
  margin-block-start: var(--space-9);
}
.home-top, .home-top__col { min-inline-size: 0; }
.home-grid__main { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: var(--space-8) var(--space-6); min-inline-size: 0; }
@media (min-width: 1024px) {
  .home-grid__main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-guides__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* One line high with or without New | Trending, so hiding the toggle moves nothing. */
.home-block__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); min-block-size: 44px; margin-block-end: var(--space-4); }
.home-block__head h2,
.home-guides > h2,
.home-about h2 { margin: 0; font: 600 var(--step-3)/0.95 var(--font-display); text-transform: uppercase; color: var(--text); }
.home-block__more { color: var(--text-muted); font-size: var(--step--1); white-space: nowrap; }
/* The way to the full page, under the list. */
.home-feed__all { display: inline-flex; align-items: center; gap: var(--space-1); min-block-size: 36px; margin-block-start: var(--space-2); color: var(--primary); font-weight: 600; }
[dir="rtl"] .home-feed__all span { display: inline-block; transform: scaleX(-1); }
.home-feed:has(> [data-feed-fallback]:not([hidden])) .home-feed__all { display: none; }
/* News / Community: five items, no boxes: a lead with a 16:9 picture, then four compact rows on ruled lines. Items and
   skeletons are the same box, and every line height is reserved, so filling them moves nothing. */
.home-feed { --media-w: 96px; --title-h: calc(0.95rem * 1.3 * 2); --line-h: calc(var(--step--1) * 1.45 + 2px); min-inline-size: 0; }
.home-block__head h2 { margin-inline-end: auto; }
.home-cards { display: grid; align-content: start; margin: 0; padding: 0; list-style: none; }
.home-card { min-inline-size: 0; }
.home-card__link, .home-card--skeleton { display: grid; grid-template-columns: var(--media-w) minmax(0, 1fr); align-items: center; gap: var(--space-3); padding-block: var(--space-2); border-block-start: 1px solid var(--border); color: var(--text); text-decoration: none; }
.home-card__link:hover { color: var(--text); }
.home-card__link:hover .home-card__title { color: var(--primary); }
.home-cards > :first-child { --title-h: calc(var(--step-1) * 1.2 * 2); }
.home-cards > :first-child > .home-card__link, .home-cards > .home-card--skeleton:first-child { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); padding-block: 0 var(--space-3); border-block-start: 0; }
.home-cards > :first-child .home-card__title { font-size: var(--step-1); font-weight: 650; line-height: 1.2; }
.home-cards > :first-child .home-card__media { border-radius: var(--radius-md); }
.home-cards > :first-child .home-card__glyph { font-size: clamp(9rem, 22vw, 15rem); }
.home-cards > :first-child .home-card__face { inline-size: 64px; block-size: 64px; font-size: 2.4rem; }
.home-card__media { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-sm); background: var(--surface-2); }
.home-card__media img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
/* No picture of its own and no game shot: a composition of the author (News: topic or outlet), their initial drawn
   large in their colour behind their avatar or initial on a disc (landing-feed-core.mjs). */
.home-card__media--art { background: color-mix(in oklab, var(--accent) 14%, var(--surface-2)); }
.home-card__glyph { position: absolute; inset-block-end: -0.16em; inset-inline-end: 0.08em; color: color-mix(in oklab, var(--accent) 24%, transparent); font: 600 4.5rem/1 var(--font-display); pointer-events: none; }
.home-card__face { position: relative; display: grid; place-items: center; inline-size: 32px; block-size: 32px; overflow: hidden; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 14%, var(--surface-2)), 0 4px 12px rgb(0 0 0 / 0.35); color: var(--primary-ink); font: 600 1.3rem/1 var(--font-display); padding-block-start: 0.12em; }
.home-card__face img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
/* A News story whose picture another card on the landing already shows: the Top 5 icon tile (Deck 2, Seam frame). */
.home-card__media--icon { border: 1px solid var(--border); background: var(--surface-1); }
.home-card__tile { display: grid; place-items: center; inline-size: 32px; block-size: 32px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); color: var(--text); font-size: 1.1rem; }
.home-card__body { display: grid; grid-template-rows: var(--title-h) var(--line-h); gap: var(--space-1); align-content: center; min-inline-size: 0; }
.home-card__title { display: -webkit-box; overflow: hidden; font-size: 0.95rem; font-weight: 600; line-height: 1.3; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.home-card__by { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-2); block-size: var(--line-h); min-inline-size: 0; overflow: hidden; color: var(--text-muted); font-size: var(--step--1); line-height: 1.45; white-space: nowrap; }
/* Names come first and stay whole; the time follows when there is room and otherwise wraps onto the hidden second
   line. Only a name longer than the whole line is shortened. */
.home-card__who { display: inline-flex; align-items: center; gap: var(--space-2); max-inline-size: 100%; min-inline-size: 0; }
.home-card__who > span:last-child, .home-card__by > b { overflow: hidden; text-overflow: ellipsis; max-inline-size: 100%; }
.home-card__by time { color: var(--text-faint); }
.home-card__by > b { color: var(--primary); font-weight: 600; }
.home-card__avatar { display: grid; flex: none; place-items: center; inline-size: 20px; block-size: 20px; overflow: hidden; border-radius: 50%; background: var(--surface-3); color: var(--primary); font-size: 0.75rem; font-weight: 700; }
.home-card__avatar img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.home-card--skeleton :is(.home-card__title, .home-card__line) { display: block; border-radius: var(--radius-sm); background: var(--surface-2); }
.home-card--skeleton .home-card__title { inline-size: 86%; }
.home-card--skeleton .home-card__line { inline-size: 48%; }
/* New | Trending: the DESIGN segmented track, secondary size. */
.home-sort { display: inline-flex; gap: 2px; padding: var(--space-1); border-radius: var(--radius-lg); background: var(--bg-raised); }
.home-sort button { min-block-size: 36px; padding-inline: var(--space-3); border-radius: var(--radius-md); color: var(--text-muted); font-size: var(--step--1); font-weight: 600; }
.home-sort button:hover { background: var(--surface-2); color: var(--text); }
.home-sort button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }
/* Nothing known and nothing to show (fillFeed): one slim line with the link, never a panel. */
.home-feed__fallback { margin: 0; padding-block: var(--space-3); border-block-start: 1px solid var(--border); color: var(--text-muted); }
.home-feed__fallback[hidden] { display: none; }
.home-feed__fallback[data-state="empty"] [data-feed-msg] { color: var(--text); font-weight: 600; }
.home-feed__fallback a { color: var(--primary); font-weight: 600; white-space: nowrap; }
.home-top__cols { display: grid; gap: var(--space-5); }
@media (min-width: 720px) { .home-top__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* The Pocket Games row (shell.css Partner Rows), slim, on its own line under Top 5. */
.home-pocket { display: grid; gap: var(--space-4); min-inline-size: 0; }
@media (min-width: 720px) {
  .home-pocket { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-pocket .partner-row { max-inline-size: none; min-block-size: 72px; }
}
.home-top__col h3 { margin: 0 0 var(--space-3); color: var(--text); font: 600 var(--step-1)/1.1 var(--font-display); text-transform: uppercase; }
.home-top__list { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.home-top__item { display: flex; align-items: center; gap: var(--space-3); min-block-size: 56px; padding: var(--space-2); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-1); color: var(--text); text-decoration: none; }
.home-top__item:hover { border-color: var(--border-strong); background: var(--surface-2); color: var(--text); }
.home-top__thumb { flex: none; inline-size: 72px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-sm); background: var(--surface-2); }
.home-top__thumb img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.home-top__name { min-inline-size: 0; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
/* Phones: one swipe row per category (five picture cards, the next one peeking) instead of fifteen full-width rows. */
@media (max-width: 719.98px) {
  .home-top__col h3 { margin-block-end: var(--space-2); }
  .home-top__list { grid-auto-flow: column; grid-auto-columns: 136px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .home-top__list::-webkit-scrollbar { display: none; }
  .home-top__list > li { scroll-snap-align: start; }
  .home-top__item { flex-direction: column; align-items: stretch; gap: var(--space-2); block-size: 100%; }
  .home-top__thumb, .home-top__icon { inline-size: 100%; block-size: auto; aspect-ratio: 16 / 9; }
  .home-top__icon .ic { inline-size: 32px; block-size: 32px; }
  .home-top__name { display: -webkit-box; padding-inline: 2px; line-height: 1.25; white-space: normal; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
.home-guides { display: grid; gap: var(--space-4); align-content: start; }
.home-guides__list { display: grid; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.home-guide { display: grid; grid-template-columns: 56px minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; align-items: start; column-gap: var(--space-3); row-gap: var(--space-1); block-size: 100%; padding: var(--space-2); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-1); color: var(--text); text-decoration: none; }
.home-guide:hover { border-color: var(--border-strong); background: var(--surface-2); color: var(--text); }
/* The guide's cover: a designed tile, its pictogram on the accent's ground over a large faint copy of itself. */
.home-guide__thumb { position: relative; display: grid; grid-row: 1 / 3; align-self: center; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-sm); background: color-mix(in oklab, var(--accent) 14%, var(--surface-2)); color: var(--text); }
.home-guide__thumb .ic { position: relative; inline-size: 36px; block-size: 36px; }
.home-guide__title { display: -webkit-box; overflow: hidden; font-weight: 600; line-height: 1.25; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.home-guide__line { display: -webkit-box; overflow: hidden; color: var(--text-muted); font-size: var(--step--1); line-height: 1.4; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.home-guides__all { justify-self: start; color: var(--primary); font-weight: 600; }
[dir="rtl"] .home-guides__all span { display: inline-block; transform: scaleX(-1); }
.home-about { max-inline-size: 68ch; margin-block-start: var(--space-9); }
.home-about p { margin: var(--space-3) 0 0; color: var(--text-muted); }
.hub .faq-block { padding-inline: 0; }

/* Touch: the two text links keep their look and answer a 44px target. */
@media (pointer: coarse) {
  a.home-block__more, a.home-guides__all { position: relative; }
  a.home-block__more::before, a.home-guides__all::before { content: ''; position: absolute; inset-inline: -4px; inset-block: calc(50% - 22px); }
}

/* Clear color families and consistent icon tiles across the discovery surface. */
.home-grid { gap: var(--space-7); margin-block-start: var(--space-7); }
.home-grid__main { align-items: stretch; gap: var(--space-5); }
.home-feed { --feed-tone: var(--amber); padding: var(--space-5); border: 1px solid color-mix(in srgb, var(--feed-tone) 35%, var(--border)); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--feed-tone) 7%, var(--bg-raised)); }
.home-feed[data-feed="community"] { --feed-tone: var(--cyan); }
.home-feed .home-block__head { padding-block-end: var(--space-3); border-block-end: 1px solid color-mix(in srgb, var(--feed-tone) 30%, transparent); }
.home-feed .home-block__head h2 { color: var(--feed-tone); }
.home-feed[data-feed="news"] .home-block__head h2 { font-family: Georgia, serif; font-size: var(--step-2); text-transform: none; }
.home-sort { background: color-mix(in srgb, var(--feed-tone) 8%, var(--bg-raised)); }
.home-sort button[aria-pressed="true"] { background: var(--feed-tone); color: var(--primary-ink); }
.home-top__col { --category: var(--amber); padding: var(--space-4); border: 1px solid color-mix(in srgb, var(--category) 35%, var(--border)); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--category) 6%, var(--bg-raised)); }
.home-top__col[data-top="games"] { --category: var(--pink); }
.home-top__col[data-top="tools"] { --category: var(--cyan); }
.home-top__col h3 { color: var(--category); font-size: var(--step-2); }
.home-top__item { min-block-size: 72px; border-color: transparent; background: color-mix(in srgb, var(--category) 7%, var(--bg-raised)); }
.home-top__item:hover { border-color: var(--category); background: color-mix(in srgb, var(--category) 14%, var(--bg-raised)); }
.home-top__icon { border: 0; color: var(--category); background: color-mix(in srgb, var(--category) 16%, var(--bg-raised)); }
.home-top__name { white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.home-guide { padding: var(--space-4); align-content: start; }
.home-guide__thumb { aspect-ratio: 1; inline-size: 56px; color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--bg-raised)); }
.home-guide__thumb .ic { inline-size: 26px; block-size: 26px; }
.home-guide__line { -webkit-line-clamp: 2; }
.mode-window { border: 1px solid color-mix(in srgb, var(--cyan) 45%, var(--border)); }
.mode-cps__readouts { gap: var(--space-2); }
/* One real border on all four edges: no inherited readout dividers or inset frames. */
.mode-cps__readouts > div {
  --readout: var(--cyan);
  --readout-edge-start: var(--cyan);
  --readout-next: var(--lime);
  --readout-midpoint: 66.667%;
  --readout-angle: 90deg;
  padding-block: var(--space-3); border: 2px solid transparent; border-radius: var(--radius-md);
  background: linear-gradient(var(--readout-angle), color-mix(in srgb, var(--readout-edge-start) 12%, var(--bg-raised)), var(--readout-midpoint), color-mix(in srgb, var(--readout-next) 12%, var(--bg-raised))) padding-box,
    linear-gradient(var(--readout-angle), var(--readout-edge-start), var(--readout-midpoint), var(--readout-next)) border-box;
}
.mode-cps__readouts > div:has([data-cps-clicks]) {
  --readout: var(--lime);
  --readout-edge-start: var(--lime);
  --readout-next: var(--lime);
  --readout-midpoint: 50%;
}
.mode-cps__readouts > div:has([data-cps-time]) {
  --readout: var(--amber);
  --readout-edge-start: var(--lime);
  --readout-next: var(--amber);
  --readout-midpoint: 33.333%;
}
@media (max-width: 599.98px) {
  .mode-cps__readouts > div:has([data-cps-time]) { padding-inline: 2px; }
  .mode-cps__readouts .mode-cps__timer { grid-template-columns: minmax(24px, 1fr) auto minmax(24px, 1fr); font-size: var(--step-1); }
  .mode-cps__timer button { inline-size: min(100%, 44px); }
}
@media (max-width: 374.98px) and (max-height: 600px) {
  .mode-cps { gap: var(--space-1); padding-block: var(--space-1); }
  .mode-cps__readouts > div { padding-block: 6px; }
  .mode-cps__stats { padding-block-start: var(--space-1); }
}
[dir="rtl"] .mode-cps__readouts > div { --readout-angle: 270deg; }
.mode-cps__readouts > div dt, .mode-cps__readouts > div dd { color: var(--readout); }
.mode-cps__pad { border-width: 2px; padding: var(--space-3); border-color: color-mix(in srgb, var(--pink) 55%, var(--border)); background: color-mix(in srgb, var(--pink) 9%, var(--bg-raised)); }
.mode-cps__pad [data-cps-hint] {
  max-inline-size: 24ch; color: var(--pink); font-size: clamp(1.75rem, 3.5vw, 3.25rem);
  font-weight: 700; line-height: 1.1; text-align: center; text-wrap: balance;
}
.mode-cps__pad [data-cps-hint]:lang(ar) { line-height: 1.45; }
@media (max-width: 599.98px) and (max-height: 740px) {
  .mode-cps__pad { padding-block: 6px; }
  .mode-cps__pad [data-cps-hint] { font-size: var(--step-2); }
}
@supports (background-clip: text) {
  .mode-cps__pad [data-cps-hint] {
    background: linear-gradient(180deg, var(--text) 18%, color-mix(in srgb, var(--pink) 55%, var(--text)) 100%);
    background-clip: text; color: transparent;
  }
}
@media (forced-colors: active) {
  .mode-cps__pad [data-cps-hint] { background: none; color: ButtonText; }
}
.modes__tab[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 17%, var(--bg-raised)); color: var(--accent); border-color: var(--accent); box-shadow: none; }
@media (max-width: 719.98px) {
  .home-feed { padding: var(--space-4); }
  .home-top__list { margin-inline: 0; padding-inline: 0; scroll-padding-inline: 0; }
  .home-top__icon { inline-size: 100%; block-size: 64px; }
  .home-top__name { min-block-size: 2.6em; }
  .home-top__item { min-block-size: 120px; }
}

/* Light and transparency give each destination a material, not just a colored label. */
.mode-window { background: color-mix(in srgb, var(--bg-raised) 88%, transparent); box-shadow: 0 18px 48px -32px color-mix(in srgb, var(--cyan) 45%, transparent); }
.mode-bar { background: linear-gradient(105deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent), color-mix(in srgb, var(--bg-raised) 92%, transparent); }
.mode-cps__pad { background: radial-gradient(ellipse at 50% 115%, color-mix(in srgb, var(--pink) 22%, transparent), transparent 70%), linear-gradient(120deg, color-mix(in srgb, var(--cyan) 7%, transparent), color-mix(in srgb, var(--pink) 6%, transparent)), color-mix(in srgb, var(--bg-raised) 80%, transparent); }
.home-feed { background: radial-gradient(ellipse at 100% 0, color-mix(in srgb, var(--feed-tone) 12%, transparent), transparent 55%), color-mix(in srgb, var(--bg-raised) 92%, transparent); }
.home-top__col { background: linear-gradient(155deg, color-mix(in srgb, var(--category) 13%, transparent), transparent 65%), color-mix(in srgb, var(--bg-raised) 86%, transparent); }
.home-top__item { background: color-mix(in srgb, var(--category) 6%, color-mix(in srgb, var(--bg-raised) 72%, transparent)); }
.home-guide { background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, transparent), transparent), color-mix(in srgb, var(--bg-raised) 86%, transparent); }

.home-feed .feedback-invitation { margin: 0 0 var(--space-4); color: var(--text-muted); line-height: 1.5; }
.home-feed .feedback-invitation a { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
