@font-face {
  font-family: "Russo One Local";
  src: url("../assets/fonts/russo-one-cyrillic.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root,
html[data-trainer-theme="cyber"] {
  --bg: #10171C;
  --surface: #172027;
  --surface-elevated: #1D2830;
  --text-primary: #F3EFE6;
  --text-secondary: #B7C0C5;
  --text-muted: #879199;
  --primary: #66A9A4;
  --primary-pressed: #55938F;
  --primary-soft: #203D3D;
  --info: #8EA9C6;
  --info-soft: #20303D;
  --gold: #D0AE72;
  --gold-soft: #3B3226;
  --border: #2A3941;
  --divider: #233038;
  --success: #7DA892;
  --danger: #D18A83;
  --suite-bg: var(--bg);
  --suite-surface: color-mix(in srgb, var(--surface) 86%, transparent);
  --suite-border: var(--border);
  --suite-text: var(--text-primary);
  --suite-muted: var(--text-secondary);
  --suite-accent: var(--primary);
  --suite-gold: var(--gold);
  --bg-2: var(--surface);
  --bg-3: var(--surface-elevated);
  --surface2: var(--surface-elevated);
  --text: var(--text-primary);
  --text-1: var(--text-primary);
  --text-2: var(--text-secondary);
  --text-3: var(--text-muted);
  --muted: var(--text-secondary);
  --accent: var(--primary);
  --flow-bg: var(--bg);
  --flow-high: var(--primary);
  --flow-haze-b: var(--info);
}

/* Neutral glass application palette */
:root,
html[data-trainer-theme="cyber"],
html[data-trainer-theme="standard"] {
  color-scheme: dark;
  --bg: #05070b;
  --surface: #111720;
  --surface-elevated: #18202a;
  --text-primary: #f6f7f9;
  --text-secondary: rgba(236, 240, 246, .68);
  --text-muted: rgba(236, 240, 246, .48);
  --primary: #56d8ed;
  --primary-pressed: #36bcd5;
  --primary-soft: rgba(86, 216, 237, .12);
  --info: #a693ff;
  --info-soft: rgba(166, 147, 255, .12);
  --gold: #f1ca72;
  --gold-soft: rgba(241, 202, 114, .12);
  --border: rgba(255, 255, 255, .16);
  --divider: rgba(255, 255, 255, .10);
  --success: #63dfb4;
  --danger: #ff8b8b;
  --suite-bg: var(--bg);
  --suite-surface: rgba(18, 23, 31, .72);
  --suite-border: var(--border);
  --suite-text: var(--text-primary);
  --suite-muted: var(--text-secondary);
  --suite-accent: var(--primary);
  --suite-gold: var(--gold);
}

html[data-trainer-theme="cyber"] { color-scheme: dark; }
html[data-trainer-theme="standard"] {
  color-scheme: light;
  --bg: #F5F1E8;
  --surface: #FBF9F4;
  --surface-secondary: #EEE9DF;
  --surface-elevated: var(--surface-secondary);
  --text-primary: #182129;
  --text-secondary: #5D6770;
  --text-muted: #8A9298;
  --primary: #2B7472;
  --primary-pressed: #245F5D;
  --primary-soft: #DCEAE7;
  --info: #6D8FB3;
  --info-soft: #E4EBF2;
  --gold: #B99052;
  --gold-dark: #9D7741;
  --border: #D9D2C5;
  --divider: #E5E0D7;
  --success: #4E7B68;
  --danger: #A85D5D;
  --suite-bg: var(--bg);
  --suite-surface: color-mix(in srgb, var(--surface) 86%, transparent);
  --suite-border: var(--border);
  --suite-text: var(--text-primary);
  --suite-muted: var(--text-secondary);
  --suite-accent: var(--primary);
  --suite-gold: var(--gold);
  --ng-bg: var(--bg);
  --ng-bg-deep: var(--surface-secondary);
  --ng-surface: color-mix(in srgb, var(--surface) 86%, transparent);
  --ng-surface-strong: var(--surface);
  --ng-border: var(--border);
  --ng-border-strong: var(--primary);
  --ng-text: var(--text-primary);
  --ng-muted: var(--text-secondary);
  --ng-accent: var(--primary);
  --ng-accent-ink: #F3EFE6;
  --ng-shadow: 0 30px 90px rgba(35, 59, 54, .14);
  --bg-2: var(--surface);
  --bg-3: var(--surface-secondary);
  --surface2: var(--surface-secondary);
  --text: var(--text-primary);
  --text-1: var(--text-primary);
  --text-2: var(--text-secondary);
  --text-3: var(--text-muted);
  --muted: var(--text-secondary);
  --cyan: var(--primary);
  --accent: var(--primary);
  --accent-h: var(--primary-pressed);
  --purple: var(--info);
  --flow-bg: var(--suite-bg);
  --flow-high: var(--primary);
  --flow-haze-b: var(--info);
}

html { background: var(--suite-bg); overflow-x: clip; }
body { min-width: 0; color: var(--suite-text); background: transparent !important; overflow-x: clip; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body > *:not(.motion-background) { position: relative; z-index: 1; }

.suite-header {
  position: relative;
  top: auto;
  box-sizing: border-box;
  width: min(calc(100% - 32px), 1180px);
  max-width: none;
  height: auto;
  min-height: 76px;
  margin: 16px auto 0;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--suite-border);
  border-radius: 28px;
  background: color-mix(in srgb, var(--suite-bg) 82%, transparent);
  backdrop-filter: blur(22px);
  box-shadow: 0 18px 70px rgba(0, 0, 0, .2);
}

.suite-home {
  min-height: 48px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 24px;
  color: var(--suite-text);
  background: linear-gradient(145deg, rgba(86, 216, 237, .12), rgba(166, 147, 255, .07));
  box-shadow: inset 0 1px rgba(255, 255, 255, .14), 0 8px 24px rgba(0, 0, 0, .16);
  text-decoration: none;
  font-weight: 700;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.suite-home[hidden] {
  display: none !important;
}

.suite-home:hover,
.suite-home:focus-visible {
  border-color: rgba(86, 216, 237, .42);
  background: linear-gradient(145deg, rgba(86, 216, 237, .18), rgba(166, 147, 255, .12));
}

.suite-home .ecosystem-icon {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

@media (max-width: 560px) {
  .suite-header {
    width: calc(100% - 20px);
    margin-top: max(10px, env(safe-area-inset-top));
    padding: 8px 10px;
    border-radius: 24px;
  }

  .suite-home {
    width: 48px;
    padding: 0;
  }

  .suite-home span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}
.suite-header > .header__inner {
  width: auto;
  max-width: none;
  height: 52px;
  min-height: 52px;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
}

.suite-theme-toggle {
  position: relative;
  isolation: isolate;
  flex: 0 0 auto;
  width: 172px;
  height: 44px;
  min-height: 44px;
  padding: 4px;
  border: 1px solid var(--suite-border);
  border-radius: 999px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  overflow: hidden;
  color: var(--suite-muted);
  background: color-mix(in srgb, var(--suite-surface) 82%, transparent);
  cursor: pointer;
  font: inherit;
}
.suite-theme-toggle::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 4px 50% 4px 4px;
  border-radius: 999px;
  background: var(--suite-accent);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--suite-accent) 24%, transparent);
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
html[data-trainer-theme="standard"] .suite-theme-toggle::before { transform: translateX(0); }
.suite-theme-toggle__label {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  font-size: .68rem;
  color: var(--suite-muted);
  font-weight: 680;
  line-height: 1;
  transition: color .2s ease;
}
.suite-theme-toggle__icon { width: 13px; height: 13px; flex: 0 0 auto; }
html[data-trainer-theme="cyber"] .suite-theme-toggle__label[data-theme-label="cyber"] { color: #06201b; }
html[data-trainer-theme="standard"] .suite-theme-toggle__label[data-theme-label="standard"] { color: #f7fffd; }

.suite-brand { min-height: 52px; display: inline-flex; align-items: center; gap: 12px; color: var(--suite-text); font-weight: 850; letter-spacing: .05em; text-decoration: none; }
.suite-header .suite-brand { flex: 0 1 auto; min-width: 0; height: 52px; }
.suite-brand img { width: 52px; height: 52px; object-fit: contain; opacity: 1; filter: brightness(1.22) contrast(1.12) drop-shadow(0 0 10px rgba(208, 174, 114, .52)) drop-shadow(0 0 24px rgba(208, 174, 114, .18)); }
.suite-brand span { color: var(--suite-text) !important; opacity: 1 !important; }
.suite-header .suite-brand span { font-family: "Russo One Local", "Arial Black", sans-serif; font-size: .82rem; font-weight: 400; line-height: 1; letter-spacing: .105em; white-space: nowrap; }

.ecosystem-icon { width: 1.3em; height: 1.3em; display: inline-block; flex: 0 0 auto; overflow: visible; color: currentColor; fill: currentColor; vertical-align: -.22em; }
.step__icon .ecosystem-icon, .boost-icon .ecosystem-icon, .result__icon .ecosystem-icon, .result-head__icon .ecosystem-icon, .result-gain__icon .ecosystem-icon { width: 1em; height: 1em; }
.header__back {
  box-sizing: border-box;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
}
.header__back .ecosystem-icon { width: 20px; height: 20px; }

.motion-background { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: var(--flow-bg, var(--suite-bg)); }
.motion-background canvas,
.motion-background__aurora,
.motion-background__fallback-stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.motion-background canvas { opacity: 0; transition: opacity .7s ease, filter .5s ease; }
.motion-background.starfield-ready canvas { opacity: 1; }
.motion-background.starfield-ready .motion-background__fallback-stars { opacity: 0; }
.motion-background__aurora {
  background:
    radial-gradient(circle at 18% 14%, color-mix(in srgb, var(--flow-high) 16%, transparent), transparent 36%),
    radial-gradient(circle at 82% 76%, color-mix(in srgb, var(--flow-haze-b) 12%, transparent), transparent 42%);
  animation: suite-breathe 12s ease-in-out infinite alternate;
}
.motion-background__fallback-stars {
  opacity: 1;
  background:
      radial-gradient(circle at 12% 18%, var(--flow-high) 0 1px, transparent 2px),
      radial-gradient(circle at 72% 32%, var(--flow-haze-b) 0 1px, transparent 2px),
      radial-gradient(circle at 38% 76%, color-mix(in srgb, var(--flow-high) 70%, transparent) 0 1px, transparent 2px),
      radial-gradient(ellipse at 72% 70%, color-mix(in srgb, var(--flow-haze-b) 18%, transparent), transparent 44%);
    background-size: 97px 83px, 137px 113px, 173px 149px, auto;
    transition: opacity .7s ease;
}
.motion-background.starfield-ready.motion-mode-focus canvas { opacity: .42; }
.motion-mode-static canvas { display: none; }
.motion-mode-paused .motion-background__aurora { animation-play-state: paused; }
.motion-mode-focus .motion-background__aurora { opacity: .55; }
.motion-mode-celebration .motion-background__aurora { opacity: .9; filter: hue-rotate(25deg); }
html[data-trainer-theme="standard"] .motion-background { background: var(--bg); }
html[data-trainer-theme="standard"] .motion-background canvas,
html[data-trainer-theme="standard"] .motion-background__aurora,
html[data-trainer-theme="standard"] .motion-background__fallback-stars {
  display: none;
  opacity: 0;
  animation: none;
}

.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center; border-radius: 12px; background: var(--suite-accent); color: #05201b; font-weight: 800; transform: translateY(-160%); transition: transform .18s ease; }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

button, a, input, select, textarea { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--suite-accent); outline-offset: 3px; }

/* Shared visual language layered over the existing route mechanics. */
.screen, .app, [data-suite-main], #app { min-width: 0; }
.screen { color: var(--suite-text); }
.hero { position: relative; }
.hero__title, .result__title, .result-head__title, .section-head h2 { color: var(--suite-text); letter-spacing: -.045em; }
.hero__desc, .hero__sub { color: var(--suite-muted); }
.card, .glass-panel, .reading-card, .result-score-card, .result__card {
  border: 1px solid var(--suite-border) !important;
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--surface-elevated) 82%, transparent)) !important;
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 70px color-mix(in srgb, var(--bg) 42%, transparent);
}
.btn, .button, .dur-btn, .btn-answer, .diff-opt, .level-card {
  min-height: 44px;
  border-color: var(--suite-border) !important;
}
.btn--primary, .button--primary { color: #06201b !important; background: var(--suite-accent) !important; box-shadow: 0 16px 42px rgba(126, 234, 209, .18) !important; }
html[data-trainer-theme="standard"] .btn--primary,
html[data-trainer-theme="standard"] .button--primary { color: #f7fffd !important; }
.card__label, .hero__eyebrow, .tag, .section-head > span { color: var(--suite-accent) !important; }
.stat-strip { border: 1px solid var(--suite-border) !important; background: var(--suite-surface) !important; color: var(--suite-text) !important; backdrop-filter: blur(18px); }
.stat-strip__item { border-color: var(--suite-border) !important; }
.stat-strip__val { color: var(--suite-gold) !important; }
.stat-strip__lbl { color: var(--suite-muted) !important; }

html[data-trainer-theme="standard"] .card,
html[data-trainer-theme="standard"] .glass-panel,
html[data-trainer-theme="standard"] .reading-card,
html[data-trainer-theme="standard"] .result-score-card,
html[data-trainer-theme="standard"] .result__card {
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--surface-secondary) 82%, transparent)) !important;
  box-shadow: 0 24px 70px rgba(42, 67, 61, .12);
}
html[data-trainer-theme="standard"] .hero__title,
html[data-trainer-theme="standard"] .result-head__title,
html[data-trainer-theme="standard"] .title-gradient {
  color: var(--suite-text) !important;
  background: none !important;
  -webkit-text-fill-color: var(--suite-text) !important;
}
html[data-trainer-theme="standard"] .diff-opt input:checked + span,
html[data-trainer-theme="standard"] .dur-btn.active {
  color: #f7fffd !important;
  border-color: var(--suite-accent) !important;
  background: var(--suite-accent) !important;
}
html[data-trainer-theme="standard"] .trainer-header {
  background: var(--suite-surface) !important;
  box-shadow: 0 18px 54px rgba(42, 67, 61, .12);
}
html[data-trainer-theme="standard"] .setup-panel select,
html[data-trainer-theme="standard"] .answer-input {
  background: var(--surface) !important;
  color: var(--suite-text) !important;
}
html[data-trainer-theme="standard"] .pace-selector label,
html[data-trainer-theme="standard"] .number-pad button,
html[data-trainer-theme="standard"] .how-panel li {
  background: color-mix(in srgb, var(--surface) 82%, transparent) !important;
}

