:root {
  color-scheme: dark;
  --bg: #0b0e10;
  --bg-soft: #0f1417;
  --panel: #12181c;
  --panel-2: #161e22;
  --line: rgba(222, 239, 242, 0.1);
  --line-strong: rgba(222, 239, 242, 0.18);
  --text: #e8eef0;
  --text-soft: #b0bcc0;
  --muted: #728086;
  --aqua: #38d6c2;
  --cyan: #46bfe8;
  --aqua-soft: rgba(56, 214, 194, 0.13);
  --amber: #ffb84d;
  --danger: #ff7474;
  --ok: #6ee7a8;
  --radius: 22px;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
body {
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  overflow-x: hidden;
}
button,
textarea,
select {
  font: inherit;
}
button {
  color: inherit;
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.14;
  pointer-events: none;
}
.bg-glow-a {
  width: 260px;
  height: 260px;
  background: #1f9d92;
  top: -130px;
  right: -100px;
}
.bg-glow-b {
  width: 230px;
  height: 230px;
  background: #237aa0;
  bottom: 5%;
  left: -150px;
}
.app-shell {
  width: min(100%, 620px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 10px 16px 106px;
  position: relative;
}
.auth-screen {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.auth-card {
  width: min(100%, 440px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.auth-card h1 {
  margin: 20px 0 12px;
}
.auth-card p {
  color: var(--text-soft);
  line-height: 1.5;
}
.auth-card #authStatus {
  min-height: 48px;
}
.auth-card button {
  width: 100%;
  margin-bottom: 12px;
}
.auth-card a {
  color: var(--aqua);
  font-size: 13px;
}
.auth-card :focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 4px;
}
body.auth-pending > [role="dialog"],
body.auth-pending > .result-modal,
body.auth-pending > dialog {
  display: none !important;
}
.checkout-recovery-notice {
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}
.topbar {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(var(--bg) 72%, transparent);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(145deg, #133d3b, #102c33);
  border: 1px solid rgba(56, 214, 194, 0.28);
  display: grid;
  place-items: center;
  color: var(--aqua);
  font-weight: 900;
  box-shadow: inset 0 0 20px rgba(56, 214, 194, 0.07);
}
.brand-copy b,
.brand-copy small {
  display: block;
}
.brand-copy b {
  font-size: 12px;
  letter-spacing: 0.13em;
}
.brand-copy small {
  font-size: 8px;
  letter-spacing: 0.17em;
  color: #66757b;
  margin-top: 2px;
}
.credit-pill {
  border: 1px solid rgba(255, 184, 77, 0.18);
  background: #14181a;
  border-radius: 999px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.credit-icon {
  color: var(--amber);
}
.credit-pill b {
  font-size: 13px;
}
.credit-pill i {
  font-style: normal;
  color: var(--amber);
  font-size: 17px;
}
.view {
  padding-top: 18px;
}
.hidden,
[hidden] {
  display: none !important;
}
.eyebrow {
  color: var(--aqua);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.18em;
}
.hello-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 1px 22px;
}
.hello-row h1 {
  font-size: 34px;
  letter-spacing: -0.045em;
  margin: 7px 0 7px;
  line-height: 1;
}
.hello-row p {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
}
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #151d20;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-weight: 850;
  color: var(--aqua);
  overflow: hidden;
  flex: 0 0 auto;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-large {
  width: 84px;
  height: 84px;
  border-radius: 28px;
  font-size: 25px;
}
.create-stack {
  display: grid;
  gap: 11px;
}
.create-card {
  width: 100%;
  min-height: 112px;
  border-radius: 25px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #12191c, #0f1417);
  padding: 18px;
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 15px;
  text-align: left;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  transition:
    0.16s transform,
    0.16s border-color;
}
.create-card:active {
  transform: scale(0.985);
}
.video-card {
  border-color: rgba(56, 214, 194, 0.21);
  background:
    radial-gradient(
      circle at 100% 0,
      rgba(56, 214, 194, 0.12),
      transparent 40%
    ),
    linear-gradient(145deg, #12191c, #0f1417);
}
.photo-card {
  border-color: rgba(70, 191, 232, 0.2);
  background:
    radial-gradient(
      circle at 100% 0,
      rgba(70, 191, 232, 0.11),
      transparent 40%
    ),
    linear-gradient(145deg, #12191c, #0f1417);
}
.create-icon {
  width: 54px;
  height: 54px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  font-size: 19px;
  background: #0d2424;
  color: var(--aqua);
  border: 1px solid rgba(56, 214, 194, 0.16);
}
.photo-card .create-icon {
  background: #0d2028;
  color: var(--cyan);
  border-color: rgba(70, 191, 232, 0.16);
}
.create-text b,
.create-text small {
  display: block;
}
.create-text b {
  font-size: 19px;
  letter-spacing: -0.02em;
}
.create-text small {
  font-size: 11px;
  color: var(--text-soft);
  line-height: 1.35;
  margin-top: 6px;
}
.arrow {
  font-size: 23px;
  color: #728188;
}
.partner-banner {
  width: 100%;
  border: 1px solid rgba(255, 184, 77, 0.16);
  background: linear-gradient(145deg, #171817, #111515);
  border-radius: 20px;
  padding: 15px 16px;
  margin-top: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}
.partner-copy span,
.partner-copy b,
.partner-copy small {
  display: block;
}
.partner-copy span {
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.15em;
  color: var(--amber);
}
.partner-copy b {
  font-size: 13px;
  margin-top: 5px;
}
.partner-copy small {
  font-size: 9px;
  color: #8a8d87;
  margin-top: 4px;
}
.partner-cta {
  white-space: nowrap;
  font-size: 9px;
  color: #d9c18f;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 27px 2px 12px;
}
.section-head small {
  display: block;
  font-size: 8px;
  letter-spacing: 0.15em;
  color: #718087;
}
.section-head h2 {
  margin: 5px 0 0;
  font-size: 20px;
}
.section-head button {
  border: 0;
  background: transparent;
  color: #93a3a8;
  font-size: 10px;
}
.recent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.recent-item {
  position: relative;
  border: 1px solid var(--line);
  background: #101518;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 0.84;
  padding: 0;
}
.recent-item img,
.recent-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.recent-empty {
  height: 100%;
  display: grid;
  place-items: center;
  color: #5f6d72;
  font-size: 9px;
  padding: 6px;
  text-align: center;
}
.recent-label {
  position: absolute;
  left: 7px;
  bottom: 7px;
  background: rgba(8, 12, 14, 0.72);
  backdrop-filter: blur(8px);
  padding: 5px 7px;
  border-radius: 8px;
  font-size: 8px;
  color: #c7d1d4;
}
.empty-block {
  grid-column: 1/-1;
  border: 1px dashed var(--line);
  border-radius: 17px;
  padding: 25px 14px;
  color: #65747a;
  text-align: center;
  font-size: 11px;
}
.view-head {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  margin: 8px 0 18px;
}
.view-head > div:nth-child(1):not(.spacer) {
  grid-column: auto;
}
.view-head h2 {
  font-size: 28px;
  letter-spacing: -0.04em;
  margin: 5px 0 0;
}
.view-head .eyebrow {
  text-align: left;
}
.back-btn,
.refresh-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #11171a;
  color: #a8b5b9;
  font-size: 18px;
}
.refresh-btn {
  grid-column: 3;
}
.spacer {
  width: 38px;
}
.simple-card {
  background: linear-gradient(180deg, #12191c, #0f1417);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 17px;
  margin: 11px 0;
}
.prompt-card label {
  display: block;
  font-size: 13px;
  font-weight: 750;
  margin-bottom: 11px;
}
textarea {
  width: 100%;
  min-height: 145px;
  border: 0;
  outline: 0;
  resize: vertical;
  background: #0b1012;
  color: var(--text);
  border-radius: 16px;
  padding: 14px;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: inset 0 0 0 1px var(--line);
}
textarea::placeholder {
  color: #536268;
}
.prompt-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
  color: #5f6f75;
  font-size: 9px;
}
.prompt-meta button {
  border: 1px solid rgba(56, 214, 194, 0.15);
  background: var(--aqua-soft);
  color: #9fe9df;
  border-radius: 10px;
  padding: 7px 9px;
  font-size: 9px;
}
.setting-title b,
.setting-title small {
  display: block;
}
.setting-title b {
  font-size: 13px;
}
.setting-title small {
  font-size: 9px;
  color: #748389;
  margin-top: 3px;
}
.option-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.option {
  border: 1px solid var(--line);
  background: #0c1113;
  border-radius: 15px;
  padding: 11px 7px;
  color: #8c9ca1;
}
.option span,
.option b,
.option small {
  display: block;
}
.option span {
  font-size: 21px;
  height: 25px;
}
.option b {
  font-size: 11px;
  margin-top: 3px;
}
.option small {
  font-size: 8px;
  color: #5c696e;
  margin-top: 3px;
}
.option.active {
  border-color: rgba(56, 214, 194, 0.45);
  background: rgba(56, 214, 194, 0.08);
  color: #c9f5ef;
}
.option.active small {
  color: #79bdb5;
}
.model-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.model-option {
  width: 100%;
  border: 1px solid var(--line);
  background: #0c1113;
  border-radius: 16px;
  padding: 13px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 11px;
  align-items: center;
  text-align: left;
}
.model-option.active {
  border-color: rgba(56, 214, 194, 0.43);
  background: rgba(56, 214, 194, 0.075);
}
.model-badge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #132326;
  display: grid;
  place-items: center;
  color: var(--aqua);
  font-size: 14px;
}
.model-copy b,
.model-copy small {
  display: block;
}
.model-copy b {
  font-size: 12px;
}
.model-copy small {
  font-size: 9px;
  color: #6f7d82;
  margin-top: 4px;
}
.model-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #435159;
  display: grid;
  place-items: center;
  font-size: 10px;
  color: transparent;
}
.model-option.active .model-check {
  background: var(--aqua);
  border-color: var(--aqua);
  color: #092421;
}
.generate-btn {
  width: 100%;
  min-height: 55px;
  border: 0;
  border-radius: 17px;
  background: linear-gradient(135deg, #37cdbb, #2ea9bd);
  color: #061718;
  font-weight: 900;
  padding: 0 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 14px 32px rgba(48, 187, 180, 0.18);
  margin-top: 13px;
}
.generate-btn i {
  font-style: normal;
  font-size: 18px;
}
.generate-note {
  text-align: center;
  color: #5e6d72;
  font-size: 9px;
  margin: 9px 0 0;
}
.filters {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 12px;
}
.filters button {
  white-space: nowrap;
  border: 1px solid var(--line);
  background: #0f1518;
  color: #78888e;
  border-radius: 999px;
  padding: 9px 13px;
  font-size: 9px;
}
.filters button.active {
  background: var(--aqua-soft);
  border-color: rgba(56, 214, 194, 0.28);
  color: #a9eee5;
}
.files-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.file-card {
  border: 1px solid var(--line);
  background: #101518;
  border-radius: 18px;
  overflow: hidden;
  padding: 0;
  text-align: left;
}
.file-preview {
  aspect-ratio: 1;
  background: #0b0f11;
  display: grid;
  place-items: center;
  color: #65747a;
  font-size: 9px;
}
.file-preview img,
.file-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.file-info {
  padding: 11px;
}
.file-info b,
.file-info small {
  display: block;
}
.file-info b {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-info small {
  font-size: 8px;
  color: #637278;
  margin-top: 5px;
}
.status {
  display: inline-block;
  margin-top: 7px;
  font-size: 8px;
  border-radius: 999px;
  padding: 4px 7px;
  background: #172024;
  color: #91a0a4;
}
.status.ready {
  background: rgba(110, 231, 168, 0.09);
  color: var(--ok);
}
.status.failed {
  background: rgba(255, 116, 116, 0.09);
  color: var(--danger);
}
.partner-hero {
  border: 1px solid rgba(255, 184, 77, 0.17);
  background:
    radial-gradient(circle at 100% 0, rgba(255, 184, 77, 0.1), transparent 38%),
    linear-gradient(145deg, #171816, #111514);
  border-radius: 26px;
  padding: 21px;
}
.partner-hero > span {
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--amber);
  font-weight: 850;
}
.partner-hero strong {
  display: block;
  font-size: 51px;
  letter-spacing: -0.055em;
  color: #f2c578;
  margin: 7px 0;
}
.partner-hero h3 {
  font-size: 20px;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}
.partner-hero p {
  font-size: 10px;
  line-height: 1.55;
  color: #8b938f;
  margin: 0;
}
.partner-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0;
}
.partner-stats div {
  border: 1px solid var(--line);
  background: #111719;
  border-radius: 16px;
  padding: 13px 10px;
}
.partner-stats small,
.partner-stats b {
  display: block;
}
.partner-stats small {
  font-size: 8px;
  color: #66757a;
}
.partner-stats b {
  font-size: 12px;
  margin-top: 5px;
}
.ref-link {
  display: flex;
  gap: 7px;
  background: #0b1012;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  margin-top: 12px;
}
.ref-link code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #9daeb3;
  font-size: 9px;
  padding: 8px;
}
.ref-link button {
  border: 0;
  background: #172125;
  color: #a8c2c0;
  border-radius: 9px;
  padding: 0 10px;
  font-size: 9px;
}
.share-btn,
.payout-btn {
  width: 100%;
  min-height: 47px;
  border-radius: 14px;
  margin-top: 8px;
  font-weight: 800;
}
.share-btn {
  border: 0;
  background: #173638;
  color: #a9e8e2;
}
.payout-btn {
  border: 1px solid rgba(255, 184, 77, 0.16);
  background: #181713;
  color: #d7b674;
}
.payout-btn:disabled {
  opacity: 0.35;
}
.profile-main {
  text-align: center;
  padding: 15px 0 17px;
}
.profile-main .avatar {
  margin: 0 auto;
}
.profile-main h2 {
  font-size: 24px;
  margin: 12px 0 3px;
}
.profile-main p {
  margin: 0;
  color: #69787e;
  font-size: 10px;
}
.balance-box {
  border: 1px solid rgba(255, 184, 77, 0.14);
  background: #141716;
  border-radius: 23px;
  padding: 20px;
}
.balance-box > small {
  color: #7d827c;
  font-size: 9px;
}
.balance-box > strong {
  display: block;
  color: #f0c177;
  font-size: 38px;
  margin: 4px 0 10px;
}
.balance-sub {
  display: flex;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: #778386;
  font-size: 9px;
}
.balance-sub b {
  color: #b2bdc0;
}
.profile-menu {
  border: 1px solid var(--line);
  background: #111719;
  border-radius: 20px;
  overflow: hidden;
  margin-top: 11px;
}
.profile-menu > button,
.menu-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}
.profile-menu > button:last-child,
.menu-row:last-child {
  border-bottom: 0;
}
.profile-menu > button > span,
.menu-row > span {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #172125;
  display: grid;
  place-items: center;
  color: #89bdb8;
}
.profile-menu > button > div,
.menu-row > div {
  flex: 1;
}
.profile-menu b,
.profile-menu small {
  display: block;
}
.profile-menu b {
  font-size: 11px;
}
.profile-menu small {
  font-size: 8px;
  color: #69777c;
  margin-top: 4px;
}
.profile-menu i {
  font-style: normal;
  color: #58666b;
  font-size: 19px;
}
.menu-row select {
  width: auto;
  min-width: 92px;
  border: 1px solid var(--line);
  background: #0d1214;
  color: #b6c1c4;
  border-radius: 10px;
  padding: 8px;
  font-size: 9px;
}
.bottom-nav {
  position: fixed;
  z-index: 40;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(9px, env(safe-area-inset-bottom));
  width: min(calc(100% - 24px), 590px);
  height: 67px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 5px;
  border: 1px solid rgba(222, 239, 242, 0.09);
  background: rgba(14, 19, 21, 0.91);
  backdrop-filter: blur(18px);
  border-radius: 21px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
}
.bottom-nav button {
  border: 0;
  background: transparent;
  border-radius: 15px;
  color: #5f6d72;
  display: grid;
  place-items: center;
  gap: 2px;
}
.bottom-nav span {
  font-size: 16px;
}
.bottom-nav b {
  font-size: 8px;
}
.bottom-nav button.active {
  color: var(--aqua);
  background: rgba(56, 214, 194, 0.055);
}
/* The referral/partner program remains visible in NPD mode.
   Receipt mode must not hide referral links, balances or partner navigation. */
.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 18px 0;
  font-size: 11px;
}
.legal-links a {
  color: #8ed8cb;
}
.result-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal-bg {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.72);
}
.result-sheet {
  position: relative;
  width: min(100%, 620px);
  background: #101619;
  border: 1px solid var(--line);
  border-radius: 27px 27px 0 0;
  padding: 17px 16px max(18px, env(safe-area-inset-bottom));
  max-height: 91vh;
  overflow: auto;
}
.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.result-head small,
.result-head b {
  display: block;
}
.result-head small {
  font-size: 8px;
  letter-spacing: 0.14em;
  color: var(--aqua);
}
.result-head b {
  font-size: 13px;
  margin-top: 3px;
}
.result-head button {
  width: 37px;
  height: 37px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #151d20;
  color: #9caaae;
  font-size: 19px;
}
.result-media {
  background: #080c0e;
  border-radius: 17px;
  overflow: hidden;
  min-height: 220px;
  display: grid;
  place-items: center;
}
.result-media img,
.result-media video {
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
}
.result-meta {
  font-size: 9px;
  color: #6c7a80;
  margin: 10px 2px 0;
}
.toast {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: 92px;
  transform: translate(-50%, 16px);
  background: #dfeaec;
  color: #0c1416;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: 0.22s;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (max-width: 380px) {
  .app-shell {
    padding-left: 11px;
    padding-right: 11px;
  }
  .hello-row h1 {
    font-size: 30px;
  }
  .create-card {
    grid-template-columns: 48px 1fr auto;
    padding: 15px;
  }
  .create-icon {
    width: 48px;
    height: 48px;
  }
  .create-text b {
    font-size: 17px;
  }
  .partner-banner {
    padding: 13px;
  }
  .partner-cta {
    display: none;
  }
}

/* Spark Pro V3 — tariffs + partner economics */
.tariffs-banner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 15px 16px;
  border: 1px solid rgba(38, 199, 190, 0.22);
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    rgba(12, 35, 36, 0.82),
    rgba(12, 18, 21, 0.96)
  );
  text-align: left;
}
.tariffs-copy span,
.tariffs-copy b,
.tariffs-copy small {
  display: block;
}
.tariffs-copy span {
  font-size: 8px;
  letter-spacing: 0.14em;
  color: #36d7cc;
  font-weight: 900;
}
.tariffs-copy b {
  margin-top: 5px;
  font-size: 13px;
}
.tariffs-copy small {
  margin-top: 3px;
  color: #747f82;
  font-size: 9px;
}
.tariffs-cta {
  color: #7fe9e2;
  font-size: 10px;
  white-space: nowrap;
}
.tariff-balance {
  border: 1px solid rgba(255, 185, 73, 0.22);
  background: rgba(255, 176, 50, 0.06);
  border-radius: 999px;
  padding: 8px 11px;
  color: #ffbf57;
  font-size: 11px;
}
.tariff-intro {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid rgba(38, 199, 190, 0.18);
  border-radius: 20px;
  background: linear-gradient(
    145deg,
    rgba(12, 39, 39, 0.65),
    rgba(11, 15, 17, 0.96)
  );
}
.tariff-intro b {
  font-size: 15px;
}
.tariff-intro p {
  margin: 7px 0 0;
  color: #829093;
  font-size: 10px;
  line-height: 1.55;
}
.tariff-list {
  display: grid;
  gap: 9px;
}
.tariff-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 19px;
  background: #0d1215;
  overflow: hidden;
}
.tariff-card.popular {
  border-color: rgba(38, 199, 190, 0.38);
  background: linear-gradient(135deg, rgba(12, 42, 42, 0.83), #0d1215);
}
.tariff-card.popular:after {
  content: "ПОПУЛЯРНЫЙ";
  position: absolute;
  right: 10px;
  top: 9px;
  color: #47dcd2;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.12em;
}
.tariff-main span,
.tariff-main b,
.tariff-main small {
  display: block;
}
.tariff-main span {
  color: #778286;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.tariff-main b {
  font-size: 23px;
  margin-top: 3px;
}
.tariff-main small {
  color: #7f8b8e;
  font-size: 9px;
  margin-top: 4px;
}
.tariff-price {
  text-align: right;
}
.tariff-price strong {
  display: block;
  font-size: 18px;
}
.tariff-price button {
  margin-top: 8px;
  border: 0;
  border-radius: 10px;
  padding: 9px 11px;
  background: #24c9bf;
  color: #051111;
  font-weight: 900;
  font-size: 9px;
}
.tariff-price button:disabled {
  background: #182124;
  color: #667174;
}
.generation-prices {
  margin-top: 14px;
}
.generation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 10px;
}
.generation-row:last-child {
  border-bottom: 0;
}
.generation-row span {
  color: #97a1a4;
}
.generation-row b {
  color: #d9eff0;
}
.sbp-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 15px;
  border: 1px solid rgba(38, 199, 190, 0.18);
  border-radius: 18px;
  background: #0d1315;
}
.sbp-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #102728;
  color: #37d8ce;
  font-size: 10px;
  font-weight: 900;
}
.sbp-card b,
.sbp-card small {
  display: block;
}
.sbp-card b {
  font-size: 12px;
}
.sbp-card small {
  color: #778285;
  font-size: 9px;
  line-height: 1.4;
  margin-top: 4px;
}
.partner-levels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}
.partner-level {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 17px;
  background: #0d1215;
}
.partner-level.active {
  border-color: rgba(255, 184, 70, 0.3);
  background: linear-gradient(135deg, rgba(47, 34, 13, 0.72), #0d1215);
}
.partner-level span,
.partner-level b,
.partner-level small {
  display: block;
}
.partner-level span {
  font-size: 7px;
  letter-spacing: 0.13em;
  color: #aa9c83;
}
.partner-level b {
  font-size: 25px;
  margin: 4px 0;
  color: #ffc261;
}
.partner-level small {
  font-size: 8px;
  color: #7e8687;
  line-height: 1.35;
}
.partner-benefits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}
.partner-benefits div {
  padding: 12px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: #0d1215;
}
.partner-benefits b,
.partner-benefits small {
  display: block;
}
.partner-benefits b {
  font-size: 14px;
  color: #e4ecec;
}
.partner-benefits small {
  font-size: 8px;
  color: #788285;
  margin-top: 3px;
  line-height: 1.35;
}
.partner-terms-note {
  margin: 11px 2px 0;
  color: #657073;
  font-size: 8px;
  line-height: 1.5;
}

