/* Handy-Layout: mobile-first, große Buttons, sichere Ränder */
body.phone { min-height: 100dvh; }
#app { min-height: 100dvh; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); }

.phone-top { display: flex; justify-content: space-between; align-items: center; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; font-size: 14px; color: var(--muted); }
.top-title { font-family: var(--font-display); font-weight: 900; color: var(--text); font-size: 16px; }
.phone-main { flex: 1; padding: 6px 16px 16px; display: flex; flex-direction: column; }
.phone-host { padding: 0 16px 16px; }

.card { background: var(--panel); border-radius: 20px; padding: 16px; margin-bottom: 12px; }
.card-title { font-weight: 800; margin-bottom: 10px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 10px; }

.btn { font-weight: 800; font-size: 16px; }
.btn-big { padding: 18px; font-size: 18px; border-radius: 18px; }
.btn-huge { padding: 34px; font-size: 30px; border-radius: 26px; }
.btn-primary { background: linear-gradient(135deg, #ffd23f, #ff8c42); color: #1a1033; box-shadow: 0 10px 30px rgba(255, 140, 66, 0.35); }
.btn-star { background: linear-gradient(135deg, #fff3b0, #ffd23f); color: #1a1033; }
.btn-danger { background: rgba(255, 77, 109, 0.25); color: #ffb3c1; }
.btn-correct { background: var(--green); color: #0d2a1a; }
.btn-wrong { background: var(--red); color: #fff; }
.btn-dim { opacity: 0.4; }
.btn-chosen { outline: 3px solid var(--accent); }

/* Beitritt */
.join { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 20px; text-align: center; animation: pop 0.4s ease; }
.join-title { font-family: var(--font-display); font-weight: 900; font-size: 34px; }
.join-sub { color: var(--muted); }
.join-photo { width: 180px; height: 180px; border-radius: 50%; background: var(--panel-strong); display: grid; place-items: center; overflow: hidden; border: 4px dashed var(--line); cursor: pointer; }
.join-photo img { width: 100%; height: 100%; object-fit: cover; }
.join-photo-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 800; color: var(--muted); }
.join-photo-icon { font-size: 44px; }
.join-name { text-align: center; font-size: 20px; font-weight: 700; }

/* Wiedereinstieg */
.claim { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 20px; text-align: center; }
.claim-list { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.claim-btn { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 16px; }
.claim-name { flex: 1; font-size: 18px; }
.claim-status { color: var(--muted); font-size: 12px; font-weight: 600; }
.claim-btn-online .claim-status { color: var(--green); }
.action-auto { font-size: 13px; opacity: 0.8; }

/* Lobby */
.card-me { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.card-me .row { width: 100%; margin-top: 6px; }
.me-name { font-weight: 900; font-size: 22px; }
.me-role { color: var(--muted); font-size: 14px; }
.team-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.team-btn { border: 3px solid var(--ring); background: transparent; }
.team-btn-active { background: var(--ring); color: #1a1033; }
.team-count { font-weight: 600; opacity: 0.8; }
.player-list { display: flex; flex-direction: column; gap: 8px; }
.player-item { display: flex; align-items: center; gap: 12px; }
.player-item-offline { opacity: 0.45; }
.player-item-name { font-weight: 700; flex: 1; }
.player-item-team { color: var(--muted); font-size: 13px; }
.lobby-info { text-align: center; color: var(--muted); font-size: 13px; }

/* Brett-Phase */
.board-phone { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-status { display: flex; align-items: center; gap: 14px; border: 3px solid var(--ring); }
.status-name { font-weight: 900; font-size: 18px; }
.status-stats { color: var(--muted); font-weight: 700; white-space: pre; }
.action { background: var(--panel); border-radius: 22px; padding: 22px 18px; text-align: center; display: flex; flex-direction: column; gap: 14px; animation: pop 0.3s ease; }
.action-waiting { opacity: 0.85; }
.action-title { font-weight: 900; font-size: 22px; }
.action-hint { color: var(--muted); font-size: 15px; line-height: 1.4; }
.big-number { font-family: var(--font-display); font-weight: 900; font-size: 64px; color: var(--accent); }
.round-info { text-align: center; color: var(--muted); font-size: 13px; margin-top: auto; }

/* Minigames */
.mg-phone { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.phone-main.enter .mg-phone { animation: pop 0.3s ease; }
.mg-phone-center { align-items: center; justify-content: center; text-align: center; }
.mg-phone-kind { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 800; text-align: center; }
.mg-phone-title { font-family: var(--font-display); font-weight: 900; font-size: 28px; text-align: center; }
.mg-phone-rules { font-size: 17px; line-height: 1.45; }
.mg-phone-props { margin-top: 8px; font-weight: 800; color: var(--accent); }
.countdown-number { font-family: var(--font-display); font-weight: 900; font-size: 120px; color: var(--accent); animation: pop 0.3s ease; }
.tap-count { font-family: var(--font-display); font-weight: 900; font-size: 72px; }
.tap-button { width: min(78vw, 320px); height: min(78vw, 320px); border-radius: 50%; font-family: var(--font-display); font-weight: 900; font-size: 44px; background: radial-gradient(circle at 35% 30%, #ffe27a, #ff8c42 70%); color: #1a1033; box-shadow: 0 20px 50px rgba(255, 140, 66, 0.45); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.tap-button:active { transform: scale(0.94); }
.tap-button-red { background: radial-gradient(circle at 35% 30%, #ff9fb3, #ff4d6d 70%); box-shadow: 0 20px 50px rgba(255, 77, 109, 0.45); }
.reaction-btn { width: 100%; flex: 1; min-height: 60vh; border-radius: 28px; font-family: var(--font-display); font-weight: 900; font-size: 40px; touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: background 0.05s; }
.reaction-btn-wait { background: var(--red); color: #fff; }
.reaction-btn-go { background: var(--green); color: #0d2a1a; }
.reaction-btn-done { background: var(--panel-strong); }
.reaction-btn-reveal { background: var(--panel); }
.quiz-phone-question { font-weight: 900; font-size: 20px; line-height: 1.3; text-align: center; }
.quiz-btn { display: flex; align-items: center; gap: 12px; text-align: left; }
.quiz-phone-letter { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 900; color: #1a1033; flex: none; }
.quiz-btn-0 .quiz-phone-letter { background: var(--red); }
.quiz-btn-1 .quiz-phone-letter { background: var(--blue); }
.quiz-btn-2 .quiz-phone-letter { background: var(--yellow); }
.quiz-btn-3 .quiz-phone-letter { background: var(--green); }
.stopwatch-phone { font-family: var(--font-display); font-weight: 900; font-size: 64px; font-variant-numeric: tabular-nums; }
.estimate-input { font-size: 28px; text-align: center; font-weight: 800; }
.simon-phone-pads { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: min(86vw, 360px); height: min(86vw, 360px); }
.simon-phone-pad { background: var(--pad); border-radius: 22px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); touch-action: manipulation; }
.simon-phone-pad:active { filter: brightness(1.3); }
.vote-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vote-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; font-weight: 800; }
.vote-btn-active { outline: 3px solid var(--accent); background: rgba(255, 210, 63, 0.18); }

/* Spielleiter */
.host-panel { background: rgba(255, 210, 63, 0.1); border: 2px solid rgba(255, 210, 63, 0.35); border-radius: 22px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.host-title { font-weight: 900; color: var(--accent); font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; }
.host-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.host-label { color: var(--muted); font-weight: 700; font-size: 14px; }
.seg { display: flex; gap: 4px; background: rgba(0, 0, 0, 0.3); border-radius: 12px; padding: 4px; }
.seg-btn { padding: 8px 12px; border-radius: 9px; background: transparent; font-weight: 800; font-size: 14px; }
.seg-active { background: var(--accent); color: #1a1033; }
.host-details { background: var(--panel); border-radius: 18px; padding: 10px 14px; }
.host-details summary { font-weight: 800; cursor: pointer; color: var(--accent); }
.host-details .host-panel { margin-top: 10px; border: none; background: transparent; padding: 0; }
.host-hint { color: var(--muted); font-size: 13px; line-height: 1.45; }
.link { background: none; border: none; color: var(--accent); font-weight: 700; cursor: pointer; padding: 6px; font-size: 14px; }
.join-host-link { align-self: center; opacity: 0.8; }
.join-code { text-align: center; letter-spacing: 0.2em; }
.pause-banner { position: fixed; left: 50%; top: 58px; transform: translate(-50%, -16px); background: var(--accent); color: #1a1033; font-weight: 900; padding: 10px 18px; border-radius: 999px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 40; }
.pause-banner-sichtbar { opacity: 1; transform: translate(-50%, 0); }
.claim-verwaist { margin-top: 14px; border: 2px solid rgba(255, 77, 109, 0.35); }
.mg-phone-bild { width: 100%; border-radius: 16px; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 10px; }
/* Die Listennamen koennen lang werden - dann untereinander statt gequetscht nebeneinander. */
.host-row-spalte { flex-direction: column; align-items: stretch; gap: 6px; }
.host-row-spalte select { width: 100%; padding: 10px 12px; border-radius: 12px; }
select { width: auto; padding: 8px 10px; border-radius: 10px; }

/* Nerven-Poker */
.hold-points { font-family: var(--font-display); font-weight: 900; font-size: 86px; font-variant-numeric: tabular-nums; color: var(--accent); line-height: 1; }
.hold-points-safe { color: var(--green); }
.hold-boom { font-size: 96px; }
.hold-burst .action-title { color: var(--red); }

/* Farbwort-Chaos */
.stroop-word { font-family: var(--font-display); font-weight: 900; font-size: 68px; letter-spacing: 0.04em; line-height: 1.1; }
.stroop-pads { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: min(86vw, 360px); height: min(60vw, 260px); }
.stroop-pad { background: var(--pad); border-radius: 22px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); touch-action: manipulation; }
.stroop-pad:active { filter: brightness(1.3); transform: scale(0.96); }

/* Achtung die Kurve – Lenkflaechen */
.curve-phone { justify-content: flex-end; }
.curve-pads { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; height: min(60vh, 420px); }
.curve-steer { background: rgba(255, 255, 255, 0.08); border: 3px solid rgba(255, 255, 255, 0.25); border-radius: 26px; font-family: var(--font-display); font-weight: 900; font-size: 72px; color: #fff; touch-action: none; user-select: none; -webkit-user-select: none; }
.curve-steer:active { background: var(--accent); color: #1a1033; transform: scale(0.97); }

/* Anleitung und Steuerungsvorschau auf dem Handy */
.guide-ziel-phone { font-size: 19px; font-weight: 900; margin-bottom: 10px; }
.guide-schritte-phone { margin: 0 0 10px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.guide-schritte-phone li { font-size: 15px; font-weight: 600; line-height: 1.4; }
.guide-schritte-phone li::marker { color: var(--accent); font-weight: 900; }
.guide-gewinnt-phone { font-size: 15px; font-weight: 800; color: var(--accent); }
.steuer-vorschau { display: flex; gap: 10px; justify-content: center; margin-top: 4px; }
.steuer-kachel { flex: 1; max-width: 130px; background: rgba(255, 255, 255, 0.07); border: 2px solid rgba(255, 255, 255, 0.16); border-radius: 16px; padding: 10px 6px; text-align: center; }
.steuer-bild { font-family: var(--font-display); font-weight: 900; font-size: 30px; line-height: 1.1; }
.steuer-text { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 4px; }

/* Haendler */
.shop-item { display: flex; align-items: center; gap: 12px; text-align: left; }
.shop-item-teuer { opacity: 0.45; }
.shop-emoji { font-size: 30px; flex: none; }
.shop-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.shop-name { font-weight: 900; font-size: 16px; }
.shop-kurz { font-size: 13px; font-weight: 600; color: var(--muted); white-space: normal; line-height: 1.3; }

/* Beutel mit gekauften Items */
.beutel { background: rgba(0, 194, 168, 0.1); border: 2px solid rgba(0, 194, 168, 0.35); border-radius: 18px; padding: 12px; }
.beutel-titel { font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.07em; color: #00c2a8; margin-bottom: 8px; }
.beutel-liste { display: flex; flex-direction: column; gap: 8px; }
.beutel-item { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; gap: 0 10px; align-items: center; background: rgba(255, 255, 255, 0.07); border: 2px solid rgba(255, 255, 255, 0.14); border-radius: 14px; padding: 10px; text-align: left; color: #fff; }
.beutel-item:active { background: rgba(0, 194, 168, 0.25); }
.beutel-item-aus { opacity: 0.5; }
.beutel-emoji { grid-row: 1 / 3; font-size: 26px; text-align: center; }
.beutel-name { font-weight: 900; font-size: 15px; }
.beutel-kurz { font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.3; }
