:root {
  --page: #1b1b1b;
  --ink: #000;
  --panel: #0b0b0b;
  --pill: #171717;
  --pill-active: #616161;
  --line: rgba(255,255,255,.14);
  --text: #fff;
  --muted: rgba(255,255,255,.7);
  --soft: rgba(255,255,255,.14);
  --danger: #ff6b8a;
  --radius: 8px;
  --dock-h: 92px;
  --tg-viewport-height: 100vh;
  --tg-safe-top: 0px;
  --tg-safe-bottom: 0px;
  --z-navigation: 90;
  --z-overlay: 1000;
  --z-modal: 1100;
  --z-toast: 1200;
}

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html, body {
  width: 100%;
  min-height: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
#main::-webkit-scrollbar { width: 0; height: 0; display: none; }
html.app-shell,
html.app-shell body {
  touch-action: pan-x pan-y;
  -webkit-text-size-adjust: 100%;
}
html.app-shell input,
html.app-shell textarea,
html.app-shell select {
  font-size: 16px;
}
body {
  background: #000;
  color: var(--text);
  font: 14px/1.45 "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}
body.is-rtl {
  direction: rtl;
  text-align: right;
}
body.is-rtl input,
body.is-rtl textarea {
  direction: rtl;
}
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

.view { display: none; }
.view.active {
  display: block;
  animation: view-enter .22s ease both;
}
/* Keep a direct /gallery navigation on the profile page even if an older
   cached handler briefly toggles the previous Create view. */
html[data-app-route="gallery"] #view-create {
  display: none !important;
}
html[data-app-route="gallery"] #view-gallery {
  display: block !important;
}
html[data-app-route="settings"] #view-create,
html[data-app-route="edit"] #view-create {
  display: none !important;
}
html[data-app-route="settings"] #view-settings,
html[data-app-route="edit"] #view-edit {
  display: block !important;
}
html[data-app-route="language"] #view-create,
html[data-app-route="region"] #view-create,
html[data-app-route="support"] #view-create,
html[data-app-route="social"] #view-create,
html[data-app-route="subscription"] #view-create,
html[data-app-route="terms"] #view-create,
html[data-app-route="privacy"] #view-create,
html[data-app-route="referral"] #view-create,
html[data-app-route="achievements"] #view-create,
html[data-app-route="explore"] #view-create,
html[data-app-route="ai-chat"] #view-create,
html[data-app-route="spend"] #view-create {
  display: none !important;
}
html[data-app-route="language"] #view-language { display: block !important; }
html[data-app-route="region"] #view-region { display: block !important; }
html[data-app-route="support"] #view-support { display: block !important; }
html[data-app-route="social"] #view-social { display: block !important; }
html[data-app-route="subscription"] #view-subscription { display: block !important; }
html[data-app-route="terms"] #view-terms { display: block !important; }
html[data-app-route="privacy"] #view-privacy { display: block !important; }
html[data-app-route="referral"] #view-referral { display: block !important; }
html[data-app-route="achievements"] #view-achievements { display: block !important; }
html[data-app-route="explore"] #view-explore { display: block !important; }
html[data-app-route="ai-chat"] #view-ai-chat { display: block !important; }
html[data-app-route="spend"] #view-spend { display: block !important; }
@keyframes view-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Home / Explore */
#main { min-height: 100vh; }
body.tg-mini-app {
  min-height: var(--tg-viewport-height);
  background: #000;
  overflow-x: hidden;
}
body.tg-mini-app #main {
  width: 100vw;
  min-height: var(--tg-viewport-height);
  background: #000;
}
body.tg-mini-app .detail-back,
body.tg-mini-app .category-back,
body.tg-mini-app .subscription-back {
  display: none !important;
}
body.tg-mini-app .home-page,
body.tg-mini-app .home-shell {
  min-height: var(--tg-viewport-height);
}
body.tg-mini-app .rail {
  bottom: calc(10px + env(safe-area-inset-bottom) + var(--tg-safe-bottom));
}
#view-home {
  min-height: 100vh;
  background: #000;
}
.home-page {
  position: relative;
  min-height: 100vh;
  max-width: 520px;
  margin: 0 auto;
  padding: 14px 13px 116px;
  min-height: 100vh;
  background: #000;
}
.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.home-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.82);
  font-size: 17px;
  font-weight: 700;
}
.logo-mark {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #ffd22d;
  color: #000;
  font-size: 22px;
  line-height: 1;
  object-fit: cover;
}
.home-chat {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
  background: rgba(255,255,255,.13);
  cursor: pointer;
}
.home-chat svg { width: 22px; height: 22px; }
.home-search-wrap {
  position: sticky;
  top: 12px;
  z-index: 18;
  margin-bottom: 16px;
}
.home-search {
  height: 55px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(38,38,38,.96), rgba(23,23,23,.96));
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 10px 26px rgba(0,0,0,.24);
  backdrop-filter: blur(18px);
}
.home-search svg {
  width: 23px;
  height: 23px;
  color: #fff1cc;
}
.home-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 16px;
}
.home-search input::placeholder { color: rgba(255,255,255,.66); }
.home-search button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #fff1cc;
  cursor: pointer;
}
.home-search button svg { width: 22px; height: 22px; }
.search-results {
  padding-top: 4px;
}
.home-page.search-mode .create-panel,
.home-page.search-mode .task-card,
.home-page.search-mode .home-categories,
.home-page.search-mode .credits-cta {
  display: none;
}
.profile-results {
  display: grid;
  gap: 14px;
  margin: 8px 0 26px;
}
.profile-result {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.profile-result img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}
.profile-result b { display: block; font-size: 16px; }
.profile-result small { display: block; color: #cbd8e7; font-size: 14px; margin-top: 2px; }
.search-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}
.search-filters::-webkit-scrollbar { display: none; }
.search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 24px 14px;
}
.search-grid .feed-card {
  display: block;
  margin: 0;
}
.search-grid .feed-card figure {
  aspect-ratio: 4 / 5 !important;
}
.create-panel { margin-bottom: 18px; }
.create-panel h2,
.prompt-section h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.15;
  letter-spacing: 0;
  font-weight: 600;
}
.create-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 6px;
}
.create-actions button {
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.create-actions span {
  width: 78px;
  max-width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background:
    radial-gradient(circle at 72% 28%, rgba(255,255,255,.12), transparent 28%),
    linear-gradient(145deg, #313131, #121212);
}
.create-actions svg {
  width: 31px;
  height: 31px;
  color: #fff1cc;
  stroke-width: 1.8;
}
.create-actions b {
  min-height: 36px;
  display: block;
  font-size: 14px;
  line-height: 1.2;
}
.task-card {
  margin-bottom: 54px;
  padding: 13px 12px 11px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 22px;
  background:
    radial-gradient(circle at 78% 22%, rgba(126,79,27,.28), transparent 34%),
    linear-gradient(135deg, #222, #302215);
  box-shadow: inset 0 1px rgba(255,255,255,.08);
}
.task-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.task-top > div {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
}
.task-icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #ffd68d, #ff8e31);
  color: #16120c;
}
.task-icon svg { width: 17px; height: 17px; fill: currentColor; }
.task-top button {
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.72);
  font-weight: 700;
  cursor: pointer;
}
.task-top button svg { width: 14px; height: 14px; }
.task-card h3 {
  margin: 12px 0 11px;
  font-size: 18px;
  line-height: 1.06;
}
.task-progress {
  height: 52px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(255,255,255,.06);
}
.task-list-icon {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
}
.task-list-icon svg { width: 18px; height: 18px; }
.task-list-icon em {
  position: absolute;
  top: -5px;
  right: -3px;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ff8e31;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}
.task-progress b { display: block; font-size: 14px; line-height: 1; }
.task-progress small { display: block; color: rgba(255,255,255,.55); font-size: 11px; }
.task-progress strong {
  color: #ffe3ab;
  font-size: 17px;
  text-align: right;
}
.home-categories {
  display: grid;
  gap: 42px;
}
.prompt-section {
  min-width: 0;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}
.view-all {
  height: 31px;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  border: 0;
  border-radius: 999px;
  padding: 0 10px 0 13px;
  background: rgba(255,255,255,.11);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.view-all svg { width: 17px; height: 17px; }
.prompt-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(160px, 42vw, 220px);
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.prompt-strip::-webkit-scrollbar { display: none; }
.prompt-strip .feed-card {
  display: block;
  width: 100%;
  margin: 0;
  scroll-snap-align: start;
}
.prompt-strip .feed-card figure {
  aspect-ratio: 4 / 5 !important;
  height: auto;
}
.prompt-strip .creator {
  min-height: 32px;
}
.credits-cta {
  position: fixed !important;
  z-index: 80;
  left: 50%;
  bottom: calc(101px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(446px, calc(100vw - 40px));
  height: 55px;
  display: grid;
  grid-template-columns: 38px 1fr 24px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  background: #ffe5aa;
  color: #000;
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
  cursor: pointer;
}
.credits-cta span {
  text-align: left;
  font-size: 14px;
}
.credits-cta svg:first-child { width: 26px; height: 26px; }
.credits-cta svg:last-child { width: 22px; height: 22px; justify-self: end; }

/* Achievements */
#view-achievements { min-height: 100vh; background: #000; }
.achievements-page {
  width: min(520px, 100%);
  min-height: 100%;
  margin: 0 auto;
  padding: 4px 15px 28px;
  background: #000;
}
.achievements-head {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-bottom: 12px;
}
.achievements-head h1 {
  font-size: 24px;
  line-height: 1;
  font-weight: 500;
}
.referral-card,
.streak-card,
.creator-card,
.achievement-task {
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 17px;
  background: #1b1b1b;
}
.referral-card {
  width: 100%;
  height: 68px;
  display: grid;
  grid-template-columns: 43px 1fr 18px;
  align-items: center;
  gap: 11px;
  border-color: rgba(255,241,204,.18);
  padding: 0 16px;
  background: linear-gradient(110deg, #2f2414, #1b1b1b 70%);
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.achievement-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.06);
}
.achievement-icon svg { width: 22px; height: 22px; }
.achievement-icon.light { background: #fff1cc; color: #000; }
.achievement-icon.orange { background: linear-gradient(145deg, #ffd68d, #ff8e31); color: #16120c; }
.achievement-icon.muted { color: rgba(255,255,255,.36); }
.referral-card b,
.creator-card b,
.streak-card b,
.achievement-task b { display: block; font-size: 14px; }
.referral-card em,
.creator-card em {
  display: inline-block;
  margin-left: 7px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255,241,204,.16);
  color: #ffe4a3;
  font-size: 10px;
  font-style: normal;
}
.referral-card small,
.creator-card small,
.streak-card small { color: rgba(255,255,255,.58); }
.streak-card {
  margin-top: 13px;
  padding: 13px;
}
.streak-title {
  display: grid;
  grid-template-columns: 35px 1fr auto;
  align-items: center;
  gap: 9px;
}
.streak-title .achievement-icon { width: 35px; height: 35px; }
.streak-title strong { color: #ff912f; }
.streak-title em {
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.45);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}
.streak-card p {
  display: flex;
  gap: 8px;
  margin: 14px 0 13px;
  border: 1px solid rgba(255,138,31,.22);
  border-radius: 7px;
  padding: 10px;
  color: rgba(255,255,255,.52);
  font-size: 12px;
}
.streak-card p svg { flex: 0 0 auto; width: 14px; height: 14px; color: #ff912f; }
.streak-line {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  color: rgba(255,255,255,.34);
  font-size: 11px;
}
.streak-line span { display: grid; justify-items: center; gap: 9px; }
.streak-line i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2f2f2f;
  border: 2px dotted #a56f2c;
}
.streak-line span.done {
  color: #fff1cc;
}
.streak-line span.done i {
  border: 0;
  background: linear-gradient(145deg, #fff1cc, #9ce2a9);
  box-shadow: 0 0 0 4px rgba(255,241,204,.08);
}
.creator-card {
  margin-top: 13px;
  padding: 13px;
}
.creator-card-top {
  display: grid;
  grid-template-columns: 45px 1fr auto;
  gap: 11px;
  align-items: center;
}
.creator-card-top > div > b {
  color: rgba(255,255,255,.28);
  font-size: 18px;
}
.creator-card-top strong { color: #fff1cc; }
.creator-card-top strong small { color: rgba(255,255,255,.45); }
.creator-card.completed {
  border-color: rgba(255,241,204,.28);
  background: linear-gradient(105deg, rgba(255,241,204,.1), #1b1b1b 68%);
}
.creator-card.completed .creator-card-top > div > b {
  color: #fff;
}
.creator-rule {
  height: 45px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 8px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 9px;
  padding: 0 12px;
  background: rgba(255,255,255,.04);
  font-size: 12px;
}
.creator-rule svg { width: 18px; height: 18px; color: #fff1cc; }
.creator-rule span { color: rgba(255,255,255,.62); }
.thin-progress {
  position: relative;
  overflow: hidden;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  margin-bottom: 7px;
}
.thin-progress span,
.achievement-progress span::after {
  content: "";
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fff1cc, #9ce2a9);
}
.tasks-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin: 21px 0 10px;
}
.tasks-section-head h2 { font-size: 23px; line-height: 1; }
.tasks-section-head p { color: #c7dcff; font-size: 12px; }
.task-tabs {
  display: flex;
  border-radius: 999px;
  background: #1b1b1b;
  padding: 3px;
}
.task-tabs button {
  height: 30px;
  border: 0;
  border-radius: 999px;
  padding: 0 11px;
  background: transparent;
  color: rgba(255,255,255,.55);
  font-weight: 800;
  cursor: pointer;
}
.task-tabs .active { background: #fff1cc; color: #000; }
.achievement-tasks {
  display: grid;
  gap: 12px;
}
.achievement-task {
  position: relative;
  min-height: 98px;
  display: grid;
  grid-template-columns: 47px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px 13px 12px;
  overflow: hidden;
}
.achievement-task::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  background: var(--task-accent, #fff1cc);
}
.achievement-task .achievement-icon { width: 43px; height: 43px; color: var(--task-accent, #fff1cc); }
.achievement-task.completed {
  border-color: rgba(156,226,169,.2);
  background: linear-gradient(90deg, rgba(116,226,166,.08), #1b1b1b 58%);
}
.achievement-task.completed .achievement-icon {
  border-radius: 50%;
  background: rgba(156,226,169,.16);
  border-color: rgba(156,226,169,.42);
  color: #9ce2a9;
}
.achievement-task.completed .achievement-progress span {
  background: linear-gradient(90deg, #9ce2a9, rgba(156,226,169,.18));
}
.achievement-task h3 {
  margin: 0;
  color: rgba(255,255,255,.44);
  font-size: 12px;
  letter-spacing: .08em;
}
.achievement-task b { font-size: 17px; line-height: 1.15; }
.achievement-task p { margin-top: 5px; color: rgba(255,255,255,.58); font-size: 12px; }
.achievement-reward {
  color: var(--task-accent, #fff1cc);
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}
.achievement-reward small { color: rgba(255,255,255,.45); font-size: 11px; }
.achievement-progress {
  grid-column: 2 / 4;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 7px;
}
.achievement-progress span {
  overflow: hidden;
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}
.achievement-progress small { color: #b5c7d8; font-weight: 800; }
.achievement-rule {
  grid-column: 2 / 4;
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 0;
  color: rgba(255,255,255,.48);
  font-size: 12px;
}
.achievement-rule svg {
  width: 14px;
  height: 14px;
  color: var(--task-accent, #fff1cc);
}
.tasks-empty {
  min-height: 140px;
  display: grid;
  place-items: center;
  gap: 5px;
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 18px;
  color: rgba(255,255,255,.74);
  text-align: center;
}
.tasks-empty b,
.tasks-empty small { display: block; }
.tasks-empty small { color: rgba(255,255,255,.5); }

/* Referral program */
#view-referral,
#view-tasks,
#view-wallet,
#view-withdraw,
#view-payment-method,
#view-payout-history,
#view-invited,
#view-rating,
#view-statistics {
  min-height: 100vh;
  background: #000;
}
.referral-page {
  width: min(520px, 100%);
  min-height: 100%;
  margin: 0 auto;
  padding: 4px 14px 28px;
  background: #000;
}
.referral-status-card {
  margin-top: 13px;
  padding: 20px 18px 18px;
  border-radius: 17px;
  background:
    radial-gradient(circle at 82% 13%, rgba(255,255,255,.08), transparent 28%),
    #1d1d1d;
}
.referral-status-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #cfd9e2;
}
.referral-status-top span {
  height: 25px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  padding: 0 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.referral-status-top svg { width: 13px; height: 13px; }
.rank-title {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 21px 0 19px;
}
.rank-title svg {
  width: 38px;
  height: 38px;
  fill: #ffe4a3;
  color: #ffe4a3;
}
.rank-title b { font-size: 23px; }
.commission-box {
  min-height: 55px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255,241,204,.22);
  border-radius: 9px;
  background: rgba(255,241,204,.05);
  padding: 8px;
  text-align: center;
}
.commission-box b { color: #ffe4a3; font-size: 21px; line-height: 1; }
.commission-box small { color: rgba(255,255,255,.42); }
.status-progress-card {
  margin-top: 16px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 11px;
  padding: 12px 14px 10px;
  background: rgba(255,255,255,.03);
}
.status-progress-card div:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
}
.status-progress-card div:first-child span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #9ce2a9;
  color: #000;
}
.status-progress-card div:first-child svg { width: 13px; height: 13px; }
.status-progress-card em { color: #9ce2a9; font-style: normal; }
.status-progress-card p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 8px;
  color: rgba(255,255,255,.56);
  font-size: 12px;
}
.status-progress-card p strong { margin-left: auto; color: #6fe0a1; }
.status-progress-card p small { color: rgba(255,255,255,.5); }
.level-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 22px 4px 18px;
  position: relative;
}
.level-track::before {
  content: "";
  position: absolute;
  left: 30px;
  right: 30px;
  top: 21px;
  height: 2px;
  background: rgba(255,255,255,.1);
}
.level-track span {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 7px;
}
.level-track i {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.12);
  background: #202020;
}
.level-track .unlocked i {
  border-color: rgba(156,226,169,.45);
  background: rgba(156,226,169,.14);
  color: #9ce2a9;
}
.level-track .active i {
  width: 43px;
  height: 43px;
  border-color: rgba(255,255,255,.28);
  background: #bfbfbf;
  color: #000;
  box-shadow: 0 0 18px rgba(255,255,255,.4);
}
.level-track svg { width: 18px; height: 18px; }
.level-track b {
  color: rgba(198,218,239,.55);
  font-size: 10px;
}
.level-track .unlocked b { color: rgba(255,255,255,.78); }
.level-track .active b { color: #fff; }
.next-levels {
  width: 100%;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px;
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.62);
  padding: 0 14px;
  font-weight: 800;
  cursor: pointer;
}
.referral-status-card.levels-open .next-levels {
  border-color: rgba(255,255,255,.82);
}
.next-levels svg { width: 16px; height: 16px; }
.next-levels-list {
  margin-top: 9px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 0 0 14px 14px;
  overflow: hidden;
}
.next-level-row {
  padding: 12px 14px 13px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.next-level-row:last-child { border-bottom: 0; }
.next-level-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  color: rgba(210,226,240,.58);
  font-weight: 900;
}
.next-level-head i {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--level-color);
  border-radius: 50%;
  color: var(--level-color);
  font-style: normal;
}
.next-level-head svg { width: 14px; height: 14px; }
.next-level-head em {
  margin-left: auto;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255,255,255,.06);
  color: rgba(210,226,240,.38);
  font-size: 11px;
  font-style: normal;
}
.level-commissions {
  display: grid;
  grid-template-columns: repeat(var(--lines), minmax(0, 1fr));
  gap: 7px;
}
.level-commissions span {
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 9px;
  background: rgba(255,255,255,.035);
}
.level-commissions b {
  color: rgba(210,226,240,.36);
  font-size: 18px;
  line-height: 1;
}
.level-commissions small {
  display: block;
  color: rgba(210,226,240,.42);
  font-size: 10px;
  margin-top: 4px;
}
.referral-copy {
  padding: 15px 3px 7px;
  color: #fff;
  font-size: 16px;
  line-height: 1.25;
}
.referral-copy p { margin: 0 0 17px; }
.referral-links,
.referral-menu {
  border-radius: 22px;
  background: #1b1b1b;
  overflow: hidden;
}
.referral-link-row,
.referral-menu button {
  width: 100%;
  min-height: 84px;
  display: grid;
  grid-template-columns: 40px 1fr 24px;
  align-items: center;
  gap: 15px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: transparent;
  color: #fff;
  padding: 0 16px;
  text-align: left;
}
.referral-link-row {
  cursor: pointer;
}
.referral-link-row:last-child,
.referral-menu button:last-child { border-bottom: 0; }
.referral-link-row > i,
.referral-menu button span i {
  width: 25px;
  height: 25px;
  color: #fff1cc;
}
.referral-link-row b { display: block; font-size: 16px; margin-bottom: 8px; }
.referral-link-row small {
  display: block;
  color: #cbd8e7;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.copy-link {
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.copy-link svg { width: 19px; height: 19px; }
.referral-menu {
  margin-top: 15px;
}
.referral-menu button {
  min-height: 57px;
  grid-template-columns: 1fr 24px;
  cursor: pointer;
}
.referral-menu button span {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  font-weight: 700;
}
.referral-subpage {
  width: min(520px, 100%);
  min-height: 100%;
  margin: 0 auto;
  padding: 4px 14px 34px;
  background: #000;
}
.referral-subhead {
  margin-top: 20px;
}
.referral-wallet-card,
.rating-hero {
  margin-top: 12px;
  border: 1px solid rgba(255,241,204,.16);
  border-radius: 22px;
  padding: 20px;
  background:
    radial-gradient(circle at 82% 10%, rgba(255,214,141,.16), transparent 34%),
    linear-gradient(135deg, rgba(75,45,18,.78), #1b1b1b 65%);
}
.referral-wallet-card small,
.rating-hero small {
  color: rgba(255,255,255,.62);
  font-weight: 800;
}
.referral-wallet-card strong {
  display: block;
  margin: 12px 0 8px;
  color: #fff1cc;
  font-size: 42px;
  line-height: 1;
}
.referral-wallet-card p,
.rating-hero p {
  margin: 0 0 18px;
  color: rgba(255,255,255,.7);
  line-height: 1.35;
}
.referral-wallet-card button {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: #fff1cc;
  color: #000;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}
.wallet-actions {
  display: flex;
  gap: 10px;
  align-items: stretch;
  width: 100%;
}
.referral-wallet-card .wallet-actions button {
  width: 50%;
  min-width: 0;
  height: 50px;
  padding: 0 12px;
  flex: 1 1 0;
  font-size: clamp(12px, 2.7vw, 15px);
  line-height: 1.15;
  white-space: normal;
}
.referral-wallet-card.compact strong {
  font-size: 34px;
}
.wallet-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}
.wallet-form label {
  display: grid;
  gap: 8px;
  color: #fff;
  font-weight: 800;
}
.wallet-form input {
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 15px;
  background: #1b1b1b;
  color: #fff;
  padding: 0 16px;
  font: inherit;
}
.wallet-form button {
  height: 58px;
  border: 0;
  border-radius: 999px;
  background: #fff1cc;
  color: #000;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}
.payment-methods .active {
  border-color: rgba(255,241,204,.3);
  background: rgba(255,241,204,.06);
}
.payment-methods .active > svg {
  color: #fff1cc;
}
.payout-list {
  display: grid;
  gap: 10px;
}
.payout-list article {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: #1b1b1b;
  padding: 14px 16px;
}
.payout-list b,
.payout-list small,
.payout-list em { display: block; }
.payout-list small { margin-top: 5px; color: rgba(255,255,255,.55); }
.payout-list em { color: rgba(255,241,204,.76); font-style: normal; font-weight: 800; }
.referral-stats-grid,
.referral-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.referral-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.referral-stats-grid article,
.referral-summary article {
  min-height: 86px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 17px;
  padding: 14px;
  background: #1b1b1b;
}
.referral-stats-grid span,
.referral-summary span {
  display: block;
  color: rgba(255,255,255,.55);
  font-size: 12px;
  font-weight: 800;
}
.referral-stats-grid b,
.referral-summary b {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: 22px;
}
.referral-stats-grid small {
  display: block;
  margin-top: 6px;
  color: #9ce2a9;
  font-size: 12px;
}
.referral-list { margin-top: 14px; }
.referral-list button {
  grid-template-columns: 1fr auto;
}
.referral-list em {
  color: rgba(255,255,255,.62);
  font-style: normal;
  font-weight: 700;
}
.referral-user-list {
  display: grid;
  gap: 10px;
}
.referral-user-row {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 10px 12px;
  background: #1b1b1b;
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.referral-insight-card {
  min-height: 76px;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  border: 1px solid rgba(156,226,169,.18);
  border-radius: 17px;
  background: linear-gradient(90deg, rgba(156,226,169,.08), #1b1b1b 65%);
  padding: 13px;
}
.referral-insight-card > i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(156,226,169,.14);
  color: #9ce2a9;
}
.referral-insight-card b,
.referral-insight-card small {
  display: block;
}
.referral-insight-card small {
  margin-top: 5px;
  color: rgba(255,255,255,.58);
}
.rating-list .referral-user-row {
  grid-template-columns: 42px 42px 1fr auto;
}
.referral-user-row.is-me {
  border-color: rgba(255,241,204,.38);
  background: linear-gradient(90deg, rgba(255,241,204,.09), #1b1b1b 62%);
}
.referral-user-row img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}
.referral-user-row b,
.referral-user-row small,
.referral-user-row em {
  display: block;
}
.referral-user-row small {
  margin-top: 4px;
  color: rgba(255,255,255,.55);
}
.referral-user-row em {
  color: #fff1cc;
  font-style: normal;
  font-weight: 900;
}
.referral-user-row > strong {
  color: rgba(255,241,204,.78);
  font-size: 16px;
}
.referral-empty-state {
  min-height: 96px;
  display: grid;
  place-items: center;
  gap: 6px;
  border: 1px dashed rgba(255,255,255,.14);
  border-radius: 16px;
  padding: 18px;
  background: rgba(255,255,255,.035);
  color: rgba(255,255,255,.62);
  text-align: center;
}
.referral-empty-state b {
  color: #fff;
}
.referral-empty-state span {
  max-width: 260px;
  font-size: 13px;
  line-height: 1.45;
}
.rating-hero {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 15px;
  align-items: center;
  margin-bottom: 14px;
}
.rating-hero > span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #fff1cc;
  color: #000;
}
.rating-hero svg { width: 30px; height: 30px; }
.rating-hero strong {
  display: block;
  margin: 5px 0;
  color: #fff1cc;
  font-size: 32px;
  line-height: 1;
}
.rating-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  border-radius: 999px;
  background: #1b1b1b;
  padding: 4px;
}
.rating-tabs button {
  flex: 1;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255,255,255,.55);
  font-weight: 800;
}
.rating-tabs .active {
  background: #fff1cc;
  color: #000;
}
.statistics-bars {
  height: 250px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  align-items: end;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  padding: 16px;
  background: #1b1b1b;
}
.statistics-bars article {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  justify-items: center;
}
.statistics-bars span,
.statistics-bars b {
  color: rgba(255,255,255,.62);
  font-size: 12px;
}
.statistics-bars div {
  width: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  overflow: hidden;
}
.statistics-bars i {
  width: 100%;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, #fff1cc, #9ce2a9);
}
.statistics-table {
  margin-top: 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: #1b1b1b;
  overflow: hidden;
}
.statistics-table header,
.statistics-table article {
  display: grid;
  grid-template-columns: 1fr repeat(4, minmax(46px, auto));
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.statistics-table article:last-child { border-bottom: 0; }
.statistics-table header {
  grid-template-columns: 1fr;
  color: #fff;
}
.statistics-table header span {
  margin-top: 4px;
  color: rgba(255,255,255,.5);
  font-size: 12px;
}
.statistics-table article span {
  color: rgba(255,255,255,.68);
  text-align: right;
}
.statistics-table article em {
  color: #fff1cc;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.category-page {
  min-height: 100%;
  padding: 18px 16px 92px;
  background: #000;
}
.category-back {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  cursor: pointer;
}
.category-back svg { width: 23px; height: 23px; }
.category-page h1 {
  margin: 22px 0 16px;
  font-size: 26px;
  line-height: 1.1;
  font-weight: 500;
}
.category-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-filters::-webkit-scrollbar { display: none; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 24px 14px;
  align-items: start;
}
.category-grid .feed-card {
  display: block;
  margin: 0;
}
.category-grid .feed-card figure {
  aspect-ratio: 4 / 5 !important;
}
#view-explore {
  min-height: 100vh;
  padding: 30px 28px 28px 230px;
}
.home-shell {
  width: min(1440px, calc(100vw - 260px));
  min-height: calc(100vh - 58px);
  margin: 0 auto;
  background: var(--ink);
  border-radius: 24px;
  overflow: hidden;
  padding: 16px 16px 0;
}
.feed-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  overflow-x: auto;
  scrollbar-width: none;
}
.feed-filters::-webkit-scrollbar { display: none; }
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: var(--pill);
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.filter-pill svg { width: 15px; height: 15px; stroke-width: 3; }
.home-feed {
  column-count: 5;
  column-gap: 14px;
  padding-top: 2px;
}
.feed-card {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 22px;
  break-inside: avoid;
  container-type: inline-size;
  cursor: pointer;
}
.feed-card figure {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #121212;
}
.feed-card figure > img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  filter: saturate(1.04) contrast(1.02);
}
.model-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  max-width: calc(100% - 20px);
  padding: clamp(3px, 2cqw, 5px) clamp(6px, 4cqw, 9px);
  border-radius: 999px;
  background: rgba(24, 28, 34, .46);
  border: 1px solid rgba(255,255,255,.34);
  color: #fff;
  font-size: clamp(9px, 7cqw, 12px);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-backdrop-filter: blur(14px) saturate(145%);
  backdrop-filter: blur(14px) saturate(145%);
  box-shadow: 0 6px 18px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.16);
}
.spark-btn {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(82,82,82,.58);
  backdrop-filter: blur(12px);
  cursor: pointer;
}
.spark-btn svg { width: 25px; height: 25px; stroke-width: 1.9; }
.creator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 8px 0;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.creator img {
  width: 23px;
  height: 23px;
  min-height: 0;
  border-radius: 50%;
  object-fit: cover;
}
.creator span {
  display: inline-block;
  min-width: 0;
  max-width: calc(100% - 31px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0,0,0,.8);
}
.creator .creator-name--creator {
  padding: 4px 9px;
  border: 1px solid rgba(255,241,204,.8);
  border-radius: 9px;
  background: linear-gradient(135deg, #fff1cc 0%, #ffd22d 52%, #d69a12 100%);
  color: #201808;
  text-shadow: none;
  box-shadow: 0 4px 12px rgba(255,210,45,.18), inset 0 1px 0 rgba(255,255,255,.65);
}
.creator .tag {
  padding: 1px 7px 2px;
  border-radius: 999px;
  background: rgba(95,82,55,.7);
  border: 1px solid rgba(255,255,255,.22);
  font-size: 10px;
}
.creator-verify-badge {
  display: inline-grid !important;
  place-items: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  padding: 0 !important;
  border: 2px solid #ffd22d !important;
  border-radius: 50% !important;
  background: #ffd22d url("/icons/creator-verified.png") center / 100% 100% no-repeat !important;
  color: transparent !important;
  font-size: 0 !important;
  font-style: normal;
  font-weight: 900 !important;
  line-height: 1;
  text-align: center;
  text-shadow: none !important;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,210,45,.3), 0 3px 10px rgba(255,210,45,.22);
}
.profile-identity h1 em.creator-verify-badge {
  margin: 0;
  padding: 0;
  color: #17130a;
}
.edit-profile-preview-info h2 em.creator-verify-badge {
  margin-left: 5px;
  padding: 0;
  color: #17130a;
}
.creator[data-profile] {
  cursor: pointer;
}
.legal-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  color: rgba(255,255,255,.82);
  font-size: 12px;
}
.legal-links a:hover,
.site-legal-footer a:hover {
  color: #fff1cc;
}
.site-legal-footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  min-height: 32px;
  z-index: 34;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 0;
  padding: 7px 16px;
  background: #1a1a1a;
  color: rgba(255,255,255,.7);
  font-size: 12px;
  font-weight: 500;
}
.site-legal-footer.is-hidden {
  display: none;
}
.site-legal-footer span {
  display: none;
}
.favorite-tools {
  display: grid;
  gap: 8px;
  padding: 0 16px 12px;
}
.favorite-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.favorite-toolbar .btn { width: auto; min-height: 38px; }
.favorite-toolbar select {
  width: min(220px, 100%);
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #171717;
  color: #fff;
}
.favorite-category-list { display: flex; gap: 6px; flex-wrap: wrap; }
.favorite-category-list span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 5px 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: rgba(255,255,255,.72);
  font-size: 11px;
}
.favorite-category-list button,
.favorite-card-meta button {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: #fff1cc;
}
.favorite-category-list svg,
.favorite-card-meta svg { width: 13px; height: 13px; }
.favorite-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  color: rgba(255,255,255,.75);
  font-size: 11px;
}
.favorite-card-meta > span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.favorite-card-meta select {
  min-width: 0;
  max-width: 130px;
  height: 28px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171717;
  color: #fff;
  font-size: 11px;
}

.legal-page {
  width: min(820px, calc(100% - 28px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0 96px;
  color: #fff;
}
.legal-page > .detail-back {
  position: sticky;
  top: 18px;
  z-index: 3;
  margin-bottom: 26px;
}
.legal-page header {
  border-bottom: 1px solid rgba(255,255,255,.12);
  padding: 10px 0 24px;
  margin-bottom: 22px;
}
.legal-page header small {
  display: block;
  margin-bottom: 8px;
  color: #fff1cc;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.legal-page header h1 {
  margin: 0;
  font-size: clamp(34px, 7vw, 64px);
  line-height: .95;
  letter-spacing: 0;
}
.legal-page header p {
  margin: 14px 0 0;
  color: rgba(255,255,255,.56);
  font-weight: 700;
}
.legal-page section {
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 20px 0;
}
.legal-page section:last-child {
  border-bottom: 0;
}
.legal-page h2 {
  margin: 0 0 10px;
  color: #fff1cc;
  font-size: 19px;
  line-height: 1.2;
}
.legal-page h3 {
  margin: 22px 0 10px;
  color: #fff;
  font-size: 16px;
  line-height: 1.35;
}
.legal-page p {
  margin: 0 0 10px;
  color: rgba(255,255,255,.74);
  font-size: 15px;
  line-height: 1.65;
}
.legal-page ol,
.legal-page ul {
  margin: 0 0 12px;
  padding-left: 24px;
  color: rgba(255,255,255,.74);
  font-size: 15px;
  line-height: 1.65;
}
.legal-page li + li {
  margin-top: 8px;
}
.legal-table-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,241,204,.55) rgba(255,255,255,.08);
}
.legal-table-scroll:focus-visible {
  outline: 1px solid #fff1cc;
  outline-offset: 4px;
}
.legal-pricing-table {
  min-width: 620px;
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 4px;
  color: rgba(255,255,255,.78);
  font-size: 14px;
}
.legal-pricing-table th,
.legal-pricing-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  text-align: left;
  vertical-align: top;
}
.legal-pricing-table th {
  color: #fff1cc;
  font-weight: 800;
}
.legal-pricing-table td:last-child,
.legal-pricing-table th:last-child {
  white-space: nowrap;
  text-align: right;
}
.legal-table-scroll::-webkit-scrollbar {
  height: 6px;
}
.legal-table-scroll::-webkit-scrollbar-track {
  background: rgba(255,255,255,.08);
}
.legal-table-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,241,204,.55);
  border-radius: 999px;
}
.legal-page p:last-child {
  margin-bottom: 0;
}

/* User profile */
#view-profile {
  min-height: 100vh;
  background: #000;
}
.user-profile-page {
  height: 100vh;
  max-width: 520px;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #000;
  overflow: hidden;
}
.own-profile-page {
  grid-template-rows: auto auto auto minmax(0, 1fr);
}
.user-profile-head {
  position: relative;
  z-index: 2;
  padding: 14px 18px 6px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(116deg, #a57761, #2b1209);
}
.user-profile-head::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.92) 70%, #000 100%);
  pointer-events: none;
}
.user-profile-head > * {
  position: relative;
  z-index: 1;
}
.profile-identity {
  margin-top: 48px;
}
.profile-identity img {
  width: 82px;
  height: 82px;
  display: block;
  border: 3px solid #000;
  border-radius: 50%;
  object-fit: cover;
}
.profile-identity h1 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 7px;
  font-size: 23px;
  line-height: 1.1;
  letter-spacing: 0;
}
.profile-identity h1 em {
  padding: 2px 7px;
  border: 1px solid rgba(255,241,204,.58);
  border-radius: 999px;
  color: #fff1cc;
  background: rgba(86,61,32,.55);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}
