/* Handy: „Festabend“ im Kleinen – Festtagskarten zum Anmelden und Antworten */
html, body { height: 100%; }
body {
  min-height: 100dvh; display: flex; flex-direction: column; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; user-select: none;
  background: radial-gradient(480px 300px at 50% 0, rgba(255, 214, 140, .14), transparent 75%), var(--texture), linear-gradient(180deg, color-mix(in srgb, var(--dark), #fff 4%), color-mix(in srgb, var(--dark), #000 30%));
}
.ph-top { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: max(14px, env(safe-area-inset-top)) 18px 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--dark), #000 30%), color-mix(in srgb, var(--surface), #000 10%)); border-bottom: 2px solid var(--gilt); }
.ph-top .lights { bottom: -26px; height: 34px; transform: scale(.8); transform-origin: top center; left: -12%; right: -12%; }
.ph-brand { font-size: 19px; }
.me { font-size: 15px; color: var(--muted); text-align: right; font-weight: 600; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me b { color: var(--text); }
#app { flex: 1; display: flex; flex-direction: column; padding: 34px 18px max(20px, env(safe-area-inset-bottom)); position: relative; z-index: 2; }
.center { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 10px; animation: pop .3s ease both; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
h1 { font-family: var(--display); font-size: 38px; font-weight: 800; margin: 0; line-height: 1.02; text-wrap: balance; }
h2 { font-size: 22px; font-weight: 700; margin: 0; }
p { color: var(--muted); margin: 0; font-size: 17px; line-height: 1.45; }
.kicker { font-family: var(--display); font-size: 22px; color: var(--gold); font-weight: 700; }

/* Anmeldung: Festtagskarte */
.join { display: flex; flex-direction: column; gap: 14px; max-width: 440px; width: 100%; margin: 14px auto 0; padding: 34px 24px 26px; }
.join .kicker { color: var(--primary); }
.join h1 { font-size: 36px; }
.join p { color: var(--ink-soft); }
.field label { display: block; font-size: 15px; font-weight: 700; color: var(--ink); margin: 0 0 6px 2px; }
.field label span { font-weight: 500; color: var(--ink-soft); }
.field input { width: 100%; padding: 15px 14px; font-size: 18px; border-radius: 10px; border: 2px solid #d9cdb4; background: #fff; color: var(--ink); outline: none; }
.field input::placeholder { color: #8a9096; }
.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .2); }
.btn { width: 100%; padding: 17px; border: 0; border-radius: 999px; background: var(--primary); color: #fff; font-size: 19px; font-weight: 700; margin-top: 6px; box-shadow: inset 0 -5px 0 rgba(0,0,0,.22); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0,0,0,.22); }
.btn:disabled { opacity: .5; }
.err { color: #b3001a; font-size: 15px; font-weight: 600; min-height: 18px; text-align: center; }
.small { font-size: 13px; color: var(--ink-soft); text-align: center; border-top: 1.5px solid color-mix(in srgb, var(--gilt), transparent 40%); padding-top: 12px; }

.status-card { background: rgba(0,0,0,.2); border: 1.5px solid color-mix(in srgb, var(--gilt), transparent 45%); border-radius: 14px; padding: 16px 18px; width: 100%; max-width: 420px; margin-top: 16px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.stat-grid > div + div { border-left: 1.5px solid color-mix(in srgb, var(--gilt), transparent 65%); }
.stat-grid b { display: block; font-family: var(--display); font-size: 36px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.05; }
.stat-grid span { font-size: 14px; color: var(--muted); font-weight: 600; }
.pulse { position: relative; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; margin: 24px 0 10px; font-size: 0;
  background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.45), transparent 24%), radial-gradient(circle, #e0102c, #9e0018 70%);
  box-shadow: 0 0 0 3px var(--gilt), 0 0 30px rgba(242,193,78,.35); animation: glow 2.4s ease-in-out infinite, swing 3s ease-in-out infinite; transform-origin: 50% -30px; }
.pulse::before { content: ''; position: absolute; left: 50%; top: 0; width: 20px; height: 10px; transform: translate(-50%, -85%); border-radius: 3px; background: linear-gradient(90deg, #8a6a24, #f3d98a 45%, #b8913c); }
.pulse::after { content: ''; position: absolute; left: 50%; top: 0; width: 2px; height: 26px; transform: translate(-50%, -130%); background: var(--gilt); }
@keyframes glow { 50% { box-shadow: 0 0 0 3px var(--gilt), 0 0 46px rgba(242,193,78,.6); } }
@keyframes swing { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
.count { font-family: var(--display); font-size: 150px; font-weight: 900; line-height: .9; color: var(--gold); text-shadow: 0 0 40px rgba(242,193,78,.4); }

/* Frage */
.q-top { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; color: var(--muted); font-size: 15px; margin-bottom: 8px; }
.q-top .tm { font-family: var(--display); font-size: 34px; color: var(--gold); font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; }
.q-bar { height: 8px; border-radius: 999px; background: rgba(0,0,0,.35); overflow: hidden; margin-bottom: 14px; }
.q-bar i { display: block; height: 100%; background: var(--gold); }
.q-text { font-size: 20px; font-weight: 700; line-height: 1.3; margin-bottom: 14px; }
.answers { flex: 1; display: grid; grid-template-rows: repeat(4, minmax(66px, 92px)); align-content: center; gap: 14px; min-height: 340px; width: 100%; max-width: 560px; margin: 0 auto; }
.answers.n2 { grid-template-rows: repeat(2, minmax(66px, 92px)); } .answers.n3 { grid-template-rows: repeat(3, minmax(66px, 92px)); }
.look { text-align: center; color: var(--muted); font-size: 16px; font-weight: 600; margin: 4px 0 0; }
.look b { color: var(--gold); }
/* Antwort: kleine Festtagskarte, der Buchstabe sitzt als farbiges Etikett innen am linken Rand */
.ans { --card: var(--paper); --ink-c: var(--ink); --tab: #a3132a; --tab-ink: var(--cream);
  position: relative; display: flex; align-items: center; gap: 16px; border: 0; border-radius: 18px; padding: 8px 18px 8px 8px; text-align: left; line-height: 1.15;
  background: var(--card); color: var(--ink-c); font-family: var(--display); font-size: 21px; font-weight: 700; touch-action: manipulation;
  box-shadow: inset 0 0 0 1.5px var(--gilt), inset 0 0 0 5px var(--card), inset 0 0 0 6px color-mix(in srgb, var(--gilt), transparent 45%), 0 8px 18px rgba(0,0,0,.35);
  transition: transform .08s, opacity .25s, filter .25s, background .2s; }
.ans .ltr { flex: none; align-self: stretch; width: 50px; min-height: 46px; border-radius: 11px 3px 3px 11px; display: grid; place-items: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tab), #fff 10%), color-mix(in srgb, var(--tab), #000 14%)); color: var(--tab-ink);
  font-family: var(--display); font-size: 24px; font-weight: 800; line-height: 1; box-shadow: 2px 0 0 var(--gilt), inset 0 1px 0 rgba(255,255,255,.22); }
.ans .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ans:nth-child(2) { --tab: #1d6b3a; }
.ans:nth-child(3) { --tab: #b8862a; --tab-ink: #2b1f19; }
.ans:nth-child(4) { --tab: #24427f; }
.ans.picked .ltr { --tab: var(--gold); --tab-ink: var(--velvet); }
.ans:active { transform: scale(.97); }
.ans:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.ans.dim { opacity: .35; filter: saturate(.4); }
/* eingeloggte Antwort: Samtrot mit Goldschein */
.ans.picked { --card: var(--velvet); --ink-c: var(--cream); box-shadow: inset 0 0 0 1.5px var(--gold), inset 0 0 0 5px var(--card), inset 0 0 0 6px color-mix(in srgb, var(--gold), transparent 35%), 0 0 26px rgba(242,193,78,.45); }
.pulse-ltr { font-family: var(--display); font-size: 46px; font-weight: 900; color: var(--gold); line-height: 1; }

/* Ergebnis: Festtagskarte mit Schleifenband */
.result { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 6px; margin: 10px 0 0; padding: 34px 22px 30px; animation: pop .3s both; }
.result .icon { font-size: 54px; line-height: 1; }
.result h1 { font-size: 46px; margin: 10px 0 12px; padding: 10px 30px 14px; border-radius: 999px; color: #fff !important; animation: stamp .45s .1s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes stamp { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
.result.ok h1 { background: linear-gradient(180deg, #2a9c4b, #17703a); box-shadow: 0 0 0 3px var(--gilt); } .result.bad h1 { background: linear-gradient(180deg, #d6001c, #9e0018); box-shadow: 0 0 0 3px var(--gilt); } .result.miss h1 { background: #8a7a6c; }
.result .pts { font-family: var(--display); font-size: 72px; font-weight: 900; line-height: 1; color: var(--ink); }
.result p { color: var(--ink-soft); }
.result p b { color: var(--ink); }
.result .sol { margin-top: 12px; padding: 12px 16px; border-top: 1.5px solid color-mix(in srgb, var(--gilt), transparent 40%); border-bottom: 1.5px solid color-mix(in srgb, var(--gilt), transparent 40%); font-weight: 700; color: var(--ink); font-size: 18px; }
.rank-big { font-family: var(--display); font-size: 120px; font-weight: 900; line-height: .9; color: var(--gold); }
.rank-big small { font-size: 40px; color: var(--muted); }
.conn { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: #a35a06; color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 700; z-index: 10; }
.wait { text-align: center; margin-top: 16px; }
