:root {
  --bg: #090d15;
  --bg-2: #141b2d;
  --surface: rgba(20, 27, 44, 0.78);
  --surface-strong: rgba(26, 35, 56, 0.92);
  --surface-deep: rgba(10, 14, 24, 0.92);
  --line: rgba(241, 199, 84, 0.28);
  --line-strong: rgba(242, 205, 101, 0.48);
  --text: #f8f7f5;
  --muted: #beb5a5;
  --muted-2: #948976;
  --blue: #eebb2e;
  --blue-bright: #f1c858;
  --cyan: #67dbcc;
  --green: #37e694;
  --orange: #ffd257;
  --red: #e7836a;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  --glow: 0 0 28px rgba(238, 189, 52, 0.35);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 22%, rgba(237, 181, 29, 0.24), transparent 34%),
    radial-gradient(circle at 18% 10%, rgba(238, 186, 44, 0.26), transparent 28%),
    linear-gradient(135deg, #070a11 0%, #131a2b 52%, #0c111d 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(242, 205, 101, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 205, 101, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 86%);
}

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

button,
a,
input,
textarea,
select,
.panel,
.login-card,
.status-pill,
.agent-info,
.chat-messages,
  .chat-bubble,
  .image-preview,
  .video-preview,
  .deck-text,
  .sidebar-note,
  .source-card,
  .hero-metrics div,
  .feature-card,
  .download-box a,
  .project-item,
  .preset-button,
  .video-history-item,
  .usage-item,
.account-item,
  .onboarding-modal,
  .pricing-grid div {
  border-radius: 8px;
}

.script-page {
  min-height: 100vh;
}

.script-header {
  grid-template-columns: minmax(240px, 1fr) auto;
}

.script-model-pill {
  justify-self: end;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: var(--green);
  border: 1px solid rgba(55, 230, 148, 0.45);
  background: rgba(9, 36, 33, 0.78);
  box-shadow: 0 0 22px rgba(55, 230, 148, 0.2);
}

.script-main {
  padding-top: 70px;
}

.script-hero {
  position: relative;
  min-height: 430px;
  display: flex;
  align-items: end;
  overflow: hidden;
  padding: 84px 48px 62px;
}

.script-hero-content {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
}

.script-hero-content h1 {
  max-width: 920px;
  font-size: clamp(38px, 4.4vw, 64px);
}

.script-hero-content p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.script-workbench {
  width: min(1180px, calc(100% - 48px));
  margin: -34px auto 72px;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
}

.script-input-panel,
.script-output-panel {
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(16, 22, 37, 0.92);
  box-shadow: var(--shadow);
}

.script-input-panel label {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.script-input-panel textarea {
  width: 100%;
  min-height: 156px;
  resize: vertical;
}

.script-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.script-actions .large-button {
  flex: 1;
}

.ghost-button,
.secondary-button {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(16, 22, 38, 0.72);
}

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

.script-output-panel {
  display: grid;
  gap: 14px;
}

.script-status {
  min-height: 58px;
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 6px 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(10, 15, 26, 0.74);
}

.script-status .status-dot {
  grid-row: 1 / span 2;
}

.script-status strong {
  line-height: 1.2;
}

.script-status small {
  color: var(--muted);
}

.script-status.queued .status-dot,
.script-status.generating .status-dot {
  background: var(--orange);
  box-shadow: 0 0 12px rgba(255, 210, 87, 0.9);
}

.script-status.done .status-dot {
  background: var(--green);
  box-shadow: 0 0 12px rgba(55, 230, 148, 0.9);
}

.script-status.error .status-dot {
  background: var(--red);
  box-shadow: 0 0 12px rgba(231, 131, 106, 0.9);
}

.script-result {
  min-height: 430px;
  max-height: 64vh;
  margin: 0;
  padding: 18px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #fbfbfa;
  line-height: 1.76;
  border: 1px solid rgba(241, 199, 84, 0.24);
  background: rgba(8, 11, 20, 0.82);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  height: 70px;
  display: grid;
  grid-template-columns: 260px minmax(260px, 520px) auto;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  background: rgba(9, 13, 21, 0.86);
  border-bottom: 1px solid rgba(241, 200, 86, 0.22);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(22px);
}

.brand,
.sidebar-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 132px;
  height: auto;
  display: block;
}

.brand strong,
.sidebar-logo strong {
  display: block;
  line-height: 1.1;
  font-size: 16px;
}

.brand small,
.sidebar-logo small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.ai-badge {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0;
  background: linear-gradient(135deg, #eeb927, #69dccd);
  border: 1px solid rgba(245, 215, 132, 0.7);
  box-shadow: 0 0 22px rgba(239, 191, 59, 0.72);
}

.top-search {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  color: var(--muted-2);
  border: 1px solid var(--line);
  background: rgba(10, 15, 26, 0.7);
  box-shadow: inset 0 0 22px rgba(222, 174, 43, 0.12);
}

.top-search::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 10px rgba(245, 215, 132, 0.75);
}

.user-bar {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 8px 12px;
  background: rgba(17, 23, 38, 0.82);
  border: 1px solid var(--line);
  box-shadow: var(--glow);
}

.text-button {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cyan);
}

