:root {
  --bg: #f5efe5;
  --panel: rgba(255, 251, 244, 0.86);
  --panel-strong: rgba(255, 250, 240, 0.95);
  --stroke: #c89f6a;
  --text-main: #1f1b16;
  --text-muted: #574b3c;
  --accent-a: #d9653f;
  --accent-b: #3b8c8a;
  --accent-c: #eaaf55;
  --shadow: 0 24px 48px rgba(50, 30, 9, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 12%, rgba(217, 101, 63, 0.25) 0%, transparent 42%),
    radial-gradient(circle at 88% 8%, rgba(59, 140, 138, 0.2) 0%, transparent 36%),
    linear-gradient(155deg, #f7f0e5 0%, #efe5d6 56%, #ece3d9 100%);
  color: var(--text-main);
  font-family: "Avenir Next", "Futura", "Trebuchet MS", sans-serif;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  width: 38vw;
  height: 38vw;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.26;
  z-index: 0;
  pointer-events: none;
}

.orb-a {
  top: -8vw;
  left: -10vw;
  background: linear-gradient(45deg, var(--accent-a), transparent);
}

.orb-b {
  bottom: -14vw;
  right: -9vw;
  background: linear-gradient(45deg, var(--accent-b), transparent);
}

.mvp-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, 94vw);
  margin: 2.4rem auto 3.2rem auto;
  display: grid;
  gap: 1rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding: 1.35rem 1.5rem 1.2rem;
  border: 1px solid rgba(131, 90, 42, 0.35);
  border-radius: 20px;
  background: linear-gradient(120deg, rgba(255, 251, 245, 0.92), rgba(252, 246, 234, 0.82));
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
}

.brand-block h1 {
  margin: 0;
  font-family: "Bodoni 72", "Didot", "Times New Roman", serif;
  font-size: clamp(1.7rem, 2.6vw, 2.55rem);
  letter-spacing: 0.01em;
}

.brand-block p {
  margin: 0.45rem 0 0;
  color: var(--text-muted);
}

.status-pill {
  border: 1px solid rgba(59, 140, 138, 0.55);
  border-radius: 999px;
  background: rgba(59, 140, 138, 0.14);
  padding: 0.48rem 0.95rem;
  font-weight: 700;
  white-space: nowrap;
}

.inline-error {
  border: 1px solid rgba(176, 54, 45, 0.45);
  border-radius: 14px;
  background: rgba(196, 80, 70, 0.12);
  color: #6d1f15;
  padding: 0.8rem 1rem;
}

.screen-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.62rem;
}

.nav-item {
  border: 1px solid rgba(86, 67, 41, 0.26);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text-main);
  padding: 0.62rem 0.92rem;
  font-weight: 650;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.nav-item:hover {
  transform: translateY(-1px);
  border-color: rgba(217, 101, 63, 0.72);
}

.nav-item.active {
  border-color: rgba(217, 101, 63, 0.88);
  background: linear-gradient(130deg, rgba(217, 101, 63, 0.17), rgba(234, 175, 85, 0.2));
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr);
  gap: 1rem;
}

.panel {
  border: 1px solid rgba(131, 90, 42, 0.29);
  border-radius: 20px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.2rem 1.25rem;
  backdrop-filter: blur(4px);
}

.panel h2 {
  margin: 0;
  font-family: "Bodoni 72", "Didot", "Times New Roman", serif;
  font-size: 1.52rem;
}

.panel h3 {
  margin: 1.08rem 0 0.62rem;
  font-size: 1rem;
}

.panel-description {
  margin: 0.4rem 0 0.9rem;
  color: var(--text-muted);
}

.state-list {
  display: grid;
  gap: 0.72rem;
}

.state-card {
  border: 1px solid rgba(141, 103, 52, 0.28);
  border-radius: 14px;
  background: rgba(255, 249, 238, 0.92);
  padding: 0.72rem 0.74rem;
}

.state-card header {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.state-card header strong {
  font-size: 0.98rem;
}

.state-card header span {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.state-card pre,
.last-action {
  margin: 0.54rem 0 0;
  border-radius: 11px;
  border: 1px solid rgba(128, 100, 64, 0.22);
  background: #fbf7ef;
  padding: 0.72rem;
  overflow-x: auto;
  font-size: 0.79rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.action-list {
  display: grid;
  gap: 0.62rem;
}

.action-card {
  text-align: left;
  width: 100%;
  border: 1px solid rgba(73, 128, 126, 0.35);
  border-radius: 12px;
  background: linear-gradient(130deg, rgba(59, 140, 138, 0.14), rgba(234, 175, 85, 0.11));
  color: var(--text-main);
  padding: 0.72rem 0.78rem;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, filter 160ms ease;
}

.action-card:hover {
  transform: translateY(-1px);
  border-color: rgba(217, 101, 63, 0.85);
  filter: saturate(1.06);
}

.action-title {
  display: block;
  font-weight: 700;
}

.action-card code {
  display: block;
  margin-top: 0.22rem;
  color: #4d4a40;
  font-size: 0.73rem;
}

.empty {
  color: var(--text-muted);
}

.loading-panel,
.error-panel {
  border: 1px solid rgba(131, 90, 42, 0.3);
  border-radius: 16px;
  background: var(--panel-strong);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}

.reveal {
  animation: reveal-up 460ms cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes reveal-up {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 960px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .mvp-shell {
    margin-top: 1.3rem;
  }
}

@media (max-width: 620px) {
  .topbar {
    padding: 1rem;
  }

  .panel {
    padding: 0.92rem;
  }

  .status-pill {
    width: 100%;
    text-align: center;
  }
}
