/* =========================================================
   ФОТОСИНТЕЗ — дизайн-система
   ========================================================= */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", "PT Serif", serif;
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --container: 1240px;
  --header-h: 74px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0a10;
  --bg-soft: #100e17;
  --surface: #16131f;
  --surface-2: #1c1828;
  --surface-3: #241f33;
  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .18);
  --text: #f3effb;
  --text-soft: #d8d1e8;
  --muted: #a29ab4;
  --accent: #7c5cff;
  --accent-2: #ff6b9d;
  --accent-soft: rgba(124, 92, 255, .16);
  --accent-contrast: #ffffff;
  --gold: #e8c07d;
  --success: #56d68b;
  --success-soft: rgba(86, 214, 139, .14);
  --danger: #ff7b93;
  --danger-soft: rgba(255, 123, 147, .14);
  --warning: #f7c552;
  --warning-soft: rgba(247, 197, 82, .14);
  --shadow: 0 26px 70px rgba(0, 0, 0, .5);
  --shadow-sm: 0 10px 30px rgba(0, 0, 0, .3);
  --header-bg: rgba(11, 10, 16, .78);
  --hero-glow: radial-gradient(circle at 30% 20%, rgba(124, 92, 255, .35), transparent 55%),
               radial-gradient(circle at 80% 10%, rgba(255, 107, 157, .22), transparent 50%);
  --grid-line: rgba(255, 255, 255, .04);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f4ee;
  --bg-soft: #f0ebe2;
  --surface: #ffffff;
  --surface-2: #faf7f1;
  --surface-3: #f2ecdf;
  --border: rgba(28, 24, 34, .1);
  --border-strong: rgba(28, 24, 34, .2);
  --text: #17141c;
  --text-soft: #3d3747;
  --muted: #6f6879;
  --accent: #6a45ff;
  --accent-2: #e84d7c;
  --accent-soft: rgba(106, 69, 255, .1);
  --accent-contrast: #ffffff;
  --gold: #b0812f;
  --success: #14874f;
  --success-soft: rgba(20, 135, 79, .1);
  --danger: #c9355a;
  --danger-soft: rgba(201, 53, 90, .1);
  --warning: #a86a00;
  --warning-soft: rgba(168, 106, 0, .12);
  --shadow: 0 24px 60px rgba(64, 44, 90, .14);
  --shadow-sm: 0 10px 26px rgba(64, 44, 90, .09);
  --header-bg: rgba(247, 244, 238, .82);
  --hero-glow: radial-gradient(circle at 28% 18%, rgba(106, 69, 255, .16), transparent 55%),
               radial-gradient(circle at 82% 8%, rgba(232, 77, 124, .13), transparent 50%);
  --grid-line: rgba(28, 24, 34, .05);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
  opacity: .6;
  mask-image: radial-gradient(circle at 50% 0, #000 20%, transparent 75%);
}

body.modal-open { overflow: hidden; }
body.drawer-open { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.15; letter-spacing: -.015em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
::selection { background: var(--accent); color: #fff; }

.view { min-height: 62vh; position: relative; z-index: 1; }
.container { width: min(var(--container), calc(100% - 48px)); margin-inline: auto; position: relative; }
.page-narrow { max-width: 820px; }
.muted { color: var(--muted); }
.muted--small { font-size: 13px; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.ta-right { text-align: right; }

/* ---------- Прогресс и загрузка ---------- */

.route-progress {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 200;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: 0 50%; opacity: 0;
  transition: opacity .2s;
}
.route-progress.is-active { opacity: 1; animation: progress 1.1s var(--ease) forwards; }
@keyframes progress { 0% { transform: scaleX(0); } 60% { transform: scaleX(.7); } 100% { transform: scaleX(.94); } }

.boot-splash {
  min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px;
  background: var(--bg); position: relative; z-index: 1;
}
.boot-splash__mark {
  width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-family: var(--font-display); font-size: 32px; color: #fff;
  animation: breathe 1.8s ease-in-out infinite;
}
.boot-splash__name { letter-spacing: .34em; font-size: 12px; color: var(--muted); }
.boot-splash__line { width: 120px; height: 2px; background: var(--border); overflow: hidden; border-radius: 2px; }
.boot-splash__line span { display: block; width: 40%; height: 100%; background: var(--accent); animation: slide 1.2s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(.94); opacity: .8; } }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(320%); } }

.spinner {
  --size: 18px;
  width: var(--size); height: var(--size); border-radius: 50%;
  border: 2px solid color-mix(in srgb, currentColor 25%, transparent);
  border-top-color: currentColor;
  display: inline-block; animation: spin .8s linear infinite; vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }

.noscript { padding: 40px; text-align: center; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s, border-color .18s, opacity .18s;
  background: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 35%, transparent);
}
.btn--primary:hover { box-shadow: 0 16px 38px color-mix(in srgb, var(--accent) 45%, transparent); }
.btn--ghost { border-color: var(--border-strong); color: var(--text); background: transparent; }
.btn--ghost:hover { background: var(--surface-2); }
.btn--soft { background: var(--accent-soft); color: var(--text); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.btn--soft:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--sm { padding: 9px 16px; font-size: 13.5px; }
.btn--lg { padding: 15px 28px; font-size: 16px; }
.btn--full { width: 100%; }
.btn.is-loading { pointer-events: none; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); display: inline-grid; place-items: center; cursor: pointer;
  color: var(--text-soft); transition: background .16s, color .16s, border-color .16s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.icon-btn--danger:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; font-size: 14px; }
.link-arrow:hover { gap: 10px; }
.link-muted { color: var(--muted); font-size: 14px; }
.link-muted:hover { color: var(--accent); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 var(--success-soft); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- Хедер ---------- */

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--header-bg);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand__mark {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-family: var(--font-display); font-size: 21px;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 35%, transparent);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-size: 15px; font-weight: 700; letter-spacing: .16em; }
.brand__tag { font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.site-nav { display: flex; align-items: center; gap: 26px; margin-left: 12px; }
.site-nav a { font-size: 14.5px; color: var(--text-soft); font-weight: 500; position: relative; padding: 6px 0; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .2s var(--ease); border-radius: 2px;
}
.site-nav a:hover, .site-nav a.is-active { color: var(--text); }
.site-nav a:hover::after, .site-nav a.is-active::after { transform: scaleX(1); }
.site-header__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.theme-toggle { border-radius: 999px; }
.auth-actions { display: flex; align-items: center; gap: 8px; }
.burger { display: none; }

.user-menu { position: relative; }
.user-chip {
  display: inline-flex; align-items: center; gap: 9px; padding: 5px 12px 5px 5px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; transition: border-color .16s, background .16s;
}
.user-chip:hover { border-color: var(--border-strong); }
.user-chip .icon { transform: rotate(90deg); color: var(--muted); }
.user-chip__avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  font-size: 13px; font-weight: 700;
}
.user-chip__balance { font-size: 13.5px; font-weight: 600; }
.user-menu__dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); width: 250px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow); padding: 8px; z-index: 70;
  animation: dropIn .18s var(--ease);
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } }
.user-menu__head { padding: 12px 12px 14px; border-bottom: 1px solid var(--border); margin-bottom: 6px; display: flex; flex-direction: column; }
.user-menu__head strong { font-size: 14.5px; }
.user-menu__head span { font-size: 12.5px; color: var(--muted); }
.user-menu__dropdown a, .user-menu__dropdown button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border-radius: 10px; font-size: 14px; color: var(--text-soft);
  background: none; border: 0; cursor: pointer; text-align: left;
}
.user-menu__dropdown a:hover, .user-menu__dropdown button:hover { background: var(--surface-2); color: var(--text); }
.user-menu__dropdown .user-menu__admin { color: var(--accent); }

