:root {
  color-scheme: light;
  --bg: #f6efe6;
  --panel: rgba(255, 252, 248, 0.92);
  --ink: #1d1a16;
  --muted: #6a6258;
  --line: rgba(71, 53, 28, 0.14);
  --accent: #c24d2c;
  --accent-strong: #9f3618;
  --shadow: 0 20px 50px rgba(81, 49, 23, 0.14);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(219, 128, 76, 0.26), transparent 28%),
    radial-gradient(circle at bottom right, rgba(105, 144, 97, 0.18), transparent 24%),
    linear-gradient(160deg, #f7f1ea 0%, #f0e2cf 100%);
  min-height: 100vh;
}

.shell {
  width: min(980px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
  display: grid;
  gap: 20px;
}

.app-shell {
  display: grid;
  gap: 20px;
}

.hidden {
  display: none;
}

.shell.compact {
  max-width: 720px;
  padding-top: 72px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  padding: 28px;
}

.hero h1,
.section-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.05;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  max-width: 12ch;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  color: var(--accent-strong);
}

.lede,
.section-head p,
.status-card,
.row .label {
  color: var(--muted);
}

.lede {
  margin: 18px 0 0;
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 62ch;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.note-input {
  flex: 1 1 320px;
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 13px 18px;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
}

.note-input::placeholder {
  color: var(--muted);
}

button {
  border: 0;
  border-radius: 999px;
  padding: 13px 20px;
  font: inherit;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

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

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 28px rgba(194, 77, 44, 0.28);
}

.ghost {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  border: 1px solid var(--line);
}

.danger-button {
  background: rgba(159, 54, 24, 0.08);
  color: var(--accent-strong);
  border: 1px solid rgba(159, 54, 24, 0.18);
  padding: 10px 16px;
}

.small-button {
  padding: 10px 14px;
}

.actions-cell {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.output,
.events {
  display: grid;
  gap: 16px;
}

.row {
  display: grid;
  gap: 8px;
}

.label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

code,
a {
  word-break: break-word;
}

a {
  color: var(--accent-strong);
}

.table-shell {
  overflow: auto;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.events-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.events-table th,
.events-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.5;
}

.events-table th {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 248, 241, 0.9);
}

.events-table td {
  font-size: 0.95rem;
}

.events-table td:empty::after {
  content: "";
}

.cell-subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.events-table tbody tr:last-child td {
  border-bottom: 0;
}

.empty-row td {
  text-align: center;
  color: var(--muted);
}

.status-card {
  margin-top: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  padding: 16px;
}

.track-panel h1 {
  max-width: 14ch;
}

@media (max-width: 640px) {
  .shell {
    width: min(100vw - 20px, 980px);
    padding: 20px 0 32px;
  }

  .panel {
    padding: 20px;
    border-radius: 20px;
  }

  .hero h1 {
    font-size: 2.3rem;
  }
}
