/* Общая обвязка: переменные, сброс, сетка, шапка, подвал, кнопки,
   тема, мобильное меню, чат. Грузится на каждой странице.

   Файл получен раскроем styles.css: один файл на 11 553 строки
   грузился всеми девятью страницами целиком. Если добавляете стиль,
   кладите его в файл по принадлежности, а не в первый попавшийся. */

/* --- Variables --- */
:root {
  /* Высота шапки; обновляется script.js (ResizeObserver), иначе fallback */
  --site-header-offset: 88px;
  --bg: #0d0d0f;
  --bg-card: #16161a;
  --bg-elevated: #1c1c21;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e4e4e7;
  --text-muted: #a1a1aa;
  --accent: #00d4ff;
  --accent-dim: rgba(0, 212, 255, 0.15);
  --orange: #ff6b35;
  --orange-dim: rgba(255, 107, 53, 0.15);
  --radius: 12px;
  --radius-lg: 20px;
  --font-head: 'Unbounded', sans-serif;
  --font-body: 'Onest', sans-serif;
  --shadow-glow: 0 0 40px rgba(0, 212, 255, 0.08);
}

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  /* clip вместо hidden: меньше ломает sticky, но режет горизонтальный «дрифт» на iOS */
  overflow-x: clip;
  scroll-padding-top: var(--site-header-offset);
}

@supports not (overflow: clip) {
html {
    overflow-x: hidden;
  }
}


body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
  overscroll-behavior-x: none;
  position: relative;
}

img {
  max-width: 100%;
  height: auto;
}

iframe, video, object {
  max-width: 100%;
}

main {
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  padding-top: var(--site-header-offset);
}

.section,
.container {
  max-width: 100%;
  min-width: 0;
}

/* --- Grid background --- */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (max-width: 480px) {
.container {
    padding: 0 14px;
  }
}


.section {
  padding: 44px 0;
}

/* Ниже первого экрана: откладываем layout/paint дальних секций (мобильный 4G) */
.section--deferred {
  content-visibility: auto;
  contain-intrinsic-size: auto 520px;
}

body.shop-page .section {
  padding-top: 20px;
}

@media (max-width: 600px) {
.section {
    padding: 32px 0;
  }
  body.shop-page .section {
    padding-top: 14px;
  }
}


.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  text-align: center;
}

.section-desc {
  color: var(--text-muted);
  margin: 0 0 24px;
  max-width: 560px;
}

.section-title--center,
.section-desc--center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-desc--center {
  max-width: 480px;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  background: rgba(13, 13, 15, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 20px;
  flex-wrap: wrap;
  transition: padding 0.22s ease, gap 0.22s ease;
}

@media (max-width: 700px) {
.header-actions {
    width: 100%;
    justify-content: flex-end;
  }
}


.logo-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 1;
  min-width: 0;
}

.logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
  transition: font-size 0.2s ease;
}

.logo-tagline {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav {
  display: flex;
  gap: 28px;
  transition: gap 0.22s ease;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s, font-size 0.2s ease;
}

.nav a:hover {
  color: var(--accent);
}

.nav a.nav-link--products {
  font-weight: 700;
}

.nav a.is-active {
  color: var(--accent);
}

.nav-dropdown {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.nav-dropdown__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.2s, font-size 0.2s ease;
}

.nav-dropdown__btn:hover,
.nav-dropdown.is-open > .nav-dropdown__btn {
  color: var(--accent);
}

.nav-dropdown__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.nav-dropdown__caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.75;
  transition: transform 0.2s ease;
}

.nav-dropdown.is-open > .nav-dropdown__btn .nav-dropdown__caret {
  transform: rotate(180deg);
}

