/**
 * SSM Web Auth – Login-UI, Profilzeile, Favoriten-Stern, Toast,
 * Favoriten-Seite, Eigene Sender (Kacheln + Modal)
 *
 * Farben nur ueber die --ssm-*-Tokens (style.css; Dark-Werte setzt
 * ssm_print_theme_css() inline). Bis 4.44.x hingen die Dark-Regeln an
 * [data-color-mode="dark"] bzw. .dark – das setzt auf soundnode.de niemand,
 * Name und Abschnittstitel standen im Dark Mode dunkel auf dunklem Grund.
 *
 * Laedt nach ssm-glowup.css (Dependency) und verfeinert auf der
 * Favoriten-Seite die Cover-Kacheln (Spezifitaet .ssm-favorites-page …).
 *
 * @since 4.17.0
 * @since 4.45.0 Tokens statt fester Farben, Favoriten-Seite neu gestaltet
 */

/* =====================================================================
   AUTH CONTAINER (Login-Buttons / User-Menu)
   ===================================================================== */

.ssm-auth-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 0;
}

.ssm-auth-container.ssm-auth-header {
    margin-bottom: 12px;
}

/* =====================================================================
   LOGIN BUTTONS
   Google weiss, Apple schwarz – Vorgaben der Anbieter, daher feste Farben.
   ===================================================================== */

.ssm-auth-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ssm-auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--ssm-border);
    border-radius: 8px;
    background: var(--ssm-background);
    color: var(--ssm-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.1s;
}

.ssm-auth-btn:hover {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.ssm-auth-btn:active {
    transform: scale(0.98);
}

.ssm-auth-btn:focus-visible {
    outline: 2px solid var(--ssm-primary);
    outline-offset: 2px;
}

.ssm-auth-btn-google {
    background: #fff;
    border-color: #dadce0;
    color: #1f1f1f;
}

.ssm-auth-btn-google:hover {
    background: #f7f8f8;
}

.ssm-auth-btn-apple {
    background: #000;
    border-color: #000;
    color: #fff;
}

.ssm-auth-btn-apple:hover {
    background: #1a1a1a;
}

.ssm-auth-icon {
    flex-shrink: 0;
    display: block;
}

/* =====================================================================
   LOADING / DISABLED
   ===================================================================== */

.ssm-auth-btn.ssm-auth-loading {
    opacity: 0.8;
    pointer-events: none;
}

.ssm-auth-btn.ssm-auth-loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(127, 127, 127, 0.3);
    border-top-color: var(--ssm-primary, #00B4D8);
    border-radius: 50%;
    animation: ssm-auth-spin 0.6s linear infinite;
    margin-left: 8px;
}

.ssm-auth-btn.ssm-auth-disabled {
    opacity: 0.4;
    pointer-events: none;
}

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

/* =====================================================================
   USER MENU (Archiv-Kopf, eingeloggt)
   ===================================================================== */

.ssm-auth-user {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ssm-auth-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ssm-auth-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ssm-auth-avatar-icon {
    font-size: 20px;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    background: var(--ssm-background-alt);
    border-radius: 50%;
    color: var(--ssm-text-light);
    flex-shrink: 0;
}

.ssm-auth-user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--ssm-heading);
}

.ssm-auth-user-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ssm-auth-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--ssm-primary, #00B4D8);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.ssm-auth-link:hover {
    background: var(--ssm-primary-light);
    text-decoration: none;
    color: var(--ssm-primary, #00B4D8);
}

.ssm-auth-star-icon {
    vertical-align: middle;
    flex-shrink: 0;
}

/* Abmelden: ruhig, erst beim Hover rot */
.ssm-auth-btn-logout {
    padding: 6px 14px;
    border-radius: 999px;
    background: transparent;
    border-color: var(--ssm-border);
    color: var(--ssm-text-light);
    font-size: 13px;
}

.ssm-auth-btn-logout:hover {
    color: #ef4444;
    border-color: #ef4444;
    background: transparent;
    box-shadow: none;
}

