/* LogicLab site — home.v2.css
 *
 * The two home pages (/ and /en), on top of base.v1.css: hall and lobby (the app's home of the
 * day), ritual, game cards and their sample window, friends, daily progression, download and
 * the mobile bar. At rest everything is composed and readable without JS: site.v1.js only adds
 * motion through the hooks kept here (intro start states, flap halves, demo window, sheet).
 *
 * Lobby geometry follows lib/features/home/ (home_screen.dart, home_layout.dart): 4 columns at
 * every width since Decanta, the 16th game (the app's 4 × 4, decided on 2026-10-29: 3 or 5
 * columns would leave the 16th tile alone on its row), 7-10 px gaps, radius 16, a halo of the
 * game colour from 34 % to 0 behind each icon. On phones the names shrink just enough for the
 * longest word to fit its tile, as homeTileNameFontSize does in the app. The game cards follow
 * the same count: 2 columns from 600 px, 4 from 760 px, so no row is left with a single card.
 *
 * v2 of home.v1.css (2026-10-30): only the lobby and game-card columns changed.
 * ⚠️ /assets/** is served "immutable": once deployed, change a copy named home.v3.css instead.
 */

/* ---------- Hall ---------- */
.hall { position: relative; isolation: isolate; padding-block: clamp(24px, 4vw, 56px) clamp(56px, 7vw, 96px); }
/* The app's static aurora (AuroraBackground): teal bloom top-left, violet bloom bottom-right.
   It runs under the translucent bar and fades out inside the next section, so it shows no edge. */
.hall__aurora { position: absolute; inset: calc(-1 * var(--bar-h)) 0 -400px; z-index: -1; overflow: hidden; pointer-events: none; }
.hall__aurora i { position: absolute; aspect-ratio: 1; border-radius: 50%; }
.hall__aurora .a1 {
  width: clamp(440px, 64vw, 960px); left: clamp(-240px, -18vw, -90px); top: clamp(-280px, -22vw, -110px);
  background: radial-gradient(closest-side, rgba(31, 184, 173, .3), rgba(31, 184, 173, .17) 38%, rgba(31, 184, 173, .06) 70%, rgba(31, 184, 173, 0));
}
.hall__aurora .a2 {
  --w: clamp(480px, 70vw, 1040px);
  width: var(--w); right: clamp(-320px, -22vw, -140px); bottom: calc(440px - var(--w) / 2); /* centre 40 px above the hall's end */
  background: radial-gradient(closest-side, rgba(122, 108, 240, .26), rgba(122, 108, 240, .15) 38%, rgba(122, 108, 240, .05) 70%, rgba(122, 108, 240, 0));
}
.hall__grid { display: grid; gap: 48px; }
.hall__copy { max-width: 36rem; }
#hs-eyebrow { display: flex; align-items: center; gap: 12px; }
#hs-eyebrow::before { content: ""; width: 28px; height: 1px; background: linear-gradient(90deg, rgba(31, 184, 173, 0), var(--teal)); }
#hall-title { margin-top: 18px; font-size: clamp(2rem, .9rem + 5.6vw, 3.75rem); }
#hall-title .l1, #hall-title .l2 { display: block; } /* each sentence slides on its own line */
#hs-sub { margin-top: 22px; max-width: 33rem; }
#hs-cta { margin-top: 30px; }
#hs-cta .sheen {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; transform: translateX(-120%);
  background: linear-gradient(104deg, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, .5) 50%, rgba(255, 255, 255, 0) 68%);
}
#hs-stores { margin-top: 16px; font: 400 .8125rem/1.6 var(--font-mono); letter-spacing: .02em; color: var(--text-lo); text-wrap: balance; }
/* 44 px tall hit areas without changing the line height */
#hs-stores a { display: inline-block; padding-block: 12px; margin-block: -12px; color: var(--text-hi); text-decoration-color: rgba(243, 245, 251, .35); }
#hs-note {
  display: flex; align-items: flex-start; gap: 12px; max-width: 33rem; margin-top: 28px; padding: 14px 18px 14px 14px;
  border-radius: var(--r-tile); border: 1px solid var(--hairline); background: linear-gradient(135deg, var(--glass-top), var(--glass-bottom));
  color: var(--text-lo); font-size: .9375rem; line-height: 1.5;
}
#hs-note svg { flex: none; width: 22px; height: 22px; color: var(--teal); }
#hs-note b { font-weight: 600; }
@media (max-width: 599px) {
  #hs-cta { width: 100%; }
  #hs-stores { text-align: center; }
}
@media (min-width: 1024px) {
  .hall__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); align-items: center; column-gap: clamp(40px, 5vw, 72px); }
  #hall-title { font-size: clamp(2.3rem, 1.125rem + 3.125vw, 3.75rem); } /* "16 jeux de logique." stays on one line */
}

