:root {
  --bg: #07111f;
  --bg-soft: #101d33;
  --panel: rgba(9, 17, 31, 0.8);
  --panel-strong: rgba(13, 24, 44, 0.96);
  --panel-light: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.1);
  --text: #ecf3ff;
  --muted: #95a8c7;
  --accent: #7cf4c6;
  --accent-strong: #29d49b;
  --accent-warm: #ff9d5c;
  --danger: #ff8d8d;
  --shadow: 0 32px 80px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(41, 212, 155, 0.16), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(255, 157, 92, 0.16), transparent 24%),
    linear-gradient(180deg, #040914 0%, #07111f 46%, #0b1730 100%);
}

.site-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 92%);
}

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

.hero,
.workspace {
  display: grid;
  gap: 24px;
}

.hero {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  margin-bottom: 24px;
}

.hero-copy,
.hero-side,
.panel,
.content-card,
.auth-card,
.hero-stat-card,
.mini-stat {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-copy,
.hero-side,
.panel {
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    var(--panel);
}

.hero-copy {
  padding: 40px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 10ch;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

h2 {
  font-size: 28px;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 18px;
}

.lead {
  max-width: 58ch;
  margin-top: 20px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

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

.hero-side {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.hero-stat-card {
  border-radius: 24px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(124, 244, 198, 0.18), transparent 34%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    var(--panel-strong);
}

.hero-stat-label,
.hero-stat-meta,
.mini-stat-label,
.field-note,
.reference-meta,
.status,
.progress-meta,
.empty-copy,
.auth-tip {
  color: var(--muted);
}

.hero-stat-value {
  margin-top: 10px;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.1;
}

.hero-stat-meta {
  margin-top: 8px;
  line-height: 1.7;
}

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

.mini-stat {
  border-radius: 22px;
  padding: 20px;
  background: var(--panel-strong);
}

.mini-stat strong {
  display: block;
  margin-top: 12px;
  font-size: 32px;
  line-height: 1;
}

.workspace {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: start;
}

.panel,
.content-card {
  padding: 24px;
}

.panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    var(--panel);
}

.preview-panel {
  display: grid;
  gap: 16px;
}

.result-stage,
.content-card,
.auth-card,
.reference-card,
.empty-state,
.result-wrap,
.meta-grid {
  border-radius: 24px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.result-stage {
  padding: 24px;
}

.section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.output-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.edit-result-btn.disabled {
  pointer-events: none;
  opacity: 0.48;
}

.compact-top {
  margin-bottom: 14px;
}

.auth-card {
  padding: 16px;
  margin-bottom: 24px;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.segment,
.mode-tab,
.chip-btn,
.primary-btn,
.ghost-btn,
.reference-remove-btn,
.history-action-btn,
.lightbox-close {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.segment,
.mode-tab,
.chip-btn,
.ghost-btn,
.reference-remove-btn,
.history-action-btn {
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, opacity 180ms ease;
}

.segment {
  border-radius: 999px;
  padding: 10px 18px;
  color: var(--muted);
  background: transparent;
}

.segment.active,
.mode-tab.active {
  color: #04111f;
  background: linear-gradient(135deg, var(--accent) 0%, #aef8df 100%);
}

.auth-form,
.auth-user {
  margin-top: 16px;
}

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

.account-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(124, 244, 198, 0.08);
  color: var(--text);
  font-weight: 600;
}

.account-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(124, 244, 198, 0.1);
}

.auth-tip {
  margin-top: 10px;
  line-height: 1.7;
}

.mode-tabs,
.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mode-tabs {
  margin-bottom: 12px;
}

.mode-tab,
.chip-btn {
  padding: 11px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 600;
}

.chip-btn:hover,
.mode-tab:hover,
.ghost-btn:hover,
.reference-remove-btn:hover,
.history-action-btn:hover,
.segment:hover,
.primary-btn:hover {
  transform: translateY(-1px);
}

.quick-prompts {
  margin: 0 0 18px;
}

.mode-hint {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.grid {
  display: grid;
  gap: 14px;
}

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

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

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

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.field span {
  font-size: 14px;
  font-weight: 600;
}

textarea,
select,
input[type="text"],
input[type="password"],
input[type="file"] {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  padding: 14px 16px;
}

textarea::placeholder,
input::placeholder {
  color: rgba(236, 243, 255, 0.42);
}

textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.7;
}

input[type="range"] {
  width: 100%;
}

.info-box,
.field-note {
  min-height: 52px;
  display: flex;
  align-items: center;
}

.info-box {
  padding: 0 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 600;
}

.reference-card {
  padding: 16px;
  margin-bottom: 16px;
}

.reference-head,
.progress-meta,
.history-top,
.history-actions,
.task-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reference-list,
.stack-list {
  display: grid;
  gap: 12px;
}

.reference-list {
  margin-top: 12px;
}

.reference-item,
.history-card,
.task-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.reference-item {
  grid-template-columns: 72px 1fr auto;
  align-items: center;
}

.reference-thumb,
.mask-preview,
.history-thumb img,
.task-thumb img,
#result-image,
#lightbox-image {
  width: 100%;
  object-fit: cover;
}

.reference-thumb,
.reference-placeholder,
.mask-preview {
  width: 72px;
  height: 72px;
  border-radius: 16px;
}

.reference-placeholder,
.task-placeholder,
.history-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(124, 244, 198, 0.12), rgba(255, 157, 92, 0.18));
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.reference-name {
  font-weight: 600;
}

.reference-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-remove-btn,
.history-action-btn {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.wide-btn {
  width: 100%;
}

.range-row {
  display: flex;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 13px;
}

.action-bar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.primary-btn,
.ghost-btn {
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.primary-btn {
  color: #04111f;
  background: linear-gradient(135deg, var(--accent) 0%, #d1ffef 100%);
}

.ghost-btn {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.primary-btn:disabled,
.ghost-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.progress-wrap {
  margin-top: 16px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-warm) 100%);
  transition: width 900ms linear;
}

.progress-elapsed {
  margin-left: auto;
  font-weight: 700;
  white-space: nowrap;
}

.empty-state {
  min-height: 440px;
  display: grid;
  place-items: center;
  gap: 20px;
  padding: 32px;
  text-align: center;
}

.empty-state p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
}

.empty-orb {
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(124, 244, 198, 0.85), transparent 28%),
    radial-gradient(circle at 72% 28%, rgba(255, 157, 92, 0.9), transparent 24%),
    radial-gradient(circle at 55% 68%, rgba(103, 143, 255, 0.68), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
  filter: blur(0.2px);
}

.result-wrap {
  overflow: hidden;
}

#result-image {
  display: block;
  max-height: 780px;
  cursor: zoom-in;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.gallery-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.gallery-item.active {
  outline: 2px solid rgba(124, 244, 198, 0.8);
}

.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

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

.meta-item {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.meta-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.meta-item strong {
  display: block;
  margin-top: 8px;
  line-height: 1.5;
}

.content-card {
  padding: 20px;
}

.content-card p {
  line-height: 1.8;
}

.history-card,
.task-card {
  grid-template-columns: 108px 1fr;
}

.history-thumb,
.task-thumb {
  width: 108px;
  height: 108px;
  border: 0;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.history-content,
.task-content {
  min-width: 0;
}

.history-tag,
.task-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  min-width: 78px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(124, 244, 198, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.task-status-pill.failed {
  background: rgba(255, 141, 141, 0.12);
  color: var(--danger);
}

.task-status-pill.processing {
  background: rgba(255, 157, 92, 0.14);
  color: var(--accent-warm);
}

.history-prompt,
.task-prompt {
  margin-top: 8px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  line-height: 1.6;
  text-align: left;
  cursor: pointer;
}

.history-meta,
.task-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.history-actions {
  justify-content: flex-start;
  margin-top: 12px;
}

.task-status-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.task-error {
  margin-top: 8px;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.6;
}

.task-progress {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.task-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.task-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
}

.task-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--coral));
  transition: width 900ms linear;
}

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

.lightbox-dialog {
  position: relative;
  width: min(96vw, 1180px);
  max-height: 92vh;
  padding: 18px 18px 12px;
  border-radius: 28px;
  background: rgba(8, 15, 28, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font-size: 28px;
  line-height: 1;
}

#lightbox-image {
  display: block;
  max-height: calc(92vh - 96px);
  border-radius: 20px;
}

.lightbox-caption {
  margin-top: 12px;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

body.lightbox-open {
  overflow: hidden;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  color: #fff;
}

.brand {
  color: inherit;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

.nav-links,
.app-sidebar nav,
.sidebar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-links a,
.app-sidebar nav a,
.auth-switch a {
  color: inherit;
  text-decoration: none;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.nav-cta {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.landing-page {
  background: #050505;
}

.landing-hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  padding: 120px 40px 80px;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.28) 54%, rgba(0, 0, 0, 0.14)),
    url("https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&w=2400&q=85") center / cover;
}

.landing-copy {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
}

.landing-copy h1,
.auth-panel h1,
.studio-tools h1,
.admin-layout h1 {
  letter-spacing: 0;
}

.landing-main {
  padding: 28px 40px 64px;
  background: #f7f6f0;
  color: #151515;
}

.feature-band {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-band article {
  padding: 24px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.18);
}

.feature-band span {
  color: #7b6d56;
  font-weight: 800;
}

.feature-band h2 {
  margin-top: 12px;
  color: #151515;
}

.feature-band p {
  margin-top: 10px;
  color: #57524b;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(120deg, rgba(6, 18, 24, 0.8), rgba(33, 25, 14, 0.34)),
    url("https://images.unsplash.com/photo-1519608487953-e999c86e7455?auto=format&fit=crop&w=2200&q=85") center / cover;
}

.auth-shell {
  width: min(440px, calc(100% - 32px));
  display: grid;
  gap: 20px;
}

.standalone-auth {
  padding: 28px;
  border-radius: 8px;
  background: rgba(11, 14, 18, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
}

.auth-switch {
  margin-top: 18px;
  color: var(--muted);
}

.auth-switch a {
  color: var(--accent);
}

.app-page,
.admin-page {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: #f3f4ef;
  color: #171717;
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px;
  background: #101010;
  color: #f8f8f4;
}

.app-sidebar nav {
  align-items: stretch;
  flex-direction: column;
}

.app-sidebar nav a {
  padding: 11px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
}

.app-sidebar nav a.active,
.app-sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.sidebar-account {
  margin-top: auto;
  display: grid;
  gap: 12px;
  color: rgba(255, 255, 255, 0.74);
}

.sidebar-ai-chat {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(160px, 1fr) auto auto auto;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-chat-head,
.sidebar-chat-composer,
.sidebar-upload,
.sidebar-attachment {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-chat-head {
  justify-content: space-between;
}

.sidebar-icon-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.sidebar-chat-messages {
  min-height: 160px;
  max-height: 34vh;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  padding-right: 2px;
}

.sidebar-chat-message {
  display: grid;
  gap: 4px;
}

.sidebar-chat-message span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 700;
}

.sidebar-chat-message p,
.sidebar-chat-empty {
  margin: 0;
  padding: 9px 10px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.sidebar-chat-message.user p {
  background: rgba(124, 244, 198, 0.16);
}

.sidebar-chat-attachments {
  display: grid;
  gap: 6px;
}

.sidebar-attachment {
  width: 100%;
  border: 0;
  padding: 6px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.08);
  text-align: left;
  cursor: pointer;
}

.sidebar-attachment img {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
  flex: 0 0 auto;
}

.sidebar-attachment span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.sidebar-upload {
  justify-content: center;
  min-height: 34px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  cursor: pointer;
}

.sidebar-upload input {
  display: none;
}

.sidebar-chat-composer {
  align-items: stretch;
}

.sidebar-chat-composer textarea {
  min-width: 0;
  width: 100%;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.22);
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
}

.sidebar-chat-composer .primary-btn {
  min-width: 58px;
  padding: 0 12px;
}

.sidebar-chat-status {
  min-height: 18px;
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  line-height: 1.5;
}

.studio-layout,
.admin-layout {
  width: min(1440px, 100%);
  padding: 28px;
}

.chat-workspace {
  width: min(1560px, 100%);
  padding: 28px;
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: stretch;
}

.chat-shell {
  min-height: calc(100vh - 56px);
  display: grid;
  grid-template-rows: auto minmax(320px, 1fr) auto auto auto;
  gap: 16px;
  padding: 24px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.96)),
    var(--surface);
  color: var(--ink);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-soft);
}

.chat-history-panel {
  min-height: calc(100vh - 56px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 18px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-soft);
}

.chat-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-history-head .ghost-btn {
  background: #eeeeea;
  color: #171717;
  border-color: rgba(0, 0, 0, 0.08);
}

.chat-history-list {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 8px;
}

.chat-history-item {
  position: relative;
  width: 100%;
  display: grid;
  gap: 5px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 34px 11px 12px;
  background: #f3f1eb;
  color: #171717;
  text-align: left;
  cursor: pointer;
}

.chat-history-item.active {
  border-color: #171717;
  background: #fff;
}

.chat-history-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.chat-history-item em {
  color: #68645d;
  font-size: 12px;
  font-style: normal;
}

.chat-history-item i {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #68645d;
  font-size: 18px;
  font-style: normal;
  line-height: 1;
}

.chat-history-item i:hover {
  background: #e5e1d8;
  color: #171717;
}

.chat-history-empty {
  color: var(--soft-text);
  font-size: 14px;
}

.chat-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.chat-topbar h1 {
  max-width: none;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: 0;
}

.chat-messages {
  min-height: 320px;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 22px;
  border-radius: 8px;
  background:
    linear-gradient(rgba(0, 0, 0, 0.025) 1px, transparent 1px),
    #fbfaf7;
  background-size: 100% 36px;
  border: 1px solid var(--hairline);
}

.chat-empty {
  align-self: center;
  justify-self: center;
  color: var(--soft-text);
}

.chat-message {
  max-width: min(760px, 86%);
  display: grid;
  gap: 6px;
}

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

.chat-message strong {
  color: var(--soft-text);
  font-size: 12px;
}

.chat-message.user strong {
  text-align: right;
}

.chat-message p {
  margin: 0;
  padding: 13px 14px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-message.user p {
  background: #171717;
  color: #fff;
}

.chat-bubble {
  display: grid;
  gap: 10px;
}

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

.chat-message.user .chat-bubble p {
  background: #171717;
  color: #fff;
}

.chat-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-attachment,
.chat-upload {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  background: #eeeeea;
  color: #171717;
}

.chat-attachment {
  border: 0;
  padding: 6px 10px 6px 6px;
  cursor: pointer;
}

.chat-attachment img {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
}

.chat-attachment span {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.chat-attachment em {
  color: #68645d;
  font-size: 12px;
  font-style: normal;
}

.chat-attachment.file {
  padding-left: 10px;
}

.file-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: #171717;
  color: #fff;
  font-weight: 800;
}

.chat-message-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.chat-message-files span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eeeeea;
  color: #45423d;
  font-size: 12px;
}

.chat-code-block {
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #111;
  color: #f7f7f3;
}

.chat-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  background: #202020;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.chat-code-head button {
  border: 0;
  border-radius: 6px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.chat-code-block pre {
  margin: 0;
  padding: 14px;
  overflow-x: auto;
}

.chat-code-block code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.65;
}

.chat-composer {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 76px;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: #fff;
}

.chat-tool-row {
  display: grid;
  grid-template-columns: repeat(2, 44px);
  gap: 8px;
  align-items: center;
}

.chat-upload,
.chat-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
  user-select: none;
  box-sizing: border-box;
}

.chat-tool-btn:hover {
  background: #e2ded6;
}

.chat-tool-btn svg,
.chat-tool-btn [data-lucide] {
  width: 20px !important;
  height: 20px !important;
  fill: none;
  stroke: #171717;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-upload input,
.chat-tool-btn input {
  display: none;
}

.chat-composer textarea {
  width: 100%;
  resize: vertical;
  min-height: 88px;
  border: 0;
  border-radius: 8px;
  padding: 12px 13px;
  background: #fbfaf7;
  color: #171717;
  font: inherit;
  line-height: 1.55;
}

.chat-composer textarea:focus {
  outline: 2px solid #171717;
  outline-offset: 0;
}

.chat-send-btn {
  width: 64px;
  height: 64px;
  min-height: 64px;
  border: 0;
  border-radius: 999px;
  background: #9ff3d0;
  color: #07110d;
  font-weight: 800;
  cursor: pointer;
}

.chat-send-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.refined-app .chat-workspace {
  height: 100vh;
  padding: 24px;
  overflow: hidden;
}

.refined-app .chat-layout {
  height: calc(100vh - 48px);
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
}

.refined-app .chat-shell,
.refined-app .chat-history-panel {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.refined-app .chat-shell {
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 0;
  padding: 0;
  background: #fffdfa;
}

.refined-app .chat-topbar {
  padding: 22px 24px;
  border-bottom: 1px solid var(--hairline);
  background: linear-gradient(180deg, #fffdfa, #fbfaf7);
}

.refined-app .chat-topbar h1 {
  font-size: 30px;
}

.refined-app .chat-messages {
  min-height: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
  padding: 24px;
  background:
    radial-gradient(circle at 18px 18px, rgba(31, 138, 91, 0.07) 1px, transparent 1px),
    #f7f6f0;
  background-size: 28px 28px;
}

.refined-app .chat-empty {
  max-width: 420px;
  padding: 18px 20px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--hairline);
  text-align: center;
  line-height: 1.7;
}

.refined-app .chat-message {
  max-width: min(820px, 78%);
  gap: 7px;
}

.refined-app .chat-message strong {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(23, 23, 20, 0.06);
  color: #58534b;
}

.refined-app .chat-message.user strong {
  justify-self: end;
  background: rgba(31, 138, 91, 0.12);
  color: var(--green);
}

.refined-app .chat-message p {
  padding: 14px 16px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 26px rgba(31, 29, 24, 0.06);
}

.refined-app .chat-message.user p,
.refined-app .chat-message.user .chat-bubble p {
  background: var(--green);
  color: #fff;
  border-color: rgba(31, 138, 91, 0.42);
}

.refined-app .chat-attachments {
  min-height: 0;
  padding: 10px 24px 0;
  background: #fffdfa;
}

.refined-app .chat-attachment {
  border: 1px solid var(--hairline);
  background: #f7f6f0;
}

.refined-app .chat-composer {
  margin: 12px 24px 20px;
  grid-template-columns: 100px minmax(0, 1fr) 82px;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 14px 34px rgba(31, 29, 24, 0.08);
}

.refined-app .chat-tool-row {
  grid-template-columns: repeat(2, 46px);
}

.refined-app .chat-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f1efe8;
}

.refined-app .chat-tool-btn svg,
.refined-app .chat-tool-btn [data-lucide] {
  width: 21px !important;
  height: 21px !important;
  flex: 0 0 auto;
  display: block;
}

.refined-app .chat-tool-btn:hover {
  background: #e8e3d8;
}

.refined-app .chat-composer textarea {
  min-height: 76px;
  max-height: 180px;
  background: #f7f6f0;
}

.refined-app .chat-composer textarea:focus {
  outline: 2px solid rgba(31, 138, 91, 0.24);
}

.refined-app .chat-send-btn {
  width: 68px;
  height: 68px;
  min-height: 68px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 24px rgba(31, 138, 91, 0.2);
}

.refined-app .chat-history-panel {
  padding: 0;
  background: #fffdfa;
}

.refined-app .chat-history-head {
  padding: 18px;
  border-bottom: 1px solid var(--hairline);
}

.refined-app .chat-history-list {
  padding: 12px;
}

.refined-app .chat-history-item {
  padding: 12px 36px 12px 12px;
  background: #f7f6f0;
  border-color: rgba(0, 0, 0, 0.08);
}

.refined-app .chat-history-item:hover {
  background: #fff;
}

.refined-app .chat-history-item.active {
  border-color: rgba(31, 138, 91, 0.55);
  background: rgba(31, 138, 91, 0.08);
}

.refined-app .chat-code-block {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.studio-workspace {
  width: min(1560px, 100%);
  padding: 28px;
}

.studio-view {
  width: 100%;
}

.library-panel {
  width: min(1120px, 100%);
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-soft);
  padding: 24px;
}

.library-panel h1 {
  max-width: none;
  font-size: 34px;
  line-height: 1.12;
}

.library-panel .mode-tabs {
  padding: 4px;
  border-radius: 8px;
  background: var(--surface-2);
}

.library-panel .mode-tab {
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
}

.library-panel .mode-tab.active {
  background: var(--ink);
  color: #fff;
}

.studio-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
}

.studio-tools,
.studio-output,
.admin-table-wrap {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.06);
}

