:root {
    color-scheme: dark;
    --bg: #0f1217;
    --panel: rgba(19, 24, 31, 0.9);
    --panel-strong: rgba(24, 30, 39, 0.96);
    --line: rgba(215, 232, 223, 0.22);
    --text: #edf4f6;
    --muted: #a8b4bc;
    --light: #d7e8df;
    --dark: #31434c;
    --accent: #38bdf8;
    --gold: #f5b647;
    --green: #22c55e;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    position: relative;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
    background:
        linear-gradient(rgba(15, 18, 23, 0.8), rgba(15, 18, 23, 0.94)),
        radial-gradient(circle at center, rgba(56, 189, 248, 0.16), transparent 42%),
        linear-gradient(135deg, #0f1217, #151b22 56%, #0d1015);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(215, 232, 223, 0.04) 1px, transparent 1px) 0 0 / 44px 44px,
        linear-gradient(rgba(215, 232, 223, 0.035) 1px, transparent 1px) 0 0 / 44px 44px;
    mask-image: radial-gradient(circle at center, #000 0 54%, transparent 78%);
}

.launcher-background-torus {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

#launcherTorusCanvas {
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0.68;
    filter: brightness(1.04) saturate(0.9) blur(0.3px) drop-shadow(0 34px 64px rgba(0, 0, 0, 0.58));
}

.launcher-author {
    position: static;
    display: grid;
    gap: 2px;
    justify-items: end;
    color: rgba(237, 244, 246, 0.68);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}

.intro-author {
    justify-self: end;
    align-self: end;
    margin: -16px 4px -8px 0;
    text-align: right;
    background: transparent;
    border: 0;
    padding: 0;
}

.intro-author span,
.intro-author a {
    white-space: nowrap;
}

.launcher-author a {
    color: rgba(56, 189, 248, 0.74);
    text-decoration: none;
    pointer-events: auto;
}

.launcher-author a:hover {
    color: rgba(237, 244, 246, 0.9);
}

.launcher-corner-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin: -16px 4px -8px;
}

.launcher-corner-row .intro-author {
    margin: 0;
}

.launcher-official-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: rgba(237, 244, 246, 0.68);
    font-size: clamp(13px, 1.05vw, 15px);
    font-weight: 950;
    line-height: 1.3;
}

.launcher-official-links a {
    color: rgba(125, 211, 252, 0.86);
    text-decoration: none;
    pointer-events: auto;
    text-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
}

.launcher-official-links a:hover,
.launcher-official-links a:focus-visible {
    color: #ffe7ac;
    outline: none;
}

.launcher-feedback {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    pointer-events: auto;
}

.launcher-feedback-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 8px;
    border: 1px solid rgba(56, 189, 248, 0.46);
    border-radius: 8px;
    background: rgba(11, 16, 22, 0.86);
    color: rgba(237, 244, 246, 0.86);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
    text-decoration: none;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.34);
}

.launcher-feedback-button:hover,
.launcher-feedback-button:focus-visible {
    border-color: rgba(245, 182, 71, 0.74);
    color: #ffffff;
    outline: none;
}

.launcher-language {
    position: fixed;
    right: 14px;
    bottom: 52px;
    top: auto;
    z-index: 1002;
    display: grid;
    justify-items: end;
    gap: 8px;
}

.launcher-discord-button {
    position: fixed;
    right: 48px;
    bottom: 52px;
    z-index: 4;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--text);
    text-decoration: none;
    transition: color 140ms ease, opacity 140ms ease, transform 140ms ease;
}

.launcher-discord-button:hover {
    color: #ffe7ac;
    opacity: 0.86;
    transform: scale(1.08);
}

.launcher-discord-button:focus-visible {
    color: #ffe7ac;
    outline: 2px solid #7dd3fc;
    outline-offset: 2px;
    transform: scale(1.08);
}

.launcher-discord-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.launcher-language-button {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    box-shadow: none;
}

.launcher-language-button:hover,
.launcher-language-button:focus-visible {
    color: #ffe7ac;
    outline: none;
}

