:root {
  --bg: #030712;
  --panel: #111827;
  --panel-2: #1f2937;
  --panel-3: #374151;
  --line: #1f2937;
  --line-soft: rgba(31, 41, 55, 0.6);
  --text: #f3f4f6;
  --muted: #9ca3af;
  --muted-2: #6b7280;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(168, 85, 247, 0.08), transparent 26%),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

button {
  border: 0;
}

details summary {
  cursor: pointer;
}

.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.grid { display: grid; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.min-h-screen { min-height: 100vh; }
.flex-1 { flex: 1 1 0%; }
.flex-wrap { flex-wrap: wrap; }
.shrink-0 { flex-shrink: 0; }
.flex-shrink-0 { flex-shrink: 0; }
.min-w-0 { min-width: 0; }
.w-2 { width: 0.5rem; }
.w-5 { width: 1.25rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-20 { width: 5rem; }
.w-24 { width: 6rem; }
.h-2 { height: 0.5rem; }
.h-5 { height: 1.25rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-h-64 { max-height: 16rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-auto { margin-left: auto; }
.ml-2 { margin-left: 0.5rem; }
.ml-4 { margin-left: 1rem; }
.mr-2 { margin-right: 0.5rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-3 { margin-top: 0.75rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.top-4 { top: 1rem; }
.right-4 { right: 1rem; }
.bottom-4 { bottom: 1rem; }
.z-50 { z-index: 50; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.pt-0\.5 { padding-top: 0.125rem; }
.pt-4 { padding-top: 1rem; }
.pl-4 { padding-left: 1rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-x-3 { column-gap: 0.75rem; }
.gap-y-0\.5 { row-gap: 0.125rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.break-all { word-break: break-all; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.rounded { border-radius: 0.5rem; }
.rounded-lg { border-radius: 0.75rem; }
.rounded-xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.border { border: 1px solid var(--line); }
.border-b { border-bottom: 1px solid var(--line); }
.border-l { border-left: 1px solid var(--line); }
.last\:border-0:last-child { border-bottom: 0; }
.cursor-pointer { cursor: pointer; }
.select-none { user-select: none; }
.opacity-25 { opacity: 0.25; }
.opacity-75 { opacity: 0.75; }
.drop-shadow-lg { filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.28)); }
.focus\:outline-none:focus { outline: none; }
.focus\:border-gray-500:focus { border-color: #6b7280; }

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.font-normal { font-weight: 400; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.08em; }
.underline { text-decoration: underline; }

.bg-gray-950 { background: #030712; }
.bg-gray-900 { background: #111827; }
.bg-gray-900\/60 { background: rgba(17, 24, 39, 0.6); }
.bg-gray-800 { background: #1f2937; }
.bg-gray-800\/40 { background: rgba(31, 41, 55, 0.4); }
.bg-gray-800\/30 { background: rgba(31, 41, 55, 0.3); }
.bg-gray-700 { background: #374151; }

.bg-purple-600 { background: #9333ea; }
.bg-blue-600 { background: #2563eb; }
.bg-green-600 { background: #16a34a; }
.bg-amber-600 { background: #d97706; }
.bg-indigo-600 { background: #4f46e5; }
.bg-gray-600 { background: #4b5563; }
.bg-red-500 { background: #ef4444; }
.bg-green-500 { background: #22c55e; }
.bg-yellow-500 { background: #eab308; }

.bg-purple-900\/20 { background: rgba(88, 28, 135, 0.2); }
.bg-blue-900\/20 { background: rgba(30, 58, 138, 0.2); }
.bg-green-900\/20 { background: rgba(20, 83, 45, 0.2); }
.bg-amber-900\/20 { background: rgba(120, 53, 15, 0.2); }

.bg-purple-900\/50 { background: rgba(88, 28, 135, 0.5); }
.bg-blue-900\/50 { background: rgba(30, 58, 138, 0.5); }
.bg-green-900\/50 { background: rgba(20, 83, 45, 0.5); }
.bg-red-900\/50 { background: rgba(127, 29, 29, 0.5); }
.bg-amber-900\/50 { background: rgba(120, 53, 15, 0.5); }

.bg-indigo-950\/40 { background: rgba(30, 27, 75, 0.4); }
.bg-indigo-900\/50 { background: rgba(49, 46, 129, 0.5); }
.bg-indigo-900\/60 { background: rgba(49, 46, 129, 0.6); }

.text-gray-100 { color: #f3f4f6; }
.text-white { color: #ffffff; }
.text-gray-200 { color: #e5e7eb; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-blue-200 { color: #bfdbfe; }
.text-blue-300 { color: #93c5fd; }
.text-blue-400 { color: #60a5fa; }
.text-green-200 { color: #bbf7d0; }
.text-green-300 { color: #86efac; }
.text-green-400 { color: #4ade80; }
.text-red-200 { color: #fecaca; }
.text-red-300 { color: #fca5a5; }
.text-red-400 { color: #f87171; }
.text-yellow-500 { color: #eab308; }
.text-purple-200 { color: #e9d5ff; }
.text-purple-300 { color: #d8b4fe; }
.text-purple-400 { color: #c084fc; }
.text-amber-300 { color: #fcd34d; }
.text-amber-400 { color: #fbbf24; }
.text-indigo-200 { color: #c7d2fe; }
.text-indigo-300 { color: #a5b4fc; }
.text-indigo-400 { color: #818cf8; }
.text-indigo-500 { color: #6366f1; }

.border-gray-600 { border-color: #4b5563; }
.border-gray-700 { border-color: #374151; }
.border-gray-800 { border-color: #1f2937; }
.border-purple-700\/40 { border-color: rgba(126, 34, 206, 0.4); }
.border-blue-700\/40 { border-color: rgba(29, 78, 216, 0.4); }
.border-green-700\/40 { border-color: rgba(21, 128, 61, 0.4); }
.border-red-600 { border-color: #dc2626; }
.border-red-800 { border-color: #991b1b; }
.border-blue-600 { border-color: #2563eb; }
.border-green-600 { border-color: #16a34a; }
.border-yellow-600 { border-color: #ca8a04; }
.border-amber-700\/40 { border-color: rgba(180, 83, 9, 0.4); }
.border-indigo-700\/40 { border-color: rgba(67, 56, 202, 0.4); }
.border-indigo-700\/50 { border-color: rgba(67, 56, 202, 0.5); }
.border-indigo-800\/60 { border-color: rgba(55, 48, 163, 0.6); }
.border-purple-800\/30 { border-color: rgba(107, 33, 168, 0.3); }
.border-blue-800\/30 { border-color: rgba(30, 64, 175, 0.3); }
.border-green-800\/30 { border-color: rgba(21, 128, 61, 0.3); }
.border-amber-800\/30 { border-color: rgba(146, 64, 14, 0.3); }

.hover\:text-white:hover { color: #ffffff; }
.hover\:text-blue-400:hover { color: #60a5fa; }
.hover\:text-yellow-400:hover { color: #facc15; }
.hover\:text-red-400:hover { color: #f87171; }
.hover\:underline:hover { text-decoration: underline; }
.hover\:bg-gray-700:hover { background: #374151; }
.hover\:bg-gray-600:hover { background: #4b5563; }
.hover\:bg-gray-800\/30:hover { background: rgba(31, 41, 55, 0.3); }
.hover\:bg-purple-500:hover { background: #a855f7; }
.hover\:bg-blue-500:hover { background: #3b82f6; }
.hover\:bg-green-500:hover { background: #22c55e; }
.hover\:bg-amber-500:hover { background: #f59e0b; }
.hover\:bg-indigo-500:hover { background: #6366f1; }

.bg-purple-800 { background: #6b21a8; }
.bg-blue-800 { background: #1d4ed8; }
.bg-green-800 { background: #166534; }
.bg-yellow-800 { background: #854d0e; }
.bg-red-800 { background: #991b1b; }
.bg-amber-800 { background: #92400e; }
.text-yellow-200 { color: #fde68a; }

.transition-panel {
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.demo-surface {
  background: rgba(17, 24, 39, 0.92);
  border: 1px solid rgba(31, 41, 55, 0.9);
  box-shadow: var(--shadow);
}

.operation-shell {
  position: relative;
  z-index: 10;
  padding: 0 1rem 1rem;
}

.operation-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(55, 65, 81, 0.95);
  border-radius: 1rem;
  background: rgba(8, 12, 25, 0.88);
  box-shadow: var(--shadow);
}

.operation-shell[open] .operation-summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.operation-summary::-webkit-details-marker {
  display: none;
}

.operation-summary-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.operation-summary-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #e5e7eb;
}

.operation-summary-subtitle {
  font-size: 0.74rem;
  color: #9ca3af;
}

.operation-summary-pill {
  padding: 0.25rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #c7d2fe;
  background: rgba(49, 46, 129, 0.45);
  border: 1px solid rgba(67, 56, 202, 0.45);
}

.operation-panel {
  background: rgba(8, 12, 25, 0.9);
  border: 1px solid rgba(55, 65, 81, 0.95);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.operation-current {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(55, 65, 81, 0.7);
}

.operation-current-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.operation-feed {
  max-height: 10rem;
  overflow-y: auto;
}

.operation-entry {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(31, 41, 55, 0.65);
}

.operation-entry:last-child {
  border-bottom: 0;
}

.operation-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 9999px;
  margin-top: 0.35rem;
  flex-shrink: 0;
}

.operation-meta {
  flex: 1;
  min-width: 0;
}

.operation-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #e5e7eb;
}

.operation-message {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 0.2rem;
  white-space: pre-wrap;
}

.operation-time {
  font-size: 0.72rem;
  color: #6b7280;
  white-space: nowrap;
}

.status-idle { background: #374151; }
.status-start { background: #3b82f6; }
.status-step { background: #f59e0b; }
.status-success { background: #22c55e; }
.status-error { background: #ef4444; }

.btn-base {
  border-radius: 0.75rem;
  color: white;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.btn-base:hover {
  transform: translateY(-1px);
}

.btn-base:disabled {
  opacity: 0.55;
  cursor: progress;
  transform: none;
}

.operation-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid rgba(67, 56, 202, 0.45);
  color: #c7d2fe;
  background: rgba(49, 46, 129, 0.35);
}

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
