@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=Noto+Sans+SC:wght@300;400;500;600;700;800&display=swap");

:root {
  --bg: #080b12;
  --bg-mid: #0d1320;
  --bg-deep: #05070d;
  --panel: rgba(12, 17, 30, 0.72);
  --panel-strong: rgba(14, 20, 34, 0.92);
  --panel-soft: rgba(14, 19, 32, 0.74);
  --surface-1: rgba(10, 15, 27, 0.9);
  --surface-2: rgba(7, 10, 21, 0.96);
  --surface-3: rgba(13, 18, 33, 0.78);
  --stroke: rgba(100, 130, 200, 0.18);
  --stroke-strong: rgba(160, 187, 255, 0.1);
  --stroke-glow: rgba(56, 217, 255, 0.42);
  --accent: #38d9ff;
  --accent-2: #6d7dff;
  --accent-3: #c98b35;
  --brand-amber: #cf943c;
  --brand-amber-soft: #ebbb69;
  --brand-amber-glow: rgba(207, 148, 60, 0.22);
  --success: #64f2bf;
  --warning: #e5b15c;
  --text: #f5f8ff;
  --muted: #a8b6cf;
  --muted-strong: #c9d3e6;
  --shadow: 0 24px 64px rgba(2, 4, 10, 0.7);
  --panel-shadow: 0 28px 80px rgba(2, 4, 12, 0.58);
  --glass-fill:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008)),
    linear-gradient(160deg, rgba(12, 17, 34, 0.94), rgba(8, 12, 24, 0.97));
  --glass-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    0 18px 42px rgba(0, 0, 0, 0.42);
  --glass-edge: rgba(255, 255, 255, 0.09);
  --glass-edge-top: rgba(255, 255, 255, 0.18);
  --glass-edge-btm: rgba(0, 0, 0, 0.18);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --ease-system: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 180ms;
  --dur-mid: 420ms;
  --dur-slow: 760ms;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  background: var(--bg);
  background-color: var(--bg);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", "Noto Sans SC", sans-serif;
  color: var(--text);
  overflow-x: hidden;
  overflow-y: auto;
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 120% 72% at 50% -8%, rgba(16, 26, 48, 0.98) 0%, rgba(8, 12, 22, 0.18) 58%, transparent 76%),
    radial-gradient(ellipse 84% 54% at 6% 96%, rgba(10, 24, 40, 0.82) 0%, transparent 62%),
    radial-gradient(ellipse 72% 48% at 94% 88%, rgba(18, 12, 34, 0.72) 0%, transparent 58%),
    linear-gradient(180deg, #070910 0%, #090d17 32%, #070911 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: 0;
  background:
    radial-gradient(circle at 22% 30%, rgba(56, 217, 255, 0.04), transparent 34%),
    radial-gradient(circle at 76% 30%, rgba(109, 125, 255, 0.046), transparent 36%),
    radial-gradient(circle at 58% 18%, rgba(207, 148, 60, 0.026), transparent 22%),
    radial-gradient(circle at 34% 76%, rgba(56, 217, 255, 0.026), transparent 30%),
    radial-gradient(circle at 74% 72%, rgba(109, 125, 255, 0.025), transparent 32%);
  filter: blur(8px);
  animation: ambientDrift 26s ease-in-out infinite;
}

body::after {
  z-index: 1;
  background: radial-gradient(
    circle 260px at var(--cursor-x, 50%) var(--cursor-y, 50%),
    rgba(56, 217, 255, 0.024),
    rgba(109, 125, 255, 0.01) 42%,
    transparent 76%
  );
  transition: background var(--dur-fast) linear;
}

#bg-canvas,
.bg-noise,
.bg-orbit,
.bg-orbit-2,
.bg-grid {
  transform: translate3d(var(--layer-x, 0px), var(--layer-y, 0px), 0);
  will-change: transform;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: screen;
  filter: blur(10px) saturate(1.08);
}

.bg-orbit {
  position: fixed;
  inset: -30% -15% auto auto;
  width: 82vh;
  height: 82vh;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 217, 255, 0.16), rgba(56, 217, 255, 0.04) 34%, transparent 70%);
  filter: blur(32px);
  z-index: 0;
  opacity: 0.13;
  animation: orbitDrift 30s ease-in-out infinite;
}

.bg-orbit-2 {
  position: fixed;
  inset: auto auto -20% -10%;
  width: 72vh;
  height: 72vh;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 125, 255, 0.16), rgba(109, 125, 255, 0.04) 36%, transparent 72%);
  filter: blur(34px);
  z-index: 0;
  opacity: 0.12;
  animation: orbitDrift 34s ease-in-out infinite reverse;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(80, 110, 180, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 110, 180, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.09;
  animation: gridDrift 30s ease-in-out infinite;
}

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.shell {
  position: relative;
  z-index: 2;
  width: min(1280px, 95vw);
  margin: 0 auto;
  min-height: 100vh;
}

.view {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-mid) var(--ease-soft);
}

.view--active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
}

.wope-border {
  position: relative;
  isolation: isolate;
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 1px 0 var(--glass-edge-top),
    inset 0 -1px 0 var(--glass-edge-btm),
    inset 1px 0 0 var(--glass-edge),
    inset -1px 0 0 rgba(0, 0, 0, 0.1),
    0 0 0 0.5px rgba(255, 255, 255, 0.05),
    0 2px 12px rgba(0, 0, 0, 0.32);
}

.wope-border::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.02) 30%,
    rgba(56, 217, 255, 0.08) 55%,
    rgba(255, 255, 255, 0.03) 75%,
    rgba(217, 162, 74, 0.08)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0.7;
  pointer-events: none;
}

.wope-border::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 18%, rgba(255, 255, 255, 0.035) 26%, transparent 36%) no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.02), transparent 14%, transparent 86%, rgba(255, 255, 255, 0.02));
  background-size: 180% 100%, 100% 100%;
  background-position: 180% 0, 0 0;
  opacity: 0.55;
  transition:
    opacity var(--dur-mid) var(--ease-system),
    background-position var(--dur-slow) var(--ease-system);
}

#login-view.view--active {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-direction: column;
  gap: 18px;
}

.login-logo img {
  width: 72px;
  height: auto;
  display: block;
  filter:
    drop-shadow(0 8px 14px rgba(0, 0, 0, 0.2))
    drop-shadow(0 0 8px rgba(56, 217, 255, 0.06));
}

#app-view {
  min-height: 100vh;
}

.login-card {
  position: relative;
  width: min(420px, 92vw);
  margin: 0;
  padding: 36px 36px 32px;
  border-radius: var(--radius-lg);
  background: #0c1020;
  box-shadow:
    0 0 0 1px rgba(56, 217, 255, 0.08),
    0 40px 80px rgba(2, 4, 12, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: cardEnter 0.6s var(--ease-system) both;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.brand-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-sub,
.field,
.section-note,
.upload-status,
.chat-header p {
  color: var(--muted);
}

.brand-sub {
  margin-top: 4px;
  font-size: 14px;
}

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

.field {
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.field input,
.composer input {
  outline: none;
  color: var(--text);
}

.field input {
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(100, 130, 200, 0.28);
  background: rgba(6, 9, 18, 0.65);
  transition: border var(--dur-fast), box-shadow var(--dur-mid);
}

.field input:focus {
  border-color: rgba(56, 217, 255, 0.75);
  box-shadow: 0 0 0 3px rgba(56, 217, 255, 0.14), inset 0 0 0 1px rgba(56, 217, 255, 0.2);
}

.btn-primary,
.ghost-btn,
.icon-btn,
.nav-item,
.send-btn,
.upload-btn,
.output-tab {
  transition:
    transform var(--dur-fast) var(--ease-system),
    box-shadow var(--dur-mid) var(--ease-system),
    border-color var(--dur-mid) var(--ease-system),
    background-color var(--dur-mid) var(--ease-system),
    color var(--dur-fast) linear,
    opacity var(--dur-mid) var(--ease-system);
}

.btn-primary {
  position: relative;
  overflow: hidden;
  height: 48px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: #06111c;
  background:
    linear-gradient(90deg, #37bad8 0%, #5a89ea 52%, #c68835 100%);
  background-size: 155% 155%;
  box-shadow:
    0 8px 24px rgba(56, 217, 255, 0.2),
    0 0 16px rgba(198, 136, 53, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  animation: actionBreath 4.8s ease-in-out infinite;
}

.btn-primary::after,
.ghost-btn::after,
.icon-btn::after,
.output-tab::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: translateX(-140%);
  transition: transform 720ms var(--ease-system);
}

.btn-primary:hover,
.ghost-btn:hover,
.icon-btn:hover,
.send-btn:hover,
.output-tab:hover {
  transform: translateY(-1px);
}

.btn-primary:hover {
  box-shadow:
    0 10px 22px rgba(56, 217, 255, 0.22),
    0 0 18px rgba(207, 148, 60, 0.1);
}

.btn-primary:hover::after,
.ghost-btn:hover::after,
.icon-btn:hover::after,
.output-tab:hover::after {
  transform: translateX(140%);
}

.btn-primary:active,
.ghost-btn:active,
.icon-btn:active,
.send-btn:active {
  transform: translateY(0);
}

.login-links {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.link-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.link-btn:hover {
  color: var(--accent);
}

.topbar {
  --liquid-x: 50%;
  --liquid-y: 50%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 22px;
  border-radius: 22px;
  background:
    radial-gradient(circle 180px at var(--liquid-x) var(--liquid-y), rgba(255, 255, 255, 0.085), transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.048), rgba(255, 255, 255, 0.012)),
    linear-gradient(180deg, rgba(13, 19, 34, 0.9), rgba(8, 12, 23, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15),
    inset 1px 0 0 rgba(255, 255, 255, 0.08),
    inset -1px 0 0 rgba(0, 0, 0, 0.08),
    0 0 0 0.5px rgba(255, 255, 255, 0.05),
    0 16px 40px rgba(2, 4, 10, 0.46);
  backdrop-filter: blur(22px) saturate(1.08);
}

.topbar--fixed {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1280px, 95vw);
  z-index: 6;
}

.brand-mini {
  --shine-x: 50%;
  --shine-y: 50%;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle 120px at var(--shine-x) var(--shine-y), rgba(255, 255, 255, 0.09), transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012)),
    rgba(9, 13, 24, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(2, 4, 10, 0.22);
  font-size: 16px;
  font-weight: 700;
  transition:
    transform var(--dur-fast) var(--ease-system),
    border-color var(--dur-mid) var(--ease-system),
    box-shadow var(--dur-mid) var(--ease-system),
    background-position var(--dur-mid) var(--ease-system);
}

.brand-dot,
.status-dot,
.dot {
  border-radius: 50%;
}

.brand-dot {
  width: 11px;
  height: 11px;
  background:
    radial-gradient(circle at 34% 34%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.16) 28%, transparent 32%),
    linear-gradient(135deg, #38c1df 0%, #6488ef 58%, #c58a38 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 14px rgba(56, 217, 255, 0.2),
    0 0 20px rgba(198, 136, 53, 0.08);
  animation: statusBreath 4.8s ease-in-out infinite;
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: center;
}

.nav-item {
  --shine-x: 50%;
  --shine-y: 50%;
  position: relative;
  border: none;
  overflow: hidden;
  border: 1px solid transparent;
  background:
    radial-gradient(circle 110px at var(--shine-x) var(--shine-y), rgba(255, 255, 255, 0.08), transparent 74%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008)),
    rgba(12, 17, 30, 0.12);
  color: var(--muted);
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 16px rgba(2, 4, 10, 0);
}

.nav-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  background: linear-gradient(90deg, rgba(56, 217, 255, 0.22), rgba(109, 125, 255, 0.18)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--dur-mid) var(--ease-system);
}

.nav-item::after,
.icon-btn::before,
.brand-mini::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 18%, rgba(255, 255, 255, 0.1) 32%, transparent 46%) no-repeat,
    radial-gradient(circle at var(--shine-x, 50%) var(--shine-y, 50%), rgba(255, 255, 255, 0.08), transparent 72%);
  background-size: 180% 100%, 100% 100%;
  background-position: 150% 0, 0 0;
  opacity: 0.72;
  transition:
    background-position var(--dur-slow) var(--ease-system),
    opacity var(--dur-mid) var(--ease-system);
}

.nav-item:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(circle 110px at var(--shine-x) var(--shine-y), rgba(255, 255, 255, 0.1), transparent 74%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012)),
    rgba(56, 217, 255, 0.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 18px rgba(2, 4, 10, 0.18);
}

.nav-item--active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(circle 120px at var(--shine-x) var(--shine-y), rgba(255, 255, 255, 0.11), transparent 72%),
    linear-gradient(90deg, rgba(56, 217, 255, 0.1), rgba(109, 125, 255, 0.09));
  box-shadow:
    inset 0 0 0 1px rgba(56, 217, 255, 0.14),
    0 10px 20px rgba(2, 4, 10, 0.2),
    0 0 12px rgba(56, 217, 255, 0.05);
}

.nav-item--active::before,
.nav-item:hover::before,
.nav-item--active::after,
.nav-item:hover::after {
  opacity: 1;
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.icon-btn {
  --shine-x: 50%;
  --shine-y: 50%;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(100, 130, 200, 0.28);
  background:
    radial-gradient(circle 120px at var(--shine-x) var(--shine-y), rgba(255, 255, 255, 0.08), transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
    rgba(10, 14, 24, 0.52);
  color: var(--text);
  font-size: 12px;
  padding: 10px 16px;
  cursor: pointer;
}

.icon-btn .dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  animation: statusPulse 3.2s ease-in-out infinite;
}

.icon-btn:hover {
  border-color: rgba(56, 217, 255, 0.36);
  box-shadow: 0 0 0 1px rgba(56, 217, 255, 0.08), 0 8px 20px rgba(2, 4, 10, 0.28);
}

.icon-btn:hover::before,
.brand-mini:hover::before {
  background-position: -30% 0, 0 0;
}

.brand-mini:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 12px 28px rgba(2, 4, 10, 0.24);
}

