/* Quiet Logic Games — Night mode.
   Follows the device setting (prefers-color-scheme) until the visitor picks a mode with the header switch;
   the choice is kept in localStorage and applied as <html data-theme="light|dark"> by the small inline script. */

/* ---------- Header switch ---------- */
.qlg-tools{display:flex;align-items:center;gap:6px}
.theme-toggle{display:none}
:root[data-theme-ready] .theme-toggle{display:inline-grid;place-items:center;width:40px;height:40px;padding:0;border:1px solid var(--border);border-radius:999px;background:#0000;color:var(--ink);cursor:pointer;transition:background-color .2s,border-color .2s,color .2s}
.theme-toggle:hover{border-color:var(--pine);color:var(--pine)}
.theme-toggle:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.theme-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle .tt-moon{fill:currentColor;stroke:none}
.theme-toggle .tt-sun,.theme-toggle[aria-pressed=true] .tt-moon{display:none}
.theme-toggle[aria-pressed=true] .tt-sun{display:block}
@media (prefers-reduced-motion: no-preference){
  @keyframes qn-flip{from{transform:rotate(-90deg) scale(.4);opacity:0}to{transform:none;opacity:1}}
  .theme-toggle[aria-pressed] svg{animation:qn-flip .45s cubic-bezier(.3,1.4,.5,1)}
  .theme-toggle:hover svg{transform:rotate(-18deg);transition:transform .3s}
}
:root[data-theme=light]{color-scheme:light}

/* ---------- Night palette and surfaces: automatic (device is dark, no manual choice) ---------- */
@media screen and (prefers-color-scheme: dark){
/* ---------- Palette (taken from the night pixel scene) ---------- */
:root:not([data-theme=light]){color-scheme:dark;
  --background:#1f3137;--surface:#2d4249;--surface-soft:#374f56;--ink:#e8eff1;--muted:#c1d1d5;
  --pine:#8fdcb0;--pine-dark:#1b2b30;--sage:#9fc7b5;--sand:#e2bd6c;--border:#48626a;--focus:#ecc86e;
  --footer:#172428;--card-surface:#2d4249e6;--card-border:1px solid #48626a;--card-divider:#48626a;
  --shadow-soft:0 16px 40px #09121580;
  --night-line:#48626a;--night-gold:#ecc86e;--night-violet:#a78cf2;--night-deep:#172428}
:root:not([data-theme=light]) .site-frame[data-visual-style]{--directory-surface:#2d4249e0;--directory-line:#48626a;--directory-shadow:0 18px 52px #09121573}
:root:not([data-theme=light]),:root:not([data-theme=light]) body{background:var(--background)}
:root:not([data-theme=light]) body{background-image:none}
:root:not([data-theme=light]) ::selection{color:#152428;background:var(--pine)}

/* ---------- The night scene behind every page ---------- */
:root:not([data-theme=light]) .site-frame[data-visual-style]::before{position:fixed;inset:0;opacity:.62;
  background:url(/assets/backgrounds/quiet-night-playground.webp) right center / auto 100% no-repeat;
  -webkit-mask-image:linear-gradient(to left,#000 18%,#0000 62%);mask-image:linear-gradient(to left,#000 18%,#0000 62%)}
:root:not([data-theme=light])[dir=rtl] .site-frame[data-visual-style]::before{transform:scaleX(-1)}
:root:not([data-theme=light]) .site-frame[data-visual-style]::after{mix-blend-mode:screen;opacity:.16;background-image:radial-gradient(circle,#a78cf2 0,#a78cf200 68%)}
@media (width<=900px){:root:not([data-theme=light]) .site-frame[data-visual-style]::before{opacity:.38;-webkit-mask-image:linear-gradient(to left,#000 30%,#0000 95%);mask-image:linear-gradient(to left,#000 30%,#0000 95%)}}

/* Hand-drawn ink frames and underlines: drawn in dark ink, turned to soft chalk at night */
:root:not([data-theme=light]) .site-frame[data-visual-style] .site-header::after,
:root:not([data-theme=light]) .site-frame[data-visual-style] :is(.corporate-hero__product,.game-card,.page-hero,.product-hero,.values-preview__grid article,.game-support article,.contact-card)::before{filter:invert(1);opacity:.4}

/* ---------- Header and navigation ---------- */
:root:not([data-theme=light]) .site-frame[data-visual-style] .site-header{background:#273c44f0;border-color:var(--night-line);box-shadow:0 8px 24px #09121566}
:root:not([data-theme=light]) .site-frame[data-visual-style] .site-nav{background:#273c44d9;border-color:var(--night-line)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .site-nav a[aria-current=page]{color:var(--ink);background:var(--surface-soft);border-color:var(--night-line);box-shadow:none}
:root:not([data-theme=light]) .site-frame[data-visual-style] .site-nav a:hover,:root:not([data-theme=light]) .site-frame[data-visual-style] .brand-link:hover strong,:root:not([data-theme=light]) .site-frame[data-visual-style] .language-switch:hover{color:var(--pine)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .site-menu[open] .site-nav--mobile,:root:not([data-theme=light]) .site-frame[data-visual-style] .site-menu[open]>.site-nav{background:var(--surface);border-color:var(--night-line);box-shadow:0 22px 48px #09121599}
:root:not([data-theme=light]) .site-frame[data-visual-style] .brand-rail{background:var(--night-deep)}

/* ---------- Surfaces and cards ---------- */
:root:not([data-theme=light]) .site-frame[data-visual-style] :is(.page-hero,.game-support article,.contact-card,.values-preview__grid article,.value-grid article,.support-card-grid article,.gameplay-steps article){background:var(--directory-surface)}
:root:not([data-theme=light]) .site-frame[data-visual-style] :is(.corporate-hero__product,.game-card,.page-hero,.product-hero,.values-preview__grid article,.game-support article,.contact-card){border-color:var(--night-line);box-shadow:0 10px 30px #09121559}
:root:not([data-theme=light]) .site-frame[data-visual-style] :is(.values-preview__grid article,.value-grid article,.support-card-grid article,.gameplay-steps article){box-shadow:inset 0 1px #ffffff12,0 10px 30px #0912154d}
:root:not([data-theme=light]) .site-frame[data-visual-style] :is(.games-showcase .game-card,.value-grid article,.support-card-grid article,.gameplay-steps article):hover{border-color:#6c8d96;box-shadow:inset 0 1px #ffffff1a,0 20px 44px #09121573}
:root:not([data-theme=light]) .site-frame[data-visual-style] :is(.values-preview__grid span,.value-grid span,.gameplay-steps article>span,.support-card__top span){color:var(--night-gold);background:#ecc86e1a;border-color:#ecc86e40}
:root:not([data-theme=light]) .site-frame[data-visual-style] :is(.corporate-hero .eyebrow,.page-hero .eyebrow,.section-heading .eyebrow),:root:not([data-theme=light]) .site-frame[data-visual-style] .hero-chips li{background:#2d4249cc;border-color:var(--night-line)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .section-index{color:var(--night-gold)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .featured-game{border-color:var(--night-line)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .store-status{background:var(--surface-soft)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .store-status .status-badge{color:var(--pine);background:#8fdcb01a;border-color:#8fdcb04d}
:root:not([data-theme=light]) .site-frame[data-visual-style] .support-card-grid--accordion details{background:var(--surface);border-color:var(--night-line)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .email-copy input{background:var(--night-deep)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .contact-card--primary{background:linear-gradient(150deg,#334557,#1d2e34);color:var(--ink)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .intent-section{background-color:var(--night-deep);background-image:radial-gradient(circle at 85% 15%,#a78cf22e,#0000 32rem),radial-gradient(circle at 10% 90%,#8fdcb01a,#0000 28rem);background-size:auto;background-repeat:no-repeat}
:root:not([data-theme=light]) .site-frame[data-visual-style] .intent-grid article{background:#1f3137b3}
:root:not([data-theme=light]) .site-frame[data-visual-style] .support-product,:root:not([data-theme=light]) .site-frame[data-visual-style] .bug-report-section,:root:not([data-theme=light]) .site-frame[data-visual-style] .report-checklist>div{background:linear-gradient(150deg,#334557,#1d2e34)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .report-checklist>div{background:#1d2e34}
:root:not([data-theme=light]) .site-frame[data-visual-style] :is(.bug-report-section,.intent-section,.game-card--upcoming,.skip-link){color:var(--ink)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .founder-mark{color:#152428}

/* ---------- Buttons and links ---------- */
:root:not([data-theme=light]) .site-frame[data-visual-style] :is(.primary-button,.quiet-hero__download,.product-hero .primary-button){color:#152428;background:var(--pine);border-color:var(--pine);box-shadow:0 0 0 #0000,0 8px 24px #8fdcb026}
:root:not([data-theme=light]) .site-frame[data-visual-style] :is(.primary-button,.quiet-hero__download,.product-hero .primary-button):hover{color:#152428;background:#b5ecca;border-color:#b5ecca}
:root:not([data-theme=light]) .site-frame[data-visual-style] :is(.text-button,.email-copy__button,.corporate-hero__actions .text-button){color:var(--pine);background:#0000;border-color:#8fdcb080}
:root:not([data-theme=light]) .site-frame[data-visual-style] :is(.text-button,.inline-link,.game-card__link,.company-intro__copy .inline-link){color:var(--pine);border-color:#8fdcb080}
:root:not([data-theme=light]) .site-frame[data-visual-style] :is(.text-button,.inline-link):hover{color:#b5ecca;border-color:#b5ecca}
:root:not([data-theme=light]) .site-frame[data-visual-style] .product-resources a:hover,:root:not([data-theme=light]) .site-frame[data-visual-style] .support-boundary__links a:hover{color:var(--pine);background:#8fdcb014}

/* ---------- Games ---------- */
:root:not([data-theme=light]) .site-frame[data-visual-style] .game-card--arrowlume{background:var(--surface)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .game-card--arrowlume .game-card__overline{color:var(--night-gold)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .game-card--arrowlume .status-badge{color:#152428;background:var(--pine)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .game-card__visual{background:radial-gradient(circle at 50% 45%,#a78cf233,#0000 14rem),#24373e}
:root:not([data-theme=light]) .site-frame[data-visual-style] .game-card__gallery summary{color:var(--night-gold);background:#0000;border-color:#ecc86e80}
:root:not([data-theme=light]) .site-frame[data-visual-style] .game-card__gallery-images{background:var(--night-deep);color:var(--ink)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .game-card--upcoming,:root:not([data-theme=light]) .site-frame[data-visual-style] .game-card--trio{background-color:#283c44}
:root:not([data-theme=light]) .site-frame[data-visual-style] .game-card--trio .trio-stage{background:radial-gradient(circle,#ecc86e26,#0000 14rem),#ffffff08}
:root:not([data-theme=light]) .site-frame[data-visual-style] .product-hero{background:radial-gradient(circle at 16% 25%,#a78cf238,#0000 23rem),linear-gradient(150deg,#293e46,#172428)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .product-hero .text-button{color:var(--ink);border-color:#ffffff47}

/* ---------- Home ---------- */
:root:not([data-theme=light]) .site-frame[data-visual-style] .quiet-gallery__board{background:#c4c0b6;box-shadow:0 0 0 1px #ffffff1f,0 24px 60px #09121599,0 0 80px #a78cf226}
:root:not([data-theme=light]) .site-frame[data-visual-style] .quiet-gallery__board img{filter:brightness(.74)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .quiet-gallery__radio:checked+label{color:var(--ink);border-bottom-color:var(--pine)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .quiet-hero__identity img{box-shadow:0 0 0 1px #ffffff26}
:root:not([data-theme=light]) .site-frame[data-visual-style] .qlg-stop__card{background:var(--directory-surface);border-color:var(--night-line)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .qlg-stop--review .qlg-stop__card{background:linear-gradient(150deg,#384b60,#21333b);border-color:#ecc86e59}
:root:not([data-theme=light]) .site-frame[data-visual-style] .qlg-stop--review .qlg-stop__link{color:var(--night-gold)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .qlg-stop__dot{background:var(--background)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .qlg-stop--live .qlg-stop__dot{background:var(--pine);border-color:#2d5a4a}
:root:not([data-theme=light]) .site-frame[data-visual-style] .qlg-stop--review .qlg-stop__dot{border-color:#5a4a20}
:root:not([data-theme=light]) .site-frame[data-visual-style] .qlg-stop--live .qlg-stop__status{color:#0d2a1f;background:var(--pine)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .qlg-stop--review .qlg-stop__status{color:#2e2208;background:var(--night-gold)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .qlg-stop--next .qlg-stop__status{color:var(--ink);background:#0000}

/* ---------- Footer ---------- */
:root:not([data-theme=light]) .site-frame[data-visual-style] .site-footer{border-top-color:var(--night-line)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .site-footer :is(strong,p,a,small,span,bdi){color:var(--muted)}
:root:not([data-theme=light]) .site-frame[data-visual-style] .site-footer a:hover{color:var(--pine)}

/* ---------- Motion layer (qlg-play): arrows glow mint at night ---------- */
:root:not([data-theme=light]) .qp-field{opacity:.5;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cg fill='none' stroke='%238fdcb0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' opacity='.3'%3E%3Cpath d='M16 34h34m-9-9 9 9-9 9'/%3E%3Cpath d='M98 78v34m-9-9 9 9 9-9'/%3E%3Cpath d='M60 124l22-22m-12 0h12v12'/%3E%3C/g%3E%3C/svg%3E")}
:root:not([data-theme=light]) .product-hero .qp-field{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cg fill='none' stroke='%23ecc86e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' opacity='.3'%3E%3Cpath d='M16 34h34m-9-9 9 9-9 9'/%3E%3Cpath d='M98 78v34m-9-9 9 9 9-9'/%3E%3Cpath d='M60 124l22-22m-12 0h12v12'/%3E%3C/g%3E%3C/svg%3E")}
:root:not([data-theme=light]) :is(.qlg-stop__card,[data-ui=card]:not(details,.product-hero),.values-preview__grid article):hover{box-shadow:0 28px 46px #09121599,0 0 0 1px #8fdcb040}
}

/* ---------- Same rules when the visitor switches night mode on ---------- */
@media screen{
/* ---------- Palette (taken from the night pixel scene) ---------- */
:root[data-theme=dark]{color-scheme:dark;
  --background:#1f3137;--surface:#2d4249;--surface-soft:#374f56;--ink:#e8eff1;--muted:#c1d1d5;
  --pine:#8fdcb0;--pine-dark:#1b2b30;--sage:#9fc7b5;--sand:#e2bd6c;--border:#48626a;--focus:#ecc86e;
  --footer:#172428;--card-surface:#2d4249e6;--card-border:1px solid #48626a;--card-divider:#48626a;
  --shadow-soft:0 16px 40px #09121580;
  --night-line:#48626a;--night-gold:#ecc86e;--night-violet:#a78cf2;--night-deep:#172428}
:root[data-theme=dark] .site-frame[data-visual-style]{--directory-surface:#2d4249e0;--directory-line:#48626a;--directory-shadow:0 18px 52px #09121573}
:root[data-theme=dark],:root[data-theme=dark] body{background:var(--background)}
:root[data-theme=dark] body{background-image:none}
:root[data-theme=dark] ::selection{color:#152428;background:var(--pine)}

/* ---------- The night scene behind every page ---------- */
:root[data-theme=dark] .site-frame[data-visual-style]::before{position:fixed;inset:0;opacity:.62;
  background:url(/assets/backgrounds/quiet-night-playground.webp) right center / auto 100% no-repeat;
  -webkit-mask-image:linear-gradient(to left,#000 18%,#0000 62%);mask-image:linear-gradient(to left,#000 18%,#0000 62%)}
:root[data-theme=dark][dir=rtl] .site-frame[data-visual-style]::before{transform:scaleX(-1)}
:root[data-theme=dark] .site-frame[data-visual-style]::after{mix-blend-mode:screen;opacity:.16;background-image:radial-gradient(circle,#a78cf2 0,#a78cf200 68%)}
@media (width<=900px){:root[data-theme=dark] .site-frame[data-visual-style]::before{opacity:.38;-webkit-mask-image:linear-gradient(to left,#000 30%,#0000 95%);mask-image:linear-gradient(to left,#000 30%,#0000 95%)}}

/* Hand-drawn ink frames and underlines: drawn in dark ink, turned to soft chalk at night */
:root[data-theme=dark] .site-frame[data-visual-style] .site-header::after,
:root[data-theme=dark] .site-frame[data-visual-style] :is(.corporate-hero__product,.game-card,.page-hero,.product-hero,.values-preview__grid article,.game-support article,.contact-card)::before{filter:invert(1);opacity:.4}

/* ---------- Header and navigation ---------- */
:root[data-theme=dark] .site-frame[data-visual-style] .site-header{background:#273c44f0;border-color:var(--night-line);box-shadow:0 8px 24px #09121566}
:root[data-theme=dark] .site-frame[data-visual-style] .site-nav{background:#273c44d9;border-color:var(--night-line)}
:root[data-theme=dark] .site-frame[data-visual-style] .site-nav a[aria-current=page]{color:var(--ink);background:var(--surface-soft);border-color:var(--night-line);box-shadow:none}
:root[data-theme=dark] .site-frame[data-visual-style] .site-nav a:hover,:root[data-theme=dark] .site-frame[data-visual-style] .brand-link:hover strong,:root[data-theme=dark] .site-frame[data-visual-style] .language-switch:hover{color:var(--pine)}
:root[data-theme=dark] .site-frame[data-visual-style] .site-menu[open] .site-nav--mobile,:root[data-theme=dark] .site-frame[data-visual-style] .site-menu[open]>.site-nav{background:var(--surface);border-color:var(--night-line);box-shadow:0 22px 48px #09121599}
:root[data-theme=dark] .site-frame[data-visual-style] .brand-rail{background:var(--night-deep)}

/* ---------- Surfaces and cards ---------- */
:root[data-theme=dark] .site-frame[data-visual-style] :is(.page-hero,.game-support article,.contact-card,.values-preview__grid article,.value-grid article,.support-card-grid article,.gameplay-steps article){background:var(--directory-surface)}
:root[data-theme=dark] .site-frame[data-visual-style] :is(.corporate-hero__product,.game-card,.page-hero,.product-hero,.values-preview__grid article,.game-support article,.contact-card){border-color:var(--night-line);box-shadow:0 10px 30px #09121559}
:root[data-theme=dark] .site-frame[data-visual-style] :is(.values-preview__grid article,.value-grid article,.support-card-grid article,.gameplay-steps article){box-shadow:inset 0 1px #ffffff12,0 10px 30px #0912154d}
:root[data-theme=dark] .site-frame[data-visual-style] :is(.games-showcase .game-card,.value-grid article,.support-card-grid article,.gameplay-steps article):hover{border-color:#6c8d96;box-shadow:inset 0 1px #ffffff1a,0 20px 44px #09121573}
:root[data-theme=dark] .site-frame[data-visual-style] :is(.values-preview__grid span,.value-grid span,.gameplay-steps article>span,.support-card__top span){color:var(--night-gold);background:#ecc86e1a;border-color:#ecc86e40}
:root[data-theme=dark] .site-frame[data-visual-style] :is(.corporate-hero .eyebrow,.page-hero .eyebrow,.section-heading .eyebrow),:root[data-theme=dark] .site-frame[data-visual-style] .hero-chips li{background:#2d4249cc;border-color:var(--night-line)}
:root[data-theme=dark] .site-frame[data-visual-style] .section-index{color:var(--night-gold)}
:root[data-theme=dark] .site-frame[data-visual-style] .featured-game{border-color:var(--night-line)}
:root[data-theme=dark] .site-frame[data-visual-style] .store-status{background:var(--surface-soft)}
:root[data-theme=dark] .site-frame[data-visual-style] .store-status .status-badge{color:var(--pine);background:#8fdcb01a;border-color:#8fdcb04d}
:root[data-theme=dark] .site-frame[data-visual-style] .support-card-grid--accordion details{background:var(--surface);border-color:var(--night-line)}
:root[data-theme=dark] .site-frame[data-visual-style] .email-copy input{background:var(--night-deep)}
:root[data-theme=dark] .site-frame[data-visual-style] .contact-card--primary{background:linear-gradient(150deg,#334557,#1d2e34);color:var(--ink)}
:root[data-theme=dark] .site-frame[data-visual-style] .intent-section{background-color:var(--night-deep);background-image:radial-gradient(circle at 85% 15%,#a78cf22e,#0000 32rem),radial-gradient(circle at 10% 90%,#8fdcb01a,#0000 28rem);background-size:auto;background-repeat:no-repeat}
:root[data-theme=dark] .site-frame[data-visual-style] .intent-grid article{background:#1f3137b3}
:root[data-theme=dark] .site-frame[data-visual-style] .support-product,:root[data-theme=dark] .site-frame[data-visual-style] .bug-report-section,:root[data-theme=dark] .site-frame[data-visual-style] .report-checklist>div{background:linear-gradient(150deg,#334557,#1d2e34)}
:root[data-theme=dark] .site-frame[data-visual-style] .report-checklist>div{background:#1d2e34}
:root[data-theme=dark] .site-frame[data-visual-style] :is(.bug-report-section,.intent-section,.game-card--upcoming,.skip-link){color:var(--ink)}
:root[data-theme=dark] .site-frame[data-visual-style] .founder-mark{color:#152428}

/* ---------- Buttons and links ---------- */
:root[data-theme=dark] .site-frame[data-visual-style] :is(.primary-button,.quiet-hero__download,.product-hero .primary-button){color:#152428;background:var(--pine);border-color:var(--pine);box-shadow:0 0 0 #0000,0 8px 24px #8fdcb026}
:root[data-theme=dark] .site-frame[data-visual-style] :is(.primary-button,.quiet-hero__download,.product-hero .primary-button):hover{color:#152428;background:#b5ecca;border-color:#b5ecca}
:root[data-theme=dark] .site-frame[data-visual-style] :is(.text-button,.email-copy__button,.corporate-hero__actions .text-button){color:var(--pine);background:#0000;border-color:#8fdcb080}
:root[data-theme=dark] .site-frame[data-visual-style] :is(.text-button,.inline-link,.game-card__link,.company-intro__copy .inline-link){color:var(--pine);border-color:#8fdcb080}
:root[data-theme=dark] .site-frame[data-visual-style] :is(.text-button,.inline-link):hover{color:#b5ecca;border-color:#b5ecca}
:root[data-theme=dark] .site-frame[data-visual-style] .product-resources a:hover,:root[data-theme=dark] .site-frame[data-visual-style] .support-boundary__links a:hover{color:var(--pine);background:#8fdcb014}

/* ---------- Games ---------- */
:root[data-theme=dark] .site-frame[data-visual-style] .game-card--arrowlume{background:var(--surface)}
:root[data-theme=dark] .site-frame[data-visual-style] .game-card--arrowlume .game-card__overline{color:var(--night-gold)}
:root[data-theme=dark] .site-frame[data-visual-style] .game-card--arrowlume .status-badge{color:#152428;background:var(--pine)}
:root[data-theme=dark] .site-frame[data-visual-style] .game-card__visual{background:radial-gradient(circle at 50% 45%,#a78cf233,#0000 14rem),#24373e}
:root[data-theme=dark] .site-frame[data-visual-style] .game-card__gallery summary{color:var(--night-gold);background:#0000;border-color:#ecc86e80}
:root[data-theme=dark] .site-frame[data-visual-style] .game-card__gallery-images{background:var(--night-deep);color:var(--ink)}
:root[data-theme=dark] .site-frame[data-visual-style] .game-card--upcoming,:root[data-theme=dark] .site-frame[data-visual-style] .game-card--trio{background-color:#283c44}
:root[data-theme=dark] .site-frame[data-visual-style] .game-card--trio .trio-stage{background:radial-gradient(circle,#ecc86e26,#0000 14rem),#ffffff08}
:root[data-theme=dark] .site-frame[data-visual-style] .product-hero{background:radial-gradient(circle at 16% 25%,#a78cf238,#0000 23rem),linear-gradient(150deg,#293e46,#172428)}
:root[data-theme=dark] .site-frame[data-visual-style] .product-hero .text-button{color:var(--ink);border-color:#ffffff47}

/* ---------- Home ---------- */
:root[data-theme=dark] .site-frame[data-visual-style] .quiet-gallery__board{background:#c4c0b6;box-shadow:0 0 0 1px #ffffff1f,0 24px 60px #09121599,0 0 80px #a78cf226}
:root[data-theme=dark] .site-frame[data-visual-style] .quiet-gallery__board img{filter:brightness(.74)}
:root[data-theme=dark] .site-frame[data-visual-style] .quiet-gallery__radio:checked+label{color:var(--ink);border-bottom-color:var(--pine)}
:root[data-theme=dark] .site-frame[data-visual-style] .quiet-hero__identity img{box-shadow:0 0 0 1px #ffffff26}
:root[data-theme=dark] .site-frame[data-visual-style] .qlg-stop__card{background:var(--directory-surface);border-color:var(--night-line)}
:root[data-theme=dark] .site-frame[data-visual-style] .qlg-stop--review .qlg-stop__card{background:linear-gradient(150deg,#384b60,#21333b);border-color:#ecc86e59}
:root[data-theme=dark] .site-frame[data-visual-style] .qlg-stop--review .qlg-stop__link{color:var(--night-gold)}
:root[data-theme=dark] .site-frame[data-visual-style] .qlg-stop__dot{background:var(--background)}
:root[data-theme=dark] .site-frame[data-visual-style] .qlg-stop--live .qlg-stop__dot{background:var(--pine);border-color:#2d5a4a}
:root[data-theme=dark] .site-frame[data-visual-style] .qlg-stop--review .qlg-stop__dot{border-color:#5a4a20}
:root[data-theme=dark] .site-frame[data-visual-style] .qlg-stop--live .qlg-stop__status{color:#0d2a1f;background:var(--pine)}
:root[data-theme=dark] .site-frame[data-visual-style] .qlg-stop--review .qlg-stop__status{color:#2e2208;background:var(--night-gold)}
:root[data-theme=dark] .site-frame[data-visual-style] .qlg-stop--next .qlg-stop__status{color:var(--ink);background:#0000}

/* ---------- Footer ---------- */
:root[data-theme=dark] .site-frame[data-visual-style] .site-footer{border-top-color:var(--night-line)}
:root[data-theme=dark] .site-frame[data-visual-style] .site-footer :is(strong,p,a,small,span,bdi){color:var(--muted)}
:root[data-theme=dark] .site-frame[data-visual-style] .site-footer a:hover{color:var(--pine)}

/* ---------- Motion layer (qlg-play): arrows glow mint at night ---------- */
:root[data-theme=dark] .qp-field{opacity:.5;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cg fill='none' stroke='%238fdcb0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' opacity='.3'%3E%3Cpath d='M16 34h34m-9-9 9 9-9 9'/%3E%3Cpath d='M98 78v34m-9-9 9 9 9-9'/%3E%3Cpath d='M60 124l22-22m-12 0h12v12'/%3E%3C/g%3E%3C/svg%3E")}
:root[data-theme=dark] .product-hero .qp-field{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cg fill='none' stroke='%23ecc86e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' opacity='.3'%3E%3Cpath d='M16 34h34m-9-9 9 9-9 9'/%3E%3Cpath d='M98 78v34m-9-9 9 9 9-9'/%3E%3Cpath d='M60 124l22-22m-12 0h12v12'/%3E%3C/g%3E%3C/svg%3E")}
:root[data-theme=dark] :is(.qlg-stop__card,[data-ui=card]:not(details,.product-hero),.values-preview__grid article):hover{box-shadow:0 28px 46px #09121599,0 0 0 1px #8fdcb040}
}

/* ---------- The night scene twinkles gently, unless motion is reduced ---------- */
@media screen and (prefers-reduced-motion: no-preference){
  @keyframes qn-twinkle{0%,100%{filter:var(--qn-img,saturate(1))}50%{filter:var(--qn-img,saturate(1)) brightness(.82)}}
  @media (prefers-color-scheme: dark){:root:not([data-theme=light]) .site-frame[data-visual-style]::before{animation:qn-twinkle 7s ease-in-out infinite}}
  :root[data-theme=dark] .site-frame[data-visual-style]::before{animation:qn-twinkle 7s ease-in-out infinite}
}

/* Fix for the motion layer: with reduced motion the decorative arrow field must not take up layout space */
@media (prefers-reduced-motion: reduce){.qp-field{display:none}}

/* Softer night: game screenshots are dimmed so they do not glare against the dark page */
@media screen and (prefers-color-scheme: dark){:root:not([data-theme=light]) .site-frame[data-visual-style] :is(.product-hero__screens,.game-card__screens,.game-card__gallery-images) img{filter:brightness(.82)}}
@media screen{:root[data-theme=dark] .site-frame[data-visual-style] :is(.product-hero__screens,.game-card__screens,.game-card__gallery-images) img{filter:brightness(.82)}}
/* Tint the night scene to match the palette */
@media screen and (prefers-color-scheme: dark){:root:not([data-theme=light]) .site-frame[data-visual-style]::before{--qn-img:hue-rotate(-35deg) saturate(.6);filter:var(--qn-img)}}
@media screen{:root[data-theme=dark] .site-frame[data-visual-style]::before{--qn-img:hue-rotate(-35deg) saturate(.6);filter:var(--qn-img)}}
