
    @font-face{font-family:'ID Grotesk Medium';font-style:normal;font-weight:normal;font-display:swap;src:url("/assets/css/fonts/id-grotesk-font-family/IDGroteskTrial-Medium-BF64ffd9543bf61.ttf") format('truetype')}
    @font-face{font-family:'ID Grotesk Bold';font-style:normal;font-weight:normal;font-display:swap;src:url("/assets/css/fonts/id-grotesk-font-family/IDGroteskTrial-Bold-BF64ffd953ebc04.ttf") format('truetype')}
    @font-face{font-family:'ID Grotesk Italic';font-style:normal;font-weight:normal;font-display:swap;src:url("/assets/css/fonts/id-grotesk-font-family/IDGroteskTrial-Italic-BF64ffd95415244.ttf") format('truetype')}
    @font-face{font-family:'ID Grotesk Regular';font-style:normal;font-weight:normal;font-display:swap;src:url("/assets/css/fonts/id-grotesk-font-family/IDGroteskTrial-Regular-BF64ffd9541f2d0.ttf") format('truetype')}


    :root {
        --cell-h: 40px;
        --cell-w: 200px;
        --time-w: 56px;
        --header-h: 36px;
        --border: #dee2e6;
        --border-d: #dee2e6;
        --panel-w: 700px;
        --topbar-h: 98px;
        --accent: #7f1c5d;
        --accent2: #442349;
        --accent3: #442349;

        --sched-width:      100%;   /* larghezza del calendario rispetto al contenitore */
        --sched-margin-top: 0px;  /* spazio tra topbar e inizio della tabella */

        --logo-h:           80px;  /* altezza normale del blocco logo */
        --logo-h-scrolled:  26px;  /* altezza del blocco logo quando si scrolla verso il basso */

        --appt-badge-font-size: 0.65rem;
        --appt-badge-font-size-details: 0.8rem;
    }

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

    /* ── BODY: scroll verticale libero ──────────────── */
    body {
        margin: 0;
        background: #F1D1D4;
        font-family: 'ID Grotesk Medium','Segoe UI', system-ui, sans-serif;
        font-size: 13px;
        /* overflow non impostato → scroll nativo del browser */
    }

    /* ── TOPBAR: statica, scorre via con la pagina ───── */
    .topbar {
        /* NON sticky — la topbar scorre via normalmente.
           I topic espansi spingono giù il calendario senza conflitti. */
        background: var(--accent);
        color: #fff;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 1px 6px rgba(0,0,0,.12);
    }

    .topbar-row1 {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: .4rem 1rem;
        gap: .5rem;
        flex-wrap: wrap;
    }

    /* Blocco logo: altezza fissa (personalizzabile via --logo-h),
       si restringe con una transizione quando si scrolla verso il basso
       (classe .scrolled aggiunta via JS). */
    .topbar-logo {
        height: var(--logo-h);
        display: flex;
        align-items: center;
        overflow: hidden;
        transition: height .25s ease;
        flex-shrink: 0;
        padding:5px 0px 5px 0px;
    }

    .topbar-logo.scrolled {
        height: var(--logo-h-scrolled);
    }

    .topbar-logo img,
    .topbar-logo svg {
        height: 100%;
        width: auto;
        max-width: 100%;
        display: block;
    }

    .topbar-row2 {
        display: flex;
        align-items: center;
        padding: .5rem 1rem .4rem;
        gap: .5rem;
        flex-wrap: wrap;
        background: var(--accent2);
    }

    /* Topic pills row — sotto i day-tabs, a tutta larghezza */
    .topbar-row-topics {
        padding: .5rem 1rem .4rem;
        display: flex;
        align-items: flex-start;
        gap: .5rem;
        background: var(--accent3);
    }

    /* Category pills row — gemella della riga topic, sotto ad essa */
    .topbar-row-categories {
        padding: .5rem 1rem .4rem;
        display: flex;
        align-items: flex-start;
        gap: .5rem;
        background: var(--accent3);
    }

    /* Riga search */
    .topbar-row3 {
        padding: .5rem 1rem .4rem;
        display: flex;
        gap: .5rem;
        align-items: center;
        background: var(--accent3);
    }

    /* ── TOPIC PILLS COLLAPSE ───────────────────────── */
    #topic-filter-bar {
        flex: 1;
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        /* Collassato: mostra una sola riga (~28px) */
        max-height: 28px;
        overflow: hidden;
        transition: max-height .4s cubic-bezier(.4,0,.2,1);
    }
    #topic-filter-bar.expanded {
        /* Espanso: altezza automatica — nessun limite */
        max-height: 2000px;
    }

    #btn-topics-toggle {
        flex-shrink: 0;
        background-color: white;
        border: 1px solid black;
        border-radius: 10px;
        color: #000;
        font-size: .72rem;
        font-weight: 600;
        padding: 3px 9px;
        cursor: pointer;
        white-space: nowrap;
        line-height: 1.8;
        transition: background .15s;
        display: flex;
        align-items: center;
        gap: 4px;
    }
    #btn-topics-toggle:hover { background: rgba(255,255,255,.28); }

    #topics-hidden-count {
        background: rgba(255,255,255,.3);
        border-radius: 20px;
        padding: 0 6px;
        font-size: .65rem;
        font-weight: 700;
    }

    /* ── CATEGORY PILLS COLLAPSE (gemello di topic) ─────── */
    #category-filter-bar {
        flex: 1;
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        max-height: 28px;
        overflow: hidden;
        transition: max-height .4s cubic-bezier(.4,0,.2,1);
    }
    #category-filter-bar.expanded {
        max-height: 2000px;
    }

    #btn-categories-toggle {
        flex-shrink: 0;
        background-color: white;
        border: 1px solid black;
        border-radius: 10px;
        color: #000;
        font-size: .72rem;
        font-weight: 600;
        padding: 3px 9px;
        cursor: pointer;
        white-space: nowrap;
        line-height: 1.8;
        transition: background .15s;
        display: flex;
        align-items: center;
        gap: 4px;
    }
    #btn-categories-toggle:hover { background: rgba(255,255,255,.28); }

    #categories-hidden-count {
        background: rgba(255,255,255,.3);
        border-radius: 20px;
        padding: 0 6px;
        font-size: .65rem;
        font-weight: 700;
    }

    /* ── MAIN WRAP: sticky al top, prende tutto il viewport ── */
    /* ── STICKY GROUP: giornate + search ──────────────
       Quando si scrolla verso il basso, logo/topic/category scorrono via
       normalmente, mentre questo blocco (day-tabs + search) si blocca
       in cima alla pagina. --sticky-group-h viene calcolata via JS
       in base all'altezza reale (cambia con eventuale wrap della search). */
    .topbar-sticky-group {
        position: sticky;
        top: 0;
        z-index: 200;
        box-shadow: 0 2px 8px rgba(0,0,0,.15);
    }

    .main-wrap {
        display: flex;
        /* main-wrap si ancora subito sotto al blocco sticky (giornate + search),
           non più al top assoluto, per non finirci sotto */
        position: sticky;
        top: var(--sticky-group-h, 0px);
        height: calc(100vh - var(--sticky-group-h, 0px));
        overflow: hidden;
    }

    .search-box {
        flex: 1;
        max-width: 380px;
        background: #fff;
        border: 1px solid rgba(0, 0, 0, .35);
        border-radius: 20px;
        color: #000;
        font-size: .78rem;
        padding: 4px 14px 4px 34px;
        outline: none;
        transition: background .15s, border-color .15s;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='rgba(0,0,0,.7)' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.044.06.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.115-.099zm-5.242 1.156a5.5 5.5 0 1 1 0-11 5.5 5.5 0 0 1 0 11'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: 12px center;
    }

    .search-box::placeholder {
        color: #000;
    }

    .search-box:focus {
        background-color:  #fff;
        border-color: rgba(0, 0, 0, .7);
    }

    .search-box::-webkit-search-cancel-button {
        cursor: pointer;
    }

    #btn-search-clear {
        background: none;
        border: none;
        color: rgba(0, 0, 0, .7);
        cursor: pointer;
        font-size: .85rem;
        padding: 2px 4px;
        display: none;
    }

    #btn-search-clear:hover {
        color: #fff;
    }

    /* Bottone "Cerca": esegue la ricerca solo al click (o Invio).
       Evita una chiamata AJAX ad ogni carattere digitato. */
    #btn-search-go {
        background-color: white;
        border: 1px solid black;
        color: #000;
        border-radius: 10px;
        padding: 2px 11px;
        font-size: .8rem;
        cursor: pointer;
        transition: background .15s;
        flex-shrink: 0;
    }

    #btn-search-go:hover {
        background: rgba(255, 255, 255, .3);
    }

    /* Day tabs */
    .day-btn {
        border: 1px solid rgba(255, 255, 255, .4);
        background: rgba(255, 255, 255, .12);
        border-radius: 6px;
        padding: 3px 14px;
        font-size: .75rem;
        font-weight: 600;
        cursor: pointer;
        color: #fff;
        transition: background .15s, border-color .15s;
        line-height: 1.4;
        white-space: nowrap;
        display: inline-flex;
        align-items: baseline;
        gap: 6px;
    }

    .day-btn:hover {
        background: rgba(255, 255, 255, .25);
    }

    .day-btn.active {
        background: #fff;
        color: #000;
        border-color: #fff;
    }

    /* Topic pills */
    .topic-pill {
        font-family: 'ID Grotesk Regular','Segoe UI', system-ui, sans-serif;
        border-radius: 10px;
        padding: 2px 11px;
        font-size: .8rem;
        font-weight: 600;
        cursor: pointer;
        border: 2px solid transparent;
        transition: opacity .2s, box-shadow .15s, transform .12s;
        user-select: none;
        white-space: nowrap;

        display:inline-flex;align-items:center;gap:6px;
        border: 1px solid black;
        background-color: white;
        color: black;
    }

    .topic-pill.active {
        transform: scale(1.02);
        box-shadow: 0 0 0 2px rgba(255, 255, 255, .6);
        border: 2px solid black;
    }

    .topic-pill.dimmed {
        opacity: .35;
    }

    .topic-pill:hover {
        filter: brightness(.92);
    }

    .appt-card.topic-dim,
    .res-card.topic-dim {
        opacity: .15;
        pointer-events: none;
    }

    /* Layout toggle */
    .btn-layout {
        font-size: .8rem;
        padding: 3px 9px;
        border-radius: 6px;
        border: 1px solid rgba(255, 255, 255, .4);
        background: rgba(255, 255, 255, .12);
        cursor: pointer;
        color: #fff;
        transition: background .15s;
        white-space: nowrap;
        line-height: 1.6;
    }

    .btn-layout:hover {
        background: rgba(255, 255, 255, .25);
    }

    .btn-layout.active {
        background: #fff;
        color: var(--accent);
    }

    /* ── GRID COL ─────────────────────────────────── */

    .grid-col {
        flex: 1 1 auto;
        min-width: 0;
        overflow: auto;
        position: relative;
        /*scrollbar-width: thin;*/
        scrollbar-color: rgb(203, 213, 225) rgb(68, 35, 73);
        scrollbar
    }

    .divider {
        display: none;
        width: 1px;
        background: var(--border);
        flex-shrink: 0;
    }

    .panel-open .divider {
        display: block;
    }

    .detail-panel {
        flex: 0 0 0;
        width: 0;
        overflow: hidden;
        background: #fff;
        transition: flex .35s cubic-bezier(.4, 0, .2, 1), width .35s cubic-bezier(.4, 0, .2, 1);
        position: relative;
        display: flex;
        flex-direction: column;
    }

    .panel-open .detail-panel {
        flex: 0 0 var(--panel-w);
        width: var(--panel-w);
        border-left: 1px solid var(--border);
        overflow-y: auto;
    }

    /* ── TABELLA ──────────────────────────────────── */
    .sched-wrap {
        width: var(--sched-width);
        margin: var(--sched-margin-top) auto 0;
        padding-bottom: .5rem;
    }

    table#sched {
        border-collapse: separate;
        border-spacing: 0;
        table-layout: fixed;
        background: #fff;
        border: 1px solid var(--border);
        box-shadow: 0 1px 6px rgba(0, 0, 0, .05);
    }

    table#sched thead th {
        position: sticky;
        top: 0;
        z-index: 50;
        background: #fff;
        height: var(--header-h);
        width: var(--cell-w);
        min-width: var(--cell-w);
        max-width: var(--cell-w);
        border-bottom: 2px solid var(--border);
        border-right: 1px solid var(--border);
        text-align: center;
        vertical-align: middle;
        padding: 0 4px;
    }

    table#sched thead th:first-child {
        width: var(--time-w);
        min-width: var(--time-w);
        max-width: var(--time-w);
        position: sticky;
        top: 0;
        left: 0;
        z-index: 70;
        background: #f0f2f3;
        border-right: 2px solid var(--border);
    }

    table#sched tbody td.time-cell {
        position: sticky;
        left: 0;
        z-index: 20;
        width: var(--time-w);
        min-width: var(--time-w);
        max-width: var(--time-w);
        background: #f8f9fa;
        border-right: 2px solid var(--border);
        border-bottom: 1px solid var(--border-d);
        font-size: .68rem;
        font-weight: 600;
        color: #6c757d;
        padding: 4px 5px 0;
        cursor: default;
        white-space: nowrap;
        height: var(--cell-h);
    }

    table#sched tbody tr.row-full-hour td.time-cell {
        background: #eff1f3;
        color: #212529;
    }

    table#sched tbody td {
        height: var(--cell-h);
        min-height: var(--cell-h);
        max-height: var(--cell-h);
        width: var(--cell-w);
        min-width: var(--cell-w);
        max-width: var(--cell-w);
        border-bottom: 1px solid var(--border-d);
        border-right: 1px solid var(--border);
        vertical-align: top;
        padding: 2px 2px;
        position: relative;
    }

    table#sched tbody tr.row-full-hour td {
        border-bottom: 1px dashed var(--border);
    }

    .hall-pill {
        display: inline-block;
        padding: 2px 8px;
        border-radius: 20px;
        font-size: .7rem;
        font-weight: 700;
        letter-spacing: .02em;
        white-space: nowrap;
    }

    /* ── CARD CALENDARIO ──────────────────────────── */
    .appt-card {
        font-family: 'ID Grotesk Regular','Segoe UI', system-ui, sans-serif;
        border-radius: 4px;
        padding: 3px 5px;
        overflow: hidden;
        cursor: pointer;
        /* Posizionata assolutamente dentro il contenitore-sala (un solo
           <td> per sala, alto/largo quanto l'intera giornata): top/left/
           width/height reali vengono impostati inline in JS, calcolati
           sui minuti esatti della sessione — non più sullo slot
           arrotondato. Questo evita sia le card "perse" per orari non
           allineati allo step, sia le collisioni tra sessioni vicine
           che capitavano con il vecchio meccanismo a rowspan. */
        position: absolute;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 1px;
        transition: filter .12s, box-shadow .12s, transform .12s;
        transform-origin: top left;
        border-width: 1px 4px 4px 1px;
        border-style: solid;
    }

    .appt-card:hover {
        background: #fff !important;
        filter: none;
        box-shadow: 0 10px 26px rgba(0, 0, 0, .32);
        z-index: 30;
        /* La card ha già l'altezza reale calcolata sulla durata effettiva
           della sessione (vedi renderGridHorizontal/Vertical), quindi qui
           NON tocchiamo più height/min-height: prima si forzava
           "height:auto", che per sessioni con poco testo la faceva
           RIMPICCIOLIRE invece di ingrandirla, cambiando l'area sotto il
           cursore e innescando un continuo hover/unhover (sfarfallio).
           Al posto di cambiare height (dipendente dal contenuto, quindi
           rischioso), si ingrandisce con un fattore di scala FISSO e
           contenuto (non dipende mai dal contenuto né dalla posizione
           del cursore, quindi non può innescare sfarfallio). Lo sfondo
           diventa bianco perché il colore di categoria, scurito, rende
           il testo poco leggibile. */
        overflow: visible;
        transform: scale(1.03);
    }

    .appt-card:hover .appt-title {
        -webkit-line-clamp: unset !important;
        overflow: visible !important;
    }

    .appt-card.selected {
        box-shadow: 0 0 0 2px #0a0e14, 0 2px 8px rgba(149, 19, 93, .25);
        z-index: 6;
        filter: brightness(.91);
    }

    .appt-badge {
        font-family: 'ID Grotesk Regular','Segoe UI', system-ui, sans-serif;
        font-size: var(--appt-badge-font-size);
        letter-spacing: .04em;
        border-radius: 3px;
        padding: 1px 4px;
        color: #fff;
        display: inline-block;
        align-self: flex-start;
        flex-shrink: 0;
        line-height: 1.4;
    }

    .appt-badge-datails {
        font-family: 'ID Grotesk Regular','Segoe UI', system-ui, sans-serif;
        font-size: var(--appt-badge-font-size-details);
        letter-spacing: .04em;
        border-radius: 3px;
        padding: 2px 6px;
        color: #fff;
        display: inline-block;
        align-self: flex-start;
        flex-shrink: 0;
        line-height: 1.4;
    }

    .appt-title {
        font-size: .7rem;
        font-weight: 600;
        line-height: 1.2;
        margin: 0;
        min-width: 0;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    .appt-note {
        font-size: .6rem;
        opacity: .65;
        line-height: 1.2;
        margin: 0;
    }

    /* ── PANNELLO DETTAGLIO ───────────────────────── */
    .detail-header {
        position: sticky;
        top: 0;
        z-index: 10;
        display: flex;
        align-items: stretch;
        min-width: var(--panel-w);
    }

    .detail-color-bar {
        width: 5px;
        flex-shrink: 0;
    }

    .detail-header-content {
        flex: 1;
        padding: .6rem .75rem .5rem;
        background: #fff;
        border-bottom: 1px solid var(--border);
        min-width: 0;
        font-size: .65rem;
    }

    .detail-title-text {
        font-weight: 700;
        font-size: .88rem;
        line-height: 1.3;
        margin: 0;
        padding-right: 28px;
        margin-top: 8px;
    }

    .detail-close {
        /*
        position: absolute;
        top: 6px;
        right: 8px;
         */
        background: white;
        border: 1px solid var(--border);;
        cursor: pointer;
        color: #495057;
        font-size: .85rem;
        line-height: 1;
        padding: 4px 6px;
        border-radius: 4px;
        transition: background .12s;
        z-index: 11;
        margin-right: 20px;
    }

    .detail-close:hover {
        background: rgba(0, 0, 0, .14);
    }

    .detail-inner {
        padding: .75rem 1rem;
        min-width: var(--panel-w);
    }

    .detail-section-label {
        font-size: .62rem;
        font-weight: 700;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: #adb5bd;
        margin-bottom: 4px;
    }

    .detail-row {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: .5rem;
    }

    .detail-row i {
        color: #6c757d;
        font-size: .85rem;
        margin-top: 1px;
        flex-shrink: 0;
    }

    .detail-val {
        font-size: .8rem;
        color: #212529;
        line-height: 1.4;
    }

    /* Speeches nel pannello */
    .speech-card {
        border-left: 3px solid #dee2e6;
        padding: .45rem .6rem;
        margin-bottom: .5rem;
        background: #f8f9fa;
        border-radius: 0 4px 4px 0;
    }

    .speech-card:last-child {
        margin-bottom: 0;
    }

    .speech-time {
        font-size: .62rem;
        font-weight: 700;
        color: #6c757d;
        letter-spacing: .03em;
        margin-bottom: 2px;
    }

    .speech-title {
        font-size: .78rem;
        font-weight: 700;
        color: #212529;
        margin-bottom: 3px;
    }

    .speech-desc {
        font-size: .72rem;
        color: #495057;
        line-height: 1.4;
        margin-bottom: 4px;
    }

    .speech-people {
        font-size: .80rem;
        color: #6c757d;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    .speech-people .badge-person {
        /* background: #e9ecef;*/
        color: #343a40;
        /*border-radius: 10px;*/
        /*padding: 1px 7px;*/
        font-size: .80rem;
    }

    .speech-people .badge-role {
        display: inline-block;
        margin-left: .35rem;
        font-size: .62rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: #6c757d;
        background: #e9ecef;
        border-radius: 10px;
        padding: 1px 7px;
        vertical-align: middle;
    }

    .speech-people .badge-mod {
        background: #fff3cd;
        color: #664d03;
        border-radius: 10px;
        padding: 1px 7px;
        font-size: .62rem;
    }

    /* ── VISTA RICERCA ────────────────────────────── */
    #search-view {
        display: none;
        padding: .75rem 1rem;
        overflow-y: auto;
        height: 100%;
    }

    #search-view.active {
        display: block;
    }

    #calendar-view {
        height: 100%;
    }

    #calendar-view.hidden {
        display: none;
    }

    .search-result-count {
        font-size: .75rem;
        color: #000;
        white-space: nowrap;
    }

    /* Card risultato ricerca */
    .res-card {
        background: #fff;
        border-radius: 6px;
        border-left: 4px solid #dee2e6;
        box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
        padding: .75rem 1rem;
        margin-bottom: .6rem;
        cursor: pointer;
        transition: box-shadow .12s, filter .12s;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .res-card:hover {
        box-shadow: 0 3px 10px rgba(0, 0, 0, .12);
        filter: brightness(.98);
    }

    .res-card.selected {
        box-shadow: 0 0 0 2px #0a0e14;
        filter: brightness(.97);
    }

    .res-card-top {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        flex-wrap: wrap;
    }

    .res-card-title {
        font-size: .83rem;
        font-weight: 700;
        color: #212529;
        flex: 1;
        line-height: 1.3;
    }

    .res-card-meta {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

    .res-card-meta span {
        font-size: .72rem;
        color: #6c757d;
        display: flex;
        align-items: center;
        gap: 3px;
    }

    .res-card-desc {
        font-size: .74rem;
        color: #495057;
        line-height: 1.45;
    }

    .res-no-results {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 3rem 1rem;
        color: #adb5bd;
        gap: .5rem;
    }

    .res-no-results i {
        font-size: 2rem;
    }

    /* ── MISC ─────────────────────────────────────── */
    #sched-loading {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .5rem;
        padding: 3rem;
        color: #6c757d;
        font-size: .85rem;
    }

    .empty-day {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 3rem 1rem;
        color: #adb5bd;
        gap: .5rem;
    }

    .empty-day i {
        font-size: 2rem;
    }

    .legend-dot {
        display: inline-block;
        width: 11px;
        height: 11px;
        border-radius: 3px;
        border-left: 3px solid transparent;
        vertical-align: middle;
    }

    .btn-f11 {
        font-family: 'ID Grotesk Regular', 'Segoe UI', system-ui, sans-serif;
        border-radius: 10px;
        padding: 2px 11px;
        font-size: .8rem;
        font-weight: 600;
        cursor: pointer;
        border: 2px solid transparent;
        transition: opacity .2s, box-shadow .15s, transform .12s;
        user-select: none;
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        border: 1px solid black;
        background-color: white;
        color: black;
    }

    .nascosto {
        display: none !important;
    }


    /* ── Utility / ex stili inline ────────────────── */
    .layout-btn-label { font-size: .7rem; margin-left: 4px; }
    .no-underline { text-decoration: none; }
    .day-date-small { font-weight: 400; font-size: .75rem; }
    .legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
    .slot-minor { opacity: .45; }
    .hl-mark { background: #ffe066; padding: 0 1px; border-radius: 2px; }

    /* Nascosti di default: classe attivata dal JS (show()/hide() altererebbero il display originale) */
    .is-hidden { display: none !important; }

    #btn-back-top {
        position: fixed; bottom: 1.2rem; left: 1.2rem; z-index: 500;
        background: var(--accent); color: #fff; border: none; border-radius: 50%;
        width: 38px; height: 38px; font-size: 1rem; cursor: pointer;
        box-shadow: 0 2px 8px rgba(0, 0, 0, .3); display: none;
        align-items: center; justify-content: center;
    }

    .search-loading {
        display: flex; align-items: center; gap: .5rem;
        padding: 2rem; color: #6c757d; font-size: .85rem;
    }

    /* Vista verticale */
    table#sched thead th.vert-th-corner {
        position: sticky; top: 0; left: 0; z-index: 70;
        width: var(--vert-room-w); min-width: var(--vert-room-w); max-width: var(--vert-room-w);
        background: #f0f2f3; border-right: 2px solid var(--border); border-bottom: 2px solid var(--border);
        height: var(--header-h); text-align: center; vertical-align: middle; padding: 0 4px;
    }
    table#sched thead th.vert-th-slot {
        position: sticky; top: 0; z-index: 50;
        width: var(--vert-slot-w); min-width: var(--vert-slot-w); max-width: var(--vert-slot-w);
        background: #fff; border-bottom: 2px solid var(--border); border-right: 1px solid var(--border);
        height: var(--header-h); text-align: center; vertical-align: middle; padding: 0 2px;
        font-size: .68rem;
    }
    table#sched thead th.vert-th-slot.is-full { font-weight: 700; color: #212529; opacity: 1; }
    table#sched thead th.vert-th-slot.is-half { font-weight: 400; color: #6c757d; opacity: .6; }
    table#sched tbody td.vert-room-cell {
        position: sticky; left: 0; z-index: 20;
        width: var(--vert-room-w); min-width: var(--vert-room-w); max-width: var(--vert-room-w);
        height: var(--vert-row-h);
        background: #f8f9fa; border-right: 2px solid var(--border); border-bottom: 1px solid var(--border-d);
        vertical-align: middle; padding: 4px 6px; white-space: normal; word-break: break-word; text-align: center;
    }
    .hall-pill-wrap { white-space: normal; word-break: break-word; display: inline-block; line-height: 1.3; }
    table#sched tbody td.vert-slot-cell { padding: 0; border-bottom: 1px solid var(--border-d); position: relative; overflow: hidden; }
    table#sched tbody td.slot-cell-flush { padding: 0; }
    .appt-card-h { flex-direction: row; align-items: flex-start; gap: 5px; }
    .appt-title-h { -webkit-line-clamp: 2; min-width: 0; flex: 1 1 auto; }

    /* Pannello dettaglio */
    .detail-row-top { align-items: flex-start; }
    .detail-row-top > i { margin-top: 2px; }
    .detail-row-flush { margin: 0; }
    .detail-val-note { font-style: italic; }
    .role-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; opacity: .65; }
    .detail-sep { margin: .5rem 0; border-color: var(--border); }
    .detail-desc { font-size: .78rem; color: #343a40; line-height: 1.55; margin: 0; }
    .speech-time i { font-size: .58rem; }