.icon-btn.ghost {
  color: var(--muted);
}

.app-surface {
  display: none;
  min-height: 100vh;
}

.app-surface--active {
  display: block;
}

#home-surface {
  padding-top: 110px;
  padding-bottom: 84px;
}

.hero {
  position: relative;
  min-height: calc(100vh - 92px);
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  padding: 8px 0 28px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 8% 18% auto 18%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1) 18%,
    rgba(207, 148, 60, 0.16) 50%,
    rgba(255, 255, 255, 0.08) 82%,
    transparent
  );
  opacity: 0.6;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 6% 10% 4%;
  border-radius: 36px;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.03), transparent 22%),
    radial-gradient(circle at 18% 72%, rgba(56, 217, 255, 0.05), transparent 24%),
    radial-gradient(circle at 82% 28%, rgba(109, 125, 255, 0.038), transparent 24%),
    radial-gradient(circle at 52% 16%, rgba(207, 148, 60, 0.028), transparent 22%),
    linear-gradient(rgba(255, 255, 255, 0.026), transparent 16%, transparent 84%, rgba(255, 255, 255, 0.018));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  opacity: 0.95;
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--glow-x, 50%) var(--glow-y, 42%), rgba(56, 217, 255, 0.08), transparent 16%),
    radial-gradient(circle at 62% 34%, rgba(109, 125, 255, 0.052), transparent 22%),
    radial-gradient(circle at 48% 26%, rgba(207, 148, 60, 0.04), transparent 18%),
    linear-gradient(180deg, rgba(8, 12, 24, 0) 0%, rgba(8, 11, 20, 0.62) 100%);
  filter: blur(24px);
  opacity: 0.94;
  animation: glowPulse 20s ease-in-out infinite;
}

.hero-orb {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(68px);
  opacity: 0.07;
  animation: orbFloat 26s ease-in-out infinite;
}

.hero-orb--one {
  left: 4%;
  top: 12%;
  background: radial-gradient(circle, rgba(56, 217, 255, 0.2), rgba(56, 217, 255, 0.04) 34%, transparent 72%);
}

.hero-orb--two {
  right: 4%;
  bottom: 6%;
  background: radial-gradient(circle, rgba(109, 125, 255, 0.16), rgba(207, 148, 60, 0.06) 36%, transparent 74%);
  animation-direction: reverse;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1140px, 93vw);
}

.hero-main > * {
  opacity: 0;
  animation: heroEnter 0.9s var(--ease-system) both;
}

.hero-main--centered {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
  padding: 40px 0 26px;
  position: relative;
  backdrop-filter: blur(2px);
}

.hero-main--centered::before,
.hero-main--centered::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.hero-main--centered::before {
  top: 4px;
  width: min(440px, 64vw);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.06) 24%,
    rgba(207, 148, 60, 0.16) 50%,
    rgba(255, 255, 255, 0.05) 76%,
    transparent
  );
  opacity: 0;
  animation: awakenLine 1.6s var(--ease-system) 0.28s forwards;
}

.hero-main--centered::after {
  top: -24px;
  width: min(360px, 50vw);
  height: 150px;
  background: radial-gradient(circle at 50% 100%, rgba(207, 148, 60, 0.08), transparent 70%);
  filter: blur(28px);
  opacity: 0;
  animation: awakenGlow 1.8s var(--ease-system) 0.15s forwards;
}

.hero-main--centered .hero-logo,
.hero-main--centered .hero-tag,
.hero-main--centered h1,
.hero-main--centered .hero-sub,
.hero-main--centered .hero-actions,
.hero-main--centered .marquee-wrap {
  position: relative;
  z-index: 2;
}

.hero-logo img {
  width: 72px;
  height: auto;
  display: block;
  margin: 0 auto 18px;
  filter:
    drop-shadow(0 8px 14px rgba(0, 0, 0, 0.2))
    drop-shadow(0 0 8px rgba(56, 217, 255, 0.045));
}

.hero-tag,
.panel-kicker,
.section-kicker,
.output-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.12em;
}

.hero-tag,
.panel-kicker,
.section-kicker {
  margin: 0 0 10px;
  font-size: 10px;
  color: var(--brand-amber-soft);
}

.hero-tag {
  padding: 3px 10px;
  border-radius: 999px;
  overflow: visible;
  border: 1px solid rgba(207, 148, 60, 0.18);
  background:
    radial-gradient(circle 128px at 50% 50%, rgba(255, 255, 255, 0.045), transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.062), rgba(255, 255, 255, 0.014)),
    linear-gradient(120deg, rgba(207, 148, 60, 0.05), rgba(10, 14, 24, 0.17) 54%),
    rgba(10, 14, 24, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.075),
    0 8px 16px rgba(0, 0, 0, 0.16),
    0 0 0 1px rgba(207, 148, 60, 0.03);
  animation: none;
}

.hero-tag--single {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 184, 102, 0.2);
  background: linear-gradient(
    180deg,
    rgba(30, 20, 14, 0.34) 0%,
    rgba(14, 12, 18, 0.22) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 180, 0.08),
    0 0 0 1px rgba(255, 170, 90, 0.04),
    0 10px 30px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  white-space: nowrap;
  overflow: visible;
  max-width: none;
  mix-blend-mode: normal;
  opacity: 1;
  transform: none;
  animation: none;
}

.hero-tag__line {
  position: relative;
  z-index: 2;
  display: inline-block;
  white-space: nowrap;
  color: rgba(255, 244, 228, 0.96);
  -webkit-text-fill-color: rgba(255, 244, 228, 0.96);
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.16em;
  font-weight: 500;
  mix-blend-mode: normal;
  opacity: 1;
  filter: none;
  text-shadow:
    0 0 10px rgba(255, 170, 90, 0.14),
    0 0 24px rgba(255, 120, 70, 0.08);
  animation: none;
}

.hero-tag__line::before,
.hero-tag__line::after {
  content: none;
}

.hero-content h1 {
  max-width: 720px;
  margin: 0 auto 16px;
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: #f7fbff;
  text-shadow:
    0 12px 40px rgba(0, 0, 0, 0.36),
    0 4px 24px rgba(56, 217, 255, 0.08),
    0 0 24px rgba(255, 255, 255, 0.03);
}

.word-reveal {
  display: inline-block;
  opacity: 0;
  transform: translateY(18px);
  animation: wordUp 0.65s var(--ease-system) forwards;
}

.hero-sub {
  max-width: 560px;
  margin: 0 auto 34px;
  color: #cbd4e4;
  font-size: 14px;
  line-height: 1.9;
  text-wrap: balance;
  opacity: 0.92;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 22px;
}

.hero-btn {
  min-width: 180px;
}

.ghost-btn {
  position: relative;
  height: 44px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    linear-gradient(180deg, rgba(16, 22, 38, 0.7), rgba(8, 12, 22, 0.76));
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 28px rgba(0, 0, 0, 0.24);
}

.ghost-btn:hover {
  border-color: rgba(56, 217, 255, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 26px rgba(2, 4, 10, 0.3),
    0 0 0 1px rgba(56, 217, 255, 0.05);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(56, 217, 255, 0.038);
}

.marquee-wrap {
  width: 100%;
  overflow: hidden;
  max-width: 620px;
  margin: 0 auto 30px;
  opacity: 0.14;
  mask-image: linear-gradient(90deg, transparent 0%, #fff 8%, #fff 92%, transparent 100%);
}

.marquee-track {
  display: flex;
  white-space: nowrap;
  animation: marqueeScroll 34s linear infinite;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: rgba(210, 221, 241, 0.5);
}

.glass-card,
.capability-card,
.pipeline-shell,
.output-panel,
.log-panel,
.chat-shell {
  background: var(--glass-fill);
}

.glass-card,
.capability-card {
  --shine-x: 50%;
  --shine-y: 50%;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  padding: 18px 18px 16px;
  background:
    radial-gradient(circle 140px at var(--shine-x) var(--shine-y), rgba(255, 255, 255, 0.06), transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 22%),
    linear-gradient(160deg, rgba(12, 17, 34, 0.94), rgba(8, 12, 24, 0.97));
  box-shadow: var(--glass-shadow);
  transition:
    transform var(--dur-mid) var(--ease-system),
    box-shadow var(--dur-mid) var(--ease-system),
    border-color var(--dur-mid) var(--ease-system);
}

.system-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), transparent 24%),
    radial-gradient(circle 120px at var(--shine-x) var(--shine-y), rgba(255, 255, 255, 0.048), transparent 72%),
    linear-gradient(160deg, rgba(11, 16, 30, 0.96), rgba(7, 10, 20, 0.98));
  padding: 18px 18px 17px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.26),
    0 18px 36px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.03);
}

.system-card--primary {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.24),
    0 22px 44px rgba(0, 0, 0, 0.44),
    0 0 0 1px rgba(56, 217, 255, 0.1),
    0 0 22px rgba(56, 217, 255, 0.06);
}

.system-card::before {
  opacity: 1;
}

.system-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 18%, rgba(255, 255, 255, 0.06) 30%, transparent 42%) no-repeat,
    linear-gradient(90deg, rgba(56, 217, 255, 0.06), transparent 20%, transparent 78%, rgba(109, 125, 255, 0.05));
  background-size: 180% 100%, 100% 100%;
  background-position: 160% 0, 0 0;
  transition:
    background-position 900ms var(--ease-system),
    opacity var(--dur-mid) var(--ease-system);
  opacity: 0.88;
}

.capability-card::after,
.output-panel::after,
.log-panel::after,
.pipeline-shell::after,
.chat-shell::after {
  background-position: 160% 0, 0 0;
}

.system-card:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.26),
    0 20px 38px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(56, 217, 255, 0.1),
    0 0 18px rgba(56, 217, 255, 0.06);
}

.system-card:hover::after,
.capability-card:hover::after,
.output-panel:hover::after,
.log-panel:hover::after,
.pipeline-shell:hover::after,
.chat-shell:hover::after {
  background-position: -40% 0, 0 0;
}

.glass-card .card-head,
.capability-top,
.output-card__head,
.panel-heading,
.section-header,
.log-row,
.pipeline-step {
  display: flex;
}

.card-head,
.capability-top {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.glass-card span,
.capability-card p,
.output-card p,
.output-list li,
.script-block p,
.log-row p,
.pipeline-copy p {
  color: var(--muted);
}

.glass-card span:first-child,
.capability-meta span,
.output-label {
  font-size: 11px;
  color: rgba(206, 219, 238, 0.8);
}

.glass-card strong,
.capability-card h3,
.pipeline-copy h3,
.output-card strong,
.log-row strong,
.panel-heading h2,
.section-header h2 {
  color: var(--text);
}

.glass-card strong {
  display: block;
  margin-bottom: 7px;
  font-size: 16px;
  line-height: 1.4;
}

.glass-card small {
  font-size: 11px;
  line-height: 1.6;
  color: rgba(208, 216, 232, 0.86);
}

.system-card[data-state="active"] .status-pill,
.panel-status--active,
.pipeline-step--active .pipeline-state,
.status-dot--active {
  color: #9ee7ff;
}

.status-pill,
.panel-status,
.pipeline-state,
.output-tab {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(100, 130, 200, 0.22);
  background: rgba(255, 255, 255, 0.03);
  font-size: 11px;
  color: var(--muted-strong);
  letter-spacing: 0.02em;
}

.status-pill,
.panel-status,
.pipeline-state {
  padding: 5px 9px;
}

[data-state="ready"] .status-pill,
.panel-status--ready,
.status-dot--ready {
  border-color: rgba(100, 242, 191, 0.2);
  background: rgba(100, 242, 191, 0.06);
  color: #b8f7dd;
}

[data-state="synced"] .status-pill,
.status-dot--done {
  border-color: rgba(56, 217, 255, 0.22);
  background: rgba(56, 217, 255, 0.06);
  color: #b6ecff;
}

[data-state="active"] .status-pill,
.panel-status--active,
.pipeline-step--active .pipeline-state {
  border-color: rgba(124, 92, 255, 0.24);
  background: rgba(124, 92, 255, 0.08);
}

[data-state="stable"] .status-pill,
.panel-status--stable {
  border-color: rgba(217, 162, 74, 0.22);
  background: rgba(217, 162, 74, 0.08);
  color: #f4ce8b;
}

.panel-heading,
.section-header {
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

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

.panel-heading h2,
.section-header h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 0 rgba(56, 217, 255, 0.14);
}

.status-dot--active {
  background: #8fdcff;
  animation: statusPulse 3s ease-in-out infinite;
}

.status-dot--ready {
  background: #9be6c5;
  animation: statusPulse 3.4s ease-in-out infinite;
}

.status-dot--done {
  background: #7fd7ff;
}

.status-dot--pending {
  background: rgba(255, 255, 255, 0.3);
}

.system-section {
  position: relative;
  scroll-margin-top: 118px;
}

.section-header {
  margin-bottom: 14px;
}

.section-header--compact h2 {
  font-size: 19px;
  line-height: 1.28;
}

.section-note {
  max-width: 300px;
  margin: 0;
  font-size: 11px;
  line-height: 1.7;
  opacity: 0.66;
}

.pipeline-shell {
  display: grid;
  gap: 1px;
  padding: 10px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.01)),
    rgba(9, 13, 22, 0.54);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 12px 26px rgba(0, 0, 0, 0.22);
}

.pipeline-step {
  position: relative;
  align-items: center;
  gap: 18px;
  padding: 16px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.014);
  border: 1px solid rgba(255, 255, 255, 0.025);
}

.pipeline-step::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 14px;
  width: 4px;
  height: calc(100% - 22px);
  border-radius: 999px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
}

.pipeline-step--done::before {
  background: linear-gradient(180deg, rgba(100, 242, 191, 0.75), rgba(56, 217, 255, 0.38));
}

