:root {
  --bg: #e7def7;
  --panel: #ffffff;
  --panel-soft: #f3eefb;
  --panel-deep: #ece4f8;
  --line: rgba(20, 18, 32, 0.10);
  --line-strong: rgba(20, 18, 32, 0.18);
  --text: #15121f;
  --muted: #6c6480;
  --dim: #9a93ab;
  --cyan: #c6ff19;
  --purple: #7b2cff;
  --purple-soft: #a855f7;
  --green: #c6ff19;
  --amber: #d98a00;
  --danger: #e23d63;
  --radius: 14px;
  --sidebar: 310px;
  --shadow: 0 22px 60px rgba(90, 55, 170, 0.16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(20, 18, 32, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 18, 32, 0.018) 1px, transparent 1px),
    radial-gradient(circle at 62% -10%, rgba(123, 44, 255, 0.20), transparent 34%);
  background-size: 42px 42px, 42px 42px, auto;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  gap: 34px;
  min-height: 100vh;
  padding: 16px 22px 26px 14px;
}

.sidebar {
  position: sticky;
  top: 16px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: calc(100vh - 32px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(20, 18, 32, 0.18) transparent;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
}

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

.brand-symbol {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(198, 255, 25, 0.45);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(198, 255, 25, 0.12), rgba(123, 44, 255, 0.18));
  color: var(--green);
  font-size: 17px;
  font-weight: 950;
}

.brand-text strong,
.brand-text small {
  display: block;
}

.brand-text strong {
  font-size: 18px;
  font-weight: 920;
}

.brand-text small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.collapse-mark {
  color: var(--muted);
  font-size: 28px;
}

.nav-block {
  display: grid;
  gap: 8px;
}