/* Number-memory keeps game status outside the identical shared header. */
.trainer-header { display: flex; }
.trainer-session-bar {
  box-sizing: border-box;
  position: relative;
  z-index: 10;
  width: min(calc(100% - 32px), 1180px);
  min-height: 44px;
  margin: 8px auto 0;
  padding: 0 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.trainer-session-bar .trainer-header__session { min-height: 44px; }
.trainer-session-bar > .icon-button { position: absolute; top: 0; right: 0; }
@keyframes suite-breathe { from { transform: scale(1) translate3d(-1%, 0, 0); } to { transform: scale(1.08) translate3d(1%, -1%, 0); } }

@media (max-width: 720px) {
  .suite-header { width: calc(100% - 20px); min-height: 70px; margin-top: 10px; padding: 9px 12px; border-radius: 22px; }
  .suite-header .suite-brand span { display: none; }
  .suite-header > .header__inner { min-width: 88px; }
  .header__back { width: 44px; padding: 0; border-radius: 50%; }
  .header__back-label { display: none; }
  .screen, .app, [data-suite-main] { width: 100%; max-width: 100%; }
  .hero { padding-top: 34px; }
  .trainer-session-bar { width: calc(100% - 20px); min-height: 0; margin-top: 0; padding: 0 44px; }
  .trainer-session-bar:has(.icon-button:not([hidden])) { min-height: 44px; margin-top: 8px; }
}

@media (max-width: 390px) {
  .suite-brand span, .brand span { max-width: 72px; overflow: hidden; text-overflow: ellipsis; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .motion-background canvas { display: none; }
}

/* Pearl glass trainer layer */
:root,
html[data-trainer-theme="cyber"],
html[data-trainer-theme="standard"] {
  color-scheme: dark;
  --suite-bg: #030303;
  --suite-pearl: #fbf8f1;
  --suite-text: #fbf8f1;
  --suite-muted: rgba(245, 241, 232, .68);
  --suite-faint: rgba(245, 241, 232, .43);
  --suite-champagne: #d8c49f;
  --suite-accent: #d8c49f;
  --suite-gold: #d8c49f;
  --suite-glass: linear-gradient(145deg, rgba(255, 252, 245, .11), rgba(255, 252, 245, .025));
  --suite-glass-strong: linear-gradient(145deg, rgba(255, 252, 245, .17), rgba(255, 252, 245, .055));
  --suite-glass-active: linear-gradient(145deg, rgba(255, 252, 245, .23), rgba(216, 196, 159, .095));
  --suite-surface: rgba(255, 252, 245, .075);
  --suite-border: rgba(255, 252, 245, .17);
  --suite-border-strong: rgba(255, 252, 245, .38);
  --suite-divider: rgba(255, 252, 245, .10);
  --suite-progress-track: rgba(255, 255, 255, .075);
  --suite-progress-fill: linear-gradient(90deg, rgba(255, 255, 255, .96), rgba(184, 196, 211, .82));
  --suite-progress-glow: 0 0 22px rgba(202, 216, 233, .24);
  --suite-shadow: 0 28px 90px rgba(0, 0, 0, .56), inset 0 1px rgba(255, 255, 255, .08);
  --suite-blur: 24px;
  --bg: #030303;
  --surface: rgba(255, 252, 245, .075);
  --surface-secondary: rgba(255, 252, 245, .045);
  --surface-elevated: rgba(255, 252, 245, .11);
  --text-primary: #fbf8f1;
  --text-secondary: rgba(245, 241, 232, .68);
  --text-muted: rgba(245, 241, 232, .43);
  --primary: #fbf8f1;
  --primary-soft: rgba(255, 252, 245, .14);
  --info: #d8c49f;
  --gold: #d8c49f;
  --border: rgba(255, 252, 245, .17);
  --divider: rgba(255, 252, 245, .10);
  --flow-bg: #030303;
  --flow-high: rgba(251, 248, 241, .14);
  --flow-haze-b: rgba(216, 196, 159, .08);
  --ng-bg: #030303;
  --ng-bg-deep: #030303;
  --ng-surface: rgba(255, 252, 245, .075);
  --ng-surface-strong: rgba(255, 252, 245, .11);
  --ng-border: rgba(255, 252, 245, .17);
  --ng-border-strong: rgba(255, 252, 245, .38);
  --ng-text: #fbf8f1;
  --ng-muted: rgba(245, 241, 232, .68);
  --ng-accent: #d8c49f;
  --ng-accent-ink: #080706;
  --ng-shadow: 0 28px 90px rgba(0, 0, 0, .56);
  --cyan: #d8c49f;
  --accent: #d8c49f;
  --accent-h: #fbf8f1;
  --purple: rgba(245, 241, 232, .68);
}

html,
body {
  max-width: 100%;
  touch-action: manipulation;
  background:
    radial-gradient(circle at 50% -12%, rgba(216, 196, 159, .105), transparent 34rem),
    radial-gradient(circle at 8% 72%, rgba(255, 252, 245, .055), transparent 30rem),
    #030303 !important;
  color: var(--suite-text) !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .012) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .58), transparent 74%);
}

