/* Craft Attack 14 Hub – Design 1:1 nach craftattack.one
   (Farben, Schriften, Pixel-Outlines, Schatten, Abstände und Bereichsfarben über data-tone) */

/* Bricolage Grotesque – selbst gehostet (keine Verbindung zu Google), SIL Open Font License */
@font-face {
    font-family: 'Bricolage Grotesque';
    src: url('fonts/BricolageGrotesque-latin.woff2') format('woff2');
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Bricolage Grotesque';
    src: url('fonts/BricolageGrotesque-latin-ext.woff2') format('woff2');
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Monocraft';
    src: url('fonts/Monocraft-Bold.otf') format('opentype');
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    size-adjust: 80%;
}

:root {
    --ink: #16120f;
    --paper: #fff6e0;
    --white: #fff;
    --grass: #6fdc5a;
    --diamond: #4be3d6;
    --gold: #ffd23f;
    --redstone: #ff6452;
    --amethyst: #c88ae6;
    --pink: #f0b6e4;
    --lava: #ff9a2e;
    --ender: #2d1c36;
    --ender-2: #4f1a6d;
    --sky: #8ccdff;
    --dirt: #8a5a3b;
    --twitch: #9146ff;

    --px: 4px;
    --outline: 0 calc(var(--px) * -1) 0 0 var(--ink), 0 var(--px) 0 0 var(--ink), calc(var(--px) * -1) 0 0 0 var(--ink), var(--px) 0 0 0 var(--ink);
    --drop: var(--px) calc(var(--px) * 2) 0 0 var(--ink), calc(var(--px) * 2) var(--px) 0 0 var(--ink), calc(var(--px) * 2) calc(var(--px) * 2) 0 0 var(--ink);
    --font-display: 'Monocraft', ui-monospace, 'Courier New', monospace;
    --font-body: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --wrap: 1180px;
    --gutter: clamp(16px, 4vw, 40px);
    --space-block: clamp(48px, 8vw, 104px);
    color-scheme: light;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    margin: 0;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; font-weight: 700; line-height: 1; }
p { margin: 0; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
[data-tone="ink"] :focus-visible, [data-tone="ender"] :focus-visible, [data-tone="ender-2"] :focus-visible, [data-tone="twitch"] :focus-visible { outline-color: var(--gold); }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { width: 1.15em; height: 1.15em; flex: none; }
.spin { animation: spin 0.9s steps(8) infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0.25; } }
@keyframes marquee { to { transform: translateX(-50%); } }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); padding-inline: var(--gutter); margin-inline: auto; }
/* Player-Bereich: fast volle Breite, damit 2–4 Streams nebeneinander Platz haben */
.wrap-wide { max-width: 1880px; padding-inline: clamp(12px, 2vw, 32px); }

/* Gras-Kante wie .ground auf craftattack.one */
.ground {
    position: relative;
    height: 44px;
    border-top: var(--px) solid var(--ink);
    background:
        linear-gradient(90deg, var(--grass) 50%, transparent 0) 0 16px / 24px 8px repeat-x,
        linear-gradient(var(--grass) 0 16px, var(--dirt) 16px);
}

/* Bereichsfarben wie auf craftattack.one */
[data-tone="paper"] { --bg: var(--paper); --fg: var(--ink); }
[data-tone="white"] { --bg: var(--white); --fg: var(--ink); }
[data-tone="ink"] { --bg: var(--ink); --fg: var(--paper); }
[data-tone="ender"] { --bg: var(--ender); --fg: var(--paper); }
[data-tone="ender-2"] { --bg: var(--ender-2); --fg: var(--paper); }
[data-tone="grass"] { --bg: var(--grass); --fg: var(--ink); }
[data-tone="gold"] { --bg: var(--gold); --fg: var(--ink); }
[data-tone="twitch"] { --bg: var(--twitch); --fg: var(--white); }
.block { background: var(--bg, var(--paper)); color: var(--fg, var(--ink)); }
.block-inner { display: flex; flex-direction: column; gap: 28px; padding-block: calc(var(--space-block) / 2); }
.block-hero .block-inner { padding-block: 20px 28px; }
.main { flex: 1; display: flex; flex-direction: column; }