.customer-hero {
  position: relative;
  min-height: min(820px, 92vh);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
  align-items: center;
  gap: 36px;
  padding: 118px 48px 64px;
  overflow: hidden;
}

.customer-page.is-authenticated .customer-hero {
  display: none;
}

.customer-page.is-authenticated .public-feature-overview {
  display: none;
}

.hero-bg,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  filter: saturate(1.12) contrast(1.06);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(9, 13, 21, 0.97) 0%, rgba(15, 22, 36, 0.86) 42%, rgba(18, 26, 46, 0.34) 100%),
    linear-gradient(180deg, rgba(9, 13, 21, 0.3) 0%, rgba(9, 13, 21, 0.8) 100%),
    radial-gradient(circle at 76% 34%, rgba(103, 219, 204, 0.2), transparent 38%);
}

.hero-content,
.login-card {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 760;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(48px, 6vw, 86px);
  line-height: 1.02;
  font-weight: 820;
  text-shadow: 0 0 34px rgba(242, 201, 89, 0.34);
}

h2 {
  font-size: 24px;
  line-height: 1.22;
}

.hero-content p:not(.eyebrow) {
  max-width: 680px;
  margin: 20px 0 0;
  color: #e6e4e0;
  font-size: 21px;
  line-height: 1.65;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 150px));
  gap: 14px;
  margin-top: 30px;
}

.hero-metrics div {
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(21, 29, 48, 0.72);
  box-shadow: inset 0 0 28px rgba(238, 185, 41, 0.13);
}

.hero-metrics strong {
  display: block;
  font-size: 26px;
  color: #f5d680;
}

.hero-metrics span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.public-feature-overview {
  width: min(1500px, calc(100% - 44px));
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: -30px auto 72px;
  position: relative;
  z-index: 2;
}

.feature-card {
  min-height: 210px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 12px;
  padding: 20px;
  border: 1px solid rgba(243, 205, 101, 0.34);
  background:
    linear-gradient(180deg, rgba(25, 35, 56, 0.9), rgba(11, 16, 28, 0.88));
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(244, 209, 115, 0.08);
  backdrop-filter: blur(18px);
}

.feature-card span {
  width: max-content;
  padding: 5px 9px;
  color: #a4eae0;
  font-size: 12px;
  font-weight: 760;
  border: 1px solid rgba(103, 219, 204, 0.28);
  background: rgba(103, 219, 204, 0.08);
  border-radius: 999px;
}

.feature-card h2 {
  font-size: 21px;
}

.feature-card p {
  margin: 0;
  color: #e6e4e0;
  line-height: 1.7;
}

.feature-card small {
  color: #78ffc0;
  line-height: 1.55;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(6, 9, 15, 0.72);
  backdrop-filter: blur(16px);
}

.onboarding-modal {
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  display: grid;
  gap: 18px;
  padding: 26px;
  border: 1px solid rgba(244, 209, 115, 0.45);
  background:
    linear-gradient(180deg, rgba(25, 35, 56, 0.96), rgba(11, 16, 28, 0.97));
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.58), inset 0 0 42px rgba(239, 189, 53, 0.14);
}

.onboarding-modal h2 {
  font-size: 28px;
}

.onboarding-modal p {
  margin: 10px 0 0;
  color: #e6e4e0;
  line-height: 1.75;
}

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

.pricing-grid div {
  min-height: 116px;
  padding: 16px;
  border: 1px solid rgba(242, 203, 96, 0.3);
  background: rgba(10, 15, 26, 0.66);
}

