:root {
  color-scheme: light;
  --bg: #f4f1eb;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-strong: #ffffff;
  --ink: #1f252e;
  --muted: #657284;
  --line: rgba(35, 45, 60, 0.12);
  --accent: #ef8a2e;
  --accent-soft: rgba(239, 138, 46, 0.16);
  --green: #189b73;
  --green-soft: rgba(24, 155, 115, 0.16);
  --blue: #2d7ff9;
  --blue-soft: rgba(45, 127, 249, 0.14);
  --purple: #635bff;
  --purple-soft: rgba(99, 91, 255, 0.12);
  --shadow: 0 18px 50px rgba(31, 37, 46, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, monospace;
  --sans: "Manrope", "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--sans);
  background:
    radial-gradient(circle at top left, rgba(239, 138, 46, 0.18), transparent 32%),
    radial-gradient(circle at bottom right, rgba(99, 91, 255, 0.14), transparent 28%),
    linear-gradient(180deg, #faf7f2 0%, var(--bg) 100%);
  color: var(--ink);
}

.demo-page {
  width: min(1480px, calc(100vw - 64px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 42px;
  line-height: 1.04;
}

.hero-copy {
  width: min(800px, 100%);
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

.hero-pill {
  flex: 0 0 auto;
  padding: 14px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(35, 45, 60, 0.08);
  box-shadow: var(--shadow);
  font-size: 13px;
  color: #36414f;
}

.controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(35, 45, 60, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.control-group.is-hidden {
  display: none;
}

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

.control-label {
  min-width: 72px;
  font-size: 13px;
  font-weight: 700;
  color: #465365;
}

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

.segmented button {
  border: 1px solid rgba(35, 45, 60, 0.1);
  background: rgba(255, 255, 255, 0.75);
  color: #455061;
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: 160ms ease;
}

.segmented button.is-active {
  background: #1f252e;
  color: #fff;
  border-color: #1f252e;
  box-shadow: 0 10px 20px rgba(31, 37, 46, 0.16);
}

.segmented-compact button {
  padding: 8px 12px;
  font-size: 12px;
}

.segmented-substates {
  align-items: stretch;
}

.segmented-substates button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  min-height: 56px;
  border-radius: 16px;
  padding: 10px 14px;
}

.substate-button-main {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.substate-button-abstract {
  font-size: 11px;
  line-height: 1.2;
  color: #7a8798;
}

.segmented-substates button.is-active .substate-button-abstract {
  color: rgba(255, 255, 255, 0.76);
}

.substate-guide {
  flex: 0 0 calc(100% - 88px);
  max-width: calc(100% - 88px);
  min-width: 0;
  margin-left: 88px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(31, 37, 46, 0.04);
  border: 1px solid rgba(35, 45, 60, 0.08);
}

.substate-guide[hidden] {
  display: none;
}

.substate-guide-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.substate-guide-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(45, 127, 249, 0.1);
  border: 1px solid rgba(45, 127, 249, 0.14);
  color: #234469;
  font-size: 12px;
  font-weight: 700;
}

.substate-guide-code {
  font-family: var(--mono);
  font-size: 11px;
  color: #5a677a;
}

.substate-guide p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: #526073;
}

.substate-guide p + p {
  margin-top: 6px;
}

.substate-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.guide-block {
  min-width: 0;
  overflow: hidden;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(35, 45, 60, 0.08);
}

.guide-block-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #687587;
}

.guide-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.guide-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(45, 127, 249, 0.08);
  border: 1px solid rgba(45, 127, 249, 0.1);
  color: #335270;
  font-size: 12px;
  line-height: 1.3;
}

.guide-chip.code {
  font-family: var(--mono);
  font-size: 11px;
  background: rgba(31, 37, 46, 0.06);
  border-color: rgba(35, 45, 60, 0.08);
  color: #445062;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.guide-chip.subtle {
  background: rgba(31, 37, 46, 0.04);
  border-color: rgba(35, 45, 60, 0.06);
  color: #6e7b8d;
}

.compare-section {
  position: sticky;
  top: 12px;
  z-index: 6;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(35, 45, 60, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.compare-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.compare-header h2 {
  margin: 0;
  font-size: 24px;
}

.collapse-toggle {
  border: 1px solid rgba(35, 45, 60, 0.1);
  background: rgba(255, 255, 255, 0.8);
  color: #455061;
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.compare-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.compare-section.is-collapsed .compare-stack {
  display: none;
}

.compare-section.is-collapsed .compare-header {
  margin-bottom: 0;
}

.state-machine-panel {
  margin-top: 18px;
  padding: 22px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(35, 45, 60, 0.08);
  box-shadow: var(--shadow);
}

.state-machine-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.diagram-header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.xstate-scope-note {
  margin: -2px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: #5b6880;
}

.state-machine-header h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

.legend-cluster {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.legend-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(31, 37, 46, 0.06);
  font-size: 12px;
  color: #536072;
}

.diagram-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.xstate-machine-svg {
  min-height: 300px;
}

.xstate-node {
  cursor: pointer;
  transition: opacity 160ms ease;
}

.xstate-node rect,
.xstate-node text {
  transition: 160ms ease;
}

.xstate-node rect {
  fill: #f8f9fd;
  stroke: rgba(35, 45, 60, 0.14);
  stroke-width: 1.5;
  filter: drop-shadow(0 6px 14px rgba(31, 37, 46, 0.04));
}

.xstate-node.active rect {
  fill: rgba(45, 127, 249, 0.14);
  stroke: rgba(45, 127, 249, 0.46);
  stroke-width: 2.4;
}

.xstate-node text.xstate-title {
  font-size: 14px;
  font-weight: 800;
  fill: #202734;
}

.xstate-node text.xstate-sub {
  font-size: 11px;
  fill: #6c7788;
}

.xstate-node.is-highlight rect {
  fill: rgba(45, 127, 249, 0.2);
  stroke: rgba(31, 37, 46, 0.38);
  stroke-width: 3.8;
  filter: drop-shadow(0 14px 26px rgba(31, 37, 46, 0.18));
}

.xstate-node.is-highlight text.xstate-title {
  fill: #131821;
}

.xstate-node.is-highlight text.xstate-sub {
  fill: #4f5f76;
}

.xstate-node.is-context rect {
  stroke: rgba(31, 37, 46, 0.2);
  stroke-width: 2;
  filter: drop-shadow(0 6px 14px rgba(31, 37, 46, 0.06));
}

.xstate-transition-target {
  cursor: pointer;
  transition: opacity 160ms ease;
}

.xstate-transition-target.is-out-of-scope .xstate-edge,
.xstate-transition-target.is-out-of-scope .xstate-edge-label {
  opacity: 0;
}

.xstate-transition-target.is-out-of-scope .xstate-edge-hit {
  pointer-events: none;
}

.xstate-transition-target.is-out-of-scope.is-context .xstate-edge-hit,
.xstate-transition-target.is-out-of-scope.is-highlight .xstate-edge-hit,
.xstate-transition-target.is-out-of-scope.is-selected .xstate-edge-hit,
.xstate-transition-target.is-out-of-scope.is-available .xstate-edge-hit {
  pointer-events: stroke;
}

.xstate-edge {
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.14;
  transition: 160ms ease;
  pointer-events: none;
  stroke: #9aa8c0;
}

.xstate-edge.main {
  stroke-dasharray: none;
}

.xstate-edge.branch {
  stroke-dasharray: 8 5;
}

.xstate-edge-hit {
  fill: none;
  stroke: rgba(0, 0, 0, 0);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: stroke;
}

.xstate-edge-label {
  font-size: 10px;
  font-weight: 700;
  fill: #56657c;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 5.5px;
  opacity: 0;
  transition: 160ms ease;
  pointer-events: none;
}

.xstate-transition-target.is-available .xstate-edge,
.xstate-transition-target.is-context .xstate-edge {
  opacity: 0.42;
  stroke-width: 2.8;
}

.xstate-transition-target.is-selected .xstate-edge,
.xstate-transition-target.is-highlight .xstate-edge {
  opacity: 0.96;
  stroke-width: 3.8;
}

.xstate-transition-target.is-context.is-inbound .xstate-edge {
  stroke: #cf8b2e;
  filter: drop-shadow(0 0 8px rgba(207, 139, 46, 0.18));
}

.xstate-transition-target.is-context.is-outbound .xstate-edge {
  stroke: #2d7ff9;
  filter: drop-shadow(0 0 8px rgba(45, 127, 249, 0.2));
}

.xstate-transition-target.is-selected .xstate-edge,
.xstate-transition-target.is-highlight .xstate-edge {
  stroke: #2a3342;
  filter: drop-shadow(0 0 8px rgba(31, 37, 46, 0.2));
}

.xstate-transition-target.is-available .xstate-edge-label,
.xstate-transition-target.is-context .xstate-edge-label,
.xstate-transition-target.is-selected .xstate-edge-label,
.xstate-transition-target.is-highlight .xstate-edge-label {
  opacity: 1;
}

.xstate-transition-target.is-selected .xstate-edge-label,
.xstate-transition-target.is-highlight .xstate-edge-label {
  fill: #1f252e;
  font-weight: 800;
}

.xstate-transition-target.is-context.is-inbound .xstate-edge-label {
  fill: #9b6520;
}

.xstate-transition-target.is-context.is-outbound .xstate-edge-label {
  fill: #2d66d8;
}

.machine-svg.is-focusing .xstate-node.is-dim,
.machine-svg.is-focusing .xstate-transition-target.is-dim {
  opacity: 0.1;
}

.machine-svg.is-focusing .xstate-transition-target.is-dim .xstate-edge {
  stroke-width: 2.2px !important;
  filter: none !important;
}

.machine-svg.is-focusing .xstate-transition-target.is-dim .xstate-edge.main {
  stroke: #9aa8c0 !important;
}

.machine-svg.is-focusing .xstate-transition-target.is-dim .xstate-edge.branch {
  stroke: #9aa8c0 !important;
}

.machine-svg.is-focusing .xstate-transition-target.is-dim .xstate-edge-label {
  opacity: 0 !important;
}

.diagram-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(35, 45, 60, 0.08);
}

.lane-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.lane-index {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(239, 138, 46, 0.14);
  color: #b56822;
  font-size: 13px;
  font-weight: 800;
}

.lane-header h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.lane-header p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.machine-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.svg-path-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  fill: #8a6670;
}

.svg-path-title.branch {
  fill: #b56a27;
}

.svg-node {
  fill: #f6f7fb;
  stroke: rgba(35, 45, 60, 0.08);
  stroke-width: 1.5;
  filter: drop-shadow(0 6px 14px rgba(31, 37, 46, 0.04));
}

.svg-node.active {
  fill: rgba(45, 127, 249, 0.08);
  stroke: rgba(45, 127, 249, 0.18);
}

.svg-node.warn {
  fill: rgba(239, 138, 46, 0.1);
  stroke: rgba(239, 138, 46, 0.24);
}

.svg-port {
  stroke-width: 2;
}

.svg-port.main {
  fill: #ffffff;
  stroke: #5a84ff;
}

.svg-port.branch {
  fill: #ffffff;
  stroke: #ef8a2e;
}

.svg-state-target {
  cursor: pointer;
  transition: opacity 160ms ease;
}

.svg-state-target .svg-node,
.svg-state-target .svg-node-title,
.svg-state-target .svg-node-sub,
.svg-state-target .svg-port {
  transition: 160ms ease;
}

.svg-state-target:hover .svg-node {
  stroke: rgba(31, 37, 46, 0.18);
  filter: drop-shadow(0 8px 18px rgba(31, 37, 46, 0.08));
}

.svg-state-target.is-selected .svg-node {
  stroke: rgba(45, 127, 249, 0.42);
  stroke-width: 3;
  filter: drop-shadow(0 12px 24px rgba(31, 37, 46, 0.14));
}

.svg-state-target.is-selected .svg-port.main {
  fill: #5a84ff;
}

.svg-state-target.is-selected .svg-port.branch {
  fill: #ef8a2e;
}

.svg-node-title {
  font-size: 15px;
  font-weight: 800;
  fill: #202734;
}

.svg-node-title.small {
  font-size: 14px;
}

.svg-node-sub {
  font-size: 12px;
  fill: #6c7788;
}

.svg-edge {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: 160ms ease;
  pointer-events: none;
}

.svg-edge.main {
  stroke: #5a84ff;
}

.svg-edge.branch {
  stroke: #ef8a2e;
}

.svg-edge-label {
  font-size: 11px;
  font-weight: 700;
  fill: #5f6f88;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.94);
  stroke-width: 6px;
  transition: 160ms ease;
  pointer-events: none;
}

.svg-edge-label.branch {
  fill: #b56a27;
}

.svg-transition-target {
  cursor: pointer;
  transition: opacity 160ms ease;
}

.svg-edge-hit {
  fill: none;
  stroke: rgba(0, 0, 0, 0);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: stroke;
}

.svg-transition-target:hover .svg-edge.main,
.svg-transition-target.is-selected .svg-edge.main,
.svg-transition-target.is-highlight .svg-edge.main {
  stroke: #2d7ff9;
  stroke-width: 4.5;
  filter: drop-shadow(0 0 8px rgba(45, 127, 249, 0.28));
}

.svg-transition-target:hover .svg-edge.branch,
.svg-transition-target.is-selected .svg-edge.branch,
.svg-transition-target.is-highlight .svg-edge.branch {
  stroke: #ef8a2e;
  stroke-width: 4.5;
  filter: drop-shadow(0 0 8px rgba(239, 138, 46, 0.22));
}

.svg-transition-target:hover .svg-edge-label,
.svg-transition-target.is-selected .svg-edge-label,
.svg-transition-target.is-highlight .svg-edge-label {
  fill: #1f252e;
  font-weight: 800;
}

.svg-transition-target:hover .svg-edge-label.branch,
.svg-transition-target.is-selected .svg-edge-label.branch,
.svg-transition-target.is-highlight .svg-edge-label.branch {
  fill: #a55e1f;
}

.machine-svg.is-focusing .svg-state-target.is-dim,
.machine-svg.is-focusing .svg-transition-target.is-dim {
  opacity: 0.1;
}

.machine-svg.is-focusing .svg-transition-target.is-dim .svg-edge {
  stroke-width: 2.5px !important;
  filter: none !important;
}

.machine-svg.is-focusing .svg-transition-target.is-dim .svg-edge.main {
  stroke: #5a84ff !important;
}

.machine-svg.is-focusing .svg-transition-target.is-dim .svg-edge.branch {
  stroke: #ef8a2e !important;
}

.machine-svg.is-focusing .svg-transition-target.is-dim .svg-edge-label {
  fill: #5f6f88 !important;
  font-weight: 700 !important;
}

.machine-svg.is-focusing .svg-transition-target.is-dim .svg-edge-label.branch {
  fill: #b56a27 !important;
}

.machine-svg.is-focusing .svg-state-target.is-dim .svg-node {
  stroke-width: 1.5px !important;
  filter: drop-shadow(0 6px 14px rgba(31, 37, 46, 0.04)) !important;
}

.machine-svg.is-focusing .svg-state-target.is-dim .svg-node-title {
  fill: #202734 !important;
}

.svg-state-target.is-highlight .svg-node {
  stroke: rgba(31, 37, 46, 0.36);
  stroke-width: 3.8;
  filter: drop-shadow(0 14px 26px rgba(31, 37, 46, 0.18));
}

.svg-state-target.is-highlight .svg-node-title {
  fill: #131821;
}

.svg-state-target.is-highlight .svg-node-sub {
  fill: #506079;
  font-weight: 700;
}

.svg-state-target.is-context .svg-node {
  stroke: rgba(31, 37, 46, 0.2);
  stroke-width: 2;
  filter: drop-shadow(0 6px 14px rgba(31, 37, 46, 0.06));
}

.svg-state-target.is-context .svg-node-title {
  fill: #1f252e;
}

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

.path-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(35, 45, 60, 0.08);
}

.path-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

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

.state-dock {
  position: sticky;
  bottom: 10px;
  z-index: 8;
  margin: 24px auto 0;
  width: min(1480px, calc(100vw - 64px));
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(20, 26, 38, 0.92);
  border: 1px solid rgba(103, 122, 150, 0.18);
  box-shadow: 0 18px 40px rgba(8, 12, 20, 0.32);
  backdrop-filter: blur(18px);
  color: #eef6ff;
}

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

.dock-toolbar-kicker,
.dock-toolbar-title {
  margin: 0;
}

.dock-toolbar-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(214, 230, 247, 0.54);
}

.dock-toolbar-title {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
  color: #f5f9ff;
}

.dock-section + .dock-section {
  margin-top: 12px;
}

.dock-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(214, 230, 247, 0.66);
}