.smart-note {
  margin: 10px 0 0;
  color: #98a7a6;
  font-size: 12px;
  line-height: 1.45;
}
.reference-card {
  gap: 14px;
}
.reference-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.ref-slot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px dashed rgba(34, 180, 170, 0.4);
  border-radius: 20px;
  background: rgba(8, 20, 22, 0.45);
  cursor: pointer;
}
.ref-preview {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 34, 36, 0.95);
  border: 1px solid rgba(34, 180, 170, 0.35);
  color: #d5f6ef;
  font-size: 28px;
  overflow: hidden;
  flex: 0 0 64px;
}
.ref-preview img,
.ref-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ref-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ref-copy b {
  font-size: 15px;
}
.ref-copy small {
  color: #8fa2a1;
  line-height: 1.35;
}
.reference-tip {
  font-size: 12px;
  color: #8aa09b;
  line-height: 1.45;
}
.video-only.hidden {
  display: none !important;
}
.generate-note {
  min-height: 20px;
}
@media (min-width: 480px) {
  .reference-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Spark Pro V5 — Apple-like creation studio */
body.studio-open .bottom-nav {
  display: none;
}
body.studio-open .app-shell {
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}
.studio-view {
  padding-top: 6px;
}
.studio-header {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 4px 0 14px;
}
.studio-back {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(16, 22, 25, 0.88);
  font-size: 30px;
  line-height: 1;
  color: #cbd5d7;
  display: grid;
  place-items: center;
  padding: 0 0 3px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}
.studio-model-card {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(
    180deg,
    rgba(23, 30, 33, 0.94),
    rgba(16, 22, 25, 0.94)
  );
  border-radius: 18px;
  padding: 9px 11px;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.2);
}
.studio-model-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #0a3a38, #10262c);
  border: 1px solid rgba(56, 214, 194, 0.25);
  color: #51e1cf;
  font-size: 16px;
}
.studio-model-copy {
  min-width: 0;
}
.studio-model-copy b,
.studio-model-copy small {
  display: block;
}
.studio-model-copy b {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.studio-model-copy small {
  font-size: 9px;
  color: #6f7d82;
  margin-top: 3px;
}
.studio-chevron {
  color: #66757a;
  font-size: 16px;
}
.studio-balance {
  height: 42px;
  min-width: 76px;
  border-radius: 15px;
  border: 1px solid rgba(255, 184, 77, 0.18);
  background: rgba(24, 24, 20, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
}
.studio-balance span,
.studio-balance i {
  color: var(--amber);
}
.studio-balance i {
  font-style: normal;
}
.studio-balance b {
  font-size: 12px;
}
.studio-mode-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  padding: 7px;
  background: rgba(18, 24, 27, 0.92);
  border: 1px solid var(--line);
  border-radius: 21px;
  margin-bottom: 11px;
  overflow: hidden;
}
.studio-mode-tabs button {
  position: relative;
  min-width: 0;
  min-height: 70px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: #66757a;
  padding: 9px 5px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  transition: 0.18s ease;
}
.studio-mode-tabs button span {
  font-size: 20px;
}
.studio-mode-tabs button b {
  font-size: 8px;
  line-height: 1.15;
  text-align: center;
}
.studio-mode-tabs button em {
  position: absolute;
  right: 5px;
  top: 5px;
  font-size: 6px;
  font-style: normal;
  color: #7b878b;
  background: #171d20;
  border-radius: 999px;
  padding: 3px 5px;
}
.studio-mode-tabs button.active {
  background: linear-gradient(
    180deg,
    rgba(56, 214, 194, 0.14),
    rgba(56, 214, 194, 0.06)
  );
  color: #c9f7f1;
  box-shadow: inset 0 0 0 1px rgba(56, 214, 194, 0.25);
}
.studio-card {
  background: linear-gradient(
    180deg,
    rgba(20, 27, 30, 0.98),
    rgba(13, 18, 20, 0.98)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 14px;
  margin: 11px 0;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.12);
}
.studio-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}
.studio-card-head b,
.studio-card-head small {
  display: block;
}
.studio-card-head b {
  font-size: 12px;
}
.studio-card-head small {
  font-size: 9px;
  color: #728086;
  margin-top: 3px;
}
.media-counter {
  font-size: 8px;
  color: #67767b;
  border: 1px solid var(--line);
  background: #0b1113;
  border-radius: 999px;
  padding: 5px 8px;
}
.studio-dropzone {
  width: 100%;
  min-height: 142px;
  border: 1px dashed rgba(56, 214, 194, 0.35);
  background:
    radial-gradient(
      circle at 50% 20%,
      rgba(56, 214, 194, 0.1),
      transparent 48%
    ),
    #0b1113;
  border-radius: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 20px;
  cursor: pointer;
  transition: 0.16s ease;
}
.studio-dropzone:active {
  transform: scale(0.992);
  background-color: #0d1517;
}
.dropzone-icons {
  display: flex;
  gap: 5px;
  margin-bottom: 9px;
}
.dropzone-icons i {
  width: 29px;
  height: 29px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #142226;
  color: #77d8ce;
  font-style: normal;
  border: 1px solid rgba(56, 214, 194, 0.14);
  font-size: 12px;
}
.studio-dropzone b {
  font-size: 13px;
}
.studio-dropzone small {
  font-size: 9px;
  color: #8a989c;
  margin-top: 5px;
}
.studio-dropzone em {
  font-style: normal;
  color: #5d6b70;
  font-size: 8px;
  margin-top: 7px;
}
.media-preview-list {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 10px 1px 1px;
}
.media-preview-item {
  position: relative;
  flex: 0 0 80px;
  height: 80px;
  border-radius: 15px;
  overflow: hidden;
  background: #0a0e10;
  border: 1px solid var(--line);
}
.media-preview-item img,
.media-preview-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-preview-item .audio-tile {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #91a4a8;
  font-size: 22px;
}
.media-preview-item button {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 21px;
  height: 21px;
  border: 0;
  border-radius: 50%;
  background: rgba(4, 7, 8, 0.78);
  color: #d9e0e1;
  font-size: 12px;
  padding: 0;
}
.media-preview-item small {
  position: absolute;
  left: 5px;
  bottom: 5px;
  max-width: 68px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(4, 7, 8, 0.72);
  padding: 3px 5px;
  border-radius: 6px;
  color: #b5c0c2;
  font-size: 6px;
}
.media-kind-chips {
  display: flex;
  gap: 7px;
  margin-top: 9px;
  flex-wrap: wrap;
}
.media-kind-chips span {
  border: 1px solid var(--line);
  background: #0c1113;
  color: #6f7d82;
  border-radius: 999px;
  padding: 6px 8px;
  font-size: 8px;
}
.prompt-studio-card {
  padding: 0;
  overflow: hidden;
}
.prompt-studio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 15px 4px;
}
.prompt-studio-head b {
  font-size: 11px;
}
.prompt-studio-head b i {
  font-style: normal;
  color: #ff7c7c;
}
.prompt-studio-head span {
  font-size: 8px;
  color: #67757a;
}
.prompt-studio-card textarea {
  min-height: 170px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 12px 15px 10px;
  font-size: 13px;
  line-height: 1.55;
  resize: none;
}
.prompt-studio-card textarea::placeholder {
  color: #657379;
}
.prompt-toolbar {
  min-height: 55px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
}
.prompt-toolbar button {
  border: 1px solid var(--line);
  background: #0c1113;
  border-radius: 12px;
  min-height: 38px;
  padding: 0 11px;
  color: #829196;
  font-size: 9px;
  font-weight: 700;
}
.prompt-toolbar-right {
  display: flex;
  gap: 7px;
}
.prompt-toolbar .icon-btn {
  width: 40px;
  padding: 0;
  font-size: 15px;
}
.prompt-toolbar .enhance-btn.active {
  background: rgba(56, 214, 194, 0.1);
  border-color: rgba(56, 214, 194, 0.25);
  color: #a7eee5;
}
.hidden-prompt-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 0 13px 12px;
  color: #65757a;
}
.hidden-prompt-note > span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(56, 214, 194, 0.1);
  color: #68d8ca;
  font-size: 9px;
  flex: 0 0 auto;
}
.hidden-prompt-note p {
  margin: 1px 0 0;
  font-size: 8px;
  line-height: 1.45;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 11px 0;
}
.setting-button {
  min-height: 67px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(180deg, #141a1d, #0f1416);
  border-radius: 18px;
  padding: 0 13px;
  display: grid;
  grid-template-columns: 25px 1fr auto;
  align-items: center;
  gap: 9px;
  text-align: left;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}
.setting-button > span {
  font-size: 16px;
  color: #a5b4b8;
}
.setting-button div small,
.setting-button div b {
  display: block;
}
.setting-button div small {
  font-size: 7px;
  color: #68777c;
  margin-bottom: 4px;
}
.setting-button div b {
  font-size: 11px;
}
.setting-button > i {
  font-style: normal;
  color: #58676c;
  font-size: 13px;
}
.setting-button.wide {
  grid-column: 1/-1;
}
.photo-settings {
  grid-template-columns: 1fr 1fr;
}
.studio-generate {
  width: 100%;
  min-height: 62px;
  border: 0;
  border-radius: 19px;
  background: linear-gradient(135deg, #48dfcc, #39b8ca);
  color: #061416;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 16px 34px rgba(50, 190, 184, 0.2);
  margin-top: 12px;
}
.studio-generate > span {
  text-align: left;
}
.studio-generate b,
.studio-generate small {
  display: block;
}
.studio-generate b {
  font-size: 14px;
}
.studio-generate small {
  font-size: 7px;
  color: rgba(5, 30, 31, 0.68);
  margin-top: 4px;
}
.studio-generate strong {
  white-space: nowrap;
  font-size: 14px;
}
.studio-generate:disabled {
  filter: saturate(0.4);
  opacity: 0.5;
}
.studio-footnote {
  text-align: center;
  color: #59686d;
  font-size: 8px;
  padding: 9px 4px 2px;
}
.picker-sheet {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  overflow: hidden;
}
.picker-sheet[open] {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.picker-sheet::backdrop {
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(3px);
}
.studio-dropzone:focus-visible,
.picker-sheet button:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 3px;
}
.picker-panel {
  position: relative;
  width: min(100%, 620px);
  background: rgba(17, 23, 26, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px 28px 0 0;
  padding: 8px max(14px, env(safe-area-inset-right))
    max(17px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.42);
  max-height: 78dvh;
  overflow: auto;
}
.picker-handle {
  width: 40px;
  height: 4px;
  border-radius: 99px;
  background: #455157;
  margin: 2px auto 10px;
}
.picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px 11px;
}
.picker-head small,
.picker-head b {
  display: block;
}
.picker-head small {
  font-size: 7px;
  color: #638079;
  letter-spacing: 0.13em;
}
.picker-head b {
  font-size: 18px;
  margin-top: 4px;
}
.picker-head button {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0d1214;
  color: #95a3a7;
  font-size: 18px;
}
.picker-options {
  display: grid;
  gap: 8px;
}
.picker-option {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line);
  background: #0e1416;
  border-radius: 17px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}
.picker-option .left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.picker-option .pick-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #142126;
  display: grid;
  place-items: center;
  color: #7bdcd1;
}
.picker-option b,
.picker-option small {
  display: block;
}
.picker-option b {
  font-size: 11px;
}
.picker-option small {
  font-size: 8px;
  color: #66757a;
  margin-top: 3px;
}
.picker-option .check {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 1px solid #445157;
  color: transparent;
  display: grid;
  place-items: center;
  font-size: 10px;
}
.picker-option.active {
  border-color: rgba(56, 214, 194, 0.33);
  background: rgba(56, 214, 194, 0.055);
}
.picker-option.active .check {
  background: var(--aqua);
  border-color: var(--aqua);
  color: #072421;
}
@media (max-width: 390px) {
  .studio-mode-tabs {
    gap: 4px;
    padding: 5px;
  }
  .studio-mode-tabs button {
    min-height: 64px;
  }
  .studio-mode-tabs button b {
    font-size: 7px;
  }
  .studio-header {
    grid-template-columns: 38px 1fr auto;
  }
  .studio-back {
    width: 38px;
    height: 38px;
  }
  .studio-balance {
    height: 38px;
    min-width: 68px;
  }
  .studio-model-card {
    padding: 7px 9px;
  }
  .studio-model-icon {
    width: 32px;
    height: 32px;
  }
  .studio-dropzone {
    min-height: 132px;
  }
  .setting-button {
    min-height: 63px;
    padding: 0 10px;
  }
  .prompt-studio-card textarea {
    min-height: 155px;
  }
}
.payout-profile {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 10px;
}
.payout-input {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0a1113;
  color: #ecf4f2;
  padding: 0 13px;
  outline: none;
}
.payout-input:focus {
  border-color: rgba(34, 180, 170, 0.55);
}
.payout-status {
  color: #7f9591;
  line-height: 1.4;
  font-size: 9px;
}
.payout-status.ready {
  color: #62dcbf;
}

