/* Fonts */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter-var.woff2') format('woff2');
}

@font-face {
    font-family: 'Instrument Serif';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/instrument-serif.woff2') format('woff2');
}

@font-face {
    font-family: 'Instrument Serif';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/instrument-serif-italic.woff2') format('woff2');
}

/* Tokens – die Seite ist bewusst nur dunkel */
:root {
    --bg: #14130f;
    --bg-alt: #1a1814;
    --surface: #211e19;
    --ink: #f1ece2;
    --muted: #a9a194;
    --line: rgba(241, 236, 226, 0.12);
    --accent: #e0a458;
    --accent-hover: #ebb877;
    --accent-ink: #1c1a16;
    --accent-soft: rgba(224, 164, 88, 0.12);
    --ok: #12b76a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.3), 0 18px 40px rgba(0, 0, 0, 0.4);

    --dark: #100f0c;
    --dark-ink: #f1ece2;
    --dark-muted: #a9a194;
    --dark-line: rgba(241, 236, 226, 0.12);
    --gold: #e0a458;

    --font-serif: 'Instrument Serif', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;

    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-full: 999px;

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --header-h: 76px;
    --gutter: clamp(1rem, 4vw, 2.5rem);

    color-scheme: dark;
}

/* Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: var(--header-h);
}

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
ul[role="list"], ol[role="list"] { list-style: none; }

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

em { font-style: italic; }
h1 em, h2 em { color: var(--accent); }
p { text-wrap: pretty; }

kbd {
    display: inline-block;
    min-width: 1.6em;
    padding: 0.05em 0.4em;
    border: 1px solid currentColor;
    border-bottom-width: 2px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.8em;
    line-height: 1.4;
    text-align: center;
    opacity: 0.8;
}

::selection { background: var(--accent); color: var(--accent-ink); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--muted) 45%, transparent);
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--accent); }
html::-webkit-scrollbar-track { background: var(--bg); }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.skip-link {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 2000;
    padding: 0.75rem 1.25rem;
    background: var(--ink);
    color: var(--bg);
    border-radius: var(--radius-full);
    font-weight: 600;
    text-decoration: none;
    transform: translateY(-200%);
    transition: transform 0.3s var(--ease);
}

.skip-link:focus { transform: translateY(0); }

/* Layout & typography */
.container {
    width: 100%;
    max-width: 1240px;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section {
    padding-block: clamp(5rem, 10vw, 8.5rem);
    content-visibility: auto;
    contain-intrinsic-size: auto 1000px;
}

.section--alt { background-color: var(--bg-alt); }

.section--dark {
    --ink: var(--dark-ink);
    --muted: var(--dark-muted);
    --line: var(--dark-line);
    --accent: var(--gold);
    --accent-ink: #1c1a16;
    --surface: #1d1b16;
    position: relative;
    /* Weich in den Seitenhintergrund übergehen statt harter Kante oben und unten */
    background: linear-gradient(180deg, var(--bg), var(--dark) 12rem, var(--dark) calc(100% - 12rem), var(--bg));
    color: var(--ink);
    overflow: hidden;
    isolation: isolate;
}

.section--dark::before {
    content: '';
    position: absolute;
    inset: 0 -15% auto auto;
    z-index: -1;
    width: 60vmax;
    height: 60vmax;
    background: radial-gradient(closest-side, rgba(224, 164, 88, 0.14), transparent);
    /* Leuchten läuft zu den Section-Rändern hin aus – sonst schneidet overflow: hidden es sichtbar ab */
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
    pointer-events: none;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

.eyebrow::before {
    content: '';
    width: 1.75rem;
    height: 1px;
    background: currentColor;
}

.eyebrow--light { color: rgba(255, 255, 255, 0.85); }

.section-title {
    font-size: clamp(2.4rem, 5vw, 4rem);
    margin-bottom: 1.25rem;
}

.section-sub,
.lead {
    font-size: 1.125rem;
    color: var(--muted);
    max-width: 58ch;
}

.lead strong { color: var(--ink); font-weight: 600; }

.section-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }

@media (min-width: 900px) {
    .section-head {
        display: grid;
        grid-template-columns: 1.2fr 1fr;
        column-gap: 4rem;
        align-items: end;
    }

    .section-head .eyebrow,
    .section-head .section-title { grid-column: 1; }
    .section-head .section-title { margin-bottom: 0; }

    .section-head .section-sub {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: end;
        justify-self: end;
        max-width: 42ch;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 48px;
    padding: 0.85rem 1.6rem;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    font-size: 0.975rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), translate 0.3s var(--ease);
}

.btn:hover { translate: 0 -2px; }
.btn:active { translate: 0 0; }
.btn .icon { width: 1.1em; height: 1.1em; transition: transform 0.3s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }

.btn--sm { min-height: 40px; padding: 0.5rem 1.1rem; font-size: 0.875rem; }
.btn--block { width: 100%; }

.btn--accent {
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}

.btn--accent:hover {
    background: var(--accent-hover, var(--accent));
    box-shadow: 0 14px 30px -10px color-mix(in srgb, var(--accent) 80%, transparent);
}

.btn--light { background: #fff; color: #1c1a16; }
.btn--light:hover { background: #f6f2ea; }

.btn--glass {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.btn--glass:hover { border-color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.12); }

.magnetic { will-change: transform; }

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    transition: background-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.icon-btn:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.icon-btn--sm { width: 36px; height: 36px; }
.icon-btn--sm .icon { width: 1.05rem; height: 1.05rem; }

/* Scroll progress */
.progress {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1100;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), #f3c98b);
    transform-origin: 0 50%;
    transform: scaleX(var(--progress, 0));
    pointer-events: none;
}

/* Header & navigation */
.header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1000;
    height: var(--header-h);
    color: #fff;
    transition: background-color 0.4s var(--ease), color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.header.is-scrolled {
    color: var(--ink);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    box-shadow: 0 1px 0 var(--line);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    height: 100%;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    position: relative;
    z-index: 2;
}

.brand__logo {
    width: 38px;
    height: 38px;
    color: currentColor;
    transition: transform 0.6s var(--ease);
}

/* Glyph lives inside <symbol>: only inherited custom properties reach it */
.logo__glyph { fill: var(--logo-ink, #1c1a16); }
.header.is-scrolled .brand__logo,
.footer .brand__logo { --logo-ink: var(--bg); }
.brand:hover .brand__logo { transform: rotate(-8deg) scale(1.06); }
.brand.is-spinning .brand__logo { animation: spin 0.8s var(--ease); }

@keyframes spin { to { transform: rotate(360deg); } }

.brand__name {
    font-family: var(--font-serif);
    font-size: 1.85rem;
    line-height: 1;
    letter-spacing: -0.01em;
    transition: letter-spacing 0.5s var(--ease);
}

.brand:hover .brand__name { letter-spacing: 0.04em; }

.nav__list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav__link {
    position: relative;
    display: block;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.925rem;
    font-weight: 500;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.3s var(--ease), background-color 0.3s var(--ease);
}

.nav__link:hover { opacity: 1; background: color-mix(in srgb, currentColor 9%, transparent); }

.nav__link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0.15rem;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    transform: translateX(-50%) scale(0);
    transition: transform 0.3s var(--ease);
}

.nav__link[aria-current="true"] { opacity: 1; }
.nav__link[aria-current="true"]::after { transform: translateX(-50%) scale(1); }

.header__actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    position: relative;
    z-index: 2;
}

.header__cta { margin-left: 0.4rem; }


.menu-toggle,
.nav__cta { display: none; }

.menu-toggle__bars {
    display: grid;
    gap: 6px;
    width: 22px;
}

.menu-toggle__bars span {
    display: block;
    height: 1.5px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.4s var(--ease);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

@media (max-width: 960px) {
    .menu-toggle { display: inline-grid; }

    .nav {
        position: fixed;
        inset: 0;
        display: grid;
        place-items: center;
        align-content: center;
        gap: 2.5rem;
        padding: calc(var(--header-h) + 1rem) var(--gutter) 2rem;
        background: var(--bg);
        color: var(--ink);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s var(--ease), visibility 0.4s;
    }

    .nav__list {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }

    .nav__link {
        font-family: var(--font-serif);
        font-size: clamp(2.25rem, 9vw, 3.25rem);
        font-weight: 400;
        line-height: 1.15;
        padding: 0.2rem 1rem;
        opacity: 0;
        transform: translateY(16px);
        transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
    }

    .nav__link::after { display: none; }
    .nav__link[aria-current="true"] { color: var(--accent); }

    .nav__cta {
        display: inline-flex;
        opacity: 0;
        transform: translateY(16px);
        transition: opacity 0.5s var(--ease) 0.25s, transform 0.5s var(--ease) 0.25s;
    }

    .menu-open .nav__cta,
    .menu-open .nav__link { opacity: 1; transform: none; }
    .menu-open .nav { opacity: 1; visibility: visible; }
    .menu-open .nav__list li:nth-child(2) .nav__link { transition-delay: 0.04s; }
    .menu-open .nav__list li:nth-child(3) .nav__link { transition-delay: 0.08s; }
    .menu-open .nav__list li:nth-child(4) .nav__link { transition-delay: 0.12s; }
    .menu-open .nav__list li:nth-child(5) .nav__link { transition-delay: 0.16s; }

    .menu-open .header { color: var(--ink); background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; transform: none; }
    .menu-open .brand__logo { --logo-ink: var(--bg); }
    .menu-open body { overflow: hidden; }
}

@media (max-width: 560px) {
    .header__cta { display: none; }
    .brand__name { font-size: 1.6rem; }
}

/* Hero */
.hero {
    --hero-ink: #f6f2ea;
    position: relative;
    display: grid;
    align-items: end;
    min-height: 100vh;
    min-height: 100svh;
    padding-block: calc(var(--header-h) + 3rem) clamp(4.5rem, 8vw, 6rem);
    color: var(--hero-ink);
    background: #000;
    overflow: hidden;
    isolation: isolate;
}

.hero__media {
    position: absolute;
    inset: 0 0 0 auto;
    z-index: -3;
    width: 100%;
}

.hero__media picture,
.hero__img {
    width: 100%;
    height: 100%;
}

.hero__img {
    object-fit: cover;
    object-position: 50% 20%;
    animation: ken-burns 18s var(--ease) both;
}

.hero__media::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.05) 30%, rgba(0, 0, 0, 0.55) 62%, rgba(0, 0, 0, 0.94) 100%);
}

