/* ============================================
   HOME V2 — Cinematic Redesign
   Scoped under .home-v2
   ============================================ */

/* --- SECTION TITLES —
   .section-title nutzt jetzt die generische Definition aus main.css
   (docs/DESIGN_GUIDE.md §5.3). Keine Home-spezifischen Overrides
   mehr — die h2-Basis-Optik (24px desktop / 20px mobile, weight 700)
   ist absichtlich seiten-uebergreifend gleich. */

/* .home-v2 .section-head: keine Override — nutzt die generische
   .section-head-Komponente aus main.css. .view-all-link wurde durch
   die etablierte .view-all-Klasse ersetzt (siehe main.css:6080). */

/* Section spacing */
.home-v2 .stream-spotlight,
.home-v2 .cinema-showcase,
.home-v2 .coming-soon-section,
.home-v2 .special-section {
    margin-bottom: 72px;
}


/* ===========================
   1. WELCOME + SEARCH
   =========================== */
.home-v2 .home-welcome-search {
    text-align: center;
    padding: 40px 0 28px;
    margin: 0 0 32px;
    position: relative;
    z-index: 10;
    overflow: visible;
}

.home-v2 .home-welcome-search h1 {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: var(--fw-bold);
    color: var(--headline);
    line-height: 1.15;
    margin-bottom: 2px;
    text-align: center;
}

.home-v2 .home-welcome-search .welcome-sub {
    font-size: 1.05rem;
    color: var(--text-sub);
    margin: 0 0 28px;
    font-weight: var(--fw-regular);
}

/* Glass Search Bar */
.home-v2 .search-glass-wrap {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    z-index: var(--z-dropdown);
    overflow: visible;
}

.home-v2 .search-glass-wrap form {
    position: relative;
    overflow: visible;
}

.home-v2 .search-glass-wrap .search-input-group {
    position: relative;
    margin: 0;
    width: 100%;
}

.home-v2 .search-glass-wrap input[type="text"] {
    width: 100%;
    padding: 16px 60px 16px 22px;
    border-radius: var(--radius-full);
    border: var(--border-light);
    background: var(--background-light);
    /* backdrop-filter raus (war vorher blur(24px)): --background-light
       ist in beiden Themes opak, der Filter hatte keinen sichtbaren
       Effekt. Auf iOS 26 ("Liquid Glass") positionierte er aber den
       Text-Cursor falsch (oben links ausserhalb des Felds). */
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    font-weight: var(--fw-regular);
    box-sizing: border-box;
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
    letter-spacing: 0.02em;
    box-shadow: var(--shadow-sm);
}

.home-v2 .search-glass-wrap input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow:
        0 0 0 3px rgba(85,120,235,0.12),
        var(--shadow-md);
}

.home-v2 .search-glass-wrap input::placeholder {
    color: var(--text-sub);
}

.home-v2 .search-glass-wrap .search-submit-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: var(--text-sub);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    padding: 8px;
    transition: color 0.25s ease;
}

.home-v2 .search-glass-wrap .search-submit-btn:hover {
    color: var(--text);
}

.home-v2 .search-glass-wrap .clear-search-btn {
    position: absolute;
    right: 56px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-sub);
    padding: 8px;
    font-size: 14px;
    display: none;
}

.home-v2 .search-glass-wrap .clear-search-btn:hover {
    color: var(--text);
}

/* Search Suggestions */
.home-v2 .search-glass-wrap .search-suggestions {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: var(--background-light);
    border-radius: var(--radius-xl);
    border: var(--border-light);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-overlay);
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.home-v2 .search-glass-wrap .search-suggestion-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    align-items: flex-start;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-decoration: none;
    color: var(--text);
    /* Owner-Feedback 2026-08-17: Titel-Text der Suggestions erbt sonst
       text-align:center von .home-welcome-search — bei zweizeiligen
       Titeln sieht das schief aus. Left-align am Item wirkt auf alle
       Nachfahren-Text (Titel, Meta, Original-Titel). */
    text-align: left;
}

.home-v2 .search-glass-wrap .search-suggestion-item:last-child {
    border-bottom: none;
}

.home-v2 .search-glass-wrap .search-suggestion-item:hover {
    background: var(--background-hover);
}

.home-v2 .search-glass-wrap .search-suggestion-item .suggestion-poster-container {
    flex-shrink: 0;
}

.home-v2 .search-glass-wrap .search-suggestion-item .suggestion-poster {
    width: 67px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.home-v2 .search-glass-wrap .search-suggestion-item .suggestion-poster-placeholder {
    width: 67px;
    height: 100px;
    background: var(--grey-800);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-sub);
    font-size: 24px;
}