/* Spark Trend / "Стать популярным" */
.popular-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-color: rgba(231, 255, 94, 0.5);
  background: linear-gradient(
    118deg,
    #e7ff5e 0%,
    #a8f86e 24%,
    #43e0c8 65%,
    #43bedc 100%
  );
  color: #071313;
  box-shadow:
    0 18px 44px rgba(74, 218, 190, 0.18),
    0 0 0 1px rgba(231, 255, 94, 0.1) inset;
}
.popular-card:before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  right: -42px;
  top: -92px;
  background: rgba(255, 255, 255, 0.36);
  filter: blur(3px);
}
.popular-card:after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -120% -40%;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.34) 48%,
    transparent 56%
  );
  transform: translateX(-38%);
  animation: trendShine 5.5s ease-in-out infinite;
}
.popular-card .create-text b {
  color: #071313;
  font-weight: 900;
}
.popular-card .create-text small {
  color: rgba(7, 25, 24, 0.68);
  font-weight: 650;
}
.popular-card .arrow {
  color: rgba(7, 25, 24, 0.62);
  font-weight: 900;
}
.popular-icon {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(5, 20, 19, 0.9);
  color: #eaff73;
  box-shadow:
    0 10px 26px rgba(6, 24, 22, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.09);
}
.popular-icon > span {
  font-size: 23px;
  line-height: 1;
}
.popular-icon > i {
  position: absolute;
  right: -7px;
  top: -8px;
  font-style: normal;
  font-size: 5px;
  font-weight: 950;
  letter-spacing: 0.1em;
  background: #ff5d57;
  color: white;
  padding: 4px 5px;
  border-radius: 999px;
  border: 2px solid #b8f778;
  box-shadow: 0 3px 10px rgba(255, 93, 87, 0.28);
}
@keyframes trendShine {
  0%,
  63% {
    transform: translateX(-42%);
  }
  82%,
  100% {
    transform: translateX(44%);
  }
}

