:root {
  --text: #1f2328;
  --text-muted: #59636e;
  --bg: #ffffff;
  --surface: #f6f8fa;
  --border: #d1d9e0;
  --accent: #0969da;
  --warning: #9a6700;
  --warning-bg: #fff8c5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6edf3;
    --text-muted: #9198a1;
    --bg: #0d1117;
    --surface: #161b22;
    --border: #30363d;
    --accent: #4493f8;
    --warning: #d29922;
    --warning-bg: #272115;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

.container {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Kopfzeile mit Menü */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1rem;
}

.logo {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.site-nav a[aria-current="page"] {
  font-weight: 600;
}

/* Inhalt */
main {
  padding-block: 2.5rem;
}

h1 {
  margin-top: 0;
  line-height: 1.2;
}

.lead {
  font-size: 1.125rem;
  color: var(--text-muted);
}

/* Kacheln */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.tile {
  display: block;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}

.tile:hover,
.tile:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.tile h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: var(--accent);
}

.tile p {
  margin: 0;
  color: var(--text-muted);
}

/* Fußzeile */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ---------- Delegation Poker ---------- */

.meldung {
  padding: 0.75rem 1rem;
  border: 1px solid var(--warning);
  border-radius: 0.5rem;
  background: var(--warning-bg);
}

.spalten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1rem;
  align-items: start;
}

.spalten-raum {
  grid-template-columns: minmax(0, 2fr) minmax(14rem, 1fr);
}

@media (max-width: 45rem) {
  .spalten-raum {
    grid-template-columns: 1fr;
  }
}

.panel {
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
}

.panel h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.hinweis,
.optional {
  color: var(--text-muted);
  font-size: 0.875rem;
}

label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 600;
}

input,
textarea {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

input:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.code-eingabe {
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

button {
  padding: 0.5rem 1rem;
  font: inherit;
  font-weight: 600;
  color: #ffffff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 0.5rem;
  cursor: pointer;
}

button.zweitrangig {
  color: var(--accent);
  background: transparent;
}

button:hover {
  filter: brightness(1.1);
}

.raum-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.raum-code {
  display: block;
  font-size: 1.5rem;
  letter-spacing: 0.15em;
}

/* Karten */
.karten {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 0.75rem;
  margin-block: 1rem;
}

.karte {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 8.5rem;
  padding: 0.75rem;
  text-align: left;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 0.75rem;
}

button.karte:hover {
  filter: none;
  border-color: var(--accent);
}

.karte[aria-pressed="true"],
.karte-gewaehlt {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.karte-wert {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}

.karte-titel {
  font-size: 0.875rem;
  line-height: 1.3;
}

.karte-namen {
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-top: 1px solid var(--border);
}

.fazit {
  font-weight: 600;
}

.ki-begruendung {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--accent);
  background: var(--bg);
  border-radius: 0 0.5rem 0.5rem 0;
}

.einigung-knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.einigung-knoepfe button {
  font-weight: 400;
}

/* Teilnehmende */
.teilnehmende {
  margin: 0;
  padding: 0;
  list-style: none;
}

.teilnehmende li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 0.5rem;
  padding-block: 0.375rem;
  border-bottom: 1px solid var(--border);
}

.teilnehmende li:last-child {
  border-bottom: none;
}

.teilnehmende .status {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.teilnehmende .offline {
  opacity: 0.5;
}

.teilnehmende .ki {
  font-style: italic;
}

.verlauf-liste {
  margin: 0;
  padding-left: 1.25rem;
}

.verlauf-liste li {
  margin-bottom: 0.5rem;
}