.profile-stats {
  display: flex;
  gap: 28px;
  margin-bottom: 10px;
}
.profile-stats b {
  display: block;
  font-size: 16px;
  line-height: 1.1;
}
.profile-stats small {
  display: block;
  color: rgba(255,255,255,.64);
  font-size: 12px;
}
.profile-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 50px;
  gap: 8px;
}
.profile-actions button {
  height: 47px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}
.profile-subscribe {
  background: #fff1cc;
  color: #000;
}
.profile-subscribe.following {
  background: #2f2f2f;
  color: #fff;
}
.profile-message {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #181818;
  color: #fff;
}
.profile-message svg { width: 18px; height: 18px; }
.profile-share {
  display: grid;
  place-items: center;
  background: #202020;
  color: #fff;
}
.profile-share svg { width: 19px; height: 19px; }
.profile-posts {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 18px 8px;
  padding: 6px 16px 92px;
  scrollbar-width: none;
}
.profile-posts::-webkit-scrollbar { display: none; }
.profile-feed-card {
  margin: 0;
}
.profile-feed-card figure {
  aspect-ratio: 4 / 5 !important;
}
.draft-card figure {
  position: relative;
}
.publish-photo-btn {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 241, 204, .96);
  color: #000;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,.32);
  z-index: 3;
}
.publish-photo-btn svg {
  width: 17px;
  height: 17px;
  color: #000;
}

