/* font-scale.css — мягкое увеличение основного текста + компактное меню
   Подключается последним в base.html (после других CSS).
   Ревертабельно: закомментировать <link> в base.html.

   Подход:
   - Основной текст (body, p, li, td, dd, dt) → 18px (был 16px).
   - Заголовки h1-h6, .btn, input → НЕ ТРОГАЕМ (как в теме).
   - Меню (.menu-button): компактные кнопки, гарантированно влезают в один ряд.
     На десктопе — иконка + текст, на мобильном — только иконка. */

body {
    font-size: 18px !important;
    line-height: 1.55;
}

p { font-size: 18px !important; }
li { font-size: 18px !important; }
td { font-size: 18px !important; }
dd, dt { font-size: 18px !important; }

/* === Иконка меню (эмодзи/иконка) === */
.menu-icon {
    display: inline-block;
    line-height: 1;
}
.menu-label {
    display: none !important;   /* На ВСЕХ экранах показываем только иконку */
    margin-left: 4px;
}

/* === Компактные кнопки меню — влезают в один ряд === */
.menu {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
.menu::-webkit-scrollbar { width: 0; height: 0; background: transparent; }

.menu-button {
    font-size: 22px !important;       /* иконка-эмодзи */
    padding: 6px 0 !important;        /* без горизонтального padding — квадратная кнопка */
    flex: 1 1 0 !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1 !important;   /* квадрат */
    max-width: 56px !important;       /* не шире 56px на десктопе */
    margin: 4px auto !important;
    line-height: 1 !important;
}
.menu-icon { font-size: 22px !important; }

.menu-second-button {
    font-size: 13px !important;
    padding: 8px 10px !important;
    margin: 0 3px !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* === На мелких экранах: компактнее === */
@media (max-width: 768px) {
    .menu-button {
        font-size: 20px !important;   /* размер иконки-эмодзи */
        padding: 4px 0 !important;
        flex: 1 1 0 !important;
        min-width: 0 !important;
        max-width: none !important;   /* на мобильном — растягиваем по ширине */
        margin: 2px 0 !important;
        aspect-ratio: auto !important;/* убираем квадрат — высота по контенту */
        height: 36px !important;      /* фиксированная компактная высота */
        min-height: 36px !important;
        line-height: 1 !important;
    }
    .menu-icon { font-size: 22px !important; }
    .menu-second-button {
        font-size: 11px !important;
        padding: 5px 6px !important;
    }
    body, p, li, td, dd, dt { font-size: 17px !important; }
}

@media (max-width: 480px) {
    .menu-button {
        font-size: 18px !important;
        padding: 3px 0 !important;
        margin: 1px 0 !important;
        height: 32px !important;
        min-height: 32px !important;
    }
    .menu-icon { font-size: 20px !important; }
    .menu-second-button {
        font-size: 10px !important;
        padding: 3px 5px !important;
    }
    body, p, li, td, dd, dt { font-size: 16px !important; }
}