@media (min-width: 900px) {
    .hero__media {
        width: min(52vw, 820px);
        right: max(0px, calc((100vw - 1500px) / 2));
    }

    .hero__media picture { transform: translateY(-9%); }
    .hero__img { object-position: 50% 30%; }

    .hero__media::after {
        background:
            linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.6) 22%, rgba(0, 0, 0, 0) 55%),
            linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 60%, #000 100%);
    }
}

@keyframes ken-burns {
    from { transform: scale(1.08); }
    to { transform: scale(1); }
}

.hero__spotlight {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(600px circle at var(--mx, 30%) var(--my, 40%), rgba(224, 164, 88, 0.16), transparent 60%);
    pointer-events: none;
}

.hero__grid-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 20% 60%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 20% 60%, #000 20%, transparent 75%);
    pointer-events: none;
}

.hero__inner {
    display: grid;
    gap: 2.5rem;
    align-items: end;
}

@media (min-width: 1080px) {
    .hero__inner { grid-template-columns: 1.4fr minmax(300px, 380px); }
}

.hero__content { max-width: 760px; }

.hero__title {
    font-size: clamp(3.8rem, 11vw, 8.5rem);
    line-height: 0.92;
    letter-spacing: -0.025em;
    margin-bottom: 1.75rem;
}

.hero__title em { color: var(--gold); }

.hero__title .line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.08em;
    margin-bottom: -0.08em;
}

.hero__title .line > span {
    display: inline-block;
    animation: rise 1.1s var(--ease) both;
}

.hero__title .line:nth-child(2) > span { animation-delay: 0.12s; }

@keyframes rise {
    from { transform: translateY(105%); }
    to { transform: none; }
}

.hero__cursor {
    display: inline-block;
    margin-left: 0.04em;
    color: var(--gold);
    font-style: normal;
    animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero__eyebrow,
.hero__text,
.hero__quote,
.hero__actions,
.hero-card {
    animation: fade-up 1s var(--ease) both;
}

.hero__text { animation-delay: 0.25s; }
.hero__quote { animation-delay: 0.35s; }
.hero__actions { animation-delay: 0.45s; }
.hero-card { animation-delay: 0.6s; }

@keyframes fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

.hero__text {
    font-size: clamp(1.1rem, 1.8vw, 1.3rem);
    line-height: 1.55;
    color: rgba(246, 242, 234, 0.86);
    margin-bottom: 1.25rem;
}

.typed {
    color: #fff;
    font-weight: 600;
    background: linear-gradient(transparent 62%, rgba(224, 164, 88, 0.45) 62%);
    border-right: 2px solid var(--gold);
    padding-right: 2px;
    white-space: nowrap;
}

.hero__quote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.2rem;
    color: rgba(246, 242, 234, 0.75);
    margin-bottom: 2.25rem;
}

.hero__quote cite { font-family: var(--font-sans); font-style: normal; font-size: 0.85rem; opacity: 0.7; white-space: nowrap; }

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.glass {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

.hero-card {
    padding: 1.5rem;
    color: var(--hero-ink);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.8rem 0.35rem 0.65rem;
    border-radius: var(--radius-full);
    background: rgba(18, 183, 106, 0.14);
    color: #6ce9a6;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.status__dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ok);
}

.status__dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
    75%, 100% { transform: scale(2.6); opacity: 0; }
}

.hero-card__title {
    margin: 0.9rem 0 1.1rem;
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 3vw, 2.75rem);
    line-height: 1.05;
}

.hero-card__title strong { font-weight: 400; color: var(--gold); font-style: italic; }

.hero-card__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding-block: 1rem;
    border-block: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-card__stats dt {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(246, 242, 234, 0.6);
}

.hero-card__stats dd {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    line-height: 1.2;
}

.xp { margin-top: 1rem; font-family: var(--font-mono); font-size: 0.72rem; }

.xp__label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.4rem;
    color: rgba(246, 242, 234, 0.6);
}

.xp__label b { color: var(--gold); }

