:root {
  --bg: #f7fbfa;
  --surface: #ffffff;
  --ink: #101817;
  --text: #2c3936;
  --muted: #70807b;
  --line: #e1ebe7;
  --green: #3bc08f;
  --green-dark: #177a60;
  --green-soft: #eaf9f3;
  --blue: #3e7fca;
  --violet: #7661ca;
  --amber: #d6942c;
  --coral: #d7624e;
  --shadow: 0 18px 42px rgba(16, 48, 40, 0.08);
  --font: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #eef6f3;
  color: var(--text);
  font-family: var(--font);
  overflow-x: hidden;
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.app-shell {
  width: min(1440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px 1fr;
  background:
    radial-gradient(circle at 58% 8%, rgba(68, 210, 164, 0.16), transparent 34%),
    linear-gradient(rgba(68, 191, 151, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(68, 191, 151, 0.045) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 38px 38px, 38px 38px, auto;
}

.side {
  min-height: 100vh;
  padding: 28px 20px;
  background: rgba(255, 255, 255, 0.93);
  border-right: 1px solid var(--line);
  position: relative;
}

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

.brand-mark,
.assistant-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 18px;
}

.brand strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.brand span,
.scenario-card span,
.side-step,
.topbar span,
.dock-head p,
.agent-dock p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.scenario-card,
.agent-dock,
.composer,
.question-card,
.confirm-card,
.result-pack,
.home-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.scenario-card {
  padding: 15px;
  margin-bottom: 24px;
  box-shadow: none;
}

.scenario-card small,
.dock-section small {
  display: block;
  color: #98a6a2;
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 8px;
}

.scenario-card strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  margin-bottom: 8px;
}

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

.side-step {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 8px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  text-align: left;
  font-weight: 850;
}

.side-step span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #cfdad6;
}

.side-step.done span,
.side-step.active span {
  background: var(--green);
}

.side-step.active {
  background: var(--green-soft);
  color: var(--ink);
}

.ghost-button {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 24px;
  height: 42px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  color: #52625d;
  font-weight: 850;
}

.chat-shell {
  padding: 28px 56px 48px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}

.topbar strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.top-actions {
  display: flex;
  gap: 8px;
}

.pill {
  min-height: 28px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  color: #52625d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.pill.green {
  color: var(--green-dark);
  border-color: #bdeadc;
  background: var(--green-soft);
}

.pill.amber {
  color: #a66b14;
  border-color: #f0d39b;
  background: #fff7e8;
}

.pill.coral {
  color: var(--coral);
  border-color: #f1c7bf;
  background: #fff1ed;
}

.chat-stage {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.app-shell.is-step-change .chat-stage > * {
  animation: riseIn 420ms cubic-bezier(0.2, 0.85, 0.25, 1) both;
}

.app-shell.is-step-change .chat-stage > *:nth-child(2) {
  animation-delay: 50ms;
}

.app-shell.is-step-change .chat-stage > *:nth-child(3) {
  animation-delay: 100ms;
}

.app-shell.is-step-change .chat-stage > *:nth-child(4) {
  animation-delay: 150ms;
}

.chat-stage.center {
  min-height: 650px;
  align-content: center;
}

.assistant-head {
  text-align: center;
  margin-bottom: 2px;
}

.mobile-scene-card {
  display: none;
}

.assistant-head .assistant-logo {
  margin: 0 auto 18px;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  font-size: 28px;
}

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

.assistant-head h1 {
  color: var(--ink);
  font-size: 36px;
  font-weight: 900;
  line-height: 1.12;
}

.assistant-head p {
  color: var(--muted);
  margin-top: 10px;
  font-size: 16px;
}

.composer {
  padding: 18px;
}

.composer.large {
  min-height: 170px;
}

.composer textarea {
  width: 100%;
  min-height: 90px;
  resize: none;
  border: 0;
  outline: 0;
  color: #52615d;
  background: transparent;
  font-size: 16px;
  line-height: 1.6;
}

.composer-bar {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chips {
  display: flex;
  gap: 8px;
}

.chip,
.starter-list button,
.question button,
.primary-button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  min-height: 34px;
  padding: 0 14px;
  color: #53635e;
  font-size: 13px;
  font-weight: 850;
}

.send {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: white;
  font-size: 22px;
  font-weight: 900;
}

.send:hover,
.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(16, 24, 23, 0.14);
}

.send:active,
.primary-button:active,
.secondary-button:active,
.chip:active,
.starter-list button:active,
.question button:active {
  transform: translateY(1px) scale(0.99);
}

.starter-list {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.starter-list button:hover,
.question button.selected,
.question button:hover,
.agent-card.active,
.agent-card:hover {
  border-color: #b9e8da;
  background: var(--green-soft);
  color: var(--green-dark);
}

.bubble {
  max-width: 720px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(16, 48, 40, 0.04);
}

.bubble.user {
  justify-self: end;
  background: #f9fbfb;
}

.bubble.agent {
  justify-self: start;
  background: #effbf7;
  border-color: #c6eadf;
}

.bubble strong {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
  font-size: 13px;
}

.bubble p {
  color: #4f5f5a;
  font-size: 14px;
  line-height: 1.55;
}

.guide-bubble {
  justify-self: center;
  max-width: 860px;
  border: 1px solid #dfe8e5;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 30px rgba(22, 100, 78, 0.06);
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.guide-bubble.coach {
  border-color: #bdeadc;
  background: linear-gradient(135deg, rgba(239, 251, 247, 0.98), rgba(255, 255, 255, 0.92));
}

.guide-bubble.hint {
  border-color: #dfe8e5;
  background: rgba(255, 255, 255, 0.92);
}

.guide-bubble.system {
  border-style: dashed;
  border-color: #c7d5d1;
  background: rgba(248, 251, 250, 0.94);
}

.guide-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 7px rgba(59, 192, 143, 0.1);
  flex: 0 0 auto;
}

.guide-label {
  color: var(--green-dark);
  background: rgba(59, 192, 143, 0.1);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.guide-bubble.system .guide-label {
  color: #65746f;
  background: #eef4f2;
}

.guide-bubble p {
  color: #53635e;
  font-size: 13px;
  line-height: 1.45;
}

.guide-agents {
  display: flex;
  gap: 6px;
  margin-left: 4px;
}

.mini-agent {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #52635e;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.mini-agent i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--green);
}

.mini-agent.blue i {
  background: var(--blue);
}

.mini-agent.violet i {
  background: var(--violet);
}

.mini-agent.amber i {
  background: var(--amber);
}

.mini-agent.coral i {
  background: var(--coral);
}

.question-card,
.confirm-card {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.question {
  display: grid;
  gap: 10px;
}

.question strong {
  color: var(--ink);
  font-size: 15px;
}

.question div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.adjust-strip {
  border: 1px solid #dfe8e5;
  border-radius: 12px;
  background: #fbfdfc;
  padding: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.adjust-strip span {
  color: #7a8a85;
  font-size: 12px;
  font-weight: 900;
  margin-right: 4px;
}

.adjust-strip button,
.confirm-actions button,
.decision-options button {
  min-height: 30px;
  border: 1px solid #dbe8e4;
  background: #fff;
  border-radius: 999px;
  color: #52635e;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 850;
}

.adjust-strip button:hover,
.confirm-actions button:hover,
.decision-options button:hover {
  border-color: #bdeadc;
  color: var(--green-dark);
  background: var(--green-soft);
}

.primary-button {
  height: 44px;
  border-radius: 10px;
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  width: 100%;
}

.primary-button.is-done {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.primary-button.inline {
  width: auto;
  justify-self: start;
  padding: 0 18px;
}

.agent-stream {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  overflow: visible;
  align-items: start;
}

.agent-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  min-height: 150px;
  padding: 15px;
  text-align: left;
  display: grid;
  gap: 8px;
  box-shadow: 0 8px 22px rgba(16, 48, 40, 0.04);
  position: relative;
  overflow: visible;
  z-index: 1;
  align-content: start;
  align-self: start;
}

.agent-card:hover {
  z-index: 4;
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(16, 48, 40, 0.1);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: white;
  display: inline-grid;
  place-items: center;
  font-weight: 900;
}

.avatar.blue {
  background: var(--blue);
}

.avatar.violet {
  background: var(--violet);
}

.avatar.amber {
  background: var(--amber);
}

.avatar.coral {
  background: var(--coral);
}

.agent-card strong {
  color: var(--ink);
  font-size: 16px;
}

.agent-card-copy {
  display: grid;
  gap: 5px;
}

.agent-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.agent-card p {
  color: #52635e;
  font-size: 13px;
  line-height: 1.45;
}

.agent-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}

.agent-card-foot small {
  color: #8c9b97;
  font-size: 11px;
  font-weight: 850;
}

.agent-popover {
  position: static;
  display: grid;
  gap: 8px;
  max-height: 0;
  padding: 0 12px;
  border: 0 solid #9bddcc;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  overflow: hidden;
  transition: opacity 160ms ease, transform 160ms ease, max-height 180ms ease, padding 180ms ease, border-width 180ms ease;
  color: #50605c;
}

.agent-card:hover .agent-popover {
  max-height: 220px;
  padding: 12px;
  border-width: 1px;
  opacity: 1;
  transform: translateY(0);
}

.agent-popover b {
  color: var(--ink);
  font-size: 13px;
}

.agent-popover span,
.agent-popover i {
  color: #667772;
  font-size: 12px;
  line-height: 1.45;
  font-style: normal;
}

.agent-popover i {
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: #a66b14;
}

.confirm-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  display: grid;
  grid-template-columns: 1fr minmax(190px, auto);
  gap: 12px;
  align-items: center;
}

.confirm-row strong {
  display: block;
  color: var(--ink);
  margin-bottom: 5px;
}

.confirm-row span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.result-pack {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 14px;
  padding: 18px;
}

.decision-panel,
.skill-panel,
.outcome-panel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.decision-panel {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.decision-panel small,
.skill-panel small,
.outcome-panel small,
.profit-panel small {
  display: block;
  color: #58a98c;
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 7px;
}

.decision-panel h3,
.outcome-panel h3 {
  color: var(--ink);
  font-size: 20px;
  margin-bottom: 8px;
}

.decision-panel p,
.skill-panel p,
.outcome-panel p,
.profit-panel p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.execute-actions {
  display: grid;
  gap: 8px;
}

.confirm-send-button {
  width: 100%;
  min-height: 64px;
  border: 0;
  border-radius: 14px;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(135deg, #0f1916, #173d33 62%, #1c7a60);
  color: #fff;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 12px 18px;
  box-shadow: 0 18px 38px rgba(16, 48, 40, 0.22);
  position: relative;
  overflow: hidden;
}

.confirm-send-button::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  pointer-events: none;
}

.confirm-send-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px rgba(16, 48, 40, 0.28);
}

.confirm-send-button:active {
  transform: translateY(1px) scale(0.995);
}

.confirm-send-button span {
  font-size: 17px;
  font-weight: 950;
  letter-spacing: 0;
}

.confirm-send-button small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 750;
}

.confirm-send-button.is-done {
  background: linear-gradient(135deg, #177a60, #38ad86);
}

.decision-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.system-route {
  border: 1px dashed #cbd9d5;
  border-radius: 12px;
  background: #fbfdfc;
  padding: 12px;
  display: grid;
  gap: 5px;
}

.system-route span {
  color: #8b9a96;
  font-size: 11px;
  font-weight: 900;
}

.system-route p {
  color: #65746f;
  font-size: 12px;
}

.secondary-button {
  height: 44px;
  border-radius: 10px;
  border: 1px solid #bdeadc;
  color: var(--green-dark);
  background: var(--green-soft);
  font-weight: 850;
}

.secondary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(23, 122, 96, 0.1);
}

.secondary-button.is-done {
  background: #dff7ee;
  border-color: #8edfc7;
}

.skill-panel {
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}

.skill-panel strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  margin-bottom: 6px;
}

.skill-tags {
  max-width: 260px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.outcome-panel {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #f7fffb, #ffffff);
  padding: 12px;
}

.metric strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  margin-bottom: 7px;
}

.metric span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.profit-panel {
  border: 1px solid #d9ede6;
  border-radius: 12px;
  background: linear-gradient(135deg, #f7fffb, #ffffff);
  padding: 14px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 14px;
  align-items: center;
}

.profit-panel strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  margin-bottom: 6px;
}

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

.profit-metric {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
}

.profit-metric strong {
  font-size: 18px;
  margin-bottom: 5px;
}

.profit-metric span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.flow-map {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  position: relative;
}

.flow-node {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfc;
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 7px;
  position: relative;
}

.flow-node:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 28px;
  width: 8px;
  border-top: 2px solid #bdeadc;
}

