* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  min-height: 100dvh; color: var(--text); font-family: var(--font);
  background: radial-gradient(circle at 20% 15%, var(--bg-2), var(--bg) 60%);
  display: flex; flex-direction: column;
}
.app-header {
  display: flex; align-items: center; gap: .6rem; justify-content: center;
  padding: 1rem; font-weight: 800; letter-spacing: .02em;
}
.app-header a { color: inherit; text-decoration: none; }
main { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 1rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: var(--tap); padding: .9rem 1.5rem; border: none; border-radius: 999px;
  font: inherit; font-weight: 700; cursor: pointer; color: #0b0014;
  background: linear-gradient(90deg, var(--c1), var(--c3));
}
.btn--ghost { background: var(--surface); color: var(--text); border: 1px solid var(--surface-line); }
.btn:active { transform: scale(.97); }
.home-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 540px) { .home-grid { grid-template-columns: 1fr 1fr; } }
.game-card {
  display: flex; flex-direction: column; gap: .35rem; text-align: left;
  padding: 1.25rem; border-radius: var(--radius); cursor: pointer;
  background: var(--surface); border: 1px solid var(--surface-line); color: inherit;
}
.game-card__emoji { font-size: 2.2rem; }
.game-card__title { font-size: 1.2rem; font-weight: 800; }
.game-card__desc { color: var(--text-dim); font-size: .95rem; }
.game-screen { display: flex; flex-direction: column; gap: 1rem; align-items: center; text-align: center; }
.back-link { align-self: flex-start; }
.footer-cta { text-align: center; padding: 1.5rem 1rem; color: var(--text-dim); font-size: .9rem; }
.footer-cta a { color: var(--c2); }
.empty { text-align: center; color: var(--text-dim); padding: 2rem; }
.rulett { display: flex; flex-direction: column; gap: 1.25rem; align-items: center; width: 100%; }
.rulett__result { min-height: 5rem; width: 100%; display: flex; flex-direction: column; gap: .4rem;
  justify-content: center; align-items: center; text-align: center; padding: 0 .5rem; }
.rulett__channel { font-size: clamp(1.15rem, 5.5vw, 1.5rem); font-weight: 800; overflow-wrap: anywhere; }
.rulett__theme { font-size: clamp(1rem, 4.5vw, 1.2rem); font-weight: 700; overflow-wrap: anywhere; }
.rulett__rule { font-size: clamp(1rem, 4.5vw, 1.15rem); color: var(--text-dim); overflow-wrap: anywhere; line-height: 1.35; }
.rulett__spin { width: 100%; max-width: 320px; }
.rulett__countdown { margin-top: .5rem; font-size: 1.3rem; font-weight: 800; }
/* channel setup */
.rulett__setup { width: 100%; max-width: 460px; background: var(--surface);
  border: 1px solid var(--surface-line); border-radius: 12px; padding: .5rem .9rem; }
.rulett__setup summary { cursor: pointer; font-weight: 700; padding: .35rem 0; }
.rulett__setup-hint { color: var(--text-dim); font-size: .85rem; margin: .35rem 0 .6rem; }
.rulett__channels { display: flex; flex-direction: column; gap: .5rem; padding-bottom: .4rem; }
.rulett__chrow { display: flex; align-items: center; gap: .6rem; }
.rulett__dot { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 999px; display: grid;
  place-items: center; font-weight: 800; color: #0b0014; }
.rulett__chinput { flex: 1; min-width: 0; min-height: var(--tap); border-radius: 12px;
  border: 1px solid var(--surface-line); background: var(--bg); color: var(--text); padding: 0 .9rem; font: inherit; }
.zaj { display: flex; flex-direction: column; gap: 1rem; align-items: center; width: 100%; }
.zaj__hint { color: var(--text-dim); font-size: .85rem; }
.zaj__meter { width: 100%; max-width: 420px; height: 28px; border-radius: 999px; background: var(--surface); border: 1px solid var(--surface-line); overflow: hidden; }
.zaj__bar { height: 100%; width: 100%; transform: scaleX(0); transform-origin: left; transition: transform .08s linear; background: var(--c2); }
.zaj__msg { min-height: 3rem; font-size: 1.25rem; font-weight: 700; }
.szobor { display: flex; flex-direction: column; gap: 1rem; align-items: center; width: 100%; }
.szobor__hint { color: var(--text-dim); font-size: .85rem; }
.szobor__yt { display: flex; flex-direction: column; gap: .35rem; font-size: .85rem; color: var(--text-dim); width: 100%; max-width: 420px; }
.szobor__yt-input { min-height: var(--tap); border-radius: 12px; border: 1px solid var(--surface-line); background: var(--surface); color: var(--text); padding: 0 1rem; font: inherit; }
.szobor__status { min-height: 2rem; font-size: 1.2rem; font-weight: 700; }
.szobor__overlay {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  font-size: clamp(2.5rem, 14vw, 6rem); font-weight: 900; color: #fff;
  background: rgba(11, 0, 20, .92); animation: freezeflash .4s steps(2) 3;
}
@keyframes freezeflash { 0%,100% { background: rgba(11,0,20,.92); } 50% { background: var(--c1); } }

/* --- Party layer --- */
.party-panel { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1.5rem;
  padding: 1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--surface-line); }