.pricing-grid strong {
  display: block;
  color: #f8f7f5;
  font-size: 17px;
}

.pricing-grid span {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  line-height: 1.6;
}

.modal-note {
  padding: 12px 14px;
  border: 1px solid rgba(55, 230, 148, 0.24);
  color: #bdf8dc !important;
  background: rgba(11, 45, 41, 0.42);
}

.login-card,
.panel {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(26, 35, 56, 0.88), rgba(13, 18, 30, 0.88));
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(244, 212, 124, 0.08);
  backdrop-filter: blur(18px);
}

.login-card {
  align-self: start;
  margin-top: 22px;
  padding: 24px;
}

.workspace,
.admin-shell {
  width: min(1500px, calc(100% - 44px));
  margin: 0 auto;
  padding: 96px 0 56px;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.app-sidebar {
  position: sticky;
  top: 92px;
  min-height: calc(100vh - 118px);
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(11, 16, 28, 0.84);
  box-shadow: var(--shadow), inset 0 0 28px rgba(238, 185, 39, 0.16);
}

.sidebar-logo {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(242, 204, 98, 0.2);
}

.sidebar-nav {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.sidebar-nav a {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: #eae8e4;
  text-decoration: none;
  border: 1px solid transparent;
  background: rgba(23, 31, 51, 0.5);
}

.sidebar-nav a:hover {
  color: #ffffff;
  border-color: var(--line-strong);
  background: linear-gradient(90deg, rgba(238, 187, 46, 0.48), rgba(228, 177, 37, 0.24));
  box-shadow: 0 0 18px rgba(238, 188, 50, 0.26);
}

.sidebar-note {
  margin-top: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(17, 24, 39, 0.78);
}

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

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

.sidebar-note strong {
  margin-top: 5px;
  color: #efeeeb;
  font-size: 13px;
  line-height: 1.55;
}

.app-content {
  min-width: 0;
}

.admin-shell {
  padding-top: 108px;
}

.admin-header {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 34px;
  margin-bottom: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  background: rgba(19, 26, 43, 0.82);
  box-shadow: var(--shadow);
}

.admin-header h1 {
  font-size: clamp(36px, 5vw, 60px);
}

.panel {
  position: relative;
  margin-bottom: 20px;
  padding: 22px;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(241, 199, 84, 0.8), transparent);
}

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

.panel-title {
  margin-bottom: 18px;
}

.panel-title p,
.hint,
.agent-info span,
.usage-item small,
.project-item small,
.status-pill small,
.admin-header p,
.intro-panel p,
.slide-card span {
  color: var(--muted);
}

.panel-title p,
.intro-panel p {
  margin: 7px 0 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: rgba(11, 16, 28, 0.78);
  box-shadow: inset 0 0 20px rgba(238, 187, 46, 0.13);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 14px rgba(255, 210, 87, 0.75);
}

.status-dot.ready {
  background: var(--green);
  box-shadow: 0 0 14px rgba(55, 230, 148, 0.75);
}

.form-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

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

.form-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 8px;
  color: #edece9;
  font-size: 14px;
  font-weight: 650;
  margin-bottom: 16px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(242, 203, 96, 0.32);
  background: rgba(10, 14, 24, 0.76);
  color: var(--text);
  padding: 12px 13px;
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: #968b78;
}

input:disabled,
select:disabled {
  background: rgba(15, 19, 28, 0.74);
  color: var(--muted-2);
}

label.is-muted {
  color: var(--muted);
}

textarea {
  resize: vertical;
  line-height: 1.65;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(242, 201, 89, 0.9);
  box-shadow: 0 0 0 3px rgba(238, 187, 46, 0.18), 0 0 18px rgba(238, 187, 46, 0.18);
}

button {
  min-height: 42px;
  border: 1px solid var(--line);
  padding: 0 16px;
  cursor: pointer;
  font-weight: 700;
}

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