/* ---------- Lobby: the app's home of the day ---------- */
.lobby { position: relative; width: 100%; } /* the container's full width: aligned with the copy above, no empty band on tablets */
#hs-day {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
  font: 400 .6875rem/1.4 var(--font-mono); letter-spacing: .03em; text-transform: uppercase; color: var(--text-lo);
}
#hs-day p { white-space: nowrap; } /* on each p: base's text-wrap: pretty would undo an inherited nowrap */
#hs-day [data-grid-number] { display: flex; align-items: center; gap: 10px; color: var(--text-hi); }
#hs-day [data-grid-number]::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--text-lo); }
#hs-day p:last-child { margin-left: auto; }
#hs-day .n { color: var(--solved); }
#hs-rule { display: flex; gap: 3px; height: 4px; margin-top: 10px; }
#hs-rule .seg { flex: 1; border-radius: 2px; background: rgba(255, 255, 255, .1); transform-origin: 0 50%; }
#hs-status { margin-top: 12px; font: 400 .9375rem/1.3 var(--font-display); color: var(--text-lo); }
#hs-status .n { display: inline-block; color: var(--solved); }
#hs-tiles { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }
.tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  height: 100%; min-height: 96px; padding: 8px 5px; border-radius: var(--r-tile); border: 1px solid var(--hairline);
  background: linear-gradient(135deg, var(--glass-top), var(--glass-bottom)); color: var(--text-hi); text-align: center; text-decoration: none;
  transition: transform var(--d-press) var(--e-fade), border-color var(--d-press) var(--e-fade);
}
.tile:hover { color: var(--text-hi); border-color: var(--outline); }
.tile:active { transform: scale(.95); }
.tile:focus-visible { outline-offset: 3px; }
/* The halo is painted on the icon's own padding box, so it stays centred on the icon however the name wraps. */
.tile img {
  box-sizing: content-box; width: 48px; height: 48px; padding: 15px; margin: -15px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--halo) 34%, transparent), transparent 68%);
}
.tile__name { font: 600 .75rem/1.15 var(--font-display); }
/* Phones in 4 columns: the name shrinks just enough for the longest word to fit its tile, one size
   for the whole grid (the tiles share one width), as homeTileNameFontSize does in the app. The
   longest word, "Sudokium", is 5.25 em wide in Sora 600: 18.5 % of the tile's content width keeps
   it 3 % inside (9.8 px on a 320 px screen; 12 px from 375 px). A new game with a longer word
   lowers this percentage. Without container units, the name simply stays at 12 px. */
#hs-tiles .tile { container-type: inline-size; }
#hs-tiles .tile__name { font-size: min(.75rem, 18.5cqi); }
.lobby__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.countdown {
  display: inline-flex; align-items: center; gap: 10px; min-height: 36px; padding: 8px 16px 8px 12px;
  border-radius: 18px; border: 1px solid var(--hairline); background: linear-gradient(135deg, var(--glass-top), var(--glass-bottom));
  font: 400 .6875rem/1.35 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-lo); text-wrap: balance;
}
.countdown svg { flex: none; width: 16px; height: 16px; color: var(--violet); }
.countdown b { color: var(--text-hi); }
.btn--small svg { width: 18px; height: 18px; }
@media (min-width: 400px) { #hs-day { font-size: .75rem; letter-spacing: .1em; } }
@media (min-width: 600px) {
  .lobby {
    padding: 22px 22px 20px; border-radius: var(--r-dialog); border: 1px solid var(--hairline); box-shadow: var(--shadow-lift);
    background: linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015));
  }
  #hs-tiles { gap: 10px; }
  .tile img { width: 46px; height: 46px; }
  .lobby__foot { justify-content: space-between; }
}
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  #demo-replay[hidden] { display: inline-flex !important; visibility: hidden; } /* room kept: showing it moves nothing */
}

