@font-face {
  font-family: Royale;
  src: url("/fonts/big-shoulders-latin.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
:root {
  --ink: #142e27;
  --paper: #f6f1e3;
  --muted: #b8c6bd;
  --gold: #e5bd66;
  --line: #39564a;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
header,
footer,
main {
  max-width: 1440px;
  margin: auto;
  padding: 24px 40px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 24px;
}
.wordmark {
  font-family: Royale, Georgia, serif;
  font-size: 32px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark em {
  font-family: Georgia, serif;
  font-size: 27px;
  font-weight: 400;
}
.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--gold);
  border-radius: 50%;
  margin-left: 12px;
}
#connection {
  font-size: 13px;
  color: var(--muted);
}
main {
  min-height: calc(100svh - 174px);
  padding-top: 40px;
  padding-bottom: 56px;
}
footer {
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
}
h1,
h2,
h3,
p {
  margin: 0 0 16px;
}
h1 {
  font-family: Royale, Georgia, serif;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.06;
  font-weight: 700;
  text-wrap: balance;
}
h2 {
  font-size: 22px;
  line-height: 1.25;
  margin-top: 24px;
}
h3 {
  font-size: 16px;
  margin-top: 24px;
}
p {
  max-width: 70ch;
}
a {
  color: inherit;
  text-underline-offset: 5px;
}
a:hover {
  color: var(--gold);
}
button,
.button {
  font: inherit;
  font-weight: 700;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--ink);
  border-radius: 4px;
  padding: 14px 20px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  min-height: 48px;
}
button:hover,
.button:hover {
  background: #f1d99e;
  color: var(--ink);
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button.secondary {
  background: transparent;
  color: inherit;
  border-color: var(--line);
}
input,
select {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #81958a;
  border-radius: 3px;
  width: 100%;
  padding: 13px;
  min-height: 48px;
  caret-color: var(--ink);
}
label {
  display: block;
  font-weight: 700;
  margin: 24px 0 7px;
}
form button {
  margin-top: 20px;
}
form button:only-child {
  margin: 0;
}
.inline {
  display: flex;
  gap: 10px;
  align-items: center;
}
.inline button {
  margin: 0;
  white-space: nowrap;
}
.narrow {
  max-width: 600px;
}
.welcome {
  padding: 32px 0;
  max-width: 700px;
}
.welcome h1 {
  font-size: clamp(54px, 7vw, 96px);
  margin-bottom: 32px;
}
.welcome form {
  margin: 40px 0;
}
.textlink {
  display: inline-block;
  margin-top: 16px;
}
.round-title {
  margin-bottom: 32px;
}
.round-title p,
.muted {
  color: var(--muted);
}
.paper {
  background: var(--paper);
  color: var(--ink);
  padding: 28px;
  border-radius: 5px;
  box-shadow: 0 12px 32px #081c1740;
}
.paper .muted {
  color: #4b6054;
}
.paper h2 {
  margin-top: 0;
}
.guest-layout {
  display: grid;
  grid-template-columns: minmax(320px, 540px) 1fr;
  gap: 60px;
  align-items: start;
}
.card-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  border-bottom: 1px solid #a8b4a7;
  padding-bottom: 12px;
}
.card-title h2 {
  margin: 0;
}
.card-title span {
  font-size: 13px;
}
.card-headers,
.bingo-card {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.card-headers {
  padding-top: 18px;
  text-align: center;
  font-family: Royale, Georgia, serif;
  font-size: 28px;
}
.bingo-card {
  gap: 5px;
  margin-top: 8px;
}
.cell {
  padding: 0;
  aspect-ratio: 1;
  font-size: clamp(23px, 3vw, 36px);
  border: 1px solid #869b8b;
  background: transparent;
  border-radius: 3px;
  min-height: 0;
}
.cell:hover {
  background: #e9e0c8;
}
.cell.marked,
.cell.free {
  background: var(--ink);
  color: var(--paper);
  opacity: 1;
  border-color: var(--ink);
}
.cell.free {
  font-size: 13px;
  letter-spacing: 0.03em;
}
.card-help {
  font-size: 13px;
  margin: 18px 0;
  color: #425d4c;
}
#claim {
  width: 100%;
}
#card-feedback {
  font-size: 14px;
  margin: 14px 0 0;
}
.call-display h2 {
  color: var(--muted);
  margin-top: 0;
  font-size: 18px;
  font-weight: 400;
}
.ball {
  font-family: Royale, Georgia, serif;
  font-size: clamp(64px, 9vw, 96px);
  line-height: 1.05;
  color: var(--gold);
  padding: 12px 0 24px;
}
.draw-history {
  font-size: 20px;
}
.screen-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
}
.screen-layout .ball {
  font-size: 96px;
}
.number-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.number-board > div {
  display: grid;
  gap: 5px;
  text-align: center;
}
.number-board strong {
  color: var(--gold);
  font-family: Royale, Georgia, serif;
  font-size: 28px;
}
.number-board span {
  padding: 4px 2px;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 2px;
}
.number-board .called {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
  font-weight: 700;
}
.number-board .latest {
  background: var(--gold);
  border-color: var(--gold);
}
.join-screen {
  margin-top: 40px;
  display: flex;
  gap: 24px;
  align-items: center;
}
.join-screen img {
  width: 150px;
  aspect-ratio: 1;
  background: white;
  border: 8px solid white;
  border-radius: 3px;
}
.join-screen h2 {
  font-size: 30px;
  color: var(--paper);
  font-family: Royale, Georgia, serif;
}
.join-screen p:last-child {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.director-layout {
  display: grid;
  grid-template-columns: minmax(320px, 2fr) minmax(280px, 1fr);
  gap: 56px;
}
.operator-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 32px;
  font-size: 14px;
}
.controls {
  margin: 0 0 32px;
}
.controls > button {
  width: 100%;
}
details {
  margin-top: 20px;
}
summary {
  cursor: pointer;
  min-height: 44px;
  padding: 8px 0;
}
.players,
.audit {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
}
.players li,
.audit li {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.players li {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}
.players span,
.audit time {
  font-size: 13px;
  color: var(--muted);
}
.audit time {
  display: block;
}
.winners {
  border-top: 1px solid var(--gold);
  margin-top: 24px;
  padding-top: 4px;
}
.winners h2 {
  font-family: Royale, Georgia, serif;
  font-size: 40px;
  color: var(--gold);
}
.winners > p {
  font-size: 24px;
}
.winners > p:last-child {
  font-size: 14px;
}
.pause {
  padding: 16px 0;
  color: var(--gold);
}
#error,
#network-error {
  background: #f5dfd1;
  color: #632512;
  padding: 16px;
  border-radius: 3px;
  margin-bottom: 24px;
}
::selection {
  background: var(--gold);
  color: var(--ink);
}
:focus-visible {
  outline: 3px solid #76d4c0;
  outline-offset: 4px;
}
.paper :focus-visible {
  outline-color: #155b48;
}
html {
  scrollbar-color: var(--gold) var(--ink);
}
.skip {
  position: absolute;
  left: 20px;
  top: -80px;
  padding: 12px;
  background: var(--paper);
  color: var(--ink);
  z-index: 10;
}
.skip:focus {
  top: 10px;
}
@media (max-width: 800px) {
  header,
  main,
  footer {
    padding-left: 20px;
    padding-right: 20px;
  }
  .guest-layout,
  .screen-layout,
  .director-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .screen-layout .call-display {
    position: static;
  }
  .paper {
    padding: 20px;
  }
  .number-board span {
    padding: 5px;
  }
  .guest-layout .call-display {
    order: -1;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
  }
  .guest-layout .call-display h3,
  .guest-layout .draw-history {
    display: none;
  }
  .guest-layout .ball {
    padding: 0 0 10px;
    font-size: 64px;
  }
  .round-title {
    margin-bottom: 24px;
  }
  .wordmark {
    font-size: 25px;
  }
  .wordmark em {
    font-size: 22px;
  }
  .dot {
    display: none;
  }
  #connection {
    max-width: 140px;
    text-align: right;
  }
  .inline {
    flex-direction: column;
    align-items: stretch;
  }
  .cell {
    font-size: 28px;
  }
  .join-screen img {
    width: 120px;
  }
  .players li {
    flex-wrap: wrap;
  }
  .welcome {
    padding-top: 16px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .ball {
    animation: call-in 0.35s var(--ease);
  }
  @keyframes call-in {
    from {
      filter: blur(2px);
      transform: translateY(5px);
    }
    to {
      filter: blur(0);
      transform: translateY(0);
    }
  }
}