.motion-background,
.motion-background__base {
  background: #030303 !important;
}

.motion-background__aurora {
  opacity: .78 !important;
  filter: blur(42px) saturate(.55) !important;
  background:
    radial-gradient(circle at 50% 20%, rgba(216, 196, 159, .14), transparent 34%),
    radial-gradient(circle at 18% 72%, rgba(255, 252, 245, .08), transparent 30%),
    radial-gradient(circle at 84% 80%, rgba(216, 196, 159, .06), transparent 28%) !important;
}

.motion-background canvas {
  opacity: .32 !important;
  filter: grayscale(1) sepia(.22) saturate(.42) brightness(.72) !important;
}

.motion-background.starfield-ready canvas {
  opacity: .32 !important;
}

.suite-flow__grid {
  opacity: .15 !important;
  filter: grayscale(1) !important;
}

.suite-header,
.trainer-header,
.suite-home,
.header__back,
.suite-theme-toggle,
.suite-theme-toggle__menu {
  color: var(--suite-text) !important;
  border-color: var(--suite-border) !important;
  background: var(--suite-glass) !important;
  box-shadow: var(--suite-shadow) !important;
  -webkit-backdrop-filter: blur(var(--suite-blur)) saturate(1.08) !important;
  backdrop-filter: blur(var(--suite-blur)) saturate(1.08) !important;
}

