:root {
  --bg: #eef1ef;
  --surface: #f8faf8;
  --surface-strong: #ffffff;
  --ink: #141917;
  --ink-soft: #303833;
  --muted: #68716c;
  --muted-2: #929a96;
  --line: #d5dcd8;
  --line-strong: #bfc8c3;
  --dark: #111613;
  --dark-raised: #1a211d;
  --dark-line: #303a34;
  --lime: #c9f23d;
  --lime-strong: #add71c;
  --lime-wash: #effbc9;
  --blue: #3159e8;
  --blue-wash: #edf1ff;
  --red: #cf4438;
  --red-wash: #fff0ed;
  --amber: #dc8c20;
  --amber-wash: #fff7e6;
  --shadow: 0 18px 48px rgba(20, 25, 23, 0.08);
  --rail-width: 76px;
  --topbar-height: 88px;
  --radius: 8px;
  --font-display: "Arial Narrow", "Aptos Display", "Segoe UI", "Microsoft YaHei", sans-serif;
  --font-body: "Aptos", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

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

button {
  color: inherit;
}

button:not(:disabled) {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

code,
pre {
  font-family: var(--font-mono);
}

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

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: var(--dark);
  background: var(--lime);
  border-radius: 6px;
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  min-height: 100vh;
}

.side-rail {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  width: var(--rail-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 10px;
  color: #eff3f0;
  background:
    linear-gradient(180deg, rgba(201, 242, 61, 0.05), transparent 26%),
    var(--dark);
  border-right: 1px solid #28302b;
}

.brand {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 0 2px;
  color: inherit;
  background: transparent;
  border: 0;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.brand-glyph {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--dark);
  background: var(--lime);
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 900;
  line-height: 1;
  transform: skew(-5deg);
}

.brand-word {
  max-width: 64px;
  color: #dfe7e2;
  font-size: 7px;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.15;
  text-align: center;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 48px;
}

.rail-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: auto;
}

.rail-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto;
  color: #99a39d;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  transition:
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.rail-btn .icon {
  width: 20px;
  height: 20px;
}

.mobile-nav-label {
  display: none;
}

.rail-btn:hover {
  color: #fff;
  background: #232b26;
}

.rail-btn.is-active {
  color: var(--dark);
  background: var(--lime);
  border-color: var(--lime);
}

.rail-btn::after {
  position: absolute;
  left: 54px;
  z-index: 100;
  padding: 7px 9px;
  color: #fff;
  content: attr(data-tooltip);
  white-space: nowrap;
  pointer-events: none;
  background: #111613;
  border: 1px solid #343d38;
  border-radius: 5px;
  font-size: 12px;
  opacity: 0;
  transform: translateX(-4px);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

.rail-btn:hover::after,
.rail-btn:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #dfe6e2;
  background: #262f29;
  border: 1px solid #3d4841;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.page-shell {
  grid-column: 2;
  min-width: 0;
}

.module-nav {
  position: sticky;
  z-index: 25;
  top: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 52px;
  padding: 7px clamp(20px, 3vw, 44px);
  overflow-x: auto;
  background: rgba(249, 251, 249, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  scrollbar-width: none;
}

.module-nav::-webkit-scrollbar {
  display: none;
}

.module-nav button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 12px;
  color: var(--muted);
  white-space: nowrap;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 700;
}

.module-nav button:hover {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.module-nav button.is-active {
  color: var(--dark);
  background: var(--lime);
  border-color: #b5d934;
  box-shadow: 0 4px 14px rgba(163, 197, 23, 0.14);
}

.module-nav button .icon {
  width: 14px;
  height: 14px;
}

.module-page {
  min-height: 640px;
}

.module-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr);
  min-height: 360px;
  margin-bottom: 24px;
  overflow: hidden;
  color: #f1f5f2;
  background: var(--dark);
  border: 1px solid #303a34;
  border-radius: var(--radius);
}

.module-intro-image {
  background:
    radial-gradient(circle at 88% 14%, rgba(49, 89, 232, 0.22), transparent 30%),
    radial-gradient(circle at 12% 86%, rgba(201, 242, 61, 0.09), transparent 25%),
    var(--dark);
}

.module-intro-drama {
  background:
    radial-gradient(circle at 84% 18%, rgba(255, 113, 91, 0.18), transparent 30%),
    linear-gradient(125deg, #101612, #151b20);
}

.module-intro-copy {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 52px);
}

.module-status {
  padding: 5px 8px;
  color: #b8ffcf;
  background: rgba(201, 242, 61, 0.08);
  border: 1px solid rgba(201, 242, 61, 0.22);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.module-intro-drama .module-status {
  color: #ffd4cd;
  background: rgba(255, 113, 91, 0.08);
  border-color: rgba(255, 113, 91, 0.24);
}

.module-intro-copy h2 {
  margin: 13px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.module-intro-copy p {
  max-width: 620px;
  color: #9ba9a0;
  font-size: 11px;
  line-height: 1.7;
}

.module-feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.module-feature-tags span {
  padding: 5px 7px;
  color: #c7d2cb;
  background: #1b241e;
  border: 1px solid #344039;
  border-radius: 3px;
  font-size: 7px;
}

.imagegen-showcase {
  display: grid;
  grid-template-columns: 1.3fr 0.85fr;
  grid-template-rows: 1fr 1fr;
  gap: 7px;
  padding: 22px;
  min-height: 340px;
}

.showcase-card {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #202923;
  border: 1px solid #3d4941;
  border-radius: 7px;
}

.showcase-card.showcase-large {
  grid-row: 1 / 3;
}

.showcase-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.showcase-card:hover img {
  transform: scale(1.035);
}

.showcase-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(6, 9, 7, 0.75), transparent 50%);
}

.showcase-card figcaption {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 9px;
  left: 10px;
  color: #fff;
}

.showcase-card figcaption small,
.showcase-card figcaption b {
  display: block;
}

.showcase-card figcaption small {
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.66);
  font-family: var(--font-mono);
  font-size: 6px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.showcase-card figcaption b {
  font-size: 9px;
  font-weight: 700;
}

.drama-showcase {
  position: relative;
  display: grid;
  place-items: center;
  padding: 28px 30px;
  min-height: 430px;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 42%, rgba(187, 211, 255, 0.16), transparent 35%),
    linear-gradient(145deg, #111821, #0b0f14 64%, #141a20);
}

.drama-showcase::before {
  position: absolute;
  inset: 14px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  pointer-events: none;
}

.drama-back-card {
  position: absolute;
  top: 42px;
  right: 38px;
  width: 126px;
  aspect-ratio: 9 / 14;
  margin: 0;
  overflow: hidden;
  background: #10151b;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
  opacity: 0.74;
  transform: rotate(5deg);
}

.drama-back-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.7) brightness(0.76);
}

.drama-back-card figcaption {
  position: absolute;
  right: 7px;
  bottom: 7px;
  left: 7px;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-mono);
  font-size: 5px;
  letter-spacing: 0.06em;
}

.drama-screen {
  position: relative;
  z-index: 2;
  width: min(238px, 68%);
  aspect-ratio: 9 / 14;
  overflow: hidden;
  background: #0d1210;
  border: 5px solid #323c36;
  border-radius: 18px;
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.38);
}

.drama-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.78) brightness(0.78);
}

.drama-screen::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(5, 8, 6, 0.82), transparent 55%);
}

.drama-subtitle {
  position: absolute;
  z-index: 3;
  right: 12px;
  bottom: 35px;
  left: 12px;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  text-shadow: 0 1px 4px #000;
}

.drama-episode-chip {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  padding: 4px 6px;
  color: #f4f7f5;
  background: rgba(6, 10, 9, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 5px;
  letter-spacing: 0.06em;
  backdrop-filter: blur(5px);
}

.drama-timeline {
  position: absolute;
  z-index: 3;
  right: 12px;
  bottom: 14px;
  left: 12px;
  display: flex;
  gap: 3px;
}

.drama-timeline i {
  height: 2px;
  flex: 1;
  background: rgba(255, 255, 255, 0.2);
}

.drama-timeline i:nth-child(-n + 2) {
  background: var(--lime);
}

.drama-voice-card {
  position: absolute;
  bottom: 34px;
  left: 14px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  width: 116px;
  padding: 10px;
  background: rgba(22, 29, 25, 0.92);
  border: 1px solid #3c4a41;
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  z-index: 3;
}

.drama-voice-card > span {
  color: #87968d;
  font-family: var(--font-mono);
  font-size: 6px;
}

.drama-voice-card small {
  color: #d8e2dc;
  font-size: 6px;
}

.voice-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.voice-wave i {
  width: 3px;
  height: 8px;
  background: var(--lime);
  border-radius: 999px;
}

.voice-wave i:nth-child(2),
.voice-wave i:nth-child(5) {
  height: 17px;
}

.voice-wave i:nth-child(3),
.voice-wave i:nth-child(4) {
  height: 12px;
}

.drama-language-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: -4px 0 14px;
}

.drama-language-badges span {
  padding: 5px 7px;
  color: #536259;
  background: #f2f6f3;
  border: 1px solid #dbe4de;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 6px;
  font-weight: 700;
}

.drama-language-badges span:nth-child(-n + 6) {
  color: #253225;
  background: rgba(204, 255, 0, 0.2);
  border-color: rgba(156, 190, 32, 0.38);
}

.module-tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.module-config-panel,
.module-preview-panel {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.module-field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.image-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 4px;
  margin-bottom: 16px;
  background: #e8ece9;
  border-radius: 6px;
}

.image-mode-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 36px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
}

.image-mode-tabs button .icon {
  width: 14px;
  height: 14px;
}

.image-mode-tabs button.is-active {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 2px 5px rgba(20, 25, 23, 0.06);
}

.image-mode-panel {
  animation: view-in 180ms ease both;
}

.image-mode-upload {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 178px;
  margin-bottom: 14px;
  overflow: hidden;
  color: var(--muted);
  text-align: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.55) 1px, transparent 1px),
    #f0f4f1;
  background-size: 22px 22px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  cursor: pointer;
}

.image-mode-upload > div {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.image-mode-upload .icon {
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
}

.image-mode-upload strong {
  color: var(--ink-soft);
  font-size: 10px;
}

.image-mode-upload span {
  margin-top: 3px;
  font-size: 8px;
}

.image-mode-upload img {
  width: 100%;
  height: 178px;
  object-fit: contain;
  background: #e7ece8;
}

.module-field > span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.module-field textarea,
.module-field select {
  width: 100%;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: 0;
}

.module-field textarea {
  min-height: 104px;
  padding: 10px;
  resize: vertical;
  font-size: 10px;
  line-height: 1.55;
}

.module-field select {
  height: 40px;
  padding: 0 10px;
  font-size: 10px;
}

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

.module-chip-row button {
  padding: 7px 9px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 8px;
}

.module-chip-row button.is-active {
  color: var(--dark);
  background: var(--lime);
  border-color: #b4d92e;
}

.module-field input[type="range"] {
  width: 100%;
  accent-color: var(--lime-strong);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted-2);
  font-size: 7px;
}

.module-config-panel .primary-action:disabled {
  opacity: 1;
  color: #7b857f;
  background: #e9eeeb;
  border-color: var(--line);
}

.module-preview-panel {
  position: sticky;
  top: calc(var(--topbar-height) + 70px);
}

.imagegen-preview-frame {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  aspect-ratio: 4 / 5;
  margin-top: 12px;
  color: var(--muted);
  text-align: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.4) 1px, transparent 1px),
    #eef2ef;
  background-size: 24px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
}

.imagegen-preview-frame > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #e7ece8;
  border-radius: 5px;
}

.image-preview-empty,
.image-preview-state {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 24px;
}

.imagegen-preview-frame .icon {
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  color: #98a39c;
}

.imagegen-preview-frame strong {
  color: var(--ink-soft);
  font-size: 10px;
}

.imagegen-preview-frame span {
  max-width: 210px;
  margin-top: 4px;
  font-size: 8px;
}

