/* —— Lobby Figma (assets-lobby) —— */
body:has(#screen-lobby.active) .stage-bg {
  opacity: 0;
  visibility: hidden;
}

.app:has(#screen-lobby.active) {
  max-width: none;
  padding: 0;
  width: 100%;
}

body:has(#screen-lobby.active),
html:has(#screen-lobby.active) {
  background-color: #090414;
}

body:has(#screen-lobby.active) #btn-sound {
  top: auto;
  bottom: 20px;
  right: 20px;
}

.jz-lobby-screen.screen.active {
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 28px 0 36px;
  box-sizing: border-box;
  color: #fff;
  background: linear-gradient(180deg, #1a0b2e 0%, #0d0618 55%, #090414 100%);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-user-select: none;
  user-select: none;
  opacity: 1;
  transform: none !important;
  animation: none;
}

.jz-lobby-screen input,
.jz-lobby-screen textarea,
.jz-lobby-screen select {
  -webkit-user-select: text;
  user-select: text;
}

.jz-lobby-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Mesmo plano centrado do laranja (artboard Figma 1920×1080) */
.jz-lobby-artboard {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100%, 1920px);
  height: max(100%, 1080px);
  transform: translate(-50%, -50%);
}

.jz-lobby-blob {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 1;
  filter: none;
}

.jz-lobby-dots {
  position: absolute;
  width: 96px;
  height: 304px;
  opacity: 0.95;
  pointer-events: none;
}

.jz-lobby-dots-tl {
  /* lobby.svg: Vector_topo_esquerdo ~x86 y72 */
  top: 72px;
  left: 86px;
  right: auto;
  bottom: auto;
}

.jz-lobby-dots-br {
  /* lobby.svg: Vector_inferior_direito ~x1750 y709 */
  top: auto;
  left: auto;
  right: 74px;
  bottom: 67px;
}

.jz-lobby-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: min(1280px, calc(100% - 64px));
  max-width: 1280px;
  margin: 0 auto;
  box-sizing: border-box;
}

.jz-lobby-header,
.jz-lobby-grid {
  position: relative;
  z-index: 1;
  width: 100%;
}

.jz-lobby-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.jz-lobby-header-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem 1rem;
  min-width: 0;
}

.jz-lobby-logo {
  display: block;
  width: clamp(150px, 18vw, 200px);
  max-width: 100%;
  height: auto;
  margin-bottom: 0.5rem;
}

.jz-lobby-title {
  margin: 0;
  font-family: "Fredoka One", "Fredoka", system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(1.65rem, 2.2vw, 2.35rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.05;
  color: #fff;
}

.jz-lobby-subtitle {
  margin: 0;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
  color: rgba(255, 255, 255, 0.78);
}

.jz-lobby-leave {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  flex: 0 0 auto;
  min-height: 46px;
  padding: 0 1.15rem 0 0.95rem;
  border-radius: 23px;
  border: 1.5px solid #ff3366;
  background: #330136;
  color: #fff;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.jz-lobby-leave img {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.jz-lobby-leave:hover,
.jz-lobby-leave:focus-visible {
  filter: brightness(1.08);
  outline: none;
}

.jz-lobby-leave:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 210, 63, 0.5);
}

.jz-lobby-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(1rem, 2vw, 1.75rem);
  align-items: stretch;
  width: 100%;
  max-width: none;
  margin: 0;
  flex: 1;
  min-height: 0;
}

.jz-lobby-panel {
  background: linear-gradient(180deg, #440049 0%, #340137 100%);
  border: 3px solid var(--jz-border-purple, #4b3875);
  border-radius: 16px;
  padding: 1.15rem 1.15rem 1.25rem;
  box-sizing: border-box;
  /* Figma lobby: hard plate dy=10 #4B3875 */
  box-shadow: 0 10px 0 var(--jz-border-purple, #4b3875);
}

.jz-lobby-players-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 0;
  height: 100%;
  align-self: stretch;
}

.jz-lobby-meta-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(140px, 0.7fr);
  gap: 0.75rem;
  flex: 0 0 auto;
}

.jz-lobby-meta-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  min-height: 64px;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  background: #1b1437;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  box-shadow: none;
  box-sizing: border-box;
}

.jz-lobby-meta-label {
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.62);
}

.jz-lobby-meta-value {
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.01em;
}