.home-v2 .search-glass-wrap .suggestion-content {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.home-v2 .search-glass-wrap .suggestion-title {
    font-weight: var(--fw-bold);
    font-size: 16px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.home-v2 .search-glass-wrap .suggestion-subtitle {
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.6;
}

.home-v2 .search-glass-wrap .suggestion-type {
    margin-top: 0;
    font-size: 0.75rem;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: var(--fw-bold);
}

.home-v2 .search-glass-wrap .suggestion-meta-status {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.home-v2 .search-glass-wrap .suggestion-meta-rating {
    margin-top: 6px;
    display: flex;
    align-items: center;
}

.home-v2 .search-glass-wrap .suggestion-meta-rating .row-pill-user-rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.home-v2 .search-glass-wrap .suggestion-meta-rating .row-pill-label {
    font-size: 12px;
    color: var(--text-sub);
}

/* .home-v2 .search-glass-wrap .suggestion-meta-rating .user-rating-span-Override entfernt —
   war 1:1-Duplikat der Basis-Regel .suggestion-meta-rating .user-rating-span in main.css.
   Die Basis-Regel greift ueberall wo .suggestion-meta-rating in DOM steht. */


/* ===========================
   2. STREAM SPOTLIGHT
   =========================== */
.home-v2 .stream-spotlight {
    margin-top: 0;
    position: relative;
    z-index: 1;
}

/* --- HERO: Split-Layout ---
   Wichtig: nur EIN border-radius + overflow:hidden in der Hierarchie.
   Vorher hatten .spotlight-hero und .spotlight-hero-wrapper beide
   ihren eigenen radius-xl, dazu ein weisser Card-Background auf
   .spotlight-hero. Bei minimal differenter Anti-Alias-Berechnung
   schimmerten an allen vier Ecken hellweisse Boegen vom Outer
   durch — sah aus wie nicht ganz deckungsgleiche Radien. */
.home-v2 .spotlight-hero {
    position: relative;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-xl);
}

.home-v2 .spotlight-hero-wrapper {
    display: flex;
    min-height: 400px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: var(--border-subtle);
}

/* Linke Seite: Backdrop-Bild */
.home-v2 .spotlight-hero-backdrop {
    flex: 3;
    position: relative;
    overflow: hidden;
    background: var(--background-dark);
    display: block;
    text-decoration: none;
    color: inherit;
}

.home-v2 .spotlight-hero-backdrop .backdrop-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    animation: heroKenBurns 25s ease-in-out infinite alternate;
}

.home-v2 .spotlight-hero-backdrop .backdrop-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-sub);
    font-size: 0.95rem;
    background: linear-gradient(135deg, rgba(33,33,49,0.6) 0%, rgba(22,22,32,0.8) 100%);
}

@keyframes heroKenBurns {
    0%   { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.06) translate(-0.5%, -0.5%); }
}

/* Rechte Seite: Infos — sanfter Gradient für mehr Tiefe.
   Der Gradient wird über --spotlight-hero-info-gradient theme-aware gesteuert. */
.home-v2 .spotlight-hero-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 32px;
    overflow: hidden;
    box-sizing: border-box;
    background: var(--spotlight-hero-info-gradient);
    border-left: var(--border-subtle);
    position: relative;
}

/* Menu-Button im Hero — positioniert relativ zum gesamten Wrapper */
.home-v2 .spotlight-hero-wrapper {
    position: relative;
}

.home-v2 .spotlight-hero-wrapper > .hero-menu-toggle-wrapper {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 20;
}

.home-v2 .spotlight-hero-wrapper > .hero-menu-toggle-wrapper .media-card-menu {
    position: static;
}

/* Spotlight-Hero-Trigger: erbt jetzt das Glas-Styling von .menu-toggle,
   nur Größenanpassung lokal. */
.home-v2 .spotlight-hero-wrapper > .hero-menu-toggle-wrapper .menu-toggle {
    width: 40px;
    height: 40px;
}

/* Titel */
.home-v2 .spotlight-hero-info .hero-title-link {
    text-decoration: none;
    color: inherit;
    margin-top: 8px;
}

.home-v2 .spotlight-hero-info .hero-title {
    margin: 0;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: var(--fw-bold);
    color: var(--headline);
    line-height: 1.2;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta: Im Stream Datum */
.home-v2 .spotlight-hero-info .hero-meta {
    margin: 12px 0 0 0;
    font-size: 0.95rem;
    color: var(--text-sub);
    font-weight: var(--fw-regular);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Bingeable-Info fuer Spotlight-Hero: kleiner + direkt unter .hero-meta.
   Selbe Farbgebung, kein extra margin-top (soll wie 2. Zeile derselben
   Meta-Info aussehen). */
.home-v2 .spotlight-hero-info .hero-bingeable {
    margin: 2px 0 0 0;
    font-size: 0.9rem;
    color: var(--text-sub);
    font-weight: var(--fw-regular);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Provider */
.home-v2 .spotlight-hero-info .hero-provider {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.home-v2 .spotlight-hero-info .hero-provider-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Cast */
.home-v2 .spotlight-hero-info .hero-cast {
    margin-top: auto;
    padding-top: 20px;
    border-top: var(--border-light);
    display: flex;
    gap: 16px;
    align-items: flex-start;
    overflow: hidden;
}

.home-v2 .spotlight-hero-info .hero-cast-member {
    display: block;
    text-decoration: none;
    flex-shrink: 0;
    position: relative;
}

.home-v2 .spotlight-hero-info .hero-cast-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: var(--border-light);
    flex-shrink: 0;
    position: relative;
}

.home-v2 .spotlight-hero-info .hero-cast-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-v2 .spotlight-hero-info .hero-cast-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(85,120,235,0.2) 0%, rgba(155,155,235,0.1) 100%);
    color: var(--text-sub);
    font-size: 1.4rem;
}

/* Mobile Breakpoint */
@media (max-width: 1024px) {
    .home-v2 .spotlight-hero-wrapper {
        flex-direction: column;
        min-height: auto;
    }
    
    .home-v2 .spotlight-hero-backdrop {
        flex: none;
        width: 100%;
        height: 280px;
    }

    .home-v2 .spotlight-hero-info {
        flex: none;
        width: 100%;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.05);
        padding: 24px;
        /* iOS Safari rendert overflow:hidden + border-radius am
           Outer-Wrapper bei der untersten Card unzuverlaessig — die
           unteren Ecken wirken eckiger als die oberen. Explizit
           border-radius am Kind-Element zwingt Safari zum eigenen
           Clip, sodass der Radius unten korrekt sichtbar ist. */
        border-bottom-left-radius: var(--radius-xl);
        border-bottom-right-radius: var(--radius-xl);
    }
}