.dock-triplet,
.dock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.triple-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.triple-chip strong {
  font-size: 11px;
  color: rgba(191, 224, 255, 0.78);
}

.triple-chip em {
  font-style: normal;
  font-size: 12px;
  color: #ffffff;
}

.triple-chip.subtle {
  background: rgba(255, 255, 255, 0.04);
}

.dock-action {
  border: none;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(90, 132, 255, 0.18);
  color: #f2f7ff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: 160ms ease;
}

.dock-action:hover {
  background: rgba(90, 132, 255, 0.3);
}

body.is-dock-left .demo-page {
  width: auto;
  margin: 0 24px 0 376px;
}

body.is-dock-left .state-dock {
  position: fixed;
  top: 12px;
  left: 16px;
  bottom: 12px;
  width: 336px;
  margin: 0;
  overflow: auto;
}

body.is-dock-left .dock-actions {
  flex-direction: column;
  align-items: stretch;
}

body.is-dock-left .dock-action {
  text-align: left;
}

.demo-panel {
  min-width: 0;
  padding: 18px 20px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(35, 45, 60, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.demo-panel.wide .demo-desc {
  max-width: 860px;
}

.demo-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.demo-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

.demo-panel h2 {
  margin: 0;
  font-size: 22px;
}

.tone-tag {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(31, 37, 46, 0.06);
  font-size: 12px;
  color: #536072;
}

.demo-desc {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}

.search-shell {
  min-height: 0;
}

.search-box {
  position: relative;
  border-radius: 30px;
  overflow: visible;
  transition: 220ms ease;
}

.search-box.classic {
  padding: 10px;
  background: #fff;
  border: 1px solid rgba(31, 37, 46, 0.08);
  box-shadow: 0 10px 24px rgba(31, 37, 46, 0.06);
}

.search-box.expanded {
  padding: 16px;
}

.theme-balanced .search-box.expanded {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.98));
  border: 1px solid rgba(45, 127, 249, 0.18);
  box-shadow:
    0 26px 64px rgba(31, 37, 46, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.theme-glass .search-box.expanded {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(238, 243, 255, 0.72)),
    radial-gradient(circle at top right, rgba(99, 91, 255, 0.18), transparent 32%);
  border: 1px solid rgba(99, 91, 255, 0.2);
  box-shadow:
    0 24px 68px rgba(55, 60, 87, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.35) inset,
    0 0 38px rgba(99, 91, 255, 0.12);
  backdrop-filter: blur(18px);
}

.theme-neon .search-box.expanded {
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.94), rgba(35, 20, 59, 0.92)),
    radial-gradient(circle at top left, rgba(100, 220, 255, 0.22), transparent 38%);
  border: 1px solid rgba(107, 237, 255, 0.44);
  box-shadow:
    0 28px 72px rgba(11, 16, 26, 0.36),
    0 0 0 1px rgba(107, 237, 255, 0.16) inset,
    0 0 46px rgba(107, 237, 255, 0.22);
}

