:root {
  --bg: #02010a;
  --surface: rgba(6, 5, 24, 0.91);
  --surface-2: #0b0b27;
  --surface-3: #13143a;
  --line: rgba(64, 240, 255, 0.12);
  --line-strong: rgba(64, 240, 255, 0.27);
  --text: #f3f7ff;
  --muted: #9ba8c7;
  --dim: #637095;
  --acid: #40f0ff;
  --acid-soft: rgba(64, 240, 255, 0.12);
  --violet: #ff40a8;
  --danger: #ff5c72;
  --danger-soft: rgba(255, 64, 168, 0.12);
  --amber: #c9ff35;
  --radius: 7px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2,1,10,.14), rgba(2,1,10,.92) 72%, #02010a),
    radial-gradient(circle at 50% 18%, transparent 0, rgba(2,1,10,.28) 48%, rgba(2,1,10,.76) 100%),
    url("./assets/hamieverse-loading-background.jpg") center top / cover no-repeat;
  opacity: .88;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(64,240,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64,240,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 80%);
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.ambient {
  position: fixed;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .08;
  pointer-events: none;
  z-index: 0;
}
.ambient-one { right: -180px; top: 40px; background: var(--acid); opacity: .13; }
.ambient-two { left: -220px; top: 520px; background: var(--violet); opacity: .1; }

.topbar {
  position: relative;
  z-index: 10;
  height: 80px;
  padding: 0 clamp(20px, 4vw, 68px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 1, 10, .82);
  backdrop-filter: blur(20px);
}

.brand { display: inline-flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; }
.brand-logo { display: block; width: 126px; height: 56px; object-fit: contain; filter: drop-shadow(0 0 14px rgba(64,240,255,.16)); }
.brand-copy { display: flex; flex-direction: column; line-height: 1; gap: 5px; }
.brand-copy small { padding-left: 13px; border-left: 1px solid var(--line-strong); color: var(--acid); font: 700 9px/1 var(--mono); letter-spacing: .22em; }

.topbar-actions { display: flex; align-items: center; gap: 14px; }
.health-pill { height: 34px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; color: var(--muted); border: 1px solid var(--line); background: rgba(2,1,10,.42); font: 700 8px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.health-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); box-shadow: 0 0 10px currentColor; }
.health-pill.online { color: var(--acid); }
.health-pill.online i { background: var(--acid); }
.health-pill.degraded { color: var(--amber); }
.health-pill.degraded i { background: var(--amber); }
.health-pill.offline { color: var(--danger); }
.health-pill.offline i { background: var(--danger); }
.docs-link {
  height: 36px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted); background: transparent; border: 1px solid var(--line); padding: 0 13px;
  text-decoration: none; font-size: 12px; cursor: pointer; transition: .2s ease;
}
.docs-link:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255,255,255,.035); }
.docs-link svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 1.3; }

.shell { position: relative; z-index: 1; width: min(1560px, calc(100% - 48px)); margin: 0 auto; padding: 64px 0 60px; }
.intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; margin-bottom: 46px; }
.eyebrow { margin: 0 0 18px; color: var(--muted); font: 600 10px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; }
.eyebrow span { display: inline-block; width: 22px; height: 1px; margin: 0 9px 3px 0; background: var(--acid); }
.intro h1 { margin: 0; max-width: 800px; font-size: clamp(40px, 5vw, 74px); line-height: .98; letter-spacing: -.055em; font-weight: 510; }
.intro h1 em { color: var(--acid); font-family: Georgia, "Times New Roman", serif; font-weight: 400; text-shadow: 0 0 34px rgba(64,240,255,.18); }
.intro-copy { max-width: 400px; margin: 0 0 5px; color: var(--muted); font-size: 14px; line-height: 1.7; }

