:root {
  --bg: #f4efe7;
  --bg-accent: radial-gradient(circle at top left, rgba(199, 162, 120, 0.35), transparent 28%),
    radial-gradient(circle at right center, rgba(35, 78, 112, 0.18), transparent 24%),
    linear-gradient(180deg, #f8f5ef 0%, #efe6d8 100%);
  --panel: rgba(255, 252, 247, 0.84);
  --panel-border: rgba(64, 49, 35, 0.12);
  --text: #2b241d;
  --muted: #6a5b4f;
  --brand: #234e70;
  --brand-strong: #18364c;
  --warm: #b46a33;
  --success: #23603c;
  --danger: #8c2f39;
  --shadow: 0 18px 40px rgba(59, 45, 34, 0.12);
  --radius: 22px;
  --radius-sm: 14px;
  --font-display: "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  background-image: var(--bg-accent);
}

.page-shell {
  width: min(1280px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 40px 0 56px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.hero h1,
.panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
}

.hero-copy,
.output-box,
.item-card p,
label {
  line-height: 1.5;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--warm);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.panel {
  grid-column: span 4;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.panel-wide {
  grid-column: span 8;
}

.panel-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
}

.status-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(35, 78, 112, 0.08);
  color: var(--brand);
  font-size: 0.88rem;
  font-weight: 700;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.full-width,
.button-row,
.output-box,
.card-list {
  grid-column: 1 / -1;
}

label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.92rem;
  font-weight: 600;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(43, 36, 29, 0.12);
  background: rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(35, 78, 112, 0.2);
  border-color: rgba(35, 78, 112, 0.4);
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  background: rgba(35, 78, 112, 0.12);
  color: var(--brand-strong);
  font-weight: 700;
  transition: transform 120ms ease, background 120ms ease;
}

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

.button-primary {
  background: linear-gradient(135deg, var(--brand) 0%, #2f6c8d 100%);
  color: #fff;
}

.output-box {
  margin: 16px 0 0;
  padding: 14px;
  background: rgba(33, 28, 23, 0.92);
  color: #f7f0e9;
  border-radius: var(--radius-sm);
  min-height: 76px;
  overflow: auto;
  white-space: pre-wrap;
}

.card-list {
  display: grid;
  gap: 12px;
}

.item-card {
  padding: 14px 16px;
  border: 1px solid rgba(43, 36, 29, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.item-card h3,
.item-card p {
  margin: 0;
}

.item-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.item-card p + p {
  margin-top: 5px;
}

.inline-actions {
  margin-top: 12px;
}

.danger {
  background: rgba(140, 47, 57, 0.12);
  color: var(--danger);
}

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

@media (max-width: 1024px) {
  .panel,
  .panel-wide {
    grid-column: span 12;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100vw - 20px, 100%);
    padding-top: 24px;
  }

  .hero {
    flex-direction: column;
    align-items: start;
  }

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