/* Messages */
#view-messages {
  min-height: 100vh;
  background: #000;
}
.messages-page {
  max-width: 520px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 14px 100px;
  background: #000;
}
.messages-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.messages-head h1 {
  font-size: 25px;
  line-height: 1.1;
}
.messages-list {
  display: grid;
  gap: 10px;
}
.message-row {
  min-height: 76px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  position: relative;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 10px 14px 10px 10px;
  background: #181818;
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.message-row img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
}
.message-row b,
.message-row small {
  display: block;
}
.message-row b {
  font-size: 16px;
}
.message-row small {
  margin-top: 3px;
  overflow: hidden;
  color: rgba(255,255,255,.68);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.message-row em {
  align-self: start;
  margin-top: 6px;
  color: rgba(255,255,255,.52);
  font-size: 12px;
  font-style: normal;
}
.message-row strong {
  position: absolute;
  right: 14px;
  bottom: 13px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff1cc;
  color: #000;
  font-size: 12px;
}

/* Conversation */
#view-conversation {
  min-height: 100vh;
  background: #000;
}
.conversation-page {
  height: 100vh;
  max-width: 520px;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #000;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
}
.conversation-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 10px;
}
.conversation-user {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.conversation-user img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}
.conversation-user b,
.conversation-user small {
  display: block;
}
.conversation-user b {
  overflow: hidden;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.conversation-profile-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  justify-self: end;
  align-self: center;
  display: grid;
  place-items: center;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  padding: 0;
  background: #181818 !important;
  color: #fff;
  cursor: pointer;
  line-height: 0;
  overflow: hidden;
}
.conversation-profile-icon i,
.conversation-profile-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  color: #fff;
  background: transparent !important;
  stroke-width: 1.9;
}
.conversation-body {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow-y: auto;
  padding: 34px 14px 16px;
  scrollbar-width: none;
}
.conversation-body::-webkit-scrollbar { display: none; }
.conversation-empty {
  align-self: center;
  color: rgba(255,255,255,.42);
  font-size: 16px;
}
.chat-bubble {
  max-width: min(78%, 430px);
  padding: 11px 13px;
  border-radius: 18px;
  line-height: 1.35;
}
.chat-bubble img {
  display: block;
  max-width: 220px;
  max-height: 260px;
  border-radius: 12px;
  object-fit: cover;
}
.chat-bubble span {
  display: block;
}
.chat-bubble img + span {
  margin-top: 7px;
}
.chat-bubble.them {
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  background: #1b1b1b;
}
.chat-bubble.me {
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  background: #fff1cc;
  color: #000;
}
.conversation-compose {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 6px;
  margin: 0 16px calc(10px + env(safe-area-inset-bottom));
  height: 52px;
  border-radius: 999px;
  background: #1a1a1a;
}
.conversation-attach {
  width: 38px;
  height: 52px;
  display: grid;
  place-items: center;
  color: #fff;
  cursor: pointer;
}
.conversation-attach input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.conversation-attach svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.9;
}
.conversation-compose > input {
  height: 52px;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  font-size: 16px;
}
.conversation-compose button {
  width: 42px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #000;
  cursor: pointer;
}
.conversation-compose > button {
  height: 42px;
  margin-right: 5px;
  border-radius: 50%;
  background: #fff1cc;
}
.conversation-compose svg { width: 20px; height: 20px; stroke-width: 1.9; }

/* AI chat */
#view-ai-chat {
  min-height: 100vh;
  background: #000;
}
.ai-chat-page {
  position: relative;
  height: 100vh;
  max-width: 520px;
  margin: 0 auto;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr) auto;
  background: #000;
  overflow: hidden;
}
.ai-chat-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
}
.ai-history-btn,
.ai-new-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  background: #1b1b1b;
  color: #fff;
  cursor: pointer;
}
.ai-model-btn {
  justify-self: center;
  height: 31px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  padding: 0 11px;
  background: #111;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.ai-chat-body {
  min-height: 0;
  overflow-y: auto;
  padding: 14px 18px 152px;
  scrollbar-width: none;
}
.ai-chat-body::-webkit-scrollbar { display: none; }
.ai-empty {
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  text-align: center;
}
.ai-empty span {
  width: 77px;
  height: 77px;
  display: grid;
  place-items: center;
  border-radius: 21px;
  background: linear-gradient(145deg, #fff1cc, #ff9f35);
  color: #000;
  box-shadow: 0 0 36px rgba(255,159,53,.18);
}
.ai-empty svg { width: 34px; height: 34px; fill: currentColor; }
.ai-empty h1 {
  font-size: 27px;
  line-height: 1.05;
}
.ai-attachment-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 16px 8px;
  padding: 8px 10px;
  border-radius: 18px;
  background: #141414;
}
.ai-attachment-thumb {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
}
.ai-attachment-meta {
  min-width: 0;
  flex: 1;
}
.ai-attachment-meta b,
.ai-attachment-meta small {
  display: block;
}
.ai-attachment-meta b {
  color: #fff;
  font-size: 13px;
  line-height: 1.2;
}
.ai-attachment-meta small {
  margin-top: 3px;
  color: rgba(255,255,255,.55);
  font-size: 12px;
}
.ai-attachment-remove {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #232323;
  color: #fff;
  cursor: pointer;
}
.ai-compose {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 6px;
  margin: 0 16px calc(10px + env(safe-area-inset-bottom));
  height: 52px;
  border-radius: 999px;
  background: #1a1a1a;
}
.ai-compose button {
  height: 52px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.ai-send-btn {
  width: 42px;
  height: 42px !important;
  margin-right: 5px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff1cc !important;
  color: #000 !important;
}
.ai-send-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}
.ai-compose input {
  min-width: 0;
  height: 52px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 16px;
}
.ai-message {
  max-width: 82%;
  margin: 10px 0;
  line-height: 1.55;
}
.ai-message.user {
  margin-left: auto;
  width: fit-content;
  border-radius: 18px;
  padding: 12px 16px;
  background: #fff1cc;
  color: #000;
}
.ai-message.user img {
  display: block;
  width: min(220px, 62vw);
  margin-top: 8px;
  border-radius: 14px;
  object-fit: cover;
}
.ai-message.bot,
.ai-message.assistant {
  color: #fff;
  font-weight: 700;
}
.ai-message.bot header,
.ai-message.assistant header {
  margin-bottom: 8px;
}
.ai-message-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.ai-model-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(255, 241, 204, .22);
  border-radius: 999px;
  background: rgba(255, 209, 122, .12);
  color: #fff1cc;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.ai-message.bot time,