.image-preview-state {
  position: absolute;
  inset: 0;
  background: rgba(239, 244, 240, 0.96);
  border-radius: 5px;
}

.image-preview-state.is-done {
  color: #38463d;
  background:
    radial-gradient(circle at 50% 35%, rgba(204, 255, 0, 0.2), transparent 34%),
    #eff4f0;
}

.image-preview-state.is-error {
  color: #8a3028;
  background: #fff5f3;
}

.image-preview-state strong {
  margin-top: 12px;
  color: currentColor;
  font-size: 11px;
}

.image-preview-state span:last-child {
  max-width: 230px;
  color: #728078;
  line-height: 1.55;
}

.image-preview-state.is-error span:last-child {
  color: #9a5b55;
}

.image-preview-spinner {
  width: 30px;
  height: 30px;
  border: 2px solid #c9d3cc;
  border-top-color: var(--lime-strong);
  border-radius: 50%;
  animation: image-preview-spin 0.8s linear infinite;
}

.image-preview-state.is-done .image-preview-spinner {
  width: 31px;
  height: 31px;
  background: var(--lime);
  border: 0;
  animation: none;
}

.image-preview-state.is-done .image-preview-spinner::after {
  display: block;
  color: var(--dark);
  content: "✓";
  font-size: 17px;
  font-weight: 800;
  line-height: 31px;
  text-align: center;
}

.image-preview-state.is-error .image-preview-spinner {
  position: relative;
  border-color: #e3bcb6;
  animation: none;
}

.image-preview-state.is-error .image-preview-spinner::after {
  position: absolute;
  inset: 0;
  color: #a84035;
  content: "!";
  font-size: 16px;
  font-weight: 800;
  line-height: 27px;
  text-align: center;
}

.image-preview-actions {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.image-preview-actions .primary-action,
.image-preview-actions .secondary-action {
  justify-content: center;
  width: 100%;
  min-height: 38px;
  text-decoration: none;
}

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

.module-metrics {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.module-metrics span {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 8px;
}

.module-metrics b {
  color: var(--ink-soft);
  font-weight: 650;
}

.drama-process-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.drama-process-list div {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 9px;
  align-items: center;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.drama-process-list b {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  color: var(--dark);
  background: var(--lime);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 7px;
}

.drama-process-list span {
  color: var(--muted);
  font-size: 8px;
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--topbar-height);
  padding: 14px clamp(20px, 3vw, 44px);
  background: rgba(238, 241, 239, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.title-lockup {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.eyebrow {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.title-lockup h1 {
  font-family: var(--font-display);
  font-size: clamp(23px, 2.2vw, 31px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
}

.status-pill:hover {
  background: #fff;
  border-color: var(--line-strong);
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(220, 140, 32, 0.13);
}

.status-pill.is-ready .status-dot {
  background: #55a00b;
  box-shadow: 0 0 0 3px rgba(85, 160, 11, 0.12);
}

.status-pill.is-demo .status-dot {
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(49, 89, 232, 0.12);
}

.demo-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 5px 6px 5px 12px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.demo-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.demo-copy strong {
  font-size: 11px;
  font-weight: 750;
}

.demo-copy small {
  color: var(--muted);
  font-size: 9px;
}

.demo-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toggle-track {
  position: relative;
  width: 36px;
  height: 22px;
  background: #c7ceca;
  border-radius: 999px;
  transition: background 160ms ease;
}

.toggle-track span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.24);
  transition: transform 160ms ease;
}

.demo-toggle input:checked + .toggle-track {
  background: var(--blue);
}

.demo-toggle input:checked + .toggle-track span {
  transform: translateX(14px);
}

.demo-toggle:has(input:focus-visible) {
  outline: 3px solid rgba(49, 89, 232, 0.22);
  outline-offset: 2px;
}

.top-account-wrap {
  position: relative;
}

.top-account-button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 5px 9px 5px 5px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.top-account-button:hover {
  background: #fff;
  border-color: var(--line-strong);
}

.top-account-button > .icon {
  width: 13px;
  height: 13px;
  color: var(--muted);
  transition: transform 160ms ease;
}

.top-account-button[aria-expanded="true"] > .icon {
  transform: rotate(180deg);
}

.top-account-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  color: var(--dark);
  background: var(--lime);
  border: 1px solid #b4d92f;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 850;
}

.top-account-copy {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  min-width: 76px;
  line-height: 1.15;
}

.top-account-copy small {
  color: var(--muted);
  font-size: 7px;
}

.top-account-copy strong {
  max-width: 120px;
  overflow: hidden;
  font-size: 9px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-dropdown {
  position: absolute;
  z-index: 80;
  top: calc(100% + 9px);
  right: 0;
  width: 300px;
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 22px 60px rgba(20, 25, 23, 0.16);
}

.account-dropdown::before {
  position: absolute;
  top: -5px;
  right: 20px;
  width: 8px;
  height: 8px;
  content: "";
  background: #fff;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  transform: rotate(45deg);
}

.account-guest-head,
.account-member-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.account-guest-head > .icon,
.account-member-head > .icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.account-guest-head div,
.account-member-head div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.account-guest-head strong,
.account-member-head strong {
  font-size: 10px;
}

.account-guest-head span,
.account-member-head span {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
}

.account-auth-actions button,
.account-menu-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 7px 9px;
  color: var(--ink);
  background: #f7f9f7;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 8px;
  font-weight: 700;
}

.account-auth-actions button.primary {
  color: var(--dark);
  background: var(--lime);
  border-color: #b3d82c;
}

.account-member-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 10px 0;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.account-member-stats div {
  display: flex;
  flex-direction: column;
  padding: 9px;
  background: #f7f9f7;
}

.account-member-stats span {
  color: var(--muted);
  font-size: 7px;
}

.account-member-stats strong {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 850;
}

.account-menu-links {
  display: grid;
  gap: 5px;
}

.account-menu-link {
  justify-content: space-between;
  min-height: 32px;
  background: #fff;
}

.account-menu-link:hover {
  background: #f3f7f4;
}

.account-menu-link .icon {
  width: 12px;
  height: 12px;
}

.account-menu-link.danger {
  color: #a63b31;
}

.account-dropdown .account-menu-note {
  margin-top: 9px;
  color: var(--muted-2);
  font-size: 7px;
  line-height: 1.45;
}

.main-content {
  width: min(100%, 1530px);
  margin: 0 auto;
  padding: 24px clamp(20px, 3vw, 44px) 72px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
  animation: view-in 260ms ease both;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.remix-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(370px, 0.94fr);
  min-height: 478px;
  margin-bottom: 30px;
  overflow: hidden;
  color: #f2f6f3;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 75% 45%, rgba(92, 225, 230, 0.14), transparent 31%),
    radial-gradient(circle at 90% 10%, rgba(255, 113, 91, 0.12), transparent 22%),
    #111613;
  background-size: 34px 34px, 34px 34px, auto, auto, auto;
  border: 1px solid #2d3731;
  border-radius: var(--radius);
}

.remix-hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, var(--lime) 0 48%, #5ce1e6 48% 76%, #ff715b 76%);
}

.remix-hero-copy {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
  padding: clamp(30px, 5vw, 62px);
}

.remix-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  color: var(--lime);
  background: rgba(201, 242, 61, 0.08);
  border: 1px solid rgba(201, 242, 61, 0.24);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.remix-kicker .icon {
  width: 12px;
  height: 12px;
}

.remix-hero-copy h2 {
  max-width: 690px;
  margin: 17px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(42px, 5.2vw, 72px);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.remix-hero-copy h2 span {
  color: var(--lime);
}

.remix-hero-copy > p {
  max-width: 620px;
  color: #a9b4ad;
  font-size: 12px;
  line-height: 1.7;
}

.remix-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.hero-primary,
.hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
}

.hero-primary {
  color: var(--dark);
  background: var(--lime);
  border: 1px solid #b6df24;
}

.hero-primary:hover {
  background: #d8ff4b;
  transform: translateY(-1px);
}

.hero-secondary {
  color: #e8eeea;
  background: #202823;
  border: 1px solid #39443d;
}

.hero-secondary:hover {
  background: #29322c;
}

.hero-primary .icon,
.hero-secondary .icon {
  width: 15px;
  height: 15px;
}

.remix-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.remix-facts span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #7f8d85;
  font-size: 8px;
}

.remix-facts b {
  color: #e7ede9;
  font-family: var(--font-mono);
  font-size: 10px;
}

.remix-hero-copy .remix-compliance {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  max-width: 610px;
  margin-top: 17px;
  color: #6f7c74;
  font-size: 8px;
  line-height: 1.5;
}

.remix-compliance .icon {
  width: 12px;
  height: 12px;
  margin-top: 1px;
  color: #92a098;
}

.remix-hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 440px;
  padding: 22px 20px;
}

.remix-flow {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
  width: min(100%, 520px);
}

.remix-flow-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.remix-input-card {
  min-width: 0;
  overflow: hidden;
  background: rgba(26, 34, 29, 0.9);
  border: 1px solid #39473f;
  border-radius: 7px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.remix-input-visual {
  position: relative;
  height: 112px;
  overflow: hidden;
}

.remix-input-visual::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background:
    linear-gradient(180deg, rgba(9, 13, 10, 0.16), transparent 38%),
    linear-gradient(0deg, rgba(9, 13, 10, 0.82), transparent 55%);
  pointer-events: none;
}

.remix-reference-photo,
.remix-character-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remix-reference-photo {
  filter: saturate(0.78) contrast(1.05);
  object-position: 52% 42%;
}

.remix-character-photo {
  object-position: 50% 36%;
}

.reference-visual {
  background:
    linear-gradient(145deg, rgba(255, 113, 91, 0.24), transparent 55%),
    linear-gradient(35deg, #2e241f, #17201b 70%);
}

.character-visual {
  background:
    radial-gradient(circle at 50% 36%, rgba(92, 225, 230, 0.28), transparent 35%),
    linear-gradient(145deg, #1c2c2e, #16201c);
}

.flow-step-number {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 20px;
  padding: 0 5px;
  color: var(--dark);
  background: var(--lime);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 800;
}

.flow-step-number.light {
  color: #dff4e8;
  background: rgba(13, 20, 16, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.reference-play {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #fff;
  background: rgba(10, 14, 11, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(8px);
}

.reference-play .icon {
  width: 15px;
  height: 15px;
  transform: translateX(1px);
}

.reference-motion-line {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff8b7a, transparent);
  z-index: 2;
  transform-origin: left center;
}

.reference-motion-line.line-one {
  top: 42px;
  left: 18px;
  width: 52px;
  transform: rotate(-12deg);
}

.reference-motion-line.line-two {
  right: 18px;
  bottom: 28px;
  width: 60px;
  background: linear-gradient(90deg, transparent, #5ce1e6, transparent);
  transform: rotate(14deg);
}

.reference-time {
  position: absolute;
  z-index: 3;
  right: 8px;
  bottom: 7px;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-mono);
  font-size: 7px;
}

.character-portrait {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  color: #c6f8f9;
  background:
    radial-gradient(circle at 48% 34%, #d9c0a8 0 17%, transparent 18%),
    radial-gradient(circle at 50% 53%, #c7f0ee 0 23%, transparent 24%),
    linear-gradient(145deg, #355d5c, #253c3b);
  border: 2px solid rgba(92, 225, 230, 0.58);
  border-radius: 50%;
  transform: translate(-50%, -48%);
  box-shadow: 0 0 32px rgba(92, 225, 230, 0.16);
}

.character-portrait .icon {
  width: 27px;
  height: 27px;
  opacity: 0.92;
}

.character-label {
  position: absolute;
  right: 8px;
  bottom: 7px;
  padding: 2px 4px;
  z-index: 3;
  color: #d9f3f3;
  background: rgba(9, 17, 14, 0.65);
  border-radius: 2px;
  font-size: 6px;
}

.remix-plus {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--dark);
  background: var(--lime);
  border: 1px solid #d7fa61;
  border-radius: 50%;
}

.remix-plus .icon {
  width: 13px;
  height: 13px;
}

.remix-input-copy {
  display: flex;
  flex-direction: column;
  padding: 8px 9px 9px;
}

.remix-input-copy strong {
  font-size: 9px;
}

.remix-input-copy span {
  color: #829188;
  font-size: 6px;
  line-height: 1.45;
}

.remix-flow-bridge {
  display: flex;
  align-items: center;
  gap: 7px;
}

.remix-flow-bridge > span {
  height: 1px;
  flex: 1;
  background: #39473f;
}

.remix-flow-bridge b {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  color: var(--lime);
  background: #1c251f;
  border: 1px solid #3b4a40;
  border-radius: 3px;
  font-size: 7px;
  font-weight: 700;
}

.remix-flow-bridge .icon {
  width: 11px;
  height: 11px;
}

.remix-result-preview {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  padding: 10px;
  background:
    radial-gradient(circle at 15% 20%, rgba(201, 242, 61, 0.08), transparent 32%),
    #18201b;
  border: 1px solid #3a493f;
  border-radius: 7px;
}

.result-video-frame {
  position: relative;
  width: 118px;
  aspect-ratio: 9 / 14.8;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(160deg, #203126, #121714 66%);
  background-size: 18px 18px, 18px 18px, auto;
  border: 3px solid #354139;
  border-radius: 14px;
}

.result-video-frame::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background:
    linear-gradient(180deg, rgba(7, 11, 8, 0.18), transparent 30%),
    linear-gradient(0deg, rgba(7, 11, 8, 0.88), transparent 55%);
  pointer-events: none;
}

.remix-result-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
}

.result-motion-dot {
  position: absolute;
  z-index: 3;
  width: 5px;
  height: 5px;
  background: var(--lime);
  border: 1px solid rgba(17, 22, 19, 0.8);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(201, 242, 61, 0.18);
}

.result-motion-dot.dot-one {
  top: 34%;
  left: 24%;
}

.result-motion-dot.dot-two {
  top: 54%;
  right: 22%;
  background: #5ce1e6;
  box-shadow: 0 0 0 3px rgba(92, 225, 230, 0.18);
}

.result-motion-line {
  position: absolute;
  z-index: 2;
  top: 45%;
  left: 25%;
  width: 50%;
  height: 1px;
  background: linear-gradient(90deg, var(--lime), rgba(92, 225, 230, 0.7), transparent);
  transform: rotate(17deg);
}

.result-format {
  position: absolute;
  top: 8px;
  right: 7px;
  color: #90a097;
  font-family: var(--font-mono);
  font-size: 6px;
}

.result-person-shape {
  position: absolute;
  top: 42%;
  left: 50%;
  width: 78px;
  height: 104px;
  transform: translate(-50%, -50%);
}

.result-head {
  position: absolute;
  top: 0;
  left: 50%;
  width: 31px;
  height: 31px;
  background: #d8b293;
  border-radius: 50%;
  transform: translateX(-50%);
}

.result-body {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 40px;
  height: 67px;
  background: linear-gradient(180deg, #c9f23d, #7ca50c);
  border-radius: 18px 18px 7px 7px;
  transform: translateX(-50%);
}

.result-arm {
  position: absolute;
  top: 42px;
  width: 35px;
  height: 9px;
  background: #d8b293;
  border-radius: 999px;
}

.result-arm.arm-left {
  left: 0;
  transform: rotate(22deg);
}

.result-arm.arm-right {
  right: 0;
  transform: rotate(-38deg);
}

.result-frame-caption {
  position: absolute;
  right: 7px;
  bottom: 8px;
  left: 7px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  padding: 5px;
  background: rgba(8, 12, 9, 0.7);
  border-radius: 3px;
}

.result-frame-caption span {
  color: #dce7df;
  font-size: 6px;
  font-weight: 700;
}

.result-frame-caption b {
  color: #84948a;
  font-size: 5px;
  font-weight: 500;
}

.remix-result-copy {
  min-width: 0;
}

.result-kicker {
  display: inline-flex;
  padding: 3px 5px;
  color: var(--dark);
  background: var(--lime);
  border-radius: 2px;
  font-size: 6px;
  font-weight: 800;
}

.remix-result-copy strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.05;
}

.remix-result-copy p {
  margin-top: 4px;
  color: #85948b;
  font-size: 7px;
  line-height: 1.55;
}

.result-check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.result-check-list span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 5px;
  color: #c4d1c9;
  background: #212b25;
  border: 1px solid #35423a;
  border-radius: 2px;
  font-size: 6px;
}

.result-check-list .icon {
  width: 9px;
  height: 9px;
  color: var(--lime);
}

.remix-orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.remix-orbit-one {
  width: 390px;
  height: 390px;
}

.remix-orbit-two {
  width: 500px;
  height: 500px;
}

.hero-phone {
  position: relative;
  z-index: 2;
  width: 238px;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #0a0d0b;
  border: 6px solid #28312b;
  border-radius: 24px;
  box-shadow:
    0 34px 80px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: rotate(2.4deg);
}

.hero-phone::before {
  position: absolute;
  z-index: 4;
  top: 7px;
  left: 50%;
  width: 64px;
  height: 16px;
  content: "";
  background: #0a0d0b;
  border-radius: 999px;
  transform: translateX(-50%);
}

.hero-phone-bar {
  position: absolute;
  z-index: 3;
  top: 30px;
  right: 13px;
  left: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-mono);
  font-size: 5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-phone-bar i {
  width: 15px;
  height: 1px;
  background: rgba(255, 255, 255, 0.38);
}

#heroCanvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-phone-overlay {
  position: absolute;
  inset: auto 0 0;
  z-index: 3;
  padding: 16px 13px 14px;
  background: linear-gradient(transparent, rgba(4, 7, 5, 0.94) 46%);
}

.trend-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 5px;
  color: #f4f8f5;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 5px;
  letter-spacing: 0.08em;
  backdrop-filter: blur(7px);
}

.trend-chip .icon {
  width: 7px;
  height: 7px;
  color: var(--lime);
}

.hero-phone-caption {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
}

.hero-phone-caption strong {
  font-size: 10px;
}

.hero-phone-caption span {
  margin-top: 1px;
  color: #8b9990;
  font-family: var(--font-mono);
  font-size: 5px;
}

.hero-beat-track {
  display: flex;
  gap: 3px;
  margin-top: 10px;
}

.hero-beat-track i {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.18);
}

.hero-beat-track i:nth-child(1) {
  background: var(--lime);
}

.hero-beat-track i:nth-child(2) {
  background: #5ce1e6;
}

.hero-beat-track i:nth-child(3) {
  background: #ff715b;
}

.floating-remix-card {
  position: absolute;
  z-index: 3;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 16px;
  gap: 8px;
  align-items: center;
  min-width: 155px;
  padding: 8px;
  color: #eaf0ec;
  background: rgba(23, 30, 26, 0.88);
  border: 1px solid #3b473f;
  border-radius: 6px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
}

.floating-source {
  top: 92px;
  left: 5px;
}

.floating-character {
  right: 3px;
  bottom: 82px;
}

.floating-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--dark);
  background: var(--lime);
  border-radius: 4px;
}