.nav-block.account {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.nav-block p {
  margin: 0 0 10px;
  color: var(--dim);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-link {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-weight: 850;
}

.nav-link span:not(.nav-icon):not(.chev) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-icon {
  color: #c4bfce;
  font-size: 17px;
}

.chev {
  color: #6e6a78;
}

.nav-link.active,
.nav-link:hover,
.nav-link:focus-visible {
  border-color: rgba(123, 44, 255, 0.24);
  background: rgba(20, 18, 32, 0.075);
  color: var(--text);
  outline: 0;
}

.nav-link.active .nav-icon {
  color: var(--purple);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, #285e76, #554079);
  font-weight: 950;
}

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

.user-card small {
  margin-top: 3px;
  color: var(--muted);
}

.user-action {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(20, 18, 32, 0.08);
  border-radius: 8px;
  background: rgba(20, 18, 32, 0.055);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.ecosystem-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(198, 255, 25, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(198, 255, 25, 0.08), rgba(198, 255, 25, 0.035)),
    rgba(20, 18, 32, 0.035);
}

.ecosystem-card p {
  margin: 0 0 4px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ecosystem-link {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid rgba(20, 18, 32, 0.07);
  border-radius: 8px;
  background: rgba(20, 18, 32, 0.045);
}

.ecosystem-link:hover,
.ecosystem-link:focus-visible {
  border-color: rgba(198, 255, 25, 0.26);
  background: rgba(20, 18, 32, 0.075);
  outline: 0;
}

.ecosystem-link span {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

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

.model-flyout {
  position: fixed;
  left: 330px;
  top: 250px;
  z-index: 80;
  width: min(520px, calc(100vw - 360px));
  max-height: min(610px, calc(100vh - 110px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 24px 80px rgba(90, 55, 170, 0.12);
  visibility: hidden;
  opacity: 0;
  transform: translate(-14px, 10px) scale(0.975);
  pointer-events: none;
  will-change: opacity, transform;
  transition:
    opacity 0.24s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1),
    visibility 0s linear 0.24s;
  overflow: auto;
  backdrop-filter: blur(18px);
}

.model-flyout {
  scrollbar-color: rgba(20, 18, 32, 0.28) rgba(20, 18, 32, 0.04);
  scrollbar-width: thin;
}

.model-flyout::-webkit-scrollbar,
.control-menu::-webkit-scrollbar {
  width: 8px;
}

.model-flyout::-webkit-scrollbar-track,
.control-menu::-webkit-scrollbar-track {
  background: rgba(20, 18, 32, 0.04);
  border-radius: 999px;
}

.model-flyout::-webkit-scrollbar-thumb,
.control-menu::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(20, 18, 32, 0.2);
}

.model-flyout::-webkit-scrollbar-thumb:hover,
.control-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(20, 18, 32, 0.3);
}

.model-flyout.open {
  visibility: visible !important;
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) scale(1) !important;
  pointer-events: auto !important;
  transition-delay: 0s;
}

.flyout-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 8px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.flyout-head p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}

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

.flyout-model {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.flyout-model:hover,
.flyout-model:focus-visible,
.flyout-model.active {
  border-color: rgba(20, 18, 32, 0.08);
  background: rgba(20, 18, 32, 0.065);
  outline: 0;
}

.model-logo,
.current-logo {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid rgba(20, 18, 32, 0.08);
  background:
    radial-gradient(circle at 28% 20%, rgba(20, 18, 32, 0.16), transparent 34%),
    #10131a;
  color: var(--green);
  font-size: 11px;
  font-weight: 950;
}

.model-logo img,
.current-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.model-logo svg,
.current-logo svg {
  position: relative;
  z-index: 2;
  width: 21px;
  height: 21px;
}

.current-logo svg {
  width: 29px;
  height: 29px;
}

.model-logo span,
.current-logo span {
  position: relative;
  z-index: 2;
}

.model-logo:not(.has-image)::before,
.current-logo:not(.has-image)::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
  opacity: 0.38;
}

.model-logo:not(.has-image)::after,
.current-logo:not(.has-image)::after {
  content: "";
  position: absolute;
  right: 9px;
  bottom: 8px;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: currentColor;
  opacity: 0.18;
  transform: rotate(45deg);
}

.provider-google {
  color: #8ab4ff;
  background: radial-gradient(circle at 28% 24%, rgba(52, 168, 83, 0.36), transparent 34%), linear-gradient(135deg, #151923, #10203a);
}

.provider-openai {
  color: #eef3ef;
  background: radial-gradient(circle at 72% 28%, rgba(20, 18, 32, 0.18), transparent 35%), linear-gradient(135deg, #111713, #23252a);
}

.provider-anthropic {
  color: #e8d9c5;
  background: radial-gradient(circle at 72% 24%, rgba(232, 217, 197, 0.2), transparent 34%), linear-gradient(135deg, #201a17, #38302a);
}

.provider-bytedance,
.provider-alibaba,
.provider-qwen {
  color: #8cff76;
  background: radial-gradient(circle at 30% 24%, rgba(198, 255, 25, 0.3), transparent 34%), linear-gradient(135deg, #0d1712, #17241c);
}

.provider-grok {
  color: #f3f5ff;
  background: radial-gradient(circle at 32% 28%, rgba(20, 18, 32, 0.22), transparent 35%), linear-gradient(135deg, #0c0f13, #222633);
}

.provider-kling,
.provider-wan,
.provider-hailuo,
.provider-runway {
  color: #74f1ff;
  background: radial-gradient(circle at 32% 24%, rgba(198, 255, 25, 0.32), transparent 34%), linear-gradient(135deg, #0a151b, #152533);
}

.provider-elevenlabs,
.provider-suno {
  color: #ffd470;
  background: radial-gradient(circle at 30% 24%, rgba(255, 184, 77, 0.3), transparent 34%), linear-gradient(135deg, #201915, #2c2534);
}

.provider-black-forest-labs,
.provider-topaz,
.provider-recraft,
.provider-ideogram {
  color: #d7a4ff;
  background: radial-gradient(circle at 32% 24%, rgba(123, 44, 255, 0.3), transparent 34%), linear-gradient(135deg, #17111f, #24202c);
}

.flyout-model strong,
.flyout-model small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flyout-model strong {
  font-size: 14px;
}

.flyout-model small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(20, 18, 32, 0.07);
  color: #bfb8cb;
  font-size: 11px;
  font-weight: 900;
}

.studio {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 22px;
  align-content: start;
  min-width: 0;
  padding: 8px 0 0;
}

.studio-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
}

.current-model,
.actions,
.compose-controls,
.mode-tabs {
  display: flex;
  align-items: center;
}

.current-model {
  gap: 10px;
  min-width: 0;
}

.current-logo {
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
}

.current-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: min(270px, 40vw);
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(20, 18, 32, 0.07);
  color: var(--text);
  text-align: left;
}

.current-trigger strong,
.current-trigger small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.current-trigger strong {
  font-size: 16px;
}

.current-trigger small {
  color: var(--muted);
  font-size: 12px;
}

.current-trigger span {
  grid-column: 2;
  grid-row: 1 / 3;
  color: var(--muted);
}

.provider-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(20, 18, 32, 0.045);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.actions {
  justify-content: flex-end;
  gap: 10px;
}

.ecosystem-top-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(20, 18, 32, 0.055);
  color: #5b566b;
  font-size: 13px;
  font-weight: 900;
}

.ecosystem-top-link:hover,
.ecosystem-top-link:focus-visible {
  border-color: rgba(198, 255, 25, 0.26);
  background: rgba(198, 255, 25, 0.09);
  outline: 0;
}

.icon-button,
.soft-button,
.generate-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: var(--radius);
  font-weight: 900;
}

.icon-button,
.soft-button {
  border: 1px solid var(--line);
  background: rgba(20, 18, 32, 0.065);
  color: var(--text);
}

.icon-button {
  width: 48px;
}

.soft-button {
  padding: 0 18px;
}

.generate-top {
  min-width: 124px;
  border: 0;
  background: linear-gradient(135deg, var(--purple), var(--purple-soft) 50%, var(--green));
  color: #08090c;
  box-shadow: 0 20px 44px rgba(123, 44, 255, 0.30);
}

.hero-panel {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #ffffff, #f3ecfc);
}

.hero-visual {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.55) 36%, rgba(255, 255, 255, 0.1) 78%),
    radial-gradient(circle at 76% 28%, rgba(198, 255, 25, 0.32), transparent 32%),
    radial-gradient(circle at 62% 70%, rgba(123, 44, 255, 0.22), transparent 36%),
    linear-gradient(135deg, #f6eefc, #efe7fb 62%, #f7ecf5);
  transform: scale(1.01);
}

.hero-visual::before,
.hero-visual::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(20, 18, 32, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.hero-visual::before {
  width: 360px;
  height: 360px;
  right: 12%;
  top: 12%;
  background: radial-gradient(circle, rgba(20, 18, 32, 0.06), transparent 62%);
}

.hero-visual::after {
  width: 180px;
  height: 180px;
  right: 31%;
  bottom: 12%;
  transform: rotate(18deg);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(20, 18, 32, 0.05), transparent);
}

.hero-copy {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 390px;
  width: min(470px, 64%);
  padding: 46px 60px;
}

.hero-copy p {
  margin: 0 0 22px;
  color: var(--purple);
  font-size: 27px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-copy span {
  display: block;
  margin-top: 22px;
  color: rgba(20, 18, 32, 0.56);
  font-size: 16px;
  font-weight: 850;
}

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

.ecosystem-tile {
  min-height: 84px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(20, 18, 32, 0.05);
}

.ecosystem-tile:hover,
.ecosystem-tile:focus-visible {
  border-color: rgba(198, 255, 25, 0.28);
  background: rgba(20, 18, 32, 0.075);
  outline: 0;
}

.ecosystem-tile.is-current {
  border-color: rgba(198, 255, 25, 0.28);
  background: linear-gradient(145deg, rgba(198, 255, 25, 0.11), rgba(198, 255, 25, 0.07));
}

.ecosystem-tile b,
.ecosystem-tile span {
  display: block;
}

.ecosystem-tile b {
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
}

.ecosystem-tile span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.cards-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 16px;
}

.model-card {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 74% 20%, rgba(198, 255, 25, 0.18), transparent 32%),
    radial-gradient(circle at 20% 76%, rgba(123, 44, 255, 0.2), transparent 35%),
    #11141b;
  color: #fff;
  text-align: left;
}

.model-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 8%, rgba(255, 255, 255, 0.78)),
    linear-gradient(rgba(20, 18, 32, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 18, 32, 0.026) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
}

.buy-action {
  color: #071000;
  background: linear-gradient(135deg, #c6ff19, #76ffb1);
  border-color: transparent;
}

.payment-popover {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.payment-popover[hidden] { display: none; }
.payment-backdrop { position: absolute; inset: 0; background: rgba(2, 2, 4, .72); backdrop-filter: blur(18px); }
.payment-card {
  position: relative;
  width: min(720px, 100%);
  max-height: min(760px, 88vh);
  overflow: auto;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 28px;
  color: #fff;
  background: radial-gradient(circle at 80% 0, rgba(198, 255, 25, .15), transparent 35%), rgba(10, 10, 16, .94);
  box-shadow: 0 32px 120px rgba(0, 0, 0, .62), inset 0 1px rgba(255, 255, 255, .12);
}
.payment-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; }
.payment-kicker { color: #c6ff19; font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.payment-card h2 { margin: 10px 0 8px; font-size: clamp(28px, 5vw, 44px); }
.payment-card > p, .payment-card > small { color: rgba(255, 255, 255, .62); }
.payment-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 24px 0; }
.payment-product {
  display: grid;
  gap: 7px;
  text-align: left;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 20px;
  color: #fff;
  background: rgba(255, 255, 255, .06);
}
.payment-product:hover { border-color: rgba(198, 255, 25, .55); transform: translateY(-1px); }
.payment-product b { font-size: 18px; }
.payment-product span { color: #c6ff19; font-weight: 800; }
.payment-product small { color: rgba(255, 255, 255, .56); }

.card-mark {
  position: absolute;
  z-index: 1;
  top: 18px;
  left: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(20, 18, 32, 0.12);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.24);
  color: var(--green);
  font-size: 12px;
  font-weight: 950;
}

.card-mark img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.model-card small,
.model-card strong {
  position: absolute;
  z-index: 1;
  left: 16px;
  right: 16px;
}

.model-card small {
  bottom: 54px;
  color: rgba(20, 18, 32, 0.62);
  font-size: 12px;
  font-weight: 900;
}

.model-card strong {
  bottom: 20px;
  font-size: 20px;
  line-height: 1.1;
}

.model-card.active {
  border-color: rgba(198, 255, 25, 0.5);
}

.composer,
.history-panel,
.payload-drawer {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
}

.composer {
  display: grid;
  grid-template-columns: minmax(138px, 190px) minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
}

.drop-tile {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 150px;
  gap: 12px;
  border: 1px dashed rgba(123, 44, 255, 0.42);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.drop-tile input {
  display: none;
}

.drop-tile span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(198, 255, 25, 0.1);
  color: var(--green);
  font-size: 22px;
}

.compose-box {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.mode-tabs {
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.mode-tabs::-webkit-scrollbar {
  display: none;
}

.mode-tab {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(20, 18, 32, 0.06);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.mode-tab.active {
  border-color: transparent;
  background: var(--cyan);
  color: #051014;
}

textarea,
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  outline: 0;
}

textarea {
  min-height: 118px;
  padding: 15px 17px;
  resize: vertical;
  line-height: 1.45;
}

input {
  min-height: 44px;
  padding: 0 13px;
}

textarea:focus,
input:focus {
  border-color: rgba(198, 255, 25, 0.45);
  box-shadow: 0 0 0 3px rgba(198, 255, 25, 0.11);
}

.compose-controls {
  flex-wrap: wrap;
  gap: 7px;
}

.mini-control,
.audio-pill,
.price-pill,
.info-pill,
.mic-button,
.send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(20, 18, 32, 0.065);
  color: var(--muted);
  font-weight: 900;
}

.mini-control {
  padding: 0 11px;
}

.mini-control b,
.audio-pill,
.price-pill b {
  color: var(--text);
}

.mini-control i {
  color: var(--dim);
  font-style: normal;
}

.audio-pill {
  padding: 0 13px;
}

.audio-pill i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--dim);
}

.audio-pill.active {
  border-color: rgba(198, 255, 25, 0.3);
  background: rgba(198, 255, 25, 0.12);
  color: var(--cyan);
}

.audio-pill.active i {
  background: var(--cyan);
  box-shadow: 0 0 16px rgba(198, 255, 25, 0.7);
}

.price-pill {
  min-width: 72px;
  color: var(--amber);
}

.info-pill,
.mic-button {
  min-width: 52px;
}

.send-button {
  width: 56px;
  border: 0;
  background: var(--cyan);
  color: #061014;
  font-size: 18px;
}

.history-panel {
  min-height: 210px;
  display: grid;
  padding: 22px;
  box-shadow: none;
}

.empty-history {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  min-height: 166px;
  color: var(--muted);
  text-align: center;
}

.empty-history span {
  color: var(--dim);
  font-size: 44px;
}

.empty-history strong {
  color: #b9b5c2;
  font-size: 18px;
}

.empty-history p {
  margin: 0;
}

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

.job-card {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(20, 18, 32, 0.045);
}

.job-card strong {
  font-size: 14px;
}

.job-card span {
  color: var(--muted);
  font-size: 12px;
}

.job-card small,
.job-card code {
  min-width: 0;
  overflow: hidden;
  color: #5b566b;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-card code {
  padding: 5px 7px;
  border: 1px solid rgba(20, 18, 32, 0.08);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--cyan);
}

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