.suite-header::before,
.trainer-header::before,
.suite-home::before,
.header__back::before {
  border-color: rgba(255, 255, 255, .12) !important;
  background: linear-gradient(110deg, rgba(255, 255, 255, .08), transparent 46%) !important;
}

.suite-home:hover,
.header__back:hover,
.suite-theme-toggle:hover,
.suite-theme-toggle__option:hover {
  color: var(--suite-pearl) !important;
  border-color: var(--suite-border-strong) !important;
  background: var(--suite-glass-strong) !important;
}

.suite-theme-toggle__option[aria-checked="true"],
.suite-theme-toggle__option.is-active {
  color: var(--suite-pearl) !important;
  background: var(--suite-glass-active) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 252, 245, .22) !important;
}

.card,
.glass-panel,
.setup-panel,
.reading-card,
.result-score-card,
.result__card,
.summary-panel,
.stat-card,
.how-panel,
.pause-dialog__panel,
.exit-confirm,
.trainer-session-bar,
.number-display,
.keyboard,
.game-board,
.maze-shell,
.typing-panel,
.practice-panel {
  color: var(--suite-text) !important;
  border-color: var(--suite-border) !important;
  background: var(--suite-glass) !important;
  box-shadow: var(--suite-shadow) !important;
  -webkit-backdrop-filter: blur(var(--suite-blur)) saturate(1.08) !important;
  backdrop-filter: blur(var(--suite-blur)) saturate(1.08) !important;
}

