/* =====================================================================
   Media-Insel – Hexen-Design
   Schwarz · Lila · Orange   |   Mobile first
   ===================================================================== */

:root {
    color-scheme: dark;

    /* Grundfarben */
    --bg: #0b0712;
    --bg-2: #120a1f;
    --surface: rgba(28, 16, 46, .66);
    --surface-2: rgba(44, 24, 72, .55);
    --surface-solid: #1a1029;
    --line: rgba(192, 132, 252, .16);
    --line-strong: rgba(192, 132, 252, .34);

    --purple: #a855f7;
    --purple-2: #7c3aed;
    --purple-3: #4c1d95;
    --purple-soft: #e9d5ff;
    --orange: #f97316;
    --orange-2: #fb923c;
    --amber: #fbbf24;
    --danger: #f43f5e;

    --text: #f6efff;
    --text-soft: #d8c8ee;
    --muted: #a294bb;

    --grad-magic: linear-gradient(135deg, #a855f7 0%, #7c3aed 45%, #f97316 100%);
    --grad-pumpkin: linear-gradient(135deg, #fdba74 0%, #f97316 45%, #ea580c 100%);
    --grad-wood: linear-gradient(#6b3f22, #3d2212 60%, #24130a);

    /* Form */
    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 26px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, .35);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, .45);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
    --glow-purple: 0 0 24px rgba(168, 85, 247, .45);
    --glow-orange: 0 0 24px rgba(249, 115, 22, .45);

    --font-body: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-display: "Cinzel", Georgia, serif;
    --font-brand: "Cinzel Decorative", "Cinzel", Georgia, serif;

    --gutter: 16px;
    --tabbar-h: 68px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --ease-out: cubic-bezier(.2, .8, .3, 1);
}

/* ---------------------------------------------------------------- Basis */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100dvh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

h1, h2, h3 { margin: 0 0 .4em; line-height: 1.15; font-weight: 700; }
h1, h2 { font-family: var(--font-display); letter-spacing: .02em; }
h1:focus { outline: none; }
p { margin: 0 0 .75em; }
a { color: var(--orange-2); text-decoration: none; }
a:hover { color: var(--amber); }
code { font-size: .9em; padding: .1em .35em; border-radius: 6px; background: rgba(168, 85, 247, .18); color: var(--purple-soft); }
img { max-width: 100%; }
button { font: inherit; color: inherit; }

::selection { background: rgba(249, 115, 22, .45); color: #fff; }

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

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.muted { color: var(--muted); }
.mb-1 { margin-bottom: .75rem; }
.mb-2 { margin-bottom: 1.25rem; }
.mt-1 { margin-top: .75rem; }

/* ---------------------------------------------------------------- Himmel (Hintergrund) */

.sky {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(90% 60% at 50% -10%, rgba(124, 58, 237, .35), transparent 70%),
        radial-gradient(70% 50% at 100% 110%, rgba(249, 115, 22, .16), transparent 70%),
        linear-gradient(180deg, #0d0718 0%, var(--bg) 60%);
}

.stars {
    position: absolute;
    inset: -50%;
    background-repeat: repeat;
}

.stars--far {
    background-image:
        radial-gradient(1px 1px at 20px 30px, rgba(255, 255, 255, .8), transparent),
        radial-gradient(1px 1px at 90px 120px, rgba(233, 213, 255, .7), transparent),
        radial-gradient(1px 1px at 160px 60px, rgba(255, 255, 255, .6), transparent),
        radial-gradient(1px 1px at 230px 180px, rgba(253, 230, 138, .6), transparent),
        radial-gradient(1px 1px at 50px 210px, rgba(255, 255, 255, .5), transparent);
    background-size: 260px 240px;
    animation: twinkle 7s ease-in-out infinite alternate;
}

.stars--near {
    background-image:
        radial-gradient(1.6px 1.6px at 60px 80px, #fff, transparent),
        radial-gradient(1.4px 1.4px at 300px 40px, #fde68a, transparent),
        radial-gradient(1.6px 1.6px at 200px 260px, #e9d5ff, transparent),
        radial-gradient(1.2px 1.2px at 380px 200px, #fff, transparent);
    background-size: 420px 340px;
    animation: twinkle 4.5s ease-in-out -2s infinite alternate, drift 160s linear infinite;
}

.moon {
    position: absolute;
    top: 64px;
    right: -30px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255, 247, 224, .95), rgba(253, 230, 138, .85) 45%, rgba(245, 158, 11, .6) 100%);
    box-shadow: 0 0 60px rgba(253, 230, 138, .35), 0 0 160px rgba(249, 115, 22, .25);
    opacity: .55;
}

.glow {
    position: absolute;
    width: 60vmax;
    height: 60vmax;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .35;
}

.glow--purple { left: -25vmax; top: 20vh; background: #6d28d9; animation: float-glow 18s ease-in-out infinite alternate; }
.glow--orange { right: -30vmax; bottom: -30vmax; background: #c2410c; opacity: .22; animation: float-glow 22s ease-in-out -6s infinite alternate; }

/* Die Katze fliegt ab und zu über den Himmel */
.ambient-cat {
    position: absolute;
    top: 16vh;
    left: 0;
    width: 74px;
    opacity: 0;
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, .6));
    animation: ambient-flight 38s linear 6s infinite;
}

@keyframes ambient-flight {
    0% { transform: translate(-120px, 30px) rotate(-4deg); opacity: 0; }
    1% { opacity: .85; }
    12% { transform: translate(calc(100vw + 40px), -40px) rotate(-8deg); opacity: .85; }
    12.1%, 100% { opacity: 0; transform: translate(calc(100vw + 40px), -40px); }
}

@keyframes twinkle { from { opacity: .45; } to { opacity: 1; } }
@keyframes drift { to { transform: translate(-420px, -340px); } }
@keyframes float-glow { to { transform: translate(8vmax, -6vmax) scale(1.1); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.35) rotate(-8deg); } 100% { transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------------------------------------------------------------- Kopfzeile & Navigation */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: calc(10px + env(safe-area-inset-top, 0px)) var(--gutter) 10px;
    background: linear-gradient(to bottom, rgba(11, 7, 18, .92), rgba(11, 7, 18, .72));
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--text);
}

.brand:hover { color: var(--text); }

.brand__cat {
    width: 52px;
    margin: -8px -4px -10px -6px;
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, .6));
}

.brand__name {
    font-family: var(--font-brand);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: .02em;
    background: linear-gradient(90deg, #f5e8ff 0%, #d8b4fe 40%, #fdba74 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.topnav { display: none; }

.topnav__link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem .85rem;
    border-radius: 999px;
    color: var(--text-soft);
    font-weight: 500;
    transition: background .2s, color .2s;
}

.topnav__link:hover { color: var(--text); background: rgba(168, 85, 247, .12); }
.topnav__link.active { color: var(--text); background: rgba(168, 85, 247, .22); box-shadow: inset 0 0 0 1px var(--line-strong); }
.topnav__cta { margin-left: .5rem; }

.page {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px var(--gutter) calc(var(--tabbar-h) + var(--safe-bottom) + 28px);
    animation: fade-in .35s ease-out;
}

/* Untere Tab-Leiste (Handy) */
.tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: end;
    height: calc(var(--tabbar-h) + var(--safe-bottom));
    padding: 0 6px var(--safe-bottom);
    background: linear-gradient(to top, rgba(11, 7, 18, .98), rgba(16, 9, 28, .9));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
}

.tabbar__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: var(--tabbar-h);
    color: var(--muted);
    font-size: .7rem;
    font-weight: 500;
    transition: color .2s;
}

.tabbar__link.active { color: var(--orange-2); }
.tabbar__link.active .icon { filter: drop-shadow(0 0 6px rgba(249, 115, 22, .7)); }

.tabbar__fab {
    justify-self: center;
    align-self: center;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-top: -26px;
    border-radius: 50%;
    color: #1a0b02;
    background: var(--grad-pumpkin);
    box-shadow: 0 8px 22px rgba(249, 115, 22, .45), 0 0 0 5px var(--bg), 0 0 0 6px var(--line-strong);
    transition: transform .2s var(--ease-out);
}

.tabbar__fab:hover, .tabbar__fab.active { color: #1a0b02; transform: translateY(-2px) rotate(-8deg); }

/* ---------------------------------------------------------------- Überschriften */

.hero { margin: 6px 0 18px; }
.hero--compact { margin-bottom: 14px; }

.eyebrow {
    margin: 0 0 .25rem;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--orange-2);
}

.hero__title {
    font-size: clamp(1.75rem, 7vw, 2.75rem);
    margin: 0;
    background: linear-gradient(100deg, #fff 0%, #e9d5ff 40%, #c084fc 70%, #fb923c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 40px rgba(168, 85, 247, .25);
}

.hero__sub { margin: .35rem 0 0; color: var(--muted); }

.section-title {
    font-size: 1.1rem;
    color: var(--purple-soft);
    margin-bottom: .6rem;
}

.notice {
    padding: .75rem 1rem;
    border-radius: var(--radius);
    background: rgba(249, 115, 22, .1);
    border: 1px solid rgba(249, 115, 22, .3);
    color: #fed7aa;
    font-size: .92rem;
}

.source-note { margin-top: 1rem; text-align: center; font-size: .78rem; color: var(--muted); }

/* ---------------------------------------------------------------- Buttons */

.btn {
    --btn-bg: var(--surface-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 46px;
    padding: 0 1.15rem;
    border: 0;
    border-radius: 999px;
    background: var(--btn-bg);
    color: var(--text);
    font-weight: 600;
    font-size: .95rem;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .15s var(--ease-out), box-shadow .2s, filter .2s, background .2s;
    user-select: none;
}

.btn:hover { color: var(--text); filter: brightness(1.08); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: none; }

.btn--primary {
    background: var(--grad-pumpkin);
    color: #1c0c03;
    box-shadow: 0 6px 20px rgba(249, 115, 22, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
}

.btn--primary:hover { color: #1c0c03; box-shadow: 0 8px 26px rgba(249, 115, 22, .5), inset 0 1px 0 rgba(255, 255, 255, .35); }

.btn--magic {
    background: var(--grad-magic);
    color: #fff;
    box-shadow: 0 6px 20px rgba(124, 58, 237, .35);
}

.btn--ghost {
    background: rgba(168, 85, 247, .08);
    box-shadow: inset 0 0 0 1px var(--line-strong);
    color: var(--text-soft);
}

.btn--ghost:hover { background: rgba(168, 85, 247, .16); }
.btn--danger { background: linear-gradient(135deg, #fb7185, #e11d48); color: #fff; }
.btn--danger-text { color: #fda4af; }
.btn--danger-text:hover { color: #fecdd3; }
.btn--sm { min-height: 38px; padding: 0 .9rem; font-size: .86rem; }
.btn--block { width: 100%; }

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: none;
    border: 0;
    border-radius: 50%;
    background: rgba(26, 16, 41, .7);
    box-shadow: inset 0 0 0 1px var(--line);
    color: var(--text);
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background .2s, transform .15s;
}

.icon-btn:hover { background: rgba(124, 58, 237, .35); color: var(--text); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.is-fav { color: #fb7185; }
.icon-btn.is-fav .icon { animation: pop .4s var(--ease-out); filter: drop-shadow(0 0 6px rgba(251, 113, 133, .7)); }

.spinner {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .25);
    border-top-color: var(--orange-2);
    animation: spin .8s linear infinite;
}

.icon { flex: none; }

/* ---------------------------------------------------------------- Formulare */

.input {
    width: 100%;
    min-height: 46px;
    padding: .65rem .95rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: rgba(12, 7, 22, .7);
    color: var(--text);
    font: inherit;
    font-size: 16px;   /* verhindert Auto-Zoom auf iOS */
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.input::placeholder { color: rgba(162, 148, 187, .75); }
.input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(168, 85, 247, .25), var(--glow-purple); background: rgba(18, 10, 31, .9); }
.input--sm { min-height: 40px; padding: .45rem .8rem; margin-top: .5rem; }
.textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.input.invalid { border-color: var(--danger); }

.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }

.field__label {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.field-row > .field { margin-bottom: 1rem; }
.field-error, .validation-message { color: #fda4af; font-size: .85rem; margin: 0; }

.search-field { position: relative; flex: 1; }
.search-field > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-field__input { padding-left: 42px; border-radius: 999px; }
.search-field--big .search-field__input { min-height: 52px; }
.search-field__input::-webkit-search-cancel-button { filter: invert(.7) sepia(1) hue-rotate(220deg); }

.search-bar { display: flex; gap: .6rem; margin-bottom: 14px; }
.search-bar .btn { min-height: 52px; padding: 0 1.1rem; }

.select { position: relative; display: block; flex: 1 1 0; min-width: 0; }

.select select {
    width: 100%;
    min-height: 40px;
    padding: 0 2rem 0 .85rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-soft);
    font: inherit;
    font-size: .85rem;
    appearance: none;
    cursor: pointer;
    text-overflow: ellipsis;
}

.select select:focus { outline: none; border-color: var(--purple); }
.select option { background: var(--surface-solid); color: var(--text); }
.select > .icon { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }

/* ---------------------------------------------------------------- Chips & Segmente */

.chips { display: flex; gap: .5rem; }
.chips--wrap { flex-wrap: wrap; }

.chips--scroll {
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 calc(-1 * var(--gutter));
    padding: 2px var(--gutter);
    scroll-padding: var(--gutter);
}

.chips--scroll::-webkit-scrollbar { display: none; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    flex: none;
    min-height: 36px;
    padding: 0 .85rem;
    border: 0;
    border-radius: 999px;
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line);
    color: var(--text-soft);
    font-size: .88rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s, box-shadow .2s, color .2s, transform .15s;
}

.chip:hover { color: var(--text); background: var(--surface-2); }
.chip:active { transform: scale(.96); }

.chip.is-active {
    color: #fff;
    background: linear-gradient(135deg, rgba(168, 85, 247, .55), rgba(124, 58, 237, .45));
    box-shadow: inset 0 0 0 1px rgba(216, 180, 254, .6), 0 0 18px rgba(168, 85, 247, .35);
}

.chip__count {
    min-width: 1.4em;
    padding: 0 .4em;
    border-radius: 999px;
    background: rgba(0, 0, 0, .3);
    font-size: .75rem;
    text-align: center;
    color: var(--orange-2);
}

.chip--dashed { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); border: 0; outline: 1px dashed transparent; color: var(--muted); }

.segmented {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(12, 7, 22, .7);
    box-shadow: inset 0 0 0 1px var(--line);
}

.segmented--wrap { flex-wrap: wrap; border-radius: var(--radius); }
.segmented--tabs { margin-bottom: 16px; }

.segmented__btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 40px;
    padding: 0 .7rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background .25s, color .2s, box-shadow .25s;
}

.segmented__btn:hover { color: var(--text); }

.segmented__btn.is-active {
    color: #fff;
    background: var(--grad-magic);
    box-shadow: 0 4px 16px rgba(124, 58, 237, .45);
}

/* ---------------------------------------------------------------- Karten, Laden, Leerzustand */

.card {
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.card--pad { padding: 18px; }

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    padding: 3rem 1rem;
    color: var(--muted);
}

.loading img { width: 140px; animation: bob 2.4s ease-in-out infinite; filter: drop-shadow(0 0 12px rgba(168, 85, 247, .6)); }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: .25rem;
    padding: 2.5rem 1rem 2rem;
}

.empty-state--small { padding: 1.5rem 1rem; }
.empty-state p { color: var(--muted); max-width: 30rem; }
.empty-state__cat { width: min(240px, 70vw); margin-bottom: .5rem; animation: bob 2.8s ease-in-out infinite; filter: drop-shadow(0 0 20px rgba(168, 85, 247, .55)); }
.empty-state--small .empty-state__cat { width: 150px; }
.empty-state__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: .75rem; }

/* ---------------------------------------------------------------- Cover */

.cover {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 6px;
    background: var(--surface-solid);
}

.cover--placeholder {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 12% 10%;
    overflow: hidden;
    color: rgba(255, 255, 255, .9);
    text-align: center;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .18), transparent 40%),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, .04) 0 6px, transparent 6px 12px),
        linear-gradient(160deg, var(--ph-a), var(--ph-b));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), inset 6px 0 0 rgba(0, 0, 0, .25);
}

