:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: rgba(18, 18, 20, 0.88);
  --panel-solid: #141417;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f5f5f5;
  --muted: #a9a9b2;
  --soft: #71717a;
  --accent: #e8ff71;
  --accent-2: #7dd3fc;
  --accent-3: #fb7185;
  --node: #1b1b20;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body,
.app-shell {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

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

button {
  border: 0;
  color: inherit;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(232, 255, 113, 0.8);
  outline-offset: 2px;
}

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

input,
select,
textarea {
  border-radius: 12px;
}

.home-view {
  position: relative;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.1), transparent 28rem),
    linear-gradient(180deg, #09090a 0%, #030303 100%);
}

.ambient-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.7;
  pointer-events: none;
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 28px;
}

.brand-mark,
.brand-stack {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
}

.brand-dot {
  width: 18px;
  height: 18px;
  display: inline-block;
  border-radius: 50%;
  background:
    linear-gradient(135deg, var(--accent), #fff),
    var(--accent);
  box-shadow: 0 0 28px rgba(232, 255, 113, 0.68);
}

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

.icon-button,
.primary-pill,
.ghost-pill,
.send-button,
.wide-button,
.toolbar-group button,
.section-title button,
.quick-prompts button,
.panel-tabs button,
.auth-tabs button,
.project-card-head button,
.agent-state-row button,
.chat-actions button,
.production-actions button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.icon-button:hover,
.primary-pill:hover,
.ghost-pill:hover,
.send-button:hover,
.wide-button:hover,
.toolbar-group button:hover,
.section-title button:hover,
.quick-prompts button:hover,
.panel-tabs button:hover,
.auth-tabs button:hover,
.project-card-head button:hover,
.agent-state-row button:hover,
.chat-actions button:hover,
.production-actions button:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--line-strong);
}

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.primary-pill {
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  color: #050505;
  border-color: transparent;
  background: #f5f5f5;
  font-weight: 700;
}

.primary-pill:hover {
  background: var(--accent);
}

.ghost-pill,
.balance-pill {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ghost-pill {
  color: rgba(255, 255, 255, 0.78);
}

.balance-pill {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
}

.hero-composer {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 12vh auto 0;
  padding: 0 28px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  text-transform: uppercase;
}

.hero-composer h1 {
  margin: 0 0 26px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02;
  font-weight: 520;
  letter-spacing: 0;
}

.prompt-box {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: rgba(16, 16, 18, 0.72);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.project-name-input {
  width: calc(100% - 28px);
  height: 42px;
  margin: 14px 14px 0;
  padding: 0 14px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.prompt-box textarea,
.left-panel textarea {
  width: 100%;
  resize: none;
  border: 0;
  color: var(--text);
  background: transparent;
}

.prompt-box textarea {
  min-height: 112px;
  padding: 22px 22px 10px;
  font-size: 16px;
  line-height: 1.6;
}

.prompt-box textarea::placeholder,
.left-panel textarea::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.prompt-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 14px 14px 18px;
}

.mode-group,
.quick-prompts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mode-chip {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #d4d4d8;
}

.mode-chip.active {
  background: rgba(232, 255, 113, 0.16);
  color: var(--accent);
}

.send-button {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #f5f5f5;
  color: #050505;
  font-size: 22px;
  line-height: 1;
}

.quick-prompts {
  margin-top: 16px;
}

.quick-prompts button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
}

.muted-prompts {
  color: var(--muted);
  font-size: 13px;
}

.auth-panel {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(16, 16, 18, 0.72);
  backdrop-filter: blur(18px);
}

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

.auth-tabs button {
  height: 36px;
  border-radius: 12px;
  color: var(--muted);
}

.auth-tabs button.active {
  color: #050505;
  background: var(--accent);
  border-color: transparent;
}

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

.auth-form input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.empty-block {
  min-height: 120px;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  text-align: center;
}

.empty-block.compact {
  min-height: 82px;
  padding: 16px;
  font-size: 12px;
}

.home-rail {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 56px));
  margin: 11vh auto 56px;
}

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

.section-title h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 680;
}

.section-title button {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
}

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

.workflow-card {
  min-height: 255px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(23, 23, 25, 0.72);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.workflow-card span {
  display: inline-block;
  margin-top: 14px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
}

.workflow-card h3 {
  margin: 7px 0 6px;
  font-size: 18px;
  font-weight: 700;
}

.workflow-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.project-cards .workflow-card {
  min-height: 190px;
}

.project-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.project-card-head span {
  margin: 0;
}

.project-card-head button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--text);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.project-meta span {
  margin: 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 11px;
}