.job-media {
  width: 100%;
  max-height: 260px;
  border: 1px solid rgba(20, 18, 32, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.34);
  object-fit: contain;
}

.job-output-text {
  max-height: 320px;
  overflow-y: auto;
  padding: 12px 14px;
  border: 1px solid rgba(20, 18, 32, 0.08);
  border-radius: 10px;
  background: rgba(20, 18, 32, 0.04);
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

audio.job-media {
  height: 44px;
  max-height: 44px;
}

.job-output-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(198, 255, 25, 0.32);
  border-radius: 9px;
  background: rgba(198, 255, 25, 0.12);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.job-output-link:hover {
  border-color: rgba(198, 255, 25, 0.56);
  background: rgba(198, 255, 25, 0.18);
}

.progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(20, 18, 32, 0.08);
}

.progress i {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
}

.payload-drawer {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 95;
  display: none;
  width: min(420px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  padding: 16px;
  overflow: auto;
}

.payload-drawer.open {
  display: grid;
  gap: 12px;
}

.payload-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.payload-head span {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.payload-head button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(20, 18, 32, 0.05);
  color: var(--muted);
  font-size: 20px;
}

pre {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.32);
  color: #5b566b;
  white-space: pre-wrap;
  font: 11px/1.52 ui-monospace, SFMono-Regular, Consolas, monospace;
}

form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 18px;
  width: min(1160px, calc(100% - 44px));
  margin: 0 22px 28px auto;
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer a {
  color: #5b566b;
  font-weight: 850;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 320;
  max-width: min(520px, calc(100% - 32px));
  padding: 12px 14px;
  border: 1px solid rgba(123, 44, 255, 0.32);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.auth-popover {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: grid;
  place-items: center;
  padding: 22px;
}

.auth-popover[hidden] {
  display: none;
}

.auth-popover-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 18%, rgba(198, 255, 25, 0.20), transparent 26%),
    radial-gradient(circle at 28% 76%, rgba(123, 44, 255, 0.28), transparent 30%),
    rgba(5, 5, 7, 0.54);
  backdrop-filter: blur(16px) saturate(1.15);
}

.auth-popover-card {
  position: relative;
  display: grid;
  gap: 18px;
  width: min(560px, 100%);
  padding: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.07)),
    rgba(10, 10, 16, 0.72);
  color: #fff;
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.56), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.auth-popover-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    linear-gradient(118deg, rgba(198, 255, 25, 0.22), transparent 30%),
    linear-gradient(284deg, rgba(123, 44, 255, 0.24), transparent 36%);
  opacity: 0.9;
}

.auth-popover-card > * {
  position: relative;
}

.auth-popover-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font-size: 22px;
  line-height: 1;
}

.auth-popover-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 34px;
}

.auth-popover-brand strong,
.auth-popover-brand small {
  display: block;
}

.auth-popover-brand strong {
  font-family: var(--display);
  font-size: clamp(20px, 3.2vw, 30px);
  line-height: 1.04;
}

.auth-popover-brand small,
.auth-popover-copy,
.auth-popover-note {
  color: rgba(247, 247, 251, 0.68);
}

.auth-popover-copy p,
.auth-popover-note {
  margin: 0;
  line-height: 1.5;
}

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

.quick-auth,
.glass-action {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.quick-auth:not(.primary) {
  opacity: 0.82;
}

.quick-auth {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon note";
  align-items: center;
  gap: 0 12px;
  min-height: 76px;
  padding: 12px;
  border-radius: 16px;
  text-align: left;
}

.quick-auth span {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.10);
  color: var(--brand-lime);
  font-weight: 950;
}

.quick-auth b {
  grid-area: title;
  font-size: 16px;
}

.quick-auth small {
  grid-area: note;
  color: rgba(247, 247, 251, 0.58);
  font-weight: 800;
}

.quick-auth.primary {
  border-color: rgba(198, 255, 25, 0.42);
  background: linear-gradient(135deg, rgba(198, 255, 25, 0.20), rgba(255, 255, 255, 0.07));
}

.quick-auth:hover,
.glass-action:hover,
.auth-popover-close:hover {
  transform: translateY(-1px);
  border-color: rgba(198, 255, 25, 0.48);
}

.auth-popover-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.glass-action {
  min-height: 48px;
  border-radius: 14px;
  font-weight: 950;
}

.auth-popover-note {
  font-size: 13px;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 70% 20%, rgba(123, 44, 255, 0.18), transparent 34%),
    radial-gradient(circle at 25% 80%, rgba(198, 255, 25, 0.12), transparent 30%),
    rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.auth-gate[hidden] {
  display: none;
}

.auth-card {
  display: grid;
  gap: 18px;
  width: min(430px, 100%);
  padding: 24px;
  border: 1px solid rgba(20, 18, 32, 0.09);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 30px 120px rgba(90, 55, 170, 0.12);
}

.auth-brand,
.auth-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand strong,
.auth-brand small {
  display: block;
}

.auth-brand small,
.auth-status {
  color: var(--muted);
}

.auth-tabs {
  padding: 4px;
  border: 1px solid rgba(20, 18, 32, 0.08);
  border-radius: 12px;
  background: rgba(20, 18, 32, 0.04);
}