@media (max-width: 768px) {
    .home-v2 .spotlight-hero-wrapper {
        min-height: auto;
    }
    
    .home-v2 .spotlight-hero-backdrop {
        height: 220px;
    }
    
    .home-v2 .spotlight-hero-info {
        padding: 20px;
    }
    
    .home-v2 .spotlight-hero-info .hero-title {
        font-size: 1.3rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .home-v2 .spotlight-hero-info .hero-meta {
        font-size: 0.85rem;
    }
    
    .home-v2 .spotlight-hero-info .hero-provider {
        margin-top: 12px;
    }
    
    .home-v2 .spotlight-hero-info .hero-cast {
        margin-top: 12px;
        padding-top: 12px;
        gap: 12px;
    }
    
    .home-v2 .spotlight-hero-info .hero-cast-avatar {
        width: 40px;
        height: 40px;
        border-width: 1px;
    }
    

}

/* --- STREAM CAROUSEL --- */
.home-v2 .stream-carousel-wrap .stream-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--background);
    border: var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.home-v2 .stream-carousel-wrap .stream-card:hover {
    box-shadow: var(--shadow-md);
}

.home-v2 .stream-carousel-wrap .stream-backdrop {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 14px 14px 0 0;
    display: block;
}

.home-v2 .stream-carousel-wrap .tile-stream-info {
    /* min-height reserviert Platz fuer eine potentielle Bingeable-Zeile
       (Vollstaendig ab: DATUM / Sofort). Dadurch bleiben Cards konsistent
       hoch, auch wenn manche Serien Bingeable-Info haben und andere nicht.
       Owner-Feedback 2026-08-14: 90px war zu viel — bei Cards mit
       Provider-Logo (position:absolute unten rechts, 32px) aber OHNE
       bingeable entstand zu viel Weissraum, das Logo wirkte klein.
       Reduziert auf 70px: reicht fuer h3 (~19) + meta (~16) + optionale
       bingeable-Zeile (~16) + padding, und der 32px-Provider-Logo-Slot
       ist voll gedeckt. */
    min-height: 70px;
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    background: transparent;
    padding: 12px 14px;
    border-radius: 0 0 14px 14px;
}

.home-v2 .stream-carousel-wrap .tile-stream-info.provider {
    padding-right: 56px;
}

.home-v2 .stream-carousel-wrap .tile-stream-info h3 {
    font-size: 0.95rem;
    font-weight: var(--fw-bold);
    line-height: 1.3;
    margin-bottom: var(--spacing-4);
}

.home-v2 .stream-carousel-wrap .tile-release-date {
    font-size: 0.8rem;
    color: var(--text-sub);
    margin-top: 2px;
}

.home-v2 .stream-carousel-wrap .tile-provider-logo {
    position: absolute;
    width: 32px;
    height: 32px;
    bottom: 12px;
    right: 12px;
    border-radius: var(--radius-md);
}

.home-v2 .stream-carousel-wrap .media-card-menu {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
}

.home-v2 .stream-carousel-wrap .menu-toggle {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
}

.home-v2 .empty-state {
    text-align: center;
    padding: 40px 24px;
    color: var(--text-sub);
    font-style: italic;
}


/* ===========================
   3. LISTS + CINEMA GALLERY
   Section-Header nutzen die generische .section-head-Komponente aus
   main.css (docs/DESIGN_GUIDE.md §5.4). Keine home-spezifischen
   Overrides mehr.
   =========================== */

.home-v2 .cinema-showcase .splide-kino .media-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.home-v2 .cinema-showcase .splide-kino .media-card:hover {
    box-shadow: 0 16px 48px rgba(0,0,0,0.4);
    border-color: rgba(255,255,255,0.12);
}

.home-v2 .cinema-showcase .splide-kino .media-card img {
    border-radius: var(--radius-lg);
    aspect-ratio: 2 / 3;
    object-fit: cover;
    width: 100%;
}

.home-v2 .cinema-showcase .splide-kino .media-card .rating-circle {
    border-radius: 50%;
}

.home-v2 .cinema-showcase .splide-kino .media-card .bookmark-indicator {
    z-index: 3;
}

.home-v2 .cinema-showcase .splide-kino .media-card .media-card-menu {
    z-index: 4;
}


/* ===========================
   5. FRIEND ACTIVITY (Feed-Style Kachel-Slider)
   =========================== */
.home-v2 .friend-activity-section {
    margin-bottom: 72px;
}

/* Kachel */
.home-v2 .fa-tile {
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--background-light);
    /* token-konform (vorher off-token 10px), passend zum
       restlichen Design. */
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.04);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.home-v2 .fa-tile:hover {
    border-color: rgba(255,255,255,0.08);
}

/* Body: Poster + Content nebeneinander */
.home-v2 .fa-tile-body {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-12);
    padding: 12px;
}

/* Poster */
.home-v2 .fa-tile-poster {
    flex-shrink: 0;
    display: block;
    text-decoration: none;
}

.home-v2 .fa-tile-poster img {
    width: 80px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-md);
    display: block;
}

/* Content neben Poster */
.home-v2 .fa-tile-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 2px;
    padding-right: 32px;
}

