/* Уплотнение основного расписания */
.result-panel {
    padding: 14px 16px;
}

.result-top {
    gap: 8px;
    margin-bottom: 10px;
}

.schedule-header {
    font-size: 16px;
}

.day {
    margin-top: 14px;
}

.day h2 {
    font-size: 20px;
    margin: 10px 0 10px;
}

.card {
    padding: 12px 14px;
    margin: 10px 0;
    border-radius: 16px;
    min-height: 0;
    height: auto;
}

.card-main {
    gap: 10px;
    align-items: flex-start;
    min-height: 0;
}

.card-content {
    min-height: 0;
}

.number {
    font-size: 18px;
    line-height: 1.15;
}

.time {
    font-size: 19px;
    line-height: 1.15;
    margin-bottom: 2px;
}

.place {
    font-size: 17px;
    line-height: 1.15;
    margin-bottom: 6px;
}

.title {
    font-size: 17px;
    line-height: 1.22;
    margin-top: 4px;
}

details {
    margin-top: 8px;
    padding-top: 8px;
    min-height: 0;
}

details summary {
    font-size: 17px;
    line-height: 1.15;
    padding: 0;
    margin: 0 0 6px;
}

.details-content {
    margin-top: 6px;
    font-size: 15.5px;
    min-height: 0;
}

.details-content .notes {
    padding: 8px 10px;
    margin: 0 0 8px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.2;
}

/* ВАЖНО: больше не используем grid-row: span 30 */
.details-content .categories {
    display: block;
    min-height: 0;
}

.details-columns {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    width: 100%;
}

.details-left-column {
    flex: 1 1 auto;
    min-width: 0;
}

.details-right-column {
    flex: 0 0 min(46%, 360px);
    min-width: 220px;
}

.details-content .category {
    font-size: 15.5px;
    line-height: 1.18;
    margin: 0 0 4px;
}

.details-content .category strong {
    font-weight: 800;
}

.details-content .category em {
    line-height: 1.18;
}

.details-content .soloists-category {
    padding: 7px 9px;
    border-radius: 10px;
    background: #f7f9ff;
    border: 1px solid #dbe7ff;
    min-height: 0;
    height: auto;
}

.details-content .other-category {
    padding: 0;
}

.subscriber-highlight {
    font-weight: 900;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    background: #fff3bf;
    border-radius: 5px;
    padding: 0 2px;
    line-height: 1;
}

/* Верхние независимые блоки */
#top-action-dock {
    max-width: 860px;
    margin: 0 auto 18px;
    padding: 0 14px;
}

#top-action-dock .notification-card,
#top-action-dock .install-card {
    width: 100%;
    margin: 0 0 14px;
}

#notification-dock .notification-card {
    width: 100%;
    margin-top: 16px;
}

/* Мобильная версия */
@media (max-width: 640px) {
    .result-panel {
        padding: 12px;
    }

    .card {
        padding: 11px 12px;
        margin: 9px 0;
    }

    .time {
        font-size: 18px;
    }

    .place,
    .title,
    details summary {
        font-size: 16px;
    }

    .details-content .category {
        font-size: 15px;
    }

    .details-columns {
        display: block;
    }

    .details-right-column {
        min-width: 0;
        width: 100%;
        margin-top: 6px;
    }
}

/* Печать раскрытых details */
@media print {
    .details-columns {
        display: flex !important;
        gap: 3mm !important;
        align-items: flex-start !important;
    }

    .details-left-column {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    .details-right-column {
        flex: 0 0 45% !important;
        min-width: 0 !important;
    }

    .details-content .soloists-category {
        background: transparent !important;
        border: 1px solid #cccccc !important;
        border-radius: 2mm !important;
        padding: 1.2mm !important;
    }

    .subscriber-highlight {
        background: transparent !important;
        font-weight: 900 !important;
        text-decoration: underline !important;
        text-decoration-thickness: 1px !important;
        text-underline-offset: 2px !important;
        padding: 0 !important;
    }
}

/* Anti-flicker: пока JS раскладывает блоки, не показываем прыгающую страницу */
html.js-layout-loading body {
    opacity: 0;
}

html.js-layout-ready body {
    opacity: 1;
    transition: opacity .12s ease;
}
