* { font-family: 'Inter', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif; }
body { background: #0a0a0f; color: #e4e4e7; min-height: 100vh; }

.bg-grid {
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(120,80,255,0.15), transparent),
    radial-gradient(ellipse 60% 40% at 80% 50%, rgba(255,80,120,0.08), transparent);
}

.glass { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); backdrop-filter: blur(20px); }

.mode-tab { transition: all .3s ease; }
.mode-tab.active { background: linear-gradient(135deg,#7c3aed,#ec4899); color: white; box-shadow: 0 4px 20px rgba(124,58,237,.3); }
.mode-tab:not(.active) { background: rgba(255,255,255,.05); color: #a1a1aa; }
.mode-tab:not(.active):hover { background: rgba(255,255,255,.1); color: #e4e4e7; }

.deep-type-carousel {
  position: relative;
  margin-top: 8px;
}
.deep-type-carousel::before,
.deep-type-carousel::after {
  content:'';
  position:absolute;
  top:0;
  bottom:0;
  width:72px;
  z-index:4;
  pointer-events:none;
}
.deep-type-carousel::before {
  left:0;
  background:linear-gradient(90deg, rgba(10,10,15,1), rgba(10,10,15,0));
}
.deep-type-carousel::after {
  right:0;
  background:linear-gradient(270deg, rgba(10,10,15,1), rgba(10,10,15,0));
}
.deep-type-grid {
  display:flex;
  gap:0;
  overflow-x:auto;
  padding:16px calc(50% - 82px);
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  overscroll-behavior-x:contain;
  scroll-padding-inline:calc(50% - 82px);
  -ms-overflow-style:none;
  scrollbar-width:none;
}
.deep-type-grid::-webkit-scrollbar { display:none; }
.deep-type-card {
  text-align:center;
  border:none;
  background:transparent;
  padding:16px 28px;
  transition:all .35s cubic-bezier(.22,.9,.3,1);
  position:relative;
  cursor:pointer;
  flex:0 0 auto;
  scroll-snap-align:center;
  opacity:.2;
}
.deep-type-card:hover { opacity:.45; }
.deep-type-card.active,
.deep-type-card.focus-main {
  opacity:1;
}
.deep-type-card.focus-near { opacity:.42; }
.deep-type-card.dimmed { opacity:.12; }
.deep-type-card-title {
  font-size: clamp(30px, 3.8vw, 60px);
  line-height: .95;
  letter-spacing:-.04em;
  color: rgba(244,244,245,.22);
  transition:color .35s ease, transform .35s ease, opacity .35s ease;
}
.deep-type-card-sub {
  margin-top:8px;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.2em;
  color: rgba(168,85,247,.18);
  transition:color .35s ease, opacity .35s ease;
}
.deep-type-card.focus-main .deep-type-card-title,
.deep-type-card.active .deep-type-card-title {
  color:#fafafa;
  transform:translateY(-1px);
}
.deep-type-card.focus-main .deep-type-card-sub,
.deep-type-card.active .deep-type-card-sub {
  color:rgba(168,85,247,.72);
}

.pmode-btn { transition: all .25s; border-radius: 10px; }
.pmode-btn.active { background: rgba(124,58,237,.2); border-color: rgba(124,58,237,.5); color: #c4b5fd; }
.pmode-btn:not(.active) { border-color: rgba(255,255,255,.08); color: #71717a; }
.pmode-btn:not(.active):hover { border-color: rgba(255,255,255,.15); color: #a1a1aa; }

.input-glow:focus { box-shadow: 0 0 0 2px rgba(124,58,237,.4),0 0 30px rgba(124,58,237,.1); border-color: #7c3aed; }
.btn-main { background: linear-gradient(135deg,#7c3aed,#ec4899); transition: all .3s; }
.btn-main:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(124,58,237,.4); }

.status-dot{width:8px;height:8px;border-radius:50%}
.status-dot.online{background:#22c55e;box-shadow:0 0 6px rgba(34,197,94,.5)}

.deep-input-shell {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(168,85,247,.16), transparent 30%),
    radial-gradient(circle at bottom left, rgba(236,72,153,.10), transparent 28%),
    rgba(255,255,255,.03);
  border-color: rgba(255,255,255,.09);
}
.deep-input-shell::before {
  content:'';
  position:absolute;
  inset:0;
  pointer-events:none;
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 32%);
}

.deep-mode-headline {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.deep-mode-kicker {
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.24em;
  color:rgba(244,244,245,.45);
  margin-bottom:6px;
}
.deep-mode-title {
  font-size:24px;
  line-height:1.15;
  color:#faf5ff;
  font-weight:600;
  letter-spacing:-.02em;
}
.deep-mode-subtitle {
  margin-top:8px;
  font-size:13px;
  line-height:1.8;
  color:rgba(212,212,216,.82);
  max-width:620px;
}
.deep-mode-badge {
  padding:7px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.22);
  font-size:11px;
  color:rgba(233,213,255,.82);
  white-space:nowrap;
}
.deep-thought-input {
  height:auto;
  min-height:84px;
  padding-top:22px !important;
  padding-bottom:22px !important;
  font-size:20px !important;
  border-radius:18px !important;
  background:rgba(255,255,255,.05) !important;
}

.role-flow-chips {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.role-flow-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  color: #e4e4e7;
  font-size: 12px;
  letter-spacing: .3px;
}
.role-flow-chip.active {
  border-color: rgba(168,85,247,.52);
  box-shadow: 0 0 0 1px rgba(168,85,247,.22), 0 0 22px rgba(124,58,237,.18);
  background: linear-gradient(135deg, rgba(124,58,237,.18), rgba(236,72,153,.12));
}
.role-flow-chip-avatar {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,.22));
}
.role-flow-sep {
  color: rgba(168,85,247,.72);
  font-size: 14px;
  line-height: 1;
  transform: translateY(-1px);
}

.chip-preview-list {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  min-height:32px;
}
.prompt-combined-preview {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: rgba(228,228,231,.92);
  font-size: 13px;
  line-height: 1.65;
}
.prompt-chip {
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.05);
  color:#f7efff;
  font-size:13px;
}
.prompt-chip.is-primary {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.26), rgba(255,255,255,.07));
  border-color: rgba(139, 92, 246, 0.32);
}
.prompt-chip-empty {
  color: rgba(161,161,170,.75);
  font-size: 13px;
}

.association-panel {
  min-width: 0;
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 2px;
  overflow: hidden;
}
.association-panel.is-hidden {
  display: none;
}
.association-chip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.association-chip-row::-webkit-scrollbar { display: none; }
.association-prefix,
.association-muted {
  flex: 0 0 auto;
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 11px;
}
.association-chip {
  border: 1px solid var(--border-1);
  background: var(--bg);
  color: var(--fg-1);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}
.association-chip:hover,
.association-chip.is-used {
  border-color: var(--accent);
  background: var(--signal-50);
}
.association-hide {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--fg-3);
  cursor: pointer;
  font-size: 11px;
  padding: 4px 0;
}

.style-chooser {
  display: grid;
  gap: 10px;
}

.style-chooser-trigger-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.style-chooser-label {
  color: rgba(161,161,170,.82);
  font-size: 12px;
}

.style-chooser-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.style-pill {
  cursor: pointer;
  transition: all .18s ease;
}

.style-pill.is-selected {
  background: linear-gradient(180deg, rgba(59,130,246,.22), rgba(255,255,255,.08));
  border-color: rgba(59,130,246,.36);
  box-shadow: 0 0 0 1px rgba(59,130,246,.12) inset;
}

.style-library-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.style-library-trigger strong {
  font-weight: 600;
  color: #faf5ff;
}

.style-library-modal-panel {
  max-height: min(84vh, 920px);
}

.style-library-card {
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.style-library-card:hover {
  transform: translateY(-1px);
  border-color: rgba(168,85,247,.32);
  box-shadow: 0 0 0 1px rgba(168,85,247,.12);
}

.style-library-card.is-selected {
  border-color: rgba(168,85,247,.52);
  box-shadow: 0 0 0 1px rgba(168,85,247,.24), 0 0 22px rgba(124,58,237,.12);
}

.modal-locked {
  overflow: hidden;
}

.points-card {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  padding: 14px 16px;
}

/* =========================================================
   Taiser system placement overhaul
   ========================================================= */

body.asir-app-page {
  background: var(--bg);
  color: var(--fg-1);
  font-family: var(--font-sans);
}

body.asir-app-page * {
  box-sizing: border-box;
}

.asir-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 56px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-1);
  background: rgba(243, 239, 230, 0.84);
  backdrop-filter: blur(8px);
}

.asir-topbar-left,
.asir-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.asir-topbar-right {
  justify-content: flex-end;
}

.asir-topbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.asir-brand {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-mono);
}

