:root {
  --fur: #a87c5a;
  --wood: #5c3b1e;
  --wood-light: #8b5e34;
  --paper: #f1e3d3;
  --cream: #fffaf0;
  --ink: #3b2f27;
  color-scheme: light;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  color: var(--ink);
  background: var(--fur);
}

main {
  display: grid;
  gap: 20px;
  justify-items: center;
  width: 100%;
}

.controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

label {
  color: #2e1c12;
  font-size: 1.5rem;
}

select {
  padding: 10px 14px;
  border: 2px solid var(--wood);
  border-radius: 6px;
  background: #d2b48c;
  font: inherit;
  font-size: 1.1rem;
}

select:hover,
select:focus-visible {
  border-color: var(--wood-light);
  background: #b08a65;
  outline: 3px solid rgb(255 250 240 / 70%);
  outline-offset: 2px;
}

select:disabled {
  cursor: wait;
  opacity: 0.65;
}

#status {
  min-height: 1.25rem;
  margin: 0;
  font-weight: 700;
}

#table-container {
  width: 100%;
  overflow-x: auto;
  padding: 20px;
  border: 3px solid var(--wood);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 0 15px rgb(0 0 0 / 30%);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--cream);
}

caption {
  padding: 0 0 12px;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: left;
}

th,
td {
  padding: 12px;
  border-bottom: 2px solid var(--wood-light);
  text-align: left;
  white-space: nowrap;
}

thead th {
  color: var(--paper);
  background: var(--wood);
}

tbody tr:hover {
  background: #d2b48c;
}

tbody th {
  font-weight: 700;
}

@media (max-width: 600px) {
  body {
    padding: 10px;
  }

  .controls {
    flex-direction: column;
    text-align: center;
  }

  label,
  select {
    font-size: 1.2rem;
  }

  #table-container {
    padding: 10px;
  }

  th,
  td {
    padding: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