.cover__title {
    font-family: var(--font-display);
    font-size: clamp(.6rem, 2.6vw, .85rem);
    font-weight: 700;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.cover__star { position: absolute; right: 10%; bottom: 7%; color: var(--amber); font-size: .8rem; opacity: .8; }

/* ---------------------------------------------------------------- Bibliothek: Toolbar */

.toolbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.filters {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 calc(-1 * var(--gutter));
    padding: 2px var(--gutter);
}

.filters::-webkit-scrollbar { display: none; }
.filters .select { flex: none; }

/* ---------------------------------------------------------------- Bibliothek: Regal */

.shelf-grid {
    --gap: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(98px, 1fr));
    gap: 26px var(--gap);
}

.shelf-item {
    position: relative;
    display: flex;
    flex-direction: column;
    color: var(--text);
    animation: rise .5s var(--ease-out) both;
    animation-delay: calc(var(--i) * 35ms);
}

.shelf-item:hover { color: var(--text); }

.shelf-item__cover {
    position: relative;
    z-index: 1;
    padding: 0 4px;
    transform-origin: 50% 100%;
    transition: transform .35s var(--ease-out), filter .35s;
}

.shelf-item__cover .cover {
    border-radius: 4px 6px 6px 4px;
    box-shadow:
        inset 3px 0 0 rgba(255, 255, 255, .08),
        -3px 0 0 rgba(0, 0, 0, .35),
        0 10px 18px rgba(0, 0, 0, .55);
}