.mobile-drawer { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .5); backdrop-filter: blur(4px); }
.mobile-drawer__panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(340px, 88vw);
  background: var(--bg); border-left: 1px solid var(--border); padding: 20px;
  display: flex; flex-direction: column; gap: 20px; animation: drawerIn .22s var(--ease);
  overflow-y: auto;
}
@keyframes drawerIn { from { transform: translateX(30px); opacity: 0; } }
.mobile-drawer__head { display: flex; justify-content: space-between; align-items: center; }
.mobile-drawer__head .brand__name { letter-spacing: .12em; font-size: 13px; color: var(--muted); }
.mobile-drawer__nav { display: flex; flex-direction: column; gap: 2px; }
.mobile-drawer__nav a { padding: 12px 10px; border-radius: 12px; font-size: 17px; font-weight: 500; }
.mobile-drawer__nav a:hover { background: var(--surface-2); }
.mobile-drawer__foot { margin-top: auto; border-top: 1px solid var(--border); padding-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.theme-row {
  display: inline-flex; align-items: center; gap: 10px; background: none; border: 0;
  color: var(--muted); font-size: 14px; cursor: pointer; padding: 8px 0;
}
.theme-row:hover { color: var(--text); }

/* ---------- Hero ---------- */

.hero { position: relative; padding: 44px 0 44px; overflow: hidden; }
.hero__glow { position: absolute; inset: -20% -10% auto -10%; height: 720px; background: var(--hero-glow); pointer-events: none; }
.hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: start; }
.hero__copy { position: relative; z-index: 1; }
.hero h1 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2.6rem, 5.2vw, 4.35rem); line-height: 1.03; letter-spacing: -.025em;
  margin: 14px 0 18px;
}
.hero__lead { font-size: clamp(1.02rem, 1.4vw, 1.16rem); color: var(--muted); max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); }
.hero-stat { display: flex; flex-direction: column; min-width: 0; }
.hero-stat strong { font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.hero-stat span { font-size: 12px; color: var(--muted); margin-top: 2px; }

.hero__visual { position: relative; min-height: 520px; }
.hero-photo {
  position: absolute; margin: 0; border-radius: 22px; overflow: hidden;
  border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  background: var(--surface);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo--1 { width: 54%; aspect-ratio: 3 / 4; left: 2%; top: 9%; transform: rotate(-5deg); z-index: 2; }
.hero-photo--2 { width: 45%; aspect-ratio: 3 / 4; right: 0; top: 0; transform: rotate(4deg); z-index: 1; }
.hero-photo--3 { width: 40%; aspect-ratio: 3 / 4; right: 16%; bottom: -2%; transform: rotate(-2deg); z-index: 3; }
.hero-badge {
  position: absolute; z-index: 4; display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 9px 14px; font-size: 12.5px; font-weight: 600; box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}
.hero-badge--top { top: 12%; right: 4%; color: var(--accent); }
.hero-badge--bottom { bottom: 8%; left: 0; color: var(--text-soft); }

.feature-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin-top: 8px;
}
.feature { background: var(--surface); padding: 16px 18px; display: flex; align-items: center; gap: 12px; color: var(--accent); }
.feature .icon { flex: 0 0 auto; }
.feature div { display: flex; flex-direction: column; min-width: 0; }
.feature strong { font-size: 13.5px; color: var(--text); }
.feature span { font-size: 12px; color: var(--muted); line-height: 1.35; }

/* Преимущество «без подписки» */
.no-sub {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-top: 18px; padding: 18px 22px; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  background: linear-gradient(120deg, var(--accent-soft), transparent 65%), var(--surface);
}
.no-sub__icon {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 14px; display: grid; place-items: center;
  color: var(--accent); background: var(--surface-2); border: 1px solid var(--border);
}
.no-sub__text { flex: 1 1 320px; min-width: 0; }
.no-sub__text strong { display: block; font-size: 15.5px; margin-bottom: 3px; }
.no-sub__text p { margin: 0; font-size: 13px; color: var(--muted); max-width: 70ch; }
.no-sub .btn { flex: 0 0 auto; }

/* ---------- Секции ---------- */

.section { padding: 60px 0; position: relative; }
.section--tight { padding: 30px 0 52px; }
.section--top { padding: 28px 0 56px; }
.section--tinted { background: var(--bg-soft); border-block: 1px solid var(--border); }
.section-head { max-width: 680px; margin-bottom: 26px; }
.section-head h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.9rem, 3.4vw, 2.9rem); margin: 10px 0 12px; letter-spacing: -.02em; }
.section-head p { color: var(--muted); }

.page-head { padding: 48px 0 20px; }
.page-head h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.1rem, 4.4vw, 3.4rem); margin: 16px 0 12px; }
.page-head p { color: var(--muted); max-width: 62ch; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); align-items: center; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { opacity: .6; }

/* ---------- Категории и карусели ---------- */

#categories { counter-reset: cat; }
.category-block { position: relative; counter-increment: cat; padding-bottom: 20px; }
.category-block:last-child { padding-bottom: 0; }
.category-block + .category-block { margin-top: 18px; padding-top: 24px; border-top: 1px solid var(--border-strong); }
.category-block + .category-block::before {
  content: "";
  position: absolute; top: -1px; left: 0; width: 84px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.category-block__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 18px; flex-wrap: wrap; }
.category-block__intro { min-width: 0; }
.category-block__num {
  display: inline-grid; place-items: center; min-width: 26px; height: 19px; padding: 0 5px;
  border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border);
  font-size: 10px; letter-spacing: .06em; color: var(--muted); margin-right: 9px; vertical-align: 1px;
}
.category-block__num::before { content: counter(cat, decimal-leading-zero); }
.category-block__head h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 8px 0 6px; }
.category-block__head p { color: var(--muted); font-size: 14.5px; max-width: 60ch; }
.carousel { position: relative; }
.carousel__track {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding: 4px 2px 10px; scroll-behavior: smooth;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__nav {
  position: absolute; top: 38%; z-index: 5; width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
  display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: opacity .2s, transform .2s;
}
.carousel__nav:hover { transform: scale(1.05); }
.carousel__nav--prev { left: -12px; }
.carousel__nav--next { right: -12px; }
.carousel__nav.is-disabled { opacity: 0; pointer-events: none; }

.carousel-card {
  flex: 0 0 auto; width: 210px; scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; transition: transform .22s var(--ease), border-color .22s, box-shadow .22s;
}
.carousel-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.carousel-card__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; }
.carousel-card__zoom {
  display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none;
  cursor: zoom-in; position: relative; overflow: hidden;
}
.carousel-card__zoom img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.carousel-card:hover .carousel-card__zoom img { transform: scale(1.04); }
.carousel-card__zoom-icon {
  position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; background: rgba(12, 11, 16, .55); color: #fff;
  border: 1px solid rgba(255, 255, 255, .2); backdrop-filter: blur(6px);
  opacity: 0; transform: translateY(4px); transition: opacity .18s, transform .18s;
}
.carousel-card:hover .carousel-card__zoom-icon,
.carousel-card__zoom:focus-visible .carousel-card__zoom-icon { opacity: 1; transform: none; }
.carousel-card__price {
  position: absolute; left: 8px; bottom: 8px; padding: 4px 9px; border-radius: 999px;
  background: rgba(12, 11, 16, .62); color: #fff; font-size: 11.5px; font-weight: 600;
  backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .16); pointer-events: none;
}
.carousel-card .fav-btn { top: 8px; right: 8px; width: 28px; height: 28px; }
.carousel-card .fav-btn .icon { width: 15px; height: 15px; }
.carousel-card__body { padding: 11px 12px 12px; }
.carousel-card__body h3 {
  font-size: 14px; line-height: 1.25; margin-bottom: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.5em;
}
.carousel-card__body p { font-size: 11px; color: var(--muted); margin-bottom: 10px; }