.nav-dropdown__menu {
  display: none;
  flex-direction: column;
  min-width: 210px;
  padding: 6px 0;
  background: var(--bg-card, #111827);
  border: 1px solid var(--border, #1e293b);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
  z-index: 30;
}

.nav-dropdown.is-open > .nav-dropdown__menu {
  display: flex;
}

.nav-dropdown__menu[hidden] {
  display: none !important;
}

.nav-dropdown__menu a {
  display: block;
  padding: 10px 14px;
  white-space: nowrap;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
}

.nav-dropdown__menu a:hover {
  color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
}

/* Пункт с пометкой «New!»: название и ярлык в одну строку.
   Ярлык — отдельный span, потому что data-i18n висит на span с названием:
   applyLang переписывает textContent целиком и стёр бы пометку. */
.nav-dropdown__menu a.is-new {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-badge-new {
  flex: none;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent);
  /* Тёмный текст задан жёстко: акцент светло-голубой в обеих темах,
     а var(--bg) в светлой становится почти белым — ярлык пропадал. */
  color: #0b1220;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Платный пункт (генератор капсул): название и круглый значок рубля.
   Название в своём span по той же причине, что у .is-new. */
.nav-dropdown__menu a.is-paid {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-badge-paid {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fde68a 0%, #f59e0b 55%, #d97706 100%);
  box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.45), 0 2px 6px rgba(245, 158, 11, 0.35);
  /* тёмный текст жёстко: золото светлое в обеих темах */
  color: #3b2300;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
}

body.theme-light .nav-dropdown__menu {
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

@media (min-width: 961px) {
.nav-dropdown__menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      transform 0.2s ease,
      opacity 0.18s ease,
      visibility 0.18s ease;
  }

  .nav-dropdown.is-open > .nav-dropdown__menu {
    display: flex;
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-dropdown.is-open > .nav-dropdown__menu[hidden] {
    display: flex !important;
  }

  .header.header--compact .nav-dropdown__btn {
    font-size: 0.86rem;
  }
}


.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Меню на русском и других языках длинное: держим логотип, навигацию и действия в одной строке.
   Ширина меняется только у шапки, основной контейнер страницы сохраняется. */
@media (min-width: 961px) {
  html .header-inner {
    max-width: 1440px;
    flex-wrap: nowrap;
    gap: clamp(12px, 1.4vw, 24px);
  }

  html .header-inner > .logo-wrap,
  html .header-inner > .header-actions {
    flex: 0 0 auto;
  }

  html .header-inner > .nav {
    align-items: center;
    gap: clamp(10px, 1.4vw, 24px);
    white-space: nowrap;
  }
}

@media (min-width: 961px) and (max-width: 1199px) {
  html .header-inner > .nav {
    gap: 10px;
  }

  html .header-inner > .nav > a,
  html .header-inner .nav-dropdown__btn {
    font-size: 0.85rem;
  }

  html .header-inner > .header-actions {
    gap: 6px;
  }

  html .header-inner .theme-switch-btn,
  html .header-inner .header-icon-btn {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 960px) {
  html .header-inner > .logo-wrap {
    flex: 1 1 0;
    min-width: 0;
  }
}

@media (max-width: 360px) {
  html .header-inner,
  html .header.header--compact .header-inner {
    gap: 6px;
    padding-inline: 10px;
  }

  html .header-inner > .header-actions {
    gap: 2px;
  }

  html .header-inner .header-icon-btn,
  html .header-inner .theme-switch-btn {
    width: 36px;
    height: 40px;
  }

  html .header-inner .nav-toggle {
    width: 40px;
  }

  html .header-inner .logo {
    font-size: 0.72rem;
  }

  html .header-inner .logo-tagline {
    display: none;
  }
}

/* Компактная шапка при прокрутке (класс header--compact вешает script.js) */
.header.header--compact .header-inner {
  padding: 6px 20px;
  gap: 16px;
}

.header.header--compact .logo-wrap {
  gap: 0;
}

.header.header--compact .logo-tagline {
  display: none;
}

.header.header--compact .logo {
  font-size: 1.05rem;
}

@media (min-width: 961px) {
.header.header--compact .nav {
    gap: 16px;
  }

  .header.header--compact .nav a {
    font-size: 0.86rem;
  }

  .header.header--compact .theme-switch-btn {
    width: 36px;
    height: 36px;
    transition: width 0.2s ease, height 0.2s ease;
  }

  .header.header--compact .theme-switch-btn .theme-switch-icon svg {
    width: 22px;
    height: 22px;
  }

  .header.header--compact .header-chat-btn {
    min-height: 40px;
    padding: 8px 14px;
    font-size: 0.9rem;
  }

  .header.header--compact .header-icon-btn {
    width: 36px;
    height: 36px;
  }

  .header.header--compact .header-icon-btn__svg,
  .header.header--compact .header-profile-btn__fallback svg {
    width: 22px;
    height: 22px;
  }
}


@media (max-width: 960px) {
.header.header--compact .header-inner {
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .header.header--compact .logo {
    font-size: clamp(0.72rem, 3.4vw, 1rem);
  }

  .header.header--compact .nav-toggle {
    width: 40px;
    height: 40px;
  }

  .header.header--compact .nav-toggle svg.nav-toggle-icon {
    width: 20px;
    height: 20px;
  }

  .header.header--compact .theme-switch-btn {
    width: 40px;
    height: 40px;
  }

  .header.header--compact .theme-switch-btn .theme-switch-icon svg {
    width: 22px;
    height: 22px;
  }

  .header.header--compact .header-chat-btn {
    min-height: 40px;
    padding-inline: 12px;
    font-size: 0.88rem;
  }

  .header.header--compact .header-icon-btn {
    width: 40px;
    height: 40px;
  }

  .header.header--compact .header-icon-btn__svg,
  .header.header--compact .header-profile-btn__fallback svg {
    width: 22px;
    height: 22px;
  }
}


@media (prefers-reduced-motion: reduce) {
.header-inner,
  .header .logo,
  .header .nav,
  .header .nav a,
  .header .theme-switch-btn,
  .header .header-icon-btn,
  .hero-title-rotating {
    transition: none !important;
  }
}


.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Theme switch: one button, click on sun/moon — icon animates and theme toggles */
.theme-switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.theme-switch-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.theme-switch-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: transparent;
  border: none;
  border-radius: 8px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.theme-switch-btn:hover {
  color: var(--accent);
}

.theme-switch-icon svg {
  width: 26px;
  height: 26px;
}

.theme-switch-input:focus-visible + .theme-switch-btn {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-switch-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-switch-icon--sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.theme-switch-icon--moon {
  opacity: 0;
  transform: scale(0.6) rotate(-90deg);
  pointer-events: none;
}

/* Тёмная тема: показываем луну, солнце «уходит» */
.theme-switch-input:checked + .theme-switch-btn .theme-switch-icon--sun {
  opacity: 0;
  transform: scale(0.6) rotate(90deg);
  pointer-events: none;
}

.theme-switch-input:checked + .theme-switch-btn .theme-switch-icon--moon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  pointer-events: auto;
}

body.theme-light .theme-switch-btn {
  background: transparent;
  border: none;
}

/* Header icon buttons: cart, profile (icon-only, no tile background) */
.header-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.header-icon-btn:hover {
  color: var(--accent);
}

.header-icon-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

body.theme-light .header-icon-btn {
  background: transparent;
  border: none;
}

.header-icon-btn__svg,
.header-profile-btn__fallback svg {
  display: block;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
}

.header-icon-btn__badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-family: var(--font-body, inherit);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  color: #0a0a0b;
  background: var(--accent);
  border-radius: 999px;
  pointer-events: none;
  box-sizing: border-box;
}

.header-icon-btn__badge[hidden] {
  display: none;
}

.header-icon-btn--profile {
  overflow: hidden;
}

.header-profile-btn__avatar {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.header-profile-btn__fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text-muted);
}

.header-profile-btn__fallback[hidden],
.header-profile-btn__avatar[hidden] {
  display: none;
}

/* Contact request dialog */
.chat-panel {
  position:fixed;right:max(24px, env(safe-area-inset-right, 0px));bottom:max(24px, env(safe-area-inset-bottom, 0px));
  width:min(440px, calc(100% - 32px));max-height:calc(100vh - 48px);max-height:calc(var(--chat-viewport-height, 100dvh) - 48px);
  z-index:1201;background:var(--bg-card);border:1px solid var(--border);border-radius:24px;
  box-shadow:0 24px 80px rgba(0,0,0,.3);overflow:hidden;visibility:hidden;opacity:0;transform:translateY(16px);
  transition:opacity .2s,transform .2s,visibility .2s;display:flex;flex-direction:column;
}
.chat-panel.is-open{visibility:visible;opacity:1;transform:translateY(0)}
.chat-panel-inner{display:flex;flex-direction:column;min-height:0;max-height:inherit;width:100%}
.chat-panel-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:24px 24px 18px;flex-shrink:0;border-bottom:1px solid var(--border)}
.chat-panel-eyebrow{margin:0 0 8px;color:var(--accent);font-size:10px;font-weight:700;letter-spacing:1.6px}
.chat-panel-title{font-family:var(--font-head);font-size:1.18rem;font-weight:600;line-height:1.4;margin:0;color:var(--text)}
.chat-panel-intro{font-size:13px;line-height:1.5;color:var(--text-muted);margin:9px 0 0;max-width:290px}
.chat-panel-close{width:36px;height:36px;flex:0 0 36px;padding:0;border:1px solid var(--border);background:var(--bg-elevated);color:var(--text-muted);border-radius:50%;font:24px/1 var(--font-body);cursor:pointer}
.chat-panel-close::after{content:'×'}
.chat-panel-close:hover{color:var(--text);border-color:var(--accent)}
.chat-panel-scroll{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--border) transparent;padding:20px 24px;display:flex;flex-direction:column;gap:16px}
.chat-panel-scroll>*{flex-shrink:0}
.chat-panel-field>label{display:block;margin-bottom:7px;font-size:12px;font-weight:600;color:var(--text)}
.chat-panel-input{display:block;width:100%;box-sizing:border-box;padding:12px 14px;font:400 16px/1.5 var(--font-body);color:var(--text);background:var(--bg-elevated);border:1px solid var(--border);border-radius:12px;transition:border-color .2s,box-shadow .2s}
.chat-panel-input--single{height:46px}
.chat-panel-input--message{min-height:94px;resize:vertical;max-height:240px}
.chat-panel-input::placeholder{color:var(--text-muted);opacity:.8;font-size:14px}
.chat-panel-input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-dim)}
.chat-panel-file-wrap{margin:0}
.chat-panel-file-pick{display:flex;align-items:center;gap:12px;position:relative;padding:14px;border:1px dashed var(--border);border-radius:12px;cursor:pointer;background:var(--accent-dim)}
.chat-panel-file-pick:hover,.chat-panel-file-pick:focus-within{border-color:var(--accent)}
.chat-panel-file-icon{display:grid;place-items:center;width:34px;height:34px;flex-shrink:0;border-radius:10px;background:var(--bg-card);color:var(--accent);font-size:23px}
.chat-panel-file-pick strong{display:block;font-size:13px;font-weight:600;color:var(--text)}
.chat-panel-file-pick small{display:block;font-size:11px;color:var(--text-muted);margin-top:3px}
.chat-panel-file{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.chat-panel-file-selected{display:flex;align-items:center;gap:10px;padding:10px 0 0;font-size:12px}
.chat-panel-file-selected[hidden]{display:none}
#chatFileName{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;color:var(--text)}
#chatFileRemove{border:0;padding:6px;background:transparent;color:var(--text-muted);text-decoration:underline;cursor:pointer;font:inherit}
.chat-panel-file-legal{font-size:10px;line-height:1.5;color:var(--text-muted);margin:8px 0 0}
.chat-panel-file-legal a,.chat-panel-privacy-link{color:inherit;text-decoration:underline;text-underline-offset:2px}
.chat-panel-check{display:flex;align-items:flex-start;gap:10px;position:relative;cursor:pointer;font-size:11px;line-height:1.55;color:var(--text-muted)}
.chat-panel-check-text{flex:1;min-width:0}
.chat-panel-check input{position:absolute;width:20px;height:20px;opacity:0;left:0;top:0;margin:0;z-index:1;cursor:pointer}
.chat-panel-checkmark{flex:0 0 20px;height:20px;border:1px solid var(--border);border-radius:6px;background:var(--bg-elevated);position:relative}
.chat-panel-check input:checked+.chat-panel-checkmark{background:var(--accent);border-color:var(--accent)}
.chat-panel-check input:checked+.chat-panel-checkmark::after{content:'';position:absolute;left:6px;top:3px;width:6px;height:10px;border:solid #082129;border-width:0 2px 2px 0;transform:rotate(45deg)}
.chat-panel-check input:focus-visible+.chat-panel-checkmark{outline:2px solid var(--accent);outline-offset:3px}
.chat-panel-footer{padding:16px 24px 20px;border-top:1px solid var(--border);flex-shrink:0;background:var(--bg-card)}
.chat-panel-footer #chatSendBtn{width:100%;min-height:48px;border-radius:12px;color:#082129;background:var(--accent);font-size:15px;font-weight:700}
.chat-panel-footer #chatSendBtn:disabled{opacity:.65;cursor:wait}
.chat-panel-status{font-size:12px;line-height:1.5;margin-bottom:12px}
.chat-panel-status:empty{display:none}
.chat-panel-status.is-success{color:var(--text)}
.chat-panel-status.is-error{color:#f87171}
body.theme-light .chat-panel-status.is-error{color:#b42332}
.chat-overlay{position:fixed;inset:0;z-index:1200;background:rgba(8,12,18,.5);opacity:0;visibility:hidden;transition:opacity .2s,visibility .2s}
.chat-overlay.is-visible{opacity:1;visibility:visible}
body.chat-panel-open .contact-fab{visibility:hidden;pointer-events:none}
@media(max-width:600px){
 .chat-panel{right:12px;bottom:calc(max(12px,env(safe-area-inset-bottom,0px)) + var(--chat-viewport-bottom,0px));width:calc(100% - 24px);max-height:calc(100vh - 24px);max-height:calc(var(--chat-viewport-height,100dvh) - 24px);border-radius:20px}
 .chat-panel-header{padding:20px 18px 16px}.chat-panel-scroll{padding:16px 18px;gap:14px}.chat-panel-footer{padding:14px 18px 18px}
 .chat-panel-title{font-size:1.1rem}.chat-panel-intro{font-size:12px}.chat-panel-file-legal{font-size:11px}.chat-panel-check{font-size:12px}
}
@media(prefers-reduced-motion:reduce){.chat-panel,.chat-overlay{transition:none}}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.4);
}

.btn-accent {
  background: var(--accent);
  color: var(--bg);
}

.btn-accent:hover {
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-dim);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* --- Hero --- */
.hero {
  padding: 48px 0 92px;
}

@media (max-width: 900px) {
.hero-cta > .btn-lg,
  .hero-cta > #heroShopLink.btn-lg {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
}


.hero-title-rotating.is-changing .hero-title-rotating__text {
  opacity: 0;
  transform: translateY(0.12em);
}

.b2b-docs .section-title {
  margin-bottom: 10px;
}

body.theme-light .hero-subtitle strong {
  color: var(--accent);
}

/* Desktop: keep both hero CTA buttons same size */
.hero-cta > .btn-lg,
.hero-cta > #heroShopLink.btn-lg {
  width: 280px;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-social-icons {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.hero-social-icons--image {
  position: absolute;
  left: 50%;
  bottom: -28px;
  transform: translateX(-50%);
  z-index: 3;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  backdrop-filter: none;
}

.hero-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  box-shadow: none;
  transition: transform 0.16s ease, opacity 0.16s ease;
}

.hero-social-link:hover {
  color: inherit;
  opacity: 0.92;
  transform: translateY(-1px);
}

.hero-social-link img {
  width: 32px;
  height: 32px;
  display: block;
  object-fit: contain;
}

.hero-social-link svg {
  width: 32px;
  height: 32px;
  max-width: 100%;
  max-height: 100%;
  display: block;
}

body:not(.theme-light) .hero-image-wrap {
  border-color: transparent;
  box-shadow: none;
}

body.theme-light .hero-image--light {
  display: block;
}

body.theme-light .hero-image--dark {
  display: none;
}

/* --- Theme: black background --- */
/* Светлая тема */
body.theme-light {
  --bg: #f4f4f5;
  --bg-card: #ffffff;
  --bg-elevated: #e4e4e7;
  --border: rgba(0, 0, 0, 0.1);
  --text: #18181b;
  --text-muted: #52525b;
  --accent-dim: rgba(0, 212, 255, 0.12);
  --shadow-glow: 0 0 40px rgba(0, 212, 255, 0.06);
}

body.theme-light .grid-bg {
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.06) 1px, transparent 1px);
}

