:root {
  /* ---------- Design Tokens ---------- */
  --bg: #020202;
  --surface: #111114;
  --surface-2: #17171c;
  --text: #f5f5f7;
  --muted: #a8a8b3;
  --border: rgba(255, 255, 255, 0.08);
  --brand: #cf164b;
  --gold: #c89d3d;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --radius-sm: 18px;
  --radius-md: 22px;
  --radius-lg: 28px;
  --content-width: 76rem;
  --nav-height: 6rem;
  --font-ui: "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui,
    -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  min-width: 20rem;
  background:
    radial-gradient(circle at top center, rgba(207, 22, 75, 0.16), transparent 32rem),
    linear-gradient(180deg, #070707 0%, var(--bg) 18%, #000 100%);
  color: var(--text);
  font-family: var(--font-ui);
}

img {
  display: block;
  width: 100%;
  height: auto;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  text-decoration: none;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

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

.page-shell {
  width: min(100%, calc(var(--content-width) + 2rem));
  margin: 0 auto;
  padding: 1.2rem 1rem calc(var(--nav-height) + 2rem);
}

.layout {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

/* ---------- Top Bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.brand__icon {
  width: 2.85rem;
  height: 2.85rem;
  flex: 0 0 2.85rem;
  border-radius: 1rem;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.brand__text {
  font-size: clamp(1.65rem, 5.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  white-space: nowrap;
}

.upgrade-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
  min-height: 2.85rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(200, 157, 61, 0.4);
  border-radius: 1rem;
  background: rgba(67, 46, 0, 0.35);
  color: #f3ca75;
  box-shadow: inset 0 0 0 1px rgba(255, 196, 79, 0.08);
}

.upgrade-pill__coin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffcc64 0%, #bf8521 100%);
  font-size: 0.95rem;
}

.upgrade-pill__count,
.upgrade-pill__label {
  font-weight: 700;
}

.upgrade-pill__divider {
  width: 1px;
  align-self: stretch;
  background: rgba(255, 219, 145, 0.24);
}

/* ---------- Chip Nav ---------- */
.chip-nav {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 1rem 0 0.2rem;
  scrollbar-width: none;
}

.chip-nav::-webkit-scrollbar,
.section-rail::-webkit-scrollbar {
  display: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
  min-height: 3.2rem;
  padding: 0.9rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 1rem;
  background: #20222b;
  color: #e7e7ed;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    color 180ms ease;
}

.chip svg {
  width: 1.2rem;
  height: 1.2rem;
}

.chip span {
  font-size: 1.12rem;
  font-weight: 700;
  white-space: nowrap;
}

.chip.is-active {
  background: #f5f5f7;
  border-color: rgba(255, 255, 255, 0.7);
  color: #09090b;
}

.chip--ghost {
  opacity: 0.8;
}

/* ---------- Hero ---------- */
.hero-section {
  display: flex;
}

.hero-card {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 18rem;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-card img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
}

.hero-card__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.38) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.15) 60%, rgba(0, 0, 0, 0.55) 100%);
}

.hero-card__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem;
}

.hero-card__copy {
  max-width: 16rem;
}

.hero-card__copy h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.hero-card__copy p {
  margin: 0.45rem 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  line-height: 1.35;
}

.hero-card__cta {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.45rem;
  padding: 0.9rem 1.4rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, #d91254 0%, #bd0f48 100%);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ---------- Sections ---------- */
.panel-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 2.85rem);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #f0f0f4;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 0.9;
}

.section-link svg {
  width: 1rem;
  height: 1rem;
}

.section-rail {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  padding: 0.1rem 0 0.25rem;
  scrollbar-width: none;
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  width: 11rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  box-shadow: var(--shadow);
  transform: translateZ(0);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

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

.card__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.65) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3));
}

.card__body {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  text-align: left;
}

.card__body strong {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.card__body--meta span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
  font-weight: 500;
}

.card--tool {
  width: 6.95rem;
  aspect-ratio: 1 / 1;
}

.card--photo {
  width: 12.2rem;
  aspect-ratio: 0.78 / 1;
}

.card--photo .card__body strong,
.card--filter .card__body strong {
  font-size: 1.28rem;
}