/* Ambient sample (site.v1.js, wide screens only): a veil over the whole lobby, colour only, and the window above it. */
#lobby::after {
  content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none;
  background: rgba(11, 15, 26, 0); transition: background-color var(--d-out) var(--e-exit);
}
#lobby.is-demo::after { background: rgba(11, 15, 26, .6); transition: background-color var(--d-in) var(--e-settle); }
.lobby__demo { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; pointer-events: none; }
.demo-window {
  width: 70%; padding: 14px; border-radius: var(--r-dialog); border: 1px solid rgba(255, 255, 255, .13); background: var(--surface);
  box-shadow: 0 30px 64px -24px rgba(0, 0, 0, .85), inset 0 1px 0 rgba(255, 255, 255, .07);
}
.demo-window__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.demo-window__icon { width: 28px; height: 28px; }
.demo-window__name { font: 700 1rem/1.2 var(--font-display); }
.demo-window .tag-example { margin-left: auto; }

/* ---------- Sections ---------- */
/* Tighter than base.v1.css: two stacked paddings of 120 px read as an empty screen between sections. */
main > .section { padding-block: clamp(48px, 6.5vw, 88px); }
.section .eyebrow { color: var(--teal); }
.small { font-size: .875rem; }

/* Ritual */
.ritual__cards { display: grid; gap: 16px; }
.ritual__cards > li { display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 24px; }
.ritual__cards p { color: var(--text-lo); }
.ritual__visual {
  display: grid; place-items: center; align-content: center; gap: 14px; margin-bottom: 10px; padding: 16px 12px;
  border-radius: 14px; border: 1px solid rgba(255, 255, 255, .06); background: rgba(5, 8, 15, .5);
}
@media (min-width: 900px) { .ritual__visual { min-height: 156px; } } /* side by side, the three visuals line up */
.ritual__kinds { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ritual__same { width: 132px; height: auto; }
.ritual__cards .ritual__local { color: var(--text-hi); }
.ritual__foot { margin-top: 22px; }
.flap { display: flex; align-items: center; gap: 6px; }
.flap__d {
  width: 52px; height: 72px; border-radius: 10px; background: #1D2333; color: var(--text-hi); font: 700 46px/1 var(--font-mono);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 12px 20px -12px rgba(0, 0, 0, .9);
}
.flap__d::after { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 1px); z-index: 2; height: 2px; background: rgba(5, 7, 13, .8); } /* hinge, above the folding halves */
.flap__colon {
  width: 8px; height: 28px;
  background: radial-gradient(circle closest-side, var(--text-lo) 85%, transparent) 50% 0 / 8px 8px no-repeat,
    radial-gradient(circle closest-side, var(--text-lo) 85%, transparent) 50% 100% / 8px 8px no-repeat;
}
.ritual__cards .flap__day { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; }
/* Flap halves appended by site.v1.js during the flip (contract, verbatim) */
.flap__d { position: relative; display: inline-grid; place-items: center; overflow: hidden; }
.flap__half { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; background: inherit; }
.flap__half--top { top: 0; transform-origin: 50% 100%; }
.flap__half--bottom { bottom: 0; transform-origin: 50% 0%; }
.flap__half > span { position: absolute; left: 0; right: 0; height: 200%; display: grid; place-items: center; }
.flap__half--top > span { top: 0; }
.flap__half--bottom > span { bottom: 0; }
@media (max-width: 359px) { .flap__d { width: 46px; height: 64px; font-size: 40px; } }
@media (min-width: 900px) { .ritual__cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Games: a compact list on phones, poster cards from 600 px. The button's ::after makes the whole card one target. */
.games__grid { display: grid; border-top: 1px solid rgba(255, 255, 255, .08); }
.game {
  position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "media name rank" "media tag tag";
  align-items: center; column-gap: 14px; row-gap: 2px; min-height: 64px; padding: 10px 6px; border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: radial-gradient(circle 34px at 26px 50%, color-mix(in srgb, var(--halo) 30%, transparent), transparent);
}
.game:target { background-color: rgba(31, 184, 173, .08); }
.game__media { grid-area: media; position: relative; }
.game__icon { width: 40px; height: 40px; }
.game__poster, .game__rule { display: none; }
.game__name { grid-area: name; font-size: 1rem; }
.game__open { padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-align: left; }
.game__open::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.game__open:focus-visible { outline: none; }
.game__open:focus-visible::after { outline: 2px solid var(--teal); outline-offset: -2px; }
.game__tagline { grid-area: tag; font-size: .875rem; line-height: 1.35; color: var(--text-lo); }
.game__rank { grid-area: rank; justify-self: end; }
/* Narrow phones: the score chip gets its own row instead of squeezing the name (« Temps + 5 s par coup faux »). */
@media (max-width: 359px) {
  .game { grid-template-columns: 40px minmax(0, 1fr); grid-template-areas: "media name" "media tag" "media rank"; }
  .game__rank { justify-self: start; margin-top: 4px; }
}
.game__rank, .sample__rank { font: 600 .75rem/1.25 var(--font-body); letter-spacing: 0; text-transform: none; color: var(--text-hi); }
@media (min-width: 600px) {
  .games__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; border: 0; }
  .game {
    display: flex; flex-direction: column; align-items: stretch; gap: 6px; height: 100%; padding: 12px 12px 18px;
    border: 1px solid var(--hairline); border-radius: var(--r-card); background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
    transition: border-color var(--d-press) var(--e-fade);
  }
  .game:hover { border-color: var(--outline); }
  .game:target { border-color: rgba(31, 184, 173, .65); }
  /* Until the poster arrives (lazy) or if it fails, the tile icon on its halo keeps the card composed. */
  .game__media {
    aspect-ratio: 1; margin-bottom: 8px; overflow: hidden; border-radius: 14px;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--halo) 34%, transparent), transparent) 50% 50% / 62% 62% no-repeat, #070A12;
  }
  .game__icon { position: absolute; inset: 0; width: 30%; height: 30%; margin: auto; }
  .game__poster { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; }
  .game__name { margin-top: 4px; font-size: 1.0625rem; }
  .game__tagline { color: #C9D0DE; }
  .game__rule { display: block; flex: 1; font-size: .8125rem; line-height: 1.5; color: var(--text-lo); }
  .game__rank { align-self: flex-start; margin-top: 8px; }
  .game__open::after { border-radius: var(--r-card); }
  .game__open:focus-visible::after { outline-offset: 3px; }
}
@media (min-width: 600px) and (max-width: 759px) { .games__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 600px) { .game__rank { border-radius: 10px; } } /* a two-line chip reads as a label, not a broken pill */