/* Плитка «Все стили» добирает ширину ряда, чтобы не оставалось пустоты */
.carousel-card--more {
  flex: 1 1 210px; min-width: 210px;
  position: relative; overflow: hidden;
  border-style: dashed; border-color: var(--border-strong);
  background:
    radial-gradient(circle at 84% 16%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 62%),
    color-mix(in srgb, var(--accent) 6%, var(--surface));
  display: flex; align-items: center;
  padding: 18px; color: var(--text-soft);
  container-type: inline-size;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.carousel-card--more::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--surface) 92%, transparent) 22%, transparent 58%);
}
.carousel-card--more:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.carousel-card--more__text {
  position: relative; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
}
.carousel-card--more__icon {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 20%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  color: var(--accent); margin-bottom: 4px;
}
.carousel-card--more strong { font-family: var(--font-display); font-weight: 500; font-size: 17px; color: var(--text); line-height: 1.15; }
.carousel-card--more__meta { font-size: 11px; color: var(--muted); line-height: 1.4; }
.carousel-card--more__link {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 6px;
  font-size: 11.5px; font-weight: 600; color: var(--accent);
}
.carousel-card--more:hover .carousel-card--more__link { gap: 8px; }

/* Веер примеров заполняет свободную часть широкой плитки */
.carousel-card--more__fan { display: none; }
@container (min-width: 330px) {
  .carousel-card--more__fan {
    position: absolute; right: 14px; top: 50%; z-index: 2;
    display: flex; align-items: center; transform: translateY(-50%);
  }
  .carousel-card--more__fan img {
    width: 92px; height: 118px; object-fit: cover; border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .2); box-shadow: 0 16px 32px rgba(0, 0, 0, .45);
    margin-left: -38px; opacity: .88;
    transform: rotate(calc((var(--i) - 1) * 7deg));
    transition: transform .3s var(--ease), opacity .3s;
  }
  .carousel-card--more__fan img:first-child { margin-left: 0; }
  .carousel-card--more:hover .carousel-card--more__fan img { opacity: 1; }
  .carousel-card--more:hover .carousel-card--more__fan img:nth-child(1) { transform: rotate(-9deg) translateY(3px); }
  .carousel-card--more:hover .carousel-card--more__fan img:nth-child(3) { transform: rotate(9deg) translateY(-3px); }
}
@container (min-width: 440px) {
  .carousel-card--more { padding: 24px 26px; }
  .carousel-card--more strong { font-size: 21px; }
  .carousel-card--more__meta { font-size: 12px; }
  .carousel-card--more__link { font-size: 12.5px; margin-top: 10px; }
  .carousel-card--more__fan { right: 30px; }
  .carousel-card--more__fan img { width: 122px; height: 152px; margin-left: -52px; }
}
.carousel-card__body .btn {
  width: 100%; font-size: 11px; padding: 8px 8px; gap: 5px; letter-spacing: -.01em;
  white-space: normal; line-height: 1.25; text-align: center;
}
.carousel-card__body .btn .icon { width: 14px; height: 14px; flex-shrink: 0; }

@media (hover: none) {
  .carousel-card__zoom-icon { opacity: 1; transform: none; }
}

.fav-btn {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(12, 11, 16, .45); border: 1px solid rgba(255, 255, 255, .18);
  color: #fff; backdrop-filter: blur(8px); transition: background .18s, color .18s, transform .18s;
}
.fav-btn:hover { transform: scale(1.06); background: rgba(12, 11, 16, .65); }
.fav-btn.is-active { color: #ff6b9d; background: rgba(255, 107, 157, .18); border-color: rgba(255, 107, 157, .5); }
.fav-btn.is-active .icon { fill: currentColor; }

/* ---------- Шаги ---------- */

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 24px 24px; overflow: hidden;
}
.step__num {
  position: absolute; top: 16px; right: 20px; font-family: var(--font-display);
  font-size: 44px; color: var(--text); opacity: .08; line-height: 1;
}
.step__icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 18px;
}
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--muted); }

/* ---------- Юрблок ---------- */

.legal-band { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.legal-band h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.7rem, 2.8vw, 2.3rem); margin: 10px 0 12px; }
.legal-band p { color: var(--muted); max-width: 54ch; }
.legal-band__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.legal-band__card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 24px; box-shadow: var(--shadow-sm);
}
.legal-band__card--standalone { margin-top: 32px; }
.legal-row { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.legal-row:last-child { border-bottom: 0; }
.legal-row span { color: var(--muted); }
.legal-row strong { text-align: right; font-weight: 600; }

.cta-band { padding: 20px 0 84px; }
.cta-band__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 20%, var(--surface)), var(--surface) 60%);
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  padding: 40px 44px; box-shadow: var(--shadow-sm);
}
.cta-band h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin-bottom: 8px; }
.cta-band p { color: var(--muted); max-width: 52ch; }

.legal-note {
  display: flex; gap: 14px; align-items: flex-start;
  width: min(var(--container), calc(100% - 48px)); margin: 0 auto 48px;
  padding: 18px 22px; border: 1px dashed var(--border-strong); border-radius: var(--radius);
  color: var(--muted); font-size: 13.5px; background: var(--bg-soft);
}
.legal-note .icon { color: var(--gold); flex-shrink: 0; margin-top: 2px; }
.legal-note strong { display: block; color: var(--text); font-size: 14px; margin-bottom: 2px; }

/* ---------- Каталог ---------- */

.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.category-tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .22s var(--ease), border-color .22s, box-shadow .22s;
}
.category-tile:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.category-tile__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.category-tile__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transition: transform .6s var(--ease); }
.category-tile:hover .category-tile__media img { transform: scale(1.05); }
.category-tile__count {
  position: absolute; top: 14px; left: 14px; padding: 6px 12px; border-radius: 999px;
  background: rgba(12, 11, 16, .55); color: #fff; font-size: 12px; font-weight: 600;
  backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .15);
}
.category-tile__body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.category-tile__body h2 { font-family: var(--font-display); font-weight: 500; font-size: 24px; }
.category-tile__body p { color: var(--muted); font-size: 14px; flex: 1; }

.catalog-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.catalog-toolbar__count { color: var(--muted); font-size: 14px; }
.select-field {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; color: var(--muted);
}
.select-field select { background: none; border: 0; color: var(--text); font: inherit; font-size: 14px; outline: none; cursor: pointer; }
.select-field select option { background: var(--surface); color: var(--text); }

.prompt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.prompt-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .22s var(--ease), border-color .22s, box-shadow .22s;
}
.prompt-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.prompt-card__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-2); }
.prompt-card__link { display: block; width: 100%; height: 100%; }
.prompt-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.prompt-card:hover .prompt-card__media img { transform: scale(1.04); }
.prompt-card__price {
  position: absolute; left: 12px; bottom: 12px; padding: 6px 12px; border-radius: 999px;
  background: rgba(12, 11, 16, .62); color: #fff; font-size: 13px; font-weight: 600;
  backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .16);
}
.prompt-card__price small { opacity: .7; font-weight: 400; }
.prompt-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.prompt-card__body h3 { font-size: 17px; }
.prompt-card__meta { font-size: 12.5px; color: var(--muted); }
.prompt-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; }
.prompt-card__multi { font-size: 11.5px; color: var(--muted); text-align: right; max-width: 100px; line-height: 1.3; }

/* ---------- Страница промта ---------- */

