/* Styles nur für die Übersichtsseite (Hub) */
.wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: calc(24px + env(safe-area-inset-top)) 16px calc(40px + env(safe-area-inset-bottom));
}

.hub-head { text-align: center; margin-bottom: 22px; }
.kicker.edition {
  margin-top: 2px;
  letter-spacing: .3em;
  color: var(--pink);
}
.hub-head h1 {
  background: linear-gradient(180deg, #ffd97a, #e8657f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .4));
}

.hidden { display: none !important; }
.small { font-size: 12.5px; }

.card {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 18px;
}
.card h2 { font-size: 17px; text-transform: uppercase; letter-spacing: .08em; }
.sec-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--muted);
  margin: 22px 0 10px;
}

/* ---- Charakterwahl ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  margin: 14px 0 6px;
}
.pcard {
  background: var(--bg2);
  border: 2px solid var(--line);
  border-radius: 13px;
  padding: 12px 6px 10px;
  text-align: center;
  transition: transform .07s, border-color .15s;
}
.pcard:active { transform: scale(.95); }
.pcard.taken { border-color: var(--gold); }
.pcard .av { font-size: 28px; line-height: 1; display: block; margin-bottom: 6px; }
.pcard .nm {
  font-size: 12.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pcard .st { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; letter-spacing: .06em; }

/* ---- PIN ---- */
.link-back {
  color: var(--muted);
  font-size: 13px;
  padding: 0 0 10px;
  display: block;
}
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 20px 0 6px; }
.pin-dots i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: transparent;
  transition: background .12s, border-color .12s, transform .12s;
}
.pin-dots i.on { background: var(--gold); border-color: var(--gold); transform: scale(1.15); }
.pin-dots.shake { animation: shake .35s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}
.pin-error { min-height: 20px; color: var(--red); font-size: 13px; text-align: center; font-weight: 600; }

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 300px;
  margin: 8px auto 0;
}
.keypad button {
  background: var(--bg2);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 16px 0;
  font-size: 22px;
  font-weight: 700;
  transition: transform .06s, background .12s;
}
.keypad button:active { transform: scale(.94); background: var(--line); }
.keypad button.wide { font-size: 15px; }

/* ---- Spiele ---- */
.who { display: flex; align-items: center; gap: 12px; padding: 14px; }
.who .avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--bg2);
  display: grid;
  place-items: center;
  font-size: 24px;
  flex: 0 0 auto;
}
.who-text { flex: 1; min-width: 0; }
.who-text b { display: block; font-size: 16px; }
.btn.tiny { padding: 8px 14px; font-size: 12px; border-radius: 9px; }

.game-list { display: flex; flex-direction: column; gap: 12px; }
.gcard {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  transition: transform .07s, border-color .15s;
}
.gcard:active { transform: scale(.98); }
.gcard.ready { border-color: var(--gold); }
.gcard .ic {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg2);
  display: grid;
  place-items: center;
  font-size: 24px;
  flex: 0 0 auto;
}
.gcard .tx { flex: 1; min-width: 0; }
.gcard .tx b { display: block; font-size: 16px; margin-bottom: 3px; }
.gcard .tx span { font-size: 12.5px; color: var(--muted); }
.gcard .go { font-size: 20px; color: var(--muted); }
.gcard.soon { opacity: .45; pointer-events: none; }

/* ---- Leaderboard ---- */
.tabs { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.tab {
  padding: 7px 14px;
  border-radius: 999px;
  border: 2px solid var(--line);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}
.tab.on { border-color: var(--gold); color: var(--gold); background: rgba(240, 180, 41, .1); }

.board { padding: 6px 8px; }
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.row .rk {
  width: 28px;
  text-align: center;
  font-weight: 900;
  font-size: 15px;
  color: var(--muted);
  flex: 0 0 auto;
}
.row.p1 .rk, .row.p2 .rk, .row.p3 .rk { font-size: 19px; }
.row .nm { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .nm em { font-style: normal; font-size: 11px; color: var(--gold); display: block; letter-spacing: .08em; }
.row .sc { font-weight: 900; font-size: 17px; color: var(--gold); }
.row.me { background: rgba(240, 180, 41, .08); border-radius: 10px; }
.board .empty { padding: 26px 10px; text-align: center; color: var(--muted); font-size: 13.5px; }

.foot { text-align: center; margin-top: 26px; }
.warn {
  display: block;
  background: rgba(255, 107, 107, .1);
  border: 1px solid rgba(255, 107, 107, .35);
  color: #ffb4b4;
  border-radius: 10px;
  padding: 10px 12px;
  line-height: 1.5;
}


/* ---- Spielkarten: Schloss + Versuchsstand ---- */
.gcard.locked { opacity: .55; }
.gcard.locked .ic { filter: grayscale(1); }
.gcard .tx .att { display: block; font-size: 11.5px; margin-top: 3px; font-weight: 700; }
.gcard .att.ok { color: var(--gold); }
.gcard .att.done { color: var(--muted); }

/* ---- Aufgaben (Spieler) ---- */
.tasks { padding: 8px 12px; }
.task {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 2px; border-bottom: 1px solid var(--line);
}
.task:last-child { border-bottom: 0; }
.task .t { flex: 1; min-width: 0; }
.task .t b { display: block; font-size: 14px; line-height: 1.35; }
.task .t span { font-size: 11.5px; color: var(--muted); }
.task .st {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase;
  border-radius: 999px; padding: 4px 10px; border: 1px solid var(--line);
  color: var(--muted);
}
.task .st.submitted { color: var(--blue); border-color: var(--blue); }
.task .st.confirmed { color: #7fd18a; border-color: #7fd18a; }
.task .st.rejected  { color: var(--red); border-color: var(--red); }

/* ---- Admin ---- */
.admin-h { font-size: 14px; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 12px; color: var(--gold); }
.input {
  width: 100%; background: var(--bg2); border: 2px solid var(--line);
  border-radius: 10px; color: var(--text); font: inherit; padding: 10px 12px;
}
.input.num { width: 80px; padding: 8px 10px; }
.task-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0; }
.task-meta label { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.targets { display: flex; flex-wrap: wrap; gap: 7px; }
.targets button {
  border: 2px solid var(--line); border-radius: 999px; padding: 6px 13px;
  font-size: 13px; font-weight: 700; color: var(--muted);
}
.targets button.on { border-color: var(--gold); color: var(--gold); background: rgba(240,180,41,.1); }
.admin-games { display: flex; flex-direction: column; gap: 8px; }
.admin-games button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: var(--bg2); border: 2px solid var(--line); border-radius: 11px;
  padding: 11px 13px; font-weight: 700; font-size: 14px; text-align: left;
}
.admin-games button .lk { font-size: 17px; }
.admin-games button.open { border-color: #7fd18a; }
.admin-games button span:last-child { margin-left: auto; font-size: 11.5px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.subs .task .btns { display: flex; gap: 6px; }
.subs .task .btns button {
  border: 2px solid var(--line); border-radius: 9px; padding: 7px 11px; font-size: 15px;
}
.subs .task .btns .yes { border-color: #7fd18a; }
.subs .task .btns .no { border-color: var(--red); }
.reset-row { display: flex; gap: 8px; }

.row .av-s { flex: 0 0 auto; font-size: 19px; }