.asir-brand-word {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  color: var(--fg-1);
}

.asir-brand-bracket {
  color: var(--fg-1);
}

.asir-brand-mark {
  margin-left: 4px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 600;
}

.asir-version-chip,
.asir-meta-chip,
.asir-status-chip,
.asir-mode-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid var(--border-1);
  border-radius: var(--r-1);
  background: var(--bg-alt);
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.asir-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.asir-session-crumb {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-1);
}

.asir-icon-button,
.asir-member-chip,
.asir-rail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-pill);
  background: var(--bg-alt);
  color: var(--fg-1);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 120ms var(--ease-out), color 120ms var(--ease-out), background 120ms var(--ease-out);
}

.asir-icon-button:hover,
.asir-member-chip:hover,
.asir-rail-button:hover {
  border-color: var(--border-strong);
}

.asir-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
  min-height: calc(100vh - 56px - 230px);
}

.asir-utility-rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.asir-rail-block,
.asir-surface,
.stage-side-card,
.render-card,
.seed-card,
.seed-inspector-main,
.project-list-card,
.project-version-card,
.project-summary-box {
  border: 1px solid var(--border-1);
  border-radius: var(--r-2);
  background: var(--bg-alt);
  box-shadow: var(--shadow-1);
}

.asir-rail-block {
  padding: 16px;
}

.asir-block-head,
.asir-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.asir-rail-copy,
.asir-composer-hint,
.stage-meta,
.render-card-summary,
.seed-card p,
.seed-burst-desc,
.empty-hint,
.empty-sub {
  color: var(--fg-2);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
}

.asir-rail-actions {
  display: grid;
  gap: 10px;
}

.points-card {
  border: 1px solid var(--border-1);
  border-radius: var(--r-2);
  background: var(--bg);
  padding: 12px 14px;
  box-shadow: none;
}

.points-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.points-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-3);
}

.points-value {
  font-family: var(--font-mono);
  font-size: 28px;
  line-height: 1;
  color: var(--fg-1);
}

.points-meta {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--fg-2);
}

.asir-stage-shell {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.asir-surface {
  padding: 18px 20px;
}

.asir-section-title {
  margin: 4px 0 0;
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--fg-1);
}

.asir-section-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
}

.asir-card-deck {
  position: relative;
  overflow: hidden;
}

.asir-card-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 2px 8px;
  scrollbar-width: none;
}

.asir-card-track::-webkit-scrollbar {
  display: none;
}

.asir-mode-card {
  position: relative;
  flex: 0 0 220px;
  min-height: 188px;
  padding: 14px;
  scroll-snap-align: center;
  cursor: pointer;
  transition: transform 180ms var(--ease-out), border-color 180ms var(--ease-out), opacity 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.asir-mode-card::before,
.asir-mode-card::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid transparent;
}

.asir-mode-card::before {
  top: 6px;
  left: 6px;
  border-top-color: var(--border-strong);
  border-left-color: var(--border-strong);
}

.asir-mode-card::after {
  right: 6px;
  bottom: 6px;
  border-right-color: var(--border-strong);
  border-bottom-color: var(--border-strong);
}

.asir-mode-card.dimmed {
  opacity: 0.44;
}

.asir-mode-card.focus-near {
  opacity: 0.78;
}