.pipeline-step--active::before {
  background: linear-gradient(180deg, rgba(56, 217, 255, 0.8), rgba(124, 92, 255, 0.48));
  box-shadow: 0 0 16px rgba(56, 217, 255, 0.22);
}

.pipeline-index {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 11, 20, 0.55);
  font-size: 13px;
  font-weight: 700;
  color: #e7efff;
}

.pipeline-copy {
  display: flex;
  flex: 1;
  gap: 8px;
  flex-direction: column;
}

.pipeline-copy h3,
.pipeline-copy p {
  margin: 0;
}

.pipeline-copy h3 {
  font-size: 14px;
  font-weight: 600;
}

.pipeline-copy p {
  font-size: 12px;
  line-height: 1.65;
  opacity: 0.8;
}

.system-section--split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.8fr);
  gap: 16px;
}

.output-panel,
.log-panel,
.chat-shell {
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 20px 48px rgba(0, 0, 0, 0.4);
}

.output-panel--featured {
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 18%),
    radial-gradient(circle at 82% 18%, rgba(56, 217, 255, 0.1), transparent 28%),
    radial-gradient(circle at 20% 78%, rgba(217, 162, 74, 0.08), transparent 34%),
    linear-gradient(160deg, rgba(13, 18, 35, 0.98), rgba(8, 12, 24, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 28px 72px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(56, 217, 255, 0.05);
}

.output-panel--featured::before {
  opacity: 0.95;
}

.output-panel--featured::after {
  background-position: 160% 0, 0 0;
}

.output-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.output-tab {
  position: relative;
  height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(100, 130, 200, 0.22);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
}

.output-tab--active {
  color: var(--text);
  border-color: rgba(56, 217, 255, 0.22);
  background: linear-gradient(90deg, rgba(56, 217, 255, 0.07), rgba(217, 162, 74, 0.06));
}

.output-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.78fr);
  gap: 12px;
}

.output-main,
.output-card {
  position: relative;
  overflow: hidden;
}

.output-card {
  border-radius: 18px;
  padding: 15px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 50%),
    rgba(8, 12, 22, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.output-main--spotlight {
  border-radius: 22px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015) 22%, transparent 50%),
    rgba(8, 12, 24, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 46px rgba(0, 0, 0, 0.24);
}

.output-main--spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 26%, rgba(255, 255, 255, 0.06) 38%, transparent 52%),
    linear-gradient(90deg, rgba(56, 217, 255, 0.08), transparent 24%, transparent 76%, rgba(124, 92, 255, 0.08));
  background-size: 180% 100%, 100% 100%;
  background-position: 130% 0, 0 0;
  transition: background-position 900ms var(--ease-system);
}

.output-main--spotlight:hover::before {
  background-position: -40% 0, 0 0;
}

.output-main__head,
.output-chipset,
.output-brief {
  display: flex;
}

.output-main__head {
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.output-chipset {
  gap: 8px;
  flex-wrap: wrap;
}

.output-highlight {
  margin-bottom: 14px;
  padding: 16px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 56%),
    rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.output-highlight__label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--brand-amber-soft);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.output-highlight p {
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--text);
}

.output-brief {
  gap: 10px;
  margin-bottom: 14px;
}

.output-brief__item {
  flex: 1;
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.output-brief__item span {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.output-brief__item strong {
  display: block;
  font-size: 12px;
}

.output-list--rich {
  margin-top: 0;
  gap: 10px;
}

.output-list--rich li {
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.output-side {
  display: grid;
  gap: 12px;
}

.output-card--summary {
  min-height: 0;
}

.output-card__head {
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.output-label {
  margin-bottom: 8px;
  color: var(--brand-amber-soft);
}

.output-card strong {
  display: block;
  font-size: 15px;
  line-height: 1.45;
}

.output-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
}

.output-list,
.script-block {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.output-list {
  display: grid;
  gap: 8px;
}

.output-list li,
.script-block div,
.log-row p {
  font-size: 12px;
  line-height: 1.68;
}

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

.output-metrics div,
.script-block div {
  border-radius: 14px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.045);
}

.output-metrics span,
.script-block span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.script-block {
  display: grid;
  gap: 10px;
}

.script-block p {
  margin: 0;
}

.log-list {
  display: grid;
  gap: 12px;
}

.log-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.008)),
    rgba(10, 14, 24, 0.54);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 30px rgba(0, 0, 0, 0.2);
}

.log-row {
  align-items: flex-start;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.log-row:first-child {
  padding-top: 0;
  border-top: none;
}

.log-row > div {
  flex: 1;
}

.log-row strong,
.log-row p {
  display: block;
  margin: 0;
}

.log-row time {
  color: var(--muted);
  font-size: 11px;
}

#chat-surface {
  min-height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  padding-top: 110px;
}

#chat-surface.app-surface--active {
  display: flex;
}

.chat-shell {
  width: min(980px, 92vw);
  position: relative;
}

.chat-header h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.chat-area {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.chat-line {
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
}

.badge {
  border-radius: 999px;
  border: 1px solid rgba(56, 217, 255, 0.35);
  background: linear-gradient(90deg, rgba(56, 217, 255, 0.18), rgba(109, 125, 255, 0.12));
  color: var(--accent);
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 700;
}

.chat-card {
  border-radius: 14px;
  border: 1px solid rgba(100, 130, 200, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    rgba(14, 20, 34, 0.82);
  color: #c1cee3;
  padding: 14px;
  font-size: 13px;
}

.sdk-shell {
  margin-top: 18px;
  border: 1px solid rgba(56, 217, 255, 0.14);
  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008)),
    rgba(11, 16, 28, 0.8);
  min-height: 72vh;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.sdk-frame {
  display: block;
  width: 100%;
  min-height: 72vh;
  border: none;
  background: #0b101c;
}

.sdk-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(202, 163, 93, 0.16);
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(211, 170, 102, 0.14), transparent 26%),
    radial-gradient(circle at top right, rgba(108, 138, 196, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(255, 244, 227, 0.04), rgba(255, 255, 255, 0.01) 22%, rgba(8, 12, 22, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 214, 0.12),
    0 30px 80px rgba(5, 9, 18, 0.36);
}

.sdk-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 214, 151, 0.08), transparent 28%, transparent 72%, rgba(83, 127, 210, 0.08)),
    radial-gradient(circle at 20% 18%, rgba(255, 234, 206, 0.08), transparent 18%);
  pointer-events: none;
}

.sdk-stage__intro {
  position: relative;
  z-index: 1;
  display: block;
  padding: 14px 22px 8px;
}

.sdk-stage__eyebrow {
  display: none;
  width: fit-content;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  border: 1px solid rgba(222, 180, 109, 0.2);
  background: rgba(250, 229, 187, 0.06);
  color: #f1d49b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 8px 14px;
  text-transform: uppercase;
}

.sdk-stage__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: radial-gradient(circle, #ffd6a3 0%, #d79b48 72%);
  box-shadow: 0 0 14px rgba(215, 155, 72, 0.48);
}

.sdk-stage__copy {
  max-width: none;
}

.sdk-stage__copy h2 {
  margin: 0;
  color: #fff4e5;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.sdk-stage__copy p {
  margin: 12px 0 0;
  color: rgba(231, 223, 211, 0.82);
  font-size: 14px;
  line-height: 1.8;
}

.sdk-stage__chips {
  display: none;
  flex-wrap: wrap;
  gap: 10px;
}

.sdk-stage__chips span {
  border-radius: 999px;
  border: 1px solid rgba(255, 231, 197, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #e8d5b7;
  font-size: 12px;
  padding: 8px 14px;
}

.sdk-shell {
  position: relative;
  z-index: 1;
  margin: 0 22px 18px;
  border-radius: 24px;
  border: 1px solid rgba(216, 184, 131, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 248, 238, 0.035), rgba(255, 255, 255, 0.012) 18%, rgba(10, 14, 24, 0.92)),
    rgba(11, 16, 28, 0.88);
  overflow: hidden;
  min-height: 72vh;
  box-shadow:
    0 12px 24px rgba(4, 8, 15, 0.16),
    0 24px 52px rgba(3, 7, 14, 0.1);
}

.sdk-shell::before,
.sdk-shell::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.sdk-shell::before {
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 237, 210, 0.035), transparent 20%, transparent 78%, rgba(126, 155, 218, 0.045));
  opacity: 0.38;
}

.sdk-shell::after {
  inset: 1px;
  border-radius: 23px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    inset 0 0 0 1px rgba(255, 246, 228, 0.08),
    inset 0 -18px 26px rgba(255, 255, 255, 0.035),
    inset 18px 0 28px rgba(255, 244, 224, 0.025),
    inset -18px 0 28px rgba(179, 210, 255, 0.02),
    0 0 0 1px rgba(255, 232, 197, 0.06),
    0 12px 22px rgba(147, 184, 255, 0.03);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), transparent 16%, transparent 74%, rgba(168, 205, 255, 0.045)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0)),
    radial-gradient(circle at 16% 0%, rgba(255, 245, 229, 0.05), transparent 22%);
  opacity: 0.95;
}

.sdk-shell__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: absolute;
  top: 8px;
  left: 10px;
  right: 10px;
  z-index: 4;
  padding: 0;
  border-bottom: none;
  background: none;
  backdrop-filter: none;
  pointer-events: none;
}

.sdk-shell__topbar strong {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: rgba(255, 243, 223, 0.92);
  font-size: 12px;
  font-weight: 600;
  background: rgba(11, 16, 26, 0.62);
  border: 1px solid rgba(255, 233, 198, 0.08);
  backdrop-filter: blur(10px);
}

.sdk-shell__topbar span {
  display: none;
}

.sdk-shell__status {
  border-radius: 999px;
  border: 1px solid rgba(181, 220, 173, 0.12);
  background: rgba(11, 16, 26, 0.62);
  color: rgba(204, 234, 195, 0.92);
  font-size: 11px;
  font-weight: 600;
  padding: 7px 11px;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}

.sdk-shell__frame {
  position: relative;
  overflow: hidden;
  z-index: 1;
  padding: 0;
  background: rgba(8, 11, 19, 0.54);
  box-shadow: none;
}

.sdk-shell__frame::before,
.sdk-shell__frame::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.sdk-shell__frame::before {
  inset: 0;
  z-index: 1;
  border-radius: 22px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 243, 221, 0.025),
    inset 0 -16px 32px rgba(4, 7, 13, 0.1);
}

.sdk-shell__frame::after {
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  z-index: 2;
  border-radius: 0 0 22px 22px;
  background:
    linear-gradient(180deg, rgba(9, 12, 18, 0) 0%, rgba(9, 12, 18, 0.05) 42%, rgba(9, 12, 18, 0.14) 100%);
}

.sdk-shell__curtain {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: grid;
  align-content: start;
  gap: 0;
  pointer-events: none;
}

.sdk-shell__curtain-band {
  height: 46px;
  border-radius: 22px 22px 0 0;
  background:
    linear-gradient(180deg, rgba(12, 18, 30, 0.92) 0%, rgba(12, 18, 30, 0.54) 52%, rgba(12, 18, 30, 0.04) 100%);
}

.sdk-shell__curtain-glow {
  height: 14px;
  margin-top: -2px;
  background:
    radial-gradient(circle at center top, rgba(242, 214, 164, 0.08), rgba(242, 214, 164, 0.01) 34%, rgba(242, 214, 164, 0) 72%);
}

.sdk-shell__curtain-copy {
  display: none;
}

.sdk-shell__curtain-copy span {
  color: rgba(235, 213, 176, 0.58);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sdk-shell__curtain-copy strong {
  color: rgba(255, 242, 220, 0.94);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.sdk-frame {
  display: block;
  width: 100%;
  min-height: 72vh;
  border: none;
  border-radius: 22px;
  background: #0b101c;
  transform: translateY(-78px) scale(1.008);
  transform-origin: top center;
  height: calc(72vh + 78px);
  clip-path: inset(78px 0 0 0 round 22px);
}

.mode-switch {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  margin-bottom: 10px;
}

.mode-chip {
  border: 1px solid rgba(56, 217, 255, 0.18);
  border-radius: 999px;
  background: rgba(12, 19, 32, 0.72);
  color: #b8c7df;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  transition: border-color var(--dur-fast), background var(--dur-fast), color var(--dur-fast);
}

.mode-chip:hover {
  border-color: rgba(56, 217, 255, 0.32);
  color: #d9ecff;
}

.mode-chip--active {
  border-color: rgba(56, 217, 255, 0.42);
  background: linear-gradient(90deg, rgba(56, 217, 255, 0.18), rgba(109, 125, 255, 0.14));
  color: #eef9ff;
}

.composer {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(56, 217, 255, 0.14);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008)),
    rgba(11, 16, 28, 0.8);
  padding: 10px 12px;
  transition: border-color var(--dur-fast), box-shadow var(--dur-mid);
}

.composer:focus-within {
  border-color: rgba(56, 217, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(56, 217, 255, 0.06);
}

.composer input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
}

.upload {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#upload-input {
  display: none;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(207, 148, 60, 0.24);
  background: rgba(207, 148, 60, 0.07);
  color: #e8bb71;
  cursor: pointer;
  font-size: 12px;
  padding: 8px 12px;
  white-space: nowrap;
}

.upload-btn:hover {
  border-color: rgba(207, 148, 60, 0.3);
  background: rgba(207, 148, 60, 0.1);
}