.primary-button {
  border-color: rgba(243, 208, 111, 0.72);
  background: linear-gradient(180deg, #efbd34, #ecb51e);
  color: white;
  box-shadow: 0 0 22px rgba(238, 187, 46, 0.34);
}

.primary-button:hover {
  background: linear-gradient(180deg, #f0c348, #eeb928);
}

.secondary-button {
  background: rgba(20, 28, 47, 0.9);
  color: #d4d0c9;
}

.danger-button {
  border-color: rgba(231, 131, 106, 0.48);
  background: rgba(81, 29, 16, 0.82);
  color: #e7836a;
}

.danger-button:hover {
  border-color: rgba(231, 131, 106, 0.78);
  box-shadow: 0 0 18px rgba(231, 131, 106, 0.18);
}

.large-button {
  min-height: 50px;
  padding: 0 24px;
  font-size: 17px;
}

.action-row,
.chat-input-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.progress {
  height: 8px;
  background: rgba(211, 169, 54, 0.92);
  margin: 18px 0 10px;
  overflow: hidden;
  border: 1px solid rgba(242, 204, 100, 0.22);
}

#progressBar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--green));
  box-shadow: 0 0 16px rgba(103, 219, 204, 0.62);
  transition: width 0.3s ease;
}

.agent-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
}

.agent-sidebar {
  padding-right: 18px;
  border-right: 1px solid rgba(242, 203, 96, 0.2);
}

.agent-info {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: rgba(10, 15, 26, 0.64);
  border: 1px solid var(--line);
}

.chat-box {
  display: grid;
  grid-template-rows: minmax(320px, 460px) auto;
  gap: 14px;
}

.chat-messages {
  overflow: auto;
  padding: 16px;
  background: rgba(10, 14, 24, 0.68);
  border: 1px solid rgba(242, 203, 96, 0.24);
}

.chat-empty {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.chat-message {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
}

.chat-message.user {
  justify-items: end;
}

.chat-message.assistant {
  justify-items: start;
}

.chat-bubble {
  max-width: min(720px, 88%);
  padding: 12px 14px;
  line-height: 1.7;
  border: 1px solid var(--line);
  background: rgba(25, 35, 56, 0.92);
}

.chat-message.user .chat-bubble {
  border-color: rgba(243, 208, 111, 0.78);
  background: linear-gradient(180deg, #efbd34, #edb51d);
  color: white;
}

.chat-input-row {
  align-items: stretch;
}

.chat-input-row textarea {
  flex: 1;
  min-height: 78px;
  margin: 0;
}

.chat-input-row button {
  width: 112px;
}

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

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

.compact-grid {
  gap: 12px;
}

.image-result,
.video-result {
  display: grid;
  gap: 12px;
}

.image-preview,
.video-preview,
.loading-box {
  min-height: 320px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(10, 14, 24, 0.72);
  color: var(--muted);
}

.image-preview img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  background: #080c14;
}

.video-preview video {
  display: block;
  width: 100%;
  max-height: 560px;
  background: #080c14;
}

.source-card {
  min-height: 92px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  background: rgba(10, 15, 26, 0.64);
}

.source-card > strong,
.source-card > span {
  grid-column: 1 / -1;
}

.source-card img {
  width: 92px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #080c14;
}

.source-card div {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.source-card span {
  color: var(--muted);
  line-height: 1.6;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 16px;
}

.preset-button {
  min-height: 36px;
  padding: 0 12px;
  border-color: rgba(242, 203, 96, 0.34);
  background: rgba(24, 33, 54, 0.78);
  color: #d4d0c9;
}

.download-box small {
  color: var(--muted);
}

.image-history,
.video-history {
  margin-top: 18px;
  color: var(--muted);
}

.image-history-grid,
.video-history-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.image-history-item,
.video-history-item {
  min-height: 0;
  padding: 8px;
  display: grid;
  gap: 8px;
  background: rgba(18, 25, 43, 0.78);
  border-color: var(--line);
  text-align: left;
}

.video-history-item {
  min-height: 110px;
  align-content: space-between;
  padding: 12px;
}

.video-history-item strong {
  color: var(--text);
  line-height: 1.5;
  max-height: 48px;
  overflow: hidden;
}

.video-history-item span {
  color: var(--muted);
  font-size: 13px;
}

.image-history-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  background: #080c14;
}

.image-history-item span {
  height: 42px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 20px;
}

.deck-text {
  max-height: 560px;
  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.7;
  padding: 16px;
  background: rgba(10, 14, 24, 0.72);
  border: 1px solid var(--line);
  color: #f0eeeb;
}

.download-box,
.project-list,
.usage-list,
.account-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.download-box a,
.project-item,
.usage-item,
.account-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  padding: 12px;
  background: rgba(18, 25, 43, 0.76);
  color: var(--text);
  text-align: left;
  text-decoration: none;
}

