
      :root {
        color-scheme: light;
        --bg: #fffaf3;
        --bg-soft: #fff6e8;
        --panel: rgba(255, 255, 255, 0.88);
        --panel-solid: #ffffff;
        --ink: #0d182b;
        --text: #18243a;
        --muted: #647084;
        --line: rgba(15, 24, 43, 0.12);
        --accent: #ff740f;
        --accent-strong: #f05200;
        --teal: #00a6b4;
        --blue: #2563eb;
        --yellow: #f7b500;
        --green: #1bbf73;
        --danger: #ef4444;
        --shadow: 0 22px 70px rgba(24, 36, 58, 0.13);
        --soft-shadow: 0 14px 34px rgba(24, 36, 58, 0.1);
        --radius: 24px;
      }

      body[data-theme="night"] {
        color-scheme: dark;
        --bg: #07111f;
        --bg-soft: #0d1728;
        --panel: rgba(12, 22, 38, 0.88);
        --panel-solid: #101b2d;
        --ink: #f8fafc;
        --text: #e2e8f0;
        --muted: #a9b4c5;
        --line: rgba(226, 232, 240, 0.14);
        --shadow: 0 24px 80px rgba(2, 8, 23, 0.45);
        --soft-shadow: 0 14px 40px rgba(2, 8, 23, 0.34);
      }

      * {
        box-sizing: border-box;
      }

      html {
        scroll-behavior: smooth;
      }

      body {
        margin: 0;
        min-height: 100vh;
        font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        color: var(--text);
        background:
          linear-gradient(rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.78)),
          radial-gradient(circle at 15% 10%, rgba(0, 166, 180, 0.18), transparent 28%),
          radial-gradient(circle at 88% 12%, rgba(255, 116, 15, 0.18), transparent 26%),
          linear-gradient(180deg, var(--bg) 0%, #ffffff 48%, #fff8ef 100%);
      }

      body[data-theme="night"] {
        background:
          radial-gradient(circle at 15% 10%, rgba(0, 166, 180, 0.18), transparent 28%),
          radial-gradient(circle at 88% 12%, rgba(255, 116, 15, 0.16), transparent 26%),
          linear-gradient(180deg, var(--bg) 0%, #0b1322 58%, #101827 100%);
      }

      a {
        color: inherit;
        text-decoration: none;
      }

      button,
      a.button {
        min-height: 44px;
        border: 0;
        border-radius: 999px;
        font: inherit;
        cursor: pointer;
        transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
      }

      button:hover,
      a.button:hover {
        transform: translateY(-1px);
      }

      button:focus-visible,
      a:focus-visible {
        outline: 3px solid rgba(0, 166, 180, 0.32);
        outline-offset: 3px;
      }

      .site-shell {
        width: min(1180px, calc(100% - 32px));
        margin: 0 auto;
      }

      .site-header {
        position: sticky;
        top: 0;
        z-index: 50;
        border-bottom: 1px solid rgba(255, 255, 255, 0.42);
        background: rgba(255, 250, 243, 0.82);
        backdrop-filter: blur(18px);
      }

      body[data-theme="night"] .site-header {
        border-bottom-color: rgba(226, 232, 240, 0.1);
        background: rgba(7, 17, 31, 0.78);
      }

      .nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        min-height: 76px;
      }

      .brand {
        display: inline-flex;
        align-items: center;
        gap: 0;
        font-weight: 900;
        color: var(--ink);
        letter-spacing: -0.02em;
      }

      .brand-logo {
        width: 74px;
        height: auto;
        display: block;
        filter: drop-shadow(0 12px 24px rgba(255, 116, 15, 0.16));
      }

      .nav-links {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        color: var(--ink);
        font-size: 0.95rem;
        font-weight: 700;
      }

      .nav-links a {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 10px 12px;
        border-radius: 999px;
      }

      .nav-links a:hover {
        background: rgba(255, 116, 15, 0.09);
      }

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

      .primary,
      .secondary,
      .theme-toggle,
      .control-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 9px;
        white-space: nowrap;
      }

      .primary {
        padding: 14px 21px;
        color: #ffffff;
        font-weight: 900;
        background: linear-gradient(135deg, #ff9f1c 0%, var(--accent-strong) 100%);
        box-shadow: 0 14px 32px rgba(255, 116, 15, 0.28);
      }

      .secondary {
        padding: 13px 19px;
        color: var(--teal);
        font-weight: 850;
        border: 1px solid rgba(0, 166, 180, 0.24);
        background: rgba(255, 255, 255, 0.66);
        box-shadow: var(--soft-shadow);
      }

      body[data-theme="night"] .secondary {
        background: rgba(12, 22, 38, 0.7);
      }

      .theme-toggle {
        min-width: 46px;
        padding: 10px 12px;
        color: var(--ink);
        border: 1px solid var(--line);
        background: var(--panel-solid);
        box-shadow: var(--soft-shadow);
      }

      .theme-toggle span:last-child {
        font-size: 0.86rem;
        font-weight: 800;
      }

      .hero {
        display: grid;
        grid-template-columns: minmax(0, 0.95fr) minmax(430px, 1.05fr);
        gap: 48px;
        align-items: center;
        padding: 62px 0 46px;
      }

      .eyebrow {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        border: 1px solid rgba(255, 116, 15, 0.18);
        border-radius: 999px;
        color: var(--accent-strong);
        background: rgba(255, 116, 15, 0.08);
        font-size: 0.8rem;
        font-weight: 900;
        letter-spacing: 0.05em;
        text-transform: uppercase;
      }

      h1,
      h2,
      h3,
      p {
        margin-top: 0;
      }

      h1 {
        max-width: 760px;
        margin-bottom: 18px;
        color: var(--ink);
        font-size: clamp(3rem, 7.2vw, 5.55rem);
        line-height: 0.96;
        letter-spacing: -0.055em;
      }

      .accent-word {
        color: var(--teal);
      }

      .fast-word {
        color: var(--accent-strong);
      }

      .lead {
        max-width: 62ch;
        margin-bottom: 28px;
        color: var(--muted);
        font-size: 1.11rem;
        line-height: 1.7;
      }

      .cta-row,
      .chip-row,
      .tag-row,
      .game-actions,
      .mobile-controls {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
      }

      .chip {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 9px 12px;
        border: 1px solid var(--line);
        border-radius: 999px;
        color: var(--ink);
        background: rgba(255, 255, 255, 0.76);
        box-shadow: 0 8px 20px rgba(24, 36, 58, 0.06);
        font-size: 0.9rem;
        font-weight: 750;
      }

      body[data-theme="night"] .chip {
        background: rgba(12, 22, 38, 0.74);
      }

      .hero-art {
        position: relative;
        min-height: 385px;
        display: grid;
        place-items: center;
      }

      .preview-frame {
        position: relative;
        width: min(100%, 600px);
      }

      .hero-image {
        width: 100%;
        height: auto;
        display: block;
        filter: drop-shadow(0 26px 56px rgba(24, 36, 58, 0.16));
      }

      .section {
        scroll-margin-top: 92px;
        padding: 36px 0;
      }

      #jeu,
      #runner,
      #survivor,
      #arcade {
        scroll-margin-top: 112px;
      }

      [data-dev-only][hidden] {
        display: none !important;
      }

      .section-card {
        border: 1px solid var(--line);
        border-radius: 30px;
        background: var(--panel);
        box-shadow: var(--soft-shadow);
        backdrop-filter: blur(18px);
      }

      .section-heading {
        max-width: 760px;
        margin: 0 auto 22px;
        text-align: center;
      }

      .section-heading h2 {
        margin-bottom: 8px;
        color: var(--ink);
        font-size: clamp(2rem, 4vw, 3rem);
        line-height: 1;
        letter-spacing: -0.04em;
      }

      .section-heading p {
        margin-bottom: 0;
        color: var(--muted);
        line-height: 1.65;
      }

      .games-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(144px, 1fr));
        gap: 12px;
      }

      @media (min-width: 1100px) {
        .games-grid {
          grid-template-columns: repeat(7, minmax(0, 1fr));
        }
      }

      .game-card {
        position: relative;
        overflow: hidden;
        display: grid;
        grid-template-rows: auto auto 1fr auto;
        gap: 8px;
        min-width: 0;
        min-height: 142px;
        padding: 12px;
        border: 1px solid rgba(226, 232, 240, 0.16);
        border-radius: 18px;
        color: #e7eefb;
        background:
          radial-gradient(circle at 82% 18%, rgba(0, 166, 180, 0.18), transparent 30%),
          linear-gradient(135deg, #061222, #020817 72%);
        box-shadow: var(--soft-shadow);
        transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
      }

      a.game-card:hover {
        transform: translateY(-2px);
        border-color: rgba(255, 255, 255, 0.3);
        box-shadow: 0 18px 38px rgba(15, 23, 42, 0.2);
      }

      a.game-card:focus-visible {
        outline: 3px solid rgba(0, 166, 180, 0.38);
        outline-offset: 3px;
      }

      .game-card.neon {
        background:
          linear-gradient(120deg, rgba(147, 51, 234, 0.22), transparent 45%),
          radial-gradient(circle at 78% 20%, rgba(0, 166, 180, 0.24), transparent 30%),
          linear-gradient(135deg, #071026, #020817 78%);
      }

      .mini-visual {
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        border: 1px solid rgba(148, 163, 184, 0.26);
        border-radius: 14px;
        background: rgba(15, 23, 42, 0.58);
        box-shadow: inset 0 0 22px rgba(56, 189, 248, 0.07);
        overflow: hidden;
      }

      .mini-visual > * {
        scale: 0.45;
      }

      .mini-orbit {
        width: 22px;
        height: 22px;
        border-radius: 4px;
        background: var(--accent);
        box-shadow: 58px 20px 0 rgba(239, 68, 68, 0.72), 36px 74px 0 rgba(239, 68, 68, 0.58), 0 0 24px var(--accent);
      }

      .mini-runner {
        width: 46px;
        height: 62px;
        border-radius: 11px 11px 7px 7px;
        background: linear-gradient(180deg, #7dd3fc, #06b6d4);
        box-shadow: -36px 30px 0 rgba(255, 196, 40, 0.8), 34px 16px 0 rgba(239, 68, 68, 0.65), 0 0 26px rgba(56, 189, 248, 0.8);
      }

      .game-card h3 {
        margin: 0;
        font-size: 0.9rem;
        line-height: 1.06;
        letter-spacing: 0;
        color: #ffffff;
      }

      .game-eyebrow {
        display: block;
        margin-bottom: 3px;
        color: #9fd7ff;
        font-size: 0.58rem;
        font-weight: 900;
        letter-spacing: 0;
        text-transform: uppercase;
      }

      .tag-row {
        display: flex;
        align-content: flex-start;
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 5px;
        margin: 0;
      }

      .tag {
        display: inline-flex;
        align-items: center;
        min-height: 20px;
        padding: 4px 6px;
        border-radius: 999px;
        color: #ffffff;
        background: rgba(0, 166, 180, 0.72);
        font-size: 0.59rem;
        font-weight: 850;
        line-height: 1;
      }

      .tag.hot { background: rgba(255, 116, 15, 0.88); }
      .tag.purple { background: rgba(147, 51, 234, 0.82); }

      .best-preview {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 8px;
        margin-top: auto;
        padding-top: 7px;
        border-top: 1px solid rgba(226, 232, 240, 0.18);
      }

      .best-preview small {
        display: block;
        color: #cbd5e1;
        font-size: 0.56rem;
        font-weight: 800;
        line-height: 1;
        text-transform: uppercase;
      }

      .best-preview strong {
        display: block;
        color: #ffffff;
        font-size: 0.78rem;
        line-height: 1.05;
      }

      .mini-cta {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 23px;
        padding: 5px 7px;
        border-radius: 999px;
        color: #061222;
        background: rgba(255, 255, 255, 0.92);
        font-size: 0.62rem;
        font-weight: 950;
        line-height: 1;
        white-space: nowrap;
      }

      .mini-glyph {
        display: grid;
        place-items: center;
        width: 28px;
        height: 28px;
        border-radius: 10px;
        color: #061222;
        background: linear-gradient(135deg, #facc15, #38bdf8);
        font-size: 0.68rem;
        font-weight: 950;
        letter-spacing: 0;
      }

      .mini-visual .mini-glyph {
        scale: 1;
      }

      .play-panel {
        padding: 18px;
      }

      .play-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 22px;
      }

      .game-stage {
        display: grid;
        gap: 14px;
        min-width: 0;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.62);
      }

      body[data-theme="night"] .game-stage {
        background: rgba(12, 22, 38, 0.7);
      }

      .game-head,
      .runner-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 14px;
      }

      .game-head h3,
      .runner-header h3 {
        margin-bottom: 4px;
        color: var(--ink);
        font-size: 1.06rem;
      }

      .status {
        color: var(--muted);
        font-size: 0.9rem;
        line-height: 1.45;
      }

      .runner-status {
        color: var(--muted);
      }

      canvas {
        width: 100%;
        height: auto;
        display: block;
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 16px;
        background: #020817;
      }

      #gameCanvas {
        aspect-ratio: 1 / 1;
      }

      #runnerCanvas {
        aspect-ratio: 16 / 9;
      }

      .hud,
      .runner-hud,
      .mission-strip,
      .feature-grid {
        display: grid;
        gap: 10px;
      }

      .hud {
        grid-template-columns: repeat(4, minmax(0, 1fr));
      }

      .runner-hud {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .pill,
      .mission,
      .feature-card {
        min-width: 0;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.72);
      }

      body[data-theme="night"] .pill,
      body[data-theme="night"] .mission,
      body[data-theme="night"] .feature-card {
        background: rgba(15, 23, 42, 0.72);
      }

      .pill {
        padding: 12px;
      }

      .pill strong {
        display: block;
        color: var(--ink);
        font-size: clamp(0.95rem, 2vw, 1.15rem);
        line-height: 1.1;
      }

      .pill span {
        display: block;
        margin-top: 4px;
        color: var(--muted);
        font-size: 0.74rem;
        font-weight: 850;
        text-transform: uppercase;
      }

      .mission-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .mission {
        min-height: 58px;
        padding: 12px;
        color: var(--muted);
        font-size: 0.82rem;
        line-height: 1.35;
      }

      .mission strong {
        display: block;
        margin-bottom: 4px;
        color: var(--ink);
      }

      .control-note {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 12px 14px;
        border: 1px solid var(--line);
        border-radius: 16px;
        color: var(--muted);
        background: rgba(248, 250, 252, 0.78);
        font-size: 0.88rem;
      }

      body[data-theme="night"] .control-note {
        background: rgba(15, 23, 42, 0.66);
      }

      .mobile-controls {
        justify-content: flex-end;
      }

      .control-button {
        min-width: 42px;
        min-height: 38px;
        padding: 8px 10px;
        border: 1px solid var(--line);
        border-radius: 12px;
        color: var(--ink);
        background: var(--panel-solid);
        font-weight: 900;
      }



      .mini-survivor {
        position: relative;
        width: 82px;
        height: 82px;
      }

      .mini-survivor::before,
      .mini-survivor::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
      }

      .mini-survivor::before {
        width: 60px;
        height: 72px;
        clip-path: polygon(50% 0, 78% 54%, 100% 64%, 62% 75%, 50% 100%, 38% 75%, 0 64%, 22% 54%);
        background: linear-gradient(180deg, #7dd3fc, #0ea5e9 58%, #075985);
        box-shadow: 0 0 28px rgba(56, 189, 248, 0.75);
      }

      .mini-survivor::after {
        width: 14px;
        height: 14px;
        border-radius: 999px;
        background: #f97316;
        box-shadow: 0 0 16px rgba(249, 115, 22, 0.8), 44px -14px 0 rgba(251, 113, 133, 0.72), -38px 24px 0 rgba(52, 211, 153, 0.72);
      }

      .mini-lab {
        width: 74px;
        height: 74px;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 7px;
      }

      .mini-lab span {
        border-radius: 8px;
        background: var(--accent);
        box-shadow: 0 0 18px rgba(255, 116, 15, 0.42);
      }

      .mini-lab span:nth-child(2n) { background: #38bdf8; }
      .mini-lab span:nth-child(3n) { background: #a78bfa; }
      .mini-lab span:nth-child(5n) { background: #22c55e; }

      .mini-mineforge {
        width: 88px;
        height: 88px;
        position: relative;
        transform: rotateX(58deg) rotateZ(-38deg);
        transform-style: preserve-3d;
      }

      .mini-mineforge span {
        position: absolute;
        width: 26px;
        height: 26px;
        border: 1px solid rgba(255, 255, 255, 0.16);
        background: #22c55e;
        box-shadow: 0 0 18px rgba(34, 197, 94, 0.26);
      }

      .mini-mineforge span:nth-child(1) { left: 4px; top: 28px; background: #22c55e; }
      .mini-mineforge span:nth-child(2) { left: 31px; top: 28px; background: #16a34a; }
      .mini-mineforge span:nth-child(3) { left: 58px; top: 28px; background: #84cc16; }
      .mini-mineforge span:nth-child(4) { left: 31px; top: 1px; background: #38bdf8; transform: translateZ(18px); }
      .mini-mineforge span:nth-child(5) { left: 31px; top: 55px; background: #92400e; transform: translateZ(10px); }
      .mini-mineforge span:nth-child(6) { left: 58px; top: 55px; background: #64748b; }

      .mini-memory {
        width: 88px;
        height: 88px;
        position: relative;
        display: grid;
        place-items: center;
        border-radius: 24px;
        background: linear-gradient(145deg, #f8fafc, #dbeafe);
        box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08), 0 0 24px rgba(56, 189, 248, 0.24);
      }

      .mini-memory span {
        position: absolute;
        filter: drop-shadow(0 10px 14px rgba(15, 23, 42, 0.2));
      }

      .mini-memory span:nth-child(1) {
        width: 34px;
        height: 34px;
        left: 16px;
        top: 36px;
        border-radius: 8px;
        background: #38bdf8;
        transform: skewY(-18deg);
      }

      .mini-memory span:nth-child(2) {
        width: 34px;
        height: 34px;
        right: 16px;
        top: 20px;
        border-radius: 999px;
        background: #f97316;
      }

      .mini-memory span:nth-child(3) {
        width: 42px;
        height: 22px;
        left: 28px;
        bottom: 16px;
        border-radius: 42px 42px 6px 6px;
        background: #a855f7;
      }

      .game-card.forest {
        background:
          radial-gradient(circle at 80% 24%, rgba(52, 211, 153, 0.22), transparent 32%),
          linear-gradient(135deg, #062019, #020817 74%);
      }

      .game-card.lab {
        background:
          radial-gradient(circle at 18% 20%, rgba(250, 204, 21, 0.2), transparent 28%),
          radial-gradient(circle at 78% 8%, rgba(56, 189, 248, 0.2), transparent 28%),
          linear-gradient(135deg, #111827, #020817 76%);
      }

      .game-card.mineforge {
        background:
          radial-gradient(circle at 74% 22%, rgba(34, 197, 94, 0.25), transparent 30%),
          radial-gradient(circle at 18% 82%, rgba(56, 189, 248, 0.18), transparent 28%),
          linear-gradient(135deg, #052e1b, #07111f 78%);
      }

      .game-card.memory {
        background:
          radial-gradient(circle at 72% 26%, rgba(248, 250, 252, 0.22), transparent 32%),
          radial-gradient(circle at 14% 82%, rgba(168, 85, 247, 0.22), transparent 28%),
          linear-gradient(135deg, #172554, #020817 76%);
      }

      .game-stage.wide {
        grid-column: 1 / -1;
      }

      #survivorCanvas,
      #arcadeCanvas,
      #mineforgeCanvas,
      #shapeMemoryCanvas {
        aspect-ratio: 16 / 10;
      }

      .mineforge-panel {
        padding: 18px;
      }

      .mineforge-layout,
      .memory-layout {
        display: grid;
        gap: 14px;
      }

      .mineforge-frame,
      .memory-frame {
        position: relative;
        min-width: 0;
        overflow: hidden;
        border-radius: 18px;
        background: #020817;
      }

      .memory-frame {
        background: #f8fafc;
      }

      .mineforge-frame canvas,
      .memory-frame canvas {
        border-radius: 18px;
      }

      .mineforge-reticle {
        position: absolute;
        left: 50%;
        top: 50%;
        width: 22px;
        height: 22px;
        pointer-events: none;
        transform: translate(-50%, -50%);
      }

      .mineforge-reticle::before,
      .mineforge-reticle::after {
        content: "";
        position: absolute;
        background: rgba(255, 255, 255, 0.86);
        box-shadow: 0 0 10px rgba(2, 6, 23, 0.4);
      }

      .mineforge-reticle::before {
        left: 10px;
        top: 3px;
        width: 2px;
        height: 16px;
      }

      .mineforge-reticle::after {
        left: 3px;
        top: 10px;
        width: 16px;
        height: 2px;
      }

      .mineforge-hud,
      .memory-hud {
        display: grid;
        gap: 10px;
      }

      .mineforge-hud {
        grid-template-columns: repeat(5, minmax(0, 1fr));
      }

      .memory-hud {
        grid-template-columns: repeat(6, minmax(0, 1fr));
      }

      .mineforge-tools,
      .memory-tools {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
      }

      .block-picker,
      .shape-picker {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
      }

      .block-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 42px;
        padding: 8px 12px;
        border: 1px solid var(--line);
        border-radius: 13px;
        color: var(--ink);
        background: var(--panel-solid);
        font-size: 0.86rem;
        font-weight: 900;
      }

      .block-button.active {
        border-color: rgba(34, 197, 94, 0.7);
        background: rgba(34, 197, 94, 0.14);
      }

      .block-swatch {
        width: 16px;
        height: 16px;
        border-radius: 4px;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
      }

      .swatch-grass { background: #34a853; }
      .swatch-dirt { background: #8b5a2b; }
      .swatch-stone { background: #7c8794; }
      .swatch-wood { background: #a16207; }
      .swatch-cube { background: #38bdf8; }
      .swatch-sphere { background: #f97316; border-radius: 999px; }
      .swatch-dome { background: #a855f7; border-radius: 999px 999px 5px 5px; }
      .swatch-oval { background: #22c55e; border-radius: 999px; width: 22px; }
      .swatch-review { background: linear-gradient(135deg, #f8fafc, #93c5fd); }
      .swatch-erase {
        position: relative;
        background: #ef4444;
      }

      .swatch-erase::before,
      .swatch-erase::after {
        content: "";
        position: absolute;
        left: 3px;
        top: 7px;
        width: 10px;
        height: 2px;
        border-radius: 999px;
        background: #ffffff;
      }

      .swatch-erase::before { transform: rotate(45deg); }
      .swatch-erase::after { transform: rotate(-45deg); }

      .survivor-arena {
        position: relative;
        min-width: 0;
      }

      .survivor-hud {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 10px;
      }

      .upgrade-row {
        position: absolute;
        left: 50%;
        bottom: clamp(14px, 4.8vw, 34px);
        z-index: 2;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
        width: min(760px, calc(100% - 28px));
        transform: translate(-50%, 16px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 160ms ease, transform 160ms ease;
      }

      .upgrade-row.is-visible {
        opacity: 1;
        pointer-events: auto;
        transform: translate(-50%, 0);
      }

      .upgrade-button,
      .picker-button {
        min-height: 72px;
        border: 1px solid var(--line);
        border-radius: 16px;
        color: var(--text);
        background: rgba(255, 255, 255, 0.72);
        text-align: left;
      }

      .upgrade-button {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 12px;
        padding: 12px;
        color: #f8fafc;
        background: rgba(15, 23, 42, 0.84);
        border-color: rgba(187, 247, 208, 0.28);
        box-shadow: 0 18px 42px rgba(2, 6, 23, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(12px);
      }

      .upgrade-icon {
        width: 42px;
        height: 42px;
        display: grid;
        place-items: center;
        border-radius: 14px;
        background: linear-gradient(135deg, #f97316, #facc15);
        color: #111827;
        font-size: 1.25rem;
        box-shadow: 0 0 22px rgba(249, 115, 22, 0.38);
      }

      .upgrade-button:nth-child(2) .upgrade-icon {
        background: linear-gradient(135deg, #22c55e, #67e8f9);
      }

      .upgrade-button:nth-child(3) .upgrade-icon {
        background: linear-gradient(135deg, #fb7185, #fef3c7);
      }

      body[data-theme="night"] .upgrade-button,
      body[data-theme="night"] .picker-button {
        background: rgba(15, 23, 42, 0.72);
      }

      body[data-theme="night"] .upgrade-button {
        background: rgba(15, 23, 42, 0.88);
      }

      .upgrade-button strong,
      .upgrade-button span,
      .picker-button strong,
      .picker-button span {
        display: block;
      }

      .upgrade-button .upgrade-icon {
        display: grid;
      }

      .upgrade-button span,
      .picker-button span {
        margin-top: 5px;
        color: var(--muted);
        font-size: 0.82rem;
        line-height: 1.3;
      }

      .upgrade-button span {
        color: #cbd5e1;
      }

      .upgrade-button .upgrade-icon {
        margin-top: 0;
        color: #111827;
      }

      .upgrade-button:disabled {
        cursor: not-allowed;
        opacity: 0.7;
        transform: none;
      }

      .lab-panel {
        padding: 22px;
      }

      .arcade-layout {
        display: grid;
        grid-template-columns: minmax(250px, 0.42fr) minmax(0, 0.58fr);
        gap: 18px;
      }

      .game-picker {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        align-content: start;
      }

      .picker-button.active {
        border-color: rgba(255, 116, 15, 0.62);
        background: rgba(255, 116, 15, 0.13);
      }

      .arcade-stage {
        display: grid;
        gap: 14px;
        min-width: 0;
      }

      .arcade-hud {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
      }

      .leaderboard {
        padding: 34px;
      }

      .feature-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        margin-top: 24px;
      }

      .feature-card {
        min-height: 130px;
        padding: 20px;
      }

      .feature-icon {
        display: grid;
        place-items: center;
        width: 48px;
        height: 48px;
        margin-bottom: 12px;
        border-radius: 14px;
        background: rgba(0, 166, 180, 0.12);
        font-size: 1.55rem;
      }

      .feature-card h3 {
        margin-bottom: 6px;
        color: var(--ink);
        font-size: 1rem;
      }

      .feature-card p {
        margin-bottom: 0;
        color: var(--muted);
        font-size: 0.9rem;
        line-height: 1.45;
      }

      .about {
        position: relative;
        overflow: hidden;
        padding: 36px;
        text-align: center;
      }

      .about::before,
      .about::after {
        content: "";
        position: absolute;
        width: 170px;
        height: 170px;
        border: 1px solid rgba(0, 166, 180, 0.15);
        border-radius: 50%;
        pointer-events: none;
      }

      .about::before { left: -70px; bottom: -80px; }
      .about::after { right: -78px; top: -84px; }

      .about p {
        max-width: 640px;
        margin: 0 auto;
        color: var(--muted);
        line-height: 1.65;
      }

      .site-footer {
        margin-top: 38px;
        color: #cbd5e1;
        background: linear-gradient(135deg, #061222, #020817);
      }

      .footer-grid {
        display: grid;
        grid-template-columns: 1.3fr repeat(3, minmax(120px, 0.5fr));
        gap: 28px;
        padding: 44px 0;
      }

      .footer-grid h3,
      .footer-grid strong {
        color: #ffffff;
      }

      .footer-grid p,
      .footer-grid a {
        color: #cbd5e1;
      }

      .footer-links {
        display: grid;
        gap: 8px;
        margin-top: 10px;
      }

      .footer-brand .brand {
        color: #ffffff;
      }

      .footer-brand .brand-logo {
        width: 112px;
      }

      @media (max-width: 980px) {
        .nav {
          align-items: flex-start;
          flex-wrap: wrap;
          padding: 14px 0;
        }

        .nav-links {
          order: 3;
          width: 100%;
          justify-content: flex-start;
          overflow-x: auto;
          padding-bottom: 2px;
        }

        .hero,
        .play-grid,
        .arcade-layout {
          grid-template-columns: 1fr;
        }

        .hero {
          padding-top: 40px;
        }

        .hero-art {
          min-height: auto;
        }

        .feature-grid,
        .footer-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
      }

      @media (max-width: 640px) {
        .site-shell {
          width: min(100% - 22px, 1180px);
        }

        .section {
          scroll-margin-top: 180px;
        }

        #jeu,
        #runner,
        #survivor,
        #arcade {
          scroll-margin-top: 190px;
        }

        .nav-actions .primary {
          display: none;
        }

        .brand-logo {
          width: 62px;
        }

        .nav-links a {
          padding: 9px 10px;
          font-size: 0.88rem;
        }

        h1 {
          font-size: clamp(2.55rem, 15vw, 4rem);
        }

        .lead {
          font-size: 1rem;
        }

        .cta-row .primary,
        .cta-row .secondary,
        .game-actions .primary,
        .game-actions .secondary {
          width: 100%;
        }

        .preview-frame,
        .game-card,
        .leaderboard,
        .about,
        .play-panel,
        .game-stage,
        .lab-panel {
          border-radius: 20px;
        }

        .leaderboard,
        .about,
        .lab-panel {
          padding: 20px;
        }

        .games-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
          gap: 10px;
        }

        .game-card {
          min-height: 148px;
          padding: 12px;
        }

        .hud,
        .runner-hud,
        .survivor-hud,
        .arcade-hud,
        .mineforge-hud,
        .memory-hud,
        .mission-strip,
        .game-picker,
        .feature-grid,
        .footer-grid {
          grid-template-columns: 1fr 1fr;
        }

        .game-head,
        .runner-header,
        .control-note {
          flex-direction: column;
          align-items: stretch;
        }

        .mobile-controls {
          justify-content: flex-start;
        }
      }

      @media (max-width: 430px) {
        .hud,
        .runner-hud,
        .survivor-hud,
        .arcade-hud,
        .mineforge-hud,
        .memory-hud,
        .mission-strip,
        .game-picker,
        .feature-grid,
        .footer-grid,
        .best-preview {
          grid-template-columns: 1fr;
        }

        .survivor-arena .upgrade-row {
          bottom: 8px;
          gap: 6px;
          grid-template-columns: repeat(3, minmax(0, 1fr));
          width: calc(100% - 16px);
        }

        .survivor-arena .upgrade-button {
          min-height: 84px;
          grid-template-columns: 1fr;
          gap: 5px;
          padding: 8px 6px;
          text-align: center;
        }

        .survivor-arena .upgrade-icon {
          width: 30px;
          height: 30px;
          margin: 0 auto;
          border-radius: 10px;
          font-size: 0.95rem;
        }

        .survivor-arena .upgrade-button strong {
          font-size: 0.72rem;
          line-height: 1.05;
        }

        .survivor-arena .upgrade-button span {
          margin-top: 3px;
          font-size: 0.63rem;
          line-height: 1.12;
        }

        .survivor-arena .upgrade-button .upgrade-icon {
          margin: 0 auto;
          color: #111827;
          font-size: 0.95rem;
        }

        .best-preview {
          display: grid;
        }
      }

      @media (prefers-reduced-motion: reduce) {
        html {
          scroll-behavior: auto;
        }

        *,
        *::before,
        *::after {
          animation-duration: 0.01ms !important;
          animation-iteration-count: 1 !important;
          scroll-behavior: auto !important;
          transition-duration: 0.01ms !important;
        }
      }
    