.blue-icon {
  color: #061b1c;
  background: #5ce1e6;
}

.floating-icon .icon {
  width: 14px;
  height: 14px;
}

.floating-remix-card div {
  display: flex;
  flex-direction: column;
}

.floating-remix-card small {
  color: #738078;
  font-family: var(--font-mono);
  font-size: 5px;
  letter-spacing: 0.08em;
}

.floating-remix-card strong {
  font-size: 8px;
}

.floating-check {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  color: #192016;
  background: #8bc52e;
  border-radius: 50%;
}

.floating-check .icon {
  width: 9px;
  height: 9px;
  stroke-width: 2.6;
}

.remix-score-card {
  position: absolute;
  z-index: 3;
  top: 48px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  color: #eff5f1;
  background: rgba(255, 113, 91, 0.13);
  border: 1px solid rgba(255, 113, 91, 0.35);
  border-radius: 5px;
  backdrop-filter: blur(10px);
}

.remix-score-card .icon {
  width: 14px;
  height: 14px;
  color: #ff8f7e;
}

.remix-score-card div {
  display: flex;
  flex-direction: column;
}

.remix-score-card strong {
  font-family: var(--font-mono);
  font-size: 11px;
}

.remix-score-card span {
  color: #b89590;
  font-size: 6px;
}

.demo-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 14px;
  color: #1a347f;
  background: var(--blue-wash);
  border: 1px solid #ccd8ff;
  border-radius: var(--radius);
}

.demo-banner .icon {
  width: 20px;
  height: 20px;
}

.demo-banner div {
  display: flex;
  gap: 9px;
  align-items: baseline;
  flex-wrap: wrap;
}

.demo-banner strong {
  font-size: 12px;
}

.demo-banner span {
  font-size: 12px;
}

.workspace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 366px;
  gap: 28px;
  align-items: start;
}

.workspace-primary {
  min-width: 0;
}

.tool-section {
  padding: 24px 0 30px;
  border-top: 1px solid var(--line-strong);
}

.tool-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.section-heading > div {
  display: flex;
  align-items: center;
  gap: 11px;
}

.section-heading h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-index {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 22px;
  padding: 0 6px;
  color: var(--ink);
  background: var(--lime);
  border: 1px solid #aacc1d;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.section-heading > p {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

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

.upload-card {
  position: relative;
  min-height: 226px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 248, 0.55)),
    var(--surface);
  border: 1px dashed #aeb8b2;
  border-radius: var(--radius);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.upload-card:hover,
.upload-card.is-dragging {
  border-color: var(--ink);
  box-shadow: 0 10px 28px rgba(20, 25, 23, 0.07);
}

.upload-card.is-dragging {
  transform: translateY(-2px);
}

.upload-card.has-file {
  background: var(--surface-strong);
  border-style: solid;
  border-color: var(--line);
}

.upload-empty {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  min-height: 224px;
  padding: 20px;
  text-align: center;
}

.upload-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 14px;
  color: var(--ink);
  background: var(--lime-wash);
  border: 1px solid #d7eb92;
  border-radius: 8px;
}

.upload-icon .icon {
  width: 26px;
  height: 26px;
}

.image-upload-icon {
  background: var(--blue-wash);
  border-color: #d0daff;
  color: #263f9b;
}

.upload-plus {
  position: absolute;
  right: -5px;
  bottom: -5px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: #fff;
  background: var(--dark);
  border: 2px solid var(--bg);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.upload-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.upload-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.upload-label b {
  margin-left: 4px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 600;
}

.upload-copy strong {
  font-size: 14px;
  font-weight: 720;
}

.upload-copy small {
  color: var(--muted);
  font-size: 10px;
}

.upload-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 7px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
}

.upload-action .icon {
  width: 14px;
  height: 14px;
}

.drop-overlay {
  position: absolute;
  inset: 8px;
  z-index: 4;
  display: none;
  place-items: center;
  color: var(--ink);
  background: rgba(201, 242, 61, 0.9);
  border: 1px solid #91b20b;
  border-radius: 5px;
  font-weight: 800;
}

.upload-card.is-dragging .drop-overlay {
  display: grid;
}

.upload-preview {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  min-height: 224px;
}

.media-preview {
  position: relative;
  min-height: 224px;
  overflow: hidden;
  background: #202622;
  border-right: 1px solid var(--line);
}

.media-preview video,
.media-preview img {
  width: 100%;
  height: 100%;
  min-height: 224px;
  object-fit: cover;
}

.preview-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 6px;
  color: #fff;
  background: rgba(17, 22, 19, 0.82);
  border-radius: 3px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  backdrop-filter: blur(8px);
}

.preview-play {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: #fff;
  background: rgba(17, 22, 19, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  backdrop-filter: blur(8px);
}

.preview-play .icon {
  width: 13px;
  height: 13px;
}

.file-meta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 14px;
}