/* ---------- Pixel-Bauteile ---------- */
.dot { width: 10px; height: 10px; flex: none; display: inline-block; background: var(--dot, var(--grass)); box-shadow: 0 0 0 2px var(--ink); }
.dot--live, .dot-live { --dot: var(--redstone); animation: 1.4s steps(2, jump-none) infinite blink; }
.dot--off, .dot-off { --dot: #b7aa94; }

/* Buttons: .btn von craftattack.one */
.btn {
    --bg: var(--gold);
    --fg: var(--ink);
    min-height: 48px;
    margin: var(--px) calc(var(--px) * 2) calc(var(--px) * 2) var(--px);
    padding: 10px 20px;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    border: 0;
    background: var(--bg); color: var(--fg);
    box-shadow: var(--outline), var(--drop);
    font-family: var(--font-display);
    font-size: 1.125rem; font-weight: 700; line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}
.btn:active, .btn.is-pressed { transform: translate(var(--px), var(--px)); box-shadow: var(--outline); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn svg { flex: none; width: 1.2em; height: 1.2em; }
/* kleinere Variante (btn--small) für Werkzeugleisten */
.stage .btn, .toolbar .btn, .toast .btn, .studio .btn, .rec-bar .btn { min-height: 40px; padding: 6px 14px; font-size: 1rem; }
.btn-icon { padding-inline: 11px !important; }
.btn-ghost { --bg: var(--white); }
.btn-accent { --bg: var(--gold); }
.btn-accent.is-paused { --bg: var(--grass); }
.btn-clip, .btn-blue { --bg: var(--twitch); --fg: var(--white); }
.btn-rec { --bg: var(--redstone); }
.btn[aria-pressed="true"] { --bg: var(--ink); --fg: var(--paper); }
.fav-btn[aria-pressed="true"] { --bg: var(--gold); --fg: var(--ink); }
.fav-btn[aria-pressed="true"] svg { fill: currentColor; }
@media (hover: hover) {
    .btn:hover { filter: brightness(1.06); }
}
.divider { width: 4px; height: 32px; background: var(--ink); opacity: 0.15; margin: 0 4px; }

/* Werkzeuge über dem Stream: dezent – flach, dünner Rand, kein Schlagschatten */
.stage-bar .btn, .stage-bar .seg button {
    --bg: transparent;
    min-height: 36px;
    margin: 2px;
    padding: 4px 10px;
    background: var(--bg);
    box-shadow: 0 0 0 2px rgba(22, 18, 15, 0.18);
    font-size: 0.9375rem;
    color: var(--ink);
}
.stage-bar .btn:hover, .stage-bar .seg button:hover { background: var(--paper); box-shadow: 0 0 0 2px var(--ink); filter: none; }
.stage-bar .btn:active { transform: none; }
.stage-bar .btn svg, .stage-bar .seg svg { width: 18px; height: 18px; }
.stage-bar .seg { gap: 0; margin-inline: 6px; }
.stage-bar .seg button.is-active { background: var(--ink); color: var(--paper); box-shadow: 0 0 0 2px var(--ink); }
.stage-bar .btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: 0 0 0 2px var(--ink); }
.stage-bar .fav-btn[aria-pressed="true"] { background: var(--gold); color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.stage-bar .btn-clip { --bg: var(--twitch); color: var(--white); box-shadow: 0 0 0 2px var(--ink); }
.stage-bar .btn-clip:hover { background: var(--twitch); filter: brightness(1.08); }
.stage-bar .divider { display: none; }

/* Umschalter im Stil der craftattack-Tags: weiß mit Outline, aktiv = Tinte */
.seg { display: inline-flex; flex-wrap: wrap; gap: 0; }
.seg button {
    margin: var(--px);
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    min-height: 40px; padding: 6px 12px;
    border: 0;
    background: var(--white); color: var(--ink);
    box-shadow: var(--outline);
    font-family: var(--font-display);
    font-size: 1rem; font-weight: 700; line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}
.seg button:hover { background: var(--paper); }
.seg button.is-active { background: var(--ink); color: var(--paper); }
.seg button.is-active .dot { box-shadow: 0 0 0 2px var(--paper); }
.seg .i { width: 18px; height: 18px; }
.seg-text button[data-filter="fav"].is-active svg { fill: var(--gold); color: var(--gold); }
.seg-sm button { min-height: 36px; padding: 4px 10px; font-size: 0.9375rem; }

.select { position: relative; display: inline-flex; margin: var(--px); }
.select select {
    appearance: none;
    min-height: 40px; padding: 0 38px 0 12px;
    border: 0;
    background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 6 6' shape-rendering='crispEdges'%3E%3Cpath d='M0 1h6v1H5v1H4v1H2V3H1V2H0z' fill='%2316120f'/%3E%3C/svg%3E") no-repeat right 12px center;
    color: var(--ink);
    box-shadow: var(--outline);
    font: 600 1rem/1 var(--font-body);
    cursor: pointer;
}
.select option { color: var(--ink); }

.toggle { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1rem; cursor: pointer; user-select: none; white-space: nowrap; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-track { position: relative; width: 44px; height: 24px; flex: none; margin: 3px; background: var(--white); box-shadow: 0 0 0 3px var(--ink); }
.toggle-track::after { content: ''; position: absolute; top: 4px; left: 4px; width: 16px; height: 16px; background: var(--ink); transition: transform 0.12s steps(3); }
.toggle input:checked + .toggle-track { background: var(--grass); }
.toggle input:checked + .toggle-track::after { transform: translateX(20px); }
.toggle input:focus-visible + .toggle-track { outline: 3px solid var(--gold); outline-offset: 4px; }

kbd {
    display: inline-grid; place-items: center;
    min-width: 24px; height: 24px; padding: 0 6px;
    margin: 2px 5px 4px 2px;
    background: var(--white); color: var(--ink);
    box-shadow: 0 0 0 2px var(--ink), 2px 3px 0 2px var(--ink);
    font: 700 0.875rem/1 var(--font-display);
}

/* "Kopf" wie .head auf craftattack.one */
.avatar {
    --h: 280;
    position: relative;
    width: 40px; height: 40px; flex: none;
    margin: 3px;
    overflow: hidden;
    display: grid; place-items: center;
    background: hsl(var(--h) 60% 75%);
    color: var(--ink);
    box-shadow: 0 0 0 3px var(--ink);
    font: 700 1rem/1 var(--font-display);
}
.avatar::before { content: attr(data-initial); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.2s; }
.avatar img.is-loaded { opacity: 1; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.25rem; }

/* ---------- Kopfzeile (.site-head) ---------- */
.site-head {
    position: sticky; top: 0; z-index: 50;
    background: var(--ender);
    color: var(--paper);
    border-bottom: var(--px) solid var(--ink);
}
.site-head-in { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; }
.logo {
    display: inline-flex; align-items: center; gap: 10px;
    padding-block: 8px;
    font-family: var(--font-display);
    font-size: 1.5rem; font-weight: 700; line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
    text-decoration: none;
}
.logo-mark {
    display: inline-block;
    font: 700 2.1rem/0.8 var(--font-display);
    color: var(--amethyst);
    letter-spacing: -0.06em;
    text-shadow: 2px 0 0 var(--ender-2), 0 3px 0 var(--ender-2), 3px 3px 0 var(--ink);
}
.logo-text em { font-style: normal; color: var(--gold); }
.nav { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav a, .nav .user-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px;
    font-family: var(--font-display);
    font-size: 1.125rem; font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    text-decoration: none;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--paper); color: var(--ink); }
.nav .nav-cta { background: var(--gold); color: var(--ink); box-shadow: inset 0 0 0 3px var(--ink); }
.nav .nav-cta:hover { background: var(--gold); color: var(--ink); filter: brightness(1.06); }
.nav .nav-cta svg { width: 18px; height: 18px; }
/* kleine Live-Info statt Statistik-Kacheln */
.nav .nav-info { gap: 10px; font-family: var(--font-body); font-size: 1rem; font-weight: 600; text-transform: none; letter-spacing: 0; }
.nav .nav-info b { font-family: var(--font-display); font-size: 1.125rem; color: var(--gold); }
.nav .nav-info:hover b { color: var(--ink); }
.nav-info-viewers { opacity: 0.85; }
.nav .nav-info .dot { box-shadow: 0 0 0 2px var(--paper); }
.nav .nav-info:hover .dot { box-shadow: 0 0 0 2px var(--ink); }

.nav-auth { position: relative; display: flex; }
.nav .user-btn { border: 0; padding: 5px 12px 5px 5px; background: transparent; color: inherit; box-shadow: inset 0 0 0 3px var(--paper); cursor: pointer; }
.nav .user-btn:hover { background: var(--paper); color: var(--ink); }
.user-btn img { width: 30px; height: 30px; box-shadow: 0 0 0 2px var(--ink); }
.user-menu {
    position: absolute; top: calc(100% + 12px); right: 0; z-index: 60;
    width: 300px; padding: 14px;
    background: var(--paper); color: var(--ink);
    box-shadow: var(--outline), var(--drop);
    display: flex; flex-direction: column; gap: 6px;
    font-size: 1rem;
}
.user-menu-hint { font-size: 0.9375rem; opacity: 0.72; margin-bottom: 6px; }
.nav .menu-item, .menu-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px;
    border: 0; background: transparent; color: var(--ink);
    font-family: var(--font-display); font-size: 1rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.03em;
    text-align: left; text-decoration: none;
    cursor: pointer;
}
.nav .menu-item:hover, .menu-item:hover { background: var(--ink); color: var(--gold); }

/* ---------- Lauf-Band (.marquee) mit Avataren ---------- */
.marquee {
    background: var(--bg, var(--ink));
    color: var(--fg, var(--paper));
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    font-weight: 600;
    overflow: hidden;
}
.ticker-track { display: inline-flex; will-change: transform; animation: 60s linear infinite marquee; padding-block: 6px; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
.ticker-set { display: inline-flex; gap: 1.2em; padding-right: 1.2em; }
.ticker-item {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 4px 14px 4px 4px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
}
span.ticker-item { padding-left: 14px; cursor: default; }
span.ticker-item::after { content: '✦'; margin-left: 1.2em; }
button.ticker-item:hover, button.ticker-item:focus-visible { background: var(--paper); color: var(--ink); outline: none; }
.ticker-item.is-current { background: var(--gold); color: var(--ink); }
.ticker-views { opacity: 0.8; }
.ticker-avatar {
    --h: 280;
    position: relative;
    width: 32px; height: 32px; flex: none;
    margin: 3px;
    display: grid; place-items: center;
    overflow: hidden;
    background: hsl(var(--h) 60% 75%);
    color: var(--ink);
    box-shadow: 0 0 0 3px var(--ink);
    font: 700 1rem/1 var(--font-display);
}
.ticker-avatar::before { content: attr(data-initial); }
.ticker-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Player (.box auf Ender-Hintergrund) ---------- */
.stage {
    background: var(--white);
    color: var(--ink);
    box-shadow: var(--outline), var(--drop);
    margin: var(--px) calc(var(--px) * 2) calc(var(--px) * 2) var(--px);
    scroll-margin-top: 76px;
}
.stage-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border-bottom: var(--px) solid var(--ink); }
.now { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.now.is-live .avatar { box-shadow: 0 0 0 3px var(--ink), 0 0 0 7px var(--redstone); }
.now-text { min-width: 0; }
.now-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.now-name { font-size: clamp(1.5rem, 3vw, 2rem); }
.now-meta { display: inline-flex; align-items: center; gap: 14px; font-size: 1rem; font-weight: 700; }
.now-meta span { display: inline-flex; align-items: center; gap: 6px; }
.now-meta .v { color: #c5301f; }
.now-title { margin-top: 4px; font-size: 1rem; opacity: 0.72; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 760px; }
.stage-actions { display: flex; align-items: center; gap: 0; flex: none; flex-wrap: wrap; justify-content: flex-end; }

/* .tag von craftattack.one */
.badge, .tag {
    margin: var(--px);
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px;
    background: var(--bg, var(--white)); color: var(--fg, var(--ink));
    box-shadow: var(--outline);
    font-family: var(--font-display);
    font-size: 0.9375rem; font-weight: 600; line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.badge-live { --bg: var(--redstone); --fg: var(--ink); }
.badge-live .dot { --dot: var(--white); width: 8px; height: 8px; animation: 1.4s steps(2, jump-none) infinite blink; }
.badge-off { --bg: var(--paper); --fg: var(--ink); }

.stage-body { display: grid; grid-template-columns: 1fr; background: var(--ink); }
.stage-body.has-chat { grid-template-columns: minmax(0, 1fr) 340px; }
/* Twitch verlangt mind. 400×300 px und Sichtbarkeit – Größe berechnet app.js (fitPlayers) */
.players {
    display: grid;
    gap: var(--px);
    grid-template-columns: repeat(var(--cols, 1), var(--tile-w, 1fr));
    justify-content: center;
    align-content: center;
    background: var(--ink);
    min-width: 0;
}
.tile { position: relative; display: flex; flex-direction: column; min-width: 0; background: #000; }
.tile-head {
    display: flex; align-items: center; gap: 8px;
    min-height: 36px; padding: 0 12px;
    background: var(--paper); color: var(--ink);
    font-family: var(--font-display); font-size: 1rem; font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
}
.tile-head .tile-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-head .tile-tag { font-size: 0.9375rem; }
.tile.is-active .tile-head { background: var(--gold); }
.tile-video { position: relative; aspect-ratio: 16 / 9; width: 100%; min-height: 300px; background: #000; }
.tile-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tile-empty {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
    padding: 20px; text-align: center;
    background: var(--ender); color: var(--paper);
    font-size: 1.0625rem;
}
.tile-empty svg { width: 34px; height: 34px; color: var(--gold); }
.tile-empty strong { font-family: var(--font-display); font-size: 1.25rem; text-transform: uppercase; }
/* Twitch-Freigabe im Player-Bereich */
.tile-empty .btn { margin-top: 6px; }
.tile-empty small { font-size: 0.875rem; opacity: 0.7; }
.tile-empty > span { max-width: 520px; }
.feed-player-host .tile-empty { padding: 12px; gap: 8px; font-size: 0.9375rem; }
.feed-player-host .tile-empty strong { font-size: 1.0625rem; }
.feed-player-host .tile-empty .btn { min-height: 40px; padding: 6px 14px; font-size: 1rem; }
#consentRevoke { margin-left: 8px; }
.tile-empty code { padding: 2px 6px; background: var(--ink); color: var(--gold); font-family: var(--font-display); }

.chat { position: relative; border-left: var(--px) solid var(--ink); background: #18181b; min-height: 0; }
.chat iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Mini-Player: läuft beim Wegscrollen weiter (Twitch pausiert unsichtbare Player) */
.mini-head { display: none; }
.tile.is-mini {
    position: fixed; left: 20px; bottom: 20px; z-index: 45;
    width: 534px;
    box-shadow: var(--outline), var(--drop);
}
.tile.is-mini .mini-head {
    display: flex; align-items: center; gap: 6px;
    min-height: 40px; padding: 0 4px 0 12px;
    background: var(--ender); color: var(--paper);
    font-family: var(--font-display); font-size: 1.125rem; font-weight: 700;
    text-transform: uppercase;
}
.mini-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-name::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 10px; background: var(--redstone); box-shadow: 0 0 0 2px var(--paper); animation: 1.4s steps(2, jump-none) infinite blink; }
.mini-btn { width: 34px; height: 32px; display: grid; place-items: center; border: 0; background: transparent; color: var(--paper); cursor: pointer; }
.mini-btn:hover { background: var(--paper); color: var(--ink); }
.mini-btn svg { width: 18px; height: 18px; }
.tile.is-mini .tile-video { width: 534px; height: 300px; min-height: 300px; aspect-ratio: auto; }

/* Rotation */
.rotation { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 10px 14px; border-top: var(--px) solid var(--ink); }
.rot-controls { display: flex; align-items: center; }
.rot-progress { min-width: 0; }
.rot-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 1rem; font-weight: 600; }
.rot-label > span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rot-label strong { font-family: var(--font-display); font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.bar { height: 16px; margin: var(--px); background: var(--paper); box-shadow: var(--outline); overflow: hidden; }
.bar-fill { height: 100%; width: 100%; background: repeating-linear-gradient(90deg, var(--grass) 0 20px, #4cb83a 20px 24px); transition: width 1s linear; }
.rotation.is-paused .bar-fill { background: repeating-linear-gradient(90deg, #cfc3ad 0 20px, #b7aa94 20px 24px); }
.rot-settings { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Filterleiste ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; }
.search { position: relative; flex: 1; max-width: 460px; min-width: 240px; display: flex; align-items: center; margin: var(--px) calc(var(--px) * 2) calc(var(--px) * 2) var(--px); }
.search > svg { position: absolute; left: 14px; width: 20px; height: 20px; color: var(--ink); pointer-events: none; }
.search input {
    width: 100%; height: 50px;
    padding: 0 48px 0 46px;
    border: 0;
    background: var(--white); color: var(--ink);
    box-shadow: var(--outline), var(--drop);
    font-size: 1.0625rem; font-weight: 500;
}
.search input::placeholder { color: var(--ink); opacity: 0.55; }
.search input:focus { outline: 3px solid var(--gold); outline-offset: 10px; }
.search kbd { position: absolute; right: 12px; pointer-events: none; }
.search input:focus ~ kbd, .search input:not(:placeholder-shown) ~ kbd { display: none; }
.status-pill {
    display: inline-flex; align-items: center; gap: 10px;
    min-height: 40px; padding: 0 14px;
    margin: var(--px);
    background: var(--white); color: var(--ink);
    box-shadow: var(--outline);
    font-size: 1rem; font-weight: 600;
    white-space: nowrap;
}
.status-pill b { font-family: var(--font-display); font-size: 1.125rem; }
.status-pill .dot { --dot: #b7aa94; }
.status-pill.is-live .dot { --dot: var(--redstone); animation: 1.4s steps(2, jump-none) infinite blink; }
.status-pill.is-loading .dot { --dot: var(--diamond); }

/* ---------- Listen ---------- */
.list-section { scroll-margin-top: 90px; }
.section-title { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(20px, 3vw, 32px); font-size: clamp(1.75rem, 4vw, 2.75rem); }
.section-title .dot { width: 14px; height: 14px; box-shadow: 0 0 0 3px var(--ink); }
.count {
    margin: var(--px);
    padding: 3px 10px;
    background: var(--white); color: var(--ink);
    box-shadow: var(--outline);
    font-family: var(--font-display); font-size: 1.125rem; line-height: 1.3;
}
.grid { display: grid; gap: 20px; }
.grid-live { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-off { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px 16px; }

/* Live-Karte (.box mit Bild, wie die Teilnehmer-Karten) */
.card {
    position: relative;
    display: flex; flex-direction: column;
    margin: var(--px) calc(var(--px) * 2) calc(var(--px) * 2) var(--px);
    background: var(--white); color: var(--ink);
    box-shadow: var(--outline), var(--drop);
    cursor: pointer;
    transition: transform 0.1s;
}
.card:active { transform: translate(var(--px), var(--px)); box-shadow: var(--outline); }
.card.is-playing { background: var(--gold); }
.thumb { position: relative; aspect-ratio: 16 / 9; background: var(--ender); overflow: hidden; border-bottom: var(--px) solid var(--ink); }
.thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.25s, transform 0.2s; }
.thumb img.is-loaded { opacity: 1; }
@media (hover: hover) {
    .card:hover .thumb img { transform: scale(1.04); }
}
.thumb .tag { position: absolute; z-index: 1; margin: 0; }
.tag-live { --bg: var(--redstone); --fg: var(--ink); top: 8px; left: 8px; }
.tag-live .dot { --dot: var(--white); width: 8px; height: 8px; animation: 1.4s steps(2, jump-none) infinite blink; }
.tag-viewers { --bg: var(--ink); --fg: var(--paper); bottom: 8px; left: 8px; box-shadow: none; }
.tag-viewers svg { width: 16px; height: 16px; }
.tag-playing { --bg: var(--gold); --fg: var(--ink); top: 8px; right: 8px; opacity: 0; }
.tag-playing svg { width: 12px; height: 12px; fill: currentColor; }
.card.is-playing .tag-playing { opacity: 1; }
.thumb-play { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; opacity: 0; transition: opacity 0.15s; }
.thumb-play span { width: 56px; height: 56px; display: grid; place-items: center; background: var(--gold); color: var(--ink); box-shadow: var(--outline), var(--drop); }
.thumb-play svg { width: 26px; height: 26px; fill: currentColor; margin-left: 3px; }
@media (hover: hover) {
    .card:hover .thumb-play { opacity: 1; }
}
.card.is-playing .thumb-play { display: none; }
.card-body { display: flex; align-items: flex-start; gap: 12px; padding: 10px 10px 12px; min-height: 52px; }
.card-text { flex: 1; min-width: 0; }
.card-text h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-text p {
    margin-top: 6px;
    font-size: 0.9375rem; line-height: 1.4;
    opacity: 0.72;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 2.8em;
}
.fav { width: 36px; height: 40px; flex: none; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink); }
.fav svg { width: 20px; height: 20px; }
.fav:hover { background: var(--ink); color: var(--gold); }
.fav[aria-pressed="true"] svg { fill: var(--gold); }

/* Offline-Kachel (.box--flat) */
.chip {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 6px 8px 10px;
    margin: var(--px);
    background: var(--white); color: var(--ink);
    box-shadow: var(--outline);
    cursor: pointer;
}
.chip:hover { background: var(--paper); }
.chip.is-playing { background: var(--gold); }
.chip .avatar { filter: grayscale(0.6); }
.chip:hover .avatar { filter: none; }
.chip-text { flex: 1; min-width: 0; }
.chip-text h3 { font-size: 1rem; font-weight: 600; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-text p { margin-top: 2px; font-size: 0.9375rem; opacity: 0.72; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.is-unknown .chip-text p::after { content: ' · prüfe…'; }
.chip-link { width: 36px; height: 40px; flex: none; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink); }
.chip-link svg { width: 18px; height: 18px; }
.chip-link:hover { background: var(--ink); color: var(--gold); }
.yt-tag { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: #c5301f; }
.yt-tag svg { width: 16px; height: 16px; }
.chip.is-youtube .avatar { filter: none; background: var(--redstone); }

.skeleton {
    margin: var(--px) calc(var(--px) * 2) calc(var(--px) * 2) var(--px);
    background: var(--white);
    box-shadow: var(--outline), var(--drop);
    aspect-ratio: 260 / 230;
    animation: 1.4s steps(2, jump-none) infinite blink;
}
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 48px 16px; text-align: center; }
.empty-icon { width: 64px; height: 64px; display: grid; place-items: center; margin-bottom: 8px; background: var(--white); color: var(--ink); box-shadow: var(--outline), var(--drop); }
.empty h3 { font-size: 1.5rem; }
.empty p { opacity: 0.72; }
#liveGrid > p { font-size: 1.125rem; }

/* ---------- Werbeplätze ---------- */
.ad-slot {
    position: relative;
    margin: var(--px) calc(var(--px) * 2) calc(var(--px) * 2) var(--px);
    padding: 22px 12px 12px;
    background: var(--white); color: var(--ink);
    box-shadow: var(--outline);
    min-height: 90px;
    text-align: center;
}
.ad-label { position: absolute; top: 4px; left: 10px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.55; }
.sponsor { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; }
.sponsor img { max-width: 100%; max-height: 120px; object-fit: contain; }

/* ---------- Über den Hub (Text für Besucher & Suchmaschinen) ---------- */
.about { padding-top: clamp(16px, 3vw, 32px); }
.about h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: 20px; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.about-grid p {
    margin: var(--px) calc(var(--px) * 2) calc(var(--px) * 2) var(--px);
    padding: 18px 20px;
    background: var(--white);
    box-shadow: var(--outline), var(--drop);
    font-size: 1rem;
}

/* ---------- Footer ---------- */
.footer { background: var(--bg, var(--ender)); color: var(--fg, var(--paper)); border-top: var(--px) solid var(--ink); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px 32px; flex-wrap: wrap; padding-block: 40px 48px; font-size: 0.9375rem; }
.footer a { font-weight: 600; }
.footer a:hover { color: var(--gold); }
.shortcuts { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

/* ---------- Hinweise ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 12px; max-width: calc(100vw - 32px); }
.toast {
    display: flex; flex-direction: column; gap: 10px;
    width: 380px; max-width: 100%;
    padding: 14px 16px;
    margin: var(--px) calc(var(--px) * 2) calc(var(--px) * 2) var(--px);
    background: var(--white); color: var(--ink);
    box-shadow: var(--outline), var(--drop);
    font-size: 1rem;
    animation: toast-in 0.2s steps(4);
}
.toast.is-leaving { animation: toast-out 0.2s steps(4) forwards; }
.toast p b { display: block; font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; line-height: 1.2; }
.toast p span { display: block; margin-top: 4px; opacity: 0.8; overflow-wrap: anywhere; }
.toast-actions { display: flex; flex-wrap: wrap; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(32px); } }

/* ---------- Clip Studio ---------- */
.studio {
    width: min(1040px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    padding: 0;
    border: 0;
    background: var(--paper); color: var(--ink);
    box-shadow: var(--outline), var(--drop);
    overflow: auto;
}
.studio::backdrop { background: rgba(45, 28, 54, 0.82); }
.studio[open] { animation: toast-in 0.2s steps(4); }
.studio-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 18px 20px; background: var(--ender); color: var(--paper); border-bottom: var(--px) solid var(--ink); }
.studio-head h2 { display: flex; align-items: center; gap: 12px; font-size: clamp(1.5rem, 3vw, 2rem); }
.studio-head h2 svg { color: var(--gold); }
.studio-head h2 span { margin: var(--px); padding: 3px 10px; background: var(--gold); color: var(--ink); box-shadow: var(--outline); font-size: 1rem; }
.studio-head p { margin-top: 8px; font-size: 1rem; opacity: 0.85; }
.studio-head .btn { --bg: var(--paper); }
.studio-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; padding: 26px; }

.phone-wrap { display: grid; place-items: start center; }
.phone {
    --accent-c: var(--twitch);
    --accent-fg: #fff;
    position: relative;
    width: 300px;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    background: #000;
    margin: var(--px) calc(var(--px) * 2) calc(var(--px) * 2) var(--px);
    box-shadow: var(--outline), var(--drop);
    container-type: inline-size;
    isolation: isolate;
}
.phone[data-color="green"] { --accent-c: var(--grass); --accent-fg: var(--ink); }
.phone[data-color="gold"] { --accent-c: var(--gold); --accent-fg: var(--ink); }
.phone[data-color="red"] { --accent-c: var(--redstone); --accent-fg: var(--ink); }
.phone[data-color="white"] { --accent-c: #fff; --accent-fg: var(--ink); }
.phone-bg { position: absolute; inset: -10%; width: 120%; height: 120%; object-fit: cover; filter: blur(22px) saturate(1.2); transform: scale(1.1); opacity: 0.9; }
.phone-shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.15) 35%, rgba(0, 0, 0, 0.15) 60%, rgba(0, 0, 0, 0.75)); }
.phone-frame { --zoom: 1; position: absolute; top: 50%; left: 50%; width: calc(100cqw * var(--zoom)); aspect-ratio: 16 / 9; transform: translate(-50%, -50%); background: #000; box-shadow: 0 1.2cqw 0 0 #000; }
.phone-frame img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.phone-top { position: absolute; top: 0; left: 0; right: 0; padding: 9cqw 6cqw 0; display: flex; flex-direction: column; align-items: center; gap: 3cqw; text-align: center; }
.phone-live { display: inline-flex; align-items: center; gap: 1.5cqw; padding: 1cqw 2.4cqw; background: var(--redstone); color: var(--ink); box-shadow: 0 0 0 0.7cqw var(--ink); font: 700 3.3cqw/1.2 var(--font-display); letter-spacing: 0.08em; }
.phone-live .dot { --dot: #fff; width: 1.6cqw; height: 1.6cqw; box-shadow: 0 0 0 0.4cqw var(--ink); }
.phone-headline { max-width: 100%; padding: 1.8cqw 3.6cqw; background: var(--accent-c); color: var(--accent-fg); box-shadow: 0 0 0 1cqw var(--ink), 1.4cqw 1.8cqw 0 1cqw var(--ink); font: 700 7.4cqw/1.1 var(--font-display); text-transform: uppercase; overflow-wrap: anywhere; }
.phone-headline:empty { display: none; }
.phone-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 7cqw 13cqw; display: flex; flex-direction: column; align-items: center; gap: 3cqw; text-align: center; }
.phone-caption { color: #fff; font: 800 5.2cqw/1.3 var(--font-body); text-shadow: 0.5cqw 0.5cqw 0 #000; overflow-wrap: anywhere; }
.phone-tag { padding: 1cqw 3cqw; background: var(--ink); color: #fff; font: 700 3.6cqw/1.3 var(--font-display); }
.phone-tag::before { content: '@'; color: var(--accent-c); }
.phone[data-color="white"] .phone-tag::before { color: var(--gold); }
.phone-tag:empty, .phone-tag.hidden { display: none; }

.studio-form { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > span:first-child { display: flex; justify-content: space-between; font-family: var(--font-display); font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.field small { font-family: var(--font-body); font-size: 0.9375rem; letter-spacing: 0; text-transform: none; opacity: 0.72; font-variant-numeric: tabular-nums; }
.field input[type="text"], .field textarea {
    width: calc(100% - 8px);
    margin: var(--px);
    padding: 11px 13px;
    border: 0;
    background: var(--white); color: var(--ink);
    box-shadow: var(--outline);
    font-size: 1.0625rem;
    resize: vertical;
}
.field input[type="text"]:focus, .field textarea:focus { outline: 3px solid var(--twitch); outline-offset: 6px; }
.select-block { display: flex; }
.select-block select { width: 100%; }
.field-row { display: flex; align-items: flex-end; gap: 22px; flex-wrap: wrap; }
.field-grow { flex: 1; min-width: 160px; }
.field input[type="range"] { width: 100%; accent-color: var(--ink); height: 32px; }
.swatches { display: flex; gap: 12px; min-height: 40px; align-items: center; padding-left: 4px; }
.swatches button { width: 30px; height: 30px; border: 0; padding: 0; box-shadow: 0 0 0 3px var(--ink); }
.swatches button.is-active { box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--paper), 0 0 0 9px var(--ink); }
.swatches [data-color="twitch"] { background: var(--twitch); }
.swatches [data-color="gold"] { background: var(--gold); }
.swatches [data-color="green"] { background: var(--grass); }
.swatches [data-color="red"] { background: var(--redstone); }
.swatches [data-color="white"] { background: #fff; }
.studio-actions { display: flex; flex-wrap: wrap; }
#studioExport, #studioCopy, #studioTwitch, #studioClips { --bg: var(--white); }
#studioClipNow { --bg: var(--twitch); --fg: var(--white); }
.studio-hint { font-size: 1rem; line-height: 1.55; opacity: 0.8; }
.studio-hint-sm { font-size: 0.9375rem; }
.studio-hint a { font-weight: 600; background: linear-gradient(var(--gold), var(--gold)) 0 100% / 100% 0.45em no-repeat; text-decoration: none; }
.studio-hint a:hover { background-size: 100% 100%; }

.rec-dot { display: inline-block; width: 12px; height: 12px; flex: none; background: var(--redstone); box-shadow: 0 0 0 2px var(--ink); }
.rec-panel { display: flex; flex-direction: column; gap: 10px; padding: 18px; margin: var(--px) calc(var(--px) * 2) calc(var(--px) * 2) var(--px); background: var(--white); box-shadow: var(--outline), var(--drop); }
.rec-title { display: flex; align-items: center; gap: 12px; font-size: 1.5rem; }
.rec-row { display: flex; align-items: center; flex-wrap: wrap; }
.btn-rec .rec-dot { background: var(--white); }
.rec-result { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; align-items: start; padding: 16px; margin: var(--px) calc(var(--px) * 2) calc(var(--px) * 2) var(--px); background: var(--grass); box-shadow: var(--outline), var(--drop); }
.rec-result video { width: 180px; aspect-ratio: 9 / 16; background: #000; box-shadow: var(--outline); margin: var(--px); }
.rec-result-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rec-meta { font-size: 1.0625rem; }
.rec-meta b { font-family: var(--font-display); font-size: 1.125rem; }
.rec-bar {
    position: fixed; top: 76px; left: 50%; z-index: 70;
    transform: translateX(-50%);
    display: flex; align-items: center; gap: 12px;
    padding: 6px 6px 6px 16px;
    background: var(--ink); color: var(--paper);
    box-shadow: 0 0 0 4px var(--redstone), 8px 8px 0 4px var(--ink);
    font-size: 1rem; font-weight: 600;
}
.rec-bar .rec-dot { animation: 1s steps(2, jump-none) infinite blink; box-shadow: 0 0 0 2px var(--paper); }
.rec-bar b { font-family: var(--font-display); font-size: 1.25rem; font-variant-numeric: tabular-nums; color: var(--gold); }
.rec-bar .btn { --bg: var(--redstone); }

.clip-list-wrap { padding-top: 8px; }
.clip-list-title { display: flex; align-items: center; gap: 10px; margin: 8px 0 10px; font-size: 1.5rem; }
.clip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; }
.clip-item { display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 8px; margin: var(--px); background: var(--white); box-shadow: var(--outline); }
.clip-thumb { width: 72px; aspect-ratio: 16 / 9; flex: none; display: grid; place-items: center; background: var(--ink); color: var(--gold); overflow: hidden; }
.clip-thumb img { width: 100%; height: 100%; object-fit: cover; }
.clip-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.clip-text b { font-family: var(--font-display); font-size: 1rem; }
.clip-text span { font-size: 0.9375rem; opacity: 0.72; }

/* ---------- Handy: Live-Feed zum Wischen (wie TikTok/Reels) ---------- */
.feed-open-btn { display: none; }
body.feed-open { overflow: hidden; }
.feed {
    /* Twitch-Mindestgröße 400×300: auf schmalen Handys minimal breiter als der Bildschirm (Rand wird abgeschnitten) */
    --fw: max(100vw, 400px);
    --fh: max(300px, calc(var(--fw) * 9 / 16));
    --ftop: 60px;
    position: fixed; inset: 0; z-index: 80;
    overflow: hidden;
    background: var(--ender);
    color: var(--paper);
}
.feed-top {
    position: absolute; top: 0; left: 0; right: 0; z-index: 4;
    height: var(--ftop);
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 0 12px;
    background: var(--ender);
    border-bottom: var(--px) solid var(--ink);
}
.feed-back {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 40px; padding: 4px 12px 4px 6px;
    border: 0; background: transparent; color: var(--paper);
    font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; text-transform: uppercase;
}
.feed-back:active { background: var(--paper); color: var(--ink); }
.feed-back svg { width: 22px; height: 22px; }
.feed-count { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.feed-count b { font-family: var(--font-display); font-size: 1.25rem; color: var(--gold); }
.feed-count .dot { box-shadow: 0 0 0 2px var(--paper); }
.feed-pos { font-family: var(--font-display); font-size: 1rem; opacity: 0.8; min-width: 60px; text-align: right; }

.feed-scroller {
    position: absolute; inset: 0;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.feed-scroller::-webkit-scrollbar { display: none; }
.feed-slide {
    position: relative;
    height: 100%;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: var(--ender);
    border-bottom: var(--px) solid var(--ink);
}
/* winziges Bild hochskaliert statt CSS-Unschärfe – deutlich weniger Grafikspeicher auf dem Handy */
.feed-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.45; }
.feed-video, .feed-player {
    position: absolute;
    top: var(--ftop); left: 50%;
    width: var(--fw); height: var(--fh);
    margin-left: calc(var(--fw) / -2);
    background: #000;
}
.feed-video img { width: 100%; height: 100%; object-fit: contain; }
.feed-player { z-index: 2; will-change: transform; border-bottom: var(--px) solid var(--ink); }
.feed-player-host, .feed-player-host iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.feed-info {
    position: absolute; left: 0; right: 0; bottom: 0;
    top: calc(var(--ftop) + var(--fh) + 18px);
    display: flex; flex-direction: column; gap: 12px;
    padding: 0 16px 64px;
}
.feed-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.feed-name .avatar { width: 52px; height: 52px; box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--redstone); margin: 6px; }
.feed-name h2 { font-size: 1.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-meta { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-weight: 700; }
.feed-meta .tag { margin: 0 6px 0 4px; }
.feed-meta svg { width: 18px; height: 18px; }
.feed-title { font-size: 1rem; opacity: 0.9; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.feed-actions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.feed-act {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 10px 4px 8px;
    margin: var(--px);
    border: 0;
    background: var(--white); color: var(--ink);
    box-shadow: var(--outline);
    font: 700 0.875rem/1 var(--font-body);
}
.feed-act svg { width: 22px; height: 22px; }
.feed-act:active { transform: translate(2px, 2px); }
.feed-act.is-on { background: var(--gold); }
.feed-act.is-on svg { fill: currentColor; }
.feed-swipe {
    position: absolute; left: 0; right: 0; bottom: 16px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--font-display); font-size: 0.9375rem; text-transform: uppercase; opacity: 0.8;
    animation: 1.6s steps(2, jump-none) infinite blink;
}
.feed-swipe svg { width: 18px; height: 18px; transform: rotate(90deg); }
.feed-empty { display: grid; place-items: center; text-align: center; }
.feed-empty .feed-info { position: static; padding: 24px; }

.feed-hint {
    position: absolute; left: 12px; right: 12px; z-index: 5;
    top: calc(var(--ftop) + var(--fh) + 12px);
    padding: 12px 14px;
    margin: var(--px);
    background: var(--gold); color: var(--ink);
    box-shadow: var(--outline), var(--drop);
    font-weight: 600;
}
.feed-chat {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
    top: calc(var(--ftop) + var(--fh));
    display: flex; flex-direction: column;
    background: #18181b;
    border-top: var(--px) solid var(--ink);
}
.feed-chat-head { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 4px 0 14px; background: var(--ender); font-family: var(--font-display); font-size: 1.125rem; text-transform: uppercase; }
.feed-chat-head button { width: 44px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; color: var(--paper); }
.feed-chat iframe { flex: 1; width: 100%; border: 0; }

@media (max-width: 760px) {
    /* Handy: statt Player-Bühne gibt es den Feed */
    .block-hero { display: none; }
    .feed-open-btn { display: flex; width: calc(100% - 12px); --bg: var(--gold); }
}
@media (max-height: 640px) {
    .feed-title { -webkit-line-clamp: 2; }
    .feed-swipe { display: none; }
    .feed-info { padding-bottom: 16px; }
}

/* ---------- Responsive (Breakpoints wie craftattack.one) ---------- */
@media (max-width: 1180px) {
    .stage-body.has-chat { grid-template-columns: 1fr; }
    .chat { border-left: 0; border-top: var(--px) solid var(--ink); height: 460px; }
}
@media (max-width: 900px) {
    .stage-bar { flex-direction: column; align-items: stretch; }
    .stage-actions { justify-content: flex-start; }
    .now-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .rotation { grid-template-columns: 1fr; gap: 10px; }
    .rot-controls { justify-content: space-between; }
    .rot-controls .btn-accent { flex: 1; }
    .rot-settings { justify-content: flex-start; }
    .toolbar { flex-direction: column; align-items: stretch; }
    .search { max-width: none; min-width: 0; }
    .studio-body { grid-template-columns: 1fr; }
    .phone { width: min(300px, 70vw); }
}
@media (max-width: 1240px) {
    .nav-info-sep, .nav-info-viewers { display: none; }
}
@media (max-width: 980px) {
    .site-head-in { flex-direction: column; align-items: stretch; gap: 0; }
    .logo { padding: 10px 0 4px; }
    .site-head nav { margin-inline: calc(var(--gutter) * -1); padding: 0 calc(var(--gutter) - 10px) 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .site-head nav::-webkit-scrollbar { display: none; }
    .nav a, .nav .user-btn { padding: 8px 10px; font-size: 1.0625rem; }
}
@media (max-width: 760px) {
    .footer .shortcuts { display: none; }
}
@media (max-width: 560px) {
    .grid-live, .grid-off { grid-template-columns: 1fr; }
    .search kbd { display: none; }
    .toasts { right: 12px; left: 12px; bottom: 12px; }
    .toast { width: auto; }
    .rec-result { grid-template-columns: 1fr; }
    .rec-result video { width: min(220px, 60vw); }
    .status-pill .long { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .ticker-track { animation: none; }
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