.launcher-language-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.35;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.launcher-language-menu {
    width: max-content;
    display: grid;
    gap: 6px;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: rgba(15, 20, 27, 0.9);
    color: var(--text);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

.launcher-language-menu[hidden] {
    display: none;
}

.launcher-language-menu span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.launcher-language-options {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.launcher-language-options button {
    min-width: 0;
    min-height: 0;
    padding: 2px 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font-weight: 900;
    cursor: pointer;
}

.launcher-language-options button[aria-pressed="true"] {
    color: #ffe7ac;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.launcher-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    align-items: center;
    padding: clamp(20px, 4vw, 52px);
}

.launcher-shell::before {
    content: "";
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: clamp(360px, 43vh, 560px);
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(4, 18, 42, 0.98) 0%,
        rgba(7, 25, 54, 0.9) 45%,
        rgba(8, 22, 42, 0.48) 78%,
        rgba(8, 22, 42, 0) 100%
    );
}

.launcher-hero {
    width: min(1180px, 100%);
    display: grid;
    gap: 28px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.brand-block {
    position: relative;
    display: grid;
    gap: 10px;
    align-items: start;
    padding: clamp(18px, 2.2vw, 30px) clamp(16px, 2.6vw, 34px) clamp(18px, 2.4vw, 32px);
    isolation: isolate;
}

.brand-block::before {
    display: none;
}

.brand-kicker {
    width: max-content;
    color: rgba(125, 211, 252, 0.82);
    font-size: 12px;
    font-weight: 950;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-title-row {
    display: flex;
    align-items: center;
    gap: clamp(18px, 2.3vw, 34px);
    min-width: 0;
    white-space: nowrap;
}

.launcher-spirit {
    max-width: 980px;
    display: grid;
    gap: 6px;
    justify-self: start;
    margin: 0;
    color: rgba(226, 236, 238, 0.88);
    font-size: clamp(13px, 1.18vw, 16px);
    font-weight: 650;
    line-height: 1.5;
    letter-spacing: 0;
}

.brand-title-row strong {
    flex: 0 1 auto;
    margin: 0;
    color: var(--gold);
    font-size: clamp(16px, 1.45vw, 22px);
    font-weight: 900;
    line-height: 1.15;
}

.launcher-spirit p {
    max-width: 980px;
    margin: 0;
}

.search-index-content {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    border: 0;
}

h1 {
    flex: 0 0 auto;
    max-width: none;
    margin: 0;
    font-size: clamp(42px, 4.25vw, 66px);
    line-height: 0.98;
    letter-spacing: 0;
}

.dimension-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
        "d2 d3 d4"
        "t2 t3 .";
    gap: 18px;
}

.dimension-2d {
    grid-area: d2;
}

.dimension-3d {
    grid-area: d3;
}

.dimension-4d {
    grid-area: d4;
}

.dimension-2p1 {
    grid-area: t2;
}

.dimension-3p1 {
    grid-area: t3;
}

.audience-entry-panel {
    display: grid;
    gap: 16px;
}

.audience-entry-heading {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 16px;
    align-items: end;
    padding: 0 clamp(8px, 1.2vw, 14px);
}

.audience-entry-heading h2 {
    margin: 0;
    color: #f8fafc;
    font-size: clamp(24px, 2.8vw, 38px);
    line-height: 1.05;
}

.audience-entry-heading p:last-child {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.audience-entry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.audience-card {
    min-height: 330px;
}

.audience-card .dimension-copy strong {
    font-size: clamp(34px, 4vw, 54px);
}

.audience-visual {
    min-height: 150px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 4px;
    padding: 20px;
    border: 1px solid rgba(215, 232, 223, 0.14);
    background: rgba(9, 14, 20, 0.72);
}

.audience-visual span {
    border: 1px solid rgba(215, 232, 223, 0.16);
    border-radius: 5px;
    background: rgba(56, 189, 248, 0.16);
}

.player-visual span:nth-child(1),
.player-visual span:nth-child(6),
.player-visual span:nth-child(11),
.player-visual span:nth-child(16) {
    background: rgba(245, 182, 71, 0.34);
}

.research-visual {
    background:
        linear-gradient(90deg, rgba(56, 189, 248, 0.12) 1px, transparent 1px) 0 0 / 30px 30px,
        linear-gradient(rgba(245, 182, 71, 0.10) 1px, transparent 1px) 0 0 / 30px 30px,
        rgba(9, 14, 20, 0.72);
}

.research-visual span {
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.22);
}

.launcher-mode-layers {
    display: grid;
    gap: 18px;
}

#life-evolution-worlds {
    order: 1;
}

#strategy-systems-labs {
    order: 2;
}

.algebraic-mode-panel {
    display: grid;
    gap: 12px;
    padding: 16px 18px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(15, 20, 27, 0.78);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.physical-lab-panel {
    border-color: rgba(56, 189, 248, 0.28);
    background: rgba(13, 22, 30, 0.84);
}

.algebraic-mode-heading {
    display: grid;
    gap: 5px;
}

.algebraic-mode-heading strong {
    color: var(--gold);
    font-size: clamp(20px, 1.75vw, 25px);
    font-weight: 900;
    text-transform: uppercase;
}

.algebraic-mode-heading small {
    color: var(--muted);
    font-size: 13px;
}

.developing-label {
    display: inline-block;
    width: max-content;
    margin-top: -2px;
    padding: 2px 7px;
    border: 1px solid rgba(245, 182, 71, 0.28);
    border-radius: 999px;
    color: rgba(245, 182, 71, 0.9);
    background: rgba(245, 182, 71, 0.08);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
}

.extra-mode-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.physical-mode-row {
    align-items: start;
}

.physics-algebra-labs .algebraic-mode-panel {
    border-color: rgba(56, 189, 248, 0.34);
    background: rgba(11, 18, 27, 0.86);
}

.lab-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.lab-card {
    min-height: 282px;
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    align-content: start;
    gap: 16px;
    padding: 18px;
}

.advanced-sandbox-card {
    grid-column: auto;
}

.lab-card-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: start;
}

.lab-card-head .developing-label {
    margin-top: 5px;
}

.lab-facts {
    display: none;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 0;
}

.lab-card:has(.lab-advanced[open]) .lab-facts {
    display: grid;
}

.lab-facts div {
    min-width: 0;
    display: grid;
    gap: 4px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: rgba(7, 12, 18, 0.42);
}