.home-v2 .fa-tile-text {
    font-size: 0.85rem;
    color: var(--text-sub);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-v2 .fa-tile-text strong {
    color: var(--text);
    font-weight: var(--fw-regular);
}

.home-v2 .fa-tile-time {
    font-size: 0.72rem;
    color: var(--grey-600);
}

/* Rating-Bereich (wie Feed) */
.home-v2 .fa-tile-ratings {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.home-v2 .fa-rating-col {
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-v2 .fa-rating-label {
    font-size: 0.75rem;
    color: var(--text-sub);
    white-space: nowrap;
}

.home-v2 .fa-tile-ratings .rating-circle {
    position: static;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 11px bewusst unter 12px: Zahl in 28px-Kreis, geometrisch begrenzt.
       Siehe DESIGN_GUIDE.md R-9 Ausnahme. */
    font-size: 11px;
    font-weight: var(--fw-bold);
    flex-shrink: 0;
}

/* Context-Action-Button: oben rechts auf der Kachel */
.home-v2 .fa-tile > .media-card-menu {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
}

.home-v2 .fa-tile > .media-card-menu .menu-toggle {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
}


/* ===========================
   6. COMING SOON
   =========================== */
.home-v2 .coming-soon-section .coming-soon-card {
    position: relative;
}

.home-v2 .coming-soon-section .countdown-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 6;
    padding: 4px 10px;
    border-radius: var(--radius-md);
    font-size: 0.7rem;
    font-weight: var(--fw-regular);
    letter-spacing: 0.02em;
    background: var(--sky-blue);
    color: var(--text-darker);
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    pointer-events: none;
}

.home-v2 .coming-soon-section .stream-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--background);
    border: var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.home-v2 .coming-soon-section .stream-card:hover {
    box-shadow: var(--shadow-md);
}

.home-v2 .coming-soon-section .stream-backdrop {
    height: 170px;
    border-radius: 14px 14px 0 0;
}

.home-v2 .coming-soon-section .tile-stream-info {
    /* min-height reserviert Platz fuer eine potentielle Bingeable-Zeile
       — siehe Kommentar bei .stream-carousel-wrap .tile-stream-info. */
    min-height: 90px;
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    background: transparent;
    padding: 12px 14px;
    border-radius: 0 0 14px 14px;
}

.home-v2 .coming-soon-section .tile-stream-info.provider {
    padding-right: 56px;
}

.home-v2 .coming-soon-section .tile-stream-info h3 {
    font-size: 0.95rem;
    font-weight: var(--fw-bold);
    margin-bottom: var(--spacing-4);
}

.home-v2 .coming-soon-section .tile-release-date {
    font-size: 0.8rem;
    color: var(--text-sub);
}

.home-v2 .coming-soon-section .tile-provider-logo {
    position: absolute;
    width: 32px;
    height: 32px;
    bottom: 12px;
    right: 12px;
    border-radius: var(--radius-md);
}

.home-v2 .coming-soon-section .media-card-menu {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
}


/* ===========================
   SPLIDE HOME OVERRIDES
   =========================== */
/* Splide-Arrows als dunkler Glass — analog Glass-Back-Button (siehe
   DESIGN_GUIDE.md §5.7.3). rgba(20,20,20,0.22) + backdrop-blur-lg +
   saturate(180%) + weisses Icon. Groessen unveraendert. */
.home-v2 .splide__arrow {
    background: rgba(20, 20, 20, 0.22);
    backdrop-filter: var(--backdrop-blur-lg) saturate(180%);
    -webkit-backdrop-filter: var(--backdrop-blur-lg) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    opacity: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    transition: opacity 0.3s ease, background 0.25s ease;
}

.home-v2 .splide:hover .splide__arrow {
    opacity: 1;
}

.home-v2 .splide__arrow:hover {
    background: rgba(20, 20, 20, 0.35);
    border-color: rgba(255, 255, 255, 0.35);
}

.home-v2 .splide__arrow svg {
    fill: var(--white);
    width: 18px;
    height: 18px;
}

.home-v2 .splide__arrow i {
    color: var(--white);
    font-size: 1rem;
}

.home-v2 .splide__arrow:hover svg {
    fill: var(--white);
}

.home-v2 .splide__arrow:hover i {
    color: var(--white);
}

.home-v2 .splide__pagination {
    bottom: -28px;
    top: auto;
    transform: none;
}

.home-v2 .splide__pagination__page {
    background: var(--text-inactive);
    width: 6px;
    height: 6px;
}

.home-v2 .splide__pagination__page.is-active {
    background: var(--text-link);
    transform: none;
}


/* ===========================
   ANIMATIONS
   =========================== */
@keyframes homeReveal {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.home-v2 .home-welcome-search {
    animation: homeReveal 0.5s ease-out both;
}

.home-v2 .stream-spotlight {
    animation: homeReveal 0.55s ease-out 0.08s both;
}

.home-v2 .cinema-showcase {
    animation: homeReveal 0.55s ease-out 0.14s both;
}

.home-v2 .friend-activity-section {
    animation: homeReveal 0.55s ease-out 0.18s both;
}

.home-v2 .coming-soon-section {
    animation: homeReveal 0.55s ease-out 0.24s both;
}


/* ===========================
   RESPONSIVE — 1024px
   =========================== */
@media screen and (max-width: 1024px) {
    .home-v2 .spotlight-hero .stream-backdrop {
        height: 340px;
    }

}


/* ===========================
   RESPONSIVE — 768px
   =========================== */
@media screen and (max-width: 768px) {
    .home-v2 .home-welcome-search {
        padding: 36px 0 28px;
    }

    /* H1 auf --fs-hero (32px) beschraenkt, damit lange Usernamen
       ("Hey xxxxxxxxxxxxx,") nicht ueber den Container schiessen. */
    .home-v2 .home-welcome-search h1 {
        font-size: var(--fs-hero);
        margin-bottom: 8px;
    }

    .home-v2 .home-welcome-search .welcome-sub {
        font-size: 1.0625rem;
        margin-bottom: 28px;
    }

    .home-v2 .search-glass-wrap input[type="text"] {
        padding: 14px 56px 14px 18px;
        font-size: 0.95rem;
    }

    .home-v2 .spotlight-hero {
        border-radius: var(--radius-xl);
    }

    .home-v2 .spotlight-hero .stream-card {
        border-radius: var(--radius-xl);
    }

    .home-v2 .spotlight-hero .stream-backdrop {
        height: 260px;
        border-radius: var(--radius-xl);
    }

    .home-v2 .spotlight-hero .tile-stream-info {
        padding: 60px 20px 20px;
        border-radius: 0 0 16px 16px;
    }

    .home-v2 .spotlight-hero .tile-stream-info h3 {
        font-size: 1.25rem;
        margin-bottom: var(--spacing-4);
    }

    .home-v2 .spotlight-hero .tile-provider-logo {
        width: 36px;
        height: 36px;
        bottom: 20px;
        right: 20px;
        border-radius: var(--radius-md);
    }

    .home-v2 .stream-spotlight,
    .home-v2 .cinema-showcase,
    .home-v2 .friend-activity-section,
    .home-v2 .coming-soon-section,
    .home-v2 .special-section {
        margin-bottom: 48px;
    }

    .home-v2 .splide__arrow {
        opacity: 1;
        width: 36px;
        height: 36px;
    }
}


/* ===========================
   RESPONSIVE — 480px
   =========================== */
@media screen and (max-width: 480px) {
    .home-v2 {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* Home-Welcome bewusst mit mehr vertikaler Luft als andere Sections —
       H1 aber auf --fs-hero (32px) beschraenkt, damit lange Usernamen
       ("Hey xxxxxxxxxxxxx,") nicht ueber den schmalen Container fliegen. */
    .home-v2 .home-welcome-search {
        padding: 32px 0 24px;
    }

    .home-v2 .home-welcome-search h1 {
        font-size: var(--fs-hero);
        margin-bottom: 8px;
    }

    .home-v2 .home-welcome-search .welcome-sub {
        font-size: 1.0625rem;
        margin-bottom: 24px;
    }

    .home-v2 .search-glass-wrap input[type="text"] {
        padding: 12px 48px 12px 16px;
        font-size: 0.9rem;
    }

    .home-v2 .search-glass-wrap .search-submit-btn {
        width: 36px;
        height: 36px;
        right: 5px;
    }

    .home-v2 .spotlight-hero {
        border-radius: var(--radius-lg);
        margin-bottom: 16px;
    }

    .home-v2 .spotlight-hero .stream-card {
        border-radius: var(--radius-lg);
    }

    .home-v2 .spotlight-hero .stream-backdrop {
        height: 200px;
        border-radius: var(--radius-lg);
    }

    .home-v2 .spotlight-hero .tile-stream-info {
        padding: 48px 16px 16px;
        border-radius: 0 0 14px 14px;
    }

    .home-v2 .spotlight-hero .tile-stream-info h3 {
        font-size: 1.1rem;
        margin-bottom: var(--spacing-4);
    }

    .home-v2 .spotlight-hero .tile-release-date {
        font-size: 0.82rem;
    }

    .home-v2 .spotlight-hero .tile-provider-logo {
        width: 32px;
        height: 32px;
        bottom: 16px;
        right: 16px;
        border-radius: var(--radius-md);
    }

    .home-v2 .spotlight-hero .menu-toggle {
        width: 34px;
        height: 34px;
    }

    .home-v2 .stream-carousel-wrap .stream-backdrop {
        height: 150px;
    }

    .home-v2 .stream-carousel-wrap .tile-stream-info {
        padding: 10px 12px;
    }

    .home-v2 .stream-carousel-wrap .tile-stream-info h3 {
        font-size: 0.88rem;
    }

    .home-v2 .stream-spotlight,
    .home-v2 .cinema-showcase,
    .home-v2 .friend-activity-section,
    .home-v2 .coming-soon-section,
    .home-v2 .special-section {
        margin-bottom: 36px;
    }

    .home-v2 .stream-carousel-wrap .stream-card,
    .home-v2 .coming-soon-section .stream-card {
        border-radius: var(--radius-lg);
    }

    .home-v2 .stream-carousel-wrap .stream-backdrop,
    .home-v2 .coming-soon-section .stream-backdrop {
        border-radius: 12px 12px 0 0;
    }

    .home-v2 .coming-soon-section .stream-backdrop {
        height: 150px;
    }

    .home-v2 .coming-soon-section .countdown-badge {
        font-size: 0.65rem;
        padding: 3px 10px;
        top: 8px;
        left: 8px;
    }

    .home-v2 .splide__pagination {
        display: none;
    }

    .home-v2 .splide__arrow {
        width: 32px;
        height: 32px;
    }
}


/* Menu portal (these complement the inline styles) */
.media-menu.is-portaled {
    display: block !important;
    position: fixed;
    pointer-events: auto;
    background: var(--background);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    min-width: 200px;
    z-index: 4001;
    border: 1px solid rgba(255,255,255,0.08);
}

/* Hide original menus in card contexts */
.home-v2 .stream-card .media-menu,
.home-v2 .media-card .media-menu,
.home-v2 .fa-tile .media-menu:not(.is-portaled) {
    display: none;
}

/* Portaled overrides */
.media-menu.is-portaled .menu-item {
    border-radius: 0;
}

.media-menu.is-portaled .menu-item:first-child {
    border-radius: 12px 12px 0 0;
}

.media-menu.is-portaled .menu-item:last-child {
    border-radius: 0 0 12px 12px;
}

/* ============================================================
   COMMUNITIES-SLIDER auf home.php
   Card-Style angelehnt an .fa-tile (background-light, border, hover),
   aber vertikal: Logo oben, Name + Member-Count unten.
   ============================================================ */
.home-v2 .home-communities-section .splide-communities {
    margin-bottom: var(--spacing-8);
}

.home-v2 .home-community-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-12);
    padding: var(--spacing-16);
    background: var(--background-light);
    border-radius: var(--radius-lg);
    border: var(--border-light);
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    /* height:100% war problematisch — bei nur einer Community in der
       Splide-Slide wurde die Card vom Parent gestreckt, die unteren
       Ecken wurden vom Slide-Container abgeschnitten und wirkten
       eckig. Card waechst jetzt mit dem Inhalt mit. */
}

/* Hover-Effekt aus lists.php uebernommen — dezenter background + shadow
   statt der frueheren weissen Kontur. */
.home-v2 .home-community-card:hover {
    background: var(--background-hover);
    box-shadow: var(--shadow-lg);
}

.home-v2 .home-community-card-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.home-v2 .home-community-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-v2 .home-community-card-logo.is-fallback {
    background: linear-gradient(135deg, rgba(72, 168, 233, 0.15), rgba(72, 168, 233, 0.05));
}

.home-v2 .home-community-card-fallback {
    font-size: 2rem;
    color: var(--text-sub);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.home-v2 .home-community-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    min-width: 0;
    width: 100%;
}

.home-v2 .home-community-card-name {
    font-size: 0.95rem;
    font-weight: var(--fw-bold);
    color: var(--text);
    margin: 0;
    line-height: 1.3;
    text-align: center;
    /* zwei Zeilen max, längere Namen werden gekürzt */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.home-v2 .home-community-card-meta {
    font-size: 0.72rem;
    color: var(--grey-600);
}

/* ── UX-Kampagne M2.2 „Leg los“ (includes/ux-firststeps.php) ──────────────
   Mockup: Git-Historie (dummy/ux/, entfernt 2026-10-22). Mobil: Karten wischen (78 % breit),
   ab 769px drei Spalten. */
.ux-cards {
    position: relative;
    margin: var(--spacing-16) 0 var(--spacing-24);
    overflow: hidden;
    transition: max-height 0.2s ease, opacity 0.2s ease, margin 0.2s ease;
}

.ux-cards__head {
    display: flex;
    align-items: center;
    gap: var(--spacing-8);
    margin-bottom: var(--spacing-12);
}

.ux-cards__title {
    font-size: var(--font-size-lg);
    font-weight: var(--fw-bold);
    margin: 0;
    color: var(--headline);
}

.ux-cards__count {
    font-size: var(--font-size-sm);
    color: var(--text-sub);
}

.ux-cards__close {
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: none;
    background: none;
    color: var(--text-sub);
    font-size: 18px;
    cursor: pointer;
}

.ux-cards__row {
    display: flex;
    gap: var(--spacing-12);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: var(--spacing-8);
    scrollbar-width: none;
}

.ux-cards__row::-webkit-scrollbar {
    display: none;
}

.ux-card {
    position: relative;
    flex: 0 0 78%;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    background: var(--background);
    border: var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--spacing-20);
    box-shadow: var(--shadow-sm);
}

.ux-card__step {
    position: absolute;
    top: var(--spacing-16);
    right: var(--spacing-16);
    font-size: var(--font-size-xs);
    font-weight: var(--fw-bold);
    color: var(--text-inactive);
}

.ux-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--background-light);
    color: var(--text-link);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: var(--spacing-16);
    flex-shrink: 0;
}