body.theme-light .header {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--border);
}

.stores .section-title {
  margin-bottom: 6px;
}

.stores .section-desc {
  margin-bottom: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.card--flip.is-flipped .card-flip-inner {
  transform: rotateY(180deg);
}

body.theme-light .card-face--front .card-face-surface {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  box-shadow:
    0 2px 8px rgba(15, 23, 42, 0.06),
    0 12px 32px rgba(15, 23, 42, 0.08);
}

/* Верхний правый угол: внизу по всей ширине идёт текст описания, подсказка
   там тонула. Сверху справа у всех карточек пусто — иконка читается сразу. */
.card-flip-hint {
  position: absolute;
  top: 6px;
  right: 6px;
  bottom: auto;
  left: auto;
  width: min(44px, 24%);
  height: auto;
  z-index: 6;
  pointer-events: none;
  object-fit: contain;
  display: block;
  /* PNG тёмный — на тёмной карточке делаем светлым */
  filter: invert(1);
  transform-origin: 70% 30%;
  animation: card-flip-hint-float 2.6s ease-in-out infinite;
}

/* Палец «то ближе, то дальше»: подъём плюс масштаб читаются как нажатие.
   Только transform — анимация идёт на композиторе и не вызывает перерасчёт. */
@keyframes card-flip-hint-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.12);
  }
}