.theme-querychip .search-box.classic,
.theme-querychip .search-box.expanded {
  background: #ffffff;
  border: 1px solid rgba(31, 37, 46, 0.06);
  box-shadow: 0 8px 22px rgba(31, 37, 46, 0.04);
}

.theme-workbench .search-box.classic,
.theme-workbench .search-box.expanded {
  background: linear-gradient(180deg, #ffffff, #fbfcff);
  border: 1px solid rgba(31, 37, 46, 0.1);
  box-shadow: 0 12px 28px rgba(31, 37, 46, 0.06);
}

.theme-assistant .search-box.classic,
.theme-assistant .search-box.expanded {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.98)),
    radial-gradient(circle at top right, rgba(116, 199, 255, 0.14), transparent 36%);
  border: 1px solid rgba(106, 162, 223, 0.16);
  box-shadow:
    0 16px 34px rgba(73, 105, 146, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.shell-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(31, 37, 46, 0.04);
}

.theme-neon .shell-chrome {
  background: rgba(15, 21, 33, 0.72);
  border-color: rgba(107, 237, 255, 0.18);
}

.theme-querychip .shell-chrome {
  background: #ffffff;
  border-color: rgba(31, 37, 46, 0.04);
}

.theme-workbench .shell-chrome {
  background: rgba(248, 250, 254, 0.96);
  border-color: rgba(31, 37, 46, 0.08);
}