.card--mod {
  width: 6.95rem;
  aspect-ratio: 1.08 / 1;
  background: linear-gradient(180deg, #141419 0%, #09090d 100%);
}

.card--video {
  width: 7.65rem;
  aspect-ratio: 0.68 / 1;
}

.card--filter {
  width: 12.2rem;
  aspect-ratio: 0.92 / 1;
}

.card--mod img {
  object-fit: contain;
  padding: 0.75rem;
}

.card-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.9rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(211, 25, 83, 0.92);
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
}

.is-grayscale {
  filter: grayscale(1);
}

.card--video .card__body strong {
  font-size: 0.82rem;
}

.card--video .card__body--meta span {
  font-size: 0.72rem;
}

/* ---------- Bottom Nav ---------- */
.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 0.75rem;
  padding:
    0.75rem 1rem
    calc(0.75rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(8, 8, 10, 0.96), rgba(7, 7, 9, 0.99)),
    rgba(6, 6, 8, 0.96);
  backdrop-filter: blur(18px);
}

.bottom-nav__item {
  display: inline-flex;
  min-width: 5.5rem;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  color: #72758a;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.bottom-nav__item svg {
  width: 2rem;
  height: 2rem;
}

.bottom-nav__item span {
  font-size: 0.92rem;
  font-weight: 600;
}

.bottom-nav__item.is-active {
  color: var(--brand);
}

/* ---------- Modal ---------- */
.preview-modal[hidden] {
  display: none;
}

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.preview-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
}

.preview-modal__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100% - 1.5rem, 28rem);
  margin: 8vh auto 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.6rem;
  background: #0d0d10;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.5);
}

.preview-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: rgba(10, 10, 12, 0.72);
  color: white;
}

.preview-modal__close svg {
  width: 1.2rem;
  height: 1.2rem;
}

.preview-modal__image {
  aspect-ratio: 1.15 / 1;
  object-fit: cover;
}

.preview-modal__content {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.2rem 1.2rem 1.4rem;
}

.preview-modal__eyebrow {
  margin: 0;
  color: #ffb5ca;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.preview-modal__content h3 {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.preview-modal__copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.preview-modal__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.15rem;
  padding: 0.95rem 1.35rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, #d91254 0%, #bd0f48 100%);
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- Create Flow ---------- */
.create-flow[hidden] {
  display: none;
}

.create-flow {
  position: fixed;
  inset: 0;
  z-index: 70;
}

.create-flow__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
}

.create-flow__screen {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
}

/* hidden должен реально выключать второй экран create-flow */
.create-flow__screen[hidden] {
  display: none;
}

.create-shell {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(100%, 29rem);
  min-height: 100%;
  flex-direction: column;
  background: #000;
  color: #f4f4f7;
}

.create-shell--editor {
  justify-content: flex-start;
  min-height: 100dvh;
  height: 100dvh;
  overflow: hidden;
}

.create-icon-button,
.create-top-link,
.create-pill,
.create-save-button,
.create-action,
.create-tab,
.create-option,
.photo-picker__upload,
.photo-picker__featured,
.photo-thumb {
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    opacity 180ms ease;
}

.create-picker__top,
.create-editor__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0;
}

.create-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: #20222b;
  color: #f3f3f6;
}

.create-icon-button svg {
  width: 1.25rem;
  height: 1.25rem;
}

.create-pill {
  min-height: 2.25rem;
  padding: 0.45rem 1.15rem;
  border-radius: 999px;
  background: #3a3e4d;
  color: #f6f7fb;
  font-weight: 700;
}

.create-top-link {
  min-height: 2.25rem;
  padding: 0.45rem 0.4rem;
  color: #d9d9df;
  font-weight: 700;
}

.create-save-button {
  min-height: 2.75rem;
  padding: 0.6rem 1.15rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, #d91254 0%, #bd0f48 100%);
  color: #fff;
  font-weight: 800;
}

.upgrade-pill--editor {
  min-height: 2.6rem;
  padding: 0.3rem 0.85rem;
}

.create-save-button:disabled,
.desktop-generate-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.photo-picker {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1rem 1rem 1.3rem;
}

.photo-picker__label {
  margin: 1rem 0 0.8rem;
  color: #6f707c;
  font-size: 0.95rem;
  font-weight: 600;
}

