:root {
  color-scheme: light;
  font-family: "Calibri", "Candara", "Segoe UI", "Trebuchet MS", sans-serif;
  line-height: 1.5;
}

body {
  margin: 0;
  background: #f7f1e8;
  color: #1f1b16;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

button,
input {
  font: inherit;
}

header {
  margin-bottom: 32px;
}

h1 {
  font-size: 2.5rem;
  margin: 0 0 12px;
}

p {
  margin: 0 0 16px;
}

a {
  color: #1f1b16;
}

.nav-card {
  border: 2px solid #1f1b16;
  border-radius: 12px;
  padding: 20px;
  background: #fffaf2;
}

.nav-card h2 {
  margin: 0 0 12px;
  font-size: 1.5rem;
}

.primary-button {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 999px;
  border: 2px solid #1f1b16;
  background: #f2c94c;
  color: #1f1b16;
  text-decoration: none;
  font-weight: 600;
}

.primary-button:hover,
.primary-button:focus {
  background: #f8d66a;
}

.primary-button:disabled {
  background: #d7ccb5;
  border-color: #9a8f7a;
  color: #6b6256;
  cursor: not-allowed;
}

.score-table .primary-button {
  margin-top: 8px;
}

.placeholder {
  border: 2px dashed #1f1b16;
  border-radius: 12px;
  padding: 20px;
  background: #fffaf2;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 2px solid #1f1b16;
  background: #fffaf2;
  color: #1f1b16;
  cursor: pointer;
}

.secondary-button:hover,
.secondary-button:focus {
  background: #f1e6d7;
}

.card {
  border: 2px solid #1f1b16;
  border-radius: 12px;
  padding: 20px;
  background: #fffaf2;
  margin-bottom: 24px;
}

.stack {
  display: grid;
  gap: 24px;
}

.page-header h1 {
  margin-top: 8px;
}

.back-link {
  display: inline-block;
  margin-bottom: 6px;
  text-decoration: none;
}

.player-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.text-input {
  flex: 1 1 200px;
  padding: 10px 12px;
  border: 2px solid #1f1b16;
  border-radius: 10px;
  background: #fff;
}

.round-form {
  display: grid;
  gap: 16px;
}

.round-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.score-field {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.score-input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #1f1b16;
  border-radius: 10px;
  background: #fff;
  text-align: right;
  box-sizing: border-box;
}

.select-input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #1f1b16;
  border-radius: 10px;
  background: #fff;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}

.score-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 420px;
}

.score-table th,
.score-table td {
  border-bottom: 2px solid #1f1b16;
  padding: 10px 8px;
  text-align: right;
  vertical-align: top;
}

.score-table th:first-child,
.score-table td:first-child {
  text-align: left;
  width: 140px;
}

.inline-fields {
  display: grid;
  gap: 10px;
  margin: 8px 0 10px;
}

.inline-field {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.muted-text {
  font-size: 0.9rem;
  color: #5b544c;
  margin-top: 6px;
}

.inline-muted {
  font-size: 0.85rem;
  color: #5b544c;
  margin-left: 6px;
}

.error-text {
  font-size: 0.9rem;
  color: #b22222;
  margin-top: 6px;
}

.field-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5b544c;
  margin-top: 6px;
}

.radio-group {
  display: grid;
  gap: 6px;
  margin: 8px 0 10px;
}

.knocker-choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.score-table tfoot td {
  font-weight: 700;
  border-top: 2px solid #1f1b16;
}