.theme-assistant .shell-chrome {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(106, 162, 223, 0.12);
}

.search-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 2px solid rgba(181, 188, 200, 0.52);
  background: transparent;
  color: #c8ced9;
  font-size: 14px;
}

.theme-neon .search-icon {
  border-color: rgba(152, 220, 255, 0.28);
  background: transparent;
  color: #7ddced;
}

.main-input {
  flex: 1 1 auto;
  min-width: 0;
}

.main-input .line-1 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.main-input .line-2 {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.theme-neon .main-input .line-1 {
  color: #ecf8ff;
}

.theme-neon .main-input .line-2 {
  color: rgba(214, 235, 255, 0.72);
}

.action-cluster {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.slot-chip {
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(31, 37, 46, 0.06);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #6d7788;
}

.theme-neon .slot-chip {
  background: rgba(107, 237, 255, 0.12);
  color: #c7f6ff;
}

.mini-button,
.chip {
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 11px;
  border: 1px solid rgba(31, 37, 46, 0.08);
  background: rgba(255, 255, 255, 0.86);
  color: #475466;
}

.mini-button.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.theme-neon .mini-button,
.theme-neon .chip {
  background: rgba(18, 27, 42, 0.84);
  border-color: rgba(107, 237, 255, 0.14);
  color: #c7f6ff;
}

.query-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 42px;
}

.inline-hint-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 0;
  padding: 0;
  color: #8e99aa;
}

