﻿@font-face {
  font-family: "InterLocal";
  src: url("/assets/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "InterLocal";
  src: url("/assets/fonts/InterVariable-Italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #03131d;
  --surface: rgba(26, 28, 32, .92);
  --surface-raised: rgba(35, 38, 45, .88);
  --surface-soft: rgba(0, 91, 114, .16);
  --text: #f5f7fb;
  --muted: #8f98a8;
  --muted-strong: #cbd3df;
  --line: rgba(255, 255, 255, .10);
  --line-strong: rgba(255, 255, 255, .18);
  --primary: #00a7b5;
  --primary-dark: #005b72;
  --primary-soft: rgba(0, 167, 181, .16);
  --amber: #d7ac50;
  --danger: #fb7185;
  --success: #34d399;
  --sidebar-bg: rgba(3, 19, 29, .96);
  --sidebar-active: rgba(0, 167, 181, .14);
  --shadow: 0 28px 80px rgba(0, 0, 0, .35);
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, .22);
  --radius: 14px;
  --radius-sm: 10px;
  --font-main: "InterLocal", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 14px;
  --text-lg: 17px;
  --text-xl: 20px;
  --text-2xl: 32px;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 24px;
  --space-6: 32px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 42% 0%, rgba(0, 167, 181, .18), transparent 34%),
    radial-gradient(circle at 84% 14%, rgba(215, 172, 80, .08), transparent 30%),
    linear-gradient(135deg, #03131d 0%, #071e2b 48%, #005b72 100%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: var(--text-md);
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.theme-light {
  --bg: #f6f8fb;
  --surface: rgba(255, 255, 255, .94);
  --surface-raised: rgba(255, 255, 255, .98);
  --surface-soft: rgba(0, 91, 114, .08);
  --text: #071e2b;
  --muted: #64748b;
  --muted-strong: #334155;
  --line: rgba(7, 30, 43, .12);
  --line-strong: rgba(7, 30, 43, .18);
  --primary-soft: rgba(0, 167, 181, .12);
  --sidebar-bg: rgba(255, 255, 255, .88);
  --sidebar-active: rgba(0, 167, 181, .12);
  --shadow: 0 22px 70px rgba(7, 30, 43, .10);
  --shadow-soft: 0 10px 28px rgba(7, 30, 43, .08);
  background:
    radial-gradient(circle at 42% 0%, rgba(0, 167, 181, .12), transparent 34%),
    radial-gradient(circle at 84% 14%, rgba(215, 172, 80, .12), transparent 30%),
    linear-gradient(135deg, #f8fbfc 0%, #eef6f8 48%, #e9f1f4 100%),
    var(--bg);
}

button, input, select, textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(0, 167, 181, .48);
  outline-offset: 2px;
}

.nav-item:focus-visible {
  outline-color: rgba(255,255,255,.42);
}

body.theme-light .nav-item:focus-visible {
  outline-color: rgba(0, 91, 114, .32);
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

body.theme-light button:disabled {
  opacity: 1;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 12, 16, .72);
  color: var(--text);
  padding: 11px 12px;
  outline: none;
  min-height: 44px;
  box-shadow: var(--shadow-soft);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

body.theme-light input,
body.theme-light select,
body.theme-light textarea {
  background: rgba(255, 255, 255, .88);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(0, 167, 181, .70);
  box-shadow: 0 0 0 3px rgba(0, 167, 181, .16);
}

.file-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow-soft);
}

.file-picker input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-picker-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(0, 167, 181, .34);
  background: rgba(0, 167, 181, .12);
  color: var(--text);
  box-shadow: none;
  font-size: var(--text-sm);
  font-weight: 760;
}

.file-picker-button:hover {
  border-color: rgba(0, 167, 181, .58);
  background: rgba(0, 167, 181, .18);
}

.file-picker-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.3;
}

textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.55;
}

.video-prompt-input {
  min-height: 168px;
  line-height: 1.65;
  margin-top: 7px;
  padding: 14px 16px;
}

::placeholder {
  color: #687386;
}

label {
  display: block;
  color: var(--muted-strong);
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: 0;
  margin: 14px 0 7px;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  transition: grid-template-columns .22s ease;
}

body.public-home .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 78px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--sidebar-bg);
  color: #f8fafc;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid rgba(215, 172, 80, .12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 18px 0 60px rgba(0, 0, 0, .16);
  transition: width .22s ease, padding .22s ease, background .22s ease, box-shadow .22s ease;
}

.sidebar-collapse {
  position: absolute;
  top: 18px;
  right: -16px;
  z-index: 4;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.76);
  color: #071e2b;
  box-shadow: var(--shadow-soft);
  display: grid;
  place-items: center;
  transition: transform .18s ease, background .18s ease;
}

.sidebar-collapse:hover {
  background: #fff;
  transform: translateY(-1px);
}

.sidebar-collapse svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .22s ease;
}

body.sidebar-collapsed .sidebar-collapse svg {
  transform: rotate(180deg);
}

body.sidebar-collapsed .sidebar {
  padding-inline: 12px;
}

body.theme-light .sidebar {
  color: var(--text);
  border-right-color: rgba(7, 30, 43, .10);
  box-shadow: 16px 0 50px rgba(7, 30, 43, .06);
}