.shelf-item:hover .shelf-item__cover,
.shelf-item:focus-visible .shelf-item__cover {
    transform: translateY(-8px) rotate(-1.5deg);
    filter: drop-shadow(0 0 16px rgba(168, 85, 247, .5));
}

.shelf-item:active .shelf-item__cover { transform: translateY(-4px) scale(.98); }

/* Regalbrett: die Bretter benachbarter Einträge gehen ineinander über */
.shelf-item__plank {
    position: relative;
    height: 12px;
    margin: 0 calc(var(--gap) / -2);
    background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .12) 0 2px, transparent 2px 46px), var(--grad-wood);
    box-shadow: 0 8px 14px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 210, 160, .3);
}

.shelf-item__plank::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 8px;
    background: linear-gradient(rgba(0, 0, 0, .45), transparent);
}

.shelf-item__label { display: flex; flex-direction: column; gap: 1px; padding: 10px 2px 0; min-width: 0; }

.shelf-item__title {
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shelf-item__meta { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shelf-item__rating { margin-top: 2px; }

.shelf-item__fav {
    position: absolute;
    top: 6px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(11, 7, 18, .75);
    color: #fb7185;
    box-shadow: 0 0 10px rgba(251, 113, 133, .5);
}

.ribbon {
    position: absolute;
    left: 4px;
    right: 4px;
    bottom: 0;
    padding: 3px 4px;
    border-radius: 0 0 6px 4px;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-align: center;
    text-transform: uppercase;
    color: #1c0c03;
}

.ribbon--verliehen { background: linear-gradient(90deg, #fdba74, #f97316); }
.ribbon--wunschliste { background: linear-gradient(90deg, #d8b4fe, #a855f7); color: #1e0b3a; }

/* ---------------------------------------------------------------- Katzen-Bewertung */

.cat-rating { display: inline-flex; gap: 2px; }

.cat-rating__cat {
    display: inline-grid;
    place-items: center;
    padding: 2px;
    border: 0;
    background: none;
    cursor: pointer;
    transition: transform .2s var(--ease-out);
}

.cat-rating--readonly .cat-rating__cat { padding: 0; cursor: default; }
button.cat-rating__cat:hover { transform: translateY(-2px) scale(1.1); }
.cat-rating__cat.is-pop { animation: pop .45s var(--ease-out); }

.cat-rating__head { fill: rgba(162, 148, 187, .18); stroke: rgba(162, 148, 187, .45); stroke-width: 1.2; transition: fill .2s, stroke .2s; }
.cat-rating__eye, .cat-rating__nose { fill: rgba(162, 148, 187, .45); transition: fill .2s; }
.is-on .cat-rating__head { fill: #1a1029; stroke: var(--orange-2); }
.is-on .cat-rating__eye { fill: var(--amber); }
.is-on .cat-rating__nose { fill: #fb7185; }
.is-on svg { filter: drop-shadow(0 0 5px rgba(249, 115, 22, .55)); }
.cat-rating--readonly .is-on svg { filter: none; }

/* ---------------------------------------------------------------- Suchergebnisse */

.results {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.result {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 14px;
    padding: 12px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    animation: rise .55s var(--ease-out) both;
    animation-delay: calc(var(--i) * 60ms + 250ms);
}

.result__cover .cover { border-radius: 8px; box-shadow: var(--shadow-sm); }
.result__body { display: flex; flex-direction: column; min-width: 0; }

.result__kind {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin: 0 0 .15rem;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--orange-2);
}

.result__title { font-size: 1.02rem; margin: 0 0 .15rem; font-family: var(--font-body); }
.result__sub, .result__creators { margin: 0 0 .25rem; font-size: .82rem; color: var(--muted); }
.result__creators { color: var(--text-soft); }

.result__desc {
    margin: .15rem 0 .5rem;
    font-size: .84rem;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result__actions { margin-top: auto; display: flex; gap: .5rem; padding-top: .25rem; }

/* ---------------------------------------------------------------- Bottom-Sheet */

.sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(5, 3, 10, .65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fade-in .25s ease-out;
}

.sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 201;
    display: flex;
    flex-direction: column;
    max-height: 88dvh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    background: linear-gradient(180deg, #1d1131, #120a1f);
    border: 1px solid var(--line-strong);
    border-bottom: 0;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, .6), 0 0 80px rgba(124, 58, 237, .2);
    animation: sheet-up .38s var(--ease-out);
}

@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }

.sheet__handle { width: 44px; height: 5px; margin: 10px auto 0; border-radius: 99px; background: var(--line-strong); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 8px 16px 4px 20px; }
.sheet__title { margin: 0; font-size: 1.15rem; }
.sheet__body { padding: 10px 20px 16px; overflow-y: auto; overscroll-behavior: contain; }
.sheet__foot { display: flex; gap: .6rem; padding: 12px 20px calc(14px + var(--safe-bottom)); border-top: 1px solid var(--line); }
.sheet__foot .btn { flex: 1; }

.sheet-preview { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.sheet-preview__cover { width: 64px; flex: none; }
.sheet-preview__cover .cover { border-radius: 6px; box-shadow: var(--shadow-sm); }
.sheet-preview__title { margin: 0; font-weight: 600; font-size: 1.05rem; line-height: 1.25; }

/* ---------------------------------------------------------------- Toasts */

.toasts {
    position: fixed;
    left: 50%;
    bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 14px);
    z-index: 400;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    width: min(440px, calc(100vw - 2 * var(--gutter)));
    transform: translateX(-50%);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: .6rem;
    width: 100%;
    padding: .7rem .9rem;
    border-radius: var(--radius);
    background: rgba(26, 16, 41, .95);
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow-md), var(--glow-purple);
    backdrop-filter: blur(12px);
    pointer-events: auto;
    animation: toast-in .4s var(--ease-out);
}

.toast--error { border-color: rgba(244, 63, 94, .5); box-shadow: var(--shadow-md), 0 0 24px rgba(244, 63, 94, .3); }
.toast--success { border-color: rgba(249, 115, 22, .45); box-shadow: var(--shadow-md), var(--glow-orange); }
.toast__icon { font-size: 1.15rem; }
.toast__msg { flex: 1; font-size: .9rem; line-height: 1.35; }
.toast__link { font-weight: 700; font-size: .88rem; white-space: nowrap; }

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

/* ---------------------------------------------------------------- Cover-Auswahl & Editor */

.cover-picker { display: flex; flex-direction: column; gap: 12px; }
.cover-picker__preview { position: relative; width: 150px; margin: 0 auto; }
.cover-picker__preview .cover { border-radius: 8px; box-shadow: var(--shadow-md); }
.cover-picker__preview.is-busy .cover { filter: brightness(.4) blur(1px); }
.cover-picker__busy { position: absolute; inset: 0; display: grid; place-items: center; }
.cover-picker__busy img { width: 120px; animation: bob 1.6s ease-in-out infinite; }
.cover-picker__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.cover-picker__actions label { cursor: pointer; }
.cover-picker__url { display: flex; gap: .5rem; }
.cover-picker__url .btn { flex: none; }

.editor__layout { display: grid; gap: 20px; }
.editor__actions {
    position: sticky;
    bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 8px);
    z-index: 5;
    display: flex;
    justify-content: flex-end;
    gap: .6rem;
    margin-top: .5rem;
    padding: 10px;
    border-radius: 999px;
    background: rgba(18, 10, 31, .85);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 0 0 1px var(--line), var(--shadow-md);
}

.editor__actions .btn--primary { flex: 1; max-width: 320px; }

/* ---------------------------------------------------------------- Detailseite */

.page-head { display: flex; align-items: center; gap: .75rem; margin-bottom: 14px; }
.page-head__title { margin: 0; font-size: 1.4rem; }
.page-head--overlay { position: relative; z-index: 2; justify-content: space-between; }
.page-head__actions { display: flex; gap: .5rem; }

.detail { position: relative; }

.detail__backdrop {
    position: absolute;
    top: -18px;
    left: calc(-1 * var(--gutter));
    right: calc(-1 * var(--gutter));
    height: 420px;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .9), transparent);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .9), transparent);
}

.detail__backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(36px) saturate(1.4) brightness(.55);
    transform: scale(1.3);
}