.prompt-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 26px; align-items: start; }
.prompt-visual { position: sticky; top: calc(var(--header-h) + 24px); }
.prompt-visual__frame {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  aspect-ratio: 4 / 5; background: var(--surface-2);
}
.prompt-visual__frame img { width: 100%; height: 100%; object-fit: cover; }
.prompt-visual__label {
  position: absolute; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 999px; background: rgba(12, 11, 16, .55);
  color: #fff; font-size: 12px; font-weight: 600; backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .16);
}
.prompt-visual__fav { top: 16px; right: 16px; width: 42px; height: 42px; }
.prompt-visual__meta { display: flex; gap: 22px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.prompt-visual__meta span { display: inline-flex; align-items: center; gap: 6px; }

.prompt-panel h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 3.4vw, 2.9rem); margin: 10px 0 14px; }
.prompt-panel__lead { color: var(--muted); margin-bottom: 26px; }

.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.price-card {
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px;
  background: var(--surface); display: flex; flex-direction: column; gap: 2px; transition: border-color .18s, background .18s;
}
.price-card span { font-size: 12px; color: var(--muted); }
.price-card strong { font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.price-card small { font-size: 11px; color: var(--muted); font-weight: 400; }
.price-card.is-active { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--accent-soft); }

.generate-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow-sm);
}
.generate-box__row { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text-soft); }
.chips { display: inline-flex; gap: 6px; }
.chip {
  min-width: 42px; height: 38px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-soft);
  font-weight: 600; cursor: pointer; transition: all .16s;
}
.chip:hover { border-color: var(--border-strong); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.uploader__drop {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  padding: 26px 20px; text-align: center; cursor: pointer; display: flex; flex-direction: column;
  align-items: center; gap: 5px; transition: border-color .18s, background .18s; background: var(--surface-2);
}
.uploader__drop:hover, .uploader__drop.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
.uploader__icon {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 6px;
}
.uploader__drop strong { font-size: 14.5px; }
.uploader__drop > span { font-size: 13.5px; color: var(--muted); }
.uploader__drop small { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.uploader__previews { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.upload-preview { position: relative; width: 82px; height: 82px; margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-strong); }
.upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.upload-preview__remove {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(12, 11, 16, .72); color: #fff; border: 0; display: grid; place-items: center; cursor: pointer;
}
.generate-box__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; border-top: 1px solid var(--border); }
.generate-box__total span { color: var(--muted); font-size: 14px; }
.generate-box__total strong { font-size: 26px; letter-spacing: -.02em; }
.generate-box__hint { font-size: 12.5px; color: var(--muted); text-align: center; }
.generate-box__hint a { color: var(--accent); }
.generate-box__note { display: flex; align-items: center; gap: 7px; justify-content: center; font-size: 11.5px; color: var(--muted); }
.prompt-facts { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.prompt-facts li { display: flex; gap: 9px; font-size: 13.5px; color: var(--muted); align-items: flex-start; }
.prompt-facts .icon { color: var(--success); flex-shrink: 0; margin-top: 2px; }

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

.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text-soft); }
.field-optional { font-weight: 400; color: var(--muted); font-size: 12px; }
.field-hint { font-size: 11.5px; color: var(--muted); }
.input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 14.5px;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.input::placeholder { color: var(--muted); opacity: .7; }
.input:disabled { opacity: .6; cursor: not-allowed; }
.input--area { resize: vertical; min-height: 80px; line-height: 1.5; }
.input--sm { padding: 9px 12px; font-size: 13.5px; width: auto; }
select.input { cursor: pointer; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--text-soft); cursor: pointer; line-height: 1.45; }
.checkbox input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; }
.checkbox a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.checkbox--consent { padding: 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .field--full, .form-grid .checkbox.field--full { grid-column: 1 / -1; }
.stack-form { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.stack-form .field { width: 100%; }
.form-error {
  display: flex; align-items: flex-start; gap: 8px; padding: 12px 14px; border-radius: 12px;
  background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  color: var(--danger); font-size: 13.5px;
}
.form-success {
  display: flex; align-items: flex-start; gap: 8px; padding: 12px 14px; border-radius: 12px;
  background: var(--success-soft); border: 1px solid color-mix(in srgb, var(--success) 35%, transparent);
  color: var(--success); font-size: 13.5px;
}
.segmented { display: inline-flex; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; gap: 4px; }
.segmented__btn {
  padding: 8px 16px; border-radius: 9px; border: 0; background: none; color: var(--muted);
  font-size: 13.5px; font-weight: 600; cursor: pointer; transition: all .16s; text-align: center;
}
.segmented__btn.is-active { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.segmented--sm .segmented__btn { padding: 7px 13px; font-size: 12.5px; }

/* ---------- Авторизация ---------- */

.auth-page { padding: 48px 0 84px; }
.auth-page__inner { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 440px); gap: 72px; align-items: center; justify-content: center; }
.auth-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 34px 32px; box-shadow: var(--shadow-sm); width: 100%; justify-self: end;
}
.auth-card__brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.auth-card__brand .brand__mark { width: 34px; height: 34px; border-radius: 11px; font-size: 18px; }
.auth-card__brand .brand__name { font-size: 13px; letter-spacing: .18em; }
.auth-card h1 { font-family: var(--font-display); font-weight: 500; font-size: 32px; margin-bottom: 8px; }
.auth-card__subtitle { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.auth-form__switch { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.auth-form__switch a { color: var(--accent); font-weight: 600; }
.demo-hint {
  display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px dashed var(--border-strong); font-size: 12px; color: var(--muted);
}
.demo-hint strong { color: var(--text-soft); font-size: 12.5px; }
.auth-aside { max-width: 460px; }
.auth-aside__visual { display: flex; flex-direction: column; gap: 26px; }
.auth-aside__quote { font-family: var(--font-display); font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.3; color: var(--text-soft); }
.auth-aside__stats { display: flex; gap: 34px; padding-top: 22px; border-top: 1px solid var(--border); }
.auth-aside__stats div { display: flex; flex-direction: column; }
.auth-aside__stats strong { font-size: 22px; }
.auth-aside__stats span { font-size: 12px; color: var(--muted); }
.auth-aside__list { list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: var(--muted); }
.auth-aside__list li { display: flex; gap: 10px; align-items: flex-start; }
.auth-aside__list .icon { color: var(--success); margin-top: 2px; flex-shrink: 0; }

.antibot { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--surface-2); }
.antibot__head { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 10px; }
.antibot__head .icon { color: var(--accent); }
.antibot__question { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.antibot__options { display: flex; flex-wrap: wrap; gap: 8px; }
.antibot__option { display: inline-flex; }
.antibot__option input { position: absolute; opacity: 0; pointer-events: none; }
.antibot__option span {
  padding: 8px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  font-size: 13.5px; cursor: pointer; transition: all .16s;
}
.antibot__option input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.antibot__error { font-size: 13px; color: var(--danger); }

/* ---------- Личный кабинет ---------- */

.account-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 36px; align-items: start; }
.account-side { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 18px; }
.account-user { display: flex; align-items: center; gap: 12px; }
.account-user__avatar {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 700; font-size: 18px;
}
.account-user div { display: flex; flex-direction: column; min-width: 0; }
.account-user strong { font-size: 14.5px; }
.account-user span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.account-balance-mini {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 2px;
}
.account-balance-mini span { font-size: 12px; color: var(--muted); }
.account-balance-mini strong { font-size: 26px; letter-spacing: -.02em; }
.account-balance-mini a { margin-top: 8px; font-size: 12.5px; }
.account-nav { display: flex; flex-direction: column; gap: 2px; }
.account-nav a {
  display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-radius: 12px;
  font-size: 14px; color: var(--text-soft); font-weight: 500; transition: background .16s, color .16s;
}
.account-nav a:hover { background: var(--surface-2); color: var(--text); }
.account-nav a.is-active { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.account-nav a.is-active .icon { color: var(--accent); }
.account-nav__admin { color: var(--accent) !important; }

.account-main { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.account-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.account-head h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.9rem, 3.2vw, 2.6rem); margin: 8px 0 8px; }
.account-head p { color: var(--muted); font-size: 14px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 4px; min-height: 116px;
}
.stat-card > span { font-size: 12px; color: var(--muted); }
.stat-card strong { font-size: 24px; letter-spacing: -.02em; line-height: 1.2; }
.stat-card small { font-size: 11.5px; color: var(--muted); }
.stat-card a { font-size: 12.5px; color: var(--accent); margin-top: auto; display: inline-flex; align-items: center; gap: 5px; }
.stat-card--accent { background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 26%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.stat-card--accent strong { font-size: 27px; }

.account-block {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 16px;
}
.account-block--flat { padding: 22px 24px; }
.account-block__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.account-block__head h2 { font-size: 19px; }
.account-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.account-two-col .account-block { height: 100%; }

.banner { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: var(--radius-sm); font-size: 13.5px; }
.banner--success { background: var(--success-soft); color: var(--success); border: 1px solid color-mix(in srgb, var(--success) 30%, transparent); }

.tx-list { list-style: none; display: flex; flex-direction: column; }
.tx-row { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.tx-row:last-child { border-bottom: 0; }
.tx-row__icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex-shrink: 0; }
.tx-row__icon.is-positive { background: var(--success-soft); color: var(--success); }
.tx-row__icon.is-negative { background: var(--surface-2); color: var(--muted); }
.tx-row__info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tx-row__info strong { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-row__info span { font-size: 11.5px; color: var(--muted); }
.tx-row__amount { text-align: right; display: flex; flex-direction: column; flex-shrink: 0; }
.tx-row__amount strong { font-size: 14px; }
.tx-row__amount.is-positive strong { color: var(--success); }
.tx-row__amount span { font-size: 11px; color: var(--muted); }
.tx-list--full .tx-row { padding: 14px 0; }

.referral-card {
  background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 12px;
}
.referral-card__head { display: flex; gap: 12px; align-items: center; color: var(--accent); }
.referral-card__head div { display: flex; flex-direction: column; }
.referral-card__head strong { color: var(--text); font-size: 15px; }
.referral-card__head span { font-size: 12px; color: var(--muted); }
.referral-card__text { font-size: 13px; color: var(--muted); }
.copy-field { display: flex; gap: 8px; }
.copy-field .input { font-size: 12.5px; }
.referral-card__stats { display: flex; gap: 28px; padding-top: 12px; border-top: 1px solid var(--border); }
.referral-card__stats div { display: flex; flex-direction: column; }
.referral-card__stats strong { font-size: 19px; }
.referral-card__stats span { font-size: 11.5px; color: var(--muted); }

.balance-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.balance-card {
  background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 22%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 6px;
}
.balance-card > span { font-size: 12.5px; color: var(--muted); }
.balance-card > strong { font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -.03em; line-height: 1.1; }
.balance-card__summary { display: flex; gap: 22px; margin-top: auto; padding-top: 24px; }
.balance-card__summary div { display: flex; flex-direction: column; }
.balance-card__summary span { font-size: 11px; color: var(--muted); }
.balance-card__summary strong { font-size: 14px; }

.topup-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 14px;
}
.topup-card h2 { font-size: 18px; }
.amount-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.amount-chip {
  padding: 10px 6px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all .16s;
}
.amount-chip:hover { border-color: var(--border-strong); }
.amount-chip.is-active { border-color: var(--accent); background: var(--accent-soft); }
.promo-form { display: flex; gap: 8px; }
.promo-form .input { flex: 1; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px; }
.info-grid div { display: flex; flex-direction: column; gap: 3px; }
.info-grid span { font-size: 11.5px; color: var(--muted); }
.info-grid strong { font-size: 15px; font-weight: 600; }

/* ---------- Заказы ---------- */

.orders-list { display: flex; flex-direction: column; gap: 16px; }
.order-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.order-card__head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.order-card__title { display: flex; gap: 13px; align-items: center; min-width: 0; }
.order-card__thumb { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.order-card__title h3 { font-size: 16px; margin-bottom: 2px; }
.order-card__title p { font-size: 12px; color: var(--muted); }
.order-card__status { flex-shrink: 0; }
.order-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 14px; }
.order-card__expiry { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.order-card__expiry.is-danger { color: var(--danger); }

.order-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.order-file { position: relative; margin: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 5; border: 1px solid var(--border); background: var(--surface-2); }
.order-file img { width: 100%; height: 100%; object-fit: cover; }
.order-file__open {
  display: block; width: 100%; height: 100%; padding: 0; margin: 0; border: 0;
  background: none; cursor: zoom-in; position: relative; color: inherit;
}
.order-file__open img { display: block; transition: transform .3s var(--ease); }
.order-file__open:hover img, .order-file__open:focus-visible img { transform: scale(1.04); }
.order-file__zoom {
  position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 8px; border-radius: 8px; font-size: 11px; font-weight: 600; color: #fff;
  background: rgba(12, 11, 16, .6); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .18);
  opacity: 0; transform: translateY(-3px); transition: opacity .16s, transform .16s;
}
.order-file__open:hover .order-file__zoom, .order-file__open:focus-visible .order-file__zoom { opacity: 1; transform: none; }
.order-file__download {
  position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; background: rgba(12, 11, 16, .6); color: #fff;
  backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .18); transition: background .16s;
}
.order-file__download:hover { background: var(--accent); }
.order-file__share {
  position: absolute; right: 8px; top: 8px; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; cursor: pointer; background: rgba(12, 11, 16, .6); color: #fff;
  backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .18); transition: background .16s, opacity .16s;
  opacity: .85;
}
.order-file:hover .order-file__share, .order-file__share:focus-visible { opacity: 1; }
.order-file__share:hover { background: var(--accent); }

@media (hover: none) {
  .order-file__share { opacity: 1; }
  .order-file__zoom { opacity: 1; transform: none; }
}
.order-processing { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 13px; }
.order-processing p { margin: 0; }
.order-note { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); color: var(--muted); }
.order-note--danger { color: var(--danger); background: var(--danger-soft); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge--success { background: var(--success-soft); color: var(--success); }
.badge--warning { background: var(--warning-soft); color: var(--warning); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge--muted { background: var(--surface-2); color: var(--muted); }

.pagination { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: 26px; flex-wrap: wrap; }
.page-btn {
  min-width: 38px; height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-soft); font-size: 13px; font-weight: 600;
  cursor: pointer; display: inline-grid; place-items: center; transition: all .16s;
}
.page-btn:hover:not(:disabled) { border-color: var(--border-strong); color: var(--text); }
.page-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: default; }
.page-ellipsis { color: var(--muted); padding: 0 4px; }