.ux-card__title {
    font-size: var(--font-size-base);
    font-weight: var(--fw-bold);
    margin: 0 0 var(--spacing-4);
    color: var(--headline);
}

.ux-card__text {
    font-size: var(--font-size-sm);
    color: var(--text-sub);
    margin: 0 0 var(--spacing-16);
    flex: 1;
}

.ux-card__actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-12);
    flex-wrap: wrap;
}

a.ux-card__link,
a.ux-card__link:visited {
    font-size: var(--font-size-sm);
    color: var(--text-link);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.ux-card__done {
    font-size: var(--font-size-sm);
    font-weight: var(--fw-bold);
    color: var(--success-color);
}

.ux-card.is-done {
    opacity: 0.6;
}

.ux-card.is-done .ux-card__icon {
    color: var(--success-color);
}

.ux-cards--done {
    display: flex;
    align-items: center;
    gap: var(--spacing-16);
    background: var(--background);
    border: var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--spacing-16) var(--spacing-48) var(--spacing-16) var(--spacing-16);
}

.ux-cards--done .ux-card__icon {
    margin: 0;
}

.ux-cards--done .ux-card__text {
    margin: var(--spacing-4) 0 0;
}

.ux-cards--done .ux-cards__close {
    position: absolute;
    top: 4px;
    right: 4px;
}