.detail__hero {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
}

.detail__cover {
    position: relative;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    animation: rise .6s var(--ease-out) both;
}

.detail__cover .cover {
    border-radius: 10px;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(168, 85, 247, .3), inset 0 0 0 1px rgba(255, 255, 255, .1);
}

.detail__cover-edit {
    position: absolute;
    right: -6px;
    bottom: -6px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--grad-pumpkin);
    color: #1c0c03;
    box-shadow: 0 4px 12px rgba(249, 115, 22, .5);
}

.detail__info { min-width: 0; animation: rise .6s var(--ease-out) .08s both; }
.detail__title { font-size: clamp(1.35rem, 5.5vw, 2.2rem); margin: .1rem 0 .2rem; overflow-wrap: anywhere; }
.detail__original { margin: 0 0 .2rem; color: var(--muted); font-size: .9rem; }
.detail__tagline { margin: .2rem 0 .4rem; color: var(--purple-soft); font-style: italic; font-size: .92rem; }

.meta-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 .6rem; }

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .6rem;
    border-radius: 999px;
    background: rgba(12, 7, 22, .6);
    box-shadow: inset 0 0 0 1px var(--line);
    font-size: .8rem;
    color: var(--text-soft);
}

.detail__rating { margin-left: -2px; }
.detail__organize { position: relative; z-index: 1; padding: 16px 16px 2px; margin-bottom: 22px; }
.detail__section { margin-bottom: 22px; }
.detail__desc { color: var(--text-soft); white-space: pre-line; }

.facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: .45rem 1rem;
    margin: 0 0 1rem;
    font-size: .92rem;
}

.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--text-soft); }
.link-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.detail__danger { display: flex; justify-content: center; padding: 10px 0 20px; }

/* ---------------------------------------------------------------- Regale-Seite */

.shelf-cards { display: grid; grid-template-columns: 1fr; gap: 14px; }

.shelf-card {
    position: relative;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    animation: rise .5s var(--ease-out) both;
    animation-delay: calc(var(--i) * 60ms);
    transition: transform .25s var(--ease-out), box-shadow .25s;
}

.shelf-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg), var(--glow-purple); }
.shelf-card__link { display: block; color: var(--text); padding: 18px 18px 14px; }
.shelf-card__link:hover { color: var(--text); }

.shelf-card__stack {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 104px;
}

.shelf-card__emoji { font-size: 3rem; line-height: 1; padding-bottom: 6px; filter: drop-shadow(0 0 12px rgba(168, 85, 247, .5)); }

.shelf-card__cover {
    width: 62px;
    margin: 0 -10px;
    transform: rotate(calc((var(--c) - 1.5) * 7deg)) translateY(calc(var(--c) * 2px));
    transform-origin: 50% 100%;
    transition: transform .3s var(--ease-out);
}

.shelf-card__cover .cover { border-radius: 4px; box-shadow: 0 8px 16px rgba(0, 0, 0, .55); }
.shelf-card:hover .shelf-card__cover { transform: rotate(calc((var(--c) - 1.5) * 11deg)) translateY(-4px); }

.shelf-card__plank {
    height: 11px;
    margin: 0 -18px;
    background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .12) 0 2px, transparent 2px 46px), var(--grad-wood);
    box-shadow: 0 8px 14px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 210, 160, .3);
}

.shelf-card__info { padding-top: 12px; }
.shelf-card__name { margin: 0; font-family: var(--font-body); font-size: 1.08rem; }
.shelf-card__count { margin: 0; color: var(--muted); font-size: .85rem; }
.shelf-card__edit { position: absolute; top: 12px; right: 12px; }

.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }

.emoji-grid__btn {
    aspect-ratio: 1;
    border: 0;
    border-radius: var(--radius-sm);
    background: rgba(12, 7, 22, .6);
    box-shadow: inset 0 0 0 1px var(--line);
    font-size: 1.4rem;
    cursor: pointer;
    transition: transform .15s, box-shadow .2s, background .2s;
}

.emoji-grid__btn:hover { transform: scale(1.08); }
.emoji-grid__btn.is-active { background: rgba(168, 85, 247, .3); box-shadow: inset 0 0 0 2px var(--purple), var(--glow-purple); }

/* ---------------------------------------------------------------- Apfel 🍎 */

.apfel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100dvh - 220px);
    text-align: center;
    overflow: hidden;
}

.apfel__sky { position: absolute; inset: 0; pointer-events: none; }

.apfel__float {
    position: absolute;
    left: var(--x);
    bottom: -40px;
    font-size: 1.5rem;
    color: var(--amber);
    opacity: 0;
    filter: drop-shadow(0 0 8px rgba(249, 115, 22, .6));
    animation: float-rise 5.5s ease-in var(--d) infinite;
}

@keyframes float-rise {
    0% { transform: translateY(0) scale(.6) rotate(-10deg); opacity: 0; }
    15% { opacity: .9; }
    100% { transform: translateY(-75vh) scale(1.2) rotate(12deg); opacity: 0; }
}

.apfel__cat {
    width: min(360px, 85vw);
    animation: apfel-loop 6s ease-in-out infinite;
    filter: drop-shadow(0 0 26px rgba(168, 85, 247, .6));
}

@keyframes apfel-loop {
    0%, 100% { transform: translate(0, 0) rotate(0); }
    25% { transform: translate(18px, -16px) rotate(-3deg); }
    50% { transform: translate(0, -24px) rotate(0); }
    75% { transform: translate(-18px, -12px) rotate(3deg); }
}

.apfel__title {
    margin-top: 1rem;
    font-size: clamp(1.6rem, 7vw, 2.6rem);
    background: linear-gradient(90deg, #e9d5ff, #c084fc, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.apfel__status { color: var(--text-soft); font-size: 1.05rem; }

/* ---------------------------------------------------------------- Blazor-Fehlerleiste */

#blazor-error-ui {
    position: fixed;
    left: var(--gutter);
    right: var(--gutter);
    bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px);
    z-index: 1000;
    display: none;
    align-items: center;
    gap: .75rem;
    padding: .75rem 2.5rem .75rem .75rem;
    border-radius: var(--radius);
    background: #2a0f1a;
    border: 1px solid rgba(244, 63, 94, .5);
    box-shadow: var(--shadow-lg);
    color: #fecdd3;
}

#blazor-error-ui img { width: 54px; }
#blazor-error-ui .reload { font-weight: 700; }
#blazor-error-ui .dismiss { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); cursor: pointer; }

/* ---------------------------------------------------------------- Größere Bildschirme */

@media (min-width: 560px) {
    .shelf-grid { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); --gap: 18px; }
    .shelf-cards { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
    .result { grid-template-columns: 110px 1fr; }
    .detail__hero { grid-template-columns: 180px 1fr; gap: 26px; }
}