.trend-view {
  padding-top: 8px;
}
.trend-header {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 9px;
  align-items: center;
  margin-bottom: 12px;
}
.trend-mini-brand {
  height: 44px;
  min-width: 0;
  border: 1px solid rgba(231, 255, 94, 0.14);
  background: linear-gradient(
    145deg,
    rgba(25, 34, 31, 0.96),
    rgba(12, 18, 19, 0.98)
  );
  border-radius: 16px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.trend-mini-brand > span {
  width: 29px;
  height: 29px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #dfff62, #48dfc6);
  color: #0b1a17;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 0 22px rgba(156, 240, 111, 0.15);
}
.trend-mini-brand b,
.trend-mini-brand small {
  display: block;
}
.trend-mini-brand b {
  font-size: 10px;
  letter-spacing: 0.12em;
}
.trend-mini-brand small {
  font-size: 6px;
  color: #77877f;
  letter-spacing: 0.17em;
  margin-top: 2px;
}
.trend-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(231, 255, 94, 0.18);
  border-radius: 28px;
  padding: 24px 20px 20px;
  background:
    radial-gradient(
      circle at 100% 0,
      rgba(70, 223, 199, 0.19),
      transparent 38%
    ),
    radial-gradient(
      circle at 0 100%,
      rgba(231, 255, 94, 0.08),
      transparent 40%
    ),
    linear-gradient(145deg, #131a1a, #0d1214);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.2);
  margin-bottom: 12px;
}
.trend-hero:after {
  content: "✦";
  position: absolute;
  right: 17px;
  top: 11px;
  font-size: 65px;
  color: rgba(231, 255, 94, 0.055);
  transform: rotate(8deg);
}
.trend-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(231, 255, 94, 0.2);
  background: rgba(231, 255, 94, 0.06);
  border-radius: 999px;
  padding: 6px 8px;
  color: #dff66f;
  font-size: 7px;
  font-weight: 950;
  letter-spacing: 0.15em;
}
.trend-live span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #dfff63;
  box-shadow: 0 0 0 4px rgba(223, 255, 99, 0.08);
  animation: trendPulse 1.8s ease-in-out infinite;
}
.trend-hero h2 {
  font-size: 31px;
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin: 14px 0 9px;
  max-width: 360px;
}
.trend-hero h2 em {
  font-style: normal;
  background: linear-gradient(90deg, #e7ff5e, #4be0c7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.trend-hero p {
  margin: 0;
  max-width: 460px;
  color: #9eaca8;
  font-size: 11px;
  line-height: 1.5;
}
.trend-pipeline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.trend-pipeline span,
.trend-pipeline b {
  border-radius: 999px;
  padding: 6px 8px;
  font-size: 6px;
  letter-spacing: 0.11em;
}
.trend-pipeline span {
  background: #111a1a;
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #788985;
}
.trend-pipeline b {
  background: rgba(231, 255, 94, 0.09);
  border: 1px solid rgba(231, 255, 94, 0.17);
  color: #dff36c;
}
.trend-pipeline i {
  font-style: normal;
  color: #53615e;
  font-size: 10px;
}
@keyframes trendPulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}
.trend-panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(
    180deg,
    rgba(19, 26, 28, 0.98),
    rgba(13, 18, 20, 0.98)
  );
  border-radius: 24px;
  padding: 15px;
  margin: 11px 0;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.1);
}
.trend-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}
.trend-section-head small,
.trend-section-head b {
  display: block;
}
.trend-section-head small {
  font-size: 7px;
  color: #789084;
  letter-spacing: 0.15em;
}
.trend-section-head b {
  font-size: 14px;
  margin-top: 4px;
}
.trend-section-head > span {
  font-size: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 7px;
  color: #7c8c88;
  background: #0b1112;
}
.trend-section-head > span.ready {
  color: #93eec6;
  border-color: rgba(90, 225, 167, 0.22);
  background: rgba(90, 225, 167, 0.07);
}
.trend-section-head > span.failed {
  color: #ff8c8c;
  border-color: rgba(255, 116, 116, 0.22);
  background: rgba(255, 116, 116, 0.06);
}
.trend-upload {
  position: relative;
  min-height: 172px;
  border: 1px dashed rgba(107, 224, 199, 0.3);
  border-radius: 20px;
  background:
    radial-gradient(
      circle at 50% 15%,
      rgba(70, 223, 199, 0.11),
      transparent 44%
    ),
    #0a1011;
  overflow: hidden;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.trend-upload-placeholder {
  text-align: center;
  padding: 22px;
}
.trend-face-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 11px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: rgba(70, 223, 199, 0.08);
  border: 1px solid rgba(70, 223, 199, 0.18);
  color: #58deca;
  font-size: 20px;
}
.trend-upload-placeholder b,
.trend-upload-placeholder small {
  display: block;
}
.trend-upload-placeholder b {
  font-size: 13px;
}
.trend-upload-placeholder small {
  font-size: 8px;
  color: #73817e;
  margin-top: 5px;
}
.trend-identity-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.trend-photo-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.15;
  border: 1px solid rgba(107, 224, 199, 0.18);
  border-radius: 14px;
  background: #090d0e;
}
.trend-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.trend-photo-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 29px;
  height: 29px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(4, 9, 10, 0.82);
  color: white;
  font-size: 18px;
}
.trend-upload-state {
  position: absolute;
  left: 10px;
  bottom: 10px;
  border-radius: 999px;
  background: rgba(7, 12, 12, 0.76);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 8px;
  color: #b6c5c1;
  font-size: 7px;
}
.trend-upload-state.ready {
  color: #9aebc5;
  border-color: rgba(90, 225, 167, 0.2);
}
.trend-upload-state.failed {
  color: #ff9696;
  border-color: rgba(255, 116, 116, 0.2);
}
.trend-replace {
  width: 100%;
  margin-top: 8px;
  min-height: 39px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: #0c1213;
  color: #81908c;
  font-size: 9px;
  font-weight: 800;
}
.trend-kind-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.trend-kind-switch button {
  min-height: 82px;
  border: 1px solid var(--line);
  background: #0b1112;
  border-radius: 17px;
  padding: 9px 6px;
  color: #73817f;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
}
.trend-kind-switch button > span {
  font-size: 17px;
}
.trend-kind-switch button b {
  font-size: 10px;
}
.trend-kind-switch button small {
  font-size: 6px;
  color: #5f6d69;
}
.trend-kind-switch button.active {
  background: linear-gradient(
    180deg,
    rgba(231, 255, 94, 0.09),
    rgba(70, 223, 199, 0.06)
  );
  border-color: rgba(231, 255, 94, 0.24);
  color: #e5f77e;
  box-shadow: inset 0 0 0 1px rgba(70, 223, 199, 0.06);
}
.trend-kind-switch button.active small {
  color: #88a894;
}
.trend-library-panel {
  padding-bottom: 13px;
}
.trend-shuffle {
  border: 1px solid rgba(231, 255, 94, 0.16);
  background: rgba(231, 255, 94, 0.055);
  border-radius: 999px;
  color: #dce975;
  padding: 7px 9px;
  font-size: 8px;
  font-weight: 850;
}
.trend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.trend-tile {
  position: relative;
  min-height: 105px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: #0b1112;
  border-radius: 18px;
  padding: 12px;
  display: grid;
  grid-template-columns: 35px 1fr;
  gap: 8px;
  text-align: left;
  overflow: hidden;
}
.trend-tile > i {
  display: none;
  position: absolute;
  right: 8px;
  top: 8px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #dff66b;
  color: #122017;
  font-style: normal;
  font-size: 9px;
  place-items: center;
}
.trend-tile.active {
  border-color: rgba(231, 255, 94, 0.28);
  background: linear-gradient(
    145deg,
    rgba(231, 255, 94, 0.07),
    rgba(70, 223, 199, 0.045)
  );
  box-shadow: inset 0 0 0 1px rgba(231, 255, 94, 0.025);
}
.trend-tile.active > i {
  display: grid;
}
.trend-tile-icon {
  width: 35px;
  height: 35px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #142122;
  color: #6edfcf;
  border: 1px solid rgba(70, 223, 199, 0.12);
  font-size: 13px;
}
.trend-tile-icon.auto {
  background: linear-gradient(145deg, #e7ff5e, #4bdcc5);
  color: #0a1815;
  border: 0;
}
.trend-tile b,
.trend-tile small,
.trend-tile em {
  display: block;
}
.trend-tile b {
  font-size: 10px;
  padding-right: 18px;
}
.trend-tile small {
  font-size: 7px;
  line-height: 1.35;
  color: #697874;
  margin-top: 4px;
}
.trend-tile em {
  display: inline-block;
  width: max-content;
  margin-top: 7px;
  border-radius: 999px;
  padding: 3px 5px;
  background: #121a1b;
  color: #70827d;
  font-size: 6px;
  font-style: normal;
  letter-spacing: 0.06em;
}
.trend-auto-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 9px;
  border: 1px solid rgba(70, 223, 199, 0.1);
  background: rgba(70, 223, 199, 0.035);
  border-radius: 15px;
  padding: 10px;
}
.trend-auto-note > span {
  width: 27px;
  height: 27px;
  border-radius: 9px;
  background: #152423;
  color: #85ead8;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.trend-auto-note p {
  margin: 1px 0 0;
  color: #71817d;
  font-size: 7px;
  line-height: 1.45;
}
.trend-auto-note b {
  color: #aab9b5;
}
.trend-generate {
  width: 100%;
  min-height: 69px;
  border: 0;
  border-radius: 22px;
  background: linear-gradient(
    115deg,
    #e7ff5e 0%,
    #a6f76f 27%,
    #45dfc8 68%,
    #42c0dd 100%
  );
  color: #071614;
  padding: 0 15px;
  display: grid;
  grid-template-columns: 37px 1fr auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  box-shadow: 0 17px 38px rgba(70, 223, 199, 0.2);
  margin-top: 13px;
  position: relative;
  overflow: hidden;
}
.trend-generate:after {
  content: "";
  position: absolute;
  inset: -100% -55%;
  background: linear-gradient(
    105deg,
    transparent 45%,
    rgba(255, 255, 255, 0.32) 50%,
    transparent 55%
  );
  animation: trendShine 5s ease-in-out infinite;
  pointer-events: none;
}
.trend-generate-spark {
  width: 37px;
  height: 37px;
  border-radius: 13px;
  background: #0b1a17;
  color: #e8ff72;
  display: grid;
  place-items: center;
  font-size: 17px;
  position: relative;
  z-index: 1;
}
.trend-generate > span:nth-child(2),
.trend-generate > strong {
  position: relative;
  z-index: 1;
}
.trend-generate b,
.trend-generate small {
  display: block;
}
.trend-generate b {
  font-size: 13px;
  font-weight: 950;
}
.trend-generate small {
  font-size: 7px;
  color: rgba(7, 26, 22, 0.65);
  margin-top: 4px;
}
.trend-generate strong {
  white-space: nowrap;
  font-size: 11px;
}
.trend-generate:disabled {
  filter: saturate(0.45);
  opacity: 0.55;
}
.trend-lucky {
  width: 100%;
  min-height: 45px;
  margin-top: 8px;
  border: 1px solid rgba(231, 255, 94, 0.15);
  border-radius: 15px;
  background: #111718;
  color: #b9c985;
  font-size: 9px;
  font-weight: 850;
}
.trend-lucky span {
  display: inline-block;
  margin-right: 5px;
}
.trend-addition-input {
  display: block;
  width: 100%;
  min-height: 76px;
  padding: 11px 12px;
  border: 1px solid rgba(105, 217, 204, 0.22);
  border-radius: 14px;
  background: #101719;
  color: #edf6f4;
  resize: vertical;
  line-height: 1.45;
}
.trend-addition-input:focus {
  outline: 2px solid rgba(83, 230, 211, 0.45);
  outline-offset: 1px;
}
.trend-addition-input::placeholder {
  color: #7f9690;
}
.trend-addition-note {
  margin: 8px 2px 0;
  color: #8fa39e;
  font-size: 11px;
  line-height: 1.45;
}
.uniquify-audio-title {
  margin: 14px 0 8px;
  font-size: 11px;
  font-weight: 800;
  color: #dcebe7;
}
.uniquify-audio-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.uniquify-audio-switch button {
  min-height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: #11191a;
  text-align: left;
  padding: 10px;
}
.uniquify-audio-switch button.active {
  border-color: #56d8c3;
  background: rgba(53, 170, 153, 0.14);
}
.uniquify-audio-switch b,
.uniquify-audio-switch small {
  display: block;
}
.uniquify-audio-switch b {
  font-size: 11px;
}
.uniquify-audio-switch small,
.uniquify-audio-hint {
  margin-top: 4px;
  font-size: 9px;
  color: #8ca19b;
}
.uniquify-audio-hint {
  display: block;
  min-height: 12px;
}
.trend-footnote {
  text-align: center;
  margin: 9px 12px 2px;
  color: #596864;
  font-size: 7px;
  line-height: 1.45;
}
@media (max-width: 390px) {
  .popular-card {
    padding: 15px;
  }
  .popular-icon {
    width: 48px;
    height: 48px;
  }
  .trend-hero {
    padding: 21px 17px 18px;
  }
  .trend-hero h2 {
    font-size: 28px;
  }
  .trend-grid {
    gap: 7px;
  }
  .trend-tile {
    padding: 10px;
    grid-template-columns: 32px 1fr;
  }
  .trend-tile-icon {
    width: 32px;
    height: 32px;
  }
  .trend-generate {
    padding: 0 12px;
    grid-template-columns: 34px 1fr auto;
  }
  .trend-generate-spark {
    width: 34px;
    height: 34px;
  }
  .trend-generate strong {
    font-size: 10px;
  }
}

.trend-tile.has-preview {
  grid-template-columns: 52px 1fr;
}
.trend-thumb {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #111718;
}
.trend-tile.has-preview .trend-tile-icon {
  display: none;
}
.checkout-modal {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.checkout-sheet {
  position: relative;
  width: min(100%, 620px);
  background: #101619;
  border: 1px solid var(--line);
  border-radius: 27px 27px 0 0;
  padding: 17px 16px max(18px, env(safe-area-inset-bottom));
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.42);
}
.checkout-amount {
  margin: 4px 0 16px;
  color: #e7ff70;
  font-size: 22px;
  font-weight: 900;
}
.checkout-field {
  display: grid;
  gap: 7px;
  color: #91a39f;
  font-size: 10px;
  font-weight: 800;
}
.checkout-field input {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0b1112;
  color: #ecf4f2;
  padding: 0 13px;
  outline: none;
}
.checkout-field input:focus {
  border-color: #45dfc8;
}
.checkout-terms {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 14px 0;
  color: #879793;
  font-size: 10px;
  line-height: 1.45;
}
.checkout-terms input {
  margin-top: 2px;
  accent-color: #45dfc8;
}
.checkout-terms a {
  color: #62dcbf;
}
.checkout-status {
  min-height: 18px;
  margin: 6px 0;
  color: #92aaa5;
  font-size: 10px;
  line-height: 1.4;
}
.checkout-status.error {
  color: #ff8e8e;
}
.checkout-actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 9px;
}
.checkout-actions button {
  min-height: 48px;
}
.secondary-btn {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0b1112;
  color: #b6c6c2;
  font-weight: 800;
}
.trend-duration-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.trend-duration-switch button {
  min-height: 52px;
  border: 1px solid var(--line);
  background: #0b1112;
  border-radius: 15px;
  color: #7b8986;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
}
.trend-duration-switch button b {
  font-size: 15px;
}
.trend-duration-switch button small {
  font-size: 7px;
  color: #5f6d69;
}
.trend-duration-switch button.active {
  background: linear-gradient(
    180deg,
    rgba(231, 255, 94, 0.1),
    rgba(70, 223, 199, 0.07)
  );
  border-color: rgba(231, 255, 94, 0.28);
  color: #e7ff70;
  box-shadow: inset 0 0 0 1px rgba(70, 223, 199, 0.05);
}
.trend-model-inline {
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  background: rgba(7, 12, 13, 0.55);
}
.trend-model-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 2px 8px;
}
.trend-model-label span {
  color: #9caea9;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.13em;
}
.trend-model-label small {
  color: #62736e;
  font-size: 6px;
}
.trend-model-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.trend-model-switch button {
  min-height: 72px;
  border: 1px solid var(--line);
  background: #0b1112;
  border-radius: 16px;
  color: #73817f;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  padding: 8px 5px;
}
.trend-model-switch button > span {
  min-width: 29px;
  height: 25px;
  padding: 0 7px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(70, 223, 199, 0.07);
  color: #88a894;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.04em;
}
.trend-model-switch button b {
  font-size: 10px;
}
.trend-model-switch button small {
  font-size: 6px;
  color: #5f6d69;
}
.trend-model-switch button.active {
  background: linear-gradient(
    180deg,
    rgba(231, 255, 94, 0.1),
    rgba(70, 223, 199, 0.07)
  );
  border-color: rgba(231, 255, 94, 0.28);
  color: #e7ff70;
  box-shadow: inset 0 0 0 1px rgba(70, 223, 199, 0.05);
}
.trend-model-switch button.active > span {
  background: rgba(231, 255, 94, 0.12);
  color: #e7ff70;
}
.trend-model-switch button.active small {
  color: #88a894;
}
.trend-model-note {
  margin: 9px 2px 0;
  color: #64746f;
  font-size: 7px;
  line-height: 1.45;
}
.checkout-pay-link {
  display: block;
  margin: 11px 0 2px;
  padding: 12px 14px;
  border: 1px solid rgba(231, 255, 94, 0.28);
  border-radius: 14px;
  background: rgba(231, 255, 94, 0.08);
  color: #e7ff70;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
}
.checkout-pay-link:focus {
  outline: 2px solid #45dfc8;
  outline-offset: 2px;
}
.quote-dialog {
  width: min(92vw, 430px);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 0;
  background: #101619;
  color: #ecf4f2;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}
.quote-dialog::backdrop {
  background: rgba(3, 7, 8, 0.72);
}
.quote-dialog-form {
  display: grid;
  gap: 12px;
  padding: 22px;
}
.quote-dialog-form small {
  color: #93a5a0;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.12em;
}
.quote-dialog-form h2 {
  margin: 0;
  font-size: 22px;
}
.quote-dialog-form p {
  margin: 0;
  color: #a9bab5;
  line-height: 1.45;
}
.quote-dialog-form strong {
  color: #e7ff70;
  font-size: 24px;
}
.quote-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}
.quote-dialog-actions button {
  min-height: 46px;
}
.quote-dialog-actions button:focus {
  outline: 2px solid #45dfc8;
  outline-offset: 2px;
}