.auth-tab {
  flex: 1;
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.auth-tab.active {
  background: var(--cyan);
  color: #061014;
}

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

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.auth-form button {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(100deg, var(--purple), var(--cyan), var(--green));
  color: #08090c;
  font-weight: 950;
}

.auth-status {
  margin: 0;
  line-height: 1.45;
}

.admin-drawer {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 96;
  display: none;
  width: min(520px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.admin-drawer.open {
  display: grid;
  gap: 12px;
}

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

.admin-user {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(20, 18, 32, 0.08);
  border-radius: 10px;
  background: rgba(20, 18, 32, 0.045);
}

.admin-user.pending {
  border-color: rgba(255, 176, 76, 0.34);
}

.admin-user strong,
.admin-user small {
  display: block;
}

.admin-user small {
  margin-top: 4px;
  color: var(--muted);
}

.admin-user b {
  color: var(--cyan);
}

.admin-user div {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-user button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(20, 18, 32, 0.09);
  border-radius: 8px;
  background: rgba(20, 18, 32, 0.065);
  color: var(--text);
  font-weight: 900;
}

.legal-page {
  min-height: 100vh;
  padding: 38px 20px;
}

.legal-doc {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
}

.legal-doc h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.04;
}

.legal-doc h2 {
  margin: 28px 0 10px;
  font-size: 20px;
}

.legal-doc p,
.legal-doc li {
  color: #5b566b;
  line-height: 1.62;
}

.legal-doc a {
  color: var(--cyan);
}

.legal-doc ul {
  padding-left: 20px;
}

.legal-meta {
  color: var(--muted);
  font-weight: 850;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 12px;
  }

  .sidebar {
    position: relative;
    top: auto;
    height: auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    padding: 14px;
  }

  .nav-block {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

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

  .nav-block p,
  .nav-block.account {
    display: none;
  }

  .nav-link {
    width: auto;
    flex: 0 0 auto;
  }

  .user-card {
    grid-column: 1 / -1;
  }

  .ecosystem-card {
    grid-column: 1 / -1;
  }

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

  .model-flyout {
    left: 16px;
    top: 140px;
    width: calc(100vw - 32px);
  }

  .site-footer {
    width: calc(100% - 24px);
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 760px) {
  .sidebar {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 14px;
  }

  .brand {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
  }

  .brand-symbol {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    font-size: 15px;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .user-card {
    grid-column: auto;
    padding: 10px 0 0;
    border-top: 1px solid var(--line);
  }

  .nav-block {
    width: 100%;
    padding: 1px 0 4px;
  }

  .nav-link {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 5px;
    width: 86px;
    min-height: 54px;
    padding: 8px 9px;
    text-align: center;
  }

  .nav-link span:not(.nav-icon):not(.chev) {
    max-width: 68px;
    font-size: 11px;
    line-height: 1.1;
  }

  .nav-link .chev {
    display: none;
  }

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

  .studio-top {
    display: grid;
  }

  .actions {
    justify-content: stretch;
  }

  .actions > * {
    flex: 1;
  }

  .ecosystem-top-link {
    min-height: 42px;
    padding: 0 10px;
  }

  .current-trigger {
    width: 100%;
  }

  .hero-panel,
  .hero-copy {
    min-height: 330px;
  }

  .hero-copy {
    width: 100%;
    padding: 34px 26px;
  }

  .cards-row,
  .ecosystem-strip,
  .job-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

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

  .drop-tile {
    min-height: 110px;
  }

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

@media (max-width: 520px) {
  .payment-products { grid-template-columns: 1fr; }
  .payment-card { padding: 24px 18px; border-radius: 22px; }
  .sidebar,
  .composer,
  .history-panel {
    border-radius: 0;
  }

  .app-shell {
    padding-left: 0;
    padding-right: 0;
  }

  .studio {
    gap: 14px;
  }

  .studio-top,
  .hero-panel,
  .cards-row,
  .ecosystem-strip,
  .composer,
  .history-panel {
    margin-left: 0;
    margin-right: 0;
  }

  .hero-panel {
    border-radius: 0;
  }

  .cards-row,
  .ecosystem-strip,
  .job-grid {
    grid-template-columns: 1fr;
  }

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

  .audio-pill,
  .price-pill,
  .info-pill {
    grid-column: span 3;
  }

  .send-button,
  .mic-button {
    width: auto;
  }

  .site-footer {
    width: 100%;
  }
}

/* Network workspace pass */
.app-shell {
  gap: 26px;
  padding: 24px 26px 28px 18px;
}

.sidebar {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
}

.studio {
  min-height: calc(100vh - 52px);
  grid-template-rows: auto auto minmax(300px, 1fr) auto;
  gap: 16px;
  padding-top: 8px;
}

.studio-top {
  min-height: 56px;
}

.current-trigger {
  width: min(260px, 34vw);
  border-radius: 16px;
}

.hero-panel,
.cards-row {
  display: none;
}

.workspace-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.workspace-tab {
  min-height: 38px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.workspace-tab.active,
.workspace-tab:hover,
.workspace-tab:focus-visible {
  border-color: rgba(20, 18, 32, 0.08);
  background: rgba(20, 18, 32, 0.09);
  color: var(--text);
  outline: 0;
}

.history-panel {
  min-height: clamp(280px, 42vh, 520px);
  border-color: rgba(20, 18, 32, 0.035);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.38)),
    rgba(255, 255, 255, 0.32);
  box-shadow: none;
}

.empty-history {
  min-height: 260px;
}

.empty-history span {
  font-size: 54px;
}

.composer {
  position: sticky;
  bottom: 18px;
  z-index: 30;
  grid-template-columns: 190px minmax(0, 1fr);
  width: 100%;
  margin: 0 auto;
  padding: 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.99);
  box-shadow:
    0 28px 90px rgba(90, 55, 170, 0.12),
    0 0 0 1px rgba(20, 18, 32, 0.025) inset;
}

.drop-tile {
  min-height: 190px;
  border-color: rgba(123, 44, 255, 0.42);
  background: rgba(255, 255, 255, 0.72);
}

.drop-tile span {
  width: 48px;
  height: 48px;
  font-size: 28px;
}

.compose-box {
  gap: 14px;
}

textarea {
  min-height: 118px;
  border-color: rgba(20, 18, 32, 0.06);
  background: rgba(255, 255, 255, 0.88);
  font-size: 16px;
}

.mode-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 20px;
  border-radius: 8px;
}

.mode-tab.not-connected {
  color: rgba(183, 178, 195, 0.64);
}

.mode-tab.not-connected:not(.active) {
  background: rgba(20, 18, 32, 0.035);
}

.mode-tab.not-connected::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 2px;
  border-radius: 50%;
  background: rgba(255, 176, 76, 0.72);
}

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

.composer.no-reference .drop-tile {
  display: none;
}

.mini-control,
.audio-pill,
.web-pill,
.price-pill,
.info-pill,
.mic-button,
.send-button {
  min-height: 46px;
  border-radius: 10px;
}

.web-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: rgba(20, 18, 32, 0.065);
  color: var(--muted);
  font-weight: 900;
}

.web-pill b {
  color: inherit;
}

.mini-control {
  min-width: 88px;
  padding: 0 14px;
}

.web-pill,
.audio-pill {
  padding: 0 16px;
}

.web-pill i,
.audio-pill i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--dim);
}

.web-pill.active,
.audio-pill.active {
  border-color: rgba(198, 255, 25, 0.32);
  background: rgba(198, 255, 25, 0.12);
  color: var(--cyan);
}

.web-pill.active i,
.audio-pill.active i {
  background: var(--cyan);
  box-shadow: 0 0 16px rgba(198, 255, 25, 0.7);
}

.audio-pill.locked {
  opacity: 1;
}

.price-pill.is-warning {
  border-color: rgba(255, 176, 76, 0.45);
  background: rgba(255, 176, 76, 0.1);
}

.job-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.job-card {
  position: relative;
  align-content: start;
  gap: 10px;
  min-height: 176px;
  border-color: rgba(20, 18, 32, 0.07);
  background:
    linear-gradient(180deg, rgba(20, 18, 32, 0.045), rgba(20, 18, 32, 0.018)),
    rgba(255, 255, 255, 0.86);
}

.job-card.status-ready {
  border-color: rgba(198, 255, 25, 0.28);
}

.job-card.status-error {
  border-color: rgba(255, 91, 91, 0.32);
}

.job-card.status-queued,
.job-card.status-running {
  border-color: rgba(123, 44, 255, 0.24);
}

.job-card-head,
.job-meta,
.job-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.job-card-head {
  justify-content: space-between;
}

.job-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(20, 18, 32, 0.075);
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
}

.status-ready .job-status {
  background: rgba(198, 255, 25, 0.14);
  color: var(--cyan);
}

.status-error .job-status {
  background: rgba(226, 61, 99, 0.14);
  color: #c2304e;
}

.job-card time {
  color: var(--dim);
  font-size: 11px;
  font-weight: 850;
}

.job-meta {
  flex-wrap: wrap;
}

.job-meta span {
  max-width: 100%;
  padding: 4px 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(20, 18, 32, 0.045);
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-actions {
  flex-wrap: wrap;
  margin-top: 2px;
}

.job-actions a,
.job-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(20, 18, 32, 0.08);
  border-radius: 8px;
  background: rgba(20, 18, 32, 0.055);
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
}

.job-actions a:hover,
.job-actions button:hover,
.job-actions a:focus-visible,
.job-actions button:focus-visible {
  border-color: rgba(198, 255, 25, 0.36);
  background: rgba(198, 255, 25, 0.12);
  color: var(--cyan);
  outline: 0;
}

.control-menu {
  position: fixed;
  z-index: 130;
  width: 236px;
  max-height: min(440px, calc(100vh - 28px));
  padding: 10px;
  overflow: auto;
  border: 1px solid rgba(20, 18, 32, 0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 255, 255, 0.99));
  box-shadow: 0 24px 80px rgba(90, 55, 170, 0.12);
  visibility: hidden;
  opacity: 0;
  transform: translateY(8px) scale(0.985);
  pointer-events: none;
  transition:
    opacity 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
    visibility 0s linear 0.2s;
  backdrop-filter: blur(18px);
}

