/* ==========================================================================
   Shanti — нижняя панель навигации (shm) — оформление, версия 1.2
   Работает в паре с shanti-menu.js (классы .shm-*).

   Разделы:
     0. Переменные          5. Лист «Зв'язок»
     1. Видимость, отступы  6. Лист пустой корзины
     2. Плашка и вкладки    7. Подсказка над «Кошиком»
     3. Листы — общее       8. Шапка сайта, поиск, «наверх»
     4. Лист «Каталог»      9. Движение, узкие экраны

   Цвета — с сайта (user.css шаблона: --shanti-*), а не приблизительные из
   макета: золото #dde426, янтарь #fbb53a, бордовый #8a081d.
   ВСЁ привязано к body.shm-active — без скрипта сайт выглядит как раньше.
   ========================================================================== */

:root {
    /* --- Геометрия ---------------------------------------------------- */
    --shm-bar-h:        62px;          /* дублирует BAR_HEIGHT из JS        */
    --shm-safe:         env(safe-area-inset-bottom, 0px);
    /* «Подъём» над плашкой: где кончается плашка и начинаются листы,
       подсказка, «наверх», отступ страницы. На компьютере плашка парит
       над краем экрана — значение переопределено в разделе 10. */
    --shm-lift:         calc(var(--shm-bar-h) + var(--shm-safe));
    --shm-radius:       20px;
    --shm-pad:          18px;
    --shm-tap:          48px;          /* минимальная высота пункта         */

    /* --- Плашка: тёмный бордовый ------------------------------------- */
    --shm-bar-bg:       #6e0717;
    --shm-bar-edge:     rgba(251, 181, 58, .40);   /* как кромка «липкой» шапки */
    --shm-tab:          rgba(245, 236, 224, .78);  /* как силуэты мессенджеров в подвале */
    --shm-tab-on:       var(--shanti-gold, #dde426);
    --shm-tab-pill:     rgba(221, 228, 38, .14);
    --shm-badge-bg:     var(--shanti-gold, #dde426);
    --shm-badge-fg:     #5a0512;

    /* --- Листы: светлые, «пергамент» --------------------------------- */
    --shm-sheet-bg:     #fbf3e4;
    --shm-sheet-text:   #2b1d14;
    --shm-sheet-text-2: #6b5443;
    --shm-sheet-line:   #ecdcc3;
    --shm-sheet-hover:  #f5e6cc;
    --shm-handle:       #dcc7a6;
    --shm-maroon:       var(--shanti-maroon, #8a081d);
    --shm-cur-bg:       #f6dfe2;

    /* --- Подсказка: тёмная с золотой рамкой -------------------------- */
    --shm-hint-bg:      #1e1512;
    --shm-hint-text:    #f5ece0;
    --shm-hint-edge:    var(--shanti-amber, #fbb53a);

    --shm-overlay:      rgba(30, 8, 12, .45);

    /* --- Мессенджеры: фирменные цвета ------------------------------- */
    --shm-telegram:     #24a1de;
    --shm-viber:        #7360f2;
    --shm-whatsapp:     #25d366;

    --shm-font:         var(--font-family-base, 'Lora', serif);
    --shm-font-head:    var(--font-family-headings, 'Philosopher', sans-serif);
}


/* ==========================================================================
   1. ВИДИМОСТЬ И ОТСТУПЫ
   ========================================================================== */
.shm-bar, .shm-sheet, .shm-overlay, .shm-hint { display: none; }

body.shm-active .shm-bar { display: flex; }
body.shm-active .shm-overlay,
body.shm-active .shm-sheet:not([hidden]),
body.shm-active .shm-hint:not([hidden]) { display: block; }

/* место под плашку: подвал и конец страницы не прячутся под ней */
body.shm-active { padding-bottom: var(--shm-lift); }

/* меню-источник каталога (CATALOG_SOURCE) не показывается нигде: класс
   ставит скрипт, а без скрипта модуль виден как обычное меню */
.shm-source { display: none !important; }

.shm-bar, .shm-bar *,
.shm-sheet, .shm-sheet *,
.shm-hint, .shm-hint * { box-sizing: border-box; text-shadow: none; }

.shm-ic { display: inline-flex; flex: 0 0 auto; width: 24px; height: 24px; }
.shm-ic svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.shm-ic svg .shm-fill { fill: currentColor; stroke: none; }


/* ==========================================================================
   2. ПЛАШКА И ВКЛАДКИ
   ========================================================================== */
.shm-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10020;
    height: calc(var(--shm-bar-h) + var(--shm-safe));
    padding: 0 4px var(--shm-safe);
    align-items: stretch;
    background: var(--shm-bar-bg);
    box-shadow: inset 0 1px 0 var(--shm-bar-edge), 0 -8px 22px rgba(0, 0, 0, .28);
    font-family: var(--shm-font);
    -webkit-tap-highlight-color: transparent;
    transition: transform .22s ease;
}

.shm-tab {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin: 0;
    padding: 6px 2px 5px;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--shm-tab) !important;         /* user.css красит все ссылки !important */
    font: inherit;
    text-decoration: none !important;
    cursor: pointer;
}
.shm-tab-ic {
    position: relative;
    width: 44px;
    height: 30px;
    padding: 3px 10px;
    border-radius: 15px;
    transition: background-color .18s ease, color .18s ease;
}
.shm-tab-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: .01em;
}

/* текущая страница / открытый лист */
.shm-tab.shm-here,
.shm-tab.shm-open { color: var(--shm-tab-on) !important; }
.shm-tab.shm-here .shm-tab-ic,
.shm-tab.shm-open .shm-tab-ic { background: var(--shm-tab-pill); }
.shm-tab.shm-here .shm-tab-label,
.shm-tab.shm-open .shm-tab-label { font-weight: 700; }

.shm-tab:focus-visible { outline: 2px solid var(--shm-tab-on); outline-offset: -4px; border-radius: 12px; }
@media (hover: hover) {
    .shm-tab:hover { color: var(--shanti-amber, #fbb53a) !important; }
}

/* счётчик корзины */
.shm-badge {
    position: absolute;
    top: -3px;
    right: 1px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--shm-badge-bg);
    color: var(--shm-badge-fg);
    box-shadow: 0 0 0 2px var(--shm-bar-bg);
    font: 700 11px/19px system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    text-align: center;
}
.shm-badge[hidden] { display: none; }
.shm-tab-cart.shm-has-items { color: var(--shanti-amber, #fbb53a) !important; }
.shm-tab-cart.shm-bump .shm-tab-ic { animation: shm-bump .5s ease; }
@keyframes shm-bump {
    0%, 100% { transform: scale(1); }
    35%      { transform: scale(1.18) rotate(-6deg); }
    65%      { transform: scale(.96) rotate(3deg); }
}

/* клавиатура открыта — плашка уезжает вниз */
body.shm-typing .shm-bar { transform: translateY(110%); }


/* ==========================================================================
   3. ЛИСТЫ — ОБЩЕЕ
   ========================================================================== */
.shm-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--shm-overlay);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility 0s linear .22s;
}
body.shm-sheet-open .shm-overlay {
    opacity: 1;
    visibility: visible;
    transition: opacity .22s ease, visibility 0s;
}

.shm-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--shm-lift);
    z-index: 10010;
    max-height: calc(100vh - var(--shm-lift) - 40px);
    max-height: calc(100dvh - var(--shm-lift) - 40px);
    display: flex;
    flex-direction: column;
    background: var(--shm-sheet-bg);
    color: var(--shm-sheet-text);
    border-radius: var(--shm-radius) var(--shm-radius) 0 0;
    box-shadow: 0 -14px 34px rgba(0, 0, 0, .30);
    font-family: var(--shm-font);
    font-size: 16px;
    line-height: 1.4;
    transform: translateY(calc(100% + var(--shm-lift) + 20px));
    transition: transform .26s cubic-bezier(.3, .7, .2, 1);
}
body.shm-active .shm-sheet:not([hidden]) { display: flex; }
.shm-sheet.shm-visible { transform: translateY(0); }
.shm-sheet:focus { outline: none; }