@media (min-width: 900px) {
    :root { --gutter: 28px; }

    .topnav { display: flex; align-items: center; gap: .25rem; }
    .tabbar { display: none; }
    .brand__cat { width: 64px; }
    .brand__name { font-size: 1.45rem; }

    .page { padding-top: 28px; padding-bottom: 60px; }
    .toasts { bottom: 24px; }
    #blazor-error-ui { bottom: 20px; left: auto; width: 420px; }

    .toolbar { flex-direction: row; flex-wrap: wrap; align-items: center; }
    .toolbar .search-field { flex: 1 1 280px; max-width: 420px; }
    .toolbar .chips--scroll { margin: 0; padding: 2px; flex: 1 1 auto; }
    .filters { flex: 1 1 100%; margin: 0; padding: 2px; }

    .shelf-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 34px 24px; --gap: 24px; }
    .shelf-item__title { font-size: .9rem; }

    .results { grid-template-columns: repeat(2, 1fr); }
    .result { grid-template-columns: 120px 1fr; }

    .segmented--tabs { max-width: 560px; }
    .search-bar { max-width: 760px; }
    .stage { max-width: 100%; }

    .sheet {
        left: 50%;
        right: auto;
        bottom: auto;
        top: 50%;
        width: min(520px, calc(100vw - 48px));
        max-height: 80vh;
        border-radius: var(--radius-xl);
        border-bottom: 1px solid var(--line-strong);
        transform: translate(-50%, -50%);
        animation: sheet-pop .3s var(--ease-out);
    }

    @keyframes sheet-pop { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); } to { opacity: 1; transform: translate(-50%, -50%); } }

    .sheet__handle { display: none; }
    .sheet__head { padding-top: 16px; }
    .sheet__foot { padding-bottom: 16px; }

    .editor__layout { grid-template-columns: 220px 1fr; gap: 32px; }
    .editor__cover { position: sticky; top: 100px; align-self: start; }
    .editor__actions { bottom: 16px; }

    .detail__hero { grid-template-columns: 240px 1fr; gap: 36px; margin-top: 10px; }
    .detail__organize { max-width: 760px; }
    .detail__section { max-width: 760px; }
    .detail__backdrop { height: 520px; }

    .hide-xs { display: inline; }
}

@media (max-width: 380px) {
    .hide-xs { display: none; }
}

/* ---------------------------------------------------------------- Weniger Bewegung */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        animation-delay: 0ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }

    .ambient-cat { display: none; }
}

/* ---------------------------------------------------------------- Anmeldung & Konto */

.auth {
    display: grid;
    place-items: center;
    min-height: 100dvh;
    padding: 24px var(--gutter) calc(24px + var(--safe-bottom));
}

.auth__card {
    width: min(420px, 100%);
    padding: 22px 22px 26px;
    border-radius: var(--radius-xl);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow-lg), 0 0 80px rgba(124, 58, 237, .22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: rise .5s var(--ease-out) both;
}

.auth__cat {
    display: block;
    width: 170px;
    margin: -6px auto 0;
    animation: bob 2.8s ease-in-out infinite;
    filter: drop-shadow(0 0 16px rgba(168, 85, 247, .6));
}

.auth__brand {
    margin: 0 0 1rem;
    text-align: center;
    font-family: var(--font-brand);
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(90deg, #f5e8ff 0%, #d8b4fe 40%, #fdba74 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth__title { margin: 0 0 .2rem; font-size: 1.45rem; text-align: center; }
.auth__sub { margin: 0 0 1.2rem; text-align: center; color: var(--muted); }
.auth__form .btn { margin-top: .5rem; }

.auth__error {
    padding: .65rem .9rem;
    border-radius: var(--radius);
    background: rgba(244, 63, 94, .12);
    border: 1px solid rgba(244, 63, 94, .4);
    color: #fecdd3;
    font-size: .92rem;
}

.field__hint { color: var(--muted); font-size: .8rem; line-height: 1.4; }
.field__hint code { font-size: .75rem; overflow-wrap: anywhere; }
.input--code { font-family: ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }

.check {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: .25rem 0 .75rem;
    color: var(--text-soft);
    font-size: .92rem;
    cursor: pointer;
}

.check input { width: 20px; height: 20px; accent-color: var(--orange); }

.notice--success { background: rgba(168, 85, 247, .12); border-color: var(--line-strong); color: var(--purple-soft); }

.account-grid { display: grid; gap: 16px; }
.account-grid .section-title { display: flex; align-items: center; gap: .45rem; }
.account-grid form { margin: 0; }

@media (min-width: 900px) {
    .account-grid { grid-template-columns: repeat(2, 1fr); align-items: start; }
}

/* ---------------------------------------------------------------- Der Dackel 🐕 */

.dackel { display: block; overflow: visible; }
.dackel .dk-line { stroke: #120c0a; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.dackel .dk-leg-near { fill: #ebe7e3; }
.dackel .dk-leg-far { fill: #bdb6b0; }
.dackel .dk-patch { fill: #2a2220; }
.dackel .dk-patch--soft { fill: #6f6661; }
.dackel .dk-hair { fill: none; stroke: rgba(40, 32, 30, .35); stroke-width: 1.4; stroke-linecap: round; }
.dackel .dk-hair--light { stroke: rgba(255, 255, 255, .18); }
.dackel .dk-mouth { fill: none; stroke: #120c0a; stroke-width: 1.6; stroke-linecap: round; }
.dackel__scarf { fill: #7c3aed; stroke: #120c0a; stroke-width: 2; stroke-linejoin: round; }
.dackel__scarf--tip { fill: #6d28d9; }
.dackel__star { fill: #fbbf24; stroke: #b45309; stroke-width: 1; }
.dackel__shadow ellipse { fill: rgba(0, 0, 0, .35); }

.dackel__tail { transform-origin: 64px 70px; }
.dackel__ear { transform-origin: 196px 32px; }
.dackel__head { transform-origin: 186px 70px; }
.dackel__leg { transform-box: fill-box; transform-origin: 50% 6%; }
.dackel__zzz { display: none; }
.dackel--sleep .dackel__zzz { display: inline; }
.dackel__zzz text { font: 700 13px var(--font-display); fill: #c4b5fd; animation: zzz 2.4s ease-in-out infinite; }
.dackel__zzz text:nth-child(2) { font-size: 17px; animation-delay: .8s; }

/* Grundzustand: leise atmen, Rute wedelt gemütlich */
.dackel__body-wrap { animation: dk-breathe 3s ease-in-out infinite; transform-origin: 124px 122px; }
.dackel__tail { animation: dk-wag 1.2s ease-in-out infinite; }
.dackel__eye { animation: dk-blink 5s infinite; transform-origin: 216px 35px; }

/* Laufen: Beine im Kreuzgang, Körper wippt, Ohr schwingt */
.dackel--walk .dackel__body-wrap,
.dackel--run .dackel__body-wrap,
.dackel--sniff .dackel__body-wrap { animation: dk-bounce .5s ease-in-out infinite; }
.dackel--walk .dackel__leg--fh, .dackel--walk .dackel__leg--bf { animation: dk-step .5s ease-in-out infinite; }
.dackel--walk .dackel__leg--bh, .dackel--walk .dackel__leg--ff { animation: dk-step .5s ease-in-out -.25s infinite; }
.dackel--walk .dackel__ear { animation: dk-ear .5s ease-in-out infinite; }
.dackel--walk .dackel__tail { animation: dk-wag .5s ease-in-out infinite; }

.dackel--run .dackel__body-wrap { animation-duration: .28s; }
.dackel--run .dackel__leg--fh, .dackel--run .dackel__leg--bf { animation: dk-step-big .28s ease-in-out infinite; }
.dackel--run .dackel__leg--bh, .dackel--run .dackel__leg--ff { animation: dk-step-big .28s ease-in-out -.14s infinite; }
.dackel--run .dackel__ear { animation: dk-ear-fly .28s ease-in-out infinite; }
.dackel--run .dackel__tail { animation: dk-wag .28s ease-in-out infinite; }

/* Schnüffeln: Nase am Boden, Kopf zuckt */
.dackel--sniff .dackel__body-wrap { animation-duration: .8s; }
.dackel--sniff .dackel__head { animation: dk-sniff .9s ease-in-out infinite; }
.dackel--sniff .dackel__leg--fh, .dackel--sniff .dackel__leg--bf { animation: dk-step .8s ease-in-out infinite; }
.dackel--sniff .dackel__leg--bh, .dackel--sniff .dackel__leg--ff { animation: dk-step .8s ease-in-out -.4s infinite; }

/* Freuen: hüpfen & Turbo-Wedeln */
.dackel--happy .dackel__body-wrap { animation: dk-hop .55s cubic-bezier(.3, .7, .4, 1) infinite; }
.dackel--happy .dackel__tail { animation: dk-wag .18s ease-in-out infinite; }
.dackel--happy .dackel__ear { animation: dk-ear-fly .55s ease-in-out infinite; }
.dackel--happy .dackel__head { animation: dk-tilt 1.1s ease-in-out infinite; }

/* Sitzen: Kopf schief legen ("Hä?") */
.dackel--sit .dackel__head { animation: dk-tilt-slow 2.6s ease-in-out infinite; }

/* Schlafen: hinlegen, Kopf runter, Augen zu, ruhiges Atmen */
.dackel--sleep .dackel__body-wrap { animation: dk-breathe 3.6s ease-in-out infinite; }
.dackel--sleep .dackel__body, .dackel--sleep .dackel__tail { transform: translateY(14px); }
.dackel--sleep .dackel__leg { transform: translateY(8px) scaleY(.35); }
.dackel--sleep .dackel__head { transform: rotate(14deg) translate(-4px, 12px); }
.dackel--sleep .dackel__eye { transform: scaleY(.1); animation: none; }
.dackel--sleep .dackel__tail { animation: dk-wag 4s ease-in-out infinite; }

/* Schwimmen: Pfoten paddeln schnell, Körper schaukelt in den Wellen, Kopf bleibt oben */
.dackel--swim .dackel__body-wrap { animation: dk-swim 1.4s ease-in-out infinite; }
.dackel--swim .dackel__leg--fh, .dackel--swim .dackel__leg--bf { animation: dk-paddle .32s ease-in-out infinite; }
.dackel--swim .dackel__leg--bh, .dackel--swim .dackel__leg--ff { animation: dk-paddle .32s ease-in-out -.16s infinite; }
.dackel--swim .dackel__head { animation: dk-swim-head 1.4s ease-in-out infinite; }
.dackel--swim .dackel__ear { animation: dk-ear .7s ease-in-out infinite; }
.dackel--swim .dackel__tail { animation: dk-wag .4s ease-in-out infinite; }

@keyframes dk-swim { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(5px) rotate(2deg); } }
@keyframes dk-paddle { 0%, 100% { transform: rotate(-40deg); } 50% { transform: rotate(35deg); } }
@keyframes dk-swim-head { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(-2deg) translateY(-2px); } }

@keyframes dk-breathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.015) translateY(-.6px); } }
@keyframes dk-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes dk-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-22px) rotate(-3deg); } 70% { transform: translateY(0) scaleY(.95); } }
@keyframes dk-step { 0%, 100% { transform: rotate(-16deg); } 50% { transform: rotate(16deg); } }
@keyframes dk-step-big { 0%, 100% { transform: rotate(-30deg); } 50% { transform: rotate(30deg); } }
@keyframes dk-wag { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(14deg); } }
@keyframes dk-ear { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(6deg); } }
@keyframes dk-ear-fly { 0%, 100% { transform: rotate(-18deg); } 50% { transform: rotate(-30deg); } }
@keyframes dk-sniff { 0%, 100% { transform: rotate(16deg) translateY(4px); } 30% { transform: rotate(20deg) translateY(6px); } 60% { transform: rotate(14deg) translateY(4px); } }
@keyframes dk-tilt { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(8deg); } }
@keyframes dk-tilt-slow { 0%, 40%, 100% { transform: rotate(0); } 55%, 85% { transform: rotate(-12deg); } }
@keyframes dk-blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes zzz { 0% { opacity: 0; transform: translate(0, 4px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(6px, -10px); } }

/* Der Dackel spaziert ab und zu unten durchs Bild – antippbar */
.dackel-walker {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--tabbar-h) + var(--safe-bottom) - 4px);
    z-index: 55;
    height: 120px;
    pointer-events: none;
}