.control-menu.open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  transition-delay: 0s;
}

.control-menu-title {
  margin: 0 4px 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(20, 18, 32, 0.025);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.control-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-weight: 900;
}

.control-option::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid #d7dce3;
  border-radius: 4px;
}

.control-option.active {
  background: rgba(198, 255, 25, 0.12);
  color: var(--cyan);
}

.control-option.active::before {
  border-color: var(--cyan);
  background: rgba(198, 255, 25, 0.18);
}

.flyout-empty {
  grid-column: 1 / -1;
  padding: 22px;
  color: var(--muted);
  font-weight: 850;
}

@media (max-width: 1180px) {
  .app-shell {
    padding: 12px;
  }

  .studio {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .composer {
    position: relative;
    bottom: auto;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .current-trigger {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .compose-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mini-control,
  .web-pill,
  .audio-pill,
  .price-pill,
  .info-pill,
  .mic-button,
  .send-button {
    width: 100%;
  }

  .audio-pill,
  .web-pill,
  .price-pill,
  .info-pill {
    grid-column: auto;
  }
}

/* OhMyAi visual alignment pass — light theme (matches OhMyAi Lab) */
:root {
  --bg: #e7def7;
  --panel: #ffffff;
  --panel-soft: #f4effb;
  --panel-deep: #ece4f8;
  --line: rgba(123, 44, 255, 0.16);
  --line-strong: rgba(123, 44, 255, 0.30);
  --text: #15121f;
  --muted: rgba(21, 18, 31, 0.62);
  --dim: #9a93ab;
  --cyan: #c6ff19;
  --purple: #7b2cff;
  --purple-soft: #a855f7;
  --green: #c6ff19;
  --amber: #d98a00;
  --radius: 14px;
  --font-display: "Unbounded", "DM Sans", system-ui, sans-serif;
  --shadow: 0 22px 60px rgba(90, 55, 170, 0.16);
}

body {
  background:
    radial-gradient(900px 520px at 10% -4%, #f7e3ef, transparent 60%),
    linear-gradient(165deg, #efe7fb 0%, #e2d5f6 55%, #ddd0f4 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

body::before {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M30 21v18M21 30h18' stroke='%237b2cff' stroke-opacity='.12' stroke-width='1'/%3E%3C/svg%3E") 0 0 / 60px 60px,
    transparent;
  opacity: 1;
}

body::after {
  content: "";
  position: fixed;
  top: 64px;
  right: -8vw;
  z-index: 0;
  width: min(430px, 30vw);
  height: calc(100vh + 160px);
  pointer-events: none;
  background: linear-gradient(90deg, #7b2cff 0 63%, #c6ff19 63% 76%, transparent 76%);
  opacity: 0.7;
  transform: skewX(-12deg);
  transform-origin: top right;
}

.app-shell {
  z-index: 1;
  gap: 26px;
  padding: 24px;
}

.sidebar,
.composer,
.history-panel,
.payload-drawer,
.admin-drawer,
.control-menu,
.model-flyout,
.auth-card,
.legal-doc {
  border-color: rgba(168, 85, 247, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 26px 80px rgba(90, 55, 170, 0.12),
    0 0 0 1px rgba(20, 18, 32, 0.035) inset;
  backdrop-filter: blur(14px);
}

.sidebar {
  top: 24px;
  gap: 22px;
  height: calc(100vh - 48px);
  padding: 24px 22px;
}

.brand,
.auth-brand {
  align-items: center;
}

.brand-symbol {
  width: 46px;
  height: 46px;
  border-color: rgba(198, 255, 25, 0.42);
  background:
    linear-gradient(135deg, rgba(198, 255, 25, 0.1), rgba(168, 85, 247, 0.18)),
    #050507;
  color: #c6ff19;
  font-family: var(--font-display);
  font-size: 14px;
  box-shadow: 0 0 28px rgba(198, 255, 25, 0.18);
}

.brand-text strong,
.auth-brand strong {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  text-transform: uppercase;
  background: linear-gradient(90deg, #c084fc 0%, #f0f0f5 48%, #9da8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small,
.auth-brand small,
.nav-block p,
.ecosystem-card p {
  color: rgba(198, 255, 25, 0.72);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.collapse-mark {
  color: rgba(21, 18, 31, 0.48);
}

.nav-link,
.ecosystem-link,
.user-action,
.workspace-tab,
.icon-button,
.soft-button,
.ecosystem-top-link,
.current-trigger,
.provider-chip,
.mini-control,
.audio-pill,
.web-pill,
.price-pill,
.info-pill,
.mic-button,
.job-actions a,
.job-actions button {
  border-color: rgba(20, 18, 32, 0.1);
  border-radius: 8px;
  background: rgba(20, 18, 32, 0.045);
}

.nav-link {
  min-height: 50px;
  color: rgba(21, 18, 31, 0.7);
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  border-color: rgba(168, 85, 247, 0.45);
  background: rgba(168, 85, 247, 0.14);
  color: var(--text);
  outline: 0;
}

.nav-link.active .nav-icon {
  color: #c6ff19;
}

.ecosystem-card {
  border-color: rgba(198, 255, 25, 0.28);
  background:
    linear-gradient(145deg, rgba(198, 255, 25, 0.08), rgba(168, 85, 247, 0.12)),
    rgba(255, 255, 255, 0.88);
}

.ecosystem-link:hover,
.ecosystem-link:focus-visible {
  border-color: rgba(198, 255, 25, 0.42);
  background: rgba(198, 255, 25, 0.08);
}

.studio-top {
  min-height: 60px;
}

.current-logo,
.model-logo {
  border-color: rgba(198, 255, 25, 0.38);
  background:
    linear-gradient(135deg, rgba(198, 255, 25, 0.16), rgba(168, 85, 247, 0.18)),
    #050507;
  color: #c6ff19;
  box-shadow: 0 0 28px rgba(198, 255, 25, 0.16);
}

.current-trigger {
  border-color: rgba(168, 85, 247, 0.28);
  background: rgba(255, 255, 255, 0.72);
}

.current-trigger strong {
  font-family: var(--font-display);
  font-size: 13px;
}

.provider-chip {
  color: rgba(21, 18, 31, 0.74);
}

.generate-top,
.btn-primary,
.send-button {
  border: 0;
  border-radius: 999px;
  background: #c6ff19;
  color: #030306;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 0 34px rgba(198, 255, 25, 0.24);
}

.generate-top:hover,
.generate-top:focus-visible,
.send-button:hover,
.send-button:focus-visible {
  background: #d7ff4a;
  box-shadow: 0 0 44px rgba(198, 255, 25, 0.36);
  outline: 0;
}

.ecosystem-top-link:hover,
.ecosystem-top-link:focus-visible,
.icon-button:hover,
.icon-button:focus-visible,
.soft-button:hover,
.soft-button:focus-visible {
  border-color: rgba(198, 255, 25, 0.42);
  background: rgba(198, 255, 25, 0.08);
  color: var(--text);
  outline: 0;
}

.workspace-tab {
  color: rgba(21, 18, 31, 0.6);
  font-weight: 800;
}

.workspace-tab.active,
.workspace-tab:hover,
.workspace-tab:focus-visible {
  border-color: rgba(198, 255, 25, 0.42);
  background: rgba(198, 255, 25, 0.1);
  color: #c6ff19;
}

.ecosystem-strip {
  gap: 12px;
}

.ecosystem-tile {
  min-height: 104px;
  border-color: rgba(168, 85, 247, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(20, 18, 32, 0.04), rgba(20, 18, 32, 0.015)),
    rgba(255, 255, 255, 0.86);
}

.ecosystem-tile:hover,
.ecosystem-tile:focus-visible {
  border-color: rgba(198, 255, 25, 0.42);
  background: rgba(198, 255, 25, 0.07);
}

.ecosystem-tile.is-current {
  border-color: rgba(198, 255, 25, 0.46);
  background:
    linear-gradient(135deg, rgba(198, 255, 25, 0.13), rgba(168, 85, 247, 0.16)),
    rgba(255, 255, 255, 0.9);
}

.ecosystem-tile b,
.job-card strong,
.empty-history strong {
  font-family: var(--font-display);
  font-weight: 800;
}

.history-panel {
  border-color: rgba(168, 85, 247, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.62)),
    rgba(255, 255, 255, 0.76);
}

.composer {
  border-color: rgba(168, 85, 247, 0.34);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.98)),
    #050507;
}

.drop-tile {
  border-color: rgba(168, 85, 247, 0.42);
  background: rgba(255, 255, 255, 0.72);
}

.drop-tile span {
  background: rgba(198, 255, 25, 0.1);
  color: #c6ff19;
}

textarea,
input {
  border-color: rgba(20, 18, 32, 0.1);
  background: rgba(255, 255, 255, 0.86);
}

textarea:focus,
input:focus {
  border-color: rgba(198, 255, 25, 0.42);
  box-shadow: 0 0 0 3px rgba(198, 255, 25, 0.09);
}

.mode-tab.active {
  background: #c6ff19;
  color: #030306;
}

.mode-tab.not-connected::after,
.web-pill i,
.audio-pill i {
  background: rgba(21, 18, 31, 0.34);
}

.web-pill.active,
.audio-pill.active {
  border-color: rgba(198, 255, 25, 0.36);
  background: rgba(198, 255, 25, 0.1);
  color: #c6ff19;
}

.web-pill.active i,
.audio-pill.active i {
  background: #c6ff19;
  box-shadow: 0 0 16px rgba(198, 255, 25, 0.62);
}

.price-pill,
.price-pill b,
.job-card code,
.job-output-link,
.status-ready .job-status {
  color: #c6ff19;
}

.job-card {
  border-color: rgba(168, 85, 247, 0.22);
  background:
    linear-gradient(180deg, rgba(20, 18, 32, 0.042), rgba(20, 18, 32, 0.014)),
    rgba(255, 255, 255, 0.9);
}

.job-card.status-ready {
  border-color: rgba(198, 255, 25, 0.34);
}

.job-card.status-queued,
.job-card.status-running {
  border-color: rgba(168, 85, 247, 0.38);
}

.job-status,
.job-meta span {
  background: rgba(20, 18, 32, 0.06);
}

.status-ready .job-status,
.job-output-link {
  border-color: rgba(198, 255, 25, 0.34);
  background: rgba(198, 255, 25, 0.09);
}

.job-output-link:hover {
  border-color: rgba(198, 255, 25, 0.52);
  background: rgba(198, 255, 25, 0.13);
}

.progress i {
  background: linear-gradient(90deg, #7b2cff, #c6ff19);
}

.job-actions a:hover,
.job-actions button:hover,
.job-actions a:focus-visible,
.job-actions button:focus-visible {
  border-color: rgba(198, 255, 25, 0.36);
  background: rgba(198, 255, 25, 0.1);
  color: #c6ff19;
}

.control-menu {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 255, 255, 0.99)),
    #050507;
}

.control-option.active {
  background: rgba(198, 255, 25, 0.1);
  color: #c6ff19;
}

.control-option.active::before {
  border-color: #c6ff19;
  background: rgba(198, 255, 25, 0.18);
}

.site-footer {
  border-top-color: rgba(168, 85, 247, 0.24);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #c6ff19;
}

@media (max-width: 1180px) {
  body::after {
    right: -18vw;
    width: 46vw;
    opacity: 0.32;
  }
}

@media (max-width: 760px) {
  body::after {
    display: none;
  }

  .app-shell {
    padding: 12px;
  }

  .sidebar {
    top: auto;
    height: auto;
  }

  .brand-text strong {
    font-size: 15px;
  }
}

/* OhMyAi Network lightness and recognizability pass */
body::after {
  right: -5vw;
  width: min(330px, 24vw);
  opacity: 0.34;
}

.sidebar,
.composer,
.history-panel,
.network-board,
.ecosystem-tile,
.payload-drawer,
.admin-drawer,
.control-menu,
.model-flyout,
.auth-card,
.legal-doc {
  background-color: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 18px 70px rgba(90, 55, 170, 0.12),
    0 0 0 1px rgba(20, 18, 32, 0.028) inset;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.72)),
    rgba(255, 255, 255, 0.72);
}

.studio {
  grid-template-rows: auto auto auto auto minmax(250px, 1fr) auto;
}

.nav-link {
  min-height: 48px;
  border-color: rgba(20, 18, 32, 0.08);
  background: rgba(20, 18, 32, 0.025);
}

.nav-link.active {
  border-color: rgba(198, 255, 25, 0.5);
  background:
    linear-gradient(90deg, rgba(198, 255, 25, 0.12), rgba(168, 85, 247, 0.1)),
    rgba(20, 18, 32, 0.035);
}

.network-board {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.86fr) minmax(360px, 1.14fr);
  gap: 18px;
  min-height: 154px;
  overflow: hidden;
  padding: 16px 20px;
  border: 1px solid rgba(168, 85, 247, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(115deg, rgba(198, 255, 25, 0.055), transparent 34%),
    linear-gradient(180deg, rgba(20, 18, 32, 0.04), rgba(20, 18, 32, 0.015)),
    rgba(255, 255, 255, 0.7);
}

.network-board::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(20, 18, 32, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 18, 32, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}

.network-copy,
.network-constellation {
  position: relative;
  z-index: 1;
}

.network-copy {
  display: grid;
  align-content: center;
  gap: 12px;
  min-width: 0;
}

.network-eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(198, 255, 25, 0.36);
  border-radius: 999px;
  background: rgba(198, 255, 25, 0.08);
  color: #c6ff19;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
}

.network-copy h2 {
  max-width: 560px;
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(20px, 2.1vw, 28px);
  font-weight: 800;
  line-height: 1.08;
}

.network-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.network-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(20, 18, 32, 0.1);
  border-radius: 8px;
  background: rgba(20, 18, 32, 0.045);
  color: rgba(21, 18, 31, 0.7);
  font-size: 12px;
  font-weight: 800;
}

.network-constellation {
  min-height: 116px;
}

.network-node,
.network-line {
  position: absolute;
}

.network-node {
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(168, 85, 247, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: rgba(21, 18, 31, 0.82);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

.node-main {
  top: 42px;
  left: 48%;
  min-height: 38px;
  border-color: rgba(198, 255, 25, 0.48);
  background: #c6ff19;
  color: #030306;
  transform: translateX(-50%);
}

.node-a { top: 6px; left: 7%; }
.node-b { top: 66px; left: 2%; }
.node-c { top: 10px; left: 30%; }
.node-d { top: 12px; right: 27%; }
.node-e { top: 68px; right: 18%; }
.node-f { top: 42px; right: 2%; }
.node-g { bottom: 4px; left: 27%; }

.network-line {
  z-index: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(198, 255, 25, 0.42), rgba(168, 85, 247, 0.24), transparent);
  transform-origin: left center;
}

.line-a { top: 58px; left: 12%; width: 36%; transform: rotate(11deg); }
.line-b { top: 58px; left: 48%; width: 34%; transform: rotate(-13deg); }
.line-c { top: 76px; left: 11%; width: 38%; transform: rotate(-14deg); }
.line-d { top: 42px; left: 45%; width: 42%; transform: rotate(11deg); }
.line-e { top: 90px; left: 31%; width: 36%; transform: rotate(-22deg); }

.ecosystem-strip {
  display: none;
  gap: 10px;
}

.ecosystem-tile {
  min-height: 86px;
  background:
    linear-gradient(180deg, rgba(20, 18, 32, 0.032), rgba(20, 18, 32, 0.012)),
    rgba(255, 255, 255, 0.58);
}

.ecosystem-tile.is-current {
  background:
    linear-gradient(135deg, rgba(198, 255, 25, 0.1), rgba(168, 85, 247, 0.1)),
    rgba(255, 255, 255, 0.62);
}

.history-panel {
  min-height: clamp(250px, 36vh, 460px);
  background:
    linear-gradient(180deg, rgba(20, 18, 32, 0.026), rgba(20, 18, 32, 0.008)),
    rgba(255, 255, 255, 0.58);
}

.composer {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.88)),
    rgba(255, 255, 255, 0.78);
}

textarea {
  background: rgba(255, 255, 255, 0.66);
}

.generate-top,
.send-button {
  box-shadow: 0 0 26px rgba(198, 255, 25, 0.22);
}

@media (max-width: 1180px) {
  .network-board {
    grid-template-columns: 1fr;
  }

  .network-constellation {
    min-height: 150px;
  }
}

@media (max-width: 760px) {
  .network-board {
    gap: 16px;
    padding: 18px;
  }

  .network-copy h2 {
    font-size: 22px;
  }

  .network-constellation {
    min-height: 182px;
  }

  .node-main { top: 72px; left: 50%; }
  .node-a { top: 0; left: 0; }
  .node-b { top: 48px; left: 4%; }
  .node-c { top: 0; left: 42%; }
  .node-d { top: 42px; right: 0; }
  .node-e { top: 112px; right: 5%; }
  .node-f { top: auto; bottom: 0; right: 35%; }
  .node-g { top: auto; bottom: 12px; left: 0; }

  .line-a { top: 84px; left: 12%; width: 38%; transform: rotate(20deg); }
  .line-b { top: 88px; left: 48%; width: 42%; transform: rotate(-20deg); }
  .line-c { top: 112px; left: 12%; width: 36%; transform: rotate(-16deg); }
  .line-d { top: 54px; left: 44%; width: 38%; transform: rotate(18deg); }
  .line-e { top: 130px; left: 26%; width: 44%; transform: rotate(-10deg); }
}

@media (max-width: 520px) {
  .network-board {
    margin-left: 0;
    margin-right: 0;
  }

  .network-tags span,
  .network-node {
    font-size: 9px;
  }
}

/* ───── Ecosystem unification (LAB ↔ work) ───── */
/* Logo lockup mirrors OhMyAi Lab: wordmark + colored pill (Lab uses "LAB", work uses "work"). */
.brand-pill {
  display: inline-block;
  margin-left: 7px;
  padding: 2px 9px 1px;
  border-radius: 999px;
  background: var(--green);
  color: #08090c;
  font-size: 0.66em;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 3px;
}
.auth-brand .brand-pill {
  vertical-align: 2px;
}

/* Sidebar ecosystem block: current product highlighted, others are links to the ecosystem */
.ecosystem-link.is-current {
  border-color: rgba(198, 255, 25, 0.45);
  background: linear-gradient(135deg, rgba(198, 255, 25, 0.14), rgba(123, 44, 255, 0.14));
}
.ecosystem-link.is-current span {
  color: var(--green);
}
.ecosystem-link.is-current small {
  color: var(--text);
  opacity: 0.78;
}

/* Hero/board explanation for first-time users */
.network-eyebrow-sub {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.02em;
}
.network-lead {
  max-width: 600px;
  margin: 0;
  color: var(--text);
  opacity: 0.86;
  font-size: 14px;
  line-height: 1.5;
}
.network-bridge {
  max-width: 600px;
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}
.network-bridge b {
  color: var(--green);
  font-weight: 800;
}
.network-bridge b:last-of-type {
  color: var(--purple-soft);
}

/* Quick links into LAB — pill chips echoing LAB's CTA language */
.lab-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
.lab-links a {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border: 1px solid rgba(198, 255, 25, 0.28);
  border-radius: 999px;
  background: rgba(198, 255, 25, 0.07);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  transition: background 0.15s, border-color 0.15s;
}
.lab-links a:hover,
.lab-links a:focus-visible {
  background: rgba(198, 255, 25, 0.15);
  border-color: rgba(198, 255, 25, 0.5);
  outline: 0;
}

/* Empty state turned into onboarding */
.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}
.empty-cta {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid transparent;
}
.empty-cta.primary {
  background: var(--green);
  color: #08090c;
}
.empty-cta.primary:hover {
  box-shadow: 0 0 22px rgba(198, 255, 25, 0.28);
}
.empty-cta.ghost {
  border-color: rgba(20, 18, 32, 0.16);
  background: rgba(20, 18, 32, 0.04);
  color: var(--text);
}
.empty-cta.ghost:hover {
  border-color: rgba(198, 255, 25, 0.4);
}
.empty-steps {
  display: grid;
  gap: 5px;
  width: max-content;
  max-width: 100%;
  margin: 14px auto 0;
  padding: 0 0 0 20px;
  text-align: left;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}
.empty-steps li::marker {
  color: var(--green);
  font-weight: 800;
}

/* Helper link under the prompt */
.composer-hint {
  display: inline-block;
  margin: 2px 2px 0;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px dashed rgba(198, 255, 25, 0.3);
  width: max-content;
  transition: color 0.15s;
}
.composer-hint:hover {
  color: var(--green);
}

/* Pill language to echo Lab's soft navigation */
.workspace-tab,
.mode-tab,
.auth-tab {
  border-radius: 999px;
}

/* Light theme: wordmark in brand purple (mirrors OhMyAi Lab) */
.brand-text strong,
.auth-brand strong {
  color: var(--purple);
}

/* Network launch packaging: closer to OhMyAi Lab, clearer aggregator entry */
:root {
  --brand-black: #050507;
  --brand-lime: #c6ff19;
  --brand-violet: #7b2cff;
}

body {
  background:
    linear-gradient(115deg, rgba(5, 5, 7, 0.05), transparent 36%),
    linear-gradient(180deg, #f4effb 0%, #eee7fb 52%, #f7f4fb 100%);
}

body::after {
  content: "";
  position: fixed;
  top: 76px;
  right: -76px;
  width: min(390px, 30vw);
  height: 72vh;
  pointer-events: none;
  background: linear-gradient(165deg, var(--brand-violet) 0 58%, var(--brand-lime) 58% 70%, transparent 70%);
  opacity: 0.32;
  transform: skewX(-10deg);
}

.brand-symbol,
.current-logo {
  background: var(--brand-black);
  color: var(--brand-lime);
  border-color: rgba(198, 255, 25, 0.7);
  box-shadow: 0 0 0 4px rgba(198, 255, 25, 0.08);
}

.brand-pill {
  background: var(--brand-lime);
  color: var(--brand-black);
}

.generate-top,
.send-button,
.empty-cta.primary {
  background: var(--brand-lime);
  color: var(--brand-black);
  box-shadow: 0 18px 42px rgba(198, 255, 25, 0.28);
}

.network-board {
  min-height: 238px;
  padding: 28px;
  border-color: rgba(123, 44, 255, 0.22);
  background:
    linear-gradient(105deg, rgba(5, 5, 7, 0.96) 0 49%, transparent 49%),
    linear-gradient(155deg, rgba(123, 44, 255, 0.78) 50%, rgba(198, 255, 25, 0.9) 71%, rgba(255, 255, 255, 0.86) 71%);
  color: #fff;
}

.network-board::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  opacity: 0.7;
}

.network-eyebrow {
  background: rgba(198, 255, 25, 0.14);
  color: var(--brand-lime);
}

.network-copy h2,
.network-lead,
.network-bridge {
  color: #fff;
}

.network-lead {
  opacity: 0.88;
}

.network-bridge {
  opacity: 0.72;
}

.network-bridge b:last-of-type {
  color: var(--brand-lime);
}

.network-tags span {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
}

.network-node {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-black);
  box-shadow: 0 14px 30px rgba(5, 5, 7, 0.24);
}

