/* Home dashboard (Fase 4) - solo token --ui-* */
.home-page { display: flex; flex-direction: column; gap: 22px; }


/* Hero */
.home-hero { display: flex; gap: 22px; padding: 20px; align-items: center; }
.home-hero-clickable { cursor: pointer; }
.home-hero-clickable:hover { border-color: var(--ui-primary); }
.home-hero-poster { width: 120px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; flex-shrink: 0; background: var(--ui-surface-2); }
.home-hero-body { flex: 1; min-width: 0; }
.home-hero-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ui-primary); font-weight: 700; margin-bottom: 4px; }
.home-hero h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; color: var(--ui-text); }
.home-hero-countdown { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; margin: 8px 0; color: var(--ui-text); }
.home-hero-then { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
.home-hero-chip { background: var(--ui-surface-2); color: var(--ui-text-secondary); border-radius: 999px; padding: 3px 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Il calendario esistente vive dentro la nostra card: niente sfondi/bordi doppi */
.home-page .weekly-calendar-container { margin: 0; background: transparent; border: 0; box-shadow: none; padding: 0; }
.home-page .calendar-header { margin-bottom: 8px; }

/* Desktop: i 7 giorni dividono la larghezza invece di scorrere (tablet/mobile restano a carosello) */
@media (min-width: 993px) {
    .home-calendar .weekly-calendar { overflow-x: visible; gap: 10px; }
    .home-calendar .day-column { flex: 1 1 0; min-width: 0; padding: 12px; }
}

/* Tablet e desktop, colonne strette: immagine sopra e testo sotto, così il titolo ha tutta la larghezza.
   Sotto i 769px si vede un giorno per volta a tutta larghezza e la card orizzontale va bene. */
@media (min-width: 769px) {
    .home-calendar .day-column .anime-button { flex-direction: column; align-items: stretch; gap: 8px; padding: 8px; }
    .home-calendar .day-column .anime-image { width: 100%; height: auto; aspect-ratio: 16 / 10; }
    .home-calendar .day-column .anime-image img { object-position: center 20%; }
    .home-calendar .day-column .anime-name { -webkit-line-clamp: 2; }
}

/* Righe scorrevoli: barra sottile e discreta */
.home-page .ui-row-scroll { scrollbar-width: thin; scrollbar-color: var(--ui-border) transparent; }
.home-page .ui-row-scroll::-webkit-scrollbar { height: 6px; }
.home-page .ui-row-scroll::-webkit-scrollbar-thumb { background: var(--ui-border); border-radius: 999px; }
.home-page .ui-row-scroll::-webkit-scrollbar-track { background: transparent; }

/* Statistiche */
.home-stats-section .ui-panel-head { margin-bottom: 10px; }
.home-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.home-stat-value { font-size: 1.6rem; font-weight: 700; color: var(--ui-text); }
.home-stat-title { font-size: 1.1rem; line-height: 1.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-stat-label { font-size: 12px; color: var(--ui-text-secondary); }

@media (max-width: 900px) {
    .home-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .home-hero { flex-direction: column; align-items: flex-start; }
    .home-hero-poster { width: 90px; }
    /* In colonna il corpo prenderebbe la larghezza del chip più lungo e allargherebbe la pagina */
    .home-hero-body { width: 100%; }
    .home-hero h2 { font-size: 1.25rem; }
    .home-hero-countdown { font-size: 1.6rem; }
}

/* Skin giocosa: hero con fondo celeste come il vecchio pannello di benvenuto */
.home-hero.ui-card { background: var(--ui-header-bg); border-color: var(--ui-header-border); border-radius: var(--ui-radius-lg); box-shadow: var(--ui-header-shadow); }
.home-hero .home-hero-chip { background: var(--ui-inner); border: 1px solid var(--ui-inner-border); }
.home-stat.ui-card, .home-stats .ui-card { background: var(--ui-panel-bg); border-color: var(--ui-panel-border); border-radius: var(--ui-radius-lg); }