/* =====================================================================
   FEHLERMELDUNG
   ===================================================================== */

.ssm-auth-error {
    padding: 8px 12px;
    margin-top: 8px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 8px;
    color: #ef4444;
    font-size: 13px;
    animation: ssm-auth-fade-in 0.3s ease;
}

@keyframes ssm-auth-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================================
   FAVORITEN-STERN AUF DEN KACHELN
   ===================================================================== */

.ssm-fav-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 5;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--ssm-glass-bg, rgba(255, 255, 255, 0.88));
    backdrop-filter: blur(4px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.ssm-fav-btn:hover {
    transform: scale(1.12);
}

.ssm-fav-btn:active {
    transform: scale(0.95);
}

.ssm-fav-btn:focus-visible {
    outline: 2px solid var(--ssm-primary);
    outline-offset: 2px;
}

/* Stern: Umriss (kein Favorit) */
.ssm-fav-icon {
    fill: none;
    stroke: var(--ssm-text-light, #888);
    stroke-width: 1.5px;
    transition: fill 0.25s, stroke 0.25s;
}

/* Stern: gefuellt (Favorit) */
.ssm-fav-btn.ssm-fav-active .ssm-fav-icon {
    fill: #FFC107;
    stroke: #FFC107;
}

/* Logo-Bereich braucht position: relative fuer den absoluten Stern */
.ssm-station-logo {
    position: relative;
}

/* Live-Dot ausblenden, der Stern sitzt an seiner Stelle */
.ssm-station-logo .ssm-live-dot {
    display: none;
}

/* =====================================================================
   TOAST (Login-Hinweis)
   ===================================================================== */

.ssm-auth-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 20px;
    background: #1E293B;
    color: #fff;
    font-size: 14px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    max-width: calc(100vw - 40px);
    text-align: center;
}

.ssm-auth-toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* =====================================================================
   FAVORITEN-SEITE ([ssm_favorites])
   Aufbau: Profilzeile → Favoriten → Eigene Sender. Die Seite dient dem
   Schnellzugriff: kompakte Kacheln ohne Beschreibung, Abspielen im Cover.
   ===================================================================== */

.ssm-favorites-page {
    /* Gestrichelte Raender: --ssm-border ist im Hell-Design auf der
       Seitenflaeche kaum sichtbar */
    --ssm-dashed-border: color-mix(in srgb, var(--ssm-text-muted) 55%, transparent);
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.ssm-auth-container.ssm-auth-favorites {
    justify-content: center;
    padding: 0;
    margin: 0;
}

/* --- Profilzeile (eingeloggt) --------------------------------------- */

.ssm-auth-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px 14px 14px;
    border: 1px solid var(--ssm-border);
    border-radius: var(--ssm-card-radius, 16px);
    background: var(--ssm-background);
    box-shadow: var(--ssm-shadow-xs);
}

.ssm-auth-profile .ssm-auth-avatar,
.ssm-auth-profile .ssm-auth-avatar-icon {
    width: 44px;
    height: 44px;
    line-height: 44px;
}

.ssm-auth-profile-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}

.ssm-auth-profile .ssm-auth-user-name {
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ssm-auth-profile-sub {
    font-size: 0.84rem;
    line-height: 1.3;
    color: var(--ssm-text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ssm-auth-profile .ssm-auth-btn-logout {
    flex: none;
}

/* --- Login (ausgeloggt): grosse, gleich breite Buttons --------------- */

.ssm-auth-favorites .ssm-auth-buttons {
    justify-content: center;
    gap: 12px;
}

.ssm-auth-favorites .ssm-auth-buttons .ssm-auth-btn {
    min-width: 240px;
    min-height: 48px;
    justify-content: center;
    padding: 0 22px;
    border-radius: 999px;
    font-size: 15px;
}

/* --- Abschnitte ------------------------------------------------------- */

.ssm-fav-section .ssm-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 16px;
}

.ssm-fav-section .ssm-section-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ssm-heading);
}

