:root {
  --bg: #f3eee2;
  --ink: #1f1f1a;
  --accent: #c24c2d;
  --accent-strong: #8f2f1a;
  --panel: rgba(255, 252, 244, 0.78);
  --panel-border: rgba(31, 31, 26, 0.16);
  --shadow: 0 18px 40px rgba(41, 26, 17, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -5%, #f9d48a 0%, transparent 70%),
    radial-gradient(850px 450px at 100% 10%, #f5a67f 0%, transparent 68%),
    linear-gradient(160deg, #f5f0e4 0%, #eadfc4 100%);
  position: relative;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  filter: blur(32px);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  animation: float 14s ease-in-out infinite;
}

.orb-a {
  width: 320px;
  height: 320px;
  background: #f06d3a;
  top: -90px;
  right: -30px;
}

.orb-b {
  width: 220px;
  height: 220px;
  background: #eec65f;
  bottom: 5vh;
  left: -80px;
  animation-delay: 1.2s;
}

.shell {
  width: 100%;
  margin: 1rem 0 1.2rem;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
  height: calc(100vh - 2.2rem);
  display: flex;
  flex-direction: column;
}

.hero {
  padding: 1.2rem 0.2rem 1rem;
  animation: reveal 500ms ease-out;
  flex: 0 0 auto;
}

.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.76rem;
  margin: 0;
  opacity: 0.82;
}

.hero h1 {
  margin: 0.35rem 0;
  line-height: 1.08;
  font-size: clamp(1.9rem, 3.8vw, 3.2rem);
}

.lead {
  margin: 0;
  max-width: 70ch;
}

.app-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 1rem;
  align-items: start;
  flex: 1 1 auto;
  min-height: 0;
}

.left-column,
.right-column {
  min-width: 0;
  max-height: 100%;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.right-column .response-panel {
  position: static;
}

.panel {
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  margin: 0.85rem 0;
  padding: 1rem;
  background: var(--panel);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  animation: reveal 550ms ease-out;
}

.panel h2 {
  margin: 0 0 0.8rem;
  font-size: 1.2rem;
}

.grid {
  display: grid;
  gap: 0.85rem;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.config-panel .grid.two {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.compact {
  gap: 0.7rem;
}

label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.94rem;
  font-weight: 500;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid rgba(31, 31, 26, 0.22);
  border-radius: 12px;
  padding: 0.68rem 0.78rem;
  background: #fffef8;
}

input:focus,
select:focus,
button:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 65%, white);
  outline-offset: 1px;
}

.actions {
  align-self: end;
}

.actions.full,
.full {
  grid-column: 1 / -1;
}

button {
  border: none;
  border-radius: 12px;
  padding: 0.68rem 0.95rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  cursor: pointer;
  font-weight: 600;
  transition: transform 140ms ease, box-shadow 140ms ease;
  box-shadow: 0 9px 18px rgba(143, 47, 26, 0.25);
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.response-panel .meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  margin-bottom: 0.65rem;
}

.inspector-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.inspector-col h3 {
  margin: 0 0 0.4rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.8;
}

pre {
  margin: 0;
  max-height: 360px;
  overflow: auto;
  border: 1px solid rgba(31, 31, 26, 0.17);
  border-radius: 12px;
  background: #181716;
  color: #efe8d8;
  padding: 0.9rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.55;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(15px);
  }
}

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

@media (max-width: 780px) {
  .shell {
    width: 100%;
    padding: 0 0.5rem;
    height: auto;
    display: block;
  }

  .app-layout {
    grid-template-columns: 1fr;
    gap: 0.2rem;
    min-height: initial;
  }

  .left-column,
  .right-column {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .right-column .response-panel {
    position: static;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }

  .config-panel .grid.two {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 0.9rem;
  }
}