/* ---------- Модальные окна ---------- */

.modal-overlay {
  position: fixed; inset: 0; z-index: 160; background: rgba(5, 4, 9, .62);
  backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px;
  animation: fadeIn .18s ease;
}
.modal-overlay--out { animation: fadeOut .18s ease forwards; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.modal {
  width: min(560px, 100%); background: var(--bg); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); display: flex; flex-direction: column;
  max-height: calc(100vh - 40px); animation: modalIn .22s var(--ease);
}
.modal--lg { width: min(820px, 100%); }
.modal--wide { width: min(960px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.985); } }
.modal__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.modal__title { font-size: 19px; }
.modal__form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.modal__body { padding: 22px; overflow-y: auto; }
.modal__error { margin: 0 22px; padding: 10px 14px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: 13px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border); }
.modal-text { font-size: 14.5px; color: var(--text-soft); }
.modal-text--muted { color: var(--muted); font-size: 13.5px; margin-top: 8px; }
.modal-subtitle { font-size: 14px; margin: 20px 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- Просмотр изображения ---------- */

body.lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 140; padding: 32px 24px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 4, 9, .9); backdrop-filter: blur(12px);
  animation: fadeIn .18s ease;
}
.lightbox--out { animation: fadeOut .18s ease forwards; }
.lightbox__figure {
  margin: 0; display: flex; flex-direction: column; gap: 16px;
  max-width: min(560px, 92vw); max-height: 100%; animation: modalIn .24s var(--ease);
}
.lightbox__figure img {
  max-height: calc(100vh - 210px); max-width: 100%; width: auto; margin: 0 auto;
  border-radius: 20px; border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 40px 90px rgba(0, 0, 0, .6); object-fit: contain;
}
.lightbox__caption { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.lightbox__info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lightbox__eyebrow { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.lightbox__info strong { font-family: var(--font-display); font-weight: 500; font-size: 22px; color: #fff; line-height: 1.2; }
.lightbox__actions { display: flex; align-items: center; gap: 16px; }
.lightbox__price { font-size: 20px; font-weight: 600; color: #fff; }
.lightbox__close {
  position: absolute; top: 20px; right: 20px; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: #fff;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22);
  transition: background .16s, transform .16s;
}
.lightbox__close:hover { background: rgba(255, 255, 255, .2); transform: scale(1.04); }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  cursor: pointer; color: #fff; background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .22); transition: background .16s, opacity .16s;
}
.lightbox__nav:hover:not(:disabled) { background: rgba(255, 255, 255, .22); }
.lightbox__nav:disabled { opacity: .25; cursor: default; }
.lightbox__nav--prev { left: 24px; }
.lightbox__nav--next { right: 24px; }
.lightbox__actions .btn { white-space: nowrap; }
/* Лайтбокс всегда тёмный, поэтому кнопки внутри него не зависят от темы. */
.lightbox__actions .btn--soft { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .28); }
.lightbox__actions .btn--soft:hover { background: rgba(255, 255, 255, .24); }
.lightbox__actions .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .3); }
.lightbox__actions .btn--ghost:hover { background: rgba(255, 255, 255, .14); }
.lightbox__eyebrow[hidden] { display: none; }

