@font-face { font-family: 'DejaVu'; src: url('/fonts/DejaVuSans.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'DejaVu'; src: url('/fonts/DejaVuSans-Bold.ttf') format('truetype'); font-weight: 600 900; font-display: swap; }
@font-face { font-family: 'DejaVu Mono'; src: url('/fonts/DejaVuSansMono.ttf') format('truetype'); font-display: swap; }
:root {
  --paper: #F6F2E9;
  --white: #fff;
  --ink: #14202B;
  --muted: #53616c;
  --line: #D6D9D7;
  --lime: #D8FA52;
  --accent: #2755E7;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: 'DejaVu', Arial, sans-serif;
  line-height: 1.5;
}
main { width: 100%; max-width: 1100px; margin: 0 auto; padding: 28px; flex: 1; }
h1, h2, h3, p { margin: 0 0 16px; }
h1 { font-size: 28px; line-height: 1.25; font-weight: 650; letter-spacing: -.02em; }
h2 { font-size: 19px; line-height: 1.35; font-weight: 600; }
p { line-height: 1.6; }
a { color: var(--accent); text-underline-offset: 3px; overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible { outline: 3px solid #4b80ac; outline-offset: 3px; }
label { display: block; margin: 20px 0 7px; font-size: 14px; font-weight: 600; }
input, select, textarea { display: block; width: 100%; border: 1px solid #b8bec4; border-radius: 5px; padding: 11px 12px; background: #fff; color: var(--ink); min-width: 0; }
input, select { min-height: 45px; }
textarea { resize: vertical; line-height: 1.6; }
input[type=file] { font-size: 13px; padding: 9px; }
.site-header, .site-footer { display: flex; align-items: center; justify-content: space-between; padding: 18px 28px; gap: 20px; font-size: 13px; }
.site-header { border-bottom: 1px solid var(--line); }
.site-header a, .site-footer a { text-decoration: none; }
.site-header .brand { font-size: 15px; font-weight: 650; color: var(--ink); }
.site-header nav, .site-footer>div { display: flex; align-items: center; gap: 22px; }
.site-footer { justify-content: center; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer>div { flex-wrap: wrap; justify-content: center; gap: 12px 22px; }
.connection { display: flex; gap: 7px; align-items: center; font-size: 11px; color: var(--muted); }
.connection:before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #b45036; }
.connection.connected:before { background: #4f7851; }
.narrow { max-width: 430px; margin: 40px auto 60px; }
.narrow>p { color: var(--muted); font-size: 14px; }
.button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #b8bec4; border-radius: 5px; background: #fff; color: var(--ink); text-decoration: none; padding: 10px 15px; font-size: 14px; min-height: 42px; gap: 8px; }
.button:hover:not(:disabled) { background: #f2f4f5; }
.button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.button.primary:hover:not(:disabled) { background: #193c5a; }
.button.danger { color: #a32c28; border-color: #d6b0ae; }
.narrow form>.button { margin-top: 18px; width: 100%; }
.field-help, .source-credit, .score-breakdown { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 12px 0 18px; }
.form-error { font-size: 14px; color: #a32c28; margin-top: 12px; }
.form-error:empty { display: none; }
.host-toolbar { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 26px; gap: 18px; font-size: 12px; }
.toolbar-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; font-size: 12px; }
.host-toolbar .button { min-height: 36px; padding: 8px 12px; font-size: 12px; }
.lobby { max-width: 650px; margin: 24px auto 50px; }
.lobby>h2 { margin-top: 25px; }
.qr-block { display: flex; align-items: center; gap: 25px; margin: 25px 0; }
.qr { width: 220px; height: 220px; object-fit: contain; }
.qr-block p { margin-bottom: 4px; font-size: 13px; }
.game-code { font-size: 42px; letter-spacing: .1em; line-height: 1.4; font-variant-numeric: tabular-nums; }
.join-url { overflow-wrap: anywhere; color: var(--muted); }
.player-chips { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 14px; }
.player-chips span { padding-bottom: 3px; border-bottom: 1px solid var(--line); }
.quiz-section { max-width: 900px; margin: 0 auto 25px; }
.question-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.question-top h1 { font-size: 24px; margin: 0; }
.eyebrow { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.timer { display: flex; align-items: baseline; gap: 5px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.timer>span { font-size: 27px; font-weight: 600; }
.timer small { font-size: 12px; color: var(--muted); }
.timer.urgent { color: #a32c28; }
.progress-track { height: 2px; margin: 18px 0 22px; background: var(--line); }
#progress-fill { height: 100%; background: var(--accent); width: 100%; transition: width .2s linear; }
.image-example { text-align: center; min-height: 180px; --media-full: min(57vh, 580px); --media-small: min(32vh, 320px); }
.media-frame { position: relative; display: inline-block; max-width: 100%; }
.image-example img { display: block; width: auto; max-width: 100%; height: auto; max-height: var(--media-full); margin: 0 auto; object-fit: contain; }
.text-example { padding: 28px 10px; min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; --text-full: clamp(21px, 2.7vw, 30px); --text-small: clamp(17px, 2vw, 22px); }
.text-example>p { font-size: var(--text-full); line-height: 1.7; white-space: pre-line; max-width: 780px; margin: 0; }
.answer-area { max-width: 700px; margin: 25px auto 0; }
.answer-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.answer-button { border: 1px solid #8192a1; border-radius: 5px; background: #fff; color: var(--ink); min-height: 60px; padding: 12px; font-weight: 600; font-size: 16px; }
.answer-button:hover:not(:disabled) { background: #eff3f6; }
.answer-button.selected { background: #e8eff5; border: 2px solid var(--accent); opacity: 1; }
.answer-area .field-help { text-align: center; margin-bottom: 0; }
.audience-prompt { text-align: center; color: var(--muted); font-size: 14px; margin: 22px 0 0; }
.phase-pill { font-size: 12px; color: var(--muted); }
.reveal-block { max-width: 780px; border-top: 1px solid var(--line); margin: 26px auto; padding-top: 22px; }
.reveal-block>p { font-size: 15px; }
.reveal-block .result-pill { font-size: 19px; font-weight: 600; margin-bottom: 5px; }
.reveal-block .score-breakdown, .reveal-block .source-credit, .reveal-block .vote-summary { font-size: 12px; }
.takeaway { border-left: 2px solid #a7b8c7; padding: 0 0 0 14px; color: #495660; }
/* Gestaffelte Auflösung: Endzustand ist der Normalzustand, die Animation liefert nur den Weg dorthin. */
.is-reveal { --answer-at: .12s; --shrink-at: .2s; }
.at-votes { --d: 0s; }
.at-answer { --d: var(--answer-at); }
.at-explanation { --d: .25s; }
.at-takeaway { --d: .4s; }
.at-points { --d: .5s; }
.at-ranking { --d: .6s; }
.stage { animation: stage-in .2s ease-out both; animation-delay: calc(var(--d, 0s) - var(--elapsed, 0s)); }
@keyframes stage-in { from { opacity: 0; transform: translateY(10px); } }
.is-reveal .image-example img { max-height: var(--media-small); animation: media-shrink .25s ease-in-out both; animation-delay: calc(var(--shrink-at) - var(--elapsed, 0s)); }
@keyframes media-shrink { from { max-height: var(--media-full); } }
.is-reveal .text-example>p { font-size: var(--text-small); animation: text-shrink .25s ease-in-out both; animation-delay: calc(var(--shrink-at) - var(--elapsed, 0s)); }
@keyframes text-shrink { from { font-size: var(--text-full); } }
.origin-stamp { position: absolute; top: -16px; left: -10px; padding: 7px 13px; border-radius: 4px; font-size: 14px; font-weight: 700; letter-spacing: .02em; transform: rotate(-3deg); box-shadow: 0 2px 10px rgba(0,0,0,.18); animation: stamp .45s cubic-bezier(.2,1.4,.4,1) both; animation-delay: calc(var(--d, 0s) - var(--elapsed, 0s)); }
.origin-stamp.ai { background: var(--accent); color: #fff; }
.origin-stamp.human { background: #fff; color: var(--ink); border: 2px solid var(--ink); }
.text-example .origin-stamp { position: static; order: -1; margin-bottom: 18px; }
@keyframes stamp { from { opacity: 0; transform: scale(1.8) rotate(-8deg); } }
.vote-split { margin-bottom: 22px; }
.vote-label { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.vote-bar { display: flex; height: 14px; border-radius: 3px; overflow: hidden; background: var(--line); }
.vote-segment { width: var(--share); animation: vote-grow .9s cubic-bezier(.3,.7,.3,1) both, vote-mark .4s ease-out both; animation-delay: calc(0s - var(--elapsed, 0s)), calc(var(--answer-at) - var(--elapsed, 0s)); }
.vote-segment + .vote-segment { border-left: 2px solid #fff; }
.vote-segment.is-correct { background: var(--accent); }
.vote-segment.is-wrong { background: #c9d0d6; }
@keyframes vote-grow { from { width: 0; } }
@keyframes vote-mark { from { background: #8a9aa8; } }
.vote-legend { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.verdict { font-weight: 600; margin-top: -8px; }
.verdict.miss { color: #a32c28; }
.verdict.hit { color: #476944; }
.round-ranking { border-top: 1px solid var(--line); padding-top: 22px; margin: 25px auto 0; max-width: 780px; }
.leaderboard-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; margin: 20px 0; font-variant-numeric: tabular-nums; }
.leaderboard-table thead { font-size: 12px; color: var(--muted); }
.leaderboard-table th, .leaderboard-table td { padding: 14px 10px; border-bottom: 1px solid var(--line); }
.leaderboard-table td:first-child { width: 65px; }
.leaderboard-table th:last-child, .leaderboard-table td:last-child { text-align: right; white-space: nowrap; }
.leaderboard-table tbody th { font-weight: 600; overflow-wrap: anywhere; }
.leaderboard-table small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; margin-top: 4px; }
.leaderboard-table .movement { color: #476944; font-size: 11px; }
.my-row { background: #f0f4f7; }
.results { max-width: 780px; margin: 20px auto 50px; }
.results>h2 { margin-top: 28px; }
.overall { margin-top: 35px; }
#board-duration { width: 190px; }
.personal-result { font-size: 18px; }
.empty-state { padding: 20px 0; font-size: 14px; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: #263744; color: white; padding: 14px 20px; border-radius: 5px; font-size: 13px; width: max-content; max-width: 90vw; z-index: 50; }
.loading { padding: 60px; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none!important; }
.screen-mode main { max-width: 1450px; }
.screen-mode .quiz-section { max-width: 1250px; }
.screen-mode .image-example { --media-full: 64vh; --media-small: 36vh; }
.screen-mode .site-footer { display: none; }
.screen-mode .text-example { --text-full: clamp(28px,3vw,40px); --text-small: clamp(20px,2vw,26px); }
.screen-mode .reveal-block>p { font-size: 19px; }
.screen-mode .origin-stamp { font-size: 20px; padding: 9px 18px; }
.screen-mode .vote-bar { height: 22px; }
.screen-mode .vote-label, .screen-mode .vote-legend { font-size: 15px; }
.screen-mode .lobby { max-width: 800px; }
.screen-mode .qr { width: 300px; height: 300px; }
.screen-mode .game-code { font-size: 64px; }
.admin-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; margin-bottom: 25px; }
.admin-header h1 { margin-bottom: 5px; }
.admin-header p { font-size: 13px; color: var(--muted); }
.admin-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 36px; }
.question-list>button { width: 100%; }
.question-list ol { margin: 18px 0 0; padding: 0; list-style: none; }
.q-item { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.q-item.editing { background: #eff3f6; }
.question-select { flex: 1; padding: 13px 8px; background: transparent; border: 0; text-align: left; min-width: 0; color: var(--ink); }
.question-select>span { display: block; font-size: 14px; overflow-wrap: anywhere; }
.question-select>small { font-size: 11px; color: var(--muted); }
.order-controls { display: flex; gap: 4px; }
.order-controls button { border: 0; background: transparent; color: var(--muted); padding: 8px; min-width: 28px; }
.question-editor { max-width: 650px; }
.question-editor h2 { margin-bottom: 10px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.admin-preview { display: block; max-width: 100%; width: 100%; height: 230px; object-fit: contain; margin-top: 12px; }
.source-fields { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.source-fields summary { font-size: 14px; cursor: pointer; }
.checkbox-label { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 400; }
.checkbox-label input { width: 18px; height: 18px; min-height: 18px; margin: 0; }
.editor-actions { display: flex; gap: 12px; margin-top: 24px; }
.delete-confirm { margin-top: 18px; padding: 16px; border: 1px solid #d6b0ae; font-size: 13px; }
.delete-confirm .button { margin: 4px; }
@media (max-width: 700px) {
  main { padding: 22px 16px; }
  .site-header { padding: 15px 16px; gap: 12px; }
  .site-header .brand { font-size: 13px; }
  .site-header nav { gap: 12px; font-size: 12px; }
  .connection { font-size: 0; gap: 0; }
  .site-footer { padding: 20px 16px; font-size: 11px; }
  h1 { font-size: 25px; }
  .narrow { margin: 25px auto 40px; }
  .host-toolbar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .toolbar-buttons { gap: 10px 14px; }
  .lobby { margin-top: 10px; }
  .qr-block { gap: 18px; }
  .qr { width: 140px; height: 140px; }
  .game-code { font-size: 30px; }
  .qr-block p { font-size: 11px; }
  .question-top h1 { font-size: 21px; }
  .eyebrow { font-size: 11px; }
  .timer>span { font-size: 24px; }
  .image-example { --media-full: min(48svh, 470px); --media-small: 28svh; }
  .text-example { padding: 18px 0; --text-full: 21px; --text-small: 17px; }
  .origin-stamp { font-size: 12px; padding: 5px 10px; }
  .media-frame .origin-stamp { top: -12px; left: 0; }
  .answer-buttons { gap: 10px; }
  .answer-button { font-size: 14px; min-height: 65px; }
  .answer-area { margin-top: 20px; }
  .reveal-block>p { font-size: 14px; }
  .leaderboard-table th, .leaderboard-table td { padding: 12px 5px; }
  .leaderboard-table td:first-child { width: 40px; }
  .leaderboard-table { font-size: 13px; }
  .leaderboard-table small { font-size: 10px; }
  .screen-mode .qr { width: 170px; height: 170px; }
  .screen-mode .game-code { font-size: 35px; }
  .screen-mode .text-example { --text-full: 24px; --text-small: 19px; }
  .admin-header { flex-direction: column; gap: 0; }
  .admin-layout { grid-template-columns: 1fr; gap: 30px; }
  .question-list ol { max-height: 270px; overflow-y: auto; }
  .question-editor { border-top: 1px solid var(--line); padding-top: 24px; }
  .form-row { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none!important; animation: none!important; } }
@media print {
  .site-header, .site-footer, .host-toolbar, .toast, .no-print { display: none!important; }
  body { display: block; }
  main { max-width: none; padding: 0; }
  .print-page { break-after: page; }
  .print-page:last-child { break-after: auto; }
}