.lab-facts dt {
    color: var(--gold);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.lab-facts dd {
    margin: 0;
    color: rgba(226, 236, 238, 0.84);
    font-size: 12px;
    line-height: 1.35;
}

.lab-presets {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.single-preset {
    grid-template-columns: 1fr;
}

.lab-preset {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 10px;
    border: 1px solid rgba(56, 189, 248, 0.38);
    border-radius: 8px;
    background: rgba(10, 18, 26, 0.78);
    color: var(--text);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.25;
    text-align: left;
    text-decoration: none;
}

.lab-preset:hover,
.lab-preset:focus-visible {
    border-color: rgba(242, 196, 100, 0.72);
    background: rgba(22, 32, 43, 0.96);
    outline: none;
}

.lab-advanced {
    display: grid;
    gap: 10px;
    min-width: 0;
    align-self: start;
}

.lab-advanced summary {
    cursor: pointer;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid rgba(56, 189, 248, 0.38);
    border-radius: 8px;
    background: rgba(10, 18, 26, 0.72);
    color: rgba(226, 236, 238, 0.88);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.lab-advanced summary:hover,
.lab-advanced summary:focus-visible {
    border-color: rgba(242, 196, 100, 0.72);
    outline: none;
}

.lab-advanced[open] {
    padding-top: 4px;
}

.lab-advanced[open] summary {
    margin-bottom: 10px;
}

.extra-mode-column {
    display: grid;
    align-content: start;
    gap: 10px;
}

.extra-mode-column-title {
    color: var(--gold);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.extra-mode-card {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(19, 24, 31, 0.86);
    color: var(--text);
    text-decoration: none;
    box-shadow: none;
}

.extra-mode-card.lab-card {
    min-height: 282px;
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    align-content: start;
    gap: 16px;
}

.mode-family-card {
    min-height: 184px;
    display: grid;
    align-content: start;
    grid-template-columns: 1fr auto;
    gap: 14px;
}

.extra-mode-card:hover,
.extra-mode-card:focus-visible {
    border-color: rgba(56, 189, 248, 0.58);
    background: rgba(22, 28, 37, 0.94);
    outline: none;
}

.extra-mode-copy {
    display: grid;
    gap: 5px;
}

.extra-mode-copy strong {
    font-size: clamp(20px, 2vw, 28px);
    letter-spacing: 0;
}

.extra-mode-copy small {
    color: var(--muted);
    font-size: 13px;
}

.mode-family-selector {
    grid-column: 1 / -1;
    display: grid;
    gap: 8px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.mode-family-selector select {
    width: 100%;
    min-height: 42px;
    padding: 0 40px 0 12px;
    border: 1px solid rgba(148, 163, 184, 0.46);
    border-radius: 8px;
    background: rgba(7, 12, 18, 0.88);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    text-transform: none;
}

.mode-family-selector select:focus-visible {
    border-color: rgba(56, 189, 248, 0.72);
    outline: 2px solid rgba(56, 189, 248, 0.22);
    outline-offset: 2px;
}

.mode-family-open {
    grid-column: 1 / -1;
    min-height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(56, 189, 248, 0.46);
    border-radius: 8px;
    background: rgba(10, 18, 26, 0.92);
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
}

.mode-family-open:hover,
.mode-family-open:focus-visible {
    border-color: rgba(242, 196, 100, 0.72);
    background: rgba(22, 32, 43, 0.96);
    outline: none;
}

.dimension-card {
    position: relative;
    min-width: 0;
    min-height: 390px;
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.dimension-card:hover {
    border-color: rgba(56, 189, 248, 0.58);
    background: rgba(22, 28, 37, 0.94);
}

.popularity-badge,
.game-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    min-height: 14px;
    padding: 0;
    border: 1px solid rgba(34, 197, 94, 0.52);
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.22);
    color: #bbf7d0;
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.5);
    font-size: 13px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
}

.popularity-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

.popularity-badge[hidden],
.game-count-badge[hidden],
.popularity-badge[data-state="idle"],
.game-count-badge[data-state="idle"] {
    display: none;
}

.dimension-visual {
    position: relative;
    min-height: 190px;
    border-radius: 6px;
    overflow: hidden;
}

.board-plane {
    display: grid;
    place-items: center;
    padding: 14px 22px 8px;
    background:
        radial-gradient(circle at 50% 46%, rgba(56, 189, 248, 0.12), transparent 54%),
        rgba(9, 14, 20, 0.76);
    box-shadow: inset 0 0 0 1px rgba(215, 232, 223, 0.12);
}

.board-plane-grid {
    width: min(92%, 286px);
    aspect-ratio: 1.72;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    transform: perspective(720px) rotateX(52deg) rotateZ(-10deg) scale(0.88);
    transform-origin: center;
    box-shadow: 0 26px 52px rgba(0, 0, 0, 0.38);
}

.board-plane-grid i:nth-child(2),
.board-plane-grid i:nth-child(4),
.board-plane-grid i:nth-child(5),
.board-plane-grid i:nth-child(7),
.board-plane-grid i:nth-child(10),
.board-plane-grid i:nth-child(12),
.board-plane-grid i:nth-child(13),
.board-plane-grid i:nth-child(15) {
    background: var(--dark);
}

.board-plane-grid i {
    border: 1px solid rgba(15, 18, 23, 0.22);
    background: var(--light);
}

.chess-cube-preview {
    background:
        radial-gradient(circle at 50% 42%, rgba(56, 189, 248, 0.26), transparent 36%),
        linear-gradient(140deg, rgba(12, 17, 24, 0.98), rgba(22, 31, 39, 0.92));
    box-shadow: inset 0 0 0 1px rgba(215, 232, 223, 0.14);
}

.chess-cube-preview canvas,
.hyper-plane canvas,
.static-cube-stack canvas,
.time-volume-preview canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.hyper-plane {
    border: 1px solid rgba(215, 232, 223, 0.14);
    background:
        linear-gradient(90deg, rgba(56, 189, 248, 0.12) 1px, transparent 1px) 0 0 / 24px 24px,
        linear-gradient(rgba(245, 182, 71, 0.12) 1px, transparent 1px) 0 0 / 24px 24px,
        rgba(15, 23, 42, 0.7);
}

.static-cube-stack {
    border: 1px solid rgba(215, 232, 223, 0.14);
    background:
        radial-gradient(circle at 48% 44%, rgba(125, 211, 252, 0.18), transparent 56%),
        linear-gradient(140deg, rgba(8, 13, 22, 0.94), rgba(17, 24, 39, 0.86));
}

.dimension-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.dimension-copy strong {
    font-size: clamp(36px, 5vw, 58px);
    line-height: 0.95;
}

.dimension-copy small,
.game-option-copy small {
    color: var(--muted);
    font-size: 14px;
    font-weight: 720;
}

.game-option {
    align-self: end;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 74px;
    padding-top: 16px;
    color: inherit;
    text-decoration: none;
    border-top: 1px solid rgba(215, 232, 223, 0.18);
}

.game-option:hover,
.game-option:focus-visible {
    color: #e0f7ff;
    outline: none;
}

.game-option:hover .game-count-badge,
.game-option:focus-visible .game-count-badge {
    border-color: rgba(56, 189, 248, 0.72);
    color: #e0f7ff;
}

.game-option-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.dimension-copy strong,
.dimension-copy small,
.game-option-copy strong,
.game-option-copy small,
.extra-mode-copy strong,
.extra-mode-copy small,
.lab-preset {
    overflow-wrap: anywhere;
}

.game-option-copy strong {
    font-size: 22px;
    line-height: 1.05;
}

.game-option.is-disabled {
    color: rgba(237, 244, 246, 0.5);
}

.game-option.is-disabled .game-count-badge {
    border-color: rgba(168, 180, 188, 0.24);
    color: rgba(168, 180, 188, 0.72);
}

.launcher-expand-trigger {
    cursor: pointer;
}

.launcher-expand-trigger:focus-visible {
    outline: 2px solid rgba(56, 189, 248, 0.72);
    outline-offset: 4px;
    border-radius: 8px;
}

.dimension-card.is-collapsible {
    min-height: 0;
    grid-template-rows: auto auto;
}

.dimension-card.is-collapsible .game-option {
    display: none;
}

.dimension-card.is-collapsible[data-expanded="true"] {
    grid-template-rows: auto auto;
    grid-auto-rows: auto;
}

.dimension-card.is-collapsible[data-expanded="true"] .game-option {
    display: grid;
}

.dimension-card.is-collapsible .dimension-copy,
.lab-card.is-collapsible .lab-card-head {
    position: relative;
    padding-right: 42px;
}

.dimension-card.is-collapsible .dimension-copy::after,
.lab-card.is-collapsible .lab-card-head::after {
    content: "+";
    position: absolute;
    right: 0;
    bottom: 0;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(56, 189, 248, 0.42);
    border-radius: 999px;
    color: #e0f7ff;
    background: rgba(7, 12, 18, 0.78);
    font-size: 19px;
    font-weight: 900;
    line-height: 1;
}

.dimension-card.is-collapsible[data-expanded="true"] .dimension-copy::after,
.lab-card.is-collapsible[data-expanded="true"] .lab-card-head::after {
    content: "-";
}

.lab-card.is-collapsible {
    min-height: 0;
}

.lab-card.is-collapsible .lab-facts,
.lab-card.is-collapsible .lab-advanced,
.lab-card.is-collapsible .lab-presets {
    display: none;
}

.lab-card.is-collapsible[data-expanded="true"] .lab-advanced,
.lab-card.is-collapsible[data-expanded="true"] .lab-presets {
    display: grid;
}

.lab-card.is-collapsible[data-expanded="true"]:has(.lab-advanced[open]) .lab-facts {
    display: grid;
}

@media (max-width: 980px) {
    .brand-block {
        gap: 12px;
        padding-inline: 0;
    }

    .launcher-shell::before {
        height: clamp(420px, 58vh, 680px);
    }

    .brand-title-row {
        display: grid;
        gap: 8px;
        white-space: normal;
    }

    .launcher-spirit,
    .launcher-spirit p {
        max-width: 760px;
    }

    .extra-mode-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lab-card-grid {
        grid-template-columns: 1fr;
    }

    .dimension-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "d2"
            "t2"
            "d3"
            "t3"
            "d4";
    }

    .dimension-card {
        min-height: 320px;
    }
}

@media (max-width: 620px) {
    body {
        background-attachment: scroll;
    }

    .launcher-corner-row {
        align-items: flex-start;
        margin: -8px 0 -2px;
    }

    .launcher-official-links,
    .launcher-author {
        font-size: 12px;
    }

    .launcher-shell {
        align-items: start;
    }

    .dimension-card {
        min-height: 280px;
    }

    .dimension-visual {
        min-height: 136px;
    }

    .board-plane {
        padding: 8px 18px 4px;
    }

    .board-plane-grid {
        width: min(88%, 250px);
        transform: perspective(640px) rotateX(50deg) rotateZ(-8deg) scale(0.82);
    }

    .game-option {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .extra-mode-card:not(.mode-family-card) {
        display: grid;
        align-items: start;
    }

    .extra-mode-row {
        grid-template-columns: 1fr;
    }

    .lab-facts,
    .lab-presets {
        grid-template-columns: 1fr;
    }

    .extra-mode-card.lab-card {
        grid-template-columns: 1fr;
    }

    .advanced-sandbox-card {
        grid-column: auto;
    }

    .game-count-badge {
        justify-self: start;
    }

    #launcherTorusCanvas {
        width: 145%;
        max-width: none;
        margin-left: -22.5%;
        opacity: 0.58;
    }

    .launcher-feedback {
        flex-direction: column;
        align-items: flex-end;
        gap: 6px;
    }

    .launcher-feedback-button {
        min-height: 28px;
        padding: 0 8px;
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #launcherTorusCanvas {
        opacity: 0.62;
    }
}

.launcher-account {
    position: fixed;
    right: 16px;
    bottom: 90px;
    top: auto;
    z-index: 1000;
    display: grid;
    justify-items: end;
    gap: 8px;
    pointer-events: auto;
}

.launcher-account-button {
    width: 62px;
    min-width: 62px;
    min-height: 54px;
    display: grid;
    grid-template-rows: auto auto;
    align-items: center;
    justify-items: center;
    gap: 3px;
    padding: 6px 7px;
    border: 1px solid rgba(56, 189, 248, 0.5);
    border-radius: 14px;
    background: rgba(11, 16, 22, 0.9);
    color: var(--text);
    cursor: pointer;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.34);
    text-align: center;
}

.launcher-account-button:hover,
.launcher-account-button:focus-visible {
    border-color: rgba(245, 182, 71, 0.72);
    outline: none;
}

.launcher-account-button span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    line-height: 1.05;
    font-weight: 950;
}