.studio-layout .field span,
.admin-layout .field span {
  color: #262626;
}

.studio-layout textarea,
.studio-layout select,
.studio-layout input[type="text"],
.studio-layout input[type="password"],
.studio-layout input[type="file"] {
  background: #f7f7f3;
  color: #171717;
  border-color: rgba(0, 0, 0, 0.12);
}

.studio-layout .mode-tab,
.studio-layout .ghost-btn,
.admin-layout .ghost-btn {
  background: #eeeeea;
  color: #171717;
}

.studio-layout .mode-tab.active {
  background: #171717;
  color: #fff;
}

.studio-layout .primary-btn,
.admin-layout .primary-btn {
  background: #171717;
  color: #fff;
}

.studio-layout .content-card,
.studio-layout .result-wrap,
.studio-layout .empty-state,
.studio-layout .meta-grid,
.studio-layout .reference-card {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: none;
}

.studio-layout .empty-state {
  min-height: 320px;
  color: #545454;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.admin-stats article {
  padding: 18px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.admin-stats span {
  color: #666;
}

.admin-stats strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.table-scroll {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-align: left;
  white-space: nowrap;
}

.admin-table th {
  color: #666;
  font-size: 12px;
  text-transform: uppercase;
}

@media (max-width: 1120px) {
  .hero,
  .workspace,
  .grid.two,
  .grid.three,
  .grid.four,
  .meta-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats-grid,
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-page,
  .admin-page {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    height: auto;
  }

  .sidebar-ai-chat {
    grid-template-rows: auto auto auto auto auto;
  }

  .sidebar-chat-messages {
    max-height: 360px;
  }

  .studio-layout {
    grid-template-columns: 1fr;
  }

  .chat-layout {
    grid-template-columns: 1fr;
  }

  .chat-history-panel {
    min-height: auto;
  }

  .chat-composer {
    grid-template-columns: 1fr;
  }

  .chat-tool-row {
    grid-template-columns: repeat(2, 44px);
  }

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

@media (max-width: 720px) {
  .page-shell {
    width: min(100%, calc(100% - 20px));
    padding-top: 16px;
  }

  .hero-copy,
  .panel,
  .result-stage,
  .content-card {
    padding: 18px;
  }

  h1 {
    font-size: 42px;
  }

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

  .history-card,
  .task-card,
  .reference-item {
    grid-template-columns: 1fr;
  }

  .history-thumb,
  .task-thumb {
    width: 100%;
    height: 180px;
  }

  .action-bar,
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav {
    padding: 14px 16px;
  }

  .nav-links {
    gap: 8px;
    font-size: 13px;
  }

  .landing-hero {
    padding: 110px 18px 56px;
  }

  .landing-main,
  .studio-layout,
  .admin-layout {
    padding: 18px;
  }

  .feature-band,
  .admin-stats {
    grid-template-columns: 1fr;
  }
}

/* Refined visual system */
:root {
  --ink: #151515;
  --paper: #f5f3ee;
  --surface: #ffffff;
  --surface-2: #f0eee8;
  --hairline: rgba(20, 20, 20, 0.12);
  --soft-text: #68645d;
  --green: #1f8a5b;
  --coral: #d86e3f;
  --shadow-soft: 0 18px 50px rgba(20, 20, 20, 0.08);
}

body.refined,
.refined-app,
.refined-admin,
.refined-auth {
  font-family: "Aptos", "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.refined h1,
.refined-app h1,
.refined-admin h1,
.refined-auth h1,
.refined h2,
.refined-app h2,
.refined-admin h2,
.refined-auth h2 {
  letter-spacing: 0;
}

.glass-nav {
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent);
}

.glass-nav .brand {
  font-size: 20px;
  letter-spacing: 0;
}

.glass-nav .nav-links a {
  color: rgba(255, 255, 255, 0.88);
}

.glass-nav .nav-cta {
  background: linear-gradient(135deg, var(--accent), #56d7ff);
  color: #04111f;
}

.nav-link-btn {
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.scenic-hero {
  min-height: 88vh;
  padding: 112px clamp(20px, 5vw, 72px) 74px;
}

.cy-landing {
  background:
    linear-gradient(rgba(124, 244, 198, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 244, 198, 0.045) 1px, transparent 1px),
    #050b14;
  background-size: 44px 44px;
}

.cy-hero {
  min-height: 86vh;
  align-items: center;
  padding-bottom: 52px;
}

.cy-hero .hero-media {
  background:
    linear-gradient(90deg, rgba(3, 8, 18, 0.92), rgba(4, 20, 28, 0.62) 46%, rgba(3, 8, 18, 0.68)),
    url("https://images.unsplash.com/photo-1519608487953-e999c86e7455?auto=format&fit=crop&w=2600&q=88") center / cover;
}

.cy-hero-grid {
  position: relative;
  z-index: 1;
  width: min(1220px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.72fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.cy-showcase {
  min-height: 420px;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(7, 14, 27, 0.82);
  border: 1px solid rgba(124, 244, 198, 0.18);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.34);
  color: #fff;
}

.showcase-toolbar {
  height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.showcase-toolbar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--coral);
}

.showcase-toolbar span:nth-child(2) {
  background: #d6b352;
}

.showcase-toolbar span:nth-child(3) {
  background: var(--green);
}

.showcase-canvas {
  position: relative;
  min-height: 300px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(124, 244, 198, 0.2), transparent 42%),
    linear-gradient(315deg, rgba(86, 215, 255, 0.18), transparent 44%),
    rgba(4, 17, 31, 0.82);
}

.showcase-orbit {
  position: absolute;
  border: 1px solid rgba(124, 244, 198, 0.22);
  border-radius: 999px;
}

.showcase-orbit.one {
  width: 210px;
  height: 210px;
  right: 32px;
  top: 34px;
}

.showcase-orbit.two {
  width: 128px;
  height: 128px;
  right: 74px;
  top: 74px;
  background: rgba(124, 244, 198, 0.08);
}

.showcase-card {
  position: absolute;
  left: 24px;
  bottom: 24px;
  width: min(280px, calc(100% - 48px));
  padding: 18px;
  border-radius: 8px;
  background: rgba(4, 17, 31, 0.86);
  border: 1px solid rgba(124, 244, 198, 0.2);
}

.showcase-card strong {
  display: block;
  margin-bottom: 8px;
}

.showcase-card p {
  color: rgba(236, 243, 255, 0.68);
  line-height: 1.6;
}

.showcase-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: rgba(124, 244, 198, 0.16);
}

.showcase-strip span {
  padding: 16px 10px;
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
  font-weight: 700;
  color: var(--accent);
}

.cy-main {
  background: #07111f;
  color: #ecf3ff;
}

.cy-feature-band article {
  padding: 28px;
  border: 1px solid rgba(124, 244, 198, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
}

.cy-feature-band h2 {
  color: #fff;
}

.cy-feature-band p {
  color: rgba(236, 243, 255, 0.7);
}

.scenic-hero .hero-media {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.35) 46%, rgba(0, 0, 0, 0.1)),
    url("https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&w=2600&q=88") center / cover;
}

.landing-copy {
  width: min(780px, 100%);
}

.landing-copy h1 {
  max-width: none;
  font-size: clamp(56px, 10vw, 128px);
  line-height: 0.92;
  font-weight: 800;
}

.landing-copy .lead {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
}

.refined .primary-btn,
.refined .ghost-btn,
.refined-auth .primary-btn,
.refined-auth .ghost-btn {
  border-radius: 6px;
}

.refined .primary-btn {
  background: #fff;
  color: #111;
}

.refined .ghost-btn {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.refined-main {
  background: var(--paper);
}

.feature-band {
  gap: 34px;
}

.feature-band article {
  padding: 28px 0 8px;
}

.feature-band h2 {
  font-size: 24px;
}

.feature-band p {
  font-size: 16px;
  line-height: 1.75;
}

.refined-auth {
  position: relative;
  background:
    linear-gradient(120deg, rgba(3, 8, 18, 0.92), rgba(4, 20, 28, 0.68) 48%, rgba(3, 8, 18, 0.84)),
    url("https://images.unsplash.com/photo-1519608487953-e999c86e7455?auto=format&fit=crop&w=2400&q=88") center / cover;
}

.refined-auth::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(124, 244, 198, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 244, 198, 0.055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 88%);
}

.refined-auth .auth-shell {
  position: relative;
  z-index: 1;
  width: min(460px, calc(100% - 32px));
}

.refined-auth .standalone-auth {
  border-radius: 8px;
  padding: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(7, 14, 27, 0.82);
  color: var(--text);
  border: 1px solid rgba(124, 244, 198, 0.18);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(20px);
}

.refined-auth .brand {
  color: #fff;
}

.refined-auth .section-kicker {
  color: var(--accent);
  letter-spacing: 0.18em;
}

.refined-auth .auth-panel h1 {
  max-width: none;
  margin-bottom: 24px;
  color: #fff;
  font-size: 34px;
  line-height: 1.12;
  font-weight: 800;
}

.refined-auth .field span {
  color: rgba(255, 255, 255, 0.9);
}

.refined-auth input {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
}

.refined-auth input::placeholder {
  color: rgba(236, 243, 255, 0.48);
}

.refined-auth .primary-btn {
  background: linear-gradient(135deg, var(--accent), #56d7ff);
  color: #04111f;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
  color: rgba(236, 243, 255, 0.66);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
}

.wechat-login-box {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(124, 244, 198, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.wechat-login-box img {
  width: 112px;
  height: 112px;
  display: block;
  border-radius: 6px;
  background: #fff;
}

.wechat-login-box strong {
  display: block;
  margin-bottom: 6px;
  color: #fff;
}

.wechat-login-box p {
  margin-bottom: 12px;
  color: rgba(236, 243, 255, 0.66);
  font-size: 13px;
  line-height: 1.6;
}

.wechat-code {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(4, 17, 31, 0.8);
  color: var(--accent);
  border: 1px solid rgba(124, 244, 198, 0.22);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(96px, 0.7fr) minmax(80px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.captcha-row strong {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 6px;
  background: rgba(4, 17, 31, 0.8);
  border: 1px solid rgba(124, 244, 198, 0.22);
  color: var(--accent);
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}

.captcha-refresh {
  min-height: 46px;
  border: 1px solid rgba(124, 244, 198, 0.22);
  color: var(--accent);
  background: rgba(124, 244, 198, 0.08);
}

.wechat-check-btn {
  width: 100%;
  border: 1px solid rgba(124, 244, 198, 0.22);
  color: var(--accent);
  background: rgba(124, 244, 198, 0.08);
}

.refined-auth .auth-switch,
.refined-auth .status {
  color: rgba(236, 243, 255, 0.68);
}

.refined-auth .auth-switch a {
  color: var(--accent);
}

.refined-app,
.refined-admin {
  background: var(--paper);
  color: var(--ink);
}

.refined-app .app-sidebar,
.refined-admin .app-sidebar {
  background: #171714;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.refined-app .app-sidebar .brand,
.refined-admin .app-sidebar .brand {
  color: #fff;
}

.refined-app .studio-layout {
  max-width: 1560px;
  grid-template-columns: minmax(460px, 560px) minmax(0, 1fr);
  gap: 22px;
}

.refined-app .studio-workspace {
  width: min(1560px, 100%);
}

.refined-app .library-panel {
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-soft);
}

.studio-tools,
.studio-output,
.admin-table-wrap {
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-soft);
}

.studio-tools {
  position: sticky;
  top: 24px;
}

.studio-output {
  display: grid;
  gap: 16px;
}

.section-kicker {
  color: var(--green);
  letter-spacing: 0.16em;
}

.studio-tools h1,
.admin-layout h1 {
  max-width: none;
  font-size: 34px;
  line-height: 1.12;
}

.studio-output h2,
.content-card h2,
.admin-table-wrap h2 {
  font-size: 22px;
}

.mode-tabs {
  padding: 4px;
  border-radius: 8px;
  background: var(--surface-2);
}

.studio-layout .mode-tab,
.admin-layout .ghost-btn,
.studio-layout .ghost-btn {
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
}

.studio-layout .mode-tab.active {
  background: var(--ink);
  color: #fff;
}

.field {
  gap: 8px;
}

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

.refined-auth .field span {
  color: rgba(255, 255, 255, 0.92);
}

.field-note,
.reference-meta,
.status,
.progress-meta,
.empty-copy,
.mode-hint,
.history-meta,
.task-meta,
.range-row {
  color: var(--soft-text);
}

.studio-layout textarea,
.studio-layout select,
.studio-layout input[type="text"],
.studio-layout input[type="password"],
.studio-layout input[type="file"] {
  border-radius: 6px;
  background: #fbfaf7;
  border: 1px solid rgba(0, 0, 0, 0.14);
  color: var(--ink);
}

.studio-layout textarea:focus,
.studio-layout select:focus,
.studio-layout input:focus,
.refined-auth input:focus {
  outline: 2px solid rgba(31, 138, 91, 0.22);
  border-color: rgba(31, 138, 91, 0.7);
}

.prompt-field textarea {
  min-height: 220px;
}

.info-box,
.reference-card,
.content-card,
.empty-state,
.result-wrap,
.meta-grid {
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--hairline);
  box-shadow: none;
}

.empty-state {
  min-height: 360px;
  background:
    linear-gradient(135deg, rgba(31, 138, 91, 0.08), rgba(216, 110, 63, 0.08)),
    #fff;
}

.empty-state h3 {
  color: var(--ink);
}

.studio-layout .primary-btn,
.admin-layout .primary-btn {
  border-radius: 6px;
  background: var(--green);
  color: #fff;
}

.action-bar {
  padding-top: 8px;
}

.progress-wrap {
  border-radius: 8px;
  background: var(--surface-2);
  border: 0;
}

.progress-fill {
  background: linear-gradient(90deg, var(--green), var(--coral));
}

.meta-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #fff;
}

.meta-item {
  border-radius: 6px;
  background: var(--surface-2);
}

.history-card,
.task-card,
.reference-item {
  border-radius: 8px;
  background: #fbfaf7;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.refined-app .history-prompt,
.refined-app .task-prompt {
  color: var(--ink);
}

.refined-app .task-prompt:disabled {
  color: var(--ink);
  cursor: default;
  opacity: 1;
}

.refined-app .history-placeholder,
.refined-app .task-placeholder {
  background: var(--surface-2);
  color: var(--ink);
}

.refined-app .history-action-btn {
  background: var(--surface-2);
  color: var(--ink);
}

.refined-app .task-retry-btn {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(190, 45, 45, 0.24);
  background: rgba(190, 45, 45, 0.08);
  color: #8f1f1f;
  font-size: 12px;
  font-weight: 700;
}

.refined-app .task-delete-btn {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(80, 80, 80, 0.18);
  background: rgba(0, 0, 0, 0.04);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.history-tag,
.task-status-pill {
  border-radius: 999px;
  background: rgba(31, 138, 91, 0.1);
  color: var(--green);
}

.task-status-pill.processing {
  background: rgba(216, 110, 63, 0.12);
  color: var(--coral);
}

.task-status-pill.failed {
  background: rgba(190, 45, 45, 0.1);
  color: #be2d2d;
  border-color: rgba(190, 45, 45, 0.18);
}

.refined-admin .admin-layout {
  max-width: 1480px;
}

.refined-admin .admin-stats {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.refined-admin .admin-stats article {
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-soft);
}

.refined-admin .admin-stats strong {
  color: var(--ink);
}

.admin-table th {
  color: var(--soft-text);
  letter-spacing: 0.08em;
}

.admin-table td {
  color: var(--ink);
}

@media (max-width: 1120px) {
  .refined-app .studio-layout {
    grid-template-columns: 1fr;
  }

  .studio-tools {
    position: static;
  }

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

  .cy-hero-grid {
    grid-template-columns: 1fr;
  }

  .cy-showcase {
    min-height: 360px;
  }
}

@media (max-width: 720px) {
  .landing-copy h1 {
    font-size: 54px;
  }

  .landing-copy .lead {
    font-size: 17px;
  }

  .refined-admin .admin-stats,
  .meta-grid {
    grid-template-columns: 1fr;
  }

  .wechat-login-box {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

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

  .cy-showcase {
    min-height: 320px;
  }

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

/* Neo landing refresh */
.neo-landing {
  min-height: 100vh;
  background:
    linear-gradient(rgba(88, 255, 210, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 255, 210, 0.045) 1px, transparent 1px),
    #030711;
  background-size: 52px 52px;
  color: #f4fbff;
}

.neo-nav {
  padding: 18px clamp(18px, 4vw, 56px);
  background:
    linear-gradient(180deg, rgba(3, 7, 17, 0.92), rgba(3, 7, 17, 0.58) 64%, transparent);
  backdrop-filter: blur(18px);
}

.neo-nav .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.neo-nav .brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 0 24px rgba(55, 183, 255, 0.45);
}

.neo-nav .nav-links {
  gap: 16px;
}

.neo-nav .nav-links a,
.neo-nav .nav-link-btn {
  color: rgba(244, 251, 255, 0.82);
}

.neo-nav .nav-cta {
  border: 1px solid rgba(88, 255, 210, 0.42);
  background: rgba(88, 255, 210, 0.12);
  color: #f4fbff;
  box-shadow: inset 0 0 18px rgba(88, 255, 210, 0.1), 0 0 28px rgba(88, 255, 210, 0.16);
}

.neo-hero {
  position: relative;
  min-height: 92vh;
  align-items: center;
  padding: 116px clamp(18px, 4vw, 64px) 54px;
  isolation: isolate;
}

.neo-hero .hero-media {
  background:
    linear-gradient(90deg, rgba(3, 7, 17, 0.96), rgba(3, 14, 28, 0.78) 42%, rgba(3, 7, 17, 0.74)),
    url("https://images.unsplash.com/photo-1519608487953-e999c86e7455?auto=format&fit=crop&w=2600&q=90") center / cover;
  transform: scale(1.02);
}

.neo-grid,
.neo-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.neo-grid {
  background:
    linear-gradient(rgba(88, 255, 210, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 184, 92, 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 86%);
}

.neo-scan {
  background: linear-gradient(180deg, transparent, rgba(88, 255, 210, 0.1), transparent);
  height: 34%;
  animation: neoScan 7s linear infinite;
  opacity: 0.65;
}

.neo-hero-grid {
  width: min(1320px, 100%);
  grid-template-columns: minmax(0, 0.9fr) minmax(460px, 0.82fr);
  gap: clamp(30px, 5vw, 80px);
}

.neo-copy h1 {
  max-width: none;
  margin-top: 12px;
  color: #fff;
  font-size: 96px;
  line-height: 0.94;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 0 38px rgba(88, 255, 210, 0.22);
}

.neo-copy .eyebrow {
  color: #58ffd2;
}

.neo-copy .lead {
  max-width: 660px;
  color: rgba(244, 251, 255, 0.78);
  font-size: 19px;
  line-height: 1.86;
}

.neo-primary,
.neo-ghost {
  border-radius: 8px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}

.neo-primary {
  background: linear-gradient(135deg, #58ffd2, #67b7ff);
  color: #03101d;
  box-shadow: 0 0 34px rgba(88, 255, 210, 0.24);
}

.neo-ghost {
  border: 1px solid rgba(244, 251, 255, 0.2);
  background: rgba(244, 251, 255, 0.08);
  color: #fff;
}

.neo-metrics {
  width: min(620px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.neo-metrics article {
  padding: 14px 16px;
  border: 1px solid rgba(244, 251, 255, 0.14);
  border-radius: 8px;
  background: rgba(244, 251, 255, 0.06);
}

.neo-metrics strong {
  display: block;
  color: #58ffd2;
  font-size: 28px;
  line-height: 1;
}

.neo-metrics span {
  display: block;
  margin-top: 8px;
  color: rgba(244, 251, 255, 0.62);
  font-size: 13px;
}

.neo-console {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(88, 255, 210, 0.22);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(244, 251, 255, 0.13), rgba(244, 251, 255, 0.05)),
    rgba(5, 13, 28, 0.84);
  box-shadow: 0 38px 110px rgba(0, 0, 0, 0.44), 0 0 44px rgba(88, 255, 210, 0.12);
  backdrop-filter: blur(20px);
}

.neo-console::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(88, 255, 210, 0.1), transparent);
  transform: translateX(-100%);
  animation: neoSweep 5.8s ease-in-out infinite;
}

.neo-console-top {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(244, 251, 255, 0.12);
}

.neo-console-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff6b6b;
}

.neo-console-top span:nth-child(2) {
  background: #ffb85c;
}

.neo-console-top span:nth-child(3) {
  background: #58ffd2;
}

.neo-console-top strong {
  margin-left: auto;
  color: rgba(244, 251, 255, 0.72);
  font-size: 12px;
  text-transform: uppercase;
}

.neo-preview {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
}

.neo-art-frame {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(244, 251, 255, 0.14);
  background: #091422;
  aspect-ratio: 16 / 10;
}

.neo-art-image {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 70% 24%, rgba(88, 255, 210, 0.28), transparent 24%),
    linear-gradient(180deg, rgba(3, 7, 17, 0.06), rgba(3, 7, 17, 0.36)),
    url("https://images.unsplash.com/photo-1519608487953-e999c86e7455?auto=format&fit=crop&w=1400&q=88") center / cover;
  filter: saturate(1.35) contrast(1.12);
  transform: scale(1.01);
}

.neo-art-hud {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.neo-art-hud span,
.prompt-label,
.neo-pipeline span {
  border: 1px solid rgba(88, 255, 210, 0.22);
  border-radius: 999px;
  background: rgba(3, 7, 17, 0.72);
  color: #58ffd2;
  font-size: 12px;
  font-weight: 800;
}

.neo-art-hud span {
  padding: 7px 10px;
}

.neo-prompt-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(244, 251, 255, 0.12);
  border-radius: 8px;
  background: rgba(3, 7, 17, 0.58);
}

.prompt-label {
  width: max-content;
  padding: 6px 10px;
}

.neo-prompt-panel p {
  color: rgba(244, 251, 255, 0.78);
  line-height: 1.72;
}

.neo-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(244, 251, 255, 0.12);
}

.neo-progress span {
  display: block;
  width: 68%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #58ffd2, #67b7ff, #ffb85c);
  animation: neoPulse 2.4s ease-in-out infinite;
}

.neo-pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: rgba(244, 251, 255, 0.09);
}

.neo-pipeline span {
  border: 0;
  border-radius: 0;
  padding: 15px 8px;
  background: rgba(88, 255, 210, 0.07);
  text-align: center;
  color: rgba(244, 251, 255, 0.82);
}

.neo-main {
  padding: 30px clamp(18px, 4vw, 64px) 74px;
  background:
    linear-gradient(180deg, #030711, #071423);
}

.neo-feature-strip {
  width: min(1320px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.neo-feature-strip article {
  padding: 24px;
  border: 1px solid rgba(244, 251, 255, 0.13);
  border-radius: 8px;
  background: rgba(244, 251, 255, 0.06);
}

.neo-feature-strip span {
  color: #ffb85c;
  font-weight: 900;
}

.neo-feature-strip h2 {
  margin-top: 16px;
  color: #fff;
}

.neo-feature-strip p {
  margin-top: 10px;
  color: rgba(244, 251, 255, 0.66);
  line-height: 1.76;
}

@keyframes neoScan {
  0% {
    transform: translateY(-40%);
  }
  100% {
    transform: translateY(240%);
  }
}

@keyframes neoSweep {
  0%,
  46% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes neoPulse {
  0%,
  100% {
    opacity: 0.64;
  }
  50% {
    opacity: 1;
  }
}

@media (max-width: 1120px) {
  .neo-feature-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .neo-feature-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1120px) {
  .neo-hero-grid {
    grid-template-columns: 1fr;
  }

  .neo-copy h1 {
    font-size: 74px;
  }

  .neo-console {
    width: min(720px, 100%);
  }
}

@media (max-width: 720px) {
  .neo-nav {
    position: absolute;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
  }

  .neo-nav .nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    font-size: 13px;
  }

  .neo-hero {
    min-height: auto;
    padding: 106px 16px 34px;
  }

  .neo-copy h1 {
    font-size: 52px;
    line-height: 1;
  }

  .neo-copy .lead {
    font-size: 16px;
  }

  .neo-metrics,
  .neo-feature-strip,
  .neo-pipeline {
    grid-template-columns: 1fr;
  }

  .neo-console-top strong {
    display: none;
  }

  .neo-preview {
    padding: 12px;
  }
}

/* AI PPT workspace */
.ppt-coming-soon-workspace {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px;
  background:
    linear-gradient(120deg, rgba(245, 243, 238, 0.92), rgba(245, 243, 238, 0.72)),
    radial-gradient(circle at 20% 20%, rgba(31, 138, 91, 0.24), transparent 30%),
    radial-gradient(circle at 82% 70%, rgba(216, 110, 63, 0.2), transparent 28%),
    #f5f3ee;
  overflow: hidden;
}

.ppt-coming-soon-hero {
  position: relative;
  width: min(920px, 100%);
  min-height: 520px;
  display: grid;
  align-content: center;
  gap: 24px;
  padding: 64px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 253, 250, 0.82)),
    #fffdfa;
  border: 1px solid var(--hairline);
  box-shadow: 0 30px 90px rgba(20, 20, 20, 0.12);
}

.ppt-coming-soon-hero::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(31, 138, 91, 0.18);
  border-radius: 8px;
  pointer-events: none;
}

.ppt-coming-soon-hero::after {
  content: "PPT";
  position: absolute;
  right: 46px;
  bottom: 30px;
  color: rgba(31, 138, 91, 0.08);
  font-size: clamp(96px, 14vw, 180px);
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.ppt-coming-soon-hero h1 {
  max-width: none;
  margin: 0;
  color: var(--ink);
  font-size: clamp(54px, 8vw, 104px);
  line-height: 0.95;
  letter-spacing: 0;
}

.ppt-coming-soon-copy {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0;
  color: var(--soft-text);
  font-size: 18px;
  line-height: 1.9;
}

.ppt-coming-soon-grid {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ppt-coming-soon-grid span {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(31, 138, 91, 0.1);
  border: 1px solid rgba(31, 138, 91, 0.18);
  color: var(--green);
  font-weight: 800;
}

.ppt-coming-soon-link {
  position: relative;
  z-index: 1;
  width: fit-content;
  text-decoration: none;
}

.ppt-workspace {
  width: min(1680px, 100%);
  padding: 28px;
}

.ppt-builder {
  display: grid;
  grid-template-columns: minmax(380px, 480px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.ppt-panel {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  padding: 22px;
}

.ppt-controls {
  position: sticky;
  top: 24px;
}

.ppt-controls h1 {
  max-width: none;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: 0;
}

.ppt-mode-tabs,
.ppt-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ppt-mode-tabs {
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 8px;
  background: var(--surface-2);
}

.ppt-mode-tabs .mode-tab {
  flex: 1;
  min-width: 110px;
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
}

.ppt-mode-tabs .mode-tab.active {
  background: var(--ink);
  color: #fff;
}

.ppt-upload-box,
.ppt-settings,
.ppt-session-wrap,
.ppt-chat {
  margin-top: 16px;
  padding: 14px;
  border-radius: 8px;
  background: #fbfaf7;
  color: var(--ink);
  border: 1px solid var(--hairline);
}

.ppt-page .field span,
.ppt-page .field-note,
.ppt-page .status,
.ppt-page .empty-copy,
.ppt-page .range-row,
.ppt-page .ppt-nav,
.ppt-page .ppt-sessions button span,
.ppt-page .ppt-thumb span {
  color: var(--ink);
}

.ppt-page textarea,
.ppt-page input[type="text"],
.ppt-page input[type="password"],
.ppt-page select,
.ppt-page input[type="file"] {
  background: #fbfaf7;
  color: var(--ink);
  border-color: rgba(0, 0, 0, 0.16);
}

.ppt-page textarea::placeholder,
.ppt-page input::placeholder {
  color: #1f1f1f;
  opacity: 0.72;
}

.ppt-page .ghost-btn {
  border: 1px solid rgba(0, 0, 0, 0.16);
  background: #eeeeea;
  color: var(--ink);
}

.ppt-page .primary-btn {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
}

.ppt-settings {
  display: grid;
  gap: 4px;
}

.ppt-session-wrap strong {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
}

.ppt-sessions {
  display: grid;
  gap: 8px;
}

.ppt-sessions button {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ppt-sessions button strong,
.ppt-sessions button span {
  display: block;
}

.ppt-sessions button span {
  margin-top: 4px;
  color: var(--ink);
  font-size: 12px;
}

.ppt-preview-panel h2 {
  max-width: 28ch;
  color: var(--ink);
}

.ppt-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
}

.ppt-nav .ghost-btn {
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
}

.ppt-nav .ghost-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.ppt-editor-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.ppt-editor-bar .ghost-btn,
.ppt-chat .primary-btn {
  border-radius: 6px;
}

.ppt-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #0a0d16;
}

.ppt-presenting .app-sidebar,
.ppt-presenting .ppt-controls,
.ppt-presenting .ppt-preview-panel > .section-top,
.ppt-presenting .ppt-editor-bar,
.ppt-presenting .ppt-thumbs,
.ppt-presenting .ppt-chat {
  display: none !important;
}

.ppt-presenting .ppt-workspace,
.ppt-presenting .ppt-builder,
.ppt-presenting .ppt-preview-panel {
  width: 100vw;
  height: 100vh;
  padding: 0;
  display: block;
  border: 0;
  box-shadow: none;
}

.ppt-presenting .ppt-stage {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  aspect-ratio: auto;
}

.ppt-slide {
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
  padding: clamp(28px, 5vw, 64px);
  color: #fff;
  background:
    radial-gradient(circle at 78% 22%, color-mix(in srgb, var(--ppt-a) 34%, transparent), transparent 26%),
    radial-gradient(circle at 16% 78%, color-mix(in srgb, var(--ppt-b) 24%, transparent), transparent 28%),
    linear-gradient(135deg, #080b14, var(--ppt-c));
}

.ppt-export-canvas .ppt-slide,
.ppt-presenting .ppt-slide {
  width: 1280px;
  height: 720px;
}

.ppt-slide.active,
.ppt-export .ppt-slide {
  display: block;
}

.ppt-slide-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.88), transparent);
}

.ppt-slide-head,
.ppt-slide-body {
  position: relative;
  z-index: 1;
}

.ppt-slide-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: color-mix(in srgb, var(--ppt-a) 72%, #fff);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.ppt-slide-head em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.55);
}

.ppt-slide-body {
  width: min(820px, 86%);
  margin-top: clamp(36px, 8vw, 92px);
}

.ppt-slide-body h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 5.5vw, 76px);
  line-height: 1;
  letter-spacing: 0;
}

.ppt-slide-body p {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.74);
  font-size: clamp(16px, 2vw, 24px);
  line-height: 1.55;
}

.ppt-slide-body ul {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.ppt-slide-body li {
  position: relative;
  padding-left: 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(14px, 1.5vw, 19px);
  line-height: 1.55;
}

.ppt-slide-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ppt-a);
  box-shadow: 0 0 18px var(--ppt-a);
}

