/* Compact private-match card. Loaded after the shared mobile stylesheet so
   the room never inherits the full-width game/home controls. */

#homeScreen:has(#codeRoomPanel:not(.hidden)) .seo-content {
  display: none !important;
}

#homeScreen #codeRoomPanel.code-room-panel {
  width: min(680px, calc(100% - 24px));
  max-width: 680px;
  min-width: 0;
  margin: 0 auto 24px;
  padding: 16px;
  gap: 10px;
  border: 1px solid rgba(79, 192, 255, 0.3);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 0%, rgba(35, 151, 225, 0.12), transparent 44%),
    rgba(4, 12, 23, 0.88);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.42),
    inset 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

#codeRoomPanel .code-room-head {
  min-width: 0;
  padding-bottom: 2px;
}

#codeRoomPanel .code-room-head h3 {
  font-size: clamp(1rem, 2vw, 1.25rem);
}

#codeRoomPanel #backToMainMenuBtn {
  width: auto !important;
  min-width: 104px !important;
  min-height: 38px !important;
  padding: 7px 12px !important;
  font-size: 0.78rem !important;
}

#codeRoomPanel .code-section {
  min-width: 0;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

#codeRoomPanel .code-section-header {
  min-width: 0;
  gap: 2px;
}

#codeRoomPanel .code-section-header h4 {
  font-size: 0.98rem;
}

#codeRoomPanel .code-section-desc {
  font-size: 0.76rem;
  line-height: 1.35;
}

#codeRoomPanel #createRoomBtn,
#codeRoomPanel #cancelCreateBtn,
#codeRoomPanel #joinRoomBtn {
  min-height: 38px;
  padding: 7px 12px;
}

#codeRoomPanel .join-box {
  grid-template-columns: minmax(0, 1fr) 118px;
  align-items: end;
  gap: 10px;
  margin-top: 0;
}

#codeRoomPanel .join-box label {
  min-width: 0;
  margin: 0;
}

#codeRoomPanel #roomCodeInput {
  min-width: 0;
  min-height: 38px;
  text-align: center;
}

#codeRoomPanel .room-code-display,
#codeRoomPanel .room-invite-section,
#codeRoomPanel .invite-link-box,
#codeRoomPanel .waiting-info {
  min-width: 0;
}

@media (max-width: 620px) {
  #homeScreen #codeRoomPanel.code-room-panel {
    width: 100%;
    max-width: 100%;
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 13px;
  }

  #codeRoomPanel .join-box {
    grid-template-columns: 1fr;
  }

  #codeRoomPanel #joinRoomBtn {
    width: 100%;
  }
}

@media (orientation: landscape) and (max-height: 620px) {
  #homeScreen #codeRoomPanel.code-room-panel {
    width: min(640px, 100%);
    max-width: 640px;
    margin: 0 auto 12px;
    padding: 10px 12px;
    gap: 7px;
    border-radius: 12px;
  }

  #codeRoomPanel .code-room-head h3 {
    font-size: 0.96rem;
  }

  #codeRoomPanel #backToMainMenuBtn {
    min-width: 96px !important;
    min-height: 34px !important;
    padding: 5px 10px !important;
    font-size: 0.72rem !important;
  }

  #codeRoomPanel .code-section {
    gap: 6px;
    padding: 8px 10px;
  }

  #codeRoomPanel .code-section-header h4 {
    font-size: 0.86rem;
  }

  #codeRoomPanel .code-section-desc,
  #codeRoomPanel .join-box label {
    font-size: 0.68rem;
    line-height: 1.25;
  }

  #codeRoomPanel #createRoomBtn,
  #codeRoomPanel #cancelCreateBtn,
  #codeRoomPanel #joinRoomBtn,
  #codeRoomPanel #roomCodeInput {
    min-height: 34px;
    padding-top: 5px;
    padding-bottom: 5px;
  }
}