.brand {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
  padding: 4px 4px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

body.sidebar-collapsed .brand {
  align-items: center;
  padding-inline: 0;
}

body.theme-light .brand {
  border-bottom-color: rgba(7, 30, 43, .10);
}

.brand img {
  width: 172px;
  height: 62px;
  border-radius: 0;
  object-fit: contain;
  object-position: left center;
}

body.sidebar-collapsed .brand img {
  content: url("/assets/brand/openlai-logo-mark.png");
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand strong,
.brand span {
  display: block;
}

#brand-company {
  display: none;
}

body.sidebar-collapsed .brand div,
body.sidebar-collapsed .sidebar-note,
body.sidebar-collapsed .nav-item {
  overflow: hidden;
}

body.sidebar-collapsed .brand span,
body.sidebar-collapsed .sidebar-note {
  display: none;
}

.brand strong {
  display: none;
}

.brand span {
  color: rgba(215, 172, 80, .78);
  font-size: var(--text-xs);
  margin-top: 0;
  padding-left: 2px;
}

.nav {
  display: grid;
  gap: 6px;
}

.runtime-log-trigger {
  margin-top: auto;
  min-height: 44px;
  border: 1px solid rgba(0, 137, 149, .22);
  border-radius: var(--radius);
  padding: 10px 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #dbe7eb;
  background: rgba(0, 137, 149, .08);
  font-weight: 680;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.runtime-log-trigger:hover {
  background: rgba(0, 137, 149, .16);
  border-color: rgba(0, 137, 149, .42);
  transform: translateY(-1px);
}

body.theme-light .runtime-log-trigger { color: #164454; background: rgba(255, 255, 255, .64); }
.runtime-log-icon { width: 18px; height: 18px; flex: 0 0 18px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M5 4h14v16H5V4Zm3 4h8M8 12h8m-8 4h5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M5 4h14v16H5V4Zm3 4h8M8 12h8m-8 4h5'/%3E%3C/svg%3E") center / contain no-repeat; }
.runtime-log-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: rgba(0, 137, 149, .16); color: #087b86; font-size: 11px; }
body.sidebar-collapsed .runtime-log-trigger { justify-content: center; padding: 11px 0; }
body.sidebar-collapsed .runtime-log-label,
body.sidebar-collapsed .runtime-log-count { display: none; }

.nav-item {
  text-align: left;
  border-radius: var(--radius);
  padding: 11px 12px;
  color: #cbd5e1;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
  font-weight: 650;
}

body.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 12px 0;
  gap: 0;
  font-size: 0;
}

body.sidebar-collapsed .nav-item::before {
  width: 19px;
  height: 19px;
  flex-basis: 19px;
}

body.theme-light .nav-item {
  color: #334155;
}

.nav-item::before {
  content: "";
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  opacity: .72;
  background: currentColor;
  -webkit-mask: var(--nav-icon) center / contain no-repeat;
  mask: var(--nav-icon) center / contain no-repeat;
}

.nav-item small {
  display: none;
}

.nav-item[data-view="dashboard"] { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M4 13h6V4H4v9Zm10 7h6V4h-6v16ZM4 20h6v-3H4v3Z'/%3E%3C/svg%3E"); }
.nav-item[data-view="sources"] { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M4 7h16M4 12h10M4 17h7m7-1 2 2m-6 0 6-6'/%3E%3C/svg%3E"); }
.nav-item[data-view="insights"] { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M4 19V5m4 14v-6m5 6V8m5 11v-9M4 19h16'/%3E%3C/svg%3E"); }
.nav-item[data-view="assets"] { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M4 7.5 12 3l8 4.5v9L12 21l-8-4.5v-9Zm8 4.5 8-4.5M12 12 4 7.5m8 4.5V21'/%3E%3C/svg%3E"); }
.nav-item[data-view="copy"] { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M5 4h9l5 5v11H5V4Zm9 0v5h5M8 13h8M8 17h6'/%3E%3C/svg%3E"); }
.nav-item[data-view="video"] { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M5 6h10a3 3 0 0 1 3 3v6a3 3 0 0 1-3 3H5V6Zm13 4 3-2v8l-3-2M9 10l4 2-4 2v-4Z'/%3E%3C/svg%3E"); }
.nav-item[data-view="publish"] { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M4 12 20 4l-5 16-3-7-8-1Zm8 1 8-9'/%3E%3C/svg%3E"); }
.nav-item[data-view="credits"] { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M6 4h12l3 5-9 11L3 9l3-5Zm-3 5h18M8 4l4 16 4-16'/%3E%3C/svg%3E"); }

.nav-item.active,
.nav-item:hover {
  background: var(--sidebar-active);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--primary);
}

body.theme-light .nav-item.active,
body.theme-light .nav-item:hover {
  color: #071e2b;
}

.sidebar-note {
  margin-top: 0;
  border: 1px solid rgba(215, 172, 80, .16);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255,255,255,.04);
}

.runtime-log-modal-card { width: min(760px, calc(100vw - 32px)); max-height: min(760px, calc(100vh - 48px)); display: flex; flex-direction: column; gap: 14px; }
.runtime-log-head p { max-width: 590px; }
.runtime-log-meta { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 137, 149, .05); color: var(--muted); font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.runtime-log-list { min-height: 240px; max-height: 460px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: rgba(3, 19, 29, .96); color: #d9e5e9; padding: 8px 0; }
.runtime-log-empty { min-height: 220px; display: grid; place-items: center; color: #8fa5ae; font-size: 13px; }
.runtime-log-entry { display: grid; grid-template-columns: 70px 58px minmax(0, 1fr); gap: 9px; padding: 9px 12px; border-bottom: 1px solid rgba(255,255,255,.07); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.runtime-log-entry:last-child { border-bottom: 0; }
.runtime-log-entry time { color: #8fa5ae; }
.runtime-log-level { color: #66d9e0; font-weight: 750; }
.runtime-log-entry.error .runtime-log-level { color: #fb7185; }
.runtime-log-entry.warn .runtime-log-level { color: #fbbf24; }
.runtime-log-message { min-width: 0; overflow-wrap: anywhere; }
.runtime-log-actions { display: flex; justify-content: flex-end; gap: 10px; }

body.theme-light .sidebar-note {
  background: rgba(255, 255, 255, .72);
  border-color: rgba(0, 91, 114, .16);
}

.sidebar-note span,
.sidebar-note strong {
  display: block;
}

.sidebar-note span {
  color: #a8c2bd;
  font-size: 12px;
  margin-bottom: 5px;
}

.workspace {
  min-height: 100vh;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

body.public-home .sidebar,
body.public-home .stepper,
body.public-home .site-footer,
body.public-home .topbar > div:first-of-type {
  display: none;
}

body.public-home .workspace {
  min-height: 100vh;
  padding: clamp(18px, 4vw, 44px);
}

body.public-home .topbar {
  justify-content: flex-end;
  min-height: 48px;
}

.mobile-overlay,
.mobile-menu-button {
  display: none;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  min-height: 42px;
  border-radius: var(--radius);
  padding: 0;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--muted-strong);
  box-shadow: var(--shadow-soft);
  display: inline-grid;
  place-items: center;
}

.theme-toggle:hover {
  border-color: rgba(0, 167, 181, .42);
  background: var(--primary-soft);
  color: var(--text);
}

body.theme-light .theme-toggle,
body.theme-light .ghost,
body.theme-light .download,
body.theme-light .quick-flow button,
body.theme-light .account-trigger {
  background: rgba(255, 255, 255, .78);
}

.theme-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle svg circle,
.theme-toggle svg path:first-child {
  fill: currentColor;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
}

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

h1 {
  font-size: clamp(28px, 3vw, var(--text-2xl));
  line-height: 1.12;
  font-weight: 760;
  letter-spacing: 0;
}

h2 {
  font-size: var(--text-xl);
  line-height: 1.2;
  font-weight: 720;
}

h3 {
  font-size: var(--text-md);
  line-height: 1.3;
  font-weight: 690;
}

p {
  color: var(--muted);
  line-height: 1.58;
}

.topbar-actions,
.inline,
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.primary,
.ghost,
.download,
.quick-flow button {
  border-radius: var(--radius);
  padding: 10px 15px;
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.primary {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  box-shadow: 0 16px 38px rgba(0, 167, 181, .26);
}

.primary:hover {
  background: linear-gradient(135deg, #00485c, var(--primary-dark));
  transform: translateY(-1px);
}

.ghost,
.download,
.quick-flow button {
  background: rgba(255,255,255,.06);
  color: var(--muted-strong);
  border: 1px solid var(--line);
  box-shadow: none;
}

.ghost:hover,
.download:hover,
.quick-flow button:hover {
  border-color: rgba(0, 167, 181, .42);
  background: rgba(0, 167, 181, .12);
  color: #f4fbfb;
}

.action-cost.ghost {
  background: var(--primary-soft);
  color: #e8fbfd;
  border-color: rgba(0, 167, 181, .34);
  box-shadow: 0 12px 28px rgba(0, 167, 181, .10);
}

.action-cost.ghost:hover {
  background: rgba(0, 167, 181, .20);
  border-color: rgba(0, 167, 181, .56);
}

.action-cost.primary {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

body.theme-light .action-cost.ghost {
  background: rgba(0, 167, 181, .08);
  color: #365066;
  border-color: rgba(0, 167, 181, .34);
  box-shadow: none;
}

body.theme-light .action-cost.ghost:disabled,
body.theme-light .action-cost.primary:disabled {
  background: rgba(0, 91, 114, .055);
  color: #5f7185;
  border: 1px solid rgba(0, 167, 181, .28);
  box-shadow: none;
}

body.theme-light .action-cost.ghost:disabled .cost-chip,
body.theme-light .action-cost.primary:disabled .cost-chip {
  color: #4f6578;
}

.cost-chip,
.gem-value {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  letter-spacing: 0;
}

.cost-chip {
  padding: 0;
  background: transparent;
  color: currentColor;
  font-weight: 760;
  line-height: 1.2;
}

.btn-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flow-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
  grid-column: 1 / -1;
}

.flow-actions .primary {
  min-width: 112px;
  padding-inline: 24px;
}

.context-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--muted);
  padding: 12px 14px;
  margin: 12px 0;
  line-height: 1.5;
}

.context-box.compact,
.review-banner.compact,
.demo-capability-note.compact {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
}

.context-box.compact {
  margin: 10px 0;
}

.context-box.ready {
  border-color: rgba(52, 211, 153, .35);
  background: rgba(52, 211, 153, .10);
  color: #bbf7d0;
}

.review-banner,
.connection-card {
  border: 1px solid rgba(0, 167, 181, .24);
  border-radius: var(--radius);
  background: rgba(0, 167, 181, .10);
  padding: 14px;
  display: grid;
  gap: 5px;
  margin: 12px 0;
}

.review-banner strong,
.connection-card strong {
  color: var(--text);
}

.review-banner span,
.connection-card span,
.connection-card small {
  color: var(--muted);
  line-height: 1.45;
}

.review-banner.compact span,
.demo-capability-note.compact span {
  line-height: 1.25;
}

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

.review-checklist li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--muted-strong);
  background: rgba(255,255,255,.04);
}

.review-checklist li.ok {
  border-color: rgba(21, 128, 61, .24);
}

.review-checklist li.warn {
  border-color: rgba(199, 131, 24, .32);
  background: rgba(246, 199, 104, .10);
}

.account-menu {
  position: relative;
  min-width: 0;
}

.account-trigger {
  min-height: 42px;
  max-width: 260px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.06);
  color: var(--muted-strong);
  box-shadow: var(--shadow-soft);
  font-size: var(--text-sm);
  font-weight: 680;
}

#account-name {
  min-width: 0;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-trigger:hover,
.account-trigger[aria-expanded="true"] {
  border-color: rgba(0, 167, 181, .42);
  background: rgba(0, 167, 181, .12);
  color: #f4fbfb;
}

.account-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(0,167,181,.95), rgba(0, 167, 181,.78));
  color: #fff;
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.account-avatar.large {
  width: 38px;
  height: 38px;
  font-size: 15px;
}

.account-caret {
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
}

.account-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 40;
  width: min(360px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(20, 23, 28, .96);
  box-shadow: 0 24px 70px rgba(0,0,0,.42);
  backdrop-filter: blur(14px);
  padding: 14px;
}

.account-popover-head {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.account-popover-head > div {
  min-width: 0;
  flex: 1;
}

.account-popover-head strong,
.account-popover-head small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-popover-head small {
  margin-top: 3px;
  color: var(--muted);
  font-size: var(--text-xs);
}

.account-balance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(0, 167, 181, .24);
  border-radius: var(--radius-sm);
  background: rgba(0, 167, 181, .10);
}

.account-balance-row span {
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 650;
}

.account-recharge-button {
  margin-left: auto;
  padding: 5px 10px;
  border: 1px solid rgba(125, 230, 237, .30);
  border-radius: 999px;
  color: #7de6ed;
  background: rgba(0, 167, 181, .12);
  font-size: var(--text-xs);
  font-weight: 750;
}

.account-recharge-button:hover {
  border-color: var(--primary);
  background: rgba(0, 167, 181, .22);
}

.account-balance-row strong,
.mini-cost-table strong,
.account-history strong {
  color: var(--amber);
}

.account-details {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

.account-details summary {
  cursor: pointer;
  color: var(--muted-strong);
  font-size: var(--text-sm);
  font-weight: 700;
}

.mini-cost-table,
.account-history {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 280px;
  overflow: auto;
}

.mini-cost-table div,
.account-history .timeline-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.045);
  padding: 9px 10px;
  color: var(--muted-strong);
}

.account-history .timeline-item {
  align-items: flex-start;
}

.account-history span {
  line-height: 1.35;
}

.account-logout {
  width: 100%;
  margin-top: 10px;
  min-height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  color: var(--muted-strong);
  font-size: var(--text-sm);
  font-weight: 700;
}

.account-logout:hover {
  color: #fff;
  border-color: rgba(251, 113, 133, .34);
  background: rgba(251, 113, 133, .12);
}

.stepper {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  width: min(760px, 100%);
  margin: -10px auto 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(10px);
}

.step {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--muted);
  box-shadow: none;
  font-weight: 650;
  font-size: var(--text-xs);
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.step:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--muted-strong);
}

.step b {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.08);
  color: var(--muted-strong);
  font-size: 11px;
}

.step.active {
  border-color: rgba(0, 167, 181,.42);
  background: rgba(0, 167, 181,.16);
  color: #f4fbfb;
  box-shadow: none;
}

.step.active b {
  background: var(--primary);
  color: #fff;
}

.step.optional {
  border-style: dashed;
}

.view {
  display: none;
  gap: 18px;
}

.view.active {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  min-height: calc(100vh - 150px);
}

#view-assets.active {
  grid-template-columns: minmax(0, 1fr) minmax(420px, .9fr);
}

#view-assets.active > .grid.two > .panel:nth-child(2) {
  position: static;
  max-height: none;
  overflow: visible;
}

.metric-grid {
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

body.theme-light .metric-card,
body.theme-light .panel,
body.theme-light .context-box,
body.theme-light .source-card,
body.theme-light .cost-table,
body.theme-light .modal-card,
body.theme-light .account-popover {
  background: var(--surface);
  color: var(--text);
}

.metric-card {
  padding: 18px;
  display: grid;
  gap: 4px;
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  font-size: 30px;
  line-height: 1.05;
  margin: 6px 0;
  letter-spacing: 0;
}

.panel {
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.grid {
  display: grid;
  gap: var(--space-5);
}

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

.view.active > .grid.two {
  display: contents;
}

.view.active > .grid.two > .panel:first-child,
.view.active > .panel:first-child {
  min-height: calc(100vh - 170px);
}

.view.active > .grid.two > .panel:nth-child(2),
.view.active > .panel:nth-child(2) {
  position: sticky;
  top: 22px;
  max-height: calc(100vh - 44px);
  overflow: auto;
  background: rgba(26, 28, 32, .74);
}

body.theme-light .view.active > .grid.two > .panel:nth-child(2),
body.theme-light .view.active > .panel:nth-child(2) {
  background: rgba(255, 255, 255, .86);
}

#view-dashboard.active {
  grid-template-columns: minmax(0, 1fr);
}

#view-dashboard .metric-grid {
  display: none;
}

#view-dashboard > .grid.two {
  display: contents;
}

#view-dashboard .quick-flow {
  grid-template-columns: minmax(0, 220px);
  align-content: start;
  justify-content: center;
}

#view-dashboard .dashboard-side-panel {
  display: none;
}

#view-dashboard .panel:first-child {
  min-height: calc(100vh - 170px);
  display: grid;
  align-content: center;
  justify-content: center;
  text-align: center;
  isolation: isolate;
  background:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px),
    radial-gradient(circle at 78% 22%, rgba(0, 167, 181, .18), transparent 34%),
    rgba(26, 28, 32, .92);
  background-size: 34px 34px, 34px 34px, auto, auto;
}

body.theme-light #view-dashboard .panel:first-child {
  background:
    linear-gradient(rgba(0,91,114,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,91,114,.045) 1px, transparent 1px),
    radial-gradient(circle at 78% 22%, rgba(0, 167, 181, .12), transparent 34%),
    rgba(255, 255, 255, .92);
}