.ssm-section-count {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ssm-text-muted);
    font-variant-numeric: tabular-nums;
}

/* --- Raster: dichter als im Archiv ------------------------------------ */

.ssm-favorites-page .ssm-stations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 18px;
    align-items: stretch;
}

/* Ohne Favoriten steht nur der Leer-State im Abschnitt */
.ssm-favorites-page .ssm-stations-grid:empty {
    display: none;
}

/* --- Kacheln ----------------------------------------------------------- */

.ssm-favorites-page .ssm-station-card {
    display: flex;
    flex-direction: column;
}

.ssm-favorites-page .ssm-station-card .ssm-card-content {
    padding: 12px 14px 14px;
    gap: 4px;
}

.ssm-favorites-page .ssm-station-card .ssm-station-title {
    font-size: 0.95rem;
    -webkit-line-clamp: 1;
}

.ssm-favorites-page .ssm-station-card .ssm-station-excerpt {
    display: none;
}

/* Genre · Land als ruhige Textzeile statt Farb-Badges (wie in der App).
   Die Badge-Klassen bleiben – player.js und der App-Sync lesen sie. */
.ssm-favorites-page .ssm-station-card .ssm-card-badges {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--ssm-text-light);
}

.ssm-favorites-page .ssm-station-card .ssm-badge {
    /* style.css: inline-flex mit gap – der Trennpunkt waere ein eigenes
       Flex-Element mit Extra-Abstand, und die Ellipse griffe nicht */
    display: block;
    flex: 0 1 auto;
    min-width: 0;
    max-width: none;
    gap: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: inherit;
    font-size: inherit;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ssm-favorites-page .ssm-station-card .ssm-badge + .ssm-badge::before {
    content: '·';
    margin: 0 6px;
}

/* Entfernter Favorit: Kachel bleibt gedimmt stehen, der Stern holt ihn
   mit einem Klick zurueck */
.ssm-favorites-grid .ssm-station-card:has(.ssm-fav-btn:not(.ssm-fav-active)) :is(.ssm-card-image, .ssm-card-backdrop, .ssm-card-content) {
    opacity: 0.4;
    filter: grayscale(1);
}

/* --- Laeuft gerade ----------------------------------------------------- */

.ssm-favorites-page .ssm-station-card.is-playing {
    border-color: var(--ssm-primary);
    box-shadow: 0 0 0 1px var(--ssm-primary), var(--ssm-shadow-md);
}

.ssm-now-playing {
    display: none;
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 4;
    align-items: center;
    gap: 7px;
    padding: 5px 11px 5px 9px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    pointer-events: none;
}

.ssm-favorites-page .ssm-station-card.is-playing .ssm-now-playing {
    display: inline-flex;
}

.ssm-eq {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 11px;
}

.ssm-eq i {
    display: block;
    width: 3px;
    height: 100%;
    border-radius: 1px;
    background: var(--ssm-primary, #00B4D8);
    transform-origin: bottom;
    animation: ssm-eq 0.9s ease-in-out infinite;
}

.ssm-eq i:nth-child(2) { animation-delay: -0.35s; }
.ssm-eq i:nth-child(3) { animation-delay: -0.6s; }

@keyframes ssm-eq {
    0%, 100% { transform: scaleY(0.3); }
    50%      { transform: scaleY(1); }
}

/* --- Platzhalter beim Laden ------------------------------------------- */

.ssm-fav-skeleton {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 16px;
    border: 1px solid var(--ssm-border-light);
    border-radius: var(--ssm-card-radius, 16px);
    background: var(--ssm-background);
    overflow: hidden;
    animation: ssm-fav-pulse 1.4s ease-in-out infinite;
}

.ssm-fav-skeleton-cover {
    display: block;
    aspect-ratio: var(--ssm-cover-ratio, 4 / 3);
    margin-bottom: 6px;
    background: var(--ssm-background-alt);
}

.ssm-fav-skeleton-line {
    display: block;
    width: 70%;
    height: 10px;
    margin: 0 14px;
    border-radius: 5px;
    background: var(--ssm-background-alt);
}

.ssm-fav-skeleton-line-short {
    width: 42%;
}

@keyframes ssm-fav-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.55; }
}