.asir-mode-card.active,
.asir-mode-card.focus-main {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
  opacity: 1;
}

.asir-mode-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.asir-mode-index {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-3);
}

.asir-mode-card-body {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  min-height: 136px;
  margin-top: 16px;
}

.asir-mode-card-title {
  font-family: var(--font-serif);
  font-size: 32px;
  line-height: 0.95;
  color: var(--fg-1);
}

.asir-mode-card-cn {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--accent);
}

.asir-mode-card-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--fg-2);
}

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

.pmode-btn {
  min-height: 104px;
  border: 1px solid var(--border-1);
  border-radius: var(--r-2);
  background: var(--bg-alt);
  color: var(--fg-1);
  box-shadow: none;
}

.pmode-btn.active {
  background: var(--signal-50);
  border-color: var(--accent);
  color: var(--fg-1);
  box-shadow: inset 0 0 0 1px rgba(255, 91, 46, 0.12);
}

.pmode-btn:not(.active) {
  color: var(--fg-1);
}

.pmode-btn div:last-child {
  color: var(--fg-2) !important;
}

.asir-workflow-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.asir-workflow-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-1);
}

.asir-workflow-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid var(--border-1);
  border-radius: var(--r-pill);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.asir-workflow-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--fg-2);
}

.asir-pipeline-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.9fr);
  gap: 18px;
}

.asir-pipeline-main,
.asir-pipeline-side {
  min-width: 0;
}

.asir-flow-list {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.asir-flow-list li {
  padding: 8px 10px;
  border: 1px solid var(--border-1);
  border-radius: var(--r-1);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--fg-2);
}

.asir-stage-side {
  display: grid;
  gap: 14px;
}

.stage-panel {
  min-width: 0;
}

.stage-empty,
.stage-coming-soon {
  padding: 22px;
  border: 1px dashed var(--border-2);
  border-radius: var(--r-2);
  background: var(--bg);
}

.stage-empty h3,
.stage-coming-soon h3,
.stage-side-card h4,
.seed-inspector-main h3,
.render-card h4 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--fg-1);
}

.stage-empty p,
.stage-coming-soon p {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--fg-2);
}

.stage-help-list {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--fg-2);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
}

.stage-side-card {
  padding: 14px;
}

.stage-side-card h4 {
  margin-bottom: 10px;
}

.render-grid,
.seed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.render-card,
.seed-card {
  padding: 12px;
}

.render-card.active,
.seed-card.active,
.seed-card.is-preview,
.project-list-card.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255, 91, 46, 0.18);
}

.render-meta,
.seed-meta,
.seed-inspector-kicker,
.project-card-chip,
.project-version-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.render-preview,
.finalize-preview,
.project-version-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  margin: 10px 0 12px;
  overflow: hidden;
  border: 1px solid var(--border-1);
  border-radius: var(--r-1);
  background: var(--bg);
}

.render-preview img,
.finalize-preview img,
.project-version-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.render-preview-placeholder {
  padding: 16px;
  text-align: center;
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 12px;
}

.render-status {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
}

.render-status.is-error {
  color: var(--rust-500);
}

.btn-main,
.btn-secondary,
.btn-ghost,
.send-btn,
.pkg-btn,
.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--r-1);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 120ms var(--ease-out), background 120ms var(--ease-out), color 120ms var(--ease-out), transform 120ms var(--ease-out);
}

.btn-main,
.send-btn,
.pkg-btn,
.login-btn {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
}

.btn-main:hover,
.send-btn:hover,
.pkg-btn:hover,
.login-btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-inverse);
  border: 1px solid var(--bg-inverse);
  color: var(--fg-inverse);
}

.btn-ghost {
  background: var(--bg-alt);
  border: 1px solid var(--border-2);
  color: var(--fg-1);
}

.btn-ghost:hover,
.btn-secondary:hover {
  border-color: var(--border-strong);
}

.side-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.thought-stream,
.seed-burst-board,
.seed-inspector,
.role-chat-card {
  display: grid;
  gap: 14px;
}

.thought-stream,
.seed-burst-board,
.seed-inspector-main {
  padding: 14px;
  border: 1px solid var(--border-1);
  border-radius: var(--r-2);
  background: var(--bg);
}

.thought-line {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
  color: var(--fg-2);
}

.seed-burst-kicker,
.seed-burst-title,
.seed-inspector-kicker {
  margin: 0;
}

.seed-burst-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.seed-burst-title {
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1.08;
  color: var(--fg-1);
}

.seed-constellation {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px dashed var(--border-2);
  border-radius: var(--r-2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(243, 239, 230, 0.95));
}

.seed-constellation-core-wrap {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.seed-constellation-core {
  max-width: 220px;
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  background: var(--bg-alt);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-1);
}

.seed-constellation-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
}

.seed-orbit-node,
.dir-pill {
  border: 1px solid var(--border-1);
  border-radius: var(--r-2);
  background: var(--bg-alt);
  color: var(--fg-1);
  font-family: var(--font-mono);
  cursor: pointer;
}

.seed-orbit-node {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 140px;
  padding: 10px;
  transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty)));
  text-align: left;
}

.seed-orbit-node.is-preview,
.seed-orbit-node.is-selected,
.dir-pill.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255, 91, 46, 0.18);
}

.seed-orbit-node-kicker {
  display: block;
  font-size: 10px;
  color: var(--fg-3);
  text-transform: uppercase;
}

.seed-orbit-node-label,
.pill-name {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.5;
}

.dir-pills {
  display: grid;
  gap: 10px;
}

.dir-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.pill-id {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--r-pill);
  background: var(--bg);
  font-size: 10px;
  color: var(--fg-3);
}

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

.role-chat-bubble {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border-1);
  border-radius: var(--r-2);
  background: var(--bg);
}

.role-chat-bubble.is-progress {
  border-color: rgba(255, 91, 46, 0.3);
}

.role-chat-bubble.is-error {
  border-color: rgba(178, 58, 31, 0.3);
}

.role-chat-avatar {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.role-chat-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}

.role-chat-name {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-1);
}

