.charades-game {
  width: min(96vw, 580px);
  margin: 0 auto;
  padding: 4px 0 28px;
}

.charades-box {
  margin-bottom: 12px;
  padding: 15px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 22px;
  background:
    linear-gradient(
      145deg,
      rgba(23,30,49,.92),
      rgba(13,18,31,.90)
    );
  box-shadow:
    0 15px 45px rgba(0,0,0,.18);
}

.charades-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.02em;
}

.charades-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.charades-player {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.charades-player:last-child {
  border-bottom: 0;
}

.charades-player-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
}

.charades-ready {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.charades-ready.yes {
  color: var(--green);
}

.charades-host {
  padding: 3px 7px;
  border-radius: 8px;
  background: rgba(109,124,255,.16);
  color: #c0c6ff;
  font-size: 9px;
  font-weight: 900;
}

.charades-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 12px;
}

.charades-setting label {
  display: block;
  margin: 0 0 5px 2px;
  color: var(--muted);
  font-size: 10px;
}

.charades-select {
  width: 100%;
  height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: #0d1424;
  color: white;
}

.charades-link {
  margin: 8px 0;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  color: #dce3f7;
  font-size: 12px;
  text-align: center;
  word-break: break-all;
}

.charades-invite-list {
  max-height: 170px;
  margin-top: 8px;
  overflow-y: auto;
}

.charades-invite-row {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.charades-invite-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.charades-center {
  text-align: center;
}

.charades-drawer {
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--muted);
}

.charades-timer {
  margin-top: 7px;
  font-size: 26px;
  font-weight: 950;
  text-align: center;
}

.charades-word {
  margin: 9px 0 12px;
  padding: 12px;
  border: 1px solid rgba(109,124,255,.25);
  border-radius: 15px;
  background: rgba(109,124,255,.11);
  text-align: center;
  font-size: 21px;
  font-weight: 950;
  letter-spacing: .02em;
}

.charades-choice-grid {
  display: grid;
  gap: 9px;
  margin-top: 15px;
}

.charades-choice {
  min-height: 54px;
  border: 1px solid rgba(109,124,255,.23);
  border-radius: 15px;
  background: rgba(109,124,255,.10);
  color: white;
  font-size: 16px;
  font-weight: 850;
}

.charades-canvas-wrap {
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  background: white;
  box-shadow:
    0 18px 50px rgba(0,0,0,.24);
}

#charadesCanvas {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #fff;
  touch-action: none;
}

.charades-tools {
  margin-top: 10px;
  padding: 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
}

.charades-color {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 50%;
}

.charades-color.active {
  border-color: white;
  box-shadow:
    0 0 0 2px rgba(109,124,255,.65);
}

.charades-tool-btn {
  flex: 0 0 auto;
  min-height: 35px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,.06);
  color: white;
  font-size: 11px;
  font-weight: 800;
}

.charades-tool-btn.active {
  outline: 2px solid var(--accent);
  background: rgba(109,124,255,.13);
}

.charades-scorebar {
  margin: 10px 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.charades-score-chip {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  font-size: 10px;
  white-space: nowrap;
}

.charades-score-chip.drawer {
  border-color: rgba(109,124,255,.4);
  background: rgba(109,124,255,.10);
}

.charades-score-chip.guessed {
  border-color: rgba(57,217,138,.35);
  background: rgba(57,217,138,.08);
}

.charades-feed {
  height: 150px;
  margin-top: 10px;
  overflow-y: auto;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(8,12,22,.55);
}

.charades-feed-row {
  margin-bottom: 7px;
  font-size: 12px;
  line-height: 1.35;
  word-break: break-word;
}

.charades-feed-row strong {
  color: #c4caff;
}

.charades-feed-row.correct {
  color: var(--green);
  font-weight: 800;
}

.charades-guess-form {
  display: flex;
  gap: 7px;
  margin-top: 9px;
}

.charades-guess-form .input {
  flex: 1;
}

.charades-guess-send {
  flex: 0 0 54px;
  width: 54px;
  border: 0;
  border-radius: 14px;
  background:
    linear-gradient(135deg, #7168ff, #555dff);
  color: white;
  font-size: 18px;
}

.charades-result-word {
  margin: 14px 0;
  font-size: 30px;
  font-weight: 950;
  text-align: center;
}

.charades-ranking {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.charades-rank {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border-radius: 14px;
  background: rgba(255,255,255,.045);
}

.charades-rank-pos {
  width: 27px;
  font-weight: 950;
}

.charades-rank-name {
  flex: 1;
  font-weight: 800;
}

.charades-rank-score {
  font-weight: 950;
}

.players-bar.multi-player {
  overflow-x: auto;
  justify-content: flex-start;
}

.players-bar.multi-player .player-chip {
  flex: 0 0 auto !important;
  min-width: 105px;
}

/* KALAMBURY — własne hasło */
.charades-word-form {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.charades-word-form .input {
  width: 100%;
  min-height: 54px !important;
  padding: 0 15px;
  font-size: 16px !important;
  text-align: center;
}

.charades-word-form .btn {
  width: 100%;
}

/* CZAT MECZU — ukryty, dopóki gracz go nie otworzy */
.game-chat:not(.open) {
  display: none !important;
}

.game-chat.open {
  display: flex !important;
}

/* Kropka nowej wiadomości */
#openChatBtn {
  position: relative !important;
}

#openChatBtn.chat-unread::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 9px;
  height: 9px;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  background: #D95C5C;
  box-shadow:
    0 2px 6px rgba(150,50,50,.25);
}