.card-media {
  height: 132px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.card-media-a {
  background:
    linear-gradient(135deg, rgba(232, 255, 113, 0.9), rgba(23, 23, 25, 0) 46%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 24px),
    #222327;
}

.card-media-b {
  background:
    radial-gradient(circle at 28% 28%, rgba(251, 113, 133, 0.85), transparent 18%),
    radial-gradient(circle at 70% 55%, rgba(125, 211, 252, 0.8), transparent 24%),
    linear-gradient(145deg, #292a2d, #121214);
}

.card-media-c {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.16), transparent 35%),
    repeating-linear-gradient(0deg, #1f1f24 0 24px, #18181b 24px 48px);
}

.studio-view {
  display: grid;
  grid-template-columns: 72px 328px minmax(400px, 1fr) 338px;
  height: 100vh;
  overflow: hidden;
  background: #070708;
}

.sidebar,
.left-panel,
.right-panel {
  border-right: 1px solid var(--line);
  background: rgba(12, 12, 13, 0.94);
}

.sidebar {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 18px 12px;
}

.brand-stack {
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 34px;
}

.side-nav button,
.side-bottom {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  font-size: 18px;
}

.side-nav button.active,
.side-nav button:hover,
.side-bottom:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line);
}

.side-bottom {
  margin-top: auto;
}

.left-panel,
.right-panel {
  overflow-y: auto;
}

.left-panel {
  padding: 22px;
}

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

.panel-header p {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.panel-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 720;
}

.panel-header.compact h2 {
  font-size: 19px;
}

.panel-section {
  margin-bottom: 20px;
}

.panel-section label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.project-select-section {
  display: grid;
  gap: 9px;
}

.project-select-section select,
.production-actions input {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.agent-state-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  color: var(--muted);
  font-size: 12px;
}

.agent-state-row button {
  margin-left: auto;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--soft);
}

.live-dot.online {
  background: var(--accent);
  box-shadow: 0 0 16px rgba(232, 255, 113, 0.72);
}

.left-panel textarea {
  min-height: 132px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  line-height: 1.52;
}

.compact-modes {
  margin-bottom: 9px;
}

.file-button {
  min-height: 38px;
  display: grid !important;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.file-button input {
  display: none;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.wide-button {
  width: 100%;
  height: 42px;
  margin-top: 10px;
  border-radius: 12px;
  color: #050505;
  background: var(--accent);
  font-weight: 760;
}

.secondary-wide {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

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

.step-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 9px;
  align-items: center;
  min-height: 42px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.step-dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 12px;
}

.step-item.done .step-dot {
  background: rgba(232, 255, 113, 0.16);
  color: var(--accent);
}

.step-item strong {
  display: block;
  font-size: 13px;
}

.step-item span:last-child {
  color: var(--soft);
  font-size: 11px;
}

.panel-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.panel-tabs button {
  height: 34px;
  border-radius: 10px;
  color: var(--muted);
}

.panel-tabs button.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.13);
}

.agent-output {
  min-height: 170px;
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #d6d6dc;
  font-size: 12px;
  line-height: 1.62;
}

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

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

.chat-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.empty-chat {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.chat-message {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.chat-message.user {
  border-color: rgba(232, 255, 113, 0.25);
}

.chat-message strong {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 12px;
}

.chat-message strong span {
  color: var(--soft);
  font-weight: 600;
}

.chat-message p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.chat-input {
  display: grid;
  gap: 8px;
}

.chat-input textarea {
  min-height: 66px;
}

.chat-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.chat-actions button {
  min-height: 36px;
  border-radius: 12px;
}

.canvas-stage {
  position: relative;
  overflow: hidden;
  background: #0b0b0d;
}

.canvas-toolbar {
  position: absolute;
  z-index: 5;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(12, 12, 14, 0.78);
  backdrop-filter: blur(16px);
  pointer-events: auto;
}

.toolbar-group button {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
}

#zoomLabel {
  min-width: 52px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.canvas-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
}

.canvas-viewport.dragging {
  cursor: grabbing;
}

.canvas-grid {
  position: absolute;
  inset: -200%;
  transform-origin: 0 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
}

.node-layer,
.connector-layer {
  position: absolute;
  inset: 0;
  overflow: visible;
  transform-origin: 0 0;
}

.connector-layer path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 2;
}

.connector-layer path.active {
  stroke: rgba(232, 255, 113, 0.6);
}

.canvas-node {
  position: absolute;
  width: 252px;
  min-height: 148px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  background: var(--node);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  transform: translate3d(0, 0, 0);
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.canvas-node.selected {
  border-color: rgba(232, 255, 113, 0.78);
  box-shadow: 0 0 0 1px rgba(232, 255, 113, 0.18), 0 20px 70px rgba(0, 0, 0, 0.4);
}

.canvas-node .node-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.node-type {
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 780;
  text-transform: uppercase;
}

.node-status {
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 11px;
  line-height: 22px;
}

.canvas-node.done .node-status {
  color: var(--accent);
  background: rgba(232, 255, 113, 0.13);
}

.canvas-node.empty-node {
  border-style: dashed;
  opacity: 0.9;
}

.canvas-node h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 740;
}