.send-btn {
  border: none;
  border-radius: 12px;
  background: linear-gradient(120deg, #e4b564, #bf8331);
  color: #1c1204;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(207, 148, 60, 0.18);
}

.stop-btn {
  border: none;
  border-radius: 12px;
  background: linear-gradient(120deg, #e54d4d, #c41c1c);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(207, 60, 60, 0.18);
}

.stop-btn:hover {
  background: linear-gradient(120deg, #f05a5a, #d42a2a);
}

.page-wipe {
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  background: rgba(6, 9, 18, 0.72);
  backdrop-filter: blur(14px) saturate(0.65);
  -webkit-backdrop-filter: blur(14px) saturate(0.65);
  opacity: 0;
}

.page-wipe.wipe-in {
  animation: wipeIn 0.38s var(--ease-soft) forwards;
}

.page-wipe.wipe-out {
  animation: wipeOut 0.42s var(--ease-soft) forwards;
}

.page-wipe::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(56, 217, 255, 0.34) 30%,
    rgba(217, 162, 74, 0.34) 70%,
    transparent 100%
  );
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
}

.page-wipe.wipe-in::after {
  animation: lineExpand 0.38s var(--ease-system) 0.1s forwards;
}

.reveal-block {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 720ms var(--ease-system),
    transform 720ms var(--ease-system),
    filter 720ms var(--ease-system);
  filter: saturate(0.88);
}

.reveal-block.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: saturate(1);
}

.reveal-block[data-reveal="up"] {
  transform: translateY(28px);
}

@keyframes ambientDrift {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.8;
  }
  33% {
    transform: translate3d(-15px, 10px, 0) scale(1.03);
    opacity: 1;
  }
  66% {
    transform: translate3d(12px, -8px, 0) scale(0.98);
    opacity: 0.84;
  }
}

@keyframes orbitDrift {
  0%, 100% {
    transform: translate3d(var(--layer-x, 0px), var(--layer-y, 0px), 0) scale(1);
  }
  30% {
    transform: translate3d(calc(var(--layer-x, 0px) - 40px), calc(var(--layer-y, 0px) + 25px), 0) scale(1.08);
  }
  65% {
    transform: translate3d(calc(var(--layer-x, 0px) + 25px), calc(var(--layer-y, 0px) - 18px), 0) scale(0.94);
  }
}

@keyframes gridDrift {
  0%, 100% {
    transform: translate3d(var(--layer-x, 0px), var(--layer-y, 0px), 0);
  }
  50% {
    transform: translate3d(calc(var(--layer-x, 0px) + 8px), calc(var(--layer-y, 0px) - 5px), 0);
  }
}

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes awakenLine {
  0% {
    opacity: 0;
    transform: translateX(-50%) scaleX(0.68);
  }
  100% {
    opacity: 0.72;
    transform: translateX(-50%) scaleX(1);
  }
}

@keyframes awakenGlow {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 0.58;
    transform: scale(1);
  }
  50% {
    opacity: 0.82;
    transform: scale(1.015);
  }
}

@keyframes actionBreath {
  0%, 100% {
    background-position: 0% 50%;
    box-shadow:
      0 8px 24px rgba(56, 217, 255, 0.22),
      0 0 18px rgba(198, 136, 53, 0.13),
      inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }
  50% {
    background-position: 100% 50%;
    box-shadow:
      0 14px 34px rgba(56, 217, 255, 0.32),
      0 0 30px rgba(198, 136, 53, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
}

@keyframes tagBreath {
  0%, 100% {
    border-color: rgba(207, 148, 60, 0.18);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 10px 20px rgba(0, 0, 0, 0.18),
      0 0 0 1px rgba(207, 148, 60, 0.035);
  }
  50% {
    border-color: rgba(207, 148, 60, 0.28);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      0 14px 28px rgba(0, 0, 0, 0.24),
      0 0 0 1px rgba(207, 148, 60, 0.06),
      0 0 28px rgba(207, 148, 60, 0.12);
  }
}

@keyframes tagTextBreath {
  0%, 100% {
    opacity: 1;
    filter: none;
    text-shadow:
      0 0 8px rgba(255, 166, 92, 0.18),
      0 0 16px rgba(255, 120, 80, 0.1);
  }
  50% {
    opacity: 1;
    filter: none;
    text-shadow:
      0 0 10px rgba(255, 166, 92, 0.24),
      0 0 22px rgba(255, 120, 80, 0.14);
  }
}

@keyframes statusBreath {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.08),
      0 0 14px rgba(56, 217, 255, 0.2),
      0 0 20px rgba(198, 136, 53, 0.08);
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.11),
      0 0 24px rgba(56, 217, 255, 0.32),
      0 0 34px rgba(198, 136, 53, 0.13);
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes orbFloat {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(18px, -12px, 0);
  }
}

@keyframes wordUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes marqueeScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes wipeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0px) saturate(1);
    -webkit-backdrop-filter: blur(0px) saturate(1);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(14px) saturate(0.65);
    -webkit-backdrop-filter: blur(14px) saturate(0.65);
  }
}

@keyframes wipeOut {
  from {
    opacity: 1;
    backdrop-filter: blur(14px) saturate(0.65);
    -webkit-backdrop-filter: blur(14px) saturate(0.65);
  }
  to {
    opacity: 0;
    backdrop-filter: blur(0px) saturate(1);
    -webkit-backdrop-filter: blur(0px) saturate(1);
  }
}

@keyframes lineExpand {
  from {
    transform: scaleX(0);
    opacity: 0;
  }
  50% {
    transform: scaleX(1);
    opacity: 1;
  }
  to {
    transform: scaleX(1);
    opacity: 0;
  }
}

@keyframes statusPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(56, 217, 255, 0.12);
    opacity: 0.88;
  }
  50% {
    box-shadow: 0 0 0 4px rgba(56, 217, 255, 0);
    opacity: 1;
  }
}

@media (max-width: 1080px) {
  .topbar {
    flex-wrap: wrap;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

}

@media (max-width: 760px) {
  .shell,
  .topbar--fixed {
    width: min(94vw, 94vw);
  }

  #home-surface {
    padding-top: 132px;
    padding-bottom: 48px;
  }

  .hero {
    min-height: auto;
  }

  .hero-main--centered {
    padding-top: 24px;
  }

  .hero-logo img {
    width: 64px;
    margin-bottom: 8px;
  }

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

  .hero-tag--single {
    min-width: auto;
    max-width: 92vw;
    padding: 8px 14px;
  }

  .hero-tag__line {
    font-size: 11.5px;
    letter-spacing: 0.08em;
  }

  .hero-sub {
    max-width: 88vw;
    margin-bottom: 30px;
  }

  .hero-actions,
  .topbar-actions {
    flex-wrap: wrap;
  }

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

  .composer {
    flex-wrap: wrap;
  }

  .chat-shell {
    width: 94vw;
  }

  .sdk-stage__intro {
    padding: 10px 14px 6px;
  }

  .sdk-stage__copy h2 {
    font-size: 18px;
  }

  .sdk-shell {
    margin: 0 14px 12px;
    border-radius: 18px;
  }

  .sdk-shell::after {
    inset: 1px;
    border-radius: 17px;
  }

  .sdk-shell__topbar {
    top: 6px;
    left: 8px;
    right: 8px;
  }

  .sdk-shell__frame {
    padding: 0;
  }

  .sdk-shell__frame::before {
    inset: 0;
    border-radius: 18px;
  }

  .sdk-shell__frame::after {
    left: 0;
    right: 0;
    bottom: 0;
    height: 36px;
    border-radius: 0 0 18px 18px;
  }

  .sdk-shell__curtain {
    top: 0;
    left: 0;
    right: 0;
  }

  .sdk-shell__curtain-band {
    height: 38px;
    border-radius: 18px 18px 0 0;
  }

  .sdk-shell__status {
    padding: 6px 10px;
  }

  .sdk-frame {
    min-height: 68vh;
    border-radius: 18px;
    transform: translateY(-66px) scale(1.008);
    height: calc(68vh + 66px);
    clip-path: inset(66px 0 0 0 round 18px);
  }
}

/* desktop-first topbar: brand pinned to far left */
@media (min-width: 981px) {
  #app-view.view--active .topbar {
    position: relative !important;
    min-height: 64px;
  }

  #app-view.view--active .topbar .brand-mini {
    position: fixed !important;
    left: 20px !important;
    top: 18px !important;
    transform: none !important;
    z-index: 40 !important;
    margin: 0 !important;
  }

  #app-view.view--active .topbar .topbar-actions {
    position: fixed !important;
    right: 20px !important;
    top: 18px !important;
    transform: none !important;
    z-index: 40 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 !important;
    white-space: nowrap;
    padding: 6px 8px;
    border-radius: 999px;
    background: rgba(8, 12, 22, 0.34);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  #app-view.view--active #account-trigger,
  #app-view.view--active #back-to-login {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  #app-view.view--active .topbar .nav {
    position: fixed !important;
    left: 50% !important;
    top: 18px !important;
    transform: translateX(-50%) !important;
    width: max-content !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    z-index: 35 !important;
  }
}

/* === home desktop polish: marquee near bottom + 1080p/2k/4k tuning === */
#app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-content {
  width: min(1480px, 92vw) !important;
  min-height: calc(100vh - 140px);
}

#app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-main--centered {
  max-width: 1180px;
  padding-top: clamp(24px, 4vh, 56px);
  padding-bottom: 120px;
}

/* marquee pinned close to bottom */
#app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-main--centered .marquee-wrap {
  display: block !important;
  position: fixed !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  bottom: clamp(22px, 3.2vh, 40px) !important;
  width: min(980px, 84vw) !important;
  margin: 0 !important;
  opacity: 0.18 !important;
  z-index: 8 !important;
}

/* 1920x1080 baseline */
@media (min-width: 1700px) and (max-width: 2399px) {
  #app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-content {
    width: min(1560px, 92vw) !important;
  }

  #app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-main--centered {
    max-width: 1240px;
  }

  #app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-logo img {
    width: 92px;
  }

  #app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-sub {
    font-size: 16px;
    max-width: 900px;
    line-height: 1.95;
  }
}

/* 2K (2560 class) */
@media (min-width: 2400px) and (max-width: 3399px) {
  #app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-content {
    width: min(1760px, 90vw) !important;
  }

  #app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-main--centered {
    max-width: 1380px;
    padding-top: clamp(36px, 5vh, 70px);
  }

  #app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-logo img {
    width: 110px;
  }

  #app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-tag__line {
    font-size: 14px;
    letter-spacing: 0.09em;
  }

  #app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-sub {
    font-size: 18px;
    max-width: 1020px;
    line-height: 2;
  }

  #app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-actions .btn-primary,
  #app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-actions .ghost-btn {
    min-height: 52px;
    padding: 0 28px;
    font-size: 16px;
  }

  #app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-main--centered .marquee-wrap {
    width: min(1200px, 70vw) !important;
    bottom: clamp(24px, 3vh, 44px) !important;
    opacity: 0.2 !important;
  }
}

/* 4K (3840 class) */
@media (min-width: 3400px) {
  #app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-content {
    width: min(2200px, 88vw) !important;
  }

  #app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-main--centered {
    max-width: 1680px;
    padding-top: clamp(44px, 6vh, 96px);
    padding-bottom: 146px;
  }

  #app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-logo img {
    width: 128px;
  }

  #app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-tag {
    padding: 11px 20px;
  }

  #app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-tag__line {
    font-size: 16px;
    letter-spacing: 0.1em;
  }

  #app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-sub {
    font-size: 21px;
    max-width: 1280px;
    line-height: 2.05;
  }

  #app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-actions {
    gap: 18px;
  }

  #app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-actions .btn-primary,
  #app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-actions .ghost-btn {
    min-height: 58px;
    padding: 0 34px;
    font-size: 18px;
  }

  #app-view:has(#nav-home.nav-item--active) #home-surface.app-surface--active .hero-main--centered .marquee-wrap {
    width: min(1500px, 64vw) !important;
    bottom: 34px !important;
    opacity: 0.22 !important;
  }
}

/* === home final override (no :has dependency) === */
#home-surface.app-surface--active .hero-content {
  width: min(1480px, 92vw) !important;
  min-height: calc(100vh - 140px) !important;
}

#home-surface.app-surface--active .hero-main--centered {
  transform: translateY(0) !important;
  max-width: 1180px !important;
  padding-top: clamp(28px, 4vh, 56px) !important;
  padding-bottom: 120px !important;
}

#home-surface.app-surface--active .hero-main--centered .marquee-wrap {
  display: block !important;
  position: fixed !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  bottom: clamp(22px, 3.2vh, 40px) !important;
  width: min(980px, 84vw) !important;
  margin: 0 !important;
  opacity: 0.18 !important;
  z-index: 8 !important;
}

/* 1080p */
@media (min-width: 1700px) and (max-width: 2399px) {
  #home-surface.app-surface--active .hero-content {
    width: min(1560px, 92vw) !important;
  }
  #home-surface.app-surface--active .hero-main--centered {
    max-width: 1240px !important;
  }
  #home-surface.app-surface--active .hero-logo img {
    width: 92px !important;
  }
  #home-surface.app-surface--active .hero-sub {
    font-size: 16px !important;
    max-width: 900px !important;
    line-height: 1.95 !important;
  }
}

/* 2K */
@media (min-width: 2400px) and (max-width: 3399px) {
  #home-surface.app-surface--active .hero-content {
    width: min(1760px, 90vw) !important;
  }
  #home-surface.app-surface--active .hero-main--centered {
    max-width: 1380px !important;
    padding-top: clamp(36px, 5vh, 70px) !important;
  }
  #home-surface.app-surface--active .hero-logo img {
    width: 110px !important;
  }
  #home-surface.app-surface--active .hero-tag__line {
    font-size: 14px !important;
  }
  #home-surface.app-surface--active .hero-sub {
    font-size: 18px !important;
    max-width: 1020px !important;
  }
  #home-surface.app-surface--active .hero-main--centered .marquee-wrap {
    width: min(1200px, 70vw) !important;
    bottom: clamp(24px, 3vh, 44px) !important;
  }
}

