  /* Шапка: меню растёт вширь; перенос на 2 строки — только когда места нет.
     Каждая кнопка имеет высоту своего текста (1 или 2 строки), а не самой высокой. */
  @media (min-width: 769px) {
    html body .header-nav .nav-container { height: auto; min-height: 60px; padding-top: 6px; padding-bottom: 6px; }
    html body .header-nav .brand-logo { flex: 0 0 auto; white-space: nowrap; }
    html body .header-nav .nav-menu { flex: 0 1 auto; min-width: 0; flex-wrap: nowrap; align-items: center; }
    html body .header-nav .nav-item { flex: 0 1 auto; min-width: 0; align-self: center; }
    html body .header-nav .nav-btn { text-align: center; line-height: 1.25; }
    /* Профиль, отправка контента, модерация, выход — всегда одна строка */
    html body .header-nav .user-actions { flex: 0 0 auto; white-space: nowrap; }
    html body .header-nav #user-actions-container { flex-wrap: nowrap; }
    html body .header-nav .user-actions .btn,
    html body .header-nav .user-actions .user-badge,
    html body .header-nav .user-actions .theme-toggle-btn { white-space: nowrap; flex: 0 0 auto; }
  }
  

  .burger-btn, #mobile-drawer, #mobile-drawer-backdrop { display: none; }
  .mobile-only { display: none; }
  @media (max-width: 768px) {
    html body .header-nav .nav-container { flex-wrap: nowrap !important; height: 56px !important; min-height: 56px !important; padding: 6px 12px !important; gap: 8px !important; align-items: center !important; }
    html body .header-nav .nav-container .brand-logo { order: 1; flex: 0 0 auto; }
    html body .header-nav .nav-container .user-actions { order: 2; flex: 0 0 auto !important; width: auto !important; max-width: none !important; margin-left: auto !important; padding: 0 !important; gap: 8px !important; justify-content: flex-end !important; }
    html body .header-nav .nav-container .theme-toggle-btn { position: static !important; width: 38px !important; height: 38px !important; margin: 0 !important; display: inline-flex !important; align-items: center; justify-content: center; }
    html body .header-nav .burger-btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 38px; height: 38px; padding: 0; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-input); cursor: pointer; flex: 0 0 auto; }
    .burger-btn span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--text-main); transition: transform .25s ease, opacity .2s ease; }
    .burger-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .burger-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .burger-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    body.md-open { overflow: hidden; }
    #mobile-drawer-backdrop { display: block; position: fixed; inset: 0; z-index: 2147483646; background: rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
    #mobile-drawer-backdrop.open { opacity: 1; pointer-events: auto; }
    #mobile-drawer { display: flex; flex-direction: column; position: fixed; top: 0; right: 0; bottom: 0; width: min(320px, 86vw); height: 100vh; height: 100dvh; z-index: 2147483647; background: var(--bg-card); color: var(--text-main); border-left: 1px solid var(--border-color); box-shadow: -12px 0 40px rgba(0,0,0,.45); transform: translateX(105%); visibility: hidden; transition: transform .28s ease, visibility 0s linear .28s; }
    #mobile-drawer.open { transform: none; visibility: visible; transition: transform .28s ease, visibility 0s; }
    #mobile-drawer .md-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border-color); flex: 0 0 auto; }
    #mobile-drawer .md-title { font-weight: 800; font-size: 18px; }
    #mobile-drawer .md-close { width: 36px; height: 36px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-input); color: var(--text-main); font-size: 24px; line-height: 1; cursor: pointer; }
    #mobile-drawer .md-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 10px 10px 24px; }
    #mobile-drawer .md-divider { height: 1px; background: var(--border-color); margin: 12px 4px; }

    /* меню разделов — вертикальный список с раскрывающимися подразделами */
    html body #mobile-drawer #md-slot-menu .nav-menu { display: flex !important; flex-direction: column !important; align-items: stretch !important; overflow: visible !important; white-space: normal !important; width: 100% !important; max-width: none !important; padding: 0 !important; margin: 0 !important; gap: 2px !important; }
    html body #mobile-drawer #md-slot-menu .nav-item { display: block !important; position: static !important; width: 100% !important; flex: none !important; }
    html body #mobile-drawer #md-slot-menu .nav-btn { display: flex !important; align-items: center; justify-content: space-between; width: 100%; padding: 12px 14px; font-size: 15px; text-align: left; white-space: normal; border-radius: 8px; text-decoration: none; color: var(--text-main); }
    html body #mobile-drawer #md-slot-menu .nav-btn:hover { background: transparent; color: var(--text-main); }
    html body #mobile-drawer #md-slot-menu .nav-btn.active { color: var(--accent-pink); background: var(--tag-bg); }
    html body #mobile-drawer #md-slot-menu .nav-btn:active { background: var(--accent-pink); color: #fff; }

    html body #mobile-drawer #md-slot-menu :is(.dropdown-menu, .sub-dropdown-menu) { display: none !important; position: static !important; top: auto !important; left: auto !important; right: auto !important; width: auto !important; min-width: 0 !important; max-width: none !important; max-height: none !important; overflow: visible !important; margin: 2px 0 6px 12px !important; padding: 0 0 0 8px !important; background: transparent !important; border: 0 !important; border-left: 2px solid var(--border-color) !important; border-radius: 0 !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; opacity: 1 !important; visibility: visible !important; transform: none !important; pointer-events: auto !important; z-index: auto !important; }
    html body #mobile-drawer #md-slot-menu :is(.nav-item.open > .dropdown-menu, .dropdown-item.open > .sub-dropdown-menu) { display: block !important; }
    html body #mobile-drawer #md-slot-menu .mobile-only { display: list-item !important; }
    html body #mobile-drawer #md-slot-menu :is(.dropdown-menu, .sub-dropdown-menu) li { list-style: none; display: block; position: static !important; }
    html body #mobile-drawer #md-slot-menu :is(.dropdown-item > button, .sub-dropdown-menu button, .dropdown-menu > li > button) { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px 12px; font-size: 14px; text-align: left; background: transparent !important; color: var(--text-main) !important; border: 0; border-radius: 8px; cursor: pointer; }
    html body #mobile-drawer #md-slot-menu :is(.dropdown-item > button, .sub-dropdown-menu button):active { background: var(--accent-pink) !important; color: #fff !important; }
    html body #mobile-drawer #md-slot-menu .nav-item.open > .nav-btn, html body #mobile-drawer #md-slot-menu .dropdown-item.open > button { color: var(--accent-pink) !important; }

    /* кнопки аккаунта внутри панели */
    html body #mobile-drawer #user-actions-container { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 8px !important; width: 100% !important; }
    html body #mobile-drawer #user-actions-container > * { width: 100%; justify-content: center; text-align: center; white-space: normal; padding-top: 10px; padding-bottom: 10px; font-size: 13px; }
    html body #mobile-drawer #user-actions-container .user-badge { display: block; }
  }
  

  /* Liquid Glass для бургер-меню (включается тем же переключателем «Liquid Glass» в профиле) */
  @media (max-width: 768px) {
    html body.liquid-glass #mobile-drawer-backdrop { background: radial-gradient(120% 80% at 80% 0%, rgba(125,145,255,.14), transparent 60%), var(--lg-dim, rgba(6,9,16,.38)) !important; -webkit-backdrop-filter: blur(8px) saturate(150%); backdrop-filter: blur(8px) saturate(150%); }
    html body.liquid-glass #mobile-drawer {
      border: 1px solid var(--lg-rim-lo, rgba(255,255,255,.18)) !important;
      border-right: 0 !important;
      border-radius: 28px 0 0 28px !important;
      background:
        radial-gradient(260px circle at 100% -6%, rgba(255,255,255,.30), transparent 62%),
        linear-gradient(135deg, rgba(255,255,255,.27) 0%, rgba(255,255,255,.07) 28%, rgba(255,255,255,0) 52%, rgba(255,255,255,.04) 76%, rgba(255,255,255,.17) 100%),
        linear-gradient(var(--lg-tint, rgba(20,24,36,.30)), var(--lg-tint, rgba(20,24,36,.30))) !important;
      -webkit-backdrop-filter: blur(30px) saturate(1.7) brightness(1.1) !important;
      backdrop-filter: blur(30px) saturate(1.7) brightness(1.1) !important;
      box-shadow:
        inset 1.5px 1.5px .5px -1px var(--lg-rim-hi, rgba(255,255,255,.7)),
        inset -1.5px -1.5px .5px -1px var(--lg-rim-hi2, rgba(255,255,255,.34)),
        inset 14px 16px 26px -20px rgba(255,255,255,.6),
        inset 0 0 30px rgba(255,255,255,.05),
        -18px 0 50px -12px var(--lg-drop, rgba(0,0,0,.44)) !important;
    }
    html body.liquid-glass #mobile-drawer :is(.md-head, .md-body) { text-shadow: var(--lg-text-sh, 0 1px 2px rgba(0,0,0,.45)); }
    html body.liquid-glass #mobile-drawer .md-head { border-bottom: 1px solid var(--lg-rim-lo, rgba(255,255,255,.18)); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
    html body.liquid-glass #mobile-drawer .md-divider { background: linear-gradient(90deg, transparent, var(--lg-rim-hi2, rgba(255,255,255,.34)), transparent); height: 1px; }
    html body.liquid-glass #mobile-drawer :is(.md-close) , html body.liquid-glass .header-nav .burger-btn {
      background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0) 60%), var(--lg-field, rgba(255,255,255,.075)) !important;
      border: 1px solid var(--lg-field-border, rgba(255,255,255,.17)) !important;
      border-radius: 999px !important;
      box-shadow: inset 1px 1px .5px -.5px var(--lg-rim-hi, rgba(255,255,255,.7)), inset -1px -1px .5px -.5px var(--lg-rim-hi2, rgba(255,255,255,.34)), 0 4px 12px -6px var(--lg-drop, rgba(0,0,0,.44)) !important;
    }
    html body.liquid-glass #mobile-drawer #md-slot-menu .nav-btn { border-radius: 16px; transition: background-color .2s ease, transform .4s cubic-bezier(.34,1.56,.64,1); }
    html body.liquid-glass #mobile-drawer #md-slot-menu .nav-btn.active,
    html body.liquid-glass #mobile-drawer #md-slot-menu .nav-item.open > .nav-btn {
      background: linear-gradient(135deg, rgba(255,255,255,.20), rgba(255,255,255,.04)), var(--lg-tint-soft, rgba(255,255,255,.09)) !important;
      box-shadow: inset 1px 1px .5px -.5px var(--lg-rim-hi, rgba(255,255,255,.7)), inset -1px -1px .5px -.5px var(--lg-rim-hi2, rgba(255,255,255,.34)), 0 6px 16px -8px var(--lg-drop, rgba(0,0,0,.44));
    }
    html body.liquid-glass #mobile-drawer #md-slot-menu .nav-btn:active,
    html body.liquid-glass #mobile-drawer #md-slot-menu :is(.dropdown-item > button, .sub-dropdown-menu button):active {
      background-color: var(--accent-pink) !important;
      background-image: linear-gradient(180deg, rgba(255,255,255,.34), rgba(255,255,255,0) 55%) !important;
      transform: scale(.98);
    }
    html body.liquid-glass #mobile-drawer #md-slot-menu :is(.dropdown-menu, .sub-dropdown-menu) { border-left-color: var(--lg-rim-hi2, rgba(255,255,255,.34)) !important; }
    html body.liquid-glass #mobile-drawer #md-slot-menu :is(.dropdown-item > button, .sub-dropdown-menu button, .dropdown-menu > li > button) { border-radius: 14px; }
    html body.liquid-glass #mobile-drawer #user-actions-container .btn { border-radius: 999px !important; }
    html body.liquid-glass #mobile-drawer #user-actions-container .btn:not(.btn-outline) { background-image: linear-gradient(180deg, rgba(255,255,255,.34), rgba(255,255,255,0) 55%); box-shadow: inset 0 1.5px 1px rgba(255,255,255,.6), inset 0 -2px 3px rgba(0,0,0,.18), 0 8px 18px -6px rgba(0,0,0,.42) !important; border: 1px solid rgba(255,255,255,.22); }
    html body.liquid-glass #mobile-drawer #user-actions-container .btn-outline { background: var(--lg-field, rgba(255,255,255,.075)) !important; border: 1px solid var(--lg-field-border, rgba(255,255,255,.17)) !important; }
    html body.liquid-glass #mobile-drawer #user-actions-container .user-badge { background: var(--lg-field, rgba(255,255,255,.075)); border: 1px solid var(--lg-field-border, rgba(255,255,255,.17)); border-radius: 999px; box-shadow: inset 1px 1px .5px -.5px var(--lg-rim-hi, rgba(255,255,255,.7)); }
  }
  @media (max-width: 768px) and (prefers-reduced-transparency: reduce) {
    html body.liquid-glass #mobile-drawer { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: var(--bg-card) !important; }
  }
  

