/* ===== extracted: lobby-host-options-stage-restyle ===== */

#lobby-panel .lp-waiting-room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

#lobby-panel .lp-waiting-room-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

#lobby-panel .lp-waiting-room-titlebar .lp-section-title {
  margin-bottom: 0;
}


#host-options-panel {
  width: 980px;
  height: 700px;
  max-width: min(980px, calc(var(--app-authored-width) - 24px));
  max-height: min(700px, calc(var(--app-authored-height) - 24px));
}

#host-options-panel > .panel-header {
  flex: 0 0 auto;
}

#host-options-panel > .panel-header > .panel-header-controls {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex !important;
  align-items: center;
  gap: 12px;
  z-index: 2;
  pointer-events: auto;
}

#host-options-panel > .panel-header > .panel-header-controls .panel-pin-btn,
#host-options-panel > .panel-header > .panel-header-controls .panel-close-x {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

#host-options-panel > .panel-body.host-options-panel-body {
  width: 100%;
  height: calc(100% - var(--panel-header-h, 34px));
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}

#host-options-panel #lp-host-opts {
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
}

#host-options-panel #lp-joinable-wrap {
  display: flex;
}

#host-options-panel .lp-host-opts {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
  border-radius: 18px;
  border: 1px solid rgba(110, 149, 190, 0.24);
  background: linear-gradient(180deg, rgba(17, 26, 40, 0.96), rgba(10, 15, 24, 0.97));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  overflow: hidden;
}

#host-options-panel .lp-host-opts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 10px;
  flex: 0 0 auto;
  align-items: start;
  width: 100%;
}

#host-options-panel .lp-host-opts-section {
  border-radius: 16px;
  border: 1px solid rgba(110, 149, 190, 0.18);
  background: linear-gradient(180deg, rgba(23, 35, 53, 0.92), rgba(12, 20, 31, 0.94));
  padding: 10px;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

#host-options-panel .lp-host-opts-section-pool {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

#host-options-panel .lp-host-opts-subheader {
  margin: 0 0 10px 0;
  color: #CFE0F0;
  font-size: 12px;
  letter-spacing: 1.15px;
  text-transform: uppercase;
}

#host-options-panel .lp-host-opts-row {
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

#host-options-panel .lp-host-opts-row:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}

#host-options-panel .lp-host-opts-row-stack-sm {
  align-items: flex-start;
  flex-direction: column;
}

#host-options-panel .lp-host-opts-row-label {
  font-size: 12px;
  opacity: 0.9;
  min-width: 0;
  color: #d0e1f4;
}

#host-options-panel .lp-host-opts-inline-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

#host-options-panel .lp-host-opts-select-sm {
  width: 110px;
}

#host-options-panel .lp-host-opts-hint-block {
  margin-top: 2px;
  line-height: 1.3;
  color: #d0e1f4;
}

#host-options-panel .lp-host-opts-hint {
  color: #d0e1f4;
}

#host-options-panel button,
#host-options-panel select,
#host-options-panel input[type="text"],
#host-options-panel input[type="number"],
#lobby-panel button,
#lobby-panel select,
#lobby-panel input[type="text"] {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(117, 156, 198, 0.26);
  background: linear-gradient(180deg, rgba(35, 50, 72, 0.94), rgba(17, 26, 40, 0.96));
  color: #CFE0F0;
}

#host-options-panel .lp-host-opts-hint {
  display: block;
  line-height: 1.3;
}

#host-options-panel .lp-host-opts-pool {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  align-content: start;
  padding: 2px 2px 6px 0;
}

#host-options-panel .lp-host-opts-pool-row {
  gap: 5px;
  font-size: 11px;
  line-height: 1.15;
  min-height: 20px;
  padding: 7px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.04);
}

#host-options-panel .lp-host-opts-pool-row input {
  transform: scale(0.95);
  margin: 0;
}

@media (max-width: 900px) {
  #host-options-panel .lp-host-opts-grid {
    grid-template-columns: 1fr;
  }

  #host-options-panel .lp-host-opts-pool {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ============================================================
   MP Lobby merged waiting-room restyle + sliding game drawer
   ============================================================ */
#lobby-panel {
  width: 1260px;
  height: 780px;
  max-width: min(1260px, calc(var(--app-authored-width) - 24px));
  max-height: min(780px, calc(var(--app-authored-height) - 24px));
}

#lobby-panel .lp-wrapper-stage {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: auto;
  overflow: visible;
}

#lobby-panel .lp-stage-shell {
  position: relative;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: auto;
  padding-right: 46px;
  overflow: hidden;
}

#lobby-panel .lp-waiting-room-stage-full,
#lobby-panel #lp-waiting-room-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 22px;
  border: 2px solid rgba(105, 148, 192, 0.45);
  background:
    linear-gradient(180deg, rgba(10,24,40,0.88), rgba(9,18,30,0.94)),
    linear-gradient(180deg, #1b3a57 0%, #11263b 48%, #0d1827 100%);
  overflow: hidden;
  box-shadow:
    0 14px 36px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 0 0 1px rgba(255,255,255,0.02);
}

#lobby-panel #lp-waiting-room-chao-container {
  position: absolute;
  inset: 0;
  z-index: 1;
}

#lobby-panel .lp-stage-topbar {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 12px;
  bottom: 72px;
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(260px, 1fr) minmax(300px, 1.1fr);
  align-items: start;
  gap: 12px;
  z-index: 5;
  pointer-events: none;
}

#lobby-panel .lp-stage-controls,
#lobby-panel .lp-stage-choice,
#lobby-panel .lp-player-dock,
#lobby-panel .lp-chat-overlay-left,
#lobby-panel .lp-bottom-chat-strip {
  pointer-events: auto;
}

#lobby-panel .lp-stage-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(8, 18, 30, 0.62);
  border: 1px solid rgba(111, 154, 196, 0.3);
  box-shadow: 0 8px 20px rgba(0,0,0,0.28);
  backdrop-filter: blur(2px);
}