.xp__bar {
    height: 8px;
    padding: 1px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.xp__fill {
    display: block;
    height: 100%;
    width: calc(var(--xp, 0.2) * 100%);
    border-radius: 3px;
    background: repeating-linear-gradient(90deg, var(--gold) 0 6px, #f3c98b 6px 8px);
    transition: width 1.6s var(--ease) 0.8s;
}

.hero__scroll {
    position: absolute;
    left: 50%;
    bottom: 1.25rem;
    display: grid;
    justify-items: center;
    gap: 0.4rem;
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    color: rgba(246, 242, 234, 0.6);
    transform: translateX(-50%);
}

.hero__mouse {
    position: relative;
    width: 22px;
    height: 34px;
    border: 1.5px solid currentColor;
    border-radius: 12px;
}

.hero__mouse::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 7px;
    width: 3px;
    height: 7px;
    margin-left: -1.5px;
    border-radius: 2px;
    background: currentColor;
    animation: wheel 1.8s var(--ease) infinite;
}

@keyframes wheel {
    0% { transform: translateY(0); opacity: 1; }
    70% { transform: translateY(10px); opacity: 0; }
    100% { opacity: 0; }
}

@media (max-width: 1079px) {
    .hero__scroll { display: none; }
}

@media (max-width: 899px) {
    .hero { align-items: end; }
    .hero__media { inset: 0; }
    .hero__media picture { height: 72%; }
    .hero__media::after {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.1) 40%, rgba(0, 0, 0, 0.85) 62%, #000 72%);
    }
    .hero__inner { padding-top: 24vh; }
    .hero__title { margin-bottom: 1.25rem; }
    .hero__quote { margin-bottom: 1.75rem; }
}

@media (max-width: 699px) {
    .hero-card { display: none; }
    .badge { right: 0.75rem; bottom: 1rem; }
}

/* Marquee */
.marquee {
    display: flex;
    overflow: hidden;
    padding-block: 1.1rem;
    border-block: 1px solid var(--line);
    background: var(--bg);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
    display: flex;
    flex-shrink: 0;
    gap: 3rem;
    padding-right: 3rem;
    animation: marquee 36s linear infinite;
}

.marquee__track li {
    display: flex;
    align-items: center;
    gap: 3rem;
    font-family: var(--font-serif);
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    white-space: nowrap;
    color: var(--muted);
    transition: color 0.3s var(--ease);
}

.marquee__track li:hover,
.marquee__track li.is-meme { color: var(--accent); }

.marquee__track li.is-meme { font-style: italic; }

.marquee__track li::after {
    content: '✦';
    font-size: 0.6em;
    color: var(--accent);
}

@keyframes marquee { to { transform: translateX(-100%); } }

/* Stats */
.section-head--compact { margin-bottom: clamp(2rem, 4vw, 3rem); }
@media (min-width: 900px) { .section-head--compact { display: block; } }

.btn--ghost {
    border-color: var(--line);
    color: var(--ink);
}

.btn--ghost:hover { border-color: currentColor; }

.sheet {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

/* Kennzahlen-Leiste oben, wie ein Charakter-Header im Spiel */
.sheet__head {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-bottom: 1px solid var(--line);
}

.sheet__head > div {
    padding: 1.25rem clamp(1.25rem, 3vw, 2rem);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.sheet__head > div:nth-child(2n) { border-right: 0; }
.sheet__head > div:nth-last-child(-n + 2) { border-bottom: 0; }

@media (min-width: 900px) {
    .sheet__head { grid-template-columns: repeat(4, 1fr); }
    .sheet__head > div { border-bottom: 0; }
    .sheet__head > div:nth-child(2n) { border-right: 1px solid var(--line); }
    .sheet__head > div:last-child { border-right: 0; }
}

.sheet__head dt,
.sheet__title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.sheet__head dd {
    margin-top: 0.35rem;
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    line-height: 1.1;
}

.sheet__head dd small {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--muted);
}

.sheet__body {
    display: grid;
    gap: 2.5rem;
    padding: clamp(1.25rem, 3vw, 2.25rem);
}

@media (min-width: 900px) {
    .sheet__body { grid-template-columns: 1.15fr 1fr; gap: clamp(2.5rem, 5vw, 4.5rem); }
}

.sheet__title {
    margin-bottom: 1.25rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px dashed var(--line);
}

.stats { display: grid; gap: 0.85rem; }

.stat {
    display: grid;
    grid-template-columns: 8.5rem 1fr 2.5rem;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.stat b {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-align: right;
    color: var(--accent);
}

.stat__bar {
    --seg: repeating-linear-gradient(90deg, #000 0 calc(10% - 3px), transparent calc(10% - 3px) 10%);
    position: relative;
    height: 12px;
}

.stat__bar::before,
.stat__bar::after {
    content: '';
    position: absolute;
    inset: 0;
    -webkit-mask: var(--seg);
    mask: var(--seg);
}

.stat__bar::before { background: var(--line); }

.stat__bar::after {
    background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #fff));
    clip-path: inset(0 100% 0 0);
    transition: clip-path 1.2s var(--ease) 0.2s;
}

.is-visible .stat__bar::after { clip-path: inset(0 calc(100% - var(--v) * 10%) 0 0); }
.stat--max .stat__bar::after { background: linear-gradient(90deg, #f97066, #e0a458, #12b76a, #9ecbff); }
.is-visible .stat--max .stat__bar::after { animation: rainbow 2s linear infinite; }

@keyframes rainbow { to { filter: hue-rotate(360deg); } }

@media (max-width: 420px) {
    .stat { grid-template-columns: 7rem 1fr 2.2rem; font-size: 0.82rem; }
}

/* Timeline */
.timeline {
    position: relative;
    display: grid;
    gap: 1.5rem;
    padding-left: 1.75rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 0.45rem;
    bottom: 0.45rem;
    width: 1px;
    background: linear-gradient(var(--accent), var(--line));
}

.tl {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 1rem;
    row-gap: 0.15rem;
}

.tl::before {
    content: '';
    position: absolute;
    left: -1.75rem;
    top: 0.35rem;
    width: 11px;
    height: 11px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    background: var(--surface);
}

.tl--now::before {
    border-color: var(--ok);
    background: var(--ok);
    box-shadow: 0 0 0 5px rgba(18, 183, 106, 0.18);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(18, 183, 106, 0); } }

.tl__time {
    grid-column: 1;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--muted);
}

.tl--now .tl__time { color: var(--ok); }

.tl__role {
    grid-column: 1;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    line-height: 1.15;
}

.tl__org { grid-column: 1; font-size: 0.9rem; color: var(--muted); }

.tl__badge {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    background: rgba(18, 183, 106, 0.12);
    color: var(--ok);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    white-space: nowrap;
}

/* Arcade (Bento) */
.bento {
    display: grid;
    gap: 1rem;
}

/* Minesweeper (Querformat) und Stack Overflow (Turm) teilen sich eine Zeile – auf dem Handy untereinander */
.bento__pair { display: contents; }

@media (min-width: 900px) {
    .bento { grid-template-columns: 1fr 1fr; }
    .tile--stats { grid-column: 1 / -1; }
    .bento__pair { grid-column: 1 / -1; display: grid; grid-template-columns: 3fr 2fr; gap: 1rem; }
    .bento__pair .game:not(.is-expanded) .game__stage { aspect-ratio: auto; min-height: clamp(300px, 30vw, 400px); }
    /* Beide Kopfzeilen zweizeilig (Titel + Vollbild oben, Werte darunter), damit die Bildschirme bündig stehen */
    .bento__pair .game:not(.is-expanded) .game__hud { gap: 0.3rem 1rem; }
    .bento__pair .game:not(.is-expanded) .game__hud .tile__title { flex: 1 0 calc(100% - 4.5rem); margin-right: 0; }
    .bento__pair .game:not(.is-expanded) .game__expand { order: 1; }
    .bento__pair .game:not(.is-expanded) .game__hud > span { order: 2; }
}

.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.4rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.4s var(--ease);
}

.tile:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }

.tile__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.tile__title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.tile__title .icon { color: var(--accent); width: 1.1rem; height: 1.1rem; }


/* Live-Vitals */
.vitals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1rem;
    margin-top: auto;
    padding-top: 1.5rem;
}

@media (min-width: 700px) {
    .tile--stats .vitals { grid-template-columns: repeat(4, 1fr); }
}