/* Подчёркиваем полосу прокрутки у уже существующих списков, не создавая новых меню */
:where([role="listbox"],[role="menu"],[role="tree"],.dropdown-menu,.sub-dropdown-menu,.dropdown-content,.select-options,.custom-select-options,.autocomplete-list,.suggestions,.suggestion-list,.options-list,.menu-list,.modal-box,.modal-content,.popup,.popover,[data-scrollable]) {
  scrollbar-width: auto;
  scrollbar-color: #8da5d2 rgba(130,150,190,.18);
}
:where([role="listbox"],[role="menu"],[role="tree"],.dropdown-menu,.sub-dropdown-menu,.dropdown-content,.select-options,.custom-select-options,.autocomplete-list,.suggestions,.suggestion-list,.options-list,.menu-list,.modal-box,.modal-content,.popup,.popover,[data-scrollable])::-webkit-scrollbar { width: 11px; height: 11px; }
:where([role="listbox"],[role="menu"],[role="tree"],.dropdown-menu,.sub-dropdown-menu,.dropdown-content,.select-options,.custom-select-options,.autocomplete-list,.suggestions,.suggestion-list,.options-list,.menu-list,.modal-box,.modal-content,.popup,.popover,[data-scrollable])::-webkit-scrollbar-track { background: rgba(130,150,190,.18); border-radius: 10px; }
:where([role="listbox"],[role="menu"],[role="tree"],.dropdown-menu,.sub-dropdown-menu,.dropdown-content,.select-options,.custom-select-options,.autocomplete-list,.suggestions,.suggestion-list,.options-list,.menu-list,.modal-box,.modal-content,.popup,.popover,[data-scrollable])::-webkit-scrollbar-thumb { background: #8da5d2; border: 2px solid rgba(235,240,250,.8); border-radius: 10px; }

/* Выпадающие меню — выше любых элементов страницы */
html body .header-nav { position: sticky; z-index: 2147483000 !important; overflow: visible !important; }
html body .header-nav .nav-container,
html body .header-nav .nav-menu,
html body .header-nav .nav-item,
html body .header-nav .dropdown-item { overflow: visible !important; }
html body .dropdown-menu { z-index: 2147483001 !important; }
html body .sub-dropdown-menu { z-index: 2147483002 !important; }
html body :is(.custom-select-options,.select-options,.autocomplete-list,.suggestions,.suggestion-list,.options-list,.dropdown-content,[role="listbox"]) { z-index: 2147483001 !important; }

/* Жидкое стекло под стиль сайта */
html body :is(.dropdown-menu,.sub-dropdown-menu,.custom-select-options,.select-options,.autocomplete-list,.dropdown-content) {
  background: rgba(30, 34, 48, .42);
  background: color-mix(in srgb, var(--bg-card, #1e2230) 46%, transparent);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 18px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.35), inset 0 -1px 1px rgba(255,255,255,.08), 0 14px 36px rgba(0,0,0,.35);
}
html body :is(.dropdown-menu,.sub-dropdown-menu) button { background: transparent; border-radius: 12px; }
html body :is(.dropdown-menu,.sub-dropdown-menu) button:hover { background: var(--accent-pink, #e0457b); color: #fff; }

/* Шапка всегда в своём слое над контентом (в т.ч. над стеклом с рефракцией) */
html body .header-nav { isolation: isolate; transform: translateZ(0); will-change: transform; }
html body main, html body .main-container { position: relative; z-index: 0; }
html body :is(.search-bar-box,.hero-banner,.card,.upload-box) { z-index: auto; }

select.pdd-native{display:none!important}
.pdd-trigger{display:inline-flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;text-align:left;font:inherit;color:inherit;max-width:100%}
.pdd-trigger .pdd-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.pdd-trigger svg{flex:none;width:14px;height:14px;transition:transform .2s;opacity:.75}
.pdd-trigger[aria-expanded="true"] svg{transform:rotate(180deg)}
.pdd-trigger:disabled{opacity:.5;cursor:not-allowed}
.pdd-list{position:fixed;inset:auto;margin:0;padding:7px;overflow-y:auto;overscroll-behavior:contain;box-sizing:border-box;
  z-index:2147483647;color:var(--text-main,#fff);border-radius:18px;
  background:rgba(30,34,48,.42);background:color-mix(in srgb,var(--bg-card,#1e2230) 46%,transparent);
  -webkit-backdrop-filter:blur(24px) saturate(180%);backdrop-filter:blur(24px) saturate(180%);
  border:1px solid rgba(255,255,255,.28);
  box-shadow:inset 0 1px 1px rgba(255,255,255,.4),inset 0 -1px 1px rgba(255,255,255,.1),0 16px 40px rgba(0,0,0,.35)}
.pdd-item{display:flex;align-items:center;gap:8px;padding:9px 11px;border-radius:12px;cursor:pointer;font-size:14px;line-height:1.25;user-select:none}
.pdd-item .pdd-ck{width:14px;flex:none;font-size:13px;opacity:0}
.pdd-item[aria-selected="true"]{background:rgba(110,130,230,.22);font-weight:700}
.pdd-item[aria-selected="true"] .pdd-ck{opacity:1}
.pdd-item:hover,.pdd-item.pdd-act{background:rgba(255,255,255,.22)}
.pdd-item[aria-disabled="true"]{opacity:.4;pointer-events:none}
.pdd-group{padding:8px 11px 4px;font-size:12px;opacity:.6;font-weight:700}

/* Приветственное окно настройки профиля */
.onboarding-box{max-width:440px;text-align:center}
.onboarding-ico{font-size:42px;line-height:1;margin-bottom:8px}
.onboarding-box h3{margin-bottom:10px}
.onboarding-box p{color:var(--text-muted);font-size:14px;line-height:1.55;margin-bottom:18px}
.onboarding-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}

/* =====================================================================
   MODERN UI LAYER — только внешний вид. Разметка, JS и PHP не затронуты.
   Жидкое стекло (body.liquid-glass) сохранено: поверхности стекла не
   переопределяются, добавлены лишь типографика, отступы и микро-анимации.
   ===================================================================== */
:root:not([data-theme="light"]) {
  --bg-main: #0a0c12;
  --bg-card: #131722;
  --bg-input: #0d1018;
  --header-bg: #0f121a;
  --border-color: #232838;
  --text-muted: #94a3b8;
  --tag-bg: #1a1f2e;
}
:root[data-theme="light"] {
  --bg-main: #eef1f6;
  --bg-card: #ffffff;
  --border-color: #d8deea;
  --tag-bg: #eef1f7;
  --text-muted: #4b5a70;
}
:root {
  --m-r-sm: 10px; --m-r: 14px; --m-r-lg: 20px;
  --m-ease: cubic-bezier(.2,.8,.2,1);
  --m-shadow: 0 1px 2px rgba(0,0,0,.18), 0 8px 24px -10px rgba(0,0,0,.35);
  --m-shadow-hover: 0 2px 4px rgba(0,0,0,.2), 0 18px 40px -14px rgba(0,0,0,.5);
}
:root[data-theme="light"] {
  --m-shadow: 0 1px 2px rgba(30,45,80,.06), 0 8px 24px -12px rgba(30,45,80,.18);
  --m-shadow-hover: 0 2px 4px rgba(30,45,80,.08), 0 18px 40px -16px rgba(30,45,80,.28);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html body {
  font-family: 'Inter', 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px; line-height: 1.55; letter-spacing: .005em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
html body :is(button, input, select, textarea) { font-family: inherit; }
::selection { background: color-mix(in srgb, var(--accent-pink) 35%, transparent); }
:focus-visible { outline: 2px solid var(--accent-pink); outline-offset: 2px; border-radius: 6px; }

/* Шапка */
html body .header-nav { backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); }
html body:not(.liquid-glass) .header-nav {
  background: color-mix(in srgb, var(--header-bg) 86%, transparent);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 6px 24px -14px rgba(0,0,0,.45);
}
html body .header-nav .brand-logo { font-weight: 800; letter-spacing: -.01em; }
html body .nav-btn { border-radius: var(--m-r-sm); padding: 8px 14px; font-weight: 600; transition: background-color .2s var(--m-ease), color .2s var(--m-ease), transform .2s var(--m-ease); }
html body .nav-btn:hover, html body .nav-item:hover > .nav-btn, html body .nav-btn.active { background: color-mix(in srgb, var(--accent-pink) 12%, var(--tag-bg)); }
html body .dropdown-item > button, html body .sub-dropdown-menu button { transition: background-color .15s, color .15s, padding-left .2s var(--m-ease); }
html body .dropdown-item:hover > button { padding-left: 20px; }

/* Кнопки */
html body .btn, html body .site-dialog-btn {
  border-radius: var(--m-r-sm); padding: 9px 16px; font-size: 13px; font-weight: 650; letter-spacing: .01em;
  transition: transform .2s var(--m-ease), box-shadow .2s var(--m-ease), filter .2s, background-color .2s, border-color .2s;
}
html body:not(.liquid-glass) .btn:not(.btn-outline) { box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 6px 16px -8px rgba(0,0,0,.5); }
html body:not(.liquid-glass) .btn:not(.btn-outline):hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 1px 0 rgba(255,255,255,.22) inset, 0 12px 22px -10px rgba(0,0,0,.55); }
html body:not(.liquid-glass) .btn:active { transform: translateY(0) scale(.98); }
html body .btn-outline:hover { background: color-mix(in srgb, var(--accent-pink) 10%, transparent); }
html body .btn:disabled, html body .btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
html body .theme-toggle-btn { border-radius: var(--m-r-sm); }

/* Герой и поиск */
html body:not(.liquid-glass) .hero-banner {
  border-radius: var(--m-r-lg); padding: 44px 24px 32px; border: 1px solid var(--border-color);
  background:
    radial-gradient(600px 220px at 15% -20%, color-mix(in srgb, var(--accent-pink) 22%, transparent), transparent 70%),
    radial-gradient(500px 200px at 95% 120%, color-mix(in srgb, var(--accent-blue) 20%, transparent), transparent 70%),
    var(--bg-card);
  box-shadow: var(--m-shadow);
}
html body .hero-title { font-size: clamp(26px, 4.2vw, 42px); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
html body .hero-subtitle { font-size: clamp(14px, 1.6vw, 16px); max-width: 680px; margin-left: auto; margin-right: auto; }
html body:not(.liquid-glass) .search-bar-box { border-radius: var(--m-r); padding: 10px; box-shadow: var(--m-shadow); }
html body :is(.form-control, .search-input, select, textarea, input[type="text"], input[type="search"], input[type="password"], input[type="email"]) {
  border-radius: var(--m-r-sm); transition: border-color .2s, box-shadow .2s, background-color .2s;
}
html body :is(.form-control, .search-input, select, textarea, input):focus {
  outline: none; border-color: var(--accent-pink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-pink) 22%, transparent);
}

/* Карточки */
html body .main-container { max-width: 1400px; padding: 0 24px; margin-top: 28px; }
html body .cards-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
html body:not(.liquid-glass) .card {
  border-radius: var(--m-r-lg); box-shadow: var(--m-shadow);
  transition: transform .3s var(--m-ease), box-shadow .3s var(--m-ease), border-color .3s;
}
html body:not(.liquid-glass) .card:hover { transform: translateY(-5px); box-shadow: var(--m-shadow-hover); border-color: color-mix(in srgb, var(--accent-pink) 45%, var(--border-color)); }
html body .card-img { height: 180px; transition: transform .5s var(--m-ease); }
html body .card:hover .card-img { transform: scale(1.04); }
html body .card { overflow: hidden; }
html body .card-body { padding: 16px 18px 18px; }
html body .card-title { font-size: 16.5px; line-height: 1.3; letter-spacing: -.005em; }
html body .card-desc { font-size: 13.5px; line-height: 1.5; }
html body .tag { border-radius: 999px; padding: 3px 10px; font-size: 11.5px; }
html body .like-btn { border-radius: 999px; transition: transform .2s var(--m-ease), background-color .2s, border-color .2s; }
html body .like-btn:hover { transform: scale(1.06); }

/* Панели, модалки, таблицы */
html body:not(.liquid-glass) :is(.upload-box, .admin-block, .comment-item, .sub-nav-bar) { border-radius: var(--m-r); box-shadow: var(--m-shadow); }
html body:not(.liquid-glass) .modal-box { border-radius: var(--m-r-lg); box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); }
html body .modal-overlay { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
html body .sub-nav-btn { border-radius: 999px; font-weight: 600; transition: background-color .2s, color .2s, transform .2s var(--m-ease); }
html body .sub-nav-btn:hover { transform: translateY(-1px); }
html body :is(.table-custom, .stats-table) { border-collapse: separate; border-spacing: 0; border-radius: var(--m-r-sm); overflow: hidden; }
html body .table-custom tbody tr { transition: background-color .15s; }
html body .table-custom tbody tr:hover { background: color-mix(in srgb, var(--accent-pink) 6%, transparent); }
html body .site-notice { border-radius: var(--m-r); box-shadow: var(--m-shadow); }
html body .tab-content.active { animation: mFadeUp .35s var(--m-ease); }
@keyframes mFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Тонкие современные скроллбары страницы */
html { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text-muted) 55%, transparent) transparent; }
html::-webkit-scrollbar { width: 10px; }
html::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text-muted) 45%, transparent); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }

/* Мобильные */
@media (max-width: 768px) {
  html body .main-container { padding: 0 14px; margin-top: 18px; }
  html body .cards-grid { grid-template-columns: 1fr; gap: 16px; }
  html body:not(.liquid-glass) .hero-banner { padding: 30px 16px 22px; }
  html body .btn { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html body *, html body *::before, html body *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* =====================================================================
   STRUCTURE LAYER — главная-«бенто», подвал, подписи разделов, иконки.
   ===================================================================== */
html body .brand-logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: .04em; }
html body .brand-logo::before {
  content: ""; width: 12px; height: 12px; border-radius: 4px; transform: rotate(45deg); flex: none;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-blue));
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent-pink) 60%, transparent);
}
html body .search-input {
  padding-left: 42px !important;
  background-repeat: no-repeat; background-position: 15px 50%; background-size: 17px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E");
}