/* Spark Pro v5.6 — video uniquify */
.uniquify-home-card {
  border-color: rgba(174, 110, 255, 0.28);
  background:
    radial-gradient(
      circle at 100% 0,
      rgba(174, 110, 255, 0.16),
      transparent 42%
    ),
    linear-gradient(145deg, #15171d, #101317);
}
.uniquify-home-card .uniquify-icon {
  background: #20152d;
  color: #d6b6ff;
  border-color: rgba(174, 110, 255, 0.22);
}
.uniquify-home-card .create-text b em {
  display: inline-block;
  margin-left: 6px;
  font-size: 6px;
  font-style: normal;
  letter-spacing: 0.12em;
  color: #d6b6ff;
  border: 1px solid rgba(174, 110, 255, 0.25);
  background: rgba(174, 110, 255, 0.08);
  border-radius: 999px;
  padding: 4px 6px;
  vertical-align: middle;
}
.uniquify-settings {
  border-color: rgba(174, 110, 255, 0.18);
  background:
    radial-gradient(
      circle at 100% 0,
      rgba(174, 110, 255, 0.07),
      transparent 42%
    ),
    linear-gradient(180deg, #14191d, #0e1215);
}
.uniquify-head {
  align-items: flex-start;
}
.uniquify-beta {
  font-size: 6px;
  font-weight: 950;
  letter-spacing: 0.13em;
  color: #d6b6ff;
  border: 1px solid rgba(174, 110, 255, 0.24);
  background: rgba(174, 110, 255, 0.08);
  border-radius: 999px;
  padding: 6px 8px;
}
.uniquify-change-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.uniquify-change-grid label {
  position: relative;
  border: 1px solid var(--line);
  background: #0a0f12;
  border-radius: 16px;
  padding: 11px 12px;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
}
.uniquify-change-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.uniquify-change-grid span,
.uniquify-change-grid small {
  display: block;
}
.uniquify-change-grid span {
  font-size: 10px;
  font-weight: 850;
  color: #9aa7ab;
}
.uniquify-change-grid small {
  font-size: 7px;
  color: #59676b;
  margin-top: 4px;
}
.uniquify-change-grid label:has(input:checked) {
  border-color: rgba(174, 110, 255, 0.34);
  background: linear-gradient(
    145deg,
    rgba(174, 110, 255, 0.1),
    rgba(70, 223, 199, 0.035)
  );
}
.uniquify-change-grid label:has(input:checked) span {
  color: #eadcff;
}
.uniquify-change-grid label:has(input:checked):after {
  content: "✓";
  position: absolute;
  right: 10px;
  top: 9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(174, 110, 255, 0.16);
  color: #d8baff;
  font-size: 9px;
  font-weight: 900;
}
.uniquify-strength-title {
  margin: 14px 2px 7px;
  color: #758287;
  font-size: 7px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.uniquify-strength {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.uniquify-strength button {
  min-height: 58px;
  border: 1px solid var(--line);
  background: #0a0f12;
  border-radius: 15px;
  color: #89979b;
  padding: 8px 5px;
}
.uniquify-strength b,
.uniquify-strength small {
  display: block;
}
.uniquify-strength b {
  font-size: 8px;
}
.uniquify-strength small {
  font-size: 6px;
  color: #5f6c70;
  margin-top: 4px;
}
.uniquify-strength button.active {
  border-color: rgba(174, 110, 255, 0.38);
  background: linear-gradient(
    160deg,
    rgba(174, 110, 255, 0.14),
    rgba(70, 223, 199, 0.05)
  );
  color: #eadcff;
  box-shadow: inset 0 0 0 1px rgba(174, 110, 255, 0.05);
}
.uniquify-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 11px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(174, 110, 255, 0.05);
  border: 1px solid rgba(174, 110, 255, 0.1);
  color: #758287;
}
.uniquify-note > span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(174, 110, 255, 0.13);
  color: #d6b6ff;
  font-size: 9px;
  flex: 0 0 auto;
}
.uniquify-note p {
  margin: 1px 0 0;
  font-size: 7px;
  line-height: 1.5;
}
.uniquify-mode #studioModeTabs {
  display: none;
}
.uniquify-mode #modelButton {
  pointer-events: none;
}
.uniquify-mode [data-setting="ratio"],
.uniquify-mode [data-setting="audio"],
.uniquify-mode [data-setting="bitrate"] {
  display: none;
}
.uniquify-mode #videoSettingsGrid {
  grid-template-columns: 1fr 1fr;
}
.uniquify-mode #generateBtn {
  background: linear-gradient(115deg, #d9b8ff, #65dfcc);
}
@media (max-width: 390px) {
  .uniquify-change-grid {
    grid-template-columns: 1fr 1fr;
  }
  .uniquify-strength {
    gap: 5px;
  }
  .uniquify-strength button {
    min-height: 54px;
    padding: 6px 3px;
  }
}

/* Spark Pro v5.8 — zero-prompt uniquify UX */
.uniquify-prompt-toggle {
  width: 100%;
  margin-top: 10px;
  min-height: 54px;
  border: 1px solid rgba(174, 110, 255, 0.18);
  background: linear-gradient(
    145deg,
    rgba(174, 110, 255, 0.07),
    rgba(70, 223, 199, 0.025)
  );
  border-radius: 16px;
  color: #e9eef0;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 9px;
  align-items: center;
  text-align: left;
  padding: 9px 11px;
}
.uniquify-prompt-toggle > span {
  width: 30px;
  height: 30px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(174, 110, 255, 0.12);
  color: #d9bdff;
  font-size: 17px;
  font-weight: 700;
}
.uniquify-prompt-toggle b,
.uniquify-prompt-toggle small {
  display: block;
}
.uniquify-prompt-toggle b {
  font-size: 9px;
}
.uniquify-prompt-toggle small {
  font-size: 6.5px;
  color: #6f7d81;
  margin-top: 3px;
}
.uniquify-prompt-toggle > i {
  font-style: normal;
  color: #8e7aa9;
  font-size: 15px;
}
.uniquify-prompt-toggle.open {
  border-color: rgba(174, 110, 255, 0.34);
  background: linear-gradient(
    145deg,
    rgba(174, 110, 255, 0.12),
    rgba(70, 223, 199, 0.04)
  );
}
.uniquify-mode #promptStudioCard {
  border-color: rgba(174, 110, 255, 0.18);
}
.uniquify-mode #promptStudioCard .prompt-toolbar,
.uniquify-mode #promptStudioCard .hidden-prompt-note {
  display: none;
}
.uniquify-mode #promptStudioCard textarea {
  min-height: 120px;
}
.uniquify-note p b {
  color: #e7dcf7;
  font-weight: 850;
}

.result-actions {
  display: grid;
  gap: 9px;
}
.delete-result-btn {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255, 91, 105, 0.25);
  border-radius: 15px;
  background: rgba(255, 91, 105, 0.06);
  color: #ff7b86;
  font-weight: 800;
  font-size: 12px;
}
.delete-result-btn:active {
  transform: scale(0.99);
  background: rgba(255, 91, 105, 0.11);
}

.tariff-price del {
  display: block;
  color: #89959b;
  font-size: 14px;
  margin-bottom: 4px;
}
.tariff-main em {
  display: inline-block;
  font-size: 11px;
  font-style: normal;
  color: #9cfdce;
  margin-left: 8px;
}
.tariff-card.best-value {
  border-color: #74eeb4;
  background: #143128;
}

/* In-app trend catalog */
.catalog-view {
  padding-bottom: 18px;
}
.catalog-view-head {
  grid-template-columns: 1fr 40px;
}
.catalog-view-head .refresh-btn {
  grid-column: 2;
}
.catalog-panel {
  border: 1px solid var(--line);
  background: linear-gradient(
    145deg,
    rgba(20, 29, 33, 0.95),
    rgba(14, 19, 22, 0.97)
  );
  border-radius: 20px;
  padding: 13px;
  margin-bottom: 12px;
}
.catalog-notice,
.catalog-list-status,
.catalog-editor-status {
  border-radius: 12px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.45;
}
.catalog-notice {
  margin: 0 0 12px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 184, 77, 0.25);
  background: rgba(255, 184, 77, 0.08);
  color: #f4d29a;
}
.catalog-notice.error,
.catalog-list-status.error,
.catalog-editor-status.error {
  border-color: rgba(255, 116, 116, 0.3);
  background: rgba(255, 116, 116, 0.08);
  color: #ffaaa9;
}
.catalog-notice.success,
.catalog-list-status.success,
.catalog-editor-status.success {
  border-color: rgba(110, 231, 168, 0.26);
  background: rgba(110, 231, 168, 0.07);
  color: #a3f4c8;
}
.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: end;
}
.catalog-search,
.catalog-field {
  display: grid;
  gap: 6px;
  color: var(--text-soft);
  font-size: 10px;
}
.catalog-search span,
.catalog-field > span,
.catalog-field-row > .catalog-field > span,
.catalog-field-row-bottom .catalog-field > span {
  color: #8b999d;
  font-size: 9px;
  letter-spacing: 0.03em;
}
.catalog-search input,
.catalog-field input,
.catalog-field textarea {
  width: 100%;
  color: var(--text);
  background: #0b1114;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 11px;
  outline: none;
}
.catalog-field textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.45;
}
.catalog-search input:focus,
.catalog-field input:focus,
.catalog-field textarea:focus,
.catalog-upload:focus-within,
.catalog-confirm input:focus-visible,
.catalog-toggle input:focus-visible,
.catalog-action:focus-visible,
.catalog-primary:focus-visible,
.catalog-back:focus-visible,
.catalog-pagination button:focus-visible {
  border-color: rgba(56, 214, 194, 0.72);
  box-shadow: 0 0 0 3px rgba(56, 214, 194, 0.12);
}
.catalog-primary,
.catalog-action,
.catalog-back,
.catalog-pagination button {
  min-height: 39px;
  border-radius: 11px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  background: #10191d;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 800;
}
.catalog-primary {
  border-color: rgba(56, 214, 194, 0.42);
  background: linear-gradient(
    135deg,
    rgba(56, 214, 194, 0.2),
    rgba(70, 191, 232, 0.1)
  );
  color: #d7fffa;
  white-space: nowrap;
}
.catalog-primary:active,
.catalog-action:active,
.catalog-back:active,
.catalog-pagination button:active {
  transform: translateY(1px);
}
.catalog-grant-card {
  margin: 12px 0 2px;
  padding: 12px;
  border: 1px solid rgba(56, 214, 194, 0.2);
  border-radius: 14px;
  background: rgba(8, 18, 21, 0.72);
}
.catalog-grant-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.catalog-grant-head h3 {
  margin: 4px 0 0;
  font-size: 16px;
}
.catalog-grant-head small {
  color: var(--text-soft);
  font-size: 9px;
  text-align: right;
}
.catalog-grant-form {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(92px, 0.65fr);
  gap: 9px;
}
.catalog-grant-reason {
  grid-column: 1 / -1;
}
.catalog-grant-form .catalog-primary {
  grid-column: 1 / -1;
}
.catalog-grant-form input {
  width: 100%;
  color: var(--text);
  background: #0b1114;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 11px;
  outline: none;
}
.catalog-grant-form input:focus {
  border-color: rgba(56, 214, 194, 0.72);
  box-shadow: 0 0 0 3px rgba(56, 214, 194, 0.12);
}
.catalog-list-status {
  min-height: 18px;
  margin: 12px 1px 8px;
}
.catalog-list-status.error {
  padding: 10px;
}
.catalog-list-status button {
  margin-left: 8px;
  border: 0;
  background: transparent;
  color: var(--aqua);
  font-size: 11px;
  font-weight: 800;
  text-decoration: underline;
}
.catalog-list {
  display: grid;
  gap: 8px;
}
.catalog-row {
  width: 100%;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(9, 14, 17, 0.7);
}
.catalog-row:hover,
.catalog-row:focus-visible {
  border-color: rgba(56, 214, 194, 0.36);
  outline: none;
}
.catalog-row-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #152126;
  color: var(--aqua);
  font-size: 22px;
  border: 1px solid rgba(56, 214, 194, 0.15);
}
.catalog-row-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.catalog-row-copy {
  min-width: 0;
}
.catalog-row-copy b,
.catalog-row-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.catalog-row-copy b {
  font-size: 13px;
}
.catalog-row-copy small {
  color: #849297;
  font-size: 9px;
  margin-top: 4px;
}
.catalog-row-copy p {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 5px 0 0;
  color: #a8b7ba;
  font-size: 10px;
  line-height: 1.35;
}
.catalog-row-state {
  align-self: start;
  border-radius: 999px;
  padding: 4px 7px;
  background: rgba(114, 128, 134, 0.13);
  color: #9ba8ac;
  font-size: 8px;
  font-weight: 850;
  white-space: nowrap;
}
.catalog-row-state.live {
  background: rgba(110, 231, 168, 0.12);
  color: #9cf1c0;
}
.catalog-row-state.draft {
  background: rgba(255, 184, 77, 0.12);
  color: #f1c77c;
}
.catalog-empty {
  padding: 25px 14px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: #77868b;
  text-align: center;
  font-size: 11px;
}
.catalog-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.catalog-pagination button:last-child {
  justify-self: end;
}
.catalog-pagination button:disabled {
  opacity: 0.35;
}
.catalog-pagination span {
  color: #87969a;
  font-size: 9px;
  text-align: center;
}
.catalog-editor {
  padding: 14px;
}
.catalog-editor-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.catalog-editor-head h3 {
  margin: 5px 0 0;
  font-size: 19px;
  letter-spacing: -0.03em;
}
.catalog-visibility {
  color: #849599;
  font-size: 9px;
}
.catalog-back {
  padding-inline: 10px;
  white-space: nowrap;
}
.catalog-state {
  color: #99a8ac;
  font-size: 9px;
  text-align: right;
  white-space: nowrap;
}
.catalog-editor-status {
  min-height: 18px;
  margin-bottom: 12px;
}
.catalog-editor-status:not(:empty) {
  padding: 10px;
}
.catalog-form {
  display: grid;
  gap: 12px;
}
.catalog-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 0.45fr);
  gap: 10px;
}
.catalog-field-row-bottom {
  align-items: end;
}
.catalog-icon-field {
  min-width: 0;
}
.catalog-toggle {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text-soft);
  font-size: 10px;
}
.catalog-toggle input,
.catalog-confirm input {
  accent-color: var(--aqua);
}
.catalog-upload {
  display: grid;
  gap: 4px;
  min-height: 66px;
  padding: 12px;
  border: 1px dashed rgba(56, 214, 194, 0.36);
  border-radius: 12px;
  background: rgba(56, 214, 194, 0.05);
  color: #c5e4e1;
  cursor: pointer;
}
.catalog-upload small {
  color: #7b8b8e;
  font-size: 9px;
}
.catalog-upload input[type="file"] {
  max-width: 100%;
  color: #c5e4e1;
  font: inherit;
}
.catalog-upload.busy {
  opacity: 0.55;
  pointer-events: none;
}
.catalog-preview {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  max-height: 260px;
  background: #090e11;
}
.catalog-preview img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
}
.catalog-actions {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 8px;
  padding-top: 2px;
}
.catalog-action {
  min-width: 0;
}
.catalog-toggle-action {
  color: #ffc486;
  border-color: rgba(255, 184, 77, 0.24);
}
.catalog-publish-fields {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(255, 184, 77, 0.16);
  border-radius: 13px;
  background: rgba(255, 184, 77, 0.04);
}
.catalog-confirm {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #d0c29f;
  font-size: 10px;
  line-height: 1.4;
}
@media (max-width: 470px) {
  .catalog-toolbar {
    grid-template-columns: 1fr;
  }
  .catalog-primary {
    width: 100%;
  }
  .catalog-field-row,
  .catalog-actions {
    grid-template-columns: 1fr;
  }
  .catalog-editor-head {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .catalog-state {
    grid-column: 2;
    text-align: left;
  }
  .catalog-pagination button {
    padding-inline: 8px;
  }
}

/* Live trend discovery · 2026-09-25 */

/* Home: compact creation shortcuts like a media app, without changing actions. */
#homeView .create-stack {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
#homeView .create-stack .create-card {
  min-width: 0;
  min-height: 108px;
  padding: 12px 6px 11px;
  border-radius: 20px;
  grid-template-columns: 1fr;
  grid-template-rows: 48px auto;
  justify-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
}
#homeView .create-stack .create-icon,
#homeView .create-stack .popular-icon {
  width: 47px;
  height: 47px;
  border-radius: 15px;
}
#homeView .create-stack .create-text {
  min-width: 0;
  width: 100%;
}
#homeView .create-stack .create-text b {
  font-size: 10px;
  line-height: 1.14;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}