.vitals dt { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.vitals dd {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 4vw, 3rem);
    line-height: 1;
    color: var(--ink);
}

.vitals small { margin-left: 0.25rem; font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent); }

/* Bug Hunt */
.game {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.game__hud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--muted);
}

.game__hud .tile__title { margin-right: auto; }
/* Vollbild-Button: im Tile ein runder Rahmen-Button, im Vollbild ein klarer "Exit"-Button */
.game__expand {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 36px;
    height: 36px;
    margin: -0.35rem -0.2rem -0.35rem 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-full);
    color: var(--muted);
    font-family: var(--font-sans);
    transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.game__expand .icon { width: 1rem; height: 1rem; transition: transform 0.3s var(--ease); }
.game__expand:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: var(--accent-soft); color: var(--accent); }
.game__expand:hover .icon--expand { transform: scale(1.18); }
.game__expand:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.game__expand .icon--close,
.game__expand-label,
.game__expand-key,
.game.is-expanded .game__expand .icon--expand { display: none; }

.game.is-expanded .game__expand {
    width: auto;
    height: 40px;
    margin: 0;
    padding: 0 0.55rem 0 0.8rem;
    background: rgba(255, 255, 255, 0.06);
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 600;
}

.game.is-expanded .game__expand .icon--close,
.game.is-expanded .game__expand-label { display: block; }
.game.is-expanded .game__expand:hover .icon--close { transform: rotate(90deg); }

.game.is-expanded .game__expand-key {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    border: 1px solid var(--line);
    border-radius: 5px;
    font: 500 0.66rem var(--font-mono);
    color: var(--muted);
}

/* Vollbild: eigenes Overlay, zusätzlich echte Fullscreen-API wo verfügbar */
.game.is-expanded {
    position: fixed;
    inset: 0;
    z-index: 2200;
    padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    background: #0b0a08;
    animation: fade-up 0.4s var(--ease) both;
}

.game.is-expanded .game__hud { font-size: 0.9rem; }
.game.is-expanded .game__stage { aspect-ratio: auto; min-height: 0; }
.game:fullscreen { background: #0b0a08; }

/* content-visibility & isolation würden das fixe Overlay sonst in der Section einsperren */
.section:has(.game.is-expanded) { content-visibility: visible; z-index: 2200; }
.game-open body { overflow: hidden; }
.game__hud b { color: var(--accent); font-weight: 600; }

.game__stage {
    position: relative;
    flex: 1;
    min-height: 260px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: #0b0a08;
    box-shadow: inset 0 0 0 1px var(--line);
}

.game__canvas {
    width: 100%;
    height: 100%;
    cursor: crosshair;
    touch-action: manipulation;
}

.game--snake .game__canvas,
.game--runner .game__canvas { cursor: default; }
.game--runner.is-running .game__canvas { touch-action: none; }
.game--mines .game__canvas { cursor: pointer; }
.game--mines.is-running .game__canvas { touch-action: none; }
.game--stack .game__canvas { cursor: pointer; }
.game--stack.is-running .game__canvas { touch-action: none; }
.game--snake.is-running .game__canvas { touch-action: none; }

.game__overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(11, 10, 8, 0.72);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    text-align: center;
    transition: opacity 0.3s var(--ease), visibility 0.3s;
}

.game.is-running .game__overlay { opacity: 0; visibility: hidden; }
.game__msg { max-width: 30ch; color: var(--ink); font-size: 0.95rem; }
/* Speed Typer */
.typer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    padding: 2.75rem 1.25rem 1.25rem;
    text-align: center;
    cursor: text;
    background:
        radial-gradient(ellipse 60% 50% at 50% 50%, rgba(224, 164, 88, 0.09), transparent 70%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 100% 32px;
    transition: background-color 0.3s var(--ease);
}

.typer.is-wrong { background-color: rgba(249, 112, 102, 0.06); }

.typer__timebar {
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
}

.typer__timebar span {
    display: block;
    height: 100%;
    width: calc(var(--t, 1) * 100%);
    background: linear-gradient(90deg, var(--accent), #f3c98b);
    box-shadow: 0 0 12px rgba(224, 164, 88, 0.6);
    transition: width 0.1s linear;
}

.typer.is-low .typer__timebar span { background: #f97066; box-shadow: 0 0 12px rgba(249, 112, 102, 0.7); animation: blink 0.5s steps(1) infinite; }

.typer__meta {
    position: absolute;
    top: 0.85rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--muted);
}

.typer__meta b { display: inline-block; color: var(--ink); font-weight: 600; }
.typer__combo.is-hot b { color: var(--accent); text-shadow: 0 0 10px rgba(224, 164, 88, 0.7); }

.typer__line {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 1.4em;
    font-size: clamp(1.9rem, 4.5vw, 2.9rem);
}

.typer__word {
    display: flex;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 1em;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1.2;
    white-space: nowrap;
    color: rgba(241, 236, 226, 0.4);
}

.typer__word.is-countdown {
    font-family: var(--font-serif);
    font-size: 1.8em;
    font-weight: 400;
    color: var(--accent);
}

.ch { position: relative; transition: color 0.12s, text-shadow 0.12s; }
.ch--space { color: rgba(241, 236, 226, 0.2); }
.ch.is-done { color: var(--accent); text-shadow: 0 0 18px rgba(224, 164, 88, 0.45); }
.ch.is-wrong { color: #f97066; text-decoration: underline wavy rgba(249, 112, 102, 0.7); text-underline-offset: 0.18em; }

.ch.is-current::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 10%;
    bottom: 10%;
    width: 2px;
    border-radius: 1px;
    background: var(--accent);
    animation: blink 1s steps(1) infinite;
}

.typer.is-wrong .typer__word { animation: shake 0.25s; }

.typer__ghost {
    position: absolute;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--accent);
    white-space: nowrap;
    pointer-events: none;
    animation: fly-out 0.6s var(--ease) forwards;
}

@keyframes fly-out {
    to { transform: translateY(-80%) scale(1.15); opacity: 0; filter: blur(2px); }
}

.typer__queue {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
    min-height: 1.9rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.typer__queue li {
    padding: 0.25rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-full);
    color: var(--muted);
    animation: fade-up 0.35s var(--ease) both;
}

.typer__queue li:nth-child(2) { opacity: 0.65; }
.typer__queue li:nth-child(3) { opacity: 0.4; }

/* Echtes Eingabefeld bleibt fokussierbar (Handy-Tastatur), ist aber unsichtbar */
.typer__input {
    position: absolute;
    left: 50%;
    top: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.typer__hint { font-size: 0.78rem; color: var(--muted); }
.typer.is-blurred .typer__hint { color: var(--accent); animation: blink 1.2s steps(1) infinite; }

.game__results {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.9rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.game__results b { display: block; font-family: var(--font-serif); font-size: 1.7rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink); }

.game.is-expanded .typer__line { font-size: clamp(2.6rem, 8vw, 5.5rem); }
.game.is-expanded .typer__queue { font-size: 1rem; }
.game.is-expanded .typer__meta { font-size: 0.85rem; }

@keyframes shake {
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.game__msg strong { font-family: var(--font-serif); font-size: 2rem; font-weight: 400; display: block; color: var(--accent); }

/* Spielboxen: schlicht wie die übrigen Tiles – Akzent nur beim Hover und während des Spiels */
.tile--game:has(.is-running) { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.tile--game .game__hud b { font-variant-numeric: tabular-nums; }

/* Arcade-Automat: Attract-Screen, Menü, Leaderboard, Namenseingabe */
/* Röhrenbildschirm: dezente Scanlines und Vignette liegen über allem, klicken aber durch */
.game__stage {
    container-type: size;
    isolation: isolate;
    box-shadow: inset 0 0 0 1px rgba(241, 236, 226, 0.07);
}

.game__stage::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    pointer-events: none;
    background:
        radial-gradient(130% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.5) 100%),
        repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0 1px, transparent 1px 3px);
}

