/* Handy-Ansicht – mobile first */
body { min-height: 100vh; min-height: 100dvh; overscroll-behavior-y: none; }
.topbar {
  position: sticky; top: 0; z-index: 50; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(10, 15, 36, 0.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-logo { height: 30px; max-width: 90px; object-fit: contain; }
.topbar-title { font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-badge {
  display: flex; align-items: center; gap: 8px; max-width: 55%; border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 6px 12px 6px 8px; font-weight: 700; font-size: 0.9rem; cursor: pointer; min-height: 40px;
}
.team-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); flex: none; box-shadow: 0 0 10px var(--mint); }
.team-badge.offline .dot { background: var(--amber); box-shadow: none; animation: pulse 1.2s infinite; }
.team-badge .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.app { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: 18px 16px calc(28px + env(safe-area-inset-bottom)); }
.screen { display: grid; gap: 16px; animation: screen-in 0.35s ease; }
@keyframes screen-in { from { opacity: 0; transform: translateY(12px); } }

.hero { padding: 26px 4px 6px; display: grid; gap: 10px; }
.hero h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
.hero .big-emoji { font-size: 3.2rem; line-height: 1; }
.lead { font-size: 1.05rem; color: var(--muted); }

.stepper { display: grid; grid-template-columns: 56px 1fr 56px; gap: 8px; align-items: center; }
.stepper button { min-height: 52px; border-radius: var(--radius-sm); border: 0; background: var(--surface-2); font-size: 1.5rem; font-weight: 700; cursor: pointer; }
.stepper output { text-align: center; font-size: 1.4rem; font-weight: 800; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.linkish { background: none; border: 0; color: var(--mint); font-weight: 600; text-decoration: underline; cursor: pointer; padding: 8px; min-height: 44px; }
.error-msg { color: #FF9FC4; font-weight: 600; font-size: 0.95rem; }

.code-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.code { font-size: 1.6rem; font-weight: 800; letter-spacing: 0.18em; color: var(--amber); }

/* Frage */
.q-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.q-text { font-size: clamp(1.35rem, 5.6vw, 1.75rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.q-img { width: 100%; border-radius: var(--radius-sm); background: var(--surface); max-height: 46vh; object-fit: contain; border: 1px solid var(--line); }
.progress-line { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; font-size: 0.92rem; }
.progress-bar { flex: 1; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.progress-bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--mint); transition: width 0.4s ease; }

.options { display: grid; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 12px 14px; text-align: left;
  border-radius: var(--radius-sm); border: 2px solid transparent; background: var(--surface); cursor: pointer;
  font-size: 1.08rem; font-weight: 600; transition: transform 0.1s, border-color 0.15s, background 0.15s; touch-action: manipulation;
}
.opt:active { transform: scale(0.98); }
.opt .letter { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #0A0F24; }
.opt[data-i="0"] .letter { background: var(--berry); color: #fff; }
.opt[data-i="1"] .letter { background: var(--mint); }
.opt[data-i="2"] .letter { background: var(--amber); }
.opt[data-i="3"] .letter { background: var(--violet); color: #fff; }
.opt[data-i="4"] .letter { background: #fff; }
.opt[data-i="5"] .letter { background: #FF7600; }
.opt.selected { border-color: var(--text); background: var(--surface-2); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08); }
.opt:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.opt.correct { border-color: var(--mint); background: rgba(0, 173, 187, 0.12); }
.opt.wrong { opacity: 0.5; }
.opt .count { margin-left: auto; color: var(--muted); font-weight: 700; }

.num-preview { min-height: 1.4em; color: var(--mint); font-weight: 700; padding-left: 4px; }
.num-preview.bad { color: #FF9FC4; }

.joker {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(247, 168, 27, 0.14), rgba(212, 19, 103, 0.1)); border: 2px solid rgba(247, 168, 27, 0.35); cursor: pointer;
}
.joker input { position: absolute; opacity: 0; pointer-events: none; }
.joker .j-icon { font-size: 1.9rem; flex: none; }
.joker .j-text { flex: 1; display: grid; }
.joker .j-text b { font-size: 1.02rem; }
.joker .j-text small { color: var(--muted); }
.switch { flex: none; width: 52px; height: 30px; border-radius: 999px; background: var(--surface-3); position: relative; transition: background 0.2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.joker.on { border-color: var(--amber); }
.joker.on .switch { background: var(--amber); }
.joker.on .switch::after { transform: translateX(22px); }
.joker:has(input:focus-visible) { outline: 3px solid var(--amber); outline-offset: 2px; }
.joker.used { opacity: 0.55; cursor: default; }

.submit-btn { min-height: 60px; font-size: 1.15rem; }

.timer-pill { font-variant-numeric: tabular-nums; }
.timer-pill.urgent { background: rgba(212, 19, 103, 0.22); color: #fff; animation: pulse 1s infinite; }
.lastchance {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--berry), #A20E4F); font-weight: 800; font-size: 1.1rem; box-shadow: 0 10px 30px rgba(212, 19, 103, 0.35);
}
.lastchance .lc-time { font-size: 1.8rem; font-variant-numeric: tabular-nums; }

.warn-box { padding: 14px 16px; border-radius: var(--radius-sm); background: rgba(247, 168, 27, 0.14); border: 2px solid var(--amber); display: grid; gap: 4px; }
.warn-box b { color: var(--amber); font-size: 1.05rem; }

.status-card { text-align: center; padding: 30px 20px; display: grid; gap: 10px; justify-items: center; }
.status-card .big { font-size: 3.4rem; line-height: 1; }
.status-card h2 { font-size: 1.7rem; }
.answer-echo { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 16px; font-weight: 700; font-size: 1.1rem; word-break: break-word; }

.result-card { text-align: center; padding: 28px 20px; display: grid; gap: 12px; justify-items: center; border-radius: var(--radius); }
.result-card.good { background: linear-gradient(160deg, rgba(0, 173, 187, 0.22), rgba(0, 173, 187, 0.05)); border: 1px solid rgba(0, 173, 187, 0.4); }
.result-card.bad { background: var(--surface); border: 1px solid var(--line); }
.result-card .pts { font-size: 3rem; font-weight: 900; letter-spacing: -0.03em; }
.result-card.good .pts { color: var(--mint); }
.solution { display: grid; gap: 4px; }
.solution .label { color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.solution .val { font-size: 1.5rem; font-weight: 800; color: var(--mint); }

.rank-hero { text-align: center; display: grid; gap: 6px; padding: 22px 10px; }
.rank-hero .rank { font-size: 4.4rem; font-weight: 900; letter-spacing: -0.04em; line-height: 1; background: linear-gradient(135deg, var(--amber), var(--berry)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mini-board { display: grid; gap: 6px; }
.mini-board .r { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--surface); }
.mini-board .r.me { background: var(--surface-2); outline: 2px solid var(--violet); }
.mini-board .r b { font-variant-numeric: tabular-nums; }
.mini-board .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

.pause-clock { font-size: 4rem; font-weight: 900; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; text-align: center; }

.reactions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.reactions button { min-height: 54px; font-size: 1.7rem; border-radius: var(--radius-sm); border: 0; background: var(--surface); cursor: pointer; touch-action: manipulation; transition: transform 0.1s; }
.reactions button:active { transform: scale(0.9); background: var(--surface-2); }
.reactions button.sent { animation: react-pop 0.5s ease; }
@keyframes react-pop { 40% { transform: scale(1.25); } }

.tips { display: grid; gap: 10px; }
.tip { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; color: var(--muted); font-size: 0.95rem; }
.tip span:first-child { font-size: 1.4rem; line-height: 1.1; }

.sheet { position: fixed; inset: 0; z-index: 200; background: rgba(3, 6, 16, 0.6); display: flex; align-items: flex-end; justify-content: center; backdrop-filter: blur(4px); }
.sheet-body { width: 100%; max-width: 560px; background: var(--surface); border-radius: 26px 26px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); display: grid; gap: 14px; animation: sheet-in 0.25s ease; }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }

.conn .conn-hint { display: block; font-weight: 500; font-size: 0.8rem; color: var(--muted); }
.conn { max-width: 92vw; border-radius: 18px; }

/* ================= Markenlook Rotaract Club Hamburg ================= */
.topbar { background: rgba(10, 15, 36, 0.78); }
.topbar-logo { height: 34px; }
.hero-logo { height: 132px; width: auto; max-width: 70%; object-fit: contain; filter: drop-shadow(0 10px 30px rgba(212, 19, 103, 0.3)); }
.hero h1 { font-size: clamp(2rem, 8.5vw, 2.8rem); }
.hero .accent { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.team-badge { background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)), var(--surface); }
.input { background: rgba(5, 8, 20, 0.6); border-color: rgba(255, 255, 255, 0.12); }
.input:focus { border-color: var(--sky); box-shadow: 0 0 0 4px rgba(0, 162, 224, 0.18); }

.opt { background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)), var(--surface); border: 2px solid rgba(255, 255, 255, 0.07); }
.opt .letter { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); }
.opt[data-i="1"] .letter { background: var(--royal); color: #fff; }
.opt[data-i="2"] .letter { background: var(--gold); color: #0A0F24; }
.opt[data-i="3"] .letter { background: var(--green); color: #fff; }
.opt[data-i="4"] .letter { background: var(--purple); color: #fff; }
.opt[data-i="5"] .letter { background: var(--orange); color: #0A0F24; }
.opt.selected { border-color: var(--berry); background: linear-gradient(90deg, rgba(212, 19, 103, 0.22), rgba(212, 19, 103, 0.06)), var(--surface); box-shadow: 0 0 0 4px rgba(212, 19, 103, 0.18); }
.opt.correct { border-color: var(--turquoise); background: linear-gradient(90deg, rgba(0, 173, 187, 0.22), rgba(0, 173, 187, 0.05)), var(--surface); }
@media (prefers-reduced-motion: no-preference) {
  .options .opt { animation: opt-in 0.45s cubic-bezier(.2,1.2,.4,1) both; }
  .options .opt:nth-child(1) { animation-delay: 0.05s; } .options .opt:nth-child(2) { animation-delay: 0.12s; }
  .options .opt:nth-child(3) { animation-delay: 0.19s; } .options .opt:nth-child(4) { animation-delay: 0.26s; }
  .options .opt:nth-child(5) { animation-delay: 0.33s; } .options .opt:nth-child(6) { animation-delay: 0.4s; }
  .q-text { animation: q-in 0.5s cubic-bezier(.2,.9,.2,1) both; }
  .result-card { animation: pop-in 0.6s cubic-bezier(.2,1.4,.4,1) both; }
}
@keyframes opt-in { from { opacity: 0; transform: translateY(16px) scale(0.97); } }
@keyframes q-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.9); } }

.progress-bar > i { background: var(--grad-brand); }
.joker { background: linear-gradient(135deg, rgba(247, 168, 27, 0.16), rgba(255, 118, 0, 0.08)); }
.joker.risk { border-color: rgba(212, 19, 103, 0.45); background: linear-gradient(135deg, rgba(212, 19, 103, 0.18), rgba(255, 118, 0, 0.08)); }
.joker.risk.on { border-color: var(--berry); }
.joker.risk.on .switch { background: var(--berry); }
.risk-rule { display: grid; gap: 6px; border-color: rgba(212, 19, 103, 0.4); background: linear-gradient(135deg, rgba(212, 19, 103, 0.16), rgba(255, 118, 0, 0.06)), var(--surface); }
.risk-rule b:first-child { color: #F77BB0; font-size: 1.05rem; }
.result-card.good { background: linear-gradient(160deg, rgba(0, 173, 187, 0.28), rgba(0, 103, 200, 0.12)); border-color: rgba(0, 173, 187, 0.45); }
.result-card .pts.minus { color: #F77BB0; }
.rank-hero .rank { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; }
.pause-clock { background: var(--grad-cool); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lastchance { background: linear-gradient(120deg, var(--berry), var(--orange)); }
.reactions button { background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)), var(--surface); }

/* ================= Aufgeräumter Look (Warten, Regeln, Reaktionen) ================= */
.lobby-hero { padding-top: 30px; justify-items: center; gap: 12px; }
.ready-badge { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px; border-radius: 999px; background: rgba(0, 173, 187, 0.13); color: var(--turquoise); font-weight: 700; font-size: 0.88rem; border: 1px solid rgba(0, 173, 187, 0.3); }
.ready-badge .pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--turquoise); }
@media (prefers-reduced-motion: no-preference) { .ready-badge .pulse { animation: ring 1.8s ease-out infinite; } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(0, 173, 187, 0.6); } 70%, 100% { box-shadow: 0 0 0 10px rgba(0, 173, 187, 0); } }
.lobby-hero h1 { font-size: clamp(2.2rem, 10vw, 3rem); background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; overflow-wrap: anywhere; padding-bottom: 4px; }
.rules { display: grid; gap: 10px; }
.rule { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; row-gap: 2px; align-items: center; padding: 14px 16px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)); border: 1px solid rgba(255, 255, 255, 0.07); }
.rule .ri { grid-row: span 2; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 1.35rem; background: rgba(255, 255, 255, 0.06); }
.rule b { font-size: 1rem; line-height: 1.2; }
.rule small { color: var(--muted); font-size: 0.86rem; line-height: 1.35; }
.code-card { padding: 16px 18px; }
.code-card small { font-size: 0.82rem; }
.react-bar { display: grid; gap: 8px; padding-top: 6px; }
.react-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 700; color: var(--faint); text-align: center; }
.react-bar .reactions { grid-template-columns: repeat(8, 1fr); gap: 6px; }
.react-bar .reactions button { min-height: 46px; font-size: 1.4rem; border-radius: 13px; border: 1px solid rgba(255, 255, 255, 0.06); }
@media (max-width: 360px) { .react-bar .reactions { grid-template-columns: repeat(4, 1fr); } }
.hero .lead { max-width: 30ch; }
.hero.center .lead { margin: 0 auto; }