.role-chat-meta,
.role-chat-points {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
}

.role-chat-body {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--fg-2);
  white-space: pre-wrap;
}

.asir-composer-dock {
  position: sticky;
  bottom: 0;
  z-index: 20;
  padding: 0 24px 24px;
}

.asir-composer-shell {
  max-width: 1440px;
  margin: 0 auto;
  border: 1px solid var(--accent);
  border-radius: var(--r-3);
  background: rgba(251, 249, 242, 0.96);
  box-shadow: var(--shadow-3);
  backdrop-filter: blur(8px);
  padding: 16px 18px 14px;
}

.asir-composer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.asir-composer-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.asir-composer-enter-hint,
.asir-start-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
}

.asir-composer-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.asir-composer-meta-block {
  display: grid;
  gap: 8px;
}

.role-flow-chip,
.prompt-chip,
.style-pill {
  background: var(--bg);
  border: 1px solid var(--border-1);
  color: var(--fg-1);
  border-radius: var(--r-pill);
  box-shadow: none;
}

.role-flow-chip.active,
.prompt-chip.is-primary,
.style-pill.is-selected {
  background: var(--signal-50);
  border-color: var(--accent);
  color: var(--fg-1);
}

.role-flow-chip-avatar {
  filter: none;
}

.prompt-combined-preview {
  border-color: var(--border-1);
  background: var(--bg);
  color: var(--fg-2);
}

.style-chooser-label,
.prompt-chip-empty {
  color: var(--fg-3);
}

.asir-style-chooser {
  margin-top: 14px;
}

.asir-composer-input-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-2);
  background: var(--bg);
}

.asir-prompt-mark {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
}

.asir-composer-input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  color: var(--fg-1);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.6;
}

.asir-composer-input::placeholder {
  color: var(--fg-4);
}

.asir-send-button {
  min-width: 180px;
}

.asir-composer-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.asir-quick-fragments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prompt-chip {
  padding: 7px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.project-modal-panel,
.style-library-modal-panel,
.material-library-body,
.member-center-shell {
  color: var(--fg-1);
}

.project-empty {
  padding: 18px;
  border: 1px dashed var(--border-2);
  border-radius: var(--r-2);
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 12px;
}

.project-card-title,
.project-version-title {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg-1);
}

.project-card-subtitle,
.project-version-subtitle,
.project-version-value,
.project-version-label {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--fg-2);
}

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

  .asir-utility-rail {
    order: 2;
  }

  .asir-pipeline-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .asir-topbar {
    grid-template-columns: 1fr;
    height: auto;
    padding: 12px 16px;
  }

  .asir-topbar-center,
  .asir-topbar-right {
    justify-content: flex-start;
  }

  .asir-shell,
  .asir-composer-dock {
    padding-left: 16px;
    padding-right: 16px;
  }

  .pmode-grid,
  .asir-composer-meta-grid,
  .render-grid,
  .seed-grid {
    grid-template-columns: 1fr;
  }

  .asir-composer-input-row {
    grid-template-columns: 20px 1fr;
  }

  .asir-send-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .asir-composer-footer,
  .asir-composer-head {
    flex-direction: column;
  }
}

/* =========================================================
   Layout correction: match Taiser structure more closely
   ========================================================= */

.asir-shell {
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 0;
  max-width: none;
  padding: 0;
  min-height: calc(100vh - 56px - 208px);
}

.asir-sidebar {
  border-right: 1px solid var(--border-1);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: rgba(243, 239, 230, 0.56);
}

.asir-side-section {
  display: grid;
  gap: 10px;
}

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

.asir-side-stack {
  display: grid;
  gap: 8px;
}

.asir-side-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-1);
  border-radius: var(--r-1);
  background: var(--bg-alt);
  color: var(--fg-1);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
}

.asir-side-item:hover {
  border-color: var(--border-strong);
}

.asir-side-notes {
  display: grid;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.65;
  color: var(--fg-3);
}

.is-hidden {
  display: none !important;
}

.points-card-compact .points-value {
  font-size: 20px;
}

.points-card-compact .points-meta {
  font-size: 10px;
}

.asir-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 28px 0;
}

.asir-mode-stage {
  min-height: 248px;
}

.asir-main-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.asir-main-title {
  margin: 4px 0 0;
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1;
  color: var(--fg-1);
}

.asir-main-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.asir-workflow-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 18px;
}

.asir-workflow-inline .pmode-btn {
  min-height: 0;
  padding: 10px 12px;
  flex: 0 1 360px;
}

.asir-card-deck {
  margin-top: 2px;
}

.asir-card-track {
  padding-top: 6px;
  padding-bottom: 14px;
}

.asir-mode-card {
  flex-basis: 188px;
  min-height: 164px;
}

.asir-center-stage {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 8px 0 24px;
}

.asir-flow-list {
  margin: 0 0 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stage-panel {
  flex: 1;
  min-height: 320px;
}

.stage-empty,
.stage-coming-soon,
.stage-seeds,
.stage-render,
.dir-choice-stage {
  min-height: 360px;
}

.stage-empty,
.stage-coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: transparent;
  border: none;
}

.stage-empty h3,
.stage-coming-soon h3 {
  font-family: var(--font-serif);
  font-size: 54px;
  font-weight: 400;
  line-height: 1;
}

.stage-empty p,
.stage-coming-soon p {
  max-width: 420px;
  margin-top: 10px;
}

.stage-help-list {
  max-width: 520px;
  text-align: left;
}

.asir-stage-side {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.stage-side-card {
  background: var(--bg);
}

.role-chat-card {
  order: -1;
}

.role-chat-bubble {
  grid-template-columns: 42px minmax(0, 1fr);
}

.role-chat-avatar-text {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-1);
  border-radius: 50%;
  background: var(--bg-alt);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-2);
}

.asir-role-text-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 32px;
}

.asir-role-text-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border-1);
  border-radius: var(--r-pill);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
}

.asir-role-text-chip.active {
  color: var(--fg-1);
  border-color: var(--accent);
  background: var(--signal-50);
}

