:root {
  --bg: #fff8f3;
  --bg-deep: #fff3ea;
  --card: rgba(255, 255, 255, 0.92);
  --glass: rgba(255, 255, 255, 0.82);
  --line: rgba(222, 175, 134, 0.45);
  --txt: #3f2e22;
  --muted: #8f7764;
  --accent: #eb914b;
  --accent-2: #f2a564;
  --accent-glow: rgba(235, 145, 75, 0.35);
  --danger: #d55d5d;
  --shadow: 0 12px 40px rgba(217, 160, 114, 0.16);
  --shadow-lg: 0 24px 56px rgba(63, 46, 34, 0.12);
  --radius-lg: 20px;
  --radius-xl: 24px;
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-page-in: 0.58s;
  --dur-page-out: 0.42s;
  --app-chrome-h: 140px;
}

* { box-sizing: border-box; }
.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--txt);
  background:
    radial-gradient(circle at 12% 0%, #ffe7d2 0, transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(242, 165, 100, 0.14), transparent 36%),
    var(--bg);
  min-height: 100vh;
}
.bg-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  contain: layout style paint;
  transform: translateZ(0);
}
.bg-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.bg-pattern-mesh {
  background-image:
    linear-gradient(rgba(235, 145, 75, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(235, 145, 75, 0.14) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 1;
}
.bg-pattern-waves {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='70' viewBox='0 0 140 70'%3E%3Cpath d='M-20 35 C25 15 55 55 95 35 S175 15 200 35' fill='none' stroke='%23eb914b' stroke-opacity='0.24' stroke-width='1.5'/%3E%3Cpath d='M-20 50 C35 30 65 68 105 48 S185 28 200 48' fill='none' stroke='%23f2a564' stroke-opacity='0.16' stroke-width='1.2'/%3E%3C/svg%3E");
  background-size: 140px 70px;
  opacity: 1;
}
.bg-pattern-dots {
  background-image: radial-gradient(rgba(235, 145, 75, 0.32) 2px, transparent 2px);
  background-size: 20px 20px;
  opacity: 0.55;
}
.bg-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(235, 145, 75, 0.28);
  box-shadow: inset 0 0 60px rgba(255, 200, 150, 0.12);
  opacity: 0.9;
}
.bg-ring-1 {
  width: min(58vw, 540px);
  height: min(58vw, 540px);
  top: -20%;
  right: -14%;
}
.bg-ring-2 {
  width: min(42vw, 400px);
  height: min(42vw, 400px);
  bottom: 5%;
  left: -16%;
  border-color: rgba(242, 165, 100, 0.26);
}
.bg-ring-3 {
  width: min(26vw, 220px);
  height: min(26vw, 220px);
  top: 40%;
  left: 6%;
  border-style: dashed;
  border-color: rgba(235, 145, 75, 0.35);
}
.bg-orb {
  position: absolute;
  border-radius: 50%;
  opacity: 1;
}
.bg-orb-1 {
  width: min(48vw, 400px);
  height: min(48vw, 400px);
  top: -14%;
  left: -10%;
  background: radial-gradient(circle at 40% 40%, rgba(235, 145, 75, 0.38) 0%, rgba(235, 145, 75, 0) 68%);
  animation: orbFloatA 28s ease-in-out infinite;
}
.bg-orb-2 {
  width: min(40vw, 340px);
  height: min(40vw, 340px);
  right: -8%;
  top: 55%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 200, 150, 0.42) 0%, rgba(255, 200, 150, 0) 70%);
}
.bg-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(222, 175, 134, 0.45) 1.2px, transparent 1.2px);
  background-size: 24px 24px;
  opacity: 0.65;
}
.bg-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 70% at 50% 100%, rgba(63, 46, 34, 0.05), transparent 50%);
  pointer-events: none;
  opacity: 0.85;
}
.bg-glyphs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.bg-glyph {
  position: absolute;
  left: var(--gx, 50%);
  top: var(--gy, 50%);
  font-size: var(--gs, 3rem);
  font-weight: 700;
  line-height: 1;
  font-family: "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
  color: rgba(210, 110, 45, 0.42);
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.35);
  transform: translate(-50%, -50%);
  animation: glyphFloat 16s ease-in-out infinite;
  animation-delay: var(--gd, 0s);
  user-select: none;
  filter: drop-shadow(0 8px 24px rgba(235, 145, 75, 0.35));
  will-change: transform, opacity;
}
.bg-glyph--latin {
  font-family: Inter, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(235, 145, 75, 0.28);
  -webkit-text-stroke: 0;
}
body.mode-auth .bg-glyph:not(.bg-glyph--latin) {
  color: rgba(200, 95, 35, 0.52);
  filter: drop-shadow(0 10px 28px rgba(235, 145, 75, 0.45));
}
body.mode-auth .bg-glyphs .bg-glyph {
  animation-duration: 14s;
}
@keyframes glyphFloat {
  0%, 100% {
    transform: translate(-50%, -50%) rotate(-6deg) scale(1);
    opacity: 0.72;
  }
  25% {
    transform: translate(calc(-50% + 18px), calc(-50% - 22px)) rotate(4deg) scale(1.08);
    opacity: 1;
  }
  50% {
    transform: translate(calc(-50% - 12px), calc(-50% - 32px)) rotate(8deg) scale(1.12);
    opacity: 0.95;
  }
  75% {
    transform: translate(calc(-50% - 20px), calc(-50% + 8px)) rotate(-3deg) scale(1.05);
    opacity: 1;
  }
}
@keyframes orbFloatA {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(20px, 14px, 0); }
}
.bg-glow {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 88% 88%, rgba(235, 145, 75, 0.2), transparent 40%);
  pointer-events: none;
  z-index: 0;
}
.screen { display: none !important; }
.screen.active { display: block !important; }
html.ready.mode-app #appScreen.active { animation: fadeIn .28s ease; }
html.ready.mode-auth #loginScreen.active { animation: fadeIn .28s ease; }
body.mode-auth {
  overflow: hidden;
  height: 100%;
  height: 100dvh;
}
body.mode-auth #appScreen { display: none !important; }
body.mode-app #loginScreen { display: none !important; }
body.mode-app.profile-open #appScreen { display: none !important; }
body.mode-app.profile-open #profileScreen { display: flex !important; }
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.fade-in { animation: fadeIn .4s ease; }

.card {
  position: relative;
  border: 1px solid rgba(222, 175, 134, 0.35);
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: box-shadow .25s ease, border-color .25s ease;
}
.hero-card:hover,
.settings-shell:hover,
.editor:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(235, 145, 75, 0.4);
}
h1,h2,h3,h4 { margin: 0 0 12px; line-height: 1.25; }
.muted { color: var(--muted); margin: 0; line-height: 1.55; }
.stack { display: grid; gap: 14px; }
.row { display: flex; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
label { display: grid; gap: 8px; color: var(--muted); font-size: 14px; line-height: 1.4; }
input, select, textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--txt);
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(235, 145, 75, 0.2);
}
input[type="checkbox"], input[type="range"] { width: auto; }
.btn,
.nav-btn,
.profile-btn,
.brand-home,
.toggle-chip,
.faq-trigger,
.profile-menu-item,
.icon-btn,
.file-btn span,
.custom-select-trigger,
.logo-card-select,
.logo-card-delete,
.category-chip-main,
.chrome-back-btn,
.chrome-action-btn,
.profile-back-btn,
.admin-nav-btn,
.admin-tab,
.admin-action-btn,
.password-toggle,
.slot-remove,
.remember-check {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.22s var(--ease-out-soft),
    box-shadow 0.25s var(--ease-out-soft),
    background 0.22s ease,
    border-color 0.22s ease,
    color 0.2s ease,
    filter 0.2s ease;
}
.btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--txt);
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(217, 160, 114, 0.22);
  border-color: rgba(235, 145, 75, 0.35);
}
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border: none;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 26px rgba(235, 145, 75, 0.32);
}
.btn-primary:disabled {
  opacity: 0.65;
  pointer-events: none;
  cursor: not-allowed;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(235, 145, 75, 0.4);
  filter: brightness(1.05);
}
.btn-danger {
  background: rgba(213, 93, 93, 0.1);
  border-color: rgba(213, 93, 93, 0.35);
  color: #9f3f3f;
}
.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(213, 93, 93, 0.2);
  background: rgba(213, 93, 93, 0.16);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 16px rgba(217, 160, 114, 0.15);
}
.btn-ghost { background: transparent; }
.btn-wide { width: 100%; }

