:root {
  --bg: #FAF7F2;
  --surface: #FFFDF9;
  --brown: #5C3317;
  --text-2: #4E3B2E;
  --muted: #5E4A3C;
  --line: #DCCFBF;
  --track: #E2D7C8;
  --hover: #E8DFD2;
  --on-brown-2: #D9CBB8;
  --outline: #8C7562;
  --accent: #B3261E;
  --display: Anton, Impact, sans-serif;
  --body: 'Work Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--brown);
  font-family: var(--body);
}

a { color: #7A2E1F; }
a:hover { color: #4A1A10; }

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--brown);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.5; }

.display {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.05;
  text-transform: uppercase;
  margin: 0;
}
.display-xl { font-size: 48px; }
.display-lg { font-size: 40px; }

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

/* Kopfzeile */
.top { background: var(--brown); color: var(--bg); padding: 20px 24px; }
.top-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; flex-direction: column; gap: 2px; }
.brand-title { font-family: var(--display); font-size: 34px; letter-spacing: 0.5px; line-height: 1.05; text-transform: uppercase; }
.brand-sub { font-size: 14px; color: var(--on-brown-2); }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn-outline {
  min-height: 44px; padding: 0 16px; border-radius: 8px;
  border: 1px solid var(--outline); background: transparent; color: var(--bg);
  font: 600 14px var(--body);
}
.btn-outline-lg { min-height: 48px; padding: 0 20px; border-radius: 10px; font-size: 16px; }
.btn-outline:not(:disabled):hover { background: rgba(250, 247, 242, 0.1); }

/* Hauptbereich */
.main {
  max-width: 1100px; margin: 0 auto; padding: 32px 24px 64px;
  display: flex; flex-direction: column; gap: 28px;
}

/* Setup */
.setup { display: flex; flex-direction: column; gap: 24px; max-width: 720px; }
.intro { display: flex; flex-direction: column; gap: 10px; }
.lead { margin: 0; font-size: 17px; line-height: 1.55; color: var(--text-2); }

.box {
  margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); display: flex; flex-direction: column; gap: 14px;
}
.box legend { padding: 0 6px; font-weight: 700; font-size: 15px; }

.check { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--brown); margin: 0; flex-shrink: 0; }
.check label { font-size: 16px; cursor: pointer; }

.gsizes { display: flex; flex-wrap: wrap; gap: 8px; }
.gsize {
  min-width: 56px; min-height: 48px; padding: 0 16px; border-radius: 10px;
  border: 2px solid var(--brown); background: var(--surface); color: var(--brown);
  font: 700 17px var(--body);
}
.gsize[aria-pressed="true"] { background: var(--brown); color: var(--bg); }

.hint { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }

.start-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.start-row .muted { font-size: 15px; }

.btn-pick {
  min-height: 56px; border: 0; border-radius: 10px;
  background: var(--accent); color: #FFFFFF; font: 700 17px var(--body);
}
.btn-pick:not(:disabled):hover { filter: brightness(1.08); }
.btn-start { padding: 0 28px; font-size: 18px; }

/* Spiel */
.play { display: flex; flex-direction: column; gap: 24px; }
.play-head { display: flex; flex-direction: column; gap: 10px; }
.play-title-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.match-info { font-size: 15px; color: var(--muted); font-weight: 600; }

.progress { height: 10px; border-radius: 999px; background: var(--track); overflow: hidden; }
.progress-bar { height: 10px; width: 0; background: var(--brown); border-radius: 999px; transition: width 0.25s ease; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card {
  min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px; display: flex; flex-direction: column; gap: 16px;
}
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tag {
  font: 700 12px var(--body); letter-spacing: 1px; text-transform: uppercase;
  background: var(--brown); color: var(--bg); padding: 4px 8px; border-radius: 4px;
}
.card-body { display: flex; flex-direction: column; gap: 6px; flex-grow: 1; }
.card-title { margin: 0; font-size: 22px; line-height: 1.25; font-weight: 700; overflow-wrap: anywhere; }
.card-artist { font-size: 16px; color: var(--text-2); overflow-wrap: anywhere; }

.btn-ghost {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  border: 2px solid var(--brown); border-radius: 10px; color: var(--brown);
  text-decoration: none; font-weight: 600; font-size: 16px;
}
.btn-ghost:hover { background: var(--hover); color: var(--brown); }

/* Ergebnis */
.done { display: flex; flex-direction: column; gap: 24px; }
.champ {
  background: var(--brown); color: var(--bg); border-radius: 16px; padding: 32px;
  display: flex; flex-direction: column; gap: 12px;
}
.champ-kicker { font: 700 13px var(--body); letter-spacing: 2px; text-transform: uppercase; color: var(--on-brown-2); }
.champ-title { font-size: 56px; overflow-wrap: anywhere; }
.champ-meta { font-size: 20px; color: var(--hover); }
.champ-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.btn-light {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border-radius: 10px;
  background: var(--bg); color: var(--brown); text-decoration: none; font-weight: 700;
}
.btn-light:hover { color: var(--brown); background: var(--hover); }

.ranking { display: flex; flex-direction: column; gap: 24px; }
.rank-group { display: flex; flex-direction: column; gap: 10px; }
.rank-group h2 { margin: 0; font-size: 20px; }
.rank-item {
  display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; text-decoration: none; color: var(--brown);
}
.rank-item:hover { color: var(--brown); background: var(--hover); }
.rank-item .muted { color: var(--muted); }

.foot { font-size: 13px; color: var(--muted); line-height: 1.5; }

@media (max-width: 600px) {
  .top { padding: 16px; }
  .main { padding: 24px 16px 48px; }
  .display-xl { font-size: 36px; }
  .display-lg { font-size: 32px; }
  .champ { padding: 24px; }
  .champ-title { font-size: 40px; }
}
