/*
 * Testata del workspace del libro.
 * La view Play contiene ancora CSS inline legacy: questi override sono volutamente
 * scoped e !important per garantire una geometria stabile senza toccare l'header globale.
 */
body.iwrite-body .nb-play .nb-top {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
    align-items: stretch !important;
    padding: 20px 22px !important;
    overflow: visible !important;
}

body.iwrite-body .nb-play .nb-top__title {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    width: 100% !important;
    padding: 0 0 15px !important;
    border-bottom: 1px solid rgba(201, 164, 95, .12) !important;
}

body.iwrite-body .nb-play .nb-top__title h1 {
    order: 1 !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    color: #f3f0e8 !important;
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: clamp(1.65rem, 2.6vw, 2.45rem) !important;
    font-weight: 700 !important;
    line-height: 1.06 !important;
    letter-spacing: -.025em !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere !important;
}

body.iwrite-body .nb-play .nb-top__title small {
    order: 2 !important;
    display: block !important;
    margin: 7px 0 0 !important;
    color: #c6a45f !important;
    font-size: .68rem !important;
    font-weight: 850 !important;
    line-height: 1.2 !important;
    letter-spacing: .16em !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
}

body.iwrite-body .nb-play .nb-top__controls {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 9px !important;
    row-gap: 10px !important;
    flex-wrap: wrap !important;
}

body.iwrite-body .nb-play .nb-top__controls > * {
    min-width: 0 !important;
}

body.iwrite-body .nb-play .nb-top__controls > form {
    flex: 1 1 260px !important;
    width: auto !important;
    min-width: 220px !important;
    max-width: 360px !important;
}

body.iwrite-body .nb-play .nb-top select {
    width: 100% !important;
    max-width: none !important;
}

body.iwrite-body .nb-play .nb-status {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 37px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
}

body.iwrite-body .nb-play .nb-voice-controls {
    flex: 0 0 auto !important;
    max-width: 100% !important;
}

body.iwrite-body .nb-play .nb-link,
body.iwrite-body .nb-play .nb-voice-btn {
    white-space: nowrap !important;
}

@media (max-width: 760px) {
    body.iwrite-body .nb-play .nb-top {
        padding: 15px !important;
        gap: 13px !important;
    }

    body.iwrite-body .nb-play .nb-top__title {
        padding-bottom: 12px !important;
    }

    body.iwrite-body .nb-play .nb-top__title h1 {
        font-size: clamp(1.45rem, 7vw, 2rem) !important;
    }

    body.iwrite-body .nb-play .nb-top__controls {
        align-items: stretch !important;
    }

    body.iwrite-body .nb-play .nb-top__controls > form {
        flex-basis: 100% !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: none !important;
    }

    body.iwrite-body .nb-play .nb-voice-controls {
        width: 100% !important;
    }

    body.iwrite-body .nb-play .nb-voice-btn {
        flex: 1 1 0 !important;
        justify-content: center !important;
    }
}