@media (prefers-reduced-motion: reduce) {
.card-flip-hint {
    animation: none;
  }
}


body.theme-light .card-flip-hint {
  filter: none;
}

/* Мобильная карточка вдвое уже, и 24% давали почти десктопные 40px.
   Ниже базового правила намеренно: специфичность та же, решает порядок. */
@media (max-width: 760px) {
.card-flip-hint {
    width: 30px;
  }
}


.card-flip-hint--media {
  z-index: 8;
}

body.theme-light .card-face--back .card-face-surface {
  border-color: #e2e8f0;
}

@media (max-width: 560px) {
/* Самый узкий брейкпоинт — иконка не должна быть больше, чем на 760px. */
  .card-flip-hint {
    width: 26px;
  }
}


.card--flip:hover .card-face--front .card-face-surface,
.card--flip:focus-visible .card-face--front .card-face-surface,
.card--flip.is-flipped:hover .card-face--back .card-face-surface,
.card--flip.is-flipped:focus-visible .card-face--back .card-face-surface {
  border-color: rgba(0, 212, 255, 0.35);
}

body.theme-light .card--flip .card-face--front .card-title {
  color: #0f172a;
}

body.theme-light .card--flip .card-text {
  color: #334155;
}

/* --- How we work --- */
.how .container {
  position: relative;
}

.how-switch-btn.is-active {
  color: var(--accent);
  border-color: var(--accent);
}

.how-content.is-visible {
  position: relative;
  visibility: visible;
  height: auto;
  overflow: visible;
  pointer-events: auto;
}

/* --- Calculator --- */
.calculator-section {
  background: linear-gradient(180deg, transparent 0%, rgba(0, 212, 255, 0.03) 50%, transparent 100%);
  overflow: visible;
}

/*
 * На своей странице калькулятор — единственный экран, и полсотни пикселей
 * воздуха сверху отодвигают инструмент за сгиб. На главной этот же блок
 * стоит между другими разделами, там отступ нужен, поэтому правило
 * привязано к body страницы.
 */
body.calculator-page .calculator-section {
  padding-top: 16px;
}

/*
 * Заголовок компактнее обычного заголовка раздела. Владелец: открываешь
 * калькулятор — а сверху название во весь экран. h1 не убираем: страница
 * ранжируется по «калькулятор 3д печати», и без него это потеряется.
 * Уменьшили так, чтобы под ним сразу были видны и переключатель режимов,
 * и верх самого калькулятора.
 */
.calculator-section__head {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
  position: relative;
  z-index: 12;
  overflow: visible;
}

.calculator-section__title {
  margin-bottom: 0;
  font-size: clamp(1.25rem, 1rem + 1.1vw, 1.7rem);
}

.calculator-section__lead {
  margin: 0 auto 8px;
  padding: 0 8px;
  text-align: center;
}

.calculator-section__lead-short {
  display: block;
  font-size: 0.72rem;
  line-height: 1.2;
  color: color-mix(in srgb, var(--text-muted) 90%, transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 420px) {
.calculator-section__lead-short {
    font-size: 0.68rem;
  }
}


.calc-engineer-share-slot > .btn[hidden],
.calc-engineer-share-slot > .calc-share-link-box[hidden] {
  display: none !important;
}

/* На светлой теме голубой по почти белому не читался. */
/*
 * Верхняя строка на всю ширину — под файл. Переключатель режимов уехал
 * ещё выше, к заголовку страницы: в сетке он выглядел пустовато и мешал.
 */
.calculator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  grid-template-areas:
    "drop drop"
    "form result";
  gap: 12px 20px;
  align-items: start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-glow);
}

.calculator > .calc-drop { grid-area: drop; margin-bottom: 0; }
.calculator > .calc-preview { grid-area: preview; }
.calculator > .calculator-form { grid-area: form; }
.calculator > .calculator-result { grid-area: result; }

/* Пока файла нет, показывать в правой верхней ячейке нечего — зона
   загрузки занимает всю строку. С файлом рядом встаёт вид стола. */
.calculator.has-preview {
  grid-template-areas:
    "drop preview"
    "form result";
}

@media (max-width: 980px) {
.calculator {
    /* minmax(0, …), а не 1fr: иначе лента материалов растягивает колонку
       по своей ширине и вылезает за экран. */
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "drop" "form" "result";
    padding: 14px;
  }

  .calculator.has-preview {
    grid-template-areas: "drop" "preview" "form" "result";
  }
}


.calculator-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calc-mode-switch__btn.is-active {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--text);
}

.calc-help-btn {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.calc-help-btn:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}

.calc-help-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.calc-help-tip {
  position: fixed;
  z-index: 400;
  max-width: min(280px, calc(100vw - 24px));
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text-muted);
  pointer-events: none;
}

.calc-help-tip[hidden] {
  display: none !important;
}

/* Длинная справка — например, по налоговым режимам: в колонку 280 px
   она вытягивается на два десятка строк. */
.calc-help-tip--wide {
  max-width: min(440px, calc(100vw - 24px));
  /* Если ни сверху, ни снизу целиком не влезла — крутим её саму. */
  overflow-y: auto;
  pointer-events: auto;
  /* Текст разбит на абзацы переводами строк прямо в data-calc-help. */
  white-space: pre-line;
}

.checkmark {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: var(--bg-elevated);
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}

.calc-check--privacy.is-error {
  color: #ff7a7a;
  animation: calcPrivacyNudge 0.28s ease;
}

.calc-check--privacy.is-error .checkmark {
  border-color: #ff7a7a;
  background: color-mix(in srgb, #ff4d6d 16%, var(--bg-elevated));
  box-shadow: 0 0 0 3px color-mix(in srgb, #ff4d6d 22%, transparent);
}

@keyframes calcPrivacyNudge {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-3px); }
  65% { transform: translateX(3px); }
}