#view-dashboard .panel:first-child .panel-head {
  justify-content: center;
  margin-bottom: 22px;
}

#view-dashboard .panel:first-child .panel-head > div {
  max-width: 560px;
}

.public-home-title,
.public-home-copy {
  display: none;
}

body.public-home .public-home-title,
body.public-home .public-home-copy {
  display: inline;
}

body.public-home .app-home-title,
body.public-home .app-home-copy {
  display: none;
}

body.public-home #view-dashboard.active {
  min-height: calc(100vh - 120px);
}

body.public-home #view-dashboard .panel:first-child {
  width: min(1040px, 100%);
  min-height: min(680px, calc(100vh - 150px));
  margin: 0 auto;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body.theme-light.public-home #view-dashboard .panel:first-child {
  background: transparent;
}

body.public-home #view-dashboard .panel:first-child .panel-head > div {
  max-width: 720px;
}

body.public-home #view-dashboard h2 {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
}

body.public-home #view-dashboard p {
  max-width: 620px;
  margin-inline: auto;
  font-size: clamp(15px, 1.6vw, 19px);
}

body.public-home #btn-start-now {
  min-width: 168px;
}

#view-dashboard .quick-flow .primary {
  background: linear-gradient(180deg, #00a7b5, var(--primary));
  color: #fff;
  border-color: rgba(215, 172, 80, .46);
  box-shadow: 0 16px 38px rgba(0, 167, 181, .24);
}