/* 4K */
@media (min-width: 3400px) {
  #home-surface.app-surface--active .hero-content {
    width: min(2200px, 88vw) !important;
  }
  #home-surface.app-surface--active .hero-main--centered {
    max-width: 1680px !important;
    padding-top: clamp(44px, 6vh, 96px) !important;
    padding-bottom: 146px !important;
  }
  #home-surface.app-surface--active .hero-logo img {
    width: 128px !important;
  }
  #home-surface.app-surface--active .hero-sub {
    font-size: 21px !important;
    max-width: 1280px !important;
  }
  #home-surface.app-surface--active .hero-main--centered .marquee-wrap {
    width: min(1500px, 64vw) !important;
    bottom: 34px !important;
  }
}

/* === Video Generation Preview Surface === */
#video-surface {
  padding-top: 0;
  padding-bottom: 0;
  min-height: 100vh;
}

.video-lab {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  border-radius: 0;
  padding: 32px 44px 18px;
  background: transparent;
  box-shadow: none;
  border: none !important;
}

.video-lab::before,
.video-lab::after {
  content: none !important;
  display: none !important;
}

.video-lab__bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.64;
  pointer-events: none;
}

.video-lab__bg-grid,
.video-lab__particles,
.video-lab__halo {
  position: absolute;
  pointer-events: none;
}

.video-lab__bg-grid {
  inset: 0;
  opacity: 0.13;
  background-image:
    linear-gradient(rgba(135, 165, 220, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(135, 165, 220, 0.1) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 50% 46%, #fff 24%, transparent 72%);
}

.video-lab__particles {
  inset: 0;
  background:
    radial-gradient(circle at 14% 28%, rgba(167, 208, 255, 0.32) 1px, transparent 2px),
    radial-gradient(circle at 81% 22%, rgba(167, 208, 255, 0.24) 1px, transparent 2px),
    radial-gradient(circle at 76% 76%, rgba(167, 208, 255, 0.18) 1px, transparent 2px),
    radial-gradient(circle at 25% 82%, rgba(167, 208, 255, 0.24) 1px, transparent 2px);
  animation: videoParticlesDrift 16s ease-in-out infinite alternate;
  opacity: 0.45;
}

.video-lab__halo {
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(54px);
}

.video-lab__halo--a {
  left: 8%;
  top: 14%;
  background: radial-gradient(circle, rgba(98, 155, 232, 0.2), transparent 68%);
}

.video-lab__halo--b {
  right: 10%;
  bottom: 10%;
  background: radial-gradient(circle, rgba(108, 127, 214, 0.16), transparent 70%);
}

.video-lab__halo {
  display: none;
}

.video-lab__header {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-bottom: 18px;
}

.video-lab__header h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 50px);
  letter-spacing: -0.02em;
  color: #f2f7ff;
}

.video-lab__header p {
  margin: 10px auto 0;
  max-width: 700px;
  font-size: 14px;
  line-height: 1.9;
  color: rgba(205, 220, 242, 0.85);
}

.video-lab__center {
  position: relative;
  z-index: 2;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.video-lab__center strong {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  color: #f6f9ff;
  letter-spacing: 0.04em;
}

.video-lab__modules {
  position: relative;
  z-index: 2;
  margin: 8px auto 18px;
  width: min(880px, 100%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.video-lab__modules span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(169, 197, 238, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.008)),
    rgba(10, 18, 31, 0.54);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(221, 233, 252, 0.88);
}

@keyframes videoParticlesDrift {
  0% { transform: translate3d(0, 0, 0); opacity: 0.38; }
  100% { transform: translate3d(-10px, 8px, 0); opacity: 0.52; }
}

@media (max-width: 1100px) {
  .video-lab {
    padding: 28px 24px 14px;
    min-height: calc(100vh - 126px);
  }

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

@media (max-width: 720px) {
  #video-surface {
    padding-top: 92px;
  }

  .video-lab__center {
    min-height: 310px;
  }

  .video-lab__modules {
    grid-template-columns: 1fr;
  }
}

/* === Copy Generation Preview Surface === */
#copy-surface {
  padding-top: 0;
  padding-bottom: 0;
  min-height: 100vh;
}

.copy-lab {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  border: none !important;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 32px 44px 22px;
}

.copy-lab::before,
.copy-lab::after {
  content: none !important;
  display: none !important;
}

.copy-lab__bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.copy-lab__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 30%,
    hsl(260 87% 3% / 0.1) 45%,
    hsl(260 87% 3% / 0.4) 60%,
    hsl(260 87% 3% / 0.75) 75%,
    hsl(260 87% 3%) 95%
  );
}

.copy-lab__bg-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.11;
  background-image:
    linear-gradient(rgba(160, 178, 225, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160, 178, 225, 0.1) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(circle at 50% 40%, #fff 25%, transparent 74%);
}

.copy-lab__header,
.copy-lab__center,
.copy-lab__modules,
.copy-lab__cards {
  position: relative;
  z-index: 2;
}

.copy-lab__header {
  text-align: center;
  margin-bottom: 18px;
}

.copy-lab__header h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 50px);
  letter-spacing: -0.02em;
  color: #f4f7ff;
}

.copy-lab__header p {
  margin: 10px auto 0;
  max-width: 720px;
  font-size: 14px;
  line-height: 1.9;
  color: rgba(214, 223, 246, 0.88);
}

.copy-lab__center {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.copy-lab__center strong {
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: 0.04em;
  color: #f7f9ff;
  text-shadow:
    0 10px 28px rgba(0, 0, 0, 0.42),
    0 0 14px rgba(171, 186, 231, 0.18);
}

.copy-lab__modules {
  margin: 34px auto 16px;
  width: min(900px, 100%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.copy-lab__modules span {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(195, 207, 242, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)),
    rgba(13, 17, 35, 0.42);
  color: rgba(231, 237, 252, 0.9);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.copy-lab__cards {
  margin: 0 auto;
  width: min(900px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.copy-lab__card {
  min-height: 74px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(195, 207, 242, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)),
    rgba(10, 14, 30, 0.52);
  color: rgba(239, 244, 255, 0.94);
  font-size: 15px;
  letter-spacing: 0.04em;
}

@media (max-width: 1100px) {
  .copy-lab {
    min-height: calc(100vh - 126px);
    padding: 28px 24px 16px;
  }

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

@media (max-width: 720px) {
  #copy-surface {
    padding-top: 92px;
  }

  .copy-lab__center {
    min-height: 240px;
  }

  .copy-lab__modules {
    grid-template-columns: 1fr;
  }

  .copy-lab__cards {
    grid-template-columns: 1fr;
  }
}

/* === Data Analysis Deck Surface === */
#data-surface {
  padding-top: 0;
  padding-bottom: 0;
  min-height: 100vh;
}

.data-deck {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  border-radius: 0;
  border: none !important;
  background: transparent;
  box-shadow: none;
}

.data-deck::before,
.data-deck::after {
  content: none !important;
  display: none !important;
}

.data-deck__bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.data-deck__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 30%,
    hsl(260 87% 3% / 0.1) 45%,
    hsl(260 87% 3% / 0.4) 60%,
    hsl(260 87% 3% / 0.75) 75%,
    hsl(260 87% 3%) 95%
  );
}

.data-deck__header,
.data-deck__center,
.data-deck__footer {
  position: relative;
  z-index: 2;
}

.data-deck__header {
  width: min(1240px, 94vw);
  margin: 0 auto;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.data-deck__logo {
  line-height: 0;
}

.data-deck__badge {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: clamp(12px, 1.4vw, 20px) clamp(12px, 1.6vw, 20px);
  font-size: clamp(12px, 1.1vw, 20px);
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.05);
}

.data-deck__center {
  min-height: calc(100vh - 250px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(-3%);
  text-align: center;
  padding: 0 18px;
}

.data-deck__center h2 {
  margin: 0 auto;
  width: min(100%, 613px);
  max-width: 613px;
  font-size: 56px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.28;
  background: linear-gradient(144.5deg, rgba(255, 255, 255, 1) 28%, rgba(0, 0, 0, 0) 115%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

.data-deck__subtitle {
  margin: clamp(10px, 1.6vw, 16px) 0 0;
  font-size: clamp(20px, 3.4vw, 48px);
  line-height: 1.5;
  color: rgba(237, 243, 255, 0.9);
}

.data-deck__author {
  margin: clamp(10px, 2vw, 18px) 0 0;
  font-size: clamp(14px, 1.6vw, 24px);
  color: rgba(217, 228, 248, 0.75);
}

.data-deck__footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  text-align: center;
  font-size: clamp(12px, 1.1vw, 20px);
  color: rgba(217, 228, 248, 0.6);
  letter-spacing: 0.08em;
}

@media (max-width: 900px) {
  #data-surface {
    padding-top: 86px;
  }

  .data-deck__header {
    width: min(94vw, 94vw);
    padding-top: 8px;
  }

  .data-deck__center {
    min-height: calc(100vh - 220px);
    transform: translateY(-2%);
  }

  .data-deck__center h2 {
    font-size: 36px;
  }
}

/* full-viewport surfaces (cover behind top bar) */
.app-mode #video-surface,
.app-mode #copy-surface,
.app-mode #data-surface {
  position: fixed;
  inset: 0;
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  z-index: 2;
}

.app-mode #video-surface .video-lab,
.app-mode #copy-surface .copy-lab,
.app-mode #data-surface .data-deck {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
}

/* === Brand chip: white mode === */
.brand-mini {
  background: #ffffff !important;
  color: #0b0f16 !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 10px 24px rgba(0, 0, 0, 0.14) !important;
}

.brand-mini::before {
  opacity: 0.22;
}


.account-panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: start end;
  padding: 92px min(3vw, 24px) 24px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.account-panel {
  width: min(420px, calc(100vw - 24px));
  padding: 22px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    linear-gradient(180deg, rgba(14, 20, 34, 0.96), rgba(9, 13, 24, 0.98));
  box-shadow: 0 28px 80px rgba(2, 4, 12, 0.62);
  transform: translateY(-8px) scale(0.98);
  opacity: 0;
  transition: opacity var(--dur-mid) var(--ease-system), transform var(--dur-mid) var(--ease-system);
}

.account-panel.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
}

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

.account-panel__eyebrow {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.account-panel__head strong {
  display: block;
  font-size: 24px;
}

.account-panel__head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.account-close {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
  font-size: 24px;
}

.account-panel__body {
  display: grid;
  gap: 14px;
}

.account-panel__switch,
.account-panel__logout {
  width: 100%;
  justify-content: center;
}

.account-password-form {
  display: grid;
  gap: 14px;
  padding-top: 8px;
}

.account-form-status {
  min-height: 20px;
  font-size: 13px;
  color: var(--muted);
}

.account-form-status.is-error {
  color: #ffb0b0;
}

.account-form-status.is-success {
  color: var(--success);
}


[hidden] {
  display: none !important;
}


.admin-panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 21;
  display: grid;
  place-items: start center;
  padding: 88px 16px 24px;
  background: rgba(4, 8, 16, 0.12);
}

.admin-panel {
  width: min(980px, calc(100vw - 24px));
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(14, 20, 34, 0.98), rgba(9, 13, 24, 0.99));
  box-shadow: 0 24px 60px rgba(2, 4, 12, 0.5);
  transform: translateY(-8px) scale(0.98);
  opacity: 0;
  transition: opacity var(--dur-mid) var(--ease-system), transform var(--dur-mid) var(--ease-system);
}

.admin-panel.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.admin-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.admin-panel__head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.admin-panel__body {
  display: grid;
  gap: 24px;
}

.admin-panel__section-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}

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

.admin-create-grid select {
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(100, 130, 200, 0.28);
  background: rgba(6, 9, 18, 0.65);
  color: var(--text);
}

.admin-create-submit {
  min-width: 140px;
}

.admin-users-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.admin-users-list {
  display: grid;
  gap: 12px;
}

.admin-user-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(12, 17, 30, 0.86);
}

.admin-user-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.admin-user-card__top strong {
  display: block;
  font-size: 17px;
}

.admin-user-card__top span,
.admin-user-card__meta span {
  color: var(--muted);
  font-size: 13px;
}

.admin-role-chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(56, 217, 255, 0.1);
  color: var(--text) !important;
}

.admin-user-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 12px 0;
}

.admin-user-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-role-select {
  min-width: 160px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(100, 130, 200, 0.28);
  background: rgba(6, 9, 18, 0.65);
  color: var(--text);
  padding: 0 12px;
}

.admin-empty {
  padding: 18px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 760px) {
  .admin-create-grid {
    grid-template-columns: 1fr;
  }

  .admin-user-card__actions {
    flex-direction: column;
  }

  .admin-role-select,
  .admin-action-btn {
    width: 100%;
  }
}


.admin-reset-modal,
.admin-logs-modal {
  position: fixed;
  inset: 0;
  z-index: 22;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 8, 16, 0.16);
}

.admin-reset-card,
.admin-logs-card {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(14, 20, 34, 0.98), rgba(9, 13, 24, 0.99));
  box-shadow: 0 24px 60px rgba(2, 4, 12, 0.48);
}

.admin-reset-copy {
  margin: 0 0 16px;
  color: var(--muted);
}

.admin-reset-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.admin-logs-card {
  width: min(860px, calc(100vw - 24px));
}

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

.admin-log-item {
  padding: 14px;
  border-radius: 16px;
  background: rgba(12, 17, 30, 0.82);
}

.admin-log-item strong {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}

.admin-log-item span,
.admin-log-item small,
.admin-log-item p {
  display: block;
  color: var(--muted);
}

.admin-log-item p {
  margin: 8px 0 0;
  line-height: 1.5;
}


.admin-users-toolbar {
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-user-search {
  min-width: 240px;
  flex: 1 1 280px;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(100, 130, 200, 0.28);
  background: rgba(6, 9, 18, 0.65);
  color: var(--text);
}

.admin-create-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin-top: 10px;
  border-radius: 12px;
  background: rgba(56, 217, 255, 0.08);
  color: var(--text);
}

/* === fullscreen surface text-safe offsets (fix text overlap after full-screen video) === */
.app-mode {
  --surface-top-safe: clamp(96px, 11vh, 132px);
  --surface-bottom-safe: clamp(18px, 4vh, 40px);
}