.node-main {
  background: var(--brand-lime);
}

.hero-panel {
  display: none;
}

.studio {
  grid-template-rows: auto auto minmax(230px, auto) minmax(250px, 1fr) auto;
}

.studio-top {
  position: sticky;
  top: 16px;
  z-index: 40;
  backdrop-filter: blur(18px);
}

.sidebar {
  gap: 16px;
  padding: 20px 18px;
}

.nav-link {
  min-height: 44px;
}

.ecosystem-card {
  display: none;
}

.nav-block.account {
  margin-top: 0;
}

.cards-row {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.model-card {
  min-height: 142px;
  border-radius: 10px;
}

.composer {
  border: 1px solid rgba(20, 18, 32, 0.08);
  backdrop-filter: blur(18px);
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 18px;
  }

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

  .brand-symbol {
    width: 44px;
    height: 44px;
  }

  .collapse-mark {
    display: none;
  }
}

@media (max-width: 860px) {
  .app-shell {
    display: flex;
    flex-direction: column;
    padding: 10px;
  }

  .studio {
    order: 1;
  }

  .sidebar {
    order: 2;
    position: relative;
    top: auto;
    height: auto;
    max-height: none;
    padding: 14px;
  }

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

  .brand-text small {
    letter-spacing: 0.06em;
  }

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

  .nav-block p,
  .nav-block.account,
  .user-card {
    grid-column: 1 / -1;
  }

  .nav-link {
    min-height: 42px;
  }

  .network-board {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 22px;
  }

  .network-constellation {
    display: none;
  }

  .studio-top {
    top: 10px;
    grid-template-columns: 1fr;
  }

  .actions {
    justify-content: stretch;
    display: grid;
    grid-template-columns: 48px 1fr 1fr 1.2fr;
  }

  .ecosystem-strip,
  .cards-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  body::after {
    display: none;
  }

  .network-board {
    padding: 18px;
    background:
      linear-gradient(155deg, rgba(5, 5, 7, 0.96) 0 68%, rgba(123, 44, 255, 0.7) 68% 86%, rgba(198, 255, 25, 0.9) 86%);
  }

  .network-copy h2 {
    font-size: 25px;
  }

  .network-lead {
    font-size: 13px;
  }

  .network-tags span {
    font-size: 11px;
  }

  .actions {
    grid-template-columns: 44px 1fr 1fr;
  }

  .ecosystem-top-link:first-of-type {
    display: none;
  }

  .cards-row,
  .ecosystem-strip {
    grid-template-columns: 1fr;
  }

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

/* Dark OhMyAi theme: closer to ohmyai.com.by */
:root {
  --bg: #050507;
  --panel: #0f1017;
  --panel-soft: #141420;
  --panel-deep: #19142a;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(198, 255, 25, 0.34);
  --text: #f7f7fb;
  --muted: rgba(247, 247, 251, 0.68);
  --dim: rgba(247, 247, 251, 0.44);
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.46);
}