.ppt-editable {
  outline: 1px solid transparent;
  outline-offset: 4px;
  border-radius: 4px;
  resize: both;
}

.ppt-editable:hover {
  outline-color: rgba(255, 255, 255, 0.22);
}

.ppt-editable.selected {
  outline-color: var(--ppt-a);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ppt-a) 18%, transparent);
}

.ppt-chart {
  display: flex;
  align-items: end;
  gap: 12px;
  width: min(420px, 80%);
  height: 120px;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.ppt-chart span {
  flex: 1;
  min-height: 18px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--ppt-a), var(--ppt-b));
}

.ppt-formula {
  width: max-content;
  max-width: 80%;
  margin-top: 22px;
  padding: 14px 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: clamp(22px, 3vw, 38px);
  font-family: "Cambria Math", "Times New Roman", serif;
}

.ppt-slide.active .fade-up {
  animation: pptFadeUp 520ms ease both;
}

.ppt-slide.active .zoom-in {
  animation: pptZoomIn 520ms ease both;
}

.ppt-slide.active .stagger {
  animation: pptFadeUp 480ms ease both;
}

.ppt-slide.active li.stagger:nth-child(1) {
  animation-delay: 80ms;
}

.ppt-slide.active li.stagger:nth-child(2) {
  animation-delay: 160ms;
}

