@layer reset, base, components, themes, responsive;

@font-face {
  font-family: "RussoOne";
  src: url("/assets/RussoOne-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Rubik";
  src: url("/assets/Rubik-Variable.ttf") format("truetype");
  font-weight: 300 900;
  font-display: swap;
}

/* ==========================================================================
   RESET LAYER (element-scoped, no global * reset)
   ========================================================================== */
@layer reset {
  html, body, header, main, footer, section, article, div, p,
  h1, h2, h3, a, button, details, summary, code, img, span, svg {
    box-sizing: border-box;
  }
}

/* ==========================================================================
   BASE LAYER & SEMANTIC DESIGN TOKENS
   ========================================================================== */
@layer base {
  :root {
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --font-display: var(--font-sans);
    --font-mono: "JetBrains Mono", "Cascadia Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --ease-silky: cubic-bezier(.22, 1, .36, 1);
    --t-theme: .72s;
    --t-surface: .60s;

    --bg: #eef5fc;
    --ink: #1d2733;
    --muted: #566574;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-ink: #ffffff;
    --focus-ring: #0071e3;
    --selection-bg: #0071e329;
    --selection-fg: inherit;
    --scroll-thumb: #95abc0;
    --scroll-track: #e6eff7;

    color-scheme: light;
    accent-color: var(--accent);
    scrollbar-color: var(--scroll-thumb) var(--scroll-track);
    scrollbar-width: auto;
    font-family: var(--font-sans);
    color: var(--ink);
    background: var(--bg);
    font-synthesis: none;
  }

  :root:has(> head > meta[name="color-scheme"][content="dark"]) {
    color-scheme: dark;
  }
  :root:has(> head > meta[name="color-scheme"][content="light"]) {
    color-scheme: light;
  }

  html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
    scrollbar-gutter: stable;
    background-color: var(--bg);
  }
  html.theme-ready {
    transition: background-color var(--t-theme) var(--ease-silky);
  }

  body {
    margin: 0;
    padding-top: 78px;
    min-height: 100svh;
    color: var(--ink);
    background: transparent;
  }
  html.theme-ready body {
    transition: color var(--t-surface) var(--ease-silky);
  }

  ::selection {
    background: var(--selection-bg);
    color: var(--selection-fg);
  }

  a {
    color: var(--accent);
    text-decoration: none;
  }

  button, a, summary {
    -webkit-tap-highlight-color: transparent;
  }

  :where(button, a, summary):focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
  }

  [hidden] {
    display: none !important;
  }
}

/* ==========================================================================
   COMPONENTS LAYER (Shared layout & structure across all 5 OS themes)
   ========================================================================== */
