/* Shared surface, navigation and type for the Classic interface. */
:root {
  --za-font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --za-rail: 208px;
  --za-gap: clamp(22px, 3.2vw, 54px);
  --za-canvas: #090f1e;
  --za-nav: #0d172b;
  --za-panel: #131f36;
  --za-line: #2a3b55;
  --za-frost: linear-gradient(147deg, #1a2a47eb, #111a2eef 70%);
  --za-frost-fill: #111e34f0;
  --za-frost-field: #ffffff09;
  --za-frost-edge: inset 0 1px #ffffff0c;
  --za-frost-shadow: var(--za-frost-edge), 0 18px 40px #05061160;
  --za-tone: color-mix(in srgb, var(--accent, white) 30%, #d8ff8e);
  --za-tone-deep: color-mix(in srgb, var(--accent, white) 20%, #506de9);
  --za-ambient:
    radial-gradient(ellipse 68% 58% at 90% 4%, #183985a0, transparent 100%),
    radial-gradient(ellipse 55% 65% at 18% 55%, #14416d50, transparent 100%), var(--za-canvas);
  --za-radius: 16px;
}
html[data-radius=sharp] { --za-radius: 7px; }
html[data-radius=round] { --za-radius: 24px; }
html[data-bg=plain]:has(.za-rail) { background: var(--za-canvas); }
html:has(.za-rail) {
  color-scheme: dark;
  --surface: var(--za-panel);
  --surface-solid: var(--za-panel);
  --surface-2: #1a2a44;
  --panel-2: var(--surface-2);
  --line: var(--za-line);
  --line-strong: #405679;
  --text: #f2f6ff;
  --muted: #b1c1db;
  --muted-2: #95abc9;
  --font-body: var(--za-font);
  --font-display: var(--za-font);
  background: var(--za-ambient);
  background-attachment: fixed;
}

body:has(>.za-rail) {
  color: var(--text);
  font: 14px/1.55 var(--za-font);
  min-width: 0;
}
body:has(>.za-rail) *, body:has(>.za-rail) *::before, body:has(>.za-rail) *::after { box-sizing: border-box; }
body:has(>.za-rail) :is(h1,h2,h3) { font-family: var(--za-font); }
body:has(>.za-rail) :where(input, textarea, select) { min-width: 0; font: inherit; }
body:has(>.za-rail) :is(input,textarea,button,a,select):focus-visible { outline: 2px solid var(--za-tone); outline-offset: 3px; }
html[data-bg=aurora] body:has(>.za-rail) > .atmo { display: block; background: transparent; }
html[data-bg=aurora] body:has(>.za-rail) .atmo-nebula {
  background:
    radial-gradient(ellipse at 78% 15%, color-mix(in srgb, var(--za-tone-deep) calc(var(--za-glow) * 62%), transparent), transparent 52%),
    radial-gradient(ellipse at 27% 41%, color-mix(in srgb, var(--accent-2, #c9d2ff) calc(var(--za-glow) * 17%), transparent), transparent 55%);
}
.za-rail {
  inset: 0 auto 0 0;
  width: var(--za-rail);
  border: 0;
  border-inline-end: 1px solid #96b4ff2e;
  border-radius: 0;
  background: linear-gradient(168deg, #16274af4, #0e172aee 48%);
  box-shadow: 10px 0 28px #030a1838;
  backdrop-filter: blur(16px);
}
.za-brand-row { display: grid; grid-template-columns: minmax(0,1fr) 30px 30px; gap: 4px; padding: 17px 13px 16px; }
.za-rail .za-brand-row .za-brand { height: auto; padding: 0; font-size: 16px; gap: 8px; }
.za-rail .za-brand-row .za-mark { width: 30px; height: 30px; margin: 0; box-shadow: 0 0 var(--za-bloom) color-mix(in srgb, var(--za-tone) calc(var(--za-glow) * 60%), transparent); }
.za-brand :is(sup,small) { display: none; }
.za-brand-row :is(.settings-btn,.sidebar-toggle) {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 32px;
  margin: 0;
  padding: 0;
  border-radius: 8px;
  color: #c9d6ef;
  background: #ffffff08;
  border: 1px solid #ffffff12;
}
.za-brand-row :is(.settings-btn,.sidebar-toggle):hover { background: #b5ceff18; border-color: #b5ceff55; }
.za-scroll { padding: 0 11px 18px; scrollbar-width: thin; scrollbar-color: #415d83 transparent; }
.za-group small { margin: 18px 10px 8px; font-size: 10px; letter-spacing: .105em; color: var(--muted-2); }
.za-group nav { gap: 3px; }
.za-group a { min-height: 37px; padding: 8px 10px; border-radius: 9px; font-size: 13px; gap: 9px; color: var(--muted); border: 1px solid transparent; }
.za-group a:is(:hover,:focus-visible) { color: var(--text); background: #ffffff09; }
.za-group a:is([aria-current=page],[data-current]) {
  color: var(--text);
  background: color-mix(in srgb, var(--za-tone-deep) 16%, var(--za-nav));
  border-color: color-mix(in srgb, var(--za-tone-deep) 35%, transparent);
  box-shadow: inset 2px 0 var(--za-tone), 0 0 var(--za-bloom) color-mix(in srgb, var(--za-tone) calc(var(--za-glow) * 42%), transparent);
}
.za-group a:is([aria-current=page],[data-current]) svg { color: var(--za-tone); }
.za-rail .za-foot { margin: auto 12px 12px; border-radius: 9px; border-top: 1px solid var(--line); color: var(--muted); }

body[data-arcade-page] > :is(.topbar,.bar,.min-bar),
.arcade-discover .toolbar {
  min-height: 65px;
  padding: 11px var(--za-gap);
  background: #0e172be6;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.za-crumb { color: var(--muted); }
.za-crumb strong { color: var(--text); }
.za-crumb i { color: var(--za-tone); }
body[data-arcade-page] > main:not(.min-stage,.stage) { padding: clamp(24px, 3vw, 44px) var(--za-gap) 56px; max-width: 1560px; }
body[data-arcade-page] :is(.page-head,.ai-hero,.web-hero,.social-hero,.movies-hero,.dw-head) {
  display: grid;
  gap: 14px;
  padding: 4px 0 23px;
  margin: 0 0 23px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
body[data-arcade-page] :is(.page-title,.page-head h1,.ai-hero h1,.web-hero h1,.social-hero h1,.movies-hero h1,.dw-head h1,.za-player-title h1) {
  font-size: clamp(30px, 4.1vw, 52px);
  font-weight: 780;
  letter-spacing: -.055em;
  line-height: 1.13;
  margin: 0 0 8px;
  color: var(--text);
}
body[data-arcade-page] :is(.page-sub,.ai-deck,.web-deck,.social-deck,.movies-deck) { margin: 0; font-size: 14px; line-height: 1.7; max-width: 70ch; color: var(--muted); }

body:has(>.za-rail) :is(.btn,.ai-mini,.shuffle) {
  min-height: 40px;
  border-radius: 9px;
  padding: 8px 13px;
  font: 650 13px/1.3 var(--za-font);
}
body:has(>.za-rail) :is(.btn-solid,.ai-mini-solid) { background: var(--accent); color: var(--accent-ink); border: 1px solid transparent; }
body:has(>.za-rail) .btn-ghost { color: var(--text); background: var(--za-frost-field); border: 1px solid var(--line-strong); }
body:has(>.za-rail) .btn-ghost:hover { border-color: var(--za-tone); background: #ffffff12; }
body:has(>.za-rail) :is(.card,.ai-card,.stat-card,.play-side-card,.xp-card,.game-info,.reader,.ai-console,.catalogue-head,.calc,.player-stage,.web-shell,.dw-card,.movies-card,.media-card,.legal-toc) {
  border-radius: var(--za-radius);
  border-color: var(--line);
  background: var(--za-frost);
}
body:has(>.za-rail) .card { overflow: hidden; }
body:has(>.za-rail) .card-plaque { background: var(--surface-2); }
body:has(>.za-rail) .section-title { font-size: clamp(20px,2.1vw,27px); letter-spacing: -.035em; }
body:has(>.za-rail) .section-title::before { background: var(--za-tone); box-shadow: 0 0 var(--za-bloom) var(--za-tone-deep); }
body:has(>.za-rail) :is(.hero,.frame-wrap,.dc-hero,.t-hero,.web-shell,.ai-stage,.player-stage,.settings-panel):not(:fullscreen) {
  box-shadow: var(--za-frost-edge), 0 0 var(--za-bloom) color-mix(in srgb, var(--za-tone-deep) calc(var(--za-glow) * 54%), transparent);
}
body:has(>.za-rail) .card:is(:hover,:focus-visible) {
  border-color: var(--za-tone-deep);
  box-shadow: 0 10px 24px #08081680, 0 0 var(--za-bloom) color-mix(in srgb, var(--za-tone-deep) calc(var(--za-glow) * 62%), transparent);
}
body:has(>.za-rail) .lib-tabs { padding: 6px; margin: 0 0 22px; gap: 5px; border-radius: 11px; }
body:has(>.za-rail) .lib-tab { min-height: 38px; padding: 6px 11px; border-radius: 7px; font: 600 13px/1.2 var(--za-font); }
body:has(>.za-rail) .lib-tab[aria-selected=true] { color: var(--text); background: #8eb5ff20; box-shadow: inset 0 0 0 1px #8eb5ff60; }
body:has(>.za-rail) .za-footer { margin-top: auto; padding: 20px var(--za-gap); background: #0e182c; gap: 14px; font-size: 12px; }
.za-footer nav { row-gap: 12px; }

.settings-overlay[open] { z-index: 1000; }
.settings-panel { background: var(--za-frost); border-radius: 20px; border-color: #90abec66; }
.settings-panel :is(.settings-header,.settings-tabs,.settings-actions) { background: #142139; border-color: var(--line); }
.settings-tabs { grid-template-columns: repeat(4,minmax(0,1fr)); }
.settings-btn svg { transform-origin: center; }

.account-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(320px,460px); align-items: center; gap: clamp(32px,6vw,96px); min-height: min(68vh,690px); max-width: 1120px; margin: auto; }
.account-intro h1 { font-size: clamp(37px,4.5vw,64px); letter-spacing: -.06em; line-height: 1.04; margin: 16px 0; }
.account-intro > p:not(.eyebrow) { color: var(--muted); max-width: 40ch; font-size: 16px; line-height: 1.7; }
.eyebrow { color: var(--za-tone); font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.account-back { display: inline-flex; gap: 12px; align-items: center; margin-top: 20px; color: var(--text); text-decoration: none; }
.account-card { padding: clamp(22px,4vw,36px); border-radius: var(--za-radius); border: 1px solid #90abec68; background: var(--za-frost); box-shadow: var(--za-frost-shadow); }
.account-card-head { margin-bottom: 22px; }
.account-mark { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 18px; border-radius: 11px; background: var(--za-tone); color: #151026; font-size: 25px; font-weight: 850; }
.account-card h2 { font-size: 24px; letter-spacing: -.035em; margin: 0 0 6px; }
.account-card-head p, .account-status { font-size: 13px; color: var(--muted); line-height: 1.65; }
.form-field { display: block; font-size: 13px; font-weight: 650; margin: 0 0 18px; }
#accountForm .form-field input { display: block; width: 100%; height: 45px; padding: 10px 12px; margin: 7px 0; background: #0c1425; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); }
.form-field small { display: block; font-size: 11px; font-weight: 450; color: var(--muted); }
.account-actions { display: flex; flex-direction: column; gap: 9px; margin-top: 21px; }
.account-status:empty { display: none; }
.account-status { margin: 16px 0 0; overflow-wrap: anywhere; }

body[data-arcade-page] .page-head.math-intro { grid-template-columns: minmax(0,1fr) minmax(230px,330px); align-items: center; column-gap: 30px; }
body:has(>.za-rail) .keys button { background: var(--surface-2); color: var(--text); }
body:has(>.za-rail) .keys button:last-child { background: var(--accent); color: var(--accent-ink); }
body[data-arcade-page=legal] > main.legal-main { max-width: 92ch; }
.legal-main .legal-head { padding-bottom: 23px; }
.legal-head h1 { font-size: clamp(32px,4.5vw,51px); letter-spacing: -.05em; }
.legal-main .legal-body { color: var(--muted); font-size: clamp(14px,1.35vw,16px); overflow-wrap: anywhere; }
.legal-main .legal-body h2 { color: var(--text); font-size: clamp(17px,1.8vw,22px); border-top: 1px solid var(--line); padding-top: 20px; }
.legal-main .legal-toc { padding: 18px 20px; }

.skip-link { position: fixed; z-index: 90; top: 12px; left: 12px; padding: 10px 16px; border-radius: 8px; background: var(--surface); color: var(--text); transform: translateY(-165%); }
.skip-link:focus { transform: none; }
[data-arcade-page=search] #results > section + section { margin-top: 28px; }
[data-arcade-page=search] #qEcho { overflow-wrap: anywhere; }
.search-services { display: flex; flex-wrap: wrap; gap: 8px; }
[data-arcade-page=search] .search-placeholder { display: grid; place-items: center; aspect-ratio: 16 / 10; background: var(--surface-2); color: var(--muted); font-weight: 650; }
[data-arcade-page=search] .search-placeholder-poster { aspect-ratio: 2 / 3; height: auto; }
html[data-zenou-desktop] body[data-arcade-page] > main { padding: 12px; }
html[data-motion=calm] body:has(>.za-rail) *, html[data-motion=calm] body:has(>.za-rail) *::before, html[data-motion=calm] body:has(>.za-rail) *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
@media (min-width:781px) {
  [data-sidebar-collapsed] .za-rail { width: 58px; }
  [data-sidebar-collapsed] .za-brand-row { display: flex; flex-direction: column; align-items: center; padding: 16px 0; gap: 9px; }
}
@media (min-width:781px) and (max-width:1060px) {
  :root { --za-rail: 200px; --za-gap: 26px; }
  .za-rail .za-brand-row .za-mark { width: 25px; height: 25px; }
  .za-rail .za-brand-row .za-brand { font-size: 14px; gap: 6px; }
  .account-layout { grid-template-columns: minmax(0,1fr); max-width: 490px; gap: 26px; }
}
@media (max-width:780px) {
  :root { --za-gap: clamp(14px,4vw,23px); }
  .za-rail, [data-sidebar-collapsed] .za-rail { position: relative; width: 100%; inset: auto; margin: 0; border: 0; border-bottom: 1px solid var(--line); }
  .za-brand-row { grid-template-columns: minmax(0,1fr) 36px 36px; align-items: center; padding: 10px var(--za-gap); }
  .za-brand-row :is(.settings-btn,.sidebar-toggle) { width: 36px; height: 36px; }
  .za-scroll { padding: 0 var(--za-gap) 12px; max-height: 43vh; overflow: auto; }
  .za-group nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .za-group a { min-height: 37px; font-size: 12px; padding: 7px 8px; }
  .za-group small { margin: 10px 2px 6px; }
  .za-rail .za-foot { display: none; }
  body[data-arcade-page] > :is(.topbar,.bar,.min-bar), .arcade-discover .toolbar { min-height: 52px; padding-block: 8px; }
  body[data-arcade-page] > main:not(.min-stage,.stage) { padding: 22px var(--za-gap) 40px; }
  body[data-arcade-page] .page-head.math-intro { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .account-layout { grid-template-columns: minmax(0,1fr); max-width: 490px; gap: 24px; min-height: auto; }
  .account-intro h1 br { display: none; }
  .account-intro > p:not(.eyebrow) { font-size: 14px; }
  .account-back { margin-top: 8px; }
  .za-footer { flex-direction: column; align-items: flex-start; }
}
@media (max-width:500px) {
  [data-arcade-page=sources] .movies-watch-head { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion:no-preference) {
  .za-rail { transition: width .25s, box-shadow .25s; }
  body[data-arcade-page] { transition: padding-left .25s; }
  .arcade-discover main { transition: margin-left .25s; }
  .account-card { animation: zenou-enter .38s cubic-bezier(.2,.7,.2,1) both; }
}
@media (prefers-reduced-transparency:reduce) {
  .za-rail, body[data-arcade-page] > :is(.topbar,.bar,.min-bar), .arcade-discover .toolbar { backdrop-filter: none; background: var(--za-nav); }
}

/* Quick search and Play Later controls. */
.site-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.quick-launch, .later-icon {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  cursor: pointer;
  color: var(--text);
}
.quick-launch {
  gap: 8px;
  flex: none;
  min-height: 37px;
  margin: 0 13px;
  padding: 6px 9px;
  background: #ffffff09;
  font: 600 12px/1.2 var(--za-font);
}
.quick-launch svg { color: var(--za-tone); }
.quick-launch kbd { margin-inline-start: auto; color: var(--muted); font: 10px/1.4 ui-monospace, monospace; padding: 1px 5px; border: 1px solid var(--line-strong); border-radius: 4px; }
.quick-launch:hover, .later-icon:hover { background: #253c61; border-color: #91b4fb80; }
:where(.quick-launch,.quick-dialog,.later-icon,.later-action) svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.later-icon { width: 35px; height: 35px; padding: 0; background: #0b1529e8; }
.later-action { display: inline-flex; gap: 7px; align-items: center; }
:is(.later-icon,.later-action)[aria-pressed=true] { color: var(--za-tone); border-color: var(--za-tone-deep); }
:is(.later-icon,.later-action)[aria-pressed=true] svg { fill: color-mix(in srgb, var(--za-tone) 45%, transparent); }
.play-later-card { position: relative; min-width: 0; display: grid; }
.play-later-card .card { width: 100%; }
.play-later-card .later-icon { position: absolute; top: 8px; right: 8px; z-index: 1; }
.quick-dialog {
  width: min(560px, calc(100% - 24px));
  height: fit-content;
  max-height: min(650px,calc(100dvh - 34px));
  margin: min(11vh,90px) auto auto;
  padding: 0;
  border: 1px solid #9ab6fa6b;
  border-radius: 18px;
  background: #11203a;
  color: var(--text);
  box-shadow: 0 28px 84px #080513b8, 0 0 var(--za-bloom) color-mix(in srgb, var(--za-tone-deep) calc(var(--za-glow) * 90%), transparent);
  overflow: hidden;
}
.quick-dialog[open] { display: grid; grid-template-rows: auto minmax(0,1fr); }
.quick-dialog::backdrop { background: #070814c9; backdrop-filter: blur(4px); }
.quick-searchbar { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 13px; background: #172741; border-bottom: 1px solid var(--line); }
.quick-searchbar > svg { color: var(--za-tone); margin-inline: 4px; }
.quick-searchbar input { width: 100%; height: 38px; padding: 6px 9px; border: 0; border-radius: 5px; background: transparent; color: var(--text); }
.quick-searchbar input:focus-visible { outline-offset: 0; }
.quick-searchbar input::placeholder { color: var(--muted); }
.quick-results { overflow: auto; padding: 7px 11px 12px; scrollbar-width: thin; overscroll-behavior: contain; }
.quick-results h2 { margin: 10px 9px 5px; font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); }
.quick-results ul { list-style: none; margin: 0; padding: 0; }
.quick-result { display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 7px 9px; color: var(--text); text-decoration: none; border: 1px solid transparent; border-radius: 8px; }
.quick-result span { overflow-wrap: anywhere; }
.quick-result svg { color: var(--za-tone); }
.quick-result small { margin-left: auto; color: var(--muted); text-transform: capitalize; overflow-wrap: anywhere; }
.quick-result:is(:hover,:focus-visible) { background: #95b6ff20; border-color: #abc8ff54; }
.quick-result:focus-visible { outline-offset: -2px !important; }
.quick-empty { padding: 4px 9px; color: var(--muted); }
@media (min-width:781px) {
  [data-sidebar-collapsed] .quick-launch { width: 36px; margin: 0 auto; padding: 0; }
  [data-sidebar-collapsed] .quick-launch :is(span,kbd) { display: none; }
}
@media (max-width:780px) {
  .quick-launch { position: absolute; top: 10px; right: calc(var(--za-gap) + 80px); width: 36px; height: 36px; min-height: 0; margin: 0; padding: 0; }
  .quick-launch :is(span,kbd) { display: none; }
}
@media (prefers-reduced-motion:no-preference) {
  html:not([data-motion=calm]) .quick-dialog[open] { animation: zenou-dialog .22s ease-out both; }
  .quick-launch, .later-icon, .quick-result { transition: background-color .18s, border-color .18s; }
}

/* Site masthead, section rail and mobile navigation. */
html[data-site-masthead] { --masthead-height: 64px; scroll-padding-top: 78px; }
html[data-site-masthead] :is(body[data-arcade-page],body.arcade-discover) { padding-top: var(--masthead-height); }
.site-masthead {
  position: fixed;
  z-index: 72;
  inset: 0 0 auto;
  display: flex;
  height: var(--masthead-height);
  align-items: center;
  gap: 10px;
  padding: 0 clamp(14px,2.4vw,38px);
  border-bottom: 1px solid #91b6fa3b;
  background: #0b1529f0;
  box-shadow: 0 6px 24px #0308124a;
  backdrop-filter: blur(18px);
}
.site-masthead .za-brand {
  height: auto;
  min-width: min(var(--za-rail), 190px);
  flex: none;
  gap: 8px;
  padding: 0;
  font-size: 20px;
}
.site-masthead .za-brand .za-mark { width: 34px; height: 34px; margin: 0; border-radius: 9px; }
.masthead-links { display: flex; align-items: center; gap: 5px; margin-right: auto; }
.masthead-links a {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 6px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  text-decoration: none;
  font: 650 13px/1.2 var(--za-font);
}
.masthead-links a:hover { background: #a9c8ff13; color: var(--text); }
.masthead-links a[aria-current=page] {
  color: var(--za-tone);
  background: #a2c7ff16;
  border-color: #a2c7ff37;
}
.masthead-links svg { width: 16px; height: 16px; }
.site-masthead :is(.settings-btn,.sidebar-toggle,.quick-launch) {
  position: static;
  width: auto;
  height: 39px;
  flex: none;
  margin: 0;
  padding: 0 9px;
  background: #a9c8ff0d;
  color: var(--text);
  border: 1px solid #a9c8ff3b;
}
.site-masthead :is(.settings-btn,.sidebar-toggle) { width: 39px; }
.site-masthead .quick-launch span { display: inline; }
.site-masthead .quick-launch kbd { display: inline-block; }
.site-masthead :is(.settings-btn,.sidebar-toggle,.quick-launch):hover { border-color: #bcdaff87; background: #9ec5ff22; }
html[data-site-masthead] .za-rail { top: var(--masthead-height); }
html[data-site-masthead] .za-scroll { padding-block: 9px 18px; overscroll-behavior: contain; }
html[data-site-masthead] .za-group nav a:is([href="/"],[href="/?all=1"],[href="/library/"],[href="/library"],[href="/web/"],[href="/web"]) { display: none; }
html[data-site-masthead] .za-group a[aria-current=page] { box-shadow: inset 2px 0 var(--za-tone), inset 0 0 20px #648cee1c; }
html[data-site-masthead] .za-group a:hover { background: #90b9ff14; }
html[data-site-masthead] :is(body[data-arcade-page] > .topbar, .arcade-discover .toolbar) { min-height: 52px; padding-block: 7px; }
html[data-site-masthead] .za-footer { background: #0d182b; border-color: #2b3d5c; }
html[data-site-masthead] :is(.legal-body h2,.catalog,.shelf) { scroll-margin-top: 12px; }
@media (min-width:781px) {
  html[data-site-masthead][data-sidebar-collapsed] { --za-rail: 0px; }
  html[data-site-masthead][data-sidebar-collapsed] .za-rail { width: 0; border: 0; box-shadow: none; }
  html[data-site-masthead][data-sidebar-collapsed] .site-masthead .za-brand { min-width: 155px; }
}
@media (min-width:781px) and (max-width:1000px) {
  .site-masthead .za-brand { min-width: 151px; }
  .site-masthead .quick-launch kbd { display: none; }
  .masthead-links a { padding-inline: 7px; }
}
@media (max-width:780px) {
  html[data-site-masthead] { --masthead-height: 56px; --mobile-nav-height: calc(57px + env(safe-area-inset-bottom, 0px)); }
  html[data-site-masthead] :is(body[data-arcade-page],body.arcade-discover) { padding-bottom: var(--mobile-nav-height); }
  html[data-site-masthead] body:has(.player-bar.on) { padding-bottom: calc(var(--mobile-nav-height) + var(--music-player-height, 0px)); }
  html[data-site-masthead] .player-bar { bottom: var(--mobile-nav-height); }
  .site-masthead { justify-content: flex-end; }
  .site-masthead .za-brand { min-width: 0; margin-right: auto; font-size: clamp(15px,4vw,19px); }
  .site-masthead .za-brand .za-mark { width: 29px; height: 29px; }
  .site-masthead :is(.quick-launch,.settings-btn,.sidebar-toggle) { width: 36px; height: 37px; padding: 0; }
  .site-masthead .quick-launch :is(span,kbd) { display: none; }
  .masthead-links {
    position: fixed;
    inset: auto 0 0;
    height: var(--mobile-nav-height);
    margin: 0;
    padding: 5px max(12px,env(safe-area-inset-left,0px)) calc(5px + env(safe-area-inset-bottom,0px));
    justify-content: space-around;
    border-top: 1px solid #8cb1ed52;
    background: #0c172c;
    box-shadow: 0 -8px 30px #07101e8c;
  }
  .masthead-links a { flex-direction: column; min-width: min(19vw, 85px); gap: 2px; padding: 4px 2px; font-size: 10px; }
  .masthead-links svg { width: 18px; height: 18px; }
  /* A backdrop on the entire masthead would contain the fixed bottom nav. */
  .site-masthead { backdrop-filter: none; }
  html[data-site-masthead] .za-rail {
    position: fixed;
    inset: calc(var(--masthead-height) + 6px) 8px auto;
    z-index: 68;
    width: auto;
    max-height: calc(100dvh - var(--masthead-height) - var(--mobile-nav-height) - 14px);
    margin: 0;
    border: 1px solid #92b7f36b;
    border-radius: 14px;
    box-shadow: 0 18px 40px #050a188c;
  }
  html[data-site-masthead][data-sidebar-collapsed] .za-rail { display: none; }
  html[data-site-masthead] .za-scroll { max-height: inherit; padding: 5px 13px 13px; }
  html[data-site-masthead] .za-group:last-child { display: block; }
  html[data-site-masthead] .za-group a { min-height: 42px; }
  html[data-site-masthead] .za-group small { margin-top: 8px; }
  html[data-site-masthead] .za-rail .za-foot:not([hidden]) { display: flex; margin-bottom: 4px; }
}

/* Inner pages use a consistent section header and surfaces sized to the task. */
body[data-arcade-page] :is(.page-head,.ai-hero,.web-hero,.social-hero,.movies-hero,.dw-head),
.legal-main .legal-head {
  padding: clamp(18px,2.7vw,35px) clamp(16px,2.9vw,37px);
  border: 1px solid var(--line);
  border-left: 3px solid var(--za-tone-deep);
  border-radius: var(--za-radius);
  background:
    radial-gradient(ellipse 82% 125% at 98% 0%, #294f956b, transparent 70%),
    linear-gradient(145deg,#142440ee,#111b2ef2);
}
body[data-arcade-page] :is(.page-head,.ai-hero,.web-hero,.social-hero,.movies-hero,.dw-head) > :where(a,button) { justify-self: start; }
body[data-arcade-page=library] .lib-tabs { background: #0c182b; }
body[data-arcade-page] .lib-tab[aria-selected=true] { color: var(--za-tone); background: #99bdff12; }
body[data-arcade-page=legal] .legal-main .legal-body { padding-inline: clamp(0px,1.5vw,14px); }
body[data-arcade-page=legal] .legal-toc li::marker { color: var(--za-tone-deep); }
.account-intro {
  display: grid;
  align-content: center;
  justify-items: start;
  min-height: 340px;
  padding: clamp(18px,2.5vw,36px);
  border-radius: var(--za-radius);
  border: 1px solid #8eb4fa44;
  background: linear-gradient(105deg,#0a1327f0 18%,#0d1937b0 80%), url('/art/zenou-glass.webp') 57% center/cover, #142440;
}
.account-intro .eyebrow { color: var(--za-tone); }
.account-layout { gap: clamp(16px,3.2vw,48px); }
body[data-arcade-page=play] .game-info-title { color: var(--text); font-size: 18px; letter-spacing: -.03em; margin: 0 0 8px; }
body[data-arcade-page=play] .game-info { min-width: 0; }
@media (min-width:1180px) {
  html:not([data-zenou-desktop]) #playerView:not([hidden]) { display: grid; grid-template-columns: minmax(0,1fr) minmax(240px,27%); align-items: start; gap: 16px; }
  #playerView > :is(.za-player-title,.related) { grid-column: 1/-1; }
  #playerView > .player-stage { grid-column: 1; grid-row: 2; margin: 0; }
  #playerView > .game-info { grid-column: 2; grid-row: 2; margin: 0; display: grid; grid-template-columns: minmax(0,1fr); padding: 14px; }
  #playerView > .external-panel { grid-column: 1; }
  #playerView > .related { margin-top: 12px; }
}
@media (max-width:780px) {
  .account-intro { min-height: auto; }
}
@media (min-width:690px) {
  .settings-panel {
    width: min(810px,100%);
    grid-template: auto minmax(0,1fr) auto / 160px minmax(0,1fr);
  }
  .settings-panel > .settings-header, .settings-panel > .settings-actions { grid-column: 1/-1; }
  .settings-panel > .settings-tabs {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: stretch;
    gap: 5px;
    padding: 15px 10px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }
  .settings-tabs > button { text-align: left; padding-inline: 12px; }
  .settings-panel > .settings-content { min-width: 0; min-height: 0; }
}
@media (prefers-reduced-transparency:reduce) {
  .site-masthead { backdrop-filter: none; background: var(--za-nav); }
}

/* Classic arcade surfaces and catalogue density. */
html:has(.za-rail) {
  --za-canvas: #090909;
  --za-nav: #101010;
  --za-panel: #151515;
  --za-line: #303030;
  --za-frost: #151515;
  --za-frost-fill: #151515;
  --za-frost-shadow: none;
  --za-ambient: #090909;
  --surface-2: #1d1d1d;
  --line-strong: #555;
  --text: #f5f5f5;
  --muted: #aaa;
  --muted-2: #999;
  --za-tone: var(--accent);
  --za-tone-deep: var(--accent);
}
html[data-site-masthead] :is(.site-masthead,.za-rail,.za-footer,.toolbar,.masthead-links),
.settings-panel :is(.settings-header,.settings-tabs,.settings-actions) {
  background: var(--za-nav);
  border-color: var(--za-line);
  box-shadow: none;
}
body.arcade-discover :is(.search,.shuffle,.za-accent,#gameLayout,#sort) {
  background: #151515;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
}
#gameLayout { font: inherit; padding: 8px; }
.arcade-discover #grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(min(100%,var(--card-width,190px)),1fr));
  gap: 12px;
}
html[data-game-layout=compact] #grid { --card-width: 135px; gap: 8px; }
html[data-game-layout=large] #grid { --card-width: 280px; }
html[data-game-layout=list] #grid { grid-template-columns: 1fr; gap: 5px; }
html[data-game-layout=list] #grid .card { display: flex; align-items: center; padding-right: 46px; }
html[data-game-layout=list] #grid .art { width: 82px; height: 52px; flex: none; }
html[data-game-layout=list] #grid .card-copy { flex: 1; min-width: 0; min-height: 52px; }
@media (max-width: 780px) {
  html[data-site-masthead] { --masthead-height: 103px; --mobile-nav-height: 0px; }
  html[data-site-masthead] .site-masthead { height: 54px; }
  .site-masthead .masthead-links { inset: 54px 0 auto; height: 49px; padding: 2px 6px; border-bottom: 1px solid var(--line); }
  .site-masthead .masthead-links a { min-width: 0; flex: 1; }
  .arcade-discover #grid { --card-width: 150px; }
}
#startGame { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%,-50%); z-index: 2; }
.directory-controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.directory-controls :is(input,select), .directory-save { color: var(--text); background: var(--za-panel); border: 1px solid var(--line); border-radius: 5px; padding: 7px 10px; }
.directory-entry { display: grid; grid-template-rows: 1fr auto; min-width: 0; }
.directory-entry .web-site { text-decoration: none; }
.directory-save { justify-self: end; margin-top: 4px; cursor: pointer; }
#webSites[data-layout=list] { grid-template-columns: 1fr; }
#webSites[data-layout=list] .directory-entry { grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
html[data-site-masthead] .site-masthead.za-brand-row { display: flex; flex-direction: row; align-items: center; padding: 0 clamp(12px,2vw,28px); }
html[data-site-masthead] .site-masthead .quick-launch { margin: 0; }
body.arcade-discover .catalog, body[data-arcade-page] :is(.page-head,.ai-hero,.web-hero,.social-hero,.movies-hero,.dw-head) { background: var(--za-nav); }
body.arcade-discover #page-title { font-size: clamp(26px,3.2vw,40px); }

#gameSites { margin:15px 0; }
#gameSites h3 { font-size:14px; margin:0 0 6px; }
#portalLinks { display:flex; flex-wrap:wrap; gap:6px; }
#portalLinks a, #gameDetails button { padding:6px 10px; color:var(--text); background:var(--surface-2); border:1px solid var(--line); border-radius:5px; }
.card-info { position:absolute; left:7px; top:7px; border:1px solid #555; background:#111e; color:#fff; display:grid; place-items:center; width:30px; height:30px; border-radius:6px; }
.card-info svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.6; }
@media(hover:hover) { .card-info { opacity:0; } .play-later-card:is(:hover,:focus-within) .card-info { opacity:1; } }
#gameDetails { max-width:min(440px,90vw); color:var(--text); background:#151515; border:1px solid #454545; padding:22px; border-radius:8px; }
#gameDetails::backdrop { background:#000b; }
#gameDetails form { display:inline; }
.tile-launch { position:absolute; bottom:7px; left:7px; background:#101010e8; color:#fff; border:1px solid #666; padding:3px 8px; border-radius:4px; font-size:12px; opacity:0; }
.card:is(:hover,:focus-visible) .tile-launch { opacity:1; }
@media(prefers-reduced-motion:no-preference) { .card-info,.tile-launch { transition:opacity .15s ease; } }

body.arcade-discover .discover-home { min-height:auto; padding:0; border:0; background:none; box-shadow:none; }
