/* Shopix AI: общие стили. Дизайн «Оранжерея» (15.10.2026): кость, шалфей, сосна, тёплый свет. */

/* ---------- Шрифты (свои копии, без внешних запросов) ---------- */

@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/manrope-cyrillic-400-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/manrope-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/manrope-cyrillic-500-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/manrope-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/manrope-cyrillic-600-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/manrope-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/manrope-cyrillic-700-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/manrope-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/cormorant-garamond-cyrillic-500-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/cormorant-garamond-cyrillic-600-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 500; font-display: swap; src: url('/assets/fonts/cormorant-garamond-cyrillic-500-italic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 500; font-display: swap; src: url('/assets/fonts/cormorant-garamond-latin-500-italic.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;

  /* Палитра «Оранжерея» */
  --bone: #F5F2EA;          /* основной фон */
  --paper: #FBFAF6;
  --paper-2: #FFFEFB;
  --mist: #E6EBDF;
  --sage-light: #DCE5D6;
  --sage: #9DB898;
  --sage-2: #7FA27B;
  --moss: #4F6F52;
  --pine: #14472F;          /* только ключевые кнопки, знак, мелкие акценты */
  --pine-top: #1C5A3C;
  --pine-hover: #2C6A49;
  --peach: #F6E2CC;
  --peach-2: #EED4BA;
  --apricot: #E8B98C;
  --cinnamon: #7A4A26;
  --cinnamon-2: #8A5530;

  --text: #1F2A22;
  --text-2: #3E4A41;
  --text-secondary: #56625A;
  --text-muted: #6A746C;
  --text-faint: #8A938B;

  --line: #E4DFD2;
  --line-2: #E0DBCE;
  --line-strong: #C9CFBF;
  --line-input: #D9D4C6;

  --danger: #9A3B26;
  --danger-2: #B4533A;
  --danger-bg: #FBEDE6;
  --danger-border: #F0D2C4;

  /* Совместимость со старыми именами (используются в стилях страниц) */
  --green: var(--moss);
  --green-dark: var(--pine);
  --green-hover: var(--pine-hover);
  --green-light: var(--sage-light);
  --green-pale: #EDF2E8;
  --green-line: #C3D0BD;
  --white: #FFFFFF;
  --page: var(--bone);
  --surface: var(--paper-2);
  --surface-muted: var(--paper);
  --border: var(--line);
  --border-strong: var(--line-strong);

  --grad-pine: linear-gradient(180deg, var(--pine-top) 0%, var(--pine) 100%);
  --grad-paper: linear-gradient(180deg, #FFFEFB 0%, #F6F3EB 100%);
  --grad-sage: linear-gradient(180deg, #E6EDE0 0%, #D6E2CF 100%);
  --shadow-pine: inset 0 1px 0 rgba(255, 255, 255, .14), 0 14px 30px -14px rgba(20, 71, 47, .7);
  --shadow-card: 0 30px 60px -40px rgba(31, 42, 34, .3);
  --shadow-float: 0 24px 60px -20px rgba(31, 42, 34, .35);

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --radius-xl: 32px;

  --max: 1280px;
  --max-narrow: 760px;
  --gutter: clamp(16px, 4vw, 56px);
  --nav-h: 64px;

  --font: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bone);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Тёплый свет справа вверху: одно «солнечное пятно» на всех страницах */
body::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: min(110vh, 1100px);
  background: radial-gradient(45% 55% at 100% 0%, rgba(245, 214, 184, .45) 0%, rgba(247, 214, 216, .07) 50%, rgba(245, 214, 184, 0) 70%);
  pointer-events: none;
  z-index: -1;
}

main { flex: 1 0 auto; }

h1, h2, h3, p, ul, ol { margin-top: 0; }

h1, h2, h3 {
  color: var(--text);
  font-weight: 700;
  line-height: 1.2;
}

/* Заголовки страниц — антиквой */
h1, .h-serif {
  font-family: var(--serif);
  font-variant-numeric: lining-nums;
  font-weight: 500;
  letter-spacing: -.015em;
  line-height: 1;
}

a { color: var(--pine); text-decoration: none; }
a:hover { color: var(--pine-hover); }

img, svg { max-width: 100%; }

button, input, textarea, select {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--pine);
  color: var(--bone);
  font-weight: 600;
}

.skip-link:focus { top: 8px; color: var(--bone); }

.container {
  width: 100%;
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 72px);
}

.container--narrow { max-width: 900px; }

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--sm { width: 16px; height: 16px; }
.icon--folder, .icon--spark, .icon--petal { stroke: none; }
.icon--petal { width: 14px; height: 14px; }