/* Login portal — отдельная полноэкранная страница */
.login-portal.active {
  position: fixed;
  inset: 0;
  z-index: 50;
  min-height: 100dvh;
  min-height: 100svh;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: max(16px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
  background: transparent;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  scroll-padding-top: max(16px, env(safe-area-inset-top));
}
.login-portal-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 55% at 18% 22%, rgba(255, 231, 210, 0.55), transparent 58%),
    radial-gradient(ellipse 60% 50% at 82% 78%, rgba(242, 165, 100, 0.22), transparent 55%);
}
.login-portal-inner {
  position: relative;
  z-index: 2;
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 48px);
  align-items: start;
  flex-shrink: 0;
}
.login-showcase {
  position: relative;
}
.login-showcase::before {
  content: "";
  position: absolute;
  left: -12px;
  top: -8px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(235, 145, 75, 0.18), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.login-portal .auth-card {
  position: relative;
  overflow: visible;
  background: rgba(255, 255, 255, 0.92);
  scroll-margin-top: max(12px, env(safe-area-inset-top));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    0 28px 64px rgba(63, 46, 34, 0.14),
    0 0 0 1px rgba(235, 145, 75, 0.12) inset;
}
.login-portal .auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.65) 0%, transparent 42%);
  pointer-events: none;
}
.login-portal .auth-card > * {
  position: relative;
  z-index: 1;
}
.auth-field-solo {
  gap: 0;
}
.auth-field-solo input {
  margin: 0;
}
.login-submit-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  min-height: 46px;
  box-shadow: 0 12px 28px rgba(235, 145, 75, 0.38);
}
.login-submit-btn:hover {
  box-shadow: 0 16px 34px rgba(235, 145, 75, 0.45);
}
.login-submit-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: loginSpin 0.75s linear infinite;
}
.login-submit-btn.is-loading .login-submit-spinner {
  display: block;
}
.login-submit-btn.is-loading .login-submit-label {
  opacity: 0.92;
}
.login-portal.is-logging-in .login-portal-inner {
  pointer-events: none;
  user-select: none;
}
.login-loading {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(255, 248, 243, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s var(--ease-out-soft), visibility 0.22s;
}
.login-loading.is-active {
  opacity: 1;
  visibility: visible;
}
.login-loading-card {
  text-align: center;
  padding: 28px 36px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(235, 145, 75, 0.35);
  box-shadow: 0 24px 56px rgba(63, 46, 34, 0.14);
  min-width: min(280px, 100%);
}
.login-loading-spinner {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 3px solid rgba(235, 145, 75, 0.2);
  border-top-color: var(--accent);
  border-right-color: var(--accent-2);
  animation: loginSpin 0.9s linear infinite;
}
.login-loading-text {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--txt);
  letter-spacing: 0.01em;
}
@keyframes loginSpin {
  to { transform: rotate(360deg); }
}
.login-stats div {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.login-stats > div {
  transition: transform .25s ease, box-shadow .25s ease;
}
.login-stats > div:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(217, 160, 114, 0.15);
}
.login-showcase .section-kicker {
  display: inline-block;
  margin-bottom: 16px;
}
.brand-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: block;
  flex-shrink: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 8px 22px rgba(210, 118, 58, 0.28);
}
.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.brand-mark-lg {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(210, 118, 58, 0.32);
}
.brand-mark-sm {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(210, 118, 58, 0.22);
}
.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.footer-brand-row strong {
  margin: 0;
}
.login-showcase h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.12;
  margin-bottom: 16px;
}
.login-lead {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 22px;
  max-width: 520px;
}
.login-features {
  margin: 0 0 26px;
  padding-left: 22px;
  color: var(--txt);
  line-height: 1.75;
}
.login-features li { margin-bottom: 10px; }
.login-features li:last-child { margin-bottom: 0; }
.login-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.login-stats div {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.75);
  border-radius: 14px;
  padding: 14px 18px;
  min-width: 124px;
}
.login-stats strong {
  display: block;
  font-size: 1.25rem;
  color: var(--accent);
}
.login-stats span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}
.auth-card { width: 100%; padding: 32px 30px; }
.auth-card h2 { margin-bottom: 10px; }
.auth-card-intro {
  margin: 0 0 22px !important;
  font-size: 14px;
  line-height: 1.55;
}
.auth-form { gap: 16px; }
.auth-form .remember-check { margin-top: 4px; }
.login-error {
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 14px;
  text-align: center;
}
.register-field-error {
  margin: -6px 0 0;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.4;
}
.auth-form--register .register-field-error:not([hidden]) + .captcha-block {
  margin-top: 2px;
}
.password-field { position: relative; display: block; }
.password-field input { padding-right: 44px; }
.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: color .2s ease, background .15s ease;
}
.password-toggle:hover {
  color: var(--accent);
  background: rgba(235, 145, 75, 0.12);
}
.password-toggle[hidden] { display: none !important; }
.password-toggle .eye-icon {
  width: 20px;
  height: 20px;
  display: block;
}
.password-toggle .eye-icon--hide { display: none; }
.password-toggle.is-revealed .eye-icon--show { display: none; }
.password-toggle.is-revealed .eye-icon--hide { display: block; }
.password-toggle.is-revealed { color: var(--accent); }
.remember-check {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  color: var(--txt);
  margin: 2px 0 4px;
}
.remember-check-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.remember-check-box {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 7px;
  border: 2px solid rgba(222, 175, 134, 0.75);
  background: linear-gradient(180deg, #fff 0%, #fff8f2 100%);
  display: grid;
  place-items: center;
  transition:
    border-color 0.28s var(--ease-out-soft),
    background 0.28s var(--ease-out-soft),
    box-shadow 0.28s var(--ease-out-soft),
    transform 0.22s var(--ease-out-soft);
}
.remember-check-mark {
  width: 14px;
  height: 14px;
  color: #fff;
  opacity: 0;
  transform: scale(0.45);
  transition:
    opacity 0.22s var(--ease-out-soft),
    transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.remember-check-label {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}
.remember-check:hover .remember-check-box {
  border-color: rgba(235, 145, 75, 0.65);
  box-shadow: 0 4px 14px rgba(235, 145, 75, 0.16);
}
.remember-check-input:focus-visible + .remember-check-box {
  outline: 2px solid rgba(235, 145, 75, 0.55);
  outline-offset: 2px;
}
.remember-check-input:checked + .remember-check-box {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 6px 18px rgba(235, 145, 75, 0.38);
  transform: scale(1.04);
}
.remember-check-input:checked + .remember-check-box .remember-check-mark {
  opacity: 1;
  transform: scale(1);
}
.remember-check-input:active + .remember-check-box {
  transform: scale(0.96);
}
.remember-check-input:checked:active + .remember-check-box {
  transform: scale(1.02);
}

/* App layout */
.app-screen {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 20px 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.app-workspace {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.app-stage {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
}
.home-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.info-card {
  padding: 20px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(217, 160, 114, 0.2);
  border-color: rgba(235, 145, 75, 0.35);
}
.info-card h3 { margin-bottom: 10px; }
.info-card p { color: var(--muted); line-height: 1.55; margin: 0; }
.steps-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}
.steps-list li { margin-bottom: 6px; }
.site-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  margin-bottom: 20px;
  position: sticky;
  top: 12px;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 32px rgba(63, 46, 34, 0.08);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 6px 8px;
  margin: -6px -8px;
  border-radius: 12px;
  transition: background .25s ease, transform .2s ease;
  font: inherit;
  color: inherit;
  text-align: left;
}
.brand:hover {
  background: rgba(255, 255, 255, 0.75);
  transform: translateY(-1px);
}
.brand:active { transform: translateY(0); }
.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
  transition: color .25s ease;
}
.brand:hover .brand-title { color: var(--accent); }
.brand:hover .brand-mark {
  transform: scale(1.05);
  box-shadow: 0 12px 28px rgba(235, 145, 75, 0.48);
}
.brand-mark { transition: transform .25s ease, box-shadow .25s ease; }
.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.nav-btn {
  position: relative;
  isolation: isolate;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  font-weight: 500;
  transition:
    color 0.4s var(--ease-out-soft),
    background 0.45s var(--ease-out-soft),
    box-shadow 0.45s var(--ease-out-soft),
    transform 0.35s var(--ease-out-soft),
    border-color 0.35s var(--ease-out-soft),
    filter 0.35s var(--ease-out-soft);
}
.nav-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    120% 180% at 50% 0%,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 247, 238, 0.55) 48%,
    transparent 72%
  );
  opacity: 0;
  transform: scale(0.92);
  transition:
    opacity 0.4s var(--ease-out-soft),
    transform 0.45s var(--ease-out-soft);
  z-index: -1;
  pointer-events: none;
}
.nav-btn:hover::before {
  opacity: 1;
  transform: scale(1);
}
.nav-btn:hover {
  color: var(--txt);
  border-color: rgba(235, 145, 75, 0.42);
  background: linear-gradient(180deg, #fff 0%, #fff6ec 100%);
  box-shadow:
    0 4px 12px rgba(217, 160, 114, 0.16),
    0 14px 32px rgba(235, 145, 75, 0.2),
    0 0 0 3px rgba(235, 145, 75, 0.1);
  transform: translateY(-2px);
}
.nav-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.nav-btn:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 6px 16px rgba(235, 145, 75, 0.14);
  transition-duration: 0.12s;
}
.nav-btn.active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow:
    0 8px 22px rgba(235, 145, 75, 0.38),
    0 16px 36px rgba(201, 120, 46, 0.22);
  transform: translateY(-1px);
}
.nav-btn.active::before {
  background: radial-gradient(
    140% 200% at 50% -20%,
    rgba(255, 255, 255, 0.35) 0%,
    transparent 55%
  );
  opacity: 0;
}
.nav-btn.active:hover {
  filter: brightness(1.06);
  box-shadow:
    0 10px 28px rgba(235, 145, 75, 0.48),
    0 20px 44px rgba(201, 120, 46, 0.28),
    0 0 0 4px rgba(235, 145, 75, 0.16);
  transform: translateY(-3px);
}
.nav-btn.active:hover::before {
  opacity: 1;
  transform: scale(1.02);
}

/* Единый стиль кнопок «Назад» и вторичных действий (профиль, админ) */
.chrome-back-btn,
.chrome-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.chrome-back-icon,
.chrome-action-btn .admin-refresh-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  line-height: 0;
  flex-shrink: 0;
}
.chrome-back-icon svg,
.chrome-action-btn .admin-refresh-icon svg {
  width: 16px;
  height: 16px;
}
.chrome-back-btn:hover .chrome-back-icon {
  transform: translateX(-2px);
  transition: transform 0.35s var(--ease-out-soft);
}

.profile-wrap {
  position: relative;
  flex-shrink: 0;
  margin-left: auto;
}
.profile-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: linear-gradient(135deg, #fff, #fff5ec);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  padding: 0;
  font-weight: 700;
  color: var(--accent);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.profile-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 20px rgba(235, 145, 75, 0.28);
  border-color: var(--accent);
}
.profile-btn img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: none;
  border-radius: 50%;
}
.profile-btn img.is-visible { display: block; }
.profile-btn span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
}
.profile-btn span.is-hidden { display: none; }
.profile-menu {
  position: absolute;
  left: 50%;
  right: auto;
  top: calc(100% + 10px);
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(217, 160, 114, 0.22);
  padding: 8px;
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-12px) scale(0.94);
  transform-origin: top center;
  transition:
    opacity .32s cubic-bezier(0.4, 0, 0.2, 1),
    transform .32s cubic-bezier(0.4, 0, 0.2, 1),
    visibility .32s;
  pointer-events: none;
}
.profile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}
.profile-menu.is-open .profile-menu-item {
  animation: menuItemIn .35s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}
.profile-menu.is-open .profile-menu-item:nth-child(1) { animation-delay: .04s; }
.profile-menu.is-open .profile-menu-item:nth-child(2) { animation-delay: .1s; }
@keyframes menuItemIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.profile-menu-head { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.profile-menu-item {
  width: 100%; text-align: left;
  border: none; background: transparent;
  padding: 10px 12px; border-radius: 10px;
  cursor: pointer; color: var(--txt);
  transition: background .15s;
}
.profile-menu-item:hover {
  background: #fff7f0;
  transform: translateX(2px);
}
.profile-menu-item.danger { color: var(--danger); }

.app-main {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  flex: 1 0 auto;
  min-width: 0;
  isolation: isolate;
}
.tab-panel {
  grid-column: 1;
  grid-row: 1;
  display: none;
  min-width: 0;
}
.tab-panel[hidden] {
  display: none !important;
  pointer-events: none !important;
}
.tab-panel.active,
.tab-panel.tab-leaving {
  display: block;
}
.tab-panel.tab-leaving {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1;
  pointer-events: none;
  animation: pageFadeOut var(--dur-page-out) var(--ease-in-soft) forwards;
}
.tab-panel.active {
  position: relative;
  z-index: 2;
  animation: pageFadeInStable 0.32s var(--ease-out-soft) both;
}
.tab-panel.tab-entering.active {
  animation: pageFadeInStable 0.32s var(--ease-out-soft) both;
}
#tabSettings .settings-shell {
  background: var(--card);
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 1;
}
@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes pageFadeInStable {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pageFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-12px);
  }
}
.app-screen.app-returning {
  animation: pageFadeIn 0.5s var(--ease-out-soft) both;
}