.request-bar {
  display: flex; align-items: center; min-height: 68px; padding: 8px 8px 8px 22px; margin-bottom: 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: rgba(7,6,28,.92);
  box-shadow: 0 18px 50px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.035);
}
.method { color: var(--acid); font: 700 12px/1 var(--mono); letter-spacing: .08em; padding-right: 20px; }
.endpoint-field { flex: 1; border-left: 1px solid var(--line); }
.endpoint-field input { width: 100%; border: 0; outline: 0; padding: 13px 18px; color: var(--text); background: transparent; font: 13px/1 var(--mono); }
.request-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.request-action {
  width: 160px; height: 50px; border: 1px solid var(--line-strong); border-radius: 3px;
  display: flex; justify-content: center; align-items: center; gap: 9px; color: var(--text); background: rgba(255,255,255,.025);
  font-size: 12px; font-weight: 720; cursor: pointer; transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease;
}
.request-action svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.clear-request-action:hover { color: #ff8cc4; border-color: rgba(255,74,166,.62); background: rgba(255,74,166,.09); transform: translateY(-1px); }
.add-request-action { color: var(--acid); border-color: rgba(64,240,255,.38); background: rgba(64,240,255,.055); }
.add-request-action:hover { border-color: rgba(64,240,255,.68); background: rgba(64,240,255,.12); transform: translateY(-1px); }
.request-action:active { transform: translateY(1px); }
.send-button { border-color: rgba(64,240,255,.65); background: linear-gradient(135deg, rgba(64,240,255,.95), rgba(92,90,255,.88)); color: #02010a; }
.send-button:hover { background: linear-gradient(135deg, #8af7ff, #ff40a8); box-shadow: 0 0 26px rgba(64,240,255,.22); transform: translateY(-1px); }
.send-button:active { transform: translateY(1px); }
.send-button:disabled { opacity: .62; cursor: wait; transform: none; }
.send-button svg { width: 18px; height: 18px; }
.send-button.sending svg { animation: fly .9s ease-in-out infinite; }
.shortcut { padding: 4px 6px; border: 1px solid rgba(17,21,13,.24); border-radius: 5px; font: 600 9px/1 var(--mono); opacity: .68; }

.workspace { display: grid; grid-template-columns: minmax(265px, .78fr) minmax(410px, 1.2fr) minmax(330px, .92fr); gap: 16px; align-items: stretch; }
.panel {
  position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); backdrop-filter: blur(18px); box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}
.panel::before { content: ""; position: absolute; left: 0; top: 0; width: 56px; height: 2px; z-index: 2; background: linear-gradient(90deg, var(--acid), transparent); box-shadow: 0 0 14px rgba(64,240,255,.55); }
.panel-heading { min-height: 70px; padding: 19px 21px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.panel-heading > div:first-child { display: flex; align-items: center; gap: 11px; }
.panel-heading h2 { margin: 0; font-size: 13px; font-weight: 650; letter-spacing: -.01em; }
.step { color: var(--dim); font: 600 9px/1 var(--mono); }
.panel-heading.compact { min-height: auto; padding: 0 0 17px; border: 0; }

.setup-panel { padding-bottom: 22px; }
.setup-panel > :not(.panel-heading, .divider) { margin-left: 21px; margin-right: 21px; }
.setup-panel > .panel-heading:first-child { margin-bottom: 20px; }
.secure-note { color: var(--dim); display: inline-flex; align-items: center; gap: 5px; font: 500 9px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.secure-note svg { width: 12px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.field-label { display: block; margin: 0 0 8px; color: #b8beb7; font-size: 10px; font-weight: 600; letter-spacing: .03em; }
.text-input, .token-field, select {
  width: 100%; height: 42px; color: var(--text); background: rgba(7,9,8,.55); border: 1px solid var(--line);
  border-radius: 9px; outline: none; transition: border-color .18s ease, box-shadow .18s ease;
}
.text-input { padding: 0 12px; font: 12px/1 var(--mono); margin-bottom: 16px; }
.text-input:focus, .token-field:focus-within, select:focus { border-color: rgba(201,243,106,.52); box-shadow: 0 0 0 3px rgba(201,243,106,.06); }
.text-input::placeholder, .token-field input::placeholder { color: #4d544e; }
.token-field { display: flex; align-items: center; }
.token-field input { flex: 1; min-width: 0; padding: 0 4px 0 12px; color: var(--text); background: transparent; border: 0; outline: 0; font: 11px/1 var(--mono); }
.token-field button, .icon-button { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border: 0; background: transparent; color: var(--dim); cursor: pointer; }
.token-field button:hover, .icon-button:hover { color: var(--text); }
.token-field svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.25; }
.eye-closed { display: none; }
.token-field.visible .eye-open { display: none; }
.token-field.visible .eye-closed { display: block; }
.field-hint { margin-top: 8px !important; color: var(--dim); font-size: 9px; line-height: 1.5; }
.credential-button {
  width: calc(100% - 42px); min-height: 58px; margin-top: 15px !important; padding: 9px 11px;
  display: flex; align-items: center; gap: 11px; text-align: left; color: var(--text);
  border: 1px solid rgba(201,243,106,.2); border-radius: 11px;
  background: linear-gradient(110deg, rgba(201,243,106,.1), rgba(201,243,106,.025));
  cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.credential-button:hover { border-color: rgba(201,243,106,.42); background: linear-gradient(110deg, rgba(201,243,106,.16), rgba(201,243,106,.04)); transform: translateY(-1px); }
.credential-button:disabled { opacity: .58; cursor: wait; transform: none; }
.credential-button-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: #11150d; background: var(--acid); }
.credential-button-icon svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.credential-button > span:nth-child(2) { flex: 1; min-width: 0; }
.credential-button strong, .credential-button small { display: block; }
.credential-button strong { margin-bottom: 4px; font-size: 10px; font-weight: 700; }
.credential-button small { color: var(--muted); font-size: 8px; }
.credential-arrow { width: 14px; flex: 0 0 auto; fill: none; stroke: var(--muted); stroke-width: 1.3; }
.credential-button.success { border-color: rgba(201,243,106,.42); }
.credential-button.success .credential-button-icon::before { content: "✓"; font-size: 16px; font-weight: 800; }
.credential-button.success .credential-button-icon svg { display: none; }
.divider { height: 1px; margin: 21px; background: var(--line); }
.field-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 10px; }
.select-wrap { position: relative; display: block; }
.select-wrap::after { content: "⌄"; position: absolute; right: 12px; top: 9px; color: var(--dim); pointer-events: none; }
select { appearance: none; padding: 0 12px; font: 12px/1 var(--mono); margin-bottom: 16px; }

.text-button { display: inline-flex; align-items: center; gap: 6px; padding: 4px; border: 0; background: none; color: var(--muted); font-size: 10px; cursor: pointer; transition: color .18s; }
.text-button:hover { color: var(--acid); }
.text-button svg { width: 13px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.advanced { margin-top: 1px !important; border-top: 1px solid var(--line); }
.advanced summary { padding: 15px 0 0; color: var(--muted); display: flex; justify-content: space-between; align-items: center; list-style: none; font-size: 10px; cursor: pointer; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary svg { width: 14px; fill: none; stroke: currentColor; transition: transform .18s; }
.advanced[open] summary svg { transform: rotate(180deg); }
.advanced-fields { padding-top: 15px; }

.editor-panel { display: flex; flex-direction: column; min-height: 610px; }
.editor-heading { padding-right: 12px; }
.segmented { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: rgba(0,0,0,.2); }
.segmented button { padding: 6px 9px; color: var(--dim); background: transparent; border: 0; border-radius: 5px; font-size: 9px; cursor: pointer; }
.segmented button.active { color: var(--text); background: var(--surface-3); box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.editor-caption { height: 42px; display: flex; justify-content: space-between; align-items: center; padding: 0 15px 0 22px; border-bottom: 1px solid var(--line); color: var(--dim); font: 9px/1 var(--mono); }
.batch-hint { min-height: 38px; padding: 9px 15px 9px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--dim); border-bottom: 1px solid var(--line); background: rgba(201,243,106,.025); font-size: 9px; line-height: 1.45; }
.batch-hint strong { flex: 0 0 auto; color: var(--acid); font: 600 8px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.batch-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.add-event-button { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; color: #11150d; border: 0; border-radius: 7px; background: var(--acid); font: 700 8px/1 var(--mono); cursor: pointer; transition: filter .18s ease, transform .18s ease; }
.add-event-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.add-event-button span { font-size: 13px; font-weight: 500; line-height: 0; }
.validity { display: inline-flex; align-items: center; gap: 6px; }
.validity i { width: 5px; height: 5px; border-radius: 50%; background: var(--acid); }
.validity.invalid { color: var(--danger); }
.validity.invalid i { background: var(--danger); }
.code-shell { flex: 1; min-height: 450px; display: grid; grid-template-columns: 46px 1fr; background: rgba(7,9,8,.55); }
.line-numbers { padding: 18px 12px 18px 0; color: #383e39; text-align: right; border-right: 1px solid rgba(255,255,255,.035); font: 11px/1.68 var(--mono); user-select: none; overflow: hidden; }
#jsonEditor { width: 100%; height: 100%; min-height: 450px; resize: none; overflow: auto; padding: 18px; color: #dce4d7; caret-color: var(--acid); background: transparent; border: 0; outline: 0; font: 11px/1.68 var(--mono); tab-size: 2; white-space: pre; }
.editor-footer { min-height: 52px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 14px 7px 21px; border-top: 1px solid var(--line); color: var(--dim); font: 9px/1 var(--mono); }
.editor-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.editor-actions .text-button { white-space: nowrap; }

.response-panel { min-height: 610px; }
.request-meta { color: var(--dim); font: 9px/1 var(--mono); }
.response-empty { min-height: 500px; padding: 32px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.empty-orbit { position: relative; width: 76px; height: 76px; margin-bottom: 23px; border: 1px solid var(--line); border-radius: 50%; }
.empty-orbit::before, .empty-orbit::after { content: ""; position: absolute; inset: 11px; border: 1px solid var(--line); border-radius: 50%; }
.empty-orbit::after { inset: 26px; border: 0; background: var(--acid); box-shadow: 0 0 30px rgba(201,243,106,.3); }
.empty-orbit span { position: absolute; width: 6px; height: 6px; left: 4px; top: 22px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 10px var(--violet); }
.empty-orbit i { position: absolute; width: 4px; height: 4px; right: 12px; bottom: 12px; border-radius: 50%; background: var(--acid); }
.response-empty h3 { margin: 0 0 8px; font-size: 14px; font-weight: 620; }
.response-empty p { max-width: 240px; margin: 0; color: var(--dim); font-size: 11px; line-height: 1.6; }
.rejection-guide { width: min(100%, 280px); margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); text-align: left; }
.rejection-guide summary { color: var(--muted); list-style: none; text-align: center; font-size: 9px; cursor: pointer; }
.rejection-guide summary::-webkit-details-marker { display: none; }
.rejection-guide summary::after { content: " +"; color: var(--acid); }
.rejection-guide[open] summary::after { content: " −"; }
.rejection-guide ul { margin: 13px 0 0; padding-left: 17px; color: var(--dim); font-size: 9px; line-height: 1.6; }
.hidden { display: none !important; }
.response-content { padding: 18px; }
.result-banner { min-height: 76px; padding: 14px; display: flex; align-items: center; gap: 12px; border: 1px solid rgba(201,243,106,.15); border-radius: 12px; background: linear-gradient(110deg, var(--acid-soft), rgba(201,243,106,.02)); }
.result-banner.error { border-color: rgba(255,117,111,.18); background: linear-gradient(110deg, var(--danger-soft), rgba(255,117,111,.02)); }
.result-banner.warning { border-color: rgba(243,199,106,.2); background: linear-gradient(110deg, rgba(243,199,106,.12), rgba(243,199,106,.02)); }
.result-icon { width: 36px; height: 36px; display: grid; place-items: center; color: #12170d; background: var(--acid); border-radius: 50%; font-size: 18px; font-weight: 700; }
.result-banner.error .result-icon { background: var(--danger); }
.result-banner.warning .result-icon { background: var(--amber); }
.result-banner span { display: block; margin-bottom: 5px; color: var(--muted); font: 8px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.result-banner strong { display: block; font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 14px 0; background: var(--line); border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.stats > div { min-width: 0; padding: 12px 9px; background: #131613; }
.stats span { display: block; overflow: hidden; color: var(--dim); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.stats strong { display: block; margin-top: 7px; font: 500 19px/1 var(--mono); }
.event-results { margin: 14px 0 4px; }
.event-results-heading { height: 32px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 9px; }
.event-results-heading strong { color: var(--dim); font: 500 8px/1 var(--mono); }
.event-result-list { display: grid; gap: 8px; }
.event-result-card { padding: 12px; border: 1px solid rgba(255,117,111,.2); border-radius: 10px; background: rgba(255,117,111,.055); }
.event-result-card.warning { border-color: rgba(243,199,106,.2); background: rgba(243,199,106,.055); }
.event-result-card.duplicate { border-color: rgba(184,165,255,.2); background: rgba(184,165,255,.055); }
.event-result-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.event-result-top strong { overflow: hidden; color: #d6dcd2; text-overflow: ellipsis; white-space: nowrap; font: 600 9px/1.3 var(--mono); }
.event-result-badge { flex: 0 0 auto; padding: 4px 6px; color: var(--danger); border: 1px solid currentColor; border-radius: 999px; font: 700 7px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.warning .event-result-badge { color: var(--amber); }
.duplicate .event-result-badge { color: var(--violet); }
.event-result-field { display: inline-block; margin-bottom: 7px; color: var(--muted); font: 8px/1 var(--mono); }
.event-result-message { margin: 0; color: #9da59b; font-size: 9px; line-height: 1.55; }
.event-result-retry { display: block; margin-top: 8px; color: var(--dim); font: 7px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.response-toolbar { height: 37px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 9px; }
.icon-button { width: 28px; height: 28px; }
.icon-button svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 1.1; }
.response-code { min-height: 310px; max-height: 355px; overflow: auto; margin: 0; padding: 15px; border: 1px solid var(--line); border-radius: 10px; color: #bcc5b9; background: rgba(7,9,8,.65); white-space: pre-wrap; word-break: break-word; font: 10px/1.65 var(--mono); }

.history-section { margin-top: 46px; }
.history-heading { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 4px 16px; border-bottom: 1px solid var(--line); }
.history-heading .eyebrow { margin-bottom: 8px; }
.history-heading h2 { margin: 0; font-size: 16px; font-weight: 560; }
.history-list { min-height: 66px; }
.history-empty { margin: 22px 4px; color: var(--dim); font-size: 11px; }
.history-row { display: grid; grid-template-columns: 66px minmax(140px, 1fr) minmax(120px, .8fr) 90px 80px; gap: 16px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 10px; }
.history-method { color: var(--acid); font: 700 9px/1 var(--mono); }
.history-event { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); color: #cbd0c8; }
.history-endpoint { overflow: hidden; color: var(--dim); text-overflow: ellipsis; white-space: nowrap; }
.history-status { display: inline-flex; justify-self: start; align-items: center; gap: 6px; color: var(--muted); }
.history-status i { width: 5px; height: 5px; border-radius: 50%; background: var(--acid); }
.history-status.error i { background: var(--danger); }
.history-time { color: var(--dim); text-align: right; font-family: var(--mono); }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 20; transform: translate(-50%, 20px); padding: 11px 16px; color: #11150d; background: var(--acid); border-radius: 999px; opacity: 0; pointer-events: none; font-size: 11px; font-weight: 700; transition: .22s ease; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.error { color: white; background: var(--danger); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@keyframes pulse { to { opacity: .35; transform: scale(.78); } }
@keyframes fly { 50% { transform: translate(3px, -3px); } }

@media (max-width: 1180px) {
  .workspace { grid-template-columns: minmax(260px, .72fr) minmax(430px, 1.28fr); }
  .response-panel { grid-column: 1 / -1; min-height: auto; }
  .response-empty { min-height: 260px; }
  .response-code { min-height: 220px; max-height: 360px; }
}

@media (max-width: 800px) {
  .topbar { height: 68px; padding: 0 18px; }
  .docs-link { display: none; }
  .health-pill { padding: 0 9px; }
  .shell { width: min(100% - 28px, 660px); padding-top: 38px; }
  .intro { display: block; margin-bottom: 30px; }
  .intro h1 { font-size: clamp(37px, 10vw, 54px); }
  .intro-copy { margin-top: 24px; }
  .request-bar { padding: 7px 7px 7px 14px; flex-wrap: wrap; }
  .method { padding-right: 12px; }
  .endpoint-field input { padding-left: 12px; }
  .request-actions { width: 100%; margin-top: 7px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .request-action { width: 100%; min-width: 0; }
  .workspace { grid-template-columns: 1fr; }
  .response-panel { grid-column: auto; }
  .editor-panel, .response-panel { min-height: auto; }
  .code-shell, #jsonEditor { min-height: 380px; }
  .history-row { grid-template-columns: 55px 1fr 75px; }
  .history-endpoint, .history-time { display: none; }
}

@media (max-width: 480px) {
  .brand-copy strong { font-size: 11px; }
  .shortcut { display: none; }
  .panel-heading { padding-left: 17px; padding-right: 17px; }
  .setup-panel > :not(.panel-heading, .divider) { margin-left: 17px; margin-right: 17px; }
  .credential-button { width: calc(100% - 34px); }
  .brand-logo { width: 104px; }
  .brand-copy { display: none; }
  .health-pill span { display: none; }
  .editor-footer { align-items: flex-start; flex-direction: column; }
  .editor-actions { justify-content: flex-start; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .editor-heading { align-items: flex-start; gap: 10px; }
  .batch-hint { align-items: flex-start; flex-direction: column; }
  .batch-actions { width: 100%; justify-content: space-between; }
  .history-section { margin-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