body {
  background:
    radial-gradient(circle at 80% -8%, rgba(123, 44, 255, 0.34), transparent 34%),
    radial-gradient(circle at 9% 88%, rgba(198, 255, 25, 0.08), transparent 28%),
    #050507;
  color: var(--text);
}

body::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 42px 42px;
}

body::after {
  opacity: 0.82;
  filter: drop-shadow(0 0 42px rgba(123, 44, 255, 0.22));
}

.sidebar,
.composer,
.history-panel,
.ecosystem-tile,
.payload-drawer,
.admin-drawer,
.control-menu,
.model-flyout,
.auth-card,
.legal-doc,
.studio-top {
  border-color: rgba(255, 255, 255, 0.10);
  background:
    linear-gradient(180deg, rgba(20, 20, 32, 0.88), rgba(10, 10, 16, 0.78)),
    rgba(5, 5, 7, 0.72);
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(13, 13, 20, 0.96), rgba(8, 8, 13, 0.88)),
    #050507;
}

.brand-text strong,
.auth-brand strong {
  color: #fff;
}

.brand-text small,
.auth-brand small,
.nav-block p,
.current-trigger small,
.provider-chip,
.ecosystem-top-link,
.user-card small,
.network-eyebrow-sub,
.empty-steps,
.composer-hint {
  color: var(--muted);
}