/* --- Leer-State -------------------------------------------------------- */

.ssm-favorites-empty {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 44px 20px;
    border: 1.5px dashed var(--ssm-dashed-border);
    border-radius: var(--ssm-card-radius, 16px);
    text-align: center;
}

.ssm-favorites-star-icon {
    display: block;
    margin-bottom: 4px;
    fill: none;
    stroke: #FFC107;
    stroke-width: 1.5px;
}

.ssm-favorites-page .ssm-favorites-empty-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 650;
    color: var(--ssm-heading);
}

.ssm-favorites-page .ssm-favorites-empty-text {
    max-width: 44ch;
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--ssm-text-light);
}

.ssm-favorites-page .ssm-fav-discover {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    margin-top: 10px;
    padding: 0 22px;
    border-radius: 999px;
    background: var(--ssm-gradient-primary, #00B4D8);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}

.ssm-favorites-page .ssm-fav-discover:hover {
    background: var(--ssm-gradient-primary-hover, #0096B7);
    color: #fff;
    text-decoration: none;
}

.ssm-favorites-page .ssm-fav-discover:focus-visible {
    outline: 2px solid var(--ssm-primary);
    outline-offset: 3px;
}

.ssm-favorites-error {
    grid-column: 1 / -1;
    margin: 0;
    padding: 20px;
    text-align: center;
    color: #ef4444;
}

/* =====================================================================
   EIGENE SENDER: HINZUFUEGEN-KACHEL + KARTEN-AKTIONEN
   ===================================================================== */

.ssm-cs-add-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 170px;
    padding: 20px 12px;
    border: 1.5px dashed var(--ssm-dashed-border);
    border-radius: var(--ssm-card-radius, 16px);
    background: transparent;
    color: var(--ssm-text-light);
    font-family: inherit;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.ssm-cs-add-tile:hover {
    border-color: var(--ssm-primary);
    background: var(--ssm-primary-light);
    color: var(--ssm-primary);
}

.ssm-cs-add-tile:focus-visible {
    outline: 2px solid var(--ssm-primary);
    outline-offset: 2px;
}

.ssm-cs-add-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 4px;
    border-radius: 50%;
    background: var(--ssm-background-alt);
    color: inherit;
}

.ssm-cs-add-label {
    font-size: 0.95rem;
    font-weight: 650;
    color: var(--ssm-heading);
}

.ssm-cs-add-hint {
    font-size: 0.8rem;
    color: var(--ssm-text-muted);
}

.ssm-cs-card-actions {
    display: flex;
    gap: 4px;
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
}

.ssm-cs-edit-btn,
.ssm-cs-delete-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--ssm-glass-bg, rgba(255, 255, 255, 0.88));
    backdrop-filter: blur(4px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--ssm-text);
    transition: background 0.2s, color 0.2s, transform 0.1s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.ssm-cs-edit-btn:hover {
    color: var(--ssm-primary);
    transform: scale(1.1);
}

.ssm-cs-delete-btn:hover {
    color: #ef4444;
    transform: scale(1.1);
}

.ssm-cs-edit-btn:focus-visible,
.ssm-cs-delete-btn:focus-visible {
    outline: 2px solid var(--ssm-primary);
    outline-offset: 2px;
}

/* =====================================================================
   EIGENE SENDER: MODAL
   ===================================================================== */

.ssm-cs-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(2, 6, 23, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: ssm-auth-fade-in 0.2s ease;
}

.ssm-cs-modal {
    background: var(--ssm-background);
    color: var(--ssm-text);
    border: 1px solid var(--ssm-border);
    border-radius: var(--ssm-card-radius, 16px);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--ssm-shadow-lg);
}