.dw-dog {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 120px;
    visibility: hidden;
    pointer-events: none;
    transition-property: transform;
    transition-timing-function: linear;
    -webkit-tap-highlight-color: transparent;
}

.dw-dog.is-visible { visibility: visible; pointer-events: auto; cursor: pointer; }
.dw-dog:focus-visible { outline: 2px dashed var(--orange-2); outline-offset: 4px; border-radius: 12px; }
.dw-dog .dackel { position: relative; z-index: 1; }

/* Leuchtring + hüpfende Pfote: "Tipp mich an!" */
.dw-dog.is-idle::before {
    content: "";
    position: absolute;
    left: 6%;
    right: 6%;
    bottom: -4px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(251, 146, 60, .8);
    box-shadow: 0 0 16px rgba(249, 115, 22, .6);
    animation: dw-ring 1.6s ease-out infinite;
}

.dw-dog.is-visible:hover .dackel { scale: 1.06; transition: scale .2s; }

.dw-hint {
    position: absolute;
    left: 50%;
    top: -6px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin-left: -15px;
    border-radius: 50%;
    background: var(--grad-pumpkin);
    box-shadow: 0 0 0 3px rgba(11, 7, 18, .7), 0 0 16px rgba(249, 115, 22, .8);
    font-size: 15px;
    animation: dw-hint 1.1s ease-in-out infinite;
}

@keyframes dw-ring { 0% { transform: scale(.7); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes dw-hint { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-8px) rotate(8deg); } }

.dackel-walker .dw-bubble { z-index: 3; bottom: 104px; width: max-content; max-width: 240px; white-space: normal; line-height: 1.3; }
.dackel-walker .dw-bubble::after { left: calc(var(--tail) - 6px); }
.dackel-walker .dw-bubble.bubble--long { animation: bubble-long 6.5s ease-out both; }

@keyframes bubble-long {
    0% { opacity: 0; transform: translateY(6px) scale(.6); }
    5% { opacity: 1; transform: translateY(0) scale(1.05); }
    8%, 92% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: translateY(-8px); }
}

/* "Mama!": Pfotenabdrücke schweben hoch */
.dw-paws i { position: absolute; left: 50%; bottom: 60%; font-style: normal; font-size: 18px; opacity: 0; animation: dw-float 1.8s ease-out both; }
.dw-paws i:nth-child(2) { margin-left: -30px; animation-delay: .3s; }
.dw-paws i:nth-child(3) { margin-left: 22px; animation-delay: .6s; }
.dw-paws i:nth-child(4) { margin-left: -8px; animation-delay: .9s; }

@keyframes dw-float { 0% { opacity: 0; transform: translateY(0) scale(.5); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-70px) scale(1.1) rotate(15deg); } }

/* "Wao Wao!": Schallwellen aus dem Maul */
.dw-bark { position: absolute; right: -14px; top: 18px; width: 36px; height: 36px; z-index: 2; }
.dw-bark--left { right: auto; left: -14px; transform: scaleX(-1); }
.dw-bark i { position: absolute; inset: 0; border: 3px solid transparent; border-right-color: #fde68a; border-radius: 50%; opacity: 0; animation: dw-wave .7s ease-out infinite; }
.dw-bark i:nth-child(2) { animation-delay: .2s; }
.dw-bark i:nth-child(3) { animation-delay: .4s; }

@keyframes dw-wave { 0% { opacity: 1; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.4); } }

/* "Käse ist lecker!": Käse kullert, wird gefressen */
.dw-cheese {
    position: absolute;
    left: 0;
    bottom: 6px;
    font-size: 30px;
    line-height: 1;
    transition-property: transform;
    transition-timing-function: cubic-bezier(.3, .7, .4, 1);
    animation: dw-pop .35s cubic-bezier(.2, 1.6, .4, 1) both;
}

.dw-cheese.is-eaten { animation: dw-eaten .4s ease-in forwards; }

@keyframes dw-pop { from { scale: 0; } to { scale: 1; } }
@keyframes dw-eaten { to { scale: 0; opacity: 0; rotate: 40deg; } }

/* "Miezi!": die Miezi flitzt vorbei */
.dw-cat {
    position: absolute;
    bottom: 34px;
    width: 120px;
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, .7));
    animation: dw-cat-fly 2.4s cubic-bezier(.4, 0, .7, 1) .1s both;
}

@keyframes dw-cat-fly {
    0% { opacity: 0; transform: translate(0, 20px) scaleX(var(--dir)) scale(.6); }
    15% { opacity: 1; transform: translate(calc(var(--dir) * 10vw), -10px) scaleX(var(--dir)) scale(.9); }
    100% { opacity: 1; transform: translate(calc(var(--dir) * 120vw), -40px) scaleX(var(--dir)) scale(.9); }
}