.canvas-node p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.node-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 13px;
}

.preview-tile {
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    radial-gradient(circle at 32% 32%, rgba(255, 255, 255, 0.22), transparent 26%),
    linear-gradient(135deg, rgba(125, 211, 252, 0.2), rgba(251, 113, 133, 0.12)),
    rgba(255, 255, 255, 0.05);
}

.image-tile {
  background-size: cover;
  background-position: center;
}

.right-panel {
  border-right: 0;
  border-left: 1px solid var(--line);
  padding: 22px;
}

.detail-panel {
  display: none;
}

.detail-panel.active {
  display: block;
}

.node-inspector,
.adapter-box {
  display: grid;
  gap: 12px;
}

.inspector-card,
.asset-card,
.video-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.inspector-card {
  padding: 14px;
}

.inspector-card label {
  display: block;
  margin-bottom: 6px;
  color: var(--soft);
  font-size: 11px;
  font-weight: 720;
  text-transform: uppercase;
}

.inspector-card p {
  margin: 0;
  color: #d4d4d8;
  font-size: 13px;
  line-height: 1.56;
}

.inspector-card pre {
  max-height: 360px;
  overflow: auto;
  margin: 0;
  white-space: pre-wrap;
  color: #d4d4d8;
  font-size: 12px;
  line-height: 1.56;
}

.asset-grid {
  display: grid;
  gap: 12px;
}

.asset-card {
  overflow: hidden;
}

.asset-thumb-img {
  width: 100%;
  height: 112px;
  display: block;
  object-fit: cover;
  background: #111114;
}

.asset-thumb {
  height: 112px;
  background:
    radial-gradient(circle at 30% 24%, rgba(232, 255, 113, 0.46), transparent 22%),
    radial-gradient(circle at 72% 48%, rgba(125, 211, 252, 0.42), transparent 26%),
    linear-gradient(135deg, #232329, #111114);
}

.asset-card:nth-child(2) .asset-thumb {
  background:
    radial-gradient(circle at 70% 25%, rgba(251, 113, 133, 0.52), transparent 22%),
    linear-gradient(135deg, #26262b, #111114);
}

.asset-card:nth-child(3) .asset-thumb {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 18px),
    linear-gradient(145deg, #25262a, #101012);
}

.asset-body {
  padding: 12px;
}

.asset-body strong,
.video-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.asset-body p,
.video-item p,
.adapter-box p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.56;
}

.video-list {
  display: grid;
  gap: 10px;
}

.video-item {
  padding: 13px;
}

.video-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: var(--soft);
  font-size: 11px;
}

.summary-strip {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 12px;
}

.summary-strip strong {
  color: var(--accent);
}

.production-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.production-actions label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.production-actions button {
  min-height: 38px;
  border-radius: 12px;
}

.story-mini-list {
  display: grid;
  gap: 10px;
}

.task-item .progress {
  height: 5px;
  overflow: hidden;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.task-item .progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.billing-grid {
  display: grid;
  gap: 10px;
}

.billing-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.billing-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.billing-grid strong {
  font-size: 24px;
}

.toast-region {
  position: fixed;
  z-index: 50;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100% - 36px));
  pointer-events: none;
}

.toast {
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(20, 20, 23, 0.95);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.toast.success {
  border-color: rgba(232, 255, 113, 0.35);
}

.toast.error {
  border-color: rgba(251, 113, 133, 0.45);
}

.adapter-box code {
  display: block;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--accent);
  white-space: normal;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  body {
    overflow-y: auto;
  }

  .studio-view {
    grid-template-columns: 64px 310px 1fr;
  }

  .right-panel {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 8;
    width: min(360px, calc(100% - 32px));
    max-height: 48vh;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }
}

@media (max-width: 780px) {
  body {
    overflow: auto;
  }

  .topbar {
    padding: 18px;
  }

  .hero-composer {
    margin-top: 8vh;
    padding: 0 18px;
  }

  .prompt-actions {
    align-items: flex-start;
  }

  .mode-group {
    flex: 1;
  }

  .quick-prompts button {
    flex: 1 1 100%;
  }

  .home-rail {
    width: calc(100% - 36px);
  }

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

  .studio-view {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 68vh auto;
    height: auto;
    min-height: 100vh;
  }

  .sidebar {
    flex-direction: row;
    justify-content: space-between;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand-stack {
    flex-direction: row;
  }

  .side-nav {
    flex-direction: row;
    margin: 0;
  }

  .side-bottom {
    margin: 0;
  }

  .left-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .canvas-stage {
    min-height: 68vh;
  }

  .right-panel {
    position: static;
    width: auto;
    max-height: none;
    border-radius: 0;
    border-left: 0;
  }
}