.app-mode #video-surface .video-lab,
.app-mode #copy-surface .copy-lab,
.app-mode #data-surface .data-deck {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: var(--surface-top-safe);
  padding-bottom: var(--surface-bottom-safe);
}

.app-mode #video-surface .video-lab__header,
.app-mode #copy-surface .copy-lab__header,
.app-mode #data-surface .data-deck__header {
  margin-top: 0;
}

.app-mode #video-surface .video-lab__center {
  min-height: clamp(220px, 42vh, 420px);
}

.app-mode #copy-surface .copy-lab__center {
  min-height: clamp(200px, 34vh, 340px);
}

@media (max-width: 900px) {
  .app-mode {
    --surface-top-safe: 112px;
    --surface-bottom-safe: 20px;
  }
}

@media (max-width: 720px) {
  .app-mode {
    --surface-top-safe: 124px;
  }

  .app-mode #video-surface .video-lab,
  .app-mode #copy-surface .copy-lab,
  .app-mode #data-surface .data-deck {
    padding-left: 20px;
    padding-right: 20px;
  }

  .app-mode #video-surface .video-lab__center,
  .app-mode #copy-surface .copy-lab__center {
    min-height: 200px;
  }
}

/* === unified title spec for video/copy surfaces (match data surface) === */
.video-lab__header h2,
.copy-lab__header h2 {
  margin: 0 auto;
  width: min(100%, 613px);
  max-width: 613px;
  font-size: 56px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.28;
  background: linear-gradient(144.5deg, rgba(255, 255, 255, 1) 28%, rgba(0, 0, 0, 0) 115%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

@media (max-width: 900px) {
  .video-lab__header h2,
  .copy-lab__header h2 {
    font-size: 36px;
  }
}

/* === unified coming-soon spec for video/copy surfaces === */
.video-lab__center strong,
.copy-lab__center strong {
  margin: 0 auto;
  width: min(100%, 613px);
  max-width: 613px;
  font-size: 56px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.28;
  background: linear-gradient(144.5deg, rgba(255, 255, 255, 1) 28%, rgba(0, 0, 0, 0) 115%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

@media (max-width: 900px) {
  .video-lab__center strong,
  .copy-lab__center strong {
    font-size: 36px;
  }
}

/* === keep coming-soon perfectly centered on video/copy surfaces === */
.video-lab,
.copy-lab {
  position: relative;
}

.video-lab__center,
.copy-lab__center {
  position: absolute;
  inset: 0;
  z-index: 3;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.video-lab__modules,
.copy-lab__modules {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 28px;
  z-index: 2;
}

@media (max-width: 900px) {
  .video-lab__modules,
  .copy-lab__modules {
    bottom: 20px;
  }
}

/* === data surface motion counter (bottom-right) === */
.data-deck__motion-counter {
  position: absolute;
  right: 32px;
  bottom: 32px;
  z-index: 3;
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.08em;
  color: rgba(245, 249, 255, 0.92);
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

@media (min-width: 768px) {
  .data-deck__motion-counter {
    right: 48px;
    bottom: 48px;
  }
}

/* === home hero background video === */
.hero__bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.62;
  pointer-events: none;
}

.hero-glow,
.hero-orb {
  z-index: 1;
}

/* === home surface full-bleed like video surface + clearer background video === */
.app-mode #home-surface {
  position: fixed;
  inset: 0;
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  z-index: 2;
}

.app-mode #home-surface .hero {
  width: 100vw;
  min-height: 100vh;
  padding: 0;
}

.app-mode #home-surface .hero__bg-video {
  opacity: 0.9;
  filter: saturate(1.08) contrast(1.08) brightness(1.03);
}

.app-mode #home-surface .hero-glow {
  opacity: 0.46;
}

.app-mode #home-surface .hero::after {
  opacity: 0.42;
}

/* === liquid glass variants for home bottom four cards === */
@layer components {
  .liquid-glass {
    background: rgba(255, 255, 255, 0.01);
    background-blend-mode: luminosity;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: none;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
  }

  .liquid-glass::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.4px;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.45) 0%,
      rgba(255, 255, 255, 0.15) 20%,
      rgba(255, 255, 255, 0) 40%,
      rgba(255, 255, 255, 0) 60%,
      rgba(255, 255, 255, 0.15) 80%,
      rgba(255, 255, 255, 0.45) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
  }

  .liquid-glass-strong {
    background: rgba(255, 255, 255, 0.01);
    background-blend-mode: luminosity;
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    border: none;
    box-shadow:
      4px 4px 4px rgba(0, 0, 0, 0.05),
      inset 0 1px 1px rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
  }

  .liquid-glass-strong::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.4px;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.5) 0%,
      rgba(255, 255, 255, 0.2) 20%,
      rgba(255, 255, 255, 0) 40%,
      rgba(255, 255, 255, 0) 60%,
      rgba(255, 255, 255, 0.2) 80%,
      rgba(255, 255, 255, 0.5) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
  }
}

/* === unified section spec: badge/title/video fade/page wrapper === */
.shell {
  background: #000;
  overflow: visible;
}

body {
  background-color: #000;
}

.section-badge {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.25rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  line-height: 1;
  font-weight: 500;
  color: #fff;
  font-family: "Manrope", "Noto Sans SC", sans-serif;
}

.section-title {
  margin: 0;
  font-size: 2.25rem;
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 0.9;
  color: #fff;
  font-family: "Manrope", "Noto Sans SC", sans-serif;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  .section-title {
    font-size: 3.75rem;
  }
}

.hero,
.video-lab,
.copy-lab,
.data-deck {
  position: relative;
}

.video-fade {
  position: absolute;
  left: 0;
  width: 100%;
  height: 200px;
  z-index: 2;
  pointer-events: none;
}

.video-fade--top {
  top: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent);
}

.video-fade--bottom {
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

/* === enforce section badge/title utility spec === */
.font-body {
  font-family: "Manrope", "Noto Sans SC", sans-serif;
}

.font-heading {
  font-family: "Manrope", "Noto Sans SC", sans-serif;
}

.app-surface .section-badge {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.25rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  line-height: 1;
  font-weight: 500;
  color: #fff;
  font-family: "Manrope", "Noto Sans SC", sans-serif;
}

.app-surface .section-title {
  margin: 0;
  font-size: 2.25rem;
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 0.9;
  color: #fff;
  font-family: "Manrope", "Noto Sans SC", sans-serif;
}

@media (min-width: 768px) {
  .app-surface .section-title {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  .app-surface .section-title {
    font-size: 3.75rem;
  }
}

/* === home hero background image === */
.hero__bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.9;
  pointer-events: none;
}

/* === custom image chat workspace (replace sdk page) === */
.chat-shell--custom {
  width: min(1040px, 92vw);
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    linear-gradient(170deg, rgba(10, 15, 28, 0.94), rgba(6, 10, 20, 0.95));
  border-radius: 24px;
}

.chat-shell--custom .chat-header {
  display: grid;
  gap: 8px;
}

.chat-shell--custom .chat-header h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  font-style: italic;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.chat-shell--custom .chat-header p {
  margin: 0;
  color: rgba(198, 213, 238, 0.86);
  font-size: 13px;
  line-height: 1.7;
}


.chat-shell--custom .chat-area {
  margin-top: 0;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  overflow-x: hidden;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(100, 130, 200, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.008)),
    rgba(8, 12, 22, 0.55);
}

.chat-shell--custom .chat-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin-bottom: 10px;
  min-width: 0;
}

.chat-shell--custom .chat-line:last-child {
  margin-bottom: 0;
}

.chat-shell--custom .chat-card {
  max-width: none;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border-radius: 14px;
  padding: 10px 12px;
  line-height: 1.82;
  font-size: 14px;
  letter-spacing: 0.01em;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.chat-shell--custom .chat-msg-text {
  margin: 0;
  line-height: 1.82;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
}

.chat-shell--custom .chat-msg-text p {
  margin: 0 0 10px;
}

.chat-shell--custom .chat-msg-text p:last-child {
  margin-bottom: 0;
}

.chat-shell--custom .chat-msg-text ul {
  margin: 0 0 10px 1.1em;
  padding: 0;
  line-height: 1.82;
}

.chat-shell--custom .chat-msg-text li {
  margin: 0 0 4px;
}

.chat-shell--custom .chat-line--user {
  grid-template-columns: minmax(0, 1fr) auto;
}

.chat-shell--custom .chat-line--user .badge {
  grid-column: 2;
}

.chat-shell--custom .chat-line--user .chat-card {
  grid-column: 1;
  justify-self: end;
  width: min(78ch, 88%);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
    rgba(56, 217, 255, 0.12);
  color: #ecf7ff;
  border-color: rgba(56, 217, 255, 0.26);
}

.chat-shell--custom .chat-line--bot .chat-card {
  width: 100%;
}

.chat-shell--custom .upload-status {
  margin-top: 0;
  color: rgba(198, 213, 238, 0.78);
  font-size: 12px;
}

.chat-shell--custom .composer {
  margin-top: 0;
}

.chat-shell--custom .chat-compose-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
}

.chat-shell--custom .chat-dock {
  border-radius: 16px;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: rgba(255, 255, 255, 0.01);
}

.chat-shell--custom .chat-line .badge {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.02);
}

.chat-shell--custom .chat-line--welcome {
  margin-top: 2px;
}

.chat-shell--custom .upload-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: #eaf4ff;
}

.chat-shell--custom .upload-btn:hover {
  border-color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 760px) {
  .chat-shell--custom {
    width: 94vw;
    padding: 16px;
  }

  .chat-shell--custom .chat-card {
    max-width: 100%;
  }

  .chat-shell--custom .chat-line--user .chat-card {
    width: min(92vw, 92%);
  }

  .chat-shell--custom .composer {
    flex-wrap: wrap;
  }

  .chat-shell--custom #chat-input {
    width: 100%;
    min-height: 40px;
  }
}

/* === fix: image workspace not clipped, allow vertical scroll inside surface === */
#chat-surface {
  min-height: 100vh;
  height: 100vh;
  padding: 108px 0 24px;
  overflow-y: auto;
  overflow-x: hidden;
  display: none;
}

#chat-surface.app-surface--active {
  display: block;
}

#chat-surface .chat-shell--custom {
  margin: 0 auto;
}

@media (max-width: 760px) {
  #chat-surface {
    padding-top: 92px;
    padding-bottom: 16px;
  }
}

/* === redesign: stable chat workspace layout (no clipping) === */
#chat-surface.app-surface--active {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: block;
  box-sizing: border-box;
  padding: 104px 0 18px;
  overflow: hidden;
}

#chat-surface.app-surface--active .chat-shell--custom {
  width: min(1040px, 92vw);
  height: calc(100vh - 122px);
  max-height: calc(100vh - 122px);
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
}

#chat-surface.app-surface--active .chat-area {
  min-height: 0;
  height: auto;
  margin-top: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

#chat-surface.app-surface--active .upload-status,
#chat-surface.app-surface--active .composer {
  margin-top: 0;
}

#chat-surface.app-surface--active .chat-compose-panel {
  min-height: 0;
}

@media (max-width: 760px) {
  #chat-surface.app-surface--active {
    padding-top: 88px;
    padding-bottom: 12px;
  }

  #chat-surface.app-surface--active .chat-shell--custom {
    width: 94vw;
    height: calc(100vh - 100px);
    max-height: calc(100vh - 100px);
    padding: 14px;
    grid-template-rows: auto minmax(0, 1fr);
  }
}

/* === ai analyzing guidance state === */
.chat-card--loading {
  border-color: rgba(56, 217, 255, 0.3);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
    rgba(12, 18, 32, 0.78);
  max-height: 180px;
  overflow-y: auto;
  overflow-x: hidden;
}

.chat-shell--custom .chat-line--loading {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.chat-shell--custom .chat-line--loading .chat-card--loading {
  width: min(72ch, 100%);
  max-width: 100%;
  justify-self: start;
  box-sizing: border-box;
}

.chat-loading-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.chat-loading-head strong {
  font-size: 13px;
  color: #eef7ff;
}

.chat-loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38d9ff;
  box-shadow: 0 0 0 rgba(56, 217, 255, 0.45);
  animation: chatLoadingPulse 1.3s ease-in-out infinite;
}

.chat-loading-text {
  margin: 0;
  color: rgba(214, 228, 248, 0.88);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

#chat-messages {
  min-width: 0;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

@keyframes chatLoadingPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(56, 217, 255, 0.28);
  }
  50% {
    transform: scale(1.2);
    box-shadow: 0 0 12px rgba(56, 217, 255, 0.58);
  }
}

/* === workflow required fields panel === */
.workflow-fields {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(100, 130, 200, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.008)),
    rgba(8, 12, 22, 0.48);
}

.workflow-fields .field {
  display: grid;
  gap: 6px;
}

.workflow-fields .field span {
  font-size: 12px;
  color: rgba(198, 213, 238, 0.84);
}

.workflow-fields input,
.workflow-fields select,
.workflow-fields textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(100, 130, 200, 0.25);
  background: rgba(9, 14, 24, 0.78);
  color: #eaf3ff;
  padding: 9px 10px;
  font-size: 13px;
}

.workflow-fields textarea {
  resize: vertical;
  min-height: 72px;
}

.workflow-fields .field:nth-child(3) {
  grid-column: span 2;
}

@media (max-width: 760px) {
  .workflow-fields {
    grid-template-columns: 1fr;
  }

  .workflow-fields .field:nth-child(3) {
    grid-column: auto;
  }
}

/* === single-page image workflow UI === */
.chat-compose-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

.chat-result-panel {
  display: none;
}

/* === image page redesign: keep only dialogue box borders === */
#chat-surface.app-surface--active {
  padding-top: 96px;
  padding-bottom: 14px;
}