/* Home dropzone */
.hero-card { padding: 32px 28px; text-align: center; }
.upload-intro { margin-bottom: 28px; }
.upload-intro h2 {
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.25;
}
.upload-lead {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 4px;
}
.panel-desc,
.settings-intro {
  line-height: 1.6;
  margin-bottom: 16px;
}
.settings-intro { margin-bottom: 20px; }
.promo-banner-text p,
.info-tile p,
.feature-banner p {
  line-height: 1.6;
}
.upload-category-block {
  max-width: 400px;
  margin: 0 auto 24px;
  text-align: left;
}
.home-category-label { display: grid; gap: 8px; margin: 0; }
.category-label-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--txt);
  letter-spacing: 0.01em;
}
.custom-select-mount { width: 100%; }

/* Custom animated select */
.custom-select {
  position: relative;
  width: 100%;
}
.custom-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--txt);
  text-align: left;
  transition: border-color .25s ease, box-shadow .25s ease, transform .2s ease;
}
.custom-select-trigger:hover {
  border-color: rgba(235, 145, 75, 0.55);
  box-shadow: 0 4px 14px rgba(217, 160, 114, 0.12);
  background: linear-gradient(180deg, #fff 0%, #fffaf6 100%);
}
.custom-select.is-open .custom-select-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(235, 145, 75, 0.18);
}
.custom-select-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  margin-top: -4px;
  flex-shrink: 0;
  transition: transform .4s cubic-bezier(0.4, 0, 0.2, 1);
}
.custom-select.is-open .custom-select-chevron {
  transform: rotate(-135deg);
  margin-top: 4px;
}
.custom-select-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(63, 46, 34, 0.14);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px) scaleY(0.92);
  transform-origin: top center;
  transition:
    max-height .45s cubic-bezier(0.4, 0, 0.2, 1),
    opacity .32s cubic-bezier(0.4, 0, 0.2, 1),
    transform .38s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.custom-select.is-open .custom-select-panel {
  max-height: min(320px, 50vh);
  opacity: 1;
  transform: translateY(0) scaleY(1);
  pointer-events: auto;
}
.custom-select-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: min(300px, 48vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.custom-select-option {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 11px 12px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  color: var(--txt);
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.custom-select.is-open .custom-select-option {
  animation: selectOptionIn .4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
  animation-delay: calc(var(--item-i) * 0.045s + 0.06s);
}
@keyframes selectOptionIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.custom-select-option:hover {
  background: #fff7f0;
  transform: translateX(2px);
}
.custom-select-option.is-selected {
  background: linear-gradient(135deg, rgba(242, 165, 100, 0.25), rgba(235, 145, 75, 0.12));
  color: var(--txt);
  font-weight: 600;
}
.custom-select-inline { display: block; width: 100%; }
.native-select-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.quick-settings .custom-select { margin-top: 4px; }
.hero-dropzone {
  position: relative;
  border: 2px dashed rgba(235, 145, 75, 0.32);
  border-radius: 22px;
  padding: 48px 20px;
  margin-top: 0;
  background: linear-gradient(180deg, #fff 0%, #fffaf6 100%);
  cursor: pointer;
  overflow: hidden;
  transition:
    border-color 0.35s var(--ease-out-soft),
    background 0.35s var(--ease-out-soft),
    box-shadow 0.35s var(--ease-out-soft),
    transform 0.35s var(--ease-out-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}
.hero-dropzone::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    118deg,
    transparent 28%,
    rgba(235, 145, 75, 0.05) 44%,
    rgba(242, 165, 100, 0.09) 50%,
    rgba(235, 145, 75, 0.05) 56%,
    transparent 72%
  );
  transform: translateX(-115%);
  transition: transform 1.55s cubic-bezier(0.33, 0, 0.2, 1);
  pointer-events: none;
}
.hero-dropzone:hover {
  border-color: rgba(235, 145, 75, 0.55);
  background: #fffbf8;
  transform: translateY(-2px);
  box-shadow:
    0 8px 22px rgba(217, 160, 114, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}
.hero-dropzone:hover::before {
  transform: translateX(115%);
}
.hero-dropzone.active {
  border-color: var(--accent);
  background: #fff9f5;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(235, 145, 75, 0.16);
}
.hero-dropzone.loading {
  opacity: 0.7;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}
.drop-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  z-index: 2;
}
.drop-icon,
.drop-title,
.drop-hint {
  position: relative;
  z-index: 1;
  transition: transform 0.35s var(--ease-out-soft), color 0.3s ease;
}
.drop-icon {
  display: block;
  font-size: 2.5rem;
  margin: 0 auto 8px;
  line-height: 1;
}
.hero-dropzone:hover .drop-icon {
  transform: translateY(-2px) scale(1.04);
}
.hero-dropzone:hover .drop-hint {
  color: var(--muted);
}
.hero-dropzone.active .drop-icon {
  transform: scale(1.05);
}
.drop-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0 0 6px;
}
.drop-hint {
  font-size: 14px;
  margin: 0;
}

/* Configurator */
.config-toolbar, .editor, .settings-block { padding: 24px; margin-bottom: 16px; }
.controls label { min-width: 200px; flex: 1; }
.mode-pill {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.file-btn { position: relative; display: inline-flex; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.section-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #c9782e;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(235, 145, 75, 0.12);
  border: 1px solid rgba(235, 145, 75, 0.28);
  margin-bottom: 10px;
}
.file-btn span {
  display: inline-block;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #fff9f4 100%);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.file-btn:hover span {
  border-color: rgba(235, 145, 75, 0.55);
  box-shadow: 0 4px 14px rgba(235, 145, 75, 0.14);
}
.products { display: grid; gap: 14px; margin-top: 10px; }
.product-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: #ffffff;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
  content-visibility: auto;
  contain-intrinsic-size: auto 220px;
}
.product-row:hover {
  border-color: rgba(235, 145, 75, 0.35);
  box-shadow: 0 10px 28px rgba(217, 160, 114, 0.14);
  transform: translateY(-1px);
}
.row-title { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.thumb { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; cursor: zoom-in; transition: transform .2s; }
.thumb img:hover { transform: scale(1.03); }
.thumb .meta { font-size: 11px; color: var(--muted); padding: 8px 8px 9px; line-height: 1.35; }
.thumb--raw { border-style: dashed; border-color: rgba(235, 145, 75, 0.45); }
.thumb--raw .meta { color: var(--muted); font-size: 11px; line-height: 1.35; }
.slot-empty {
  border: 1px dashed var(--line); border-radius: 10px; min-height: 140px;
  display: grid; place-items: center; color: var(--muted);
}
.product-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fffaf6;
  border: 1px solid rgba(222, 175, 134, 0.45);
}
.product-toolbar-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}
.toggle-chip {
  border: 1px solid rgba(222, 175, 134, 0.55);
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    color 0.25s var(--ease-out-soft),
    background 0.28s var(--ease-out-soft),
    border-color 0.28s var(--ease-out-soft),
    box-shadow 0.28s var(--ease-out-soft),
    transform 0.2s var(--ease-out-soft);
}
.toggle-chip:hover {
  color: var(--txt);
  border-color: rgba(235, 145, 75, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(235, 145, 75, 0.18);
}
.toggle-chip:active {
  transform: scale(0.97);
}
.toggle-chip.is-on {
  color: #fff;
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 8px 22px rgba(235, 145, 75, 0.35);
}
.product-toolbar-field {
  display: grid;
  gap: 4px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  flex: 1 1 140px;
  min-width: 120px;
}
.product-toolbar-field--narrow {
  flex: 0 1 88px;
  min-width: 72px;
}
.product-toolbar-field select,
.product-toolbar-field input {
  width: 100%;
  font-size: 14px;
  font-weight: 500;
  color: var(--txt);
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}
.product-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.product-batch-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--txt);
  letter-spacing: 0.01em;
}
.product-row-top .btn {
  min-height: 40px;
  padding: 8px 16px;
  flex-shrink: 0;
}
.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(222, 175, 134, 0.35);
}
.product-actions .btn {
  flex: 1 1 200px;
  max-width: 100%;
  min-height: 46px;
  transition: transform 0.2s var(--ease-out-soft), box-shadow 0.25s var(--ease-out-soft);
}
.product-actions .btn-primary {
  flex: 1 1 240px;
}
.product-actions .btn:active {
  transform: scale(0.98);
}
.products.is-processing {
  position: relative;
  pointer-events: none;
  opacity: 0.72;
}
.products.is-processing::after {
  content: attr(data-processing-text);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.45;
  color: var(--accent);
  background: rgba(255, 248, 243, 0.72);
  border-radius: 14px;
  z-index: 2;
  white-space: pre-wrap;
}
.product-processing-hint {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  min-height: 0;
}
.product-processing-hint:empty {
  display: none;
}
.product-row--busy {
  outline: 2px solid rgba(235, 145, 75, 0.45);
  outline-offset: 4px;
  border-radius: 14px;
}
.product-row--busy .product-processing-hint:not(:empty) {
  display: block;
}