.inline-hint-copy {
  font-size: 11px;
  color: inherit;
  line-height: 1.4;
  white-space: nowrap;
}

.inline-hint-action {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: none;
  color: #8d4f18;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1.4;
  white-space: nowrap;
}

.inline-hint-action:hover {
  color: #6f3d11;
  text-decoration: underline;
}

.followup-line {
  align-items: center;
}

.query-token {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  background: #e5e8ee;
  border: 1px solid rgba(35, 45, 60, 0.04);
  color: #445065;
  font-size: 14px;
  font-weight: 500;
}

.anchor-token {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 7px 10px 7px 8px;
  border-radius: 14px;
  border: 1px solid rgba(51, 138, 112, 0.22);
  background: linear-gradient(135deg, rgba(22, 164, 124, 0.1), rgba(228, 247, 240, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.anchor-token-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(24, 155, 115, 0.14);
  color: #1d7f62;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.anchor-token-body {
  display: grid;
  gap: 2px;
}

.anchor-token-handle {
  font-size: 14px;
  font-weight: 700;
  color: #23413b;
}

.anchor-token-meta {
  font-size: 11px;
  color: #648276;
  line-height: 1.2;
}

.anchor-token-platform {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
  color: #2c765f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.query-token .divider {
  width: 1px;
  height: 22px;
  background: rgba(101, 114, 132, 0.28);
}

.query-token .scope {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #8b95a5;
  font-weight: 600;
}

.query-token .scope::after {
  content: "▾";
  font-size: 11px;
}

.query-token.exclude {
  background: rgba(255, 236, 224, 0.88);
  border-color: rgba(239, 138, 46, 0.22);
  color: #8f4b16;
}

.draft-fragment {
  min-width: 84px;
  padding: 2px 0;
  font-size: 15px;
  font-weight: 500;
  color: #253143;
}

.followup-fragment {
  min-width: 160px;
  padding: 2px 0;
  font-size: 14px;
  font-weight: 500;
  color: #2d3a4d;
}

.followup-fragment.with-caret::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 26px;
  margin-left: 5px;
  vertical-align: -6px;
  background: currentColor;
}

.followup-placeholder {
  color: #8e99aa;
}

.draft-fragment.with-caret::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 28px;
  margin-left: 5px;
  vertical-align: -6px;
  background: currentColor;
}