@layer components {
  /* Per-OS Backdrop Stack (silky compositor-only opacity cross-dissolve) */
  .os-backdrop {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    overflow: hidden;
  }
  html.theme-ready .os-backdrop {
    transition: opacity .82s var(--ease-silky);
  }

  /* Launcher backdrop */
  .backdrop-launcher {
    background: #1f2119;
  }
  .launcher-banner-strip {
    position: absolute;
    inset: 0 0 auto 0;
    height: 320px;
    background-image: url("/assets/df-banner-intercept.png");
    background-size: 800% 100%;
    background-position: 0% 0;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    opacity: .52;
  }
  @media (prefers-reduced-motion: no-preference) {
    html[data-theme="launcher"]:not([data-banner-paused="true"]) .launcher-banner-strip {
      animation: df-banner-8 1.35s steps(8) infinite;
    }
  }
  @keyframes df-banner-8 {
    from { background-position: 0% 0; }
    to { background-position: 114.285714% 0; }
  }
  .launcher-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgb(18 20 15 / .36) 0%, rgb(31 33 25 / .86) 240px, #1f2119 330px, #1f2119 100%);
  }

  /* Windows 11 Official Bloom Wallpaper — subtly veiled & softly blurred */
  .backdrop-windows {
    background: #eaf2fb;
  }
  .backdrop-windows::before,
  .backdrop-windows::after {
    content: "";
    position: absolute;
    inset: 0;
  }
  .backdrop-windows::before {
    background: url("/assets/win11-bloom.webp") center 54% / cover no-repeat;
    opacity: .34;
    filter: blur(8px) saturate(106%);
    transform: scale(1.05);
  }
  .backdrop-windows::after {
    background:
      radial-gradient(ellipse 74% 58% at 50% 18%, rgb(246 251 255 / .64) 0%, rgb(240 247 255 / .22) 64%, transparent 100%),
      linear-gradient(180deg, rgb(244 249 255 / .46) 0%, rgb(236 245 255 / .24) 50%, rgb(232 243 254 / .44) 100%);
  }

  /* macOS 26 Tahoe Official Light Wallpaper — subtly veiled for Liquid Glass vibrancy */
  .backdrop-macos {
    background: #eff5fc;
  }
  .backdrop-macos::before,
  .backdrop-macos::after {
    content: "";
    position: absolute;
    inset: 0;
  }
  .backdrop-macos::before {
    background: url("/assets/macos-tahoe.webp") center 46% / cover no-repeat;
    opacity: .36;
    filter: blur(9px) saturate(116%);
    transform: scale(1.05);
  }
  .backdrop-macos::after {
    background:
      radial-gradient(ellipse 74% 55% at 50% 16%, rgb(250 252 255 / .62) 0%, rgb(244 249 255 / .20) 65%, transparent 100%),
      linear-gradient(180deg, rgb(247 251 255 / .44) 0%, rgb(242 248 255 / .22) 50%, rgb(238 245 254 / .40) 100%);
  }

  /* Android Material 3 Expressive backdrop (viewport-anchored geometric shapes) */
  .backdrop-android {
    background: linear-gradient(150deg, #f5fbf5 0%, #eff8f0 55%, #e8f5ea 100%);
    overflow: hidden;
  }
  .m3-shape {
    position: absolute;
    pointer-events: none;
    user-select: none;
    opacity: .84;
  }
  .m3-s1 {
    width: clamp(140px, 16vw, 240px);
    height: auto;
    top: 10%;
    left: max(-24px, calc(50% - 585px));
  }
  .m3-s2 {
    width: clamp(136px, 15vw, 224px);
    height: auto;
    top: 14%;
    right: max(-24px, calc(50% - 580px));
  }
  .m3-s3 {
    width: clamp(150px, 17vw, 250px);
    height: auto;
    bottom: 11%;
    left: max(-30px, calc(50% - 595px));
    opacity: .76;
  }
  .m3-s4 {
    width: clamp(132px, 14vw, 210px);
    height: auto;
    bottom: 14%;
    right: max(-20px, calc(50% - 575px));
    opacity: .82;
  }

  /* Linux Terminal / Hacker backdrop */
  .backdrop-linux {
    background:
      radial-gradient(ellipse 68% 48% at 50% -6%, rgb(46 232 122 / .14) 0%, transparent 72%),
      radial-gradient(ellipse 46% 38% at 88% 92%, rgb(58 214 190 / .08) 0%, transparent 70%),
      #090d0b;
  }
  .linux-grid {
    position: absolute;
    inset: 0;
    background-image:
      radial-gradient(rgb(52 245 127 / .16) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: radial-gradient(ellipse 85% 80% at 50% 42%, black 35%, transparent 100%);
    opacity: .68;
  }
  .linux-hud-tl,
  .linux-hud-br {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.55;
    letter-spacing: .06em;
    color: rgb(52 245 127 / .26);
    user-select: none;
  }
  .linux-hud-tl {
    top: 86px;
    left: 24px;
  }
  .linux-hud-br {
    bottom: 20px;
    right: 24px;
    text-align: right;
  }

  /* Header */
  header {
    position: fixed;
    z-index: 20;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 78px;
    max-width: 1056px;
    padding: 0 28px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    isolation: isolate;
    transition:
      top .34s var(--ease-silky),
      width .34s var(--ease-silky),
      max-width .34s var(--ease-silky),
      height .34s var(--ease-silky),
      border-radius var(--t-surface) var(--ease-silky),
      background-color var(--t-surface) var(--ease-silky),
      box-shadow var(--t-surface) var(--ease-silky),
      border-color var(--t-surface) var(--ease-silky);
  }

  .is-scrolled header {
    top: 12px;
    width: calc(100% - 32px);
    max-width: 760px;
    height: 58px;
    border-radius: 22px;
  }

  .brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 650;
    font-size: 18px;
    transition: color var(--t-surface) var(--ease-silky);
  }
  .brand img {
    border-radius: 8px;
    transition: border-radius var(--t-surface) var(--ease-silky), border-color var(--t-surface) var(--ease-silky);
  }
  .brand-prefix {
    display: none;
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    font-size: 15.5px;
    font-weight: 550;
    padding: 8px 15px;
    border-radius: 10px;
    transition:
      background-color .28s var(--ease-silky),
      color .28s var(--ease-silky),
      border-radius var(--t-surface) var(--ease-silky),
      border-color .34s var(--ease-silky),
      box-shadow .34s var(--ease-silky);
  }

  .banner-pause-btn {
    display: none;
    border: 1px solid #686e50;
    background: #24271d;
    color: #c5c4b8;
    font: inherit;
    font-size: 12px;
    min-height: 34px;
    padding: 6px 11px;
    cursor: pointer;
    transition: border-color .15s, color .15s, background-color .15s;
  }
  .banner-pause-btn:hover {
    border-color: #e8b038;
    color: #eeebe2;
  }

  /* Main Container & Hero */
  main {
    max-width: 760px;
    margin: auto;
    padding: 0 28px;
  }

  .intro {
    text-align: center;
    padding: 54px 0 40px;
    transition: padding var(--t-surface) var(--ease-silky);
  }

  .intro-brand-stage {
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    min-height: 112px;
  }
  .intro-default-mark,
  .intro-launcher-mark {
    grid-area: 1 / 1;
    transition: opacity .56s var(--ease-silky), transform .58s var(--ease-silky), visibility .56s;
  }
  .intro-launcher-mark {
    opacity: 0;
    transform: translateY(10px) scale(.97);
    pointer-events: none;
    visibility: hidden;
  }

  .launcher-hero-logo {
    display: block;
    width: 308px;
    max-width: 86vw;
    height: auto;
    margin: 0 auto 6px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
  }
  .launcher-port-tag {
    display: inline-block;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #c5c4b8;
    border: 1px solid #3d4130;
    background: #24271d;
    padding: 3px 10px;
  }

  .hero-icon-wrap {
    position: relative;
    width: 112px;
    height: 112px;
    margin: 0 auto 22px;
    display: grid;
    place-items: center;
    transition: background-color var(--t-surface) var(--ease-silky), border-color var(--t-surface) var(--ease-silky), box-shadow var(--t-surface) var(--ease-silky), border-radius var(--t-surface) var(--ease-silky);
  }
  .m3-cookie-halo {
    position: absolute;
    width: 142px;
    height: 142px;
    inset: 50% auto auto 50%;
    translate: -50% -50%;
    opacity: 0;
    transform: scale(.78) rotate(-14deg);
    pointer-events: none;
    transition: opacity .56s var(--ease-silky), transform .64s cubic-bezier(.22, 1.15, .36, 1);
  }
  .game-icon {
    position: relative;
    z-index: 1;
    width: 104px;
    height: 104px;
    border-radius: 25px;
    display: block;
    transition: width .48s var(--ease-silky), height .48s var(--ease-silky), border-radius var(--t-surface) var(--ease-silky), box-shadow var(--t-surface) var(--ease-silky), transform .46s var(--ease-silky);
  }

  h1 {
    font-family: var(--font-display);
    font-size: 56px;
    line-height: 1.08;
    letter-spacing: -1.8px;
    margin: 0 0 12px;
    font-weight: 700;
    transition: color var(--t-surface) var(--ease-silky), letter-spacing var(--t-surface) var(--ease-silky);
  }
  .linux-prompt,
  .linux-cursor {
    display: none;
  }

  .tagline {
    font-size: 24px;
    line-height: 1.35;
    margin: 0 0 12px;
    letter-spacing: -.35px;
    transition: color var(--t-surface) var(--ease-silky);
  }
  .description {
    color: var(--muted);
    font-size: 17.5px;
    line-height: 1.6;
    margin: 0 0 20px;
    transition: color var(--t-surface) var(--ease-silky);
  }
  .version {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    padding: 7px 15px;
    font-size: 14px;
    font-weight: 550;
    border: 1px solid transparent;
    transition:
      background-color var(--t-surface) var(--ease-silky),
      color var(--t-surface) var(--ease-silky),
      border-color var(--t-surface) var(--ease-silky),
      border-radius var(--t-surface) var(--ease-silky),
      box-shadow var(--t-surface) var(--ease-silky);
  }
  .version-launcher-extra {
    display: none;
  }

  /* Downloads Section */
  .downloads {
    text-align: center;
    padding: 18px 0 26px;
  }
  h2 {
    font-family: var(--font-display);
    font-size: 26px;
    letter-spacing: -.5px;
    line-height: 1.3;
    margin: 0 0 9px;
    transition: color .3s ease;
  }
  .section-note {
    color: var(--muted);
    margin: 0 0 22px;
    font-size: 16px;
    transition: color .3s ease;
  }

  /* Platform Tab Switcher */
  .platforms {
    position: relative;
    isolation: isolate;
    display: flex;
    padding: 5px;
    border-radius: 14px;
    gap: 0;
    margin: 0 auto 20px;
    max-width: 620px;
    border: 1px solid transparent;
    transition:
      background-color var(--t-surface) var(--ease-silky),
      border-color var(--t-surface) var(--ease-silky),
      border-radius var(--t-surface) var(--ease-silky),
      max-width .56s var(--ease-silky),
      box-shadow var(--t-surface) var(--ease-silky);
  }
  .platforms::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 5px;
    bottom: 5px;
    left: 5px;
    width: calc((100% - 10px) / 4);
    border-radius: 10px;
    transform: translateX(calc(var(--selected, 0) * 100%));
    transition:
      transform .46s var(--ease-silky),
      background-color var(--t-surface) var(--ease-silky),
      border-radius var(--t-surface) var(--ease-silky),
      box-shadow var(--t-surface) var(--ease-silky);
  }
  .platforms button {
    position: relative;
    flex: 1;
    min-width: 0;
    min-height: 42px;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 15.5px;
    font-weight: 560;
    padding: 10px 6px;
    border-radius: 10px;
    cursor: pointer;
    transition: color .32s var(--ease-silky), transform .18s ease;
  }
  .platforms button:active:not(:disabled) {
    transform: scale(.97);
  }

  /* Main Download Panel & Smooth Native Chrome Reveal */
  .download-panel {
    position: relative;
    max-width: 620px;
    margin: auto;
    border: 1px solid transparent;
    border-radius: 18px;
    overflow: hidden;
    transition:
      background-color var(--t-surface) var(--ease-silky),
      border-color var(--t-surface) var(--ease-silky),
      border-radius var(--t-surface) var(--ease-silky),
      box-shadow var(--t-surface) var(--ease-silky),
      max-width .56s var(--ease-silky);
  }

  .panel-chrome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 38px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 16px;
    font-size: 12.5px;
    border-bottom: 0 solid transparent;
    user-select: none;
    pointer-events: none;
  }
  html.theme-ready .panel-chrome {
    transition:
      max-height .52s var(--ease-silky),
      opacity .44s var(--ease-silky),
      background-color var(--t-surface) var(--ease-silky),
      border-color .44s var(--ease-silky);
  }
  .chrome-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .panel-stage {
    position: relative;
    min-height: 246px;
  }
  .panel-stage.motion-ready {
    overflow: hidden;
    transition: height .52s var(--ease-silky);
  }
  .panel-stage article {
    padding: 26px 28px 26px;
  }
  .panel-stage.motion-ready article {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }

  /* Windows Sub-Switch (Launcher vs Standalone Installer) */
  .win-subswitch {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 4px;
    margin: 0 auto 20px;
    max-width: 440px;
    border: 1px solid transparent;
    border-radius: 11px;
    transition: background-color .3s ease, border-color .3s ease, border-radius .3s ease;
  }
  .win-subswitch::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc((100% - 8px) / 2);
    border-radius: 8px;
    transform: translateX(calc(var(--win-selected, 0) * 100%));
    transition:
      transform .24s cubic-bezier(.22, .7, .25, 1),
      background-color .3s ease,
      border-radius .3s ease,
      box-shadow .3s ease;
  }
  .win-subswitch button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex-wrap: wrap;
    min-height: 38px;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: color .18s ease;
  }
  .rec-badge {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 5px;
    letter-spacing: .02em;
    transition: background-color .28s ease, color .28s ease, border-radius .28s ease, border-color .28s ease;
  }

  /* Animated Sub-Views (discrete entry/exit, active after initial render) */
  .win-view {
    display: block;
    opacity: 1;
    translate: 0;
  }
  html.theme-ready .win-view {
    transition: display, opacity var(--ease-silky), translate var(--ease-silky);
    transition-duration: .42s;
    transition-behavior: allow-discrete;
  }
  @starting-style {
    html.theme-ready .win-view {
      opacity: 0;
      translate: 0 6px;
    }
  }
  html.theme-ready .win-view:where([hidden], [data-closing]) {
    opacity: 0;
    translate: 0 -5px;
  }
  .win-view[hidden] {
    display: none;
  }
  @media (prefers-reduced-motion: reduce) {
    html.theme-ready .win-view {
      translate: none;
      transition-duration: .1s;
    }
    @starting-style {
      html.theme-ready .win-view { translate: none; }
    }
    html.theme-ready .win-view:where([hidden], [data-closing]) {
      translate: none;
    }
  }

  /* Launcher Preview Card Elements */
  .launcher-shot-wrap {
    margin: 0 auto 18px;
    border: 2px solid #12140f;
    background: #1b1d16;
    overflow: hidden;
    box-shadow: 0 12px 28px rgb(0 0 0 / .45);
  }
  .launcher-shot {
    display: block;
    width: 100%;
    height: auto;
  }
  .launcher-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 16px 0 4px;
    text-align: left;
  }
  .lf-item {
    padding: 9px 11px;
    background: #24271d;
    border: 1px solid #12140f;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .05);
  }
  .lf-item strong {
    display: block;
    font-family: "RussoOne", "Segoe UI", sans-serif;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: .04em;
    color: #e8b038;
    margin-bottom: 3px;
    text-transform: uppercase;
  }
  .lf-item span {
    display: block;
    font-size: 12px;
    line-height: 1.38;
    color: #c5c4b8;
  }

  /* Panel Typography & CTA */
  h3 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 640;
    letter-spacing: -.3px;
    color: var(--ink);
    margin: 0 0 10px;
  }
  html.theme-ready h3 {
    transition: color .3s ease;
  }
  .requirements {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 22px;
    transition: color .3s ease, background-color .3s ease, padding .3s ease;
  }

  .download-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
    padding: 13px 32px;
    background: var(--accent);
    color: var(--accent-ink);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition:
      background-color .18s ease,
      border-radius .28s cubic-bezier(.34, 1.56, .64, 1),
      transform .18s ease,
      box-shadow .2s ease,
      filter .14s ease;
  }
  .download-button:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
  }
  .download-button:active {
    transform: translateY(0);
  }

  .hint {
    font-size: 14px;
    line-height: 1.62;
    color: var(--muted);
    margin: 18px auto 0;
    max-width: 520px;
    transition: color .3s ease;
  }
  .hint.secondary {
    margin-top: 9px;
  }

  .test-label {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-left: 6px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    padding: 4px 9px;
    letter-spacing: 0;
  }

  /* Linux Command Block */
  .linux-intro {
    font-size: 14.5px;
    color: var(--muted);
    line-height: 1.5;
    margin: 0 0 12px;
  }
  .install-command {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    border-radius: 10px;
    padding: 15px 16px;
  }
  .install-command code {
    display: block;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.65;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    user-select: text;
  }
  .copy-command {
    display: inline-flex;
    align-self: flex-end;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    margin: 12px 0 0;
    border-radius: 7px;
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    padding: 8px 14px;
    cursor: pointer;
    transition: background-color .16s ease, color .16s ease, border-color .16s ease;
  }
  .copy-status {
    font-size: 13px;
    line-height: 1.5;
    min-height: 20px;
    margin: 9px 0 0;
  }
  .diagnostic-note {
    font-size: 13.5px;
    line-height: 1.62;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 14px 0 0;
    text-align: left;
  }
  .diagnostic-note strong {
    font-weight: 650;
  }
  .linux-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
    line-height: 1.6;
    margin: 18px 0 0;
  }

  /* Help Section */
  .help {
    padding: 20px 0 48px;
    max-width: 620px;
    margin: auto;
    transition: max-width .56s var(--ease-silky);
  }
  .help h2 {
    font-size: 21px;
    margin-bottom: 16px;
  }
  .help-list {
    display: flex;
    flex-direction: column;
    transition:
      background-color var(--t-surface) var(--ease-silky),
      border-color var(--t-surface) var(--ease-silky),
      border-radius var(--t-surface) var(--ease-silky),
      box-shadow var(--t-surface) var(--ease-silky),
      gap .48s var(--ease-silky),
      padding .48s var(--ease-silky);
  }
  .help details {
    transition:
      background-color var(--t-surface) var(--ease-silky),
      border-color var(--t-surface) var(--ease-silky),
      border-radius var(--t-surface) var(--ease-silky),
      padding .46s var(--ease-silky),
      box-shadow var(--t-surface) var(--ease-silky);
  }
  .help summary {
    position: relative;
    list-style: none;
    padding: 17px 36px 17px 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 540;
    transition: color var(--t-surface) var(--ease-silky);
  }
  .help summary::-webkit-details-marker {
    display: none;
  }
  .help summary::after {
    content: "";
    position: absolute;
    right: 6px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    transform: translateY(-65%) rotate(45deg);
    opacity: .65;
    transition: transform .26s var(--ease-silky), opacity .24s ease, border-color var(--t-surface) var(--ease-silky);
  }
  .help details[open] > summary::after {
    transform: translateY(-25%) rotate(225deg);
    opacity: 1;
  }
  .help details p {
    font-size: 15.5px;
    line-height: 1.65;
    color: var(--muted);
    margin: 0 0 18px;
    transition: color var(--t-surface) var(--ease-silky);
  }

  /* Footer */
  footer {
    max-width: 1000px;
    margin: auto;
    border-top: 1px solid transparent;
    padding: 24px 28px 30px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 14px;
    color: var(--muted);
    transition:
      border-color var(--t-surface) var(--ease-silky),
      color var(--t-surface) var(--ease-silky),
      background-color var(--t-surface) var(--ease-silky),
      border-radius var(--t-surface) var(--ease-silky),
      box-shadow var(--t-surface) var(--ease-silky);
  }
  footer a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: transparent;
    transition: color .18s ease, text-decoration-color .18s ease;
  }
  footer a:hover {
    color: var(--accent);
    text-decoration-color: currentColor;
  }

  .fallback {
    font-size: 14px;
    line-height: 1.6;
  }

  @media (prefers-reduced-motion: no-preference) {
    @keyframes arrive {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .intro, .downloads, .help {
      animation: arrive .4s ease-out both;
    }
    .downloads { animation-delay: .05s; }
    .help { animation-delay: .09s; }
  }
}