.photo-picker__upload {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  margin-bottom: 1rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.15rem;
  background: #13151a;
  color: #f7f7fb;
  text-align: left;
}

.photo-picker__upload strong {
  font-size: 0.96rem;
  font-weight: 800;
}

.photo-picker__upload span,
.photo-picker__uploads-title {
  color: #8e93a3;
  font-size: 0.78rem;
}

.photo-picker__uploads {
  margin-bottom: 1rem;
}

.photo-picker__uploads-title {
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.photo-picker__featured {
  width: 10rem;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 1.35rem;
  background: #15161b;
}

.photo-picker__featured img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.photo-picker__divider {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 1.5rem 0 1rem;
  color: #6b6c77;
  font-size: 0.95rem;
  font-weight: 700;
}

.photo-picker__divider::before,
.photo-picker__divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(255, 255, 255, 0.12);
}

.photo-picker__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.photo-thumb {
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 1rem;
  background: #17181d;
}

.photo-thumb img,
.photo-thumb span {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.photo-thumb img {
  object-fit: cover;
}

.photo-thumb--swatch span {
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.22), transparent 25%),
    linear-gradient(145deg, #50112b 0%, #7b1230 38%, #1d1521 100%);
}

.photo-thumb--swatch-alt span {
  background:
    radial-gradient(circle at 65% 65%, rgba(255, 215, 148, 0.28), transparent 30%),
    linear-gradient(145deg, #25070b 0%, #981214 50%, #40090a 100%);
}

.photo-picker__hint {
  margin: auto 0 0;
  padding-top: 1rem;
  color: #6e6f79;
  text-align: center;
  font-size: 0.95rem;
}

.is-selected,
.photo-thumb.is-selected,
.create-option.is-selected,
.create-tab.is-active,
.create-subnav__item.is-active {
  border-color: rgba(241, 241, 246, 0.92);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06);
}

.create-editor {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.8rem 0;
}

.create-editor__frame {
  display: flex;
  justify-content: center;
}

.create-editor__preview {
  position: relative;
  display: block;
  width: min(100%, 24.25rem);
  overflow: hidden;
  border-radius: 0.35rem;
  background: #09090b;
  cursor: pointer;
}

.create-editor__image {
  aspect-ratio: 0.74 / 1;
  object-fit: var(--preview-fit, cover);
  transform: var(--preview-transform, none);
  transform-origin: center center;
  transition:
    filter 180ms ease,
    transform 180ms ease,
    opacity 180ms ease;
}

.create-editor__image-overlay {
  position: absolute;
  inset: 0;
  background: var(--preview-overlay, transparent);
  mix-blend-mode: screen;
  pointer-events: none;
  transition: background-color 180ms ease, opacity 180ms ease;
}

.editor-zone-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.editor-zone-point {
  position: absolute;
  left: var(--zone-x, 50%);
  top: var(--zone-y, 50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.85rem;
  min-height: 1.85rem;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: rgba(217, 18, 84, 0.82);
  box-shadow: 0 0 0 0.32rem rgba(217, 18, 84, 0.18), 0 0.4rem 1.4rem rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 0;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  touch-action: manipulation;
}

.editor-zone-point::before {
  content: "";
  width: 0.44rem;
  height: 0.44rem;
  border-radius: 999px;
  background: currentColor;
}

.editor-zone-point:focus-visible,
.editor-zone-point.is-selected {
  outline: none;
  border-color: #fff;
  background: #f0c972;
  color: #171002;
  box-shadow: 0 0 0 0.38rem rgba(240, 201, 114, 0.28), 0 0.55rem 1.6rem rgba(0, 0, 0, 0.5);
}

.editor-zone-point__label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.42rem);
  max-width: 8rem;
  padding: 0.26rem 0.44rem;
  overflow: hidden;
  border-radius: 0.42rem;
  background: rgba(6, 6, 8, 0.84);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.15;
  opacity: 0;
  text-overflow: ellipsis;
  transform: translateX(-50%);
  transition: opacity 160ms ease;
  white-space: nowrap;
}

.editor-zone-point:focus-visible .editor-zone-point__label,
.editor-zone-point:hover .editor-zone-point__label,
.editor-zone-point.is-selected .editor-zone-point__label {
  opacity: 1;
}

.create-editor__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0.1rem 0;
}

