:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: oklch(0.975 0.006 260);
  color: oklch(0.24 0.018 260);
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; }

button, input { font: inherit; }

.app-shell { max-width: 720px; margin: 0 auto; padding: 24px 18px 44px; }

.topbar, .panel-heading, .controls { display: flex; align-items: center; gap: 14px; }
.topbar, .panel-heading { justify-content: space-between; }

h1, h2, p { margin: 0; }
h1 { font-size: 24px; letter-spacing: -0.025em; }
h2 { font-size: 18px; letter-spacing: -0.015em; }

.eyebrow { color: oklch(0.49 0.035 260); font-size: 11px; font-weight: 750; letter-spacing: 0.1em; }
.status, .session-state { border: 1px solid oklch(0.82 0.018 260); border-radius: 999px; padding: 7px 10px; color: oklch(0.42 0.025 260); font-size: 12px; font-weight: 650; white-space: nowrap; }
.status.ready, .session-state.ready { border-color: oklch(0.75 0.1 150); color: oklch(0.4 0.11 150); }
.status.error, .session-state.error { border-color: oklch(0.75 0.1 25); color: oklch(0.5 0.16 25); }

.intro { margin: 36px 0 22px; max-width: 58ch; }
.intro p { margin-top: 9px; color: oklch(0.43 0.022 260); line-height: 1.55; }
code { padding: 1px 5px; border-radius: 4px; background: oklch(0.93 0.013 260); font-size: 0.92em; }

.controls { align-items: end; flex-wrap: wrap; margin-bottom: 12px; }
.field { display: grid; gap: 6px; flex: 1 1 260px; color: oklch(0.4 0.02 260); font-size: 13px; font-weight: 650; }
input { min-height: 42px; width: 100%; border: 1px solid oklch(0.78 0.018 260); border-radius: 8px; padding: 0 11px; color: inherit; background: oklch(0.995 0.003 260); outline: none; }
input:focus { border-color: oklch(0.58 0.15 245); box-shadow: 0 0 0 3px oklch(0.58 0.15 245 / 0.14); }

.button { min-height: 42px; border: 0; border-radius: 8px; padding: 0 15px; cursor: pointer; font-weight: 700; transition: background-color 180ms ease-out, transform 180ms ease-out; }
.button:active { transform: translateY(1px); }
.button:focus-visible { outline: 3px solid oklch(0.58 0.15 245 / 0.38); outline-offset: 2px; }
.button.primary { color: oklch(0.99 0.004 260); background: oklch(0.55 0.16 245); }
.button.primary:hover { background: oklch(0.49 0.16 245); }
.button.secondary { color: oklch(0.33 0.028 260); background: oklch(0.9 0.014 260); }
.button:disabled { cursor: not-allowed; opacity: 0.52; }

.notice { min-height: 22px; color: oklch(0.48 0.03 260); font-size: 13px; line-height: 1.45; }
.notice.error { color: oklch(0.5 0.16 25); }
.notice.success { color: oklch(0.4 0.11 150); }

.panel { margin-top: 22px; border: 1px solid oklch(0.84 0.014 260); border-radius: 12px; background: oklch(0.99 0.003 260); padding: 18px; }
.data-list { margin: 18px 0 0; }
.data-list > div { display: grid; grid-template-columns: minmax(120px, 0.7fr) 1.3fr; gap: 12px; padding: 10px 0; border-top: 1px solid oklch(0.91 0.01 260); }
dt { color: oklch(0.48 0.024 260); font-size: 13px; }
dd { margin: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 650; }

.raw-panel summary { cursor: pointer; font-weight: 750; }
.muted { margin: 12px 0; color: oklch(0.48 0.024 260); font-size: 13px; line-height: 1.45; }
textarea, pre { width: 100%; border: 1px solid oklch(0.84 0.014 260); border-radius: 8px; padding: 11px; color: oklch(0.31 0.025 260); background: oklch(0.96 0.008 260); font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }
textarea { min-height: 96px; resize: vertical; }
pre { margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.send-payload { margin-top: 14px; }

@media (max-width: 520px) {
  .app-shell { padding: 18px 14px 34px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .controls { align-items: stretch; }
  .button { flex: 1 1 auto; }
  .data-list > div { grid-template-columns: 1fr; gap: 3px; }
}
