

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

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

body {
  min-width: 320px;
  background: var(--bg-body, #07050e);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

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

figure {
  margin: 0;
}

h1,
h2,
h3,
p {
  margin: 0;
}

ul {
  margin: 0;
}

[hidden] {
  display: none !important;
}

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

.icon {
  display: inline-block;
  vertical-align: middle;
  flex: 0 0 auto;
}

.center {
  text-align: center;
}

.muted {
  color: var(--muted);
}

.tiny {
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.4;
}

:root {
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  --bg: #0e0b1a;
  --bg-body: #07050e;
  --bg-elevated: #171329;
  --text: #f5f3ff;
  --muted: #9a96b8;
  --faint: #837e9f;
  --violet: #7c5cff;
  --cyan: #22d3ee;
  --orange: #ff8a3d;
  --pink: #ff3d81;
  --green: #3dffa2;
  --warm: #ffd93d;
  --grad-accent: linear-gradient(135deg, #7c5cff 0%, #22d3ee 100%);
  --grad-cta: linear-gradient(135deg, #6b4bf0 0%, #0e7490 100%);
  --grad-warm: linear-gradient(135deg, #ff8a3d 0%, #ff3d81 100%);
  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.085);
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.07);
  --input-bg: rgba(255, 255, 255, 0.05);
  --sheet-bg: linear-gradient(180deg, #1c1733 0%, #120f22 100%);
  --shadow-card: 0 18px 48px -28px rgba(0, 0, 0, 0.85);
  --shadow-pop: 0 24px 60px -24px rgba(0, 0, 0, 0.9);
  --r-card: 24px;
  --r-btn: 18px;
  --sat: 0px;
  --sab: 0px;
  --sal: 0px;
  --sar: 0px;
  --app-height: 100dvh;
}

html[data-color-scheme='light'] {
  --bg: #f4f2fb;
  --bg-body: #e9e5f5;
  --bg-elevated: #ffffff;
  --text: #17122a;
  --muted: #5f5a7d;
  --faint: #6f6a8f;
  --glass: rgba(255, 255, 255, 0.7);
  --glass-2: rgba(255, 255, 255, 0.9);
  --line: rgba(23, 18, 42, 0.1);
  --line-soft: rgba(23, 18, 42, 0.06);
  --input-bg: rgba(255, 255, 255, 0.8);
  --sheet-bg: linear-gradient(180deg, #ffffff 0%, #f4f2fb 100%);
  --shadow-card: 0 18px 44px -26px rgba(45, 33, 92, 0.28);
  --shadow-pop: 0 24px 60px -24px rgba(45, 33, 92, 0.3);
}

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  height: var(--app-height, 100dvh);
  overflow: hidden;
  isolation: isolate;
  background: var(--bg);
}

@media (min-width: 521px) {
  body {
    background:
      radial-gradient(900px 520px at 50% -10%, rgba(124, 92, 255, 0.16), transparent 70%),
      #07050e;
  }

  .app {
    height: calc(100vh - 32px);
    height: calc(100dvh - 32px);
    height: calc(var(--app-height, 100dvh) - 32px);
    margin: 16px auto;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 32px;
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.025), 0 60px 140px -30px rgba(0, 0, 0, 0.95),
      0 0 90px -20px rgba(124, 92, 255, 0.35);
  }
}

.bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}

.bg__blob--violet {
  width: 360px;
  height: 360px;
  top: -130px;
  left: -120px;
  background: #7c5cff;
  opacity: 0.35;
}

.bg__blob--cyan {
  width: 300px;
  height: 300px;
  top: 33%;
  right: -150px;
  background: #22d3ee;
  opacity: 0.2;
}

.bg__blob--warm {
  width: 260px;
  height: 260px;
  bottom: -110px;
  left: -90px;
  background: #ff8a3d;
  opacity: 0.14;
}

.bg__grain {
  position: absolute;
  inset: 0;
  background-image: url('../assets/noise.svg');
  background-size: 180px 180px;
  opacity: 0.05;
  mix-blend-mode: soft-light;
}

html[data-color-scheme='light'] .bg__blob--violet {
  opacity: 0.16;
}

html[data-color-scheme='light'] .bg__blob--cyan {
  opacity: 0.12;
}

html[data-color-scheme='light'] .bg__blob--warm {
  opacity: 0.1;
}

html[data-color-scheme='light'] .bg__grain {
  opacity: 0.035;
  mix-blend-mode: multiply;
}

.appbar {
  position: relative;
  z-index: 20;
  flex: 0 0 auto;
  padding: calc(var(--sat, 0px) + 8px) 12px 6px;
}

.appbar__inner {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}

.appbar__back {
  flex: 0 0 auto;
}

.appbar__spacer {
  display: none;
}

.appbar__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-right: auto;
  padding-left: 2px;
}

.appbar__logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  filter: drop-shadow(0 6px 14px rgba(124, 92, 255, 0.45));
}