.file-title-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.file-title-row strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.4;
  word-break: break-all;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
}

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

.icon-btn .icon {
  width: 15px;
  height: 15px;
}

.file-title-row .icon-btn {
  margin-left: auto;
}

.meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.meta-chips span {
  padding: 4px 6px;
  color: var(--muted);
  background: #eef2ef;
  border: 1px solid #e0e6e2;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 9px;
}

.meta-chips span.is-good {
  color: #3c6c06;
  background: #f3fbdf;
  border-color: #ddedb7;
}

.clip-strip {
  margin-top: 12px;
  padding: 12px 14px;
  background: #f8faf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.clip-strip-head,
.timeline-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.clip-strip-head {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 10px;
}

.clip-strip-head b {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
}

.timeline {
  position: relative;
  height: 20px;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent calc(10% - 1px),
      rgba(20, 25, 23, 0.08) calc(10% - 1px),
      rgba(20, 25, 23, 0.08) 10%
    ),
    #e5eae7;
  border-radius: 3px;
}

.timeline-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: linear-gradient(90deg, rgba(201, 242, 61, 0.82), rgba(173, 215, 28, 0.3));
  border-right: 2px solid #7d9d08;
}

.key-marker {
  position: absolute;
  top: 3px;
  z-index: 2;
  padding: 1px 4px;
  color: #fff;
  background: var(--dark);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 8px;
  transform: translateX(-50%);
}

.timeline-legend {
  margin-top: 6px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
}

.direction-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(320px, 1.22fr);
  gap: 12px;
}

.segmented-field,
.prompt-field {
  min-height: 116px;
  padding: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.segmented-field legend,
.field-label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.field-hint {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: #e8ece9;
  border-radius: 6px;
}

.orientation-engine-note {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.45;
}

.segment {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
}

.segment .icon {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.segment span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.segment strong {
  font-size: 11px;
  font-weight: 720;
}

.segment small {
  color: var(--muted);
  font-size: 8px;
}

.segment.is-active {
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 2px 5px rgba(20, 25, 23, 0.06);
}

.segment.is-active .icon {
  color: var(--ink);
}

.prompt-field {
  position: relative;
  display: block;
}

.prompt-field textarea {
  width: 100%;
  height: 66px;
  padding: 0 34px 0 0;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  outline: none;
  resize: none;
  font-size: 12px;
  line-height: 1.6;
}

.char-count {
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
}

.char-count b {
  color: var(--muted);
  font-weight: 500;
}

.engine-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.engine-option {
  position: relative;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 9px;
  min-width: 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.engine-option:hover {
  border-color: #aab4ae;
  transform: translateY(-1px);
}

.engine-option.is-selected {
  background: #fbfdf4;
  border-color: #9db52d;
  box-shadow: inset 0 0 0 1px rgba(157, 181, 45, 0.16);
}

.engine-option.warning-option.is-selected {
  background: var(--red-wash);
  border-color: #df7b71;
  box-shadow: inset 0 0 0 1px rgba(207, 68, 56, 0.1);
}

.engine-option input {
  position: absolute;
  opacity: 0;
}

.engine-option:has(input:focus-visible) {
  outline: 3px solid rgba(49, 89, 232, 0.18);
  outline-offset: 2px;
}

.engine-radio {
  position: relative;
  display: block;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  background: #fff;
  border: 1px solid #9ba59f;
  border-radius: 50%;
}

.engine-option.is-selected .engine-radio {
  border-color: #6d8500;
}

.engine-option.is-selected .engine-radio::after {
  position: absolute;
  inset: 3px;
  content: "";
  background: #6d8500;
  border-radius: 50%;
}

.warning-option.is-selected .engine-radio {
  border-color: var(--red);
}

.warning-option.is-selected .engine-radio::after {
  background: var(--red);
}

.engine-main {
  min-width: 0;
}

.engine-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.engine-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.engine-title-row h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.engine-title-row h3 span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.engine-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 90px;
  padding: 3px 5px;
  border-radius: 3px;
  font-size: 7px;
  font-weight: 750;
  line-height: 1.2;
}

.engine-badge .icon {
  width: 10px;
  height: 10px;
}

.engine-badge.positive {
  color: #466600;
  background: #edf8cf;
  border: 1px solid #d9eaac;
}

.engine-badge.danger {
  color: #922a22;
  background: #ffe1dc;
  border: 1px solid #f3c3bd;
}

.engine-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 9px;
}

.engine-facts span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 8px;
}

.engine-facts b {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
}

.engine-facts .icon {
  width: 10px;
  height: 10px;
}

.engine-main > p {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.engine-main > p.danger-copy {
  color: #9e3027;
}

.future-engines {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 0 0;
}

.future-engines > span {
  margin-right: 2px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.future-engines button {
  padding: 4px 7px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 8px;
}

.future-engines button:hover {
  color: var(--ink);
  background: #fff;
}

.future-engines small {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 8px;
}

.inspector {
  position: sticky;
  top: calc(var(--topbar-height) + 18px);
  min-width: 0;
  padding: 18px;
  color: #edf2ef;
  background:
    radial-gradient(circle at 95% 5%, rgba(201, 242, 61, 0.09), transparent 28%),
    var(--dark);
  border: 1px solid #2b342e;
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(15, 19, 17, 0.17);
}

.inspector-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.inspector .eyebrow {
  color: #87928b;
}

.inspector-head h2 {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
}

.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  color: #d7ded9;
  background: #222b25;
  border: 1px solid #37423b;
  border-radius: 4px;
  font-size: 8px;
  font-weight: 700;
}

.live-chip::before {
  width: 5px;
  height: 5px;
  content: "";
  background: #858f89;
  border-radius: 50%;
}

.live-chip.is-ready::before {
  background: var(--lime);
}

.live-chip.is-running::before {
  background: var(--blue);
  animation: pulse-dot 1.5s ease infinite;
}

.live-chip.is-error {
  color: #ffd1cb;
  border-color: #663d38;
}

.live-chip.is-error::before {
  background: var(--red);
}

@keyframes pulse-dot {
  50% {
    opacity: 0.35;
    transform: scale(0.78);
  }
}

.output-frame {
  position: relative;
  aspect-ratio: 9 / 11.8;
  min-height: 300px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    #171d19;
  background-size: 24px 24px;
  border: 1px solid #374039;
  border-radius: 6px;
}

.output-placeholder,
.output-demo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 26px;
  text-align: center;
}

.output-placeholder::before {
  position: absolute;
  width: 72%;
  aspect-ratio: 1;
  content: "";
  background: radial-gradient(circle, rgba(201, 242, 61, 0.08), transparent 65%);
  border-radius: 50%;
}

.output-icon {
  position: relative;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  color: #718079;
  stroke-width: 1.25;
}

.output-placeholder strong,
.output-demo strong {
  position: relative;
  font-size: 12px;
  font-weight: 700;
}

.output-placeholder span:not(.frame-corners),
.output-demo span:not(.demo-watermark) {
  position: relative;
  margin-top: 4px;
  color: #7f8c84;
  font-size: 9px;
}

.frame-corners {
  position: absolute;
  inset: 18px;
}

.frame-corners i {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: #4d5a52;
  border-style: solid;
}

.frame-corners i:nth-child(1) {
  top: 0;
  left: 0;
  border-width: 1px 0 0 1px;
}

.frame-corners i:nth-child(2) {
  top: 0;
  right: 0;
  border-width: 1px 1px 0 0;
}

.frame-corners i:nth-child(3) {
  right: 0;
  bottom: 0;
  border-width: 0 1px 1px 0;
}

.frame-corners i:nth-child(4) {
  bottom: 0;
  left: 0;
  border-width: 0 0 1px 1px;
}

.output-demo {
  background:
    linear-gradient(145deg, rgba(49, 89, 232, 0.2), rgba(201, 242, 61, 0.05)),
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.025) 0,
      rgba(255, 255, 255, 0.025) 8px,
      transparent 8px,
      transparent 16px
    );
}

.output-demo .icon {
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  color: #9cb6ff;
}

.demo-watermark {
  position: absolute;
  top: 18px;
  left: 18px;
  padding: 4px 6px;
  color: #d7e0ff;
  background: rgba(49, 89, 232, 0.32);
  border: 1px solid rgba(126, 153, 255, 0.45);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.output-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0c100d;
}

.output-aspect {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 6px;
  color: #b6c0ba;
  background: rgba(13, 17, 15, 0.72);
  border: 1px solid #343f37;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 8px;
}

.estimate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 14px;
  border-top: 1px solid #303a33;
  border-left: 1px solid #303a33;
}

.estimate-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px;
  border-right: 1px solid #303a33;
  border-bottom: 1px solid #303a33;
}

.estimate-grid span {
  color: #849088;
  font-size: 8px;
}

.estimate-grid b {
  color: #f2f5f3;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 650;
}

.estimate-grid .estimate-cost b {
  color: var(--lime);
}

.config-summary {
  margin: 14px 0 0;
}

.config-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
  border-bottom: 1px solid #29322c;
}

.config-summary dt {
  color: #849088;
  font-size: 9px;
}

.config-summary dd {
  overflow: hidden;
  margin: 0;
  color: #e7ece9;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  padding: 10px;
  color: #dce4de;
  background: #202923;
  border: 1px solid #37423b;
  border-radius: 5px;
}

.inspector-alert .icon {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: var(--lime);
}

.inspector-alert div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inspector-alert strong {
  font-size: 9px;
}

.inspector-alert span {
  color: #8e9a92;
  font-size: 8px;
  line-height: 1.45;
}

.inspector-alert.is-warning {
  color: #ffddd8;
  background: #2d1f1d;
  border-color: #5b3935;
}

.inspector-alert.is-warning .icon {
  color: #ff877b;
}

.inspector-alert.is-info {
  color: #dce4ff;
  background: #1d253b;
  border-color: #364772;
}

.inspector-alert.is-info .icon {
  color: #91a9ff;
}

.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 13px 0;
  color: #8f9a93;
  font-size: 8px;
  line-height: 1.45;
  cursor: pointer;
}

.terms-row input {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--lime);
}

.primary-action,
.secondary-action,
.text-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 5px;
  font-weight: 750;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

.primary-action {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--dark);
  background: var(--lime);
  border: 1px solid #b2d92c;
}

.primary-action:hover:not(:disabled) {
  background: #d6ff4b;
  transform: translateY(-1px);
}

.primary-action .button-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}

.primary-action .button-meta {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
}

.primary-action.small {
  width: auto;
  min-height: 36px;
  padding: 7px 11px;
  font-size: 10px;
}

.primary-action.small .icon {
  width: 14px;
  height: 14px;
}

.secondary-action {
  min-height: 38px;
  padding: 8px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  font-size: 10px;
}

.secondary-action:hover {
  border-color: #aab4ae;
  background: #f7f9f7;
}

.secondary-action.danger-outline {
  color: #b4453a;
  border-color: #e8c4bf;
  background: #fff7f5;
}

.secondary-action .icon {
  width: 14px;
  height: 14px;
}

.inspector .secondary-action {
  color: #dce3df;
  background: #202923;
  border-color: #37423b;
}

.inspector .secondary-action:hover {
  background: #28322b;
}

.text-action {
  padding: 7px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  font-size: 10px;
}

.text-action .icon {
  width: 14px;
  height: 14px;
  transition: transform 140ms ease;
}

.text-action:hover .icon {
  transform: translateX(3px);
}

.estimate-note {
  margin-top: 8px;
  color: #77837b;
  font-size: 8px;
  line-height: 1.5;
  text-align: center;
}

.task-monitor {
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid #303a33;
}

.monitor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.monitor-title {
  font-size: 10px;
  font-weight: 700;
}

.task-state {
  padding: 3px 6px;
  color: #dce4df;
  background: #27312a;
  border: 1px solid #3a463e;
  border-radius: 3px;
  font-size: 8px;
}