.ssm-cs-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ssm-border);
}

.ssm-cs-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 650;
    color: var(--ssm-heading);
}

.ssm-cs-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--ssm-text-muted);
    line-height: 1;
    padding: 4px;
}

.ssm-cs-modal-close:hover {
    color: var(--ssm-heading);
}

.ssm-cs-form {
    padding: 20px;
}

.ssm-cs-field {
    margin-bottom: 16px;
}

.ssm-cs-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--ssm-text-light);
    margin-bottom: 4px;
}

.ssm-cs-field input,
.ssm-cs-field select,
.ssm-cs-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--ssm-border);
    border-radius: 8px;
    background: var(--ssm-background);
    color: var(--ssm-text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.ssm-cs-field input:focus,
.ssm-cs-field select:focus,
.ssm-cs-field textarea:focus {
    outline: none;
    border-color: var(--ssm-primary, #00B4D8);
    box-shadow: 0 0 0 3px var(--ssm-primary-light);
}

.ssm-cs-row {
    display: flex;
    gap: 12px;
}

.ssm-cs-half {
    flex: 1;
}

.ssm-cs-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--ssm-border);
}

.ssm-cs-btn {
    padding: 10px 20px;
    border: 1px solid var(--ssm-border);
    border-radius: 999px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.ssm-cs-btn-cancel {
    background: transparent;
    color: var(--ssm-text);
}

.ssm-cs-btn-cancel:hover {
    background: var(--ssm-background-alt);
}

.ssm-cs-btn-save {
    background: var(--ssm-gradient-primary, #00B4D8);
    color: #fff;
    border-color: transparent;
}

.ssm-cs-btn-save:hover {
    opacity: 0.9;
}

.ssm-cs-btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

@media (max-width: 768px) {
    .ssm-auth-container {
        justify-content: center;
    }

    .ssm-auth-buttons {
        justify-content: center;
        width: 100%;
    }

    .ssm-auth-buttons .ssm-auth-btn {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }

    .ssm-auth-user {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .ssm-favorites-page {
        gap: 32px;
    }

    .ssm-favorites-page .ssm-stations-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .ssm-fav-section .ssm-section-title {
        font-size: 1.15rem;
    }
}

@media (max-width: 480px) {
    .ssm-auth-buttons {
        flex-direction: column;
    }

    .ssm-auth-buttons .ssm-auth-btn,
    .ssm-auth-favorites .ssm-auth-buttons .ssm-auth-btn {
        width: 100%;
        min-width: 0;
    }

    .ssm-auth-profile {
        gap: 12px;
        padding: 12px;
    }

    .ssm-auth-profile .ssm-auth-avatar,
    .ssm-auth-profile .ssm-auth-avatar-icon {
        width: 40px;
        height: 40px;
        line-height: 40px;
    }

    /* Immer zwei Spalten (wie im Archiv, v4.37.2) */
    .ssm-favorites-page .ssm-stations-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .ssm-favorites-page .ssm-station-card .ssm-card-content {
        padding: 10px 12px 12px;
    }

    .ssm-cs-add-tile {
        min-height: 150px;
    }

    .ssm-fav-btn {
        width: 32px;
        height: 32px;
    }

    .ssm-fav-icon {
        width: 18px;
        height: 18px;
    }

    .ssm-cs-modal {
        max-height: 95vh;
    }

    .ssm-cs-row {
        flex-direction: column;
        gap: 0;
    }

    .ssm-cs-actions {
        flex-direction: column;
    }

    .ssm-cs-btn {
        width: 100%;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ssm-eq i {
        animation: none;
        transform: scaleY(0.7);
    }

    .ssm-fav-skeleton {
        animation: none;
    }

    .ssm-fav-btn,
    .ssm-auth-btn,
    .ssm-cs-add-tile {
        transition: none;
    }

    .ssm-fav-btn:hover {
        transform: none;
    }
}