.launcher-account-button small {
    max-width: 100%;
    color: rgba(245, 182, 71, 0.92);
    font-size: 9px;
    line-height: 1;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.launcher-account-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    top: auto;
    z-index: 1001;
    width: min(340px, calc(100vw - 32px));
    max-height: min(680px, calc(100vh - 170px));
    overflow: auto;
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(56, 189, 248, 0.46);
    border-radius: 10px;
    background: rgba(15, 20, 27, 0.97);
    color: var(--text);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
}

.launcher-account-menu[hidden] {
    display: none;
}

.launcher-account-menu p {
    margin: 0;
    color: rgba(237, 244, 246, 0.86);
    font-size: 12px;
    line-height: 1.45;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.launcher-account-menu small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
    font-weight: 800;
}

.launcher-account-menu-button {
    min-height: 36px;
    border: 1px solid rgba(168, 180, 188, 0.32);
    border-radius: 8px;
    background: rgba(8, 12, 18, 0.84);
    color: var(--text);
    cursor: pointer;
    font-weight: 950;
}

.launcher-account-menu-button.primary {
    border-color: rgba(56, 189, 248, 0.62);
    background: rgba(56, 189, 248, 0.12);
}

.launcher-account-menu-button.danger {
    border-color: rgba(248, 113, 113, 0.62);
    background: rgba(127, 29, 29, 0.38);
    color: #fecaca;
}