.editor-zone-tools {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.editor-zone-tools--mobile {
  padding-top: 0.85rem;
}

.editor-zone-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.5rem;
  background: #111114;
  color: #ececf0;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    opacity 180ms ease;
}

.editor-zone-refresh:disabled {
  opacity: 0.48;
}

.editor-zone-status {
  margin: 0;
  color: #8e919d;
  font-size: 0.72rem;
  line-height: 1.4;
  text-align: right;
}

.editor-zone-status[data-zone-state="loading"] {
  color: #f0c972;
}

.editor-zone-status[data-zone-state="error"] {
  color: #f28b82;
}

.editor-zone-status[data-zone-state="fallback"] {
  color: #d9cba0;
}

.create-editor__actions-left,
.create-editor__actions-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.create-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  color: #d8d8de;
  opacity: 0.92;
}

.create-action svg {
  width: 1.3rem;
  height: 1.3rem;
}

.create-panel {
  display: flex;
  margin-top: auto;
  padding: 0.9rem 0 0;
  flex-direction: column;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: #181417;
}

.create-panel__topline,
.create-panel__options {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0 1rem;
  scrollbar-width: none;
}

.create-panel__topline::-webkit-scrollbar,
.create-panel__options::-webkit-scrollbar {
  display: none;
}

.create-subnav__item {
  flex: 0 0 auto;
  padding: 0.55rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 1rem;
  color: #b5b2bc;
  white-space: nowrap;
}

.create-panel__credits {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.7rem 1rem 0.2rem;
  color: #d9cba0;
  font-size: 0.96rem;
  font-weight: 700;
}

.create-panel__coin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffcc64 0%, #bf8521 100%);
  color: #5e3900;
  font-size: 0.65rem;
}

.create-panel__options {
  padding-top: 0.65rem;
  padding-bottom: 0.85rem;
}

.create-option {
  flex: 0 0 auto;
  width: 5.8rem;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 1rem;
  background: transparent;
  color: #f1f2f6;
  text-align: center;
}

.create-option__thumb {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: #26232c;
}

.create-option__thumb img,
.create-option__thumb span {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.create-option__thumb img {
  object-fit: cover;
}

.create-option__thumb span {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    #23242b;
}

.create-option__label {
  display: block;
  padding: 0.45rem 0.15rem 0;
  font-size: 0.88rem;
  color: #d8d8de;
}

.create-option__meta {
  display: block;
  padding: 0.15rem 0 0;
  font-size: 0.75rem;
  color: #9796a2;
}

.create-option__pro {
  position: absolute;
  left: 0.35rem;
  bottom: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(207, 22, 75, 0.92);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.create-option--filter {
  width: 4.75rem;
}

.create-option--filter .create-option__label {
  font-size: 0.8rem;
}

.create-option--edit {
  width: 6.75rem;
}

.create-option--edit .create-option__thumb span {
  aspect-ratio: 1.18 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f1f2f6;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.create-option--effect {
  width: 6.5rem;
}

.create-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding: 0.9rem 1rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: #181417;
}

.create-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  flex: 1 1 0;
  border: 1px solid transparent;
  border-radius: 1rem;
  color: #8f8d99;
  font-size: 0.95rem;
  font-weight: 700;
}

.create-tab.is-active {
  background: linear-gradient(180deg, #d91254 0%, #bd0f48 100%);
  color: #fff;
}

[data-role="create-preview-image"].is-filter-grayscale {
  filter: grayscale(1);
}

[data-role="create-preview-image"].is-filter-sepia {
  filter: sepia(0.85) saturate(0.9) contrast(0.95);
}

[data-role="create-preview-image"].is-filter-vintage {
  filter: sepia(0.45) saturate(1.25) contrast(0.95) brightness(1.02);
}

[data-role="create-preview-image"].is-filter-anaglyph {
  filter: contrast(1.1) saturate(1.3) hue-rotate(-18deg);
}

[data-role="create-preview-image"].is-filter-modern {
  filter: contrast(1.12) saturate(0.92) brightness(1.04);
}

.desktop-editor__top,
.desktop-editor {
  display: none;
}

.desktop-preview,
.desktop-style-summary,
.desktop-generate-button,
.desktop-nav-card,
.desktop-mode-tab,
.desktop-style-option,
.desktop-action-card,
.desktop-recent-card,
.desktop-mini-recent__card {
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    opacity 180ms ease;
}

.desktop-preview__image,
.desktop-preview__overlay {
  display: block;
}

.create-flow .upgrade-pill__coin {
  color: #6d4100;
  font-size: 0.78rem;
}

.create-toast {
  position: absolute;
  top: 1rem;
  left: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: rgba(14, 14, 18, 0.92);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  transform: translate(-50%, 0);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.create-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0.3rem);
}

/* ---------- Interaction ---------- */
.chip:hover,
.section-link:hover,
.bottom-nav__item:hover,
.upgrade-pill:hover,
.preview-modal__close:hover,
.preview-modal__cta:hover,
.create-icon-button:hover,
.create-top-link:hover,
.create-pill:hover,
.create-save-button:hover,
.create-action:hover,
.editor-zone-refresh:hover,
.create-tab:hover,
.create-option:hover,
.photo-picker__upload:hover,
.photo-picker__featured:hover,
.photo-thumb:hover {
  transform: translateY(-1px);
}

.card:hover,
.card:focus-visible,
.hero-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
}