.calc-engineer-tabs__btn.is-active {
  color: var(--text);
  background: var(--bg-card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.calc-yo-easter.is-flipped {
  display: inline-block;
  transform: rotate(180deg);
  transform-origin: center center;
  transition: transform 0.35s ease;
}

/*
 * Колонка тянется на всю высоту строки, а форма внутри прижата к низу —
 * иначе под ценой оставалась пустая треть панели. Липкости тут больше нет:
 * с растянутой колонкой она ничего не давала.
 */
.calculator-result {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.calculator > .calculator-result {
  align-self: stretch;
}

body.theme-light .calc-privacy-text { color: color-mix(in srgb, var(--text) 92%, black 8%); }

/* --- Footer --- */
.footer {
  padding: 20px 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

/*
 * Подчёркивание тут не украшение, а требование доступности: ссылка стоит
 * внутри обычной строки подвала, и без него её отличает только цвет —
 * дальтоник и человек на выцветшем экране её просто не найдут.
 * Смещение — чтобы линия не резала хвосты у «р» и «у».
 */
.footer-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.footer-link:hover {
  text-decoration-thickness: 2px;
}

.footer-copyright {
  flex: 1;
  text-align: center;
  min-width: 200px;
}

.footer-inn {
  white-space: nowrap;
  font-size: 0.85rem;
}

@media (max-width: 700px) {
.footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .footer-copyright {
    order: 1;
    width: 100%;
  }
}


/* --- MakerWorld block --- */
.makerworld-title.section-title {
  max-width: 100%;
  margin-inline: auto;
  padding-inline: 10px;
  box-sizing: border-box;
  line-height: 1.3;
  text-align: center;
  font-size: clamp(0.92rem, 3.8vw, 2.25rem);
  letter-spacing: -0.02em;
}

@media (max-width: 959px) {
.makerworld-title.section-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: clamp(0.88rem, 4.2vw, 1.35rem);
  }
}


@media (min-width: 960px) {
.makerworld-title.section-title {
    white-space: nowrap;
    display: block;
    font-size: clamp(1.2rem, 2vw, 2.25rem);
  }
}


body.theme-light .makerworld-arrow {
  filter: drop-shadow(0 1px 4px rgba(15, 23, 42, 0.2));
}

/* --- Mobile navigation, FAB, polish (≤960px) --- */

.nav-toggle {
  display: none;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.nav-toggle:hover {
  border-color: rgba(0, 212, 255, 0.45);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-toggle-icon {
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}

.nav-toggle-icon--close {
  display: none;
}

.nav-toggle.is-open .nav-toggle-icon--menu {
  display: none;
}

.nav-toggle.is-open .nav-toggle-icon--close {
  display: block;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  pointer-events: none;
}

.nav-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-chat-fab {
  display: none;
}

/* Telegram widget button + panel */
.tg-widget-fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  z-index: 260;
  width: 96px;
  height: 96px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: none;
  outline: none;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.tg-widget-fab__icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.45));
}

.tg-widget-fab[aria-expanded="true"] .tg-widget-fab__icon {
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.55));
}

.contact-fab.is-open .contact-fab-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.tg-widget-fab:hover {
  transform: translateY(-2px) scale(1.03);
}

.tg-widget-fab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.28);
}

.tg-widget {
  position: fixed;
  inset: 0;
  z-index: 280;
}

.tg-widget[hidden] {
  display: none !important;
}

.tg-widget__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.tg-widget__dialog {
  position: absolute;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(84px, calc(env(safe-area-inset-bottom, 0px) + 84px));
  width: min(380px, calc(100% - 24px));
  max-width: calc(100% - 24px);
  max-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.tg-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.tg-widget__head-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tg-widget__avatar {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: #2f3363;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tg-widget__avatar--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.tg-widget__title-wrap {
  min-width: 0;
}

.tg-widget__title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.tg-widget__title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.25;
}

.tg-widget__online-dot {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35);
}

.tg-widget__close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.tg-widget__messages {
  padding: 10px 12px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 210px;
}

.tg-widget__msg {
  max-width: 88%;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.35;
  white-space: pre-wrap;
}

.tg-widget__msg--bot {
  align-self: flex-start;
  background: color-mix(in srgb, var(--bg-elevated) 88%, white 12%);
  border: 1px solid var(--border);
}

.tg-widget__msg--user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--bg);
}

.tg-widget__message-link {
  color: var(--accent);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.tg-widget__msg--user .tg-widget__message-link {
  color: inherit;
}

.tg-widget__form {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
}

.tg-widget__input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.9rem;
  padding: 10px 12px;
}

.tg-widget__send {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, filter 0.15s ease, opacity 0.15s ease;
}

.tg-widget__send:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: scale(1.03);
}

.tg-widget__send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.tg-widget__send-icon {
  width: 22px;
  height: 22px;
  display: block;
  margin-left: 2px;
}

.tg-widget__hint {
  margin: 0;
  padding: 0 12px 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tg-widget__quick-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed color-mix(in srgb, var(--border) 85%, transparent);
}