.ppt-slide.active li.stagger:nth-child(3) {
  animation-delay: 240ms;
}

.ppt-slide.active li.stagger:nth-child(4) {
  animation-delay: 320ms;
}

.ppt-slide.minimal {
  color: #151515;
  background: linear-gradient(135deg, #f8f6ef, #e8e1d4);
}

.ppt-slide.minimal .ppt-slide-head,
.ppt-slide.minimal .ppt-slide-body h2,
.ppt-slide.minimal .ppt-slide-body li {
  color: #151515;
}

.ppt-slide.minimal .ppt-slide-body p {
  color: #5b574f;
}

.ppt-slide.minimal .ppt-chart,
.ppt-slide.minimal .ppt-formula {
  background: rgba(0, 0, 0, 0.06);
  color: #151515;
  border-color: rgba(0, 0, 0, 0.12);
}

.ppt-slide.warm {
  background:
    radial-gradient(circle at 80% 18%, rgba(255, 184, 92, 0.32), transparent 28%),
    linear-gradient(135deg, #21120d, #7e2c18);
}

@keyframes pptFadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pptZoomIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

.ppt-thumb {
  min-height: 64px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 10px;
  background: #fbfaf7;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.ppt-thumb span {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 11px;
}

.ppt-thumb.active {
  border-color: rgba(31, 138, 91, 0.45);
  background: rgba(31, 138, 91, 0.08);
}

.ppt-export {
  margin: 0;
  background: #fff;
}

.ppt-export .ppt-slide {
  position: relative;
  width: 100vw;
  height: 56.25vw;
  page-break-after: always;
}

@media (max-width: 1120px) {
  .ppt-builder {
    grid-template-columns: 1fr;
  }

  .ppt-controls {
    position: static;
  }
}

@media (max-width: 720px) {
  .ppt-coming-soon-workspace {
    padding: 18px;
  }

  .ppt-coming-soon-hero {
    min-height: 460px;
    padding: 34px 24px;
  }

  .ppt-coming-soon-copy {
    font-size: 16px;
  }

  .ppt-workspace {
    padding: 18px;
  }

  .ppt-panel {
    padding: 18px;
  }

  .ppt-stage {
    aspect-ratio: 4 / 3;
  }

  .ppt-slide {
    padding: 22px;
  }

  .ppt-slide-body {
    width: 100%;
    margin-top: 42px;
  }

  .ppt-thumbs {
    grid-template-columns: 1fr;
  }

  .ppt-nav {
    flex-wrap: wrap;
  }
}

@media print {
  .ppt-page .app-sidebar,
  .ppt-page .ppt-controls,
  .ppt-page .section-top,
  .ppt-page .ppt-thumbs {
    display: none !important;
  }

  .ppt-page {
    display: block;
    background: #fff;
  }

  .ppt-workspace,
  .ppt-preview-panel {
    width: 100%;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .ppt-stage {
    display: block;
    overflow: visible;
    aspect-ratio: auto;
  }

  .ppt-stage .ppt-slide {
    position: relative;
    display: block;
    width: 100vw;
    height: 56.25vw;
    border-radius: 0;
    page-break-after: always;
  }
}

@media (max-width: 1100px) {
  .refined-app .chat-workspace {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .refined-app .chat-layout {
    height: auto;
    grid-template-columns: 1fr;
  }

  .refined-app .chat-shell {
    min-height: 72vh;
  }

  .refined-app .chat-history-panel {
    min-height: 280px;
  }
}

@media (max-width: 720px) {
  .refined-app .chat-workspace {
    padding: 14px;
  }

  .refined-app .chat-topbar {
    align-items: flex-start;
    padding: 18px;
  }

  .refined-app .chat-topbar h1 {
    font-size: 26px;
  }

  .refined-app .chat-messages {
    padding: 16px;
  }

  .refined-app .chat-message {
    max-width: 100%;
  }

  .refined-app .chat-composer {
    margin: 10px 14px 14px;
    grid-template-columns: 1fr;
  }

  .refined-app .chat-tool-row {
    grid-template-columns: repeat(2, 46px);
  }

  .refined-app .chat-send-btn {
    width: 100%;
    height: 48px;
    min-height: 48px;
  }
}