#view-dashboard .panel:first-child::after {
  content: none;
}

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

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

.quick-flow button[data-jump="video"] {
  background: linear-gradient(180deg, #00a7b5, var(--primary));
  border-color: rgba(215, 172, 80, .46);
  color: #fff;
  box-shadow: 0 16px 38px rgba(0, 167, 181, .24);
}

.check-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.check-list li {
  padding-left: 24px;
  position: relative;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 18px rgba(0, 167, 181,.45);
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0 14px;
}

.tab {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.055);
  color: var(--muted-strong);
  border-radius: var(--radius);
  padding: 9px 13px;
  font-size: var(--text-sm);
  font-weight: 680;
  box-shadow: 0 6px 14px rgba(16, 33, 30, .04);
}

.tab:hover {
  border-color: rgba(0, 167, 181, .36);
  background: rgba(0, 167, 181, .12);
  color: #e8fbfd;
}

.tab.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 8px 18px rgba(0, 167, 181, .22);
}

.tab.tab-disabled {
  color: #6b7280;
  background: rgba(255,255,255,.03);
  cursor: not-allowed;
  opacity: .78;
}

.tab.tab-disabled span {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(239, 68, 68, .16);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, .28);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.library-head {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.common-setup {
  margin: 18px 0 16px;
  border: 1px solid rgba(0, 167, 181, .22);
  border-radius: var(--radius);
  background: rgba(0, 167, 181, .08);
  padding: 15px;
  box-shadow: var(--shadow-soft);
}

.common-setup .form-grid {
  margin-bottom: 12px;
}

.step-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 9px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #7de6ed;
  background: rgba(0, 167, 181, .14);
  border: 1px solid rgba(0, 167, 181, .28);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.asset-source-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0 4px;
}

.asset-source-head .step-kicker {
  flex: 0 0 auto;
  margin: 1px 0 0;
}

.asset-source-head h3,
.asset-source-head p {
  margin: 0;
}

.asset-source-head p {
  margin-top: 4px;
  color: var(--muted);
}

.creator-mode-tabs {
  margin-top: 20px;
  padding: 4px;
  width: fit-content;
  border-radius: 999px;
  background: rgba(255,255,255,.045);
}

.creator-summary-panel {
  min-height: 0 !important;
}

.creator-empty-overview {
  display: grid;
  justify-items: center;
  max-width: 390px;
  margin: 34px auto 12px;
  text-align: center;
}

.creator-empty-overview h3,
.creator-empty-overview p {
  margin: 0;
}

.creator-empty-overview > p {
  max-width: 310px;
  margin-top: 7px;
  color: var(--muted);
}

.delivery-visual.compact {
  width: 118px;
  margin-bottom: 12px;
}

.product-delivery-visual {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin-bottom: 18px;
  color: #eaffff;
  background: linear-gradient(145deg, #0f94a1, #183f51);
  background-size: cover;
  background-position: center;
  border: 4px solid rgba(255,255,255,.12);
  border-radius: 24px;
  box-shadow: 0 16px 34px rgba(0,0,0,.24);
  font-size: 28px;
  font-weight: 800;
}

.creator-primary-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 22px 0;
}

.creator-empty-overview .asset-result {
  width: 100%;
  min-height: 58px;
}

#portrait-result-card.success {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  text-align: left;
}

.selected-person-thumb {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  object-fit: cover;
  object-position: center;
  border: 2px solid rgba(16, 171, 181, .4);
  border-radius: 14px;
}

#portrait-result-card.success div {
  display: grid;
  gap: 4px;
}

.creator-empty-overview .status {
  width: 100%;
  text-align: center;
}

.compact-button {
  min-width: auto;
  padding: 8px 11px;
}

.modal-card.creator-modal-card {
  width: min(720px, 100%);
  border-radius: 20px;
}

.modal-card.portrait-creator-modal-card {
  width: min(1080px, 100%);
}

body.creator-modal-open {
  overflow: hidden;
}

.creator-modal-card .panel-head {
  margin-bottom: 18px;
}

.creator-modal-card .source-switch {
  margin-bottom: 14px;
}

.creator-modal-card .modal-destination {
  margin: 18px 0 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.creator-modal-card .new-group-inline .inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.creator-modal-card .new-group-inline input {
  min-width: 0;
}

.group-delete-button {
  margin-top: 7px;
  padding: 0;
  color: #ff8e99;
  background: transparent;
  border: 0;
  font-size: 11px;
  text-align: left;
}

.gem-svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #70dff0;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-cloud-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 12px;
  color: var(--text);
  background: rgba(0,167,181,.08);
  border: 1px solid rgba(0,167,181,.22);
  border-radius: 10px;
  text-align: left;
}

.account-cloud-row span { color: var(--muted-strong); }
.account-cloud-row strong { color: #72dce4; font-size: 12px; }

.account-social-row {
  display: grid;
  grid-template-columns: minmax(0, auto) 28px minmax(74px, 1fr);
  gap: 8px;
  padding: 8px 12px;
}

.account-social-open {
  min-width: 0;
  padding: 5px 0;
  color: var(--muted-strong);
  background: transparent;
  border: 0;
  text-align: left;
}

.account-social-row > strong { justify-self: end; }

.social-help-trigger {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: var(--primary);
  background: rgba(0, 167, 181, .1);
  border: 1px solid rgba(0, 167, 181, .32);
  border-radius: 50%;
}

.social-help-trigger:hover,
.social-help-trigger:focus-visible {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 167, 181, .16);
}