/* Бенто-блок главной */
.home-bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; margin-bottom: 30px; }
html body .home-bento > .hero-banner {
  margin: 0; text-align: left; display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  grid-column: span 3; padding: 26px 26px 24px; position: relative; overflow: hidden;
}
html body .home-bento > .home-hero { grid-column: 1 / -1; padding: 44px 40px 40px; }
html body .home-bento .hero-subtitle { margin: 0 0 18px; max-width: 620px; }
html body .home-bento .home-tile .hero-title { font-size: 21px; letter-spacing: -.01em; margin-bottom: 6px; }
html body .home-bento .home-tile .hero-subtitle { font-size: 14px; flex: 1; }
html body .home-bento .home-hero .hero-title { font-size: clamp(30px, 5vw, 54px); line-height: 1.05; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; margin-bottom: 14px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted);
  background: color-mix(in srgb, var(--accent-pink) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-pink) 28%, transparent);
}
.hero-eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-green) 25%, transparent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
html body .hero-actions .btn { padding: 11px 20px; font-size: 14px; }
.tile-ico {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; margin-bottom: 14px;
  background: color-mix(in srgb, var(--tile-c, var(--accent-pink)) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--tile-c, var(--accent-pink)) 35%, transparent);
}
.home-tile.t-yt { --tile-c: #ef4444; }
.home-tile.t-help { --tile-c: var(--accent-green); }
html body .home-bento .home-tile { transition: transform .3s var(--m-ease), box-shadow .3s var(--m-ease); }
html body:not(.liquid-glass) .home-bento .home-tile:hover { transform: translateY(-4px); box-shadow: var(--m-shadow-hover); }
#support-btn-wrap { display: inline-flex; align-items: center; gap: 8px; }

/* Заголовок секции */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 2px 16px; }
.section-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -.015em; display: flex; align-items: center; gap: 10px; }
.section-head h2::before { content: ""; width: 5px; height: 22px; border-radius: 4px; background: linear-gradient(var(--accent-pink), var(--accent-blue)); }
.section-head span { font-size: 13px; color: var(--text-muted); }