/* „Entdecke mehr“ (M2.3): ✕ pro Karte, nachrückende Karte blendet ein */
.ux-card__x {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 44px;
    height: 44px;
    border: none;
    background: none;
    color: var(--text-sub);
    font-size: 16px;
    cursor: pointer;
}

.ux-card.is-entering {
    animation: ux-card-enter 0.25s ease;
}

@keyframes ux-card-enter {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

.ux-card[hidden] {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .ux-cards { transition: none; }
    .ux-card.is-entering { animation: none; }
}

@media (min-width: 769px) {
    .ux-cards__row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        overflow: visible;
        margin: 0;
        padding: 0;
    }
    .ux-card {
        flex: none;
    }
}

/* Dunkler Kasten unter einer Karte (M2.2 „Titel bewerten“, „Profilen folgen“,
   M2.3 Entdecken-Karten). In beiden Themes sehr dunkel; darin gelten die
   Werte des dunklen Themes, damit die echten Karten lesbar bleiben. Das
   Dreieck zeigt auf die Karte, die ihn geöffnet hat (--ux-panel-arrow-x
   setzt assets/js/ux-firststeps.js). */
.ux-panel {
    --text: var(--white);
    --text-sub: var(--grey-300);
    --text-inactive: var(--grey-600);
    --headline: var(--white);
    --text-link: var(--champagne);
    --text-darker: var(--deeper-blue);
    --background: var(--deeper-blue);
    --background-light: var(--deep-blue);
    position: relative;
    margin-top: var(--spacing-16);
    background: var(--black);
    color: var(--text);
    border-radius: var(--radius-xl);
    padding: var(--spacing-16);
    color-scheme: dark;
}