.launcher-account-menu-button:hover,
.launcher-account-menu-button:focus-visible {
    border-color: rgba(245, 182, 71, 0.72);
    outline: none;
}

.launcher-account-menu-button[hidden] {
    display: none;
}

.launcher-display-name-editor {
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    background: rgba(7, 12, 18, 0.5);
}
.launcher-display-name-editor[hidden] {
    display: none;
}
.launcher-display-name-editor label,
.launcher-profile-grid span {
    color: rgba(245, 182, 71, 0.94);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.launcher-account-section-title {
    color: rgba(237, 244, 246, 0.94);
    font-size: 13px;
    font-weight: 950;
}
.launcher-account-button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.launcher-account-link-button {
    justify-self: start;
    min-height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #7dd3fc;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.launcher-security-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}
.launcher-display-name-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}
.launcher-display-name-row input,
.launcher-display-name-editor > input,
.launcher-display-name-editor select,
.launcher-profile-grid input,
.launcher-display-name-editor textarea {
    min-width: 0;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    background: rgba(2, 6, 12, 0.72);
    color: var(--text);
    font: inherit;
}
.launcher-display-name-editor textarea {
    min-height: 78px;
    padding: 9px 10px;
    resize: vertical;
}
.launcher-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.launcher-profile-grid label {
    display: grid;
    gap: 6px;
}
.launcher-profile-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.launcher-profile-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--accent);
}
.launcher-profile-check span {
    min-width: 0;
    color: rgba(237, 244, 246, 0.86);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.launcher-profile-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: 8px;
    background: rgba(8, 12, 18, 0.62);
}
.launcher-profile-meta span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.launcher-profile-meta strong {
    color: rgba(237, 244, 246, 0.92);
    font-size: 12px;
}
.launcher-recent-games {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: 10px;
    background: rgba(2, 6, 12, 0.34);
}
.launcher-recent-games-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.launcher-recent-games-head strong {
    color: rgba(245, 182, 71, 0.94);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.launcher-mini-button {
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 7px;
    background: rgba(8, 12, 18, 0.84);
    color: var(--text);
    cursor: pointer;
    font-size: 11px;
    font-weight: 900;
}
.launcher-recent-games-list {
    display: grid;
    gap: 8px;
}
.launcher-recent-game {
    display: grid;
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: rgba(8, 12, 18, 0.62);
}
.launcher-recent-game-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.launcher-recent-game-main strong,
.launcher-profile-link {
    color: rgba(237, 244, 246, 0.94);
    font-size: 12px;
    font-weight: 950;
}
.launcher-profile-link {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    text-align: left;
    text-decoration: underline;
    text-decoration-color: rgba(56, 189, 248, 0.5);
}
.launcher-recent-game-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.launcher-recent-game-meta span {
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.1);
    color: rgba(237, 244, 246, 0.82);
    font-size: 10px;
    font-weight: 850;
}
.launcher-recent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.launcher-recent-actions a,
.launcher-recent-actions button {
    min-height: 28px;
    padding: 5px 8px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 7px;
    background: rgba(2, 6, 12, 0.7);
    color: var(--text);
    font-size: 11px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}
.launcher-recent-profile {
    padding: 8px;
    border: 1px solid rgba(245, 182, 71, 0.22);
    border-radius: 8px;
    background: rgba(245, 182, 71, 0.08);
    color: rgba(237, 244, 246, 0.88);
    font-size: 11px;
    line-height: 1.45;
}
.launcher-display-name-row input:focus-visible,
.launcher-display-name-editor > input:focus-visible,
.launcher-display-name-editor select:focus-visible,
.launcher-profile-grid input:focus-visible,
.launcher-display-name-editor textarea:focus-visible {
    border-color: rgba(56, 189, 248, 0.72);
    outline: none;
}