/* Статьи и фото */
html body .ph-rules {
  text-align: left; font-size: 13px; line-height: 1.65; margin-top: 16px; padding: 14px 16px; border-radius: 14px;
  border-left: 3px solid var(--accent-gold); background: color-mix(in srgb, var(--accent-gold) 9%, transparent);
}
html body .article-detail-box { max-width: 880px; margin: 0 auto; }
html body .article-content { font-size: 16.5px; line-height: 1.75; }
html body :is(.article-cover, .article-content img, .ph-big) { border-radius: var(--m-r); }
html body .video-container { border-radius: var(--m-r); overflow: hidden; }
html body :is(#articles-grid, #photos-grid) { margin-top: 4px; }
html body #photos-grid .card-img { height: 200px; }

/* Подвал */
.site-footer { margin-top: 48px; padding: 30px 24px 34px; border-top: 1px solid var(--border-color); background: color-mix(in srgb, var(--header-bg) 78%, transparent); }
.site-footer-in { max-width: 1400px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; }
.site-footer .sf-brand { font-weight: 800; letter-spacing: .06em; font-size: 16px; }
.site-footer .sf-brand small { display: block; font-weight: 500; letter-spacing: 0; color: var(--text-muted); font-size: 12.5px; margin-top: 3px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 4px; }
.site-footer nav a { color: var(--text-muted); text-decoration: none; font-size: 13.5px; font-weight: 600; padding: 7px 12px; border-radius: 999px; transition: color .2s, background-color .2s; }
.site-footer nav a:hover { color: var(--text-main); background: var(--tag-bg); }

@media (max-width: 768px) {
  .home-bento { gap: 14px; margin-bottom: 22px; }
  html body .home-bento > .hero-banner, html body .home-bento > .home-tile { grid-column: 1 / -1; padding: 22px 18px; }
  html body .home-bento > .home-hero { padding: 28px 20px; }
  .section-head h2 { font-size: 19px; }
  .site-footer-in { flex-direction: column; align-items: flex-start; }
}

/* Отступы главной: сетка во внутренней обёртке (скрипт сайта меняет display у #home-banners) */
#home-banners { margin-bottom: 8px; }
html body .home-bento { gap: 22px; margin-bottom: 32px; }
html body .home-bento > .home-hero { padding: 46px 44px 42px; }
html body .home-bento > .home-tile { padding: 30px 30px 28px; }
html body .main-container > .search-bar-box { margin-bottom: 28px; }
html body .cards-grid { margin-top: 6px; margin-bottom: 30px; }
@media (max-width: 768px) { html body .home-bento { gap: 16px; margin-bottom: 24px; } html body .home-bento > .home-hero { padding: 28px 20px; } html body .home-bento > .home-tile { padding: 22px 18px; } }