.appbar__name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.appbar__profile {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.appbar__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(150deg, var(--g1, #7c5cff), var(--g2, #22d3ee));
  box-shadow: 0 8px 18px -8px rgba(124, 92, 255, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}

.icon-btn {
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
  background: var(--glass);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.icon-btn:active {
  transform: scale(0.92);
}

#demo-banner {
  position: relative;
  z-index: 19;
  flex: 0 0 auto;
  margin: 0 14px 4px;
}

.demo-banner__btn {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 12px;
  border: 1px solid rgba(124, 92, 255, 0.32);
  background: rgba(124, 92, 255, 0.13);
  color: #ded7ff;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  text-align: left;
}

.demo-banner__text {
  flex: 1;
  min-width: 0;
}

html[data-color-scheme='light'] .demo-banner__btn {
  background: rgba(124, 92, 255, 0.1);
  color: #4a3ba8;
}

.screen {
  position: relative;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 6px 20px calc(var(--sab, 0px) + 28px);
  outline: none;
}

.screen::-webkit-scrollbar {
  display: none;
}

.screen-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.screen-inner > * {
  flex: 0 0 auto;
}

.screen-inner.is-entering {
  animation: screen-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.stack {
  display: flex;
  flex-direction: column;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.screen-head {
  margin: 10px 0 20px;
}

.screen-head__mark {
  display: inline-flex;
  width: 22px;
  height: 22px;
  margin-bottom: 8px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--grad-accent);
  color: #fff;
}

.screen-title {
  margin: 8px 0 8px;
  font-size: clamp(26px, 7.4vw, 34px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.screen-sub {
  margin: 0;
  max-width: 38ch;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.45;
}

.section {
  margin: 22px 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.hint-text {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 14px 0 0;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.4;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-weight: 650;
  font-size: 15px;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

.btn--primary {
  background: var(--grad-cta);
  color: #fff;
  box-shadow: 0 14px 28px -12px rgba(107, 75, 240, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.btn--glass {
  background: var(--glass);
  border-color: var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.btn--ghost {
  background: transparent;
  color: var(--muted);
}

.btn--block {
  width: 100%;
}

.btn--sm {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 13px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-row > .btn {
  flex: 1 1 120px;
}

.cta-bar {
  position: relative;
  z-index: 25;
  flex: 0 0 auto;
  padding: 8px 20px calc(var(--sab, 0px) + 14px);
  background: linear-gradient(to top, var(--bg) 55%, rgba(14, 11, 26, 0));
}

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 0 20px;
  border: 0;
  border-radius: 18px;
  background: var(--grad-cta);
  color: #fff;
  font-size: 16px;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 18px 36px -14px rgba(107, 75, 240, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.cta:active {
  transform: scale(0.97);
}

.cta:disabled {
  opacity: 0.5;
  transform: none;
}

.cta__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-color-scheme='light'] .cta-bar {
  background: linear-gradient(to top, var(--bg) 55%, rgba(244, 242, 251, 0));
}

html[data-color-scheme='light'] .cta {
  color: #fff;
}

.card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
}

.badge--hot {
  background: var(--grad-warm);
  color: #2a0b16;
  box-shadow: 0 5px 12px -4px rgba(255, 61, 129, 0.65);
}

.badge--soft {
  background: var(--glass-2);
  border: 1px solid var(--line);
  color: var(--muted);
}

.badge--demo {
  background: rgba(124, 92, 255, 0.18);
  border: 1px solid rgba(124, 92, 255, 0.4);
  color: #cfc8ff;
}

html[data-color-scheme='light'] .badge--demo {
  color: #4a3ba8;
}

.badge--telegram {
  background: rgba(42, 171, 238, 0.16);
  border: 1px solid rgba(42, 171, 238, 0.4);
  color: #8ed8ff;
}

.badge--admin {
  background: rgba(255, 138, 61, 0.16);
  border: 1px solid rgba(255, 138, 61, 0.4);
  color: #ffc08a;
}

.badge--status {
  background: var(--glass-2);
  color: var(--muted);
}

.badge--ready {
  background: rgba(61, 255, 162, 0.12);
  border: 1px solid rgba(61, 255, 162, 0.3);
  color: #8cffc6;
}

html[data-color-scheme='light'] .badge--ready {
  color: #0f7a4a;
}

.badge--generating,
.badge--queued,
.badge--publishing {
  background: rgba(124, 92, 255, 0.16);
  border: 1px solid rgba(124, 92, 255, 0.35);
  color: #cfc8ff;
}

html[data-color-scheme='light'] .badge--generating,
html[data-color-scheme='light'] .badge--queued,
html[data-color-scheme='light'] .badge--publishing {
  color: #4a3ba8;
}

.badge--failed {
  background: rgba(255, 90, 90, 0.14);
  border: 1px solid rgba(255, 90, 90, 0.35);
  color: #ffb3b3;
}

html[data-color-scheme='light'] .badge--failed {
  color: #b3261e;
}

.badge--paid_pending {
  background: rgba(255, 217, 61, 0.14);
  border: 1px solid rgba(255, 217, 61, 0.3);
  color: #ffe58a;
}

html[data-color-scheme='light'] .badge--paid_pending {
  color: #8a6d00;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}

.chip:active {
  transform: scale(0.96);
}

.chip.is-selected {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.35), rgba(34, 211, 238, 0.24));
  border-color: rgba(124, 92, 255, 0.6);
}

.chip--caption {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-row--scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 93%, transparent 100%);
  mask-image: linear-gradient(to right, #000 0, #000 93%, transparent 100%);
}

.chip-row--scroll::-webkit-scrollbar {
  display: none;
}

.segmented {
  display: inline-flex;
  padding: 5px;
  gap: 4px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--line);
}

.segmented__item {
  min-width: 78px;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
  font-size: 13.5px;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.segmented__item.is-active {
  background: var(--glass-2);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(127, 127, 158, 0.22);
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--grad-accent);
  transition: width 0.35s ease;
}

.progress--lg {
  height: 9px;
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.24);
  border-top-color: currentColor;
  animation: spin 0.8s linear infinite;
}

.cta .spinner {
  color: #fff;
}

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

.sticker {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  margin: 0;
  border-radius: 24%;
  border: 3px solid rgba(255, 255, 255, 0.88);
  background: linear-gradient(150deg, var(--g1, #7c5cff), var(--g2, #22d3ee));
  overflow: hidden;
  box-shadow: inset 0 2px 14px rgba(255, 255, 255, 0.25), inset 0 -14px 28px rgba(0, 0, 0, 0.16),
    0 18px 34px -18px rgba(0, 0, 0, 0.8);
}

.sticker::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 18% 8%, rgba(255, 255, 255, 0.34), transparent 55%);
  pointer-events: none;
}

.sticker__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sticker__emoji {
  font-size: 2.4rem;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.22));
}

.sticker__caption {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 7%;
  z-index: 2;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1.1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 12px rgba(0, 0, 0, 0.25);
}

.sticker--hero {
  width: 100%;
  border-width: 4px;
  box-shadow: inset 0 3px 20px rgba(255, 255, 255, 0.28), inset 0 -20px 40px rgba(0, 0, 0, 0.2),
    0 34px 64px -24px rgba(0, 0, 0, 0.85);
}

.sticker--hero .sticker__emoji {
  font-size: 6.4rem;
}

.sticker--hero .sticker__caption {
  font-size: 1.02rem;
  bottom: 8%;
}

.sticker--lg .sticker__emoji {
  font-size: 3.3rem;
}

.sticker--lg .sticker__caption {
  font-size: 0.8rem;
}

.sticker--md .sticker__emoji {
  font-size: 2.2rem;
}

.sticker--md .sticker__caption {
  font-size: 0.6rem;
}

.sticker--pack {
  border-width: 2px;
  border-radius: 22%;
}

.sticker--pack .sticker__emoji {
  font-size: 1.7rem;
}

.sticker--pack .sticker__caption {
  font-size: 0.42rem;
  bottom: 6%;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 34px 20px;
  border-radius: 22px;
  background: var(--glass);
  border: 1px dashed var(--line);
}

.empty--small {
  padding: 22px 16px;
}

.empty__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 92, 255, 0.14);
  color: #b9a9ff;
  margin-bottom: 2px;
}

.empty strong {
  font-size: 15px;
}

.empty .muted {
  font-size: 12.5px;
  line-height: 1.4;
}

.empty .btn {
  margin-top: 6px;
}

.error-orb {
  width: 68px;
  height: 68px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 90, 90, 0.12);
  border: 1px solid rgba(255, 90, 90, 0.3);
  color: #ff9b9b;
}

.error-title {
  font-size: 19px;
  font-weight: 800;
}

.error-sub {
  max-width: 34ch;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.error-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px;
  margin: 0 0 16px;
  text-align: center;
}

.error-card strong {
  font-size: 16px;
}

.toasts {
  position: absolute;
  left: 50%;
  bottom: calc(var(--sab, 0px) + 92px);
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% - 40px);
  max-width: 400px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border-radius: 16px;
  background: rgba(26, 22, 46, 0.94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-pop);
  color: #f5f3ff;
  font-size: 13.5px;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.toast.is-in {
  opacity: 1;
  transform: none;
}

.toast--error {
  border-color: rgba(255, 90, 90, 0.4);
}

.toast__icon {
  display: flex;
  color: var(--green);
}

.toast--error .toast__icon {
  color: #ff8a8a;
}

.sheet-layer {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 3, 10, 0.62);
  opacity: 0;
  transition: opacity 0.22s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 84%;
  overflow-y: auto;
  border-radius: 28px 28px 0 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: var(--sheet-bg);
  padding: 10px 20px calc(var(--sab, 0px) + 24px);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 -24px 64px -20px rgba(0, 0, 0, 0.9);
}

.sheet-layer.is-in .sheet-backdrop {
  opacity: 1;
}

.sheet-layer.is-in .sheet {
  opacity: 1;
  transform: none;
}

.sheet__handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: rgba(127, 127, 158, 0.35);
  margin: 2px auto 14px;
}

.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sheet__title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sheet__close {
  width: 34px;
  height: 34px;
  min-height: 34px;
}

.sheet-text {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}

.sheet .btn {
  margin-top: 4px;
}

.about {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 6px 0 4px;
}

.about__logo {
  border-radius: 18px;
  filter: drop-shadow(0 14px 26px rgba(124, 92, 255, 0.45));
  margin-bottom: 4px;
}

.about .tiny {
  margin-bottom: 0;
}

.rating {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 4px 0 18px;
}

.rating__star {
  padding: 4px;
  border: 0;
  background: none;
  color: rgba(127, 127, 158, 0.4);
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
}

.rating__star.is-active {
  color: var(--warm);
  filter: drop-shadow(0 4px 10px rgba(255, 217, 61, 0.4));
}

.rating__star:active {
  transform: scale(0.9);
}

.textarea {
  display: block;
  width: 100%;
  min-height: 88px;
  margin-bottom: 12px;
  padding: 12px 14px;
  resize: vertical;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.45;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.textarea:focus {
  border-color: rgba(124, 92, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}

.textarea::placeholder {
  color: var(--faint);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input {
  width: 100%;
  height: 48px;
  padding: 0 66px 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.input::placeholder {
  color: var(--faint);
}

.input:focus {
  border-color: rgba(124, 92, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}

.input-wrap.is-disabled .input {
  opacity: 0.45;
}

.input__count {
  position: absolute;
  right: 12px;
  color: var(--faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  cursor: pointer;
  user-select: none;
}

.switch__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch__track {
  position: relative;
  width: 42px;
  height: 26px;
  border-radius: 999px;
  background: rgba(127, 127, 158, 0.45);
  border: 1px solid var(--line);
  transition: background 0.2s ease, border-color 0.2s ease;
  flex: 0 0 auto;
}

.switch__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}

.switch__input:checked + .switch__track {
  background: var(--grad-accent);
  border-color: transparent;
}

.switch__input:checked + .switch__track .switch__thumb {
  transform: translateX(16px);
}

.switch__input:focus-visible + .switch__track {
  outline: 2px solid #7ce7ff;
  outline-offset: 3px;
}

.switch__label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.onb {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.onb-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin: 0 -20px;
}

.onb-track::-webkit-scrollbar {
  display: none;
}

.onb-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2px 20px 0;
}

.onb-art {
  position: relative;
  width: 100%;
  height: clamp(206px, 38vh, 282px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.onb-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 14px;
}

.onb-title {
  font-size: clamp(25px, 7vw, 32px);
  max-width: 19ch;
}

.onb-copy .screen-sub {
  max-width: 32ch;
  font-size: 14px;
}

.onb-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 16px;
}

.onb-feature {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--glass);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.onb-foot {
  margin-top: auto;
  padding-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.onb-dots {
  display: flex;
  gap: 4px;
}

.onb-dot {
  position: relative;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.onb-dot::after {
  content: '';
  position: absolute;
  left: 6px;
  right: 6px;
  top: 50%;
  height: 8px;
  margin-top: -4px;
  border-radius: 999px;
  background: rgba(127, 127, 158, 0.3);
  transition: background 0.2s ease, left 0.2s ease, right 0.2s ease;
}

.onb-dot.is-active::after {
  left: 2px;
  right: 2px;
  background: var(--grad-accent);
}

.onb-swipe {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--faint);
  font-size: 11.5px;
}

.photo-frame {
  position: relative;
  z-index: 2;
  width: 148px;
  height: 186px;
  border-radius: 24px;
  border: 4px solid rgba(255, 255, 255, 0.92);
  background: linear-gradient(160deg, #ffb86b 0%, #ff5cc8 52%, #7c5cff 100%);
  box-shadow: 0 32px 60px -24px rgba(255, 92, 200, 0.55), inset 0 2px 14px rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-7deg);
}

.photo-frame__face {
  font-size: 66px;
  line-height: 1;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.25));
}

.photo-frame__flash {
  position: absolute;
  top: -14px;
  right: -14px;
  color: var(--warm);
  filter: drop-shadow(0 4px 12px rgba(255, 138, 61, 0.85));
}

.photo-frame__label {
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(18, 14, 32, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.mini-sticker {
  position: absolute;
  width: 82px;
  padding: 7px 7px 9px;
  border-radius: 18px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  background: linear-gradient(150deg, var(--g1), var(--g2));
  box-shadow: 0 18px 32px -14px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.mini-sticker span {
  font-size: 32px;
  line-height: 1;
}

.mini-sticker em {
  font-style: normal;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.mini-sticker--a {
  right: 5%;
  top: 24%;
  transform: rotate(9deg);
  animation: floaty 5s ease-in-out infinite;
}

.mini-sticker--b {
  right: 17%;
  bottom: 6%;
  transform: rotate(-6deg);
  animation: floaty 6s ease-in-out infinite reverse;
}

.art-spark {
  position: absolute;
  color: var(--warm);
  filter: drop-shadow(0 4px 12px rgba(255, 138, 61, 0.7));
  animation: twinkle 3.4s ease-in-out infinite;
}

.art-spark--1 {
  left: 8%;
  top: 12%;
}

.art-spark--2 {
  right: 5%;
  bottom: 22%;
  color: var(--cyan);
  animation-delay: 1.2s;
}

.fan-card {
  position: absolute;
  width: 96px;
  height: 132px;
  border-radius: 20px;
  border: 3px solid rgba(255, 255, 255, 0.88);
  background: linear-gradient(160deg, var(--g1), var(--g2));
  box-shadow: 0 22px 42px -18px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.fan-card--0 {
  left: calc(50% - 128px);
  top: 44px;
  transform: rotate(-11deg);
}

.fan-card--1 {
  left: calc(50% - 48px);
  top: 26px;
  transform: rotate(0deg) scale(1.08);
  z-index: 2;
}

.fan-card--2 {
  left: calc(50% + 32px);
  top: 44px;
  transform: rotate(11deg);
}

.fan-card__emoji {
  font-size: 38px;
  line-height: 1;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.25));
}

.fan-card__title {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.fan-badge {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

.pack-preview {
  width: 208px;
  padding: 13px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: var(--glass-2);
  box-shadow: var(--shadow-pop);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform: rotate(-3deg);
}

.pack-preview__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pack-preview__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: linear-gradient(150deg, var(--g1), var(--g2));
  font-size: 32px;
}

.pack-preview__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 11px;
}

.pack-preview__title {
  font-size: 11.5px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pack-preview__link {
  color: var(--faint);
  font-size: 9px;
}

.tg-bubble {
  position: absolute;
  right: 3%;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2aabee, #229ed9);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  box-shadow: 0 14px 26px -10px rgba(42, 171, 238, 0.7);
  animation: floaty 5s ease-in-out infinite;
}

.photo-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 26px 18px 24px;
  border-radius: 26px;
  border: 1.5px dashed var(--line);
  background: var(--glass);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.dropzone:hover,
.dropzone.is-drag {
  border-color: rgba(124, 92, 255, 0.65);
  background: rgba(124, 92, 255, 0.08);
}

.dropzone__art {
  width: 150px;
  height: auto;
  margin-bottom: 6px;
}

.dropzone__title {
  font-size: 17px;
  font-weight: 750;
}

.dropzone__sub {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.dropzone__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.photo-tile {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--line);
}

.photo-tile.is-selected {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--violet), 0 0 0 5px rgba(124, 92, 255, 0.24);
}

.photo-tile__main {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  overflow: hidden;
  border-radius: inherit;
  cursor: pointer;
}

.photo-tile__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-tile__img--blank {
  background: linear-gradient(140deg, rgba(124, 92, 255, 0.3), rgba(34, 211, 238, 0.2));
}

.photo-tile__check {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--grad-accent);
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.photo-tile__remove {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(10, 8, 20, 0.62);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.photo-tile__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  background: rgba(8, 6, 15, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.photo-tile__overlay--error {
  background: rgba(40, 8, 20, 0.8);
  color: #ffb3b3;
}

.photo-tile__error-text {
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.3;
}

.photo-tile__retry {
  margin-top: 2px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 10.5px;
  font-weight: 700;
}

.quality {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(10, 8, 20, 0.55);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.quality--good {
  color: var(--green);
}

.quality--ok {
  color: var(--warm);
}

.quality--bad {
  color: #ff8a8a;
}

.photo-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  aspect-ratio: 3 / 4;
  padding: 6px;
  border-radius: 18px;
  border: 1.5px dashed var(--line);
  background: rgba(124, 92, 255, 0.04);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.photo-add:hover {
  border-color: rgba(124, 92, 255, 0.5);
  background: rgba(124, 92, 255, 0.09);
}

.hints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.hint-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--glass);
  color: var(--muted);
  font-size: 11.5px;
}

.demo-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0 0;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(124, 92, 255, 0.22);
  background: rgba(124, 92, 255, 0.1);
  color: #cfc8ff;
  font-size: 11.5px;
  line-height: 1.4;
}

html[data-color-scheme='light'] .demo-note {
  color: #4a3ba8;
}

.style-carousel {
  position: relative;
}

.style-nav {
  position: absolute;
  top: 103px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(14, 11, 26, 0.72);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.style-nav:hover {
  background: rgba(124, 92, 255, 0.55);
}

.style-nav:active {
  transform: scale(0.94);
}

.style-nav--prev {
  left: 2px;
}

.style-nav--next {
  right: 2px;
}

html[data-color-scheme='light'] .style-nav {
  border-color: rgba(20, 16, 40, 0.12);
  background: rgba(255, 255, 255, 0.86);
  color: #241c4d;
}

.style-track {
  display: flex;
  gap: 12px;
  margin: 0 -20px;
  padding: 4px 20px 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 20px;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.style-track::-webkit-scrollbar {
  display: none;
}

.style-card {
  position: relative;
  flex: 0 0 154px;
  height: 206px;
  padding: 0;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: linear-gradient(155deg, var(--g1), var(--g2));
  color: #fff;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
  box-shadow: 0 18px 36px -18px rgba(0, 0, 0, 0.8);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.style-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 6, 15, 0.84) 0%, rgba(8, 6, 15, 0.12) 54%, transparent 100%);
}

.style-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.style-card:active {
  transform: scale(0.97);
}

.style-card.is-selected {
  border-color: rgba(255, 255, 255, 0.92);
  transform: translateY(-2px);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.6), 0 24px 44px -18px rgba(124, 92, 255, 0.8);
}

.style-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
}

.style-card__check {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #17122a;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.style-card.is-selected .style-card__check {
  opacity: 1;
  transform: none;
}

.style-card__emoji {
  position: absolute;
  top: 46%;
  left: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  font-size: 56px;
  line-height: 1;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.3));
}

.style-card__meta {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.style-card__title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.style-card__tagline {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.78);
  font-size: 10.5px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.result-preview {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
}

.result-preview__art {
  position: relative;
  flex: 0 0 118px;
  width: 118px;
  display: flex;
  justify-content: center;
}

.result-preview__art .sticker {
  width: 118px;
  transform: rotate(-4deg);
}

.result-preview__halo {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.4), transparent 70%);
  filter: blur(8px);
}

.result-preview__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.result-preview__meta strong {
  font-size: 17px;
}

.result-preview__meta .muted {
  font-size: 12.5px;
  line-height: 1.4;
}

.result-preview__meta .tiny {
  margin-top: 3px;
}

.quick-sets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.counterbar {
  padding: 16px 16px 14px;
  margin-bottom: 18px;
}

.counterbar__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.counterbar__text {
  font-size: 14px;
  font-weight: 700;
}

.counterbar__hint {
  color: #ffcf8a;
  font-size: 11px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.counterbar__hint.is-visible {
  opacity: 1;
}

.emotion-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.emotion {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 76px;
  padding: 10px 4px 8px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.emotion:active {
  transform: scale(0.95);
}

.emotion__emoji {
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25));
}

.emotion__title {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emotion__check {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--grad-accent);
  color: #fff;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.emotion.is-selected {
  border-color: rgba(124, 92, 255, 0.7);
  background: linear-gradient(160deg, rgba(124, 92, 255, 0.3), rgba(34, 211, 238, 0.15));
}

.emotion.is-selected .emotion__title {
  color: var(--text);
}

.emotion.is-selected .emotion__check {
  opacity: 1;
  transform: none;
}

.caption-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  margin-bottom: 18px;
}

.caption-preview .sticker {
  flex: 0 0 96px;
  width: 96px;
  transform: rotate(-3deg);
}

.caption-preview__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.caption-preview__meta strong {
  font-size: 16px;
}

.caption-preview__meta .muted {
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cap-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cap-card {
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.cap-card__head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.cap-card__emoji {
  font-size: 22px;
  line-height: 1;
}

.cap-card__title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.caption-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
  transition: opacity 0.2s ease;
}

.cap-card.is-none .caption-chips {
  opacity: 0.4;
}

.stack--preview {
  min-height: 100%;
}

.preview-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 0 6px;
}

.preview-stage__glow {
  position: absolute;
  top: 4%;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.5), rgba(34, 211, 238, 0.14) 55%, transparent 72%);
  filter: blur(30px);
  pointer-events: none;
}