/* Trial: trial.v1.js replaces the fallback below and brings its own .trial-* styles. */
.essai__grid { display: grid; align-items: center; container-type: inline-size; }
/* The mounted card is its width + 156 px tall: reserve it, so the page does not jump when the module arrives. */
#trial { width: 100%; max-width: 440px; margin-inline: auto; min-height: calc(min(100cqw, 440px) + 156px); }
.essai__poster { width: min(100%, 360px); margin-inline: auto; border-radius: var(--r-card); }
.essai__note { margin-top: 14px; font-size: .875rem; text-align: center; color: var(--text-lo); }
@media (min-width: 1024px) {
  .essai__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); column-gap: 64px; }
  .essai__grid .section-head { margin-bottom: 0; }
}

/* Friends: the board is written in its final order; site.v1.js only moves the rows (transforms). */
.friends__grid { display: grid; gap: 40px; }
.friends__main > p { margin-top: 14px; color: var(--text-lo); }
.friends__main > .btn { margin-top: 22px; }
.board { padding: 16px 16px 18px; }
.board__cap {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: .875rem; color: var(--text-lo);
}
.board__cap img { width: 32px; height: 32px; }
.board__cap b { font: 700 1rem var(--font-display); }
.board__body { display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 10px; margin-top: 12px; }
.board__ranks, .board__rows { display: grid; grid-auto-rows: 52px; gap: 6px; }
.board__ranks span { display: grid; place-items: center; font: 700 .8125rem/1 var(--font-mono); color: var(--text-lo); }
.board__rows li { display: flex; align-items: center; gap: 12px; padding: 0 14px 0 10px; border-radius: 14px; background: rgba(255, 255, 255, .03); }
.board__rows .is-you { position: relative; z-index: 1; background: #14303A; box-shadow: inset 0 0 0 1px rgba(31, 184, 173, .5); }
.board__avatar { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--c); color: var(--ink); font: 700 .8125rem/1 var(--font-display); }
.board__name { font: 600 .9375rem/1.2 var(--font-display); }
.board__time { margin-left: auto; font: 700 .9375rem/1 var(--font-mono); font-variant-numeric: tabular-nums; }
/* Share card in miniature on its dark stand. Colours from share_card_data.dart for Royal Cells:
   backdrop #D2412C (white text ≥ 4.5:1), accent on the white plate #B13725. Confetti stay still. */