.asir-role-text-sep {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-4);
}

.asir-composer-dock {
  padding: 0 28px 18px 228px;
}

.asir-composer-shell {
  max-width: none;
  border-radius: var(--r-2);
}

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

.asir-composer-meta-block.is-hidden,
.asir-style-chooser.is-hidden,
.asir-workflow-inline.is-hidden,
.asir-flow-list.is-hidden,
.asir-stage-side.is-hidden,
#projectButton.is-hidden,
#asirStartHint.is-hidden,
#quickFragments.is-hidden {
  display: none !important;
}

.seed-burst-board,
.seed-inspector-main,
.thought-stream,
.render-card,
.seed-card {
  background: var(--bg-alt);
}

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

  .asir-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-1);
  }

  .asir-composer-dock {
    padding-left: 16px;
  }
}

@media (max-width: 860px) {
  .asir-main {
    padding: 14px 16px 0;
  }

  .asir-flow-list {
    grid-template-columns: 1fr;
  }

  .asir-composer-dock {
    padding: 0 16px 16px;
  }

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

.member-modal-frame {
  background: transparent;
}

.member-center-shell {
  position: fixed;
  width: min(360px, calc(100vw - 24px));
  max-width: none;
  margin-left: 0;
  max-height: 70vh;
  overflow-y: auto;
  box-shadow: 0 22px 60px rgba(0,0,0,.42);
  background:
    radial-gradient(circle at top left, rgba(127,29,29,.22), transparent 28%),
    radial-gradient(circle at bottom right, rgba(168,85,247,.12), transparent 30%),
    rgba(22,18,24,.92);
}

.member-center-shell.is-recharge {
  width: min(520px, calc(100vw - 24px));
}

.member-center-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.member-center-tab {
  min-width: 108px;
  border-radius: 999px;
  padding: 10px 16px;
  border: 1px solid rgba(127,29,29,.45);
  background: rgba(34,16,22,.72);
  color: rgba(244,244,245,.88);
  font-size: 13px;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.member-center-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(248,113,113,.56);
  box-shadow: 0 10px 26px rgba(127,29,29,.18);
}

.member-center-tab.active {
  background: linear-gradient(180deg, rgba(248,113,113,.92), rgba(220,38,38,.86));
  border-color: rgba(252,165,165,.74);
  color: #fff7f7;
  box-shadow: 0 12px 28px rgba(220,38,38,.26);
}

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

.member-action-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  border-radius: 16px;
  border: 1px solid rgba(127,29,29,.46);
  background: linear-gradient(180deg, rgba(22,8,11,.96), rgba(28,8,12,.88));
  padding: 0 14px;
  color: rgba(244,244,245,.92);
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.member-action-card:hover {
  transform: translateY(-1px);
  border-color: rgba(248,113,113,.62);
  box-shadow: 0 14px 30px rgba(127,29,29,.22), inset 0 0 0 1px rgba(248,113,113,.08);
  background: linear-gradient(180deg, rgba(38,8,12,.98), rgba(44,8,14,.92));
}

.member-action-card.is-danger:hover {
  border-color: rgba(252,165,165,.8);
  box-shadow: 0 16px 36px rgba(127,29,29,.26), inset 0 0 0 1px rgba(252,165,165,.12);
}

.member-action-card.is-disabled,
.member-action-card:disabled {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.member-action-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(252,165,165,1) 0%, rgba(220,38,38,1) 55%, rgba(69,10,10,1) 100%);
  box-shadow: 0 0 10px rgba(248,113,113,.45);
  flex-shrink: 0;
}

.member-action-text {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
}

.member-payment-qr {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border-1);
  background: var(--bg-alt);
  border-radius: 14px;
  padding: 12px;
  margin: 12px 0;
}

.member-payment-qr img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border: 1px solid var(--border-1);
  background: #fff;
  border-radius: 10px;
}

#memberAccountView .grid {
  grid-template-columns: 1fr;
}

#memberAccountView #memberQuickStats .grid {
  grid-template-columns: 1fr 1fr;
}

#memberAccountCard,
#memberQuickStats,
#memberAuthSection,
#memberPlansSection,
#memberRechargeSection,
#memberLedgerSection,
#adminPanel {
  border-radius: 16px;
}

#memberAccountCard,
#memberQuickStats,
#memberAuthSection,
#memberPlansSection,
#memberRechargeSection,
#memberLedgerSection,
#adminPanel,
#memberAuthForms .glass {
  padding: 12px;
}

#memberAccountCard .points-value {
  font-size: 24px;
}

#memberAccountCard .meta,
#memberMeta,
#memberAuthState,
#memberMessage {
  font-size: 12px;
  line-height: 1.6;
}

#memberQuickStats .text-xl {
  font-size: 18px;
}

#memberQuickStats .grid {
  gap: 10px;
}

#memberQuickStats .rounded-xl,
#memberRechargeSection .rounded-xl,
#memberLedgerList > div,
#adminMembersList > button {
  border-radius: 14px;
}

@media (max-width: 720px) {
  .member-modal-frame {
    background: rgba(0,0,0,.18);
  }

  .member-center-shell,
  .member-center-shell.is-recharge {
    width: min(360px, calc(100vw - 24px));
  }

  #memberAccountView #memberQuickStats .grid {
    grid-template-columns: 1fr;
  }
}

.points-row {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  margin-bottom:10px;
}
.points-value {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}

.flow-list li {
  color: rgba(228,228,231,.82);
  line-height: 1.7;
}

.role-card {
  display:grid;
  grid-template-columns:60px 1fr;
  gap:12px;
  align-items:center;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  padding: 14px;
}
.role-card img {
  width:60px;
  height:60px;
  object-fit:contain;
}

.template-card {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  padding: 14px;
}
.template-card pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(0,0,0,.18);
  padding: 12px;
  border-radius: 12px;
  color: #ddd4f3;
  margin: 10px 0 0;
  font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.stage-panel {
  min-height: 420px;
}