.chip:focus-visible,
.section-link:focus-visible,
.upgrade-pill:focus-visible,
.bottom-nav__item:focus-visible,
.preview-modal__close:focus-visible,
.preview-modal__cta:focus-visible,
.card:focus-visible,
.hero-card:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
}

.card:active,
.chip:active,
.bottom-nav__item:active,
.hero-card:active,
.create-action:active,
.editor-zone-refresh:active,
.create-option:active,
.create-tab:active,
.photo-picker__upload:active,
.photo-picker__featured:active,
.photo-thumb:active,
.create-save-button:active {
  transform: scale(0.985);
}

/* ---------- Responsive ---------- */
@media (min-width: 48rem) {
  .page-shell {
    padding-right: 1.4rem;
    padding-left: 1.4rem;
  }

  .chip-nav {
    flex-wrap: wrap;
    overflow: visible;
  }

  .hero-card {
    min-height: 22rem;
  }

  .hero-card__content {
    padding: 1.6rem;
  }

  .hero-card__copy {
    max-width: 21rem;
  }

  .section-rail {
    flex-wrap: wrap;
    overflow: visible;
  }

  .card--tool {
    width: calc(33.333% - 0.6rem);
    max-width: 13rem;
  }

  .card--photo {
    width: calc(50% - 0.5rem);
    max-width: 18rem;
  }

  .card--mod,
  .card--video {
    width: calc(33.333% - 0.6rem);
    max-width: 12rem;
  }

  .card--filter {
    width: calc(33.333% - 0.6rem);
    max-width: 17rem;
  }

  .create-shell {
    width: min(100%, 31rem);
  }

  .create-editor__preview {
    width: min(100%, 23rem);
  }

  .bottom-nav {
    right: 50%;
    bottom: 1rem;
    left: auto;
    width: min(100% - 2rem, 28rem);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.75rem;
    transform: translateX(50%);
  }
}