.sharecard { display: grid; justify-items: center; gap: 16px; }
.sharecard__stand {
  display: grid; place-items: center; width: 100%; max-width: 440px; padding: clamp(28px, 6vw, 48px) 20px;
  border-radius: var(--r-card); border: 1px solid rgba(255, 255, 255, .06); background: #070A12;
}
.sharecard__card {
  position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: min(100%, 272px); aspect-ratio: 1; overflow: hidden; border-radius: 22px; background: #D2412C; color: #fff; text-align: center;
  box-shadow: 0 28px 56px -26px rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.sharecard__confetti { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.sharecard__score { font: 800 46px/1 var(--font-display); letter-spacing: -.035em; }
.sharecard__game { margin-top: 6px; font: 600 .75rem/1.2 var(--font-display); }
.sharecard__plate { width: 74%; margin-top: 14px; padding: 13px 10px 11px; border-radius: 14px; background: #fff; color: #16202E; box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .25); }
.sharecard__lead { font: 700 .75rem/1.15 var(--font-display); }
.sharecard__accent { font: 800 1.0625rem/1.15 var(--font-display); letter-spacing: -.02em; color: #B13725; }
.sharecard__brand { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; font: 800 .6875rem/1 var(--font-display); }
.sharecard__brand i { width: 8px; height: 8px; border-radius: 50%; background: #D2412C; }
.sharecard__foot { margin-top: 12px; font: 600 .6875rem/1 var(--font-display); }
.sharecard figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 10px; font-size: .9375rem; text-align: center; color: var(--text-lo); }
@media (min-width: 1024px) { .friends__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; column-gap: 56px; } }

/* Daily progression */
.journee__cards { display: grid; gap: 16px; }
.journee__cards > li { display: flex; flex-direction: column; gap: 8px; padding: 20px 20px 22px; }
.journee__cards p { color: var(--text-lo); }
.journee__visual { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-height: 52px; margin-bottom: 10px; } /* narrow phones: the tag drops under the pill */
.journee__visual .tag-example { margin-left: auto; }
.streak { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--streak-bg); color: var(--streak); }
.streak svg { width: 26px; height: 26px; }
.journee__cards .streak__days { font: 800 1.5rem/1 var(--font-display); letter-spacing: -.02em; color: var(--streak); }
.journee__cards .lvl__label { font: 700 1.0625rem/1 var(--font-mono); letter-spacing: .04em; color: var(--mint); white-space: nowrap; }
.lvl { flex: 1; min-width: 60px; height: 8px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.lvl__fill { display: block; height: 100%; border-radius: inherit; background: var(--solved); }
.lvl__fill { transform-origin: 0 50%; transform: scaleX(var(--p)); } /* contract: site.v1.js animates scaleX 0 → --p */
.quest-pill {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 16px 8px 10px;
  border-radius: 999px; border: 1px solid rgba(255, 194, 75, .45); background: #131A29; font: 600 .875rem/1.25 var(--font-body);
}
.quest-pill svg { flex: none; width: 32px; height: 32px; padding: 7px; border-radius: 50%; background: rgba(255, 194, 75, .14); color: var(--quest); }
.quest-pill b { margin-left: auto; white-space: nowrap; color: var(--quest); }
.journee__visual .quest-pill { flex: 1 1 auto; width: auto; min-width: 0; } /* leaves room for the « Exemple » tag */
.quests { margin-top: 8px; border-top: 1px solid rgba(255, 255, 255, .07); }
.quests li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding-block: 6px; border-bottom: 1px solid rgba(255, 255, 255, .07); font-size: .9375rem; }
.quests .chip { flex: none; color: var(--quest); border-color: rgba(255, 194, 75, .3); }
.journee__foot { display: flex; align-items: flex-start; gap: 12px; max-width: 46rem; margin-top: 28px; }
.journee__foot svg { flex: none; width: 22px; height: 22px; margin-top: 1px; color: var(--quest); }
.journee__note { max-width: 46rem; margin-top: 10px; padding-left: 34px; }
@media (min-width: 900px) { .journee__cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Download */
.download__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.download__mark { position: relative; width: 160px; height: 160px; margin-bottom: 28px; }
.download__halo {
  position: absolute; left: 50%; top: 50%; width: min(336px, 100vw); aspect-ratio: 1; translate: -50% -50%; /* never wider than the screen */
  border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, rgba(0, 192, 240, .18), rgba(0, 192, 240, 0));
}
#dl-flask { position: relative; width: 160px; height: 160px; }
.download h2 { max-width: 20ch; }
.download .lead { margin-top: 14px; }
.download__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 24px 36px; margin-top: 30px; }
.download .store-badges { justify-content: center; }
.download__qr { display: none; }
.download .small { margin-top: 26px; }
@media (min-width: 1024px) {
  .download__qr {
    display: flex; align-items: center; gap: 16px; padding: 10px 18px 10px 10px; text-align: left;
    border-radius: 18px; border: 1px solid var(--hairline); background: linear-gradient(135deg, var(--glass-top), var(--glass-bottom));
  }
  .download__qr img { width: 132px; height: 132px; border-radius: 10px; }
  .download__qr figcaption { max-width: 8.5rem; font-size: .9375rem; line-height: 1.4; color: var(--text-lo); }
}

/* ---------- Mobile bar: shown by site.v1.js once the hero button has scrolled away ---------- */
.getbar {
  position: fixed; inset: auto 0 0; z-index: 30; padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--hairline); background: var(--surface);
  box-shadow: 0 24px 0 var(--surface); /* covers the easeOutBack overshoot of the entrance */
}
.getbar .btn { width: 100%; min-height: 48px; }
html:not(.is-paused) .getbar.is-in { animation: home-getbar-in var(--d-in) var(--e-pop) both; }
@keyframes home-getbar-in { from { transform: translateY(100%); } }
@media (max-width: 859px) { .site-footer { padding-bottom: calc(112px + env(safe-area-inset-bottom)); } } /* room for the bar */
@media (min-width: 860px) { .getbar { display: none !important; } }