@media (max-width: 720px) {
  .lightbox { padding: 56px 16px 24px; }
  .lightbox__figure img { max-height: calc(100vh - 250px); border-radius: 16px; }
  .lightbox__caption { flex-direction: column; align-items: flex-start; gap: 12px; }
  .lightbox__actions { width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .lightbox__nav { width: 40px; height: 40px; top: auto; bottom: 120px; transform: none; }
  .lightbox__nav--prev { left: 12px; }
  .lightbox__nav--next { right: 12px; }
}

/* ---------- Тосты ---------- */

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: min(400px, calc(100vw - 40px)); }
.toast {
  display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  font-size: 13.5px; animation: toastIn .22s var(--ease); color: var(--text);
}
.toast--out { animation: toastOut .22s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }
.toast__icon { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; background: var(--success-soft); color: var(--success); }
.toast--error .toast__icon { background: var(--danger-soft); color: var(--danger); }
.toast--info .toast__icon { background: var(--accent-soft); color: var(--accent); }
.toast__text { flex: 1; padding-top: 2px; }
.toast__close { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px; display: grid; place-items: center; }

/* ---------- Пустые состояния ---------- */

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 48px 24px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.empty--big { padding: 80px 24px; border-style: solid; }
.empty__icon { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.empty__code { font-family: var(--font-display); font-size: 72px; line-height: 1; color: var(--accent); opacity: .5; }
.empty h2, .empty h3 { font-family: var(--font-display); font-weight: 500; font-size: 24px; }
.empty p { color: var(--muted); font-size: 14px; max-width: 46ch; }
.empty__actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }

/* ---------- Подвал ---------- */

.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); margin-top: 40px; position: relative; z-index: 1; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding: 56px 0 40px; }
.site-footer__brand p { color: var(--muted); font-size: 13.5px; margin: 16px 0 18px; max-width: 34ch; }
.brand--footer { align-items: flex-start; }
.site-footer__social { display: flex; gap: 8px; }
.site-footer__col { display: flex; flex-direction: column; gap: 10px; }
.site-footer__col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.site-footer__col a, .site-footer__col p { font-size: 13.5px; color: var(--text-soft); }
.site-footer__col a:hover { color: var(--accent); }
.site-footer__legal p { font-size: 12.5px; color: var(--muted); }
.site-footer__bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 20px 0 28px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted);
}

/* ---------- Текстовые страницы ---------- */

.prose { font-size: 15.5px; line-height: 1.75; color: var(--text-soft); }
.prose h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 36px 0 14px; color: var(--text); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 18px; margin: 28px 0 10px; color: var(--text); }
.prose p { margin: 12px 0; }
.prose ul, .prose ol { margin: 14px 0; padding-left: 22px; display: flex; flex-direction: column; gap: 7px; }
.prose li { padding-left: 4px; }
.prose blockquote { margin: 20px 0; padding: 16px 20px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 12px 12px 0; color: var(--muted); font-style: italic; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--text); }

.contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.contact-card {
  display: flex; align-items: center; gap: 13px; padding: 16px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); transition: border-color .16s, transform .16s;
}
.contact-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.contact-card__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.contact-card div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.contact-card strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }
.contact-card span { font-size: 12px; color: var(--muted); }
.contact-card > .icon { color: var(--muted); }

.accordion { display: flex; flex-direction: column; gap: 10px; }
.accordion__item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.accordion__item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 20px; cursor: pointer; font-weight: 600; font-size: 15px; list-style: none;
}
.accordion__item summary::-webkit-details-marker { display: none; }
.accordion__chevron { color: var(--muted); transition: transform .2s; display: grid; place-items: center; }
.accordion__item[open] .accordion__chevron { transform: rotate(90deg); color: var(--accent); }
.accordion__body { padding: 0 20px 18px; color: var(--muted); font-size: 14px; }
.faq-help { margin-top: 32px; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.faq-help h3 { font-family: var(--font-display); font-weight: 500; font-size: 22px; }
.faq-help p { color: var(--muted); font-size: 14px; }

/* ---------- Админка ---------- */

.admin-page { padding: 30px 0 80px; }
.admin-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 32px; align-items: start; }
.admin-side {
  position: sticky; top: calc(var(--header-h) + 20px);
  display: flex; flex-direction: column; gap: 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
}
.admin-side__head { display: flex; flex-direction: column; gap: 4px; padding: 4px 6px 14px; border-bottom: 1px solid var(--border); }
.admin-side__head strong { font-size: 16px; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; color: var(--text-soft); font-weight: 500; }
.admin-nav a:hover { background: var(--surface-2); color: var(--text); }
.admin-nav a.is-active { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.admin-nav a.is-active .icon { color: var(--accent); }
.admin-side__back { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); padding: 10px 12px; border-top: 1px solid var(--border); margin-top: 4px; }
.admin-side__back:hover { color: var(--accent); }
.admin-side__back .icon { transform: rotate(180deg); }