.social-help-trigger svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cloud-modal-card { width: min(920px, 100%); }
.social-auth-modal-card { width: min(640px, 100%); }
.social-auth-modal-card textarea { width: 100%; resize: vertical; min-height: 112px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.social-auth-state { padding: 10px 12px; border-radius: 10px; background: var(--surface-soft); color: var(--muted-strong); font-size: 13px; }
.social-auth-state.invalid { color: #d97070; }

.modal-card.cookie-guide-modal-card {
  width: min(1040px, 100%);
  max-height: min(900px, calc(100vh - 32px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cookie-guide-head { flex: 0 0 auto; }
.cookie-guide-head .eyebrow { color: var(--primary); }

.cookie-guide-progress {
  flex: 0 0 auto;
  height: 4px;
  overflow: hidden;
  background: var(--surface-soft);
  border-radius: 999px;
}

.cookie-guide-progress span {
  display: block;
  width: 10%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #72dce4);
  border-radius: inherit;
  transition: width .2s ease;
}

.cookie-guide-step-meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 14px;
}

.cookie-guide-step-meta span {
  flex: 0 0 auto;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .03em;
}

.cookie-guide-step-meta strong { font-size: 18px; }

.cookie-guide-description {
  margin: 6px 0 12px;
  color: var(--muted-strong);
  line-height: 1.6;
}

.cookie-guide-figure {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  margin: 0;
  overflow: auto;
  background: rgba(0, 0, 0, .2);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.cookie-guide-figure img {
  display: block;
  width: 100%;
  max-height: min(510px, 52vh);
  object-fit: contain;
}

.cookie-guide-security {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  color: var(--muted-strong);
  background: rgba(215, 172, 80, .1);
  border: 1px solid rgba(215, 172, 80, .24);
  border-radius: 10px;
  font-size: 12px;
}

.cookie-guide-security strong { flex: 0 0 auto; color: var(--amber); }

.cookie-guide-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
}

.cookie-guide-dots { display: flex; align-items: center; gap: 6px; }
.cookie-guide-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--line-strong); }
.cookie-guide-dot.active { width: 22px; border-radius: 999px; background: var(--primary); }
.cookie-guide-actions { display: flex; gap: 10px; }
.cookie-guide-actions button { min-width: 92px; }

@media (max-width: 720px) {
  .modal-card.cookie-guide-modal-card { padding: 16px; max-height: calc(100vh - 16px); }
  .cookie-guide-head p { display: none; }
  .cookie-guide-step-meta { align-items: flex-start; flex-direction: column; gap: 4px; }
  .cookie-guide-step-meta strong { font-size: 16px; }
  .cookie-guide-description { font-size: 13px; }
  .cookie-guide-figure img { max-height: 42vh; }
  .cookie-guide-security { display: block; }
  .cookie-guide-security strong { display: block; margin-bottom: 3px; }
  .cookie-guide-footer { align-items: flex-end; }
  .cookie-guide-dots { max-width: 120px; flex-wrap: wrap; }
  .cookie-guide-actions button { min-width: 76px; padding-inline: 12px; }
}

.cloud-usage-card {
  display: grid;
  gap: 9px;
  padding: 16px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.cloud-usage-card > div:first-child,
.cloud-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cloud-usage-card span,
.cloud-usage-card small { color: var(--muted); }

.cloud-progress {
  height: 7px;
  overflow: hidden;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
}

.cloud-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
}

.cloud-toolbar { margin: 14px 0; }
.cloud-toolbar .tabs { margin: 0; }

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

.cloud-file-card {
  position: relative;
  overflow: hidden;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.cloud-file-card img,
.cloud-file-card video,
.cloud-file-generic {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: #071119;
}

.cloud-file-card > div:not(.cloud-file-generic) {
  display: grid;
  gap: 3px;
  padding: 10px;
}

.cloud-file-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cloud-file-card span { color: var(--muted); font-size: 11px; }
.cloud-file-card .delete-btn { position: absolute; top: 8px; right: 8px; }

@media (max-width: 720px) {
  .cloud-file-grid { grid-template-columns: 1fr; }
}

.creator-modal-card .modal-action-surface {
  margin-top: 18px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.creator-modal-card .creator-dropzone {
  padding: 12px;
}

.creator-modal-card textarea {
  min-height: 90px;
}

.portrait-prompt-composer {
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-raised);
}

.portrait-preset-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 5px;
}

.portrait-preset-head span {
  color: var(--text);
  font-size: 12px;
  font-weight: 780;
}

.portrait-preset-head small {
  color: var(--muted);
  font-size: 11px;
}

.portrait-preset-list {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 5px 12px 10px;
  scrollbar-width: thin;
}

.portrait-preset-chip {
  flex: 0 0 auto;
  min-width: auto;
  padding: 7px 11px;
  border: 1px solid rgba(0, 167, 181, .24);
  border-radius: 999px;
  background: rgba(0, 167, 181, .07);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 720;
}

.portrait-preset-chip:hover,
.portrait-preset-chip.active {
  border-color: var(--primary);
  background: rgba(0, 167, 181, .16);
  color: var(--primary);
}

.portrait-prompt-composer textarea {
  display: block;
  width: 100%;
  min-height: 112px;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  resize: vertical;
}

.portrait-prompt-composer textarea:focus {
  border-color: var(--line);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.asset-preview-pending {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 360px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(0, 167, 181, .3);
  border-radius: 14px;
  background: rgba(0, 167, 181, .08);
}

.asset-preview-pending strong { display: block; }
.asset-preview-pending p { margin: 4px 0 0; color: var(--muted); font-size: var(--text-sm); line-height: 1.5; }

.image-generation-inline-status {
  min-height: 0;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.image-generation-inline-status:empty { display: none; }
.image-generation-inline-status.success { color: #087f6f; font-weight: 720; }
.image-generation-inline-status.error { color: var(--danger); font-weight: 720; }

#portrait-generated-preview .preview-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 58vh;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(0, 0, 0, .08);
}

.portrait-ai-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  gap: 22px;
  align-items: start;
}

.portrait-ai-controls { min-width: 0; }

.portrait-ai-preview-pane {
  position: sticky;
  top: 0;
  min-width: 0;
  min-height: 430px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-soft);
}

.portrait-ai-preview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.portrait-ai-preview-head h3 { margin: 2px 0 0; }
.portrait-ai-preview-head small { color: var(--muted); text-align: right; }

#portrait-generated-preview:empty {
  min-height: 350px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: rgba(0, 167, 181, .035);
}

#portrait-generated-preview:empty::before {
  content: '生成后的人物预览将显示在这里';
  display: grid;
  min-height: 350px;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  font-size: var(--text-sm);
}

@media (max-width: 860px) {
  .modal-card.portrait-creator-modal-card { width: min(720px, 100%); }
  .portrait-ai-layout { grid-template-columns: 1fr; }
  .portrait-ai-preview-pane { position: static; min-height: 0; }
  #portrait-generated-preview:empty,
  #portrait-generated-preview:empty::before { min-height: 220px; }
}

.asset-preview-spinner {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0, 167, 181, .22);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: video-spin .85s linear infinite;
}

.image-task-panel {
  grid-column: 1 / -1;
  position: static !important;
  width: 100%;
  min-height: 0 !important;
  max-height: none !important;
  margin-top: 0;
  overflow: hidden !important;
}
.image-task-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; }
.image-task-summary::-webkit-details-marker { display: none; }
.image-task-summary > span:first-child { display: grid; gap: 4px; }
.image-task-summary strong { font-size: var(--text-xl); }
.image-task-summary small { color: var(--muted); font-size: 12px; font-weight: 500; }
.image-task-summary-meta { flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; color: var(--primary); background: rgba(0,167,181,.1); font-size: 11px; font-weight: 760; }
.image-task-summary::after { content: '⌄'; color: var(--muted); font-size: 18px; transition: transform .2s ease; }
.image-task-panel[open] .image-task-summary::after { transform: rotate(180deg); }
.image-task-panel-content { padding-top: 16px; }
.image-task-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.image-task-panel-head p { max-width: 720px; margin: 0; }
.image-task-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  max-height: 520px;
  margin-top: 16px;
  padding-right: 5px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.image-task-list > .empty-state { grid-column: 1 / -1; }
.image-task-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-raised); }
.image-task-preview { position: relative; display: grid; place-items: center; width: 100%; height: 160px; min-height: 0; overflow: hidden; background: rgba(3, 19, 29, .92); }
.image-task-preview img { display: block; width: 100%; height: 160px; min-height: 0; max-height: 160px; object-fit: cover; }
.image-task-preview .asset-preview-spinner { width: 28px; height: 28px; }
.image-task-failed { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #fb7185; background: rgba(251,113,133,.12); font-size: 22px; font-weight: 800; }
.image-task-body { display: grid; gap: 7px; padding: 12px; }
.image-task-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.image-task-heading strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-task-kind { flex: 0 0 auto; padding: 3px 7px; border-radius: 999px; color: var(--primary); background: rgba(0,167,181,.1); font-size: 10px; font-weight: 760; }
.image-task-status { color: var(--muted); font-size: 12px; line-height: 1.45; }
.image-task-status.error { color: var(--danger); }
.image-task-meta { color: var(--muted); font-size: 10px; }
.image-task-actions { display: grid; gap: 7px; margin-top: 2px; }
.image-task-action { width: 100%; }
.image-task-delete {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(251, 113, 133, .3);
  border-radius: 9px;
  background: rgba(251, 113, 133, .06);
  color: var(--danger);
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
}
.image-task-delete:hover { background: rgba(251, 113, 133, .13); }

@media (max-width: 720px) {
  .image-task-panel-head { align-items: stretch; flex-direction: column; }
  .image-task-list { grid-template-columns: 1fr; }
}

#view-assets > .flow-actions {
  grid-column: 1 / -1;
}