.stage-empty,
.stage-coming-soon,
.stage-error,
.stage-seeds,
.stage-render,
.stage-finalize {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  background: rgba(255,255,255,.02);
  padding: 18px;
}

.stage-empty h3,
.stage-coming-soon h3,
.stage-error h3,
.stage-side-card h4 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #faf5ff;
}

.stage-empty p,
.stage-coming-soon p,
.stage-error p,
.seed-card p,
.render-card-summary,
.stage-meta,
.thought-line {
  color: rgba(228,228,231,.76);
  line-height: 1.7;
  font-size: 14px;
}

.stage-help-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.stage-help-list li {
  color: rgba(212,212,216,.82);
  font-size: 14px;
  line-height: 1.7;
}

.stage-coming-soon {
  min-height: 280px;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 10px;
}

.stage-side-card {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.03);
  padding: 16px;
}

#inputTips:empty {
  display: none;
}

.role-chat-card {
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(168,85,247,.12), transparent 32%),
    rgba(255,255,255,.03);
}

.role-chat-list {
  display: grid;
  gap: 12px;
  max-height: 720px;
  overflow: auto;
  padding-right: 2px;
}

.role-chat-bubble {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.03);
  transition: opacity .22s ease, transform .22s ease, filter .22s ease;
}

.role-chat-bubble.is-latest {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.role-chat-bubble.is-recent {
  opacity: .82;
  transform: translateY(0) scale(.992);
}

.role-chat-bubble.is-older {
  opacity: .52;
  filter: saturate(.78);
  transform: translateY(0) scale(.985);
}

.role-chat-bubble.is-progress {
  border-color: rgba(34,197,94,.18);
  background: rgba(15, 23, 42, .55);
}

.role-chat-bubble.is-error {
  border-color: rgba(248,113,113,.22);
  background: rgba(127,29,29,.16);
}

.role-chat-avatar {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.28));
}

.role-chat-content {
  min-width: 0;
}

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

.role-chat-name {
  color: #faf5ff;
  font-size: 13px;
  font-weight: 600;
}

.role-chat-meta {
  color: rgba(168,85,247,.82);
  font-size: 11px;
  letter-spacing: .04em;
  white-space: nowrap;
}

.role-chat-body {
  color: rgba(228,228,231,.86);
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

.role-chat-points {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(124,58,237,.12);
  border: 1px solid rgba(168,85,247,.18);
  color: #ddd6fe;
  font-size: 11px;
}

.ledger-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ledger-toolbar .meta {
  font-size: 12px;
  color: #a1a1aa;
}

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

.side-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: rgba(228,228,231,.82);
}

.side-meta-row strong {
  color: #faf5ff;
  font-weight: 600;
}

.seed-grid,
.render-grid {
  display: grid;
  gap: 14px;
}

.stage-seeds {
  display: grid;
  gap: 18px;
}

.dir-choice-stage,
.stage-seeds {
  display: grid;
  gap: 18px;
}

.dir-immersive {
  position: relative;
  padding: 6px 0 2px;
}

.dir-ghost-text {
  font-size: 13px;
  line-height: 1.9;
  color: rgba(212, 212, 216, 0.62);
  font-style: italic;
  text-align: center;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 72px;
  transition: opacity .28s ease;
}

.dir-pills {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.dir-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(228,228,231,.76);
  font-size: 13px;
  cursor: pointer;
  transition: all .28s cubic-bezier(.22,.9,.3,1);
  position: relative;
  overflow: hidden;
}

.dir-pill::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  opacity: 0;
  background: linear-gradient(135deg, rgba(124,58,237,.18), rgba(236,72,153,.14));
  transition: opacity .28s ease;
}

.dir-pill:hover,
.dir-pill.active {
  border-color: rgba(168,85,247,.48);
  color: #faf5ff;
  transform: translateY(-1px);
}

.dir-pill:hover::before,
.dir-pill.active::before {
  opacity: 1;
}

.dir-pill .pill-id,
.dir-pill .pill-name {
  position: relative;
  z-index: 1;
}

.dir-pill .pill-id {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  font-size: 11px;
  font-weight: 700;
}

.dir-pill.active .pill-id {
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: #fff;
}

.dir-pill .pill-name {
  font-weight: 600;
}

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

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

.thought-stream {
  display: grid;
  gap: 10px;
}

.thought-line {
  border-left: 2px solid rgba(168,85,247,.42);
  padding-left: 12px;
}

.seed-card,
.render-card {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.03);
  padding: 14px;
}

.seed-card.is-preview {
  border-color: rgba(96,165,250,.36);
  box-shadow: 0 0 0 1px rgba(96,165,250,.12);
}

.seed-card.active,
.render-card.active {
  border-color: rgba(168,85,247,.52);
  box-shadow: 0 0 0 1px rgba(168,85,247,.22), 0 0 22px rgba(124,58,237,.12);
}

.seed-card h4,
.render-card h4 {
  margin: 0 0 6px;
  font-size: 16px;
  color: #faf5ff;
}

.seed-burst-board {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  background:
    radial-gradient(circle at center, rgba(124,58,237,.12), transparent 32%),
    rgba(255,255,255,.02);
  padding: 18px;
  display: grid;
  gap: 18px;
}

.seed-burst-copy {
  display: grid;
  gap: 6px;
}

.seed-burst-kicker,
.seed-inspector-kicker {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(168,85,247,.78);
}

.seed-burst-title {
  font-size: 18px;
  color: #faf5ff;
  font-weight: 600;
}

.seed-burst-desc {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(228,228,231,.72);
}