#homeView .create-stack .create-text small,
#homeView .create-stack .arrow {
  display: none;
}
#homeView .create-stack .create-text em {
  display: none;
}
#homeView .create-stack .popular-icon > i {
  transform: scale(0.82);
  transform-origin: right top;
}
#homeView .popular-card {
  box-shadow:
    0 12px 30px rgba(94, 229, 181, 0.13),
    inset 0 0 0 1px rgba(232, 255, 104, 0.08);
}
#homeView .uniquify-home-card {
  position: relative;
  overflow: visible;
  border-color: rgba(107, 248, 220, 0.8);
  background: linear-gradient(145deg, #102a28, #17182a 80%);
  box-shadow:
    0 0 0 1px rgba(112, 255, 225, 0.28),
    0 0 22px rgba(84, 238, 211, 0.36),
    inset 0 0 18px rgba(100, 245, 216, 0.16);
  animation: uniquify-glow 2.8s ease-in-out infinite alternate;
}
#homeView .uniquify-home-card .uniquify-icon {
  color: #7cf5df;
  background: #12342f;
  border-color: rgba(108, 246, 216, 0.42);
  box-shadow: 0 0 16px rgba(94, 244, 214, 0.34);
}
.uniquify-exclusive-label {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: -10px;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 3px 7px;
  border-radius: 999px;
  background: linear-gradient(105deg, #ddff6c, #62ead4);
  color: #08211b;
  font-size: 7px;
  font-weight: 950;
  letter-spacing: 0.04em;
  box-shadow: 0 0 13px rgba(118, 244, 202, 0.5);
}
@keyframes uniquify-glow {
  to {
    box-shadow:
      0 0 0 1px rgba(180, 255, 228, 0.56),
      0 0 32px rgba(84, 238, 211, 0.6),
      inset 0 0 22px rgba(100, 245, 216, 0.25);
  }
}
@media (prefers-reduced-motion: reduce) {
  #homeView .uniquify-home-card {
    animation: none;
  }
}

.home-trend-card.trend-placeholder,
.trend-tile.trend-placeholder {
  border-style: dashed;
  border-color: rgba(108, 231, 207, 0.28);
}

/* Living trend rail on the main screen. */
.home-trends-card {
  margin-top: 15px;
  padding: 14px 0 13px;
  border: 1px solid rgba(68, 218, 194, 0.22);
  border-radius: 24px;
  background:
    radial-gradient(
      circle at 100% 0,
      rgba(56, 214, 194, 0.13),
      transparent 42%
    ),
    linear-gradient(145deg, rgba(16, 27, 28, 0.98), rgba(10, 15, 17, 0.98));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}
.home-trends-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px 11px;
}
.home-trends-heading > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}
.home-trends-heading > div > span {
  font-size: 19px;
}
.home-trends-heading h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.035em;
}
.home-trends-heading h2 i,
.popular-banner-copy b i {
  display: inline-flex;
  align-items: center;
  margin-left: 5px;
  padding: 3px 5px;
  border-radius: 999px;
  background: #ff5e63;
  color: white;
  font-size: 7px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0.06em;
  vertical-align: 3px;
  box-shadow: 0 4px 12px rgba(255, 94, 99, 0.22);
}
.home-trends-heading small {
  display: block;
  margin-top: 3px;
  color: #83918f;
  font-size: 8px;
}
.home-trends-heading > button {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #a9bbb8;
  font-size: 10px;
  padding: 8px 2px 8px 10px;
}
.home-trend-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding: 0 14px 2px;
}
.home-trend-rail::-webkit-scrollbar {
  display: none;
}
.home-trend-card {
  position: relative;
  flex: 0 0 clamp(120px, 35vw, 148px);
  aspect-ratio: 0.69;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 17px;
  overflow: hidden;
  background: #0a0f11;
  text-align: left;
  scroll-snap-align: start;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.17);
}
.home-trend-card:active {
  transform: scale(0.985);
}
.home-trend-card .trend-preview-media,
.home-trend-card .trend-preview-fallback {
  position: absolute;
  inset: 0;
}
.home-trend-copy {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 34px 9px 9px;
  background: linear-gradient(transparent, rgba(4, 8, 9, 0.94));
  pointer-events: none;
}
.home-trend-copy b,
.home-trend-copy small {
  display: block;
}
.home-trend-copy b {
  font-size: 11px;
  line-height: 1.15;
  color: #f3f7f6;
}
.home-trend-copy small {
  margin-top: 4px;
  color: #7ce6d5;
  font-size: 7px;
  font-weight: 800;
}
.home-trend-empty {
  min-width: 150px;
  aspect-ratio: 0.78;
  border: 1px dashed rgba(80, 220, 199, 0.25);
  border-radius: 17px;
  background: rgba(56, 214, 194, 0.04);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  color: #a7bbb7;
}
.home-trend-empty b {
  font-size: 26px;
  color: #dfff63;
}
.home-trend-empty span {
  font-size: 10px;
  font-weight: 800;
}
.home-trend-empty small {
  font-size: 7px;
  color: #6f817d;
}

.popular-banner {
  width: 100%;
  min-height: 78px;
  margin-top: 11px;
  border: 0;
  border-radius: 22px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 28px;
  gap: 11px;
  align-items: center;
  text-align: left;
  color: #071414;
  background:
    radial-gradient(
      circle at 10% 10%,
      rgba(225, 255, 87, 0.95),
      transparent 32%
    ),
    linear-gradient(110deg, #bdff62 0%, #68e6b7 48%, #58dbe5 100%);
  box-shadow: 0 15px 36px rgba(69, 222, 186, 0.19);
}
.popular-banner:active {
  transform: scale(0.988);
}
.popular-banner-icon {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: #10231f;
  color: #eaff67;
  font-size: 22px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.popular-banner-copy b,
.popular-banner-copy small {
  display: block;
}
.popular-banner-copy b {
  font-size: 15px;
  line-height: 1.05;
  font-weight: 950;
}
.popular-banner-copy small {
  margin-top: 5px;
  color: rgba(5, 27, 24, 0.7);
  font-size: 8px;
  line-height: 1.3;
  font-weight: 700;
}
.popular-banner-arrow {
  font-size: 25px;
  font-weight: 900;
  color: rgba(6, 31, 28, 0.63);
}

/* Trend discovery page: category chips + large vertical live cards. */
.trend-library-panel {
  padding: 13px;
}
.trend-filters {
  display: flex;
  gap: 7px;
  margin: -1px 0 11px;
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.trend-filters::-webkit-scrollbar {
  display: none;
}
.trend-filters button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: #0b1113;
  color: #82908e;
  font-size: 8px;
  font-weight: 800;
}
.trend-filters button.active {
  border-color: rgba(104, 238, 202, 0.38);
  background: linear-gradient(135deg, #58e5c6, #baff69);
  color: #071715;
  box-shadow: 0 7px 18px rgba(75, 223, 188, 0.13);
}
.trend-library-panel .trend-model-inline {
  margin: 0 0 11px;
}
.trend-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.trend-tile {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 0.71;
  padding: 0;
  border-radius: 17px;
  overflow: hidden;
  background: #080d0f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  isolation: isolate;
  text-align: left;
}
.trend-tile.active {
  border-color: rgba(215, 255, 99, 0.7);
  box-shadow:
    0 0 0 1px rgba(215, 255, 99, 0.25),
    0 10px 28px rgba(0, 0, 0, 0.2);
}
.trend-preview-media,
.trend-preview-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  overflow: hidden;
  background: #0c1214;
}
.trend-preview-media img,
.trend-preview-media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.trend-live-video {
  background: #0a1012;
}
.trend-video-fallback {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: grid;
  place-items: center;
  font-size: 28px;
  color: #57dfca;
  background:
    radial-gradient(
      circle at 50% 38%,
      rgba(84, 226, 203, 0.17),
      transparent 36%
    ),
    #0b1113;
}
.trend-preview-media.preview-failed .trend-live-video {
  display: none;
}
.trend-preview-media.preview-failed .trend-video-fallback {
  z-index: 1;
}
.trend-live-chip,
.trend-duration-chip {
  position: absolute;
  z-index: 3;
  top: 8px;
  border-radius: 999px;
  background: rgba(6, 11, 12, 0.73);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.trend-live-chip {
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  color: #eaff68;
}
.trend-live-chip i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ff6267;
  box-shadow: 0 0 0 3px rgba(255, 98, 103, 0.12);
}
.trend-live-chip.static {
  color: #a8b7b4;
  letter-spacing: 0.04em;
}
.trend-duration-chip {
  right: 8px;
  padding: 5px 7px;
  color: #dce6e4;
}
.trend-preview-fallback {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  background:
    radial-gradient(
      circle at 50% 35%,
      rgba(95, 226, 203, 0.16),
      transparent 32%
    ),
    linear-gradient(145deg, #10191a, #090e10);
}
.trend-preview-fallback b {
  font-size: 30px;
  color: #dfff63;
  text-shadow: 0 0 25px rgba(223, 255, 99, 0.15);
}
.trend-preview-fallback small {
  color: #5d736e;
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0.17em;
}
.trend-preview-fallback.auto {
  background:
    radial-gradient(
      circle at 30% 25%,
      rgba(221, 255, 99, 0.21),
      transparent 32%
    ),
    radial-gradient(
      circle at 70% 72%,
      rgba(61, 220, 198, 0.19),
      transparent 34%
    ),
    linear-gradient(145deg, #14201d, #091012);
}
.trend-tile-copy {
  position: absolute !important;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 0;
  display: block !important;
  padding: 45px 10px 10px !important;
  background: linear-gradient(transparent, rgba(3, 7, 8, 0.97));
  pointer-events: none;
}
.trend-tile-copy b,
.trend-tile-copy small,
.trend-tile-copy em {
  display: block;
  position: static;
}
.trend-tile-copy b {
  color: #f1f5f4;
  font-size: 11px;
  line-height: 1.18;
  font-weight: 900;
}
.trend-tile-copy small {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  color: #9aa8a5;
  font-size: 7px;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.trend-tile-copy em {
  margin-top: 6px;
  color: #5ee2c8;
  font-size: 7px;
  font-style: normal;
  font-weight: 850;
}
.trend-tile > i {
  z-index: 7;
  right: 8px;
  top: 8px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #dbff68;
  color: #09201b;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.24);
}
.trend-tile.has-live-video.active .trend-live-chip {
  padding-right: 8px;
}

/* Admin trend preview supports the same video asset used in the customer gallery. */
.catalog-preview img,
.catalog-preview video {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  background: #090e11;
}
.catalog-row-icon video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 430px) {
  .app-shell {
    padding-left: 12px;
    padding-right: 12px;
  }
  #homeView .create-stack {
    gap: 6px;
  }
  #homeView .create-stack .create-card {
    min-height: 102px;
    border-radius: 18px;
    padding-inline: 4px;
  }
  #homeView .create-stack .create-text b {
    font-size: 9px;
  }
  .home-trends-card {
    border-radius: 21px;
  }
  .trend-library-panel {
    margin-left: -1px;
    margin-right: -1px;
    padding: 11px;
  }
  .trend-grid {
    gap: 7px;
  }
  .trend-tile {
    border-radius: 15px;
  }
}

/* Spark growth funnel — welcome offer, first-result upsell and promo code */
.welcome-offer-card,
.tariff-offer,
.result-upsell {
  border: 1px solid rgba(231, 255, 112, 0.28);
  background:
    radial-gradient(
      circle at 88% 12%,
      rgba(231, 255, 112, 0.13),
      transparent 32%
    ),
    linear-gradient(145deg, rgba(24, 42, 31, 0.94), rgba(10, 16, 17, 0.98));
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.2);
}
.welcome-offer-card {
  margin: 12px 0;
  padding: 17px;
  border-radius: 22px;
}
.welcome-offer-top,
.tariff-offer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
}
.welcome-offer-top span,
.tariff-offer > div:first-child > span,
.result-upsell > span {
  color: #e7ff70;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
}
.welcome-offer-top b,
#tariffOfferTimer,
#resultOfferTimer {
  color: #f4ffd0;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.welcome-offer-card h3,
.tariff-offer h3,
.result-upsell h3 {
  margin: 10px 0 5px;
  font-size: 18px;
  line-height: 1.15;
}
.welcome-offer-card p,
.tariff-offer p,
.result-upsell p {
  margin: 0;
  color: #9bacaa;
  font-size: 10px;
  line-height: 1.5;
}
.welcome-offer-price {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 14px 0 12px;
}
.welcome-offer-price del,
.tariff-offer-price del,
.result-upsell-price del {
  color: #7f8a8d;
  font-size: 13px;
}
.welcome-offer-price strong,
.tariff-offer-price strong,
.result-upsell-price strong {
  color: #e7ff70;
  font-size: 25px;
  font-weight: 950;
}
.welcome-offer-price em {
  margin-left: auto;
  color: #78edba;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}
.welcome-offer-card .generate-btn,
.result-upsell .generate-btn {
  width: 100%;
}
.tariff-offer {
  margin-bottom: 12px;
  padding: 15px 16px;
  border-radius: 20px;
}
.tariff-offer h3 {
  font-size: 15px;
}
.tariff-offer-price {
  min-width: 112px;
  text-align: right;
}
.tariff-offer-price del,
.tariff-offer-price strong {
  display: block;
}
.tariff-offer-price strong {
  font-size: 20px;
  margin: 2px 0 7px;
}
.tariff-offer-price button {
  border: 0;
  border-radius: 11px;
  padding: 9px 13px;
  background: #e7ff70;
  color: #0b1211;
  font-weight: 950;
  font-size: 10px;
}
.tariff-card.welcome-price {
  border-color: rgba(231, 255, 112, 0.42);
  background: linear-gradient(
    135deg,
    rgba(32, 48, 33, 0.92),
    rgba(13, 18, 21, 0.98)
  );
}
.tariff-card.welcome-price .tariff-price strong {
  color: #e7ff70;
}
.result-upsell {
  margin: 12px 0;
  padding: 15px;
  border-radius: 18px;
}
.result-upsell h3 {
  font-size: 16px;
}
.result-unlocks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 12px 0;
}
.result-unlocks b {
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  color: #cbd7d4;
  font-size: 9px;
}
.result-upsell-price {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}
.result-upsell-price span {
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.result-upsell-price strong {
  font-size: 21px;
}
.result-upsell-price small {
  color: #8fa09c;
  font-size: 8px;
  text-align: right;
  line-height: 1.4;
}
.promo-code-box {
  margin: 11px 0 2px;
}
.promo-toggle {
  border: 0;
  padding: 5px 0;
  background: transparent;
  color: #7fe9e2;
  font-size: 10px;
  font-weight: 850;
}
.promo-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 7px;
}
.promo-entry input {
  min-width: 0;
  min-height: 43px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b1112;
  color: #ecf4f2;
  padding: 0 12px;
  outline: none;
  text-transform: uppercase;
}
.promo-entry .secondary-btn {
  min-height: 43px;
  padding: 0 12px;
}
#promoStatus {
  display: block;
  min-height: 14px;
  margin-top: 5px;
  color: #88a09a;
  font-size: 9px;
}
@media (max-width: 390px) {
  .tariff-offer,
  .result-upsell-price {
    align-items: stretch;
    flex-direction: column;
  }
  .tariff-offer-price {
    text-align: left;
  }
  .result-upsell-price small {
    text-align: left;
  }
}