.theme-neon .query-token {
  background: rgba(186, 214, 255, 0.12);
  border-color: rgba(107, 237, 255, 0.14);
  color: #e8f9ff;
}

.theme-neon .anchor-token {
  border-color: rgba(109, 255, 210, 0.28);
  background: linear-gradient(135deg, rgba(28, 132, 118, 0.34), rgba(34, 58, 76, 0.72));
  box-shadow: inset 0 1px 0 rgba(184, 255, 240, 0.08);
}

.theme-neon .anchor-token-badge {
  background: rgba(124, 255, 214, 0.14);
  color: #8effd5;
}

.theme-neon .anchor-token-handle {
  color: #efffff;
}

.theme-neon .anchor-token-meta {
  color: rgba(214, 235, 255, 0.72);
}

.theme-neon .anchor-token-platform {
  background: rgba(232, 255, 252, 0.1);
  color: #a6fff0;
}

.theme-querychip .query-token {
  background: #eceff4;
  border-color: rgba(35, 45, 60, 0.03);
  color: #3e4b60;
}

.theme-querychip .query-token .scope {
  color: #909aac;
}

.theme-workbench .query-token {
  background: #eef2f7;
  border-color: rgba(35, 45, 60, 0.08);
  color: #364255;
}

.theme-workbench .query-token .scope {
  color: #75839a;
}

.theme-assistant .query-token {
  background: #edf5fb;
  border-color: rgba(106, 162, 223, 0.12);
  color: #34516f;
}

.theme-assistant .query-token .scope {
  color: #6a90b3;
}

.theme-neon .query-token .scope {
  color: rgba(214, 235, 255, 0.72);
}

.theme-neon .query-token.exclude {
  background: rgba(255, 179, 94, 0.12);
  border-color: rgba(255, 179, 94, 0.24);
  color: #ffc78e;
}

.theme-neon .draft-fragment {
  color: #f2fbff;
}

.target-menu {
  position: absolute;
  left: 138px;
  top: 56px;
  width: 224px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(35, 45, 60, 0.08);
  box-shadow: 0 12px 28px rgba(31, 37, 46, 0.1);
  z-index: 4;
}

.theme-neon .target-menu {
  background: rgba(16, 23, 37, 0.98);
  border-color: rgba(107, 237, 255, 0.14);
  box-shadow: 0 26px 56px rgba(9, 13, 24, 0.44);
}

.theme-querychip .target-menu {
  background: #ffffff;
  border-color: rgba(35, 45, 60, 0.06);
  box-shadow: 0 10px 24px rgba(31, 37, 46, 0.08);
}

.theme-workbench .target-menu {
  background: rgba(252, 253, 255, 0.99);
  border-color: rgba(35, 45, 60, 0.08);
  box-shadow: 0 14px 28px rgba(31, 37, 46, 0.1);
}

.theme-assistant .target-menu {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(106, 162, 223, 0.12);
  box-shadow: 0 18px 32px rgba(73, 105, 146, 0.12);
}

.target-menu .menu-item {
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 13px;
  color: #384356;
}

.target-menu .menu-item.is-active {
  color: var(--accent);
  font-weight: 800;
}

.theme-neon .target-menu .menu-item {
  color: rgba(221, 239, 255, 0.82);
}

.theme-neon .target-menu .menu-item.is-active {
  color: #ffb970;
}

.target-menu .menu-divider {
  height: 1px;
  margin: 10px 0;
  background: rgba(35, 45, 60, 0.08);
}