/* Подпись-капс над заголовком */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  color: var(--moss);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow--petal::before {
  content: "";
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: url("/assets/petal.svg") no-repeat center / contain;
}

/* Значок лепестка рядом с текстом */
.petal-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.petal-note::before {
  content: "";
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  background: url("/assets/petal.svg") no-repeat center / contain;
}

/* ---------- Логотип ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  color: var(--text);
  white-space: nowrap;
  line-height: 1;
}

.brand:hover { color: var(--text); }
.brand__mark { display: block; width: 28px; height: 28px; }
.brand__name { font-family: var(--serif); font-size: 25px; font-weight: 600; letter-spacing: -.01em; }
.brand__ai { align-self: flex-end; margin: 0 0 2px -2px; color: var(--moss); font-size: 11px; font-weight: 700; letter-spacing: .14em; }

/* ---------- Верхняя панель ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(201, 207, 191, .6);
  background: rgba(251, 250, 246, .78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.topbar__inner {
  max-width: 1440px;
  min-height: 68px;
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

body[data-header="public"] .topbar__inner { min-height: 80px; padding: 16px clamp(20px, 5vw, 72px); }
body[data-header="public"] .brand__mark { width: 30px; height: 30px; }
body[data-header="public"] .brand__name { font-size: clamp(23px, 2vw, 27px); }
body[data-header="public"] .brand__ai { font-size: 12px; }

.topbar__links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.topbar__nav { display: flex; align-items: center; gap: 36px; }

.topbar__link {
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
}

.topbar__link:hover { color: var(--pine); }

.topbar__auth { display: inline-flex; align-items: center; gap: 6px; }
.topbar__auth .topbar__link { padding: 10px clamp(8px, 1vw, 14px); color: var(--text); font-weight: 600; white-space: nowrap; }

/* Основное меню приложения: на компьютере таблетки в шапке, на телефоне — панель внизу */
.main-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.main-nav__link {
  min-height: 40px;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
  transition: color .15s ease, background .15s ease;
}

.main-nav__link .icon { display: none; }
.main-nav__link:hover { background: rgba(220, 229, 214, .5); color: var(--pine); }

.main-nav__link[aria-current="page"] {
  background: linear-gradient(180deg, #E6EDE0, #DCE5D6);
  color: var(--pine);
}

/* Баланс в шапке: лепесток, число и кнопка «+» */
.credit-chip {
  min-height: 40px;
  padding: 7px 8px 7px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #E0DBCE;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFFEFB, #F1EEE4);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.credit-chip:hover { color: var(--text); border-color: var(--line-strong); }
.credit-chip .icon--petal { width: 18px; height: 18px; }

.credit-chip::after {
  content: "+";
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pine);
  color: var(--bone);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}

.credit-chip--low { border-color: var(--danger-border); background: var(--danger-bg); color: var(--danger); }

/* ---------- Кнопки ---------- */

.btn {
  min-height: 44px;
  padding: 11px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, .6);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}

.btn:hover { border-color: var(--moss); background: rgba(255, 255, 255, .9); color: var(--text); }

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: .55;
  cursor: not-allowed;
}

.btn--primary {
  border-color: transparent;
  background: var(--grad-pine);
  box-shadow: var(--shadow-pine);
  color: var(--bone);
}