.ai-message.assistant time {
  color: rgba(255,255,255,.42);
  font-size: 12px;
  font-weight: 600;
}
.ai-history-panel {
  position: absolute;
  inset: 0;
  position: fixed;
  z-index: var(--z-modal);
  background: rgba(0,0,0,.52);
  opacity: 1;
  backdrop-filter: blur(4px);
  transition: opacity .22s ease, backdrop-filter .22s ease;
}
.ai-history-panel.closing {
  opacity: 0;
  backdrop-filter: blur(0);
}
.ai-history-sheet {
  width: min(360px, 78vw);
  height: 100%;
  padding: 16px 16px 24px;
  border-right: 1px solid rgba(255,255,255,.12);
  background: #0b0b0b;
  transform: translateX(0);
  transition: transform .28s cubic-bezier(.22, 1, .36, 1);
}
.ai-history-panel.closing .ai-history-sheet {
  transform: translateX(-102%);
}
.ai-history-sheet header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.ai-history-sheet h2 {
  font-size: 24px;
}
.ai-history-sheet header button {
  width: 35px;
  height: 35px;
  border: 0;
  border-radius: 50%;
  background: #1a1a1a;
  color: #fff;
}
.ai-search {
  height: 43px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  padding: 0 14px;
  background: #1a1a1a;
  color: rgba(255,255,255,.42);
}
.ai-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
}
.ai-history-new {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 12px;
  margin: 12px 0 24px;
  padding: 0 16px;
  background: #fff1cc;
  color: #000;
  font-weight: 800;
}
.ai-history-sheet h3 {
  margin: 0 0 14px;
  color: rgba(255,255,255,.46);
  font-size: 12px;
  letter-spacing: 2px;
}
.ai-history-sheet > h3,
.ai-history-sheet > .ai-history-item {
  display: none;
}
.ai-history-item {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
  padding: 12px 0;
  border-radius: 14px;
}
.ai-history-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.ai-history-card.active .ai-history-item {
  background: rgba(255,255,255,.06);
  padding-left: 10px;
  padding-right: 10px;
}
.ai-history-rename {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px 30px;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.08);
}
.ai-history-rename input {
  min-width: 0;
  height: 32px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-weight: 800;
}
.ai-history-rename button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #232323;
  color: #fff;
  cursor: pointer;
}
.ai-history-rename button[type="submit"] {
  background: #fff1cc;
  color: #000;
}
.ai-history-rename svg {
  width: 15px;
  height: 15px;
}
.ai-history-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-history-actions button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #1a1a1a;
  color: rgba(255,255,255,.82);
  cursor: pointer;
}
.ai-history-actions button svg {
  width: 15px;
  height: 15px;
}
.ai-history-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 5;
  min-width: 132px;
  display: none;
  padding: 6px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: #151515;
  box-shadow: 0 14px 32px rgba(0,0,0,.34);
}
.ai-history-popover.open {
  display: grid;
}
.ai-history-popover button {
  width: 100%;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  border-radius: 10px;
  padding: 0 10px;
  background: transparent;
  color: #fff;
}
.ai-history-popover button:hover {
  background: rgba(255,255,255,.06);
}
.ai-history-popover button:last-child {
  color: #ff8f8f;
}
.ai-history-popover button svg {
  width: 14px;
  height: 14px;
}
.ai-history-item time {
  margin-left: auto;
  color: rgba(255,255,255,.44);
  font-size: 12px;
}
.ai-history-empty {
  padding: 18px 0;
  color: rgba(255,255,255,.48);
}
.ai-model-menu {
  position: absolute;
  left: 50%;
  top: 46px;
  z-index: 35;
  width: min(292px, calc(100vw - 96px));
  transform: translateX(-50%);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  padding: 20px 8px;
  background: #1a1a1a;
}
.ai-model-menu h3 {
  margin: 0 12px 12px;
  color: rgba(255,255,255,.38);
  font-size: 11px;
  letter-spacing: 2px;
}
.ai-model-menu button {
  position: relative;
  width: 100%;
  display: grid;
  gap: 3px;
  border: 0;
  border-radius: 12px;
  padding: 10px 36px 10px 10px;
  background: transparent;
  color: #fff;
  text-align: left;
}
.ai-model-menu button.selected {
  background: rgba(255,255,255,.08);
}
.ai-model-menu small {
  color: rgba(255,255,255,.48);
  line-height: 1.2;
}
.ai-model-menu button > svg {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: #fff1cc;
}

/* Own profile */
#view-gallery,
#view-settings,
#view-edit {
  min-height: 100vh;
  background: #000;
}
.own-profile-head {
  background: linear-gradient(116deg, #a57761 0%, #8a5a45 38%, #2b1209 100%);
}
.my-profile-page {
  position: relative;
  max-width: 520px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 18px 108px;
  background: #000;
}
.my-profile-hero {
  position: relative;
  margin: 0 -18px;
  min-height: 232px;
  display: grid;
  grid-template-rows: 102px auto 48px;
  align-content: start;
  row-gap: 13px;
  padding: 15px 18px 20px;
  background: linear-gradient(180deg, #5d1d07 0%, #5d1d07 52%, #000 100%);
}
.my-settings-btn {
  position: absolute;
  right: 17px;
  top: 13px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #1b1b1b;
  color: #fff;
  cursor: pointer;
}
.my-settings-btn svg { width: 19px; height: 19px; }
.my-avatar {
  width: 84px;
  height: 84px;
  align-self: start;
  margin: 0;
  border: 3px solid #000;
  border-radius: 50%;
  background: #1a1a1a;
}
.my-stats {
  align-self: start;
  margin: 0;
  min-height: 35px;
}
.my-stats b,
.my-stats small {
  display: block;
}
.my-stats b {
  font-size: 18px;
  line-height: 1;
  padding-left: 2px;
}
.my-stats small {
  margin-top: 4px;
  color: rgba(255,255,255,.62);
  font-size: 12px;
}
.my-profile-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 50px;
  gap: 8px;
  align-self: end;
}
.my-profile-actions button {
  height: 48px;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
}
.my-profile-actions svg {
  width: 18px;
  height: 18px;
}
.my-profile-tabs {
  display: flex;
  gap: 18px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  padding: 15px 0 10px;
}
.my-profile-tabs button {
  border: 0;
  background: transparent;
  color: rgba(112,129,148,.62);
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
}
.my-profile-tabs .active {
  color: #fff;
}
.my-empty {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 208px;
  padding-top: 29px;
  text-align: center;
}
.my-empty h2 {
  font-size: 24px;
  line-height: 1.1;
}
.my-empty p {
  color: #c9d8e8;
  font-size: 16px;
}

/* Settings */
.settings-page {
  max-width: 520px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 15px 90px;
  background: #000;
}
.settings-page > .detail-back {
  margin-bottom: 20px;
}
.premium-card {
  padding: 25px 20px 20px;
  border: 1px solid rgba(255,199,97,.34);
  border-radius: 22px;
  background:
    radial-gradient(circle at 82% 18%, rgba(255,199,97,.18), transparent 34%),
    linear-gradient(135deg, #2a1b10, #5f2605);
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 18px 38px rgba(95,38,5,.22);
}
.premium-head {
  display: flex;
  gap: 14px;
  align-items: center;
}
.premium-head > span {
  width: 55px;
  height: 55px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #fff1cc;
  color: #000;
}
.premium-head svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}
.premium-head small {
  color: #ffd98e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
}
.premium-head h1 {
  font-size: 22px;
  line-height: 1.05;
}
.premium-head p {
  color: rgba(255,255,255,.74);
  font-size: 13px;
}
.premium-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 19px 0 20px;
}
.premium-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,241,204,.11);
  color: #fff1cc;
  font-size: 12px;
  font-weight: 800;
}
.premium-card > button {
  width: 100%;
  height: 59px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 13px;
  padding: 0 18px;
  background: linear-gradient(90deg, #fff1cc, #ffd22d);
  color: #000;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
}
.premium-card > button svg {
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 50%;
  background: #2a1b10;
  color: #fff;
}
.settings-list {
  margin-top: 18px;
  overflow: hidden;
  border-radius: 19px;
  background: #1a1a1a;
}
.settings-list button {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 0 18px;
  background: transparent;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.settings-list button:last-child {
  border-bottom: 0;
}
.settings-list span {
  display: inline-flex;
  align-items: center;
  gap: 17px;
}
.settings-list svg {
  width: 22px;
  height: 22px;
  color: #fff1cc;
}
.sign-out-btn {
  display: block;
  margin: 26px auto 0;
  border: 0;
  background: transparent;
  color: #ff362f;
  font-size: 16px;
  cursor: pointer;
}

/* Settings subpages */
.settings-subpage {
  width: min(492px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 6px 14px 30px;
  background: #000;
  color: #fff;
}
.settings-subpage > .detail-back,
.subpage-head .detail-back {
  margin-bottom: 22px;
}
.settings-subpage h1,
.subpage-head h1 {
  margin: 0 0 18px;
  font-size: 31px;
  line-height: 1.1;
  font-weight: 500;
}
.subpage-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.subpage-head .detail-back {
  margin-bottom: 0;
}
.subpage-head h1 {
  margin: 0;
  font-size: 25px;
}
.simple-choice-list,
.region-list,
.region-auto-card {
  overflow: hidden;
  border-radius: 22px;
  background: #1a1a1a;
}
.simple-choice-list button,
.region-list button {
  width: calc(100% - 30px);
  min-height: 57px;
  margin-left: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 0 18px 0 0;
  background: transparent;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.simple-choice-list button:last-child,
.region-list button:last-child {
  border-bottom: 0;
}
.simple-choice-list svg,
.region-auto-card > svg {
  width: 22px;
  height: 22px;
  color: #fff1cc;
}
.simple-choice-list button.active,
.region-list button.active {
  color: #fff1cc;
}
.region-list button > svg {
  margin-left: auto;
  width: 20px;
  height: 20px;
  color: #fff1cc;
}
.region-page {
  padding-top: 6px;
}
.region-search {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  padding: 0 17px;
  background: #1a1a1a;
}
.region-search svg {
  width: 24px;
  height: 24px;
  color: #fff1cc;
}
.region-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 16px;
}
.region-search input::placeholder {
  color: rgba(255,255,255,.62);
}
.region-auto-card {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 18px;
}
.region-auto-card b,
.region-auto-card span {
  display: block;
}
.region-auto-card b {
  margin-bottom: 10px;
  font-size: 16px;
}
.region-auto-card span {
  color: #c9d8e8;
  font-size: 14px;
}
.region-list {
  max-height: none;
}
.region-list button {
  justify-content: start;
  gap: 18px;
}
.region-list b {
  width: 34px;
  flex: 0 0 34px;
  color: #fff;
  font-size: 14px;
}
.region-list span {
  font-size: 16px;
}
.support-list,
.social-list {
  margin-top: 10px;
}
.support-list button,
.social-list button {
  min-height: 56px;
}
.own-profile-page .my-settings-btn {
  z-index: 4;
}
.own-referral-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px 42px;
  align-items: center;
  gap: 8px;
  margin: 12px 20px 16px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(255,255,255,.06);
}
.own-referral-card > span,
.own-referral-card button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 0;
  background: rgba(255,255,255,.08);
}
.own-referral-card button {
  cursor: pointer;
}
.own-referral-card small,
.own-referral-card em {
  display: block;
  color: rgba(255,255,255,.62);
  font-size: 12px;
  font-style: normal;
}
.own-referral-card b {
  display: block;
  font-size: 18px;
}
.own-referral-card em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.own-profile-tabs {
  display: flex;
  gap: 18px;
  border-top: 0;
  margin-top: 0;
  padding: 14px 20px;
  min-height: 50px;
  align-items: center;
}
.own-profile-tabs button {
  border: 0;
  background: transparent;
  color: rgba(201,216,232,.4);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.05;
  min-height: 18px;
  padding: 0;
  cursor: pointer;
}
.own-profile-tabs button.active {
  color: #fff;
}
.own-profile-tabs button.muted {
  color: rgba(201,216,232,.4);
}
.own-profile-avatar {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border: 3px solid #000;
  border-radius: 50%;
  background: #1a1a1a;
  background-size: cover;
  background-position: center;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}
.own-profile-posts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  justify-items: stretch;
  padding-top: 12px;
  padding-bottom: 24px;
}
#favoriteTools { display: none !important; }
.own-profile-empty {
  grid-column: 1 / -1;
  width: 100%;
  padding-top: 8px;
  padding-bottom: 120px;
  text-align: center;
}
.own-profile-empty h2 {
  font-size: 24px;
  line-height: 1.1;
}
.own-profile-empty p {
  color: #c9d8e8;
  font-size: 16px;
}
.draft-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 8px;
}
.own-profile-page .gallery-grid,
.own-profile-page .draft-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 8px;
}

/* Edit profile */
.edit-page {
  max-width: 520px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 7px 12px 30px;
  background: #000;
}
.edit-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 19px;
}
.edit-head h1 {
  font-size: 25px;
  line-height: 1.1;
  font-weight: 500;
}
.edit-photo {
  height: 63px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 15px;
  border-radius: 999px;
  padding: 0 24px;
  background: #1a1a1a;
  color: #fff1cc;
  font-weight: 800;
  cursor: pointer;
}
.edit-profile-preview {
  overflow: hidden;
  margin: 0 0 18px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: #151515;
}
.edit-profile-preview-cover {
  height: 92px;
  background: linear-gradient(116deg, #606060 0%, #7b5b4b 42%, #160b08 100%);
  background-position: center;
  background-size: cover;
}
.edit-profile-preview-body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px 14px;
}
.edit-profile-preview-avatar {
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  margin-top: -26px;
  border: 3px solid #050505;
  border-radius: 50%;
  background: #202020;
  background-position: center;
  background-size: cover;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}