/* Settings */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.logo-preview-box {
  min-height: 80px; padding: 10px; border-radius: 12px;
  border: 1px dashed var(--line);
  background: repeating-conic-gradient(#f1e8df 0% 25%, #fff 0% 50%) 50% / 14px 14px;
}
.logo-preview-box img { max-width: 200px; max-height: 90px; object-fit: contain; }
.logo-live-preview {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f5f5f5;
  aspect-ratio: 4/3;
  max-width: 420px;
}
.logo-preview-sample {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
}
.logo-preview-overlay {
  position: absolute;
  top: 12px;
  left: auto;
  right: 12px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.15));
  transition: width .2s ease;
  touch-action: none;
  user-select: none;
  z-index: 2;
}
.logo-preview-overlay.is-scaling {
  transition: none;
}
.logo-preview-overlay--draggable {
  pointer-events: auto;
  cursor: grab;
  z-index: 5;
}
.logo-preview-overlay--draggable.is-dragging {
  cursor: grabbing;
  z-index: 6;
  transition: none;
}
.logo-drag-hint { margin: 0 0 10px; font-size: 14px; line-height: 1.45; }
.logo-preview-actions { flex-wrap: wrap; gap: 8px; }
.categories-list-hint { margin: 0 0 12px; font-size: 14px; line-height: 1.45; }
.category-select-hint { font-size: 12px; line-height: 1.4; display: block; margin-top: 4px; }
.categories-list { display: grid; gap: 10px; margin-top: 12px; }
.asset-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; margin-top: 10px; }
.asset-preview-grid img { width: 100%; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* Status & toast */
.upload-status { font-size: 14px; margin-top: 10px; min-height: 0; }
.upload-status:not([hidden]) { min-height: 20px; }
.upload-status[hidden] { display: none; }
.upload-status.is-loading { color: var(--accent); font-weight: 600; }
.upload-status.is-error { color: var(--danger); }
.upload-status.is-success { color: #2f8f4e; }
.upload-toast,
.app-toast {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14px;
}
.upload-toast.error,
.app-toast.error {
  background: rgba(213,93,93,.12); border: 1px solid rgba(213,93,93,.3); color: #9f3f3f;
}
.upload-toast.success,
.app-toast.success {
  background: rgba(47,143,78,.12); border: 1px solid rgba(47,143,78,.3); color: #2f6f45;
}
.app-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 350;
  max-width: min(92vw, 480px);
  margin: 0;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(63, 46, 34, 0.18);
  animation: appToastIn .35s cubic-bezier(.22, 1, .36, 1);
}
@keyframes appToastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* App message dialog */
.app-message-dialog {
  border: none;
  padding: 0;
  max-width: min(92vw, 440px);
  background: transparent;
  overflow: visible;
}
.app-message-dialog::backdrop {
  background: rgba(63, 46, 34, 0.55);
}
.app-message-card {
  background: linear-gradient(180deg, #fff 0%, #fffaf5 100%);
  border: 1px solid rgba(222, 175, 134, 0.55);
  border-radius: var(--radius-lg);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-lg);
  animation: appMessageIn .32s cubic-bezier(.22, 1, .36, 1);
}
.app-message-card.is-confirm {
  border-color: rgba(235, 145, 75, 0.45);
}
.app-message-kicker {
  display: block;
  margin: 0 0 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c9782e;
}
@keyframes appMessageIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.app-message-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
}
.app-message-card.is-error .app-message-icon-wrap {
  background: rgba(213, 93, 93, 0.12);
  border: 1px solid rgba(213, 93, 93, 0.28);
}
.app-message-card.is-error .app-message-icon::before { content: "!"; color: #c44f4f; font-weight: 800; font-size: 22px; }
.app-message-card.is-warning .app-message-icon-wrap {
  background: rgba(235, 145, 75, 0.14);
  border: 1px solid rgba(235, 145, 75, 0.35);
}
.app-message-card.is-warning .app-message-icon::before { content: "?"; color: var(--accent); font-weight: 800; font-size: 22px; }
.app-message-card.is-danger .app-message-icon-wrap {
  background: rgba(213, 93, 93, 0.12);
  border: 1px solid rgba(213, 93, 93, 0.28);
}
.app-message-card.is-danger .app-message-icon::before { content: "!"; color: #c44f4f; font-weight: 800; font-size: 22px; }
.app-message-title {
  margin: 0 0 10px;
  text-align: center;
  font-size: 1.15rem;
  color: var(--txt);
}
.app-message-text {
  margin: 0 0 14px;
  text-align: center;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}
.app-message-note {
  margin: 0 0 18px;
  padding: 10px 14px;
  border-radius: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: #9f3f3f;
  background: rgba(213, 93, 93, 0.09);
  border: 1px solid rgba(213, 93, 93, 0.24);
}
.app-message-card.is-warning .app-message-note,
.app-message-card.is-warning.is-confirm .app-message-note {
  color: #a65c24;
  background: rgba(235, 145, 75, 0.12);
  border-color: rgba(235, 145, 75, 0.32);
}
.app-message-card.is-danger .app-message-note {
  color: #9f3f3f;
  background: rgba(213, 93, 93, 0.1);
  border-color: rgba(213, 93, 93, 0.28);
}
.app-message-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.app-message-actions.is-confirm-layout {
  justify-content: space-between;
  flex-wrap: nowrap;
}
.app-message-actions.is-confirm-layout #appMessageConfirm {
  order: 1;
  margin-right: auto;
}
.app-message-actions.is-confirm-layout #appMessageCancel {
  order: 2;
  margin-left: auto;
}
.app-message-actions .btn {
  min-width: 132px;
  min-height: 44px;
}
.app-message-actions .btn-ghost {
  background: rgba(255, 255, 255, 0.95);
}

/* Modals */
.preview-dialog, .modal-dialog {
  border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 16px; border: none;
  max-width: min(96vw, 900px);
}
.modal-wide { max-width: min(96vw, 1000px); }
.preview-dialog::backdrop {
  background: rgba(63, 46, 34, 0.55);
}
.preview-dialog {
  padding: 12px;
  cursor: zoom-out;
}
.preview-dialog img {
  max-width: 100%;
  max-height: 85vh;
  display: block;
  margin: 0 auto;
  cursor: default;
  border-radius: 8px;
}
.history-list { display: grid; gap: 10px; max-height: 60vh; overflow: auto; }
.history-item {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  display: grid; gap: 8px;
}
.history-thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.history-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* Home promo & banners */
.promo-banner {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
  gap: 18px;
  padding: 22px;
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
  align-items: center;
  background: linear-gradient(135deg, #fffdfb 0%, #fff4ea 52%, #ffe9d6 100%);
  border: 1px solid rgba(235, 160, 95, 0.18);
}
.promo-banner::before {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -70px;
  top: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(235, 145, 75, 0.16), transparent 72%);
  pointer-events: none;
}
.promo-banner h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 8px; }
.promo-banner-art {
  position: relative;
  z-index: 1;
  min-height: 168px;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: #fde8d6;
  box-shadow: 0 14px 34px rgba(198, 112, 52, 0.14);
}
.promo-banner-img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 168px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
}
/* Home — примеры работ */
.home-showcase {
  padding: 22px 20px 24px;
  margin-bottom: 16px;
  overflow: hidden;
}
.home-showcase-head {
  margin-bottom: 20px;
  max-width: 640px;
}
.home-showcase-head h2 {
  margin-bottom: 10px;
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
}
.home-showcase-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}
.showcase-collage {
  position: relative;
  min-height: 300px;
  max-width: 760px;
  margin: 0 auto;
  padding: 6px 2px 10px;
}
.showcase-piece {
  margin: 0;
  width: clamp(152px, 31%, 196px);
  transition: transform 0.32s var(--ease-out-soft), box-shadow 0.32s ease;
}
.showcase-piece:hover {
  z-index: 3;
  transform: translateY(-5px) rotate(0deg) scale(1.04) !important;
}
.showcase-frame {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(222, 175, 134, 0.55);
  box-shadow: 0 10px 28px rgba(63, 46, 34, 0.12);
  background: #fffaf6;
  cursor: zoom-in;
}
.showcase-frame:focus-visible {
  outline: 2px solid var(--accent, #c97b3a);
  outline-offset: 3px;
}
.showcase-bg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}
.showcase-piece--1 {
  position: absolute;
  left: 0;
  top: 6px;
  transform: rotate(-3.5deg);
}
.showcase-piece--2 {
  position: absolute;
  left: 31%;
  top: 32px;
  transform: rotate(2deg);
  width: clamp(148px, 30%, 188px);
}
.showcase-piece--3 {
  position: absolute;
  right: 0;
  top: 0;
  transform: rotate(2.8deg);
  width: clamp(140px, 28%, 176px);
}
.showcase-piece--4 {
  position: absolute;
  left: 12%;
  bottom: 2px;
  transform: rotate(-1.5deg);
  width: clamp(144px, 29%, 180px);
}
.showcase-piece--5 {
  position: absolute;
  right: 14%;
  bottom: 8px;
  transform: rotate(-2.8deg);
  width: clamp(150px, 31%, 190px);
}

/* Reviews */
.reviews-section {
  padding: 22px 20px 24px;
  margin-bottom: 16px;
}
.reviews-section--login {
  position: relative;
  z-index: 2;
  width: min(1100px, 100%);
  margin-top: clamp(20px, 4vw, 32px);
}
.reviews-head {
  margin-bottom: 18px;
  max-width: 640px;
}
.reviews-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
}
.reviews-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}
.reviews-list {
  display: grid;
  gap: 12px;
}
.reviews-section--login .reviews-list {
  max-height: min(320px, 42vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-gutter: stable;
}
.reviews-list--grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.review-card {
  position: relative;
  padding: 16px 18px 16px 20px;
  border-radius: 14px;
  border: 1px solid rgba(222, 175, 134, 0.45);
  background: linear-gradient(180deg, #fff 0%, #fffaf6 100%);
  box-shadow: 0 8px 22px rgba(63, 46, 34, 0.06);
  transition: transform 0.3s var(--ease-out-soft), box-shadow 0.3s var(--ease-out-soft);
}
.review-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(217, 160, 114, 0.14);
}
.review-card::before {
  content: "“";
  position: absolute;
  left: 10px;
  top: 6px;
  font-size: 2rem;
  line-height: 1;
  color: rgba(235, 145, 75, 0.35);
  font-weight: 700;
  pointer-events: none;
}
.review-card-text {
  margin: 0 0 12px;
  padding-left: 8px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--txt);
  white-space: pre-wrap;
  word-break: break-word;
}
.review-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding-left: 8px;
}
.review-card-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--txt);
}
.review-card-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: linear-gradient(135deg, #fff5ec, #ffe8d4);
  border: 1px solid rgba(222, 175, 134, 0.5);
  flex-shrink: 0;
}
.review-card-date {
  font-size: 12px;
  color: var(--muted);
}
.review-card-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(235, 145, 75, 0.12);
  color: #b86a28;
}
.reviews-empty {
  margin: 0;
  text-align: center;
  padding: 20px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(222, 175, 134, 0.5);
  background: rgba(255, 250, 246, 0.8);
}
.review-compose {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.review-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 220px;
  padding: 12px 28px;
  box-shadow: 0 10px 26px rgba(235, 145, 75, 0.32);
}
.review-open-btn-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.22);
}
/* Модальное окно отзыва */
.review-dialog {
  border: none;
  padding: 0;
  max-width: min(92vw, 440px);
  width: min(92vw, 440px);
  background: transparent;
  overflow: visible;
}
.review-dialog::backdrop {
  background: rgba(63, 46, 34, 0.58);
  backdrop-filter: blur(2px);
}
.review-dialog-card {
  background: linear-gradient(180deg, #fff 0%, #fffaf5 100%);
  border: 1px solid rgba(222, 175, 134, 0.55);
  border-radius: var(--radius-lg);
  padding: 22px 22px 20px;
  box-shadow: 0 24px 56px rgba(63, 46, 34, 0.2);
  animation: reviewDialogIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes reviewDialogIn {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.review-dialog-title {
  margin: 0 0 18px;
  padding-top: 2px;
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  color: var(--txt);
  line-height: 1.3;
}
.review-form {
  display: grid;
  gap: 10px;
}
.review-form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--txt);
  display: grid;
  gap: 6px;
}
.review-author-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font: inherit;
  font-size: 15px;
  color: var(--muted);
  background: #fffaf6;
  cursor: default;
}
.review-textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font: inherit;
  font-size: 15px;
  line-height: 1.55;
  color: var(--txt);
  background: #fff;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.review-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(235, 145, 75, 0.18);
}
.review-form-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.review-char-count {
  font-size: 13px;
}
.review-form-hint {
  margin: 0;
  font-size: 13px;
}
.review-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.review-form-actions .btn-primary {
  min-width: 140px;
  box-shadow: 0 10px 24px rgba(235, 145, 75, 0.3);
}
.review-form-actions .btn-ghost {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
}
.review-form.is-busy {
  opacity: 0.72;
  pointer-events: none;
}
.review-dialog .review-form-actions {
  justify-content: center;
}

