/* =========================================
   N-DRIVE: DESKTOP DASHBOARD (min-width: 960px)
========================================= */

/* Показываем десктопные блоки и убираем мобильный HUD / нижнюю панель */
.desktop-only {
    display: block;
}

.cyber-hud,
.bottom-nav,
#view-home .home-header {
    display: none;
}

/* Общая раскладка: фиксированный сайдбар слева + прокручиваемый контент справа */
body {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    padding: 0 0 16px 316px; /* 16px снизу — ровно вровень с bottom: 16px у сайдбара */
    box-sizing: border-box;
}

/* --- ЛЕВЫЙ САЙДБАР --- */
.desktop-sidebar {
    position: fixed;
    top: 16px;
    left: 16px;
    bottom: 16px;
    width: 284px;
    padding: 18px 16px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-sizing: border-box;
    z-index: 40;
    overflow-y: auto;
}

.sb-brand {
    display: flex;
    justify-content: center;
    padding: 0 0 4px;
    width: 100%;
}

.sb-logo {
    width: 100%;
    max-width: 100%;
    max-height: 92px;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Карточка пилота в сайдбаре */
.sb-profile-box {
    padding: 12px;
    border-radius: 14px;
    background: rgba(128, 128, 128, 0.08);
    border: 1px solid rgba(128, 128, 128, 0.18);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sb-profile-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sb-avatar-link {
    position: relative;
    display: block;
    flex-shrink: 0;
}

.sb-avatar-link .avatar-img {
    width: 46px;
    height: 46px;
}

.sb-pilot-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sb-pilot-name {
    color: var(--text-main);
    font-weight: 800;
    font-size: 0.92rem;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sb-pilot-name:hover {
    color: var(--neon-cyan);
}
/* Редактируемое имя пилота в сайдбаре */
.sb-pilot-name-input {
    width: 100%;
    font-size: 0.84rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 2px 4px;
    margin-left: -4px;
    color: var(--text-main);
    font-family: inherit;
    font-weight: 800;
    font-size: 0.92rem;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.sb-pilot-name-input:hover,
.sb-pilot-name-input:focus {
    background: rgba(128, 128, 128, 0.12);
    border-color: var(--neon-cyan);
}
/* Мини-сетка статистики 2x2 в сайдбаре */
.sb-stats-mini {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding-top: 8px;
    border-top: 1px dashed rgba(128, 128, 128, 0.22);
}

.sb-stat-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 4px;
    border-radius: 8px;
    background: rgba(128, 128, 128, 0.08);
    text-align: center;
}

.sb-stat-cell b {
    font-size: 0.92rem;
    font-weight: 900;
    color: var(--neon-cyan);
    line-height: 1.1;
}

.sb-stat-cell span {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.sb-coins-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    font-size: 0.88rem;
    color: var(--neon-gold);
}

.sb-coins-row .coin-icon {
    width: 17px;
    height: 17px;
}

.sb-settings-btn {
    flex-shrink: 0;
    font-size: 1.25rem;
    padding: 4px 6px;
}

.sb-xp-wrap {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sb-xp-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 700;
}

.sb-xp-track {
    width: 100%;
    height: 7px;
    border-radius: 999px;
    background: rgba(128, 128, 128, 0.22);
    overflow: hidden;
}

.sb-xp-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-gold));
    transition: width 0.35s ease;
}

/* Навигация в сайдбаре */
.sb-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sb-nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.sb-nav-btn:hover {
    background: rgba(128, 128, 128, 0.10);
}