.card::before,
.glass-panel::before,
.setup-panel::before,
.reading-card::before,
.result__card::before {
  border-color: rgba(255, 255, 255, .10) !important;
  background: linear-gradient(118deg, rgba(255, 255, 255, .075), transparent 38%) !important;
}

.hero__title,
.result-head__title,
.result__title,
.section-title,
.title-gradient,
.card__title {
  color: var(--suite-pearl) !important;
  background: linear-gradient(112deg, #fbf8f1 22%, #d8c49f 92%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: 0 8px 34px rgba(216, 196, 159, .09) !important;
}

.hero__eyebrow,
.card__label,
.tag,
.section-head > span,
.result__eyebrow,
.eyebrow,
.panel-kicker,
.intro-copy h1 em,
.how-panel li > span,
.stat-strip__val,
.metric__value {
  color: var(--suite-champagne) !important;
}

.intro-copy h1 em {
  text-shadow: 0 0 48px rgba(216, 196, 159, .16) !important;
}

.hero__subtitle,
.card__text,
.reading-meta,
.result__copy,
.metric__label,
.stat-strip__lbl,
.helper,
.hint {
  color: var(--suite-muted) !important;
}

.btn,
.button,
.dur-btn,
.btn-answer,
.diff-opt,
.diff-opt > span,
.level-card,
.icon-button,
.joy-btn,
.pace-selector label,
.number-pad button,
.setup-panel select,
.answer-input,
input,
select,
textarea {
  color: var(--suite-text) !important;
  border-color: var(--suite-border) !important;
  background: var(--suite-glass) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .07), 0 12px 34px rgba(0, 0, 0, .26) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.06) !important;
  backdrop-filter: blur(18px) saturate(1.06) !important;
}