/* Auth: вход / регистрация / заявка — смена в одной карточке */
.auth-card-swap {
  position: relative;
  width: 100%;
  min-height: 200px;
}
.auth-swap-view {
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: stretch;
  animation: authSwapIn 0.32s var(--ease-out-soft) both;
}
.auth-swap-view[hidden] {
  display: none !important;
  animation: none;
}
@keyframes authSwapIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.auth-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: stretch;
}
.auth-panel[hidden] { display: none !important; }
.auth-card-intro--compact {
  margin-bottom: 14px !important;
  font-size: 13px;
  line-height: 1.5;
}
.auth-panel--beta .auth-form {
  gap: 12px;
}
.auth-panel--register h2 {
  margin-top: 0;
}
.auth-panel--register .auth-card-intro {
  margin-bottom: 16px !important;
}
.auth-panel--register .auth-form--register {
  gap: 14px;
  margin: 0;
}
.auth-form-primary,
.auth-register-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 14px;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-align: center;
}
.auth-form-primary {
  font-weight: 600;
}
.auth-panel--register .auth-form-primary {
  margin-top: 6px;
}
.auth-panel--beta .auth-form-primary {
  margin-top: 2px;
}
.auth-register-back {
  margin-top: 10px !important;
  font-weight: 500;
  color: var(--txt);
  background: #fff;
  border: 1px solid rgba(222, 175, 134, 0.5);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(63, 46, 34, 0.04);
}
.auth-register-back:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #fff 0%, #fff8f2 100%);
  border-color: rgba(235, 145, 75, 0.45);
  box-shadow: 0 6px 16px rgba(217, 160, 114, 0.12);
}
.auth-register-back:active {
  transform: translateY(0) scale(0.98);
}
.auth-register-error {
  margin: 10px 0 0;
}
.auth-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.auth-card-links .btn-sm {
  font-size: 13px;
  padding: 8px 14px;
}
.auth-card-links .btn-sm[hidden] {
  display: none !important;
}
.captcha-block {
  padding: 14px;
  border-radius: 12px;
  border: 1px dashed rgba(235, 145, 75, 0.45);
  background: rgba(255, 250, 246, 0.9);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}
.captcha-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}
.captcha-label { font-size: 13px; font-weight: 600; color: var(--txt); }
.captcha-timer {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  min-width: 3.2em;
  text-align: right;
}
.captcha-timer--idle {
  color: var(--muted);
  font-weight: 500;
}
.captcha-timer.is-urgent { color: #c44f4f; font-weight: 600; }
.captcha-refresh-btn {
  width: 100%;
  justify-content: center;
  margin: 0;
}
.captcha-input-label {
  display: grid;
  gap: 8px;
  margin: 0;
  width: 100%;
}
.captcha-input-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.4;
}
.captcha-input-label input {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}
.captcha-display {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.28em;
  text-align: center;
  padding: 14px 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff5ec, #ffe8d4);
  border: 1px solid rgba(235, 145, 75, 0.4);
  color: #a85e20;
  user-select: none;
  font-family: ui-monospace, Consolas, monospace;
}
.auth-panel--register .register-consent {
  align-items: flex-start;
  gap: 10px;
  margin-top: 2px;
}
.register-consent .remember-check-label { font-size: 13px; line-height: 1.45; }
.forgot-dialog-lead,
.register-success-text {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  color: var(--muted);
}
.forgot-result {
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  background: #fff7f0;
  border: 1px solid rgba(235, 145, 75, 0.35);
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}
.forgot-result.is-success { color: var(--txt); }
.forgot-result.is-error { color: #9f3f3f; background: rgba(213, 93, 93, 0.08); border-color: rgba(213, 93, 93, 0.28); }
.auth-forgot-result {
  margin: 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
}
.auth-panel--forgot .auth-form {
  gap: 12px;
}

/* Admin panel */
body.mode-app.admin-open #appScreen { display: none !important; }
body.mode-app.admin-open #adminScreen { display: flex !important; }
body.admin-open { overflow: hidden; }

.admin-screen {
  position: fixed;
  inset: 0;
  z-index: 110;
  flex-direction: column;
  background: rgba(255, 248, 243, 0.42);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  overflow: hidden;
}
.admin-screen:not([hidden]) {
  animation: profileFadeIn 0.55s var(--ease-out-soft) both;
}
.admin-screen.admin-restored,
.admin-screen.admin-restored:not([hidden]) {
  animation: none !important;
}
.admin-screen.admin-opening {
  animation: profileFadeIn 0.55s var(--ease-out-soft) both;
}
.admin-screen.admin-closing {
  animation: profileFadeOut var(--dur-page-out) var(--ease-in-soft) forwards;
}

.admin-topbar,
.admin-hero,
.admin-stat-card,
.admin-settings-panel,
.admin-data-panel {
  animation: profileBlockIn 0.62s var(--ease-out-soft) both;
  animation-delay: calc(var(--admin-i, 0) * 0.06s + 0.08s);
}
.admin-topbar { --admin-i: 0; }
.admin-hero { --admin-i: 1; }
.admin-stat-card { animation-delay: calc(var(--admin-i, 0) * 0.05s + 0.14s); }
.admin-settings-panel { --admin-i: 2; }
.admin-data-panel { --admin-i: 3; }

.admin-topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: max(12px, env(safe-area-inset-top)) auto 0;
  padding: 12px 16px;
  max-width: 960px;
  width: calc(100% - 28px);
  position: sticky;
  top: max(10px, env(safe-area-inset-top));
  z-index: 5;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(222, 175, 134, 0.4);
  box-shadow: 0 14px 36px rgba(63, 46, 34, 0.1);
}

.admin-topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  min-width: 0;
}
.admin-topbar-titles {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.admin-topbar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--txt);
  line-height: 1.2;
}
.admin-topbar-sub {
  font-size: 12px;
  line-height: 1.3;
}