.app-notification {
  position: fixed;
  z-index: 1200;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 13px 16px;
  border: 1px solid rgba(16, 185, 129, .45);
  border-radius: 12px;
  color: #065f46;
  background: #ecfdf5;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .18);
  font-weight: 700;
  transition: opacity .2s ease, transform .2s ease;
}

.app-notification.hidden {
  display: block;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.app-notification.error {
  color: #991b1b;
  border-color: rgba(239, 68, 68, .4);
  background: #fef2f2;
}

.creator-mode-panel {
  display: none;
}

.creator-mode-panel.active {
  display: block;
}

#garment-list,
#portrait-asset-list {
  max-height: min(520px, 58vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 5px;
  scrollbar-width: thin;
}

.creator-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.creator-panel-head h2,
.creator-panel-head p {
  margin: 0;
}

.creator-panel-head p {
  margin-top: 5px;
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  color: #72dce4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.delivery-badge {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: var(--muted-strong);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.creator-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 18px;
  margin-top: 18px;
}

.creator-input-column {
  display: grid;
  gap: 14px;
}

.source-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  background: rgba(255,255,255,.045);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.source-switch button {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  text-align: left;
  color: var(--muted-strong);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
}

.source-switch button span {
  color: var(--muted);
  font-size: 11px;
}

.source-switch button.active {
  color: var(--text);
  border-color: var(--primary);
  background: rgba(0, 167, 181, .13);
  box-shadow: 0 6px 18px rgba(0, 167, 181, .10);
}

.destination-row {
  display: grid;
  grid-template-columns: minmax(0, .9fr) auto minmax(0, 1.1fr);
  align-items: start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.025);
}

.destination-row label {
  margin-top: 0;
}

.destination-or {
  padding-top: 36px;
  color: var(--muted);
  font-size: 11px;
}

.new-group-inline .inline {
  gap: 6px;
}

.new-group-inline button {
  min-width: auto;
  padding-inline: 12px;
}

.creator-action-surface {
  padding: 16px;
  border: 1px solid rgba(0, 167, 181, .25);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0, rgba(0, 167, 181, .11), transparent 42%),
    rgba(255,255,255,.025);
}

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

.action-heading h3,
.action-heading p {
  margin: 0;
}

.action-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
.field-label-row label { margin: 0; }
.analysis-pill {
  width: auto;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid rgba(4, 164, 180, .35);
  border-radius: 999px;
  background: rgba(4, 164, 180, .08);
  color: #087d89;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.analysis-pill:hover { background: rgba(4, 164, 180, .14); }
.analysis-pill:disabled { cursor: wait; opacity: .65; }
@media (max-width: 640px) {
  .field-label-row { align-items: flex-start; flex-direction: column; gap: 7px; }
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.creator-dropzone {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin: 8px 0 12px;
  padding: 16px;
  color: var(--muted-strong);
  text-align: center;
  border: 1px dashed rgba(125, 230, 237, .38);
  border-radius: 14px;
  background: rgba(0, 167, 181, .055);
  cursor: pointer;
}

.creator-dropzone small {
  color: var(--muted);
  font-size: 11px;
}

.product-upload-dropzone.has-file,
.portrait-reference-dropzone.has-file {
  border-style: solid;
  border-color: rgba(0, 167, 181, .55);
  background: rgba(0, 167, 181, .09);
}

.product-upload-preview {
  width: 92px;
  height: 92px;
  margin-bottom: 4px;
  object-fit: cover;
  border: 1px solid rgba(125, 230, 237, .35);
  border-radius: 12px;
  background: var(--surface);
}

.dropzone-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #dffcff;
  background: rgba(0,167,181,.22);
  border-radius: 50%;
  font-size: 20px;
}

.visually-hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.creator-submit {
  width: 100%;
}

.creator-delivery {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(125,230,237,.24);
  border-radius: 18px;
  background:
    linear-gradient(160deg, rgba(0,167,181,.15), rgba(255,255,255,.025) 50%),
    var(--surface-raised);
}

.creator-delivery h3,
.creator-delivery p {
  margin: 0;
}

.creator-delivery > p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.delivery-visual {
  position: relative;
  display: grid;
  place-items: center;
  height: 108px;
  margin-bottom: 16px;
}

.delivery-orbit {
  position: absolute;
  width: 104px;
  height: 104px;
  border: 1px solid rgba(125,230,237,.24);
  border-radius: 50%;
  box-shadow: inset 0 0 34px rgba(0,167,181,.12);
}

.delivery-avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  color: #eaffff;
  background: linear-gradient(145deg, #0fb2c1, #195c70);
  border: 3px solid rgba(255,255,255,.16);
  border-radius: 24px;
  font-size: 25px;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(0,0,0,.28);
}

.delivery-check {
  position: absolute;
  right: 31px;
  bottom: 18px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #09292b;
  background: #72e0c0;
  border: 3px solid #183038;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.asset-result {
  min-height: 70px;
  margin-top: auto;
}

.asset-result.success {
  display: grid;
  gap: 6px;
  padding: 13px;
  color: var(--text);
  background: rgba(18, 183, 106, .10);
  border: 1px solid rgba(18, 183, 106, .30);
  border-radius: var(--radius);
}

.asset-result code {
  overflow-wrap: anywhere;
  color: #7de6ed;
}

@media (max-width: 640px) {
  .creator-builder,
  .destination-row,
  .source-switch {
    grid-template-columns: 1fr;
  }
  .destination-or {
    display: none;
  }
}

.asset-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.asset-guide-grid div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  padding: 14px;
  display: grid;
  gap: 6px;
  box-shadow: var(--shadow-soft);
}

.asset-guide-grid strong {
  color: var(--text);
}

.asset-guide-grid span {
  color: var(--muted);
  line-height: 1.5;
}

.status {
  color: var(--muted);
  font-size: var(--text-sm);
  margin-top: 12px;
}

.helper-text {
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.demo-shortcut {
  width: 100%;
  margin: 14px 0 12px;
}

.compact-note {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.04);
  padding: 11px 12px;
  display: grid;
  gap: 4px;
}

.compact-note strong {
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 680;
}

.compact-note span {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.4;
}

.demo-capability-note {
  margin-top: 14px;
  border: 1px solid rgba(0, 167, 181, .24);
  border-radius: var(--radius);
  background: rgba(0, 167, 181, .08);
  padding: 14px 15px;
  display: grid;
  gap: 5px;
}

.demo-capability-note.compact details {
  margin-left: auto;
}

.demo-capability-note.compact summary {
  cursor: pointer;
  color: #66d9e0;
  font-size: var(--text-xs);
  font-weight: 650;
}

.demo-capability-note strong {
  color: #bfdbfe;
  font-size: var(--text-sm);
}

.demo-capability-note span,
.demo-capability-note small {
  color: var(--muted);
  line-height: 1.45;
}

.demo-capability-note small {
  font-size: 12px;
}

.error-card {
  border: 1px solid rgba(251, 113, 133, .35);
  border-radius: var(--radius);
  background: rgba(251, 113, 133, .10);
  color: #fecdd3;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
  line-height: 1.45;
}

.error-card strong,
.error-card span,
.error-card small {
  display: block;
}

.error-card small {
  color: #fda4af;
}

.source-list,
.asset-list,
.timeline {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.source-card,
.asset-item,
.timeline-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.045);
  padding: 11px 12px;
  box-shadow: var(--shadow-soft);
}

.source-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}

.source-card:hover,
.source-card:focus-visible,
.source-card.active {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary), 0 18px 44px rgba(0, 167, 181,.14);
}

.source-card strong,
.source-card span,
.source-card small {
  display: block;
}

.source-card strong {
  font-size: var(--text-sm);
  line-height: 1.25;
  font-weight: 680;
}

.source-card span {
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.25;
  font-size: var(--text-xs);
}

.source-card small {
  color: #66d9e0;
  font-weight: 700;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.insight-summary-band {
  grid-column: 1 / -1;
}

.insight-summary-band {
  border: 1px solid rgba(0, 167, 181, .24);
  border-radius: var(--radius);
  background: rgba(0, 167, 181, .08);
  padding: 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-soft);
}