.progress-track {
  height: 4px;
  overflow: hidden;
  background: #2c352f;
  border-radius: 999px;
}

.progress-track span {
  display: block;
  width: 12%;
  height: 100%;
  background: var(--lime);
  border-radius: inherit;
  transition: width 450ms ease;
}

.progress-track span.is-running {
  background: linear-gradient(90deg, #4c73ff, #8ca5ff, #4c73ff);
  background-size: 200% 100%;
  animation: progress-shine 1.6s linear infinite;
}

.progress-track span.is-error {
  background: var(--red);
}

@keyframes progress-shine {
  to {
    background-position: -200% 0;
  }
}

.task-step-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 11px;
}

.task-step {
  display: grid;
  grid-template-columns: 6px 1fr;
  gap: 3px 6px;
  align-items: center;
  color: #77827b;
}

.task-step i {
  grid-row: span 2;
  width: 6px;
  height: 6px;
  background: #404a43;
  border-radius: 50%;
}

.task-step span {
  font-size: 8px;
  font-weight: 650;
}

.task-step small {
  font-size: 7px;
}

.task-step.is-active,
.task-step.is-done {
  color: #e2e9e5;
}

.task-step.is-active i {
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(49, 89, 232, 0.16);
}

.task-step.is-done i {
  background: var(--lime);
}

.task-identifiers {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px;
  background: #181e1a;
  border: 1px solid #303a33;
  border-radius: 4px;
}

.task-identifiers > span {
  color: #7f8b83;
  font-size: 8px;
}

.task-identifiers code {
  overflow: hidden;
  color: #dbe3df;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-identifiers .icon-btn {
  width: 23px;
  height: 23px;
  color: #849088;
}

.monitor-error {
  margin-top: 9px;
  padding: 8px;
  color: #ffc2ba;
  background: #2c1e1c;
  border: 1px solid #553732;
  border-radius: 4px;
  font-size: 8px;
  line-height: 1.5;
}

.monitor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
}

.monitor-actions > * {
  flex: 1;
}

.comparison-section {
  margin-top: 38px;
  padding-top: 24px;
  border-top: 1px solid var(--line-strong);
}

.comparison-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.comparison-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  background: var(--surface);
}

.comparison-table th,
.comparison-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.comparison-table tr:last-child td {
  border-bottom: 0;
}

.comparison-table th {
  color: var(--muted);
  background: #e8ece9;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.comparison-table td {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 10px;
}

.table-engine {
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 750;
}

.table-engine small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
}

.table-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 6px;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 8px;
  font-weight: 650;
}

.table-status.good {
  color: #486b00;
  background: #eff9d4;
}

.table-status.bad {
  color: #9a2f25;
  background: #ffebe8;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0 26px;
  border-bottom: 1px solid var(--line-strong);
}

.page-heading h2 {
  margin: 4px 0 4px;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1;
}

.page-heading p {
  max-width: 680px;
  color: var(--muted);
  font-size: 12px;
}

.history-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 0;
}

.history-filters {
  display: flex;
  gap: 5px;
}

.filter-chip {
  padding: 6px 10px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
}

.filter-chip.is-active {
  color: #fff;
  background: var(--dark);
  border-color: var(--dark);
}

.history-count {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

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

.history-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
  padding: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.history-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  color: #eff5f1;
  background:
    linear-gradient(145deg, rgba(201, 242, 61, 0.11), rgba(49, 89, 232, 0.08)),
    #1a211d;
  border-radius: 5px;
}

.history-thumb .icon {
  width: 24px;
  height: 24px;
  color: #829087;
}

.history-thumb span {
  position: absolute;
  right: 5px;
  bottom: 5px;
  padding: 2px 4px;
  color: #d6dfda;
  background: rgba(9, 12, 10, 0.72);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 6px;
}

.history-info {
  min-width: 0;
}

.history-title-line {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.history-title-line h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 8px;
  font-weight: 700;
}

.status-badge.queued,
.status-badge.running {
  color: #2446a8;
  background: #eaf0ff;
}

.status-badge.success {
  color: #486d00;
  background: #eef9d1;
}

.status-badge.failed {
  color: #9c2e24;
  background: #ffebe8;
}

.status-badge.cancelled {
  color: #6b716d;
  background: #e9ecea;
}

.status-badge.demo {
  color: #4c4d8a;
  background: #efefff;
}

.history-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
}

.history-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.history-meta .icon {
  width: 11px;
  height: 11px;
}

.history-error {
  display: block;
  max-width: 720px;
  margin-top: 5px;
  overflow: hidden;
  color: #a23a30;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.history-actions .icon-btn {
  color: var(--muted);
}

.history-actions .icon-btn.is-danger:hover {
  color: var(--red);
  background: var(--red-wash);
  border-color: #f0cac5;
}

.empty-state {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  min-height: 380px;
  padding: 32px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.empty-state-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 15px;
  color: var(--muted);
  background: #e8ece9;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.empty-state-icon .icon {
  width: 24px;
  height: 24px;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 20px;
}

.empty-state p {
  max-width: 360px;
  margin: 6px 0 18px;
  color: var(--muted);
  font-size: 11px;
}

.verified-stamp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  color: #435f00;
  background: var(--lime-wash);
  border: 1px solid #d5e894;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 700;
}

.verified-stamp .icon {
  width: 15px;
  height: 15px;
}

.insight-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.insight-metrics article {
  display: flex;
  flex-direction: column;
  min-height: 118px;
  padding: 16px;
  border-right: 1px solid var(--line);
}

.insight-metrics article:last-child {
  border-right: 0;
}

.insight-metrics span {
  color: var(--muted);
  font-size: 9px;
}

.insight-metrics strong {
  margin: auto 0 2px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.insight-metrics small {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
}

.insight-metrics .metric-warning {
  color: #8f2921;
  background: var(--red-wash);
}

.insight-metrics .metric-warning span,
.insight-metrics .metric-warning small {
  color: #a64b43;
}

.insight-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
}

.insight-panel {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.panel-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--ink);
  background: var(--lime-wash);
  border: 1px solid #d9eaa4;
  border-radius: 6px;
}

.panel-icon .icon {
  width: 17px;
  height: 17px;
}

.panel-heading h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
}

.engine-note {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.engine-note-rank {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--ink);
  background: #e8ece9;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.engine-note h4 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
}

.engine-note h4 span {
  padding: 2px 5px;
  color: #4b6900;
  background: #edf8d1;
  border-radius: 3px;
  font-size: 7px;
}

.engine-note p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.note-tags span {
  padding: 3px 6px;
  color: var(--muted);
  background: #eef2ef;
  border: 1px solid #e1e7e3;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 8px;
}

.danger-note {
  margin-top: 4px;
  padding: 14px 10px;
  background: var(--red-wash);
  border: 1px solid #f1ccc7;
  border-radius: 5px;
}

.danger-note .engine-note-rank {
  color: #fff;
  background: var(--red);
}

.danger-note h4 span {
  color: #9b2f26;
  background: #ffdcd7;
}

.danger-note p {
  color: #8e3a33;
}

.check-list {
  display: grid;
  gap: 2px;
}

.check-list label {
  display: grid;
  grid-template-columns: 17px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 39px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  cursor: pointer;
}

.check-list input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #7f9f00;
}

.check-list b {
  display: block;
  color: var(--ink);
  font-size: 10px;
}

.warning-panel {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  padding: 17px;
  color: #ffdad5;
  background: #311d1a;
  border: 1px solid #5d342f;
  border-radius: var(--radius);
}

.warning-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #ff9287;
  background: rgba(255, 146, 135, 0.1);
  border: 1px solid rgba(255, 146, 135, 0.25);
  border-radius: 6px;
}

.warning-icon .icon {
  width: 20px;
  height: 20px;
}

.warning-panel .eyebrow {
  color: #c8827b;
}

.warning-panel h3 {
  margin: 2px 0 3px;
  font-family: var(--font-display);
  font-size: 16px;
}

.warning-panel p {
  max-width: 800px;
  color: #c9958f;
  font-size: 9px;
  line-height: 1.55;
}

.warning-panel .secondary-action {
  color: #ffddd8;
  background: rgba(255, 255, 255, 0.05);
  border-color: #70443e;
  white-space: nowrap;
}

.warning-panel.rights-panel {
  color: var(--ink);
  background: #f5f8f3;
  border-color: var(--line);
}

.rights-panel .warning-icon {
  color: #5f7c05;
  background: var(--lime-wash);
  border-color: #d8e6a8;
}

.rights-panel .eyebrow {
  color: #75834b;
}

.rights-panel p {
  color: var(--muted);
}

.rights-panel .secondary-action {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.api-map-section {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line-strong);
}

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

.api-map-grid article {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.api-map-grid article > span {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 5px;
  color: var(--muted);
  background: #e9eeea;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 8px;
}

.api-map-grid h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
}

.api-map-grid p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.api-map-grid .map-highlight {
  background: var(--amber-wash);
  border-color: #f0d49b;
}

.api-map-grid .map-highlight > span {
  color: #8f5f0d;
  background: #ffe9bd;
}

.toast-region {
  position: fixed;
  z-index: 200;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 8px;
  width: min(370px, calc(100vw - 36px));
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 9px;
  align-items: flex-start;
  padding: 11px 12px;
  color: #edf3ef;
  background: #151a17;
  border: 1px solid #39433d;
  border-radius: 6px;
  box-shadow: var(--shadow);
  animation: toast-in 180ms ease both;
  pointer-events: auto;
}

.toast .icon {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: var(--lime);
}

.toast strong {
  display: block;
  font-size: 10px;
}

.toast span {
  display: block;
  margin-top: 2px;
  color: #9ca8a1;
  font-size: 9px;
  line-height: 1.45;
}

.toast.is-error {
  border-color: #613c37;
}

.toast.is-error .icon {
  color: #ff877b;
}

.toast-close {
  padding: 0;
  color: #87928b;
  background: transparent;
  border: 0;
}

.toast-close .icon {
  width: 13px;
  height: 13px;
  color: inherit;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
}

.modal-backdrop {
  position: fixed;
  z-index: 150;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(11, 15, 13, 0.68);
  backdrop-filter: blur(6px);
}

.modal {
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  background: var(--surface);
  border: 1px solid #fff;
  border-radius: var(--radius);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.3);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 850;
}

.modal-body {
  padding: 18px 20px;
}

.security-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  color: #2c5189;
  background: #edf5ff;
  border: 1px solid #d4e5fa;
  border-radius: 5px;
}

.security-notice .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.security-notice div {
  display: flex;
  flex-direction: column;
}

.security-notice strong {
  font-size: 10px;
}

.security-notice span {
  color: #5f7896;
  font-size: 9px;
  line-height: 1.5;
}

.setup-code {
  margin-top: 12px;
  overflow: hidden;
  background: #141916;
  border: 1px solid #2f3932;
  border-radius: 6px;
}

.setup-code > span {
  display: block;
  padding: 7px 12px;
  color: #849188;
  background: #1c231f;
  border-bottom: 1px solid #2f3932;
  font-family: var(--font-mono);
  font-size: 8px;
}

.setup-code pre {
  margin: 0;
  padding: 14px;
  overflow-x: auto;
  color: #dce6df;
  font-size: 10px;
  line-height: 1.7;
}

.setup-list {
  display: grid;
  gap: 2px;
  margin-top: 12px;
}

.setup-list > div {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.setup-list b {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
}

.setup-list span {
  color: var(--muted);
  font-size: 9px;
}

.setup-list code {
  color: var(--ink);
  font-size: 9px;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  background: #eef2ef;
  border-top: 1px solid var(--line);
}

:focus-visible {
  outline: 3px solid rgba(49, 89, 232, 0.25);
  outline-offset: 2px;
}

.billing-status-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 10px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 9px;
}

.billing-status-line.is-ready .status-dot {
  background: #55a00b;
  box-shadow: 0 0 0 3px rgba(85, 160, 11, 0.12);
}

