:root {
  --ink: #15141d;
  --muted: #6e6b78;
  --line: #e8e4ec;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --soft: #f4f1f7;
  --purple: #6f4cff;
  --purple-dark: #4f2fd2;
  --purple-pale: #eee9ff;
  --orange: #f57247;
  --blue: #3a7afe;
  --green: #16845b;
  --red: #d84e4e;
  --shadow-sm: 0 8px 24px rgba(31, 24, 48, 0.07);
  --shadow-lg: 0 24px 80px rgba(42, 28, 74, 0.14);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 32px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.demo-bar {
  min-height: 36px;
  padding: 8px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: #f8f6ff;
  background: #171523;
  font-size: 12px;
  letter-spacing: .02em;
}
.demo-dot { width: 7px; height: 7px; border-radius: 99px; background: #a894ff; box-shadow: 0 0 0 5px rgba(168,148,255,.12); }
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(232,228,236,.85);
  background: rgba(251,250,247,.9);
  backdrop-filter: blur(18px);
}
.header-inner { max-width: var(--max); height: 72px; margin: auto; padding: 0 22px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 760; letter-spacing: -.03em; white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: white; background: var(--ink); transform: rotate(-3deg); }
.brand-mark svg { width: 19px; height: 19px; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: 18px; }
.nav-link { padding: 10px 13px; border-radius: 10px; color: #5c5965; font-size: 14px; transition: .18s ease; }
.nav-link:hover, .nav-link.active { color: var(--ink); background: #efecf2; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.points-pill { height: 38px; padding: 0 13px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid #ddd6ef; border-radius: 99px; background: #fff; font-size: 13px; font-weight: 700; }
.coin { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--orange); font-size: 10px; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; color: #fff; background: var(--ink); cursor: pointer; font-weight: 800; }
.user-avatar { display: grid; place-items: center; overflow: hidden; border-radius: 50%; color: #fff; background: var(--ink); font-weight: 800; flex: 0 0 auto; }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.jingcai-avatar { background: linear-gradient(135deg, #6f4cff, #ee6e55); letter-spacing: -.08em; }
.header-avatar { width: 38px; height: 38px; border: 2px solid #fff; box-shadow: 0 4px 14px rgba(40,31,72,.18); font-size: 11px; }
.mobile-menu { display: none; width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; }
.mobile-menu svg { width: 21px; }

.container { width: min(var(--max), calc(100% - 44px)); margin-inline: auto; }
.page { flex: 1; }
.eyebrow { margin: 0 0 14px; color: var(--purple-dark); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.display { margin: 0; font-size: clamp(42px, 6vw, 76px); line-height: 1.04; letter-spacing: -.065em; }
.gradient-word { color: var(--purple); }
.lead { max-width: 610px; margin: 22px 0 0; color: var(--muted); font-size: 17px; line-height: 1.8; }
.button-row { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  min-height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { color: #fff; background: var(--ink); box-shadow: 0 10px 24px rgba(21,20,29,.16); }
.btn-primary:hover { background: #2a2836; }
.btn-purple { color: #fff; background: var(--purple); box-shadow: 0 10px 24px rgba(111,76,255,.24); }
.btn-purple:hover { background: var(--purple-dark); }
.btn-secondary { border-color: var(--line); background: #fff; }
.btn-ghost { color: #5e5a68; }
.btn-danger { color: var(--red); border-color: #f0cece; background: #fff7f7; }
.btn-sm { min-height: 36px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.btn-lg { min-height: 52px; padding: 0 23px; border-radius: 14px; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; }

.hero { padding: 80px 0 64px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.03fr .97fr; align-items: center; gap: 66px; }
.hero-note { margin-top: 22px; display: flex; align-items: center; gap: 10px; color: #6f6b77; font-size: 13px; }
.hero-note-avatars { display: flex; }
.hero-note-avatars span { width: 25px; height: 25px; margin-left: -6px; display: grid; place-items: center; border: 2px solid var(--paper); border-radius: 50%; color: white; font-size: 9px; background: var(--ink); }
.hero-note-avatars span:first-child { margin-left: 0; background: var(--orange); }
.hero-note-avatars span:last-child { background: var(--purple); }
.hero-visual { position: relative; min-height: 530px; }
.hero-orbit { position: absolute; inset: 3% 4%; border: 1px solid #ddd4eb; border-radius: 50%; transform: rotate(-12deg); }
.visual-card {
  position: absolute;
  overflow: hidden;
  border: 7px solid #fff;
  border-radius: 28px;
  background: #ddd;
  box-shadow: var(--shadow-lg);
}
.visual-main { top: 28px; right: 34px; width: 72%; height: 74%; transform: rotate(4deg); }
.visual-secondary { left: 6px; bottom: 12px; width: 47%; height: 48%; transform: rotate(-7deg); }
.art { position: absolute; inset: 0; overflow: hidden; }
.art::before, .art::after { content: ""; position: absolute; border-radius: 50%; filter: blur(2px); }
.art-1 { background: linear-gradient(155deg, #eadbca 0 42%, #c8694e 43% 51%, #323544 52%); }
.art-1::before { width: 70%; height: 60%; left: -18%; top: 10%; background: #f6b66f; box-shadow: 100px 60px 0 #d35b4b; }
.art-1::after { width: 38%; height: 70%; right: 10%; bottom: -32%; background: #15151b; border-radius: 40% 40% 0 0; }
.art-2 { background: radial-gradient(circle at 72% 28%, #f0dcff 0 12%, transparent 13%), linear-gradient(145deg,#5d3f86,#16162d 50%,#0d737a); }
.art-2::before { width: 58%; height: 58%; left: 9%; top: 24%; background: rgba(181,243,234,.72); box-shadow: 86px -38px 0 rgba(252,145,199,.52); }
.art-2::after { width: 90%; height: 25%; right: -22%; bottom: 10%; background: rgba(255,255,255,.16); transform: rotate(-24deg); border-radius: 99px; }
.art-3 { background: linear-gradient(145deg,#b2d8ff,#eef5f0 48%,#3c6357); }
.art-3::before { width: 110%; height: 55%; left: -25%; bottom: -24%; background: #183b35; }
.art-3::after { width: 12%; height: 38%; left: 49%; bottom: 18%; background: #ec7d45; border-radius: 50% 50% 10px 10px; box-shadow: 0 0 0 12px rgba(255,255,255,.14); }
.art-4 { background: linear-gradient(140deg,#ece7ff,#8972dd 50%,#28253d); }
.art-4::before { width: 52%; height: 52%; left: 22%; top: 20%; background: #d9bdff; box-shadow: 55px 45px 0 #fb8d70; }
.art-4::after { width: 100%; height: 30%; left: 0; bottom: -12%; background: #171622; border-radius: 50% 50% 0 0; }
.visual-label { position: absolute; left: 15px; bottom: 15px; z-index: 2; padding: 8px 11px; border-radius: 10px; color: #fff; background: rgba(16,15,24,.58); backdrop-filter: blur(10px); font-size: 11px; font-weight: 700; }
.float-tag { position: absolute; z-index: 4; padding: 12px 15px; display: flex; align-items: center; gap: 9px; border: 1px solid rgba(255,255,255,.8); border-radius: 15px; background: rgba(255,255,255,.9); box-shadow: var(--shadow-sm); backdrop-filter: blur(10px); font-size: 12px; font-weight: 700; }
.float-tag svg { width: 17px; color: var(--purple); }
.float-one { top: 2px; left: 0; }
.float-two { right: 0; bottom: 48px; }
.spark { position: absolute; z-index: 3; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; color: white; background: var(--orange); box-shadow: 0 12px 30px rgba(245,114,71,.32); }
.spark svg { width: 23px; }
.spark-one { left: 40%; bottom: 2px; transform: rotate(-8deg); }

.section { padding: 76px 0; }
.section-muted { background: #f3f0f5; }
.section-head { max-width: 650px; margin-bottom: 34px; }
.section-title { margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.12; letter-spacing: -.045em; }
.section-subtitle { margin: 14px 0 0; color: var(--muted); line-height: 1.7; }
.model-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.model-card { position: relative; min-height: 305px; padding: 24px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: 0 3px 0 rgba(20,18,29,.02); }
.model-card::after { content: ""; position: absolute; width: 200px; height: 200px; right: -76px; bottom: -82px; border-radius: 50%; background: var(--card-tint, #eee9ff); }
.model-card.violet { --card-tint: #eee9ff; }
.model-card.orange { --card-tint: #ffe9df; }
.model-card.blue { --card-tint: #deebff; }
.model-top { display: flex; align-items: center; justify-content: space-between; }
.model-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: var(--purple); background: var(--purple-pale); }
.orange .model-icon { color: var(--orange); background: #fff0e9; }
.blue .model-icon { color: var(--blue); background: #e8f0ff; }
.model-icon svg { width: 22px; }
.tag { padding: 6px 9px; border-radius: 99px; color: #65616e; background: #f3f1f5; font-size: 11px; font-weight: 700; }
.model-card h3 { margin: 30px 0 8px; font-size: 24px; letter-spacing: -.04em; }
.model-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.model-bottom { position: relative; z-index: 1; margin-top: auto; padding-top: 28px; display: flex; align-items: center; justify-content: space-between; }
.model-cost { font-size: 13px; color: #716d7a; }
.model-cost strong { color: var(--ink); font-size: 19px; }
.arrow-circle { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; color: white; background: var(--ink); cursor: pointer; }
.arrow-circle svg { width: 17px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.step { padding-top: 22px; border-top: 1px solid #dcd7e1; }
.step-index { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--ink); font-size: 12px; font-weight: 800; }
.step h3 { margin: 20px 0 8px; font-size: 19px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.trust-panel { padding: 34px; display: grid; grid-template-columns: 1.15fr repeat(3, .8fr); gap: 22px; align-items: center; border-radius: 26px; color: #fff; background: var(--ink); }
.trust-panel h2 { margin: 0 0 8px; font-size: 25px; letter-spacing: -.035em; }
.trust-panel p { margin: 0; color: #aaa7b3; font-size: 13px; line-height: 1.6; }
.trust-stat { padding-left: 22px; border-left: 1px solid #373442; }
.trust-stat strong { display: block; font-size: 24px; }
.trust-stat span { color: #aaa7b3; font-size: 12px; }

.subpage-hero { padding: 52px 0 30px; }
.subpage-title { margin: 0; font-size: clamp(34px, 5vw, 52px); letter-spacing: -.05em; }
.subpage-desc { max-width: 620px; margin: 12px 0 0; color: var(--muted); line-height: 1.7; }
.workspace { padding: 16px 0 80px; }
.creator-layout { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 22px; align-items: start; }
.provider-callout { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; padding: 14px 16px; border: 1px solid #ded5ff; border-radius: 15px; background: linear-gradient(135deg,#f7f3ff,#fff8f4); }
.provider-callout-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; color: #fff; background: linear-gradient(135deg,#6d43ef,#9b63ff); }
.provider-callout-icon svg { width: 20px; }
.provider-callout > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.provider-callout strong { font-size: 14px; }
.provider-callout small { color: #756f7d; font-size: 12px; }
.provider-test-button { margin-left: auto; padding: 7px 11px; border: 1px solid #cfc2fa; border-radius: 10px; color: #5b39c8; background: #fff; cursor: pointer; font-size: 11px; font-weight: 700; white-space: nowrap; }
.provider-test-button:hover { background: #f5f1ff; }
.provider-test-button:disabled { opacity: .55; cursor: wait; }
.provider-pill { padding: 5px 9px; border-radius: 999px; color: #5632c8; background: #ebe3ff; font-size: 11px; font-weight: 700; white-space: nowrap; }
.provider-pill.pending { color: #9a5a14; background: #fff0d9; }
.connectivity-notice { margin: -12px 0 20px; padding: 11px 14px; display: grid; grid-template-columns: auto 1fr; gap: 10px; border-radius: 12px; font-size: 11px; line-height: 1.55; }
.connectivity-notice.ok { color: #216a4c; background: #eaf8f1; }
.connectivity-notice.failed { color: #805a2d; background: #fff3df; }
.connectivity-notice strong { white-space: nowrap; }
.creator-layout > * { min-width: 0; }
.textarea.prompt-large { min-height: 190px; }
.external-service-note { margin-top: -2px; padding: 12px 14px; border-radius: 12px; color: #6d6573; background: #f8f6fa; font-size: 12px; line-height: 1.65; }
.panel { border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 4px 20px rgba(32,25,48,.035); }
.panel-body { padding: 24px; }
.panel-title { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.panel-caption { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.model-picker { padding: 10px; }
.model-option { width: 100%; padding: 14px; display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; border: 1px solid transparent; border-radius: 15px; background: transparent; text-align: left; cursor: pointer; }
.model-option:hover { background: #f7f5f8; }
.model-option.active { border-color: #dcd3ff; background: var(--purple-pale); }
.model-option .mini-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--purple); background: #fff; }
.model-option .mini-icon svg { width: 19px; }
.model-option strong { display: block; font-size: 14px; }
.model-option small { color: var(--muted); font-size: 11px; }
.radio-dot { width: 16px; height: 16px; border: 2px solid #c8c1d2; border-radius: 50%; }
.active .radio-dot { border: 5px solid var(--purple); }
.form-grid { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 20px; }
.form-section + .form-section { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.field-label { margin-bottom: 9px; display: flex; justify-content: space-between; color: #373440; font-size: 13px; font-weight: 750; }
.field-label span { color: #9b97a2; font-weight: 500; }
.textarea { width: 100%; min-height: 145px; padding: 16px; resize: vertical; border: 1px solid #dcd7e1; border-radius: 14px; color: var(--ink); background: #fcfbfd; outline: none; line-height: 1.7; }
.textarea:focus, .input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(111,76,255,.1); }
.prompt-examples { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 6px; }
.prompt-chip { padding: 6px 9px; border: 1px solid var(--line); border-radius: 99px; color: #706b77; background: #fff; cursor: pointer; font-size: 11px; }
.upload-box { min-height: 145px; display: grid; place-items: center; border: 1px dashed #cfc7db; border-radius: 14px; background: #faf8fc; cursor: pointer; text-align: center; overflow: hidden; }
.upload-box:hover { border-color: var(--purple); }
.upload-box svg { width: 25px; color: var(--purple); }
.upload-box strong { margin-top: 6px; display: block; font-size: 13px; }
.upload-box small { color: #97929e; font-size: 11px; }
.upload-preview { width: 100%; height: 143px; object-fit: cover; }
.parameter-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.segment { padding: 4px; display: flex; gap: 3px; border: 1px solid var(--line); border-radius: 12px; background: #f6f3f7; }
.segment button { min-height: 34px; flex: 1; padding: 0 10px; border: 0; border-radius: 9px; color: #77727f; background: transparent; cursor: pointer; font-size: 12px; }
.segment button.active { color: var(--ink); background: #fff; box-shadow: 0 2px 7px rgba(34,28,45,.08); font-weight: 750; }
.summary-card { position: sticky; top: 126px; padding: 20px; border-radius: 18px; color: #fff; background: #1b1924; }
.summary-card h3 { margin: 0 0 18px; font-size: 15px; }
.summary-row { padding: 10px 0; display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px solid #373440; color: #b8b4c2; font-size: 12px; }
.summary-row strong { color: #fff; font-weight: 650; text-align: right; }
.cost-total { padding: 18px 0 5px; display: flex; justify-content: space-between; align-items: end; }
.cost-total span { color: #aaa6b4; font-size: 12px; }
.cost-total strong { font-size: 28px; }
.summary-card .btn { width: 100%; margin-top: 16px; }
.summary-note { margin: 13px 0 0; color: #9792a2; font-size: 10px; line-height: 1.6; text-align: center; }
.provider-settings-grid { display: grid; gap: 18px; }
.provider-settings-card { padding: 22px; }
.provider-settings-card .table-card-head { padding: 0 0 18px; }
.provider-settings-card .table-card-head small { display: block; margin-top: 6px; color: var(--muted); }
.provider-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.provider-fields .form-field { margin: 0; }
.provider-fields .form-field small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.provider-actions { margin-top: 18px; padding-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.provider-help { margin: 14px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.task-progress { margin-top: 16px; padding: 16px; border-radius: 14px; background: #f5f2f8; }
.progress-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.progress-head strong { font-size: 13px; }
.progress-track { height: 7px; margin-top: 12px; overflow: hidden; border-radius: 99px; background: #dfdae5; }
.progress-bar { height: 100%; border-radius: inherit; background: var(--purple); transition: width .35s ease; }

.filters { margin-bottom: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.filter { min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 99px; color: #6c6775; background: #fff; cursor: pointer; font-size: 12px; }
.filter.active { color: #fff; border-color: var(--ink); background: var(--ink); }
.works-grid { columns: 3 260px; column-gap: 20px; }
.work-card { width: 100%; margin: 0 0 20px; display: inline-block; break-inside: avoid; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 5px 20px rgba(26,21,36,.035); }
.work-media-button { width: 100%; padding: 0; display: block; border: 0; background: transparent; cursor: zoom-in; }
.work-visual { position: relative; width: 100%; overflow: hidden; background: #eeebf1; }
.work-visual .art { position: absolute; }
.generated-image { width: 100%; height: 100%; display: block; object-fit: cover; }
.work-overlay { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; color: white; background: rgba(22,20,30,.55); backdrop-filter: blur(3px); text-align: center; }
.work-overlay strong { display: block; margin-top: 8px; font-size: 14px; }
.work-overlay span { font-size: 11px; opacity: .75; }
.work-status { position: absolute; top: 13px; left: 13px; z-index: 3; padding: 7px 9px; border-radius: 9px; color: #fff; background: rgba(18,17,24,.65); backdrop-filter: blur(10px); font-size: 10px; font-weight: 750; }
.work-status.processing { background: rgba(111,76,255,.82); }
.work-content { padding: 17px; }
.work-model { display: flex; justify-content: space-between; gap: 12px; color: #8e8995; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.work-content h3 { margin: 9px 0 14px; overflow: hidden; font-size: 14px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.work-meta { padding-top: 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); color: #827d89; font-size: 11px; }
.work-actions { display: flex; gap: 5px; }
.icon-btn { width: 33px; height: 33px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; }
.icon-btn:hover { border-color: #c6bdd6; }
.icon-btn.danger { color: var(--red); }
.icon-btn.danger:hover { border-color: #e6b7b7; background: #fff5f5; }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn svg { width: 15px; }
.empty-state { padding: 68px 20px; border: 1px dashed #cec7d6; border-radius: 20px; color: var(--muted); text-align: center; }

.chat-page .workspace { padding-top: 16px; }
.chat-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: stretch; }
.chat-side { padding: 24px; }
.chat-side .model-icon { width: 46px; height: 46px; }
.chat-side h2 { margin: 20px 0 7px; font-size: 20px; }
.chat-side > p { margin: 0; color: var(--muted); font-size: 12px; }
.chat-side ul { margin: 23px 0; padding: 18px 0 18px 19px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #6f6a77; font-size: 12px; line-height: 2; }
.chat-side .btn { width: 100%; }
.chat-shell { min-height: 620px; display: grid; grid-template-rows: auto minmax(360px, 1fr) auto; overflow: hidden; }
.chat-head { min-height: 72px; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.chat-head strong { display: block; font-size: 15px; }
.chat-head span { margin-top: 4px; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.chat-head i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.chat-thread { padding: 28px; display: grid; align-content: start; gap: 22px; overflow-y: auto; background: linear-gradient(180deg,#fff,#fcfbfd); }
.chat-welcome { max-width: 600px; margin: auto; padding: 38px 20px; text-align: center; }
.chat-welcome .brand-mark { margin: auto; }
.chat-welcome h2 { margin: 18px 0 8px; font-size: 25px; }
.chat-welcome p { margin: 0 auto; max-width: 480px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.chat-examples { margin-top: 24px; display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.chat-examples button { min-height: 76px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; color: #56515e; background: #fff; cursor: pointer; font-size: 11px; line-height: 1.5; }
.chat-examples button:hover { border-color: #cfc4f4; background: #faf8ff; }
.chat-message { max-width: 82%; display: grid; grid-template-columns: 36px minmax(0,1fr); gap: 11px; }
.chat-message.user { margin-left: auto; grid-template-columns: minmax(0,1fr) 36px; }
.chat-message.user .chat-avatar { grid-column: 2; grid-row: 1; background: var(--orange); }
.chat-message.user > div { grid-column: 1; grid-row: 1; }
.chat-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: var(--purple); font-size: 11px; font-weight: 800; }
.chat-message strong { display: block; margin: 1px 0 6px; color: #827c8b; font-size: 10px; }
.chat-message.user strong { text-align: right; }
.chat-message p { margin: 0; padding: 12px 14px; border-radius: 4px 15px 15px 15px; background: #f0edf4; white-space: pre-wrap; font-size: 13px; line-height: 1.75; }
.chat-message.user p { color: #fff; border-radius: 15px 4px 15px 15px; background: #25222e; }
.chat-composer { padding: 15px 20px 12px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; border-top: 1px solid var(--line); background: #fff; }
.chat-composer textarea { min-height: 56px; max-height: 150px; padding: 15px; resize: vertical; border: 1px solid #dcd7e1; border-radius: 13px; outline: none; font: inherit; line-height: 1.5; }
.chat-composer textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(111,76,255,.1); }
.chat-composer .btn { min-width: 100px; }
.chat-composer small { grid-column: 1 / -1; color: #9c97a3; font-size: 9px; text-align: center; }
.chat-unavailable { margin: 16px 20px 20px; padding: 15px; border-radius: 12px; color: #7a603e; background: #fff3df; font-size: 12px; text-align: center; }

.points-layout { display: grid; grid-template-columns: 340px minmax(0,1fr); gap: 22px; }
.balance-card { padding: 28px; color: #fff; background: var(--ink); }
.balance-card .coin { width: 35px; height: 35px; font-size: 15px; }
.balance-label { margin-top: 34px; color: #aca8b5; font-size: 12px; }
.balance-number { margin: 4px 0 18px; font-size: 54px; font-weight: 800; letter-spacing: -.055em; }
.balance-card p { margin: 0; color: #a8a4b1; font-size: 12px; line-height: 1.7; }
.ledger { overflow: hidden; }
.ledger-head { padding: 22px 24px; border-bottom: 1px solid var(--line); }
.ledger-row { padding: 17px 24px; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 14px; align-items: center; border-bottom: 1px solid #f0edf2; }
.ledger-row:last-child { border-bottom: 0; }
.ledger-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: var(--green); background: #e8f6f0; }
.ledger-icon.debit { color: var(--purple); background: var(--purple-pale); }
.ledger-icon svg { width: 18px; }
.ledger-main strong { display: block; font-size: 13px; }
.ledger-main span { color: #96919e; font-size: 10px; }
.ledger-amount { text-align: right; font-size: 16px; font-weight: 800; }
.ledger-amount.positive { color: var(--green); }
.ledger-amount small { display: block; color: #a19ca7; font-size: 9px; font-weight: 500; }

.profile-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; }
.profile-card { padding: 34px 24px; text-align: center; }
.profile-card h2 { margin: 17px 0 5px; font-size: 22px; }
.profile-card p { margin: 0 0 24px; color: var(--muted); font-size: 12px; }
.profile-avatar { width: 94px; height: 94px; margin: auto; font-size: 22px; }
.profile-edit-avatar { width: 72px; height: 72px; font-size: 17px; }
.upload-box.compact { min-height: 120px; padding: 18px; grid-template-columns: auto 1fr; justify-content: start; gap: 18px; text-align: left; }
.upload-box.compact strong { margin: 0; }

.admin-shell { min-height: calc(100vh - 108px); display: grid; grid-template-columns: 230px minmax(0,1fr); background: #f5f3f6; }
.admin-shell.standalone { min-height: calc(100vh - 64px); }
.admin-topbar { height: 64px; padding: 0 22px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); background: #fff; }
.admin-topbar > span { color: var(--muted); font-size: 12px; }
.admin-topbar .btn { margin-left: auto; }
.admin-login-page { min-height: 100vh; padding: 24px; display: grid; place-items: center; background: radial-gradient(circle at 50% 0, #eee7ff, #f6f4f7 50%); }
.admin-login-card { width: min(440px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: var(--shadow-lg); }
.admin-login-card > p { margin: 18px 0 24px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.admin-login-card .btn-lg { width: 100%; margin-top: 16px; }
.admin-back-link { margin-top: 22px; display: block; color: var(--muted); font-size: 12px; text-align: center; }
.admin-sidebar { padding: 28px 16px; color: #cbc7d3; background: #181721; }
.admin-title { padding: 0 12px 24px; color: #fff; font-weight: 760; }
.admin-nav { display: grid; gap: 4px; }
.admin-nav button { width: 100%; padding: 12px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 11px; color: #aaa6b5; background: transparent; cursor: pointer; text-align: left; font-size: 13px; }
.admin-nav button:hover, .admin-nav button.active { color: #fff; background: #2b2837; }
.admin-nav svg { width: 17px; }
.admin-content { min-width: 0; padding: 34px; }
.admin-head { margin-bottom: 24px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.admin-head h1 { margin: 0; font-size: 30px; letter-spacing: -.04em; }
.admin-head p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card { padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.stat-card span { color: #8b8692; font-size: 11px; }
.stat-card strong { margin-top: 9px; display: block; font-size: 28px; letter-spacing: -.04em; }
.stat-card small { color: var(--green); font-size: 10px; }
.admin-grid { margin-top: 18px; display: grid; grid-template-columns: 1.35fr .65fr; gap: 18px; }
.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.table-card-head { padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.table-card-head h2 { margin: 0; font-size: 15px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 11px 16px; color: #8f8996; background: #faf9fb; font-size: 10px; text-align: left; font-weight: 650; }
.data-table td { padding: 15px 16px; border-top: 1px solid #f0edf2; font-size: 12px; vertical-align: middle; }
.data-table tr:first-child td { border-top: 0; }
.status-pill { padding: 5px 8px; display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; color: #4f4a59; background: #f0edf2; font-size: 9px; font-weight: 750; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #8d8796; }
.status-pill.success { color: #146b4c; background: #e5f5ee; }
.status-pill.success::before { background: var(--green); }
.status-pill.processing { color: #5b41c4; background: var(--purple-pale); }
.status-pill.processing::before { background: var(--purple); }
.status-pill.failed { color: #af3c3c; background: #faeaea; }
.status-pill.failed::before { background: var(--red); }
.model-admin-list { padding: 6px 18px; }
.model-admin-row { padding: 15px 0; display: grid; grid-template-columns: 37px minmax(0,1fr) auto; gap: 11px; align-items: center; border-bottom: 1px solid #f0edf2; }
.model-admin-row:last-child { border: 0; }
.model-admin-row .mini-icon { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 11px; color: var(--purple); background: var(--purple-pale); }
.model-admin-row svg { width: 17px; }
.model-admin-row strong { display: block; font-size: 12px; }
.model-admin-row small { color: #96909c; font-size: 9px; }
.switch { position: relative; width: 38px; height: 22px; border: 0; border-radius: 99px; background: #cbc6cf; cursor: pointer; transition: .18s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.15); transition: .18s; }
.switch.on { background: var(--purple); }
.switch.on::after { transform: translateX(16px); }
.switch:disabled { cursor: not-allowed; opacity: .48; }
.audit-list { padding: 3px 20px 12px; }
.audit-item { padding: 15px 0; display: grid; grid-template-columns: 9px minmax(0,1fr); gap: 10px; border-bottom: 1px solid #f0edf2; }
.audit-item:last-child { border-bottom: 0; }
.audit-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--purple); }
.audit-item strong { display: block; font-size: 11px; }
.audit-item p { margin: 4px 0; color: #716c78; font-size: 10px; line-height: 1.5; }
.audit-item time { color: #a39ea8; font-size: 9px; }

.support-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; }
.support-card { padding: 28px; }
.support-card h2 { margin: 0 0 9px; font-size: 22px; }
.support-card > p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.contact-list { margin-top: 24px; display: grid; gap: 11px; }
.contact-item { padding: 15px; display: flex; gap: 12px; align-items: center; border-radius: 13px; background: #f6f3f7; }
.contact-item .mini-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: var(--purple); background: #fff; }
.contact-item svg { width: 18px; }
.contact-item strong { display: block; font-size: 12px; }
.contact-item span { color: var(--muted); font-size: 10px; }
.input { width: 100%; min-height: 44px; padding: 0 13px; border: 1px solid #dcd7e1; border-radius: 11px; background: #fcfbfd; outline: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-field { margin-bottom: 15px; }

.site-footer { margin-top: auto; padding: 42px 0 26px; color: #b4b0bc; background: #17161f; }
.footer-main { display: grid; grid-template-columns: 1.5fr repeat(3,1fr); gap: 36px; }
.footer-brand { color: #fff; }
.footer-brand p { max-width: 300px; color: #918d99; font-size: 12px; line-height: 1.7; }
.footer-col h3 { margin: 4px 0 13px; color: #fff; font-size: 12px; }
.footer-col a { margin: 8px 0; display: block; color: #908b98; font-size: 11px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { margin-top: 30px; padding-top: 20px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid #302e39; color: #736f7a; font-size: 10px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 80; padding: 20px; display: grid; place-items: center; background: rgba(17,15,24,.55); backdrop-filter: blur(6px); }
.modal { width: min(460px, 100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: 24px; background: #fff; box-shadow: var(--shadow-lg); }
.modal-head { padding: 24px 25px 12px; display: flex; align-items: start; justify-content: space-between; }
.modal-head h2 { margin: 0; font-size: 24px; letter-spacing: -.035em; }
.modal-head p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.close-btn { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 10px; background: #f3f1f5; cursor: pointer; }
.close-btn svg { width: 17px; }
.modal-body { padding: 14px 25px 26px; }
.auth-modal { width: min(520px, 100%); }
.auth-tabs { margin: 0 25px 4px; padding: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border-radius: 12px; background: #f3f1f5; }
.auth-tab { min-height: 38px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-weight: 700; cursor: pointer; }
.auth-tab.active { color: #fff; background: #17161f; box-shadow: 0 4px 12px rgba(23,22,31,.16); }
.auth-form { display: grid; gap: 14px; }
.auth-form .form-field { margin: 0; }
.auth-form .field-label { justify-content: flex-start; }
.field-index { width: 21px; height: 21px; margin-right: 7px; display: inline-grid; place-items: center; border-radius: 50%; color: #fff; background: var(--purple); font-size: 10px; }
.captcha-row { display: grid; grid-template-columns: minmax(0,1fr) 112px 76px; gap: 9px; }
.captcha-question { min-height: 44px; padding: 0 10px; display: grid; place-items: center; border: 1px dashed #aaa3b5; border-radius: 11px; color: #302943; background: repeating-linear-gradient(-12deg,#f5f1ff,#f5f1ff 6px,#ebe4ff 6px,#ebe4ff 8px); font-weight: 800; letter-spacing: .04em; white-space: nowrap; }
.captcha-refresh { padding-inline: 10px; }
.code-row { display: grid; grid-template-columns: minmax(0,1fr) 116px; gap: 10px; }
.check-row { margin-top: 13px; display: grid; grid-template-columns: 18px 1fr; gap: 9px; color: #6f6a76; font-size: 11px; line-height: 1.55; }
.check-row input { margin: 2px 0 0; accent-color: var(--purple); }
.check-row a { color: var(--purple-dark); }
.login-tip { margin: 16px 0; padding: 11px 13px; border-radius: 11px; color: #5c5279; background: var(--purple-pale); font-size: 11px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; }
.modal-actions .btn-primary { min-width: 110px; }
.preview-backdrop { background: rgba(13,12,18,.82); }
.preview-modal { width: min(980px, 100%); background: #111018; color: #fff; }
.preview-modal .modal-head p { color: #aaa5b4; }
.preview-modal .close-btn { color: #fff; background: #2b2934; }
.preview-stage { padding: 4px 25px 8px; display: grid; place-items: center; }
.preview-media { position: relative; max-width: 100%; max-height: 66vh; overflow: hidden; border-radius: 15px; background: #24212d; }
.preview-media .generated-image { max-width: 100%; max-height: 66vh; object-fit: contain; }
.preview-media .art { position: absolute; inset: 0; }
.preview-details > p { margin: 0 0 18px; color: #d2ced9; line-height: 1.7; }
.toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 9px; }
.toast { min-width: 260px; max-width: 360px; padding: 13px 15px; display: flex; align-items: start; gap: 10px; border: 1px solid #e4deea; border-radius: 13px; background: #fff; box-shadow: var(--shadow-lg); font-size: 12px; animation: toast-in .22s ease; }
.toast.success { border-left: 4px solid var(--green); }
.toast.error { border-left: 4px solid var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 980px) {
  .main-nav { display: none; }
  .mobile-menu { display: grid; place-items: center; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .lead { margin-inline: auto; }
  .button-row, .hero-note { justify-content: center; }
  .hero-visual { width: min(620px, 100%); margin: 0 auto; }
  .model-grid { grid-template-columns: 1fr 1fr; }
  .trust-panel { grid-template-columns: 1fr 1fr; }
  .creator-layout { grid-template-columns: 1fr; }
  .model-picker { display: grid; grid-template-columns: repeat(3, 1fr); }
  .model-option { grid-template-columns: 36px 1fr; }
  .model-option .radio-dot { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .summary-card { position: static; }
  .works-grid { columns: 2 240px; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .admin-grid { grid-template-columns: 1fr; }
  .points-layout { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .chat-layout { grid-template-columns: 1fr; }
  .provider-fields { grid-template-columns: 1fr; }
  .chat-side { display: none; }
}

@media (max-width: 720px) {
  .demo-bar { padding-inline: 12px; text-align: center; }
  .header-inner { height: 64px; padding: 0 16px; gap: 12px; }
  .brand { font-size: 16px; }
  .brand-mark { width: 31px; height: 31px; }
  .header-actions .btn { display: none; }
  .points-pill { padding: 0 10px; }
  .container { width: min(100% - 30px, var(--max)); }
  .hero { padding: 54px 0 42px; }
  .display { font-size: clamp(42px, 13vw, 60px); }
  .lead { font-size: 15px; }
  .hero-visual { min-height: 400px; }
  .visual-main { width: 76%; height: 72%; right: 15px; }
  .visual-secondary { width: 50%; height: 42%; }
  .float-tag { padding: 9px 11px; }
  .section { padding: 54px 0; }
  .model-grid, .steps { grid-template-columns: 1fr; }
  .works-grid { columns: 1; }
  .model-card:last-child { grid-column: auto; }
  .trust-panel { padding: 25px; grid-template-columns: 1fr; }
  .trust-stat { padding: 14px 0 0; border-top: 1px solid #373442; border-left: 0; }
  .subpage-hero { padding-top: 38px; }
  .model-picker { grid-template-columns: 1fr; }
  .model-option { grid-template-columns: 40px 1fr auto; }
  .model-option .radio-dot { display: block; }
  .panel-body { padding: 18px; }
  .provider-callout { flex-wrap: wrap; }
  .provider-callout > span:nth-child(2) { flex: 1 1 calc(100% - 54px); }
  .provider-test-button { margin-left: 50px; }
  .connectivity-notice { grid-template-columns: 1fr; gap: 3px; }
  .parameter-grid, .form-row { grid-template-columns: 1fr; }
  .captcha-row { grid-template-columns: minmax(0,1fr) 104px; }
  .captcha-refresh { grid-column: 1 / -1; }
  .chat-shell { min-height: 560px; }
  .chat-thread { padding: 20px 15px; }
  .chat-message { max-width: 94%; }
  .chat-examples { grid-template-columns: 1fr; }
  .chat-composer { grid-template-columns: 1fr; }
  .chat-composer .btn { width: 100%; }
  .admin-shell { display: block; }
  .admin-sidebar { padding: 9px 12px; overflow-x: auto; }
  .admin-title { display: none; }
  .admin-nav { width: max-content; display: flex; }
  .admin-nav button { width: auto; white-space: nowrap; }
  .admin-content { padding: 24px 15px 60px; }
  .admin-head { align-items: start; flex-direction: column; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .data-table { min-width: 650px; }
  .table-card { overflow-x: auto; }
  .support-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-main > :first-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 420px) {
  .brand > span:not(.brand-mark) { display: none; }
  .points-pill { font-size: 12px; }
  .button-row .btn { width: 100%; }
  .hero-visual { min-height: 340px; }
  .float-two { bottom: 15px; }
  .visual-card { border-width: 5px; border-radius: 21px; }
  .model-card { min-height: 280px; }
  .stat-grid { grid-template-columns: 1fr; }
  .ledger-row { padding-inline: 16px; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-main > :first-child { grid-column: auto; }
  .toast-root { right: 12px; left: 12px; bottom: 12px; }
  .toast { min-width: 0; }
}