.edit-profile-preview-info { min-width: 0; }
.edit-profile-preview-info h2 { margin: 4px 0 7px; font-size: 17px; font-weight: 600; }
.edit-profile-preview-info h2 em { margin-left: 5px; color: #ffe4a3; font-size: 10px; font-style: normal; }
.edit-profile-preview-info > div { display: flex; gap: 14px; color: rgba(255,255,255,.58); font-size: 11px; }
.edit-profile-preview-info b { color: #fff; font-size: 13px; }
.edit-photo input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.edit-photo svg {
  width: 22px;
  height: 22px;
}
.edit-cover {
  position: relative;
  display: block;
  min-height: 112px;
  margin: 0 0 18px;
  border: 1px dashed rgba(255,241,204,.45);
  border-radius: 16px;
  overflow: hidden;
  background: #141414;
  cursor: pointer;
}
.edit-cover input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.edit-cover-preview {
  min-height: 112px;
  display: grid;
  place-items: center;
  padding: 18px;
  background-position: center;
  background-size: cover;
  color: #fff1cc;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}
.avatar-cropper {
  margin: 0 0 18px;
  padding: 16px;
  border-radius: 24px;
  background: #111;
}
.cover-cropper {
  margin: 0 0 18px;
  padding: 16px;
  border-radius: 24px;
  background: #111;
}
.cover-crop-frame {
  width: 100%;
  aspect-ratio: 3 / 1;
  margin: 0 auto 16px;
  padding: 4px;
  border: 2px solid rgba(255,241,204,.24);
  border-radius: 14px;
}
.cover-crop-preview {
  width: 100%;
  height: 100%;
  border-radius: 9px;
  background-color: #1a1a1a;
  background-repeat: no-repeat;
  cursor: grab;
  touch-action: none;
}
.avatar-crop-preview {
  cursor: grab;
  touch-action: none;
}
.avatar-crop-preview:active,
.cover-crop-preview:active { cursor: grabbing; }
.avatar-crop-frame {
  width: 168px;
  height: 168px;
  margin: 0 auto 16px;
  padding: 8px;
  border-radius: 50%;
  border: 2px solid rgba(255,241,204,.24);
}
.avatar-crop-preview {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: #1a1a1a;
  background-repeat: no-repeat;
}
.avatar-crop-controls {
  display: grid;
  gap: 10px;
}
.avatar-crop-controls label {
  display: grid;
  gap: 6px;
  color: #f7f0dd;
  font-size: 13px;
  font-weight: 600;
}
.avatar-crop-controls input[type="range"] {
  width: 100%;
}
.edit-field {
  display: grid;
  gap: 7px;
  margin-bottom: 15px;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
}
.edit-field input {
  width: 100%;
  height: 54px;
  border: 0;
  outline: 0;
  border-radius: 14px;
  padding: 0 17px;
  background: #1a1a1a;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}
.edit-save {
  width: 66px;
  height: 56px;
  display: block;
  margin: 184px auto 0;
  border: 0;
  border-radius: 999px;
  background: #fff1cc;
  color: #000;
  font-size: 16px;
  cursor: pointer;
}

/* Subscription */
#view-subscription {
  height: 100dvh;
  min-height: 0;
  background: #000;
  overflow: hidden;
}
.subscription-page {
  position: relative;
  height: 100%;
  min-height: 0;
  padding: 0 18px 8px;
  background: #000;
  overflow: hidden;
  color: #fff;
}
.subscription-back {
  position: absolute;
  left: 16px;
  top: 6px;
  z-index: 4;
  background: rgba(40,40,40,.72);
  backdrop-filter: blur(8px);
}
.subscription-mosaic {
  height: clamp(250px, 37dvh, 386px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 -18px;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(180deg, #000 0%, #000 72%, rgba(0,0,0,.42) 86%, transparent 100%);
}
.mosaic-row {
  height: calc((clamp(250px, 37dvh, 386px) - 16px) / 5);
  flex: 0 0 calc((clamp(250px, 37dvh, 386px) - 16px) / 5);
  overflow: hidden;
}
.mosaic-track {
  display: flex;
  gap: 4px;
  width: max-content;
  animation: subMosaicLeft 32s linear infinite;
  will-change: transform;
}
.mosaic-row:nth-child(even) .mosaic-track {
  animation-name: subMosaicRight;
  animation-duration: 36s;
}
.mosaic-row:nth-child(3) .mosaic-track {
  animation-duration: 34s;
}
.mosaic-row:nth-child(5) .mosaic-track {
  animation-duration: 38s;
}
.subscription-mosaic img {
  width: clamp(78px, 19.2vw, 102px);
  height: calc((clamp(250px, 37dvh, 386px) - 16px) / 5);
  flex: 0 0 clamp(78px, 19.2vw, 102px);
  object-fit: cover;
  border-radius: 8px;
}
.subscription-mosaic::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.62) 44%, #000 100%);
  pointer-events: none;
}
@keyframes subMosaicLeft {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes subMosaicRight {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}
.subscription-brand {
  margin-top: -30px;
  position: relative;
  z-index: 1;
  font-size: 17px;
  line-height: 1;
  font-weight: 900;
}
.subscription-brand span {
  margin-left: 6px;
  padding: 3px 7px;
  border-radius: 6px;
  background: #fff1cc;
  color: #000;
  font-size: 9px;
  vertical-align: 2px;
}
.subscription-copy {
  margin-top: clamp(14px, 2.3dvh, 20px);
}
.subscription-copy h1 {
  font-size: clamp(20px, 2.75dvh, 23px);
  line-height: 1;
  letter-spacing: 0;
  font-weight: 700;
}
.subscription-copy h1 span {
  background: linear-gradient(90deg, #ffe6aa 0%, #fff1cc 36%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.subscription-copy p {
  margin-top: 4px;
  color: rgba(255,255,255,.86);
  font-size: 11px;
  line-height: 1.18;
}
.subscription-stats {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin: 8px 0 10px;
}
.subscription-stats b,
.subscription-stats small {
  display: block;
  text-align: center;
}
.subscription-stats b {
  color: #fff1cc;
  font-size: 15px;
  line-height: 1;
}
.subscription-stats small {
  color: rgba(255,255,255,.44);
  font-size: 8px;
  letter-spacing: .8px;
}
.subscription-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 12px;
}
.subscription-plan-head h2 {
  font-size: 15px;
  font-weight: 800;
}
.subscription-plan-head button {
  height: 28px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 9px;
  padding: 0 10px;
  background: #121212;
  color: #fff1cc;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  line-height: 1;
}
.subscription-plan-head button svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.4;
}
.subscription-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.sub-plan {
  position: relative;
  min-height: 88px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 13px;
  padding: 10px 10px;
  background: #1a1a1a;
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.sub-plan.active {
  border-color: #fff1cc;
  box-shadow: inset 0 0 0 1px rgba(255,241,204,.5);
}
.sub-plan i {
  position: absolute;
  left: 10px;
  top: -9px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #ff9f35;
  color: #000;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}
.sub-plan small,
.sub-plan em {
  display: block;
  color: rgba(255,255,255,.82);
  font-size: 11px;
  font-style: normal;
}
.sub-plan b {
  display: block;
  color: #fff1cc;
  font-size: 18px;
  line-height: 1.2;
}
.sub-plan del {
  color: rgba(255,255,255,.58);
  font-size: 12px;
  font-weight: 500;
}
.sub-plan strong {
  display: block;
  font-size: 12px;
}
.sub-plan strong span {
  color: rgba(255,255,255,.78);
  font-weight: 500;
}
.reviews-row {
  margin-top: 8px;
  overflow: hidden;
}
.reviews-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.reviews-row h3 {
  font-size: 11px;
  letter-spacing: .7px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  flex: 1;
}
.reviews-row h3::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(255,241,204,.32);
}
.reviews-head button,
.review-form button {
  border: 0;
  border-radius: 999px;
  background: rgba(255,241,204,.16);
  color: #fff1cc;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.reviews-track {
  margin-top: 7px;
  overflow-x: auto;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(202px, 1fr);
  gap: 7px;
  scrollbar-width: none;
}
.reviews-track::-webkit-scrollbar { display: none; }
.reviews-row article {
  position: relative;
  min-height: 86px;
  border: 1px solid rgba(255,241,204,.2);
  border-radius: 12px;
  padding: 10px 10px 11px;
  background: #0f0f0f;
}
.reviews-row article::after {
  content: "\"";
  position: absolute;
  right: 12px;
  top: 3px;
  color: rgba(255,241,204,.2);
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
}
.review-head {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.review-head img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}
.reviews-row b {
  display: block;
  max-width: 94px;
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reviews-row small {
  display: block;
  overflow: hidden;
  color: rgba(255,255,255,.62);
  font-size: 10px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reviews-row span {
  color: #ffd36b;
  letter-spacing: 1px;
  font-size: 10px;
  white-space: nowrap;
}
.reviews-row p {
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.28;
  color: #fff;
  font-weight: 700;
}
.review-form {
  margin-top: 8px;
  display: grid;
  gap: 7px;
}
.review-form textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  background: #111;
  color: #fff;
  padding: 10px;
}
.review-form div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.review-form select {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: #111;
  color: #fff;
  padding: 7px 10px;
}
.review-form label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255,255,255,.72);
  font-size: 11px;
}
.settings-review-form {
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
}
.subscription-start {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 999px;
  margin-top: 8px;
  background: #ffe6aa;
  color: #000;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(255,230,170,.18);
}
.subscription-start span {
  color: rgba(0,0,0,.62);
  font-weight: 500;
}
.subscription-foot {
  margin-top: 9px;
  color: rgba(255,255,255,.36);
  text-align: center;
  font-size: 10px;
  line-height: 1;
}
.subscription-page .legal-links {
  display: none;
}
.currency-list {
  padding-top: 20px;
}

/* Detail page */
#view-detail {
  min-height: 100vh;
  background: #000;
}
.detail-shell {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(520px, 49vw);
  gap: 16px;
  min-height: 100vh;
  margin: 0 auto;
  background: #000;
}
.detail-main {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  display: grid;
  grid-template-rows: 102px minmax(0, 1fr) 76px;
  background: #000;
}
.detail-topbar {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
}
.detail-back {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  cursor: pointer;
}
.detail-back svg { width: 22px; height: 22px; }
.detail-author {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  overflow: hidden;
}
.detail-author-link {
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.detail-author img {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  object-fit: cover;
}
.detail-author-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.detail-author-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
}
.creator-badge {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(115,94,56,.48);
  color: #fff1cc;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}
.detail-author time {
  display: block;
  color: rgba(255,255,255,.72);
  font-size: 16px;
  line-height: 1;
}
.detail-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.detail-actions button {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.detail-actions button.active {
  color: #fff1cc;
}
.detail-actions button.active svg {
  fill: currentColor;
}
.detail-actions svg { width: 24px; height: 24px; stroke-width: 1.9; }
.detail-image-wrap {
  min-height: 0;
  overflow: hidden;
  border-radius: 0 12px 0 0;
  background: #050505;
}
.detail-image-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #050505;
}
.repeat-btn {
  align-self: center;
  justify-self: center;
  width: calc(100% - 32px);
  height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 0;
  border-radius: 999px;
  background: #fff1cc;
  color: #000;
  font-size: 16px;
  cursor: pointer;
}
.repeat-btn svg { width: 22px; height: 22px; }
.detail-related {
  min-width: 0;
  padding: 43px 16px 0 0;
  overflow: hidden;
}
.detail-related h2 {
  margin: 0 0 14px;
  font-size: clamp(32px, 3vw, 38px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 26px 8px;
}
.related-grid .feed-card {
  display: block;
  margin: 0;
  cursor: pointer;
}
.related-grid .creator { padding-left: 8px; }

/* Create prompt page */
#view-create {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: #000;
}
.create-workspace {
  width: min(520px, 100%);
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  padding: 16px 15px 18px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  background: #000;
  overflow: hidden;
}
.create-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cost-pill {
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  background: #1d1d1d;
  color: #fff1cc;
  font-size: 16px;
  font-weight: 700;
}
.cost-pill svg { width: 18px; height: 18px; }
.create-model {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  margin: 0 0 20px 3px;
}
.create-model svg { width: 20px; height: 20px; color: #fff1cc; }
.reference-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  margin-bottom: 16px;
  scrollbar-width: none;
}
.reference-row.empty {
  overflow: visible;
}
.reference-row::-webkit-scrollbar { display: none; }
.reference-upload {
  width: 100%;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 18px;
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  background: #1a1a1a;
  color: #fff1cc;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}
.reference-upload svg { width: 22px; height: 22px; }
.reference-add,
.reference-thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: #1b1b1b;
}
.reference-add { display: grid; place-items: center; cursor: pointer; }
.reference-add svg { width: 28px; height: 28px; color: #cfcfcf; }
.reference-thumb {
  position: relative;
  background-size: cover;
  background-position: center;
}
.reference-thumb::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  pointer-events: none;
}
.reference-thumb.loading::after {
  border: 2px solid rgba(255,241,204,.25);
  border-top-color: #fff1cc;
  animation: referenceSpin .8s linear infinite;
}
@keyframes referenceSpin {
  to { transform: rotate(360deg); }
}
.reference-thumb button {
  position: absolute;
  right: -1px;
  top: -3px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.72);
  color: #fff1cc;
  font-size: 18px;
  line-height: 18px;
  cursor: pointer;
  z-index: 2;
}
.reference-row .reference-upload-image,
.reference-row .reference-upload-video {
  width: auto;
  min-width: 190px;
  flex: 0 0 auto;
}
.reference-row.workflow-motion-control {
  flex-wrap: wrap;
  overflow-x: hidden;
  gap: 8px;
}
.reference-row.workflow-motion-control .reference-upload-image,
.reference-row.workflow-motion-control .reference-upload-video {
  width: 100%;
  min-width: 0;
  flex: 0 0 100%;
}
.reference-row.workflow-media-inputs {
  flex-wrap: wrap;
  overflow-x: hidden;
  gap: 8px;
}
.reference-row.workflow-media-inputs .reference-upload-image,
.reference-row.workflow-media-inputs .reference-media-upload {
  width: 100%;
  min-width: 0;
  flex: 0 0 100%;
}
.reference-media-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #282828;
  color: #fff1cc;
}
.reference-media-thumb svg { width: 26px; height: 26px; }
.reference-media-thumb button {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.72);
  color: #fff1cc;
  cursor: pointer;
}
.reference-video-thumb {
  position: relative;
  flex: 0 0 110px;
  width: 110px;
  height: 64px;
  overflow: hidden;
  border-radius: 16px;
  background: #1b1b1b;
}
.reference-video-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.reference-video-thumb button {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.72);
  color: #fff1cc;
  cursor: pointer;
}
.prompt-panel {
  position: relative;
  height: 458px;
  border-radius: 22px;
  background: #1a1a1a;
  padding: 16px 17px;
  overflow: hidden;
}
.prompt-privacy {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 0;
  background: transparent;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  margin-bottom: 10px;
}
.prompt-privacy svg { width: 22px; height: 22px; color: #fff1cc; }
.prompt-empty {
  position: absolute;
  top: 52px;
  left: 17px;
  right: 17px;
  bottom: 17px;
  color: rgba(255,255,255,.82);
  font-size: 16px;
  line-height: 1.36;
  pointer-events: none;
}
.prompt-empty button {
  border: 0;
  background: transparent;
  color: #fff1cc;
  font-weight: 800;
  cursor: pointer;
  pointer-events: auto;
}
#createPromptBox {
  width: 100%;
  height: calc(100% - 34px);
  border: 0;
  outline: 0;
  resize: none;
  overflow-y: auto;
  background: transparent;
  color: #fff;
  font-size: 16px;
  line-height: 1.25;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.28) transparent;
}
#createPromptBox::-webkit-scrollbar { width: 4px; }
#createPromptBox::-webkit-scrollbar-thumb { background: rgba(255,255,255,.28); border-radius: 999px; }
.prompt-panel.has-text .prompt-empty { display: none; }
.create-options {
  margin-top: 16px;
  border-radius: 20px;
  overflow: hidden;
  background: #1a1a1a;
}
.create-options button {
  width: 100%;
  height: 56px;
  display: grid;
  grid-template-columns: 1fr auto 26px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 0 17px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.create-options button:last-child { border-bottom: 0; }
.create-options span { display: inline-flex; align-items: center; gap: 16px; font-size: 16px; font-weight: 700; }
.create-options svg { width: 22px; height: 22px; color: #fff1cc; }
.create-options strong { color: #cfd9e2; font-size: 16px; }
.create-photo-btn {
  width: 100%;
  height: 61px;
  margin-top: 16px;
  border: 0;
  border-radius: 999px;
  background: #fff1cc;
  color: #000;
  font-size: 16px;
  cursor: pointer;
}
.create-photo-btn svg { width: 18px; height: 18px; vertical-align: -4px; margin: 0 4px; }

/* Generation status/result */
#view-generation,
#view-result {
  min-height: 100vh;
  background: #000;
}

#view-spend {
  min-height: 100vh;
  background: #000;
}

.spend-page {
  width: min(492px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 14px 28px;
  color: #fff;
}

.spend-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.spend-head h1 {
  font-size: 26px;
  line-height: 1;
  font-weight: 700;
}

.spend-head p {
  margin-top: 6px;
  color: rgba(255,255,255,.58);
  font-size: 13px;
}

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

.spend-summary article {
  background: #191919;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 12px;
  min-width: 0;
}

.spend-summary span,
.spend-summary small {
  display: block;
  color: rgba(255,255,255,.56);
  font-size: 11px;
}

.spend-summary b {
  display: block;
  margin-top: 4px;
  font-size: clamp(17px, 4vw, 24px);
  color: #fff1cc;
}

.spend-list {
  display: grid;
  gap: 10px;
}

.spend-item {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 12px;
  background: #191919;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
}

.spend-kind {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255,241,204,.12);
  color: #fff1cc;
  color: rgba(255,255,255,.78);
}
.spend-kind svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

.spend-item b {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

.spend-item small {
  display: block;
  margin-top: 3px;
  color: rgba(255,255,255,.52);
  font-size: 12px;
}

.spend-item strong {
  color: #fff1cc;
  font-size: 14px;
  white-space: nowrap;
}
.spend-item.is-credit-out strong { color: #ff7676; }
.spend-item.is-credit-in strong { color: #75e6a0; }
.spend-item.is-credit-out .spend-kind { color: #ff7676; }
.spend-item.is-credit-in .spend-kind { color: #75e6a0; }

.spend-item em {
  color: rgba(255,255,255,.72);
  font-style: normal;
}

.spend-empty {
  padding: 34px 14px;
  color: rgba(255,255,255,.56);
  text-align: center;
  background: #191919;
  border-radius: 16px;
}
.generation-page,
.result-page {
  width: min(492px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 12px 28px;
  background: #000;
  color: #fff;
}
.generation-status {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin: 18px 0 32px;
  border-radius: 14px;
  padding: 20px 22px;
  background: #1a1a1a;
}
.spinner-ring {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255,255,255,.25);
  border-left-color: #fff;
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.generation-status p {
  margin: 0;
  color: rgba(255,255,255,.88);
  font-size: 14px;
  line-height: 1.45;
}
.generation-status button {
  justify-self: start;
  grid-column: 2;
  border: 0;
  background: transparent;
  color: #fff1cc;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.generation-page h1 {
  margin: 0 0 18px;
  font-size: 25px;
  font-weight: 500;
}
.generation-related {
  columns: 2 180px;
  column-gap: 8px;
}
.generation-related .feed-card {
  break-inside: avoid;
  margin-bottom: 18px;
}
.result-preview {
  margin: 18px 2px 18px;
  overflow: hidden;
  border-radius: 10px;
  background: #111;
}
.result-preview img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.result-privacy {
  margin: 0 0 16px;
}
.description-switch {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 0 16px;
  background: #1a1a1a;
  color: #fff;
  cursor: pointer;
}
.description-switch span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.description-switch b {
  font-size: 15px;
  line-height: 1.2;
}
.description-switch svg {
  width: 21px;
  height: 21px;
  color: #fff1cc;
  flex: 0 0 auto;
}
.description-switch em {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #4a4a4a;
  position: relative;
  flex: 0 0 auto;
}
.description-switch em::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #fff;
  transition: transform .18s ease;
}
.description-switch:not(.is-hidden) em {
  background: #fff1cc;
}
.description-switch:not(.is-hidden) em::after {
  transform: translateX(18px);
  background: #000;
}
.result-actions {
  margin: 0 0 16px;
  overflow: hidden;
  border-radius: 18px;
  background: #1a1a1a;
}
.result-actions button {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 0 18px;
  background: transparent;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.result-actions button:last-child { border-bottom: 0; }
.result-actions span {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}
.result-actions svg {
  width: 22px;
  height: 22px;
  color: #fff1cc;
}
.result-actions.danger button {
  justify-content: flex-start;
  color: #ff3b3b;
}
.result-actions.danger svg {
  color: #ff3b3b;
}
.choice-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: grid;
  align-items: end;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(9px);
}
.choice-backdrop { position: absolute; inset: 0; }
.choice-sheet {
  position: relative;
  width: min(520px, 100vw);
  max-height: 82vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  background: #1a1a1a;
  padding: 56px 16px 20px;
}
#choiceContent {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
#choiceContent::-webkit-scrollbar { display: none; }
.choice-close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  cursor: pointer;
}
.choice-close svg { width: 18px; height: 18px; }
.ratio-options { display: flex; gap: 7px; align-items: center; justify-content: center; flex-wrap: wrap; }
.ratio-options button {
  min-height: 44px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 8px 14px;
  background: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.ratio-options button.active { background: #fff1cc; color: #000; }
.resolution-options {
  justify-content: flex-start;
}
.resolution-options button {
  min-width: 92px;
}
.aspect-chip-icon {
  display: inline-block;
  flex: 0 0 auto;
  border: 1.8px solid currentColor;
  border-radius: 4px;
  opacity: .92;
}
.aspect-chip-wide {
  width: 16px;
  height: 10px;
}
.aspect-chip-vertical {
  width: 10px;
  height: 16px;
}
.aspect-chip-square {
  width: 12px;
  height: 12px;
}
.resolution-chip-text {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  opacity: .72;
}
.choice-list h3 {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0 -2px 20px;
  padding: 2px 2px 14px;
  background: #1a1a1a;
  font-size: 20px;
}
.choice-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: transparent;
  color: #fff;
  text-align: left;
  padding: 0 0 19px;
  margin-bottom: 17px;
  cursor: pointer;
}
.choice-row p { color: #cfd9e2; margin: 8px 0 12px; line-height: 1.45; }
.choice-row small {
  display: inline-flex;
  gap: 5px;
  margin-right: 6px;
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(255,255,255,.1);
  color: #fff1cc;
}
.description-sheet p { font-size: 16px; font-weight: 700; margin: 12px 0; }
.description-sheet textarea {
  width: 100%;
  height: 132px;
  border: 0;
  outline: 0;
  resize: vertical;
  border-radius: 12px;
  background: #343434;
  color: #fff;
  padding: 12px;
  font: inherit;
  line-height: 1.45;
}
.description-sheet button.generate {
  display: block;
  height: 56px;
  margin: 20px auto 0;
  border: 0;
  border-radius: 999px;
  padding: 0 25px;
  background: #fff1cc;
  color: #000;
  font-size: 16px;
  cursor: pointer;
}
.description-sheet button.generate:disabled { opacity: .6; cursor: wait; }
.create-photo-btn.is-loading {
  opacity: .82;
  pointer-events: none;
}
.create-photo-btn.is-loading i {
  animation: spin 1s linear infinite;
}
.reference-picker {
  display: grid;
  gap: 14px;
}
.reference-picker-tabs {
  display: flex;
  align-items: center;
  gap: 18px;
}
.reference-picker-tabs button {
  height: 32px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  background: transparent;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.reference-picker-tabs button.active {
  background: #fff1cc;
  color: #000;
}
.reference-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.reference-picker-upload,
.reference-picker-item {
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 12px;
  background-color: #343434;
  background-position: center;
  background-size: cover;
  cursor: pointer;
}
.reference-picker-upload {
  display: grid;
  place-items: center;
  color: #fff1cc;
}
.reference-picker-upload svg {
  width: 28px;
  height: 28px;
}
.reference-picker-continue {
  height: 56px;
  border: 0;
  border-radius: 999px;
  background: #fff1cc;
  color: #000;
  font-size: 16px;
  cursor: pointer;
}

/* Filter sheets */
.filter-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.42);
  backdrop-filter: blur(12px);
}
.filter-backdrop { position: absolute; inset: 0; }
.filter-sheet {
  position: relative;
  width: min(376px, calc(100vw - 32px));
  max-height: min(82vh, 750px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-radius: 14px;
  background: #1a1a1a;
  padding: 18px 15px 15px;
  overflow: hidden;
}
.filter-close {
  position: absolute;
  right: 13px;
  top: 13px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  cursor: pointer;
}
.filter-close svg { width: 17px; height: 17px; }
.filter-sheet h3 {
  min-height: 28px;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  margin: 0 42px 15px;
}
.filter-options {
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
}
.filter-option {
  min-height: 56px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: #fff;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 16px;
}
.filter-check {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1.5px solid #fff1cc;
  border-radius: 6px;
  color: transparent;
}
.filter-option.radio .filter-check { border-radius: 50%; }
.filter-option.selected .filter-check {
  background: #fff1cc;
  color: #000;
}
.filter-option.radio.selected .filter-check::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #000;
}
.filter-option:not(.radio).selected .filter-check::before {
  content: "✓";
  font-size: 15px;
  font-weight: 900;
}
.filter-show {
  height: 56px;
  border: 0;
  border-radius: 999px;
  background: #fff1cc;
  color: #000;
  font-size: 16px;
  cursor: pointer;
  margin-top: 14px;
}

/* Floating navigation */
.rail {
  position: fixed;
  z-index: 90;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 74px;
  padding: 11px 4px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 38px;
  background: rgba(58,58,58,.76);
  box-shadow: inset 0 1px rgba(255,255,255,.12), 0 16px 44px rgba(0,0,0,.35);
  backdrop-filter: blur(16px);
}
.rail.detail-hidden { display: none; }
.tab {
  width: 66px;
  min-height: 70px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 0;
  border-radius: 33px;
  background: transparent;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .24s ease, color .24s ease, transform .24s ease, box-shadow .24s ease;
}
.tab:hover { background: rgba(255,255,255,.1); }
.tab.active { background: rgba(255,255,255,.17); box-shadow: inset 0 1px rgba(255,255,255,.12); }
.tab:active { transform: scale(.94); }
.tab svg { width: 21px; height: 21px; stroke-width: 2.2; }
.avatar-aa {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #111;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
}

/* Studio views */
#view-image, #view-video, #view-admin {
  width: min(1180px, calc(100vw - 150px));
  margin: 0 auto;
  padding: 28px 20px 120px 96px;
}
#view-gallery {
  width: 100%;
  margin: 0;
  padding: 0;
}
.workspace-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.workspace-head h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  letter-spacing: 0;
}
.workspace-head p { color: var(--muted); margin-top: 8px; }
.top-right { display: flex; gap: 8px; align-items: center; }
.pill {
  border: 1px solid var(--line);
  background: var(--pill);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
}
.pill.ghost { background: transparent; color: var(--muted); }

.models { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 16px; scrollbar-width: none; }
.models::-webkit-scrollbar { display: none; }
.model-chip {
  min-width: 200px;
  text-align: left;
  cursor: pointer;
  background: #080808;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color .2s, transform .15s;
}
.model-chip:hover { transform: translateY(-1px); }
.model-chip.selected { border-color: #fff; box-shadow: 0 0 0 1px #fff; }
.model-chip.soon { opacity: .45; cursor: not-allowed; }
.mc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.mc-name { font-weight: 800; }
.mc-tag, .mc-cost { font-size: 12px; color: var(--muted); }
.mc-desc { font-size: 12px; color: var(--muted); margin-top: 4px; }
.mc-cost { margin-top: 6px; font-weight: 700; }

.canvas, .gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 70px 20px;
  border: 1px dashed var(--line);
  border-radius: 14px;
}
.reference-row.empty {
  grid-column: auto;
  text-align: initial;
  color: inherit;
  padding: 0;
  border: 0;
  border-radius: 0;
  min-height: 0;
}
.empty-glyph { font-size: 28px; margin-bottom: 8px; font-weight: 800; }
.card {
  background: #070707;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card img, .card video { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #000; }
.card video { aspect-ratio: 16/9; }
.card-body { padding: 10px 12px; font-size: 12px; color: var(--muted); }
.card-prompt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 11px; }
.status-running { color: #9be7d7; }
.status-failed { color: var(--danger); }
.spinner-card { display: grid; place-items: center; aspect-ratio: 1; background: #080808; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #333; border-top-color: #fff; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Prompt dock */
.dock {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 25;
  width: min(780px, calc(100vw - 32px));
  transform: translateX(-50%);
  display: none;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 24px;
  background: rgba(48,48,48,.78);
  box-shadow: 0 18px 46px rgba(0,0,0,.38);
  backdrop-filter: blur(18px);
}
.dock-row { display: flex; gap: 8px; align-items: flex-end; }
.size-select, #promptBox {
  background: #111;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.size-select { padding: 11px 8px; max-width: 110px; }
#promptBox {
  flex: 1;
  resize: none;
  max-height: 120px;
  padding: 12px 14px;
}
#promptBox:focus { outline: none; border-color: #fff; }
.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: #111;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}
.icon-btn svg { width: 19px; height: 19px; }
.go-btn {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  cursor: pointer;
  background: #fff;
  color: #000;
  font-weight: 800;
}
.go-btn:disabled { opacity: .6; cursor: wait; }

/* Auth, admin, toast */
.overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.82);
  padding: 20px;
  isolation: isolate;
  overscroll-behavior: contain;
  touch-action: none;
}
.overlay[hidden] { display: none; }
.auth-card {
  position: relative;
  width: min(390px, 100%);
  max-height: min(720px, calc(100dvh - 32px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  text-align: center;
  background: #080808;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
}
.auth-card::-webkit-scrollbar { width: 0; height: 0; display: none; }
.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
  cursor: pointer;
}
.auth-close:hover { background: rgba(255,255,255,.14); }
.auth-close svg {
  width: 19px;
  height: 19px;
}
.auth-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #ffd22d;
  color: #000;
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
}
.auth-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.auth-card h1 { font-size: 32px; }
.profile-media-card {
  position: relative;
  width: min(470px, 100%);
  max-height: min(760px, calc(100dvh - 28px));
  overflow-y: auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #101010;
  box-shadow: 0 24px 70px rgba(0,0,0,.5);
  text-align: center;
}
.profile-media-card h2 { font-size: 20px; font-weight: 600; }
.profile-media-card > p { margin: 7px 0 16px; color: rgba(255,255,255,.62); font-size: 13px; }
.profile-media-upload { width: 100%; height: 48px; min-height: 48px; justify-content: center; margin-bottom: 14px; }
.profile-media-upload svg { width: 18px; height: 18px; }
.profile-media-card .avatar-cropper,
.profile-media-card .cover-cropper { margin-bottom: 14px; text-align: left; }
.profile-media-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.profile-media-actions button { height: 45px; border: 0; border-radius: 12px; cursor: pointer; font-size: 14px; font-weight: 600; }
.profile-media-remove { background: rgba(255,107,138,.14); color: #ff9ab0; }
.profile-media-save { background: #ffe5aa; color: #111; }
.auth-sub, .auth-foot, .tg-state { color: var(--muted); font-size: 14px; margin: 8px 0 18px; }
.auth-card input {
  width: 100%;
  font-size: 16px;
  margin-bottom: 10px;
  background: #111;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.auth-actions { display: flex; gap: 8px; justify-content: center; margin-top: 4px; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 10px;
  color: rgba(255,255,255,.45);
  font-size: 12px;
  font-weight: 700;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(255,255,255,.12);
}
.google-login-wrap {
  display: grid;
  place-items: center;
  min-height: 42px;
}
.auth-err { color: var(--danger); font-size: 13px; min-height: 18px; margin-top: 10px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat { background: #080808; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.stat b { display: block; font-size: 24px; }
.stat span { color: var(--muted); font-size: 12px; }
.admin-h { margin: 14px 0 8px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; }
td input { width: 70px; background: #111; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 5px 8px; }
td button { background: #111; border: 1px solid var(--line); color: #fff; border-radius: 8px; padding: 5px 10px; cursor: pointer; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 120px;
  transform: translateX(-50%) translateY(20px);
  background: #111;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 60;
  max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-modal) + 20);
  display: grid;
  place-items: center;
  padding: 20px;
  isolation: isolate;
}
.confirm-overlay[hidden] { display: none; }
.confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(8px);
}
.confirm-dialog {
  position: relative;
  width: min(390px, 100%);
  padding: 26px;
  border: 1px solid rgba(255,241,204,.2);
  border-radius: 20px;
  background: linear-gradient(145deg, #26221b, #121212 72%);
  box-shadow: 0 24px 70px rgba(0,0,0,.55), inset 0 1px rgba(255,255,255,.08);
  text-align: center;
  animation: confirm-enter .18s ease both;
}
@keyframes confirm-enter {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.confirm-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: rgba(255,214,141,.14);
  color: #ffd68d;
}
.confirm-icon svg { width: 23px; height: 23px; }
.confirm-dialog h2 { font-size: 19px; font-weight: 600; }
.confirm-dialog p { margin: 9px 0 22px; color: rgba(255,255,255,.68); font-size: 14px; line-height: 1.5; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.confirm-actions button { height: 45px; border: 0; border-radius: 12px; cursor: pointer; font-size: 14px; font-weight: 600; }
.confirm-cancel { background: rgba(255,255,255,.09); color: #fff; }
.confirm-submit { background: #ffe5aa; color: #111; }
.confirm-submit.danger { background: #ff8d8d; color: #210909; }
.chat-login-notice {
  position: fixed;
  top: calc(var(--tg-safe-top) + 20px);
  left: 50%;
  z-index: var(--z-toast);
  width: min(420px, calc(100% - 32px));
  padding: 13px 18px;
  border: 1px solid rgba(255,241,204,.45);
  border-radius: 12px;
  background: #fff1cc;
  color: #111;
  box-shadow: 0 14px 36px rgba(0,0,0,.32);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -12px);
  transition: opacity .26s ease, transform .26s ease;
}
.chat-login-notice.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.welcome-notice {
  position: fixed;
  top: calc(var(--tg-safe-top) + 16px);
  left: 50%;
  z-index: var(--z-toast);
  width: min(440px, calc(100% - 32px));
  padding: 13px 18px;
  border: 1px solid rgba(255,241,204,.45);
  border-radius: 12px;
  background: #fff1cc;
  color: #111;
  box-shadow: 0 14px 36px rgba(0,0,0,.32);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -12px);
  transition: opacity .2s ease, transform .2s ease;
}
.welcome-notice.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1280px) {
  #view-explore { padding-left: 110px; }
  .home-shell { width: calc(100vw - 140px); }
  .home-feed { column-count: 4; }
  .rail { left: 20px; }
}
@media (min-width: 901px) {
  html, body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
  }
  body {
    display: block;
  }
  #main {
    position: relative;
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    border-radius: 0;
    background: #000;
  }
  .home-shell {
    width: 100%;
    min-height: 100%;
    margin: 0;
    border-radius: 0;
  }
  body.tg-mini-app {
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
  }
  body.tg-mini-app #main {
    width: 100vw;
    height: var(--tg-viewport-height);
    min-height: var(--tg-viewport-height);
    margin: 0;
    overflow: hidden;
    border-radius: 0;
  }
  body.tg-mini-app .rail {
    left: 50%;
    right: auto;
    top: auto;
    bottom: calc(10px + env(safe-area-inset-bottom) + var(--tg-safe-bottom));
    transform: translateX(-50%);
    width: min(284px, calc(100vw - 88px));
    min-width: 252px;
    display: flex;
    padding: 6px;
    border-radius: 40px;
  }
  body.tg-mini-app .tab {
    flex: 1;
    width: auto;
    min-height: 58px;
    border-radius: 32px;
    font-size: 11px;
  }
  body.tg-mini-app .tab svg {
    width: 20px;
    height: 20px;
  }
  body.tg-mini-app .rail.detail-hidden {
    display: none;
  }
  .view.active {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  #view-home,
  #view-explore,
  #view-category,
  #view-detail,
  #view-profile,
  #view-ai-chat,
  #view-messages,
  #view-conversation,
  #view-settings,
  #view-language,
  #view-region,
  #view-support,
  #view-social,
  #view-edit,
  #view-subscription,
  #view-spend,
  #view-tasks,
  #view-wallet,
  #view-withdraw,
  #view-payment-method,
  #view-payout-history,
  #view-invited,
  #view-rating,
  #view-statistics,
  #view-create,
  #view-generation,
  #view-result,
  #view-image,
  #view-video,
  #view-gallery,
  #view-admin {
    min-height: 0;
  }
  #view-home,
  #view-explore,
  #view-category,
  #view-create,
  #view-generation,
  #view-result,
  #view-achievements,
  #view-referral,
  #view-tasks,
  #view-wallet,
  #view-withdraw,
  #view-payment-method,
  #view-payout-history,
  #view-invited,
  #view-rating,
  #view-statistics,
  #view-profile,
  #view-ai-chat,
  #view-messages,
  #view-conversation,
  #view-settings,
  #view-language,
  #view-region,
  #view-support,
  #view-social,
  #view-edit,
  #view-subscription,
  #view-spend,
  #view-image,
  #view-video,
  #view-gallery,
  #view-admin {
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
  }
  #view-home::-webkit-scrollbar,
  #view-explore::-webkit-scrollbar,
  #view-category::-webkit-scrollbar,
  #view-create::-webkit-scrollbar,
  #view-generation::-webkit-scrollbar,
  #view-result::-webkit-scrollbar,
  #view-achievements::-webkit-scrollbar,
  #view-referral::-webkit-scrollbar,
  #view-tasks::-webkit-scrollbar,
  #view-wallet::-webkit-scrollbar,
  #view-withdraw::-webkit-scrollbar,
  #view-payment-method::-webkit-scrollbar,
  #view-payout-history::-webkit-scrollbar,
  #view-invited::-webkit-scrollbar,
  #view-rating::-webkit-scrollbar,
  #view-statistics::-webkit-scrollbar,
  #view-profile::-webkit-scrollbar,
  #view-ai-chat::-webkit-scrollbar,
  #view-messages::-webkit-scrollbar,
  #view-conversation::-webkit-scrollbar,
  #view-settings::-webkit-scrollbar,
  #view-language::-webkit-scrollbar,
  #view-region::-webkit-scrollbar,
  #view-support::-webkit-scrollbar,
  #view-social::-webkit-scrollbar,
  #view-edit::-webkit-scrollbar,
  #view-subscription::-webkit-scrollbar,
  #view-spend::-webkit-scrollbar,
  #view-image::-webkit-scrollbar,
  #view-video::-webkit-scrollbar,
  #view-gallery::-webkit-scrollbar,
  #view-admin::-webkit-scrollbar {
    display: none;
  }
  #view-explore {
    padding: 0;
  }
  .category-page {
    padding: 18px 16px 92px;
  }
  .category-grid {
    grid-template-columns: repeat(5, minmax(160px, 1fr));
    gap: 24px 14px;
  }
  .home-shell {
    width: 100%;
    min-height: 100%;
    margin: 0;
    border-radius: 0;
    padding: 16px 16px 24px;
    overflow: visible;
  }
  .home-page {
    width: 100%;
    max-width: none;
    min-height: 100%;
    margin: 0;
    padding: 18px 16px 118px;
    overflow: visible;
  }
  .home-header {
    margin-bottom: 30px;
  }
  .create-actions {
    grid-template-columns: repeat(8, minmax(86px, 98px));
    justify-content: start;
    gap: 14px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .create-actions::-webkit-scrollbar {
    display: none;
  }
  .create-actions span {
    width: 96px;
    border-radius: 22px;
  }
  .task-card {
    margin-bottom: 54px;
  }
  .prompt-strip {
    grid-auto-columns: minmax(180px, 16.1%);
    gap: 8px;
    padding-right: 18px;
  }
  .search-grid {
    grid-template-columns: repeat(5, minmax(160px, 1fr));
  }
  .home-feed {
    column-count: 5;
  }
  #view-detail { overflow: hidden; }
  .detail-shell { height: 100%; min-height: 0; overflow: hidden; }
  .detail-main {
    position: sticky;
    top: 0;
    height: 100%;
    min-height: 0;
  }
  .detail-related {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 24px;
    scrollbar-width: none;
  }
  .detail-related::-webkit-scrollbar { display: none; }
  #view-profile {
    overflow: hidden;
  }
  .user-profile-page {
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 0;
  }
  .user-profile-head {
    padding: 14px 20px 21px;
  }
  .profile-identity {
    margin-top: 22px;
  }
  .profile-actions {
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) 50px;
    gap: 8px;
  }
  .profile-posts {
    grid-template-columns: repeat(5, minmax(160px, 1fr));
    gap: 24px 14px;
    padding: 16px 16px 64px;
  }
  .own-profile-posts {
    grid-template-columns: 1fr;
  }
  .messages-page {
    width: min(680px, 100%);
    min-height: 100%;
    padding: 24px 20px 80px;
  }
  .conversation-page {
    width: min(520px, 100%);
    height: 100%;
  }
  .ai-chat-page {
    width: min(520px, 100%);
    height: 100%;
  }
  .my-profile-page,
  .settings-page,
  .settings-subpage,
  .edit-page,
  .subscription-page {
    min-height: 100%;
  }
  #view-subscription {
    height: 100%;
    overflow: hidden;
  }
  #view-subscription.view.active {
    overflow: hidden;
  }
  .subscription-page {
    height: 100%;
    overflow: hidden;
  }
  .subscription-page .legal-links {
    display: none;
  }
  .subscription-mosaic {
    height: clamp(345px, 43dvh, 440px);
    margin-left: -16px;
    margin-right: -16px;
  }
  .mosaic-row {
    height: calc((clamp(345px, 43dvh, 440px) - 16px) / 5);
    flex-basis: calc((clamp(345px, 43dvh, 440px) - 16px) / 5);
  }
  .mosaic-track {
    gap: 6px;
    animation-duration: 58s;
  }
  .mosaic-row:nth-child(even) .mosaic-track {
    animation-duration: 64s;
  }
  .mosaic-row:nth-child(3) .mosaic-track {
    animation-duration: 61s;
  }
  .mosaic-row:nth-child(5) .mosaic-track {
    animation-duration: 67s;
  }
  .subscription-mosaic img {
    width: clamp(170px, 12.4vw, 220px);
    height: calc((clamp(345px, 43dvh, 440px) - 16px) / 5);
    flex-basis: clamp(170px, 12.4vw, 220px);
    border-radius: 9px;
  }
  .reviews-track {
    overflow: hidden;
    grid-auto-flow: initial;
    grid-auto-columns: initial;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 7px;
  }
  .reviews-row article:nth-child(n+8) {
    display: none;
  }
  .reviews-row article {
    min-height: 86px;
    padding: 9px;
  }
  .review-head {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 6px;
  }
  .review-head img {
    width: 22px;
    height: 22px;
  }
  .reviews-row span {
    grid-column: 1 / -1;
    margin-top: 4px;
  }
  .reviews-row p {
    font-size: 10px;
    line-height: 1.22;
  }
  #view-image, #view-video, #view-admin {
    width: 100%;
    margin: 0;
    padding: 28px 24px 120px 96px;
  }
  #view-create {
    height: 100%;
    overflow: hidden;
    display: grid;
    place-items: center;
    padding: 18px 0 0;
  }
  .create-workspace {
    width: min(520px, 42vw);
    min-width: 440px;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto auto minmax(260px, 1fr) auto auto;
    padding: 14px 0 0;
  }
  .create-top {
    margin-bottom: 10px;
  }
  .create-model {
    margin-bottom: 18px;
  }
  .reference-row {
    min-height: 64px;
  }
  .prompt-panel {
    height: auto;
    min-height: 260px;
  }
  .create-options {
    margin-top: 16px;
  }
  .create-photo-btn {
    margin-top: 16px;
  }
  .generation-page,
  .result-page {
    width: min(520px, 42vw);
    min-width: 440px;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
  }
  .generation-page::-webkit-scrollbar,
  .result-page::-webkit-scrollbar {
    display: none;
  }
  .draft-grid {
    grid-template-columns: repeat(5, minmax(160px, 1fr));
  }
  .credits-cta {
    bottom: calc(46px + env(safe-area-inset-bottom));
    width: min(452px, 34vw);
  }
  .legal-links {
    position: fixed;
    left: 50%;
    bottom: 6px;
    transform: translateX(-50%);
    z-index: 10;
  }
}