.btn:hover,
.button:hover,
.dur-btn:hover,
.btn-answer:hover,
.diff-opt:hover > span,
.level-card:hover,
.icon-button:hover,
.joy-btn:hover,
.number-pad button:hover {
  color: var(--suite-pearl) !important;
  border-color: var(--suite-border-strong) !important;
  background: var(--suite-glass-strong) !important;
  transform: translateY(-1px);
}

.btn:active,
.button:active,
.dur-btn:active,
.btn-answer:active,
.level-card:active,
.icon-button:active,
.joy-btn:active,
.number-pad button:active {
  transform: translateY(1px) scale(.985);
}

/* The maze controls are absolutely positioned from their own centre axis.
   Keep that centring transform when shared glass hover/press motion runs. */
.joy-up:hover,
.joy-down:hover {
  transform: translateX(-50%) translateY(-1px);
}

.joy-left:hover,
.joy-right:hover {
  transform: translateY(-50%) translateY(-1px);
}

.joy-up:active,
.joy-up.pressed,
.joy-down:active,
.joy-down.pressed {
  transform: translateX(-50%) translateY(1px) scale(.985);
}

.joy-left:active,
.joy-left.pressed,
.joy-right:active,
.joy-right.pressed {
  transform: translateY(-50%) translateY(1px) scale(.985);
}

