:root {
  --bg: #06090f;
  --panel: #0f131b;
  --panel-2: #131824;
  --line: #222a39;
  --header-bg: #090d16f0;
  --history-bg: #0b0f17;
  --text: #ebeff7;
  --muted: #9ea9bd;
  --field-bg: #0a0e16;
  --field-placeholder: #909bad;
  --field-label: #9ea9bd;
  --upload-title-color: #eef3ff;
  --upload-copy-color: #8d98ad;
  --selector-title-color: rgba(200, 211, 233, 0.72);
  --selector-value-color: #f2f6ff;
  --lime: #cdff22;
  --accent-text: #c5ff58;
  --button-bg: #121723;
  --button-hover: #1a2436;
  --button-line: #2a3346;
  --button-selected: #1b2435;
  --primary-button: #cdff22;
  --selector-icon: #e8eefc;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "SF Pro Display", sans-serif;
  color: var(--text);
  background: var(--bg);
}

.hidden { display: none !important; }

.screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.toast-stack {
  position: fixed;
  top: 86px;
  right: 18px;
  z-index: 140;
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.toast-note {
  min-width: 240px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(28, 33, 43, 0.96), rgba(18, 22, 30, 0.96));
  color: #f2f5fb;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: translate3d(22px, 0, 0) scale(0.98);
  opacity: 0;
  transition:
    transform 220ms cubic-bezier(0.2, 0.9, 0.2, 1),
    opacity 220ms ease;
  pointer-events: auto;
}

.toast-note.is-visible {
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
}

.toast-success {
  border-color: rgba(197, 255, 88, 0.2);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(197, 255, 88, 0.06);
}

.toast-error {
  border-color: rgba(255, 105, 105, 0.22);
}

.toast-progress {
  border-color: rgba(123, 162, 255, 0.2);
}

#login-screen {
  background:
    radial-gradient(circle at 50% 22%, rgba(205, 255, 34, 0.05), transparent 18%),
    linear-gradient(180deg, #03070d 0%, #04070c 100%);
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 220;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 18%, rgba(205, 255, 34, 0.1), transparent 24%),
    radial-gradient(circle at 50% 50%, rgba(67, 106, 24, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(4, 7, 12, 0.97), rgba(6, 9, 15, 0.99));
}

.boot-card {
  width: min(420px, 100%);
  padding: 28px 26px;
  display: grid;
  justify-items: center;
  gap: 18px;
  border-radius: 24px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(205, 255, 34, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(18, 24, 34, 0.94), rgba(12, 18, 27, 0.96));
  border-color: rgba(141, 190, 33, 0.32);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(205, 255, 34, 0.06);
}

.boot-copy {
  display: grid;
  gap: 8px;
}

.boot-eyebrow,
.boot-status {
  margin: 0;
}

.boot-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(205, 255, 34, 0.88);
}

.boot-status {
  color: #edf4ff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.boot-spinner-shell {
  width: 68px;
  height: 68px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(205, 255, 34, 0.16);
  background:
    radial-gradient(circle at 50% 50%, rgba(205, 255, 34, 0.12), rgba(205, 255, 34, 0.03) 48%, rgba(8, 13, 20, 0.88) 70%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(205, 255, 34, 0.04),
    0 0 28px rgba(205, 255, 34, 0.1);
}

.boot-spinner-icon {
  width: 34px;
  height: 34px;
}

.boot-spinner-icon .ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 3;
}

.boot-spinner-icon .ring-accent {
  fill: none;
  stroke: #cfff1a;
  stroke-width: 3;
  stroke-linecap: round;
  animation: orbit 1.1s linear infinite;
  transform-origin: 12px 12px;
}

.glass {
  background: #101421;
  border: 1px solid #252d3d;
  border-radius: 16px;
}

.auth-shell {
  width: min(560px, 92vw);
  min-height: min(820px, 100vh);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 22px;
  padding: 42px 0;
}

.auth-brand-lockup {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.auth-brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--lime);
  color: #090d16;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 900;
  overflow: hidden;
}

.auth-brand-mark.has-logo {
  padding: 0;
}

.auth-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.auth-brand-name {
  color: rgba(235, 239, 247, 0.9);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.auth-card {
  width: min(420px, 90vw);
  padding: 8px 0 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  display: grid;
  gap: 10px;
  justify-items: stretch;
}

.auth-card h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.auth-card .muted {
  text-align: center;
  font-size: 13px;
  color: rgba(158, 169, 189, 0.86);
}

.auth-legal {
  order: 10;
  margin: 12px auto 0;
  max-width: 460px;
  text-align: center;
  font-size: 11px;
  line-height: 1.45;
  color: #7f8aa0;
}

.oauth-btn {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  background: rgba(5, 8, 14, 0.55);
  color: #f2f6ff;
  border: 1px solid rgba(58, 67, 86, 0.72);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.oauth-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  flex: 0 0 20px;
}

.google-icon {
  background: linear-gradient(135deg, #4285f4 0 24%, #34a853 24% 48%, #fbbc05 48% 72%, #ea4335 72% 100%);
  color: #fff;
  font-family: "Segoe UI", "SF Pro Display", sans-serif;
}

.apple-icon {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
}

.auth-footer {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.link-btn {
  width: auto;
  padding: 0;
  border: none;
  background: transparent;
  color: #d6def0;
  font-size: 13px;
  text-decoration: underline;
}

h1, h2, h3, h4 { margin: 0; }
.muted { color: var(--muted); }
.error { min-height: 20px; color: #ff7f93; }

.stack { display: grid; gap: 12px; }

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--field-label);
}

.field-note {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 96px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--field-bg);
  color: var(--text);
  padding: 14px 16px;
  font: inherit;
  line-height: 1.45;
}

textarea::placeholder,
input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="number"]::placeholder {
  color: var(--field-placeholder);
}

textarea.auto-grow-textarea {
  resize: none;
  overflow-y: hidden;
  transition: height 180ms cubic-bezier(0.22, 1, 0.36, 1), min-height 180ms cubic-bezier(0.22, 1, 0.36, 1), border-color 140ms ease, box-shadow 140ms ease;
  will-change: height;
}

textarea:focus {
  outline: none;
  border-color: rgba(205, 255, 34, 0.5);
  box-shadow: 0 0 0 1px rgba(205, 255, 34, 0.15);
}

input.is-invalid,
textarea.is-invalid,
select.is-invalid {
  border-color: rgba(255, 110, 134, 0.92) !important;
  box-shadow: 0 0 0 1px rgba(255, 110, 134, 0.22);
}

#login-form {
  gap: 10px;
}

#login-form label {
  gap: 8px;
  font-size: 0;
  color: transparent;
}

#login-form input {
  min-height: 52px;
  border-radius: 14px;
  padding: 0 16px;
  font-size: 14px;
  border: 1px solid rgba(58, 67, 86, 0.82);
  background: rgba(4, 7, 12, 0.72);
  color: #eef3ff;
}

#login-form input::placeholder {
  color: rgba(216, 224, 239, 0.6);
}

#login-form input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6);
}

#auth-submit-btn {
  min-height: 52px;
  border-radius: 14px;
  font-size: 14px;
}

#auth-email-btn,
#auth-back-btn {
  min-height: 52px;
  border-radius: 14px;
  font-size: 14px;
}

#auth-oauth-actions {
  gap: 10px;
}

#login-error {
  text-align: center;
}