/* Kein Scrollen im Automaten – der Inhalt passt sich per Container Query der Bildschirmhöhe an */
.cab {
    display: flex;
    overflow: hidden;
    padding: 0.9rem;
    background: radial-gradient(120% 90% at 50% 45%, rgba(11, 10, 8, 0.5), rgba(11, 10, 8, 0.88));
    -webkit-backdrop-filter: blur(1.5px);
    backdrop-filter: blur(1.5px);
}

.cab__screen {
    display: grid;
    justify-items: center;
    gap: 0.7rem;
    width: min(100%, 22rem);
    margin: auto;
    animation: crt-on 0.45s var(--ease) both;
}

.cab__screen[hidden] { display: none; }
.cab.is-cooling { pointer-events: none; }
/* Speed Typer hat keine Demo – sein Wort im Hintergrund soll Menü und Ergebnis nicht stören */
.game--typer:not(.is-running) .typer { opacity: 0.35; filter: blur(2px); }

@keyframes crt-on {
    0% { opacity: 0; transform: scale(1, 0.04); filter: brightness(3); }
    45% { opacity: 1; transform: scale(1, 1.02); filter: brightness(1.6); }
    100% { transform: none; filter: none; }
}

.cab { outline: none; }

/* Logo mit leichtem RGB-Versatz wie auf einer alten Röhre – zuckt ab und zu */
.cab__logo {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 13cqh, 4.2rem);
    line-height: 0.95;
    letter-spacing: -0.01em;
    color: var(--ink);
    text-shadow: 1.5px 0 rgba(249, 112, 102, 0.45), -1.5px 0 rgba(125, 211, 252, 0.4), 0 0 26px rgba(224, 164, 88, 0.4);
    animation: glitch 5s steps(1) infinite;
}

.cab__logo em { font-style: italic; color: var(--accent); }
.cab__logo--sm { font-size: clamp(1.6rem, 9cqh, 3rem); }

@keyframes glitch {
    0%, 91%, 100% { transform: none; clip-path: none; }
    92% { transform: translateX(-3px) skewX(-8deg); clip-path: inset(0 0 55% 0); }
    93% { transform: translateX(3px); clip-path: inset(45% 0 0 0); }
    94% { transform: translateX(-1px); clip-path: none; }
}

.cab__label {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
}

.cab__ticker {
    display: grid;
    justify-items: center;
    gap: 0.4rem;
    width: 100%;
    transition: opacity 0.3s var(--ease);
}

.cab__ticker:empty { display: none; }
.cab__ticker.is-swapping { opacity: 0; }

/* Start pulsiert leise wie ein Automat, der auf Spieler wartet */
[data-cab-start] { animation: cab-glow 2.2s ease-in-out infinite; }

@keyframes cab-glow {
    50% { box-shadow: 0 0 0 6px rgba(224, 164, 88, 0.12), 0 10px 32px -6px rgba(224, 164, 88, 0.8); }
}

.cab__board {
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-align: left;
}

.cab__row {
    display: grid;
    grid-template-columns: 2.2em 1fr auto;
    gap: 0.6em;
    padding: 0.14em 0.4em;
    border-bottom: 1px dashed var(--line);
}