.ux-panel::before {
    content: '';
    position: absolute;
    top: -10px;
    left: var(--ux-panel-arrow-x, 50%);
    transform: translateX(-50%);
    border: 10px solid transparent;
    border-top: 0;
    border-bottom-color: var(--black);
}

.ux-panel[hidden] {
    display: none;
}

.ux-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--spacing-8);
    margin-bottom: var(--spacing-12);
}

.ux-panel__title {
    font-size: var(--font-size-base);
    font-weight: var(--fw-bold);
    margin: 0;
    color: var(--headline);
}

.ux-panel__sub {
    font-size: var(--font-size-sm);
    color: var(--text-sub);
    margin: var(--spacing-4) 0 0;
}

.ux-panel__close {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    margin: calc(-1 * var(--spacing-8)) calc(-1 * var(--spacing-8)) 0 0;
    border: none;
    background: none;
    color: var(--text-sub);
    font-size: 18px;
    cursor: pointer;
}

.ux-panel__body {
    min-height: 120px;
}

.ux-panel__body[aria-busy="true"] {
    opacity: 0.5;
}

.ux-panel__empty {
    text-align: center;
    color: var(--text-sub);
    padding: var(--spacing-24) 0;
}

.ux-panel__empty p {
    margin: 0 0 var(--spacing-4);
}

/* „Entdecke mehr“: Import als kleine Zeile statt Kachel (Owner 2026-10-22) */
.ux-cards__more {
    display: flex;
    align-items: center;
    gap: var(--spacing-8);
    margin: var(--spacing-8) 0 0;
    font-size: var(--font-size-sm);
    color: var(--text-sub);
}

.ux-cards__more a,
.ux-cards__more a:visited {
    color: var(--text-link);
}

.ux-cards__more-x {
    margin-left: auto;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: none;
    background: none;
    color: var(--text-sub);
    font-size: 14px;
    cursor: pointer;
}

/* Pulspunkt in Menüeinträgen (Kette ⋮ → Menüpunkt): rechts mittig statt Ecke */
.media-menu .ux-pulse-dot {
    top: 50%;
    right: var(--spacing-12);
    margin-top: -5px;
}

/* ── „Leg los“ als Hero (Owner-Review 2026-10-22: auffälliger, inspirierter) ──
   Eigene Fläche mit Blau→Aster-Verlauf und leuchtendem Rand, Überschrift im
   Verlauf der Begrüßung, Fortschritt in drei Segmenten, nächster Schritt
   hervorgehoben, erledigte Schritte mit grünem Haken. */
.ux-start {
    position: relative;
    overflow: hidden;
    margin: var(--spacing-16) 0 var(--spacing-24);
    padding: var(--spacing-20) var(--spacing-16) var(--spacing-16);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(85, 120, 235, 0.28) 0%, rgba(155, 155, 235, 0.14) 45%, rgba(155, 155, 235, 0) 80%),
        var(--background);
    border: 1px solid rgba(155, 155, 235, 0.35);
    box-shadow: 0 12px 40px rgba(85, 120, 235, 0.18);
    transition: max-height 0.2s ease, opacity 0.2s ease, margin 0.2s ease;
}

.ux-start__glow {
    position: absolute;
    top: -120px;
    right: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(155, 155, 235, 0.35), rgba(155, 155, 235, 0));
    pointer-events: none;
}

.ux-start > *:not(.ux-start__glow) {
    position: relative;
}

.ux-start__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--spacing-8);
}

.ux-start__kicker {
    margin: 0 0 var(--spacing-4);
    font-size: var(--font-size-xs);
    font-weight: var(--fw-bold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-link);
}

.ux-start__title {
    margin: 0;
    font-size: 28px;
    line-height: 1.15;
    font-weight: var(--fw-bold);
    background: var(--welcome-headline-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--headline);
}

.ux-start__sub {
    margin: var(--spacing-4) 0 0;
    font-size: var(--font-size-sm);
    color: var(--text-sub);
}

.ux-start .ux-cards__close {
    margin: calc(-1 * var(--spacing-8)) calc(-1 * var(--spacing-8)) 0 0;
}

.ux-start__progress {
    display: flex;
    align-items: center;
    gap: var(--spacing-8);
    margin: var(--spacing-16) 0;
}

.ux-start__segment {
    flex: 1;
    height: 6px;
    border-radius: var(--radius-full);
    background: rgba(155, 155, 235, 0.22);
    overflow: hidden;
    position: relative;
}

.ux-start__segment::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--success-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.ux-start__segment.is-done::after {
    transform: scaleX(1);
}