.admin-screen-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 16px max(36px, calc(env(safe-area-inset-bottom) + 24px));
  -webkit-overflow-scrolling: touch;
}
.admin-screen-inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.admin-hero {
  padding: 22px 22px 20px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(222, 175, 134, 0.38);
  box-shadow: 0 12px 32px rgba(63, 46, 34, 0.08);
}
.admin-hero-title {
  margin: 6px 0 8px;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.admin-hero-lead {
  margin: 0;
  font-size: clamp(12px, 2.2vw, 14px);
  line-height: 1.45;
  max-width: 100%;
}
@media (min-width: 768px) {
  .admin-hero-lead {
    white-space: nowrap;
  }
}

.admin-stats-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  max-width: 1020px;
  margin: 0 auto;
}
.admin-stat-card {
  position: relative;
  isolation: isolate;
  flex: 0 1 300px;
  width: 300px;
  max-width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-rows: auto auto;
  grid-template-areas:
    "icon value"
    "icon label";
  column-gap: 14px;
  row-gap: 4px;
  padding: 14px 16px;
  min-height: 72px;
  align-items: center;
  border-radius: 16px;
  border: 1px solid rgba(222, 175, 134, 0.42);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 26px rgba(63, 46, 34, 0.07);
  overflow: hidden;
  cursor: default;
  transition:
    color 0.4s var(--ease-out-soft),
    transform 0.35s var(--ease-out-soft),
    box-shadow 0.45s var(--ease-out-soft),
    border-color 0.35s var(--ease-out-soft);
}
.admin-stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    120% 180% at 50% 0%,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 247, 238, 0.55) 48%,
    transparent 72%
  );
  opacity: 0;
  transform: scale(0.92);
  transition:
    opacity 0.4s var(--ease-out-soft),
    transform 0.45s var(--ease-out-soft);
  z-index: 0;
  pointer-events: none;
}
.admin-stat-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent 55%);
  pointer-events: none;
  z-index: 0;
}
.admin-stat-card:hover::before {
  opacity: 1;
  transform: scale(1);
}
.admin-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(235, 145, 75, 0.42);
  background: linear-gradient(180deg, #fff 0%, #fff6ec 100%);
  box-shadow:
    0 4px 12px rgba(217, 160, 114, 0.16),
    0 14px 32px rgba(235, 145, 75, 0.2),
    0 0 0 3px rgba(235, 145, 75, 0.1);
}
.admin-stat-icon {
  grid-area: icon;
  position: relative;
  z-index: 1;
  align-self: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #fff5ec, #ffe2c8);
  color: var(--accent);
  border: 1px solid rgba(235, 145, 75, 0.28);
}
.admin-stat-icon svg { width: 22px; height: 22px; }
.admin-stat-value {
  grid-area: value;
  position: relative;
  z-index: 1;
  align-self: end;
  font-size: clamp(1.55rem, 3.2vw, 1.9rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.admin-stat-value.is-live { color: #2d8a4e; }
.admin-stat-label {
  grid-area: label;
  position: relative;
  z-index: 1;
  align-self: start;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
}
.admin-stat-card[data-tone="online"] .admin-stat-icon {
  background: linear-gradient(145deg, #eefaf2, #d4f0dc);
  color: #2d8a4e;
  border-color: rgba(45, 138, 78, 0.25);
}
.admin-stat-pulse {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3cb56e;
  box-shadow: 0 0 0 0 rgba(60, 181, 110, 0.5);
  animation: adminPulse 1.8s ease infinite;
}
@keyframes adminPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(60, 181, 110, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(60, 181, 110, 0); }
}

.admin-settings-panel {
  padding: 20px 20px 18px;
  background: rgba(255, 255, 255, 0.94);
}
.admin-settings-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
}
.admin-settings-lead {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
}
.admin-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.admin-mode-btn {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(222, 175, 134, 0.5);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition:
    color 0.35s var(--ease-out-soft),
    background 0.4s var(--ease-out-soft),
    border-color 0.35s var(--ease-out-soft),
    box-shadow 0.4s var(--ease-out-soft),
    transform 0.35s var(--ease-out-soft);
}
.admin-mode-btn:hover {
  color: var(--txt);
  border-color: rgba(235, 145, 75, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(235, 145, 75, 0.14);
}
.admin-mode-btn.is-active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 8px 22px rgba(235, 145, 75, 0.35);
}

.admin-data-panel {
  padding: 20px 18px 18px;
  background: rgba(255, 255, 255, 0.96);
}
.admin-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  padding: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 252, 248, 0.98) 0%, rgba(255, 244, 234, 0.95) 100%);
  border: 1px solid rgba(222, 175, 134, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 4px 14px rgba(63, 46, 34, 0.04);
}
.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-height: 36px;
  padding: 7px 14px !important;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 999px !important;
  border: 1px solid transparent !important;
  color: var(--muted);
  background: transparent !important;
  box-shadow: none !important;
  transform: none;
  transition:
    color 0.32s var(--ease-out-soft),
    background 0.32s var(--ease-out-soft),
    border-color 0.32s var(--ease-out-soft),
    box-shadow 0.35s var(--ease-out-soft),
    transform 0.32s var(--ease-out-soft),
    filter 0.3s ease;
}
.admin-tabs .admin-tab.nav-btn::before {
  display: none;
}
.admin-tabs .admin-tab.nav-btn:hover {
  color: var(--txt);
  border-color: rgba(235, 145, 75, 0.28) !important;
  background: rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 4px 14px rgba(217, 160, 114, 0.12) !important;
  transform: translateY(-1px);
}
.admin-tabs .admin-tab.nav-btn.active,
.admin-tabs .admin-tab.nav-btn.is-active-tab {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  background: linear-gradient(135deg, var(--accent-2), var(--accent)) !important;
  box-shadow:
    0 6px 20px rgba(235, 145, 75, 0.34),
    0 2px 6px rgba(201, 120, 46, 0.12) !important;
  transform: translateY(-1px);
}
.admin-tabs .admin-tab.nav-btn.active:hover,
.admin-tabs .admin-tab.nav-btn.is-active-tab:hover {
  filter: brightness(1.05);
  box-shadow:
    0 10px 26px rgba(235, 145, 75, 0.42),
    0 0 0 3px rgba(235, 145, 75, 0.12) !important;
  transform: translateY(-2px);
}
.admin-tabs .admin-tab.nav-btn:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.14s;
}
.admin-tab-badge {
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  transition: background 0.3s var(--ease-out-soft), color 0.3s ease, transform 0.3s var(--ease-out-soft);
}
.admin-tab:not(.active):not(.is-active-tab) .admin-tab-badge {
  background: rgba(235, 145, 75, 0.14);
  color: #a85e20;
  border: 1px solid rgba(235, 145, 75, 0.22);
}
.admin-tab.active .admin-tab-badge,
.admin-tab.is-active-tab .admin-tab-badge {
  transform: scale(1.02);
}
.admin-tab-panel[hidden] { display: none !important; }
.admin-requests-list { display: grid; gap: 12px; }
.admin-request-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(222, 175, 134, 0.38);
  background: linear-gradient(180deg, #fff 0%, #fffaf6 100%);
  box-shadow: 0 6px 18px rgba(63, 46, 34, 0.05);
}
.admin-request-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.admin-request-meta strong {
  font-size: 15px;
  color: var(--txt);
}
.admin-request-meta span {
  font-size: 12px;
  color: var(--muted);
}
.admin-request-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.admin-request-status--pending {
  color: #a85e20;
  background: rgba(235, 145, 75, 0.16);
}
.admin-request-status--approved {
  color: #2d8a4e;
  background: rgba(45, 138, 78, 0.12);
}
.admin-request-status--rejected {
  color: #9f3f3f;
  background: rgba(213, 93, 93, 0.1);
}
.admin-request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.admin-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid transparent;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.28s var(--ease-out-soft),
    box-shadow 0.32s var(--ease-out-soft),
    background 0.28s ease,
    border-color 0.28s ease,
    color 0.24s ease,
    filter 0.28s ease;
}
.admin-action-btn:hover {
  transform: translateY(-2px);
}
.admin-action-btn:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.14s;
}
.admin-action-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.admin-action-btn--approve {
  color: #2a7a4a;
  border-color: rgba(52, 140, 86, 0.35);
  background: linear-gradient(180deg, #fff 0%, #f3fbf6 100%);
  box-shadow: 0 2px 8px rgba(45, 138, 78, 0.08);
}
.admin-action-btn--approve:hover {
  color: #fff;
  border-color: rgba(42, 122, 74, 0.5);
  background: linear-gradient(135deg, #6cc48a 0%, #3d9a62 55%, #2d8a4e 100%);
  box-shadow: 0 10px 24px rgba(45, 138, 78, 0.28);
  filter: brightness(1.02);
}
.admin-action-btn--reject,
.admin-action-btn--danger {
  color: #a84848;
  border-color: rgba(213, 93, 93, 0.38);
  background: linear-gradient(180deg, #fff 0%, #fff7f7 100%);
  box-shadow: 0 2px 8px rgba(213, 93, 93, 0.06);
}
.admin-action-btn--reject:hover,
.admin-action-btn--danger:hover {
  color: #fff;
  border-color: rgba(180, 70, 70, 0.45);
  background: linear-gradient(135deg, #e89090 0%, #d66a6a 50%, #c44f4f 100%);
  box-shadow: 0 10px 24px rgba(196, 79, 79, 0.28);
  filter: brightness(1.02);
}

.beta-approved-banner {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(45, 138, 78, 0.35);
  background: linear-gradient(180deg, #f4fcf7 0%, #fff 100%);
}
.beta-approved-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--txt);
}
.beta-request-success-dialog .review-dialog-card {
  text-align: center;
}
.beta-request-success-dialog .register-success-text {
  margin-bottom: 20px;
}
.auth-panel--beta .auth-card-intro { margin-bottom: 18px !important; }

.admin-users-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.admin-panel-head {
  margin-bottom: 4px;
}
.admin-refresh-btn.is-loading .admin-refresh-icon {
  animation: adminSpin 0.85s linear infinite;
}
.admin-refresh-btn.is-loading {
  pointer-events: none;
  opacity: 0.85;
}
@keyframes adminSpin {
  to { transform: rotate(360deg); }
}

.admin-users-lead {
  margin: 10px 0 16px;
  font-size: 13px;
  line-height: 1.5;
}
.admin-users-list { display: grid; gap: 12px; }

.admin-user-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(222, 175, 134, 0.38);
  background: linear-gradient(180deg, #fff 0%, #fffaf6 100%);
  box-shadow: 0 6px 18px rgba(63, 46, 34, 0.05);
  animation: profileBlockIn 0.5s var(--ease-out-soft) both;
  animation-delay: calc(var(--admin-i, 0) * 0.04s + 0.22s);
  transition: transform 0.22s var(--ease-out-soft), box-shadow 0.22s var(--ease-out-soft), border-color 0.2s ease;
}
.admin-user-row:hover {
  transform: translateY(-2px);
  border-color: rgba(235, 145, 75, 0.45);
  box-shadow: 0 12px 26px rgba(63, 46, 34, 0.09);
}
.admin-user-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1 1 200px;
}
.admin-user-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 800;
  color: #a85e20;
  background: linear-gradient(145deg, #ffe8d4, #ffd4b0);
  border: 1px solid rgba(235, 145, 75, 0.35);
  box-shadow: 0 4px 12px rgba(235, 145, 75, 0.15);
}
.admin-user-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.admin-user-meta strong {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}
.admin-user-meta > span:not(.admin-user-date) {
  font-size: 12px;
  color: var(--muted);
}
.admin-user-date {
  font-size: 11px;
  color: var(--muted);
  opacity: 0.9;
}

.admin-user-row .admin-action-btn--danger {
  flex-shrink: 0;
}

.admin-users-empty {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
  padding: 32px 20px;
  border-radius: 14px;
  border: 1px dashed rgba(235, 145, 75, 0.35);
  background: rgba(255, 250, 246, 0.85);
}
.admin-users-empty-icon {
  font-size: 28px;
  color: rgba(235, 145, 75, 0.45);
  line-height: 1;
}
.admin-users-empty p {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--txt);
}
.admin-users-empty .muted {
  font-size: 13px;
}

@media (max-width: 640px) {
  .admin-topbar {
    width: calc(100% - 20px);
    padding: 10px 12px;
  }
  .chrome-back-btn span:not(.chrome-back-icon) { display: none; }
  .chrome-back-btn { padding: 10px 12px; }
  .admin-topbar-sub { display: none; }
  .admin-stats-grid {
    gap: 10px;
  }
  .admin-stat-card {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    padding: 14px 12px;
  }
  .admin-stat-label {
    font-size: 12px;
  }
  .admin-mode-switch {
    grid-template-columns: 1fr;
  }
  .admin-user-row {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-user-row .admin-action-btn { width: 100%; }
  .admin-request-actions { width: 100%; }
  .admin-request-actions .admin-action-btn { flex: 1 1 auto; min-width: 108px; }
}

.feature-banners {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.feature-banner {
  padding: 18px;
  min-height: 140px;
  position: relative;
  overflow: hidden;
  transition: transform .28s ease, box-shadow .28s ease;
}
.feature-banner:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(217, 160, 114, 0.14);
}
.feature-banner::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  opacity: 0.25;
}
.banner-1::after { background: #f2a564; }
.banner-2::after { background: #eb914b; }
.banner-3::after { background: #e88c42; }
.feature-banner h3 { margin-bottom: 8px; font-size: 1rem; }
.feature-banner p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.info-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.info-tile {
  padding: 20px;
  display: grid;
  gap: 10px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.info-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(217, 160, 114, 0.16);
}
.info-tile-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.info-tile h3 { margin: 0; font-size: 1.05rem; }
.info-tile p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.faq-section { padding: 20px; margin-top: 8px; }
.faq-list { display: grid; gap: 10px; margin-top: 12px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
  transition: border-color .25s ease, box-shadow .25s ease, transform 0.22s var(--ease-out-soft);
}
.faq-item:hover {
  border-color: rgba(235, 145, 75, 0.4);
  box-shadow: 0 6px 18px rgba(217, 160, 114, 0.1);
}
.faq-item.open {
  border-color: rgba(235, 145, 75, 0.55);
  box-shadow: 0 8px 24px rgba(217, 160, 114, 0.12);
}
.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  color: var(--txt);
  text-align: left;
}
.faq-trigger:hover {
  background: #fffaf6;
  color: var(--accent);
}
.faq-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform .45s cubic-bezier(0.32, 0.72, 0, 1);
  flex-shrink: 0;
  margin-top: -4px;
}
.faq-item.open .faq-chevron { transform: rotate(-135deg); margin-top: 4px; }
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .48s cubic-bezier(0.32, 0.72, 0, 1);
}
.faq-item.open .faq-answer { grid-template-rows: 1fr; }
.faq-answer-inner { overflow: hidden; }
.faq-answer-inner p {
  margin: 0;
  padding: 0 18px 16px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .4s cubic-bezier(0.32, 0.72, 0, 1) .1s, transform .45s cubic-bezier(0.32, 0.72, 0, 1) .08s;
}
.faq-item.open .faq-answer-inner p {
  opacity: 1;
  transform: translateY(0);
}

/* Configurator */
#tabConfigurator .editor {
  min-height: 0;
  margin-bottom: 0;
  padding-bottom: 20px;
}
.editor-head { margin-bottom: 12px; }
.editor.has-products .editor-head { margin-bottom: 10px; }
.editor-footer {
  display: none;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.editor.has-products .editor-footer { display: flex; }
.editor-footer .btn {
  min-width: 148px;
  min-height: 44px;
}
.editor-empty {
  text-align: center;
  padding: 48px 24px;
  border: 2px dashed var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #fff9f4);
}
.editor-empty-visual {
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(242,165,100,.3), rgba(235,145,75,.1)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Crect fill='%23f5f5f5' width='100' height='100' rx='8'/%3E%3Cpath d='M25 70 L40 45 L55 55 L75 30' stroke='%23ddd' fill='none' stroke-width='2'/%3E%3Ccircle cx='35' cy='32' r='8' fill='%23e0e0e0'/%3E%3C/svg%3E") center/cover;
}
.editor-empty h4 { margin-bottom: 8px; font-size: 1.15rem; }
.editor-empty p { color: var(--muted); max-width: 480px; margin: 0 auto 16px; line-height: 1.55; }

/* Settings hub */
.settings-shell { padding: 24px; }
.settings-intro { margin-bottom: 20px; }
.settings-hub {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.settings-hub-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  padding: 12px 20px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: none;
  transform: none;
  transition:
    color 0.22s var(--ease-out-soft),
    background 0.22s var(--ease-out-soft),
    border-color 0.22s var(--ease-out-soft);
}
.settings-hub-btn:hover:not(.active) {
  color: var(--txt);
  border-color: var(--accent);
  background: #fff;
}
.settings-hub-btn:active { transform: scale(0.98); }
.settings-hub-btn.active {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(235, 145, 75, 0.28);
  transform: none;
}
.settings-panels-stage {
  position: relative;
  display: block;
  overflow: visible;
}
.settings-section-panel {
  display: none !important;
  min-width: 0;
}
.settings-section-panel[hidden] {
  display: none !important;
}
.settings-section-panel.active:not([hidden]) {
  display: block !important;
  animation: none;
}
.logo-form { margin-bottom: 8px; }
.logo-draft-preview { max-width: 200px; }
.settings-section-panel h4 { margin-bottom: 8px; }
.panel-desc { color: var(--muted); margin-bottom: 20px; line-height: 1.55; }
.sub-heading { margin: 24px 0 12px; font-size: 1rem; }
.form-block { margin-bottom: 20px; }
#categoryForm .btn-primary,
#backgroundForm .btn-primary,
#logoForm .btn-primary { margin-top: 8px; }
.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}
.range-row { display: flex; gap: 12px; align-items: center; }
.range-row input[type="range"] { flex: 1; }
.range-row input[type="number"] { width: 72px; }
.field-label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 10px; }