.cab__row span:first-child { color: var(--muted); }
.cab__row span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cab__row span:last-child { color: var(--accent); font-variant-numeric: tabular-nums; }
/* Gold, Silber, Bronze */
.cab__row:nth-child(1) span:not(:last-child) { color: #ffd479; text-shadow: 0 0 10px rgba(255, 212, 121, 0.45); }
.cab__row:nth-child(2) span:not(:last-child) { color: #e4e0d8; }
.cab__row:nth-child(3) span:not(:last-child) { color: #d99a6c; }
.cab__row.is-you { border-radius: 6px; background: var(--accent-soft); animation: blink 0.5s steps(1) 6; }
.cab__row.is-you span { color: var(--accent); }
/* Bestenliste baut sich Zeile für Zeile auf */
[data-screen="board"]:not([hidden]) .cab__row { animation: menu-in 0.35s var(--ease) both; }
[data-screen="board"] .cab__row:nth-child(2) { animation-delay: 0.04s; }
[data-screen="board"] .cab__row:nth-child(3) { animation-delay: 0.08s; }
[data-screen="board"] .cab__row:nth-child(4) { animation-delay: 0.12s; }
[data-screen="board"] .cab__row:nth-child(5) { animation-delay: 0.16s; }
[data-screen="board"] .cab__row:nth-child(n + 6) { animation-delay: 0.2s; }
.cab__empty { padding: 0.5em 0; color: var(--muted); text-align: center; }
.cab__board--mini { font-size: 0.74rem; }

/* Im Tile: Top 10 zweispaltig – im Vollbild wieder eine Spalte */
.cab__screen[data-screen="board"] { width: min(100%, 30rem); }
.cab__board:not(.cab__board--mini):has(> :nth-child(6)) {
    display: grid;
    grid-template-rows: repeat(5, auto);
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
    column-gap: 1.25rem;
}

.game.is-expanded .cab__board:has(> :nth-child(6)) { grid-template-rows: none; grid-auto-flow: row; }

/* Spielmenü: Textpunkte mit blinkendem Auswahlpfeil, Maus und Pfeiltasten bewegen die Auswahl */
.cab__list { display: grid; justify-items: center; gap: 0.1rem; }
.cab__list--row { grid-auto-flow: column; gap: 0.2rem; }

.cab__list button {
    position: relative;
    padding: 0.45rem 1.4rem;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color 0.2s var(--ease), background-color 0.2s var(--ease), text-shadow 0.2s var(--ease), translate 0.2s var(--ease);
    animation: menu-in 0.45s var(--ease) both;
}

.cab__list button:nth-child(2) { animation-delay: 0.07s; }
.cab__list button:nth-child(3) { animation-delay: 0.14s; }

.cab__list button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0.45rem;
    width: 0.42em;
    height: 0.6em;
    background: var(--accent);
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    translate: 0 -50%;
    opacity: 0;
}

.cab__list button.is-active {
    color: var(--ink);
    background: rgba(224, 164, 88, 0.08);
    text-shadow: 0 0 14px rgba(224, 164, 88, 0.7);
}

.cab__list button.is-active::before { opacity: 1; animation: blink 0.9s steps(1) infinite; }
.cab__list button[data-cab-play].is-active { color: var(--accent); }
.cab__list button:focus-visible { outline: 1px dashed var(--accent); outline-offset: 2px; }

@keyframes menu-in {
    from { opacity: 0; translate: 0 8px; }
}

/* Hi-Score-Leiste oben im Bildschirm – im Standby und im Menü, wie am Automaten */
.cab__top {
    position: absolute;
    top: 0.65rem;
    right: 1rem;
    left: 1rem;
    display: none;
    justify-content: space-between;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    pointer-events: none;
}

.cab__top b { margin-left: 0.4em; color: var(--accent); font-weight: 600; text-shadow: 0 0 8px rgba(224, 164, 88, 0.7); font-variant-numeric: tabular-nums; }
.cab__top span:last-child b { color: #ffd479; }
.cab:is([data-view="attract"], [data-view="menu"]) .cab__top { display: flex; }
.cab:is([data-view="attract"], [data-view="menu"]) { padding-top: 1.9rem; }

/* Versionsnummer klein unten rechts – im Standby, Menü, Ladebildschirm und How to play */
.cab__version {
    position: absolute;
    right: 1rem;
    bottom: 0.6rem;
    display: none;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    color: rgba(169, 161, 148, 0.6);
    pointer-events: none;
}

.cab:is([data-view="attract"], [data-view="menu"], [data-view="boot"], [data-view="help"]) .cab__version { display: block; }

/* How to play: Tasten links, Wirkung rechts */
.cab__keys {
    display: grid;
    gap: 0.3rem;
    width: 100%;
    font-size: 0.78rem;
}

.cab__keys div { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; align-items: center; }
.cab__keys dt { justify-self: end; padding: 0.1rem 0.45rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink); white-space: nowrap; }
.cab__keys dd { margin: 0; color: var(--muted); text-align: left; }
[data-screen="help"] .game__msg { font-size: 0.85rem; }

/* Ladebildschirm & Countdown: schwarzer Bildschirm, Demo pausiert */
.cab[data-view="boot"],
.cab[data-view="ready"] { background: #0b0a08; -webkit-backdrop-filter: none; backdrop-filter: none; }

/* Segmentbalken: Blöcke leuchten nacheinander auf, bei 100 % blitzt alles einmal hell */
.cab__load {
    display: grid;
    grid-template-columns: repeat(18, 1fr);
    gap: 3px;
    width: min(100%, 17rem);
    padding: 4px;
    border: 1px solid rgba(224, 164, 88, 0.25);
    border-radius: 6px;
}

.cab__load i {
    height: 10px;
    border-radius: 2px;
    background: rgba(224, 164, 88, 0.08);
}

.cab__load i.is-on {
    background: linear-gradient(180deg, #f3c98b, var(--accent));
    box-shadow: 0 0 8px rgba(224, 164, 88, 0.7);
    animation: seg-on 0.25s var(--ease) both;
}

.cab__load.is-done { animation: load-done 0.5s var(--ease) both; }
.cab__load.is-done i { background: #fff6dc; box-shadow: 0 0 12px rgba(255, 246, 220, 0.9); transition: background-color 0.4s, box-shadow 0.4s; }

@keyframes seg-on {
    from { transform: scaleY(1.8); filter: brightness(2); }
}

@keyframes load-done {
    40% { transform: scale(1.04); box-shadow: 0 0 24px rgba(224, 164, 88, 0.6); }
}

.cab__load-text {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    width: min(100%, 17rem);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.cab__load-text span:last-child { color: var(--accent); font-variant-numeric: tabular-nums; }

.cab__count {
    font-family: var(--font-serif);
    font-size: clamp(4rem, 42cqh, 10rem);
    line-height: 1;
    color: var(--ink);
    text-shadow: 3px 0 rgba(249, 112, 102, 0.5), -3px 0 rgba(125, 211, 252, 0.45), 0 0 40px rgba(224, 164, 88, 0.6);
}

.cab__count.is-go { font-style: italic; color: var(--accent); }
.cab__count.is-pop { animation: count-pop 0.42s var(--ease) both; }

@keyframes count-pop {
    from { opacity: 0; transform: scale(1.8); filter: blur(6px); }
    60% { opacity: 1; filter: none; }
}

.cab__title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: #f97066;
    text-shadow: 0 0 12px rgba(249, 112, 102, 0.6);
    animation: blink 0.4s steps(1) 4;
}

.cab__tabs {
    display: flex;
    gap: 0.2rem;
    padding: 0.2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: 0.72rem;
}

.cab__tabs button { padding: 0.35rem 0.85rem; border-radius: var(--radius-full); color: var(--muted); transition: background-color 0.3s var(--ease), color 0.3s var(--ease); }
.cab__tabs button:hover { color: var(--ink); }
.cab__tabs [aria-selected="true"],
.cab__tabs [aria-selected="true"]:hover { background: var(--accent); color: var(--accent-ink); }

.cab__entry { display: flex; gap: 0.5rem; width: 100%; }
.cab__entry[hidden] { display: none; }

.cab__name {
    flex: 1;
    min-width: 0;
    min-height: 40px;
    padding: 0 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
    font: 600 0.9rem var(--font-mono);
}

.cab__name::placeholder { color: var(--muted); font-weight: 400; }
.cab__name:focus { outline: none; border-color: var(--accent); }
.cab__note { font-size: 0.75rem; color: var(--muted); }
.cab__note:empty { display: none; }
.cab__note.is-error { color: #f97066; }
/* Einwilligungshinweis nur zusammen mit dem Namensfeld */
.cab__legal { font-size: 0.68rem; color: var(--muted); }
.cab__legal a { color: inherit; text-underline-offset: 0.15em; }
.cab__legal a:hover { color: var(--accent); }
.cab__entry[hidden] ~ .cab__legal { display: none; }
.cab .game__results { margin-top: 0.5rem; }
.game.is-expanded .cab__screen { width: min(100%, 26rem); }
.game.is-expanded .cab__board { font-size: 0.9rem; }

/* Niedrige Bildschirme (Tile, Handy quer): enger setzen, Top 3 statt Top 5 */
@container (max-height: 340px) {
    .cab__screen { gap: 0.55rem; }
    .cab__board--mini li:nth-child(n + 4) { display: none; }
    .cab { padding-block: 0.7rem; }
    .cab [data-screen="over"] { gap: 0.45rem; }
    .cab .game__msg { font-size: 0.85rem; }
    .cab .game__msg strong { font-size: 1.5rem; }
    .cab .game__results { gap: 1rem; margin-top: 0.2rem; font-size: 0.62rem; }
    .cab .game__results b { font-size: 1.1rem; }
    .cab .game__results > span { display: flex; align-items: baseline; gap: 0.35em; }
    .cab .game__results > span b { display: inline; }
    [data-screen="over"]:has(.game__results) .cab__title { display: none; }
}

@container (max-height: 250px) {
    [data-screen="attract"] .cab__logo,
    [data-screen="help"] .game__msg,
    .cab__title,
    .cab .game__results { display: none; }
    .cab__logo--sm { font-size: 1.4rem; }
    .cab__list button { padding-block: 0.3rem; }
    .cab__screen { gap: 0.4rem; }
    .cab__board { font-size: 0.72rem; }
    .cab__row { padding-block: 0.04em; }
    .cab__tabs button { padding-block: 0.25rem; }
}

@media (prefers-reduced-motion: reduce) {
    .cab__screen,
    .cab__logo,
    .cab__list button,
    .cab__title,
    .cab__load,
    .cab__load i,
    [data-cab-start],
    [data-screen="board"]:not([hidden]) .cab__row,
    .cab__row.is-you { animation: none; }
}

/* Achievements (Popup) */
.achv-toggle { position: relative; }

.achv-toggle__badge {
    position: absolute;
    top: 3px;
    right: 1px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: var(--radius-full);
    background: var(--gold);
    color: #1c1a16;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
}

.achv-dialog {
    --ink: var(--dark-ink);
    --muted: var(--dark-muted);
    --line: var(--dark-line);
    --accent: var(--gold);
    width: min(480px, calc(100vw - 2rem));
    max-height: min(85vh, 640px);
    margin: auto;
    padding: 1.4rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #17150f;
    color: var(--ink);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

.achv-dialog[open] { animation: toast-in 0.5s var(--ease) both; }
.achv-dialog::backdrop { background: rgba(0, 0, 0, 0.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.achv-dialog .tile__head { gap: 0.75rem; }
.achv-dialog .tile__title { margin-right: auto; }

.achv-count { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); }
.achv-count b { color: var(--accent); }

.achv-progress {
    height: 4px;
    margin: 1rem 0 1.25rem;
    border-radius: 2px;
    background: var(--line);
    overflow: hidden;
}

.achv-progress span {
    display: block;
    height: 100%;
    width: calc(var(--p, 0) * 100%);
    background: var(--accent);
    transition: width 0.8s var(--ease);
}

.achv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
    gap: 0.6rem;
}

.achv {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border: 1px dashed var(--line);
    border-radius: 14px;
    font-size: 1.5rem;
    color: var(--muted);
    cursor: help;
    transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.achv:hover,
.achv:focus-visible { transform: translateY(-3px); border-color: var(--accent); }

.achv.is-unlocked {
    border-style: solid;
    border-color: transparent;
    background: linear-gradient(135deg, var(--gold), #a8681d);
    box-shadow: 0 8px 20px -8px rgba(224, 164, 88, 0.6);
}

.achv .icon { width: 1.4rem; height: 1.4rem; color: #1c1a16; stroke-width: 2; }
.achv.is-new { animation: pop 0.7s var(--ease); }

@keyframes pop {
    0% { transform: scale(0.6); }
    60% { transform: scale(1.15); }
    100% { transform: none; }
}

.achv-hint {
    min-height: 3em;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.achv-hint b { color: var(--ink); font-weight: 600; }

/* Contact */
.contact__inner { display: grid; justify-items: center; text-align: center; }
.contact__inner .eyebrow::after { content: ''; width: 1.75rem; height: 1px; background: currentColor; }

.contact__title {
    font-size: clamp(3.5rem, 11vw, 8rem);
    line-height: 0.95;
    margin-bottom: 2.5rem;
}

.contact__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
}

.contact__copy { border: 1px solid var(--line); width: 48px; height: 48px; }

/* Footer */
.footer {
    padding-block: 2rem;
    background: var(--dark);
    color: var(--dark-muted);
    font-size: 0.85rem;
    --bg: var(--dark);
    --line: var(--dark-line);
}

.footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
}

.footer .brand { color: var(--dark-ink); }
.footer .brand__logo { width: 32px; height: 32px; }
.footer__hint { margin-left: auto; font-family: var(--font-mono); font-size: 0.75rem; opacity: 0.6; }

.achv-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-decoration: none;
    transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.achv-btn:hover { border-color: var(--gold); color: var(--gold); }
.achv-btn b { color: var(--gold); }
.achv-btn .icon { width: 1rem; height: 1rem; color: var(--gold); }


/* Reveal on scroll */
.js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
    transition-delay: var(--delay, 0s);
}

.js .reveal.is-visible { opacity: 1; transform: none; }

/* Consent: Spielstand speichern ja/nein */
.consent {
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    z-index: 2600;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.9rem 1rem;
    width: min(420px, calc(100vw - 2rem));
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(23, 21, 15, 0.94);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.7);
    animation: toast-in 0.6s var(--ease) both;
}

.consent[hidden] { display: none; }

/* Solange der Banner offen ist, Toasts darüber stapeln statt ihn zu verdecken */
.consent:not([hidden]) ~ .toasts { bottom: 12.5rem; }

@media (max-width: 600px) {
    .consent:not([hidden]) ~ .toasts { bottom: 15rem; }
}

.consent__icon {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
}

.consent__text { font-size: 0.85rem; line-height: 1.5; color: var(--muted); }
.consent__text a { color: var(--ink); }
.consent__text a:hover { color: var(--accent); }
.consent__title { margin-bottom: 0.2rem; font-family: var(--font-serif); font-size: 1.35rem; line-height: 1.2; color: var(--ink); }

.consent__actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.footer__link {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--dark-muted);
    text-decoration: underline;
    text-decoration-color: var(--line);
    text-underline-offset: 0.25em;
    transition: color 0.3s var(--ease);
}

.footer__link:hover { color: var(--gold); }
.footer__link--next { margin-left: 0; }

/* Toasts (Achievements) */
.toasts {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    z-index: 3000;
    display: grid;
    gap: 0.6rem;
    width: min(400px, calc(100vw - 2rem));
    transform: translateX(-50%);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.7rem 1.2rem 0.7rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    background: rgba(20, 19, 15, 0.92);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    color: var(--dark-ink);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.6);
    animation: toast-in 0.6s var(--ease) both;
}

.toast.is-leaving { animation: toast-out 0.5s var(--ease) both; }

.toast__icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), #a8681d);
    color: #1c1a16;
    font-size: 1.1rem;
}

.toast__icon .icon { width: 1.25rem; height: 1.25rem; }
.toast__text { display: grid; line-height: 1.3; font-size: 0.9rem; }
.toast__text small { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dark-muted); }
.toast__text b { font-weight: 600; }
.toast__score { margin-left: auto; font-family: var(--font-mono); font-size: 0.8rem; color: var(--gold); white-space: nowrap; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(20px) scale(0.9); }
    to { opacity: 1; transform: none; }
}

@keyframes toast-out { to { opacity: 0; transform: translateY(10px) scale(0.95); } }

/* Terminal (Quake-Overlay) */
.term {
    display: flex;
    flex-direction: column;
    background: #0c0b09;
    color: #d9f99d;
    font-family: var(--font-mono);
    font-size: 0.875rem;
}


.term--overlay {
    position: fixed;
    inset: 0 0 auto;
    z-index: 2500;
    height: min(62vh, 520px);
    background: rgba(12, 11, 9, 0.96);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(224, 164, 88, 0.4);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    animation: drop 0.45s var(--ease) both;
}

.term[hidden] { display: none; }

@keyframes drop { from { transform: translateY(-100%); } }

.term__bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 44px;
    padding: 0.4rem 0.75rem 0.4rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: #15130f;
    color: #a9a194;
    font-size: 0.78rem;
}