.tg-widget__quick {
  border: 0;
  border-radius: 999px;
  padding: 9px 12px;
  background: #dceff6;
  color: #263241;
  text-align: left;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.tg-widget__quick:hover {
  filter: brightness(0.98);
}

body.theme-light .tg-widget__msg--bot {
  background: #f1f3f6;
}

@media (max-width: 400px) {
.header-inner {
    gap: 8px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .logo {
    font-size: clamp(0.72rem, 4.2vw, 0.88rem);
  }

  .logo-tagline {
    font-size: 0.52rem;
  }

  .header-actions {
    gap: 6px;
  }
}


@media (max-width: 960px) {
.header {
    overflow-x: clip;
    max-width: 100%;
  }

  .nav-toggle {
    display: inline-flex;
    position: relative;
    z-index: 3;
  }

  .header-inner {
    position: relative;
    z-index: 2;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
    overflow-x: clip;
    max-width: 100%;
    min-width: 0;
  }

  .logo-wrap {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }

  .logo {
    font-size: clamp(0.78rem, 3.6vw, 1.05rem);
    letter-spacing: -0.03em;
  }

  .logo-tagline {
    font-size: clamp(0.55rem, 2.5vw, 0.65rem);
  }

  .header-actions {
    width: auto;
    max-width: none;
    margin-left: 0;
    flex-shrink: 0;
    gap: 8px;
  }

  .header-chat-btn {
    padding-inline: 14px;
    min-height: 44px;
  }

  .nav {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: auto;
    bottom: auto;
    width: min(260px, calc(100% - 28px));
    max-height: min(380px, 70dvh);
    margin: 0;
    padding: 6px 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
    z-index: 2;
    transform: translateY(-6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      transform 0.22s ease,
      opacity 0.2s ease,
      visibility 0.2s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.theme-light .nav {
    background: #fff;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav a {
    display: block;
    padding: 12px 16px;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
  }

  .nav > a:last-child {
    border-bottom: none;
  }

  .nav-dropdown {
    border-bottom: 1px solid var(--border);
  }

  .nav-dropdown__btn {
    width: 100%;
    justify-content: space-between;
    padding: 12px 16px;
    font-size: 1rem;
    color: var(--text);
  }

  .nav-dropdown__menu {
    position: static;
    min-width: 0;
    margin: 0;
    padding: 0 0 6px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .nav-dropdown.is-open > .nav-dropdown__menu {
    display: flex;
  }

  .nav-dropdown.is-open > .nav-dropdown__menu[hidden] {
    display: flex !important;
  }

  .nav-dropdown__menu a {
    padding: 10px 16px 10px 28px;
    border-bottom: none;
    font-size: 0.95rem;
    color: var(--text-muted);
  }

  .nav-dropdown__menu a:hover {
    background: transparent;
  }

  main {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-chat-fab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: fixed;
    z-index: 120;
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    padding: 12px 18px;
    min-height: 48px;
    border: none;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--bg);
    background: var(--accent);
    box-shadow: 0 10px 28px rgba(0, 212, 255, 0.35);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .mobile-chat-fab:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 36px rgba(0, 212, 255, 0.45);
  }

  .mobile-chat-fab:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
  }

  .mobile-chat-fab__icon {
    flex-shrink: 0;
  }

  .hero {
    padding: 28px 0 56px;
  }

  .hero-cta .btn-lg {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }
  .hero-cta > #heroShopLink.btn-lg {
    width: 100%;
    min-height: 48px;
  }

  .hero-social-link {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
  }

  .hero-social-link img {
    width: 32px;
    height: 32px;
  }

  .hero-social-icons--image {
    bottom: -20px;
  }
}


/* Скрытый вход в админку: © выглядит как обычный текст */
.footer-secret-trigger {
  cursor: default;
  color: inherit;
  font: inherit;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  box-shadow: none;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.footer-secret-trigger:hover,
.footer-secret-trigger:focus {
  color: inherit;
  text-decoration: none;
  outline: none;
}

.footer-secret-trigger:focus-visible {
  outline: 1px dotted var(--accent);
  outline-offset: 2px;
}

body.theme-light .admin-gate-modal__box {
  background: #fff;
}

/* --- Shop blocks --- */
.section-title-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  max-width: 100%;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 42%, transparent);
  text-underline-offset: 0.16em;
  text-decoration-thickness: 2px;
  border-radius: 6px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.section-title-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.section-title-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.section-title-link__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0.88;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.section-title-link:hover .section-title-link__arrow,
.section-title-link:focus-visible .section-title-link__arrow {
  opacity: 1;
  transform: translateX(4px);
}

.section-title-link__arrow svg {
  display: block;
  width: 1.05em;
  height: 1.05em;
}

.shop-filter-option:hover,
.shop-filter-option.is-active {
  border-color: rgba(0, 212, 255, 0.45);
  color: var(--accent);
}

@media (max-width: 620px) {
body.shop-mobile-dock-visible .contact-fab .tg-widget-fab {
    bottom: calc(44px + max(8px, env(safe-area-inset-bottom, 0px)));
    transform: scale(0.88);
  }

  body.shop-cart-open .shop-mobile-dock,
  body.shop-modal-open .shop-mobile-dock,
  body.user-modal-open .shop-mobile-dock {
    display: none !important;
  }

  body.theme-light .shop-mobile-dock {
    box-shadow: 0 -4px 14px rgba(15, 23, 42, 0.08);
  }
}


body.theme-light .shop-card-arrow {
  border-color: rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

body.theme-light .shop-card-arrow:hover {
  background: #fff;
}

body.theme-light .shop-card-cart-add {
  color: #18181b;
}

body.theme-light .shop-card-cart-stepper__btn {
  background: color-mix(in srgb, var(--accent) 16%, #fff);
  color: #0e7490;
}

body.theme-light .shop-card-cart-stepper__center {
  background: color-mix(in srgb, var(--accent) 10%, #fff);
  color: #0e7490;
}

body.theme-light .shop-modal__arrow {
  border-color: rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

body.theme-light .shop-modal__arrow:hover {
  background: #fff;
}

.shop-modal__thumb.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.45);
}

body.theme-light .shop-modal__qty-pill {
  border-color: #111827;
  color: #111827;
}

body.theme-light .shop-modal__qty-pill:hover {
  background: rgba(0, 0, 0, 0.04);
}

body.theme-light .shop-modal__qty-cart {
  border-color: #111827;
  color: #111827;
}

body.theme-light .shop-modal__qty-cart:hover {
  background: rgba(0, 0, 0, 0.04);
}

body.theme-light .shop-modal__qty-badge {
  color: #18181b;
}

.shop-modal__qty-cart.is-disabled {
  pointer-events: none;
  opacity: 0.42;
  cursor: not-allowed;
}

#checkoutPayBtn {
  min-width: 260px;
  font-size: 1rem;
  font-weight: 700;
}

.shop-status.is-error { color: #f87171; }
.shop-status.is-success { color: var(--accent); }

.shop-payment-notice.is-success {
  border-color: rgba(0, 212, 255, 0.45);
  color: var(--accent);
}

.shop-payment-notice.is-error {
  border-color: rgba(248, 113, 113, 0.45);
  color: #f87171;
}

@media (max-width: 900px) {
#checkoutPayBtn {
    width: 100%;
    min-width: 0;
  }
}


@media (max-width: 760px) {
.section-title-link {
    flex-wrap: wrap;
    row-gap: 0.15em;
  }
}


#userModal .user-auth-form[hidden],
#userModal form#userRegisterForm[hidden],
#userModal form#userLoginForm[hidden] {
  display: none !important;
}

/* [hidden] на шагах и на img — иначе display:flex / display:block из наших же правил оставляет блоки видимыми */
#userModal #userAuthStep[hidden],
#userModal #userProfileStep[hidden] {
  display: none !important;
}

body.theme-light .user-discount-card {
  border-color: rgba(15, 23, 42, 0.1);
  background: #f8fafc;
}

body.theme-light .user-discount-progress {
  background: rgba(15, 23, 42, 0.08);
}

.user-actions .btn {
  flex: 1 1 auto;
}

.user-status.is-success {
  color: var(--accent);
}

.user-status.is-error {
  color: #f87171;
}

/* OAuth только на экране входа, не регистрации */
#userAuthStep:has(#userRegisterForm:not([hidden])) .user-auth-login-panel,
#userAuthStep:has(#userRegisterForm:not([hidden])) #userAuthOauth {
  display: none !important;
}

.user-auth-oauth__vk-widget.is-fallback .user-auth-oauth__btn--vk-fallback {
  width: 100%;
}

body.theme-light .user-auth-oauth__btn--yandex-fallback {
  color: #fff;
  background: #000;
  border-color: rgba(0, 0, 0, 0.85);
}