.sb-nav-btn.active {
    background: rgba(128, 128, 128, 0.14);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

/* Мини-график личной активности */
.sb-activity-box {
    margin-top: auto;
    padding: 12px;
    border-radius: 14px;
    background: rgba(128, 128, 128, 0.08);
    border: 1px solid rgba(128, 128, 128, 0.18);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sb-activity-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.sb-section-title {
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
}

.sb-today-pill {
    font-size: 0.74rem;
    color: var(--neon-green);
    font-weight: 700;
}

.sb-week-chart {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    align-items: end;
    gap: 6px;
    height: 62px;
    padding-top: 6px;
}

.sb-bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    height: 100%;
}

.sb-bar-track {
    width: 100%;
    max-width: 16px;
    height: 44px;
    border-radius: 6px;
    background: rgba(128, 128, 128, 0.16);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.sb-bar-fill {
    width: 100%;
    min-height: 3px;
    border-radius: 6px;
    background: var(--neon-cyan);
    opacity: 0.75;
    transition: height 0.3s ease;
}

.sb-bar-col.is-today .sb-bar-fill {
    background: var(--neon-green);
    opacity: 1;
}

.sb-bar-day {
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--text-muted);
}

.sb-bar-col.is-today .sb-bar-day {
    color: var(--text-main);
}

.sb-activity-foot {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding-top: 6px;
    border-top: 1px dashed rgba(128, 128, 128, 0.22);
}

.sb-activity-foot b {
    color: var(--text-main);
}

/* --- ОСНОВНАЯ ОБЛАСТЬ СПРАВА --- */
.app-content {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    max-width: 980px;
    width: calc(100% - 40px);
    margin: 0 auto;
    padding: 16px 0 0;
    height: auto;
    overflow: visible;
    box-sizing: border-box;
}

/* --- ГЛАВНЫЙ ЭКРАН: 6 ПЛИТОК --- */
/* Главный экран тоже на всю высоту, чтобы развести 6 плиток и виджеты */
#view-home:not(.hidden) {
    flex: 1;
    display: flex;
    flex-direction: column;
}
#view-home .main-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

#view-home .tile-train {
    grid-column: 1 / 3;
    grid-row: 1;
}

#view-home .tile-exam {
    grid-column: 3 / 5;
    grid-row: 1;
}

#view-home .tile-train,
#view-home .tile-exam {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 18px;
    padding: 20px 24px;
    min-height: 118px;
}

#view-home .tile-train .tile-icon,
#view-home .tile-exam .tile-icon {
    width: 68px;
    height: 68px;
    flex-shrink: 0;
}

#view-home .tile-train h3,
#view-home .tile-exam h3 {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

#view-home .tile-list { grid-column: 1; grid-row: 2; }
#view-home .tile-topics { grid-column: 2; grid-row: 2; }
#view-home .tile-signs { grid-column: 3; grid-row: 2; }
#view-home .tile-penalties { grid-column: 4; grid-row: 2; }

#view-home .tile-list,
#view-home .tile-topics,
#view-home .tile-signs,
#view-home .tile-penalties {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    padding: 18px 14px;
    min-height: 148px;
}

#view-home .tile-list .tile-icon,
#view-home .tile-topics .tile-icon,
#view-home .tile-signs .tile-icon,
#view-home .tile-penalties .tile-icon {
    width: 58px;
    height: 58px;
}

/* --- ВИДЖЕТЫ ПОД ПЛИТКАМИ --- */
/* Виджеты (Сложные билеты + Топ недели) уезжают вниз к футеру */
.desktop-widgets-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.dash-widget {
    padding: 12px 14px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-widget-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.dash-widget-head h3 {
    margin: 0;
    font-size: 0.96rem;
    font-weight: 800;
    color: var(--text-main);
}

.dash-widget-tag {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(128, 128, 128, 0.12);
}

/* Сложные билеты дня */
.hard-tickets-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hard-ticket-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(128, 128, 128, 0.18);
    background: rgba(128, 128, 128, 0.06);
    color: var(--text-main);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.15s ease;
}

.hard-ticket-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 5px 9px;
    border-radius: 8px;
    border: 1px solid rgba(128, 128, 128, 0.16);
    background: rgba(128, 128, 128, 0.06);
    color: var(--text-main);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.16s ease, transform 0.14s ease;
}

.hard-ticket-row:hover {
    border-color: var(--neon-red);
    transform: translateX(2px);
}

.hard-ticket-info {
    display: flex;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
    flex: 1;
}

.hard-ticket-num {
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
    flex-shrink: 0;
}

.hard-ticket-topic {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hard-ticket-rate {
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--neon-red);
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(239, 68, 68, 0.12);
}

/* Топ учеников недели */
.weekly-top-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.top-user-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 9px;
    border-radius: 8px;
    background: rgba(128, 128, 128, 0.06);
    border: 1px solid transparent;
    font-size: 0.78rem;
}

.top-user-row.is-me {
    border-color: var(--neon-cyan);
    background: rgba(128, 128, 128, 0.13);
}

