.viboras-home-phone {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.25rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
    background-color: #0f172a;
    background-size: cover;
    background-position: center;
    color: #fff;
    box-sizing: border-box;
}

.viboras-home-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.viboras-home-brand {
    display: block;
    width: auto;
    max-width: min(280px, 72vw);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

.viboras-home-menu {
    width: 2.75rem;
    height: 2.75rem;
    margin-top: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
}

.viboras-home-menu span {
    display: block;
    width: 1.1rem;
    height: 2px;
    background: #fff;
}

.viboras-phone-menu {
    margin-top: 0.75rem;
    padding: 0.85rem;
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.viboras-phone-menu p {
    margin: 0 0 0.4rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
}

.viboras-phone-menu a {
    display: block;
    padding: 0.75rem 0.35rem;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.viboras-home-sheet {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 1.25rem;
}

.viboras-home-hello {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 1px 10px rgba(2, 6, 23, 0.55);
}

.viboras-home-intro {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.viboras-home-title {
    margin: 0;
    font-size: 1.85rem;
    line-height: 1.12;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 16px rgba(2, 6, 23, 0.55);
}

.viboras-home-lead {
    margin: 0;
    max-width: 26rem;
    font-size: 0.95rem;
    line-height: 1.35;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 10px rgba(2, 6, 23, 0.5);
}

.viboras-home-actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.viboras-home-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    margin: 0;
    padding: 0.7rem 0.85rem 0.7rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 1.35rem;
    background: rgba(255, 255, 255, 0.94);
    color: #12263a;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
    text-align: left;
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    font: inherit;
    line-height: 1.25;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.viboras-home-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2.7rem;
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 0.85rem;
    background: #eef3f7;
    color: #3d5166;
}

.viboras-home-copy {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
    flex: 1 1 auto;
}

.viboras-home-card-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 1rem;
    font-weight: 700;
    color: #12263a;
}

.viboras-home-card-sub {
    display: block;
    overflow: hidden;
    color: #5c6d7e;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.viboras-home-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.48rem;
    border-radius: 999px;
    background: #1e293b;
    color: #fff;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
    white-space: nowrap;
}

.viboras-home-arrow {
    display: flex;
    flex: 0 0 auto;
    margin-left: auto;
    color: #94a3b8;
}

.viboras-prossime-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0 1.5rem;
}

.viboras-prossime-head h1 {
    margin: 0;
    font-size: 1.45rem;
}

.viboras-prossime-back {
    font-weight: 700;
    text-decoration: none;
}

.viboras-carousel {
    margin-bottom: 2rem;
}

.viboras-carousel h2 {
    margin-bottom: 0.75rem;
    font-size: 1.15rem;
}

.viboras-track {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.4rem;
}

.viboras-card {
    flex: 0 0 min(295px, 82vw);
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-height: 180px;
    padding: 1rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid rgba(36, 61, 87, 0.12);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.viboras-card-when,
.viboras-card-where {
    margin: 0;
}

.viboras-card-when {
    font-weight: 800;
    color: #243d57;
}

.viboras-card-where {
    color: #006684;
    font-weight: 600;
}

.viboras-card-people {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.viboras-card-people li {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #eef3f6;
    font-size: 0.85rem;
}

.viboras-card-open {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    border-radius: 0.7rem;
    background: #44ccfe;
    color: #004d64;
    font-weight: 700;
    text-decoration: none;
}

.viboras-empty {
    margin-top: 0;
}

.viboras-filtri {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin: 0 0 1rem;
}

.viboras-filtri select,
.viboras-filtri button {
    min-height: 2.75rem;
    border-radius: 0.7rem;
    border: 1px solid rgba(36, 61, 87, 0.2);
    background: #fff;
    padding: 0 0.8rem;
}

.viboras-filtri button {
    background: #44ccfe;
    color: #004d64;
    font-weight: 700;
}

.viboras-per-me {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
}

.viboras-stack {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.viboras-stack .viboras-card {
    flex: none;
    width: auto;
}

.viboras-pager {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin: 1rem 0 2rem;
}

.viboras-pager a {
    font-weight: 700;
}

/* Home a card: stessa vista a ogni larghezza (prima solo sotto i 960px). */
body.viboras-phone-gate .tm-header-mobile,
body.viboras-phone-gate header.tm-header,
body.viboras-phone-gate footer {
    display: none !important;
}

body.viboras-phone-gate .viboras-home-phone {
    position: fixed;
    inset: 0;
    z-index: 20;
    overflow: auto;
}

@media (min-width: 768px) {
    .viboras-home-phone {
        padding: 1.75rem 2rem 2.5rem;
    }

    .viboras-home-top,
    .viboras-home-sheet,
    .viboras-phone-menu {
        width: 100%;
        max-width: 720px;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }
}

@media (min-width: 1200px) {
    .viboras-home-top,
    .viboras-home-sheet,
    .viboras-phone-menu {
        max-width: 960px;
    }

    .viboras-home-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.9rem;
    }

    .viboras-home-actions > :last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

.viboras-prenota-phone {
    padding: 0.5rem 1.15rem calc(1.5rem + env(safe-area-inset-bottom));
    color: #243d57;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    box-sizing: border-box;
    min-width: 0;
    overflow-x: hidden;
}

@media (min-width: 768px) {
    .viboras-prenota-phone {
        padding: 1.5rem 2rem 2.5rem;
    }
}

.viboras-sede h2,
.viboras-prenota-when {
    margin: 0;
}

.viboras-sede h2 {
    font-size: 1.35rem;
}

.viboras-sede p {
    margin: 0.35rem 0 0;
    color: #006684;
    font-weight: 600;
}

.viboras-sede-change {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.9rem;
    font-weight: 700;
}

.viboras-sede-change select,
.viboras-court,
.viboras-day,
.viboras-slot,
.viboras-solo {
    border-radius: 1rem;
    border: 1px solid rgba(36, 61, 87, 0.14);
    background: #fff;
    color: #243d57;
}

.viboras-sede-change select {
    min-height: 3.5rem;
    padding: 0 0.9rem;
    font: inherit;
    font-weight: 700;
}

.viboras-prenota-kicker,
.viboras-orari-head h2,
.viboras-campi-title {
    margin: 0 0 0.65rem;
    font-size: 1.2rem;
    color: #16324f;
}

.viboras-day-strip {
    display: flex;
    gap: 0.55rem;
    margin: 0 0 1.35rem;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overscroll-behavior-x: contain;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
}

.viboras-day {
    flex: 0 0 4.85rem;
    min-height: 4.35rem;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
    background: #fff;
}

.viboras-day-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: inherit;
}

.viboras-day-num {
    margin-top: 0.15rem;
    font-size: 0.95rem;
    font-weight: 800;
}

.viboras-day.is-on,
.viboras-court.is-on {
    background: #123047;
    border-color: #123047;
    color: #fff;
}

.viboras-orari-block {
    margin-top: 0.35rem;
}

.viboras-orari-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.viboras-orari-head p {
    margin: 0.2rem 0 0;
    color: #7b8896;
    font-size: 0.92rem;
}

.viboras-orari-clock {
    width: 1.7rem;
    height: 1.7rem;
    border: 2px solid #29b6e6;
    border-radius: 50%;
    position: relative;
    flex: 0 0 auto;
}

.viboras-orari-clock::before,
.viboras-orari-clock::after {
    content: "";
    position: absolute;
    background: #29b6e6;
    border-radius: 2px;
}

.viboras-orari-clock::before {
    width: 2px;
    height: 0.45rem;
    left: 50%;
    top: 0.28rem;
    transform: translateX(-50%);
}

.viboras-orari-clock::after {
    width: 0.38rem;
    height: 2px;
    left: 50%;
    top: 50%;
}

.viboras-fasce {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    margin-bottom: 0.85rem;
    padding: 0.3rem;
    border-radius: 0.95rem;
    background: #edf3f7;
}

.viboras-fascia-tab {
    min-height: 2.7rem;
    border: 0;
    border-radius: 0.75rem;
    background: transparent;
    color: #123047;
    font: inherit;
    font-weight: 700;
}

.viboras-fascia-tab.is-on {
    background: #00b0e1;
    color: #fff;
}

.viboras-slot-grid {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.55rem;
}

.viboras-slot-grid.is-on {
    display: grid;
}

.viboras-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3.15rem;
    padding: 0.45rem 0.35rem;
    border-radius: 0.95rem;
    border: 2px solid #123047;
    background: #123047;
    color: #fff;
    font: inherit;
    font-weight: 800;
    text-align: center;
}

.viboras-slot.is-free {
    background: #123047;
    border-color: #123047;
    color: #fff;
}

.viboras-slot.is-selected {
    background: #fff;
    border-color: #123047;
    color: #123047;
}

.viboras-slot.is-busy,
.viboras-slot.is-past,
.viboras-slot.is-excluded,
.viboras-slot:disabled {
    background: #e8eef3;
    border-color: #e8eef3;
    color: #9aa6b2;
}

.viboras-slot.is-selected:disabled {
    background: #fff;
    border-color: #123047;
    color: #123047;
}

.viboras-campi-block {
    margin-top: 1.5rem;
}

.viboras-campi-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.viboras-campo-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    min-height: 4.4rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(18, 48, 71, 0.08);
    border-radius: 1.1rem;
    background: #fff;
    color: #123047;
    font: inherit;
    text-align: left;
}

.viboras-campo-card.is-busy,
.viboras-campo-card:disabled {
    opacity: 0.55;
}

.viboras-campo-card.is-selected {
    box-shadow: 0 0 0 2px #123047 inset;
    opacity: 1;
}

.viboras-campo-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    background: #123047;
    color: #fff;
    font-weight: 800;
    flex: 0 0 auto;
}