/* Contextual purchase funnel */
.purchase-funnel-modal {
  position: fixed;
  inset: 0;
  z-index: 118;
  display: grid;
  align-items: end;
}
.purchase-funnel-modal.hidden {
  display: none;
}
.purchase-funnel-sheet {
  position: relative;
  z-index: 2;
  width: min(100%, 620px);
  margin: 0 auto;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  border: 1px solid rgba(222, 239, 242, 0.11);
  border-radius: 24px 24px 0 0;
  background:
    radial-gradient(
      circle at 80% 0%,
      rgba(56, 214, 194, 0.09),
      transparent 32%
    ),
    #0f1417;
  box-shadow: 0 -24px 80px rgba(0, 0, 0, 0.38);
}
.purchase-funnel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}
.purchase-funnel-head small {
  color: #78edba;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
}
.purchase-funnel-head h2 {
  margin: 5px 0 0;
  font-size: 20px;
  line-height: 1.15;
}
.purchase-funnel-head > button {
  border: 0;
  background: transparent;
  color: #8c989b;
  font-size: 24px;
  line-height: 1;
}
.purchase-funnel-copy {
  margin: 10px 0 13px;
  color: #9caaad;
  font-size: 11px;
  line-height: 1.55;
}
.purchase-funnel-features {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}
.purchase-funnel-features span {
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: #c7d2d2;
  font-size: 9px;
  font-weight: 800;
}
.purchase-funnel-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 3px 1px 9px;
  color: #819094;
  font-size: 9px;
}
.purchase-funnel-context b {
  color: #e7ff70;
  font-variant-numeric: tabular-nums;
}
.purchase-funnel-pack {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(56, 214, 194, 0.19);
  border-radius: 17px;
  background: rgba(56, 214, 194, 0.055);
}
.purchase-funnel-pack > div:first-child {
  display: grid;
  gap: 2px;
}
.purchase-funnel-pack small {
  color: #6fe4d2;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.12em;
}
.purchase-funnel-pack b {
  font-size: 13px;
}
.purchase-funnel-pack span {
  color: #87979a;
  font-size: 9px;
}
.purchase-funnel-pack-price {
  text-align: right;
}
.purchase-funnel-pack-price del {
  display: block;
  min-height: 15px;
  color: #728086;
  font-size: 10px;
}
.purchase-funnel-pack-price strong {
  display: block;
  color: #e7ff70;
  font-size: 21px;
  font-weight: 950;
}
.purchase-funnel-sheet .generate-btn {
  width: 100%;
}
.purchase-funnel-all,
.purchase-funnel-later {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: center;
}
.purchase-funnel-all {
  margin-top: 9px;
  color: #78e9df;
  font-size: 10px;
  font-weight: 850;
}
.purchase-funnel-later {
  padding: 10px 0 2px;
  color: #657276;
  font-size: 9px;
}
.purchase-funnel-pack.is-offer {
  border-color: rgba(231, 255, 112, 0.28);
  background: linear-gradient(
    135deg,
    rgba(231, 255, 112, 0.06),
    rgba(56, 214, 194, 0.04)
  );
}
@media (min-width: 621px) {
  .purchase-funnel-modal {
    align-items: center;
    padding: 18px;
  }
  .purchase-funnel-sheet {
    border-radius: 24px;
  }
}

/* Spark Pro — reusable reference library + result prompt */
.reference-new-btn {
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(56, 214, 194, 0.28);
  background: rgba(56, 214, 194, 0.06);
  border-radius: 17px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-align: left;
}
.reference-new-btn > span {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--aqua);
  color: #062724;
  font-size: 22px;
  font-weight: 800;
}
.reference-new-btn b,
.reference-new-btn small {
  display: block;
}
.reference-new-btn b {
  font-size: 12px;
}
.reference-new-btn small {
  margin-top: 3px;
  color: #738287;
  font-size: 8px;
}
.reference-library-label {
  margin: 8px 2px 0;
  color: #75858a;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.reference-library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.reference-tile {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #090e10;
  color: inherit;
}
.reference-tile.selected {
  border-color: rgba(56, 214, 194, 0.62);
  box-shadow: inset 0 0 0 1px rgba(56, 214, 194, 0.2);
}
.reference-tile img,
.reference-tile video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reference-kind {
  position: absolute;
  left: 7px;
  bottom: 7px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(5, 9, 10, 0.76);
  backdrop-filter: blur(8px);
  color: #e7eeee;
  font-size: 7px;
  font-weight: 800;
}
.reference-check {
  position: absolute;
  right: 7px;
  top: 7px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--aqua);
  color: #062724;
  font-size: 10px;
  font-weight: 900;
}
.reference-library-empty {
  min-height: 112px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 22px 16px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #6f7e83;
  font-size: 9px;
  line-height: 1.45;
}
.result-prompt {
  margin-top: 12px;
  border: 1px solid var(--line);
  background: #0b1113;
  border-radius: 16px;
  padding: 13px;
}
.result-prompt-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.result-prompt-head small,
.result-prompt-head b {
  display: block;
}
.result-prompt-head small {
  color: var(--aqua);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.13em;
}
.result-prompt-head b {
  margin-top: 4px;
  font-size: 11px;
}
.result-prompt-head button {
  flex: 0 0 auto;
  min-height: 31px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #141c1f;
  color: #dbe4e6;
  padding: 0 10px;
  font-size: 8px;
  font-weight: 800;
}
.result-prompt p {
  margin: 11px 0 0;
  max-height: 190px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #d8e1e3;
  font-size: 10px;
  line-height: 1.5;
}

/* Spark growth loop: SPARK IT + smart routing */
.spark-it-card {
  margin: 14px 0 18px;
  padding: 18px;
  border: 1px solid rgba(123, 255, 145, 0.2);
  border-radius: 22px;
  background:
    radial-gradient(
      circle at 10% 0%,
      rgba(91, 255, 126, 0.16),
      transparent 44%
    ),
    linear-gradient(145deg, rgba(18, 25, 21, 0.98), rgba(10, 14, 12, 0.98));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}
.spark-it-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: #8cff9f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.spark-it-kicker i {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(140, 255, 159, 0.14);
  color: #c9ffd2;
  font-size: 9px;
  font-style: normal;
}
.spark-it-card h2 {
  margin: 0;
  max-width: 560px;
  font-size: 20px;
  line-height: 1.16;
}
.spark-it-card > p {
  margin: 7px 0 14px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}
.spark-it-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.spark-it-actions button {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
  color: #fff;
  text-align: left;
}
.spark-it-actions button:active {
  transform: scale(0.985);
}
.spark-it-actions b,
.spark-it-actions small {
  display: block;
}
.spark-it-actions b {
  font-size: 13px;
}
.spark-it-actions small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
}
.smart-route-card {
  width: 100%;
  margin: 11px 0 13px;
  padding: 12px 13px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  color: #fff;
  text-align: left;
}
.smart-route-card.active {
  border-color: rgba(111, 255, 139, 0.28);
  background: linear-gradient(
    135deg,
    rgba(94, 255, 127, 0.1),
    rgba(255, 255, 255, 0.025)
  );
}
.smart-route-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(111, 255, 139, 0.12);
}
.smart-route-copy {
  min-width: 0;
}
.smart-route-copy b,
.smart-route-copy small {
  display: block;
}
.smart-route-copy b {
  font-size: 13px;
}
.smart-route-copy b i {
  margin-left: 5px;
  color: #7cff92;
  font-size: 9px;
  font-style: normal;
}
.smart-route-copy small {
  margin-top: 3px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.smart-route-card > em {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(111, 255, 139, 0.13);
  color: #8cff9e;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}
.smart-route-card:not(.active) > em {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.48);
}
.result-variation-btn {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(111, 255, 139, 0.22);
  border-radius: 14px;
  background: rgba(111, 255, 139, 0.08);
  color: #baffc5;
  font-weight: 800;
}
@media (max-width: 390px) {
  .spark-it-actions {
    grid-template-columns: 1fr;
  }
}

/* Spark savings proof card */
.spark-savings-card {
  margin: -5px 0 16px;
  padding: 14px 15px;
  border: 1px solid rgba(111, 255, 139, 0.13);
  border-radius: 18px;
  background: rgba(111, 255, 139, 0.045);
}
.spark-savings-head {
  display: flex;
  gap: 10px;
  align-items: center;
}
.spark-savings-head > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(111, 255, 139, 0.11);
  font-size: 18px;
}
.spark-savings-head small,
.spark-savings-head b {
  display: block;
}
.spark-savings-head small {
  color: rgba(255, 255, 255, 0.45);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
}
.spark-savings-head b {
  margin-top: 2px;
  color: #a9ffb7;
  font-size: 19px;
}
.spark-savings-card p {
  margin: 9px 0 10px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  line-height: 1.45;
}
.spark-savings-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 9px;
  font-weight: 700;
}

/* First visit: compact upgrade sheet, with the bonus visible before tariffs. */
.first-visit-modal {
  position: fixed;
  inset: 0;
  z-index: 119;
  display: grid;
  align-items: end;
}
.first-visit-modal.hidden {
  display: none;
}
.first-visit-sheet {
  position: relative;
  z-index: 2;
  width: min(100%, 620px);
  max-height: min(94dvh, 960px);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0 auto;
  padding: 20px 16px calc(18px + env(safe-area-inset-bottom));
  border: 1px solid rgba(56, 214, 194, 0.22);
  border-radius: 26px 26px 0 0;
  background:
    radial-gradient(
      ellipse at top right,
      rgba(56, 214, 194, 0.13),
      transparent 44%
    ),
    #11181b;
  box-shadow: 0 -22px 70px rgba(0, 0, 0, 0.58);
}
.first-visit-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}
.first-visit-header small {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #66dfd2;
}
.first-visit-header h2 {
  font-size: clamp(23px, 6vw, 31px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 7px 0;
}
.first-visit-close {
  flex-shrink: 0;
  width: 35px;
  height: 35px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: #e8eef0;
  font-size: 26px;
}
.first-visit-lead {
  font-size: 12px;
  color: #a7b7b8;
  line-height: 1.5;
  margin: 4px 0 15px;
}
.first-visit-bonus,
.spark-bonus-panel {
  padding: 14px;
  border: 1px solid rgba(56, 214, 194, 0.3);
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    rgba(56, 214, 194, 0.15),
    rgba(11, 17, 18, 0.8)
  );
}
.spark-bonus-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.spark-bonus-top span {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #8bdcd1;
}
.spark-bonus-top strong {
  white-space: nowrap;
  font-size: 17px;
  color: #e7ff70;
}
.first-visit-bonus h3,
.spark-bonus-panel h3 {
  font-size: 16px;
  margin: 5px 0 10px;
}
.spark-bonus-panel {
  margin: 10px 0 14px;
}
.spark-bonus-panel p {
  font-size: 11px;
  color: #a8baba;
  line-height: 1.5;
  margin: 0 0 10px;
}
.spark-bonus-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.spark-bonus-form input {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(150, 226, 219, 0.22);
  border-radius: 12px;
  background: #0c1315;
  color: #f5fdfc;
  outline: none;
  text-transform: uppercase;
  font: inherit;
  font-size: 12px;
}
.spark-bonus-form input:focus {
  border-color: #44dfc8;
}
.spark-bonus-form button {
  min-height: 44px;
  padding: 0 13px;
  border: 0;
  border-radius: 12px;
  background: #b8fc92;
  color: #0b2015;
  font-weight: 900;
  font-size: 11px;
}
.spark-bonus-form button:disabled {
  opacity: 0.55;
}
.spark-bonus-status {
  display: block;
  min-height: 15px;
  font-size: 10px;
  line-height: 1.4;
  color: #aac2bb;
  margin-top: 8px;
}
.spark-bonus-status.success {
  color: #b8fc92;
}
.spark-bonus-status.error {
  color: #ff9393;
}
.first-visit-pack-heading {
  margin: 18px 2px 9px;
  display: grid;
  gap: 3px;
}
.first-visit-pack-heading b {
  font-size: 15px;
}
.first-visit-pack-heading small {
  font-size: 10px;
  color: #8ba1a4;
}
.first-visit-packs {
  display: grid;
  gap: 9px;
}
.first-visit-pack {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px 12px 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #151e21;
}
.first-visit-pack.is-offer {
  border-color: rgba(184, 252, 146, 0.58);
  background: rgba(184, 252, 146, 0.055);
}
.first-visit-pack b {
  display: block;
  font-size: 14px;
  margin-bottom: 3px;
}
.first-visit-pack .first-visit-credits {
  color: #e7ff70;
  font-size: 12px;
  font-weight: 900;
}
.first-visit-pack small {
  display: block;
  color: #a7b8b6;
  font-size: 10px;
  line-height: 1.5;
  margin-top: 4px;
}
.first-visit-pack em {
  color: #b8fc92;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  margin-left: 4px;
}
.first-visit-pack-price {
  align-self: center;
  text-align: right;
}
.first-visit-pack-price del {
  display: block;
  font-size: 10px;
  color: #849194;
}
.first-visit-pack-price strong {
  display: block;
  font-size: 17px;
  margin: 2px 0 7px;
}
.first-visit-pack-price button {
  white-space: nowrap;
  min-width: 85px;
  min-height: 35px;
  border-radius: 10px;
  border: 0;
  background: #46d9c3;
  color: #092822;
  font-size: 10px;
  font-weight: 900;
}
.first-visit-pack-price button:disabled {
  background: #526665;
  color: #a8bbbb;
}
.first-visit-footnote {
  font-size: 9px;
  line-height: 1.45;
  color: #7f9495;
  margin: 12px 4px 0;
}
.first-visit-skip {
  width: 100%;
  border: 0;
  background: transparent;
  color: #91dcd4;
  font-size: 12px;
  font-weight: 800;
  padding: 16px 8px 4px;
}
@media (min-width: 621px) {
  .first-visit-modal {
    align-items: center;
    padding: 18px;
  }
  .first-visit-sheet {
    border-radius: 24px;
  }
}

