/* varyAlive homepage — ported from Laura's design bundle (2026-08-04, Toby).
   Source: crew-uploads/1785863895421-f850360f.html (desktop) + ...75b65a5f.html (mobile).
   Palette: accent #7A4DD6 / deep #552FA8 / dark #1B1329 / bg #FBF8F4 / ink #1F1B18.
   The bundle carried ZERO @media rules (two fixed canvases). All breakpoints below
   are authored here, not in the design. */

/* ---------- Fonts ---------- */
@font-face { font-family:'Outfit'; font-style:normal; font-weight:400; font-display:swap; src:url("../assets/home/fonts/Outfit-400.woff2") format('woff2'); }
@font-face { font-family:'Outfit'; font-style:normal; font-weight:600; font-display:swap; src:url("../assets/home/fonts/Outfit-600.woff2") format('woff2'); }
@font-face { font-family:'Outfit'; font-style:normal; font-weight:700; font-display:swap; src:url("../assets/home/fonts/Outfit-700.woff2") format('woff2'); }
@font-face { font-family:'Outfit'; font-style:normal; font-weight:800; font-display:swap; src:url("../assets/home/fonts/Outfit-800.woff2") format('woff2'); }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:400; font-display:swap; src:url("../assets/home/fonts/Manrope-400.woff2") format('woff2'); }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:500; font-display:swap; src:url("../assets/home/fonts/Manrope-500.woff2") format('woff2'); }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:600; font-display:swap; src:url("../assets/home/fonts/Manrope-600.woff2") format('woff2'); }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:700; font-display:swap; src:url("../assets/home/fonts/Manrope-700.woff2") format('woff2'); }