.user-auth-oauth__yandex-widget.is-fallback .user-auth-oauth__btn--yandex-fallback {
  width: 100%;
}

body.theme-light .user-auth-divider::before,
body.theme-light .user-auth-divider::after {
  background: rgba(15, 23, 42, 0.12);
}

body.theme-light .user-auth-oauth-legal {
  border-color: rgba(15, 23, 42, 0.12);
  background: color-mix(in srgb, #f8fafc 92%, var(--accent) 8%);
}

body.theme-light .user-auth-consents,
body.theme-light .user-auth-legal {
  border-color: rgba(15, 23, 42, 0.12);
  background: color-mix(in srgb, #f8fafc 92%, var(--accent) 8%);
}

.user-avatar-stack.is-max .user-avatar__square--hero {
  box-shadow:
    0 0 0 2px rgba(0, 212, 255, 0.35),
    0 0 32px rgba(0, 212, 255, 0.22),
    0 14px 34px rgba(0, 0, 0, 0.38);
}

body.theme-light .user-avatar__square {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.12);
}

.user-discount-badge.is-max {
  flex-direction: column;
  gap: 1px;
  font-size: 0.62rem;
  padding: 6px 4px;
}

body.theme-light #userProfileStep .user-auth-input[readonly] {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.12);
}

body.theme-light .user-field input[readonly],
body.theme-light .user-field input:disabled {
  background: rgba(15, 23, 42, 0.045);
  border-color: rgba(15, 23, 42, 0.1);
}

.user-profile-footer .btn {
  min-width: 140px;
}

body.theme-light .user-order {
  border-color: rgba(15, 23, 42, 0.12);
  background: #f8fafc;
}

.user-order__actions .btn,
.user-order__pdf {
  padding: 5px 10px;
  min-height: 30px;
  font-size: 0.82rem;
  line-height: 1.1;
}

.about-filter-btn.is-active,
.about-filter-btn:hover {
  border-color: rgba(0, 212, 255, 0.45);
  color: var(--accent);
}

.about-post__react.is-active {
  border-color: rgba(0, 212, 255, 0.55);
  color: var(--accent);
  background: rgba(0, 212, 255, 0.1);
}

.about-comment__react.is-active {
  border-color: rgba(0, 212, 255, 0.55);
  color: var(--accent);
  background: rgba(0, 212, 255, 0.1);
}

.legal-tabs__btn.is-active {
  border-color: rgba(0, 212, 255, 0.55);
  color: var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.15);
}

@keyframes legal-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 420px) {
.hero-social-icons--image {
    gap: 6px;
  }

  .hero-social-link {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }

  .hero-social-link img,
  .hero-social-link svg {
    width: 28px;
    height: 28px;
  }
}


.signgen-header .logo {
  font-size: 1.05rem;
  line-height: 1.1;
}

.signgen-header__nav .btn {
  padding: 6px 12px;
  font-size: 0.82rem;
  line-height: 1.2;
  border-width: 1px;
  min-height: 0;
}

.signgen-header__nav .btn:hover {
  transform: none;
}

/* Пульсирующее свечение — пока кнопку ни разу не открыли. */
@keyframes signgen-about-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5), 0 0 8px rgba(245, 158, 11, 0.3);
    border-color: rgba(245, 158, 11, 0.7);
    background: rgba(245, 158, 11, 0.14);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(245, 158, 11, 0), 0 0 22px rgba(245, 158, 11, 0.8);
    border-color: #fbbf24;
    background: rgba(245, 158, 11, 0.3);
  }
}

@keyframes signgen-about-heart {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.28);
  }
}

.signgen-about-btn.is-glowing {
  animation: signgen-about-glow 1.9s ease-in-out infinite;
}

.signgen-about-btn.is-glowing .signgen-about-btn__heart {
  animation: signgen-about-heart 1.9s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
.signgen-about-btn.is-glowing,
  .signgen-about-btn.is-glowing .signgen-about-btn__heart {
    animation: none;
  }
  .signgen-about-btn.is-glowing {
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.6);
    border-color: #fbbf24;
  }
}


.signgen-donate__chip.is-active {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #1a1206;
}

.signgen-welcome__body .signgen-donate__status.is-error {
  color: #fca5a5;
}

@media (max-width: 560px) {
.signgen-header .logo {
    font-size: 0.95rem;
  }

  .signgen-header__nav .btn,
  .signgen-about-btn {
    padding: 5px 9px;
    font-size: 0.75rem;
  }

  /* Освобождаем место под «О проекте»: логотип слева ведёт туда же, что и эта кнопка. */
  .signgen-header__nav .btn-outline {
    display: none;
  }
}


/* --- Светлая тема --- */
body.theme-light .signgen-about-btn {
  border-color: #d97706;
  background: rgba(245, 158, 11, 0.16);
  color: #92400e;
}

body.theme-light .signgen-about-btn:hover {
  background: rgba(245, 158, 11, 0.28);
  color: #7c2d12;
}

body.theme-light .signgen-donate__title,
body.theme-light .signgen-welcome__body .signgen-donate__lead strong,
body.theme-light .signgen-donate__chip {
  color: #b45309;
}

body.theme-light .signgen-welcome__body .signgen-donate__status {
  color: #b45309;
}

body.theme-light .signgen-welcome__body .signgen-donate__status.is-error {
  color: #b91c1c;
}

body.theme-light .signgen-donate__chip.is-active {
  color: #1a1206;
}

body.theme-light .signgen-welcome__body .signgen-donate__thanks {
  background: rgba(34, 197, 94, 0.14);
  border-color: #16a34a;
  color: #15803d;
}

