/* ============================================================
   screens.css — Screen-Layouts
   ============================================================ */

/* iOS: 16px verhindert Auto-Zoom auf Eingaben */
.input, .textarea, .select { font-size: 16px; }

/* ---------------- Layout-Container ---------------- */
#app-main { position: absolute; inset: 0; }
.view-container {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain;
}
.view {
  min-height: 100%;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 10px);
  will-change: transform, opacity;
}
.screen-body { padding: var(--sp-4) var(--sp-4) 0; }
.section-head { margin: var(--sp-6) 2px var(--sp-3); }
.section-head:first-child { margin-top: var(--sp-2); }
.section-head .overline { position: relative; padding-left: 12px; color: var(--ink-600); }
.section-head .overline::before { content: ""; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%); width: 4px; height: 13px; border-radius: 2px; background: var(--fando); }

/* ---------------- Loader ---------------- */
.app-loader {
  position: absolute; inset: 0; z-index: 200;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-5); background: var(--bg);
}
.loader-mark { display: flex; align-items: center; gap: var(--sp-3); }
.loader-logo {
  width: 52px; height: 61px; object-fit: contain;
  animation: scale-in 600ms var(--ease-spring) both, crown-float 3.8s var(--ease-in-out) 0.6s infinite;
}
.loader-words { display: flex; flex-direction: column; animation: fade-up var(--dur-4) var(--ease-out) 120ms both; }
.loader-word {
  font-size: var(--fs-2xl); font-weight: var(--fw-black); letter-spacing: var(--tracking-tight); line-height: 1;
}
.loader-tag {
  font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fando); margin-top: 3px;
}
.loader-bar { width: 132px; height: 4px; border-radius: 99px; background: var(--stone-200); overflow: hidden; }
.loader-bar span {
  display: block; height: 100%; width: 40%; border-radius: 99px; background: var(--fando);
  animation: loader-slide 1.1s var(--ease-in-out) infinite;
}
@keyframes loader-slide { 0% { transform: translateX(-120%); } 100% { transform: translateX(360%); } }

/* ---------------- Auth (immersives Hero + Karte) ---------------- */
#auth-root { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; }

.auth3 { min-height: 100%; display: flex; flex-direction: column; background: var(--surface); }

.auth3-hero {
  position: relative; overflow: hidden;
  padding: calc(var(--safe-top) + 32px) var(--sp-6) 54px;
  background: linear-gradient(150deg, #5aa233 0%, #43811f 60%, #356a1b 100%);
  color: #fff;
}
.auth3-hero::after { content: ""; position: absolute; right: -74px; top: -54px; width: 224px; height: 224px;
  border-radius: 50%; border: 36px solid rgba(255,255,255,0.07); }
.auth3-hero::before { content: ""; position: absolute; right: 62px; bottom: -34px; width: 120px; height: 120px;
  border-radius: 50%; border: 20px solid rgba(255,255,255,0.06); }
.auth3-brand { display: flex; align-items: center; gap: var(--sp-3); position: relative; z-index: 1; }
.auth3-logo { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(255,255,255,0.16); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); }
.auth3-logo img { width: 26px; height: 31px; object-fit: contain; }
.auth3-headline { font-size: var(--fs-3xl); font-weight: var(--fw-black); letter-spacing: var(--tracking-tight);
  line-height: 1.05; margin-top: 26px; position: relative; z-index: 1; }
.auth3-sub { color: rgba(255,255,255,0.84); margin-top: 8px; position: relative; z-index: 1; max-width: 300px; }

.auth3-card {
  flex: 1; background: var(--surface);
  border-radius: 26px 26px 0 0; margin-top: -24px; position: relative; z-index: 2;
  padding: var(--sp-5) var(--sp-5) calc(var(--sp-8) + var(--safe-bottom));
  box-shadow: 0 -12px 30px rgba(35,37,37,0.10);
}
.auth3-tabs { display: flex; gap: 4px; padding: 5px; margin-bottom: var(--sp-5);
  background: var(--bg-sunken); border-radius: var(--r-pill); }
.auth3-tabs button { flex: 1; height: 44px; border-radius: var(--r-pill);
  font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--text-muted);
  transition: background var(--dur-3) var(--ease-out), color var(--dur-3); }