/* "I'm not a ketchup flasche!": 💩 erscheint, der Besen fegt es weg */
.dw-mess { position: absolute; bottom: 4px; width: 40px; height: 40px; }
.dw-poop { position: absolute; left: 0; bottom: 0; font-size: 28px; line-height: 1; animation: dw-plop .5s cubic-bezier(.2, 1.6, .4, 1) .2s both, dw-swept 1s cubic-bezier(.5, 0, .9, .5) 2.2s forwards; }
.dw-broom { position: absolute; left: calc(var(--dir) * 70px); bottom: 2px; font-size: 34px; line-height: 1; opacity: 0; transform: scaleX(var(--dir)); animation: dw-broom 2.2s ease-in-out 1.1s forwards; }
.dw-dust { position: absolute; left: 10px; bottom: 6px; }
.dw-dust i { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: rgba(216, 200, 238, .55); opacity: 0; animation: dw-dust .8s ease-out 2.2s both; }
.dw-dust i:nth-child(2) { left: 12px; animation-delay: 2.3s; }
.dw-dust i:nth-child(3) { left: -10px; animation-delay: 2.35s; }

@keyframes dw-plop { from { opacity: 0; transform: translateY(-20px) scale(.4); } to { opacity: 1; transform: none; } }
@keyframes dw-swept { to { transform: translate(calc(var(--dir) * -110vw), -20px) rotate(calc(var(--dir) * -720deg)); } }
@keyframes dw-broom {
    0% { opacity: 0; transform: translateX(0) scaleX(var(--dir)); }
    15% { opacity: 1; }
    45% { transform: translateX(calc(var(--dir) * -60px)) scaleX(var(--dir)) rotate(-20deg); }
    55% { transform: translateX(calc(var(--dir) * -50px)) scaleX(var(--dir)) rotate(10deg); }
    100% { opacity: 1; transform: translateX(calc(var(--dir) * -110vw)) scaleX(var(--dir)) rotate(-10deg); }
}
@keyframes dw-dust { 0% { opacity: 0; transform: scale(.3); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-24px) scale(1.8); } }

/* "Just keep swimming": Wasser steigt */
.dw-water {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 46px;
    overflow: hidden;
    animation: dw-water 4.6s ease-in-out both;
}

.dw-water i {
    position: absolute;
    left: -50%;
    width: 200%;
    height: 100%;
    background:
        radial-gradient(14px 8px at 14px 0, transparent 13px, rgba(96, 165, 250, .75) 14px) 0 0 / 28px 100% repeat-x;
    animation: dw-waves 1.6s linear infinite;
}

.dw-water i:nth-child(2) { top: 10px; opacity: .6; background-color: rgba(37, 99, 235, .45); animation-duration: 2.3s; animation-direction: reverse; }

@keyframes dw-water { 0% { transform: translateY(100%); } 12%, 85% { transform: translateY(0); } 100% { transform: translateY(100%); } }
@keyframes dw-waves { to { transform: translateX(28px); } }

.dw-dog .dackel { transition: translate .5s ease, scale .2s; }
.act-swim .dw-dog .dackel { translate: 0 14px; }

/* Sprechblase "Wuff!" */
.bubble {
    position: absolute;
    bottom: 88%;
    padding: .25rem .6rem;
    border-radius: 12px;
    background: #fff7ed;
    color: #1c0c03;
    font-weight: 800;
    font-size: .85rem;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
    animation: bubble 1.6s ease-out both;
}

.bubble::after {
    content: "";
    position: absolute;
    left: 14px;
    bottom: -6px;
    border: 6px solid transparent;
    border-top-color: #fff7ed;
    border-bottom: 0;
}

@keyframes bubble {
    0% { opacity: 0; transform: translateY(6px) scale(.6); }
    15% { opacity: 1; transform: translateY(0) scale(1.05); }
    25%, 80% { transform: scale(1); opacity: 1; }
    100% { opacity: 0; transform: translateY(-8px); }
}

@media (min-width: 900px) {
    .dackel-walker { bottom: 0; }
}

.auth__card { position: relative; }
.auth__dackel { position: absolute; right: -14px; bottom: -22px; }
.empty-state__dackel { margin: -46px 0 6px 120px; }

@media (prefers-reduced-motion: reduce) {
    .dackel-walker { display: none; }
}

/* ---------------------------------------------------------------- Suche: Scan-Knopf, Filter, Mehr laden */

.search-field--with-action .search-field__input { padding-right: 52px; }

.search-field__action {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(168, 85, 247, .35), rgba(249, 115, 22, .3));
    color: var(--text);
    cursor: pointer;
    box-shadow: inset 0 0 0 1px var(--line-strong);
    transition: transform .15s, box-shadow .2s;
}

.search-field__action:hover { box-shadow: inset 0 0 0 1px var(--orange-2), var(--glow-orange); }
.search-field__action:active { transform: translateY(-50%) scale(.92); }

.scan-info {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin-bottom: 14px;
    padding: .85rem .9rem;
    border-radius: var(--radius-lg);
    background: rgba(168, 85, 247, .12);
    border: 1px solid var(--line-strong);
    animation: rise .4s var(--ease-out);
}

.scan-info > .icon { color: var(--orange-2); margin-top: 2px; }
.scan-info__body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.scan-info__body p { margin: 0; font-size: .92rem; color: var(--text-soft); }
.scan-info--unknown { background: rgba(249, 115, 22, .1); border-color: rgba(249, 115, 22, .35); }
.scan-info--inlibrary { background: rgba(34, 197, 94, .08); border-color: rgba(134, 239, 172, .3); }
.icon-btn--sm { width: 32px; height: 32px; }

.results-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 18px 0 10px;
}

.results-bar__count { flex: 1; margin: 0; color: var(--muted); font-size: .88rem; }
.select--inline { flex: none; }
.select--inline select { min-height: 36px; }
.active-filters { margin-bottom: 6px; }
.chip--removable { color: #fff; background: rgba(168, 85, 247, .35); box-shadow: inset 0 0 0 1px rgba(216, 180, 254, .5); }

.result__genres { margin: 0 0 .2rem; font-size: .75rem; color: var(--purple-soft); opacity: .85; }

.results { margin-top: 10px; }
.load-more { display: flex; justify-content: center; margin-top: 18px; }

/* ---------------------------------------------------------------- Admin: Statistik */

.admin-hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.admin-hero__controls { display: flex; align-items: center; gap: .5rem; }
.admin-hero__controls .segmented__btn { flex: none; padding: 0 .9rem; }

.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }

.kpi {
    padding: 12px 14px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--line);
    animation: rise .45s var(--ease-out) both;
}

