/* Fragen-App Nachmittagstalk – Jugendbibeltag 2026
   Farben, Schriften und Bausteine aus dem Designsystem „Jugendbibeltag 2026“. */

@font-face { font-family: 'Hanken Grotesk'; src: url(../fonts/hankengrotesk-variable-latin.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Bagel Fat One'; src: url(../fonts/bagelfatone-400-normal-latin.woff2) format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --jbt-yellow: #fff200;
  --jbt-ink: #111111;
  --jbt-white: #ffffff;
  --jbt-chat-bg: #e7ddd3;
  --jbt-bubble-out: #dcf8c6;
  --jbt-meta: #8696a0;
  --jbt-gray-100: #f4f2ef;
  --jbt-gray-200: #e6e2dc;
  --jbt-gray-300: #cfc9c0;
  --jbt-gray-500: #8a8378;
  --jbt-gray-700: #4a463f;
  --green-text: #1f7a3d;
  --radius-bubble: 18px;
  --radius-tail: 4px;
  --radius-card: 24px;
  --bw-strong: 2.5px;
  --shadow-bubble: 0 1px 1px rgba(17,17,17,0.10);
  --shadow-float: 0 8px 24px rgba(17,17,17,0.14);
  --shadow-pop: 0 14px 40px rgba(17,17,17,0.22);
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: 'Bagel Fat One', 'Hanken Grotesk', system-ui, sans-serif;
  --font-sans: 'Hanken Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font-sans); color: var(--jbt-ink); -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Bausteine ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 18px;
  font-family: var(--font-sans); font-size: 15px; font-weight: 700; line-height: 1;
  border: var(--bw-strong) solid var(--jbt-ink); border-radius: 999px;
  background: var(--jbt-white); color: var(--jbt-ink);
  cursor: pointer; text-decoration: none;
  transition: transform 120ms var(--ease-pop), background 120ms var(--ease-out);
}
.btn:active { transform: scale(0.96); }
.btn:focus-visible { outline: 3px solid var(--jbt-ink); outline-offset: 3px; }
.btn--primary { background: var(--jbt-yellow); }
.btn--primary:hover { background: #f2e600; }
.btn--dark { background: var(--jbt-ink); color: var(--jbt-white); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn svg { flex: none; }

.tab {
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: var(--bw-strong) solid var(--jbt-ink); background: var(--jbt-white); color: var(--jbt-ink);
  font-size: 14px; font-weight: 700; cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--jbt-ink); color: var(--jbt-white); }
.tab:focus-visible { outline: 3px solid var(--jbt-yellow); outline-offset: 2px; }

.bubble {
  position: relative; display: inline-block; max-width: 100%;
  padding: 9px 13px 8px; background: var(--jbt-white); color: var(--jbt-ink);
  border-radius: var(--radius-bubble); border-top-left-radius: var(--radius-tail);
  box-shadow: var(--shadow-bubble); line-height: 1.3; overflow-wrap: anywhere;
}
.bubble--mine { background: var(--jbt-bubble-out); }
.bubble__meta { display: block; margin-top: 4px; text-align: right; font-size: 12px; color: #5f6b73; font-weight: 500; }
.bubble__mine { display: block; font-size: 12px; font-weight: 700; color: var(--green-text); margin-bottom: 2px; }

.rank {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 999px;
  background: var(--jbt-white); border: 1px solid var(--jbt-gray-300); color: var(--jbt-gray-700);
  font-size: 14px; font-weight: 800;
}
.rank--top { background: var(--jbt-yellow); border: var(--bw-strong) solid var(--jbt-ink); color: var(--jbt-ink); }

.system-pill {
  align-self: center; max-width: 320px; text-align: center;
  background: var(--jbt-white); color: var(--jbt-gray-700); border-radius: 999px;
  padding: 6px 14px; font-size: 13px; font-weight: 600; line-height: 1.3; box-shadow: var(--shadow-bubble);
}

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; max-width: calc(100% - 32px);
  background: var(--jbt-ink); color: var(--jbt-white); border-radius: 999px;
  padding: 10px 20px; font-size: 15px; font-weight: 600; box-shadow: var(--shadow-pop);
  z-index: 50;
}
.toast[hidden] { display: none; }
.toast .btn { min-height: 40px; }

.wall { background-color: var(--jbt-chat-bg); background-image: url(../img/wallpaper.svg); background-size: 220px; }

/* ---------- Handy-Ansicht ---------- */
.phone { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--jbt-chat-bg); max-width: 640px; margin: 0 auto; }
.phone__head { position: sticky; top: 0; z-index: 10; background: var(--jbt-white); border-bottom: 1px solid var(--jbt-gray-300); }
.phone__title { display: flex; align-items: center; gap: 12px; padding: 12px 16px 8px; }
.phone__icon { width: 44px; height: 44px; flex: none; border-radius: 999px; background: var(--jbt-yellow); border: var(--bw-strong) solid var(--jbt-ink); display: flex; align-items: center; justify-content: center; }
.phone__title h1 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.15; }
.phone__title p { margin: 2px 0 0; font-size: 13px; color: var(--jbt-gray-700); }
.phone__tabs { display: flex; gap: 8px; align-items: center; padding: 4px 16px 10px; }
.phone__count { margin-left: auto; font-size: 13px; color: var(--jbt-gray-700); }
.phone__list { flex: 1 1 auto; padding: 14px 14px 24px; display: flex; flex-direction: column; gap: 14px; }
.q { display: flex; gap: 10px; align-items: flex-start; }
.q__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.q__text { font-size: 16px; }
.vote[aria-pressed="true"] { background: var(--jbt-yellow); }
.empty { text-align: center; color: var(--jbt-gray-700); font-size: 15px; padding: 24px 12px; }
.composer { position: sticky; bottom: 0; z-index: 10; background: var(--jbt-white); border-top: 1px solid var(--jbt-gray-300); padding: 12px 14px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.composer label { font-size: 14px; font-weight: 700; }
.composer__row { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea {
  flex: 1 1 auto; min-width: 0; min-height: 52px; max-height: 140px; resize: none;
  border: var(--bw-strong) solid var(--jbt-ink); border-radius: 22px; padding: 12px 16px;
  font-size: 16px; line-height: 1.3; background: var(--jbt-white);
}
.composer textarea:focus { outline: 3px solid var(--jbt-yellow); outline-offset: 1px; }
.composer .send { width: 52px; height: 52px; padding: 0; flex: none; }
.composer__hint { margin: 0; font-size: 12px; color: var(--jbt-gray-700); }
.composer__hint.is-error { color: #b42318; font-weight: 600; }

/* ---------- Admin-Ansicht ---------- */
.admin { min-height: 100vh; background: var(--jbt-gray-100); }
.admin__bar { background: var(--jbt-ink); color: var(--jbt-white); }
.admin__wrap { max-width: 1200px; margin: 0 auto; padding: 20px 32px; }
.admin__bar .admin__wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.admin__bar h1 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1; color: var(--jbt-yellow); }
.admin__bar .link { margin-left: auto; font-size: 15px; color: var(--jbt-gray-200); }
.admin__bar .link a { color: var(--jbt-white); font-weight: 700; }
.admin__bar .btn { min-height: 40px; }
.admin main { display: flex; flex-direction: column; gap: 24px; padding-top: 28px; padding-bottom: 48px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat { background: var(--jbt-white); border: var(--bw-strong) solid var(--jbt-ink); border-radius: var(--radius-card); padding: 18px 22px; display: flex; flex-direction: column; gap: 4px; }
.stat--accent { background: var(--jbt-yellow); }
.stat span:first-child { font-size: 14px; font-weight: 600; color: var(--jbt-gray-700); }
.stat--accent span:first-child { color: var(--jbt-ink); }
.stat strong { font-size: 40px; font-weight: 800; line-height: 1; }
.panel { background: var(--jbt-white); border: var(--bw-strong) solid var(--jbt-ink); border-radius: var(--radius-card); overflow: hidden; }
.panel__head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--jbt-gray-300); }
.panel__head h2 { margin: 0; font-size: 20px; font-weight: 800; }
.search { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: 0 1 320px; min-width: 200px; }
.search label { font-size: 14px; font-weight: 600; }
.search input { flex: 1 1 auto; min-width: 0; height: 44px; border: var(--bw-strong) solid var(--jbt-ink); border-radius: 999px; padding: 0 16px; font-size: 15px; background: var(--jbt-white); }
.search input:focus { outline: 3px solid var(--jbt-yellow); outline-offset: 1px; }
.table-box { overflow-x: auto; }
table.ranking { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 16px; }
.ranking th { text-align: left; color: var(--jbt-gray-700); font-size: 13px; text-transform: uppercase; letter-spacing: .02em; padding: 12px; }
.ranking th:first-child, .ranking td:first-child { padding-left: 22px; }
.ranking th:last-child, .ranking td:last-child { padding-right: 22px; text-align: right; }
.ranking td { padding: 12px; border-top: 1px solid var(--jbt-gray-200); vertical-align: middle; line-height: 1.35; }
.ranking tr.is-top td { background: #fffbe0; }
.ranking .qtext { font-weight: 600; overflow-wrap: anywhere; }
.badge { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px; background: var(--jbt-ink); color: var(--jbt-yellow); font-size: 12px; font-weight: 700; vertical-align: 2px; }
.votes { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.votes b { width: 34px; text-align: right; font-size: 18px; font-weight: 800; }
.votes .bar { flex: 1 1 auto; height: 10px; border-radius: 999px; background: var(--jbt-gray-200); overflow: hidden; }
.votes .bar i { display: block; height: 100%; border-radius: 999px; background: var(--jbt-ink); }
.ranking .time { color: var(--jbt-gray-700); font-size: 14px; white-space: nowrap; }
.panel__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 22px; border-top: 1px solid var(--jbt-gray-300); color: var(--jbt-gray-700); font-size: 14px; }
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login form { width: 100%; max-width: 380px; background: var(--jbt-white); border: var(--bw-strong) solid var(--jbt-ink); border-radius: var(--radius-card); padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-float); }
.login h1 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1; }
.login label { font-weight: 700; font-size: 14px; }
.login input { height: 48px; border: var(--bw-strong) solid var(--jbt-ink); border-radius: 999px; padding: 0 18px; font-size: 16px; }
.login input:focus { outline: 3px solid var(--jbt-yellow); outline-offset: 1px; }
.login .error { margin: 0; color: #b42318; font-weight: 600; font-size: 14px; }

/* ---------- Beamer-Ansicht ---------- */
html.beamer-page, html.beamer-page body { width: 100%; height: 100%; overflow: hidden; background: var(--jbt-ink); }
.stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; overflow: hidden; background: var(--jbt-ink); color: var(--jbt-white); transform-origin: 0 0; }
.stage__wall { position: absolute; inset: 0; background-image: url(../img/wallpaper.svg); background-size: 300px; opacity: .16; }
.stage__inner { position: relative; height: 100%; padding: 64px 72px 56px; display: flex; gap: 64px; }
.stage__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.stage__head { display: flex; align-items: flex-end; gap: 28px; }
.stage__head h1 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 96px; line-height: .9; color: var(--jbt-yellow); }
.stage__head p { margin: 0 0 8px; font-size: 30px; font-weight: 600; color: var(--jbt-gray-200); }
.top { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.top li { display: flex; align-items: center; gap: 24px; animation: pop 420ms var(--ease-pop) both; }
.top .num { flex: none; width: 76px; height: 76px; border-radius: 999px; background: var(--jbt-yellow); color: var(--jbt-ink); border: 3px solid var(--jbt-ink); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 40px; }
.top li:first-child .num { width: 96px; height: 96px; font-size: 54px; }
.top .bubble { flex: 1 1 auto; padding: 18px 26px; font-size: 36px; font-weight: 600; line-height: 1.2; border-top-left-radius: 8px; border-radius: 28px; border-bottom-left-radius: 8px; }
.top li:first-child .bubble { font-size: 42px; font-weight: 800; }
.top .count { flex: none; position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 12px 30px; background: var(--jbt-yellow); color: var(--jbt-ink); border: var(--bw-strong) solid var(--jbt-ink); border-radius: 999px; font-size: 34px; font-weight: 800; }
.top .count::after { content: ""; position: absolute; right: 18px; bottom: -9px; width: 16px; height: 16px; background: var(--jbt-yellow); border-right: var(--bw-strong) solid var(--jbt-ink); border-bottom: var(--bw-strong) solid var(--jbt-ink); clip-path: polygon(100% 0, 100% 100%, 0 0); }
.stage__empty { font-size: 40px; font-weight: 600; color: var(--jbt-gray-200); margin-top: 40px; }
.stage__more { margin: auto 0 0; font-size: 28px; font-weight: 600; color: var(--jbt-gray-200); }
.stage__side { flex: 0 0 440px; display: flex; flex-direction: column; gap: 28px; }
.qrcard { background: var(--jbt-white); color: var(--jbt-ink); border: var(--bw-strong) solid var(--jbt-ink); border-radius: var(--radius-card); padding: 32px; display: flex; flex-direction: column; align-items: center; gap: 18px; box-shadow: 0 14px 40px rgba(0,0,0,.35); text-align: center; }
.qrcard .qr { width: 300px; height: 300px; }
.qrcard .qr svg, .qrcard .qr img { width: 100%; height: 100%; display: block; }
.qrcard .big { margin: 0; font-size: 40px; font-weight: 800; line-height: 1.1; }
.qrcard .url { margin: 0; font-size: 26px; font-weight: 700; overflow-wrap: anywhere; }
.qrcard .small { margin: 0; font-size: 22px; color: var(--jbt-gray-700); }
.stage__lockup { width: 440px; height: auto; margin-top: auto; }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .top li { animation: none; } .btn { transition: none; } }
.top .bubble { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.phone ~ .toast { bottom: calc(170px + env(safe-area-inset-bottom)); }