/* ---------- Base ---------- */
*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{ background:#FBF8F4; }
#va-home{ width:100% !important; max-width:100%; margin:0 auto; }
#va-home img{ max-width:100%; }
a{ -webkit-tap-highlight-color:transparent; }

/* ---------- Language toggle (DE/EN) ----------
   Ported from css/base.css:109-110 (this page doesn't load base.css). Needs
   !important: the "Kosten teilen" tile tags its € (de) / $ (en) icons with
   lang="de"/lang="en" directly plus an inline display:inline-block, and an
   inline style always beats an external rule regardless of specificity —
   without !important both icons showed at once, incl. first paint. */
html[lang="de"] [lang="en"]{ display:none !important; }
html[lang="en"] [lang="de"]{ display:none !important; }

/* Nav DE/EN buttons. Active/inactive state lives here (was inline on the two
   buttons) so js/language-toggle.js toggling .active actually changes the look. */
.lang-btn{ border:1px solid transparent; background:none; color:rgb(107,100,94); font-family:Manrope,sans-serif; font-size:12px; font-weight:600; padding:4px 8px; border-radius:6px; cursor:pointer; }
.lang-btn.active{ background:rgb(251,248,244); color:rgb(31,27,24); font-weight:700; border-color:rgba(31,27,24,0.14); box-shadow:0 1px 2px rgba(31,27,24,0.12); }

/* Grid safety net. Grid items default to min-width:auto, so a track whose
   content (a fixed-px mock, a long German word) refuses to shrink can push the
   grid wider than its container and get clipped by a section's overflow:hidden.
   Cap every grid item to its track and let it shrink. No effect on the desktop
   layout (tracks are wider than their content there) — this only bites when a
   track is squeezed narrower than a fixed child, where it now shrinks instead
   of overflowing. Verified pixel-identical at 1440/1180/1024/900/768/640/390.
   (Toby, 2026-08-05) */
#va-home [style*="grid-template-columns"] > *{ min-width:0; max-width:100%; }

/* Reduced motion: freeze the mock loops on a representative frame.
   The mock layers are absolute siblings with no base opacity, so
   animation:none stacks every keyframe at once (both phone mocks render
   garbled). Pausing at a fixed delay keeps one coherent frame. (Nina, 2026-08-04) */
@media (prefers-reduced-motion: reduce){
  #va-home *{ animation-play-state:paused !important; animation-delay:-10s !important; }
}

/* ---------- KI chip (homepage-local) ----------
   Marketing-mock twin of the shared `.ki-catalog-chip` (css/ki-catalog-chip.css),
   NOT that file: the shared chip is a strict data gate (image_is_ki === true
   from a real row) and its own boundary comment excludes assets/home/* by
   name. These mocks have no such row — Laura ruled by name that the
   assets/home/card-*.jpg mocks get the hint anyway (H-KI-1, 2026-09-28,
   overturning Phase R's "assets/home/* OUT"), so they get a same-chrome,
   always-on, homepage-only twin instead of the gated one. Position matches
   the CURRENT app placement (bottom-trailing / right, Laura e62739e4,
   21.09.), not the shared CSS file's stale bottom-leading `left:8px` —
   flipping that file is a separate, site-wide decision (Nina audit §3.2).
   Laura override (07.11.2026, re-confirmed mission #877 Nina gate r2 M-3,
   2026-11-08): EVERY AI-generated image on the homepage carries the chip,
   covers and photo tiles alike — the memory-book grid tiles filled with
   catalog images at 5a60266 are real AI images too, not exempt just
   because they sit in a "photo someone added" context. Never on
   logo/badges/hero-bg/mem-photo (those aren't catalog-image renders).
   (Toby, 2026-09-28 / 2026-11-08) */
.va-ki-chip{
  position:absolute; right:8px; bottom:8px; z-index:2;
  box-sizing:border-box; padding:3px 6px; border-radius:4px;
  background:rgba(0,0,0,0.55); color:#fff;
  font-size:11px; font-weight:600; line-height:1.2;
  border:0.5px solid rgba(255,255,255,0.35);
  pointer-events:none; user-select:none; -webkit-user-select:none;
}

/* ---------- Keyframes (hero) ----------
   Rebuilt 08.11.2026 (Toby, mission #877, Nina gate M-1 — reports/ux/
   homepage-877-animation-ux-gate-2026-11-08-nina.md): the old hero mock
   (vaCardA/B full-screen fly-away, vaMatch "MATCH MIT MIA" interstitial,
   vaSent full-screen "Termin versendet" screen) stopped matching the real
   app — Emma's App-Abgleich (agent-work/website/animation-brief-2026-10-28.md
   §2.1, grounded in app-store-screenshots/export/iphone-de/hell/
   02-swipen-im-chat.png + 01-freunde.png) shows swipe now lives inside a
   chat bubble "Gemeinsam swipen" (one card, horizontal gesture only, no
   full-screen flight), a match is a brief confetti+"+1" overlay on the SAME
   card (the old full-screen "MATCH MIT [Name]" interstitial was removed
   from the app itself with #807 — this is a deliberate behaviour change,
   not a regression), and proposing opens a bottom sheet that closes back
   into a small proposal card — no standalone "Termin versendet ✓" screen
   exists. Loop cut from 15.9s to 13s per the brief's ~12-13s target (the
   real steps are shorter — the match overlay alone is 1300ms).
   Structure: one "shell" card (chat-bubble chrome) holds two cross-fading
   inner views — vaSwipeView (card stack + confetti + Vorschlagen button)
   and vaProposalView (the sent-proposal card) — switched with steps(1)
   opacity while a separate vaSheet layer covers the shell, exactly like the
   "swap while covered" trick vaMatch/vaSent already used. A third sibling
   layer (vaHCLogo/vaHCIcon/vaHCRing/vaHCName/vaHCCap) closes the loop,
   ported unchanged in spirit from the old vaLogo/vaHeroEnd* set, just
   retimed to 13s. All animation: durations in index.html for this scene
   must stay 13s together. No browser/Chromium available in this sandbox
   (see feedback_sandbox_no_local_browser_server) — percentages are
   deliberately round, not frame-measured; flag to Nina/Tara for a pixel
   pass. */
@keyframes vaSwipeView { 0%, 56.14% { opacity: 1; } 56.15%, 97.69% { opacity: 0; } 100% { opacity: 1; } }
@keyframes vaProposalView { 0%, 56.14% { opacity: 0; } 56.15%, 84.61% { opacity: 1; } 84.62%, 100% { opacity: 0; } }
@keyframes vaSheet { 0%, 52.3% { transform: translateY(100%); } 56.15%, 69.23% { transform: translateY(0%); } 73.08%, 100% { transform: translateY(100%); } }
@keyframes vaSheetPress { 0%, 65.5% { transform: scale(1); filter: none; } 66.15% { transform: scale(0.94); filter: brightness(1.15); } 67.31%, 100% { transform: scale(1); filter: none; } }
@keyframes vaSwA { 0%, 15.38% { transform: translate(0,0) rotate(0deg); opacity: 1; border-color: transparent; } 18.08% { transform: translate(-8px,-3px) rotate(-5deg); opacity: 1; border-color: rgba(107,96,88,0.5); } 21.15%, 97.69% { transform: translate(-26px,5px) rotate(-9deg); opacity: 0; border-color: transparent; } 100% { transform: translate(0,0) rotate(0deg); opacity: 1; border-color: transparent; } }
@keyframes vaSwB { 0%, 21.15% { transform: translateY(10px) scale(0.96); opacity: 0.7; border-color: transparent; } 24.23%, 33.46% { transform: translateY(0) scale(1); opacity: 1; border-color: transparent; } 36.15% { transform: scale(1.02); opacity: 1; border-color: rgb(47,191,113); } 39%, 100% { transform: translateY(0) scale(1); opacity: 1; border-color: transparent; } }
@keyframes vaStickerNein { 0%, 15.38% { opacity: 0; transform: scale(0.6) rotate(8deg); } 18.08% { opacity: 1; transform: scale(1) rotate(8deg); } 20%, 21.15% { opacity: 1; transform: scale(1) rotate(8deg); } 23.08%, 100% { opacity: 0; transform: scale(0.9) rotate(8deg); } }
@keyframes vaStickerJa { 0%, 33.46% { opacity: 0; transform: scale(0.6) rotate(8deg); } 36.15% { opacity: 1; transform: scale(1) rotate(8deg); } 38%, 41% { opacity: 1; transform: scale(1) rotate(8deg); } 43.46%, 100% { opacity: 0; transform: scale(0.9) rotate(8deg); } }
@keyframes vaConfetti { 0%, 33.46% { opacity: 0; transform: translate(-50%,-50%) scale(0.5); } 36.15% { opacity: 1; transform: translate(-50%,-50%) scale(1.15); } 38.46%, 43.46% { opacity: 1; transform: translate(-50%,-50%) scale(1); } 46.15%, 100% { opacity: 0; transform: translate(-50%,-50%) scale(1); } }
@keyframes vaPropBtn { 0%, 43.46% { opacity: 0; transform: translateY(8px) scale(1); filter: none; } 46.15%, 49% { opacity: 1; transform: translateY(0) scale(1); filter: none; } 50% { opacity: 1; transform: translateY(0) scale(0.93); filter: brightness(1.15); } 51.15%, 100% { opacity: 1; transform: translateY(0) scale(1); filter: none; } }
@keyframes vaActX { 0%, 17% { transform: scale(1); filter: none; } 18.08% { transform: scale(0.88); filter: brightness(0.94); } 19.5%, 100% { transform: scale(1); filter: none; } }
@keyframes vaActHeart { 0%, 35% { transform: scale(1); filter: none; } 36.15% { transform: scale(0.88); filter: brightness(1.1); } 37.5%, 100% { transform: scale(1); filter: none; } }
@keyframes vaHCLogo { 0%, 84.61% { opacity: 0; } 86.92%, 97.69% { opacity: 1; } 100% { opacity: 0; } }
@keyframes vaHCIcon { 0%, 84.61% { transform: scale(0.7) rotate(-7deg); } 88.46% { transform: scale(1.08) rotate(2deg); } 90%, 100% { transform: scale(1) rotate(0deg); } }
@keyframes vaHCRing { 0%, 86% { transform: scale(0.9); opacity: 0; } 88.46% { opacity: 0.5; } 93.08%, 100% { transform: scale(1.9); opacity: 0; } }
@keyframes vaHCName { 0%, 87.3% { opacity: 0; transform: translateY(8px); } 90%, 100% { opacity: 1; transform: none; } }
@keyframes vaHCCap { 0%, 88.6% { opacity: 0; transform: translateY(12px); } 91.3%, 100% { opacity: 1; transform: none; } }
@keyframes vaFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes vaWrite { from { opacity: 0; transform: translateY(9px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes vaSA { 0%, 21.97% { opacity: 1; } 26.45%, 92.25% { opacity: 0; } 100% { opacity: 1; } }
@keyframes vaSB { 0%, 25.18% { opacity: 0; } 29.69%, 76.17% { opacity: 1; } 80.68%, 100% { opacity: 0; } }
/* Added 30.09.2026 (Toby, mission #715, task 7f4b1569), retimed same day
   (Laura follow-up — the tap needed a beat to land before the fade, not a
   press ending exactly where the fade already started): a 0.3s pause was
   inserted right after vaPressLeave completes and before vaSA's fade-out
   begins, so the loop reads as tap -> hold -> fade instead of tap-and-
   instant-fade. Every keyframe stop at or after the old 22.4% cut point
   (vaSA's own fade start, vaSB, vaToast, vaScroll, vaC1-3, vaCount, vaLoop,
   vaEnd*) shifted later by that same 0.3s; nothing before it moved. Scene
   duration grew 15.2s -> 15.5s to hold the inserted pause without
   compressing anything else. Computed with a script, not by hand. */
@keyframes vaPressLeave { 0%, 19.28% { transform: scale(1); filter: none; } 20.44% { transform: scale(0.93); filter: brightness(1.15); } 21.97%, 100% { transform: scale(1); filter: none; } }
@keyframes vaToast { 0%, 29.69% { opacity: 0; transform: translateY(-7px); } 34.2%, 44.5% { opacity: 1; transform: none; } 49.01%, 100% { opacity: 0; transform: translateY(-7px); } }
@keyframes vaEndIcon { 0%, 72.25% { transform: scale(0.7) rotate(-7deg); } 78.03% { transform: scale(1.06) rotate(2deg); } 81.96%, 100% { transform: scale(1) rotate(0deg); } }
@keyframes vaEndRing { 0%, 76.76% { transform: scale(0.9); opacity: 0; } 78.03% { opacity: 0.5; } 85.78%, 100% { transform: scale(1.9); opacity: 0; } }
@keyframes vaEndName { 0%, 76.17% { opacity: 0; transform: translateY(8px); } 80.68%, 100% { opacity: 1; transform: none; } }
@keyframes vaEndCap { 0%, 78.72% { opacity: 0; transform: translateY(12px); } 83.23%, 100% { opacity: 1; transform: none; } }
@keyframes vaLoop { 0%, 72.25% { opacity: 0; } 76.76%, 92.25% { opacity: 1; } 100% { opacity: 0; } }
/* vaPress (Jetzt-starten button), vaScroll/vaC1-3/vaCount (comment-feed
   reveal) removed 2026-11-13 (mission #1001, Nina audit items 2+4): the
   live card dropped its start button (app has none while running) and the
   memory card's scroll-reveal comment feed became a static carousel +
   plain Kommentieren bar, so none of the four had a caller left. */
@keyframes vaBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0.2; } }
/* Four states (was three): app has Voll/Okay/Niedrig/Leer (+ hidden
   Unbekannt, not shown here — display-only marketing claim, Nina audit
   §1.C). Added vaSbT4 for Leer rather than reusing a slot, since Niedrig and
   Leer are both real, distinct, visible states. (Toby, 2026-09-28) */
@keyframes vaSbFill { 0%, 20% { width: 89%; background: #34C759; } 23%, 43% { width: 52%; background: #FFC300; } 46%, 66% { width: 20%; background: #FF6B57; } 69%, 89% { width: 6%; background: #8E1B0E; } 100% { width: 89%; background: #34C759; } }
@keyframes vaSbT1 { 0%, 20% { opacity: 1; } 23%, 96% { opacity: 0; } 100% { opacity: 1; } }
@keyframes vaSbT2 { 0%, 20% { opacity: 0; } 23%, 43% { opacity: 1; } 46%, 100% { opacity: 0; } }
@keyframes vaSbT3 { 0%, 43% { opacity: 0; } 46%, 66% { opacity: 1; } 69%, 100% { opacity: 0; } }
@keyframes vaSbT4 { 0%, 66% { opacity: 0; } 69%, 89% { opacity: 1; } 92%, 100% { opacity: 0; } }
@keyframes vaRing { 0% { transform: scale(0.9); opacity: 0.45; } 100% { transform: scale(1.75); opacity: 0; } }
@keyframes vaNotifPulse { 0%, 100% { box-shadow: 0 10px 30px rgba(31,27,24,0.14), 0 0 0 0 var(--va-pulse); } 50% { box-shadow: 0 10px 30px rgba(31,27,24,0.14), 0 0 0 9px transparent; } }
@keyframes vaMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes vaDrift { 0%, 100% { transform: translate(0,0); } 50% { transform: translate(16px,-20px); } }
@keyframes vaTick { 0%, 24% { opacity: 0; transform: scale(0.7); } 34%, 100% { opacity: 1; transform: scale(1); } }

/* ---------- Responsive (authored — bundle had none) ----------
   Desktop canvas is 1440 with a 1120 centred content column via
   padding: calc(50% - 560px). Below ~1180 that padding is clamped;
   below ~820 the multi-column grids collapse to a single column. */

@media (max-width: 1180px){
  /* clamp the centred-column side padding so content keeps a gutter */
  #va-home [style*="calc(50% - 560px)"]{ padding-left:32px !important; padding-right:32px !important; }
}

@media (max-width: 900px){
  /* hero: text over phone. row-gap here (and on the two arms below): these
     three containers only set `column-gap: 72px` inline (never a `gap`
     shorthand, since desktop is a genuine two-column layout with no stacked
     rows), so a collapsed single column had zero space between stacked
     children beyond the child's own margin — which is exactly what breaks
     under the reveal rewrite noted above. Keyed on the same container
     selector as the collapse rule itself, so it can't be affected by that
     rewrite either.
     (Max ruling, 2026-08-06 — row-gap on the container, not child margin) */
  #va-home [style*="grid-template-columns: 1fr 480px"]{ grid-template-columns:1fr !important; row-gap:20px !important; }
  /* memory + rhythm two-up -> stack */
  #va-home [style*="grid-template-columns: 1fr 380px"]{ grid-template-columns:1fr !important; row-gap:20px !important; }
  #va-home [style*="grid-template-columns: 1fr 440px"]{ grid-template-columns:1fr !important; row-gap:20px !important; }
  /* four steps -> two */
  #va-home [style*="grid-template-columns: repeat(4, 1fr)"]{ grid-template-columns:1fr 1fr !important; row-gap:22px !important; }

  /* The three arms below key on the child's OWN style attribute
     ([style*="grid-area"]), which js/home.js:19-20 rewrites on reveal
     (writes .style.opacity, forcing a re-serialisation that can drop or
     rename the matched substring — same mechanism as the 640px Defect 1
     below). They still carry margin-top:24px, spacing the stacked mock
     from the copy above it, and are kept for that — not for placement,
     which is no longer reliable through them. Placement now comes from
     the container-keyed `> *` rule further down, which matches on the
     PARENT's attribute (never rewritten here — none of these three
     containers is [data-reveal]) and so can't be broken by the child
     rewrite.
     (Max ruling, 2026-08-06 — child-attribute arms demoted to
     margin-only; container-keyed `> *` rule is now the placement
     mechanism) */
  #va-home [style*="grid-template-columns: 1fr 480px"] > [style*="grid-area"]{ grid-area:auto !important; grid-column:1 !important; margin-top:24px !important; }
  #va-home [style*="grid-template-columns: 1fr 380px"] > [style*="grid-area"]{ grid-area:auto !important; grid-column:1 !important; margin-top:24px !important; }
  #va-home [style*="grid-template-columns: 1fr 440px"] > [style*="grid-area"]{ grid-area:auto !important; grid-column:1 !important; margin-top:24px !important; }

  /* Placement mechanism for the three stacking containers above. Keyed on
     the PARENT's grid-template-columns (a plain value, never a shorthand,
     never rewritten by the reveal observer) rather than on any CHILD
     style substring, so it keeps matching regardless of how WebKit vs.
     Chromium re-serialise the child's style attribute after
     js/home.js:19-20 sets .style.opacity. Same shape already proven on
     Laura's device by the grid safety net at :33.
     (Max ruling, 2026-08-06 — container-keyed child reset, survives the
     reveal-triggered style rewrite that broke the child-attribute arms
     above) */
  #va-home [style*="grid-template-columns: 1fr 480px"] > *,
  #va-home [style*="grid-template-columns: 1fr 380px"] > *,
  #va-home [style*="grid-template-columns: 1fr 440px"] > *
  { grid-row:auto !important; grid-column:1 !important; }

  /* O-home-hero-bg-cutoff-900: same seam as the 640px Defect 3 fix at :331,
     left open there deliberately (900px hero height varies with content
     differently — different heading wrap, mock size — so the 640 fix wasn't
     assumed to carry over unverified). Measured here: the gap is the same
     shape at every width in this band, not a fixed pixel amount, so the
     same stretch-to-containing-block mechanism (bottom:0 + height:auto,
     replacing the fixed 460px/420px desktop height) applies unchanged.
     Selectors also match at <=640px but the 640 block below wins there
     (later in source, equal specificity) with identical values, so this
     has no effect below 641px. */
  #va-home [style*="height: 460px"]{ inset:-60px -40px 0 -40px !important; height:auto !important; }
  #va-home [style*="height: 420px"]{ inset:-80px -60px 0 -60px !important; height:auto !important; }
}

@media (max-width: 640px){
  #va-home [style*="calc(50% - 560px)"]{ padding-left:20px !important; padding-right:20px !important; }
  /* everything to one column on phones */
  #va-home [style*="grid-template-columns: repeat(4, 1fr)"]{ grid-template-columns:1fr !important; }
  #va-home [style*="grid-template-columns: repeat(3, 1fr)"]{ grid-template-columns:1fr !important; }
  #va-home [style*="grid-template-columns: repeat(2, 1fr)"]{ grid-template-columns:1fr !important; }
  #va-home [style*="grid-template-columns: 1fr 1fr"]{ grid-template-columns:1fr !important; }
  /* hero / Erinnerungsbuch / Freundschaften: same three collapse rules as the
     900px block above, duplicated rather than moved. On Laura's iOS Safari the
     900px block does not apply (640px does), so 1fr 380px/440px never collapsed
     there and the flexible column resolved to ~0. Mechanism unknown — this is a
     workaround, not a fix for the 900 block, which stays as-is.
     (Max ruling, 2026-08-06 — 900 block inert on iOS Safari, mechanism unknown;
     duplicated into 640 as a workaround) */
  #va-home [style*="grid-template-columns: 1fr 480px"]{ grid-template-columns:1fr !important; row-gap:20px !important; }
  #va-home [style*="grid-template-columns: 1fr 480px"] > [style*="grid-area"]{ grid-area:auto !important; grid-column:1 !important; margin-top:24px !important; }
  #va-home [style*="grid-template-columns: 1fr 380px"]{ grid-template-columns:1fr !important; row-gap:20px !important; }
  #va-home [style*="grid-template-columns: 1fr 380px"] > [style*="grid-area"]{ grid-area:auto !important; grid-column:1 !important; margin-top:24px !important; }
  #va-home [style*="grid-template-columns: 1fr 440px"]{ grid-template-columns:1fr !important; row-gap:20px !important; }
  #va-home [style*="grid-template-columns: 1fr 440px"] > [style*="grid-area"]{ grid-area:auto !important; grid-column:1 !important; margin-top:24px !important; }
  /* any explicit child placement (grid-column, incl. "span N") surviving a
     640px collapse forces the browser to add an implicit extra track sized to
     content — e.g. the Social Battery card (grid-column: span 2) inside the
     "Was noch?" repeat(3,1fr) grid measured 44px/290px instead of one 350px
     track. Reset generally across every grid that collapses at this
     breakpoint, not per-section.
     Superseded as the placement mechanism by the container-keyed `> *`
     blanket rule below (:239) — kept as belt-and-braces, matches on the
     CHILD's own style attribute and so is not reliable once js/home.js:19-20
     rewrites that attribute on reveal (see Defect 1 below).
     (Max ruling, 2026-08-06 — general child-placement reset; motivating case
     index.html:485. Browser-agnostic, independent of the 900-block workaround
     above.) */
  #va-home [style*="grid-template-columns: repeat(4, 1fr)"] > [style*="grid-column"],
  #va-home [style*="grid-template-columns: repeat(3, 1fr)"] > [style*="grid-column"],
  #va-home [style*="grid-template-columns: repeat(2, 1fr)"] > [style*="grid-column"],
  #va-home [style*="grid-template-columns: 1fr 1fr"] > [style*="grid-column"],
  #va-home [style*="grid-template-columns: 1fr 480px"] > [style*="grid-column"],
  #va-home [style*="grid-template-columns: 1fr 380px"] > [style*="grid-column"],
  #va-home [style*="grid-template-columns: 1fr 440px"] > [style*="grid-column"]
  { grid-column:1 !important; }
  /* same reset for a grid-area child specifically (grid-column alone doesn't
     clear grid-area). No inline grid-area child exists in these four patterns
     today — every current one sits in the three 1fr <px> grids above, which
     already carry a grid-area arm — but the general-reset intent above only
     holds if a re-exported design bundle emitting one here is also caught.
     No margin-top: unlike the 1fr <px> sections, these grids have no
     stacked-mock-under-copy relationship to space out. Belt-and-braces per
     the note above — the `> *` blanket rule at :239 is the mechanism that
     actually holds under the reveal rewrite. (Ravi gate MF-2, 2026-08-06) */
  #va-home [style*="grid-template-columns: repeat(4, 1fr)"] > [style*="grid-area"]{ grid-area:auto !important; grid-column:1 !important; }
  #va-home [style*="grid-template-columns: repeat(3, 1fr)"] > [style*="grid-area"]{ grid-area:auto !important; grid-column:1 !important; }
  #va-home [style*="grid-template-columns: repeat(2, 1fr)"] > [style*="grid-area"]{ grid-area:auto !important; grid-column:1 !important; }
  #va-home [style*="grid-template-columns: 1fr 1fr"] > [style*="grid-area"]{ grid-area:auto !important; grid-column:1 !important; }
  /* hero phone mock: below the copy, centred, no bleed.
     transform-origin is top center, so scale(1.05) on a 306px box paints
     ~15px BELOW the layout box (scaling only stretches the bottom edge
     downward from a fixed top). The old margin-bottom:8px was smaller than
     that overflow, so the mock always bled into the CTA block below it
     regardless of the new row-gap (row-gap separates layout boxes, not
     painted overflow). Raised past the ~15px bleed rather than dropping the
     scale — the scale is the deliberate "enlarged mock" effect, so widening
     its own clearance is the smaller change.
     (Max ruling, 2026-08-06 — margin raised past the transform overflow) */
  #va-home [style*="height: 306px"][style*="width: 220px"]{
    grid-column:1 !important; grid-row:auto !important;
    transform:scale(1.05) !important; transform-origin:top center !important;
    margin:28px auto 24px !important;
  }
  /* hero headline scales down */
  #va-home h1[style*="font-size: 68px"]{ font-size:44px !important; }
  #va-home h2[style*="font-size: 44px"]{ font-size:32px !important; }
  #va-home h2[style*="font-size: 40px"]{ font-size:30px !important; }
  /* memory + rhythm section headlines ("Euer Erinnerungsbuch", "Damit
     Freundschaften nicht einschlafen.") and the download-section h2 had no
     mobile size at all, unlike every other heading above. At 52px, the
     unbreakable compound word "Erinnerungsbuch" is wider than the mobile
     column and overflows its own box (invisible to a box-size overflow
     check — the text paints outside without enlarging it), then gets cut
     by the section's overflow:hidden. Scale down like the others. */
  #va-home h2[style*="font-size: 52px"]{ font-size:36px !important; }
  #va-home h2[style*="font-size: 48px"]{ font-size:34px !important; }

  /* Defect 1 (Laura 12:32): mock/notif card painted above the heading in the
     Erinnerungsbuch and Freundschaften sections, despite DOM order already
     being heading -> copy -> cards -> mock, and despite the grid-area reset
     above resolving correctly in Chromium. Root cause (Ravi gate,
     2026-08-06): js/home.js:19-20 sets `.style.opacity` on every
     [data-reveal] element — including all four inline grid-area children —
     which re-serialises the whole style attribute. WebKit expands the
     grid-area shorthand into longhands on that rewrite; Chromium keeps the
     shorthand. So on Laura's device the attribute contains
     grid-column-start (no substring "grid-area"), the `[style*="grid-area"]`
     arm above never matches for these two sections, and the row is never
     reset to auto — while the `[style*="grid-column"]` arm elsewhere in this
     block does match (grid-column-start contains "grid-column"), which is
     why the column collapses correctly but the row stays pinned. The row
     reset has to hang off the same longhand-matching arms instead of the
     shorthand. Hero is unaffected: its reset at `:165` above keys on
     height/width, not grid-area, so the serialiser rewrite doesn't touch it.
     STILL NOT ENOUGH: Laura's follow-up ("first it looks fine. but then it
     switches. and things go on top of their headline again.") showed the
     grid-area/grid-column/grid-row arms below are re-broken by the SAME
     rewrite that broke grid-area — the rewrite doesn't consistently land on
     one particular longhand set either. Kept for the margin-top:24px they
     still provide; placement now comes from the container-keyed `> *`
     blanket rule at :239, which matches on the PARENT's attribute and can't
     be touched by any rewrite of the child's.
     (Max ruling, 2026-08-06 — row reset keyed on grid-column/grid-row
     longhands, because [data-reveal]'s opacity rewrite expands grid-area to
     longhands on WebKit and the shorthand-keyed arm above stops matching;
     superseded as placement mechanism same day, see :239) */
  #va-home [style*="grid-template-columns: 1fr 380px"] > [style*="grid-column"],
  #va-home [style*="grid-template-columns: 1fr 380px"] > [style*="grid-row"],
  #va-home [style*="grid-template-columns: 1fr 440px"] > [style*="grid-column"],
  #va-home [style*="grid-template-columns: 1fr 440px"] > [style*="grid-row"]
  { grid-row:auto !important; grid-column:1 !important; }

  /* Placement mechanism for every grid that collapses at this breakpoint.
     Keyed on the PARENT's grid-template-columns — a plain value, never a
     shorthand, never touched by js/home.js:19-20's opacity rewrite on
     [data-reveal] children — instead of any CHILD style substring, which is
     exactly what the arms above tried and what kept breaking as the rewrite
     landed on a different longhand each time. Blanket (`> *`, not
     `> [style*="grid-area"]` etc.) because every grid is single-column here,
     unlike the 900px block where two containers deliberately stay two-up.
     Same shape already proven on Laura's device by the grid safety net at
     :33.
     (Max ruling, 2026-08-06 — container-keyed blanket child reset, replaces
     the child-attribute arms above as the placement mechanism) */
  #va-home [style*="grid-template-columns"] > *{ grid-row:auto !important; grid-column:1 !important; }

  /* Defect 2 (Laura 12:32): "the first look buttons are not centered under
     this" — the hero CTA links sat hard-left under a centred phone mock.
     Centring only the CTA would leave the headline left-aligned and look
     worse (Toby §7), so centre the whole hero text column: eyebrow pill,
     h1, copy, CTA block.
     (Max ruling, 2026-08-06 — centre hero text column at 640, not just CTA) */
  #va-home [style*="grid-template-columns: 1fr 480px"] > [style*="justify-self: start"]{ justify-self:center !important; }
  #va-home [style*="grid-template-columns: 1fr 480px"] > h1{ text-align:center !important; }
  #va-home [style*="grid-template-columns: 1fr 480px"] > p{ text-align:center !important; justify-self:center !important; }
  #va-home [style*="grid-template-columns: 1fr 480px"] > [style*="align-items: flex-start"]{ align-items:center !important; }

  /* Defect 3 (Laura 13:40): hard horizontal line partway down the mobile
     hero — photo and glow end at their fixed 460px/420px desktop heights,
     leaving flat cream below (the mock and everything under it) while the
     `:143` fade overlay keeps going, since IT has no fixed height (its
     `inset:0` already stretches it to the full hero, which is exactly why
     it doesn't show the same seam). Give both layers the same "stretch to
     the containing block" shape as the fade instead of a pixel height: set
     bottom to 0 (was `auto`) alongside the existing negative top/side
     offsets, drop the fixed height. An absolutely positioned box with both
     top and bottom set auto-sizes to the containing block's actual (post
     layout) height — unlike `height:100%`, which resolves to `auto` here
     because the hero wrapper's own height is content-driven (`auto`), not
     an explicit value, and percentage heights don't resolve against an
     auto-height containing block. Neither div carries `data-reveal` (only
     text/mock children do), so plain `height:`/`inset:` hooks are safe —
     nothing here is subject to the reveal-triggered style rewrite.
     No fade-gradient change needed: its stops are percentages of ITS OWN
     box, which already matched the hero's full height before this fix, so
     once photo/glow are stretched to match, they align with the same
     curve — checked visually (390 screenshot), not washed out.
     (Max ruling, 2026-08-06 — stretch via top+bottom inset instead of a
     fixed height, matching the fade layer's already-working mechanism) */
  #va-home [style*="height: 460px"]{ inset:-60px -40px 0 -40px !important; height:auto !important; }
  #va-home [style*="height: 420px"]{ inset:-80px -60px 0 -60px !important; height:auto !important; }
}

/* Long-word safety net: same rationale as the grid safety net above — an
   unbreakable word (German compounds) can be wider than its own box even
   after the box is correctly sized, since default overflow-wrap doesn't
   allow mid-word breaks. No effect where words already fit (all current
   desktop/tablet widths). (Tom, 2026-08-06) */
#va-home h1, #va-home h2, #va-home h3{ overflow-wrap:break-word; }