.ux-start__progress .ux-cards__count {
    flex: 0 0 auto;
    font-weight: var(--fw-bold);
    color: var(--text);
}

/* Karten in der Hero-Fläche */
.ux-card--start {
    background: var(--background-light);
    border: 1px solid rgba(155, 155, 235, 0.18);
    box-shadow: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}

.ux-card--start.is-next {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color), 0 8px 24px rgba(85, 120, 235, 0.3);
}

.ux-card__next {
    display: none;
    position: absolute;
    top: var(--spacing-12);
    right: var(--spacing-12);
    padding: 2px var(--spacing-8);
    border-radius: var(--radius-full);
    background: var(--primary-color);
    color: var(--white); /* R-1 Ausnahme 1: weiß auf farbiger Pille, theme-frei */
    font-size: var(--font-size-xs);
    font-weight: var(--fw-bold);
}

.ux-card--start.is-next .ux-card__next {
    display: inline-block;
}

.ux-card__badge {
    position: relative;
    width: 44px;
    height: 44px;
    margin-bottom: var(--spacing-12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--aster));
    color: var(--white); /* R-1 Ausnahme 1 */
    font-size: var(--font-size-lg);
    font-weight: var(--fw-bold);
    flex-shrink: 0;
}

.ux-card__tick {
    display: none;
    font-size: 22px;
}

.ux-card--start .ux-card__title {
    display: flex;
    align-items: center;
    gap: var(--spacing-8);
}

.ux-card__title-icon {
    color: var(--text-link);
    font-size: 18px;
}

.ux-card--start.is-done {
    opacity: 0.75;
}

.ux-card--start.is-done .ux-card__badge {
    background: var(--success-color);
    animation: ux-tick-pop 0.45s ease;
}

.ux-card--start.is-done .ux-card__num {
    display: none;
}

.ux-card--start.is-done .ux-card__tick {
    display: block;
}

@keyframes ux-tick-pop {
    0%   { transform: scale(0.6); }
    60%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* „Geschafft“ */
.ux-start--done {
    display: flex;
    align-items: center;
    gap: var(--spacing-16);
    padding-right: var(--spacing-48);
}

.ux-start--done .ux-cards__close {
    position: absolute;
    top: 4px;
    right: 4px;
    margin: 0;
}

.ux-start__done-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--aster));
    color: var(--white); /* R-1 Ausnahme 1 */
    font-size: 28px;
    animation: ux-tick-pop 0.5s ease;
}

.ux-start--done .ux-start__title {
    font-size: var(--font-size-xl);
}

@media (min-width: 769px) {
    .ux-start {
        padding: var(--spacing-24);
    }
    .ux-start__title {
        font-size: 32px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ux-start__segment::after,
    .ux-card--start { transition: none; }
    .ux-card--start.is-done .ux-card__badge,
    .ux-start__done-icon { animation: none; }
}

/* Ladezustand im dunklen Kasten (statt kurz die alte Karte in voller Breite) */
.ux-panel__loading {
    display: flex;
    gap: var(--spacing-12);
    overflow: hidden;
}

.ux-panel__loading span {
    flex: 0 0 calc((100% - 3 * var(--spacing-12)) / 4);
    aspect-ratio: 2 / 3;
    border-radius: var(--radius-md);
    background: linear-gradient(90deg, var(--background-light) 0%, var(--background) 50%, var(--background-light) 100%);
    background-size: 200% 100%;
    animation: ux-shimmer 1.2s linear infinite;
}

@media (max-width: 768px) {
    .ux-panel__loading span {
        flex-basis: calc((100% - var(--spacing-12)) / 2);
    }
}

@keyframes ux-shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .ux-panel__loading span { animation: none; }
}

/* „Entdecke mehr“ im selben Hero-Stil wie „Leg los“ (Owner 2026-10-22) */
.ux-start--discover .ux-start__head {
    margin-bottom: var(--spacing-16);
}

.ux-card__badge-icon {
    font-size: 22px;
}

.ux-card--start.is-done .ux-card__badge-icon {
    display: none;
}

.ux-card--discover .ux-card__x {
    top: var(--spacing-8);
    right: var(--spacing-8);
}

/* Eine oder zwei Karten nutzen die ganze Breite (data-visible setzt PHP/JS) */
.ux-cards__row[data-visible="1"] .ux-card {
    flex-basis: 100%;
}

@media (min-width: 769px) {
    .ux-cards__row[data-visible="1"] {
        grid-template-columns: 1fr;
    }
    .ux-cards__row[data-visible="2"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Kasten „Freunde einladen“ in „Entdecke mehr“ */
.ux-panel-invite__row {
    display: flex;
    gap: var(--spacing-8);
}

.ux-panel-invite__input {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    padding: 0 var(--spacing-12);
    border-radius: var(--radius-md);
    border: 1px solid rgba(155, 155, 235, 0.3);
    background: var(--background-light);
    color: var(--text);
    font-family: inherit;
    font-size: var(--font-size-sm);
}

.ux-panel-invite__row .button {
    height: 44px;
}

.ux-panel-invite__share {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: var(--spacing-8);
    margin-top: var(--spacing-12);
}

.ux-panel-invite__tile,
a.ux-panel-invite__tile,
a.ux-panel-invite__tile:visited {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-4);
    min-height: 64px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(155, 155, 235, 0.25);
    background: var(--background-light);
    color: var(--text);
    font-family: inherit;
    font-size: var(--font-size-sm);
    text-decoration: none;
    cursor: pointer;
}

.ux-panel-invite__tile i {
    font-size: 22px;
    color: var(--text-link);
}