.top-rank {
    width: 20px;
    font-weight: 900;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

.top-user-row:nth-child(1) .top-rank { color: var(--neon-gold); }
/* Промокод и сброс в модалке настроек */
.settings-promo-row {
    display: flex;
    gap: 8px;
}

.settings-promo-input {
    flex: 1;
    min-width: 0;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid rgba(128, 128, 128, 0.3);
    background: rgba(128, 128, 128, 0.1);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.82rem;
    text-transform: uppercase;
    outline: none;
}

.settings-promo-input:focus {
    border-color: var(--neon-cyan);
}

.settings-promo-msg {
    font-size: 0.76rem;
    font-weight: 700;
    text-align: center;
    min-height: 16px;
    margin: 4px 0 8px;
}

.settings-reset-btn {
    width: 100%;
    justify-content: center;
    border-color: rgba(239, 68, 68, 0.45);
    color: var(--neon-red);
    font-size: 0.8rem;
}
.top-name {
    flex: 1;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-score {
    font-weight: 800;
    color: var(--neon-cyan);
    font-size: 0.74rem;
}

/* --- ФУТЕР --- */
.main-footer {
    flex-shrink: 0;
    max-width: 980px;
    width: calc(100% - 40px);
    margin: 14px auto 0;
    padding: 10px 0 0;
}

/* =========================================
   ЭКРАН ВОПРОСА НА ПК (КАРТИНКА СВЕРХУ)
========================================= */
#view-tickets:not(.hidden) {
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#view-tickets .question-header,
#view-tickets #active-mode-banner {
    margin-bottom: 0;
}

#view-tickets #question-image-container {
    width: 100%;
    margin: 0;
}

#view-tickets .q-img {
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
}

#view-tickets .question-body {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.45;
}

#view-tickets #answers-list {
    margin: 0;
    gap: 10px;
}

#view-tickets #next-btn {
    margin-top: 2px;
}
.sb-nav-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.sb-nav-svg {
    padding: 2px;
    box-sizing: border-box;
    opacity: 0.9;
}

.sb-nav-btn[data-target="home"] .sb-nav-icon {
    filter: drop-shadow(0 0 6px rgba(0, 243, 255, 0.55));
}

.sb-nav-btn[data-target="tickets"] .sb-nav-icon {
    filter: drop-shadow(0 0 7px rgba(2, 132, 199, 0.65));
}

.sb-nav-btn[data-target="topics"] .sb-nav-icon {
    filter: drop-shadow(0 0 7px rgba(249, 115, 22, 0.65));
}

.sb-nav-btn[data-target="signs"] .sb-nav-icon {
    filter: drop-shadow(0 0 7px rgba(236, 72, 153, 0.65));
}

.sb-nav-btn[data-target="penalties"] .sb-nav-icon {
    filter: drop-shadow(0 0 7px rgba(239, 68, 68, 0.65));
}

.sb-nav-btn:hover .sb-nav-icon,
.sb-nav-btn.active .sb-nav-icon {
    transform: scale(1.12);
    filter: drop-shadow(0 0 10px var(--neon-cyan));
}
/* Укрупнённая шапка экрана вопроса на ПК */
#view-tickets .question-header {
    align-items: center;
    padding: 4px 0 6px;
}

#view-tickets #question-title {
    font-size: 1.5rem;
    line-height: 1.2;
}

#view-tickets #question-topic {
    font-size: 0.96rem;
    margin-top: 3px;
}

#view-tickets .header-controls {
    display: flex;
    align-items: center;
    gap: 18px;
}

#view-tickets #show-explanation-btn {
    padding: 10px 20px;
    font-size: 0.95rem;
    border-radius: 12px;
}

#view-tickets .instrument-gauge {
    transform: scale(1.28);
    transform-origin: right center;
    margin-left: 14px;
}
/* =========================================
   ВЕРХНЯЯ ПАНЕЛЬ НА ГЛАВНОЙ (ПК)
========================================= */
.home-desktop-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 20px;
    border-radius: 16px;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.hdb-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.hdb-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hdb-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1.2;
}

.hdb-fresh-badge {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: var(--neon-green);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
}