.auth3-tabs button.active { background: var(--fando); color: #fff; box-shadow: var(--shadow-sm); }

.fields { display: flex; flex-direction: column; gap: var(--sp-4); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.photo-pick { display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-3); border: 1.5px dashed var(--border-strong); border-radius: var(--r-md); }
.photo-pick .avatar { --sz: 56px; }
.auth-error { display: none; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md);
  background: var(--danger-tint); color: var(--danger); font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.auth-error.show { display: flex; animation: fade-down var(--dur-2) var(--ease-out) both; }

/* ---------------- Header ---------------- */
.header-avatar { --sz: 38px; }

/* ---------------- Dashboard ---------------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl); padding: var(--sp-6);
  background: linear-gradient(150deg, #5aa233 0%, #43811f 60%, #356a1b 100%);
  color: #fff; box-shadow: 0 14px 30px rgba(53,106,27,0.26);
}
/* Billiardartige Ringe als ruhige Tiefe – bewusst KEIN Glow. */
.hero::after {
  content: ""; position: absolute; right: -64px; bottom: -84px; width: 216px; height: 216px;
  border-radius: 50%; border: 34px solid rgba(255,255,255,0.07); pointer-events: none;
}
.hero::before {
  content: ""; position: absolute; right: 34px; top: -36px; width: 118px; height: 118px;
  border-radius: 50%; border: 20px solid rgba(255,255,255,0.06); pointer-events: none;
}
.hero.to-next::after, .hero.to-next::before { display: none; }
.hero .overline.hero-ol { color: rgba(255,255,255,0.78); }

/* Form-Streifen (letzte Ergebnisse) in der Hero-Karte */
.hero-form { display: flex; align-items: center; gap: 6px; margin-top: 18px; position: relative; }
.form-pill { width: 22px; height: 6px; border-radius: 99px; background: rgba(255,255,255,0.28); }
.form-pill.w { background: #fff; }
.form-label { margin-left: 6px; font-size: var(--fs-2xs); color: rgba(255,255,255,0.72);
  text-transform: uppercase; letter-spacing: 0.09em; font-weight: var(--fw-bold); }

/* Fortschrittsbalken (außerhalb der dunklen Hero-Karte) */
.pbar { height: 7px; border-radius: 99px; background: var(--stone-200); overflow: hidden; margin-top: 8px; }
.pbar span { display: block; height: 100%; border-radius: 99px; background: var(--fando);
  transform-origin: left; animation: grow-bar var(--dur-5) var(--ease-out) both; }
.hero .hero-top { display: flex; justify-content: space-between; align-items: flex-start; }
.hero .rank-big { display: flex; align-items: baseline; gap: 6px; margin-top: var(--sp-2); }
.hero .rank-big .num { font-size: var(--fs-4xl); font-weight: var(--fw-black); line-height: 1; letter-spacing: -0.03em; }
.hero .rank-big .of { color: rgba(255,255,255,0.6); font-weight: var(--fw-semibold); }
.hero .hero-crown {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(160deg, #f2dfa8, #d8b45c); color: #6d5416;
}
.hero .hero-stats { display: flex; gap: var(--sp-5); margin-top: var(--sp-5); }
.hero .hero-stats { border-top: 1px solid rgba(255,255,255,0.16); padding-top: var(--sp-4); }
.hero .hero-stat .num { font-size: var(--fs-xl); font-weight: var(--fw-bold); }
.hero .hero-stat .lbl { font-size: var(--fs-xs); color: rgba(255,255,255,0.72); }
.hero .to-next { margin-top: var(--sp-5); }
.hero .bar { height: 7px; border-radius: 99px; background: rgba(255,255,255,0.14); overflow: hidden; margin-top: 8px; }
.hero .bar span { display: block; height: 100%; border-radius: 99px; background: var(--fando-300);
  transform-origin: left; animation: grow-bar var(--dur-5) var(--ease-out) both; }
@keyframes grow-bar { from { transform: scaleX(0); } }

.hero-medal { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(255,255,255,0.16); color: #fff; }
.hero-medal svg { width: 26px; height: 26px; }

.cta-row { display: flex; gap: 10px; margin-top: 16px; }
.cta-row .btn-outline { flex: none; width: 56px; padding: 0; background: var(--surface); }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); margin-top: var(--sp-4); }
.stat-tile {
  display: flex; flex-direction: column; gap: 3px; padding: var(--sp-4) var(--sp-3);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
}
.stat-tile.accent { background: var(--fando-tint); border-color: var(--fando-100); }
.stat-ic { width: 36px; height: 36px; border-radius: 11px; margin-bottom: 6px;
  background: var(--fando-tint); color: var(--fando); display: grid; place-items: center; }
.stat-ic .icon { width: 20px; height: 20px; }
.stat-val { font-size: var(--fs-2xl); font-weight: var(--fw-bold); line-height: 1.1; }
.stat-label { font-size: var(--fs-xs); color: var(--text-muted); font-weight: var(--fw-medium); }

.mini-card {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
}
.mini-list { display: flex; flex-direction: column; gap: var(--sp-2); }

/* Spielergebnis-Zeile (Historie) */
.result-row {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-md);
}
.result-badge {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
  font-weight: var(--fw-bold); font-size: var(--fs-sm);
}
.result-badge.win { background: var(--fando-100); color: var(--fando-700); }
.result-badge.loss { background: var(--stone-100); color: var(--text-muted); }
.result-score { font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }

/* Aktivitäts-Feed */
.activity-item { display: flex; gap: var(--sp-3); padding: var(--sp-3) 2px; }
.activity-dot {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--stone-100); color: var(--text-muted);
}
.activity-dot.green { background: var(--fando-100); color: var(--fando-700); }
.activity-dot.gold { background: var(--gold-soft); color: #8a6d1f; }

/* ---------------- Ranglisten-Zeilen (geteilt) ---------------- */
.player-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.player-row {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-md);
  transition: transform var(--dur-3) var(--ease-out), box-shadow var(--dur-2), background var(--dur-3);
}
.player-row.is-me { border-color: var(--fando-300); background: var(--fando-tint); box-shadow: var(--shadow-xs); }
.player-row.is-banned { opacity: 0.62; }
.rank-badge {
  width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center;
  font-weight: var(--fw-bold); font-size: var(--fs-md); color: var(--text-muted); background: var(--stone-100);
  font-variant-numeric: tabular-nums;
}
.rank-badge.r1 { background: linear-gradient(160deg, #f2dfa8, #d8b45c); color: #6d5416; }
.rank-badge.r2 { background: #e4e5e7; color: #6a6c6e; }
.rank-badge.r3 { background: #eaddcf; color: #93733f; }
.pr-avatar { position: relative; flex: none; }
.pr-name { font-weight: var(--fw-semibold); font-size: var(--fs-md); }
.pr-meta { margin-top: 1px; }
.pr-points { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.pr-points .num { font-size: var(--fs-lg); font-weight: var(--fw-bold); }
.pts-label { font-size: 10px; color: var(--text-subtle); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: .05em; }
.crown-badge.on-avatar { position: absolute; top: -8px; right: -6px; width: 22px; height: 22px; border: 2px solid var(--surface); }
.crown-badge.on-avatar .icon { width: 13px; height: 13px; }
.delta { display: inline-flex; align-items: center; gap: 1px; font-size: var(--fs-xs); font-weight: var(--fw-bold); }
.delta.up { color: var(--fando); } .delta.down { color: var(--danger); }
.delta .icon { width: 14px; height: 14px; }

/* Podium (Top 3) */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: var(--sp-2); margin: var(--sp-3) 0 var(--sp-5); }
.podium-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.podium-stand {
  width: 100%; border-radius: var(--r-md) var(--r-md) 0 0; display: flex; align-items: flex-start; justify-content: center;
  padding-top: 8px; font-weight: var(--fw-black); color: #fff; font-variant-numeric: tabular-nums;
}
.podium-col.p1 .podium-stand { height: 74px; background: linear-gradient(160deg, #e6c874, #cfa94e); color: #5c4715; }
.podium-col.p2 .podium-stand { height: 56px; background: linear-gradient(160deg, #d9dade, #b7b9bd); color: #4c4e50; }
.podium-col.p3 .podium-stand { height: 44px; background: linear-gradient(160deg, #e2c9ac, #c99f6f); color: #5a4529; }
.podium .avatar { --sz: 56px; box-shadow: var(--shadow-sm); }
.podium-col.p1 .avatar { --sz: 66px; }
.podium-name { font-size: var(--fs-sm); font-weight: var(--fw-semibold); max-width: 92px; text-align: center; }
.podium-pts { font-size: var(--fs-xs); color: var(--text-muted); }
.podium-crown { color: var(--gold); animation: crown-float 3.4s var(--ease-in-out) infinite;
  filter: drop-shadow(0 2px 2px rgba(138,109,31,0.35)); }
.podium-crown svg { width: 28px; height: 28px; }
.podium-spacer { height: 28px; display: block; }
.podium-stand { box-shadow: 0 10px 20px rgba(35,37,37,0.13), inset 0 1px 0 rgba(255,255,255,0.4); }
.podium.n1 { max-width: 200px; margin-inline: auto; }
.podium.n2 { max-width: 320px; margin-inline: auto; }
.podium.n1 .podium-col.p1 .podium-stand,
.podium.n2 .podium-col.p1 .podium-stand { height: 68px; }

/* ---------------- Herausfordern ---------------- */
.rule-note {
  display: flex; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); color: var(--text-muted);
}
.rule-note .icon { color: var(--fando); flex: none; }
.challenge-row .pr-points { display: none; }
.chip-crown { background: var(--gold-soft); color: #8a6d1f; }

/* Modus-Auswahl im Sheet */
.mode-options { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-4); }
.mode-option {
  display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4);
  border: 1.5px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface);
  transition: border-color var(--dur-2), background var(--dur-2), transform var(--dur-1);
}
.mode-option[aria-checked="true"] { border-color: var(--fando); background: var(--fando-tint); }
.mode-option:active { transform: scale(0.99); }
.mode-ball {
  position: relative; width: 42px; height: 42px; border-radius: 50%; flex: none; overflow: hidden;
  display: grid; place-items: center;
  background: radial-gradient(circle at 34% 27%, rgba(255,255,255,0.30), transparent 44%), var(--ball, #1c1d1d);
  box-shadow: 0 3px 8px rgba(35,37,37,0.22);
}
.mode-ball i {
  font-style: normal; width: 56%; height: 56%; border-radius: 50%;
  background: #fff; color: #26282a; display: grid; place-items: center;
  font-weight: var(--fw-black); font-size: 13px; line-height: 1;
}
.mode-ball.m8  { --ball: #1c1d1d; }
.mode-ball.m9  { --ball: #e3a419; }
.mode-ball.m10 { --ball: #2f6fce; }
.mode-ball.sm { width: 24px; height: 24px; box-shadow: 0 1px 3px rgba(35,37,37,0.2); }
.mode-ball.sm i { width: 60%; height: 60%; font-size: 9px; }
.mode-chip { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.mode-check { color: var(--fando); opacity: 0; transform: scale(.6); transition: opacity var(--dur-2), transform var(--dur-2) var(--ease-spring); }
.mode-option[aria-checked="true"] .mode-check { opacity: 1; transform: scale(1); }

/* ---------------- Herausforderungen ---------------- */
.tab-bar { position: sticky; top: calc(var(--header-h) + var(--safe-top)); z-index: 5; padding: var(--sp-2) var(--sp-4) var(--sp-3); background: var(--bg); }
.request-card {
  position: relative; overflow: hidden;
  padding: var(--sp-4); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-xs);
}
.request-card.incoming { border-left: 3px solid var(--fando); }
.request-card.crown-stake { border-left: 3px solid var(--gold); }
.request-top { display: flex; align-items: center; gap: var(--sp-3); }
.request-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin-top: var(--sp-4); }
.countdown-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px;
  background: var(--stone-100); color: var(--text-muted); font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
}
.countdown-pill.urgent { background: var(--danger-tint); color: var(--danger); }
.countdown-pill .icon { width: 13px; height: 13px; }
.status-tag { font-size: var(--fs-xs); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: .05em; }

/* ---------------- Challenge-Detail ---------------- */
.detail-vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--sp-3); margin: var(--sp-5) 0; }
.detail-player { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.detail-player .avatar { --sz: 74px; box-shadow: var(--shadow-sm); }
.vs-badge { font-size: var(--fs-xl); font-weight: var(--fw-black); color: var(--stone-400); }
.detail-meta { display: flex; flex-direction: column; gap: var(--sp-3); }

/* ---------------- Scorer / Scoreboard ---------------- */
.scorer { position: fixed; inset: 0; z-index: var(--z-overlay); background: var(--ink-900); color: var(--offwhite); display: flex; flex-direction: column; overscroll-behavior: none; }
.scorer-top {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: calc(var(--safe-top) + 10px) var(--sp-4) var(--sp-3);
}
.scorer-top .icon-btn { color: var(--offwhite); }
.scorer-timer { display: inline-flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; font-weight: var(--fw-bold); font-size: var(--fs-lg); }
.scorer-mode { font-size: var(--fs-xs); color: var(--stone-400); font-weight: var(--fw-semibold); letter-spacing: .05em; text-transform: uppercase; }
.scorer-live { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--fando-300); font-weight: var(--fw-bold); }
.scorer-live .badge-dot { background: var(--fando-300); animation: pulse-dot 1.4s ease infinite; }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.board { flex: 1; display: grid; grid-template-rows: 1fr 1fr; gap: 2px; min-height: 0; }
.board-side {
  position: relative; display: flex; flex-direction: column; align-items: center;
  gap: var(--sp-3); padding: clamp(10px, 2.4vh, 22px) var(--sp-4); background: var(--ink-800);
  overflow: hidden; min-height: 0;
}
.board-side.win-target { transition: background var(--dur-3); }
.side-player { display: flex; align-items: center; gap: var(--sp-3); }
.side-player .avatar { --sz: 36px; }
.side-name { font-weight: var(--fw-bold); font-size: var(--fs-lg); }
.board-score {
  flex: 1; min-height: 0; width: 100%; display: grid; place-items: center;
  font-size: clamp(72px, 22vh, 190px); font-weight: var(--fw-black); line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: -0.04em;
  cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation;
  transition: transform var(--dur-1) var(--ease-standard);
  -webkit-tap-highlight-color: transparent;
}
.board-score:active { transform: scale(0.93); }
.board-controls { display: flex; align-items: center; gap: var(--sp-4); }
.score-btn {
  width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,0.08); color: var(--offwhite); border: 1.5px solid rgba(255,255,255,0.14);
  transition: transform var(--dur-1), background var(--dur-2);
}
.score-btn:active { transform: scale(0.9); background: rgba(255,255,255,0.16); }
.score-btn.plus { background: var(--fando); border-color: var(--fando); }
.score-btn.plus:active { background: var(--fando-600); }
.score-btn .icon { width: 34px; height: 34px; }
.race-dots { display: flex; gap: 6px; }
.race-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.18); transition: background var(--dur-2), transform var(--dur-2); }
.race-dot.on { background: var(--fando-300); transform: scale(1.15); }
.board-side.crown-side::before { content: ""; position: absolute; top: 10px; right: 12px; }

/* Finish-Overlay */
.scorer-finish { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center;
  background: rgba(20,21,21,0.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation: fade-in var(--dur-3) ease both; padding: var(--sp-6); }
.scorer-finish-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  animation: modal-in var(--dur-4) var(--ease-out) both; }
.finish-crown { width: 84px; height: 84px; border-radius: 24px; display: grid; place-items: center; margin-bottom: 10px;
  background: linear-gradient(160deg, #f2dfa8, #d8b45c); color: #6d5416; box-shadow: var(--shadow-lg);
  animation: crown-land 900ms var(--ease-spring) both; }
.finish-crown svg { width: 48px; height: 48px; }
.scorer-finish h2 { font-size: var(--fs-2xl); font-weight: var(--fw-black); }
.finish-score { font-size: var(--fs-4xl); font-weight: var(--fw-black); color: var(--fando-300); margin-top: 6px; font-variant-numeric: tabular-nums; }
.scorer-finish .btn-ghost { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.22); }

/* Querformat: zwei Spalten nebeneinander, füllt den ganzen Bildschirm */
@media (orientation: landscape) {
  .board { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .board-score { font-size: clamp(64px, 30vh, 150px); }
  .board-side { padding: 10px var(--sp-5) 14px; gap: var(--sp-2); }
  .scorer-top { padding-top: calc(var(--safe-top) + 6px); padding-bottom: 6px; }
  .score-btn { width: 60px; height: 60px; }
  .score-btn .icon { width: 28px; height: 28px; }
}

/* ---------------- Profil ---------------- */
.profile-hero { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); padding: var(--sp-6) 0 var(--sp-4); }
.profile-hero .avatar { --sz: 104px; box-shadow: var(--shadow-md); }
.profile-photo-btn {
  position: absolute; bottom: -2px; right: -2px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--fando); color: #fff; display: grid; place-items: center; border: 3px solid var(--bg);
}
.profile-name { font-size: var(--fs-2xl); font-weight: var(--fw-black); }
.list-group { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.list-item { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); border-bottom: 1px solid var(--divider); transition: background var(--dur-2); text-align: left; width: 100%; }
.list-item:last-child { border-bottom: none; }
.list-item:active { background: var(--stone-100); }
.list-item .li-ic { color: var(--text-muted); flex: none; }
.list-item .li-label { flex: 1; font-weight: var(--fw-medium); }
.list-item .li-value { color: var(--text-muted); font-size: var(--fs-sm); }
.list-item.danger .li-ic, .list-item.danger .li-label { color: var(--danger); }
.list-item .chev { color: var(--stone-400); }

/* ---------------- Admin ---------------- */
.admin-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; background: var(--ink-700); color: var(--offwhite); font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: .06em; text-transform: uppercase; }
.admin-nav { display: flex; gap: var(--sp-2); overflow-x: auto; padding: var(--sp-2) var(--sp-4); scrollbar-width: none; }
.admin-nav::-webkit-scrollbar { display: none; }
.admin-tab { flex: none; height: 36px; padding: 0 var(--sp-4); border-radius: 99px; background: var(--stone-100); color: var(--text-muted); font-size: var(--fs-sm); font-weight: var(--fw-semibold); white-space: nowrap; transition: background var(--dur-2), color var(--dur-2); }
.admin-tab.active { background: var(--anthracite); color: var(--offwhite); }
.admin-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
.data-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); }
.data-row .row-actions { display: flex; gap: 4px; }
.mini-btn { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--stone-100); color: var(--text-muted); transition: background var(--dur-2), color var(--dur-2); }
.mini-btn:active { transform: scale(0.92); }
.mini-btn.danger { color: var(--danger); background: var(--danger-tint); }
.search-bar { position: relative; margin-bottom: var(--sp-3); }
.search-bar .input { padding-left: 44px; }
.search-bar .lead { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--stone-500); }
.log-row { display: flex; gap: var(--sp-3); padding: var(--sp-3) 2px; border-bottom: 1px solid var(--divider); font-size: var(--fs-sm); }

