:root {
  color-scheme: light;
  --bg: #f5f0e7;
  --panel: rgba(255, 251, 244, 0.9);
  --panel-strong: #fffaf2;
  --ink: #1b1917;
  --muted: #6a645c;
  --line: #ddd3c1;
  --accent: #8d5a2b;
  --accent-dark: #5e3818;
  --warn: #9b2d2d;
  --shadow: 0 22px 60px rgba(55, 39, 22, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(192, 213, 188, 0.42), transparent 30%),
    radial-gradient(circle at bottom right, rgba(197, 171, 130, 0.26), transparent 34%),
    linear-gradient(180deg, #fbf7f1 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
.primary-link,
.ghost-link {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease, background 120ms ease;
}

button:hover,
.primary-link:hover,
.ghost-link:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.warn-button {
  background: var(--warn);
}

.ghost-button,
.ghost-link {
  background: rgba(141, 90, 43, 0.08);
  color: var(--accent-dark);
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar {
  padding: 28px 22px;
  border-right: 1px solid rgba(221, 211, 193, 0.8);
  background: rgba(252, 248, 241, 0.76);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #d6463d 0%, #8d5a2b 100%);
  color: white;
  font-weight: 800;
}

.brand-logo {
  object-fit: contain;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.brand strong,
h1,
h2 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.brand small,
.eyebrow,
.hero-text,
.login-copy,
.muted {
  color: var(--muted);
}

.nav {
  display: grid;
  gap: 10px;
}

.nav a {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.42);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 12px;
}

.admin-badge {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(141, 90, 43, 0.08);
  color: var(--accent-dark);
  width: fit-content;
}

.content {
  padding: 34px 38px 56px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 22px;
}

.page-head h1 {
  margin: 4px 0 0;
  font-size: clamp(34px, 5vw, 52px);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
}

.notice,
.error {
  padding: 14px 16px;
  border-radius: 18px;
  margin-bottom: 18px;
}

.notice {
  background: rgba(96, 146, 88, 0.12);
  color: #30542a;
}

.error {
  background: rgba(155, 45, 45, 0.12);
  color: #742121;
}

.stats-grid,
.card-grid {
  display: grid;
  gap: 18px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.stat-card,
.card,
.hero-card,
.login-panel {
  background: var(--panel);
  border: 1px solid rgba(221, 211, 193, 0.9);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 22px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
}

.stat-card strong {
  font-size: 42px;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

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

.card,
.hero-card {
  padding: 24px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.split-card {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
}

.card-subtle {
  border-radius: 24px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.38);
}

.stack-form {
  display: grid;
  gap: 14px;
}

.stack-form label,
.stack-form fieldset {
  display: grid;
  gap: 8px;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.grid-two,
.grid-three {
  display: grid;
  gap: 14px;
}

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

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

.toggle {
  display: flex !important;
  align-items: center;
  gap: 12px;
}

.toggle input {
  width: auto;
}

.actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.mono-block,
code {
  font-family: "SFMono-Regular", "JetBrains Mono", Menlo, monospace;
}

.mono-block {
  word-break: break-all;
  padding: 14px;
  border-radius: 16px;
  background: rgba(27, 25, 23, 0.06);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(221, 211, 193, 0.7);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.simple-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.simple-list li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(221, 211, 193, 0.9);
}

.simple-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.meta-list {
  display: grid;
  gap: 10px;
}

.meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
}

.meta-list strong {
  color: var(--ink);
  text-align: right;
}

.listener-picker {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
}

.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.checkbox-chip {
  display: inline-flex !important;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
}

.checkbox-chip input {
  width: auto;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(141, 90, 43, 0.1);
  color: var(--accent-dark);
}

.inline-cover,
.cover-art {
  width: 148px;
  height: 148px;
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid rgba(221, 211, 193, 0.8);
}

.public-body,
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.public-hero {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.hero-copy,
.hero-card {
  padding: 32px;
}

.hero-copy h1 {
  margin: 6px 0 14px;
  font-size: clamp(42px, 7vw, 76px);
}

.hero-text {
  max-width: 38rem;
  font-size: 18px;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  gap: 18px;
  margin: 24px 0;
}

.hero-stats div {
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.55);
}

.hero-stats strong {
  display: block;
  font-size: 30px;
}

.hero-actions {
  display: flex;
  gap: 12px;
}

.login-panel {
  width: min(480px, 100%);
  padding: 34px;
}

.login-logo {
  width: 92px;
  height: 92px;
  object-fit: contain;
  display: block;
  margin-bottom: 10px;
}

@media (max-width: 960px) {
  .shell,
  .public-hero,
  .stats-grid,
  .card-grid,
  .split-card,
  .grid-two,
  .grid-three {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding-bottom: 18px;
  }

  .content {
    padding: 24px 18px 40px;
  }
}