/* Angle slots */
.angle-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}
.angle-slot {
  position: relative;
  aspect-ratio: 1;
  border: 2px dashed var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  transition: border-color .2s;
}
.angle-slot:hover { border-color: var(--accent); }
.angle-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.angle-slot .slot-add {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 28px;
  font-weight: 300;
}
.angle-slot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.angle-slot .slot-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 6px;
  background: rgba(0,0,0,.55);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.angle-slot .slot-num {
  position: absolute;
  bottom: 4px;
  left: 6px;
  font-size: 11px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}

/* Backgrounds list */
.bg-draft-preview {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  max-width: 280px;
}
.bg-draft-preview img { width: 100%; display: block; max-height: 160px; object-fit: cover; }
.backgrounds-list { display: grid; gap: 12px; }
.background-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  background: #fff;
  overflow: hidden;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.background-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(235, 145, 75, 0.28);
  background: linear-gradient(180deg, #fff 0%, #fff9f4 100%);
}
.background-card-main {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  border-radius: 14px 0 0 14px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.background-card-main:hover {
  background: rgba(255, 247, 238, 0.65);
}
.background-card-main:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px rgba(235, 145, 75, 0.35);
}
.background-card-thumb {
  display: block;
  line-height: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.background-card-thumb img {
  width: 100px;
  height: 72px;
  object-fit: cover;
  display: block;
}
.background-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  min-width: 0;
}
.background-card .btn-danger {
  align-self: center;
  margin-right: 12px;
}
.background-card-meta strong { display: block; font-size: 15px; }
.background-card-meta .muted { font-size: 13px; line-height: 1.4; }
.bg-active-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
}
.backgrounds-list-hint { margin: 0 0 12px; font-size: 14px; }

.logos-hint { margin: -8px 0 12px; font-size: 14px; }
.logos-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.logo-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.95);
  display: grid;
  gap: 10px;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.logo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(217, 160, 114, 0.12);
}
.logo-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(235, 145, 75, 0.25);
}
.logo-card-select {
  border: none;
  padding: 0;
  background: #f8f8f8;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 16/10;
  width: 100%;
}
.logo-card-select img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 8px;
}
.logo-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.logo-card-meta strong { font-size: 14px; }
.logo-active-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
}
.logo-card-delete { width: 100%; }
.logo-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

/* Site footer */
.site-footer {
  flex-shrink: 0;
  margin-top: 0;
  padding: 22px 24px 20px;
  content-visibility: visible;
  contain: none;
  border: 1px solid rgba(222, 175, 134, 0.35);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 249, 244, 0.96) 100%);
  box-shadow: var(--shadow);
  opacity: 1;
  transform: none;
  will-change: auto;
}
.app-workspace.is-tab-changing .site-footer {
  transition: none;
}
.site-footer-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.footer-brand {
  min-width: 0;
}
.footer-brand-row {
  margin-bottom: 0;
}
.footer-brand-row > div {
  min-width: 0;
}
.footer-brand-row strong {
  display: block;
  font-size: 1.08rem;
  margin-bottom: 4px;
}
.footer-tagline {
  margin: 0;
  font-size: clamp(11px, 1.6vw, 13px);
  line-height: 1.35;
  max-width: none;
  white-space: nowrap;
}
.footer-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(222, 175, 134, 0.55) 12%, rgba(222, 175, 134, 0.55) 88%, transparent);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
}
.footer-copy {
  margin: 0;
  font-size: 13px;
  color: var(--txt);
  flex: 0 0 auto;
}
.footer-features {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 1 1 auto;
  justify-content: center;
}
.footer-features li {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.footer-features li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  flex-shrink: 0;
}
.footer-privacy {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  flex: 1 1 100%;
  text-align: center;
}
@media (min-width: 720px) {
  .footer-privacy {
    flex: 0 1 auto;
    margin-left: auto;
    text-align: right;
    max-width: 42ch;
  }
  .footer-bottom {
    justify-content: flex-start;
  }
}

/* Profile — отдельный полноэкранный режим (как вход / студия) */
.profile-screen {
  position: fixed;
  inset: 0;
  z-index: 110;
  flex-direction: column;
  min-height: 100vh;
  background: rgba(255, 248, 243, 0.55);
  overflow: hidden;
}
.profile-screen:not([hidden]) {
  animation: profileFadeIn 0.58s var(--ease-out-soft) both;
}
.profile-screen.profile-restored,
.profile-screen.profile-restored:not([hidden]) {
  animation: none !important;
}
.profile-screen.profile-opening {
  animation: profileFadeIn 0.58s var(--ease-out-soft) both;
}
.profile-screen.profile-closing {
  animation: profileFadeOut var(--dur-page-out) var(--ease-in-soft) forwards;
}
.profile-app-header,
.profile-screen-header,
.profile-screen-body .profile-section {
  animation: profileBlockIn 0.62s var(--ease-out-soft) both;
  animation-delay: calc(var(--i, 0) * 0.06s + 0.1s);
}
.profile-app-header { --i: 0; }
.profile-screen-header { --i: 1; }
.profile-screen-body .profile-section:nth-child(1) { --i: 2; }
.profile-screen-body .profile-section:nth-child(2) { --i: 3; }
.profile-screen-body .profile-section:nth-child(3) { --i: 4; }
@keyframes profileFadeIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes profileFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(16px);
  }
}
@keyframes profileBlockIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.profile-screen .card {
  background: rgba(255, 255, 255, 0.97);
}
body.profile-open { overflow: hidden; }
.profile-app-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 16px auto 0;
  padding: 12px 18px;
  max-width: 760px;
  width: calc(100% - 32px);
  position: sticky;
  top: 12px;
  z-index: 5;
}
.profile-app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.profile-app-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--txt);
}
.profile-screen-scroll {
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 16px 16px 40px;
}
.profile-screen-inner {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}
.profile-screen-header { padding: 20px; }
.profile-screen-hero {
  text-align: center;
  padding-top: 8px;
}
.profile-screen-avatar-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 3px solid var(--line);
  overflow: hidden;
  background: linear-gradient(135deg, #fff, #fff5ec);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  padding: 0;
  display: block;
  cursor: default;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.profile-screen-avatar-wrap.has-avatar:not(:disabled) {
  cursor: zoom-in;
}
.profile-screen-avatar-wrap.has-avatar:not(:disabled):hover {
  transform: scale(1.04);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(235, 145, 75, 0.25);
}
.profile-screen-avatar-wrap:disabled { opacity: 1; }
.profile-page-nickname {
  transition: color .2s ease;
}
.profile-page-nickname.is-live-update,
.profile-screen-avatar-wrap span.is-live-update {
  animation: profileLivePulse .38s cubic-bezier(.22, 1, .36, 1);
}
@keyframes profileLivePulse {
  0% { opacity: 0.45; transform: translateY(6px) scale(0.97); }
  55% { opacity: 1; transform: translateY(-1px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.profile-screen-avatar-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: none;
  border-radius: 50%;
}
.profile-screen-avatar-wrap img.is-visible { display: block; }
.profile-screen-avatar-wrap span.is-hidden { display: none; }
.profile-screen-avatar-wrap span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.profile-screen-body { display: grid; gap: 16px; }
.profile-section { padding: 22px; }
.profile-section h3 { margin-bottom: 16px; }
.profile-avatar-actions { gap: 10px; margin-bottom: 4px; }
.home-category-callout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  text-align: left;
  background: linear-gradient(135deg, rgba(255, 248, 243, 0.98) 0%, rgba(255, 237, 220, 0.92) 100%);
  border: 1px solid rgba(235, 145, 75, 0.38);
  box-shadow:
    0 10px 28px rgba(217, 160, 114, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  animation: homeCalloutIn 0.45s var(--ease-out-soft);
}
@keyframes homeCalloutIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.home-category-callout-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(235, 145, 75, 0.14);
  border: 1px solid rgba(235, 145, 75, 0.32);
  box-shadow: 0 4px 12px rgba(235, 145, 75, 0.12);
}
.home-category-callout-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.home-category-callout-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--txt);
  letter-spacing: 0.01em;
}
.home-category-callout-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}
.home-category-callout-text strong {
  color: #c9782e;
  font-weight: 600;
}
.categories-empty-hint {
  font-size: 14px;
  line-height: 1.55;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(213, 93, 93, 0.08);
  border: 1px solid rgba(213, 93, 93, 0.22);
  text-align: left;
}
.profile-history-head { margin-bottom: 12px; align-items: center; }
.profile-menu { min-width: 200px; }