.hdb-subtitle {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Метрики: цель дня и % билетов */
.hdb-metrics {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-shrink: 0;
}

.hdb-metric {
    min-width: 165px;
    width: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hdb-metric-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 700;
    white-space: nowrap;
}

.hdb-metric-head span,
.hdb-metric-head b {
    white-space: nowrap;
}

.hdb-bar-track {
    width: 100%;
    height: 7px;
    border-radius: 999px;
    background: rgba(128, 128, 128, 0.2);
    overflow: hidden;
}

.hdb-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.35s ease;
}

.hdb-bar-fill.is-goal {
    background: linear-gradient(90deg, var(--neon-gold), var(--neon-green));
}

.hdb-bar-fill.is-progress {
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
}

/* Контакты: Почта, VK, MAX */
.hdb-contacts {
    display: flex;
    align-items: center;
    gap: 7px;
    padding-left: 16px;
    border-left: 1px solid rgba(128, 128, 128, 0.22);
    flex-shrink: 0;
}

.hdb-social-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(128, 128, 128, 0.1);
    border: 1px solid rgba(128, 128, 128, 0.22);
    color: var(--text-main);
    text-decoration: none;
    transition: border-color 0.18s ease, color 0.18s ease, transform 0.15s ease;
}

.hdb-social-btn svg {
    width: 18px;
    height: 18px;
}

.hdb-social-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    transform: translateY(-1px);
}

.hdb-max-btn {
    width: auto;
    padding: 0 9px;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.5px;
}
/* =========================================
   СПРАВОЧНИКИ НА ПК (ЗНАКИ И ШТРАФЫ)
========================================= */
.profile-container {
    max-width: 980px;
    width: calc(100% - 40px);
    margin: 0 auto;
    padding: 18px 0 28px;
    box-sizing: border-box;
}

.profile-header-bar {
    padding: 14px 20px;
    margin-bottom: 18px;
}

.profile-header-bar .cyber-btn-back-link {
    display: none;
}

.signs-grid {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 14px;
}
/* =========================================
   ОБНОВЛЕНИЯ: КНОПКА НАСТРОЕК, АКТИВНОСТЬ, ЗАГОЛОВОК И ШИРОКИЕ НАСТРОЙКИ
========================================= */

/* Кнопка настроек в левом меню */
.sb-settings-nav-btn {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px dashed rgba(128, 128, 128, 0.25);
    border-radius: 10px;
}

.sb-nav-gear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

/* Блок «Активность сегодня» + недельный график */
.sb-activity-box {
    gap: 8px;
    padding: 11px 12px;
}

.sb-today-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sb-today-tickets {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
}

.sb-t-pass {
    color: var(--neon-green);
}

.sb-t-fail {
    color: var(--neon-red);
}

.sb-week-divider {
    height: 1px;
    border-top: 1px dashed rgba(128, 128, 128, 0.22);
    margin: 2px 0;
}

.sb-week-total {
    font-size: 0.73rem;
    color: var(--text-muted);
    font-weight: 700;
}

.sb-week-total b {
    color: var(--text-main);
}

.sb-week-chart {
    height: 52px;
    padding-top: 2px;
}

.sb-bar-track {
    height: 36px;
}

/* Заголовок над нижними табличками */
.desktop-widgets-section {
    margin-top: auto;
    padding-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dash-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 4px;
}

.dash-section-header h2 {
    margin: 0;
    font-size: 0.96rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-main);
}

.dash-section-header span {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Широкая модалка настроек на ПК (без скролла) */
#settings-modal .cyber-modal-content {
    max-width: 620px;
    width: 92%;
    padding: 22px 26px;
    max-height: 92vh;
    overflow-y: auto;
}

#settings-modal #theme-cards-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

#settings-modal .theme-card-btn {
    margin: 0;
    height: 100%;
    box-sizing: border-box;
}
.sb-pilot-meta {
    gap: 1px;
}

.sb-pilot-rank {
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--neon-cyan);
    line-height: 1.1;
}
/* Широкое окно «Разбор» (Пояснение ГИБДД) на ПК */
#explanation-modal .cyber-modal-content {
    max-width: 680px;
    width: 92%;
    padding: 24px 28px;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
}

#explanation-modal #explanation-text {
    overflow-y: auto;
    font-size: 0.96rem;
    line-height: 1.62;
    padding-right: 6px;
}

#explanation-modal .cyber-ref-card {
    max-width: 100%;
    box-sizing: border-box;
}