*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "PingFang SC", "Noto Sans SC", sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
  background:
    radial-gradient(1200px 480px at 10% -10%, rgba(16, 185, 129, 0.16), transparent 55%),
    radial-gradient(900px 420px at 110% 8%, rgba(245, 158, 11, 0.08), transparent 50%),
    #07080a;
}
img, video, svg { max-width: 100%; height: auto; }

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.table-wrapper { overflow-x: auto; }

.mono {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.pulse-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #34d399;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
  animation: pulse 1.6s infinite;
}
.pulse-dot.idle { background: #737373; box-shadow: none; animation: none; }
.pulse-dot.err { background: #f87171; box-shadow: none; animation: none; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.tap {
  min-height: 48px;
  touch-action: manipulation;
}

input[type="number"],
input[type="text"] {
  font-size: 16px;
}

.sheet {
  max-height: min(78dvh, 640px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.glass {
  background: linear-gradient(180deg, rgba(24, 24, 27, 0.92), rgba(12, 12, 14, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.step-ok { color: #4ade80; }
.step-run { color: #fbbf24; }
.step-wait { color: #a3a3a3; }
.step-fail { color: #f87171; }

.result-pop { animation: pop-in 0.28s ease-out; }
.toast-pop { animation: toast-in 0.22s ease-out; }