/* Desktop and tablet reserve a real navigation gutter so main content never sits beneath the rail. */
@media (min-width: 768px) {
  #main {
    width: calc(100vw - 110px);
    margin-left: 110px;
    height: calc(100dvh - 32px);
    min-height: 0;
  }
  .rail {
    left: 24px;
    right: auto;
  }
  #view-ai-chat,
  .ai-chat-page {
    width: 100%;
    max-width: none;
    height: calc(100dvh - 32px);
    min-height: 0;
  }
  #view-create,
  .create-workspace {
    width: 100%;
    max-width: none;
    min-width: 0;
    height: calc(100dvh - 32px);
    min-height: 0;
    padding: 0 16px 10px;
  }
  #view-messages,
  .messages-page {
    width: 100%;
    max-width: none;
  }
  #view-conversation,
  .conversation-page {
    width: 100%;
    max-width: none;
  }
  #view-conversation,
  #view-conversation.view.active,
  .conversation-page {
    height: calc(100dvh - 32px);
    min-height: 0;
  }
}

/* Center modal sheets on desktop/web; mobile keeps the app-like bottom sheet layout. */
@media (min-width: 901px) {
  .own-profile-page {
    max-width: none;
  }
  .profile-posts,
  .own-profile-posts {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 22px 14px;
    padding: 12px 24px 120px;
  }
  .own-profile-page .gallery-grid,
  .own-profile-page .draft-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 22px 14px;
    padding: 12px 24px 120px;
  }
  .profile-posts .feed-card figure,
  .own-profile-posts .feed-card figure {
    aspect-ratio: 4 / 5 !important;
  }
  .choice-overlay,
  .filter-overlay {
    place-items: center;
  }
  .choice-sheet,
  .filter-sheet {
    width: min(520px, calc(100vw - 48px));
    max-height: calc(100dvh - 48px);
    border-radius: 20px;
  }
}