.viboras-campo-card.is-busy .viboras-campo-num {
    background: #c5ced6;
}

.viboras-campo-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1 1 auto;
}

.viboras-campo-name {
    font-weight: 800;
}

.viboras-campo-state {
    color: #00a0ce;
    font-weight: 700;
    font-size: 0.92rem;
}

.viboras-campo-card.is-busy .viboras-campo-state {
    color: #8b97a3;
}

.viboras-campo-radio {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #c5ced6;
    border-radius: 50%;
    flex: 0 0 auto;
    box-sizing: border-box;
}

.viboras-campo-card.is-selected .viboras-campo-radio {
    border-color: #123047;
    box-shadow: 0 0 0 4px #123047 inset;
}

.viboras-prenota-confirm {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3.4rem;
    margin-top: 1rem;
    border: 0;
    border-radius: 1rem;
    background: #00b0e1;
    color: #083044;
    font: inherit;
    font-weight: 800;
}

.viboras-prenota-confirm:disabled {
    background: #d5dee5;
    color: #8b97a3;
}

.viboras-slot[hidden] {
    display: none !important;
}

/* Prenota: la nuova pagina vale a ogni larghezza. La vecchia griglia
   settimanale resta nel codice (e per il calendario staff), ma il giocatore
   non la vede più. */