.flow-node b {
  color: var(--green-dark);
  font-size: 12px;
}

.flow-node strong {
  color: var(--ink);
  font-size: 13px;
}

.flow-node span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.result-main h2 {
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
}

.result-main > p {
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
  font-size: 14px;
}

.action-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.result-action {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px;
  background: #fbfdfc;
}

.result-action > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  margin-top: 7px;
}

.result-action strong,
.email-preview strong {
  color: var(--ink);
  font-size: 14px;
}

.result-action p,
.email-preview p {
  color: var(--muted);
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.45;
}

.email-preview {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px;
  background: #fff;
}

.inline-feedback,
.execution-feedback {
  border: 1px solid #bdeadc;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 12px;
  line-height: 1.45;
  padding: 10px 12px;
  margin-top: 10px;
  animation: popIn 280ms ease both;
}

.execution-feedback {
  margin-top: 0;
}

.execution-stage {
  max-width: 880px;
}

.celebration,
.execution-record {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.celebration {
  min-height: 330px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.success-mark {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 900;
  box-shadow: 0 18px 36px rgba(16, 24, 23, 0.18);
  animation: successPop 580ms cubic-bezier(0.2, 0.9, 0.25, 1.25) both;
}

.celebration small,
.record-head small {
  color: #58a98c;
  font-size: 11px;
  font-weight: 900;
}

.celebration h2 {
  color: var(--ink);
  font-size: 30px;
  line-height: 1.15;
}

.celebration p {
  max-width: 540px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.fireworks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.fireworks span {
  --angle: calc(var(--i) * 20deg);
  position: absolute;
  left: 50%;
  top: 43%;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: hsl(calc(var(--i) * 32), 68%, 58%);
  transform: translate(-50%, -50%) rotate(var(--angle)) translateX(0);
  opacity: 0;
  animation: firework 1100ms cubic-bezier(0.1, 0.75, 0.35, 1) both;
  animation-delay: calc(var(--i) * 22ms);
}

.execution-record {
  padding: 18px;
  display: grid;
  gap: 16px;
}

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

.record-head strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
  margin-top: 4px;
}

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

.record-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfc;
  padding: 13px;
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
}

.record-item > span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  margin-top: 6px;
}