.admin-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.admin-head h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.8rem, 3vw, 2.4rem); margin-top: 6px; }
.admin-head__user { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.admin-toolbar__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-filters .input { width: auto; }
.admin-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.admin-card__head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.admin-card__head h2 { font-size: 17px; }
.admin-card__head > span { font-size: 13px; color: var(--muted); }
.admin-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

.stat-grid--admin { grid-template-columns: repeat(3, 1fr); }
.stat-grid--admin .stat-card { min-height: 104px; }

/* Финансы: продажи, закупка, прибыль */
.stat-grid--finance { grid-template-columns: repeat(4, 1fr); }
.stat-grid--finance .stat-card { min-height: 104px; }
.stat-grid--finance .stat-card strong { font-size: 22px; }
.finance-note {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px;
  margin-top: 14px; padding: 12px 16px; border-radius: 12px;
  background: var(--surface-2); border: 1px dashed var(--border-strong);
  font-size: 12.5px; color: var(--muted);
}
.finance-note > span:first-child { flex: 1 1 320px; display: flex; gap: 8px; align-items: flex-start; }
.finance-note .icon { flex: 0 0 auto; color: var(--accent); margin-top: 1px; }
.finance-note__price { display: inline-flex; align-items: baseline; gap: 6px; color: var(--text-soft); }
.finance-note__price strong { color: var(--accent); font-size: 13.5px; }
.finance-note__table { color: var(--muted); font-size: 12px; margin-left: 6px; }

@media (max-width: 1200px) {
  .stat-grid--finance { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .stat-grid--finance { grid-template-columns: 1fr; }
  .finance-note { font-size: 12px; }
}

.chart { display: flex; align-items: flex-end; gap: 5px; height: 170px; padding-top: 10px; }
.chart__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.chart__bar { width: 100%; max-width: 34px; border-radius: 6px 6px 3px 3px; background: color-mix(in srgb, var(--accent) 55%, var(--surface-2)); min-height: 2px; transition: height .3s var(--ease); }
.chart__bar--accent { background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
.chart__bar--profit { background: linear-gradient(180deg, var(--success), color-mix(in srgb, var(--success) 55%, var(--surface-2))); }
.chart__col span { font-size: 9.5px; color: var(--muted); }

.admin-list { display: flex; flex-direction: column; }
.admin-list__row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.admin-list__row:last-child { border-bottom: 0; }
.admin-list__rank { width: 22px; font-size: 12px; color: var(--muted); font-weight: 600; }
.admin-list__thumb { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.admin-list__info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.admin-list__info strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-list__info span { font-size: 11px; color: var(--muted); }
.admin-list__value { text-align: right; display: flex; flex-direction: column; flex-shrink: 0; }
.admin-list__value strong { font-size: 13px; }
.admin-list__value span { font-size: 11px; color: var(--muted); }
.admin-list__row--progress { flex-direction: column; align-items: stretch; gap: 6px; }
.progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* Массовый импорт стилей */
.import-progress__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.import-progress__head > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.import-progress__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.import-progress__head strong { font-size: 13px; }
.import-list { display: grid; gap: 6px; margin-top: 12px; max-height: 260px; overflow-y: auto; }
.import-list__row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; background: var(--surface-2); font-size: 12.5px; }
.import-list__mark { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 11px; background: var(--surface); color: var(--muted); }
.import-list__mark--ok { background: var(--success-soft); color: var(--success); }
.import-list__mark--error { background: var(--danger-soft); color: var(--danger); }
.import-list__mark--busy { background: var(--warning-soft); color: var(--warning); }
.import-list__title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-list__state { margin-left: auto; color: var(--muted); text-align: right; flex-shrink: 0; }
.import-list__state a { color: var(--accent); }

.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 900px; }
.admin-table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; padding: 10px 9px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table td { padding: 12px 9px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.admin-table code { font-size: 12px; color: var(--muted); }
.admin-table--compact { min-width: 480px; }
.table-media { display: flex; align-items: center; gap: 10px; }
.table-media img { width: 42px; height: 42px; border-radius: 9px; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.table-media div { display: flex; flex-direction: column; min-width: 0; max-width: 260px; }
.table-media strong { font-size: 13px; }
.table-media span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: inline-flex; gap: 4px; }
.row-actions .icon-btn { width: 32px; height: 32px; border-radius: 9px; }
.promo-code { background: var(--surface-2); border: 1px solid var(--border); padding: 3px 8px; border-radius: 7px; color: var(--text); letter-spacing: .08em; }
.admin-pagination { display: flex; gap: 5px; flex-wrap: wrap; }
.admin-save { display: flex; align-items: center; gap: 16px; position: sticky; bottom: 16px; background: var(--bg); padding: 12px; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }

.admin-settings { display: flex; flex-direction: column; gap: 20px; }
.image-upload { display: flex; flex-direction: column; gap: 10px; }
.image-upload img { width: 160px; height: 200px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
.image-upload__controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pricing-bulk { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding: 12px 14px; border: 1px dashed var(--border); border-radius: 12px; background: var(--surface-2); }
.pricing-bulk > div { display: flex; flex-direction: column; gap: 3px; }
.photo-upload { display: flex; flex-direction: column; gap: 10px; }
.photo-upload__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.photo-thumb { position: relative; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb__index { position: absolute; left: 6px; bottom: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.photo-thumb__remove { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .62); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.photo-thumb__remove:hover { background: var(--danger); }
.page-texts { display: flex; flex-direction: column; gap: 10px; }
.text-editor { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.text-editor summary { padding: 13px 16px; cursor: pointer; font-size: 13.5px; font-weight: 600; list-style: none; }
.text-editor summary::-webkit-details-marker { display: none; }
.text-editor textarea { border: 0; border-top: 1px solid var(--border); border-radius: 0; background: var(--surface); font-size: 13px; }
.faq-editor { display: flex; flex-direction: column; gap: 10px; }
.faq-editor__row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; align-items: start; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.balance-strong { font-size: 22px; letter-spacing: -.02em; }

/* ---------- Адаптивность ---------- */

@media (max-width: 1180px) {
  .hero__inner { gap: 32px; }
  .hero__visual { min-height: 500px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid--admin { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
  .site-nav { gap: 18px; margin-left: 0; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .prompt-layout { gap: 32px; }
  .legal-band { grid-template-columns: 1fr; gap: 28px; }
  .account-layout { grid-template-columns: 230px minmax(0, 1fr); gap: 24px; }
  .admin-layout { grid-template-columns: 210px minmax(0, 1fr); gap: 20px; }
  .auth-page__inner { grid-template-columns: minmax(0, 460px); justify-content: center; }
  .auth-aside { display: none; }
  .auth-card { justify-self: center; }
}

@media (max-width: 900px) {
  .site-nav, .auth-actions { display: none; }
  .burger { display: inline-grid; }
  .hero { padding: 32px 0 32px; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { min-height: 420px; max-width: 520px; margin-top: 8px; }
  .hero__stats { gap: 24px; }
  .section { padding: 44px 0; }
  .section--tight { padding: 22px 0 40px; }
  .prompt-layout { grid-template-columns: 1fr; }
  .prompt-visual { position: static; max-width: 520px; }
  .account-layout { grid-template-columns: 1fr; }
  .account-side { position: static; }
  .account-nav { flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .account-nav a { white-space: nowrap; }
  .account-balance-mini { display: none; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { position: static; }
  .admin-nav { flex-direction: row; overflow-x: auto; }
  .admin-nav a { white-space: nowrap; }
  .admin-side__head, .admin-side__back { display: none; }
  .admin-two-col, .account-two-col, .balance-layout { grid-template-columns: 1fr; }
  .stat-grid--admin { grid-template-columns: repeat(2, 1fr); }
  .cta-band__inner { flex-direction: column; align-items: flex-start; padding: 30px; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .carousel__nav { display: none; }
  .carousel-card { width: 200px; }
  .carousel-card--more { display: none; }
}

@media (max-width: 720px) {
  .container { width: calc(100% - 32px); }
  :root { --header-h: 64px; }
  .site-header__inner { gap: 12px; }
  .brand__mark { width: 36px; height: 36px; border-radius: 11px; font-size: 18px; }
  .brand__name { font-size: 13px; }
  .brand__tag { font-size: 8px; }
  .user-chip__balance { display: none; }
  .user-chip .icon { display: none; }
  .user-chip { padding: 4px; }
  .theme-toggle { width: 36px; height: 36px; }
  .hero__visual { min-height: 380px; }
  .hero-photo--2 { display: none; }
  .hero-photo--1 { width: 62%; left: 0; }
  .hero-photo--3 { width: 48%; right: 2%; }
  .hero h1 { font-size: clamp(2.2rem, 9vw, 3rem); }
  .hero__stats { gap: 14px 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-stat strong { font-size: 19px; }
  .section { padding: 38px 0; }
  .category-grid { grid-template-columns: 1fr; }
  .prompt-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
  .steps { grid-template-columns: 1fr; }
  .feature-strip { grid-template-columns: 1fr; }
  .legal-band__card { padding: 8px 18px; }
  .cta-band { padding-bottom: 56px; }
  .cta-band__inner { padding: 26px; }
  .legal-note { width: calc(100% - 32px); }
  .account-head h1 { font-size: 1.8rem; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-grid--admin { grid-template-columns: repeat(2, 1fr); }
  .stat-card { padding: 16px; min-height: 100px; }
  .stat-card strong { font-size: 20px; }
  .auth-card { padding: 26px 20px; }
  .auth-page { padding: 24px 0 56px; }
  .form-grid { grid-template-columns: 1fr; }
  .contact-cards { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; padding: 40px 0 24px; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
  .account-block { padding: 18px; }
  .generate-box { padding: 18px; }
  .price-grid { gap: 8px; grid-template-columns: repeat(2, 1fr); }
  .amount-presets { grid-template-columns: repeat(2, 1fr); }
  .order-files { grid-template-columns: repeat(2, 1fr); }
  .order-card__head { flex-direction: column; gap: 10px; }
  .admin-head { flex-direction: column; align-items: flex-start; }
  .admin-save { flex-direction: column; align-items: stretch; }
  .faq-editor__row { grid-template-columns: 1fr; }
  .modal__foot { flex-direction: column-reverse; }
  .modal__foot .btn { width: 100%; }
  .toasts { right: 12px; left: 12px; bottom: 12px; max-width: none; }
}

@media (max-width: 420px) {
  .carousel-card { width: 46vw; min-width: 168px; }
  .hero-photo--3 { display: none; }
  .hero-photo--1 { width: 78%; }
  .hero__visual { min-height: 340px; }
  .prompt-grid { grid-template-columns: 1fr; }
  .stat-grid, .stat-grid--admin { grid-template-columns: 1fr 1fr; }
  .chips { width: 100%; }
  .chip { flex: 1; }
  .copy-field { flex-direction: column; }
}

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

/* ---------- Поделиться фотографией ---------- */

.share-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0 14px; }
.share-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 10px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: 12.5px; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: transform .16s var(--ease), border-color .16s, background .16s;
}
.share-btn:hover { transform: translateY(-2px); border-color: var(--border-strong); background: var(--surface-3); }
.share-btn__mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  font-size: 12px; font-weight: 700; letter-spacing: .02em; color: #fff;
}
.share-btn--vk .share-btn__mark { background: #0077ff; }
.share-btn--tg .share-btn__mark { background: #2aabee; }
.share-btn--max .share-btn__mark { background: linear-gradient(135deg, #7c5cff, #ff6b9d); }
.share-link { display: flex; gap: 8px; align-items: stretch; }
.share-link .input { flex: 1; min-width: 0; font-size: 12.5px; }
.share-revoke { margin-top: 10px; color: var(--muted); }
.share-revoke:hover { color: var(--danger); border-color: var(--danger); }

@media (max-width: 560px) {
  .share-grid { grid-template-columns: 1fr; }
  .share-btn { flex-direction: row; justify-content: flex-start; padding: 12px 14px; }
  .share-btn__mark { width: 30px; height: 30px; border-radius: 9px; font-size: 11px; }
  .share-link { flex-direction: column; }
}

/* ---------- Рейтинг клиентов ---------- */

.rating-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; line-height: 1.5; white-space: nowrap;
  border: 1px solid transparent; background: var(--surface-3); color: var(--muted);
}
.rating-badge--debut { background: var(--surface-3); color: var(--muted); border-color: var(--border); }
.rating-badge--amateur { background: rgba(110, 168, 255, .16); color: #5f9dff; }
.rating-badge--portraitist { background: var(--success-soft); color: var(--success); }
.rating-badge--master { background: var(--accent-soft); color: var(--accent); }
.rating-badge--legend { background: var(--warning-soft); color: var(--warning); }
.rating-badge--icon {
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent);
}

.rating-card {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 26px;
  margin-top: 18px; padding: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  background-image: radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 55%);
}
.rating-card__main h2 { margin: 6px 0 6px; font-family: var(--font-display); font-weight: 400; font-size: 22px; }
.rating-card__main p { margin: 0 0 16px; color: var(--muted); font-size: 13.5px; }
.rating-card__stats { display: grid; gap: 10px; align-content: start; }
.rating-card__stats > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border);
}
.rating-card__stats span { font-size: 12px; color: var(--muted); }
.rating-card__stats strong { font-size: 17px; }

.rating-progress { margin-top: 4px; }
.rating-progress__head { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; }
.rating-progress__head strong { color: var(--text); }
.rating-progress .progress { height: 8px; border-radius: 4px; }

.rating-bonus-hint {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin: 14px 0 0; padding: 10px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  font-size: 13px; color: var(--text-soft);
}
.rating-bonus-hint .icon { color: var(--accent); }
.rating-bonus-hint strong { color: var(--accent); }

.level-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.level-list__row {
  display: grid; grid-template-columns: minmax(140px, auto) minmax(90px, 1fr) auto minmax(96px, auto);
  align-items: center; gap: 14px; padding: 9px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 13px;
}
.level-list__row.is-reached { border-color: color-mix(in srgb, var(--success) 30%, var(--border)); }
.level-list__row.is-current { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--accent-soft); }
.level-list__min { color: var(--muted); font-size: 12.5px; }
.level-list__bonus { text-align: right; color: var(--success); white-space: nowrap; }
.level-list__row:not(.is-reached) .level-list__bonus { color: var(--muted); }
.level-list__state { text-align: right; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.level-list__row.is-current .level-list__state { color: var(--accent); font-weight: 600; }

@media (max-width: 640px) {
  .level-list__row { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .level-list__min { grid-column: 1; }
  .level-list__bonus { grid-column: 2; grid-row: 1; }
  .level-list__state { grid-column: 2; grid-row: 2; }
}

.rating-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.rating-summary__item {
  padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px;
}
.rating-summary__item span { font-size: 11.5px; color: var(--muted); }
.rating-summary__item strong { font-size: 15px; }

.leaderboard { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.leaderboard__row {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border);
  font-size: 13.5px;
}
.leaderboard__row.is-me { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--accent-soft); }
.leaderboard__place { font-family: var(--font-display); font-size: 15px; color: var(--muted); text-align: center; }
.leaderboard__row:nth-child(1) .leaderboard__place { color: var(--gold); font-weight: 700; }
.leaderboard__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard__value { font-size: 15px; min-width: 46px; text-align: right; }
.leaderboard__value::after { content: ' фото'; font-size: 11px; font-weight: 400; color: var(--muted); }

@media (max-width: 860px) {
  .rating-card { grid-template-columns: 1fr; padding: 18px; }
  .rating-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .leaderboard__row { grid-template-columns: 28px minmax(0, 1fr) auto; }
  .leaderboard__row .rating-badge { display: none; }
}