.btn--primary:hover { border-color: transparent; background: linear-gradient(180deg, #226848, #17503A); color: var(--bone); }

.btn--primary:disabled {
  opacity: 1;
  background: #D5D9CE;
  box-shadow: none;
  color: #F7F6F1;
}

.btn--paper {
  border-color: transparent;
  background: linear-gradient(180deg, #FFFEFB, #F4F1E8);
  box-shadow: 0 6px 16px -10px rgba(31, 42, 34, .4);
}

.btn--danger {
  border-color: var(--danger-border);
  background: var(--paper-2);
  color: var(--danger);
}

.btn--danger:hover { border-color: var(--danger-2); background: var(--danger-bg); color: var(--danger); }

.btn--danger-solid {
  border-color: var(--danger);
  background: var(--danger);
  color: #FFF7F2;
}

.btn--danger-solid:hover { background: #82301E; border-color: #82301E; color: #FFF7F2; }

.btn--sm { min-height: 36px; padding: 8px 16px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--lg { min-height: 56px; padding: 16px 30px; font-size: 16px; }

.btn--text {
  min-height: 36px;
  padding: 6px 10px;
  border-color: transparent;
  background: transparent;
  color: var(--pine);
}

.btn--text:hover { border-color: transparent; background: rgba(220, 229, 214, .5); color: var(--pine); }

.spinner {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 2px solid rgba(245, 242, 234, .35);
  border-top-color: var(--bone);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.spinner--dark { border-color: rgba(20, 71, 47, .15); border-top-color: var(--pine); }
.spinner--lg { width: 28px; height: 28px; border-width: 3px; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Формы ---------- */

.form-field { margin: 0 0 16px; }

.form-field__label,
.label {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.form-field__optional { color: var(--text-muted); font-weight: 500; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
  display: block;
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line-input);
  border-radius: var(--radius-md);
  outline: none;
  background: var(--paper-2);
  box-shadow: inset 0 1px 2px rgba(31, 42, 34, .04);
  color: var(--text);
  font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"] { min-height: 50px; }

select {
  min-height: 44px;
  padding: 9px 40px 9px 16px;
  border-radius: 999px;
  appearance: none;
  background: var(--paper-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234F6F52' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.5;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-faint);
  opacity: 1;
}

input:hover,
textarea:hover,
select:hover { border-color: var(--line-strong); }

input:focus,
textarea:focus,
select:focus {
  border-color: var(--moss);
  box-shadow: 0 0 0 3px rgba(157, 184, 152, .35);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] { border-color: #D9A08E; }

input[aria-invalid="true"]:focus,
textarea[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(217, 160, 142, .3); }

.hint {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.field-error {
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
}

.password-field { position: relative; }
.password-field input { padding-right: 52px; }

.password-field__toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: transparent;
  color: var(--moss);
  cursor: pointer;
}

.password-field__toggle:hover { color: var(--pine); }

/* Чекбокс: квадрат 20 px, при выборе — сосна с галочкой */
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.45;
  cursor: pointer;
}

.check a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

input[type="checkbox"]:not(.switch__input) {
  appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  border: 1.5px solid #B7C2BB;
  border-radius: 6px;
  background: #FFFFFF;
  cursor: pointer;
}

input[type="checkbox"]:not(.switch__input)::after {
  content: "";
  width: 11px;
  height: 11px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F5F2EA' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat center / contain;
  opacity: 0;
}

input[type="checkbox"]:not(.switch__input):checked { border-color: var(--pine); background: var(--pine); }
input[type="checkbox"]:not(.switch__input):checked::after { opacity: 1; }
.check input[type="checkbox"] { margin-top: 0; }

/* ---------- Сообщения ---------- */

.alert {
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.alert--error {
  border-color: var(--danger-border);
  background: var(--danger-bg);
  color: #7A2E1E;
  font-weight: 500;
}

.alert--success {
  border-color: var(--green-line);
  background: linear-gradient(160deg, #EDF2E8, #DCE5D6);
  color: var(--pine);
}

.alert a { color: inherit; font-weight: 700; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #E3ECDD;
  color: #2F5A3B;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge--peach { background: linear-gradient(90deg, #F6E2CC, #EED4BA); color: var(--cinnamon); }
.badge--muted { background: #F1EFE8; color: var(--text-muted); }

/* ---------- Карточки и заголовки страниц ---------- */

.card {
  padding: clamp(20px, 2.4vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--grad-paper);
}

.card--sage {
  border-color: transparent;
  background:
    linear-gradient(260deg, rgba(245, 212, 180, .62) 0%, rgba(247, 214, 216, .1) 26%, rgba(247, 214, 216, 0) 40%),
    linear-gradient(180deg, #E6EDE0 0%, #D6E2CF 100%);
  box-shadow: 0 30px 60px -44px rgba(79, 111, 82, .6);
}

.page {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 52px) var(--gutter) clamp(32px, 5vw, 72px);
}

.page--narrow { max-width: 900px; }
.page--wide { max-width: var(--max); }

.page-head { margin-bottom: clamp(20px, 2.4vw, 32px); }

.page-head h1 {
  margin: 0 0 10px;
  font-size: clamp(38px, 4vw, 56px);
}

.page-head p {
  max-width: 640px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
}

.page-head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
}

.page-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* ---------- Подвал: тёплый «закат» внизу страницы ---------- */

.footer {
  flex-shrink: 0;
  border-top: 1px solid rgba(201, 190, 170, .5);
  background:
    radial-gradient(80% 140% at 50% 100%, rgba(240, 202, 164, .55) 0%, rgba(244, 214, 184, .25) 45%, rgba(247, 214, 216, .04) 65%, rgba(245, 242, 234, 0) 80%),
    var(--bone);
}

.footer__inner {
  max-width: 1340px;
  margin: 0 auto;
  padding: 24px var(--gutter) 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  color: var(--text-muted);
  font-size: 14px;
}

.footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer a { color: var(--text-2); }
.footer a:hover { color: var(--pine); }

/* Большой подвал маркетинговых страниц */
.footer--big .footer__inner { max-width: 1340px; padding: 40px clamp(20px, 5vw, 72px) 48px; align-items: flex-start; }
.footer__brand { display: flex; flex-direction: column; gap: 12px; }
.footer__brand .brand__mark { width: 24px; height: 24px; }
.footer__brand .brand__name { font-size: 24px; }
.footer__cols { display: flex; flex-wrap: wrap; gap: 12px 48px; }
.footer__col { display: flex; flex-direction: column; gap: 10px; }

/* Совместимость: побег у карточки входа больше не рисуется — его место заняла арка */
.card--sprig { position: relative; }

/* ---------- Абстрактная арка «оранжереи» (только CSS, без фото) ---------- */

.arch {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px 32px 32px;
  background: linear-gradient(180deg, #EEF2E8 0%, #DEE7D7 52%, #C9D8C1 100%);
  box-shadow: 0 40px 80px -40px rgba(79, 111, 82, .45), -24px 0 60px -30px rgba(240, 200, 160, .7);
}

.arch__sun {
  position: absolute;
  top: -20%;
  right: -34%;
  width: 115%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 228, 200, .95) 0%, rgba(248, 220, 190, .55) 32%, rgba(247, 214, 216, .09) 58%, rgba(247, 214, 216, 0) 68%);
}

.arch__frame {
  position: absolute;
  inset: 7% 7% 0;
  border: 2px solid rgba(251, 250, 246, .8);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
}

.arch__mullion { position: absolute; top: 7%; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: rgba(251, 250, 246, .8); }
.arch__transom { position: absolute; top: 44%; right: 7%; left: 7%; height: 2px; background: rgba(251, 250, 246, .8); }
.arch__floor { position: absolute; right: 0; bottom: 0; left: 0; height: 26%; background: linear-gradient(180deg, rgba(244, 220, 196, 0) 0%, rgba(242, 214, 186, .65) 100%); }

.leaf {
  position: absolute;
  aspect-ratio: 1;
  border-radius: 0 100% 0 100%;
  background: linear-gradient(135deg, #BCD1B4 0%, #7FA27B 100%);
}

.leaf--r { border-radius: 100% 0 100% 0; background: linear-gradient(225deg, #C8D9C0, #89AB86); }
.leaf--deep { background: linear-gradient(135deg, #A9C3A2, #5F8762); }
.leaf--a { bottom: -6%; left: -8%; width: 40%; transform: rotate(-8deg); }
.leaf--b { bottom: -14%; left: 16%; width: 30%; transform: rotate(24deg); }
.leaf--c { right: -10%; bottom: 8%; width: 34%; transform: rotate(12deg); }

/* ---------- Окна ---------- */

dialog.modal {
  width: calc(100% - 32px);
  max-width: 440px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--grad-paper);
  color: var(--text);
  box-shadow: var(--shadow-float);
}

dialog.modal::backdrop { background: rgba(31, 42, 34, .42); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }

dialog.modal h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 30px; font-weight: 500; line-height: 1.05; }
dialog.modal p { color: var(--text-secondary); font-size: 15px; }

.modal__actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

/* ---------- Короткие уведомления ---------- */

.toast {
  position: fixed;
  top: 84px;
  left: 50%;
  z-index: 70;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  background: #1F2A22;
  box-shadow: 0 16px 30px -16px rgba(0, 0, 0, .5);
  color: var(--bone);
  font-size: 14px;
  font-weight: 600;
  transform: translateX(-50%);
}

.toast--error { background: var(--danger); }

/* ---------- Кнопки-иконки и главная кнопка действия (галерея) ---------- */

.btn--icon { position: relative; }
.btn--icon .icon { width: 18px; height: 18px; }
.btn--tool { gap: 8px; }
.btn__label { font-size: 15px; font-weight: 600; white-space: nowrap; }

.btn__count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #F6E2CC, #EED4BA);
  color: var(--cinnamon);
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}

.btn--cta {
  border-color: transparent;
  background: var(--grad-pine);
  box-shadow: var(--shadow-pine);
  color: var(--bone);
}

.btn--cta:hover { border-color: transparent; background: linear-gradient(180deg, #226848, #17503A); color: var(--bone); }
.btn--cta .icon { width: 18px; height: 18px; }

/* ---------- Напоминание о подтверждении почты ---------- */

.verify-banner {
  max-width: 1280px;
  margin: 16px auto 0;
  width: calc(100% - 2 * var(--gutter));
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(100deg, rgba(246, 222, 198, .55) 0%, rgba(247, 214, 216, .09) 25%, rgba(247, 214, 216, 0) 35%),
    var(--grad-paper);
  color: var(--text-2);
  font-size: 14px;
}

/* ---------- Окно-подарок после регистрации ---------- */

dialog.gift {
  max-width: 400px;
  padding: 30px 26px 26px;
  border: 0;
  background:
    radial-gradient(70% 50% at 100% 0%, rgba(245, 214, 184, .6) 0%, rgba(247, 214, 216, .08) 50%, rgba(247, 214, 216, 0) 70%),
    var(--grad-paper);
  text-align: center;
}

.gift__art { width: 112px; height: 112px; margin: 0 auto 6px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 70% 25%, #F6E2CC 0%, #E6EDE0 60%, #DCE5D6 100%); }
.gift__mark { width: 60px; height: 60px; animation: gift-bloom .9s cubic-bezier(.2, 1.3, .4, 1) both; }
.gift__sparks { display: none; }
dialog.gift .gift__title { margin: 12px 0 4px; font-size: 36px; }
dialog.gift .gift__amount { margin: 0; color: var(--pine); font-size: 22px; font-weight: 700; }
dialog.gift .gift__text { margin: 10px 0 20px; }

@keyframes gift-bloom { from { transform: scale(.4) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Приветствие после регистрации ---------- */

dialog.welcome {
  max-width: 420px;
  padding: 0;
  border: 0;
  overflow: hidden;
}

.welcome__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.welcome__track::-webkit-scrollbar { display: none; }
.welcome__track:focus-visible { outline: 2px solid var(--pine); outline-offset: -4px; }

.welcome__slide {
  flex: 0 0 100%;
  min-height: 320px;
  padding: 36px 28px 8px;
  scroll-snap-align: center;
  text-align: center;
}

.welcome__art {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 0 auto 20px;
  border-radius: 28px;
  background: radial-gradient(circle at 75% 20%, #F6E2CC 0%, #E6EDE0 60%, #DCE5D6 100%);
  color: var(--pine);
}

.welcome__icon { width: 44px; height: 44px; }

dialog.welcome .welcome__title { margin: 0 0 10px; font-size: 32px; }
dialog.welcome .welcome__text { margin: 0; font-size: 15px; line-height: 1.5; }

.welcome__dots { display: flex; justify-content: center; gap: 8px; padding: 12px 0 4px; }
.welcome__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-line); transition: background .2s, transform .2s; }
.welcome__dot.is-active { background: var(--pine); transform: scale(1.25); }

.welcome__actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 24px 24px;
}

.welcome__actions .btn--primary { margin-left: auto; min-width: 120px; }
.welcome__actions [hidden] { display: none; }

/* ---------- Телефон ---------- */

@media (max-width: 759px) {
  body.has-nav { padding-bottom: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom)); }

  /* Размытие у шапки на телефоне выключено: иначе закреплённое нижнее меню считает шапку своим краем */
  .topbar { background: rgba(251, 250, 246, .96); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .topbar__inner { min-height: 60px; gap: 12px; }
  body[data-header="public"] .topbar__inner { min-height: 64px; padding: 12px 20px; }
  .topbar__nav, .topbar__link--hide-sm { display: none; }
  .brand__name { font-size: 23px; }

  .main-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    padding: 8px 8px calc(14px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid var(--line);
    background: rgba(251, 250, 246, .94);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  .main-nav:has(> :nth-child(5)) { grid-template-columns: repeat(5, 1fr); }

  .main-nav__link {
    min-height: 48px;
    padding: 6px 0;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    border-radius: 0;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
  }

  .main-nav__link .icon {
    display: block;
    width: 52px;
    height: 30px;
    padding: 4px 15px;
    border-radius: 999px;
    stroke-width: 1.7;
  }

  .main-nav__link:hover { background: transparent; }
  .main-nav__link[aria-current="page"] { background: transparent; color: var(--pine); }
  .main-nav__link[aria-current="page"] .icon { background: var(--sage-light); }

  .credit-chip { margin-left: auto; }

  .btn--lg { min-height: 52px; padding: 15px 26px; }
  .page-head--row .page-head__actions { width: 100%; }
}

@media (max-width: 380px) {
  .credit-chip { padding-left: 10px; }
  .brand__ai { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
}