@media (max-width: 700px) {
    .launcher-account {
        right: 12px;
        bottom: 88px;
        top: auto;
    }

    .launcher-account-button {
        width: 58px;
        min-width: 58px;
        min-height: 50px;
    }

    .launcher-account-menu {
        max-height: min(620px, calc(100vh - 150px));
    }

    .launcher-profile-grid {
        grid-template-columns: 1fr;
    }

    .launcher-account-button-row,
    .launcher-security-head {
        grid-template-columns: 1fr;
    }
}


/* Life & Evolution Worlds launcher section */
.life-mode-panel {
    border-color: rgba(34, 197, 94, 0.36);
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.13), transparent 34%),
        rgba(9, 18, 24, 0.88);
}

.life-world-card {
    min-height: 164px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(180px, 0.36fr);
    align-items: center;
    gap: 18px;
}

.life-world-visual {
    width: 92px;
    height: 92px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    padding: 10px;
    border: 1px solid rgba(34, 197, 94, 0.36);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(56, 189, 248, 0.1)),
        rgba(6, 12, 18, 0.76);
    box-shadow: inset 0 0 24px rgba(34, 197, 94, 0.1);
}

.life-world-visual span {
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.18);
    box-shadow: 0 0 0 rgba(34, 197, 94, 0);
}

.life-world-visual span:nth-child(2),
.life-world-visual span:nth-child(5),
.life-world-visual span:nth-child(6),
.life-world-visual span:nth-child(10),
.life-world-visual span:nth-child(11),
.life-world-visual span:nth-child(15) {
    background: rgba(34, 197, 94, 0.88);
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.58);
}

.life-world-actions {
    display: grid;
    gap: 10px;
}

.life-world-info p {
    margin: 0;
    color: rgba(226, 236, 238, 0.82);
    font-size: 12px;
    line-height: 1.4;
}

.life-world-mode-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.life-world-mode-strip span {
    padding: 6px 9px;
    border: 1px solid rgba(34, 197, 94, 0.24);
    border-radius: 999px;
    background: rgba(6, 12, 18, 0.5);
    color: rgba(226, 236, 238, 0.82);
    font-size: 11px;
    font-weight: 800;
}

@media (max-width: 880px) {
    .life-world-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .life-world-visual {
        width: 100%;
        max-width: 140px;
    }
}


/* Final Life launcher layout: same visual weight as Labs, fully opaque */
.life-evolution-worlds {
    margin-top: 18px;
}

.life-mode-panel {
    border-color: rgba(34, 197, 94, 0.72);
    background: #0b151f;
    opacity: 1;
}

.life-mode-panel .algebraic-mode-heading {
    min-height: 52px;
}

.life-world-card {
    min-height: 282px;
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    align-content: start;
    gap: 16px;
    padding: 18px;
    background: #0e1823;
    border-color: rgba(34, 197, 94, 0.52);
    opacity: 1;
}

.life-world-card .extra-mode-copy {
    display: grid;
    gap: 8px;
}

.life-world-visual {
    width: 100%;
    height: 116px;
    max-width: none;
    border-color: rgba(34, 197, 94, 0.72);
    background: #07111a;
    opacity: 1;
}

.life-world-mode-strip span {
    background: #07111a;
    border-color: rgba(34, 197, 94, 0.46);
    opacity: 1;
}

.life-world-actions .lab-preset {
    background: #0a1823;
    opacity: 1;
}


/* Fix Life launcher preview deformation and show neighborhood choices instead of geometry chips */
.life-world-visual {
    width: min(100%, 320px);
    height: auto;
    aspect-ratio: 1.35 / 1;
    justify-self: start;
    grid-template-columns: repeat(4, minmax(18px, 34px));
    grid-auto-rows: minmax(18px, 34px);
    justify-content: center;
    align-content: center;
}

.life-world-visual span {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
}

.life-neighborhood-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.life-neighborhood-options .lab-preset {
    min-height: 56px;
    justify-content: center;
    text-align: center;
    background: #0a1823;
    border-color: rgba(56, 189, 248, 0.42);
}

@media (max-width: 820px) {
    .life-neighborhood-options {
        grid-template-columns: 1fr;
    }
}