.record-item strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  margin-bottom: 4px;
}

.record-item b {
  display: block;
  color: var(--green-dark);
  font-size: 13px;
  margin-bottom: 5px;
}

.record-item p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.record-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 50;
  background: rgba(16, 24, 23, 0.94);
  color: #fff;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 18px 36px rgba(16, 24, 23, 0.22);
  animation: toastIn 420ms cubic-bezier(0.2, 0.85, 0.25, 1) both, toastOut 280ms ease 2300ms both;
}

.agent-dock {
  align-self: start;
  margin: 110px 24px 0 0;
  padding: 18px;
  min-height: 280px;
  position: sticky;
  top: 26px;
}

.agent-dock.quiet {
  margin-top: 180px;
}

.agent-dock > strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  margin-bottom: 12px;
}

.dock-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.dock-head strong {
  color: var(--ink);
  font-size: 16px;
}

.dock-section {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}

.dock-section p {
  margin-bottom: 8px;
}

.mini-agent-list {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(-50%, 14px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translate(-50%, 10px) scale(0.98);
  }
}

@keyframes successPop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.72);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes firework {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateX(0) scale(0.4);
  }

  18% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateX(210px) scale(1.15);
  }
}

@media (max-width: 980px) {
  .app-shell {
    width: 100%;
    grid-template-columns: 1fr;
    min-height: 100svh;
  }

  .side,
  .agent-dock {
    display: none;
  }

  .chat-shell {
    padding: 18px;
  }

  .topbar {
    margin-bottom: 18px;
  }

  .chat-stage {
    max-width: 720px;
    width: 100%;
  }

  .chat-stage.center {
    min-height: calc(100svh - 116px);
    align-content: center;
  }

  .mobile-scene-card {
    display: grid;
    gap: 5px;
    padding: 13px 14px;
    border: 1px solid #d9ede6;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 26px rgba(16, 48, 40, 0.06);
  }

  .mobile-scene-card small {
    color: #58a98c;
    font-size: 11px;
    font-weight: 900;
  }

  .mobile-scene-card strong {
    color: var(--ink);
    font-size: 16px;
  }

  .mobile-scene-card span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
  }

  .guide-bubble {
    justify-self: stretch;
    max-width: none;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .guide-bubble p {
    flex: 1 1 220px;
  }

  .guide-agents {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-left: 0;
  }

  .mini-agent {
    justify-content: center;
    padding: 0 8px;
  }

  .composer.large {
    min-height: 0;
  }

  .composer-bar {
    align-items: flex-end;
    gap: 12px;
  }

  .chips {
    min-width: 0;
    flex: 1;
    flex-wrap: wrap;
  }

  .starter-list {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .agent-stream,
  .result-pack,
  .metric-grid,
  .flow-map,
  .execute-actions,
  .skill-panel {
    grid-template-columns: 1fr;
  }

  .agent-popover {
    max-height: none;
    padding: 12px;
    border-width: 1px;
    opacity: 1;
    transform: none;
    margin-top: 4px;
  }

  .skill-tags {
    max-width: none;
    justify-content: flex-start;
  }

  .flow-node:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 560px) {
  .chat-shell {
    padding: 14px;
  }

  .topbar {
    align-items: center;
    margin-bottom: 14px;
  }

  .topbar strong {
    font-size: 17px;
  }

  .topbar span {
    font-size: 11px;
  }

  .top-actions {
    gap: 6px;
  }

  .top-actions .pill:first-child {
    display: none;
  }

  .pill {
    min-height: 26px;
    padding: 0 10px;
    font-size: 11px;
  }

  .chat-stage {
    gap: 12px;
  }

  .chat-stage.center {
    min-height: auto;
    align-content: start;
    padding-top: 12px;
  }

  .assistant-head {
    margin-bottom: 0;
  }

  .assistant-head .assistant-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    border-radius: 14px;
    font-size: 24px;
  }

  .assistant-head h1 {
    font-size: clamp(28px, 9vw, 34px);
    line-height: 1.08;
  }

  .assistant-head p {
    font-size: 14px;
  }

  .guide-bubble {
    padding: 12px;
    gap: 8px;
    border-radius: 14px;
  }

  .guide-label {
    order: -1;
  }

  .guide-dot {
    margin-top: 9px;
  }

  .guide-bubble p {
    flex-basis: calc(100% - 24px);
    font-size: 13px;
  }

  .guide-agents {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .mini-agent {
    height: 32px;
    font-size: 12px;
  }

  .composer {
    padding: 14px;
    border-radius: 14px;
  }

  .composer textarea {
    min-height: 122px;
    font-size: 15px;
    line-height: 1.55;
  }

  .composer-bar {
    display: grid;
    grid-template-columns: 1fr 42px;
    align-items: end;
    padding-top: 12px;
  }

  .chips {
    gap: 7px;
  }

  .chip,
  .starter-list button,
  .question button,
  .primary-button {
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
  }

  .starter-list button {
    width: 100%;
    white-space: normal;
    border-radius: 12px;
    justify-content: center;
  }

  .question-card,
  .confirm-card,
  .result-pack,
  .decision-panel,
  .outcome-panel,
  .skill-panel,
  .execution-record {
    padding: 14px;
    border-radius: 14px;
  }

  .confirm-row,
  .profit-panel,
  .record-grid {
    grid-template-columns: 1fr;
  }

  .confirm-actions {
    justify-content: flex-start;
  }

  .result-main h2,
  .decision-panel h3,
  .outcome-panel h3 {
    font-size: 20px;
  }

  .toast {
    left: 14px;
    right: 14px;
    bottom: 14px;
    transform: none;
    border-radius: 14px;
    text-align: center;
  }

  @keyframes toastIn {
    from {
      opacity: 0;
      transform: translateY(14px) scale(0.98);
    }

    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  @keyframes toastOut {
    to {
      opacity: 0;
      transform: translateY(10px) scale(0.98);
    }
  }
}