.jz-lobby-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.jz-lobby-copy {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.jz-lobby-copy > svg {
  grid-area: 1 / 1;
}

.jz-lobby-copy-check {
  opacity: 0;
  transform: scale(0.7);
  color: #7dffb3;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.jz-lobby-copy-icon {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.jz-lobby-copy.is-copied .jz-lobby-copy-icon {
  opacity: 0;
  transform: scale(0.7);
}

.jz-lobby-copy.is-copied .jz-lobby-copy-check {
  opacity: 1;
  transform: scale(1);
}

.jz-lobby-copy:hover,
.jz-lobby-copy:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.jz-lobby-roster {
  list-style: none;
  margin: 0;
  /* padding interno p/ o glow do host não colidir com a borda do painel */
  padding: 0.35rem 0.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  /* overflow:auto clipava o box-shadow/borda do card is-host */
  overflow: visible;
}

.jz-lobby-roster .player-card,
.jz-lobby-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  min-height: 92px;
  flex: 0 0 auto;
  margin: 0;
  padding: 0.7rem 0.85rem;
  border-radius: 16px;
  background: linear-gradient(180deg, #440049 0%, #340137 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  /* sombra hard só nos painéis externos — cards internos sem placa */
  box-shadow: none;
  box-sizing: border-box;
}

.jz-lobby-card.is-host {
  border-color: rgba(255, 148, 110, 0.9);
  box-shadow:
    0 0 0 1px rgba(255, 94, 53, 0.35),
    0 0 14px rgba(255, 94, 53, 0.4),
    0 0 28px rgba(255, 51, 102, 0.22);
}

.jz-lobby-card-avatar {
  width: 72px;
  height: 72px;
  border: 0 !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  outline: none;
  object-fit: contain;
  object-position: center bottom;
  display: block;
  flex-shrink: 0;
  overflow: hidden;
  padding: 4px;
  box-sizing: border-box;
}

.jz-lobby-card-avatar-empty {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.jz-lobby-card-name {
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jz-lobby-card-status {
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: #a29dbe;
}

.jz-lobby-card-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.4rem;
}

.jz-lobby-card-tags {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: nowrap;
}

.jz-lobby-badge,
.jz-lobby-badge-host,
.jz-lobby-badge-ready {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 36px;
  min-width: 92px;
  padding: 0 1.05rem;
  border-radius: 999px;
  border: 2px solid #f9af96;
  background: linear-gradient(90deg, #ff5e35 0%, #ff3366 100%);
  color: #fff;
  font-family: "Fredoka One", "Fredoka", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-align: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.jz-lobby-badge-host {
  gap: 0.35rem;
  min-width: 0;
  padding: 0 0.95rem 0 0.55rem;
  background: linear-gradient(180deg, #3a0a42 0%, #2a062f 100%);
  border-color: #f9af96;
  text-transform: uppercase;
}

.jz-lobby-badge-host-crown {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.jz-lobby-badge-ready {
  animation: jz-lobby-ready-in 0.22s ease;
}

@keyframes jz-lobby-ready-in {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.jz-lobby-card .jz-lobby-kick,
.jz-lobby-kick {
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  min-height: 30px;
  padding: 0 0.75rem;
  border-radius: 999px;
  border: 1.5px solid #ff3366;
  background: rgba(255, 51, 102, 0.16);
  color: #ff6b8a;
  box-shadow: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
    filter 0.15s ease;
}

.jz-lobby-card .jz-lobby-kick:hover,
.jz-lobby-card .jz-lobby-kick:focus-visible,
.jz-lobby-kick:hover,
.jz-lobby-kick:focus-visible {
  background: #ff3366;
  border-color: #ff3366;
  color: #fff;
  outline: none;
  filter: brightness(1.05);
}

.jz-lobby-card .jz-lobby-kick:active,
.jz-lobby-kick:active {
  filter: brightness(0.95);
}

.jz-lobby-invite-slot {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
}

.jz-lobby-invite {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  min-height: 92px;
  margin: 0;
  padding: 0.7rem 0.85rem;
  border-radius: 16px;
  border: 1.5px solid rgba(75, 56, 117, 0.9);
  background: linear-gradient(180deg, #440049 0%, #340137 100%);
  color: #fff;
  text-align: left;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  box-sizing: border-box;
  box-shadow: none;
  transition: filter 0.15s ease, opacity 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.jz-lobby-invite.is-primary {
  cursor: pointer;
  background: linear-gradient(180deg, #440049 0%, #340137 100%);
  border: 2px dashed rgba(201, 184, 232, 0.42);
  color: rgba(201, 184, 232, 0.92);
  box-shadow: none;
  animation: none;
}

.jz-lobby-invite.is-primary .jz-lobby-invite-icon {
  border: 2px dashed rgba(201, 184, 232, 0.4);
  background: #400045;
  color: rgba(201, 184, 232, 0.7);
}

.jz-lobby-invite.is-ghost {
  opacity: 0.28;
  filter: grayscale(0.4) brightness(0.75);
  pointer-events: none;
  user-select: none;
  cursor: default;
  border-color: rgba(75, 56, 117, 0.4);
}

.jz-lobby-invite-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 68px;
  border-radius: 14px;
  border: 2px solid #4b3875;
  background: #400045;
  color: #4b3875;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.jz-lobby-invite.is-primary:hover,
.jz-lobby-invite.is-primary:focus-visible {
  outline: none;
  border-color: rgba(201, 184, 232, 0.7);
  color: #e8dff8;
}

.jz-lobby-invite.is-primary:hover .jz-lobby-invite-icon,
.jz-lobby-invite.is-primary:focus-visible .jz-lobby-invite-icon {
  border-color: rgba(201, 184, 232, 0.65);
  color: #c9b8e8;
}

.jz-lobby-config-panel,
.jz-lobby-guest-panel {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  height: 100%;
  max-height: none;
  overflow: visible;
  align-self: stretch;
}

.jz-lobby-settings-open {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 48px;
  padding: 0 1rem;
  border-radius: 24px;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, #440049 0%, #330136 100%);
  color: #fff;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.02rem;
  cursor: pointer;
}

.jz-lobby-settings-open svg {
  flex: 0 0 auto;
  color: #f9af96;
}

.jz-lobby-settings-open:focus-visible {
  outline: 2px solid rgba(255, 210, 63, 0.65);
  outline-offset: 2px;
}

.jz-lobby-settings-overlay {
  display: contents;
}

.jz-lobby-settings-backdrop {
  display: none;
}

.jz-lobby-settings-sheet {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-height: 0;
}

.jz-lobby-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.jz-lobby-settings-close,
.jz-lobby-settings-done {
  display: none;
}

.jz-lobby-settings-scroll {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-height: 0;
}

.jz-lobby-config-title {
  margin: 0 0 0.15rem;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: #fff;
}

.jz-lobby-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
}

.jz-lobby-field > span {
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: #c9b8e8;
}

.jz-lobby-config-panel .jz-filter-plain {
  width: 100%;
}

.jz-lobby-config-panel .jz-filter-plain .jz-filter-trigger,
.jz-lobby-config-panel .jz-filter-plain select:not(.jz-filter-native) {
  padding-left: 1rem;
  min-height: 46px;
  border-radius: 23px;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.jz-lobby-config-panel .jz-filter-plain .jz-filter-option {
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.jz-lobby-config-panel .jz-filter-plain.is-open .jz-filter-trigger {
  border-radius: 23px 23px 0 0;
}

.jz-lobby-config-panel .jz-filter-plain .jz-filter-menu {
  border-radius: 0 0 23px 23px;
  max-height: min(300px, 46vh);
  padding: 0.4rem 0.45rem 0.5rem 0.4rem;
}

.jz-lobby-config-panel .jz-filter-plain.is-open {
  z-index: 60;
}

.jz-lobby-config-panel.is-guest-view .jz-filter-trigger:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.jz-lobby-field input[type="password"],
.jz-lobby-field input[type="text"] {
  width: 100%;
  min-height: 48px;
  padding: 0 0.95rem;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  background-color: #16102c;
  color: #fff;
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  box-sizing: border-box;
}

.jz-lobby-field input:focus-visible {
  outline: 2px solid rgba(255, 210, 63, 0.65);
  outline-offset: 1px;
}

.jz-lobby-privacy {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0.2rem 0 0;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  min-inline-size: 0;
}

.jz-lobby-privacy legend {
  padding: 0 0.2rem;
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: #c9b8e8;
}

.jz-lobby-radio {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  color: #fff;
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
}

.jz-lobby-radio.radio-row {
  align-items: center;
}

.jz-lobby-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.jz-lobby-radio .jz-radio-ui {
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: #1b1437;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.jz-lobby-radio .jz-radio-ui::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  transform: scale(0);
  transition: transform 0.12s ease;
}

.jz-lobby-radio input[type="radio"]:checked + .jz-radio-ui {
  border-color: #fff;
  background: #2a1f4a;
}

.jz-lobby-radio input[type="radio"]:checked + .jz-radio-ui::after {
  transform: scale(1);
}

.jz-lobby-radio input[type="radio"]:focus-visible + .jz-radio-ui {
  outline: 2px solid rgba(255, 210, 63, 0.65);
  outline-offset: 2px;
}

.jz-lobby-password {
  gap: 0.45rem;
}

.jz-lobby-password-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.jz-lobby-password-row input {
  flex: 1;
  min-width: 0;
}

.jz-lobby-password-row .jz-pw-toggle {
  flex: 0 0 auto;
  align-self: center;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.jz-lobby-password-row .jz-pw-toggle > svg {
  grid-area: 1 / 1;
}

.jz-lobby-password-row .jz-pw-eye-hide {
  opacity: 0;
  transform: scale(0.7);
}

.jz-lobby-password-row .jz-pw-toggle[aria-pressed="true"] .jz-pw-eye-show {
  opacity: 0;
  transform: scale(0.7);
}

.jz-lobby-password-row .jz-pw-toggle[aria-pressed="true"] .jz-pw-eye-hide {
  opacity: 1;
  transform: scale(1);
}

.jz-lobby-password-row .jz-pw-toggle:hover,
.jz-lobby-password-row .jz-pw-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.jz-lobby-save-password {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin: 0.15rem 0 0;
  padding: 0 1.1rem;
  border: 2px solid #f9af96;
  border-radius: 22px;
  background: linear-gradient(90deg, #ff5e35 0%, #ff3366 100%);
  color: #fff;
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.jz-lobby-save-password:hover:not(:disabled),
.jz-lobby-save-password:focus-visible:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
  outline: none;
}

.jz-lobby-save-password:active:not(:disabled) {
  transform: translateY(0);
  filter: brightness(0.98);
}

.jz-lobby-save-password.is-configured,
.jz-lobby-save-password:disabled {
  border-color: rgba(201, 184, 232, 0.45);
  background: rgba(201, 184, 232, 0.14);
  color: #c9b8e8;
  cursor: default;
  filter: none;
  transform: none;
  opacity: 1;
}

.jz-lobby-apply {
  align-self: stretch;
}

.jz-lobby-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 52px;
  margin-top: auto;
  padding: 0 1.25rem;
  border: 2px solid #f9af96;
  border-radius: 26px;
  background: linear-gradient(90deg, #ff5e35 0%, #ff3366 100%);
  color: #fff;
  font-family: "Fredoka One", "Fredoka", system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 400;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.15s ease;
}

.jz-lobby-start:hover:not(:disabled),
.jz-lobby-start:focus-visible:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-2px);
  outline: none;
}

.jz-lobby-start.is-ready-to-start:not(:disabled) {
  filter: brightness(1.04);
}

.jz-lobby-start:disabled {
  opacity: 0.72;
  filter: none;
  cursor: not-allowed;
  transform: none;
}

.jz-lobby-config-panel.is-guest-view .jz-filter-trigger:disabled,
.jz-lobby-config-panel.is-guest-view input {
  opacity: 0.72;
  cursor: not-allowed;
}

.jz-lobby-config-panel.is-guest-view .jz-lobby-field > span {
  color: rgba(201, 184, 232, 0.75);
}

.jz-lobby-apply.btn-secondary,
.jz-lobby-screen .party-lobby-actions .btn {
  border-radius: 12px;
  min-height: 44px;
  font-family: "Fredoka", system-ui, sans-serif;
}

.jz-lobby-start-play {
  flex: 0 0 auto;
  width: 15px;
  height: 17px;
  display: block;
}

.jz-lobby-start-play[hidden] {
  display: none;
}

.jz-lobby-ready-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin-top: auto;
  border: 2px solid #f9af96;
  border-radius: 26px;
  background: linear-gradient(90deg, #ff5e35 0%, #ff3366 100%);
  color: #fff;
  font-family: "Fredoka One", "Fredoka", system-ui, sans-serif;
  font-size: 1.15rem;
  cursor: pointer;
}

.jz-lobby-config-panel.is-time-unlimited [data-qse-timing] {
  display: none !important;
}

.jz-lobby-guest-panel .hint {
  color: rgba(255, 255, 255, 0.72);
}

.jz-lobby-screen .lobby-need {
  margin: 0;
  color: #ff8161;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
}

.jz-lobby-screen .party-lobby-actions,
.jz-lobby-screen .cao-lobby-config {
  gap: 0.65rem;
}

.jz-lobby-screen .party-custom {
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 960px) {
  .jz-lobby-shell {
    width: min(1280px, calc(100% - 32px));
  }

  .jz-lobby-grid {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 1rem;
  }

  .jz-lobby-config-panel,
  .jz-lobby-guest-panel {
    height: auto;
    align-self: start;
  }

  .jz-lobby-ready-btn,
  .jz-lobby-start {
    margin-top: 0.15rem;
  }

  .jz-lobby-roster {
    max-height: none;
  }

  .jz-lobby-config-panel:not(.is-guest-view) .jz-lobby-settings-open:not([hidden]) {
    display: inline-flex;
  }

  .jz-lobby-config-panel.is-guest-view .jz-lobby-settings-overlay {
    display: none !important;
  }

  .jz-lobby-settings-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 90;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
  }

  .jz-lobby-settings-overlay.is-open {
    display: flex;
  }

  .jz-lobby-settings-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    border: 0;
    margin: 0;
    padding: 0;
    background: rgba(5, 2, 12, 0.72);
    cursor: pointer;
  }

  .jz-lobby-settings-sheet {
    position: relative;
    z-index: 1;
    width: 100%;
    max-height: min(88dvh, 760px);
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
    border-radius: 22px 22px 0 0;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-bottom: 0;
    background: linear-gradient(180deg, #440049 0%, #2a0630 42%, #1a0b2e 100%);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
    gap: 0.85rem;
    animation: jz-lobby-sheet-up 0.22s ease;
  }

  .jz-lobby-settings-scroll {
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: 0.15rem;
    max-height: calc(min(88dvh, 760px) - 140px);
  }

  .jz-lobby-settings-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.22);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
  }

  .jz-lobby-settings-done {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin-top: 0.15rem;
    border-radius: 24px;
    border: 2px solid #f9af96;
    background: linear-gradient(90deg, #ff5e35 0%, #ff3366 100%);
    color: #fff;
    font-family: "Fredoka One", "Fredoka", system-ui, sans-serif;
    font-size: 1.1rem;
    cursor: pointer;
  }

  .jz-lobby-config-title {
    font-size: 1.2rem;
    margin: 0;
  }
}

@keyframes jz-lobby-sheet-up {
  from {
    transform: translateY(18px);
    opacity: 0.6;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .jz-lobby-screen.screen.active {
    padding: 18px 0 calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .jz-lobby-shell {
    width: calc(100% - 28px);
  }

  .jz-lobby-header {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 1rem;
  }

  .jz-lobby-header-copy {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    flex: 1;
    min-width: 0;
  }

  .jz-lobby-title {
    font-size: 1.35rem;
  }

  .jz-lobby-subtitle {
    font-size: 0.88rem;
  }

  .jz-lobby-leave {
    width: auto;
    min-height: 42px;
    padding: 0 0.85rem;
    font-size: 0.88rem;
  }

  .jz-lobby-leave span {
    display: none;
  }

  .jz-lobby-meta-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
  }

  .jz-lobby-meta-box {
    padding: 0.7rem 0.75rem;
  }

  .jz-lobby-meta-value {
    font-size: 1.05rem;
  }

  .jz-lobby-roster .player-card,
  .jz-lobby-card {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 0.55rem;
    min-height: 78px;
    padding: 0.55rem 0.6rem;
  }

  .jz-lobby-card-avatar {
    width: 58px;
    height: 58px;
  }

  .jz-lobby-invite-icon {
    width: 58px;
    height: 54px;
  }

  .jz-lobby-card-name {
    font-size: 1.02rem;
  }

  .jz-lobby-card-status {
    font-size: 0.82rem;
  }

  .jz-lobby-card-tags {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 10.5rem;
    gap: 0.35rem;
  }

  .jz-lobby-badge,
  .jz-lobby-badge-host,
  .jz-lobby-badge-ready {
    height: 30px;
    min-width: 0;
    padding: 0 0.7rem;
    font-size: 0.88rem;
  }

  .jz-lobby-badge-host {
    padding: 0 0.7rem 0 0.4rem;
  }

  .jz-lobby-badge-host-crown {
    width: 15px;
    height: 15px;
  }

  .jz-lobby-invite {
    grid-template-columns: 58px minmax(0, 1fr);
    min-height: 78px;
    font-size: 0.98rem;
  }

  .jz-lobby-settings-sheet {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
}

body.jz-lobby-settings-lock {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .jz-lobby-leave,
  .jz-lobby-start,
  .jz-lobby-invite,
  .jz-lobby-settings-sheet {
    transition: none;
    animation: none;
  }

  .jz-lobby-start:hover:not(:disabled),
  .jz-lobby-start:focus-visible:not(:disabled) {
    transform: none;
  }

  .jz-lobby-badge-ready {
    animation: none;
  }
}