.life-world-card {
    padding: 0;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 0.32fr);
    grid-template-areas:
        "main info"
        "modes modes";
    align-items: stretch;
}
.life-world-main-link {
    grid-area: main;
    display: grid;
    grid-template-columns: minmax(150px, 0.42fr) minmax(260px, 1fr);
    gap: 18px;
    align-items: center;
    min-height: 190px;
    padding: 20px;
    color: inherit;
    text-decoration: none;
}
.life-world-main-link:hover,
.life-world-main-link:focus-visible {
    outline: none;
    background: rgba(56, 189, 248, 0.055);
}
.life-world-info-panel {
    grid-area: info;
    display: grid;
    gap: 8px;
    align-content: start;
    margin: 20px 20px 20px 0;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.life-world-info-panel summary {
    width: max-content;
    cursor: pointer;
    color: rgba(125, 211, 252, 0.94);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    text-decoration: none;
    list-style: none;
}
.life-world-info-panel summary::-webkit-details-marker {
    display: none;
}
.life-world-info-panel summary::before {
    content: "\25B8";
    display: inline-block;
    margin-right: 6px;
    text-decoration: none;
    transform: translateY(-1px);
}
.life-world-info-panel[open] summary::before {
    content: "\25BE";
}
.life-world-info-panel span {
    color: rgba(225, 236, 242, 0.82);
    font-weight: 800;
    line-height: 1.55;
    text-transform: none;
}

.life-world-card .life-neighborhood-options {
    grid-area: modes;
    padding: 0 20px 20px;
}
@media (max-width: 960px) {
    .life-world-card {
        grid-template-columns: 1fr;
        grid-template-areas:
            "main"
            "info"
            "modes";
    }

    .life-world-main-link {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 14px;
    }

    .life-world-info-panel {
        margin: 0 14px 14px;
    }

    .life-world-copy small {
        display: none;
    }
}

/* Labs info is an inline help link above the option stack, not a large button. */
.lab-card .lab-advanced {
    display: block;
    margin: 0 0 8px;
    padding: 0;
    align-self: start;
}

.lab-card .lab-advanced summary {
    width: auto;
    max-width: max-content;
    min-height: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(125, 211, 252, 0.94);
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    text-transform: none;
    list-style: none;
}

.lab-card .lab-advanced summary::-webkit-details-marker {
    display: none;
}

.lab-card .lab-advanced summary::before {
    content: "\25B8";
    display: inline-block;
    margin-right: 6px;
    text-decoration: none;
    transform: translateY(-1px);
}

.lab-card .lab-advanced[open] summary::before {
    content: "\25BE";
}

.lab-card .lab-advanced summary:hover,
.lab-card .lab-advanced summary:focus-visible {
    color: rgba(245, 182, 71, 0.96);
    outline: none;
}

.lab-card .lab-advanced[open],
.lab-card .lab-advanced[open] summary {
    padding-top: 0;
    margin-bottom: 8px;
}

/* Current Topoboard Labs tool entries. */
#strategy-systems-labs .lab-card-grid {
    align-items: stretch;
}
#strategy-systems-labs .current-lab-card {
    min-height: 168px;
    align-items: stretch;
    color: inherit;
    text-decoration: none;
}
#strategy-systems-labs .labs-primary-entry {
    grid-column: 1 / -1;
    min-height: 240px;
    padding: clamp(22px, 2.8vw, 34px);
    border-color: rgba(125, 211, 252, 0.62);
    background:
        linear-gradient(90deg, rgba(56, 189, 248, 0.14) 1px, transparent 1px) 0 0 / 34px 34px,
        linear-gradient(rgba(245, 182, 71, 0.09) 1px, transparent 1px) 0 0 / 34px 34px,
        linear-gradient(135deg, rgba(13, 24, 36, 0.96), rgba(9, 14, 24, 0.94));
}
#strategy-systems-labs .current-lab-card .extra-mode-copy {
    display: grid;
    gap: 10px;
}
#strategy-systems-labs .labs-primary-entry .extra-mode-copy {
    align-content: center;
    max-width: 980px;
    gap: 14px;
}
#strategy-systems-labs .labs-primary-badge {
    width: max-content;
    max-width: 100%;
    padding: 6px 11px;
    border: 1px solid rgba(245, 182, 71, 0.45);
    border-radius: 999px;
    color: #ffd56b;
    background: rgba(245, 182, 71, 0.12);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}
#strategy-systems-labs .current-lab-card strong {
    color: #f8fbff;
    font-size: clamp(24px, 2.6vw, 36px);
    line-height: 1.08;
}
#strategy-systems-labs .labs-primary-entry strong {
    font-size: clamp(34px, 4.6vw, 64px);
    line-height: 0.98;
}
#strategy-systems-labs .current-lab-card small {
    color: #b8c6d8;
    font-size: 0.96rem;
    line-height: 1.45;
}
#strategy-systems-labs .labs-primary-entry small {
    max-width: 820px;
    color: rgba(229, 236, 246, 0.9);
    font-size: clamp(1rem, 1.4vw, 1.24rem);
}

@media (max-width: 620px) {
    #strategy-systems-labs .labs-primary-entry {
        min-height: 220px;
        padding: 22px;
    }

    #strategy-systems-labs .labs-primary-entry strong {
        font-size: clamp(30px, 11vw, 42px);
    }

    #strategy-systems-labs .labs-primary-entry small {
        font-size: 1rem;
    }
}

.lab-card.is-collapsible:not([data-expanded="true"]) .lab-facts,
.lab-card.is-collapsible:not([data-expanded="true"]) .lab-advanced,
.lab-card.is-collapsible:not([data-expanded="true"]) .lab-presets {
    display: none;
}

.lab-card.is-collapsible[data-expanded="true"] .lab-advanced,
.lab-card.is-collapsible[data-expanded="true"] .lab-presets {
    display: grid;
}