.signgen-welcome__socials .hero-social-link {
  width: 44px;
  height: 44px;
  color: var(--text, #e2e8f0);
}

.signgen-welcome__socials .hero-social-link img,
.signgen-welcome__socials .hero-social-link svg {
  width: 28px;
  height: 28px;
}

.signgen-share__icon.is-done {
  color: #22c55e;
}

/* Атрибут hidden на кнопке ОК проигрывает display у .btn-block, поэтому
   гасим явно — иначе во время отсчёта видно и полосу, и кнопку. */
.signgen-welcome__actions .btn[hidden] {
  display: none;
}

.signgen-switch__item.is-current {
  color: var(--accent, #00d4ff);
  font-weight: 700;
}

/*
 * Телефон: подпись убираем совсем, остаётся стрелка. Логотип, «О проекте»
 * и «Связаться» вместе с именем генератора в 375 px не помещаются, и flex
 * начинает резать логотип до «СКО». Имя тут не потеря: какой это генератор,
 * видно по заголовку панели прямо под шапкой, а стрелке остаётся только
 * работа перехода.
 */
@media (max-width: 560px) {
.logo-wrap {
    flex: 0 0 auto;
  }
}


.signgen-assembly__mode-btn.is-active {
  background: #1e293b;
  color: #f8fafc;
  box-shadow: inset 0 0 0 1px #475569;
}

.signgen-warn.is-info {
  background: rgba(14, 116, 144, 0.18);
  border-color: rgba(56, 189, 248, 0.45);
  color: #bae6fd;
}

body.theme-light .signgen-range__btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.theme-light .signgen-range__btn:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: var(--accent, #0ea5e9);
}

.signgen-fontpick__item.is-selected {
  background: rgba(56, 189, 248, 0.2);
}

body.theme-light .signgen-fontpick__btn,
body.theme-light .signgen-fontpick__pop {
  background: #fff;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.theme-light .signgen-fontpick__search-wrap,
body.theme-light .signgen-fontpick__search {
  background: #fff;
  border-color: #cbd5e1;
  color: #0f172a;
}

.signgen-frame-controls.is-locked,
.signgen-snap-controls.is-locked,
.signgen-lip-ribs.is-locked,
.signgen-holder-controls.is-locked {
  opacity: 0.45;
  pointer-events: none;
}

body.theme-light .signgen-page,
body.theme-light.signgen-page {
  background: #f1f5f9;
  color: #0f172a;
}

body.theme-light .signgen-header {
  background: rgba(255, 255, 255, 0.92);
  border-color: #cbd5e1;
}

body.theme-light .signgen-panel {
  background: #fff;
  border-color: #cbd5e1;
}

body.theme-light .signgen-group {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.theme-light .signgen-input {
  background: #fff;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.theme-light .signgen-viewport {
  background: radial-gradient(ellipse at 50% 30%, #e2e8f0 0%, #f8fafc 70%);
}

/* Привязанный способ — спокойный статус с галочкой, а не предложение действия. */
.user-link-panel__label.is-linked {
  color: var(--text-muted);
  font-weight: 500;
}

.user-link-panel__label.is-linked::before {
  content: '✓';
  margin-right: 6px;
  color: #4ade80;
  font-weight: 700;
}

@keyframes stengen-hint-sway {
  0%, 100% { transform: translateX(-3px); }
  50% { transform: translateX(3px); }
}

.stengen-seg__btn.is-active {
  background: var(--accent, #38bdf8);
  color: #0f172a;
}

body.theme-light .stengen-viewport {
  background: radial-gradient(ellipse at 50% 30%, #e8edf4 0%, #cfd8e3 70%);
}

body.theme-light .stengen-line {
  background: rgba(15, 23, 42, 0.03);
}

body.theme-light .stengen-seg,
body.theme-light .stengen-seg--view,
body.theme-light .stengen-zoom,
body.theme-light .stengen-readout {
  background: rgba(255, 255, 255, 0.92);
}

.stengen-art__item.is-active {
  border-color: var(--accent, #38bdf8);
  background: rgba(56, 189, 248, 0.18);
}

.stengen-art__item.is-active svg path {
  color: #e0f2fe;
}

body.theme-light .stengen-art__item {
  background: rgba(15, 23, 42, 0.04);
}

body.theme-light .stengen-art__item svg path {
  color: #334155;
}

.neongen-tpl.is-active {
  background: var(--accent, #38bdf8);
  border-color: var(--accent, #38bdf8);
  color: #0f172a;
}

.neongen-seg__btn.is-active {
  background: var(--accent, #38bdf8);
  color: #0f172a;
}

.neongen-legend.is-in {
  background: #22d3ee;
}

.neongen-legend.is-out {
  background: transparent;
  border: 2px solid #94a3b8;
}

/* Тот же жёлтый, которым на холсте отмечены концы, поставленные руками. */
.neongen-legend.is-manual {
  background: #facc15;
}

body.theme-light .neongen-viewport {
  background: radial-gradient(ellipse at 50% 35%, #e8edf4 0%, #cfd8e3 70%);
}

body.theme-light .neongen-seg,
body.theme-light .neongen-seg--view,
body.theme-light .neongen-zoom,
body.theme-light .neongen-readout,
body.theme-light .neongen-glowbar,
body.theme-light .neongen-tpl {
  background: rgba(255, 255, 255, 0.92);
}

.neongen-tplcard.is-active {
  border-color: var(--accent, #38bdf8);
  background: rgba(56, 189, 248, 0.12);
  color: #e2e8f0;
}

body.theme-light .neongen-tplbtn,
body.theme-light .neongen-tplpop { background: #fff; }

/*
 * «Разработки» карточками — как меню в генераторах: снимок, метка, название.
 * Разметку собирает _dev/scripts/build-gen-menu.py (там же список).
 */
.nav-dropdown__menu--cards {
  padding: 20px 12px 12px;
}
.nav-dropdown.is-open > .nav-dropdown__menu--cards,
.nav-dropdown.is-open > .nav-dropdown__menu--cards[hidden] {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 8px;
}
.nav-dropdown__menu--cards a.nav-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 6px 6px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(127, 127, 127, 0.04);
  white-space: normal;
}
.nav-card picture,
.nav-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: 7px;
  object-fit: cover;
  background: #0b1220;
}
.nav-card picture { margin-bottom: 3px; }
/* Метка — плашкой на верхнем крае карточки, наполовину снаружи, как в кабинете.
   По центру и ярче (владелец, 13.10.2026: надписи плохо видно) */
.nav-card__kind {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  padding: 2px 11px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px;
  background: var(--bg-card, #111827);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.45;
  white-space: nowrap;
}
body.theme-light .nav-card__kind { background: #fff; }
.nav-card--paid .nav-card__kind { color: #f59e0b; border-color: rgba(245, 158, 11, 0.45); }
.nav-card__title {
  padding: 0 2px;
  color: var(--text);
  text-align: center;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.25;
}
.nav-dropdown__menu--cards a.nav-card:hover .nav-card__title,
.nav-card.is-current .nav-card__title { color: var(--accent); }
.nav-card.is-current,
.nav-card.is-current .nav-card__kind { border-color: var(--accent); }

@media (min-width: 961px) {
  .nav-dropdown__menu--cards {
    width: min(820px, calc(100vw - 32px));
  }
}
/* на ноутбуке «Разработки» стоят правее центра — три столбца, чтобы меню не вылезло за край */
@media (min-width: 961px) and (max-width: 1279px) {
  .nav-dropdown.is-open > .nav-dropdown__menu--cards,
  .nav-dropdown.is-open > .nav-dropdown__menu--cards[hidden] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .nav-dropdown__menu--cards { width: 620px; }
}
/* в выезжающем меню телефона панель узкая — строки: снимок слева, метка и название справа */
@media (max-width: 960px) {
  .nav-dropdown.is-open > .nav-dropdown__menu--cards,
  .nav-dropdown.is-open > .nav-dropdown__menu--cards[hidden] {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 14px 10px 10px;
  }
  .nav-dropdown__menu--cards a.nav-card {
    grid-template-columns: 76px 1fr;
    align-items: center;
    column-gap: 10px;
    padding: 8px 6px 6px;
  }
  .nav-card picture { margin: 0; }
  .nav-card__kind { left: 96px; transform: none; }
  .nav-card__title { font-size: 0.9rem; text-align: left; }
}