.party-panel__title { font-size: 1.1rem; }
.party-add { display: flex; gap: .5rem; }
.party-add__input { flex: 1; min-height: var(--tap); border-radius: 12px; border: 1px solid var(--surface-line);
  background: var(--bg); color: var(--text); padding: 0 1rem; font: inherit; }
.party-add__btn { white-space: nowrap; }
.party-roster, .roster-strip { display: flex; flex-wrap: wrap; gap: .5rem; }
.pchip { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border-radius: 999px;
  font: inherit; font-weight: 700; color: var(--text); background: var(--bg); border: 1px solid var(--surface-line); cursor: pointer; }
.pchip--static { cursor: default; opacity: 1; }
.pchip--sel { background: var(--c1); color: #0b0014; border-color: transparent; }
.pchip--removable { cursor: default; }
.pchip--out { opacity: .4; text-decoration: line-through; }
.pchip__x { border: none; background: transparent; color: inherit; font-weight: 800; cursor: pointer; line-height: 1; }
.mini-board { display: flex; flex-direction: column; gap: .25rem; }
.mini-board__row { display: flex; justify-content: space-between; font-weight: 700; }
.party-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.standings-view, .champion-view { display: flex; flex-direction: column; gap: 1rem; align-items: stretch; }
.standings-list { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.standings-list__row { display: grid; grid-template-columns: 2.2rem 1fr auto; align-items: center;
  padding: .6rem .9rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--surface-line); }
.standings-list__rank { font-weight: 800; color: var(--text-dim); }
.standings-list__name { font-weight: 700; }
.standings-list__score { font-weight: 800; color: var(--c2); }
.champion-view { text-align: center; align-items: center; }
.champion-view__crown { font-size: clamp(3rem, 18vw, 7rem); }
.champion-view__name { font-size: 1.8rem; font-weight: 900; }
.champion-view__sub { color: var(--text-dim); }
/* confetti */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti__bit { position: absolute; top: -12px; width: 10px; height: 14px; border-radius: 2px;
  animation: confetti-fall 3s linear forwards; }
@keyframes confetti-fall {
  0% { transform: translateY(-12px) rotate(var(--spin)); opacity: 1; }
  100% { transform: translateY(102vh) rotate(calc(var(--spin) + 360deg)); opacity: .9; }
}

/* --- Rulett scoring --- */
.rulett__score { display: flex; flex-direction: column; gap: .75rem; align-items: center; width: 100%; max-width: 460px; }
.rulett__score-label { color: var(--text-dim); font-weight: 700; }
.rulett__toast { font-size: 1.1rem; font-weight: 800; color: var(--c2); }

/* --- Szoboravató elimination --- */
.szobor__elim { display: flex; flex-direction: column; gap: .75rem; align-items: center; width: 100%; max-width: 460px; }
.szobor__roundover { display: flex; flex-direction: column; gap: .75rem; align-items: center; }
.szobor__winner { font-size: 1.25rem; font-weight: 800; color: var(--c3); text-align: center; }
