#roomDialog { width: min(840px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 24px; color: #eeeade; background: #132a24; border: 1px solid #b89a59; border-radius: 8px; box-shadow: 0 24px 90px #000a; }
#roomDialog::backdrop { background: #040b09c9; backdrop-filter: blur(5px); }
.room-heading, .room-invite, .room-settings, .room-footer { display: flex; align-items: center; gap: 12px; }
.room-heading { justify-content: space-between; margin-bottom: 20px; }
.room-heading h2 { font-size: 26px; margin: 0; }
.room-heading .eyebrow { font-size: 10px; margin: 0 0 4px; }
#roomClose, #roomCopy { width: 38px; height: 38px; padding: 0; flex-shrink: 0; }
.room-mode-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.room-mode-options button { position: relative; height: 255px; text-align: left; overflow: hidden; padding: 20px; border: 1px solid #907c4e; background: #12221d; }
.room-mode-options button:nth-child(2) { background: #30232a; }
.room-mode-options img { position: absolute; right: 0; height: 100%; width: 64%; top: 0; object-fit: cover; object-position: top; opacity: .9; }
.room-mode-options button::after { position: absolute; inset: 0; content: ""; background: linear-gradient(90deg, #0a1713db, transparent); }
.room-mode-options span { position: relative; z-index: 1; display: grid; gap: 8px; height: 100%; align-content: end; }
.room-mode-options small { color: #d1b773; font-size: 11px; }
.room-mode-options strong { font-size: 28px; }
.room-mode-options em { font-style: normal; color: #dbd5c3; font-size: 12px; }
#roomJoinForm { display: flex; gap: 10px; align-items: center; padding-top: 22px; margin-top: 22px; border-top: 1px solid #ffffff20; }
#roomJoinCode { width: 180px; min-width: 0; height: 42px; background: #0c1c18; border: 1px solid #63766a; color: #f7e8ba; padding: 8px 12px; border-radius: 4px; font: inherit; text-transform: uppercase; }
#roomJoinForm label { margin-right: auto; }
.room-invite { margin-bottom: 16px; flex-wrap: wrap; }
#roomCode { font-size: 18px; color: #e8c879; font-weight: 700; }
#roomPopulation { margin-left: auto; font-size: 13px; color: #b3c7bb; }
.room-seats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.room-seat { padding: 12px 8px; text-align: center; border: 1px solid #456056; border-radius: 6px; background: #0c1e19; display: grid; justify-items: center; gap: 4px; }
.room-seat--self { border-color: #d1b366; }
.room-seat .seat-avatar { width: 68px; height: 68px; margin: 0 0 4px; }
.room-seat strong { font-size: 17px; }
.room-seat span { font-size: 11px; color: #c3cabe; }
.room-seat small { font-size: 11px; color: #8cceaa; }
.room-empty { height: 72px; display: grid; place-content: center; font-size: 32px; color: #6a8377; }
.room-settings { flex-wrap: wrap; border-bottom: 1px solid #ffffff20; padding: 18px 0; font-size: 13px; }
.room-settings label { display: flex; align-items: center; gap: 6px; }
.room-settings input { accent-color: #68c99c; width: 17px; height: 17px; }
.room-settings select { height: 34px; width: 58px; color: #eeeade; background: #0b1e17; border: 1px solid #698271; border-radius: 4px; font: inherit; }
#roomRequirement { color: #cfc095; margin-left: auto; }
.room-roster-title { font-size: 14px; margin: 16px 0 10px; }
.room-roster { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.room-roster button { padding: 0 0 8px; overflow: hidden; border: 1px solid #435a50; border-radius: 5px; display: grid; gap: 4px; background: #0c1713; }
.room-roster button[aria-pressed="true"] { border-color: #e2bc60; box-shadow: inset 0 0 0 1px #e2bc60; background: #263d30; }
.room-roster img { width: 100%; height: min(22dvh, 165px); object-fit: contain; object-position: center; }
.room-roster strong { font-size: 15px; }
.room-roster span { font-size: 10px; color: #b9cbbd; }
.room-footer { margin-top: 20px; flex-wrap: wrap; }
.room-footer button { font-size: 13px; min-height: 40px; }
#roomReadyStatus { font-size: 12px; color: #c0c9bc; margin-right: auto; }
#roomError { color: #f2d48e; font-size: 13px; line-height: 1.6; margin: 14px 0 0; overflow-wrap: anywhere; }
#roomNotice { position: fixed; z-index: 100; top: 70px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 24px); padding: 10px 18px; background: #142e25; color: #f5d893; border: 1px solid #a18d59; border-radius: 5px; font-size: 13px; }
@media (max-width: 600px) {
  #roomDialog { padding: 14px; }
  .room-heading { margin-bottom: 12px; }
  .room-heading h2 { font-size: 22px; }
  .room-mode-options { gap: 8px; }
  .room-mode-options button { height: 220px; padding: 12px; }
  .room-mode-options img { width: 90%; }
  .room-mode-options strong { font-size: 21px; }
  .room-mode-options em { font-size: 10px; }
  #roomJoinForm { flex-wrap: wrap; }
  #roomJoinForm label { width: 100%; }
  #roomJoinCode { flex: 1; }
  .room-seats { gap: 5px; }
  .room-seat { padding: 8px 2px; }
  .room-seat .seat-avatar { width: 48px; height: 48px; }
  .room-seat strong { font-size: 13px; }
  .room-seat span, .room-seat small { font-size: 9px; }
  .room-empty { height: 52px; }
  #roomCode { font-size: 16px; }
  #roomPopulation { font-size: 11px; }
  .room-invite { gap: 6px; }
  .room-roster { gap: 5px; }
  .room-roster img { height: min(20dvh, 110px); }
  .room-roster strong { font-size: 12px; }
  .room-roster span { font-size: 9px; }
  .room-settings { gap: 8px; font-size: 12px; }
  .room-footer { gap: 7px; margin-top: 14px; }
  #roomReadyStatus { order: -1; width: 100%; }
  #roomStart { margin-left: auto; }
}
@media (max-height: 550px) and (orientation: landscape) {
  #roomDialog { padding: 12px 18px; }
  .room-heading { margin-bottom: 8px; }
  .room-heading h2 { font-size: 20px; }
  .room-heading .eyebrow, .room-roster-title { display: none; }
  .room-invite { margin-bottom: 6px; }
  .room-seat { padding: 4px; grid-template-columns: 36px 1fr; text-align: left; justify-items: start; gap: 1px 5px; }
  .room-seat .seat-avatar { width: 36px; height: 36px; margin: 0; grid-row: span 3; }
  .room-seat strong { font-size: 12px; }
  .room-empty { height: 36px; grid-row: span 3; }
  .room-settings { padding: 6px 0; }
  .room-roster { margin-top: 6px; }
  .room-roster img { height: 58px; }
  .room-roster span { display: none; }
  .room-footer { margin-top: 8px; }
  .room-footer button { min-height: 32px; }
  .room-mode-options button { height: 175px; }
  #roomJoinForm { margin-top: 10px; padding-top: 10px; }
}