.lab-card.is-collapsible[data-expanded="true"]:has(.lab-advanced[open]) .lab-facts {
    display: grid;
}
.jump-mode-stack{display:grid;gap:.55rem;margin-top:.55rem}.jump-option-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center}.jump-option-card em{display:block;margin-top:.35rem;color:#8fc7ff;font-size:.76rem;font-style:normal}.jump-card-actions{display:flex;gap:.4rem;align-items:center}.jump-card-actions .lab-preset{padding:.48rem .7rem;min-width:auto}.jump-lab-card .extra-mode-copy small{display:block;color:#b8c6d8;margin-top:.25rem}@media(max-width:760px){.jump-option-card{grid-template-columns:1fr}.jump-card-actions{margin-top:.5rem}}

/* Jump and +1D modes are first-class dimension-card entries, not a separate world page. */
.dimension-card .game-option {
    align-self: stretch;
    min-height: 64px;
    padding-top: 12px;
}
.space-time-dimension {
    border-color: rgba(125, 211, 252, 0.36);
    background:
        radial-gradient(circle at 20% 16%, rgba(56, 189, 248, 0.16), transparent 42%),
        rgba(13, 20, 32, 0.92);
}
.time-plane-preview,
.time-volume-preview {
    display: grid;
    place-items: center;
    background:
        linear-gradient(90deg, rgba(125, 211, 252, 0.16) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(rgba(248, 199, 93, 0.12) 1px, transparent 1px) 0 0 / 28px 28px,
        radial-gradient(circle at center, rgba(56, 189, 248, 0.18), transparent 58%),
        rgba(7, 13, 24, 0.88);
}
.time-plane-preview {
    isolation: isolate;
    perspective: 760px;
}
.time-plane-preview::before {
    content: "";
    position: absolute;
    width: 84%;
    height: 58%;
    border: 1px solid rgba(125, 211, 252, 0.28);
    border-radius: 12px;
    background:
        linear-gradient(90deg, rgba(248, 199, 93, 0.58) 1px, transparent 1px) 50% 0 / 24px 100%,
        linear-gradient(rgba(125, 211, 252, 0.45) 1px, transparent 1px) 0 50% / 100% 24px,
        radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.22), transparent 58%);
    transform: rotateX(63deg) rotateZ(-17deg);
    box-shadow: 0 28px 42px rgba(0, 0, 0, 0.32);
    opacity: 0.82;
    animation: planarWaveSheet 6.4s ease-in-out infinite;
}
.time-plane-preview span {
    position: absolute;
    width: var(--wave-size, 28%);
    aspect-ratio: 1;
    border: 2px solid rgba(125, 211, 252, 0.68);
    border-left-color: rgba(248, 199, 93, 0.82);
    border-bottom-color: rgba(248, 199, 93, 0.16);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
    opacity: 0;
    transform: rotateX(63deg) rotateZ(calc(-17deg + var(--wave-turn, 0deg))) scale(0.22);
    animation: planarOutwardTwist 4.8s ease-out infinite;
    animation-delay: var(--wave-delay, 0s);
    z-index: 1;
}
.time-plane-preview span:nth-child(1) { --wave-size: 26%; --wave-turn: -14deg; --wave-delay: 0s; }
.time-plane-preview span:nth-child(2) { --wave-size: 34%; --wave-turn: 12deg; --wave-delay: .74s; }
.time-plane-preview span:nth-child(3) { --wave-size: 44%; --wave-turn: -24deg; --wave-delay: 1.48s; }
.time-plane-preview span:nth-child(4) { --wave-size: 56%; --wave-turn: 20deg; --wave-delay: 2.22s; }
.time-volume-preview {
    isolation: isolate;
    perspective: 900px;
    transform-style: preserve-3d;
}
.time-volume-preview canvas,
.static-cube-stack canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.time-volume-preview::before {
    content: "";
    position: absolute;
    width: 72%;
    aspect-ratio: 1;
    border: 1px solid rgba(248, 199, 93, 0.2);
    border-radius: 8px;
    background: radial-gradient(circle at 50% 48%, rgba(125, 211, 252, 0.18), transparent 62%);
    transform: rotateX(58deg) rotateZ(-35deg) translateY(12px);
    filter: blur(0.2px);
    opacity: 0.72;
    z-index: 0;
}
.time-volume-preview span {
    position: absolute;
    width: 58%;
    aspect-ratio: 1;
    border: 1px solid rgba(125, 211, 252, 0.42);
    border-radius: 6px;
    background:
        repeating-linear-gradient(90deg, rgba(125, 211, 252, 0.38) 0 1px, transparent 1px 18px),
        repeating-linear-gradient(0deg, rgba(248, 199, 93, 0.28) 0 1px, transparent 1px 18px),
        rgba(7, 13, 24, 0.18);
    box-shadow: 0 0 22px rgba(56, 189, 248, 0.13);
    transform: rotateX(58deg) rotateZ(-35deg) translateY(var(--grid-y, 0px)) translateZ(var(--grid-z, 0px)) scale(var(--grid-scale, 1));
    animation: cubicGridBreath 9.2s ease-in-out infinite;
    animation-delay: var(--grid-delay, 0s);
}
.time-volume-preview span:nth-child(1) { --grid-y: 24px; --grid-z: -28px; --grid-scale: 1.02; --grid-delay: -.6s; width: 66%; }
.time-volume-preview span:nth-child(2) { --grid-y: 0px; --grid-z: 0px; --grid-scale: .94; --grid-delay: -1.7s; width: 56%; }
.time-volume-preview span:nth-child(3) { --grid-y: -24px; --grid-z: 28px; --grid-scale: .84; --grid-delay: -2.8s; width: 47%; }
@keyframes planarWaveSheet {
    0%, 100% { transform: rotateX(63deg) rotateZ(-17deg) skewX(0deg); }
    50% { transform: rotateX(58deg) rotateZ(-25deg) skewX(-7deg); }
}
@keyframes planarOutwardTwist {
    0% { opacity: 0; transform: rotateX(63deg) rotateZ(calc(-17deg + var(--wave-turn, 0deg))) scale(0.2); }
    18% { opacity: 0.86; }
    72% { opacity: 0.56; }
    100% { opacity: 0; transform: rotateX(58deg) rotateZ(calc(62deg + var(--wave-turn, 0deg))) scale(1.65); }
}
@keyframes cubicGridBreath {
    0%, 100% {
        transform: rotateX(58deg) rotateZ(-35deg) translate3d(0, var(--grid-y, 0px), var(--grid-z, 0px)) scale(var(--grid-scale, 1));
    }
    30% {
        transform: rotateX(64deg) rotateZ(-28deg) translate3d(3px, calc(var(--grid-y, 0px) - 4px), calc(var(--grid-z, 0px) + 14px)) scale(1.06);
    }
    52% {
        transform: rotateX(56deg) rotateZ(-42deg) translate3d(-3px, calc(var(--grid-y, 0px) + 3px), calc(var(--grid-z, 0px) - 8px)) scale(0.95);
    }
    72% {
        transform: rotateX(61deg) rotateZ(-31deg) translate3d(2px, calc(var(--grid-y, 0px) - 2px), calc(var(--grid-z, 0px) + 6px)) scale(1.02);
    }
}
@media (min-width: 1180px) {
    .dimension-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .audience-entry-heading,
    .audience-entry-grid {
        grid-template-columns: 1fr;
    }

    .audience-card {
        min-height: 0;
    }
}
