:root {
  color-scheme: light;
  --bg: #fff7fb;
  --panel: #ffffff;
  --text: #332a35;
  --muted: #7b6f7d;
  --line: #eadfe9;
  --primary: #4f9f93;
  --primary-dark: #31796f;
  --accent: #e56f8f;
  --ink: #3b3655;
  --warning: #b27a25;
  --danger: #cf4b59;
  --soft-pink: #ffe6ef;
  --soft-blue: #e9f6ff;
  --soft-mint: #e7f8ef;
  --soft-yellow: #fff2c7;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171319;
  --panel: #211a22;
  --text: #f7eef2;
  --muted: #bcaeb8;
  --line: #493944;
  --primary: #79c7b8;
  --primary-dark: #a1ded3;
  --accent: #ff8bab;
  --ink: #f5dfe8;
  --warning: #e0af55;
  --danger: #ff7b89;
  --soft-pink: #3b232e;
  --soft-blue: #1e3039;
  --soft-mint: #1d352f;
  --soft-yellow: #3a321d;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  background:
    linear-gradient(180deg, #fff7fb 0%, #f6fbff 48%, #fffaf0 100%);
  color: var(--text);
}

body.modal-open {
  overflow: hidden;
}

body.is-loading {
  cursor: progress;
}

html[data-theme="dark"],
html[data-theme="dark"] body {
  background: linear-gradient(180deg, #171319 0%, #182126 50%, #201b16 100%);
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 48px;
}

.global-loading {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  height: 3px;
  opacity: 0;
  pointer-events: none;
  background: transparent;
  transition: opacity 160ms ease;
}

.global-loading span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f58dae, #8ccfc3, #f7c96c);
  animation: loading-slide 950ms ease-in-out infinite;
}

.global-loading.active {
  opacity: 1;
}

@keyframes loading-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(260%); }
}

.promo-banner {
  min-height: 80px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(229, 111, 143, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 230, 239, 0.96), rgba(233, 246, 255, 0.96) 52%, rgba(255, 242, 199, 0.96)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.34) 0 10px, rgba(255,255,255,0) 10px 20px);
}

.promo-inner {
  width: min(1120px, calc(100% - 32px));
  min-height: 80px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
}

.promo-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.promo-tag {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(229, 111, 143, 0.28);
  border-radius: 8px;
  background: #ffffff;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.promo-copy strong {
  color: var(--ink);
  font-size: 20px;
}

.promo-copy > span:last-child {
  color: var(--muted);
}

.promo-save-button {
  width: fit-content;
}

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(234, 223, 233, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
}

.brand-button {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.brand-lockup {
  width: 44px;
  height: 44px;
  display: block;
  object-fit: contain;
  border-radius: 7px;
  flex: none;
}

.brand-wordmark {
  margin-left: 10px;
  color: #3b0710;
  font-size: 24px;
  font-weight: 850;
  line-height: 1;
}

.brand-tagline {
  display: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.language-picker {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-weight: 650;
}

.language-picker select {
  width: auto;
  min-width: 112px;
  height: 36px;
  padding: 0 30px 0 10px;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 14px;
}

.user-chip {
  max-width: min(320px, 40vw);
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
}

.user-avatar {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
}

.user-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 650;
}

.subtle,
.label,
.quota-text,
.message {
  color: var(--muted);
}

.home {
  display: grid;
  gap: 20px;
}

.hero {
  min-height: clamp(420px, calc(100vh - 180px), 540px);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: #fff4f8;
  border: 1px solid rgba(234, 223, 233, 0.92);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 247, 251, 0.95) 0%, rgba(255, 247, 251, 0.78) 48%, rgba(246, 251, 255, 0.42) 100%);
}

.hero-roll {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(229,111,143,0.10) 1px, transparent 1px) 0 0 / 54px 100%,
    linear-gradient(0deg, rgba(79,159,147,0.10) 1px, transparent 1px) 0 0 / 100% 44px,
    linear-gradient(135deg, #fff4f8, #edf8ff 58%, #fff6d6);
}