/* Die Leinwand bleibt auch bei 720p komplett sichtbar. */
@media (min-width: 801px) {
  .leinwand-view header {
    padding: 12px 32px;
    min-height: 64px;
  }
  .leinwand-view footer {
    padding: 8px 32px;
  }
  .leinwand-view main {
    padding: 20px 32px;
    min-height: 0;
  }
  .leinwand-view .round-title {
    margin-bottom: 20px;
  }
  .leinwand-view h1 {
    font-size: clamp(36px, 4vw, 56px);
  }
  .leinwand-view .round-title p {
    margin: 8px 0 0;
  }
  .leinwand-view .number-board {
    height: calc(100svh - 220px);
    min-height: 320px;
  }
  .leinwand-view .number-board > div {
    grid-template-rows: 30px repeat(15, minmax(0, 1fr));
    gap: 4px;
  }
  .leinwand-view .number-board span {
    display: grid;
    place-items: center;
    padding: 0;
    line-height: 1;
  }
  .leinwand-view .join-screen {
    margin-top: 24px;
  }
  .leinwand-view .winners > p:first-of-type {
    max-height: 200px;
    overflow-y: auto;
  }
}
@media (min-width: 801px) {
  body.leinwand-view {
    height: 100svh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
  .leinwand-view header,
  .leinwand-view footer,
  .leinwand-view main {
    width: 100%;
  }
  .leinwand-view main {
    margin: 0 auto;
    height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .leinwand-view .screen-layout {
    min-height: 0;
  }
  .leinwand-view .number-board {
    height: 100%;
    min-height: 0;
  }
}