.billing-status-line.is-test .status-dot {
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(49, 89, 232, 0.12);
}

.billing-guest {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  min-height: 520px;
  margin-top: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 12%, rgba(201, 242, 61, 0.13), transparent 34%),
    var(--dark);
  border: 1px solid #2c342f;
  border-radius: var(--radius);
}

.billing-guest-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 640px;
  padding: clamp(30px, 6vw, 72px);
  color: #eff4f1;
}

.billing-guest-copy .eyebrow {
  color: #96a29b;
}

.billing-guest-copy h3 {
  max-width: 560px;
  margin: 8px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 58px);
  font-weight: 850;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.billing-guest-copy > p {
  max-width: 530px;
  color: #9da8a2;
  font-size: 12px;
  line-height: 1.7;
}

.guest-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.guest-benefits span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  color: #cbd5cf;
  background: #1b231e;
  border: 1px solid #334038;
  border-radius: 4px;
  font-size: 8px;
}

.guest-benefits .icon {
  width: 12px;
  height: 12px;
  color: var(--lime);
}

.auth-card {
  align-self: center;
  margin: 24px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid #e8ece9;
  border-radius: var(--radius);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 19px;
  background: #e8ece9;
  border-radius: 6px;
}

.auth-tabs button {
  min-height: 34px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

.auth-tabs button.is-active {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 2px 5px rgba(20, 25, 23, 0.06);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.form-heading {
  margin-bottom: 4px;
}

.form-heading h3 {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 850;
}

.auth-form label {
  display: grid;
  gap: 5px;
}

.auth-form label > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

.auth-form input {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: 0;
  font-size: 11px;
}

.auth-form input:focus {
  border-color: #9ba7a0;
  box-shadow: 0 0 0 3px rgba(49, 89, 232, 0.1);
}

.auth-form .primary-action {
  margin-top: 3px;
}

.auth-text-button {
  justify-self: start;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 9px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-text-button.centered {
  justify-self: center;
}

.verification-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: end;
}

.code-send-button {
  min-height: 42px;
  white-space: nowrap;
}

.billing-member {
  padding-top: 22px;
}

.account-overview {
  display: grid;
  grid-template-columns: minmax(300px, 1.5fr) minmax(190px, 0.75fr) minmax(190px, 0.75fr);
  gap: 10px;
}

.account-overview > article {
  min-height: 126px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.account-profile-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: var(--dark);
  background: var(--lime);
  border: 1px solid #aacd1c;
  border-radius: 7px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
}

.account-profile-card h3 {
  margin: 2px 0 1px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 850;
}

.account-profile-card p {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  text-overflow: ellipsis;
}

.balance-card,
.membership-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.balance-card {
  color: #f3f7f4;
  background: var(--dark) !important;
  border-color: #2d3731 !important;
}

.balance-card::after {
  position: absolute;
  right: -30px;
  bottom: -40px;
  width: 140px;
  height: 140px;
  content: "";
  background: radial-gradient(circle, rgba(201, 242, 61, 0.18), transparent 65%);
  border-radius: 50%;
}

.balance-card > div,
.membership-card > div {
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.balance-card span,
.membership-card span {
  color: #88948c;
  font-size: 8px;
}

.balance-card strong {
  color: var(--lime);
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 850;
  line-height: 1;
}

.balance-card small,
.membership-card small {
  margin-top: 4px;
  color: #7d8981;
  font-size: 8px;
}

.balance-card button {
  align-self: flex-start;
  margin-top: 8px;
  padding: 4px 6px;
  color: #cfd8d2;
  background: #242d27;
  border: 1px solid #3b473f;
  border-radius: 3px;
  font-size: 7px;
}

.balance-card button:hover {
  color: var(--lime);
  border-color: #59694f;
}

.balance-card > .icon {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  width: 18px;
  height: 18px;
  color: var(--lime);
}

.membership-card {
  background: var(--blue-wash);
  border-color: #d4ddfb !important;
}

.membership-card strong {
  color: #273d7f;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 850;
}

.membership-card small {
  color: #7080ad;
}

.membership-card > .icon {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 18px;
  height: 18px;
  color: var(--blue);
}

.membership-card[data-tier="free"] {
  background: #f0f3f1;
  border-color: #d5dcd8 !important;
}

.membership-card[data-tier="free"] strong,
.membership-card[data-tier="free"] > .icon {
  color: #4f5953;
}

.membership-card[data-tier="creator"] {
  background: #f1f9d8;
  border-color: #c7dd7d !important;
}

.membership-card[data-tier="creator"] strong,
.membership-card[data-tier="creator"] small,
.membership-card[data-tier="creator"] > .icon {
  color: #4f6c00;
}

.membership-card[data-tier="pro"] {
  background: #e7f8f9;
  border-color: #a7dce0 !important;
}

.membership-card[data-tier="pro"] strong,
.membership-card[data-tier="pro"] small,
.membership-card[data-tier="pro"] > .icon {
  color: #17666c;
}

.membership-card[data-tier="studio"] {
  background: #fff0ec;
  border-color: #f0b7aa !important;
}

.membership-card[data-tier="studio"] strong,
.membership-card[data-tier="studio"] small,
.membership-card[data-tier="studio"] > .icon {
  color: #8c3a2b;
}

.payment-readiness {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  padding: 10px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.payment-readiness > span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.provider-statuses {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.provider-statuses span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
}

.provider-statuses i {
  width: 6px;
  height: 6px;
  background: #b7beb9;
  border-radius: 50%;
}

.provider-statuses span.is-ready {
  color: var(--ink);
}

.provider-statuses span.is-ready i {
  background: #5c990e;
}

.provider-statuses span.is-test i {
  background: var(--blue);
}

.payment-readiness > small {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 8px;
}

.account-security-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
  padding: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.account-security-panel .eyebrow {
  color: var(--muted);
}

.account-security-panel h3 {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 850;
}

.account-security-panel p {
  color: var(--muted);
  font-size: 8px;
}

.change-password-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 8px;
  align-items: end;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.change-password-form label {
  display: grid;
  gap: 4px;
}

.change-password-form label span {
  color: var(--muted);
  font-size: 8px;
}

.change-password-form input {
  height: 36px;
  padding: 0 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.primary-action.compact {
  width: auto;
  min-height: 36px;
  padding: 7px 11px;
  font-size: 9px;
}

.redeem-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  margin-top: 10px;
  padding: 17px;
  background:
    radial-gradient(circle at 92% 8%, rgba(201, 242, 61, 0.18), transparent 27%),
    #f9fbf4;
  border: 1px solid #cdd9ae;
  border-radius: var(--radius);
}

.redeem-copy .eyebrow {
  color: var(--muted);
}

.redeem-copy h3 {
  margin: 2px 0 3px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 850;
}

.redeem-copy > p {
  color: var(--muted);
  font-size: 9px;
}

.redeem-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  margin-top: 13px;
}

.redeem-form input {
  height: 42px;
  padding: 0 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.redeem-form .primary-action {
  width: auto;
  min-height: 42px;
  padding: 9px 14px;
  font-size: 10px;
}

.redeem-result {
  margin-top: 9px;
  padding: 9px 10px;
  color: #476600;
  background: #eff8d3;
  border: 1px solid #d6e7a5;
  border-radius: 4px;
  font-size: 9px;
  line-height: 1.5;
}

.redeem-history {
  padding-left: 17px;
  border-left: 1px solid #d9e2c2;
}

.redeem-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.redeem-history-head button {
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 8px;
}

.redeem-history-item {
  padding: 7px 0;
  border-top: 1px solid #e1e7d7;
}

.redeem-history-item strong {
  display: block;
  color: var(--ink);
  font-size: 8px;
}

.redeem-history-item small {
  color: var(--muted);
  font-size: 7px;
}

.redeem-history-empty {
  padding: 14px 0;
  color: var(--muted-2);
  font-size: 8px;
}

.referral-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 20px;
  align-items: stretch;
  margin-top: 10px;
  padding: 18px;
  color: #eef4f0;
  background:
    radial-gradient(circle at 82% 20%, rgba(92, 225, 230, 0.14), transparent 28%),
    #151b17;
  border: 1px solid #303a34;
  border-radius: var(--radius);
}

.referral-copy .eyebrow {
  color: #829087;
}

.referral-copy h3 {
  margin: 4px 0 5px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 850;
}

.referral-copy > p {
  max-width: 700px;
  color: #8f9b93;
  font-size: 9px;
  line-height: 1.55;
}

.referral-copy > p strong {
  color: var(--lime);
}

.referral-code-row {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.referral-code-row > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 150px;
  margin-right: 3px;
}

.referral-code-row > div span {
  color: #7d8982;
  font-size: 7px;
}

.referral-code-row code {
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.referral-panel .secondary-action {
  min-height: 33px;
  color: #dce4df;
  background: #222b25;
  border-color: #3a463f;
}

.referral-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  background: #1c241f;
  border: 1px solid #344038;
  border-radius: 6px;
}

.referral-stats > div {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  min-height: 108px;
  padding: 12px 8px;
  border-right: 1px solid #344038;
  text-align: center;
}

.referral-stats > div:last-child {
  border-right: 0;
}

.referral-stats span {
  color: #7d8982;
  font-size: 8px;
}

.referral-stats strong {
  margin: 4px 0 0;
  color: #f0f5f2;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 850;
  line-height: 1;
}

.referral-stats small {
  margin-top: 2px;
  color: #748078;
  font-size: 7px;
}

.distribution-panel {
  margin-top: 10px;
  padding: 17px;
  background:
    radial-gradient(circle at 86% 4%, rgba(92, 225, 230, 0.14), transparent 28%),
    #121916;
  border: 1px solid #304038;
  border-radius: var(--radius);
  color: #ebf2ed;
}

.distribution-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.distribution-head .eyebrow {
  color: #7f9087;
}

.distribution-head h3 {
  margin: 3px 0;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 850;
}

.distribution-head p {
  color: #86958d;
  font-size: 8px;
}

.distribution-rate {
  min-width: 124px;
  padding: 10px 12px;
  text-align: right;
  background: #1d2721;
  border: 1px solid #34443a;
  border-radius: 5px;
}

.distribution-rate span,
.distribution-rate small {
  display: block;
  color: #7d8d84;
  font-size: 7px;
}

.distribution-rate strong {
  display: block;
  color: var(--lime);
  font-family: var(--font-display);
  font-size: 27px;
  line-height: 1;
}

.distribution-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 14px;
  overflow: hidden;
  background: #29362e;
  border: 1px solid #34443a;
  border-radius: 5px;
  gap: 1px;
}

.distribution-stats > div {
  display: flex;
  flex-direction: column;
  min-height: 94px;
  padding: 13px;
  background: #1a231e;
}

.distribution-stats span {
  color: #7e8f85;
  font-size: 8px;
}

.distribution-stats strong {
  margin: auto 0 2px;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
}

.distribution-stats small {
  color: #74847a;
  font-size: 7px;
}

.payout-settings {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid #304038;
}

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

.payout-settings-head .eyebrow {
  color: #74857b;
}

.payout-settings-head h4 {
  margin: 2px 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
}

.payout-settings-head p {
  color: #74857b;
  font-size: 7px;
}

.payout-saved-status {
  padding: 3px 6px;
  color: #8a9a90;
  background: #202a24;
  border: 1px solid #39473f;
  border-radius: 3px;
  font-size: 7px;
}

.payout-saved-status.is-ready {
  color: #c7ed82;
  border-color: #4d633d;
}

.payout-method-tabs {
  display: inline-flex;
  gap: 4px;
  margin-top: 9px;
  padding: 3px;
  background: #1b241e;
  border: 1px solid #344139;
  border-radius: 4px;
}

.payout-method-tabs button {
  padding: 5px 10px;
  color: #7f9186;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 7px;
}

.payout-method-tabs button.is-active {
  color: #e8f0eb;
  background: #2a352e;
  border-color: #3f4d44;
}

.payout-profile-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.8fr) auto;
  gap: 8px;
  align-items: end;
  margin-top: 8px;
}