/* ==========================================================================
   THEMES LAYER — 5 AUTHENTIC PER-SYSTEM DESIGNS
   ========================================================================== */
@layer themes {

  /* ------------------------------------------------------------------------
     1. DRONEFLAMES LAUNCHER THEME (Windows -> Launcher) — Olive / Brass / 9-Slice
     ------------------------------------------------------------------------ */
  html[data-theme="launcher"] {
    --font-sans: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-display: "RussoOne", "Segoe UI", sans-serif;
    --bg: #1f2119;
    --ink: #eeebe2;
    --muted: #c5c4b8;
    --accent: #e8b038;
    --accent-hover: #f3c155;
    --accent-ink: #12140f;
    --focus-ring: #e8b038;
    --selection-bg: #e8b03845;
    --selection-fg: #ffffff;
    --scroll-thumb: #686e50;
    --scroll-track: #1b1d16;
  }

  html[data-theme="launcher"] .backdrop-launcher {
    opacity: 1;
    visibility: visible;
  }
  html[data-theme="launcher"] .banner-pause-btn {
    display: inline-flex;
    align-items: center;
  }
  html[data-theme="launcher"] :where(button, a, summary):focus-visible {
    outline: 2px solid #e8b038;
    outline-offset: 2px;
  }

  html[data-theme="launcher"] header {
    border-bottom: 1px solid rgb(104 110 80 / .25);
  }
  html[data-theme="launcher"] .is-scrolled header {
    border-radius: 2px;
    background: rgb(45 49 36 / .94);
    box-shadow: 0 10px 28px rgb(0 0 0 / .55), 0 0 0 2px #12140f, inset 0 1px 0 rgb(255 255 255 / .08);
    border-bottom: 0;
  }
  html[data-theme="launcher"] .brand {
    color: #eeebe2;
    font-family: "RussoOne", "Segoe UI", sans-serif;
    font-weight: 400;
    letter-spacing: .03em;
  }
  html[data-theme="launcher"] .brand img {
    border-radius: 2px;
    image-rendering: pixelated;
  }
  html[data-theme="launcher"] .nav {
    color: #e8b038;
    border-radius: 2px;
    border: 1px solid transparent;
  }
  html[data-theme="launcher"] .nav:hover {
    background: #383b2b;
    border-color: #686e50;
  }
  html[data-theme="launcher"] .is-scrolled .nav {
    background: #4c513b;
    color: #eeebe2;
    border: 1px solid #12140f;
  }
  html[data-theme="launcher"] .is-scrolled .nav:hover {
    background: #5b6044;
    color: #e8b038;
  }

  html[data-theme="launcher"] .intro {
    padding: 44px 0 32px;
  }
  html[data-theme="launcher"] .intro-default-mark {
    opacity: 0;
    transform: translateY(-8px) scale(.96);
    pointer-events: none;
    visibility: hidden;
  }
  html[data-theme="launcher"] .intro-launcher-mark {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    visibility: visible;
  }
  html[data-theme="launcher"] .tagline {
    font-family: "RussoOne", "Segoe UI", sans-serif;
    font-weight: 400;
    letter-spacing: .02em;
    color: #eeebe2;
  }
  html[data-theme="launcher"] .version {
    background: #24271d;
    border-color: #9a863e;
    border-radius: 2px;
    color: #e8b038;
    font-family: "RussoOne", "Segoe UI", sans-serif;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: .04em;
  }
  html[data-theme="launcher"] .version-launcher-extra {
    display: inline;
  }

  html[data-theme="launcher"] .downloads h2 {
    font-weight: 400;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #e6d79c;
  }
  html[data-theme="launcher"] .section-note {
    color: #b6b8a7;
  }

  html[data-theme="launcher"] .platforms {
    background: #24271d;
    border: 2px solid #12140f;
    border-radius: 2px;
    max-width: 680px;
  }
  html[data-theme="launcher"] .platforms::before {
    background: #3d422f;
    border-radius: 1px;
    box-shadow: inset 0 0 0 1px #9a863e;
  }
  html[data-theme="launcher"] .platforms button {
    color: #a8aa98;
    border-radius: 1px;
  }
  html[data-theme="launcher"] .platforms button[aria-selected="true"] {
    color: #e8b038;
  }
  html[data-theme="launcher"] .platforms button:hover:not([aria-selected="true"]) {
    color: #eeebe2;
  }

  html[data-theme="launcher"] .download-panel {
    max-width: 680px;
    background: #4c513b;
    border: 2px solid #12140f;
    border-radius: 2px;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .14), inset 0 -1px 0 rgb(0 0 0 / .28), 0 18px 40px rgb(0 0 0 / .45);
  }
  html[data-theme="launcher"] .download-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 6px;
    opacity: .42;
    pointer-events: none;
    z-index: 2;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='6' viewBox='0 0 16 6'%3E%3Cpath d='M0 1h12v3H4V2h6v1H5v0h6V2H1v3h15' fill='none' stroke='%2325281c' stroke-width='1'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
  }

  html[data-theme="launcher"] .win-subswitch {
    background: #24271d;
    border-color: #12140f;
    border-radius: 2px;
  }
  html[data-theme="launcher"] .win-subswitch::before {
    background: #3a3f2d;
    border-radius: 1px;
    box-shadow: inset 0 0 0 1px #e8b038;
  }
  html[data-theme="launcher"] .win-subswitch button {
    color: #b6b8a7;
    border-radius: 1px;
  }
  html[data-theme="launcher"] .win-subswitch button[aria-pressed="true"] {
    color: #e8b038;
  }
  html[data-theme="launcher"] .win-subswitch button:hover:not([aria-pressed="true"]) {
    color: #eeebe2;
  }
  html[data-theme="launcher"] .rec-badge {
    background: #342a10;
    color: #e8b038;
    border: 1px solid #9a863e;
    border-radius: 2px;
  }

  html[data-theme="launcher"] .download-panel h3 {
    font-weight: 400;
    letter-spacing: .04em;
    color: #eeebe2;
    text-shadow: 0 1px 0 #141610;
  }
  html[data-theme="launcher"] .download-panel .requirements,
  html[data-theme="launcher"] .download-panel .hint {
    color: #d5d6c7;
  }

  html[data-theme="launcher"] .launcher-cta {
    background: transparent;
    border: 0;
    border-radius: 0;
    border-style: solid;
    border-width: 12px 15px 15px 15px;
    border-image: url("/assets/df-btn-green.png") 16 18 20 18 fill stretch;
    image-rendering: pixelated;
    padding: 4px 20px 6px;
    min-height: 54px;
    font-family: "RussoOne", "Segoe UI", sans-serif;
    font-weight: 400;
    font-size: 15.5px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #f5f9ec;
    text-shadow: 0 1px 0 #16300e;
    box-shadow: none;
  }
  html[data-theme="launcher"] .launcher-cta:hover {
    background: transparent;
    box-shadow: none;
    filter: brightness(1.07);
    transform: translateY(-1px);
  }
  html[data-theme="launcher"] .launcher-cta:active {
    border-image: url("/assets/df-btn-green-p.png") 16 18 20 18 fill stretch;
    transform: translateY(1px);
  }

  html[data-theme="launcher"] .help {
    max-width: 680px;
  }
  html[data-theme="launcher"] .help h2 {
    font-weight: 400;
    letter-spacing: .04em;
    color: #e6d79c;
    text-transform: uppercase;
    font-size: 18px;
  }
  html[data-theme="launcher"] .help details {
    border-bottom: 1px solid #383b2b;
  }
  html[data-theme="launcher"] .help summary {
    color: #eeebe2;
  }
  html[data-theme="launcher"] .help details p {
    color: #b9bba8;
  }
  html[data-theme="launcher"] footer {
    border-top-color: #383b2b;
    color: #939584;
  }


  /* ------------------------------------------------------------------------
     2. WINDOWS 11 FLUENT 2 THEME (Windows -> Installer) — Mica + Bloom
     ------------------------------------------------------------------------ */
  html[data-theme="windows"] {
    --font-sans: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
    --font-display: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
    --bg: #e2effd;
    --ink: #122031;
    --muted: #46586e;
    --accent: #0067c0;
    --accent-hover: #1975c5;
    --accent-ink: #ffffff;
    --focus-ring: #005fb8;
    --selection-bg: #0067c029;
    --scroll-thumb: #7da5d4;
    --scroll-track: #dbeaf9;
  }

  html[data-theme="windows"] .backdrop-windows {
    opacity: 1;
    visibility: visible;
  }

  html[data-theme="windows"] header {
    border-bottom: 1px solid transparent;
  }
  html[data-theme="windows"] .is-scrolled header {
    border-radius: 8px;
    background: rgb(249 252 255 / .78);
    backdrop-filter: blur(28px) saturate(145%);
    -webkit-backdrop-filter: blur(28px) saturate(145%);
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / .94),
      0 2px 6px rgb(0 32 76 / .06),
      0 10px 28px rgb(0 45 105 / .10),
      0 0 0 1px rgb(0 42 95 / .09);
  }
  html[data-theme="windows"] .brand {
    color: #112236;
    font-weight: 600;
  }
  html[data-theme="windows"] .brand img {
    border-radius: 6px;
  }
  html[data-theme="windows"] .nav {
    color: #005fb8;
    border-radius: 6px;
    border: 1px solid transparent;
  }
  html[data-theme="windows"] .nav:hover {
    background: rgb(255 255 255 / .68);
    border-color: rgb(0 45 98 / .09);
  }
  html[data-theme="windows"] .is-scrolled .nav {
    background: #0067c0;
    color: #ffffff;
    border-color: rgb(0 0 0 / .08);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), inset 0 -1px 0 rgb(0 0 0 / .22);
  }
  html[data-theme="windows"] .is-scrolled .nav:hover {
    background: #1975c5;
  }

  html[data-theme="windows"] .game-icon {
    border-radius: 18px;
    box-shadow: 0 10px 24px rgb(0 42 98 / .18), 0 2px 6px rgb(0 30 70 / .10);
  }
  html[data-theme="windows"] h1 {
    font-weight: 650;
    letter-spacing: -1.3px;
    color: #0d1e33;
  }
  html[data-theme="windows"] .tagline {
    color: #15283d;
    font-weight: 500;
  }
  html[data-theme="windows"] .section-note {
    color: #2f455e;
  }
  html[data-theme="windows"] .version {
    background: rgb(255 255 255 / .74);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    color: #0055a5;
    border-color: rgb(0 80 165 / .14);
    border-radius: 6px;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .9), 0 2px 8px rgb(0 42 95 / .06);
  }

  html[data-theme="windows"] .platforms {
    background: rgb(246 250 255 / .66);
    backdrop-filter: blur(24px) saturate(145%);
    -webkit-backdrop-filter: blur(24px) saturate(145%);
    border-color: rgb(0 42 96 / .10);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .85), 0 4px 16px rgb(0 42 96 / .07);
  }
  html[data-theme="windows"] .platforms::before {
    background: rgb(255 255 255 / .92);
    border-radius: 5px;
    box-shadow: 0 1px 4px rgb(0 32 76 / .10), 0 0 0 1px rgb(0 42 96 / .07);
  }
  html[data-theme="windows"] .platforms button {
    color: #3f5268;
    border-radius: 5px;
  }
  html[data-theme="windows"] .platforms button[aria-selected="true"] {
    color: #005fb8;
  }
  html[data-theme="windows"] .platforms button[aria-selected="true"]::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 4px;
    transform: translateX(-50%);
    width: 24px;
    border-block-end: 3px solid #0067c0;
    border-radius: 99px;
  }
  html[data-theme="windows"] .platforms button:hover:not([aria-selected="true"]) {
    color: #0f243d;
  }

  /* Windows 11 Mica Application Window Panel */
  html[data-theme="windows"] .download-panel {
    background: rgb(255 255 255 / .74);
    backdrop-filter: blur(34px) saturate(150%);
    -webkit-backdrop-filter: blur(34px) saturate(150%);
    border-color: rgb(0 40 94 / .11);
    border-radius: 10px;
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / .95),
      0 2px 6px rgb(0 30 72 / .05),
      0 18px 42px rgb(0 45 108 / .12);
  }
  html[data-theme="windows"] .chrome-win {
    max-height: 38px;
    opacity: 1;
    background: rgb(243 248 254 / .72);
    border-bottom: 1px solid rgb(0 42 96 / .08);
    color: #36495f;
    font-weight: 500;
  }
  html[data-theme="windows"] .chrome-win img {
    border-radius: 3px;
  }
  html[data-theme="windows"] .win-controls {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    color: #46586e;
  }

  html[data-theme="windows"] .win-subswitch {
    background: rgb(235 243 252 / .78);
    border-color: rgb(0 45 100 / .09);
    border-radius: 7px;
  }
  html[data-theme="windows"] .win-subswitch::before {
    background: #ffffff;
    border-radius: 5px;
    box-shadow: 0 1px 4px rgb(0 34 80 / .10), 0 0 0 1px rgb(0 45 100 / .06);
  }
  html[data-theme="windows"] .win-subswitch button {
    color: #475a70;
    border-radius: 5px;
  }
  html[data-theme="windows"] .win-subswitch button[aria-pressed="true"] {
    color: #005fb8;
  }
  html[data-theme="windows"] .win-subswitch button[aria-pressed="true"]::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 2px;
    transform: translateX(-50%);
    width: 22px;
    border-block-end: 2.5px solid #0067c0;
    border-radius: 99px;
  }
  html[data-theme="windows"] .rec-badge {
    background: #e2f0fd;
    color: #0057a8;
    border-radius: 4px;
  }

  /* Fluent Accent Button */
  html[data-theme="windows"] .download-button {
    border-radius: 6px;
    background: #0067c0;
    border: 1px solid rgb(0 65 130 / .24);
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / .24),
      inset 0 -1px 0 rgb(0 0 0 / .24),
      0 2px 6px rgb(0 72 150 / .16);
  }
  html[data-theme="windows"] .download-button:hover {
    background: #1975c5;
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / .28),
      inset 0 -1px 0 rgb(0 0 0 / .22),
      0 5px 14px rgb(0 82 170 / .22);
  }
  html[data-theme="windows"] .download-button:active {
    background: #0054a3;
    color: rgb(255 255 255 / .86);
    box-shadow: inset 0 1px 2px rgb(0 0 0 / .18);
  }

  /* Windows 11 Settings Expander Cards */
  html[data-theme="windows"] .help-list {
    gap: 6px;
  }
  html[data-theme="windows"] .help details {
    background: rgb(255 255 255 / .72);
    backdrop-filter: blur(26px) saturate(140%);
    -webkit-backdrop-filter: blur(26px) saturate(140%);
    border: 1px solid rgb(0 40 94 / .09);
    border-radius: 7px;
    padding: 0 20px;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .9), 0 2px 8px rgb(0 38 92 / .05);
  }
  html[data-theme="windows"] .help summary {
    color: #12243a;
  }
  html[data-theme="windows"] footer {
    background: rgb(249 252 255 / .78);
    backdrop-filter: blur(28px) saturate(150%);
    -webkit-backdrop-filter: blur(28px) saturate(150%);
    border: 1px solid rgb(0 40 94 / .10);
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .92);
    color: #20344c;
  }


  /* ------------------------------------------------------------------------
     3. MACOS LIQUID GLASS THEME (macOS) — Apple Vibrancy, Heavy Blur & Specular Frost
     ------------------------------------------------------------------------ */
  html[data-theme="macos"] {
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
    --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
    --bg: #edf4fc;
    --ink: #1d1d1f;
    --muted: #515964;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-ink: #ffffff;
    --focus-ring: #0071e3;
    --selection-bg: #007aff26;
    --scroll-thumb: #9ab0c7;
    --scroll-track: #e8f0f9;
  }

  html[data-theme="macos"] .backdrop-macos {
    opacity: 1;
    visibility: visible;
  }

  html[data-theme="macos"] .is-scrolled header {
    border-radius: 999px;
    background: rgb(255 255 255 / .52);
    backdrop-filter: blur(36px) saturate(215%);
    -webkit-backdrop-filter: blur(36px) saturate(215%);
    box-shadow:
      inset 0 1.5px 0.5px rgb(255 255 255 / .96),
      inset 0 -1px 0.5px rgb(16 42 78 / .06),
      0 0 0 1px rgb(255 255 255 / .72),
      0 12px 36px rgb(18 48 88 / .11),
      0 2px 6px rgb(18 48 88 / .05);
  }
  html[data-theme="macos"] .brand {
    color: #1d1d1f;
    letter-spacing: -.015em;
  }
  html[data-theme="macos"] .brand img {
    border-radius: 9px;
    corner-shape: squircle;
  }
  html[data-theme="macos"] .nav {
    color: #0071e3;
    border-radius: 999px;
    padding: 8px 17px;
  }
  html[data-theme="macos"] .nav:hover {
    background: rgb(255 255 255 / .58);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .88), 0 0 0 1px rgb(255 255 255 / .6);
  }
  html[data-theme="macos"] .is-scrolled .nav {
    background: linear-gradient(180deg, #1b93ff 0%, #0071e3 100%);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .36), 0 2px 8px rgb(0 113 227 / .28);
  }
  html[data-theme="macos"] .is-scrolled .nav:hover {
    filter: brightness(1.05);
  }

  html[data-theme="macos"] .game-icon {
    border-radius: 26px;
    corner-shape: squircle;
    box-shadow:
      0 16px 34px rgb(18 48 86 / .18),
      0 3px 8px rgb(18 48 86 / .10),
      0 0 0 0.5px rgb(255 255 255 / .75);
  }
  html[data-theme="macos"] h1 {
    font-weight: 700;
    letter-spacing: -2.2px;
    color: #1d1d1f;
  }
  html[data-theme="macos"] .tagline {
    color: #1d1d1f;
    letter-spacing: -.5px;
  }
  html[data-theme="macos"] .version {
    background: rgb(255 255 255 / .54);
    backdrop-filter: blur(26px) saturate(200%);
    -webkit-backdrop-filter: blur(26px) saturate(200%);
    color: #0066cc;
    border-color: rgb(255 255 255 / .82);
    border-radius: 999px;
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / .95),
      0 4px 14px rgb(18 50 92 / .07);
  }

  /* Apple Liquid Glass Capsule Segmented Control */
  html[data-theme="macos"] .platforms {
    background: rgb(255 255 255 / .44);
    backdrop-filter: blur(32px) saturate(210%);
    -webkit-backdrop-filter: blur(32px) saturate(210%);
    border-color: rgb(255 255 255 / .78);
    border-radius: 999px;
    box-shadow:
      inset 0 1px 1px rgb(255 255 255 / .92),
      inset 0 -1px 1px rgb(18 48 86 / .05),
      0 10px 28px rgb(18 48 86 / .08);
  }
  html[data-theme="macos"] .platforms::before {
    background: rgb(255 255 255 / .88);
    border-radius: 999px;
    box-shadow:
      inset 0 1.5px 0 rgb(255 255 255 / 1),
      0 3px 10px rgb(18 48 86 / .12),
      0 0 0 0.5px rgb(18 48 86 / .06);
  }
  html[data-theme="macos"] .platforms button {
    color: #465363;
    border-radius: 999px;
  }
  html[data-theme="macos"] .platforms button[aria-selected="true"] {
    color: #0066cc;
  }
  html[data-theme="macos"] .platforms button:hover:not([aria-selected="true"]) {
    color: #1d1d1f;
  }

  /* Apple Liquid Glass Sheet Panel */
  html[data-theme="macos"] .download-panel {
    background:
      linear-gradient(145deg, rgb(255 255 255 / .64) 0%, rgb(255 255 255 / .40) 48%, rgb(255 255 255 / .54) 100%);
    backdrop-filter: blur(44px) saturate(230%);
    -webkit-backdrop-filter: blur(44px) saturate(230%);
    border-color: rgb(255 255 255 / .86);
    border-radius: 26px;
    corner-shape: squircle;
    box-shadow:
      inset 0 1.5px 1px rgb(255 255 255 / .98),
      inset 1px 0 0.5px rgb(255 255 255 / .65),
      inset 0 -1.5px 1px rgb(18 48 86 / .07),
      0 24px 58px rgb(18 48 88 / .13),
      0 3px 10px rgb(18 48 88 / .05);
  }
  html[data-theme="macos"] .chrome-mac {
    max-height: 38px;
    opacity: 1;
    background: rgb(255 255 255 / .34);
    border-bottom: 1px solid rgb(18 48 86 / .07);
    color: #4b5563;
    font-weight: 500;
  }
  html[data-theme="macos"] .mac-dots {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 54px;
  }
  html[data-theme="macos"] .mac-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 0.5px rgb(0 0 0 / .16);
  }
  html[data-theme="macos"] .mac-dots span:nth-child(1) { background: #ff5f57; }
  html[data-theme="macos"] .mac-dots span:nth-child(2) { background: #febc2e; }
  html[data-theme="macos"] .mac-dots span:nth-child(3) { background: #28c840; }
  html[data-theme="macos"] .mac-spacer {
    width: 54px;
  }

  html[data-theme="macos"] .download-button {
    border-radius: 999px;
    padding: 13px 34px;
    background: linear-gradient(180deg, #1b93ff 0%, #0071e3 100%);
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / .42),
      0 6px 20px rgb(0 113 227 / .28),
      0 1px 3px rgb(0 70 150 / .18);
  }
  html[data-theme="macos"] .download-button:hover {
    background: linear-gradient(180deg, #2b9cff 0%, #0077ed 100%);
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / .48),
      0 10px 26px rgb(0 113 227 / .34),
      0 2px 5px rgb(0 70 150 / .20);
  }

  /* macOS System Settings Grouped Liquid Glass Inset Card */
  html[data-theme="macos"] .help-list {
    background: rgb(255 255 255 / .52);
    backdrop-filter: blur(34px) saturate(210%);
    -webkit-backdrop-filter: blur(34px) saturate(210%);
    border: 1px solid rgb(255 255 255 / .80);
    border-radius: 20px;
    corner-shape: squircle;
    padding: 4px 22px;
    box-shadow:
      inset 0 1.5px 1px rgb(255 255 255 / .95),
      0 14px 36px rgb(18 48 88 / .09);
  }
  html[data-theme="macos"] .help details:not(:last-child) {
    border-bottom: 1px solid rgb(18 48 86 / .08);
  }
  html[data-theme="macos"] .help summary {
    color: #1d1d1f;
  }
  html[data-theme="macos"] footer {
    border-top-color: rgb(18 48 86 / .10);
    color: #566373;
  }


  /* ------------------------------------------------------------------------
     4. ANDROID MATERIAL 3 EXPRESSIVE THEME (Android) — Material You + Shapes
     ------------------------------------------------------------------------ */
  html[data-theme="android"] {
    --font-sans: "Rubik", "Roboto", system-ui, sans-serif;
    --font-display: "Rubik", "Roboto", system-ui, sans-serif;
    --bg: #f4fbf4;
    --ink: #122117;
    --muted: #3d4f42;
    --accent: #136b30;
    --accent-hover: #0e5826;
    --accent-ink: #ffffff;
    --focus-ring: #136b30;
    --selection-bg: #a8f2b6;
    --selection-fg: #04210d;
    --scroll-thumb: #6da37b;
    --scroll-track: #e1f0e3;
  }

  html[data-theme="android"] .backdrop-android {
    opacity: 1;
    visibility: visible;
  }

  /* M3 Expressive Floating Toolbar Pill Header */
  html[data-theme="android"] .is-scrolled header {
    border-radius: 999px;
    background: #dff0e2;
    box-shadow: 0 4px 18px rgb(12 52 24 / .10), 0 0 0 1px #c3dec8;
  }
  html[data-theme="android"] .brand {
    color: #0d2415;
    font-weight: 700;
  }
  html[data-theme="android"] .brand img {
    border-radius: 50%;
  }
  html[data-theme="android"] .nav {
    color: #0e5927;
    border-radius: 999px;
    padding: 8px 18px;
    font-weight: 600;
  }
  html[data-theme="android"] .nav:hover {
    background: #d3ead7;
  }
  html[data-theme="android"] .is-scrolled .nav {
    background: #136b30;
    color: #ffffff;
  }
  html[data-theme="android"] .is-scrolled .nav:hover {
    background: #0e5826;
  }

  /* Expressive 12-Scallop Cookie Shape Framing the Hero Icon */
  html[data-theme="android"] .m3-cookie-halo {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  @media (prefers-reduced-motion: no-preference) {
    html[data-theme="android"] .hero-icon-wrap:hover .m3-cookie-halo {
      transform: scale(1.07) rotate(18deg);
    }
    html[data-theme="android"] .hero-icon-wrap:hover .game-icon {
      transform: scale(.96);
    }
  }
  html[data-theme="android"] .game-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgb(14 68 32 / .18);
  }

  html[data-theme="android"] h1 {
    font-weight: 800;
    letter-spacing: -1.4px;
    color: #0c2314;
  }
  html[data-theme="android"] .tagline {
    color: #16301f;
    font-weight: 560;
  }
  html[data-theme="android"] .version {
    background: #b7efbf;
    color: #052610;
    border-color: #93dc9f;
    border-radius: 999px;
    padding: 7px 17px;
    font-weight: 650;
  }

  html[data-theme="android"] .downloads h2 {
    font-weight: 760;
    letter-spacing: -.4px;
    color: #0d2616;
  }

  /* M3 Expressive Connected Pill Button Group */
  html[data-theme="android"] .platforms {
    background: #dbece0;
    border-color: #c5decb;
    border-radius: 999px;
    padding: 5px;
  }
  html[data-theme="android"] .platforms::before {
    background: #136b30;
    border-radius: 999px;
    box-shadow: 0 3px 10px rgb(19 107 48 / .24);
    transition:
      transform .34s cubic-bezier(.34, 1.38, .64, 1),
      background-color .3s ease,
      border-radius .3s ease;
  }
  html[data-theme="android"] .platforms button {
    color: #274430;
    border-radius: 999px;
    font-weight: 600;
  }
  html[data-theme="android"] .platforms button[aria-selected="true"] {
    color: #ffffff;
  }
  html[data-theme="android"] .platforms button:hover:not([aria-selected="true"]) {
    color: #0a2613;
  }

  /* M3 Expressive Tonal Surface Card */
  html[data-theme="android"] .download-panel {
    background: #e4f2e6;
    border-color: #c8e0cc;
    border-radius: 32px;
    box-shadow: 0 8px 26px rgb(14 58 28 / .07);
  }
  html[data-theme="android"] .download-panel h3 {
    font-weight: 740;
    color: #0c2414;
  }
  html[data-theme="android"] .test-label {
    background: #fce186;
    color: #3d2c00;
    border-radius: 999px;
    padding: 4px 12px;
    font-weight: 650;
  }
  html[data-theme="android"] .requirements {
    display: inline-block;
    background: #d3e9d7;
    color: #173420;
    border-radius: 16px;
    padding: 7px 15px;
    font-weight: 500;
    margin-bottom: 22px;
  }

  /* M3 Expressive Shape-Morphing Pill Button (pill -> rounded squircle on press!) */
  html[data-theme="android"] .download-button {
    min-height: 56px;
    padding: 15px 38px;
    border-radius: 999px;
    background: #136b30;
    color: #ffffff;
    font-weight: 650;
    letter-spacing: .01em;
    box-shadow: 0 4px 14px rgb(19 107 48 / .24);
  }
  html[data-theme="android"] .download-button:hover {
    background: #0e5a28;
    border-radius: 26px;
    box-shadow: 0 8px 20px rgb(19 107 48 / .30);
    transform: translateY(-1px);
  }
  html[data-theme="android"] .download-button:active {
    border-radius: 15px;
    transform: scale(.97);
  }
  html[data-theme="android"] .hint {
    color: #324738;
  }

  /* M3 Expressive Segmented Card List for FAQ */
  html[data-theme="android"] .help h2 {
    font-weight: 740;
    color: #0d2616;
  }
  html[data-theme="android"] .help-list {
    gap: 4px;
  }
  html[data-theme="android"] .help details {
    background: #e4f2e6;
    border: 1px solid #cce2cf;
    padding: 2px 22px;
  }
  html[data-theme="android"] .help details:first-child {
    border-radius: 26px 26px 6px 6px;
  }
  html[data-theme="android"] .help details:last-child {
    border-radius: 6px 6px 26px 26px;
  }
  html[data-theme="android"] .help details[open] {
    background: #dbece0;
    border-radius: 22px;
  }
  html[data-theme="android"] .help summary {
    color: #0f2918;
    font-weight: 600;
  }
  html[data-theme="android"] footer {
    border-top-color: #c7decb;
    color: #3d5443;
  }


  /* ------------------------------------------------------------------------
     5. LINUX HACKER TERMINAL / TILING WM THEME (Linux) — Arch / Kitty / tmux
     ------------------------------------------------------------------------ */
  html[data-theme="linux"] {
    --font-sans: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-display: var(--font-mono);
    --bg: #090d0b;
    --ink: #dceae1;
    --muted: #86a392;
    --accent: #34f57f;
    --accent-hover: #5dff9c;
    --accent-ink: #050a07;
    --focus-ring: #34f57f;
    --selection-bg: #34f57f38;
    --selection-fg: #effff5;
    --scroll-thumb: #2b543c;
    --scroll-track: #0b110e;
  }

  html[data-theme="linux"] .backdrop-linux {
    opacity: 1;
    visibility: visible;
  }
  html[data-theme="linux"] :where(button, a, summary):focus-visible {
    outline: 2px solid #34f57f;
    outline-offset: 2px;
  }

  /* Waybar / tmux Status Header */
  html[data-theme="linux"] header {
    border-bottom: 1px solid rgb(52 245 127 / .12);
  }
  html[data-theme="linux"] .is-scrolled header {
    border-radius: 3px;
    background: rgb(11 17 14 / .94);
    border: 1px solid #223b2d;
    box-shadow: 0 12px 32px rgb(0 0 0 / .62), 0 0 0 1px rgb(52 245 127 / .08);
  }
  html[data-theme="linux"] .brand {
    color: #dceae1;
    font-family: var(--font-mono);
    font-weight: 650;
    font-size: 16.5px;
    letter-spacing: -.02em;
  }
  html[data-theme="linux"] .brand img {
    border-radius: 3px;
    border: 1px solid #244030;
  }
  html[data-theme="linux"] .brand-prefix {
    display: inline;
    color: #34f57f;
    margin-right: -8px;
  }
  html[data-theme="linux"] .nav {
    font-family: var(--font-mono);
    font-size: 13.5px;
    color: #34f57f;
    border-radius: 2px;
    border: 1px solid #23402f;
    background: #0d1611;
    padding: 7px 13px;
  }
  html[data-theme="linux"] .nav:hover,
  html[data-theme="linux"] .is-scrolled .nav {
    background: #34f57f;
    color: #050a07;
    border-color: #34f57f;
    font-weight: 700;
  }
  html[data-theme="linux"] .is-scrolled .nav:hover {
    background: #5dff9c;
  }

  /* Terminal Hero */
  html[data-theme="linux"] .hero-icon-wrap {
    border: 1px solid #243f2f;
    border-radius: 4px;
    background: #0d1410;
    box-shadow: 0 0 28px rgb(52 245 127 / .09);
  }
  html[data-theme="linux"] .hero-icon-wrap::before,
  html[data-theme="linux"] .hero-icon-wrap::after {
    content: "";
    position: absolute;
    inset: -5px;
    pointer-events: none;
  }
  html[data-theme="linux"] .hero-icon-wrap::before {
    background:
      linear-gradient(#34f57f, #34f57f) 0 0 / 10px 2px no-repeat,
      linear-gradient(#34f57f, #34f57f) 0 0 / 2px 10px no-repeat,
      linear-gradient(#34f57f, #34f57f) 100% 0 / 10px 2px no-repeat,
      linear-gradient(#34f57f, #34f57f) 100% 0 / 2px 10px no-repeat;
  }
  html[data-theme="linux"] .hero-icon-wrap::after {
    background:
      linear-gradient(#34f57f, #34f57f) 0 100% / 10px 2px no-repeat,
      linear-gradient(#34f57f, #34f57f) 0 100% / 2px 10px no-repeat,
      linear-gradient(#34f57f, #34f57f) 100% 100% / 10px 2px no-repeat,
      linear-gradient(#34f57f, #34f57f) 100% 100% / 2px 10px no-repeat;
  }
  html[data-theme="linux"] .game-icon {
    width: 92px;
    height: 92px;
    border-radius: 3px;
  }
  html[data-theme="linux"] h1 {
    font-size: 46px;
    letter-spacing: -1px;
    font-weight: 700;
    color: #e6f5ec;
  }
  html[data-theme="linux"] .linux-prompt {
    display: inline;
    color: #34f57f;
    font-weight: 700;
  }
  html[data-theme="linux"] .linux-cursor {
    display: inline-block;
    width: 14px;
    height: .78em;
    margin-left: 6px;
    vertical-align: -0.06em;
    background: #34f57f;
    box-shadow: 0 0 12px rgb(52 245 127 / .55);
  }
  html[data-theme="linux"] .tagline {
    font-family: var(--font-mono);
    font-size: 19px;
    color: #b4d1bf;
    letter-spacing: -.01em;
  }
  html[data-theme="linux"] .version {
    font-family: var(--font-mono);
    font-size: 13px;
    background: #0d1511;
    border-color: #234231;
    border-radius: 2px;
    color: #34f57f;
    letter-spacing: .04em;
  }
  html[data-theme="linux"] .version::before {
    content: "[";
    opacity: .65;
  }
  html[data-theme="linux"] .version::after {
    content: "]";
    opacity: .65;
  }

  html[data-theme="linux"] .downloads h2 {
    font-size: 22px;
    letter-spacing: .01em;
    color: #e6f5ec;
  }

  /* tmux Tab Bar */
  html[data-theme="linux"] .platforms {
    background: #0c120f;
    border: 1px solid #1e3327;
    border-radius: 3px;
    font-family: var(--font-mono);
  }
  html[data-theme="linux"] .platforms::before {
    background: #14281c;
    border-radius: 2px;
    box-shadow: inset 0 0 0 1px #34f57f;
  }
  html[data-theme="linux"] .platforms button {
    font-size: 14px;
    color: #7d9a89;
    border-radius: 2px;
  }
  html[data-theme="linux"] .platforms button[aria-selected="true"] {
    color: #34f57f;
  }
  html[data-theme="linux"] .platforms button:hover:not([aria-selected="true"]) {
    color: #dceae1;
  }

  /* Tiling WM Terminal Window */
  html[data-theme="linux"] .download-panel {
    background: #0e1511;
    border: 1px solid #243e2f;
    border-radius: 3px;
    box-shadow: 0 22px 54px rgb(0 0 0 / .62), 0 0 0 1px rgb(52 245 127 / .07);
  }
  html[data-theme="linux"] .chrome-linux {
    max-height: 38px;
    opacity: 1;
    background: #121c16;
    border-bottom: 1px solid #1f3629;
    font-family: var(--font-mono);
    font-size: 12px;
    color: #9ec0ac;
  }
  html[data-theme="linux"] .tty-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34f57f;
    box-shadow: 0 0 8px rgb(52 245 127 / .7);
  }
  html[data-theme="linux"] .linux-meta {
    color: #6d8e7a;
    font-size: 11.5px;
  }

  html[data-theme="linux"] .download-panel h3 {
    font-size: 19px;
    color: #e6f5ec;
  }
  html[data-theme="linux"] .test-label {
    font-family: var(--font-mono);
    background: #1f190c;
    color: #f2b84b;
    border: 1px solid #59431b;
    border-radius: 2px;
    font-size: 11px;
    text-transform: uppercase;
  }
  html[data-theme="linux"] .requirements {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: #7ea18c;
  }
  html[data-theme="linux"] .linux-intro {
    font-family: var(--font-mono);
    font-size: 13px;
    color: #9ec0ac;
    text-align: left;
  }

  /* Authentic Terminal Command Box */
  html[data-theme="linux"] .install-command {
    background: #050806;
    border: 1px solid #223b2c;
    border-inline-start: 3px solid #34f57f;
    border-radius: 2px;
    padding: 15px 16px;
  }
  html[data-theme="linux"] .install-command code {
    color: #d6f5e3;
    font-size: 13px;
  }
  html[data-theme="linux"] .install-command code::before {
    content: "$ ";
    color: #34f57f;
    user-select: none;
  }
  html[data-theme="linux"] .copy-command {
    font-family: var(--font-mono);
    font-size: 12.5px;
    letter-spacing: .03em;
    background: #0d1912;
    color: #34f57f;
    border: 1px solid #34f57f;
    border-radius: 2px;
    padding: 7px 14px;
  }
  html[data-theme="linux"] .copy-command:hover {
    background: #34f57f;
    color: #050a07;
  }
  html[data-theme="linux"] .copy-status {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: #5ce1cc;
    text-align: left;
  }

  html[data-theme="linux"] .diagnostic-note {
    background: #16120b;
    border: 1px solid #4a3818;
    border-inline-start: 3px solid #f2b84b;
    border-radius: 2px;
    color: #dfd2b8;
  }
  html[data-theme="linux"] .diagnostic-note strong {
    color: #f5c15c;
    font-family: var(--font-mono);
    font-size: 12.5px;
  }
  html[data-theme="linux"] .hint {
    color: #8ba897;
  }
  html[data-theme="linux"] .linux-links {
    font-family: var(--font-mono);
    font-size: 12.5px;
  }
  html[data-theme="linux"] .linux-links a {
    color: #5ce1cc;
  }
  html[data-theme="linux"] .linux-links a:hover {
    color: #34f57f;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  html[data-theme="linux"] .linux-links span {
    color: #395545;
  }

  /* CLI Accordion Help */
  html[data-theme="linux"] .help h2 {
    font-size: 18px;
    color: #e6f5ec;
  }
  html[data-theme="linux"] .help-list {
    gap: 8px;
  }
  html[data-theme="linux"] .help details {
    background: #0d1410;
    border: 1px solid #1e3327;
    border-radius: 2px;
    padding: 0 18px;
  }
  html[data-theme="linux"] .help details[open] {
    border-color: #2f5940;
  }
  html[data-theme="linux"] .help summary {
    font-family: var(--font-mono);
    font-size: 14.5px;
    color: #dceae1;
  }
  html[data-theme="linux"] .help summary::after {
    border-color: #34f57f;
  }
  html[data-theme="linux"] .help details p {
    color: #93b09f;
    font-size: 14.5px;
  }
  html[data-theme="linux"] footer {
    border-top-color: #1c2e24;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: #749280;
  }
}

/* ==========================================================================
   RESPONSIVE, REDUCED TRANSPARENCY & FORCED COLORS (Accessibility)
   ========================================================================== */
@layer responsive {
  @media (prefers-reduced-motion: reduce) {
    html.theme-ready .os-backdrop,
    html.theme-ready .panel-chrome {
      transition-duration: .18s;
    }
    .panel-stage.motion-ready {
      transition-duration: .12s;
    }
  }

  @media (prefers-reduced-transparency: reduce) {
    html[data-theme="windows"] :where(.is-scrolled header, .platforms, .download-panel, .help details, .version, footer),
    html[data-theme="macos"] :where(.is-scrolled header, .platforms, .download-panel, .help-list, .version) {
      background: #ffffff;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }
  }

  @media (forced-colors: active) {
    .os-backdrop {
      display: none;
    }
    .platforms,
    .download-panel,
    .win-subswitch,
    .help details,
    .download-button,
    .copy-command,
    .version {
      border: 1px solid CanvasText;
    }
    .platforms button[aria-selected="true"],
    .win-subswitch button[aria-pressed="true"] {
      outline: 2px solid Highlight;
      outline-offset: -2px;
    }
  }

  @media (max-width: 640px) {
    body { padding-top: 66px; }
    header { height: 66px; padding: 0 18px; }
    .is-scrolled header { top: 9px; height: 55px; width: calc(100% - 24px); padding: 0 14px; }
    .brand { font-size: 16px; }
    .banner-pause-btn { display: none !important; }
    main { padding: 0 16px; }
    .intro { padding: 36px 0 28px; }
    .hero-icon-wrap { width: 96px; height: 96px; margin-bottom: 18px; }
    .m3-cookie-halo { width: 124px; height: 124px; }
    .game-icon { width: 88px; height: 88px; }
    html:not([data-theme="android"]) .game-icon { border-radius: 21px; }
    html[data-theme="android"] .game-icon { width: 78px; height: 78px; border-radius: 50%; }
    .m3-s1, .m3-s2, .m3-s3, .m3-s4 { opacity: .45; }
    h1 { font-size: 42px; letter-spacing: -1.4px; }
    html[data-theme="linux"] h1 { font-size: 32px; }
    .tagline { font-size: 20px; }
    .description { font-size: 16px; }
    .platforms button { font-size: 13.5px; padding: 10px 2px; }
    .panel-stage article { padding: 22px 16px; }
    .win-subswitch button { font-size: 13px; padding: 8px 4px; }
    .launcher-features { grid-template-columns: 1fr; }
    .download-button { width: 100%; max-width: 340px; }
    .linux-hud-tl, .linux-hud-br { display: none; }
    .panel-chrome .linux-meta { display: none; }
    footer { padding: 22px 18px; font-size: 13px; flex-wrap: wrap; }
    .desktop-break { display: none; }
  }
}