.insight-summary-band strong {
  color: #bfdbfe;
}

.insight-summary-band span {
  color: var(--muted);
  line-height: 1.35;
  font-size: var(--text-sm);
}

.insight-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-soft);
}

.insight-card.featured {
  background: linear-gradient(135deg, rgba(0, 167, 181, .13), rgba(255,255,255,.05));
  border-color: rgba(0, 167, 181, .3);
}

.compact-guide {
  padding: 18px;
}

.compact-guide .asset-guide-grid div {
  padding: 11px 12px;
}

.insight-card.wide {
  grid-column: 1 / -1;
}

.insight-card h3 {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.insight-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  color: #16c4d2;
  background: rgba(0, 167, 181, .12);
  font-size: 13px;
  line-height: 1;
}

.insight-card div {
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-wrap;
}

.workflow-route-note {
  margin: 14px 0;
  padding: 11px 13px;
  border: 1px solid rgba(0, 167, 181, .22);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(0, 167, 181, .06);
  line-height: 1.5;
}

.fast-narration-field {
  margin: 14px 0;
  padding: 13px;
  border: 1px solid rgba(0, 167, 181, .24);
  border-radius: var(--radius);
  background: rgba(0, 167, 181, .05);
}

.fast-narration-field small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}

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

.creation-mode-fieldset {
  margin: 18px 0;
  padding: 0;
  border: 0;
}

.creation-mode-fieldset legend {
  margin-bottom: 10px;
  color: var(--muted-strong);
  font-size: var(--text-sm);
  font-weight: 700;
}

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

.creation-mode-option {
  display: flex;
  gap: 10px;
  min-height: 114px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.creation-mode-option:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.creation-mode-option.active { border-color: var(--primary); background: var(--primary-soft); }
.creation-mode-option input { width: auto; min-height: auto; margin: 3px 0 0; accent-color: var(--primary); }
.creation-mode-option span { display: grid; align-content: start; gap: 7px; }
.creation-mode-option strong { color: var(--text); font-size: var(--text-sm); }
.creation-mode-option em { margin-left: 6px; color: var(--primary); font-size: 11px; font-style: normal; font-weight: 700; }
.creation-mode-option small, .creation-mode-hint { color: var(--muted); font-size: var(--text-xs); line-height: 1.45; }
.creation-mode-hint { margin: 10px 0 0; }
.generated-audio-note { min-height: 44px; display: flex; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-raised); color: var(--muted-strong); box-shadow: var(--shadow-soft); }
.music-library-field { grid-column: 1 / -1; padding: 14px; border: 1px solid rgba(14, 151, 169, .2); border-radius: 16px; background: rgba(232, 249, 250, .45); }
.music-library-field > #music-selection-mode { margin-bottom: 10px; font-weight: 650; }
.music-filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.music-preview-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; color: var(--muted-strong); font-size: 13px; }
.music-preview-row button { flex: 0 0 auto; }
.music-library-field audio { display: none; }
@media (max-width: 720px) { .music-filter-row { grid-template-columns: 1fr; } .music-preview-row { align-items: flex-start; flex-direction: column; } }

.empty-state {
  min-height: 180px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--muted);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  line-height: 1.5;
}

.copy-card {
  display: grid;
  gap: 14px;
}

.copy-card section {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.copy-card section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  border: 1px solid var(--line);
  background: var(--surface-raised);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted-strong);
  font-size: var(--text-xs);
  font-weight: 760;
}

.asset-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

.asset-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.asset-item.active {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary), 0 10px 24px rgba(0, 167, 181, .14);
}

.asset-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 7px;
  background: rgba(255,255,255,.06);
}

.asset-item span {
  display: block;
  color: var(--muted);
  font-size: var(--text-xs);
  overflow-wrap: anywhere;
  margin-top: 4px;
}

.delete-btn {
  position: relative;
  z-index: 1;
  justify-self: end;
  border: 1px solid rgba(251, 113, 133, .35);
  border-radius: 6px;
  background: rgba(251, 113, 133, .10);
  color: var(--danger);
  font-size: var(--text-xs);
  font-weight: 700;
  min-width: 64px;
  padding: 8px 10px;
  cursor: pointer;
  touch-action: manipulation;
}

.delete-btn:hover {
  background: rgba(251, 113, 133, .18);
}

.asset-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.edit-btn {
  min-width: 54px;
  padding: 8px 10px;
  border: 1px solid rgba(0, 167, 181, .3);
  border-radius: 6px;
  background: rgba(0, 167, 181, .08);
  color: var(--primary);
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
}

.edit-btn:hover { background: rgba(0, 167, 181, .15); }

.preview-img {
  width: min(100%, 280px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin-top: 12px;
}

.video-wrap video {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  background: #111;
  contain: paint;
  isolation: isolate;
}

.video-wrap video.is-seeking { background: #111; }

.video-generation-progress {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid rgba(0, 167, 181, .32);
  border-radius: var(--radius);
  background: rgba(0, 167, 181, .08);
}

/* Keep the video setup controls available while a task runs. The right-hand
   preview panel owns progress; users can continue auditioning and pausing
   music without losing the generation settings. */
#view-video.generation-setup-pending #video-generation-setup,
#view-video.generation-setup-archived #video-generation-setup {
  display: block;
}

.video-generation-progress p {
  margin: 5px 0;
  color: var(--muted-strong);
  line-height: 1.5;
}

.video-generation-progress small {
  color: var(--muted);
}

.video-progress-spinner {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(0, 167, 181, .22);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: video-spin .85s linear infinite;
}

.sidebar-utility { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.sidebar-utility .help-nav-item { width: 100%; }
.runtime-log-trigger { margin-top: 6px; }
.help-center-panel { max-width: 1180px; margin: 0 auto; }
.help-mode-grid, .help-section-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.help-section-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.help-mode-card, .help-section-grid section { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.55); }
.help-mode-card h3, .help-section-grid h3 { margin: 4px 0 8px; }
.help-mode-label { color: var(--primary); font-size: var(--text-xs); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.help-mode-card p, .help-section-grid p { color: var(--muted-strong); line-height: 1.6; }
.help-mode-card ul { margin: 12px 0 0; padding-left: 20px; color: var(--muted-strong); line-height: 1.75; }
.help-checklist, .help-faq { margin-top: 18px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.55); }
.help-checklist h3, .help-faq h3 { margin: 0 0 12px; }
.help-checklist ol { margin: 0; padding-left: 22px; color: var(--muted-strong); line-height: 1.65; }
.help-checklist li + li { margin-top: 10px; }
.help-faq details { padding: 12px 0; border-top: 1px solid var(--line); }
.help-faq details:first-of-type { border-top: 0; }
.help-faq summary { cursor: pointer; color: var(--text); font-weight: 700; }
.help-faq details p { margin: 8px 0 0; color: var(--muted-strong); }
@media (max-width: 860px) { .help-mode-grid, .help-section-grid { grid-template-columns: 1fr; } }

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

.video-history-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.video-history-head h3,
.video-history-head p {
  margin: 0;
}

.video-history-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--text-xs);
}

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

.video-history-item {
  width: 100%;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
  box-shadow: none;
}

.video-history-item:not(:disabled):hover {
  border-color: rgba(0, 167, 181, .52);
  background: rgba(0, 167, 181, .08);
}

.video-history-thumb {
  width: 48px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(0, 167, 181, .28), rgba(7, 30, 43, .22));
  color: var(--primary);
  font-weight: 800;
}

.video-history-item strong,
.video-history-item small {
  display: block;
}

.video-history-item small {
  margin-top: 4px;
  color: var(--muted);
}

.video-history-status {
  color: var(--muted-strong);
  font-size: var(--text-xs);
  font-weight: 750;
}

.download {
  margin-top: 12px;
}

.checkbox-row label,
.check {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
}