#chat-surface.app-surface--active .chat-shell--custom {
  width: min(1080px, 93vw);
  height: calc(100vh - 114px);
  max-height: calc(100vh - 114px);
  padding: 20px 20px 16px;
  border: none !important;
  border-radius: 26px;
  background:
    radial-gradient(circle at 10% 0%, rgba(84, 156, 255, 0.16), transparent 46%),
    radial-gradient(circle at 92% 100%, rgba(63, 197, 221, 0.14), transparent 44%),
    linear-gradient(180deg, rgba(10, 14, 26, 0.9), rgba(7, 11, 20, 0.94));
  box-shadow:
    0 24px 70px rgba(1, 4, 10, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#chat-surface.app-surface--active .chat-shell--custom.wope-border::before,
#chat-surface.app-surface--active .chat-shell--custom.wope-border::after {
  display: none !important;
  content: none !important;
}

#chat-surface.app-surface--active .chat-header {
  gap: 6px;
  padding: 2px 2px 0;
}

#chat-surface.app-surface--active .chat-header h2 {
  font-size: clamp(22px, 2.8vw, 34px);
  letter-spacing: -0.02em;
}

#chat-surface.app-surface--active .chat-header p {
  color: rgba(209, 220, 238, 0.82);
}

#chat-surface.app-surface--active .chat-compose-panel {
  gap: 10px;
}

#chat-surface.app-surface--active .chat-area {
  border: none !important;
  border-radius: 18px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
    rgba(8, 13, 25, 0.56);
}

/* Remove liquid-glass decorative border layer in image workspace.
   That pseudo-element can overlap uploaded images and appear as a horizontal line. */
#chat-surface.app-surface--active .liquid-glass::before,
#chat-surface.app-surface--active .liquid-glass::after,
#chat-surface.app-surface--active .liquid-glass-strong::before,
#chat-surface.app-surface--active .liquid-glass-strong::after {
  content: none !important;
  display: none !important;
}

#chat-surface.app-surface--active .liquid-glass,
#chat-surface.app-surface--active .liquid-glass-strong {
  box-shadow: none !important;
}

#chat-surface.app-surface--active .chat-dock,
#chat-surface.app-surface--active .composer,
#chat-surface.app-surface--active .upload-btn,
#chat-surface.app-surface--active #chat-input,
#chat-surface.app-surface--active .send-btn,
#chat-surface.app-surface--active .stop-btn,
#chat-surface.app-surface--active .upload-status,
#chat-surface.app-surface--active .chat-line .badge {
  border: none !important;
}

#chat-surface.app-surface--active .chat-dock {
  border-radius: 16px;
  padding: 10px 10px 8px;
  background: rgba(6, 10, 20, 0.42);
}

#chat-surface.app-surface--active .composer {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none !important;
}

#chat-surface.app-surface--active #chat-input {
  color: #eef5ff;
}

#chat-surface.app-surface--active #chat-input::placeholder {
  color: rgba(187, 201, 223, 0.62);
}

#chat-surface.app-surface--active .upload-btn,
#chat-surface.app-surface--active .send-btn,
#chat-surface.app-surface--active .stop-btn {
  border-radius: 10px;
}

#chat-surface.app-surface--active .upload-btn {
  background: rgba(87, 165, 255, 0.16);
  color: #e7f3ff;
}

#chat-surface.app-surface--active .send-btn {
  background: linear-gradient(120deg, #5eb6ff, #2a7fff);
  color: #f8fcff;
  box-shadow: 0 10px 24px rgba(42, 127, 255, 0.34);
}

#chat-surface.app-surface--active .stop-btn {
  background: linear-gradient(120deg, #ef5b5b, #cd2f2f);
  box-shadow: 0 10px 24px rgba(205, 47, 47, 0.28);
}

#chat-surface.app-surface--active .chat-card {
  border: 1px solid rgba(146, 169, 205, 0.34) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    rgba(11, 17, 32, 0.74);
}

#chat-surface.app-surface--active .chat-line--user .chat-card {
  border-color: rgba(94, 182, 255, 0.44) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    rgba(38, 107, 202, 0.34);
}

@media (max-width: 760px) {
  #chat-surface.app-surface--active {
    padding-top: 86px;
    padding-bottom: 10px;
  }

  #chat-surface.app-surface--active .chat-shell--custom {
    width: 95vw;
    height: calc(100vh - 96px);
    max-height: calc(100vh - 96px);
    padding: 14px 12px 10px;
    border-radius: 18px;
  }
}

/* ===== Image Generate Console Upgrade ===== */
#chat-surface .chat-shell,
#chat-surface .chat-main {
  max-width: 100%;
}

#chat-surface .chat-shell {
  padding: 22px;
}

.image-console {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(420px, 1.5fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: start;
  min-height: 78vh;
}

.console-panel {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01)),
    rgba(8, 12, 22, 0.86);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 24px 60px rgba(0,0,0,0.38),
    inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.console-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(56,217,255,0.10), transparent 35%),
    radial-gradient(circle at 80% 0%, rgba(109,125,255,0.10), transparent 35%);
  pointer-events: none;
  opacity: 0.85;
}

.console-panel__inner {
  position: relative;
  z-index: 1;
  padding: 20px;
}

.console-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.console-title small {
  color: var(--muted);
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}

/* 左侧输入区 */
.prompt-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prompt-box textarea {
  width: 100%;
  min-height: 280px;
  resize: vertical;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  background: rgba(5, 8, 16, 0.72);
  color: var(--text);
  padding: 16px 16px 18px;
  font-size: 15px;
  line-height: 1.7;
  outline: none;
}

.prompt-box textarea:focus {
  border-color: rgba(56,217,255,0.28);
  box-shadow: 0 0 0 3px rgba(56,217,255,0.08);
}

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

.tag-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(56,217,255,0.08);
  border: 1px solid rgba(56,217,255,0.16);
  color: #dff8ff;
  font-size: 12px;
  cursor: pointer;
}

.tag-chip.is-active {
  background: rgba(56,217,255,0.18);
  border-color: rgba(56,217,255,0.34);
  box-shadow: 0 0 18px rgba(56,217,255,0.10);
}

.generate-btn {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(56,217,255,1), rgba(109,125,255,1));
  color: #03111a;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(56,217,255,0.22);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.generate-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 42px rgba(56,217,255,0.28);
  filter: brightness(1.04);
}

.generate-btn.is-loading {
  background: linear-gradient(135deg, rgba(109,125,255,1), rgba(207,148,60,1));
}

/* 中间画布区 */
.preview-stage {
  min-height: 620px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.preview-canvas {
  position: relative;
  min-height: 480px;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(56,217,255,0.18), transparent 32%),
    radial-gradient(circle at 50% 62%, rgba(109,125,255,0.16), transparent 36%),
    rgba(6, 10, 18, 0.92);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 30px 70px rgba(0,0,0,0.42),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.preview-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.04), transparent 38%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.05), transparent 60%);
  pointer-events: none;
}

.preview-canvas__empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

/* === image workbench spacing + clarity tuning === */
#chat-surface.app-surface--active .image-workbench {
  width: min(1180px, 92vw);
  margin: 26px auto 30px;
  gap: 24px;
  grid-template-columns: minmax(340px, 0.9fr) minmax(560px, 1.1fr);
  min-height: calc(100vh - 190px);
}

#chat-surface.app-surface--active .image-workbench__chat,
#chat-surface.app-surface--active .image-workbench__preview {
  background: rgba(8, 12, 22, 0.94);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(3px) saturate(1.02);
  -webkit-backdrop-filter: blur(3px) saturate(1.02);
}

#chat-surface.app-surface--active .image-workbench__chat::before,
#chat-surface.app-surface--active .image-workbench__preview::before {
  opacity: 0.38;
}

#chat-surface.app-surface--active .panel__head {
  padding: 22px 22px 0;
}

#chat-surface.app-surface--active .chat-stream {
  padding: 16px 22px;
  min-height: 260px;
  max-height: 40vh;
}

#chat-surface.app-surface--active .chat-input {
  padding: 2px 22px 16px;
  gap: 10px;
}

#chat-surface.app-surface--active .chat-input textarea {
  min-height: 124px;
}

#chat-surface.app-surface--active .chat-status {
  margin: 0 22px 22px;
}

#chat-surface.app-surface--active .preview-stage {
  margin: 16px 22px 12px;
  min-height: 460px;
  background:
    radial-gradient(circle at 50% 36%, rgba(56, 217, 255, 0.1), transparent 32%),
    radial-gradient(circle at 50% 66%, rgba(109, 125, 255, 0.08), transparent 36%),
    rgba(6, 10, 18, 0.96);
}

#chat-surface.app-surface--active .preview-history {
  margin: 0 22px 22px;
}

@media (max-width: 1100px) {
  #chat-surface.app-surface--active .image-workbench {
    width: min(96vw, 960px);
    margin: 16px auto 22px;
    gap: 14px;
    grid-template-columns: 1fr;
    min-height: auto;
  }

  #chat-surface.app-surface--active .chat-stream {
    max-height: none;
    min-height: 220px;
  }

  #chat-surface.app-surface--active .preview-stage {
    min-height: 360px;
  }
}


/* 背景统一：跟顶部标题栏接上 */
:root{
  --bg: #070b12;
  --bg-mid: #0b1120;
  --bg-deep: #04060b;
  --header-glow: rgba(56,217,255,0.08);
  --header-glow-2: rgba(109,125,255,0.08);
}


body::after{
  background: radial-gradient(
    circle 240px at var(--cursor-x, 50%) var(--cursor-y, 50%),
    rgba(56,217,255,0.02),
    rgba(109,125,255,0.01) 42%,
    transparent 76%
  );
}

#bg-canvas{
  opacity: 0.11;
  mix-blend-mode: screen;
  filter: blur(8px) saturate(1.02);
}

.bg-grid{
  opacity: 0.07;
  background-image:
    linear-gradient(rgba(80,110,180,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80,110,180,0.04) 1px, transparent 1px);
}

.bg-orbit{
  opacity: 0.10;
  background: radial-gradient(circle, rgba(56,217,255,0.12), rgba(56,217,255,0.035) 34%, transparent 70%);
}

.bg-orbit-2{
  opacity: 0.09;
  background: radial-gradient(circle, rgba(109,125,255,0.12), rgba(109,125,255,0.03) 36%, transparent 72%);
}


.hero-glow{
  background:
    radial-gradient(circle at 40% 48%, rgba(56,217,255,0.05), transparent 46%),
    radial-gradient(circle at 62% 63%, rgba(109,125,255,0.055), transparent 46%),
    radial-gradient(circle at 74% 78%, rgba(207,148,60,0.025), transparent 42%);
}

.hero-orb--one{
  background: radial-gradient(circle, rgba(56,217,255,0.10), rgba(56,217,255,0.02) 34%, transparent 70%);
}

.hero-orb--two{
  background: radial-gradient(circle, rgba(109,125,255,0.10), rgba(109,125,255,0.02) 36%, transparent 72%);
}

/* 方案A：统一成一套深色液态玻璃 */
:root{
  --bg: #070b12;
  --bg-mid: #0b1120;
  --bg-deep: #04060b;
  --glass-bg: rgba(8,12,22,0.80);
  --glass-bg-strong: rgba(10,14,24,0.90);
  --glass-border: rgba(255,255,255,0.075);
  --glass-shadow: 0 30px 80px rgba(0,0,0,0.36);
  --glass-blur: blur(20px) saturate(1.18);
}


#bg-canvas{
  opacity: 0.10;
  mix-blend-mode: screen;
  filter: blur(8px) saturate(1.02);
}

.bg-grid{
  opacity: 0.06;
}

.bg-orbit{
  opacity: 0.08;
}

.bg-orbit-2{
  opacity: 0.07;
}


/* 3) 所有主面板统一液态玻璃 */
.image-workbench__chat,
.image-workbench__preview,
.account-panel,
.chat-shell,
.sdk-shell,
.output-panel,
.log-panel,
.pipeline-shell,
.glass-card,
.capability-card,
.system-card{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012)),
    var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow:
    var(--glass-shadow),
    inset 0 1px 0 rgba(255,255,255,0.05),
    inset 0 -1px 0 rgba(0,0,0,0.18);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

/* 4) 删除/压制浅金色 SDK 那套 */
.sdk-stage,
.sdk-stage::before,
.sdk-stage::after,
.sdk-shell::before,
.sdk-shell::after{
  background: var(--glass-bg) !important;
  box-shadow: none !important;
  border-color: var(--glass-border) !important;
}


/* 6) 首页 hero 也统一，不再单独发金 */
.hero::after,
.hero-glow,
.hero-orb{
  opacity: 0.55;
}

.hero-tag,
.hero-tag--single{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.01)),
    rgba(8,12,22,0.72);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 10px 24px rgba(0,0,0,0.18);
}

.hero-tag__line{
  color: rgba(255,244,228,0.96);
  -webkit-text-fill-color: rgba(255,244,228,0.96);
}

/* 7) 占位页/面板统一边距 */
#chat-surface.app-surface--active .chat-shell--custom,
.account-panel,
.sdk-shell{
  border-radius: 28px;
}

/* image-workbench polish: unified bg + liquid glass */
body{
  background:
    radial-gradient(circle at 50% 0%, rgba(56,217,255,0.08), transparent 28%),
    radial-gradient(circle at 82% 8%, rgba(109,125,255,0.07), transparent 24%),
    linear-gradient(180deg, #090d16 0%, #070b12 42%, #05070d 100%);
}

body::before{
  background:
    radial-gradient(circle at 18% 22%, rgba(56,217,255,0.035), transparent 32%),
    radial-gradient(circle at 78% 20%, rgba(109,125,255,0.04), transparent 34%),
    radial-gradient(circle at 52% 12%, rgba(207,148,60,0.018), transparent 20%),
    radial-gradient(circle at 35% 74%, rgba(56,217,255,0.02), transparent 30%),
    radial-gradient(circle at 72% 72%, rgba(109,125,255,0.018), transparent 32%);
  filter: blur(10px);
}

.topbar{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01)),
    rgba(8,12,22,0.92);
  border:1px solid rgba(255,255,255,0.075);
}