.kpi__label { display: flex; align-items: center; gap: .35rem; margin: 0 0 .2rem; font-size: .76rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.kpi__value { margin: 0; font-size: 1.7rem; font-weight: 700; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.kpi__delta { margin: .2rem 0 0; font-size: .74rem; color: var(--text-soft); }
.kpi__delta span { color: var(--muted); }
.kpi--warn { border-color: rgba(249, 115, 22, .55); box-shadow: 0 0 18px rgba(249, 115, 22, .15); }
.kpi--warn .kpi__label { color: var(--orange-2); }

.admin-grid { display: grid; gap: 14px; }
.admin-card .section-title { margin-bottom: .75rem; }
.admin-note { margin: .5rem 0 .75rem; font-size: .8rem; color: var(--muted); }
.admin-sub { margin: 1rem 0 .5rem; font-family: var(--font-body); font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.admin-columns { display: grid; gap: 4px 24px; }

.mini-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.mini-stats div { display: flex; flex-direction: column; padding: 10px 12px; border-radius: var(--radius); background: rgba(12, 7, 22, .5); box-shadow: inset 0 0 0 1px var(--line); }
.mini-stats strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.mini-stats span { font-size: .75rem; color: var(--muted); }

/* Säulendiagramm */
.chart { margin: 0; }
.chart__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.chart__title { font-family: var(--font-display); font-weight: 700; color: var(--purple-soft); }
.chart__total { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.chart__plot { position: relative; height: 150px; padding-top: 4px; border-bottom: 1px solid var(--line-strong); }

.chart__grid { position: absolute; left: 0; right: 0; top: 4px; border-top: 1px dashed var(--line); }
.chart__grid span { position: absolute; right: 0; top: -1.1em; font-size: .68rem; color: var(--muted); }

.chart__bars { position: absolute; inset: 4px 0 0; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 2px; align-items: end; }

.chart__col { position: relative; height: 100%; display: flex; align-items: flex-end; outline: none; cursor: default; }
.chart__col::before { content: ""; position: absolute; inset: 0 -1px; }   /* größere Hover-Fläche */

.chart__bar {
    width: 100%;
    min-height: 0;
    border-radius: 4px 4px 0 0;
    background: #a855f7;
    transition: background .15s;
}

.chart__bar.is-zero { height: 2px !important; border-radius: 1px; background: var(--line); }
.chart__col.is-today .chart__bar:not(.is-zero) { background: #c084fc; }
.chart__col:hover .chart__bar:not(.is-zero), .chart__col:focus-visible .chart__bar:not(.is-zero) { background: #d8b4fe; }

.chart__tip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    z-index: 5;
    padding: .3rem .55rem;
    border-radius: 8px;
    background: #f6efff;
    color: #1a1029;
    font-size: .74rem;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s;
}

.chart__col:first-child .chart__tip, .chart__col:nth-child(2) .chart__tip { left: 0; transform: none; }
.chart__col:last-child .chart__tip, .chart__col:nth-last-child(2) .chart__tip { left: auto; right: 0; transform: none; }
.chart__col:hover .chart__tip, .chart__col:focus-visible .chart__tip { opacity: 1; }

.chart__axis { display: flex; justify-content: space-between; margin-top: .3rem; font-size: .7rem; color: var(--muted); }

.chart__table { margin-top: .5rem; font-size: .8rem; color: var(--muted); }
.chart__table summary { cursor: pointer; width: max-content; }
.chart__table table { margin-top: .4rem; border-collapse: collapse; }
.chart__table td { padding: .15rem 1rem .15rem 0; color: var(--text-soft); }
.chart__table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }

/* Balkenliste */
.barlist { display: flex; flex-direction: column; gap: 7px; }
.barlist__empty { margin: 0; }

.barlist__row { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; align-items: center; gap: .6rem; font-size: .85rem; }
.barlist__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-soft); }
.barlist__track { height: 8px; border-radius: 4px; background: rgba(168, 85, 247, .1); overflow: hidden; }
.barlist__fill { display: block; height: 100%; border-radius: 0 4px 4px 0; background: #a855f7; }
.barlist__row:hover .barlist__fill { background: #c084fc; }
.barlist__value { min-width: 2.5ch; text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }

/* Tabellen & Listen */
.data-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.data-table th { padding: .35rem .4rem; text-align: left; font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line-strong); }
.data-table td { padding: .45rem .4rem; border-bottom: 1px solid var(--line); color: var(--text-soft); overflow-wrap: anywhere; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table .is-bad { color: #fda4af; }

.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: .88rem; }
.plain-list li { display: flex; justify-content: space-between; gap: .75rem; }

.login-list li { justify-content: flex-start; align-items: flex-start; }
.login-list__state { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 50%; font-size: .75rem; font-weight: 700; }
.login-list__state.is-ok { background: rgba(168, 85, 247, .25); color: var(--purple-soft); }
.login-list__state.is-bad { background: rgba(244, 63, 94, .2); color: #fda4af; }

.user-list { margin-bottom: 1rem; }
.user-list li { flex-direction: column; gap: .35rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.user-list__head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }

.tag { padding: .1rem .5rem; border-radius: 999px; font-size: .7rem; font-weight: 600; background: rgba(168, 85, 247, .2); color: var(--purple-soft); }
.tag--warn { background: rgba(249, 115, 22, .2); color: #fed7aa; }

.quota { display: grid; grid-template-columns: 1fr; gap: .35rem; margin-bottom: 1rem; font-size: .82rem; color: var(--text-soft); }
.quota__track { height: 8px; border-radius: 4px; background: rgba(168, 85, 247, .1); overflow: hidden; }
.quota__fill { display: block; height: 100%; border-radius: 0 4px 4px 0; background: #a855f7; }
.quota--warn .quota__fill { background: var(--orange); }
.quota strong { font-variant-numeric: tabular-nums; }

@media (min-width: 700px) {
    .kpis { grid-template-columns: repeat(4, 1fr); }
    .mini-stats { grid-template-columns: repeat(4, 1fr); }
    .admin-columns { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
    .admin-grid { grid-template-columns: repeat(2, 1fr); align-items: start; }
    .admin-card--wide { grid-column: 1 / -1; }
    .admin-columns { grid-template-columns: repeat(3, 1fr); }
}


/* ---------------------------------------------------------------- Fester Eintrag: Empfangsvideo */

.shelf-item--special {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    text-align: left;
    color: var(--text);
    cursor: pointer;
}

.shelf-item--special .shelf-item__cover, .shelf-item--special .cover--welcome, .shelf-item--special .shelf-item__label { width: 100%; }
.shelf-item--special .shelf-item__plank { width: calc(100% + var(--gap)); }
.shelf-grid--single { margin-top: 8px; max-width: 520px; }

.cover--welcome {
    position: relative;
    overflow: hidden;
    container-type: inline-size;
    background:
        radial-gradient(2px 2px at 20% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 70% 12%, #fde68a, transparent),
        radial-gradient(1.5px 1.5px at 40% 40%, #e9d5ff, transparent), radial-gradient(1.5px 1.5px at 85% 48%, #fff, transparent),
        radial-gradient(120% 60% at 50% 110%, rgba(249, 115, 22, .45), transparent 60%),
        linear-gradient(180deg, #0b0418 0%, #2a1252 60%, #3b1a3a 100%);
    box-shadow: inset 0 0 0 1px rgba(216, 180, 254, .35);
}

.cover-welcome__moon {
    position: absolute;
    top: 7%;
    right: 9%;
    width: 22%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff7e0, #fde68a 45%, #f59e0b);
    box-shadow: 0 0 14px rgba(253, 230, 138, .7);
}

.cover-welcome__cat {
    position: absolute;
    left: 4%;
    top: 30%;
    width: 78%;
    filter: drop-shadow(0 0 6px rgba(168, 85, 247, .8));
    animation: bob 2.6s ease-in-out infinite;
}

.cover-welcome__dog { position: absolute; left: 6%; bottom: 3%; width: 52% !important; height: auto; }

.cover-welcome__title {
    position: absolute;
    left: 0;
    right: 0;
    top: 6%;
    text-align: center;
    font-family: var(--font-brand);
    font-weight: 700;
    font-size: 12.5cqw;
    line-height: 1.05;
    background: linear-gradient(100deg, #fff, #e9d5ff 40%, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .8));
    padding-right: 20%;
}

.cover-welcome__sub {
    position: absolute;
    left: 0;
    right: 0;
    top: 21%;
    padding-right: 20%;
    text-align: center;
    font-size: 6.5cqw;
    font-weight: 600;
    letter-spacing: .06em;
    color: #fde68a;
}

.cover-welcome__play {
    position: absolute;
    right: 7%;
    bottom: 7%;
    display: grid;
    place-items: center;
    width: 30%;
    aspect-ratio: 1;
    border-radius: 50%;
    color: #1c0c03;
    background: var(--grad-pumpkin);
    box-shadow: 0 0 0 3px rgba(11, 7, 18, .6), 0 0 18px rgba(249, 115, 22, .7);
    animation: play-pulse 2.2s ease-in-out infinite;
}

.cover-welcome__play svg { width: 55%; margin-left: 8%; }

@keyframes play-pulse { 50% { box-shadow: 0 0 0 3px rgba(11, 7, 18, .6), 0 0 28px rgba(249, 115, 22, 1); } }


/* ---------------------------------------------------------------- Neutrale Anmeldung (vor der Überraschung) */

.auth--neutral { background: #f3f4f6; color-scheme: light; }

.auth__card--neutral {
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 30px rgba(17, 24, 39, .08);
    backdrop-filter: none;
    color: #111827;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.auth__card--neutral .auth__title { font-family: inherit; letter-spacing: 0; color: #111827; }
.auth__card--neutral .auth__sub, .auth__card--neutral .field__label, .auth__card--neutral .check { color: #4b5563; }
.auth__card--neutral .input { background: #fff; border-color: #d1d5db; color: #111827; }
.auth__card--neutral .input:focus { border-color: #6b7280; box-shadow: 0 0 0 3px rgba(107, 114, 128, .25); }
.auth__card--neutral .btn--primary { background: #374151; color: #fff; box-shadow: none; }
.auth__card--neutral .btn--primary:hover { background: #1f2937; color: #fff; }
.auth__card--neutral .check input { accent-color: #374151; }
.auth__card--neutral .auth__error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.auth__card--neutral .notice { background: #f9fafb; border-color: #e5e7eb; color: #374151; }
.auth__card--neutral .field-error { color: #b91c1c; }

.mini-stats--two { grid-template-columns: repeat(2, 1fr) !important; }