.term__bar .icon-btn { margin-left: auto; }

.dots { display: flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }

.term__out {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem 0.25rem;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.6;
}

.term__out .t-cmd { color: #f1ece2; }
.term__out .t-cmd::before { content: 'guest@huetter.bz:~$ '; color: var(--gold); }
.term__out .t-dim { color: #8a8478; }
.term__out .t-acc { color: var(--gold); }
.term__out .t-err { color: #f97066; }
.term__out a { color: #9ecbff; }

.term__form {
    display: flex;
    gap: 0.6rem;
    padding: 0.4rem 1.25rem 1rem;
}

.term__prompt { color: var(--gold); white-space: nowrap; }

.term__input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #f1ece2;
    font: inherit;
    caret-color: var(--gold);
}

.term__input::placeholder { color: #5f594f; }

@media (max-width: 480px) {
    .term__prompt { display: none; }
    .term__form::before { content: '$'; color: var(--gold); }
}


/* Effects canvas (Matrix, Konfetti) */
.fx-canvas {
    position: fixed;
    inset: 0;
    z-index: 2400;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: none;
}

.fx-canvas.is-active { display: block; }

/* Konami: Retro-Modus */
.retro body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 2300;
    pointer-events: none;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px);
    animation: flicker 0.15s infinite;
}

.retro h1, .retro h2, .retro h3, .retro h4, .retro .brand__name {
    font-family: var(--font-mono);
    letter-spacing: -0.04em;
    text-shadow: 3px 3px 0 color-mix(in srgb, var(--accent) 45%, transparent);
}

.retro img { image-rendering: pixelated; filter: contrast(1.15) saturate(1.3); }
.retro .btn, .retro .tile, .retro .sheet, .retro .glass, .retro .achv, .retro .achv-dialog { border-radius: 0; }

@keyframes flicker { 50% { opacity: 0.92; } }

.barrel-roll { animation: barrel 1.2s var(--ease); }
@keyframes barrel { to { transform: rotate(360deg); } }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .js .reveal { opacity: 1; transform: none; }
    .marquee__track { animation: none; }
}

/* Konsole: "za warudo" hält die Zeit an */
.time-stop *,
.time-stop *::before,
.time-stop *::after { animation-play-state: paused !important; }
.time-stop main { filter: grayscale(1) sepia(0.35) contrast(1.15); transition: filter 0.4s; }

/* Konsole: Minecraft /time set night und /gamemode spectator */
.mc-night main { filter: brightness(0.45) saturate(0.7) hue-rotate(-15deg); transition: filter 1.2s; }
.mc-spectator main { opacity: 0.4; transition: opacity 0.6s; }

/* ---------- Mobile ---------- */
/* iOS zoomt bei Eingabefeldern unter 16px automatisch hinein */
@media (pointer: coarse) {
    .term__input { font-size: 16px; }
}

@media (max-width: 700px) {
    .section { padding-block: 3.5rem; }
    .section-head--compact { margin-bottom: 1.5rem; }
    .section-title { font-size: clamp(2.3rem, 11vw, 3rem); }

    .hero__eyebrow { gap: 0.6rem; font-size: 0.68rem; letter-spacing: 0.1em; }
    .hero__eyebrow::before { width: 1.25rem; }
    .hero__quote { font-size: 1.05rem; }
    .hero__actions .btn { flex: 1 1 auto; }

    .marquee { padding-block: 0.8rem; }
    .marquee__track { gap: 2rem; padding-right: 2rem; }
    .marquee__track li { gap: 2rem; font-size: 1.3rem; }

    .sheet { border-radius: var(--radius-md); }
    .sheet__head > div { padding: 0.9rem 1rem; }
    .sheet__head dd { font-size: 1.35rem; }
    .sheet__head dd small { display: block; margin-top: 0.15rem; font-size: 0.72rem; }
    .sheet__body { gap: 2rem; padding: 1.25rem 1rem 1.5rem; }
    .stat { grid-template-columns: 7.6rem 1fr 2.1rem; gap: 0.6rem; font-size: 0.82rem; }
    .stat > span:first-child { white-space: nowrap; }
    .stat__bar { height: 10px; }
    .timeline { gap: 1.25rem; }
    .tl__role { font-size: 1.3rem; }
    .tl__org { font-size: 0.82rem; }

    .bento { gap: 0.75rem; }
    .tile { padding: 1rem; border-radius: var(--radius-md); }
    .game { gap: 0.75rem; }
    .game__stage { aspect-ratio: 4 / 3; min-height: 0; border-radius: var(--radius-sm); }

    /* HUD: Titel + Vollbild-Button in Zeile 1, Werte in Zeile 2 – statt zufälligem Umbruch */
    .game__hud { gap: 0.3rem 1rem; font-size: 0.72rem; }
    .game__hud .tile__title { flex: 1 0 calc(100% - 4.5rem); margin-right: 0; }
    .game__expand { order: 1; width: 40px; height: 40px; margin: -0.45rem -0.25rem -0.45rem 0; }
    .game__hud > span { order: 2; }

    .vitals { gap: 1rem; padding-top: 1rem; }
    .vitals dd { font-size: 2rem; }

    .contact__title { margin-bottom: 1.75rem; }
    .contact__actions .btn { flex: 1 1 100%; }
    .contact__actions .btn--ghost { flex: 1 1 auto; }

    .footer__inner { justify-content: center; text-align: center; }
    .footer__inner > p { flex-basis: 100%; order: 3; }
    .footer__link { margin-left: 0; }

    .term--overlay { height: min(58vh, 480px); font-size: 0.82rem; }
    .term__out { padding: 0.75rem 0.9rem 0.25rem; }
    .term__form { padding: 0.4rem 0.9rem 0.9rem; }
}

/* Vollbild auf dem Handy: Spiel füllt den Screen, HUD bleibt einzeilig */
@media (max-width: 700px), (pointer: coarse) and (max-width: 1024px) {
    .game.is-expanded { gap: 0.6rem; padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left)); height: 100dvh; }
    .game.is-expanded .game__hud { flex-wrap: nowrap; gap: 0.7rem; font-size: 0.75rem; }
    .game.is-expanded .game__hud .tile__title { letter-spacing: 0.04em; font-size: 0.75rem; }
    .game.is-expanded .game__hud .tile__title { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    .game.is-expanded .game__hud > span { order: 0; white-space: nowrap; }
    /* Minesweeper und Stack Overflow: im Handy-Vollbild bleibt "Best" weg, damit der Titel lesbar bleibt */
    .game--mines.is-expanded .game__hud > span:has([data-mines-best]),
    .game--stack.is-expanded .game__hud > span:has([data-stack-best]) { display: none; }
    .game--mines.is-expanded .game__hud { gap: 0.4rem; }
    .game--mines.is-expanded .game__hud .tile__title { letter-spacing: 0; }
    /* Handy-Vollbild: großer, gut sichtbarer runder Schließen-Button statt Text */
    .game.is-expanded .game__expand { order: 2; width: 44px; height: 44px; padding: 0; border-color: rgba(241, 236, 226, 0.22); background: rgba(255, 255, 255, 0.1); }
    .game.is-expanded .game__expand .icon { width: 1.2rem; height: 1.2rem; }
    .game.is-expanded .game__expand:active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
    .game.is-expanded .game__expand-label,
    .game.is-expanded .game__expand-key { display: none; }
    .game.is-expanded .game__stage { border-radius: var(--radius-sm); }

    /* Speed Typer: Wort oben halten, damit es nicht hinter der Bildschirmtastatur verschwindet */
    .game--typer.is-expanded .typer { justify-content: flex-start; padding-top: 3.25rem; }
}