.image-workbench{
  display:grid;
  grid-template-columns:minmax(0,0.92fr) minmax(0,1.48fr);
  gap:30px;
  min-height:78vh;
  align-items:start;
}

.image-workbench__chat,
.image-workbench__preview{
  position:relative;
  overflow:hidden;
  border-radius:28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012)),
    rgba(8,12,22,0.80);
  border:1px solid rgba(255,255,255,0.075);
  box-shadow:
    0 30px 80px rgba(0,0,0,0.36),
    inset 0 1px 0 rgba(255,255,255,0.05),
    inset 0 -1px 0 rgba(0,0,0,0.18);
  backdrop-filter:blur(20px) saturate(1.18);
  -webkit-backdrop-filter:blur(20px) saturate(1.18);
}

.image-workbench__chat::before,
.image-workbench__preview::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 18% 0%, rgba(56,217,255,0.10), transparent 30%),
    radial-gradient(circle at 82% 0%, rgba(109,125,255,0.10), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(255,255,255,0.05), transparent 42%);
  opacity:0.95;
}

.panel__head{
  position:relative;
  z-index:1;
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  padding:24px 26px 0;
  color:var(--text);
  font-size:14px;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.chat-stream{
  position:relative;
  z-index:1;
  padding:22px 26px 18px;
  display:flex;
  flex-direction:column;
  gap:14px;
  min-height:320px;
}

.chat-input{
  position:relative;
  z-index:1;
  padding:0 26px 20px;
  display:grid;
  gap:12px;
}

.chat-input textarea{
  width:100%;
  min-height:140px;
  resize:vertical;
  border-radius:20px;
  border:1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)),
    rgba(6,10,18,0.52);
  color:var(--text);
  padding:18px;
  font-size:15px;
  line-height:1.75;
  outline:none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    inset 0 -1px 0 rgba(0,0,0,0.16),
    0 10px 24px rgba(0,0,0,0.16);
}

.chat-input textarea:focus{
  border-color:rgba(56,217,255,0.26);
  box-shadow:
    0 0 0 3px rgba(56,217,255,0.08),
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 14px 28px rgba(0,0,0,0.18);
}

.chat-status{
  position:relative;
  z-index:1;
  margin:0 26px 22px;
  padding:12px 14px;
  border-radius:16px;
  background:rgba(56,217,255,0.08);
  border:1px solid rgba(56,217,255,0.16);
  color:#dff8ff;
  font-size:13px;
}

.preview-stage{
  position:relative;
  margin:22px 26px 16px;
  min-height:540px;
  border-radius:28px;
  overflow:hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(56,217,255,0.16), transparent 32%),
    radial-gradient(circle at 50% 62%, rgba(109,125,255,0.14), transparent 36%),
    rgba(6,10,18,0.90);
  border:1px solid rgba(255,255,255,0.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 18px 40px rgba(0,0,0,0.24);
}

.preview-history{
  margin:0 26px 24px;
  display:flex;
  gap:10px;
  overflow-x:auto;
}

.preview-thumb{
  flex:0 0 auto;
  width:116px;
  height:80px;
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.03);
  cursor:pointer;
  box-shadow:0 10px 24px rgba(0,0,0,0.18);
}

.preview-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}

@media (max-width:1100px){
  .image-workbench{
    grid-template-columns:1fr;
    gap:20px;
    height:auto;
    min-height:0;
  }

  .image-workbench__chat,
  .image-workbench__preview{
    margin-left:0;
    margin-right:0;
  }

  .panel__head{
    padding:20px 20px 0;
  }

  .chat-stream,
  .chat-input{
    padding-left:20px;
    padding-right:20px;
  }

  .chat-status{
    margin-left:20px;
    margin-right:20px;
  }

  .preview-stage{
    margin:18px 20px 14px;
    min-height:320px;
  }

  .preview-history{
    margin:0 20px 20px;
  }
}

/* === topbar unblocked actions + fullscreen adaptive layout === */
.topbar {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
}

.brand-mini {
  flex-shrink: 0;
}

.nav {
  min-width: 0;
  justify-content: center;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 2px 4px;
}

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

.topbar-actions {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* keep account/login visible when home is fullscreen */
#app-view:has(#nav-home.nav-item--active) .topbar--fixed {
  padding-left: clamp(10px, 2.2vw, 26px) !important;
  padding-right: clamp(10px, 2.2vw, 26px) !important;
  z-index: 10 !important;
}

#app-view:has(#nav-home.nav-item--active) .topbar .topbar-actions {
  position: relative;
  z-index: 2;
}

/* global app surface adaptive spacing in fullscreen mode */
#app-view.view--active .app-surface {
  box-sizing: border-box;
}

@media (max-width: 1280px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 12px 14px !important;
    gap: 10px;
  }

  .nav-item {
    padding: 8px 12px;
    font-size: 12px;
  }

  .topbar-actions .icon-btn {
    padding: 8px 11px;
    font-size: 12px;
    white-space: nowrap;
  }
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr);
    row-gap: 8px;
  }

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

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

@media (max-width: 760px) {
  .topbar--fixed {
    width: calc(100vw - 14px) !important;
    left: 7px !important;
    transform: none !important;
    top: 8px !important;
    border-radius: 14px !important;
  }

  .brand-mini {
    padding: 7px 10px;
    font-size: 14px;
  }

  .nav-item {
    padding: 7px 10px;
    font-size: 11px;
  }

  .topbar-actions .icon-btn {
    font-size: 11px;
    padding: 7px 10px;
  }

  #chat-surface.app-surface--active {
    padding-top: 84px !important;
    padding-bottom: 10px !important;
  }
}

/* home marquee hard lock near bottom */
#home-surface.app-surface--active .marquee-wrap {
  position: fixed !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  bottom: 4px !important;
  margin: 0 !important;
  z-index: 8 !important;
}

/* unified topbar style for all surfaces: same as home */
#app-view.view--active .topbar--fixed {
  top: 0 !important;
  left: 0 !important;
  transform: none !important;
  width: 100vw !important;
  border-radius: 0 !important;
  z-index: 12 !important;
  padding-left: clamp(10px, 2.2vw, 26px) !important;
  padding-right: clamp(10px, 2.2vw, 26px) !important;
}

#app-view.view--active .topbar,
#app-view.view--active .topbar.wope-border {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#app-view.view--active .topbar::before,
#app-view.view--active .topbar::after,
#app-view.view--active .topbar.wope-border::before,
#app-view.view--active .topbar.wope-border::after {
  content: none !important;
  display: none !important;
}

/* login view background restore (only when app is not active) */
body:not(.app-mode) {
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 120% 72% at 50% -8%, rgba(16, 26, 48, 0.98) 0%, rgba(8, 12, 22, 0.18) 58%, transparent 76%),
    radial-gradient(ellipse 84% 54% at 6% 96%, rgba(10, 24, 40, 0.82) 0%, transparent 62%),
    radial-gradient(ellipse 72% 48% at 94% 88%, rgba(18, 12, 34, 0.72) 0%, transparent 58%),
    linear-gradient(180deg, #070910 0%, #090d17 32%, #070911 100%);
}

body:not(.app-mode)::before {
  background:
    radial-gradient(circle at 22% 30%, rgba(56, 217, 255, 0.045), transparent 34%),
    radial-gradient(circle at 76% 30%, rgba(109, 125, 255, 0.05), transparent 36%),
    radial-gradient(circle at 58% 18%, rgba(207, 148, 60, 0.03), transparent 22%),
    radial-gradient(circle at 34% 76%, rgba(56, 217, 255, 0.028), transparent 30%),
    radial-gradient(circle at 74% 72%, rgba(109, 125, 255, 0.028), transparent 32%);
  filter: blur(12px);
  animation: ambientDrift 24s ease-in-out infinite;
}

body:not(.app-mode)::after {
  background: radial-gradient(
    circle 280px at var(--cursor-x, 50%) var(--cursor-y, 50%),
    rgba(56, 217, 255, 0.03),
    rgba(109, 125, 255, 0.012) 42%,
    transparent 76%
  );
}

body:not(.app-mode) #bg-canvas {
  opacity: 0.18;
  filter: blur(10px) saturate(1.08);
}

body:not(.app-mode) .bg-grid {
  opacity: 0.09;
}

body:not(.app-mode) .bg-orbit {
  opacity: 0.13;
}

body:not(.app-mode) .bg-orbit-2 {
  opacity: 0.12;
}

/* hard fallback: login view owns its background layers */
#login-view.view--active {
  background:
    radial-gradient(ellipse 120% 72% at 50% -8%, rgba(16, 26, 48, 0.98) 0%, rgba(8, 12, 22, 0.18) 58%, transparent 76%),
    radial-gradient(ellipse 84% 54% at 6% 96%, rgba(10, 24, 40, 0.82) 0%, transparent 62%),
    radial-gradient(ellipse 72% 48% at 94% 88%, rgba(18, 12, 34, 0.72) 0%, transparent 58%),
    linear-gradient(180deg, #070910 0%, #090d17 32%, #070911 100%) !important;
}

#login-view.view--active::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 30%, rgba(56, 217, 255, 0.045), transparent 34%),
    radial-gradient(circle at 76% 30%, rgba(109, 125, 255, 0.05), transparent 36%),
    radial-gradient(circle at 58% 18%, rgba(207, 148, 60, 0.03), transparent 22%),
    radial-gradient(circle at 34% 76%, rgba(56, 217, 255, 0.028), transparent 30%),
    radial-gradient(circle at 74% 72%, rgba(109, 125, 255, 0.028), transparent 32%);
  filter: blur(12px);
  z-index: 0;
}

#login-view.view--active > * {
  position: relative;
  z-index: 1;
}

/* === chat/workbench fixed panels + inner auto scroll (final override) === */
#chat-surface.app-surface--active .image-workbench{
  height: calc(100vh - 150px) !important;
  min-height: 0 !important;
  align-items: stretch !important;
}

#chat-surface.app-surface--active .image-workbench__chat,
#chat-surface.app-surface--active .image-workbench__preview{
  height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

#chat-surface.app-surface--active .chat-stream{
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

#chat-surface.app-surface--active .chat-input,
#chat-surface.app-surface--active .chat-status,
#chat-surface.app-surface--active .preview-history{
  flex: 0 0 auto !important;
}

#chat-surface.app-surface--active .preview-stage{
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: hidden !important;
}

#chat-surface.app-surface--active .preview-stage .preview-stage__stream{
  height: 100% !important;
}

#chat-surface.app-surface--active .preview-stage .preview-stage__stream-content{
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

@media (max-width:1100px){
  #chat-surface.app-surface--active .image-workbench{
    height: auto !important;
  }

  #chat-surface.app-surface--active .image-workbench__chat,
  #chat-surface.app-surface--active .image-workbench__preview{
    height: min(68vh, 720px) !important;
  }
}

/* === image workbench upload + send button refresh === */
.chat-input__bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.chat-input__left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.reference-file-info{
  font-size:12px;
  color:rgba(205,219,242,0.82);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:200px;
}

#attach-reference-btn{
  border-radius:12px;
  border:1px solid rgba(125,165,255,0.3);
  background:rgba(95,133,220,0.16);
  color:#e7f2ff;
  padding:10px 14px;
  line-height:1;
}

#attach-reference-btn:hover{
  background:rgba(95,133,220,0.24);
  border-color:rgba(125,165,255,0.42);
}

#send-image-request-btn.send-image-btn{
  border:none;
  border-radius:14px;
  padding:11px 18px;
  background:linear-gradient(135deg,#63d6ff,#4a86ff);
  color:#ffffff;
  text-shadow:0 1px 2px rgba(0,0,0,0.28);
  font-weight:800;
  letter-spacing:.02em;
  box-shadow:0 12px 28px rgba(74,134,255,.34);
}

#send-image-request-btn.send-image-btn:hover{
  transform:translateY(-1px);
  filter:brightness(1.05);
  box-shadow:0 16px 34px rgba(74,134,255,.4);
}

#send-image-request-btn.send-image-btn:active{
  transform:translateY(0);
}

.chat-bubble--user{
  align-self:flex-end;
  background:rgba(83,145,255,.2);
  border-color:rgba(115,167,255,.38);
}

.chat-bubble__gallery{
  margin-top:10px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.chat-bubble__gallery img{
  width:72px;
  height:72px;
  border-radius:10px;
  object-fit:cover;
  border:1px solid rgba(255,255,255,.12);
}

/* === image page final background continuity fix === */
#chat-surface.app-surface--active{
  position: fixed !important;
  inset: 0 !important;
  display: block !important;
  box-sizing: border-box;
  padding: 98px 0 18px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(56,217,255,0.08), transparent 28%),
    radial-gradient(circle at 82% 8%, rgba(109,125,255,0.07), transparent 24%),
    linear-gradient(180deg, #090d16 0%, #070b12 42%, #05070d 100%) !important;
}

#chat-surface.app-surface--active .image-workbench{
  width: min(1180px, 94vw) !important;
  margin: 10px auto 20px !important;
  gap: 24px !important;
  min-height: calc(100vh - 150px) !important;
}

#chat-surface.app-surface--active .image-workbench__chat,
#chat-surface.app-surface--active .image-workbench__preview{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.012)),
    rgba(8,12,22,0.86) !important;
  backdrop-filter: blur(10px) saturate(1.08) !important;
  -webkit-backdrop-filter: blur(10px) saturate(1.08) !important;
}

@media (max-width:1100px){
  #chat-surface.app-surface--active{
    padding-top: 86px !important;
    padding-bottom: 12px !important;
  }

  #chat-surface.app-surface--active .image-workbench{
    width: min(96vw, 960px) !important;
    margin: 8px auto 14px !important;
    gap: 16px !important;
    min-height: auto !important;
  }
}