.theme-neon .target-menu .menu-divider {
  background: rgba(107, 237, 255, 0.12);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: #475466;
}

.theme-neon .toggle-row {
  color: rgba(221, 239, 255, 0.82);
}

.toggle-pill {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #c6ced9;
  position: relative;
}

.toggle-pill::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
}

.stack {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.stack.hidden {
  display: none;
}

.micro-status,
.session-card,
.question-card,
.conditions-card {
  border-radius: 20px;
  padding: 14px 16px;
}

.micro-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(31, 37, 46, 0.08);
}

.micro-status.is-stable {
  background: rgba(255, 255, 255, 0.82);
}

.theme-neon .micro-status {
  background: rgba(13, 25, 38, 0.72);
  border-color: rgba(107, 237, 255, 0.18);
}

.status-mark {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(95, 111, 136, 0.34);
  flex: 0 0 auto;
}

.status-mark.ok {
  background: var(--green);
}

.status-mark.warn {
  background: #d07a2a;
}

.session-card,
.question-card,
.conditions-card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(31, 37, 46, 0.08);
}

.theme-balanced .session-card {
  background: linear-gradient(180deg, rgba(249, 251, 255, 0.94), rgba(255, 255, 255, 0.84));
}

.theme-glass .session-card,
.theme-glass .question-card,
.theme-glass .conditions-card {
  background: rgba(255, 255, 255, 0.64);
  backdrop-filter: blur(18px);
}

.theme-neon .session-card,
.theme-neon .question-card,
.theme-neon .conditions-card {
  background: rgba(12, 21, 35, 0.78);
  border-color: rgba(107, 237, 255, 0.16);
  color: #edf8ff;
}

.status-topline,
.card-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.card-label span,
.status-topline span {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.theme-neon .card-label span,
.theme-neon .status-topline span {
  color: rgba(214, 235, 255, 0.68);
}

.state-badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  background: var(--blue-soft);
  color: var(--blue);
}

.state-badge.ok {
  background: var(--green-soft);
  color: var(--green);
}

.state-badge.warn {
  background: rgba(239, 138, 46, 0.14);
  color: #a45b1a;
}

.theme-neon .state-badge {
  background: rgba(107, 237, 255, 0.14);
  color: #89f5ff;
}

.status-text,
.card-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.theme-neon .status-text,
.theme-neon .card-text {
  color: rgba(221, 239, 255, 0.82);
}

.question-title {
  margin: 2px 0 8px;
  font-size: 18px;
  line-height: 1.4;
}

.theme-neon .question-title {
  color: #f4fbff;
}

.hint-row,
.chip-row,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  font-size: 12px;
}

.chip.soft {
  background: rgba(99, 91, 255, 0.08);
  color: #564fce;
}

.chip.reference {
  background: rgba(35, 45, 60, 0.05);
  color: #6c7788;
  border-style: dashed;
}

.chip.anchor {
  background: rgba(24, 155, 115, 0.14);
  color: var(--green);
}

.theme-neon .chip.soft {
  background: rgba(153, 129, 255, 0.14);
  color: #c4bbff;
}

.theme-neon .chip.reference {
  background: rgba(214, 235, 255, 0.08);
  color: rgba(214, 235, 255, 0.72);
}

.theme-neon .chip.anchor {
  background: rgba(115, 255, 205, 0.14);
  color: #84ffd4;
}

.soft-group,
.anchor-group {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(35, 45, 60, 0.12);
}

.theme-neon .soft-group,
.theme-neon .anchor-group {
  border-top-color: rgba(107, 237, 255, 0.16);
}

.anchor-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(51, 138, 112, 0.18);
  background: linear-gradient(180deg, rgba(239, 250, 245, 0.96), rgba(233, 246, 241, 0.88));
}

.anchor-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.anchor-card-label,
.anchor-card-platform {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.anchor-card-label {
  background: rgba(24, 155, 115, 0.12);
  color: #1d7f62;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.anchor-card-platform {
  background: rgba(35, 45, 60, 0.05);
  color: #687486;
}

.anchor-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.anchor-card-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(24, 155, 115, 0.16);
  color: #1d7f62;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.anchor-card-copy {
  display: grid;
  gap: 4px;
}

.anchor-card-copy strong {
  font-size: 15px;
  color: #263243;
}

.anchor-card-copy span,
.anchor-card-note {
  font-size: 12px;
  color: #6b7687;
  line-height: 1.45;
}

.anchor-card-note {
  margin: 0;
}

.keyword-expansion-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(80, 98, 126, 0.1);
  background: rgba(246, 249, 253, 0.96);
}

.keyword-expansion-card.is-collapsed {
  gap: 10px;
}

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

.keyword-expansion-candidate-list {
  display: grid;
  gap: 8px;
}

