/* Dodatki gry online: pinezki innych graczy na mapie wyniku i emotki. */

/* Pinezka innego gracza: inny kolor niż własna (czerwona) i odpowiedź (zielona), nick nad pinezką */
.marker-other::before { background: radial-gradient(circle, #fff 0 3px, transparent 4px), linear-gradient(135deg, #8cc4ff, #1d63c0); }
.marker-other::after {
  content: attr(data-nick);
  position: absolute; left: 0; bottom: 38px; transform: translateX(-50%);
  max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 2px 9px; border-radius: 6px; font-size: 0.78rem; font-weight: 700;
  background: rgba(12, 13, 13, 0.88); box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #4ea3ff; color: var(--title);
}

/* Pasek emotek */
.emote-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.emote-btn {
  font-size: 1.25rem; line-height: 1; padding: 6px 9px; cursor: pointer; border: 1px solid #000;
  border-radius: 8px; background: linear-gradient(#2c2a2b, #0a0909); box-shadow: inset 0 0 0 1px #6b6868, inset 0 0 0 2px #0c0d0d;
  transition: transform 0.1s, box-shadow 0.1s;
}
.emote-btn:hover { box-shadow: inset 0 0 0 1px var(--gold-2), inset 0 0 0 2px #0c0d0d; transform: translateY(-2px); }
.emote-btn:active { transform: scale(0.92); }
.lobby-bar .emote-bar { margin: 0; }
.result-card .emote-bar { margin: 0 0 12px; }
.game-screen .emote-bar { position: absolute; left: 14px; bottom: 44px; z-index: 5; justify-content: flex-start; max-width: 360px; }

/* Dymki emotek: stos w prawym górnym rogu, nie blokuje kliknięć */
.emote-feed {
  position: fixed; right: 16px; top: calc(var(--header-h) + 12px); z-index: 90;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none;
}
.emote-bubble {
  padding: 6px 16px; border-radius: 99px; font-size: 1rem; font-weight: 700;
  background: var(--panel); color: var(--title);
  box-shadow: inset 0 0 0 1px var(--gold-2), inset 0 0 0 3px #0c0d0d, 0 4px 14px rgba(0, 0, 0, 0.55);
  animation: emote-in 0.18s ease-out; transition: opacity 0.4s;
}
.emote-bubble.fade { opacity: 0; }
@keyframes emote-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .game-screen .emote-bar { left: 8px; bottom: 372px; max-width: none; }
  .emote-feed { right: 8px; }
}

/* ---------- Budżet 5000 i formaty gry: klasyczny, Battle Royale, Pojedynek ---------- */
.format-note { margin: 0; max-width: 46ch; text-align: center; font-size: 0.86rem; line-height: 1.45; color: var(--text-2); }
.format-note.warn { color: var(--red); font-weight: 700; }

/* Serca (życia) i pasek budżetu */
.hearts { display: inline-flex; gap: 1px; flex: none; }
.heart { color: var(--red); text-shadow: 0 0 6px rgba(241, 100, 98, 0.55); }
.heart.lost { color: #4b3f3f; text-shadow: none; }
.budget-bar {
  flex: none; display: inline-block; width: 64px; height: 8px; border-radius: 4px; overflow: hidden; background: #000;
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px rgba(174, 161, 161, 0.35);
}
.budget-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(#f4e48a, #c9a227); transition: width 0.6s ease-out; }
.budget-bar.low i { background: linear-gradient(#ff9a97, #c0302d); }
.budget-num { flex: none; min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; }

/* HUD: „Runda 2/5 · Mapa 1/2” (na wąskim ekranie mapa w osobnej linii) i pasek budżetu pod liczbą */
.hud-map::before { content: ' · '; }
.hud-budget { display: block; width: 100%; height: 5px; margin-top: 3px; border-radius: 2px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px #000; }
.hud-budget[hidden] { display: none; }
.hud-budget i { display: block; height: 100%; background: linear-gradient(#f4e48a, #c9a227); transition: width 0.6s ease-out; }
.hud-budget.low i { background: linear-gradient(#ff9a97, #c0302d); }

/* Karta wyniku mapy: strata, wyliczenie i pozostały budżet */
.budget-box { margin: 6px 0 12px; text-align: center; }
.budget-box[hidden] { display: none; }
.budget-loss { margin: 0 0 4px; font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; line-height: 1.3; text-shadow: 0 2px 0 #000; }
.budget-loss.zero { color: var(--green-2); }
.budget-left { margin: 0 0 6px; color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; }
.budget-bar-big { display: block; width: 100%; height: 12px; border-radius: 6px; }
.budget-bar-big i { border-radius: 6px; }

/* Status graczy w rundzie */
.room-status li.fmt { display: flex; align-items: center; gap: 6px; }
.room-status li.fmt .mark { flex: none; width: 1.2em; text-align: center; }
.room-status li.fmt .nick { flex: 1; min-width: 0; max-width: 11ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-status li.out { opacity: 0.55; }
.room-status li.out .nick { text-decoration: line-through; }
.room-status li.status-note { color: var(--gold); font-size: 0.78rem; font-weight: 700; }

/* Licznik z odliczaniem po pierwszym strzale */
.hud-timer.rush .hud-label { color: var(--gold); }

/* Widz: panel strzału schowany, na górze baner */
.game-screen.spectating .guess-panel { display: none; }
.spectate-banner {
  position: absolute; left: 50%; top: calc(var(--header-h) + 14px); transform: translateX(-50%); z-index: 6;
  width: max-content; max-width: min(520px, calc(100vw - 340px)); text-align: center; padding: 10px 20px; border-radius: 8px;
  background: var(--panel); color: var(--text-2); line-height: 1.4;
  box-shadow: inset 0 0 0 1px var(--red), inset 0 0 0 3px #0c0d0d, 0 6px 16px rgba(0, 0, 0, 0.6);
}
.spectate-banner strong { display: block; color: var(--red); font-size: 1.05rem; }
.spectate-banner[hidden], .round-effect[hidden], .format-winner[hidden], .score-bar[hidden], .result-points[hidden], .summary-total[hidden] { display: none; }

/* Skutki rundy na ekranie wyniku */
.round-effect {
  margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; text-align: center; font-weight: 700; line-height: 1.4;
  background: rgba(0, 0, 0, 0.38); color: var(--title); box-shadow: 0 0 0 1px #000, inset 0 0 0 1px rgba(174, 161, 161, 0.25);
}
.round-effect.good { color: var(--green-2); }
.round-effect.bad { color: var(--red); box-shadow: 0 0 0 1px #000, inset 0 0 0 1px rgba(241, 100, 98, 0.5); }
.round-effect.elim { animation: elim-flash 0.9s ease-in-out 3; }
@keyframes elim-flash { 50% { background: rgba(241, 100, 98, 0.35); transform: scale(1.02); } }
.room-ranking .loss { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.room-ranking .loss.zero { color: var(--green-2); }
.room-ranking .pts { min-width: 3.4em; text-align: right; }
.room-ranking .fx { flex: none; font-weight: 800; font-size: 0.8rem; color: var(--red); white-space: nowrap; }
.room-ranking li.hurt { box-shadow: 0 0 0 1px #000, inset 0 0 0 1px rgba(241, 100, 98, 0.45); }
.room-ranking li.out { background: rgba(241, 100, 98, 0.16); animation: elim-shake 0.5s ease-in-out; }
.room-ranking li.out .fx { padding: 1px 7px; border-radius: 5px; color: #1b0505; background: var(--red); letter-spacing: 0.06em; }
@keyframes elim-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* Ekran końcowy: zwycięzca */
.format-winner {
  margin: 4px 0 8px; font-family: var(--font-display); font-size: clamp(1.5rem, 5vw, 2.2rem); font-weight: 800; color: var(--gold);
  text-shadow: 0 3px 0 #000, 0 0 22px rgba(237, 219, 94, 0.35);
}
.format-winner.me { animation: pulse 1.6s ease-in-out infinite; }
.room-ranking li.winner { box-shadow: 0 0 0 1px var(--gold-2), inset 0 0 0 1px rgba(237, 219, 94, 0.45); background: rgba(237, 219, 94, 0.14); }
.room-ranking li.winner .name::after { content: " 🏆"; }

/* Zdanie o Budżecie w oknie „Punktacja” i krótkie zasady w poczekalni */
.rules-note { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid rgba(174, 161, 161, 0.25); font-size: 0.85rem; line-height: 1.45; color: var(--text-2); }
.rules-note strong { color: var(--gold); }
.budget-rules { margin: 0; max-width: 46ch; text-align: center; font-size: 0.78rem; line-height: 1.5; color: var(--muted); }
.budget-rules strong { color: var(--text-2); }

@media (max-width: 640px) {
  .spectate-banner { top: auto; bottom: 12px; max-width: calc(100vw - 24px); font-size: 0.85rem; padding: 8px 12px; }
  .game-screen.spectating .emote-bar { bottom: 76px; }
  .budget-bar:not(.budget-bar-big) { width: 44px; }
  /* HUD: „2/5 · M 1/2” w jednej linii (chowamy „apa” z „Mapa”), pasek budżetu grubszy i szerszy */
  .hud-map { white-space: nowrap; }
  .hud-w { display: none; }
  .hud-item:has(.hud-budget:not([hidden])) { min-width: 64px; }
  .hud-budget { height: 6px; border-radius: 3px; }
  /* Ranking mapy: nick i wyniki w pierwszej linii, nazwa trafionej lokacji w drugiej (nick nie jest ucinany) */
  .result-card .room-ranking li { flex-wrap: wrap; row-gap: 1px; padding: 6px 10px; }
  .result-card .room-ranking .name { flex: 1 1 0; min-width: 7ch; }
  .result-card .room-ranking .detail { order: 9; flex: 1 1 100%; margin-left: 34px; font-size: 0.76rem; line-height: 1.25; }
  .result-card .emote-bar { margin-bottom: 8px; }
  .room-status li.fmt .nick { max-width: 8ch; }
}

/* ---------- Pośpiech: komunikat na środku ekranu po pierwszym strzale ---------- */
.rush-banner {
  position: fixed; left: 50%; top: 42%; z-index: 60; pointer-events: none;
  display: grid; justify-items: center; gap: 4px; width: min(440px, calc(100vw - 32px));
  padding: 16px 22px 18px; text-align: center; border-radius: 8px;
  background: radial-gradient(ellipse at top, rgba(120, 22, 18, 0.95), rgba(28, 10, 10, 0.96));
  box-shadow: 0 0 0 1px #0c0806, 0 0 0 3px #c9a24a, 0 0 0 4px #0c0806, 0 12px 40px rgba(0, 0, 0, 0.75);
  opacity: 0; transform: translate(-50%, -50%) scale(0.85); visibility: hidden;
}
.rush-banner.show { animation: rush-banner 3.2s ease forwards; visibility: visible; }
.rush-banner-icon { font-size: 2.2rem; line-height: 1; filter: drop-shadow(0 0 8px rgba(255, 210, 90, 0.8)); }
.rush-banner-title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; color: #ffe08a; text-shadow: 0 2px 0 #000; }
.rush-banner-text { color: #f2e6d0; font-size: 0.98rem; }
@keyframes rush-banner {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
  10% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); }
  16%, 82% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.96); }
}
@media (prefers-reduced-motion: reduce) {
  .rush-banner.show { animation: none; opacity: 1; transform: translate(-50%, -50%); }
}

/* ---------- Zapowiedź nowej rundy (faza intro): komunikat na środku ekranu przed pierwszą mapą rundy ---------- */
.round-intro {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px;
  background: rgba(6, 4, 4, 0.66); animation: round-intro-fade 0.25s ease-out;
}
.round-intro[hidden] { display: none; }
.round-intro-card {
  display: grid; justify-items: center; gap: 6px; width: min(460px, 100%);
  padding: 22px 24px 24px; text-align: center; border-radius: 10px;
  background: radial-gradient(ellipse at top, rgba(120, 22, 18, 0.97), rgba(28, 10, 10, 0.98));
  box-shadow: 0 0 0 1px #0c0806, 0 0 0 3px #c9a24a, 0 0 0 4px #0c0806, 0 16px 50px rgba(0, 0, 0, 0.8);
  animation: round-intro-pop 0.4s cubic-bezier(0.2, 1.2, 0.4, 1);
}
.round-intro-kicker { font-size: 0.82rem; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: #f2c9a0; }
.round-intro-title {
  font-family: var(--font-display); font-size: clamp(2.4rem, 11vw, 3.6rem); font-weight: 800; line-height: 1.05;
  color: #ffe08a; text-shadow: 0 3px 0 #000, 0 0 26px rgba(237, 219, 94, 0.4);
}
.round-intro-mult {
  margin-top: 4px; padding: 5px 16px; border-radius: 6px; font-size: clamp(1.05rem, 4.6vw, 1.3rem); font-weight: 800; color: #fff3d6;
  background: rgba(0, 0, 0, 0.4); box-shadow: inset 0 0 0 1px rgba(201, 162, 74, 0.7);
}
.round-intro-extra { min-height: 1.4em; margin-top: 4px; font-size: 1rem; font-weight: 700; color: #f2e6d0; }
.round-intro-extra .hearts { font-size: 1.2rem; vertical-align: -1px; }
.round-intro-maps { font-size: 0.86rem; color: #cdb99a; }
.round-intro-count {
  min-height: 1.1em; margin-top: 6px; font-family: var(--font-display); font-size: clamp(2.2rem, 10vw, 3rem); font-weight: 800;
  line-height: 1.1; color: #fff; text-shadow: 0 2px 0 #000;
}
.round-intro-count.beat { animation: round-intro-beat 0.9s ease-out; }
@keyframes round-intro-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes round-intro-pop { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }
@keyframes round-intro-beat { 0% { transform: scale(1.5); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .round-intro, .round-intro-card, .round-intro-count.beat { animation: none; }
}

/* ---------- Przerwa przed kolejną mapą w rundzie (faza intro, intro_kind = map): „Nowa mapa…” ---------- */
.round-intro.map-intro { background: rgba(6, 4, 4, 0.45); }
.map-intro-card {
  display: grid; justify-items: center; gap: 8px; padding: 18px 30px 16px; border-radius: 10px; text-align: center;
  background: linear-gradient(#2a2527, #171416);
  box-shadow: inset 0 0 0 1px var(--gold-2), inset 0 0 0 3px #0c0d0d, 0 12px 30px rgba(0, 0, 0, 0.7);
  animation: round-intro-pop 0.25s ease-out;
}
.map-intro-spin {
  width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(237, 219, 94, 0.25); border-top-color: var(--gold);
  animation: map-intro-spin 0.8s linear infinite;
}
.map-intro-title { font: 800 1.35rem var(--font-display); color: var(--gold); text-shadow: 0 2px 0 #000; }
.map-intro-sub { font-size: 0.85rem; color: var(--text-2); }
@keyframes map-intro-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .map-intro-card { animation: none; } .map-intro-spin { animation-duration: 2.4s; } }

/* ---------- Podsumowanie gry online: na każdej mapie strzały wszystkich graczy obok siebie ---------- */
.summary-list.history li.map-shots { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: start; }
.summary-list.history li.map-shots::before { grid-row: 1 / span 2; margin-top: 1px; }
.map-shots-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.map-shots-no { font-size: 0.75rem; color: var(--muted); }
.map-shots-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; }
.map-shots-grid .shot {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 8px; min-width: 0;
  padding: 6px 10px; border-radius: 6px; background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 1px rgba(174, 161, 161, 0.18);
}
.map-shots-grid .shot.me { box-shadow: inset 0 0 0 1px rgba(237, 219, 94, 0.55); }
.map-shots-grid .shot.best .shot-nick::after { content: " ★"; color: var(--gold); }
.shot-nick { font-weight: 700; color: var(--title); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot-where { grid-column: 1; font-size: 0.78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-shots-grid .shot .pts { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: #7fe06d; }
.map-shots-grid .shot .pts.neg { color: var(--red); }

/* ---------- Poczekalnia pokoju: kod u góry, gracze i ustawienia w dwóch kolumnach, pasek akcji ---------- */
.lobby-screen { padding: calc(var(--header-h) + 34px) 16px 48px; }
.lobby-layout { width: min(1000px, 100%); display: flex; flex-direction: column; gap: 40px; }
.lobby-head { padding: 16px 20px 14px; }
.lobby-invite { display: flex; align-items: center; justify-content: center; gap: 18px 28px; flex-wrap: wrap; }
.lobby-code-box { display: grid; justify-items: center; gap: 6px; }
.lobby-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-2); }
.lobby-head .room-code { font-size: 2.3rem; padding: 6px 10px 6px 26px; letter-spacing: 0.32em; }
.lobby-invite-text { display: grid; gap: 10px; justify-items: start; max-width: 360px; }
.lobby-invite-text .lobby-hint { text-align: left; color: var(--text-2); line-height: 1.45; }

.lobby-cols { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 40px 24px; align-items: start; }
.lobby-players, .lobby-settings { display: flex; flex-direction: column; gap: 12px; padding: 16px 16px 14px; }
.lobby-players .win-title span { color: var(--gold); }

/* Gracze: awatar z inicjałem, nick, oznaczenia */
.lobby-players .player-list li { gap: 10px; padding: 8px 12px; margin-bottom: 0; }
.lobby-players .player-list { display: grid; gap: 6px; }
.lobby-players .player-list li::before { order: 3; margin: 0 0 0 auto; }
.lobby-players .player-list li.me { box-shadow: 0 0 0 1px #000, inset 0 0 0 1px rgba(237, 219, 94, 0.55); }
.player-list .avatar {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  font: 800 0.95rem var(--font-display); color: #1b1405; background: linear-gradient(#fff2a6, #d5bf74 60%, #9a7a1f); box-shadow: 0 0 0 1px #000;
}
.player-list .nick { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lobby-alone { margin: 0; font-size: 0.85rem; color: var(--muted); text-align: center; }

/* Ustawienia */
.lobby-host-note { margin: 0; padding: 6px 10px; border-radius: 6px; font-size: 0.82rem; color: var(--text-2); background: rgba(0, 0, 0, 0.35); text-align: center; }
.lobby-group { display: flex; flex-direction: column; gap: 6px; }
.lobby-settings select { width: 100%; }
.lobby-settings .field { flex: none; } /* style.css: dawny poziomy układ z flex-basis 200px */
.lobby-settings .format-note { max-width: none; text-align: left; font-size: 0.82rem; color: var(--muted); }
.seg-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.seg-cards button, .seg button {
  font: inherit; cursor: pointer; color: var(--text); border: 0; border-radius: 8px;
  background: linear-gradient(#2e2b2c, #1a181b); box-shadow: inset 0 0 0 1px #5d5a58, inset 0 0 0 3px #0c0d0d;
  transition: box-shadow 0.15s, filter 0.15s;
}
.seg-cards button { display: grid; gap: 3px; align-content: start; padding: 10px 10px 9px; text-align: left; }
.seg-cards .seg-name { font-weight: 800; font-size: 0.92rem; color: var(--title); }
.seg-cards .seg-desc { font-size: 0.74rem; line-height: 1.35; color: var(--muted); }
.seg { display: flex; padding: 3px; gap: 3px; border-radius: 8px; background: rgba(0, 0, 0, 0.45); box-shadow: inset 0 0 0 1px #3a3436; }
.seg button { flex: 1; padding: 8px 6px; font-weight: 700; font-size: 0.88rem; border-radius: 6px; box-shadow: none; background: transparent; color: var(--text-2); }
.seg-cards button:hover:not(:disabled), .seg button:hover:not(:disabled) { filter: brightness(1.15); }
.seg-cards button.on { box-shadow: inset 0 0 0 1px var(--gold), inset 0 0 0 3px #0c0d0d, 0 0 12px rgba(237, 219, 94, 0.2); }
.seg-cards button.on .seg-name { color: var(--gold); }
.seg button.on { color: #1b1405; background: linear-gradient(#fff2a6, #d5bf74 60%, #9a7a1f); }
.seg-cards button:disabled, .seg button:disabled { cursor: default; }
.seg-cards button:disabled:not(.on) { opacity: 0.55; }
.seg button:disabled:not(.on) { opacity: 0.6; }

/* Przełączniki Pośpiech / Bez limitu rund */
.switch-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; cursor: pointer; background: rgba(0, 0, 0, 0.3); }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-row .switch {
  position: relative; flex: none; width: 42px; height: 24px; border-radius: 999px; background: #3a3436;
  box-shadow: inset 0 0 0 1px #0c0806; transition: background 0.15s;
}
.switch-row .switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #cfc6b4; box-shadow: 0 1px 2px #000; transition: transform 0.15s;
}
.switch-row input:checked + .switch { background: #396b29; box-shadow: inset 0 0 0 1px #4dc83c; }
.switch-row input:checked + .switch::after { transform: translateX(18px); background: #fff; }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--gold); outline-offset: 2px; }
.switch-row input:disabled + .switch { opacity: 0.6; }
.switch-row:has(input:disabled) { cursor: default; }
.switch-row strong { display: block; color: var(--title); font-size: 0.92rem; }
.switch-row small { display: block; color: var(--muted); font-size: 0.78rem; line-height: 1.35; }

.lobby-rules { border-top: 1px solid rgba(213, 191, 116, 0.22); padding-top: 8px; }
.lobby-rules summary { cursor: pointer; font-size: 0.86rem; font-weight: 700; color: var(--gold-2); }
.lobby-rules .budget-rules { max-width: none; margin-top: 8px; text-align: left; font-size: 0.82rem; }

/* Pasek akcji: start (host) albo czekanie, emotki, wyjście */
.lobby-bar {
  display: flex; align-items: center; justify-content: center; gap: 12px 18px; flex-wrap: wrap; margin-top: -12px;
  padding: 14px 18px; border-radius: 10px; background: rgba(0, 0, 0, 0.45); box-shadow: inset 0 0 0 1px rgba(213, 191, 116, 0.3);
}
.lobby-bar #startRoomBtn { min-width: 240px; }
.lobby-bar .lobby-wait { font-weight: 700; color: var(--text-2); }
.lobby-leave { padding: 8px 16px; font-size: 0.88rem; }

@media (max-width: 760px) {
  .lobby-cols { grid-template-columns: 1fr; }
  .lobby-invite-text { justify-items: center; }
  .lobby-invite-text .lobby-hint { text-align: center; }
}
@media (max-width: 640px) {
  .lobby-layout { gap: 34px; }
  .lobby-head .room-code { font-size: 1.8rem; }
  .seg-cards { grid-template-columns: 1fr; }
  .seg-cards button { grid-template-columns: auto 1fr; align-items: baseline; column-gap: 10px; }
  .lobby-bar { flex-direction: column; margin-top: -8px; }
  .lobby-bar #startRoomBtn { width: 100%; min-width: 0; }
}