.download-box a:hover,
.project-item:hover {
  border-color: var(--line-strong);
  box-shadow: var(--glow);
}

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

.usage-summary div {
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(18, 25, 43, 0.76);
}

.usage-summary strong {
  display: block;
  font-size: 34px;
  line-height: 1;
  color: #f5d682;
}

.usage-summary span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.usage-item {
  grid-template-columns: minmax(0, 1fr) 120px 120px 120px;
  align-items: center;
}

.account-item {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  align-items: center;
}

.quota-editor {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto auto;
  gap: 10px;
  align-items: end;
}

.quota-editor small {
  grid-column: 1 / -1;
}

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

.slide-card {
  border: 1px solid var(--line);
  background: rgba(18, 25, 43, 0.76);
  padding: 8px;
}

.slide-card img,
.slide-card object {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #080c14;
}

.slide-card span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
}

@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: 240px minmax(160px, 1fr) auto;
  }

  .customer-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .public-feature-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-card {
    max-width: 460px;
  }

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

  .app-sidebar {
    position: static;
    min-height: 0;
  }

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

  .agent-layout,
  .image-tool-layout,
  .video-tool-layout,
  .split,
  .form-grid.four {
    grid-template-columns: 1fr;
  }

  .agent-sidebar {
    padding-right: 0;
    border-right: 0;
  }

  .script-workbench {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 66px;
    height: auto;
    grid-template-columns: 1fr auto;
    padding: 12px 16px;
  }

  .top-search {
    display: none;
  }

  .brand small,
  .user-bar span {
    display: none;
  }

  .customer-hero {
    padding: 96px 18px 42px;
  }

  h1 {
    font-size: 42px;
  }

  .hero-metrics,
  .public-feature-overview,
  .sidebar-nav,
  .form-grid.two,
  .usage-summary,
  .usage-item,
  .account-item,
  .slides-grid,
  .image-history-grid,
  .video-history-grid,
  .pricing-grid,
  .admin-header,
  .intro-panel {
    grid-template-columns: 1fr;
  }

  .workspace,
  .admin-shell {
    width: min(100% - 28px, 1500px);
    padding-top: 84px;
  }

  .public-feature-overview {
    width: min(100% - 28px, 1500px);
  }

  .public-feature-overview {
    margin-top: -18px;
    margin-bottom: 42px;
  }

  .intro-panel {
    display: grid;
  }

  .chat-input-row button {
    width: 100%;
  }

  .quota-editor {
    grid-template-columns: 1fr;
  }

  .script-header {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .script-model-pill {
    justify-self: stretch;
    min-height: 34px;
    justify-content: center;
    font-size: 13px;
  }

  .script-main {
    padding-top: 98px;
  }

  .script-hero {
    min-height: 360px;
    padding: 52px 18px 46px;
  }

  .script-hero-content h1 {
    font-size: 38px;
  }

  .script-hero-content p:not(.eyebrow) {
    font-size: 16px;
  }

  .script-workbench {
    width: min(100% - 28px, 1180px);
    margin-top: -22px;
    margin-bottom: 42px;
  }

  .script-input-panel,
  .script-output-panel {
    padding: 16px;
  }

  .script-actions {
    flex-direction: column;
  }

  .script-result {
    min-height: 360px;
    max-height: none;
    font-size: 15px;
  }
}


/* 繁星暖金: hero 区暖色兜底 */
.hero-bg{filter:saturate(1.06) brightness(.86) contrast(1.02);}

/* 智能体对话: 复制/下载按钮 */
.chat-actions { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.chat-act {
  font-size: 12px; padding: 3px 12px; border-radius: 7px;
  border: 1px solid var(--line); background: transparent;
  color: var(--muted); cursor: pointer; transition: all .15s; line-height: 1.6;
}
.chat-act:hover { color: var(--blue); border-color: var(--blue-bright); background: rgba(238,187,46,.08); }
.chat-act:active { transform: translateY(1px); }

/* 智能体对话: 附件上传 */
.chat-attach-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.attach-btn {
  font-size: 13px; padding: 5px 12px; border-radius: 8px;
  border: 1px dashed var(--line-strong); color: var(--muted);
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.attach-btn:hover { color: var(--blue); border-color: var(--blue); background: rgba(238,187,46,.06); }
.attach-list { font-size: 12px; color: var(--muted-2); }
.attach-list.has-files { color: var(--blue-bright); }