/* Browser Studio: TMA keeps its compact layout, including in wide Telegram windows. */
.desktop-sidebar,
.desktop-studio-heading,
.desktop-panel-title,
.desktop-activity {
  display: none;
}
.desktop-composer,
.desktop-inspector {
  display: contents;
}
.desktop-workspace {
  display: flex;
  flex-direction: column;
}
.desktop-workspace > .desktop-inspector > .studio-header {
  order: -1;
}
@media (min-width: 1000px) {
  body.browser-app {
    --aqua: #9cff57;
    --text: #edf2ee;
    background: #090c0a;
  }
  body.browser-app .app-shell {
    width: auto;
    max-width: none;
    margin: 0 0 0 224px;
    padding: 0 32px 40px;
  }
  body.browser-app .desktop-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 224px;
    display: flex;
    flex-direction: column;
    padding: 26px 16px 20px;
    border-right: 1px solid var(--line);
    background: #0e120f;
    z-index: 40;
    overflow-y: auto;
  }
  body.browser-app .desktop-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    margin: 0 8px 34px;
  }
  .desktop-brand b,
  .desktop-brand small {
    display: block;
  }
  .desktop-brand b {
    font-size: 13px;
    letter-spacing: 0.06em;
  }
  .desktop-brand small {
    font-size: 8px;
    color: #7c897e;
    margin-top: 5px;
    letter-spacing: 0.13em;
  }
  .desktop-sidebar nav {
    display: grid;
    gap: 5px;
  }
  .desktop-sidebar nav > small {
    color: #647268;
    font-size: 9px;
    letter-spacing: 0.12em;
    margin: 20px 12px 9px;
  }
  .desktop-sidebar button {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
    color: #99a69c;
    text-align: left;
    font-size: 13px;
    cursor: pointer;
  }
  .desktop-sidebar button span {
    width: 20px;
    font-size: 17px;
  }
  .desktop-sidebar button:hover {
    background: #19211b;
    color: #fff;
  }
  .desktop-sidebar button.active {
    color: #c8ffab;
    background: #1d2a1d;
    border-color: #344c2b;
  }
  .desktop-sidebar .desktop-account {
    margin-top: auto;
    padding-top: 28px;
  }
  .desktop-account a {
    padding: 12px;
    color: #7c897e;
    font-size: 12px;
    text-decoration: none;
  }
  body.browser-app .topbar {
    position: sticky;
    top: 0;
    height: 76px;
    margin: 0 -32px 28px;
    padding: 0 32px;
    border-bottom: 1px solid var(--line);
    background: rgba(9, 12, 10, 0.94);
    backdrop-filter: blur(16px);
    z-index: 30;
  }
  body.browser-app .topbar .brand {
    visibility: hidden;
  }
  body.browser-app .bottom-nav {
    display: none;
  }
  body.browser-app .view {
    max-width: 1600px;
    margin: 0 auto;
    padding-bottom: 24px;
  }
  body.browser-app .view.hidden {
    display: none;
  }
  body.browser-app .desktop-studio-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
  }
  .desktop-studio-heading h1 {
    font-size: 36px;
    letter-spacing: -0.04em;
    margin: 8px 0;
  }
  .desktop-studio-heading p {
    color: #819087;
    font-size: 13px;
    margin: 0;
  }
  .desktop-kind-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #111812;
  }
  .desktop-kind-tabs button {
    padding: 10px 18px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #859489;
    cursor: pointer;
  }
  .desktop-kind-tabs button.active {
    background: #253323;
    color: #d7ffbf;
  }
  body.browser-app .desktop-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
  }
  body.browser-app .desktop-composer {
    display: block;
    min-width: 0;
  }
  body.browser-app .desktop-inspector {
    display: block;
    min-width: 0;
    padding: 20px;
    background: #101611;
    border: 1px solid var(--line);
    border-radius: 20px;
  }
  body.browser-app .desktop-panel-title {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: #a2b1a5;
    letter-spacing: 0.04em;
    margin-bottom: 18px;
  }
  body.browser-app .studio-header {
    display: flex;
    margin: 0 0 18px;
  }
  body.browser-app .studio-header .studio-back,
  body.browser-app .studio-header .studio-balance {
    display: none;
  }
  body.browser-app .studio-model-card {
    width: 100%;
    min-width: 0;
  }
  body.browser-app .smart-route-card {
    margin: 0 0 16px;
    min-height: 74px;
  }
  body.browser-app .smart-route-copy small {
    white-space: normal;
  }
  body.browser-app .studio-card {
    background: #101611;
    border-radius: 20px;
    padding: 22px;
  }
  body.browser-app .studio-card-head b,
  body.browser-app .prompt-studio-head b {
    font-size: 15px;
  }
  body.browser-app .studio-card-head small {
    font-size: 12px;
  }
  body.browser-app .studio-dropzone {
    min-height: 220px;
    background: #0b110c;
  }
  body.browser-app .studio-dropzone b {
    font-size: 16px;
  }
  body.browser-app .studio-dropzone small,
  body.browser-app .studio-dropzone em {
    font-size: 11px;
  }
  body.browser-app #prompt {
    min-height: 220px;
    font-size: 16px;
    line-height: 1.65;
  }
  body.browser-app .settings-grid {
    gap: 10px;
  }
  body.browser-app .setting-button {
    background: #172018;
    min-height: 72px;
  }
  body.browser-app .setting-button small {
    font-size: 11px;
  }
  body.browser-app .setting-button b {
    font-size: 13px;
  }
  body.browser-app .studio-generate {
    position: static;
    width: 100%;
    margin: 20px 0 10px;
  }
  body.browser-app .studio-footnote {
    padding: 0;
    font-size: 10px;
  }
  body.browser-app .desktop-activity {
    display: block;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
  }
  .desktop-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .desktop-panel-heading h2 {
    font-size: 13px;
    margin: 0 0 12px;
  }
  .desktop-panel-heading button {
    border: 0;
    background: transparent;
    color: #9cff57;
    font-size: 10px;
    cursor: pointer;
  }
  .desktop-queue-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 12px;
    margin: 6px 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #172018;
    color: #c8d4cb;
    font-size: 11px;
    cursor: pointer;
  }
  .desktop-activity .empty-block {
    min-height: 70px;
    font-size: 11px;
    padding: 14px;
  }
  .desktop-latest {
    width: 100%;
    display: grid;
    gap: 10px;
    padding: 10px;
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #0b110c;
    color: #c8d4cb;
    text-align: left;
    cursor: pointer;
  }
  .desktop-latest img,
  .desktop-latest video {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    border-radius: 8px;
  }
  body.browser-app .files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
  }
  body.browser-app .file-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    border-radius: 18px;
  }
  body.browser-app .file-preview {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
  }
  body.browser-app .file-info {
    width: 100%;
    padding: 16px;
  }
  body.browser-app .file-info b {
    font-size: 14px;
  }
  body.browser-app .recent-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
  body.browser-app .recent-item {
    min-height: 200px;
  }
  body.browser-app .create-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  body.browser-app .create-card {
    min-height: 120px;
  }
  body.browser-app .spark-it-card {
    padding: 30px;
  }
  body.browser-app .spark-it-card h2 {
    font-size: 30px;
    max-width: 700px;
  }
  body.browser-app .spark-it-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 24px;
  }
  body.browser-app .spark-it-actions button {
    min-height: 82px;
  }
  body.browser-app .trend-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  body.browser-app .popular-banner {
    display: none;
  }
  body.browser-app .picker-panel {
    max-width: 620px;
  }
  body.browser-app button:focus-visible,
  body.browser-app a:focus-visible {
    outline: 2px solid #9cff57;
    outline-offset: 4px;
  }
}
@media (min-width: 1400px) {
  body.browser-app .desktop-workspace {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
  }
  body.browser-app .desktop-inspector {
    padding: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.browser-app *,
  body.browser-app *::before,
  body.browser-app *::after {
    scroll-behavior: auto;
    animation: none;
    transition: none;
  }
}

/* Opaque text surfaces preserve contrast; glass is limited to structural panels. */
:root {
  --muted: #a0afb4;
  --text-soft: #c5d0d4;
}
.duration-control {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 17px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #141d20;
}
.duration-control > span {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #c5d0d4;
}
.duration-control b {
  color: #f2f7f8;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.duration-control small {
  color: #b0c0c6;
  font-size: 11px;
}
.duration-control input {
  width: 100%;
  margin: 0;
  min-height: 28px;
  accent-color: #9cff57;
  cursor: pointer;
}
.duration-control input:focus-visible {
  outline: 2px solid #9cff57;
  outline-offset: 4px;
  border-radius: 6px;
}
.studio-mode-tabs {
  overflow-x: auto;
}
.studio-mode-tabs button {
  flex-shrink: 0;
}
body.browser-app {
  background:
    radial-gradient(ellipse at 70% 0%, #20352e 0%, transparent 50%), #0b1113;
}
@media (min-width: 1100px) {
  body.browser-app .desktop-sidebar,
  body.browser-app .desktop-inspector {
    background: linear-gradient(
      145deg,
      rgba(30, 43, 42, 0.94),
      rgba(13, 22, 24, 0.96)
    );
    border: 1px solid rgba(222, 239, 242, 0.18);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.09),
      0 18px 48px rgba(0, 0, 0, 0.2);
  }
  body.browser-app .desktop-inspector {
    border-radius: 24px;
  }
  body.browser-app .studio-card {
    background: #131e20;
    border-color: rgba(222, 239, 242, 0.17);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }
  body.browser-app .setting-button {
    background: #1a292b;
  }
  body.browser-app .studio-dropzone {
    background: #101b1d;
    border-color: rgba(176, 211, 204, 0.28);
  }
  body.browser-app .studio-dropzone:hover {
    border-color: #9cff57;
    background: #162725;
  }
  body.browser-app #prompt {
    background: #10191c;
    color: #f0f6f8;
  }
  @supports (backdrop-filter: blur(16px)) {
    body.browser-app .desktop-sidebar {
      backdrop-filter: blur(16px);
    }
  }
}
.studio-mode-tabs {
  display: flex;
  overflow-x: auto;
}
.studio-mode-tabs button {
  flex: 1 0 85px;
  color: #b4c5c9;
}
@media (min-width: 1100px) {
  body.browser-app .studio-mode-tabs button {
    flex-basis: 0;
  }
}

.audio-workspace {
  display: grid;
  gap: 20px;
}
.audio-workspace .studio-card {
  padding: 24px;
}
.audio-mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}
.audio-mode-tabs button,
.audio-inspector > button:last-child {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #172629;
  color: #e8f0f3;
  padding: 12px;
}
.audio-mode-tabs button.active {
  background: #24403c;
  border-color: #38d6c2;
}
.audio-prompt-label {
  display: block;
  font-weight: 600;
  margin-bottom: 14px;
}
#audioPrompt {
  width: 100%;
  min-height: 300px;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #0e191c;
  color: #f0f6f8;
  line-height: 1.7;
  resize: vertical;
}
.audio-prompt-count {
  text-align: right;
  color: #b0c0c6;
  font-size: 12px;
  margin-top: 10px;
}
.audio-inspector p {
  color: #c5d0d4;
  font-size: 13px;
  line-height: 1.7;
}
.audio-inspector .studio-generate {
  position: static;
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin: 24px 0;
}
.audio-file-icon {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 90px;
  font-size: 36px;
  color: #38d6c2;
  background: linear-gradient(140deg, #183e39, #15202c);
}
#resultMedia audio {
  width: 100%;
  padding: 20px;
}
@media (min-width: 1100px) {
  body.browser-app .audio-workspace {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
}
body.browser-app .desktop-sidebar nav > small,
body.browser-app .desktop-brand small {
  color: #afc0c2;
}

.audio-voice-options { border: 0; padding: 0; margin: 20px 0; display: grid; gap: 10px; min-width: 0; }
.audio-voice-options[hidden] { display: none; }
.audio-voice-options legend { font-weight: 650; margin-bottom: 10px; }
.audio-voice-options label { display: flex; align-items: center; gap: 10px; padding: 14px; background: #172629; border: 1px solid var(--line-strong); border-radius: 12px; color: #eff6f5; cursor: pointer; }
.audio-voice-options label:has(input:checked) { border-color: #38d6c2; background: #24403c; }
.audio-voice-options input { accent-color: #38d6c2; }
body:not(.browser-app) .audio-workspace { gap: 14px; }
body:not(.browser-app) .audio-workspace .studio-card { padding: 18px; min-width: 0; }
body:not(.browser-app) .audio-mode-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 20px; }
body:not(.browser-app) .audio-mode-tabs button { padding: 12px 4px; font: inherit; font-size: 13px; min-width: 0; }
body:not(.browser-app) #audioPrompt { min-height: 180px; padding: 14px; box-sizing: border-box; font: inherit; }
body:not(.browser-app) .audio-inspector .studio-generate { min-height: 58px; padding: 14px 18px; gap: 10px; align-items: center; }

/* Audio has one heading, rather than the three-column navigation header. */
#audioView > .view-head { display: block; width: 100%; min-width: 0; }
#audioView > .view-head > div { width: 100%; min-width: 0; }
#audioView > .view-head h2 { font-size: 28px; line-height: 1.2; }
#audioView > .view-head p { max-width: 60ch; margin: 10px 0 0; line-height: 1.5; }

/* Spark Pro v5.9 — Magic Create speech / geo localization */
.uniquify-localization-title {
  margin: 14px 2px 7px;
  color: #758287;
  font-size: 7px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.uniquify-localization-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.uniquify-localization-grid label {
  display: grid;
  gap: 6px;
  color: #9aa7ab;
  font-size: 8px;
  font-weight: 800;
}
.uniquify-localization-grid select,
.uniquify-localization-grid input {
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  border: 1px solid rgba(174, 110, 255, 0.22);
  border-radius: 13px;
  background: #0a0f12;
  color: #e9eef0;
  padding: 0 10px;
  font: inherit;
  color-scheme: dark;
  outline: none;
}
.uniquify-localization-grid select:focus,
.uniquify-localization-grid input:focus {
  border-color: rgba(101, 223, 204, 0.58);
  box-shadow: 0 0 0 2px rgba(101, 223, 204, 0.08);
}
.uniquify-localization-hint {
  display: block;
  margin-top: 7px;
  color: #748387;
  font-size: 7px;
  line-height: 1.45;
}
@media (max-width: 390px) {
  .uniquify-localization-grid {
    grid-template-columns: 1fr;
  }
}
