body {
  background-color: #f8f9fa;
}

.role-layout {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.role-meta-panel {
  align-self: flex-start;
  max-width: min(72vw, 320px);
  text-align: left;
  padding: 0;
}

.role-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #111111;
  opacity: 0.8;
}

.role-label-job {
  margin-top: 0.8rem;
}

.role-location {
  margin-top: 0.18rem;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.08;
  color: #111111;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.35);
}

.role-job {
  margin-top: 0.18rem;
  font-size: clamp(1.05rem, 2.25vw, 1.25rem);
  font-weight: 700;
  line-height: 1.2;
  color: #000000;
  text-shadow: 0 1px 6px rgba(255, 255, 255, 0.28);
}

.role-warning {
  align-self: center;
  max-width: min(88vw, 560px);
  padding: 0;
  text-align: center;
  font-size: clamp(0.84rem, 1.9vw, 0.98rem);
  font-weight: 600;
  line-height: 1.35;
  color: #111111;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.35);
}


h1, h2, h3 {
  text-align: center;
}

#players-list li {
  margin: 5px 0;
}

/* Avatar picker styles */
.avatar-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem 0.65rem;
  align-items: center;
  justify-items: center;
}
.avatar-btn {
  border: 2px solid transparent;
  padding: 4px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.avatar-btn img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  object-fit: contain;
}
.avatar-btn.selected {
  border-color: #000;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.95), 0 0 0 4px rgba(0,0,0,0.9);
}
.avatar-btn:focus-visible {
  border-color: #000;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.95), 0 0 0 4px rgba(0,0,0,0.7);
}
.avatar-btn:hover {
  transform: translateY(-1px);
}

@media (max-width: 420px) {
  .avatar-picker {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem 0.55rem;
  }
  .avatar-btn {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 576px) {
  .modal-dialog {
    margin: 0.75rem;
  }
  .modal-content {
    border-radius: 18px;
  }
  .avatar-picker {
    gap: 0.6rem 0.5rem;
  }

  .role-layout {
    padding: 1rem 0.9rem 1.2rem;
  }

  .role-meta-panel {
    max-width: 78vw;
  }

  .role-warning {
    max-width: 92vw;
  }
}

/* Spy guess modal card layout */
.spy-guess-card {
  border: 1px solid #e6e7eb;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.spy-guess-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid #eceef2;
  background: #f7f8fa;
}
.spy-guess-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #5b6372;
}
.guessing-timer {
  font-size: 1rem;
  font-weight: 700;
  color: #171a23;
}
.spy-guess-card-body {
  max-height: min(52vh, 360px);
  overflow-y: auto;
  padding: 0.55rem;
}
#guessing-list .btn {
  margin-bottom: 0.45rem;
}
#guessing-list .btn:last-child {
  margin-bottom: 0;
}

@media (max-width: 576px) {
  .spy-guess-card-body {
    max-height: 46vh;
  }
}