/* ---------------- Kronen-Inszenierung ---------------- */
.crown-stage {
  position: absolute; inset: 0; z-index: var(--z-celebrate); display: grid; place-items: center;
  background: rgba(18,19,19,0.55); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  animation: fade-in var(--dur-3) ease both;
}
.crown-stage.leaving { animation: fade-in var(--dur-3) ease reverse both; }
.crown-stage-inner { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.crown-ring { position: absolute; top: -6px; width: 132px; height: 132px; border-radius: 50%; border: 3px solid var(--gold); }
.crown-ring.r1 { animation: ring-expand 1.6s var(--ease-out) 0.1s forwards; }
.crown-ring.r2 { animation: ring-expand 1.6s var(--ease-out) 0.45s forwards; }
.crown-big {
  width: 128px; height: 128px; border-radius: 34px; display: grid; place-items: center;
  background: linear-gradient(160deg, #f6e6b6, #d8b45c); color: #6d5416; box-shadow: var(--shadow-xl);
  animation: crown-land 1s var(--ease-spring) both;
}
.crown-big svg { width: 72px; height: 72px; }
.crown-title { margin-top: 18px; color: #fff; font-weight: var(--fw-black); font-size: var(--fs-2xl);
  letter-spacing: var(--tracking-tight); animation: fade-up var(--dur-4) var(--ease-out) 0.24s both; }
.crown-name { color: var(--gold-soft); font-weight: var(--fw-semibold); margin-top: 2px;
  animation: fade-up var(--dur-4) var(--ease-out) 0.36s both; }

/* ---------------- Tutorial / Einführung ---------------- */
.tut {
  position: absolute; inset: 0; z-index: var(--z-modal);
  display: flex; flex-direction: column;
  background: radial-gradient(120% 46% at 50% 0, var(--fando-100), transparent 55%), var(--bg);
  padding-top: var(--safe-top); animation: fade-in var(--dur-3) ease both;
}
.tut.leaving { animation: fade-in var(--dur-2) ease reverse both; }
.tut-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; }
.tut-count { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-muted); }
.tut-stage { flex: 1; display: grid; place-items: center; padding: 4px 24px; overflow: hidden; }
.tut-slide { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 26px;
  width: 100%; max-width: 340px; animation: slide-in-right var(--dur-4) var(--ease-out) both; }