/* ---------- Sample window: a centred panel, a bottom sheet under 600 px (.is-sheet, set by site.v1.js) ---------- */
.sample { width: fit-content; max-width: none; max-height: none; margin: auto; padding: 0; border: 0; overflow: visible; background: none; color: var(--text-hi); }
.sample::backdrop { background: rgba(5, 7, 13, .72); }
html:not(.is-paused) .sample[open]::backdrop { animation: home-fade var(--d-in) var(--e-fade); }
@keyframes home-fade { from { opacity: 0; } }
html:has(.sample[open]) { overflow: hidden; }
.sample__panel {
  position: relative; overflow-y: auto; overscroll-behavior: contain; padding: 20px;
  width: min(calc(100vw - 32px), clamp(320px, calc(100vh - 232px), 560px)); max-height: calc(100vh - 32px);
  width: min(calc(100vw - 32px), clamp(320px, calc(100dvh - 232px), 560px)); max-height: calc(100dvh - 32px);
  border-radius: var(--r-dialog); border: 1px solid rgba(255, 255, 255, .1); background: var(--surface); box-shadow: 0 48px 100px -32px rgba(0, 0, 0, .9);
}
/* Head row: icon, titles, tag, a 92 px track kept free for the prev/next pair, close. */
.sample__head { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 92px 44px; align-items: start; column-gap: 12px; margin-bottom: 16px; }
.sample__icon { width: 40px; height: 40px; margin-top: 2px; }
.sample__titles h2 { font-size: 1.25rem; line-height: 1.2; letter-spacing: -.02em; }
.sample__tagline { margin-top: 2px; font-size: .875rem; color: var(--text-lo); }
.sample__head .tag-example { margin-top: 11px; }
.sample__close { grid-column: 5; }
.sample__nav { grid-column: 4; display: flex; gap: 4px; justify-content: flex-end; }
.sample__nav button {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 12px;
  border: 1px solid var(--hairline); background: rgba(255, 255, 255, .04); color: var(--text-hi);
  transition: background-color var(--d-press) var(--e-fade), border-color var(--d-press) var(--e-fade);
}
.sample__nav button:hover { background: rgba(255, 255, 255, .08); border-color: var(--outline); }
.sample__nav svg { width: 18px; height: 18px; }
.sample__rule { margin-top: 14px; font-size: .9375rem; line-height: 1.55; color: var(--text-lo); }
.sample__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.sample__foot .btn { white-space: nowrap; }
.sample__rank { margin-right: auto; }
.sample.is-sheet { width: 100%; margin: auto 0 0; }
.sample.is-sheet .sample__panel {
  width: 100%; max-height: 92vh; max-height: 92dvh; padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
  border-width: 1px 0 0; border-radius: var(--r-dialog) var(--r-dialog) 0 0;
}
.sample.is-sheet .sample__head { grid-template-columns: 40px minmax(0, 1fr) 92px 44px; column-gap: 10px; }
.sample.is-sheet .sample__head .tag-example { grid-column: 2; grid-row: 2; justify-self: start; margin-top: 8px; }
.sample.is-sheet .sample__close { grid-column: 4; grid-row: 1; }
.sample.is-sheet .sample__nav { grid-column: 3; grid-row: 1; }
.sample.is-sheet .sample__foot .btn--primary { flex: 1 0 auto; } /* full width on its own line when the row is short */
/* Stage of the sig modules (contract, verbatim) */
.sig-stage { position: relative; width: 100%; aspect-ratio: 1 / 1; container-type: size; overflow: hidden; isolation: isolate; contain: layout paint; border-radius: 18px; background: #070A12; }
.sig-stage > [class^="mk-sig-"] { position: absolute; inset: 0; overflow: hidden; }

/* ---------- Intro start states: html.intro is set by the head guard and removed by site.v1.js ---------- */
/* Only decoration starts away from rest (halos, flask, rule, tiles, countdown); the copy is never hidden. */
html.intro #hs-aurora i { opacity: .5; }
html.intro #hs-aurora .a1 { transform: translate(-3%, -3%); }
html.intro #hs-aurora .a2 { transform: translate(3%, 3%); }
html.intro .brand__icon { transform: scale(.85); }
html.intro #hs-rule .seg { transform: scaleX(0); }
html.intro #hs-tiles .tile { opacity: 0; transform: translateY(14px); }
html.intro #hs-countdown { transform: translateY(8px); }

/* ---------- Scroll reveals: CSS only, driven by the scroll position, finished once a card is in view ---------- */
/* Off under reduced motion and Pause (cards then simply stand still), and where view() is unknown. */
@media screen and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    html:not(.is-paused):not(.reduced) :is(.ritual__cards, .games__grid, .journee__cards) > li,
    html:not(.is-paused):not(.reduced) :is(#board, #sharecard) {
      animation: home-rise linear both;
      animation-timeline: view();
      animation-range: entry calc(var(--i, 0) * var(--step, 6%)) entry calc(60% + var(--i, 0) * var(--step, 6%));
    }
    .games__grid > li { --step: 1.5%; }
  }
}
@keyframes home-rise { from { opacity: .001; transform: translateY(14px); } }

/* Short or zoomed screens give a narrow panel: the head then stacks the tag under the title. */
.sample__panel { container-type: inline-size; }
@container (max-width: 520px) {
  .sample__head { grid-template-columns: 40px minmax(0, 1fr) auto 44px; column-gap: 10px; }
  .sample__head .tag-example { grid-column: 2; grid-row: 2; justify-self: start; margin-top: 8px; }
  .sample__nav { grid-column: 3; grid-row: 1; }
  .sample__close { grid-column: 4; grid-row: 1; }
}

/* Short phones: the sheet scrolls, its actions stay in reach. */
.sample.is-sheet .sample__foot { position: sticky; bottom: calc(-20px - env(safe-area-inset-bottom)); z-index: 1; margin-bottom: calc(-20px - env(safe-area-inset-bottom)); padding: 12px 0 calc(20px + env(safe-area-inset-bottom)); background: var(--surface); }
/* Closing: the backdrop fades with the panel instead of vanishing in one frame. */
@keyframes home-fade-out { to { opacity: 0; } }
html:not(.is-paused) .sample.is-closing::backdrop { animation: home-fade-out var(--d-out) var(--e-exit) forwards; }