@media (min-width: 64rem) {
  .page-shell {
    padding-top: 1.6rem;
  }

  .layout {
    gap: 2.2rem;
  }

  .hero-card {
    min-height: 25rem;
  }

  .card--photo {
    width: calc(25% - 0.7rem);
    max-width: none;
  }

  .card--mod {
    width: calc(33.333% - 0.7rem);
    max-width: none;
  }

  .card--video {
    width: calc(25% - 0.7rem);
    max-width: none;
  }

  .card--filter {
    width: calc(33.333% - 0.7rem);
    max-width: none;
  }

  .create-flow__backdrop {
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: none;
  }

  .create-flow__screen {
    align-items: stretch;
    padding: 0;
  }

  .create-flow__screen--picker {
    align-items: center;
    padding: 2rem;
  }

  .create-flow__screen--picker .create-shell {
    width: min(100%, 32rem);
    min-height: auto;
    height: auto;
    border-radius: 1.75rem;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
  }

  .create-shell {
    min-height: 100vh;
    width: 100%;
    border-radius: 0;
    box-shadow: none;
  }

  .create-shell--editor {
    background: #040404;
  }

  .create-editor__top,
  .create-editor,
  .create-panel {
    display: none;
  }

  .desktop-editor__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: #050505;
  }

  .desktop-editor__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: #f5f5f7;
    font-weight: 700;
  }

  .desktop-editor__brand-icon {
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 0.45rem;
    object-fit: cover;
  }

  .desktop-editor__top-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
  }

  .desktop-editor__top-pill {
    min-height: 2rem;
    padding: 0.2rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.7rem;
    background: #190d0f;
    color: #fff1f3;
    font-size: 0.85rem;
    font-weight: 700;
  }

  .desktop-editor__top-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: #111114;
    color: #d8d8df;
    font-size: 0.85rem;
    font-weight: 700;
  }

  .desktop-editor__top-icon svg {
    width: 0.95rem;
    height: 0.95rem;
  }

  .desktop-editor {
    display: block;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  .desktop-editor__layout {
    display: grid;
    grid-template-columns: 15.75rem minmax(0, 1fr);
    gap: 1rem;
    height: calc(100dvh - 3.4rem);
    padding: 0.7rem;
  }

  .desktop-sidebar {
    display: flex;
    min-height: 0;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    padding-right: 0.15rem;
  }

  .desktop-sidebar__card {
    padding: 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.85rem;
    background: #09090b;
  }

  .desktop-sidebar__card--credits {
    margin-top: auto;
  }

  .desktop-sidebar__title {
    margin: 0 0 0.55rem;
    color: #f4f4f7;
    font-size: 0.82rem;
    font-weight: 700;
  }

  .desktop-steps {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
  }

  .desktop-step {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
  }

  .desktop-step__index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    margin-top: 0.15rem;
    border-radius: 999px;
    background: rgba(200, 157, 61, 0.16);
    color: #f1c970;
    font-size: 0.6rem;
    font-weight: 800;
  }

  .desktop-step__copy strong {
    display: block;
    color: #f3f4f6;
    font-size: 0.66rem;
    font-weight: 700;
  }

  .desktop-step__copy p,
  .desktop-sidebar__note,
  .desktop-recent__note,
  .desktop-generate-hint,
  .editor-zone-status {
    margin: 0.12rem 0 0;
    color: #737683;
    font-size: 0.61rem;
    line-height: 1.45;
  }

  .desktop-nav-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.3rem;
  }

  .desktop-nav-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.18rem;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 0.7rem;
    color: #e5e5ea;
    text-align: left;
  }

  .desktop-nav-card img {
    aspect-ratio: 1.08 / 1;
    border-radius: 0.55rem;
    object-fit: cover;
  }

  .desktop-nav-card span {
    display: block;
    padding: 0 0.1rem;
    font-size: 0.57rem;
    font-weight: 700;
    line-height: 1.25;
  }

  .desktop-nav-card.is-active {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.03);
  }

  .desktop-mini-recent {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .desktop-mini-recent__card {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.6rem;
    background: #0d0d10;
    color: #5b5d66;
    font-size: 0.56rem;
  }

  .desktop-mini-recent__card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .desktop-credits__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    color: #ececf0;
    font-size: 0.74rem;
    font-weight: 700;
  }

  .desktop-credits__value {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #f0c972;
  }

  .desktop-stage {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) 20rem;
    grid-template-rows: auto auto;
    align-content: start;
    gap: 1rem;
  }

  .desktop-stage__preview {
    min-width: 0;
    align-self: start;
  }

  .desktop-preview {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1.45 / 1;
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    background: linear-gradient(180deg, #050507 0%, #0a0a0d 100%);
    cursor: pointer;
  }

  .desktop-preview__image {
    width: 100%;
    height: 100%;
    object-fit: var(--preview-fit, cover);
    transform: var(--preview-transform, none);
    transform-origin: center center;
    transition:
      filter 180ms ease,
      transform 180ms ease,
      opacity 180ms ease;
  }

  .desktop-preview__overlay {
    position: absolute;
    inset: 0;
    background: var(--preview-overlay, transparent);
    mix-blend-mode: screen;
    pointer-events: none;
    transition: background-color 180ms ease, opacity 180ms ease;
  }

  .desktop-stage__details {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.9rem;
  }

  .desktop-mode-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  .desktop-mode-tab {
    min-height: 1.8rem;
    padding: 0.25rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: #0d0d10;
    color: #9a9da9;
    font-size: 0.7rem;
    font-weight: 700;
  }

  .desktop-mode-tab.is-active {
    border-color: rgba(255, 255, 255, 0.18);
    background: #141417;
    color: #fff;
  }

  .desktop-stage__copy h1 {
    margin: 0;
    color: #fafafa;
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.04em;
  }

  .desktop-stage__copy p {
    margin: 0.45rem 0 0;
    color: #9ca0ab;
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .desktop-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  .desktop-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.8rem;
    padding: 0.25rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    background: #0e0e11;
    color: #b7bac5;
    font-size: 0.72rem;
    font-weight: 700;
  }

  .desktop-action-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .desktop-action-card,
  .desktop-style-summary {
    display: flex;
    min-height: 7rem;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.95rem;
    background: #0a0a0c;
    color: #dfe1e8;
    text-align: left;
  }

  .desktop-action-card--upload {
    flex-direction: column;
    color: #eaecf1;
  }

  .desktop-action-card--upload strong,
  .desktop-style-summary strong {
    font-size: 0.9rem;
    font-weight: 700;
  }

  .desktop-action-card--upload span:last-child,
  .desktop-style-summary__meta span {
    color: #7f828e;
    font-size: 0.72rem;
  }

  .desktop-action-card__plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: #fbfbfd;
    font-size: 1.1rem;
    line-height: 1;
  }

  .desktop-style-summary__image {
    width: 7.2rem;
    height: 5.4rem;
    flex: 0 0 7.2rem;
    border-radius: 0.7rem;
    object-fit: cover;
  }

  .desktop-style-summary__meta {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.25rem;
  }

  .desktop-generate-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.2rem;
    padding: 0.9rem 1.4rem;
    border-radius: 0.9rem;
    background: linear-gradient(180deg, #8e7525 0%, #6f5a1b 100%);
    color: #0b0903;
    font-size: 0.98rem;
    font-weight: 800;
  }

  .desktop-style-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
    margin-top: auto;
  }

  .editor-zone-tools--desktop {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
  }

  .editor-zone-tools--desktop .editor-zone-status {
    text-align: left;
  }

  .desktop-style-option {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.28rem;
    padding: 0.25rem;
    border: 1px solid transparent;
    border-radius: 0.8rem;
    background: #0a0a0c;
    color: #dfe1e8;
    text-align: left;
  }

  .desktop-style-option__thumb {
    position: relative;
    overflow: hidden;
    border-radius: 0.65rem;
    background: #18181d;
  }

  .desktop-style-option__thumb img,
  .desktop-style-option__thumb span {
    display: block;
    width: 100%;
    aspect-ratio: 1.08 / 1;
    object-fit: cover;
  }

  .desktop-style-option__thumb span {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f2f3f6;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
  }

  .desktop-style-option__label {
    display: block;
    padding: 0 0.12rem;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.25;
  }

  .desktop-style-option__badge {
    position: absolute;
    left: 0.3rem;
    bottom: 0.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.05rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: rgba(207, 22, 75, 0.92);
    color: #fff;
    font-size: 0.56rem;
    font-weight: 800;
  }

  .desktop-style-option.is-active {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.03);
  }

  .desktop-recent {
    grid-column: 1 / -1;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .desktop-recent__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
  }

  .desktop-recent__head h2 {
    margin: 0;
    color: #fafafa;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.04em;
  }

  .desktop-recent__head p,
  .desktop-recent__head span {
    margin: 0.2rem 0 0;
    color: #71747f;
    font-size: 0.74rem;
    font-weight: 500;
  }

  .desktop-recent__grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .desktop-recent-card {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1.14 / 1;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.9rem;
    background: #0c0c0f;
    color: #5d5f69;
  }

  .desktop-recent-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .desktop-recent-card.is-empty span {
    font-size: 0.7rem;
    font-weight: 700;
  }

  .desktop-editor__top-pill:hover,
  .desktop-editor__top-icon:hover,
  .desktop-nav-card:hover,
  .desktop-mode-tab:hover,
  .desktop-action-card:hover,
  .desktop-style-summary:hover,
  .desktop-generate-button:hover,
  .desktop-style-option:hover,
  .desktop-recent-card:hover,
  .desktop-mini-recent__card:hover {
    transform: translateY(-1px);
  }
}