@media (min-width: 768px) and (max-width: 900px) {
  html, body { overflow: hidden; }
  #main {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }
  .rail {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    width: 74px;
    min-width: 0;
    display: block;
    padding: 11px 4px;
    border-radius: 38px;
  }
  .tab {
    width: 66px;
    min-height: 70px;
    flex: none;
    border-radius: 33px;
    font-size: 12px;
  }
  .home-page,
  .home-shell { width: 100%; max-width: none; }
}
@media (min-width: 901px) and (max-width: 1200px) {
  .reviews-track {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .reviews-row article:nth-child(n+5) {
    display: none;
  }
}
@media (max-width: 900px) {
  .overlay {
    align-items: center;
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }
  .auth-card {
    width: min(420px, 100%);
    max-height: calc(100dvh - max(24px, env(safe-area-inset-top) + env(safe-area-inset-bottom)));
    padding: 24px 18px;
    border-radius: 18px;
  }
  .auth-actions { flex-wrap: wrap; }
  .auth-actions > * { flex: 1 1 140px; min-width: 0; }
  .site-legal-footer {
    display: none;
  }
  .legal-page {
    width: min(492px, 100%);
    padding: 18px 14px 88px;
  }
  .legal-page header h1 {
    font-size: 36px;
  }
  #view-explore { padding: 0 0 88px; }
  #view-create {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    background: #000;
  }
  #view-generation,
  #view-result {
    min-height: 100vh;
    background: #000;
  }
  .generation-page,
  .result-page {
    width: 100vw;
    max-width: none;
  }
  .create-workspace {
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    padding: 16px 11px 8px;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
    overflow: hidden;
  }
  .create-top {
    margin-bottom: 8px;
  }
  .create-model {
    margin-bottom: 14px;
    font-size: 25px;
  }
  .reference-row {
    min-height: 64px;
    margin-bottom: 14px;
  }
  .prompt-panel {
    height: auto;
    min-height: 0;
    padding: 16px 17px;
  }
  .create-options {
    margin-top: 14px;
  }
  .create-options button {
    height: 56px;
  }
  .create-photo-btn {
    height: 60px;
    margin-top: 12px;
  }
  #view-achievements { min-height: 100vh; background: #000; }
  #view-referral { min-height: 100vh; background: #000; }
  #view-profile {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    background: #000;
  }
  #view-ai-chat {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    background: #000;
  }
  #view-messages {
    min-height: 100vh;
    background: #000;
  }
  #view-gallery {
    min-height: 100vh;
    background: #000;
  }
  .my-profile-page {
    width: 100vw;
    max-width: none;
    margin: 0;
  }
  #view-conversation {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    background: #000;
  }
  #view-settings {
    min-height: 100vh;
    background: #000;
  }
  #view-language,
  #view-region,
  #view-support,
  #view-social {
    min-height: 100vh;
    background: #000;
  }
  #view-edit {
    min-height: 100vh;
    background: #000;
  }
  #view-subscription {
    height: 100dvh;
    min-height: 0;
    background: #000;
    overflow: hidden;
  }
  .subscription-page {
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    padding: 0 20px 8px;
    overflow: hidden;
  }
  .settings-subpage {
    width: 100vw;
    min-height: 100vh;
    max-width: none;
    padding: 6px 14px 30px;
  }
  .subscription-page .legal-links {
    display: none;
  }
  .subscription-mosaic {
    height: clamp(280px, 42dvh, 410px);
    margin: 0 -20px;
    mask-image: linear-gradient(180deg, #000 0%, #000 72%, rgba(0,0,0,.42) 86%, transparent 100%);
  }
  .mosaic-row {
    height: calc((clamp(280px, 42dvh, 410px) - 16px) / 5);
    flex-basis: calc((clamp(280px, 42dvh, 410px) - 16px) / 5);
  }
  .subscription-mosaic img {
    width: clamp(88px, 21.5vw, 112px);
    height: calc((clamp(280px, 42dvh, 410px) - 16px) / 5);
    flex-basis: clamp(88px, 21.5vw, 112px);
  }
  .subscription-copy h1 {
    font-size: clamp(20px, 2.75dvh, 23px);
  }
  .conversation-page {
    width: 100vw;
    height: 100vh;
    max-width: none;
  }
  .ai-chat-page {
    width: 100vw;
    height: 100vh;
    max-width: none;
  }
  .conversation-body {
    padding-bottom: 150px;
  }
  .conversation-compose {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: calc(92px + env(safe-area-inset-bottom));
    z-index: 24;
    margin: 0;
    border-radius: 999px;
    padding: 0;
    grid-template-columns: 38px minmax(0, 1fr) 46px;
    background: #1a1a1a;
  }
  .ai-compose {
    margin: 0 16px calc(10px + env(safe-area-inset-bottom));
  }
  .conversation-attach {
    height: 52px;
    border-radius: 999px 0 0 999px;
    background: transparent;
  }
  .conversation-compose > input {
    border-radius: 0;
    padding-left: 0;
    background: transparent;
  }
  .conversation-compose button {
    margin-left: 0;
  }
  .conversation-compose > button {
    margin-right: 5px;
  }
  .user-profile-page {
    width: 100vw;
    height: 100vh;
    max-width: none;
    margin: 0;
  }
  .own-profile-page {
    width: 100vw;
    height: 100vh;
  }
  .profile-posts {
    padding-bottom: 18px;
  }
  .own-profile-posts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 6px;
    padding-bottom: 130px;
  }
  .choice-overlay { align-items: end; }
  .filter-overlay {
    place-items: end center;
  }
  .filter-sheet {
    width: 100vw;
    max-height: 82vh;
    border-radius: 18px 18px 0 0;
    padding: 46px 17px 16px;
  }
  .filter-sheet h3 {
    margin-top: -20px;
  }
  #view-category { min-height: 100vh; background: #000; }
  .category-page { padding: 16px 16px 100px; }
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 8px;
  }
  .home-shell {
    width: 100vw;
    min-height: 100vh;
    border-radius: 0;
    padding: 15px 14px 0;
  }
  .home-feed { column-count: 2; column-gap: 8px; }
  #view-explore .home-feed {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-count: initial;
    gap: 14px 8px;
  }
  #view-explore .home-feed .feed-card {
    margin-bottom: 0;
  }
  .feed-card { margin-bottom: 14px; }
  .feed-card figure > img { min-height: 0; }
  .legal-links { display: none; }
  .rail {
    left: 50%;
    right: auto;
    top: auto;
    bottom: calc(10px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: min(284px, calc(100vw - 88px));
    min-width: 252px;
    display: flex;
    padding: 6px;
    border-radius: 40px;
  }
  .tab {
    flex: 1;
    width: auto;
    min-height: 58px;
    border-radius: 32px;
    font-size: 11px;
  }
  .tab svg { width: 20px; height: 20px; }
  #view-image, #view-video, #view-admin {
    width: 100vw;
    padding: 20px 14px 104px;
  }
  #view-gallery {
    width: 100vw;
    padding: 0;
  }
  .workspace-head { flex-direction: column; }
  .dock { bottom: 86px; }
  .dock-row { align-items: stretch; }
  .size-select { display: none; }
  .go-btn { padding: 0 14px; }
  .search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 8px;
  }
  .create-actions {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 82px;
    grid-template-columns: none;
    justify-content: start;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 2px 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .create-actions::-webkit-scrollbar { display: none; }
  .create-actions button {
    width: 82px;
    scroll-snap-align: start;
  }
  .create-actions span {
    width: 78px;
    border-radius: 22px;
  }
  .rail.detail-hidden { display: none; }
  .detail-shell {
    display: block;
    min-height: 100vh;
  }
  .detail-main {
    position: relative;
    min-height: auto;
    display: block;
  }
  .detail-topbar {
    height: 107px;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 0 14px;
  }
  .detail-actions { gap: 17px; }
  .detail-author-link {
    gap: 8px;
  }
  .detail-author img {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
  .detail-author-name {
    font-size: 16px;
  }
  .detail-author time {
    font-size: 16px;
  }
  .creator-badge {
    font-size: 9px;
    padding: 2px 6px;
  }
  .detail-image-wrap {
    height: min(76vh, 680px);
    border-radius: 0;
  }
  .detail-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  .repeat-btn {
    width: calc(100% - 32px);
    margin: 16px 16px 28px;
  }
  .detail-related {
    padding: 0 16px 80px;
    overflow: visible;
  }
  .detail-related h2 {
    margin-bottom: 17px;
    font-size: 26px;
  }
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px 8px;
  }
}
@media (max-height: 760px) {
  .create-workspace {
    padding-top: 10px;
    padding-bottom: 6px;
  }
  .create-top {
    margin-bottom: 6px;
  }
  .create-model {
    margin-bottom: 10px;
    font-size: 22px;
  }
  .reference-row {
    margin-bottom: 10px;
  }
  .reference-add,
  .reference-thumb {
    width: 56px;
    height: 56px;
  }
  .prompt-panel {
    border-radius: 18px;
    padding: 14px 15px;
  }
  .prompt-empty {
    top: 48px;
    font-size: 14px;
  }
  .prompt-privacy {
    font-size: 14px;
  }
  .create-options {
    margin-top: 10px;
  }
  .create-options button {
    height: 48px;
  }
  .create-photo-btn {
    height: 52px;
    margin-top: 10px;
  }
  .subscription-page {
    padding-bottom: 6px;
  }
  .subscription-mosaic {
    height: clamp(236px, 36dvh, 310px);
  }
  .mosaic-row {
    height: calc((clamp(236px, 36dvh, 310px) - 16px) / 5);
    flex-basis: calc((clamp(236px, 36dvh, 310px) - 16px) / 5);
  }
  .subscription-mosaic img {
    height: calc((clamp(236px, 36dvh, 310px) - 16px) / 5);
  }
  .subscription-brand {
    margin-top: -24px;
    font-size: 15px;
  }
  .subscription-copy {
    margin-top: 10px;
  }
  .subscription-copy h1 {
    font-size: 18px;
  }
  .subscription-copy p {
    font-size: 10px;
  }
  .subscription-stats {
    margin: 6px 0 8px;
  }
  .subscription-plan-head {
    margin: 4px 0 8px;
  }
  .sub-plan {
    min-height: 78px;
    padding: 8px 9px;
  }
  .sub-plan b {
    font-size: 16px;
  }
  .sub-plan small,
  .sub-plan em,
  .sub-plan strong {
    font-size: 10px;
  }
  .reviews-row {
    margin-top: 6px;
  }
  .reviews-track {
    margin-top: 5px;
  }
  .reviews-row article {
    min-height: 74px;
    padding: 8px;
  }
  .review-head img {
    width: 20px;
    height: 20px;
  }
  .review-head {
    grid-template-columns: 20px minmax(0, 1fr) auto;
  }
  .reviews-row p {
    margin-top: 5px;
    font-size: 10px;
    line-height: 1.2;
  }
  .subscription-start {
    height: 44px;
    margin-top: 6px;
  }
  .subscription-foot {
    margin-top: 5px;
  }
}
@media (max-height: 660px) {
  .create-photo-btn {
    height: 46px;
  }
  .create-options button {
    height: 44px;
  }
  .reference-add,
  .reference-thumb {
    width: 50px;
    height: 50px;
  }
  .prompt-empty {
    font-size: 13px;
  }
  .subscription-mosaic {
    height: 218px;
  }
  .mosaic-row {
    height: calc((218px - 16px) / 5);
    flex-basis: calc((218px - 16px) / 5);
  }
  .subscription-mosaic img {
    height: calc((218px - 16px) / 5);
  }
  .reviews-row {
    display: none;
  }
  .subscription-copy h1 {
    font-size: 17px;
  }
  .subscription-start {
    height: 42px;
  }
}
@media (max-width: 430px) {
  .home-page { padding-left: 14px; padding-right: 14px; }
  .create-actions { gap: 14px; grid-auto-columns: 82px; }
  .create-actions span { width: 78px; border-radius: 22px; }
  .create-actions b { font-size: 14px; }
  .prompt-strip { grid-auto-columns: minmax(170px, calc((100vw - 36px) / 2)); }
  .home-feed { column-gap: 9px; }
  .feed-filters { gap: 8px; }
  .filter-pill { height: 36px; padding: 0 12px; font-size: 14px; }
  .model-badge { font-size: 11px; }
  .spark-btn { width: 39px; height: 39px; }
  .creator { font-size: 12px; padding-left: 7px; }
}