.payout-profile-form label {
  display: grid;
  gap: 4px;
}

.payout-profile-form label > span {
  color: #7d8f84;
  font-size: 7px;
}

.payout-profile-form input[type="text"] {
  height: 36px;
  padding: 0 9px;
  color: #edf4ef;
  background: #1c251f;
  border: 1px solid #39483f;
  border-radius: 4px;
}

.payout-qr-field {
  position: relative;
  min-height: 52px;
  padding: 8px;
  overflow: hidden;
  background: #1b241e;
  border: 1px dashed #47564c;
  border-radius: 4px;
}

.payout-qr-field input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.payout-qr-field b {
  color: #7d8f84;
  font-size: 7px;
  font-weight: 600;
}

.payout-qr-field b.is-ready {
  color: var(--lime);
}

.payout-profile-form .secondary-action {
  min-height: 36px;
  color: #dce5df;
  background: #252f29;
  border-color: #3d4b42;
  white-space: nowrap;
}

.payout-profile-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.payout-profile-statuses span {
  padding: 3px 6px;
  color: #7b8e83;
  background: #19221d;
  border: 1px solid #304038;
  border-radius: 3px;
  font-size: 7px;
}

.payout-profile-statuses span.is-ready {
  color: #c5e77f;
}

.distribution-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 11px;
}

.distribution-actions .secondary-action {
  color: #dce5df;
  background: #202a24;
  border-color: #3a4a40;
}

.distribution-actions > span {
  color: #77887e;
  font-size: 8px;
}

.commission-withdrawal-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: end;
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid #304038;
}

.withdrawal-methods {
  grid-column: 1 / -1;
  display: flex;
  gap: 7px;
}

.withdrawal-methods label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  background: #1c251f;
  border: 1px solid #39483f;
  border-radius: 4px;
  cursor: pointer;
}

.withdrawal-methods input {
  width: 13px;
  height: 13px;
  accent-color: var(--lime);
}

.withdrawal-methods span {
  color: #d7e1db !important;
  font-size: 8px !important;
}

.withdrawal-qr-field,
.withdrawal-fee-preview {
  grid-column: 1 / -1;
}

.withdrawal-qr-field {
  position: relative;
  min-height: 58px;
  padding: 9px;
  overflow: hidden;
  background: #1b241e;
  border: 1px dashed #47564c;
  border-radius: 4px;
}

.withdrawal-qr-field input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.withdrawal-qr-field b {
  color: #7d8f84;
  font-size: 7px;
  font-weight: 600;
}

.withdrawal-qr-field b.is-ready {
  color: var(--lime);
}

.withdrawal-fee-preview {
  padding: 8px 10px;
  color: #b9c9bf;
  background: #19221d;
  border: 1px solid #314138;
  border-radius: 4px;
  font-size: 8px;
}

.commission-withdrawal-form label {
  display: grid;
  gap: 4px;
}

.commission-withdrawal-form label span {
  color: #7d8f84;
  font-size: 7px;
}

.commission-withdrawal-form input {
  height: 36px;
  padding: 0 9px;
  color: #eef4f0;
  background: #1c251f;
  border: 1px solid #39483f;
  border-radius: 4px;
}

.withdrawal-profile-note {
  grid-column: 1 / -1;
  padding: 8px 10px;
  color: #b9c9bf;
  background: #19221d;
  border: 1px solid #314138;
  border-radius: 4px;
  font-size: 8px;
}

.withdrawal-profile-note.is-warning {
  color: #ffb2a7;
  background: #2d201d;
  border-color: #65423b;
}

.commission-records {
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid #304038;
}

.commission-records-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  color: #7e9085;
  font-size: 8px;
}

.commission-records-head button {
  padding: 0;
  color: #8ba095;
  background: transparent;
  border: 0;
  font-size: 8px;
}

.commission-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid #26362d;
}

.commission-record strong {
  display: block;
  font-size: 8px;
}

.commission-record small {
  color: #718278;
  font-size: 7px;
}

.commission-record .commission-amount {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.commission-status {
  padding: 3px 5px;
  border-radius: 3px;
  font-size: 7px;
}

.commission-status.pending {
  color: #f0cd8d;
  background: #3a3020;
}

.commission-status.available {
  color: #bce873;
  background: #28371f;
}

.commission-status.reversed {
  color: #e1a098;
  background: #3a2522;
}

.commission-status.approved {
  color: #b7c8ff;
  background: #253252;
}

.commission-status.paid {
  color: #bce873;
  background: #28371f;
}

.commission-status.rejected {
  color: #e1a098;
  background: #3a2522;
}

.commission-empty {
  padding: 12px 0;
  color: #708077;
  font-size: 8px;
}

.billing-plans-section,
.points-ledger-section,
.billing-orders-section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line-strong);
}

.points-ledger-list {
  display: grid;
  gap: 6px;
}

.points-ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.points-ledger-row strong {
  font-size: 9px;
}

.points-ledger-row small {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
}

.points-ledger-row .points-amount {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.points-ledger-row .points-amount.positive {
  color: #5f8208;
}

.points-ledger-row .points-amount.negative {
  color: #b4453a;
}

.points-ledger-row time {
  color: var(--muted);
  font-size: 7px;
}

.billing-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.billing-plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 17px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.billing-plan-card:hover {
  border-color: #a7b1ab;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(20, 25, 23, 0.08);
}

.billing-plan-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, var(--plan-accent), transparent 88%);
}

.billing-plan-card {
  --plan-accent: #98a49d;
  --plan-soft: #f0f3f1;
  --plan-border: #cfd7d2;
  --plan-text: #3f4a43;
  --plan-glow: rgba(152, 164, 157, 0.12);
  --plan-button-text: #fff;
}

.plan-theme-membership_creator {
  --plan-accent: #a9d51c;
  --plan-soft: #f1f9d8;
  --plan-border: #c7dd7d;
  --plan-text: #4f6c00;
  --plan-glow: rgba(201, 242, 61, 0.25);
  --plan-button-text: #1b2415;
}

.plan-theme-membership_pro {
  --plan-accent: #5ccfd8;
  --plan-soft: #e7f8f9;
  --plan-border: #a7dce0;
  --plan-text: #17666c;
  --plan-glow: rgba(92, 225, 230, 0.22);
  --plan-button-text: #082d30;
}

.plan-theme-membership_studio {
  --plan-accent: #ff806a;
  --plan-soft: #fff0ec;
  --plan-border: #f0b7aa;
  --plan-text: #8c3a2b;
  --plan-glow: rgba(255, 113, 91, 0.2);
  --plan-button-text: #fff;
}

.plan-theme-points_100 {
  --plan-accent: #6eaaa4;
  --plan-soft: #edf7f5;
  --plan-border: #b6d8d3;
  --plan-text: #285e59;
  --plan-glow: rgba(110, 170, 164, 0.18);
  --plan-button-text: #fff;
}

.plan-theme-points_300 {
  --plan-accent: #a9d51c;
  --plan-soft: #f1f9d8;
  --plan-border: #c7dd7d;
  --plan-text: #4f6c00;
  --plan-glow: rgba(201, 242, 61, 0.24);
  --plan-button-text: #1b2415;
}

.plan-theme-points_1000 {
  --plan-accent: #e6a23c;
  --plan-soft: #fff6e8;
  --plan-border: #edcf9f;
  --plan-text: #875514;
  --plan-glow: rgba(230, 162, 60, 0.18);
  --plan-button-text: #fff;
}

.billing-plan-card.is-featured {
  background:
    radial-gradient(circle at 100% 0%, var(--plan-glow), transparent 38%),
    #fff;
  border-color: var(--plan-border);
}

.plan-badge {
  align-self: flex-start;
  padding: 3px 6px;
  color: var(--plan-text);
  background: var(--plan-soft);
  border: 1px solid var(--plan-border);
  border-radius: 3px;
  font-size: 7px;
  font-weight: 750;
}

.billing-plan-card h3 {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 850;
}

.billing-plan-card > p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-top: auto;
  padding-top: 18px;
  color: var(--ink);
}

.plan-price strong {
  font-family: var(--font-display);
  font-size: 31px;
  font-weight: 850;
  letter-spacing: -0.04em;
  color: var(--plan-text);
}

.plan-price span {
  color: var(--muted);
  font-size: 9px;
}

.plan-points {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
}

.plan-points b {
  color: var(--plan-text);
  font-size: 11px;
}

.plan-commission {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: -2px 0 10px;
  padding: 7px 8px;
  color: var(--plan-text);
  background: var(--plan-soft);
  border: 1px solid var(--plan-border);
  border-radius: 4px;
}

.plan-commission span {
  font-size: 7px;
}

.plan-commission b {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 850;
}

.billing-plan-card .primary-action,
.billing-plan-card .secondary-action {
  min-height: 36px;
  font-size: 10px;
}

.billing-plan-card .primary-action {
  color: var(--plan-button-text);
  background: var(--plan-accent);
  border-color: var(--plan-accent);
}

.billing-plan-card .primary-action:hover {
  filter: brightness(0.94);
  background: var(--plan-accent);
}

.billing-plan-card .secondary-action {
  width: 100%;
  color: var(--plan-text);
  background: var(--plan-soft);
  border-color: var(--plan-border);
}

.billing-plan-card .secondary-action:hover {
  background: var(--plan-soft);
  border-color: var(--plan-accent);
}

.checkout-panel {
  max-width: 760px;
  margin: 28px auto 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.checkout-head h3 {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 850;
}

.checkout-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.checkout-summary span {
  color: var(--muted);
  font-size: 10px;
}

.checkout-summary strong {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 850;
}

.payment-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}

