:root {
  color-scheme: light;
  --bg: #f4f2ec;
  --panel: #fffaf0;
  --ink: #1f2428;
  --muted: #6b6f76;
  --line: #c9b98d;
  --board: #d9a441;
  --accent: #226f54;
  --danger: #a33d3d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) 380px;
  gap: 18px;
  height: 100vh;
  padding: 18px;
}

.board-pane {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  gap: 12px;
}

#board {
  width: min(100%, calc(100vh - 96px));
  height: auto;
  max-height: calc(100vh - 96px);
  justify-self: center;
  align-self: center;
  background: var(--board);
  border: 1px solid #9f782e;
  border-radius: 4px;
  box-shadow: 0 12px 32px rgba(31, 36, 40, 0.16);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(7, 58px) minmax(140px, 1fr) 72px;
  align-items: center;
  gap: 8px;
}

.timeline button,
.actions button {
  min-height: 38px;
  border: 1px solid #b8b0a1;
  border-radius: 4px;
  background: #fffdf8;
  color: var(--ink);
  cursor: pointer;
}

.timeline button:hover,
.actions button:hover {
  background: #f3eadb;
}

.side-pane {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 16px;
  min-width: 0;
}

header {
  display: grid;
  gap: 10px;
}

h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

input[type="text"],
#queueName {
  width: 100%;
  border: 1px solid #b8b0a1;
  border-radius: 4px;
  padding: 9px 10px;
  background: #fffdf8;
  color: var(--ink);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.stats div {
  border: 1px solid #d1c6b2;
  border-radius: 4px;
  padding: 10px;
  background: var(--panel);
}

.stats span {
  display: block;
  font-size: 22px;
  font-weight: 700;
}

.stats small {
  color: var(--muted);
  font-size: 12px;
}

.metadata {
  margin: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-content: start;
  gap: 8px 12px;
  border-top: 1px solid #d1c6b2;
  border-bottom: 1px solid #d1c6b2;
  padding: 14px 0;
}

.metadata dt {
  color: var(--muted);
}

.metadata dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.actions .yes {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.actions .no {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

.status {
  margin: 0;
  min-height: 22px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
  }

  #board {
    width: min(100%, 92vw);
    max-height: none;
  }

  .timeline {
    grid-template-columns: repeat(7, 1fr);
  }

  #moveSlider {
    grid-column: 1 / -2;
  }
}