.seed-constellation {
  position: relative;
  min-height: 430px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.seed-constellation::before,
.seed-constellation::after {
  content: "";
  position: absolute;
  inset: 50%;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  border: 1px dashed rgba(255,255,255,.06);
}

.seed-constellation::before {
  width: 320px;
  height: 320px;
}

.seed-constellation::after {
  width: 460px;
  height: 460px;
}

.seed-constellation.is-waiting::before,
.seed-constellation.is-waiting::after {
  animation: seedPulseRing 2.6s ease-in-out infinite;
}

.seed-constellation-core-wrap {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.seed-constellation-core {
  max-width: 300px;
  padding: 14px 28px;
  border-radius: 999px;
  background: rgba(15,15,25,.92);
  border: 1px solid rgba(124,58,237,.35);
  color: #f5f3ff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 0 28px rgba(124,58,237,.18), 0 0 80px rgba(236,72,153,.08);
}

.seed-constellation-hint,
.seed-constellation-waiting {
  font-size: 12px;
  color: rgba(196,181,253,.74);
  text-align: center;
}

.seed-thought-shard {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(220px, 28vw);
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(15,15,24,.72);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 32px rgba(0,0,0,.18);
  transform: translate(var(--tx), var(--ty));
  opacity: 0;
  animation: orbitAppear .45s cubic-bezier(.22,.9,.3,1) forwards;
  animation-delay: calc(var(--delay) + .12s);
  z-index: 1;
}

.seed-thought-shard.right {
  text-align: right;
}

.seed-thought-shard.is-live {
  border-color: rgba(236,72,153,.32);
  box-shadow: 0 0 0 1px rgba(236,72,153,.12), 0 18px 40px rgba(236,72,153,.12);
}

.seed-thought-meta {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(196,181,253,.8);
  margin-bottom: 5px;
}

.seed-thought-text {
  font-size: 12px;
  line-height: 1.7;
  color: rgba(244,244,245,.8);
}

.seed-constellation-waiting {
  position: absolute;
  bottom: 18px;
}

.seed-orbit-node {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(var(--tx), var(--ty));
  min-width: 136px;
  max-width: 180px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: rgba(228,228,231,.88);
  display: grid;
  gap: 2px;
  text-align: left;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  opacity: 0;
  animation: orbitAppear .5s cubic-bezier(.22,.9,.3,1) forwards, orbitFloat 4s ease-in-out infinite;
  animation-delay: var(--delay), calc(var(--delay) + .42s);
}

.seed-orbit-node:hover,
.seed-orbit-node.is-preview {
  border-color: rgba(168,85,247,.48);
  background: rgba(124,58,237,.14);
  color: #faf5ff;
}

.seed-orbit-node.is-selected {
  border-color: rgba(236,72,153,.55);
  box-shadow: 0 0 0 1px rgba(236,72,153,.2), 0 0 22px rgba(236,72,153,.16);
}

.seed-orbit-node-kicker {
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(196,181,253,.76);
}

.seed-orbit-node-label {
  font-size: 13px;
  font-weight: 600;
  color: inherit;
  line-height: 1.5;
}

.seed-inspector {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.seed-inspector-main {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.03);
  padding: 16px;
  min-height: 180px;
}

.seed-inspector-main h3 {
  margin: 6px 0 10px;
  font-size: 18px;
  color: #faf5ff;
}

.seed-inspector-main p {
  margin: 0;
  color: rgba(228,228,231,.76);
  line-height: 1.8;
  font-size: 14px;
}

.seed-card .seed-meta,
.render-card .render-meta {
  margin-bottom: 10px;
  color: rgba(168,85,247,.78);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .18em;
}

.seed-actions,
.render-actions,
.side-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.btn-secondary,
.btn-ghost,
.btn-danger {
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.1);
  transition: all .2s ease;
}

.btn-secondary {
  background: linear-gradient(135deg,#7c3aed,#ec4899);
  color: #fff;
  border-color: transparent;
}

.btn-ghost {
  background: rgba(255,255,255,.03);
  color: rgba(228,228,231,.92);
}

.btn-danger {
  background: rgba(239,68,68,.1);
  color: #fecaca;
  border-color: rgba(239,68,68,.24);
}

.render-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(124,58,237,.18), rgba(236,72,153,.08)),
    rgba(255,255,255,.02);
  display: grid;
  place-content: center;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,.08);
}

.render-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.render-status {
  font-size: 12px;
  color: rgba(228,228,231,.76);
}

.render-status.is-error {
  color: #fca5a5;
}

.render-preview-placeholder {
  text-align: center;
  color: rgba(244,244,245,.52);
  font-size: 14px;
  padding: 0 18px;
  line-height: 1.7;
}

.finalize-preview {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.08);
}

.finalize-preview img {
  width: 100%;
  display: block;
}

.material-library-body {
  display: grid;
  gap: 18px;
  max-height: min(70vh, 820px);
  overflow: auto;
  padding-right: 4px;
}

.material-library-section {
  display: grid;
  gap: 12px;
}

.material-library-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.material-library-section-head h4 {
  margin: 0;
  font-size: 15px;
  color: #faf5ff;
}

.material-library-section-head span {
  color: rgba(161,161,170,.82);
  font-size: 12px;
}

.material-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
  gap: 14px;
}

.material-mode-pill,
.material-category-pill {
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: rgba(228,228,231,.82);
  font-size: 13px;
  font-weight: 600;
  transition: all .18s ease;
}

.material-mode-pill.active,
.material-category-pill.active {
  border-color: rgba(168,85,247,.4);
  background: linear-gradient(135deg, rgba(124,58,237,.24), rgba(236,72,153,.14));
  color: #faf5ff;
}

.material-lib-card {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.03);
  overflow: hidden;
  display: grid;
}

.project-modal-panel {
  max-height: min(82vh, 960px);
  overflow: hidden;
}

.project-modal-layout {
  display: grid;
  grid-template-columns: 320px 320px minmax(0, 1fr);
  gap: 16px;
  min-height: min(68vh, 760px);
}

.project-panel {
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 18px;
  background: rgba(255,255,255,.03);
  padding: 16px;
  display: grid;
  gap: 14px;
  min-height: 0;
}

.project-setup-panel {
  align-content: start;
}

.project-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-section-head h4 {
  margin: 0;
  font-size: 15px;
  color: #faf5ff;
}

.project-section-head span {
  display: block;
  margin-top: 4px;
  color: rgba(161,161,170,.82);
  font-size: 12px;
  line-height: 1.6;
}

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

.project-field {
  display: grid;
  gap: 8px;
}