.upload-block {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.upload-block-inline {
  justify-self: start;
  max-width: min(188px, 100%);
}

.upload-block-compact .upload-shell {
  aspect-ratio: 1.08 / 1;
  min-height: 0;
  border-radius: 20px;
  padding: 10px;
}

.upload-block-compact .upload-plus,
.upload-block-compact .upload-add-icon-custom,
.upload-block-compact .upload-add-icon-bootstrap {
  width: 56px;
  height: 56px;
}

.upload-block-compact .upload-plus::before {
  font-size: 34px;
}

.upload-block-compact .upload-title {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.2;
}

.upload-block-compact .upload-copy {
  margin-top: 4px;
  max-width: 150px;
  font-size: 11px;
  line-height: 1.35;
}

.upload-block-align-tight .upload-title {
  font-size: 12px;
  margin-top: 8px;
}

.upload-block-align-tight .upload-copy {
  max-width: 128px;
  font-size: 10px;
  line-height: 1.3;
}

.upload-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.upload-row > * {
  min-width: 0;
}

.edit-upload-row {
  width: 100%;
  max-width: 100%;
  align-items: stretch;
  overflow: hidden;
}

.edit-upload-row .upload-block,
.edit-upload-row .upload-card {
  height: 100%;
}

.edit-upload-row .upload-shell {
  aspect-ratio: auto;
  min-height: 0;
  height: 228px;
}

.upload-label {
  font-size: 13px;
  color: var(--field-label);
}

.upload-card {
  position: relative;
  display: block;
  width: 100%;
  cursor: pointer;
}

.upload-card input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-shell {
  aspect-ratio: 3 / 4;
  min-height: 0;
  border-radius: 24px;
  border: 1px dashed rgba(101, 118, 153, 0.34);
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.03), transparent 24%),
    linear-gradient(180deg, rgba(21, 25, 35, 0.98), rgba(15, 19, 27, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 10px 28px rgba(0, 0, 0, 0.24);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
}

.upload-card:hover .upload-shell {
  border-color: rgba(140, 157, 194, 0.48);
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 14px 32px rgba(0, 0, 0, 0.28);
}

.upload-card.is-invalid .upload-shell {
  border-color: rgba(255, 110, 134, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(255, 110, 134, 0.08),
    0 0 0 1px rgba(255, 110, 134, 0.18);
}

.upload-card-multi .upload-shell {
  min-height: 0;
  border-radius: 24px;
}

.upload-card-compact .upload-shell {
  aspect-ratio: auto;
  min-height: 0;
  height: 160px;
}

.upload-plus {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  line-height: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(63, 71, 92, 0.26), rgba(31, 37, 52, 0.34));
  border: 1px solid rgba(106, 120, 153, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding-bottom: 10px;
}

.upload-plus::before {
  content: "+";
  font-size: 44px;
  line-height: 1;
  font-weight: 300;
  color: #c6d0e6;
  transform: translateY(-1px);
}

.upload-add-icon {
  display: grid;
  place-items: center;
}

.upload-add-icon-bootstrap {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  border: 1px solid rgba(106, 120, 153, 0.28);
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(63, 71, 92, 0.26), rgba(31, 37, 52, 0.34));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: #c6d0e6;
  font-size: 30px;
}

.upload-add-icon-bootstrap i {
  line-height: 1;
}

.bootstrap-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.bootstrap-card-icon i {
  font-size: 24px;
  line-height: 1;
}

.upload-add-icon-custom {
  width: 74px;
  height: 74px;
}

.upload-add-icon-custom svg {
  width: 100%;
  height: 100%;
  display: block;
}

.upload-title {
  margin-top: 16px;
  font-size: 17px;
  font-weight: 600;
  color: var(--upload-title-color);
}

textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select {
  width: 100%;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

textarea.auto-grow-textarea {
  resize: none;
}

.prompt-composer-field {
  display: block;
}

.imagegen-composer {
  border-radius: 24px;
  border: 1px solid var(--button-line);
  background:
    radial-gradient(circle at 18% 16%, rgba(100, 255, 190, 0.03), transparent 22%),
    linear-gradient(180deg, var(--field-bg), var(--field-bg));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 14px 32px rgba(0, 0, 0, 0.22);
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px 12px;
}

.imagegen-ref-inline-wrap {
  display: block;
  flex: 0 0 auto;
}

.imagegen-ref-inline {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.imagegen-ref-trigger {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  border: 1px solid var(--button-line);
  background: var(--button-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.imagegen-ref-trigger:hover {
  border-color: var(--button-selected);
  background: var(--button-hover);
  transform: translateY(-1px);
}

.imagegen-ref-trigger-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.imagegen-ref-trigger-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.imagegen-ref-trigger-icon i {
  font-size: 24px;
  line-height: 1;
  color: var(--selector-value-color);
}

.imagegen-ref-trigger-icon svg circle {
  display: none;
}

.imagegen-ref-trigger-icon svg path {
  stroke: var(--selector-value-color);
  stroke-width: 3;
}

.imagegen-ref-trigger-filled {
  width: 76px;
  min-width: 76px;
  height: 76px;
  border-radius: 20px;
  border-color: rgba(255, 255, 255, 0.04);
  background: var(--field-bg);
}

.imagegen-ref-list {
  display: flex;
  align-items: center;
  gap: 10px;
}

.imagegen-ref-thumb {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  background: var(--field-bg);
}

.imagegen-ref-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.imagegen-ref-more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 6, 11, 0.58);
  color: #edf3ff;
  font-size: 16px;
  font-weight: 700;
}

.imagegen-composer textarea {
  min-height: 54px;
  flex: 1 1 220px;
  border: 0;
  background: transparent;
  padding: 7px 0 0;
  font-size: 17px;
  line-height: 1.35;
  color: var(--selector-value-color);
  box-shadow: none;
}

.imagegen-composer.has-inline-refs textarea {
  flex-basis: 100%;
  min-height: 42px;
  padding-top: 0;
}

.imagegen-composer textarea::placeholder {
  color: var(--field-placeholder);
}

.imagegen-composer textarea:focus {
  outline: none;
  box-shadow: none;
  border: 0;
}


.upload-copy {
  margin-top: 6px;
  max-width: 200px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--upload-copy-color);
}

.upload-shell.has-preview {
  padding: 0;
}

.upload-preview-frame {
  width: 100%;
  height: 100%;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-media {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  display: block;
  border-radius: 16px;
  background: var(--field-bg);
}

.upload-shell.is-multi-preview {
  padding: 0;
  place-items: stretch;
}

.upload-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
}

.upload-grid-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--field-bg);
}

.upload-grid-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--field-bg);
}

.upload-grid.upload-grid-count-1 {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.upload-grid.upload-grid-count-1 .upload-grid-media {
  object-fit: contain;
}

.upload-grid.upload-grid-count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: 1fr;
}

.upload-grid.upload-grid-count-3,
.upload-grid.upload-grid-count-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.upload-overflow {
  position: absolute;
  inset: auto auto 8px 8px;
  min-width: 40px;
  height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: rgba(5, 8, 14, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
}

input, select, button, summary {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #2d3650;
  background: #11182a;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
}

@media (max-width: 760px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px !important;
  }

  #login-form input {
    font-size: 16px;
  }

  .upload-block-inline {
    max-width: min(152px, 100%);
  }

  .history-pane.is-empty-history.imagegen-history-pane,
  .history-pane.is-empty-history.imageedit-history-pane {
    display: none;
  }

  .imagegen-composer {
    padding: 10px 12px;
    gap: 8px 10px;
  }

  .imagegen-ref-inline {
    min-height: 46px;
  }

  .imagegen-ref-trigger {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .imagegen-ref-trigger-filled,
  .imagegen-ref-thumb {
    width: 62px;
    min-width: 62px;
    height: 62px;
    border-radius: 16px;
  }

  .imagegen-composer textarea {
    min-height: 46px;
    font-size: 16px;
  }
}

:root {
  --selector-width: 100%;
  --selector-height: 64px;
}

.native-select-hidden {
  display: none !important;
}

.custom-select-shell {
  position: relative;
  width: var(--selector-width-local, var(--selector-width));
  max-width: 100%;
  font-size: 14px;
  z-index: 5;
}

.custom-select-shell.is-open {
  z-index: 60;
}

.custom-select-host {
  font-size: 0;
}

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

.ui-select-button,
.ui-selector-card {
  min-height: var(--selector-height-local, var(--selector-height));
  border-radius: 16px;
  border: 1px solid var(--button-line);
  background: linear-gradient(180deg, var(--button-bg), var(--button-bg));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 10px 24px rgba(0, 0, 0, 0.18);
}

.ui-select-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  text-align: left;
}

.ui-select-copy,
.ui-select-option-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ui-select-title,
.ui-selector-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--selector-title-color);
}

.ui-select-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--selector-value-color);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ui-value-glyph,
.ui-select-option-glyph,
.ui-option-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.ui-value-glyph {
  font-size: 14px;
  color: var(--selector-value-color);
}

.ui-select-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--selector-icon);
  flex: 0 0 auto;
}

.ui-select-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ui-select-option-check {
  width: 18px;
  height: 18px;
}

.custom-select-shell.is-open .ui-select-button {
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.ui-select-menu {
  position: absolute;
  top: 0;
  left: calc(100% + 10px);
  min-width: min(320px, 42vw);
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(20, 24, 33, 0.99), rgba(14, 18, 27, 0.99));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
  z-index: 120;
}

.custom-select-shell.is-open .ui-select-menu {
  display: flex;
}