/* Snake: Steuerkreuz für Touch – nur im Vollbild auf Handy & Tablet */
.dpad { display: none; }

@media (max-width: 700px), (pointer: coarse) and (max-width: 1024px) {
    .game--snake.is-expanded .dpad {
        display: grid;
        grid-template-columns: repeat(3, 64px);
        grid-template-rows: repeat(3, 56px);
        gap: 6px;
        justify-content: center;
        padding-bottom: 0.25rem;
        touch-action: none;
    }

    .dpad__btn {
        display: grid;
        place-items: center;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.05);
        color: var(--ink);
        touch-action: none;
        transition: background-color 0.15s, border-color 0.15s, transform 0.1s;
    }

    .dpad__btn .icon { width: 1.6rem; height: 1.6rem; stroke-width: 2.5; }
    .dpad__btn.is-pressed { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); transform: scale(0.94); }

    .dpad__btn--up { grid-area: 1 / 2; }
    .dpad__btn--left { grid-area: 2 / 1; }
    .dpad__btn--right { grid-area: 2 / 3; }
    .dpad__btn--down { grid-area: 3 / 2; }
    .dpad__btn--left .icon { rotate: -90deg; }
    .dpad__btn--right .icon { rotate: 90deg; }
    .dpad__btn--down .icon { rotate: 180deg; }
}

/* Querformat: Steuerkreuz rechts neben dem Spielfeld statt darunter */
@media (orientation: landscape) and (max-height: 600px) {
    .game--snake.is-expanded {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto 1fr;
        column-gap: 1rem;
    }

    .game--snake.is-expanded .game__hud { grid-column: 1 / -1; }
    .game--snake.is-expanded .game__stage { grid-column: 1; }
    .game--snake.is-expanded .dpad { grid-column: 2; align-self: center; padding-bottom: 0; }
}