.btn.primary,
.btn--primary,
.button--primary,
.button.primary,
.start-btn,
.cta-button {
  color: #080706 !important;
  border-color: rgba(255, 252, 245, .5) !important;
  background: linear-gradient(135deg, rgba(251, 248, 241, .96), rgba(216, 196, 159, .84)) !important;
  box-shadow: 0 16px 44px rgba(0, 0, 0, .38), inset 0 1px rgba(255, 255, 255, .72) !important;
}

.dur-btn.active,
.btn-answer.active,
.btn-answer.selected,
.diff-opt input:checked + span,
.level-card.is-active,
.level-card[aria-pressed="true"] {
  color: var(--suite-pearl) !important;
  border-color: var(--suite-border-strong) !important;
  background: var(--suite-glass-active) !important;
  box-shadow: 0 0 0 1px rgba(255, 252, 245, .08), 0 18px 44px rgba(0, 0, 0, .34) !important;
}

.stat-strip,
.progress-track,
.progress,
.progress-bar-wrap,
.countdown,
.time-track,
.meter,
.timer-track {
  border-color: var(--suite-border) !important;
  background: var(--suite-progress-track) !important;
}

.progress-fill,
.progress__fill,
.progress-bar-fill,
.timer-bar,
.timer-bar.warn,
.timer-bar.danger,
.countdown__fill,
.time-track span,
.meter__fill,
.timer-track__fill {
  background: var(--suite-progress-fill) !important;
  box-shadow: var(--suite-progress-glow) !important;
}

.divider,
hr,
.card__divider,
.result__divider {
  border-color: var(--suite-divider) !important;
  background: var(--suite-divider) !important;
}

@media (max-width: 720px) {
  .suite-header,
  .trainer-header {
    border-radius: 24px !important;
    background: linear-gradient(145deg, rgba(255, 252, 245, .13), rgba(255, 252, 245, .035)) !important;
  }

  .card,
  .glass-panel,
  .setup-panel,
  .reading-card,
  .result__card {
    border-radius: clamp(22px, 7vw, 30px) !important;
  }
}

@media (min-width: 721px) and (orientation: portrait) {
  .suite-header,
  .trainer-header {
    width: min(calc(100% - 48px), 980px) !important;
  }

  .screen,
  .app,
  [data-suite-main] {
    width: min(calc(100% - 48px), 980px) !important;
    margin-inline: auto !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .motion-background__aurora { animation: none !important; }
}