.ui-select-option {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 12px;
}

.ui-select-option-glyph {
  min-width: 18px;
  color: rgba(242, 246, 255, 0.92);
  font-size: 14px;
}

.ui-select-option:hover,
.ui-select-option.active {
  background: rgba(191, 255, 25, 0.08);
  border-color: rgba(191, 255, 25, 0.16);
}

.ui-select-option-copy strong {
  font-size: 15px;
  font-weight: 700;
  color: #f2f6ff;
}

.ui-select-option-copy small {
  font-size: 11px;
  color: rgba(200, 211, 233, 0.64);
}

.ui-select-option-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--lime);
  font-weight: 900;
  flex: 0 0 18px;
}

.is-segmented-card {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ui-segmented-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ui-segmented-option {
  min-height: calc(var(--selector-height-local, var(--selector-height)) - 24px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(232, 238, 252, 0.86);
  font-size: 14px;
  font-weight: 700;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ui-segmented-option.active {
  background: rgba(191, 255, 25, 0.12);
  border-color: rgba(191, 255, 25, 0.24);
  color: #f7ffe8;
}

input[type="color"] {
  height: 52px;
  padding: 8px;
}

button { cursor: pointer; }

.primary {
  background: var(--primary-button);
  border: none;
  color: #10140b;
  font-weight: 800;
}

.ghost {
  width: auto;
  background: var(--button-bg);
  border-color: var(--button-line);
  color: #e6ecfb;
}

.product-nav {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
  border-bottom: 1px solid #1d2534;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
}

.brand {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #fff;
  color: #090d16;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.brand.has-logo {
  padding: 0;
  overflow: hidden;
}

.brand img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.main-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.mobile-drawer-close {
  display: none;
}

.main-links a {
  color: #c7d1e7;
  text-decoration: none;
  font-size: 15px;
}

.nav-dropdown {
  position: relative;
  display: inline-flex;
  padding-bottom: 12px;
  margin-bottom: -12px;
}

.nav-dropdown-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-dropdown-toggle {
  display: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(67, 77, 99, 0.7);
  background: rgba(17, 22, 33, 0.92);
  color: #d7e0f3;
  align-items: center;
  justify-content: center;
}

.nav-dropdown-toggle span {
  font-size: 16px;
  line-height: 1;
  transform: translateY(-1px);
  display: inline-block;
  transition: transform 0.18s ease;
}

.nav-dropdown.is-open .nav-dropdown-toggle span {
  transform: translateY(-1px) rotate(90deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 320px;
  display: none;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(45, 54, 74, 0.92);
  background:
    linear-gradient(180deg, rgba(20, 24, 33, 0.98), rgba(16, 20, 29, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 18px 36px rgba(0, 0, 0, 0.3);
  z-index: 20;
}

.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  display: grid;
}

.nav-dropdown-item {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  padding: 10px 8px;
  border-radius: 14px;
  background: transparent;
  border: 1px solid transparent;
  color: #d7e0f3;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.nav-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.025);
}

.nav-dropdown-logo {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(50, 54, 61, 0.92), rgba(38, 42, 50, 0.92));
  border: 1px solid rgba(59, 69, 90, 0.55);
  display: grid;
  place-items: center;
}

.nav-dropdown-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nav-dropdown-copy {
  display: grid;
  gap: 6px;
  padding-top: 2px;
}

.nav-dropdown-copy strong {
  color: #f2f6ff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.nav-dropdown-copy small {
  color: #8e98ac;
  font-size: 13px;
  line-height: 1.35;
}

.main-links a.active { color: #fff; }
.main-links a.has-badge span {
  margin-left: 5px;
  font-size: 10px;
  background: #1f2a15;
  color: #c5ff58;
  padding: 2px 6px;
  border-radius: 10px;
}

.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  background: #121723;
  border: 1px solid #2a3346;
}

.profile-avatar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.profile-avatar-ring {
  --ring-fill: 100%;
  --ring-color: #22c55e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 3px;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, rgba(8, 10, 18, 0) 64%, rgba(8, 10, 18, 0.88) 65%),
    conic-gradient(var(--ring-color) var(--ring-fill), rgba(42, 51, 70, 0.65) 0);
  box-shadow: inset 0 0 0 1px rgba(42, 51, 70, 0.6);
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background-color: #1d2737;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.profile-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.profile-email {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: #c7d1e7;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-balance {
  margin-top: 1px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  color: #8ea0c5;
}

.top-tabs {
  display: flex;
  gap: 10px;
  padding: 12px 16px 10px;
  border-bottom: 1px solid #1d2534;
}

.top-tabs.hidden {
  display: none !important;
}

.mobile-tabs-toggle {
  display: none;
  width: 52px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.mobile-tabs-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #e6ecfb;
}

.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 12, 0.52);
  z-index: 24;
}

.tab-btn {
  width: auto;
  background: #0f131b;
  color: #dbe4f5;
}

.tab-btn.active {
  background: #1a2130;
  border-color: #3f4c68;
}

.tab-panel { display: none; padding: 14px 16px 18px; }
.tab-panel.active { display: block; }

.explore-page {
  display: grid;
  gap: 24px;
  padding: 8px 2px 18px;
}

.explore-section {
  display: grid;
  gap: 18px;
}

.explore-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.explore-section-head h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.explore-hero-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.explore-hero-card,
.explore-tile {
  display: grid;
  gap: 12px;
}

.explore-hero-media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(45, 54, 74, 0.92);
  background: linear-gradient(145deg, rgba(14, 18, 28, 0.98), rgba(11, 15, 24, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 36px rgba(0, 0, 0, 0.22);
}

.explore-hero-video,
.explore-banner picture,
.explore-banner img,
.explore-tile-media img {
  width: 100%;
  height: 100%;
  display: block;
}

.explore-hero-video,
.explore-banner img,
.explore-tile-media img {
  object-fit: cover;
}

.explore-media-fallback,
.explore-banner-fallback,
.explore-tile-fallback {
  display: grid;
  place-items: center;
  color: rgba(220, 228, 243, 0.6);
}

.explore-media-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 24%, rgba(205, 255, 34, 0.12), transparent 36%),
    linear-gradient(145deg, rgba(18, 24, 37, 0.96), rgba(12, 16, 25, 0.98));
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.explore-hero-copy {
  display: grid;
  gap: 6px;
}

.explore-hero-copy h3 {
  margin: 0;
  font-size: 29px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.explore-hero-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.explore-banner {
  position: relative;
  min-height: 360px;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(45, 54, 74, 0.92);
  background:
    radial-gradient(circle at 18% 20%, rgba(205, 255, 34, 0.09), transparent 28%),
    linear-gradient(140deg, rgba(18, 22, 31, 0.98), rgba(12, 16, 24, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 24px 48px rgba(0, 0, 0, 0.22);
}

.explore-banner picture {
  width: 100%;
  height: 100%;
}

.explore-banner-fallback {
  position: absolute;
  inset: 0;
  align-content: end;
  justify-items: start;
  gap: 10px;
  padding: 34px;
  background:
    linear-gradient(90deg, rgba(9, 12, 18, 0.86), rgba(9, 12, 18, 0.24) 52%, rgba(9, 12, 18, 0));
}

.explore-banner.has-media .explore-banner-fallback {
  background:
    linear-gradient(90deg, rgba(9, 12, 18, 0.84), rgba(9, 12, 18, 0.2) 52%, rgba(9, 12, 18, 0));
}

.explore-banner-fallback h3 {
  margin: 0;
  max-width: 560px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.explore-banner-fallback p {
  margin: 0;
  max-width: 460px;
  color: rgba(235, 239, 247, 0.82);
  font-size: 17px;
}

.explore-card-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.explore-tile-media {
  position: relative;
  aspect-ratio: 1;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(45, 54, 74, 0.92);
  background:
    linear-gradient(145deg, rgba(14, 18, 28, 0.98), rgba(11, 15, 24, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 14px 28px rgba(0, 0, 0, 0.18);
}

.explore-tile-fallback {
  position: absolute;
  inset: 0;
  font-size: 26px;
  font-weight: 800;
  background:
    radial-gradient(circle at 24% 24%, rgba(205, 255, 34, 0.08), transparent 36%),
    linear-gradient(145deg, rgba(18, 24, 37, 0.96), rgba(12, 16, 25, 0.98));
}

.explore-tile-tab {
  display: grid;
  gap: 5px;
  padding: 0 2px;
}

.explore-tile-title {
  color: #f3f6ff;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
}

.explore-tile-description {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

.admin-subsection {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(45, 54, 74, 0.8);
  background: rgba(11, 15, 24, 0.68);
}

.admin-subsection-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px 12px;
}

.admin-subsection-head h5 {
  margin: 0;
  font-size: 18px;
}

.preview-shell {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 14px;
}

.preview-rail {
  align-self: start;
  position: sticky;
  top: 80px;
  display: grid;
  gap: 10px;
}

.preview-hero-card,
.preview-panel,
.preview-stage,
.preview-footer-note {
  border: 1px solid #20293a;
  border-radius: 16px;
  background:
    radial-gradient(circle at top right, rgba(205, 255, 34, 0.06), transparent 30%),
    linear-gradient(180deg, rgba(15, 19, 27, 0.98), rgba(11, 15, 23, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 14px 28px rgba(0, 0, 0, 0.18);
}

.preview-hero-card {
  padding: 14px;
  display: grid;
  gap: 8px;
}

.preview-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c5ff58;
}

.preview-hero-card h2 {
  margin: 0;
  font-size: clamp(18px, 1.4vw, 20px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.preview-stage-head h3 {
  margin: 0;
  font-size: clamp(17px, 1.3vw, 18px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.preview-copy {
  margin: 0;
  color: #93a1b8;
  font-size: 12px;
  line-height: 1.5;
}

.preview-panel {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.preview-panel-head,
.preview-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preview-panel-head span:first-child,
.preview-stage-head h3 {
  color: #eef3ff;
}

.preview-pill,
.preview-chip {
  border-radius: 999px;
  border: 1px solid rgba(115, 142, 91, 0.32);
  background: rgba(197, 255, 88, 0.08);
  color: #d5ff7d;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 700;
}

.preview-pill.muted-pill,
.preview-chip {
  border-color: rgba(72, 87, 114, 0.44);
  background: rgba(24, 31, 45, 0.9);
  color: #b4c0d8;
}

.preview-chip.active {
  border-color: rgba(197, 255, 88, 0.36);
  color: #d5ff7d;
}

.preview-link-btn {
  width: auto;
  padding: 0;
  border: none;
  background: transparent;
  color: #9fb0cf;
  font-size: 12px;
}

.preview-drop {
  padding: 8px;
  border-radius: 14px;
  border: 1px solid #232d40;
  background: linear-gradient(180deg, rgba(12, 16, 25, 0.9), rgba(9, 13, 20, 0.94));
  display: grid;
  gap: 8px;
}

.preview-drop-character {
  grid-template-columns: 88px 1fr;
  align-items: start;
}

.preview-portrait {
  border-radius: 12px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(47, 57, 79, 0.8);
  background-size: cover;
  background-position: center;
}

.preview-portrait-main {
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 220, 199, 0.75), rgba(255, 220, 199, 0.02) 18%),
    radial-gradient(circle at 52% 36%, rgba(80, 46, 33, 0.68), transparent 18%),
    radial-gradient(circle at 49% 58%, rgba(153, 188, 214, 0.4), transparent 22%),
    linear-gradient(180deg, #f6f7fb 0%, #e7e9ef 34%, #bbc7d7 35%, #2d3b4f 65%, #1a2030 100%);
}

.preview-drop-copy {
  display: grid;
  gap: 4px;
}

.preview-drop-copy strong {
  color: #eef3ff;
  font-size: 13px;
}

.preview-drop-copy span,
.preview-result-meta span,
.preview-footer-note {
  color: #91a0b8;
  font-size: 11px;
  line-height: 1.45;
}

.preview-thumb-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.preview-thumb {
  position: relative;
  border-radius: 12px;
  aspect-ratio: 3 / 4;
  border: 1px solid #243046;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.preview-video-a {
  background:
    radial-gradient(circle at 60% 28%, rgba(245, 210, 184, 0.35), transparent 15%),
    linear-gradient(180deg, #353f56, #151c28 55%, #0d121b);
}

.preview-video-b {
  background:
    radial-gradient(circle at 40% 24%, rgba(255, 218, 198, 0.28), transparent 16%),
    linear-gradient(180deg, #5b4e4b, #241d22 58%, #121118);
}

.preview-video-c {
  background:
    radial-gradient(circle at 52% 30%, rgba(249, 220, 205, 0.26), transparent 16%),
    linear-gradient(180deg, #45422f, #1f2118 56%, #10140f);
}

.preview-video-d {
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(26, 33, 48, 0.98), rgba(14, 18, 28, 0.98)),
    radial-gradient(circle at 50% 30%, rgba(197, 255, 88, 0.08), transparent 28%);
}

.preview-video-d span {
  display: inline-flex;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(8, 11, 18, 0.78);
  border: 1px solid rgba(67, 79, 102, 0.6);
  font-size: 12px;
  font-weight: 700;
  color: #e8eefc;
}

.preview-settings {
  display: grid;
  gap: 6px;
}

.preview-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(12, 16, 25, 0.86);
  border: 1px solid #222c40;
}

.preview-setting span {
  color: #91a0b8;
  font-size: 11px;
}

.preview-setting strong {
  color: #eef3ff;
  font-size: 11px;
}

.preview-generate-btn {
  padding: 10px 12px;
  background: linear-gradient(180deg, #dbff54, #b9eb25);
  color: #071008;
  border: 1px solid rgba(205, 255, 34, 0.42);
  font-weight: 800;
  box-shadow: 0 18px 34px rgba(154, 191, 29, 0.22);
}

.preview-stage {
  padding: 12px;
  display: grid;
  gap: 12px;
}

.preview-stage-actions {
  display: inline-flex;
  gap: 8px;
}

.preview-canvas {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.preview-result-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid #243047;
  background: linear-gradient(180deg, rgba(12, 16, 25, 0.9), rgba(9, 12, 19, 0.94));
  overflow: hidden;
}

.preview-result-media {
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(44, 56, 80, 0.8);
}

.preview-scene-1 {
  background:
    radial-gradient(circle at 50% 26%, rgba(247, 216, 198, 0.24), transparent 15%),
    linear-gradient(180deg, #6c6f73 0%, #2d3541 42%, #121720 100%);
}

.preview-scene-2 {
  background:
    radial-gradient(circle at 44% 24%, rgba(255, 226, 204, 0.24), transparent 16%),
    linear-gradient(180deg, #736753 0%, #2a241f 50%, #131116 100%);
}

.preview-scene-3 {
  background:
    radial-gradient(circle at 54% 24%, rgba(247, 220, 204, 0.2), transparent 16%),
    linear-gradient(180deg, #455a6c 0%, #1d2632 48%, #0e131a 100%);
}

.preview-scene-4 {
  background:
    radial-gradient(circle at 50% 24%, rgba(246, 219, 201, 0.18), transparent 16%),
    linear-gradient(180deg, #5f4d56 0%, #261f26 48%, #110f14 100%);
}

.preview-result-overlay {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-action {
  width: auto;
  padding: 6px 8px;
  border-radius: 9px;
  background: rgba(18, 23, 35, 0.92);
  border: 1px solid #2b354b;
  color: #dfe7f8;
  font-size: 11px;
  font-weight: 700;
}

.preview-processing-chip,
.preview-failed-chip {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.preview-processing-chip {
  background: rgba(9, 15, 23, 0.8);
  border: 1px solid rgba(197, 255, 88, 0.24);
  color: #d8ff77;
}

.preview-processing-chip.subtle {
  border-color: rgba(100, 116, 146, 0.28);
  color: #ccd7eb;
}

.preview-failed-chip {
  background: rgba(31, 12, 17, 0.8);
  border: 1px solid rgba(255, 104, 122, 0.25);
  color: #ff8a9b;
}

.preview-orbit {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid rgba(80, 92, 118, 0.5);
  border-top-color: currentColor;
  display: inline-block;
  animation: spin 1s linear infinite;
}

.preview-result-meta {
  display: grid;
  gap: 4px;
}

.preview-result-meta strong {
  color: #eef3ff;
  font-size: 12px;
}

.preview-footer-note {
  padding: 10px 12px;
}

.preview-studio-layout .control-rail,
.preview-studio-layout .history-pane {
  background:
    radial-gradient(circle at top right, rgba(205, 255, 34, 0.05), transparent 28%),
    linear-gradient(180deg, rgba(15, 19, 27, 0.98), rgba(11, 15, 23, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 14px 28px rgba(0, 0, 0, 0.16);
}

.preview-studio-layout .control-rail {
  border-color: #2c3550;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 36px rgba(0, 0, 0, 0.2);
}

.preview-studio-layout .history-pane {
  border-color: #27324a;
}

.preview-studio-layout .upload-label {
  color: #b5c0d8;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.preview-studio-layout .upload-shell {
  border-color: rgba(92, 108, 139, 0.34);
  background:
    radial-gradient(circle at 50% 12%, rgba(205, 255, 34, 0.04), transparent 20%),
    linear-gradient(180deg, rgba(17, 22, 34, 0.98), rgba(11, 15, 24, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    inset 0 0 0 1px rgba(205, 255, 34, 0.02),
    0 12px 24px rgba(0, 0, 0, 0.16);
}

.preview-studio-layout .upload-grid {
  gap: 6px;
  padding: 6px;
}

.preview-studio-layout .upload-grid-item,
.preview-studio-layout .preview-static-media {
  border-radius: 10px;
}

.preview-studio-layout .prompt-toggle-block,
.preview-studio-layout .preview-live-block,
.preview-studio-layout .preview-live-details {
  border-color: #2b3550;
  background:
    linear-gradient(180deg, rgba(19, 25, 38, 0.96), rgba(14, 19, 29, 0.96));
}

.preview-studio-layout label {
  color: #b0bbd1;
  font-size: 12px;
}

.preview-studio-layout input[type="text"],
.preview-studio-layout input[type="password"],
.preview-studio-layout select {
  min-height: 38px;
  border-color: #333f5d;
  background:
    linear-gradient(180deg, rgba(11, 15, 24, 0.95), rgba(9, 12, 20, 0.95));
  color: #eef3ff;
}

.preview-studio-layout input[readonly],
.preview-studio-layout select:disabled {
  opacity: 1;
  cursor: default;
}

.preview-studio-layout .primary.preview-live-generate {
  background: linear-gradient(180deg, #dcff5a 0%, #c5f334 100%);
  color: #091008;
  border-color: rgba(205, 255, 34, 0.5);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.preview-studio-layout .history-toolbar {
  padding: 6px;
  border-radius: 14px;
  border: 1px solid #263147;
  background: linear-gradient(180deg, rgba(15, 19, 30, 0.94), rgba(11, 14, 22, 0.94));
}

.preview-studio-layout .history-toolbar .mode {
  border-radius: 10px;
  border-color: transparent;
  background: transparent;
  color: #93a1bc;
  font-size: 12px;
}

.preview-studio-layout .history-toolbar .mode.active {
  background: linear-gradient(180deg, rgba(30, 37, 54, 0.96), rgba(22, 28, 42, 0.96));
  border-color: #36425f;
  color: #eef3ff;
}

.preview-studio-layout .history-pane h4 {
  color: #f2f6ff;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.preview-studio-layout .batch-head {
  margin-bottom: 8px;
}

.preview-studio-layout .batch-chip {
  border-color: rgba(205, 255, 34, 0.18);
  background: rgba(205, 255, 34, 0.06);
  color: #d6ff70;
}

.preview-studio-layout .batch-id {
  color: #8795b0;
}

.preview-studio-layout .preview-card {
  border-color: #2c3852;
  background:
    radial-gradient(circle at top right, rgba(205, 255, 34, 0.03), transparent 28%),
    linear-gradient(180deg, rgba(14, 19, 28, 0.95), rgba(10, 14, 22, 0.97));
}

.preview-studio-layout .preview-card .media-shell {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(47, 57, 80, 0.72);
  background: rgba(9, 12, 19, 0.8);
}

.preview-studio-layout .preview-card .icon-btn {
  border-radius: 10px;
  border-color: #34405d;
  background: rgba(18, 24, 36, 0.92);
  color: #e4ecfb;
}

.preview-studio-layout .preview-card .icon-btn:hover {
  border-color: rgba(205, 255, 34, 0.18);
  background: rgba(23, 30, 44, 0.98);
}

.preview-studio-layout .state-badge {
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}

.preview-shell-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.preview-shell-pill,
.preview-history-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(197, 255, 88, 0.16);
  background: rgba(197, 255, 88, 0.06);
  color: #d7ff72;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.preview-shell-caption {
  color: #8d99af;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.preview-inline-note {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #2a3248;
  background:
    radial-gradient(circle at top right, rgba(205, 255, 34, 0.14), transparent 36%),
    linear-gradient(135deg, #131a28, #0d1220);
}

.preview-inline-note h3 {
  margin: 0 0 4px;
}

.preview-static-card {
  cursor: default;
}

.preview-static-shell {
  border-style: solid;
  border-color: rgba(70, 82, 108, 0.34);
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.02), transparent 24%),
    linear-gradient(180deg, rgba(16, 20, 31, 0.98), rgba(11, 15, 23, 0.98));
}

.preview-static-media {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
}

.preview-character-poster {
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 220, 199, 0.7), rgba(255, 220, 199, 0.02) 18%),
    radial-gradient(circle at 52% 36%, rgba(80, 46, 33, 0.65), transparent 18%),
    radial-gradient(circle at 49% 58%, rgba(153, 188, 214, 0.34), transparent 22%),
    linear-gradient(180deg, #f6f7fb 0%, #e7e9ef 34%, #bbc7d7 35%, #2d3b4f 65%, #1a2030 100%);
}

.preview-live-block,
.preview-live-details {
  border-radius: 12px;
  border: 1px solid rgba(42, 52, 74, 0.92);
  background:
    linear-gradient(180deg, rgba(18, 24, 36, 0.95), rgba(14, 19, 29, 0.95));
  padding: 8px;
}

.preview-live-field {
  gap: 5px;
  font-size: 12px;
  color: #a4b0c7;
}

.preview-live-block input,
.preview-live-block select,
.preview-live-details input {
  background: rgba(9, 13, 20, 0.86);
  min-height: 38px;
  border-color: rgba(51, 62, 85, 0.9);
  color: #edf2ff;
  font-size: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.preview-live-details summary {
  cursor: default;
  color: #dfe7fa;
  font-size: 13px;
  font-weight: 700;
}

.preview-live-generate {
  box-shadow: 0 14px 28px rgba(154, 191, 29, 0.18);
}

.preview-history-pane {
  padding: 10px;
}

.preview-history-toolbar {
  margin-bottom: 10px;
}

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

.preview-history-head h4 {
  margin: 0;
}

.preview-batch-section {
  padding: 10px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(13, 18, 28, 0.92), rgba(10, 14, 21, 0.96));
  border: 1px solid rgba(38, 49, 70, 0.95);
}

.preview-batch-grid {
  gap: 10px;
}

.preview-card {
  background:
    linear-gradient(180deg, rgba(14, 19, 28, 0.92), rgba(10, 14, 22, 0.96));
  border-color: rgba(36, 48, 71, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.02),
    0 10px 22px rgba(0, 0, 0, 0.14);
}

.preview-card .icon-btn {
  min-width: 0;
  padding: 8px 10px;
  border-color: rgba(53, 64, 86, 0.88);
  background: rgba(20, 25, 36, 0.92);
  color: #dce6fb;
  font-size: 11px;
  font-weight: 700;
}

.preview-card .icon-btn:hover {
  border-color: rgba(197, 255, 88, 0.18);
  background: rgba(24, 31, 44, 0.96);
}

.studio-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 14px;
}

.control-rail {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  align-self: start;
  position: sticky;
  top: 80px;
  z-index: 40;
}

.control-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.control-stack > * {
  flex: 0 0 100%;
  min-width: 0;
}

.control-stack > [data-ui-field] {
  flex: 0 0 var(--control-field-width-local, 100%);
  max-width: var(--control-field-width-local, 100%);
}

.builder-hero {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #2a3248;
  background:
    radial-gradient(circle at top right, rgba(205, 255, 34, 0.18), transparent 36%),
    linear-gradient(135deg, #131a28, #0d1220);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-text);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.builder-groups {
  display: grid;
  gap: 12px;
}

.builder-group {
  padding: 10px;
  border-radius: 14px;
  border: 1px solid #273046;
  background: #101624;
}

.builder-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  color: #dfe7fa;
  font-size: 13px;
  font-weight: 700;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.choice-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  min-height: 60px;
  border-radius: 12px;
  border: 1px solid #2a344a;
  background: linear-gradient(180deg, #131b2a, #101625);
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.choice-card:hover {
  border-color: #445578;
  transform: translateY(-1px);
}

.choice-card input {
  position: absolute;
  opacity: 0;
  inset: 0;
  pointer-events: none;
}

.choice-card:has(input:checked) {
  border-color: #c5ff58;
  background:
    radial-gradient(circle at top right, rgba(205, 255, 34, 0.14), transparent 35%),
    linear-gradient(180deg, #172131, #111827);
  box-shadow: inset 0 0 0 1px rgba(205, 255, 34, 0.22);
}

.choice-thumb,
.choice-swatch {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}

.choice-thumb {
  background: linear-gradient(135deg, #20283a, #171f2e);
  border: 1px solid #303a52;
  color: #d9e3f7;
  font-size: 11px;
  font-weight: 800;
}

.choice-swatch {
  border-radius: 999px;
  background: var(--swatch);
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.choice-copy {
  display: grid;
  gap: 2px;
}

.choice-copy strong {
  color: #eef3ff;
  font-size: 12px;
}

details {
  border: 1px solid #273146;
  border-radius: 12px;
  padding: 8px;
  background: #111827;
}

summary {
  background: #161d2d;
  margin-bottom: 8px;
}

.checkline {
  grid-template-columns: 20px 1fr;
  align-items: center;
}

.status {
  display: none;
}

.history-pane {
  position: relative;
  z-index: 1;
  background: var(--history-bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}

.history-pane .pane-head {
  margin-bottom: 14px;
}

.history-pane.is-empty-history .grid:empty {
  min-height: 0;
}

.history-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.mode {
  width: auto;
  background: var(--button-bg);
  border-color: var(--button-line);
  color: #d7e0f3;
}

.mode.active { background: var(--button-selected); }

.load-more {
  margin-left: auto;
}

.prompt-toggle-block {
  display: grid;
  gap: 8px;
}

.prompt-fields textarea {
  min-height: 112px;
}

.motion-loop-widget {
  width: 100%;
  min-height: 156px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.04), transparent 28%),
    linear-gradient(180deg, rgba(20, 24, 33, 0.98), rgba(14, 18, 27, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 12px 28px rgba(0, 0, 0, 0.18);
}

.motion-loop-video {
  width: 100%;
  height: 100%;
  min-height: 156px;
  display: block;
  object-fit: cover;
  pointer-events: none;
}

.highlight-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(36, 49, 75, 0.9);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.03), transparent 30%),
    linear-gradient(180deg, rgba(18, 23, 34, 0.98), rgba(14, 18, 27, 0.98));
}

.highlight-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.highlight-editor-head h4 {
  margin: 4px 0 0;
  font-size: 16px;
}

.highlight-stage {
  position: relative;
  width: 100%;
  min-height: clamp(220px, 38vw, 340px);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(49, 62, 89, 0.9);
  background:
    linear-gradient(135deg, rgba(15, 20, 31, 0.98), rgba(9, 13, 20, 0.98));
  display: grid;
  place-items: center;
}

.highlight-stage.is-empty {
  padding: 18px;
}

.highlight-empty-state {
  max-width: 280px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
}

.highlight-preview-image,
.highlight-mask-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.highlight-preview-image {
  object-fit: contain;
  background: #080c14;
}

.highlight-mask-canvas {
  cursor: crosshair;
  touch-action: none;
}

.highlight-brush-row {
  display: grid;
  gap: 8px;
}

.highlight-brush-row span {
  font-size: 12px;
  color: var(--muted);
}

#imageedit-results .card {
  min-height: 220px;
}

.prompt-toggle-btn {
  justify-self: start;
  width: auto;
}

.prompt-fields {
  display: grid;
  gap: 8px;
}

.builder-subcopy {
  margin: 0 0 12px;
}

.admin-section {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid #273046;
  background: #101624;
}

.admin-section h4 {
  margin: 0;
}

.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-nav-items {
  display: grid;
  gap: 10px;
}

.admin-nav-row {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #283148;
  background: #0f1522;
}

.admin-child-list {
  display: grid;
  gap: 8px;
}

.admin-child-row {
  display: grid;
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid #243048;
  background: #0b111d;
}

.admin-child-logo-preview {
  display: inline-flex;
  width: 40px;
  height: 40px;
  margin-top: 8px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #283148;
  background: #101624;
}

.admin-child-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 72px;
  display: grid;
  gap: 14px;
}

.admin-overview-card,
.admin-settings-section {
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(15, 20, 31, 0.96), rgba(10, 15, 24, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 14px 30px rgba(0, 0, 0, 0.18);
}

.admin-overview-card {
  padding: 18px;
}

.admin-overview-card h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.admin-overview-card p:last-child {
  margin-bottom: 0;
}

.admin-anchor-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(12, 17, 27, 0.9);
}

.admin-anchor-list a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #dfe7fa;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
}

.admin-anchor-list a:hover {
  background: rgba(191, 255, 25, 0.07);
  border-color: rgba(191, 255, 25, 0.14);
}

.admin-settings-form {
  display: grid;
  gap: 18px;
}

.admin-settings-section {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.admin-settings-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.admin-settings-head h4 {
  margin: 2px 0 6px;
  font-size: 20px;
}

.admin-settings-head p:last-child {
  margin-bottom: 0;
}

.admin-grid-two,
.admin-grid-three,
.admin-toggle-grid {
  display: grid;
  gap: 12px;
}

.admin-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-toggle-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-save-row {
  display: flex;
  justify-content: flex-end;
}

.admin-inline-save {
  margin-top: 10px;
}

.admin-control-option-editor {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.admin-control-option-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 140px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.admin-control-option-index {
  font-size: 12px;
  font-weight: 700;
  color: rgba(200, 211, 233, 0.72);
  padding-top: 10px;
}

.admin-control-option-title {
  font-size: 14px;
  font-weight: 700;
  color: #eef3ff;
  padding-top: 10px;
}

.admin-control-option-icon {
  gap: 6px;
}

.admin-control-option-icon textarea {
  min-height: 58px;
}

.admin-control-option-icon input[type="number"] {
  width: 100%;
}

.admin-control-prompt-row {
  grid-template-columns: 108px minmax(0, 1fr);
}

.admin-control-prompt-text textarea {
  min-height: 112px;
}

.admin-save-row .primary {
  width: auto;
  min-width: 220px;
}

.checkline.compact {
  margin: 0;
}

.builder-result-entry {
  display: grid;
  gap: 8px;
}

.builder-name-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #273147;
  background: #101722;
  color: #e6eefc;
  font-size: 14px;
}

.builder-name-input:focus {
  outline: none;
  border-color: #c5ff58;
  box-shadow: 0 0 0 1px rgba(197, 255, 88, 0.35);
}

h4 {
  margin: 4px 0 12px;
  font-size: 28px;
  font-weight: 800;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.batch-stack {
  display: grid;
  gap: 16px;
}

#video-results.batch-stack {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  align-items: start;
}

#video-results .batch-group {
  height: fit-content;
}

.history-sentinel {
  width: 100%;
  height: 1px;
}

.batch-group {
  display: grid;
  gap: 10px;
}

.batch-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.batch-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #dbe5fb;
  background: #101826;
  border: 1px solid #263147;
}

.batch-group.is-active .batch-chip {
  color: #13200a;
  background: #c5ff58;
  border-color: transparent;
}

.batch-id {
  font-size: 12px;
  color: #8692aa;
}

.card {
  position: relative;
  background: linear-gradient(180deg, #111722, #0f141f);
  border: 1px solid #273147;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
}

.card.is-selected {
  border-color: rgba(205, 255, 34, 0.75);
  box-shadow: 0 0 0 1px rgba(205, 255, 34, 0.22);
}

.card.processing {
  background:
    radial-gradient(circle at 20% 10%, rgba(205, 255, 34, 0.05), transparent 28%),
    linear-gradient(180deg, #12171f, #0f1319);
  animation: breatheGlow 4.8s ease-in-out infinite;
  animation-delay: var(--pulse-delay, 0s);
}

.card.failed {
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 95, 95, 0.06), transparent 30%),
    linear-gradient(180deg, #181419, #121216);
  border-color: #3a2630;
}

.card.connection_lost {
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 95, 95, 0.06), transparent 30%),
    linear-gradient(180deg, #181419, #121216);
  border-color: #3a2630;
}

.card.done {
  background: linear-gradient(180deg, #121822, #0f151f);
}

.card-media-shell {
  position: relative;
  min-height: 270px;
  border-radius: inherit;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
}

.card img, .card video, .card-placeholder {
  width: 100%;
  height: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: inherit;
  background: #05070d;
}

.card-placeholder {
  background:
    radial-gradient(circle at 18% 14%, rgba(205, 255, 34, 0.03), transparent 20%),
    linear-gradient(180deg, #171b22, #12151b);
}

.preview-btn {
  all: unset;
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.media-preview {
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
}

.state-badge,
.icon-btn {
  position: absolute;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(35, 38, 45, 0.72);
  backdrop-filter: blur(6px);
  color: #eef5ff;
}

.state-badge {
  top: 14px;
  left: 14px;
  pointer-events: none;
}

.processing-badge svg {
  width: 26px;
  height: 26px;
}

.processing-badge .ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 3;
}

.processing-badge .ring-accent {
  fill: none;
  stroke: #cfff1a;
  stroke-width: 3;
  stroke-linecap: round;
  animation: orbit 1.1s linear infinite;
  transform-origin: 12px 12px;
}

.failed-badge svg,
.icon-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.failed-badge i,
.icon-btn i {
  font-size: 22px;
  line-height: 1;
}

.failed-badge {
  color: #ffffff;
}

.card.is-favorite::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(205, 255, 34, 0.85), rgba(205, 255, 34, 0));
  z-index: 2;
}

.failed::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 97, 97, 0.8), rgba(255, 97, 97, 0));
  z-index: 2;
}

.connection_lost::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 97, 97, 0.8), rgba(255, 97, 97, 0));
  z-index: 2;
}

.media-actions,
.failed-actions {
  position: absolute;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.bottom-actions {
  right: 12px;
  bottom: 12px;
}

.card-top-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  z-index: 3;
}

.card-top-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  color: #eff4ff;
  cursor: pointer;
}

.card-top-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-top-btn i {
  font-size: 20px;
  line-height: 1;
}

.card-select-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
}

.card-menu-trigger svg {
  fill: currentColor;
  stroke: none;
}

.card-top-btn.is-selected {
  color: #d9ff58;
}

.card-menu-shell {
  position: absolute;
  top: 48px;
  right: 0;
  min-width: 170px;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 13, 19, 0.96);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(14px);
}

.card.menu-open .card-menu-shell {
  display: flex;
}

.card-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #eef4ff;
  text-align: left;
  font: inherit;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.card-menu-item i {
  font-size: 14px;
  line-height: 1;
  opacity: 0.92;
}

.card-menu-item span {
  flex: 1 1 auto;
}

.card-menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.card-menu-item.is-disabled {
  opacity: 0.38;
  cursor: default;
  pointer-events: none;
}

.failed-actions {
  right: 12px;
  bottom: 12px;
}

.media-actions .icon-btn,
.failed-actions .icon-btn {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
}

.icon-btn {
  cursor: pointer;
  text-decoration: none;
  z-index: 2;
}

.icon-btn:hover {
  border-color: var(--button-line);
  background: var(--button-hover);
}

.icon-btn[disabled] {
  opacity: 0.45;
  cursor: default;
}

.card p { display: none; }

.loader {
  width: 14px;
  height: 14px;
  border: 2px solid #5f6d8e;
  border-top-color: #d7ff3f;
  border-radius: 999px;
  display: inline-block;
  margin-right: 6px;
  vertical-align: -2px;
  animation: spin 1s linear infinite;
}

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

.app-dialog {
  position: fixed;
  inset: 0;
  z-index: 120;
}

.app-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 12, 0.76);
  backdrop-filter: blur(8px);
}

.app-dialog-card {
  position: relative;
  width: min(92vw, 520px);
  margin: 14vh auto 0;
  padding: 22px 22px 18px;
  border-radius: 20px;
  border: 1px solid rgba(60, 78, 128, 0.7);
  background:
    linear-gradient(160deg, rgba(12, 20, 38, 0.96), rgba(7, 11, 20, 0.98));
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.app-dialog-head {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.app-dialog-head h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
  color: var(--text);
}

.app-dialog-message {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.app-dialog-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.app-dialog-actions .primary {
  min-width: 110px;
}

.preview-backdrop {
  position: absolute;
  inset: 0;
  background: #030509e8;
}

.preview-content {
  position: relative;
  width: min(92vw, 1050px);
  margin: 4vh auto;
  background: #0f131c;
  border: 1px solid #2b3246;
  border-radius: 16px;
  padding: 10px;
}

#preview-body img, #preview-body video {
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 12px;
  background: #06090f;
}

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

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

@keyframes breatheGlow {
  0%, 100% {
    box-shadow: inset 0 0 0 1px rgba(205, 255, 34, 0.02);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(205, 255, 34, 0.07);
  }
}

.billing-shell {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: clamp(6px, 1.4vw, 14px);
}

.billing-panel {
  width: min(100%, 760px);
  padding: clamp(18px, 2.8vw, 28px);
  border-radius: 28px;
  border: 1px solid rgba(36, 48, 74, 0.9);
  background:
    radial-gradient(circle at 50% 0%, rgba(205, 255, 34, 0.08), transparent 24%),
    radial-gradient(circle at 12% 18%, rgba(65, 108, 255, 0.08), transparent 20%),
    radial-gradient(circle at 88% 28%, rgba(255, 32, 136, 0.08), transparent 18%),
    linear-gradient(180deg, rgba(5, 8, 14, 0.98), rgba(8, 11, 18, 0.98));
  box-shadow:
    0 40px 110px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: grid;
  gap: 16px;
}

.billing-panel-head {
  display: grid;
  gap: 10px;
  text-align: center;
  justify-items: center;
}

.billing-panel-head h2 {
  font-size: clamp(28px, 4.2vw, 42px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.billing-panel-head .muted {
  max-width: 560px;
  font-size: 14px;
  line-height: 1.45;
}

.billing-balance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.billing-balance-chip,
.billing-availability {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #f2f6ff;
  font-size: 13px;
  font-weight: 600;
}

.billing-availability {
  color: rgba(224, 232, 246, 0.74);
}

.billing-toggle {
  width: fit-content;
  margin: 0 auto;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.billing-toggle-btn {
  min-height: 42px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(218, 226, 240, 0.72);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.billing-toggle-btn.active {
  background:
    linear-gradient(180deg, rgba(54, 60, 71, 0.9), rgba(35, 40, 50, 0.94));
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 22px rgba(0, 0, 0, 0.24);
}

.billing-content {
  display: grid;
  gap: 12px;
}

.billing-featured-slot,
.billing-package-list,
.billing-upgrade-list {
  display: grid;
  gap: 12px;
}

.billing-featured-card,
.billing-card,
.billing-upgrade-card {
  position: relative;
  border-radius: 24px;
  border: 1px solid rgba(31, 40, 60, 0.9);
  background:
    radial-gradient(circle at 0% 10%, rgba(255, 255, 255, 0.035), transparent 24%),
    linear-gradient(135deg, rgba(24, 28, 37, 0.98), rgba(17, 20, 29, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 22px 44px rgba(0, 0, 0, 0.26);
}

.billing-featured-card,
.billing-card {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(180px, 0.72fr);
  gap: 14px;
  padding: clamp(14px, 2.2vw, 20px);
  align-items: center;
}

.billing-card.is-popular {
  border-color: rgba(202, 255, 36, 0.58);
  background:
    radial-gradient(circle at 28% 50%, rgba(121, 255, 0, 0.28), transparent 30%),
    radial-gradient(circle at 72% 45%, rgba(205, 255, 34, 0.12), transparent 18%),
    linear-gradient(135deg, rgba(28, 36, 16, 0.97), rgba(22, 28, 17, 0.98) 32%, rgba(17, 22, 28, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(205, 255, 34, 0.14),
    0 24px 56px rgba(0, 0, 0, 0.32);
}

.billing-card.is-value {
  border-color: rgba(72, 88, 126, 0.8);
}

.billing-card.is-unavailable,
.billing-featured-card.is-unavailable {
  opacity: 0.7;
}

.billing-card-main,
.billing-upgrade-copy {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.billing-title-row,
.billing-chip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.billing-title {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.billing-card .billing-title {
  font-size: clamp(18px, 2vw, 24px);
}

.billing-chip,
.billing-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.billing-chip {
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(239, 244, 255, 0.94);
}

.billing-pill {
  border: 0;
  background: linear-gradient(90deg, #ff0c7a, #ff3ec5);
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 0, 128, 0.22);
}

.billing-pill.is-highlight {
  background: linear-gradient(90deg, #b1ff12, #deff6d);
  color: #152000;
  box-shadow: 0 10px 22px rgba(205, 255, 34, 0.22);
}

.billing-benefits {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.billing-benefits li {
  position: relative;
  padding-left: 20px;
  color: rgba(214, 223, 238, 0.68);
  font-size: 13px;
  line-height: 1.35;
}

.billing-benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: rgba(214, 223, 238, 0.56);
}

.billing-meter {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.billing-meter-labels {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  color: rgba(200, 211, 233, 0.5);
  font-size: 10px;
  font-weight: 600;
}

.billing-meter-labels span:first-child {
  color: #fff;
}

.billing-meter-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.billing-meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffffff, rgba(205, 255, 34, 0.64));
}

.billing-card-side {
  display: grid;
  gap: 10px;
  justify-items: end;
  align-content: center;
}

.billing-price-wrap {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.billing-compare {
  color: #ff0c7a;
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 800;
  letter-spacing: -0.05em;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(255, 12, 122, 0.88);
}

.billing-price {
  color: #fff;
  font-size: clamp(22px, 2.8vw, 34px);
  font-weight: 900;
  letter-spacing: -0.05em;
}

.billing-card .billing-compare {
  font-size: clamp(15px, 1.8vw, 22px);
}

.billing-card .billing-price {
  font-size: clamp(18px, 2.2vw, 26px);
}

.billing-purchase-btn,
.billing-upgrade-cta {
  width: min(100%, 170px);
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #deff0f, #b8f300);
  color: #12170a;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow:
    inset 0 -2px 0 rgba(0, 0, 0, 0.1),
    0 14px 26px rgba(137, 181, 0, 0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.billing-card.is-popular .billing-purchase-btn {
  background: linear-gradient(180deg, #f3f3f3, #d9d9d9);
  color: #171717;
  box-shadow:
    inset 0 -2px 0 rgba(0, 0, 0, 0.08),
    0 14px 24px rgba(0, 0, 0, 0.24);
}

.billing-purchase-btn:hover,
.billing-upgrade-cta:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 -2px 0 rgba(0, 0, 0, 0.1),
    0 16px 30px rgba(137, 181, 0, 0.24);
}

.billing-purchase-btn:disabled,
.billing-upgrade-cta:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
  box-shadow: none;
}

.billing-upgrade-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: clamp(14px, 2.2vw, 20px);
  align-items: center;
}

.billing-upgrade-card h3 {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.billing-upgrade-meta {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(231, 238, 250, 0.8);
  font-size: 13px;
  font-weight: 700;
}

.billing-upgrade-copy p {
  margin: 0;
  color: rgba(214, 223, 238, 0.7);
  font-size: 13px;
  line-height: 1.4;
}

.admin-billing-list {
  display: grid;
  gap: 12px;
}

.admin-billing-row {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.admin-billing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-billing-head strong {
  font-size: 14px;
  color: #eef3ff;
}

.admin-billing-row textarea {
  min-height: 72px;
}

@media (max-width: 1120px) {
  .billing-featured-card,
  .billing-card,
  .billing-upgrade-card {
    grid-template-columns: 1fr;
  }

  .billing-card-side {
    justify-items: start;
  }

  .billing-price-wrap {
    justify-content: flex-start;
  }

  .billing-purchase-btn,
  .billing-upgrade-cta {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .billing-panel {
    border-radius: 22px;
    padding: 14px;
  }

  .billing-panel-head h2 {
    font-size: clamp(26px, 9vw, 34px);
  }

  .billing-balance-row,
  .billing-title-row,
  .billing-chip-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .billing-toggle {
    width: 100%;
    justify-content: stretch;
  }

  .billing-toggle-btn {
    flex: 1 1 0;
    justify-content: center;
  }

  .billing-meter-labels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1320px) {
  .preview-canvas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1120px) {
  .explore-hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .explore-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .explore-banner { min-height: 320px; }
  .studio-layout { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .preview-shell { grid-template-columns: 1fr; }
  .preview-rail { position: static; }
  .preview-canvas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .control-rail { position: static; }
  .admin-sidebar { position: static; }
  .admin-grid-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choice-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .app-dialog-card {
    width: min(92vw, 420px);
    margin-top: 10vh;
    padding: 18px 18px 16px;
    border-radius: 18px;
  }
  .app-dialog-head h3 {
    font-size: 23px;
  }
  .app-dialog-message {
    font-size: 14px;
  }
  .explore-page { gap: 18px; }
  .explore-section-head h2 { font-size: 30px; }
  .explore-banner { min-height: 260px; border-radius: 24px; }
  .explore-banner-fallback { padding: 22px; }
  .explore-banner-fallback h3 { font-size: 32px; }
  .explore-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .explore-tile-title { font-size: 16px; }
  .explore-tile-description { font-size: 13px; }
  .mobile-tabs-toggle { display: inline-flex; }
  .main-links {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: auto;
    width: 50vw;
    min-width: 50vw;
    max-width: 50vw;
    height: 100dvh;
    min-height: 100dvh;
    gap: 10px;
    padding: 84px 14px 18px;
    flex-direction: column;
    flex-wrap: nowrap;
    background: rgba(10, 14, 22, 0.98);
    border-left: 1px solid var(--line);
    box-shadow: -18px 0 36px rgba(0, 0, 0, 0.28);
    z-index: 25;
    overflow-y: auto;
  }
  .main-links.is-open { display: flex; }
  .mobile-drawer-close {
    display: inline-flex;
    align-self: flex-end;
    width: 36px;
    height: 36px;
    padding: 0;
    margin: -4px 0 2px;
    border: 0;
    background: transparent;
    color: #dbe4f7;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    line-height: 1;
  }
  .main-links a { width: 100%; }
  .main-links .nav-dropdown {
    display: grid;
    width: 100%;
    padding-bottom: 0;
    margin-bottom: 0;
  }
  .main-links .nav-dropdown-header {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
  }
  .main-links .nav-dropdown > a,
  .main-links .nav-dropdown-header > a {
    width: 100%;
  }
  .main-links .nav-dropdown-toggle {
    display: inline-flex;
  }
  .main-links .nav-dropdown-menu {
    position: static;
    display: none;
    min-width: 0;
    margin-top: 8px;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 4px 0 0;
    gap: 4px;
  }
  .main-links .nav-dropdown:hover .nav-dropdown-menu,
  .main-links .nav-dropdown:focus-within .nav-dropdown-menu {
    display: none;
  }
  .main-links .nav-dropdown.is-open .nav-dropdown-menu {
    display: grid;
  }
  .main-links .nav-dropdown-item {
    padding: 7px 6px;
    gap: 10px;
    border-radius: 12px;
  }
  .main-links .nav-dropdown-logo {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 10px;
  }
  .main-links .nav-dropdown-copy {
    gap: 2px;
    padding-top: 0;
  }
  .main-links .nav-dropdown-copy strong {
    font-size: 12px;
    line-height: 1.2;
  }
  .main-links .nav-dropdown-copy small {
    font-size: 10px;
    line-height: 1.25;
  }
  .upload-shell,
  .upload-card-multi .upload-shell {
    aspect-ratio: auto;
  }
  .preview-canvas { grid-template-columns: 1fr; }
  .preview-drop-character { grid-template-columns: 1fr; }
  .preview-shell,
  .preview-stage,
  .preview-rail { gap: 10px; }
  .preview-hero-card h2 { font-size: 18px; }
  .preview-stage-head h3 { font-size: 17px; }
  .preview-stage-head,
  .preview-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .preview-stage-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .admin-grid-two,
  .admin-grid-three,
  .admin-toggle-grid { grid-template-columns: 1fr; }
  .admin-settings-head {
    display: grid;
    grid-template-columns: 1fr;
  }
  .admin-save-row .primary { width: 100%; }
  .ui-select-menu {
    top: calc(100% + 8px);
    left: 0;
    min-width: 100%;
  }
}

@media (max-width: 760px) {
  .explore-hero-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(82vw, 340px);
    grid-template-columns: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    gap: 14px;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .explore-hero-grid::-webkit-scrollbar {
    display: none;
  }
  .explore-hero-card {
    min-width: 0;
    scroll-snap-align: start;
  }
  .highlight-stage {
    min-height: 220px;
  }
  .highlight-editor {
    padding: 12px;
  }
  .history-pane.mobile-empty-hidden {
    display: none;
  }
}

@media (max-width: 520px) {
  .explore-banner { min-height: 220px; }
  .explore-card-grid { grid-template-columns: 1fr; }
}
