:root {
  color-scheme: dark;
  --ng-bg: #071116;
  --ng-bg-deep: #03080c;
  --ng-surface: rgba(11, 27, 34, .74);
  --ng-surface-strong: rgba(10, 24, 31, .92);
  --ng-border: rgba(111, 247, 222, .22);
  --ng-border-strong: rgba(111, 247, 222, .48);
  --ng-text: #f5fbfc;
  --ng-muted: #a9bdc4;
  --ng-accent: #62f5d2;
  --ng-accent-ink: #06211f;
  --ng-danger: #ff7b98;
  --ng-success: #7df6b2;
  --ng-focus: #ffd166;
  --ng-radius-sm: 14px;
  --ng-radius: 24px;
  --ng-radius-lg: 34px;
  --ng-shadow: 0 30px 90px rgba(0, 0, 0, .36);
  --ng-max: 1180px;
  --ng-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--ng-bg-deep);
  color: var(--ng-text);
  font-family: var(--ng-font);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}
button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }

.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;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--ng-accent);
  color: var(--ng-accent-ink);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.glass-panel {
  border: 1px solid var(--ng-border);
  border-radius: var(--ng-radius);
  background: linear-gradient(145deg, rgba(20, 44, 52, .82), rgba(6, 18, 24, .68));
  box-shadow: var(--ng-shadow), inset 0 1px rgba(255, 255, 255, .05);
  backdrop-filter: blur(16px);
}
.panel-kicker, .eyebrow {
  margin: 0;
  color: var(--ng-accent);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; gap: 10px; }
.eyebrow > span { width: 7px; height: 7px; border-radius: 50%; background: var(--ng-accent); box-shadow: 0 0 18px var(--ng-accent); }

.button {
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ng-text);
  font-weight: 760;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.button--primary { background: var(--ng-accent); color: var(--ng-accent-ink); box-shadow: 0 14px 40px rgba(98, 245, 210, .2); }
.button--secondary { border-color: var(--ng-border); background: rgba(255, 255, 255, .035); }
.button--quiet { border-color: transparent; background: transparent; color: var(--ng-muted); }
.button--danger { background: var(--ng-danger); color: #26030c; }
.button:disabled { opacity: .38; cursor: not-allowed; box-shadow: none; }
.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--ng-border);
  border-radius: 50%;
  background: rgba(255, 255, 255, .04);
  color: var(--ng-text);
  cursor: pointer;
}
@media (hover: hover) {
  .button:not(:disabled):hover, .icon-button:hover { transform: translateY(-2px); border-color: var(--ng-border-strong); }
  .button--primary:hover { box-shadow: 0 18px 55px rgba(98, 245, 210, .3); }
}
:focus-visible { outline: 3px solid var(--ng-focus); outline-offset: 4px; }

.trainer-header {
  position: relative;
  z-index: 20;
  width: min(calc(100% - 32px), var(--ng-max));
  min-height: 72px;
  margin: max(16px, env(safe-area-inset-top)) auto 0;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--ng-border);
  border-radius: 999px;
  background: rgba(5, 16, 21, .72);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; font-weight: 850; letter-spacing: .05em; text-decoration: none; }
.brand img { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 0 12px rgba(98, 245, 210, .28)); }
.trainer-header__session { display: grid; place-items: center; font-size: .78rem; color: var(--ng-muted); }
.trainer-header__session strong { color: var(--ng-text); }
.trainer-header > .icon-button { justify-self: end; }

.trainer-switcher {
  position: relative;
  z-index: 10;
  width: min(calc(100% - 32px), var(--ng-max));
  margin: 12px auto 0;
  padding: 6px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  border-radius: 999px;
  background: rgba(5, 16, 21, .5);
  border: 1px solid rgba(111, 247, 222, .1);
}
.trainer-switcher::-webkit-scrollbar { display: none; }
.trainer-switcher a { flex: 1 0 auto; min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; color: var(--ng-muted); font-size: .82rem; text-decoration: none; }
.trainer-switcher a[aria-current="page"] { background: rgba(98, 245, 210, .11); color: var(--ng-accent); }

.pause-dialog { max-width: none; width: 100%; height: 100%; border: 0; padding: 20px; background: rgba(2, 8, 11, .72); color: var(--ng-text); backdrop-filter: blur(18px); }
.pause-dialog[open] { display: grid; place-items: center; }
.pause-dialog__panel { width: min(100%, 480px); padding: 32px; border: 1px solid var(--ng-border); border-radius: var(--ng-radius-lg); background: var(--ng-surface-strong); box-shadow: var(--ng-shadow); text-align: center; }
.pause-dialog__panel h2 { margin: 10px 0; font-size: clamp(2rem, 6vw, 3rem); }
.pause-dialog__panel p:not(.panel-kicker) { color: var(--ng-muted); }
.pause-dialog__panel > .button { width: 100%; margin-top: 10px; }
.exit-confirm { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--ng-border); }

.noscript { position: relative; z-index: 30; margin: 20px; padding: 16px; border: 1px solid var(--ng-danger); border-radius: 12px; background: #29101a; }

@media (max-width: 720px) {
  .trainer-header { width: calc(100% - 20px); grid-template-columns: 1fr auto; }
  .trainer-header__session { display: none; }
  .brand span { font-size: .82rem; }
  .trainer-switcher { width: calc(100% - 20px); border-radius: 18px; justify-content: flex-start; }
  .trainer-switcher a { flex: 0 0 auto; }
  .button { min-height: 52px; }
}

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