.checkbox-row input,
.check input {
  width: auto;
}

.auth-link {
  margin: 8px 0 14px;
  width: fit-content;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px 44px;
  gap: 8px;
  align-items: center;
}

.captcha-row img {
  width: 132px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #edf8f8;
}

.captcha-refresh {
  min-width: 44px;
  height: 48px;
  padding: 0;
  font-size: 20px;
}

.agreement-check {
  align-items: flex-start;
  margin-top: 14px;
  line-height: 1.5;
}

.agreement-check input {
  margin-top: 4px;
}

.agreement-check a {
  color: var(--primary);
  text-decoration: underline;
}

.agreement-notice {
  margin: 12px 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: var(--text-xs);
  line-height: 1.6;
}

.agreement-disclosure-link {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 760;
  text-decoration: underline;
  text-underline-offset: 3px;
  box-shadow: none;
}

.agreement-disclosure-link:hover {
  background: transparent;
  color: var(--accent-strong);
}

.agreement-disclosures {
  display: grid;
  gap: 10px;
}

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

.agreement-notice-head a {
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 700;
}

.agreement-notice ol {
  margin: 8px 0 0;
  padding-left: 20px;
}

.reset-heading {
  margin-bottom: 14px;
}

.reset-heading h3 {
  margin: 10px 0 4px;
}

@media (max-width: 560px) {
  .captcha-row {
    grid-template-columns: minmax(0, 1fr) 112px 44px;
  }

  .captcha-row img {
    width: 112px;
  }
}

.cost-table {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.cost-table div,
.timeline-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.cost-table div {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.cost-table strong {
  color: var(--amber);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(2, 6, 12, .72);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-card {
  width: min(620px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: rgba(26, 28, 32, .94);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 30px 90px rgba(0,0,0,.46);
  padding: 22px;
  backdrop-filter: blur(10px);
}

.recharge-modal-card {
  width: min(620px, 100%);
}

.wardrobe-count-card { width: min(560px, 100%); }
.wardrobe-count-actions { justify-content: flex-end; margin-top: 20px; }

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

.recharge-package {
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--text);
  text-align: center;
}

.recharge-package strong { font-size: var(--text-sm); }
.recharge-package span { color: var(--muted); font-size: var(--text-xs); }

.recharge-package.active {
  border-color: var(--primary);
  background: rgba(0, 167, 181, .14);
  box-shadow: inset 0 0 0 1px rgba(125, 230, 237, .18);
}

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

.recharge-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(215, 172, 80, .08);
}

.recharge-total > span { color: var(--muted); }
.recharge-total strong { font-size: 20px; }
.recharge-total strong span { font-size: var(--text-sm); }

.recharge-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.recharge-method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 800;
}

.recharge-method.active {
  border-color: var(--primary);
  background: rgba(0, 167, 181, .14);
  box-shadow: inset 0 0 0 1px rgba(125, 230, 237, .18);
}

.pay-logo {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
}

.pay-logo.wechat { background: #07c160; }
.pay-logo.alipay { background: #1677ff; }

.recharge-payment-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.025);
}

.recharge-payment-card.hidden {
  display: none;
}

.recharge-payment-card h3 { margin-bottom: 10px; }
.recharge-payment-card p { margin: 6px 0; color: var(--muted); font-size: var(--text-sm); }
.recharge-payment-card i { font-style: italic; }

.recharge-qr-placeholder {
  position: relative;
  width: 142px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,.28);
}

.recharge-qr-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.recharge-qr-placeholder small {
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.5;
  text-align: center;
}

.recharge-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}

.recharge-footer .status { margin: 0; }

body.theme-light .recharge-package,
body.theme-light .recharge-method,
body.theme-light .recharge-payment-card {
  background: rgba(255,255,255,.64);
}

.icon-btn {
  background: var(--primary-soft);
  color: #e8fbfd;
  border-radius: 6px;
  padding: 9px 11px;
  font-weight: 700;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 54px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--muted);
  background: transparent;
}

.password-toggle:hover,
.password-toggle.active {
  color: #e8fbfd;
  background: var(--primary-soft);
}

.password-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hidden {
  display: none !important;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  margin-top: auto;
  padding: 72px 2px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 15px;
}

.site-footer p {
  max-width: 760px;
  margin-bottom: 10px;
  font-size: var(--text-sm);
  line-height: 1.55;
}

.site-footer small {
  font-size: var(--text-xs);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  gap: 14px;
  min-width: 420px;
}

.site-footer a {
  color: #66d9e0;
  font-weight: 680;
  text-decoration: none;
  white-space: nowrap;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 1060px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  body.sidebar-collapsed .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(82vw, 286px);
    height: 100vh;
    transform: translateX(-104%);
    transition: transform .22s ease;
    box-shadow: 34px 0 80px rgba(0, 0, 0, .45);
  }

  .sidebar-collapse {
    display: none;
  }

  body.sidebar-collapsed .sidebar {
    padding: 22px 14px;
  }

  body.sidebar-collapsed .brand {
    align-items: flex-start;
  }

  body.sidebar-collapsed .brand img {
    width: 172px;
    height: 62px;
  }

  body.sidebar-collapsed .brand div,
  body.sidebar-collapsed .sidebar-note,
  body.sidebar-collapsed .runtime-log-label,
  body.sidebar-collapsed .runtime-log-count {
    display: block;
  }

  body.sidebar-collapsed .runtime-log-trigger { justify-content: flex-start; padding: 10px 11px; }

  body.sidebar-collapsed .nav-item {
    justify-content: flex-start;
    padding: 11px 12px;
    gap: 10px;
    font-size: var(--text-sm);
  }

  body.mobile-nav-open {
    overflow: hidden;
  }

  body.mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  .mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(0, 0, 0, .54);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    cursor: pointer;
    touch-action: manipulation;
    transition: opacity .2s ease;
  }

  body.mobile-nav-open .mobile-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu-button {
    display: inline-grid;
    place-content: center;
    gap: 4px;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(255,255,255,.06);
    box-shadow: var(--shadow-soft);
  }

  .mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
  }

  .view.active,
  #view-dashboard.active {
    grid-template-columns: 1fr;
  }

  .view.active > .grid.two > .panel:nth-child(2),
  .view.active > .panel:nth-child(2) {
    position: static;
    max-height: none;
    overflow: visible;
  }

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

  .metric-grid,
  .grid.two,
  .asset-columns,
  .insight-grid,
  .asset-guide-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
  }

  .site-footer nav {
    justify-content: flex-start;
    min-width: 0;
  }
}

@media (max-width: 680px) {
  .workspace {
    padding: 12px;
  }

  .topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 54px;
  }

  .topbar-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: space-between;
  }

  .account-trigger {
    max-width: 100%;
  }

.account-popover {
    position: fixed;
    top: 76px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .panel-head {
    display: grid;
  }

  .stepper,
  .quick-flow,
  .form-grid {
    display: grid;
    grid-template-columns: 1fr;
    border-radius: var(--radius);
  }

  .creation-mode-options { grid-template-columns: 1fr; }

  .step {
    justify-content: flex-start;
  }

  h1 {
    font-size: 22px;
  }

  #page-subtitle {
    display: none;
  }

  .panel {
    padding: 18px;
  }

  #view-dashboard .quick-flow {
    grid-template-columns: 1fr 1fr;
  }

  .brand img {
    width: 166px;
    height: 60px;
  }

  .recharge-packages,
  .recharge-payment-card {
    grid-template-columns: 1fr;
  }

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

  .recharge-qr-placeholder {
    margin: 0 auto;
  }

  .recharge-total,
  .recharge-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

body.theme-light .account-popover {
  box-shadow: 0 24px 70px rgba(7, 30, 43, .16);
}
.language-toggle { min-width: 72px; }
option.duration-testing-option,
.duration-testing-note {
  color: #d92d20;
}

.duration-testing-note {
  display: block;
  margin-top: 6px;
  font-weight: 650;
}