/* Desktop feed layout: five cards per row in Explore, with a stable single-row
   carousel for each Home category. */
@media (min-width: 901px) {
  /* Home must occupy the same desktop canvas as the other primary views.
     Its own content area scrolls, so category rows cannot be clipped by the
     fixed app shell. */
  #view-home {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
  }
  #view-home::-webkit-scrollbar { width: 0; height: 0; display: none; }
  #view-home .home-page {
    width: 100%;
    max-width: none;
    min-height: 100%;
    padding: 18px 24px 118px;
  }
  #view-home .home-categories {
    display: grid;
    width: 100%;
    visibility: visible;
  }
  #view-explore .feed-filters {
    position: sticky;
    top: 0;
    left: auto;
    right: auto;
    z-index: 70;
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
    padding: 12px 0;
    background: rgba(0,0,0,.96);
    backdrop-filter: blur(16px);
  }
  #view-explore .home-shell { padding-top: 16px; }
  #view-explore .home-feed {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    column-count: initial;
    gap: 22px 14px;
  }
  #view-explore .home-feed .feed-card {
    margin-bottom: 0;
  }
  .home-page .prompt-strip {
    grid-auto-flow: column;
    grid-template-rows: minmax(0, 1fr);
    grid-auto-columns: minmax(170px, 16.1%);
    overflow-x: auto;
    overflow-y: hidden;
  }
}

@media (max-width: 900px) {
  #view-explore .feed-filters {
    position: fixed;
    top: var(--tg-safe-top);
    left: 0;
    right: 0;
    z-index: 70;
    padding: 10px 14px;
    background: rgba(0,0,0,.96);
    backdrop-filter: blur(16px);
  }
  #view-explore .home-shell { padding-top: 62px; }
}

/* Keep native scrolling while hiding scrollbars in every app surface. */
html, body, * {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  scroll-behavior: smooth;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

/* File inputs opened programmatically must stay rendered (not display:none),
   otherwise iOS / Telegram in-app webviews block the file picker. */
.sr-file {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; border: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; opacity: 0;
  pointer-events: none;
}

/* Shared compact type scale. Keep icon-only controls at their established size. */
:where(h1, h2, h3, h4) {
  letter-spacing: 0;
  font-weight: 600;
}

:where(.home-page h2, .create-panel h2, .prompt-section h2, .tasks-section-head h2,
  .achievements-head h1, .referral-subhead h1, .category-page h1, .messages-head h1,
  .workspace-head h1, .spend-head h1, .generation-page h1, .edit-head h1,
  .settings-page h1, .settings-subpage h1, .subpage-head h1, .legal-page header h1,
  .profile-identity h1, .subscription-copy h1, .subscription-plan-head h2,
  .detail-related h2, .my-empty h2) {
  font-size: clamp(19px, 2.1vw, 23px);
  line-height: 1.15;
  font-weight: 600;
}

:where(.task-card h3, .legal-page h2, .legal-page h3, .ai-empty h1,
  .choice-list h3, .ai-history-sheet h2, .ai-history-sheet h3) {
  font-weight: 600;
}

:where(.settings-list button, .referral-menu button, .simple-choice-list button,
  .region-list button, .support-list button, .social-list button,
  .result-actions button, .create-options button, .ratio-options button,
  .resolution-options button, .favorite-category-list button, .favorite-card-meta button,
  .wallet-form button, .referral-wallet-card button, .profile-actions button,
  .subscription-start, .create-photo-btn, .go-btn, .credits-cta) {
  font-size: 14px;
  font-weight: 600;
}

:where(.task-tabs button, .rating-tabs button, .own-profile-tabs button,
  .filter-pill, .next-levels, .task-top button, .subscription-plan-head button) {
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 700px) {
  :where(.home-page h2, .create-panel h2, .prompt-section h2, .tasks-section-head h2,
    .achievements-head h1, .referral-subhead h1, .category-page h1, .messages-head h1,
    .workspace-head h1, .spend-head h1, .generation-page h1, .edit-head h1,
    .settings-page h1, .settings-subpage h1, .subpage-head h1, .legal-page header h1,
    .profile-identity h1, .subscription-copy h1, .subscription-plan-head h2,
    .detail-related h2, .my-empty h2) {
    font-size: 20px;
  }
}

/* Guided tour for the generation workspace */
.create-tour-overlay[hidden] { display: none; }
.create-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
}
.create-tour-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .72);
  pointer-events: auto;
}
.create-tour-target {
  position: relative !important;
  z-index: 10001 !important;
  box-shadow: 0 0 0 3px #ffd447, 0 0 0 100vmax rgba(0, 0, 0, .68) !important;
}
.create-tour-popover {
  position: fixed;
  z-index: 10002;
  box-sizing: border-box;
  min-height: 168px;
  padding: 20px 24px 16px;
  border-radius: 22px;
  background: #fff0c9;
  color: #111;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .35);
  pointer-events: auto;
}
.create-tour-popover::before {
  content: "";
  position: absolute;
  top: -13px;
  left: var(--tour-arrow-left, 50%);
  width: 26px;
  height: 26px;
  background: #fff0c9;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 5px 0 0 0;
}
.create-tour-popover.above::before {
  top: auto;
  bottom: -13px;
  border-radius: 0 0 5px 0;
}
.create-tour-popover > * { position: relative; z-index: 1; }
.create-tour-popover small {
  display: block;
  margin-bottom: 6px;
  color: #6f6757;
  font-size: 14px;
  line-height: 1.2;
}
.create-tour-popover h2 {
  margin: 0 0 5px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 500;
}
.create-tour-popover p {
  max-width: 680px;
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}
.create-tour-close {
  position: absolute;
  top: 12px;
  right: 14px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .08);
  color: #111;
  cursor: pointer;
}
.create-tour-close svg { width: 17px; height: 17px; }
.create-tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.create-tour-actions > div { display: flex; gap: 9px; }
.create-tour-actions button {
  min-height: 36px;
  padding: 8px 15px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.create-tour-skip, .create-tour-back { background: rgba(0, 0, 0, .08); color: #17130d; }
.create-tour-next { background: #050505; color: #fff; }
.create-tour-next:focus-visible, .create-tour-back:focus-visible,
.create-tour-skip:focus-visible, .create-tour-close:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
@media (max-width: 700px) {
  .create-tour-popover {
    min-height: 0;
    padding: 17px 17px 14px;
    border-radius: 20px;
  }
  .create-tour-popover h2 { font-size: 18px; }
  .create-tour-popover p { font-size: 14px; line-height: 1.4; padding-right: 22px; }
  .create-tour-actions { margin-top: 14px; }
  .create-tour-actions button { min-height: 34px; padding: 7px 13px; font-size: 13px; }
}