.project-field span {
  font-size: 12px;
  color: rgba(212,212,216,.85);
}

.project-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-list-body,
.project-detail-body {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  display: grid;
  gap: 12px;
}

.project-list-card,
.project-version-card {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  padding: 14px;
  display: grid;
  gap: 10px;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.project-list-card:hover,
.project-version-card:hover {
  border-color: rgba(168,85,247,.28);
  background: rgba(255,255,255,.045);
  transform: translateY(-1px);
}

.project-list-card.active {
  border-color: rgba(168,85,247,.5);
  box-shadow: 0 0 0 1px rgba(168,85,247,.18) inset;
  background: linear-gradient(180deg, rgba(124,58,237,.12), rgba(255,255,255,.04));
}

.project-card-top,
.project-version-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.project-card-title,
.project-version-title {
  margin: 0;
  font-size: 14px;
  color: #faf5ff;
}

.project-card-subtitle,
.project-version-subtitle {
  font-size: 12px;
  color: rgba(161,161,170,.88);
  line-height: 1.6;
}

.project-card-meta,
.project-version-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-card-chip,
.project-version-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(10,10,15,.24);
  color: rgba(228,228,231,.78);
  font-size: 11px;
}

.project-version-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-version-body {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.project-version-preview {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
  min-height: 132px;
}

.project-version-preview img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  display: block;
}

.project-version-summary {
  display: grid;
  gap: 8px;
}

.project-version-row {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  background: rgba(255,255,255,.02);
  padding: 10px 12px;
}

.project-version-label {
  font-size: 11px;
  color: rgba(161,161,170,.84);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.project-version-value {
  font-size: 13px;
  color: rgba(244,244,245,.92);
  line-height: 1.6;
}

.project-summary-box {
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.project-empty {
  border: 1px dashed rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.02);
  padding: 20px 16px;
  color: rgba(161,161,170,.82);
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 1080px) {
  .project-modal-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .project-modal-panel {
    max-height: min(88vh, 1100px);
    overflow: auto;
  }
  .project-list-body,
  .project-detail-body {
    max-height: 42vh;
  }
}

@media (max-width: 720px) {
  .project-version-body {
    grid-template-columns: 1fr;
  }
  .project-version-preview img {
    height: 180px;
  }
}

.material-lib-preview {
  position: relative;
  min-height: 164px;
  padding: 14px;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(135deg,#18181b 0%,#3f3f46 100%);
}

.material-lib-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.material-lib-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,15,.08), rgba(10,10,15,.62));
}

.material-lib-preview-content {
  position: relative;
  z-index: 1;
  width: 100%;
}

.material-lib-badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.material-lib-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(10,10,15,.28);
  color: rgba(244,244,245,.82);
}

.material-lib-title {
  margin: 0;
  font-size: 16px;
  color: #fff;
}

.material-lib-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.material-lib-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(10,10,15,.2);
  color: rgba(244,244,245,.84);
}

.material-lib-content {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.material-lib-description {
  color: rgba(228,228,231,.82);
  font-size: 13px;
  line-height: 1.7;
}

.material-lib-micro {
  display: grid;
  gap: 6px;
}

.material-lib-micro-line {
  color: rgba(161,161,170,.86);
  font-size: 12px;
  line-height: 1.65;
}

.material-lib-micro-line strong {
  color: #e9d5ff;
  font-weight: 600;
}

.material-lib-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.material-lib-action {
  flex: 1 1 0;
  min-width: 96px;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.03);
  color: rgba(228,228,231,.92);
  font-size: 12px;
  font-weight: 600;
  transition: all .18s ease;
}

.material-lib-action:disabled,
.material-lib-action.is-loading {
  opacity: .72;
  cursor: wait;
}

.material-lib-action:hover {
  border-color: rgba(168,85,247,.32);
  color: #faf5ff;
}

.material-lib-action.is-danger:hover {
  border-color: rgba(248,113,113,.32);
  color: #fecaca;
}

.material-lib-inline-status {
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(168,85,247,.18);
  background: rgba(124,58,237,.08);
  color: rgba(233,213,255,.92);
  font-size: 12px;
  line-height: 1.6;
}

.material-lib-inline-status.is-error {
  border-color: rgba(248,113,113,.24);
  background: rgba(127,29,29,.14);
  color: #fecaca;
}

.material-lib-empty {
  border: 1px dashed rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 26px 18px;
  color: rgba(161,161,170,.82);
  text-align: center;
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 960px) {
  .deep-mode-headline {
    flex-direction: column;
  }
  .deep-type-carousel::before,
  .deep-type-carousel::after {
    width: 40px;
  }
  .deep-type-grid {
    padding:12px calc(50% - 64px);
    scroll-padding-inline: calc(50% - 64px);
  }
  .deep-type-card {
    padding: 14px 18px;
  }
  .deep-type-card-title {
    font-size: clamp(24px, 8vw, 42px);
  }
  .seed-inspector {
    grid-template-columns: 1fr;
  }
  .seed-constellation {
    min-height: 360px;
  }
  .seed-thought-shard {
    width: min(180px, 42vw);
    padding: 8px 10px;
  }
  .seed-constellation::before {
    width: 250px;
    height: 250px;
  }
  .seed-constellation::after {
    width: 340px;
    height: 340px;
  }
  .material-library-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes orbitFloat {
  0% { transform: translate(var(--tx), var(--ty)) scale(1); }
  50% { transform: translate(calc(var(--tx) + 3px), calc(var(--ty) - 4px)) scale(1.02); }
  100% { transform: translate(var(--tx), var(--ty)) scale(1); }
}

@keyframes orbitAppear {
  0% { opacity: 0; transform: translate(0, 0) scale(.42); filter: blur(6px); }
  100% { opacity: 1; transform: translate(var(--tx), var(--ty)) scale(1); filter: blur(0); }
}

@keyframes seedPulseRing {
  0%, 100% { opacity: .45; box-shadow: 0 0 0 rgba(124,58,237,0); }
  50% { opacity: .7; box-shadow: 0 0 36px rgba(124,58,237,.12); }
}