.keyword-expansion-candidate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(80, 98, 126, 0.08);
}

.keyword-expansion-candidate.is-selected {
  border-color: rgba(45, 127, 249, 0.26);
  background: rgba(45, 127, 249, 0.06);
}

.keyword-expansion-candidate.is-applied {
  border-color: rgba(24, 155, 115, 0.24);
  background: rgba(24, 155, 115, 0.06);
}

.keyword-expansion-chip,
.keyword-expansion-inline-action,
.keyword-expansion-action {
  border: 0;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease, color 120ms ease, opacity 120ms ease;
}

.keyword-expansion-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(35, 45, 60, 0.06);
  color: #334156;
  font-size: 13px;
  font-weight: 600;
}

.keyword-expansion-chip:hover,
.keyword-expansion-inline-action:hover,
.keyword-expansion-action:hover {
  transform: translateY(-1px);
}

.keyword-expansion-inline-action,
.keyword-expansion-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(35, 45, 60, 0.06);
  color: #4d5a6f;
  font-size: 12px;
  font-weight: 700;
}

.keyword-expansion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.keyword-expansion-action.primary {
  background: rgba(45, 127, 249, 0.12);
  color: #215cb7;
}

.keyword-expansion-action.subtle {
  background: rgba(35, 45, 60, 0.04);
  color: #75839a;
}

.keyword-expansion-action[disabled] {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

.keyword-expansion-footnote {
  margin: 0;
}

.theme-neon .keyword-expansion-card {
  border-color: rgba(107, 237, 255, 0.16);
  background: rgba(18, 31, 40, 0.9);
}

.theme-neon .keyword-expansion-candidate {
  background: rgba(232, 255, 252, 0.04);
  border-color: rgba(107, 237, 255, 0.1);
}

.theme-neon .keyword-expansion-candidate.is-selected {
  border-color: rgba(107, 237, 255, 0.26);
  background: rgba(45, 127, 249, 0.12);
}

.theme-neon .keyword-expansion-candidate.is-applied {
  border-color: rgba(124, 255, 214, 0.24);
  background: rgba(24, 155, 115, 0.14);
}

.theme-neon .keyword-expansion-chip,
.theme-neon .keyword-expansion-inline-action,
.theme-neon .keyword-expansion-action {
  background: rgba(214, 235, 255, 0.08);
  color: rgba(232, 249, 255, 0.86);
}

.theme-neon .keyword-expansion-action.primary {
  background: rgba(107, 237, 255, 0.16);
  color: #9bf8ff;
}

.theme-neon .keyword-expansion-action.subtle {
  color: rgba(214, 235, 255, 0.68);
}

.theme-neon .anchor-card {
  border-color: rgba(109, 255, 210, 0.22);
  background: linear-gradient(180deg, rgba(22, 49, 58, 0.84), rgba(18, 36, 46, 0.92));
}

.theme-neon .anchor-card-label {
  background: rgba(124, 255, 214, 0.12);
  color: #9effdc;
}

.theme-neon .anchor-card-platform {
  background: rgba(214, 235, 255, 0.08);
  color: rgba(214, 235, 255, 0.72);
}

.theme-neon .anchor-card-avatar {
  background: rgba(124, 255, 214, 0.12);
  color: #a6fff0;
}

.theme-neon .anchor-card-copy strong {
  color: #f2fbff;
}

.theme-neon .anchor-card-copy span,
.theme-neon .anchor-card-note {
  color: rgba(214, 235, 255, 0.72);
}

.legend {
  font-size: 11px;
  color: var(--muted);
}

.theme-neon .legend {
  color: rgba(214, 235, 255, 0.62);
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(45, 127, 249, 0.16);
  border-top-color: var(--blue);
  animation: spin 0.9s linear infinite;
}

.theme-neon .spinner {
  border-color: rgba(107, 237, 255, 0.14);
  border-top-color: #91f9ff;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1280px) {
  .path-grid {
    grid-template-columns: 1fr;
  }

  .search-shell {
    min-height: auto;
  }
}

@media (max-width: 900px) {
  .demo-page {
    width: min(100vw - 24px, 1480px);
    padding: 24px 0 48px;
  }

  .hero {
    flex-direction: column;
  }

  .state-dock {
    width: min(100vw - 24px, 1480px);
  }

  .substate-guide {
    margin-left: 0;
  }

  .substate-guide-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1200px) {
  body.is-dock-left .demo-page {
    width: min(100vw - 24px, 1480px);
    margin: 0 auto;
  }

  body.is-dock-left .state-dock {
    position: sticky;
    top: auto;
    left: auto;
    bottom: 10px;
    width: min(100vw - 24px, 1480px);
    margin: 24px auto 0;
    overflow: visible;
  }
}
