body[data-game="stadtlandfluss"] {
  --accent: #8b4f17;
  --accent-soft: #f5e6d7;
  --signal: #d6ed55;
}

.slf-app {
  width: min(940px, 100%);
}

.host-settings {
  border: 1px solid var(--line);
  padding: 22px;
  background: var(--surface);
}

.config-help {
  margin: 22px 0 10px;
  color: var(--muted);
  line-height: 1.45;
}

.category-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.category-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
}

.category-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 15px;
}

.category-option input {
  width: 20px;
  min-height: 20px;
  margin: 0;
  accent-color: var(--accent);
}

.remove-category {
  width: 30px;
  min-height: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
}

.category-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 16px;
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
}

.add-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 14px;
}

.add-category .secondary-button {
  width: auto;
  padding-inline: 18px;
}

.scoring-note {
  display: grid;
  gap: 5px;
  margin-top: 20px;
  padding: 14px;
  border-left: 4px solid var(--signal);
  background: var(--bg);
  color: var(--muted);
  line-height: 1.4;
}

.scoring-note strong {
  color: var(--ink);
}

.round-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.round-banner-copy span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.round-banner-copy strong {
  font-size: 20px;
}

.letter-badge {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 46px;
  line-height: 1;
}

.timer-box {
  min-width: 74px;
  text-align: right;
}

.timer-box span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.timer-box strong {
  font-size: 30px;
  font-variant-numeric: tabular-nums;
}

.timer-box.urgent strong {
  color: var(--danger);
}

.entry-progress {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.answer-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.answer-fields label {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
}

.answer-fields input {
  border: 0;
  border-bottom: 2px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding-inline: 0;
}

.answer-fields input:focus {
  border-color: var(--accent);
  outline: 0;
}

.write-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 18px;
}

.write-actions .secondary-button {
  width: auto;
  padding-inline: 18px;
}

.review-intro {
  margin-bottom: 18px;
  padding: 14px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  line-height: 1.45;
}

.round-total-grid {
  display: flex;
  gap: 8px;
  margin: 0 -18px 22px;
  padding: 0 18px 8px;
  overflow-x: auto;
}

.round-total {
  flex: 0 0 auto;
  min-width: 130px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.round-total span {
  display: block;
  max-width: 130px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.round-total strong {
  color: var(--accent);
  font-size: 24px;
}

.review-category {
  margin-bottom: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.review-category h3 {
  margin: 0;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  font-size: 17px;
}

.review-answer {
  display: grid;
  grid-template-columns: minmax(90px, 0.7fr) minmax(140px, 1.4fr) minmax(76px, auto);
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
}

.review-answer:last-child {
  border-bottom: 0;
}

.review-answer.earned {
  box-shadow: inset 4px 0 var(--signal);
}

.review-player {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.review-word {
  min-width: 0;
  color: var(--muted);
  font-style: italic;
  overflow-wrap: anywhere;
}

.review-word.filled {
  color: var(--ink);
  font-style: normal;
  font-weight: 750;
}

.point-badge {
  justify-self: end;
  min-width: 58px;
  padding: 7px 9px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  text-align: center;
  font-weight: 900;
}

.review-answer.earned .point-badge {
  background: var(--signal);
  color: #273018;
}

.point-editor {
  justify-self: end;
  display: grid;
  grid-template-columns: 70px auto;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.point-editor input {
  width: 70px;
  min-height: 40px;
  padding: 6px 8px;
  text-align: right;
}

.review-actions {
  position: sticky;
  bottom: 12px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface), transparent 5%);
  box-shadow: 0 8px 30px rgb(0 0 0 / 12%);
}

.scoring-legend {
  margin: 18px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 680px) {
  .category-editor,
  .answer-fields,
  .add-category,
  .write-actions {
    grid-template-columns: 1fr;
  }

  .add-category .secondary-button,
  .write-actions .secondary-button {
    width: 100%;
  }

  .round-banner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .timer-box {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    text-align: left;
  }

  .review-answer {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .review-word {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .point-badge,
  .point-editor {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

@media (prefers-color-scheme: dark) {
  .host-settings,
  .round-banner,
  .answer-fields label,
  .round-total,
  .review-category {
    background: var(--surface);
  }

  .category-option,
  .scoring-note,
  .review-category h3,
  .point-badge {
    background: var(--bg);
  }

  .review-actions {
    background: color-mix(in srgb, var(--surface), transparent 2%);
  }
}