.nav-link,
.workspace-tab,
.mode-tab,
.current-trigger,
.provider-chip,
.icon-button,
.soft-button,
.ecosystem-top-link,
.user-action,
.drop-tile,
.setting,
.select-wrap,
.empty-cta.ghost {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.nav-link:hover,
.nav-link:focus-visible,
.workspace-tab:hover,
.workspace-tab:focus-visible,
.mode-tab:hover,
.mode-tab:focus-visible,
.ecosystem-top-link:hover,
.ecosystem-top-link:focus-visible {
  border-color: rgba(198, 255, 25, 0.36);
  background: rgba(198, 255, 25, 0.08);
}

.nav-link.active,
.workspace-tab.active,
.mode-tab.active {
  border-color: rgba(198, 255, 25, 0.56);
  background:
    linear-gradient(90deg, rgba(198, 255, 25, 0.16), rgba(123, 44, 255, 0.12)),
    rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-link.active .nav-icon,
.workspace-tab.active,
.mode-tab.active {
  color: var(--brand-lime);
}

.network-board {
  border-color: rgba(198, 255, 25, 0.24);
  background:
    linear-gradient(106deg, rgba(5, 5, 7, 0.99) 0 52%, transparent 52%),
    linear-gradient(156deg, rgba(123, 44, 255, 0.92) 50%, rgba(198, 255, 25, 0.96) 73%, rgba(5, 5, 7, 0.9) 73%),
    #050507;
  box-shadow: 0 28px 86px rgba(0, 0, 0, 0.48);
}

.network-board::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
}

.network-copy h2,
.network-lead,
.network-bridge,
.ecosystem-tile b,
.empty-history strong,
.control-menu strong,
.payload-head span,
.admin-drawer h3 {
  color: #fff;
}

.network-tags span,
.lab-links a {
  border-color: rgba(198, 255, 25, 0.24);
  background: rgba(198, 255, 25, 0.08);
  color: rgba(255, 255, 255, 0.88);
}

.lab-links a {
  color: var(--brand-lime);
}

.network-node {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.92);
  color: #050507;
}

.node-main,
.generate-top,
.send-button,
.empty-cta.primary {
  background: var(--brand-lime);
  color: #050507;
}

.history-panel {
  background:
    linear-gradient(180deg, rgba(20, 20, 32, 0.82), rgba(10, 10, 16, 0.76)),
    rgba(5, 5, 7, 0.78);
}

.empty-history,
.empty-history p,
.ecosystem-tile span,
.setting small,
.job-meta,
.card-meta {
  color: var(--muted);
}

textarea,
input,
select {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.075);
  color: var(--text);
}

textarea::placeholder,
input::placeholder {
  color: rgba(247, 247, 251, 0.42);
}

.composer {
  background:
    linear-gradient(180deg, rgba(18, 18, 28, 0.92), rgba(8, 8, 13, 0.86)),
    rgba(5, 5, 7, 0.82);
}

.auth-gate {
  background:
    radial-gradient(circle at 70% 18%, rgba(198, 255, 25, 0.16), transparent 28%),
    radial-gradient(circle at 26% 76%, rgba(123, 44, 255, 0.24), transparent 32%),
    rgba(5, 5, 7, 0.58);
  backdrop-filter: blur(16px) saturate(1.12);
}

.auth-card {
  position: relative;
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.07)),
    rgba(10, 10, 16, 0.76);
  color: #fff;
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.auth-card input {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.auth-primary-copy { margin: 22px 0 16px; }
.auth-primary-copy h2 { margin: 0 0 8px; font-size: clamp(28px, 5vw, 46px); line-height: 1; }
.auth-primary-copy p { margin: 0; color: rgba(255, 255, 255, .66); line-height: 1.5; }
.auth-telegram-main { width: 100%; min-height: 72px; margin-bottom: 14px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: rgba(255, 255, 255, .42); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .1); }

.auth-tabs {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.auth-tab.active,
.auth-form button {
  background: var(--brand-lime);
  color: #050507;
}

.auth-gate-close {
  top: 12px;
  right: 12px;
}

.model-card {
  border-color: rgba(255, 255, 255, 0.10);
  background:
    radial-gradient(circle at 72% 18%, rgba(198, 255, 25, 0.18), transparent 32%),
    radial-gradient(circle at 18% 74%, rgba(123, 44, 255, 0.36), transparent 35%),
    #0a0a10;
}

.model-card::after {
  background:
    linear-gradient(180deg, transparent 5%, rgba(5, 5, 7, 0.86)),
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
}

@media (max-width: 520px) {
  .network-board {
    background:
      linear-gradient(155deg, rgba(5, 5, 7, 0.99) 0 70%, rgba(123, 44, 255, 0.9) 70% 88%, rgba(198, 255, 25, 0.96) 88%);
  }

  .quick-auth-grid,
  .auth-popover-actions {
    grid-template-columns: 1fr;
  }

  .auth-popover-card {
    padding: 22px;
    border-radius: 20px;
  }
}