.payment-method {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.payment-method.is-active {
  border-color: #95ad2d;
  box-shadow: inset 0 0 0 1px rgba(149, 173, 45, 0.18);
}

.payment-method:disabled {
  opacity: 0.45;
}

.payment-method > span:last-child {
  display: flex;
  flex-direction: column;
}

.payment-method strong {
  font-size: 10px;
}

.payment-method small {
  color: var(--muted);
  font-size: 8px;
}

.pay-mark {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  color: #fff;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.wechat-mark {
  background: #12b65a;
}

.alipay-mark {
  background: #1677ff;
}

.payment-result-panel {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  margin-top: 14px;
  padding: 16px;
  background: #eef2ef;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.qr-holder {
  display: grid;
  place-items: center;
  min-height: 210px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.qr-holder svg {
  width: min(190px, 100%);
  height: auto;
}

.payment-result-copy {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}

.payment-result-copy .status-dot {
  margin-bottom: 10px;
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(49, 89, 232, 0.11);
}

.payment-result-copy strong {
  font-family: var(--font-display);
  font-size: 18px;
}

.payment-result-copy p {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.billing-order-list {
  display: grid;
  gap: 7px;
}

.billing-order {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.billing-order-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.billing-order-info .order-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: var(--muted);
  background: #e9eeea;
  border-radius: 5px;
}

.billing-order-info .order-icon .icon {
  width: 15px;
  height: 15px;
}

.billing-order-info div {
  min-width: 0;
}

.billing-order-info strong {
  display: block;
  font-size: 10px;
}

.billing-order-info small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.billing-order .status-badge.pending {
  color: #885d10;
  background: var(--amber-wash);
}

.billing-order .status-badge.paid {
  color: #486d00;
  background: #eef9d1;
}

.billing-order .status-badge.closed,
.billing-order .status-badge.refunded {
  color: var(--muted);
  background: #ecefed;
}

.order-amount {
  font-family: var(--font-mono);
  font-size: 10px;
}

.billing-orders-empty {
  padding: 34px;
  color: var(--muted);
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: 5px;
  font-size: 10px;
}

@media (max-width: 1180px) {
  .workspace-layout {
    grid-template-columns: minmax(0, 1fr) 338px;
    gap: 20px;
  }

  .engine-list {
    grid-template-columns: 1fr;
  }

  .engine-option {
    grid-template-columns: 16px minmax(0, 1fr);
  }

  .engine-main > p {
    max-width: 760px;
  }
}

@media (max-width: 980px) {
  :root {
    --rail-width: 62px;
  }

  .side-rail {
    padding-inline: 7px;
  }

  .brand-word {
    display: none;
  }

  .workspace-layout {
    grid-template-columns: 1fr;
  }

  .inspector {
    position: static;
    display: grid;
    grid-template-columns: minmax(230px, 0.68fr) minmax(300px, 1.32fr);
    gap: 0 18px;
  }

  .inspector-head,
  .output-frame {
    grid-column: 1;
  }

  .estimate-grid,
  .config-summary,
  .inspector-alert,
  .terms-row,
  #generateButton,
  .estimate-note,
  .task-monitor {
    grid-column: 2;
  }

  .estimate-grid {
    margin-top: 0;
  }

  .output-frame {
    aspect-ratio: 4 / 5;
    min-height: 320px;
  }

  .insight-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  :root {
    --topbar-height: 76px;
  }

  .app-shell {
    display: block;
  }

  .side-rail {
    inset: auto 0 0;
    width: 100%;
    height: 58px;
    flex-direction: row;
    justify-content: space-between;
    padding: 6px 12px;
    border-top: 1px solid #2a332d;
    border-right: 0;
  }

  .brand {
    display: none;
  }

  .rail-nav {
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    width: auto;
    margin: 0;
  }

  .rail-bottom {
    flex-direction: row;
    gap: 8px;
    margin: 0;
  }

  .rail-btn {
    width: 43px;
    height: 43px;
    margin: 0;
  }

  .rail-btn::after {
    display: none;
  }

  .avatar {
    width: 33px;
    height: 33px;
  }

  .page-shell {
    padding-bottom: 58px;
  }

  .topbar {
    padding: 11px 16px;
  }

  .title-lockup .eyebrow {
    font-size: 8px;
  }

  .title-lockup h1 {
    font-size: 22px;
  }

  .status-pill {
    width: 38px;
    min-width: 38px;
    padding: 0;
    justify-content: center;
  }

  .status-pill #apiStatusText {
    display: none;
  }

  .demo-toggle {
    min-height: 38px;
    padding: 4px 5px 4px 9px;
  }

  .demo-copy {
    display: flex;
  }

  .demo-copy strong {
    font-size: 9px;
  }

  .demo-copy small {
    display: none;
  }

  .top-account-button {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 3px;
    justify-content: center;
  }

  .top-account-copy,
  .top-account-button > .icon {
    display: none;
  }

  .top-account-avatar {
    width: 30px;
    height: 30px;
  }

  .account-dropdown {
    position: fixed;
    top: calc(var(--topbar-height) - 2px);
    right: 10px;
    left: 10px;
    width: auto;
  }

  .account-dropdown::before {
    display: none;
  }

  .main-content {
    padding: 18px 14px 42px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .section-heading > p {
    padding-left: 41px;
    text-align: left;
  }

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

  .upload-card {
    min-height: 194px;
  }

  .upload-empty {
    min-height: 192px;
  }

  .upload-preview {
    min-height: 194px;
    grid-template-columns: 105px minmax(0, 1fr);
  }

  .media-preview,
  .media-preview video,
  .media-preview img {
    min-height: 194px;
  }

  .direction-grid {
    grid-template-columns: 1fr;
  }

  .engine-title-row {
    flex-direction: column;
  }

  .engine-badge {
    max-width: none;
  }

  .engine-badge .icon {
    display: none;
  }

  .inspector {
    display: block;
  }

  .output-frame {
    aspect-ratio: 9 / 10.5;
    min-height: 290px;
  }

  .estimate-grid {
    margin-top: 14px;
  }

  .future-engines small {
    width: 100%;
    margin-left: 0;
  }

  .comparison-section {
    margin-top: 28px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-heading h2 {
    font-size: 34px;
  }

  .history-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .history-item {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .history-thumb {
    width: 62px;
  }

  .history-actions {
    grid-column: 2;
    justify-content: flex-end;
  }

  .points-ledger-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .points-ledger-row time {
    grid-column: 1 / -1;
  }

  .insight-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .insight-metrics article:nth-child(2) {
    border-right: 0;
  }

  .insight-metrics article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .api-map-grid {
    grid-template-columns: 1fr;
  }

  .warning-panel {
    grid-template-columns: 40px 1fr;
  }

  .warning-panel .secondary-action {
    grid-column: 1 / -1;
  }

  .setup-code pre {
    font-size: 9px;
  }

  .toast-region {
    right: 12px;
    bottom: 72px;
  }
}

@media (max-width: 390px) {
  .title-lockup h1 {
    font-size: 19px;
  }

  .upload-preview {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .segment {
    gap: 5px;
    padding: 8px 6px;
  }

  .segment .icon {
    width: 15px;
    height: 15px;
  }

  .engine-option {
    padding: 12px;
  }

  .task-step-list {
    gap: 3px;
  }
}

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

@media (max-width: 980px) {
  .billing-guest {
    grid-template-columns: 1fr;
  }

  .billing-guest-copy {
    max-width: none;
    padding: 34px;
  }

  .auth-card {
    width: min(430px, calc(100% - 48px));
    margin: 0 auto 30px;
  }

  .account-overview {
    grid-template-columns: 1fr 1fr;
  }

  .account-profile-card {
    grid-column: 1 / -1;
  }

  .billing-plan-grid {
    grid-template-columns: 1fr 1fr;
  }

  .referral-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .rail-nav {
    gap: 4px;
  }

  .rail-bottom {
    gap: 4px;
  }

  .rail-btn {
    width: 40px;
    height: 40px;
  }

  .billing-status-line {
    width: 100%;
    justify-content: flex-start;
  }

  .billing-guest {
    min-height: 0;
  }

  .billing-guest-copy {
    padding: 28px 20px;
  }

  .billing-guest-copy h3 {
    font-size: 34px;
  }

  .auth-card {
    width: calc(100% - 28px);
    margin-bottom: 18px;
  }

  .account-overview,
  .billing-plan-grid {
    grid-template-columns: 1fr;
  }

  .account-profile-card {
    grid-column: auto;
  }

  .account-profile-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .account-profile-card .secondary-action {
    grid-column: 1 / -1;
    width: 100%;
  }

  .account-avatar {
    width: 44px;
    height: 44px;
  }

  .payment-readiness {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .payment-readiness > small {
    width: 100%;
    margin-left: 0;
  }

  .verification-code-row,
  .account-security-panel,
  .change-password-form,
  .redeem-panel,
  .redeem-form {
    grid-template-columns: 1fr;
  }

  .account-security-panel .secondary-action,
  .change-password-form .primary-action,
  .redeem-form .primary-action {
    width: 100%;
  }

  .redeem-history {
    padding: 12px 0 0;
    border-top: 1px solid #d9e2c2;
    border-left: 0;
  }

  .referral-panel {
    padding: 15px;
  }

  .referral-code-row {
    align-items: stretch;
    flex-direction: column;
  }

  .referral-code-row > div,
  .referral-code-row .secondary-action {
    width: 100%;
  }

  .referral-stats > div {
    min-height: 92px;
  }

  .distribution-head,
  .distribution-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .distribution-rate {
    text-align: left;
  }

  .distribution-stats,
  .commission-withdrawal-form,
  .payout-profile-form {
    grid-template-columns: 1fr;
  }

  .commission-record {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .commission-record .commission-status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .billing-plan-card {
    min-height: 214px;
  }

  .payment-methods {
    grid-template-columns: 1fr;
  }

  .payment-result-panel {
    grid-template-columns: 1fr;
  }

  .qr-holder {
    min-height: 180px;
  }

  .billing-order {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .billing-order .status-badge {
    grid-column: 1;
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .side-rail {
    height: calc(54px + env(safe-area-inset-bottom));
    padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
    justify-content: center;
  }

  .rail-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    width: 100%;
    height: 100%;
  }

  .rail-nav .rail-btn {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    width: 100%;
    height: 44px;
    margin: 0;
    border-radius: 4px;
  }

  .rail-nav .rail-btn .icon {
    width: 16px;
    height: 16px;
  }

  .mobile-nav-label {
    display: block;
    font-size: 6.5px;
    font-weight: 700;
    line-height: 1;
  }

  .rail-nav .rail-btn.is-active {
    color: var(--lime);
    background: transparent;
    border-color: transparent;
  }

  .rail-nav .rail-btn.is-active .icon {
    padding: 4px;
    color: var(--dark);
    background: var(--lime);
    border-radius: 50%;
    box-sizing: content-box;
  }

  .rail-nav [data-view-target="create"] {
    order: 1;
  }

  .rail-nav [data-view-target="history"] {
    order: 2;
  }

  .rail-nav [data-view-target="insights"] {
    order: 3;
  }

  .rail-nav [data-view-target="billing"] {
    order: 4;
  }

  .rail-bottom {
    display: none;
  }

  .page-shell {
    padding-bottom: calc(54px + env(safe-area-inset-bottom));
  }

  .topbar {
    min-height: 66px;
  }

  .module-nav {
    top: 66px;
    min-height: 46px;
    gap: 4px;
    padding: 5px 10px;
  }

  .module-nav button {
    min-height: 32px;
    padding: 5px 9px;
    font-size: 8px;
  }

  .title-lockup .eyebrow {
    max-width: 195px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 980px) {
  .module-intro,
  .module-tool-grid {
    grid-template-columns: 1fr;
  }

  .module-preview-panel {
    position: static;
  }

  .remix-hero {
    grid-template-columns: 1fr;
  }

  .remix-hero-copy {
    padding-bottom: 20px;
  }

  .remix-hero-visual {
    min-height: 410px;
  }
}

@media (max-width: 720px) {
  .module-intro-copy {
    padding: 26px 20px;
  }

  .module-intro-copy h2 {
    font-size: 40px;
  }

  .imagegen-showcase {
    min-height: 330px;
    padding: 14px;
  }

  .drama-showcase {
    min-height: 400px;
    padding: 18px;
  }

  .drama-voice-card {
    right: auto;
    bottom: 20px;
    left: 0;
    width: 106px;
  }

  .drama-back-card {
    top: 28px;
    right: 4px;
    width: 94px;
  }

  .module-config-panel,
  .module-preview-panel {
    padding: 15px;
  }

  .module-preview-panel {
    position: static;
    order: 0;
  }

  .remix-hero {
    min-height: 0;
  }

  .remix-hero-copy {
    padding: 28px 20px 16px;
  }

  .remix-hero-copy h2 {
    font-size: clamp(38px, 12vw, 52px);
  }

  .remix-hero-copy > p {
    font-size: 10px;
  }

  .remix-hero-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .hero-primary,
  .hero-secondary {
    width: 100%;
  }

  .remix-hero-visual {
    min-height: 430px;
    padding: 14px 24px 28px;
  }

  .hero-phone {
    width: 218px;
  }

  .floating-source {
    top: 70px;
    left: 0;
  }

  .floating-character {
    right: 0;
    bottom: 47px;
  }

  .remix-score-card {
    top: 22px;
    right: 0;
  }

  .remix-orbit-one {
    width: 300px;
    height: 300px;
  }

  .remix-orbit-two {
    width: 390px;
    height: 390px;
  }

  .remix-flow {
    width: 100%;
  }

  .remix-flow-inputs {
    grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
    gap: 5px;
  }

  .remix-plus {
    width: 24px;
    height: 24px;
  }

  .remix-input-visual {
    height: 98px;
  }

  .remix-input-copy {
    padding: 7px;
  }

  .remix-result-preview {
    grid-template-columns: 105px minmax(0, 1fr);
    gap: 10px;
    padding: 8px;
  }

  .result-video-frame {
    width: 105px;
  }

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