.profile-go-btn { font-weight: 600; }

.feature-banners,
.info-tiles,
.promo-banner,
.home-showcase {
  content-visibility: auto;
  contain-intrinsic-size: auto 200px;
}

.category-chip {
  border: 1px solid rgba(222, 175, 134, 0.4);
  padding: 14px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
  background: #fff;
  text-align: left;
  width: 100%;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.category-chip-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.category-chip.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(235, 145, 75, 0.28);
  background: linear-gradient(180deg, #fff 0%, #fff9f4 100%);
}
.category-chip.is-inactive .category-chip-main:hover {
  opacity: 0.92;
}
.category-chip-main {
  flex: 1;
  min-width: 0;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  border-radius: 8px;
}
.category-chip-main:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(235, 145, 75, 0.35);
}
.category-expand-btn {
  flex-shrink: 0;
  color: var(--accent);
  border-color: rgba(235, 145, 75, 0.35);
  background: #fff9f4;
}
.category-expand-btn:hover {
  background: #fff3e8;
  border-color: var(--accent);
}
.category-expand-btn svg {
  transition: transform .28s cubic-bezier(.22, 1, .36, 1);
}
.category-expand-btn.is-open svg {
  transform: rotate(180deg);
}
.category-chip.is-expanded {
  border-color: rgba(235, 145, 75, 0.55);
}
.category-angles-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(222, 175, 134, 0.55);
  animation: categoryDrawerIn .32s cubic-bezier(.22, 1, .36, 1);
}
.category-angles-panel[hidden] {
  display: none;
}
@keyframes categoryDrawerIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.category-angles-drawer-title {
  font-size: 12px;
  margin: 0 0 10px;
  letter-spacing: 0.02em;
}
.category-angles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}
.category-angle-slot .slot-remove { z-index: 2; }
.category-angle-add { border-style: dashed; }
.category-chip-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.category-chip-head strong { font-size: 15px; }
.category-active-badge,
.category-default-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
}
.category-meta { font-size: 13px; display: block; }
.category-chip .icon-btn-trash {
  flex-shrink: 0;
}
.icon-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  color: var(--muted);
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .15s ease;
}
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn-trash {
  color: #b84a4a;
  border-color: rgba(213, 93, 93, 0.55);
  background: linear-gradient(180deg, #fff5f5 0%, rgba(213, 93, 93, 0.14) 100%);
  box-shadow: 0 2px 8px rgba(213, 93, 93, 0.12);
}
.icon-btn-trash svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.75;
}
.icon-btn-trash:hover {
  color: #fff;
  border-color: #c94f4f;
  background: linear-gradient(180deg, #d96a6a 0%, #c44f4f 100%);
  box-shadow: 0 4px 14px rgba(213, 93, 93, 0.35);
}
.icon-btn-trash:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(213, 93, 93, 0.25);
}

/* Scrollbar & accessibility */
html {
  scroll-behavior: smooth;
  /* Резервируем место под полосу прокрутки — без скачка ширины при смене вкладок */
  scrollbar-gutter: stable;
}

@supports not (scrollbar-gutter: stable) {
  html.mode-app {
    overflow-y: scroll;
  }
}
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(235, 145, 75, 0.45) rgba(255, 248, 243, 0.5);
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: rgba(255, 248, 243, 0.6); border-radius: 8px; }
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  border-radius: 8px;
  border: 2px solid rgba(255, 248, 243, 0.6);
}
@media (prefers-reduced-motion: reduce) {
  .bg-orb-1 {
    animation: none !important;
    will-change: auto;
  }
  html { scroll-behavior: auto; }
  .card,
  .btn,
  .info-card,
  .product-row { transition: none; }
  .tab-panel.active,
  .tab-panel.tab-leaving,
  .settings-section-panel.active,
  .settings-section-panel.settings-entering.active,
  .profile-screen:not([hidden]),
  .profile-screen.profile-closing,
  .admin-screen:not([hidden]),
  .admin-screen.admin-opening,
  .admin-screen.admin-closing,
  .app-screen.app-returning,
  .profile-app-header,
  .profile-screen-header,
  .profile-screen-body .profile-section,
  .admin-topbar,
  .admin-hero,
  .admin-stat-card,
  .admin-settings-panel,
  .admin-data-panel,
  .admin-insight-item,
  .admin-user-row {
    animation: none !important;
  }
  .admin-stat-pulse { animation: none !important; }
  .admin-refresh-btn.is-loading .admin-refresh-icon { animation: none !important; }
  .nav-btn,
  .nav-btn::before,
  .settings-hub-btn { transition: none; }
  .hero-dropzone,
  .hero-dropzone::before,
  .hero-dropzone .drop-icon {
    transition: none;
  }
  .remember-check-box,
  .remember-check-mark,
  .home-category-callout { animation: none; transition: none; }
}

@media (max-width: 900px) {
  .bg-ring-1 { width: 75vw; height: 75vw; }
  .bg-pattern-mesh { background-size: 36px 36px; }
  .footer-features {
    justify-content: flex-start;
  }
  .footer-privacy {
    text-align: left;
    margin-left: 0;
  }
  .promo-banner { grid-template-columns: 1fr; }
  .brand { min-width: auto; }
  .brand-title { font-size: 1rem; }
  .login-portal.active {
    justify-content: flex-start;
  }
  .login-portal-inner {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: unset;
    gap: 20px;
  }
  .login-showcase {
    order: 0 !important;
    text-align: center;
  }
  .auth-card {
    order: 1 !important;
  }
  .login-lead { margin-left: auto; margin-right: auto; }
  .login-features { text-align: left; display: inline-block; }
  .login-stats { justify-content: center; }
  :root { --app-chrome-h: 200px; }
  .app-screen { padding: 12px 14px 28px; }
  .site-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "brand profile"
      "nav nav" !important;
    align-items: center;
    top: max(8px, env(safe-area-inset-top));
    padding: 10px 12px;
    gap: 10px 12px;
    flex-wrap: nowrap !important;
  }
  .site-header > .brand {
    grid-area: brand;
    justify-self: start;
    min-width: 0;
  }
  .site-header > .profile-wrap {
    grid-area: profile;
    justify-self: end;
    align-self: center;
    margin-left: 0;
  }
  .site-header > .main-nav {
    grid-area: nav;
    width: 100%;
    flex: none !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    justify-content: stretch;
    overflow: visible;
  }
  .site-header .nav-btn {
    width: 100%;
    min-height: 40px;
    padding: 8px 3px;
    font-size: clamp(9px, 2.55vw, 11px);
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .showcase-collage {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-height: 0;
    max-width: none;
    padding: 0;
  }
  .showcase-piece {
    position: static !important;
    width: 100% !important;
    transform: rotate(0deg) !important;
  }
  .home-showcase {
    padding: 18px 16px 20px;
  }
}

/* Мобильные телефоны */
@media (max-width: 768px) {
  .login-portal.active {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
    padding-bottom: max(32px, calc(env(safe-area-inset-bottom) + 20px));
    scroll-padding-top: max(12px, env(safe-area-inset-top));
  }
  .login-portal-inner {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
  }
  .login-showcase {
    order: 0 !important;
    text-align: left;
  }
  .auth-card { order: 1 !important; }
  .login-showcase .brand-heading {
    justify-content: flex-start;
    gap: 10px;
  }
  .login-showcase h1 {
    font-size: 1.75rem;
    margin-bottom: 8px;
  }
  .login-showcase .brand-mark-lg {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }
  .login-showcase .brand-mark-lg img {
    width: 100%;
    height: 100%;
  }
  .login-lead {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 12px;
    max-width: none;
  }
  .login-features {
    margin-bottom: 14px;
    padding-left: 18px;
    font-size: 0.9rem;
    line-height: 1.55;
    display: block;
    text-align: left;
  }
  .login-features li { margin-bottom: 2px; }
  .login-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .login-stats div {
    min-width: 0;
    padding: 10px 8px;
    text-align: center;
  }
  .login-stats strong { font-size: 1.05rem; }
  .login-stats span { font-size: 11px; line-height: 1.25; display: block; }
  .auth-card {
    padding: 20px 18px;
    flex-shrink: 0;
    scroll-margin-top: max(10px, env(safe-area-inset-top));
  }
  .auth-panel--register .captcha-display {
    font-size: clamp(1.35rem, 5vw, 1.75rem);
    letter-spacing: 0.2em;
    padding: 12px 8px;
  }
  .auth-card h2 { font-size: 1.25rem; }
  .auth-card .muted { font-size: 0.9rem; }
  .auth-card .stack { gap: 12px; }
  .auth-card input {
    font-size: 16px;
    min-height: 44px;
  }
  .auth-card .btn-primary {
    min-height: 48px;
    font-size: 1rem;
  }
  .auth-card .auth-form-primary,
  .auth-card .auth-register-back {
    min-height: 40px;
    padding: 8px 14px;
    font-size: 14px;
  }
  .section-kicker { font-size: 11px; }
}

@media (max-width: 520px) {
  .footer-tagline {
    white-space: normal;
    line-height: 1.4;
  }
}

@media (max-width: 480px) {
  body.mode-auth .bg-glyph:not(.bg-glyph--latin) {
    color: rgba(200, 95, 35, 0.46);
  }
  .login-showcase .section-kicker { display: none; }
  .login-features { display: none; }
  .login-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .site-header .nav-btn {
    font-size: clamp(8px, 2.35vw, 10px);
    min-height: 38px;
    padding: 7px 2px;
  }
  .product-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .product-toolbar-toggles .toggle-chip {
    flex: 1;
    text-align: center;
  }
}