/* «ручка» */
.shm-sheet::before {
    content: "";
    flex: 0 0 auto;
    width: 40px;
    height: 4px;
    margin: 8px auto 0;
    border-radius: 2px;
    background: var(--shm-handle);
}

.shm-sheet-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 8px 6px var(--shm-pad);
}
.shm-sheet-title {
    margin: 0;
    color: var(--shm-maroon) !important;
    font-family: var(--shm-font-head);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: none;
}
.shm-sheet-close {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--shm-sheet-text-2);
    cursor: pointer;
}
.shm-sheet-close .shm-ic { width: 22px; height: 22px; }
.shm-sheet-close:active { background: var(--shm-sheet-hover); }
.shm-sheet-close:focus-visible { outline: 2px solid var(--shm-maroon); outline-offset: -2px; }

.shm-sheet-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 2px var(--shm-pad) 20px;
}

.shm-sheet p { margin: 0; color: inherit; }
.shm-sheet a { text-decoration: none !important; }

/* кнопки */
.shm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--shm-tap);
    margin: 0;
    padding: 10px 18px;
    border: 1.5px solid transparent;
    border-radius: 14px;
    background: none;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .15s ease, border-color .15s ease, filter .15s ease;
}
.shm-btn-primary {
    background: var(--shm-maroon);
    color: var(--shanti-amber, #fbb53a) !important;
}
.shm-btn-primary:active { filter: brightness(1.15); }
.shm-btn-ghost {
    border-color: #d9c09b;
    background: #fffaf1;
    color: var(--shm-maroon) !important;
}
.shm-btn-ghost:active { background: var(--shm-sheet-hover); }
.shm-btn:focus-visible { outline: 3px solid var(--shm-maroon); outline-offset: 2px; }


/* ==========================================================================
   4. ЛИСТ «КАТАЛОГ»
   ========================================================================== */
.shm-cat {
    margin: 0 0 4px;
    padding: 0;
    list-style: none;
    background: #fffaf1;
    border: 1px solid var(--shm-sheet-line);
    border-radius: 14px;
    overflow: hidden;
}
.shm-cat-item { margin: 0; padding: 0; list-style: none; }
.shm-cat-item::marker { content: none; }
.shm-cat-item + .shm-cat-item { border-top: 1px solid var(--shm-sheet-line); }

.shm-cat-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: var(--shm-tap);
    padding: 11px 12px 11px 16px;
    color: var(--shm-sheet-text) !important;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    -webkit-tap-highlight-color: transparent;
}
.shm-cat-text { flex: 1 1 auto; min-width: 0; }
.shm-cat-chev { width: 18px; height: 18px; color: #b89a74; }
.shm-cat-link:active { background: var(--shm-sheet-hover); }
.shm-cat-link:focus-visible { outline: 2px solid var(--shm-maroon); outline-offset: -2px; }
@media (hover: hover) { .shm-cat-link:hover { background: var(--shm-sheet-hover); } }

/* текущий раздел */
.shm-current > .shm-cat-link {
    background: var(--shm-cur-bg);
    color: var(--shm-maroon) !important;
    font-weight: 700;
    box-shadow: inset 4px 0 0 var(--shm-maroon);
}
.shm-current .shm-cat-chev { color: var(--shm-maroon); }

.shm-cat-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.shm-chip {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 16px;
    border: 1px solid #d9c09b;
    border-radius: 22px;
    background: #fffaf1;
    color: var(--shm-sheet-text) !important;
    font-size: 14.5px;
    font-weight: 600;
}
.shm-chip-accent {
    border-color: var(--shm-maroon);
    background: var(--shm-maroon);
    color: var(--shanti-amber, #fbb53a) !important;
}
.shm-chip:focus-visible { outline: 2px solid var(--shm-maroon); outline-offset: 2px; }


/* ==========================================================================
   5. ЛИСТ «ЗВ'ЯЗОК» и блок мессенджеров
   ========================================================================== */
.shm-note {
    margin: 0 0 14px !important;
    color: var(--shm-sheet-text-2) !important;
    font-size: 15px;
}

.shm-msg {
    display: flex;
    justify-content: space-around;
    gap: 8px;
    margin: 0 0 18px;
}
.shm-msg-link {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 6px 2px;
    border-radius: 14px;
    color: var(--shm-sheet-text) !important;
    -webkit-tap-highlight-color: transparent;
}
.shm-msg-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    transition: transform .15s ease;
}
.shm-msg-circle svg { width: 32px; height: 32px; fill: currentColor; }
.shm-msg-label { font-size: 14px; font-weight: 700; }
.shm-msg-link:active .shm-msg-circle { transform: scale(.93); }
.shm-msg-link:focus-visible { outline: 2px solid var(--shm-maroon); outline-offset: 2px; }

/* 'brand': белый знак в круге фирменного цвета */
.shm-msg-brand .shm-msg-circle { color: #fff; box-shadow: 0 3px 10px rgba(43, 29, 20, .18); }
.shm-msg-brand .shm-msg-telegram .shm-msg-circle { background: var(--shm-telegram); }
.shm-msg-brand .shm-msg-viber    .shm-msg-circle { background: var(--shm-viber); }
.shm-msg-brand .shm-msg-whatsapp .shm-msg-circle { background: var(--shm-whatsapp); }
.shm-msg-brand .shm-msg-telegram .shm-msg-circle svg { transform: translateX(-1px); }

/* 'mono': как в подвале — знак на бордовом круге цветом «сливок» */
.shm-msg-mono .shm-msg-circle {
    background: var(--shm-maroon);
    color: var(--shanti-gold, #dde426);           /* как в подвале сайта */
    box-shadow: inset 0 0 0 1px rgba(221, 228, 38, .35), 0 3px 10px rgba(43, 29, 20, .18);
}

/* компактный вариант (в листе пустой корзины) */
.shm-msg-compact { margin-bottom: 4px; }
.shm-msg-compact .shm-msg-circle { width: 54px; height: 54px; }
.shm-msg-compact .shm-msg-circle svg { width: 27px; height: 27px; }
.shm-msg-compact .shm-msg-label { font-size: 13px; }

.shm-contacts {
    margin: 0;
    padding: 12px 0 0;
    list-style: none;
    border-top: 1px solid var(--shm-sheet-line);
}
.shm-contacts li { margin: 0; padding: 0; list-style: none; }
.shm-contacts li::marker { content: none; }
.shm-contact {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 6px 4px;
    border-radius: 10px;
    color: var(--shm-sheet-text-2) !important;
    font-size: 15px;
    overflow-wrap: anywhere;
}
.shm-contact .shm-ic { width: 20px; height: 20px; color: var(--shm-maroon); }
.shm-contact:active { background: var(--shm-sheet-hover); }
.shm-contact:focus-visible { outline: 2px solid var(--shm-maroon); outline-offset: 0; }


/* ==========================================================================
   6. ЛИСТ ПУСТОЙ КОРЗИНЫ
   ========================================================================== */
.shm-empty-hero {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}
.shm-empty-ic {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    padding: 12px;
    border-radius: 50%;
    background: var(--shm-cur-bg);
    color: var(--shm-maroon);
}
.shm-empty-text { color: var(--shm-sheet-text-2) !important; font-size: 15.5px; padding-top: 3px; }

.shm-actions { display: grid; gap: 10px; margin-bottom: 20px; }

.shm-help {
    margin: 0 0 12px !important;
    padding-top: 16px;
    border-top: 1px solid var(--shm-sheet-line);
    color: var(--shm-sheet-text) !important;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}


/* ==========================================================================
   7. ПОДСКАЗКА НАД «КОШИКОМ»
   Позицию по горизонтали и стрелку ставит скрипт (--shm-arrow-x).
   ========================================================================== */
.shm-hint {
    position: fixed;
    left: 10px;
    bottom: calc(var(--shm-lift) + 12px);
    z-index: 9990;                        /* ниже затемнения и листов */
    width: min(320px, calc(100vw - 20px));
    padding: 14px 14px 14px 16px;
    border: 1px solid var(--shm-hint-edge);
    border-radius: 16px;
    background: var(--shm-hint-bg);
    color: var(--shm-hint-text);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
    font-family: var(--shm-font);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease;
}
.shm-hint.shm-visible { opacity: 1; transform: translateY(0); }
body.shm-typing .shm-hint,
body.shm-sheet-open .shm-hint { display: none !important; }

.shm-hint-title {
    margin: 0 30px 4px 0 !important;
    color: var(--shanti-amber, #fbb53a) !important;
    font-family: var(--shm-font-head);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
}
.shm-hint-text {
    margin: 0 0 12px !important;
    color: var(--shm-hint-text) !important;
    font-size: 14.5px;
    line-height: 1.45;
}
.shm-hint-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.shm-btn-sm { min-height: 44px; padding: 8px 14px; font-size: 14.5px; border-radius: 12px; }
.shm-btn-gold {
    background: var(--shanti-amber, #fbb53a);
    color: #3a0a10 !important;
}
.shm-btn-line {
    border-color: rgba(251, 181, 58, .55);
    color: var(--shanti-amber, #fbb53a) !important;
}
.shm-hint .shm-btn:focus-visible { outline-color: var(--shanti-amber, #fbb53a); }

.shm-hint-close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgba(245, 236, 224, .75);
    cursor: pointer;
}
.shm-hint-close .shm-ic { width: 18px; height: 18px; }
.shm-hint-close:focus-visible { outline: 2px solid var(--shanti-amber, #fbb53a); outline-offset: -4px; }

/* стрелка на вкладку «Кошик» */
.shm-hint-arrow {
    position: absolute;
    left: var(--shm-arrow-x, 50%);
    bottom: -8px;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    background: var(--shm-hint-bg);
    border-right: 1px solid var(--shm-hint-edge);
    border-bottom: 1px solid var(--shm-hint-edge);
    transform: rotate(45deg);
}


/* ==========================================================================
   8. ШАПКА САЙТА, ПОИСК ARTICART, «НАВЕРХ»
   ========================================================================== */

/* Корзина из шапки уходит — она теперь во вкладке «Кошик». Старый тултип
   «Бажаєте щось купити?» уходит вместе с ней. Модуль остаётся в разметке:
   из него скрипт читает ссылки и адрес корзины. */
body.shm-active .header .header-cart-root { display: none !important; }

/* Одна строка: логотип + поиск на всю оставшуюся ширину. */
body.shm-active .header.container-header > .grid-child.container-nav {
    flex-wrap: nowrap !important;
}
body.shm-active .header .articart-search {
    flex: 1 1 auto !important;
    order: 0 !important;
}
/* на телефоне поиск на всю ширину; на широком экране остаётся
   ограничение шаблона (--search-max, 560px) */
@media (max-width: 991.98px) {
    body.shm-active .header .articart-search { max-width: 100% !important; }
}
@media (max-width: 575.98px) {
    body.shm-active .header .navbar-brand .brand-logo img { max-width: 30vw; }
}

/* «Умная» шапка: при сворачивании уходят и лого, и поиск — корзины больше
   нет, поэтому пустую полоску тоже убираем. */
body.shm-active .header.container-header.is-collapsed { padding-block: 0; }

/* Выпадашка подсказок поиска не уходит под плашку: высота — до плашки.
   --hdr-h ставит user.js (высота шапки). */
body.shm-active .header .articart-search__panel {
    max-height: calc(100vh - var(--hdr-h, 110px) - var(--shm-lift) - 16px);
    max-height: calc(100dvh - var(--hdr-h, 110px) - var(--shm-lift) - 16px);
}
body.shm-active.shm-typing .header .articart-search__panel {
    max-height: calc(100dvh - var(--hdr-h, 110px) - 16px);
}

/* Кнопка «наверх» шаблона — над плашкой; прячется, пока открыт лист. */
body.shm-active .shm-totop {
    right: 14px !important;
    bottom: calc(var(--shm-lift) + 14px) !important;
    z-index: 9980 !important;
    transition: opacity .2s ease, visibility .2s ease;
}
body.shm-active:not(.shm-scrolled) .shm-totop,
body.shm-active.shm-sheet-open .shm-totop,
body.shm-active.shm-typing .shm-totop {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
}


/* ==========================================================================
   9. ДВИЖЕНИЕ, УЗКИЕ ЭКРАНЫ
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .shm-bar, .shm-sheet, .shm-overlay, .shm-hint, .shm-tab-ic, .shm-msg-circle, .shm-totop {
        transition: none !important;
    }
    .shm-tab-cart.shm-bump .shm-tab-ic { animation: none; }
}

/* 320–359px: подписи мельче, «пилюля» уже */
@media (max-width: 359px) {
    .shm-tab-label { font-size: 10.5px; }
    .shm-tab-ic { width: 38px; padding: 3px 7px; }
    .shm-msg-circle { width: 56px; height: 56px; }
}

/* Планшет: листы не на всю ширину, а колонкой по центру */
@media (min-width: 600px) {
    .shm-sheet {
        left: 50%;
        right: auto;
        width: 560px;
        margin-left: -280px;
    }
    .shm-bar { justify-content: center; }
    .shm-tab { flex: 0 1 110px; }
}


/* ==========================================================================
   10. ЗАЩИТА ОТ ГЛОБАЛЬНЫХ ЦВЕТОВ ССЫЛОК САЙТА
   user.css красит ВСЕ ссылки: «a { color: золото !important }» и
   «a:hover { color: песочный #f9f6e5 !important }». a:hover (0,1,1) сильнее
   одиночного класса (0,1,0), и на светлом листе текст пункта под мышью
   становился почти белым на бежевом. Здесь у каждой ссылки панели свой
   цвет во всех состояниях и специфичность выше, чем у правил сайта.
   ========================================================================== */
.shm-bar a.shm-tab,
.shm-bar a.shm-tab:hover,
.shm-bar a.shm-tab:focus,
.shm-bar a.shm-tab:active                  { color: var(--shm-tab) !important; }
.shm-bar a.shm-tab.shm-here,
.shm-bar a.shm-tab.shm-here:hover,
.shm-bar a.shm-tab.shm-here:focus          { color: var(--shm-tab-on) !important; }

.shm-sheet a.shm-cat-link,
.shm-sheet a.shm-cat-link:hover,
.shm-sheet a.shm-cat-link:focus,
.shm-sheet a.shm-cat-link:active           { color: var(--shm-sheet-text) !important; }
.shm-sheet .shm-current > a.shm-cat-link,
.shm-sheet .shm-current > a.shm-cat-link:hover,
.shm-sheet .shm-current > a.shm-cat-link:focus { color: var(--shm-maroon) !important; }

.shm-sheet a.shm-chip,
.shm-sheet a.shm-chip:hover,
.shm-sheet a.shm-chip:focus                { color: var(--shm-sheet-text) !important; }
.shm-sheet a.shm-chip-accent,
.shm-sheet a.shm-chip-accent:hover,
.shm-sheet a.shm-chip-accent:focus         { color: var(--shanti-amber, #fbb53a) !important; }

.shm-sheet a.shm-msg-link,
.shm-sheet a.shm-msg-link:hover,
.shm-sheet a.shm-msg-link:focus            { color: var(--shm-sheet-text) !important; }

.shm-sheet a.shm-contact,
.shm-sheet a.shm-contact:hover,
.shm-sheet a.shm-contact:focus             { color: var(--shm-sheet-text-2) !important; }

.shm-sheet a.shm-btn-primary,
.shm-sheet a.shm-btn-primary:hover,
.shm-sheet a.shm-btn-primary:focus         { color: var(--shanti-amber, #fbb53a) !important; }

.shm-hint a.shm-btn-gold,
.shm-hint a.shm-btn-gold:hover,
.shm-hint a.shm-btn-gold:focus             { color: #3a0a10 !important; }

/* наведение мышью — только там, где мышь есть; на телефоне не залипает */
@media (hover: hover) {
    .shm-sheet a.shm-cat-link:hover            { background: var(--shm-sheet-hover); }
    .shm-sheet .shm-current > a.shm-cat-link:hover { background: var(--shm-cur-bg); }
    .shm-sheet a.shm-chip:hover                { border-color: var(--shm-maroon); background: #fff; }
    .shm-sheet a.shm-chip-accent:hover,
    .shm-sheet a.shm-btn-primary:hover         { background: #a00b24; }
    .shm-sheet a.shm-contact:hover             { background: var(--shm-sheet-hover); }
    .shm-sheet a.shm-msg-link:hover .shm-msg-circle { transform: scale(1.06); }
    .shm-sheet .shm-btn-ghost:hover            { background: var(--shm-sheet-hover); }
    .shm-bar a.shm-tab:not(.shm-here):hover,
    .shm-bar button.shm-tab:not(.shm-open):not(.shm-here):hover { color: var(--shanti-amber, #fbb53a) !important; }
    .shm-hint a.shm-btn-gold:hover             { filter: brightness(1.08); }
}


/* ==========================================================================
   11. КОМПЬЮТЕР (от 1024px)
   Меню одно на всех экранах. На широком экране плашка не тянется во всю
   ширину, а «парит» по центру (560px), листы открываются над ней.
   ========================================================================== */
@media (min-width: 1024px) {
    :root { --shm-lift: calc(var(--shm-bar-h) + 24px); }

    .shm-bar {
        left: 50%;
        right: auto;
        bottom: 12px;
        width: 560px;
        height: var(--shm-bar-h);
        padding: 0 6px;
        margin-left: -280px;
        border-radius: 18px;
        box-shadow: inset 0 0 0 1px var(--shm-bar-edge), 0 8px 26px rgba(0, 0, 0, .38);
    }
    .shm-tab { flex: 1 1 0; }

    .shm-sheet {
        border-radius: var(--shm-radius);
        box-shadow: 0 14px 40px rgba(0, 0, 0, .38);
    }
    .shm-sheet::before { display: none; }          /* «ручка» — жест телефона */
    .shm-sheet-head { padding-top: 12px; }

    body.shm-typing .shm-bar { transform: none; }  /* клавиатура не экранная */
}