body.viboras-phone-prenota .viboras-prenota-week {
    display: none !important;
}

/* Sito giocatori: una sola testata (logo, account, menu) a ogni larghezza. */
body.viboras-app-unified .tm-header-mobile {
    display: block !important;
}

body.viboras-app-unified header.tm-header {
    display: none !important;
}

body.viboras-app-unified {
    overflow-x: hidden;
}

/* Elenchi giocatore (partite aperte, attività, eventi): centrati su schermi larghi. */
@media (min-width: 768px) {
    body.viboras-app-unified .viboras-prossime > .uk-container {
        max-width: 960px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 2rem;
        padding-right: 2rem;
        box-sizing: border-box;
    }
}

/* Home con la vista unica: la testata bianca del sito è sopra la home fissa.
   La barra della home (marchio + menu) restava sotto la testata e ne usciva
   solo la punta blu del marchio. Con la vista unica la barra della home non si
   mostra: logo, account e menu sono quelli della testata. Le card scendono in basso. */
body.viboras-phone-gate.viboras-app-unified .viboras-home-top,
body.viboras-phone-gate.viboras-app-unified #viboras-phone-menu {
    display: none !important;
}

body.viboras-phone-gate.viboras-app-unified .viboras-home-phone {
    justify-content: flex-end;
    padding-top: 6rem;
}

/* Footer di sito: con la vista unica index.php non lo include. Rete di sicurezza
   se un tema lo stampa comunque. */
body.viboras-app-unified > .tm-page > footer {
    display: none !important;
}

/* Riga legale per chi non è entrato (login, registrazione, recupero). */
.vb-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 1.1rem;
    max-width: 960px;
    margin: 1.5rem auto 0;
    padding: 1.25rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(36, 61, 87, 0.1);
    font-size: 0.8rem;
    color: #6b7a89;
    box-sizing: border-box;
}

.vb-legal a {
    color: #006684;
    font-weight: 600;
    text-decoration: none;
}