.hero-key,
.hero-note {
  position: absolute;
  border-radius: 4px;
}

.hero-key {
  left: 0;
  width: 120px;
  height: 42px;
  background: rgba(255, 255, 255, 0.92);
  border-right: 1px solid rgba(229, 111, 143, 0.22);
  opacity: 0.9;
}

.hero-key.key-a { top: 118px; }
.hero-key.key-b { top: 206px; }
.hero-key.key-c { top: 294px; }
.hero-key.key-d { top: 382px; }

.hero-note {
  height: 32px;
  box-shadow: 0 12px 28px rgba(229, 111, 143, 0.16);
}

.note-1 { top: 124px; left: 180px; width: 260px; background: #8ccfc3; }
.note-2 { top: 212px; left: 330px; width: 340px; background: #f7c96c; }
.note-3 { top: 300px; left: 230px; width: 220px; background: #f58dae; }
.note-4 { top: 388px; left: 530px; width: 300px; background: #8ccfc3; }
.note-5 { top: 476px; left: 150px; width: 420px; background: #f7c96c; }
.note-6 { top: 168px; left: 760px; width: 180px; background: #f58dae; }
.note-7 { top: 344px; left: 890px; width: 230px; background: #8ccfc3; }

.hero-content {
  position: relative;
  z-index: 1;
  width: min(650px, 100%);
  padding: clamp(40px, 8vw, 92px);
  color: var(--ink);
}

.hero h1 {
  margin: 0;
  font-size: clamp(44px, 8vw, 92px);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero p {
  margin: 22px 0 0;
  max-width: 520px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.tools-band,
.flow-band {
  padding-bottom: 6px;
}

.section-head.flush {
  margin-top: 0;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.tool-card {
  min-height: 150px;
  display: grid;
  gap: 8px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
}

.tool-card:hover {
  border-color: rgba(29, 111, 95, 0.45);
  box-shadow: 0 8px 24px rgba(24, 38, 54, 0.08);
}

.tool-badge {
  width: max-content;
  height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eaf4f1;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.tool-title {
  font-size: 20px;
  font-weight: 780;
}

.tool-copy {
  color: var(--muted);
  line-height: 1.5;
}

.tool-status {
  width: max-content;
  color: var(--accent);
  font-weight: 750;
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.flow-item {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.flow-index {
  color: var(--accent);
  font-weight: 850;
  font-size: 13px;
}

.flow-title {
  font-weight: 780;
  font-size: 18px;
}

.flow-copy {
  color: var(--muted);
  line-height: 1.5;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  min-height: 560px;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 22, 31, 0.42);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  min-height: auto;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
}

.auth-brand-lockup {
  width: 160px;
  height: auto;
  display: block;
  margin: 0 auto 12px;
  object-fit: contain;
}

.auth-intro {
  margin: -6px 34px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.email-sent-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7faf9;
  color: var(--muted);
  font-size: 13px;
}

.email-sent-summary span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.text-action {
  flex: 0 0 auto;
  border: 0;
  padding: 4px;
  background: transparent;
  color: #9d3358;
  cursor: pointer;
  font-weight: 700;
}

.auth-resend {
  width: 100%;
  height: 42px;
}

.toast {
  position: fixed;
  top: 16px;
  right: 18px;
  z-index: 40;
  max-width: min(420px, calc(100vw - 36px));
  border: 1px solid rgba(79, 159, 147, 0.4);
  border-radius: 6px;
  padding: 11px 14px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  font-size: 14px;
}

.toast.error {
  border-color: rgba(193, 55, 70, 0.45);
  color: #a12636;
}

.order-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  min-height: auto;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.tabs {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
  background: #f4f6f8;
}

.tab,
.ghost,
.primary,
.light {
  border: 0;
  cursor: pointer;
}

.tab {
  min-width: 88px;
  height: 36px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.tab.active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(14, 25, 38, 0.12);
}

.form,
.upload {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--text);
}

input,
select {
  height: 42px;
}

textarea {
  min-height: 88px;
  padding-top: 10px;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(229, 111, 143, 0.22);
  border-color: var(--primary);
}

.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
}

.code-row .ghost {
  height: 42px;
  white-space: nowrap;
}

.primary {
  height: 42px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--primary), #74bcae);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(79, 159, 147, 0.18);
}

.primary.wide {
  min-width: 140px;
  padding: 0 18px;
}

.primary:hover {
  background: var(--primary-dark);
}

.light {
  height: 42px;
  border-radius: 6px;
  padding: 0 18px;
  background: rgba(255,255,255,0.92);
  color: #14202b;
  font-weight: 750;
}

.primary:disabled,
.ghost:disabled,
.light:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.ghost {
  height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
}

.message {
  min-height: 22px;
  font-size: 14px;
}

.panel-title {
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 780;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.pagination .ghost {
  min-width: 76px;
}

.loading-card {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 14px;
}

.loading-card span {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(229, 111, 143, 0.22);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 760ms linear infinite;
}

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

.app-panel {
  display: grid;
  gap: 18px;
}

.member-workspace {
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
}

.workspace-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 44px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.workspace-tabs::-webkit-scrollbar {
  display: none;
}

.workspace-tab {
  position: relative;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
  cursor: pointer;
}

.workspace-tab::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: transparent;
}

.workspace-tab:hover {
  color: var(--ink);
}

.workspace-tab:focus-visible {
  outline: 2px solid rgba(79, 159, 147, 0.48);
  outline-offset: -2px;
}

.workspace-tab.active {
  color: var(--ink);
}

.workspace-tab.active::after {
  background: var(--accent);
}

.workspace-tab-panel {
  min-width: 0;
  min-height: 0;
}

.workspace-tab-panel[hidden] {
  display: none;
}

.workspace-tab-panel .section-head.compact {
  margin-top: 0;
}

.workspace-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.workspace-head h1,
.workspace-head h2 {
  margin: 2px 0 0;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

.workspace-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.seo-guide {
  max-width: 1040px;
  margin: 0 auto;
  padding: 4px 2px 20px;
}

.seo-guide > header {
  max-width: 760px;
  margin-bottom: 24px;
}

.seo-guide h2,
.seo-guide h3 {
  margin: 0;
  letter-spacing: 0;
}

.seo-guide h2 {
  font-size: 24px;
  line-height: 1.25;
}

.seo-guide h3 {
  font-size: 17px;
  line-height: 1.35;
}

.seo-guide p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.seo-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 32px;
  padding: 20px 0 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.seo-faq {
  padding-top: 24px;
}

.seo-faq details {
  border-bottom: 1px solid var(--line);
}

.seo-faq summary {
  padding: 15px 26px 15px 0;
  color: var(--ink);
  font-weight: 750;
  cursor: pointer;
}

.seo-faq details p {
  max-width: 820px;
  margin: -3px 0 16px;
}

.guest-quota-notice {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(79, 159, 147, 0.28);
  border-radius: 8px;
  background: var(--soft-mint);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 650;
}

.turnstile-slot {
  min-height: 65px;
}

.guest-steps {
  display: grid;
  gap: 12px;
}

#guestView {
  align-content: start;
}

.guest-step {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.stat {
  min-height: 74px;
  display: grid;
  gap: 6px;
  align-content: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
}

.stat-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 17px;
  font-weight: 780;
}

.account-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 18px;
}

.account-detail {
  display: grid;
  gap: 6px;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.account-detail span {
  color: var(--muted);
  font-size: 13px;
}

.account-detail strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 15px;
}

.message.error {
  color: var(--danger);
}

.message.ok {
  color: var(--primary);
}

.account-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
}

.label {
  font-size: 13px;
  margin-bottom: 4px;
}

.value {
  font-weight: 750;
  overflow-wrap: anywhere;
}

.quota {
  margin: 0;
}

.quota-bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #edf1f5;
}

.quota-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--primary);
}

.quota-text {
  margin-top: 8px;
  font-size: 14px;
}

.file-picker {
  display: flex;
  min-height: 96px;
  align-items: center;
  justify-content: center;
  border: 1px dashed #aeb8c7;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  text-align: center;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.file-picker:hover,
.file-picker:focus-within {
  border-color: var(--primary);
  background: #fff7fa;
}

.file-picker.drag-active {
  border-color: var(--primary);
  background: #fff0f5;
  box-shadow: inset 0 0 0 2px rgba(229, 111, 143, 0.16);
}

.file-picker input {
  display: none;
}

.file-picker span {
  color: var(--ink);
  font-weight: 700;
}

.model-picker {
  gap: 8px;
}

.model-picker span {
  color: var(--ink);
}

.model-picker select {
  cursor: pointer;
}

.workbench-section {
  min-width: 0;
}

.convert-section {
  width: 100%;
}

.hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.retention-hint {
  padding: 8px 10px;
  border: 1px solid rgba(79, 159, 147, 0.22);
  border-radius: 8px;
  background: var(--soft-mint);
  color: var(--primary-dark);
  font-weight: 650;
}

.rights-hint {
  padding: 8px 10px;
  border: 1px solid rgba(195, 72, 116, 0.22);
  border-radius: 8px;
  background: rgba(255, 238, 245, 0.76);
  color: var(--ink);
  font-weight: 700;
}

.task-panel {
  min-width: 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
}

.section-head.compact {
  margin-top: 18px;
}

h2 {
  margin: 0;
  font-size: 18px;
}

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.billing-notice {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(79, 159, 147, 0.22);
  border-radius: 8px;
  background: rgba(231, 248, 239, 0.68);
  color: var(--primary-dark);
  font-size: 13px;
  line-height: 1.45;
}

.billing-notice strong {
  color: var(--ink);
}

.billing-notice span {
  color: var(--primary-dark);
}

.billing-legal {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.billing-legal a,
.site-footer a {
  color: #9d3358;
  text-decoration: none;
}

.billing-legal a:hover,
.site-footer a:hover {
  text-decoration: underline;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 32px;
  color: var(--muted);
  font-size: 12px;
}

.site-footer nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.legal-consent {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.legal-consent input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
}

.legal-consent a {
  color: #9d3358;
}

#authLegalAnd {
  margin: 0 4px;
}

.plan {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.plan.current {
  border-color: rgba(29, 111, 95, 0.45);
  background: #f2f8f6;
}

.plan-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plan-title {
  font-weight: 750;
}

.plan-price {
  margin-top: 2px;
  color: var(--accent);
  font-weight: 750;
}

.plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 2px;
}

.plan-price-row del {
  color: var(--muted);
  font-size: 13px;
}

.plan-price-row .plan-price { margin-top: 0; }

.plan-discount {
  padding: 1px 5px;
  border: 1px solid rgba(229, 111, 143, 0.38);
  border-radius: 5px;
  background: rgba(255, 230, 239, 0.7);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.plan-offer-label {
  margin-top: 3px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.plan-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.orders {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.orders-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
}

.order {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.order-main,
.order-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.order-main span {
  font-weight: 700;
}

.order-main strong {
  color: var(--accent);
}

.order-meta {
  flex-wrap: wrap;
  justify-content: flex-start;
  color: var(--muted);
  font-size: 13px;
}

.inline-action {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 750;
  cursor: pointer;
}

.order-detail {
  display: grid;
  gap: 14px;
}

.order-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.order-status-card span {
  font-weight: 780;
}

.order-status-card strong {
  color: var(--accent);
  font-size: 30px;
}

.order-status-card.paid {
  background: #f2f8f6;
  border-color: rgba(29, 111, 95, 0.36);
}

.order-status-card.cancelled,
.order-status-card.expired,
.order-status-card.refunded {
  background: #fff8f5;
  border-color: rgba(180, 83, 9, 0.3);
}

.order-status-card.refunded strong,
.payment-placeholder.refunded strong {
  color: var(--danger);
}

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

.order-detail-grid > div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.order-detail-grid span {
  color: var(--muted);
  font-size: 13px;
}

.order-detail-grid strong {
  overflow-wrap: anywhere;
}

.payment-placeholder {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px dashed #aeb8c7;
  border-radius: 8px;
  background: #fbfcfd;
}

.payment-code {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(90deg, #111922 10px, transparent 10px) 0 0 / 20px 20px,
    linear-gradient(#111922 10px, transparent 10px) 0 0 / 20px 20px,
    #e9edf3;
  color: #111922;
  font-weight: 850;
  letter-spacing: 0;
}

.payment-placeholder p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.order-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.ghost.danger {
  color: var(--danger);
  border-color: rgba(190, 64, 52, 0.35);
}

.jobs {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.admin-view {
  display: grid;
}

.admin-panel {
  min-height: auto;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.admin-stat {
  display: grid;
  gap: 8px;
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.admin-stat span {
  color: var(--muted);
  font-size: 13px;
}

.admin-stat strong {
  color: var(--ink);
  font-size: 24px;
}

.admin-section {
  margin-top: 22px;
}

.admin-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 10px;
  margin-top: 12px;
}

.admin-filters {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.admin-filters select {
  min-width: 160px;
}

.admin-order-tools {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px 88px 104px;
  gap: 10px;
  margin-top: 12px;
}

.promo-admin {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,230,239,0.46), rgba(233,246,255,0.46)),
    #ffffff;
}

.switch-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  font-weight: 760;
}

.switch-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

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

.admin-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.admin-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

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

.admin-card-head > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-card-head strong {
  overflow-wrap: anywhere;
}

.admin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 13px;
}

.admin-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eaf4f1;
  color: var(--primary);
  font-size: 12px;
  font-weight: 750;
}

.admin-badge.refunded {
  background: #fff0ec;
  color: var(--danger);
}

.admin-edit-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) 92px;
  gap: 10px;
  align-items: end;
}

.admin-edit-row label {
  font-size: 13px;
}

.admin-order-form {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.admin-order-form textarea {
  width: 100%;
  resize: vertical;
}

.job {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.job-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.job-name {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.job-progress-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.job-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.job-progress-bar {
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: var(--primary);
  transition: width 240ms ease;
}

.job-progress-bar.queued { background: #5f6f89; }
.job-progress-bar.running { background: var(--warning); }
.job-progress-bar.succeeded { background: var(--primary); }
.job-progress-bar.failed { background: var(--danger); }

.status {
  flex: 0 0 auto;
  height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  color: #ffffff;
  background: var(--muted);
}

.status.queued { background: #5f6f89; }
.status.running { background: var(--warning); }
.status.succeeded { background: var(--primary); }
.status.failed { background: var(--danger); }

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.download {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.retention {
  color: var(--primary-dark);
  font-weight: 700;
}

.retention.expired {
  color: var(--danger);
}

.compact-action {
  min-height: 26px;
  padding: 3px 9px;
  font-size: 12px;
}

.as-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  color: #ffffff;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

html[data-theme="dark"] .promo-banner {
  border-color: rgba(255, 139, 171, 0.24);
  background: linear-gradient(135deg, rgba(59, 35, 46, 0.98), rgba(30, 48, 57, 0.98) 52%, rgba(58, 50, 29, 0.98));
}

html[data-theme="dark"] .promo-tag,
html[data-theme="dark"] .promo-code,
html[data-theme="dark"] .user-chip,
html[data-theme="dark"] .tool-card,
html[data-theme="dark"] .flow-item,
html[data-theme="dark"] .toast,
html[data-theme="dark"] .modal-close,
html[data-theme="dark"] .tab.active,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .account-detail,
html[data-theme="dark"] .order,
html[data-theme="dark"] .order-detail-grid > div,
html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .job {
  background: #211a22;
  color: var(--text);
  border-color: var(--line);
}

html[data-theme="dark"] .topbar {
  border-color: var(--line);
  background: rgba(33, 26, 34, 0.88);
}

html[data-theme="dark"] .brand-wordmark {
  color: #ffd8e0;
}

html[data-theme="dark"] .language-picker select,
html[data-theme="dark"] .ghost,
html[data-theme="dark"] .light {
  background: rgba(43, 35, 43, 0.94);
  color: var(--text);
  border-color: var(--line);
}

html[data-theme="dark"] .hero {
  border-color: var(--line);
  background: #251b23;
}

html[data-theme="dark"] .hero::after {
  background: linear-gradient(90deg, rgba(30, 23, 30, 0.96), rgba(30, 23, 30, 0.8) 48%, rgba(25, 35, 40, 0.5));
}

html[data-theme="dark"] .hero-roll {
  background:
    linear-gradient(90deg, rgba(255, 139, 171, 0.08) 1px, transparent 1px) 0 0 / 54px 100%,
    linear-gradient(0deg, rgba(121, 199, 184, 0.08) 1px, transparent 1px) 0 0 / 100% 44px,
    linear-gradient(135deg, #251b23, #1c2b32 58%, #322c1d);
}

html[data-theme="dark"] .hero-key {
  background: rgba(247, 238, 242, 0.82);
}

html[data-theme="dark"] .email-sent-summary,
html[data-theme="dark"] .tabs,
html[data-theme="dark"] .loading-card,
html[data-theme="dark"] .guest-step,
html[data-theme="dark"] .stat,
html[data-theme="dark"] .file-picker,
html[data-theme="dark"] .plan,
html[data-theme="dark"] .order-status-card,
html[data-theme="dark"] .payment-placeholder,
html[data-theme="dark"] .admin-stat,
html[data-theme="dark"] .admin-order-form {
  background: #271f27;
  color: var(--text);
  border-color: var(--line);
}

html[data-theme="dark"] .file-picker:hover,
html[data-theme="dark"] .file-picker:focus-within,
html[data-theme="dark"] .file-picker.drag-active {
  background: #33232c;
}

html[data-theme="dark"] .quota-bar,
html[data-theme="dark"] .job-progress {
  background: #3a3038;
}

html[data-theme="dark"] .rights-hint,
html[data-theme="dark"] .plan-discount {
  background: rgba(91, 43, 61, 0.72);
}

html[data-theme="dark"] .billing-notice,
html[data-theme="dark"] .plan.current,
html[data-theme="dark"] .order-status-card.paid,
html[data-theme="dark"] .admin-badge {
  background: #20352f;
}

html[data-theme="dark"] .order-status-card.cancelled,
html[data-theme="dark"] .order-status-card.expired,
html[data-theme="dark"] .order-status-card.refunded,
html[data-theme="dark"] .admin-badge.refunded {
  background: #3b2527;
}

html[data-theme="dark"] .promo-admin {
  background:
    linear-gradient(135deg, rgba(74, 38, 52, 0.6), rgba(28, 48, 57, 0.6)),
    #211a22;
}

@media (min-width: 1000px) {
  .convert-section .upload {
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.7fr);
    align-items: stretch;
  }

  .convert-section .file-picker {
    grid-row: 1 / span 2;
    min-height: 154px;
  }

  .convert-section .model-picker {
    grid-column: 2;
    grid-row: 1;
  }

  .convert-section #uploadBtn {
    grid-column: 2;
    grid-row: 2;
  }

  .convert-section .message {
    grid-column: 1 / -1;
  }

  .convert-section .turnstile-slot {
    grid-column: 1 / -1;
  }
}

@media (min-width: 821px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  body {
    display: flex;
    flex-direction: column;
  }

  .promo-banner {
    flex: 0 0 80px;
  }

  .shell {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 14px;
    overflow: hidden;
    padding: 14px 0 16px;
  }

  .topbar {
    min-height: 60px;
  }

  .home,
  .workspace,
  .admin-view {
    min-height: 0;
  }

  .home {
    overflow: auto;
    align-content: start;
    padding-right: 6px;
    scrollbar-gutter: stable;
  }

  .workspace {
    height: 100%;
    overflow: hidden;
    grid-template-columns: minmax(0, 1fr);
  }

  .panel {
    min-height: 0;
  }

  .app-panel:not(.member-workspace),
  .admin-panel {
    height: 100%;
    overflow: auto;
    scrollbar-gutter: stable;
  }

  .member-workspace {
    height: 100%;
    overflow: hidden;
  }

  .workspace-tab-panel {
    overflow: auto;
    padding: 2px 8px 12px 0;
    scrollbar-gutter: stable;
  }

  .admin-view {
    overflow: hidden;
  }

  .home::-webkit-scrollbar,
  .app-panel:not(.member-workspace)::-webkit-scrollbar,
  .workspace-tab-panel::-webkit-scrollbar,
  .admin-panel::-webkit-scrollbar {
    width: 10px;
  }

  .home::-webkit-scrollbar-thumb,
  .app-panel:not(.member-workspace)::-webkit-scrollbar-thumb,
  .workspace-tab-panel::-webkit-scrollbar-thumb,
  .admin-panel::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 999px;
    background: rgba(229, 111, 143, 0.28);
    background-clip: padding-box;
  }
}

@media (max-width: 820px) {
  .promo-inner {
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    padding: 12px 0;
  }

  .promo-banner,
  .promo-inner {
    min-height: 80px;
  }

  .shell {
    width: min(100% - 20px, 720px);
    padding-top: 12px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .brand-button {
    align-self: flex-start;
  }

  .brand-lockup {
    width: 40px;
    height: 40px;
  }

  .brand-wordmark {
    margin-left: 8px;
    font-size: 21px;
  }

  .nav {
    width: 100%;
    min-width: 0;
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

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

  .nav > * {
    flex: 0 0 auto;
  }

  .user-chip {
    order: 3;
    max-width: 100%;
  }

  .nav .ghost {
    height: 34px;
    padding: 0 9px;
  }

  .hero {
    min-height: 430px;
  }

  .hero::after {
    background: linear-gradient(90deg, rgba(255, 247, 251, 0.96), rgba(255, 247, 251, 0.78));
  }

  .hero-content {
    padding: 34px 22px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-key {
    width: 86px;
  }

  .note-1 { left: 130px; width: 210px; }
  .note-2 { left: 230px; width: 260px; }
  .note-3 { left: 160px; width: 190px; }
  .note-4 { left: 310px; width: 230px; }
  .note-5 { left: 110px; width: 280px; }
  .note-6 { left: 420px; width: 140px; }
  .note-7 { left: 470px; width: 160px; }

  .workspace {
    grid-template-columns: 1fr;
  }

  .flow-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    min-height: auto;
  }

  .member-workspace {
    display: grid;
    overflow: visible;
  }

  .workspace-tab-panel {
    overflow: visible;
    padding: 0;
  }

  .code-row {
    grid-template-columns: 1fr;
  }

  .workspace-head h1,
  .workspace-head h2 {
    font-size: 24px;
  }

  .seo-guide-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .account-details {
    grid-template-columns: 1fr;
  }

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

  .admin-search,
  .admin-order-tools,
  .admin-edit-row,
  .promo-edit-grid {
    grid-template-columns: 1fr;
  }

  .order-detail-grid,
  .payment-placeholder {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0 22px;
  }

  .site-footer nav {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .model-picker select {
    font-size: 12px;
  }
}