.tut-slide.back { animation: slide-in-left var(--dur-4) var(--ease-out) both; }
.tut-copy { display: flex; flex-direction: column; }
.tut-title { font-size: var(--fs-2xl); font-weight: var(--fw-black); letter-spacing: var(--tracking-tight); line-height: 1.15; }
.tut-text { color: var(--text-muted); margin-top: 10px; font-size: var(--fs-lg); line-height: 1.5; }
.tut-nav { padding: 12px 20px calc(20px + var(--safe-bottom)); }

/* --- Szenen --- */
.tscene { width: 100%; max-width: 300px; height: 204px; border-radius: 26px; position: relative;
  display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255,255,255,0.5); }
.tscene.green { background: linear-gradient(155deg, #e9f4e1, #d3ead0); }
.tscene.gold  { background: linear-gradient(155deg, #f7eccf, #efdcab); }

/* Welcome — klare, professionelle Marken-Szene */
.welcome-hero {
  height: 236px; max-width: 322px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: linear-gradient(155deg, #57a02f 0%, #40801f 55%, #34691a 100%);
}
.welcome-hero::after {
  content: ""; position: absolute; right: -56px; bottom: -78px; width: 190px; height: 190px;
  border-radius: 50%; border: 30px solid rgba(255,255,255,0.06); pointer-events: none;
}
.welcome-hero::before {
  content: ""; position: absolute; left: -46px; top: -46px; width: 120px; height: 120px;
  border-radius: 50%; border: 18px solid rgba(255,255,255,0.05); pointer-events: none;
}
.wh-palm { position: relative; z-index: 2; width: 76px; height: 90px; object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(20,50,10,0.32));
  animation: scale-in 700ms var(--ease-spring) both, crown-float 4.4s var(--ease-in-out) 1s infinite; }
.wh-word { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center;
  animation: fade-up var(--dur-4) var(--ease-out) 0.22s both; }
.wh-name { color: #fff; font-weight: var(--fw-black); font-size: var(--fs-xl); letter-spacing: var(--tracking-tight); }
.wh-sub { color: rgba(255,255,255,0.82); font-weight: var(--fw-bold); font-size: var(--fs-2xs);
  letter-spacing: 0.24em; text-transform: uppercase; margin-top: 3px; }

/* Punkte */
.tp { flex-direction: column; gap: 12px; }
.tp-card { display: flex; align-items: center; gap: 12px; width: 182px; background: #fff; border-radius: 16px;
  padding: 12px 16px; box-shadow: var(--shadow-sm); animation: pop-in 0.5s var(--ease-spring) both; }
.tp-card.win { animation-delay: 0.1s; } .tp-card.loss { animation-delay: 0.28s; }
.tp-badge { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: var(--fw-black); font-size: 14px; flex: none; }
.tp-card.win .tp-badge { background: var(--fando-100); color: var(--fando-700); }
.tp-card.loss .tp-badge { background: var(--stone-100); color: var(--text-muted); }
.tp-pts { font-size: var(--fs-xl); font-weight: var(--fw-black); line-height: 1; }
.tp-card.win .tp-pts { color: var(--fando); }
.tp-lbl { font-size: var(--fs-2xs); color: var(--text-muted); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: 0.05em; }

/* Krone (Hüpf-Animation) */
.tc-duo { position: relative; display: flex; align-items: center; gap: 56px; }
.tc-duo .avatar { --sz: 62px; box-shadow: var(--shadow-sm); }
.tc-hop { position: absolute; top: -36px; left: 18px; color: var(--gold); animation: tc-hop 3.4s var(--ease-in-out) infinite; }
.tc-hop svg { width: 34px; height: 34px; filter: drop-shadow(0 2px 2px rgba(138,109,31,0.35)); }
@keyframes tc-hop {
  0%,12% { transform: translate(0,0) rotate(-6deg); }
  30% { transform: translate(59px,-24px) rotate(0deg); }
  48%,60% { transform: translate(118px,0) rotate(6deg); }
  78% { transform: translate(59px,-24px) rotate(0deg); }
  96%,100% { transform: translate(0,0) rotate(-6deg); }
}

/* Herausfordern */
.tch { flex-direction: column; gap: 22px; }
.tch-vs { display: flex; align-items: center; gap: 16px; }
.tch-vs .avatar { --sz: 58px; box-shadow: var(--shadow-sm); animation: pop-in 0.5s var(--ease-spring) both; }
.tch-vs .avatar:last-child { animation-delay: 0.14s; }
.tch-badge { font-weight: var(--fw-black); color: var(--stone-500); font-size: var(--fs-lg); }
.tch-balls { display: flex; gap: 12px; }
.tch-balls .mode-ball { animation: pop-in 0.5s var(--ease-spring) both; }
.tch-balls .mode-ball:nth-child(1) { animation-delay: 0.3s; }
.tch-balls .mode-ball:nth-child(2) { animation-delay: 0.42s; }
.tch-balls .mode-ball:nth-child(3) { animation-delay: 0.54s; }

/* Anfragen */
.tr { flex-direction: column; gap: 14px; padding: 0 20px; }
.tr-card { display: flex; align-items: center; gap: 10px; width: 100%; background: #fff; border-radius: 16px;
  padding: 12px; box-shadow: var(--shadow-sm); border-left: 3px solid var(--fando); animation: pop-in 0.5s var(--ease-spring) both; }
.tr-card .avatar { --sz: 40px; }
.tr-cd { font-size: var(--fs-2xs); font-weight: var(--fw-bold); color: var(--fando-700); background: var(--fando-100);
  padding: 4px 8px; border-radius: 99px; font-variant-numeric: tabular-nums; flex: none; }
.tr-actions { display: flex; gap: 12px; animation: pop-in 0.5s var(--ease-spring) 0.18s both; }
.tr-btn { width: 46px; height: 38px; border-radius: 12px; display: grid; place-items: center; }
.tr-btn.no { background: var(--stone-100); color: var(--text-muted); }
.tr-btn.yes { background: var(--fando); color: #fff; }

/* Scorer (interaktiv) */
.ts { flex-direction: column; gap: 16px; }
.ts-board { display: flex; align-items: flex-start; gap: 20px; }
.ts-side { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ts-name { font-size: var(--fs-2xs); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.ts-score { font-size: 44px; font-weight: var(--fw-black); line-height: 1; font-variant-numeric: tabular-nums; color: var(--anthracite); }
.ts-plus { width: 44px; height: 44px; border-radius: 50%; background: var(--fando); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.ts-plus svg { width: 24px; height: 24px; }
.ts-vs { font-size: var(--fs-xl); font-weight: var(--fw-black); color: var(--stone-400); margin-top: 26px; }
.ts-hint { font-size: var(--fs-sm); color: var(--text-muted); font-weight: var(--fw-semibold); max-width: 250px; transition: color var(--dur-2); }
.tut-dots { display: flex; justify-content: center; gap: 8px; margin-bottom: 18px; }
.tut-dot { width: 8px; height: 8px; border-radius: 99px; background: var(--stone-300); cursor: pointer;
  transition: width var(--dur-3) var(--ease-out), background var(--dur-3) var(--ease-out); }
.tut-dot.on { width: 26px; background: var(--fando); }
.tut-actions { display: flex; gap: 12px; align-items: center; }

/* ---------------- Utility ---------------- */
.dialog-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--fando-tint); color: var(--fando); flex: none; }
.dialog-ic.danger { background: var(--danger-tint); color: var(--danger); }
.fab-space { height: 80px; }