.preview-stage__sticker {
  position: relative;
  width: min(64vw, 264px);
}

.preview-stage__sticker .sticker {
  animation: floaty 6s ease-in-out infinite;
}

.preview-stage__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.preview-stage--loading {
  padding-top: 28px;
}

.preview-skeleton {
  position: relative;
  width: min(64vw, 264px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 24%;
  border: 3px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(150deg, rgba(124, 92, 255, 0.26), rgba(34, 211, 238, 0.16));
}

.preview-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.15) 50%, transparent 75%);
  background-size: 250% 100%;
  animation: shimmer 1.6s linear infinite;
}

.preview-skeleton__face {
  position: absolute;
  top: 42%;
  left: 50%;
  width: 44%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.preview-skeleton__line {
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: 18%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.preview-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.preview-loader__title {
  font-size: 19px;
  font-weight: 800;
}

.preview-loader__sub {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12.5px;
}

.dots-loader {
  width: 4px;
  height: 4px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: -9px 0 var(--muted), 9px 0 var(--muted);
  animation: blink 1.2s ease-in-out infinite;
}

.preview-stage--error {
  gap: 10px;
  padding: 40px 10px;
  text-align: center;
}

.preview-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.preview-actions .tiny {
  text-align: center;
}

.build-progress {
  padding: 16px;
  margin-bottom: 16px;
}

.build-progress__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.build-progress__count {
  font-size: 14px;
  font-weight: 700;
}

.build-progress__percent {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.build-progress__status {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.build-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.build-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.build-tile__art {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(150deg, var(--g1), var(--g2));
  display: flex;
  align-items: center;
  justify-content: center;
}

.build-tile__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.build-tile__emoji {
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25));
}

.build-tile__emoji--ghost {
  opacity: 0.35;
}

.build-tile__caption {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 7%;
  z-index: 2;
  overflow: hidden;
  display: -webkit-box;
  color: #fff;
  font-size: 7px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.build-tile__spinner {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.16) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.build-tile.is-ready .build-tile__art {
  border-color: rgba(255, 255, 255, 0.6);
}

.build-tile__check {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--green);
  color: #072014;
}

.build-tile.is-failed .build-tile__art {
  border-color: rgba(255, 90, 90, 0.6);
  background: rgba(255, 90, 90, 0.12);
}

.build-tile__icon--error {
  color: #ff8a8a;
}

.build-tile__label {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stack--result .screen-head {
  margin-bottom: 16px;
}

.pack-card {
  padding: 18px;
  margin-bottom: 18px;
}

.pack-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.pack-card__titles {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pack-card__title {
  overflow: hidden;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pack-grid__more {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border: 1px dashed var(--line);
  border-radius: 22%;
  background: var(--glass);
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
}

.pack-card__link {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 42px;
  margin-top: 14px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--glass);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.pack-card__link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pack-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pay-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 20px;
  margin-bottom: 18px;
  text-align: center;
}

.pay-card__star {
  width: 84px;
  height: 84px;
  margin-bottom: 8px;
  filter: drop-shadow(0 16px 28px rgba(255, 138, 61, 0.45));
  animation: floaty 6s ease-in-out infinite;
}

.pay-card__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 46px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.pay-card__price span {
  font-size: 30px;
}

.pay-card__label {
  margin-top: 7px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.benefits {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.benefits li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.35;
}

.benefits .icon {
  margin-top: 2px;
  color: var(--green);
}

.pay-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(124, 92, 255, 0.12);
  font-size: 13px;
  font-weight: 600;
}

.pay-status--error {
  background: rgba(255, 90, 90, 0.12);
  color: #ffb3b3;
}

html[data-color-scheme='light'] .pay-status--error {
  color: #b3261e;
}

.pay-status--ok {
  background: rgba(61, 255, 162, 0.12);
  color: #9bffd0;
}

html[data-color-scheme='light'] .pay-status--ok {
  color: #0f7a4a;
}

.stack--profile .screen-head {
  margin-bottom: 16px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin-bottom: 14px;
}

.profile-card__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(150deg, var(--g1, #7c5cff), var(--g2, #22d3ee));
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 10px 24px -10px rgba(124, 92, 255, 0.7);
}

.profile-card__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.profile-card__meta strong {
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-card__meta .muted {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  font-size: 12px;
  white-space: nowrap;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.stats__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 13px 6px;
  border-radius: 16px;
  border: 1px solid var(--line-soft);
  background: var(--glass);
}

.stats__cell strong {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stats__cell span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings {
  display: flex;
  flex-direction: column;
  padding: 6px;
}

.settings__row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 8px 10px;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.16s ease;
}

.settings__row:hover {
  background: rgba(127, 127, 158, 0.08);
}

.settings__row--static {
  cursor: default;
}

.settings__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(124, 92, 255, 0.14);
  color: #b9a9ff;
}

.settings__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.settings__text strong {
  font-size: 14.5px;
  font-weight: 650;
}

.settings__text small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings__row > .icon:last-child {
  color: var(--faint);
}

.history {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.history__btn {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--glass);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.history__btn:hover {
  border-color: var(--line);
  background: var(--glass-2);
}

.history__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 13px;
  background: linear-gradient(150deg, var(--g1, #7c5cff), var(--g2, #22d3ee));
  font-size: 21px;
}

.history__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.history__meta strong {
  overflow: hidden;
  font-size: 13.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history__meta .muted {
  font-size: 11px;
}

.history__btn .badge {
  flex: 0 0 auto;
}

.history__btn > .icon {
  flex: 0 0 auto;
  color: var(--faint);
}

.history-skeleton {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-skeleton span {
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(100deg, var(--glass) 30%, var(--glass-2) 50%, var(--glass) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

.boot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 62vh;
}

.boot__logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  filter: drop-shadow(0 18px 30px rgba(124, 92, 255, 0.5));
  animation: floaty 3s ease-in-out infinite;
}

.boot__title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.boot__bar {
  width: 120px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(127, 127, 158, 0.24);
}

.boot__bar i {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: var(--grad-accent);
  animation: boot-slide 1.1s ease-in-out infinite;
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg, #0e0b1a);
  color: #f5f3ff;
  font-family: var(--font, sans-serif);
  font-size: 16px;
  text-align: center;
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0) rotate(var(--tilt, 0deg));
  }
  50% {
    transform: translateY(-8px) rotate(var(--tilt, 0deg));
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 0.25;
  }
  50% {
    opacity: 1;
  }
}

@keyframes boot-slide {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(320%);
  }
}

:focus-visible {
  outline: 2px solid #7ce7ff;
  outline-offset: 3px;
}

button:focus:not(:focus-visible),
[role='button']:focus:not(:focus-visible) {
  outline: none;
}

::selection {
  background: rgba(124, 92, 255, 0.45);
  color: #fff;
}

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

@media (max-width: 360px) {
  .screen {
    padding-left: 16px;
    padding-right: 16px;
  }

  .cta-bar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .btn-row > .btn {
    padding: 0 10px;
    gap: 6px;
    font-size: 13.5px;
  }

  .style-track {
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    scroll-padding-left: 16px;
  }

  .onb-track {
    margin: 0 -16px;
  }

  .onb-slide {
    padding-left: 16px;
    padding-right: 16px;
  }

  .photo-frame {
    width: 132px;
    height: 164px;
  }

  .photo-frame__face {
    font-size: 56px;
  }

  .mini-sticker {
    width: 72px;
    padding: 6px 6px 8px;
  }

  .mini-sticker span {
    font-size: 27px;
  }

  .mini-sticker em {
    font-size: 7.5px;
  }

  .mini-sticker--a {
    right: 6%;
  }

  .mini-sticker--b {
    right: 16%;
  }

  .onb-art {
    margin-bottom: 12px;
  }

  .onb-copy {
    margin-top: 2px;
  }

  .screen-title {
    font-size: 26px;
  }

  .build-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .emotion-grid {
    gap: 7px;
  }

  .emotion {
    min-height: 70px;
  }

  .emotion__emoji {
    font-size: 23px;
  }

  .emotion__title {
    font-size: 9.5px;
  }

  .result-preview {
    gap: 12px;
    padding: 16px;
  }

  .result-preview__art {
    flex-basis: 96px;
    width: 96px;
  }

  .result-preview__art .sticker {
    width: 96px;
  }

  .dropzone__art {
    width: 124px;
  }

  .photo-grid {
    gap: 8px;
  }

  .caption-preview .sticker {
    flex-basis: 82px;
    width: 82px;
  }

  .pack-card {
    padding: 14px;
  }

  .pay-card__price {
    font-size: 40px;
  }
}

@media (max-height: 640px) {
  .onb-art {
    height: 198px;
    margin-bottom: 4px;
  }

  .onb-copy {
    margin-top: 6px;
  }

  .onb-foot {
    padding-top: 12px;
    gap: 10px;
  }

  .dropzone {
    padding: 20px 16px;
  }

  .dropzone__art {
    width: 112px;
  }

  .preview-stage {
    padding-top: 8px;
  }

  .preview-stage__sticker,
  .preview-skeleton {
    width: min(48vw, 210px);
  }
}

@media (hover: hover) {
  .btn--glass:hover {
    background: var(--glass-2);
  }

  .btn--ghost:hover {
    color: var(--text);
  }

  .btn--primary:hover {
    filter: brightness(1.06);
  }

  .chip:hover {
    border-color: rgba(124, 92, 255, 0.45);
  }

  .style-card:hover {
    transform: translateY(-3px);
  }

  .icon-btn:hover {
    background: var(--glass-2);
  }
}


/* Выбор режима генерации (без названий моделей) */
.engine-picker { margin: 16px 0 6px; }
.engine-picker__title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
.engine-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.engine-option {
  display: flex; gap: 10px; align-items: flex-start; text-align: left;
  padding: 12px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--card, rgba(255, 255, 255, 0.04)); color: var(--text); cursor: pointer;
}
.engine-option.is-selected { border-color: var(--accent, #7c5cff); box-shadow: 0 0 0 1px var(--accent, #7c5cff) inset; }
.engine-option:active { transform: scale(0.985); }
.engine-option__icon { display: inline-flex; color: var(--accent, #7c5cff); }
.engine-option__text { display: flex; flex-direction: column; gap: 3px; }
.engine-option__text b { font-size: 13px; line-height: 1.25; }
.engine-option__text small { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.engine-picker__hint { margin-top: 7px; font-size: 11.5px; color: var(--muted); }
