/* OverLife — shared rooms, five seats, text and voice. */
#roomsPanel {
  margin: 0 0 26px;
  padding: 24px;
  min-width: 0;
  background: linear-gradient(140deg, #32170df2, #1e100cf2);
  border: 1px solid #ff8a363d;
  border-radius: 24px;
  box-shadow: 0 14px 40px #0002, inset 0 1px #ffbc7620;
  color: #ffe0c3;
}
#roomsPanel *, #roomsPanel *::before, #roomsPanel *::after { box-sizing: border-box; }
.room-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.room-header h2 { font-size: 25px; letter-spacing: -.8px; margin: 0 0 7px; }
.room-header .lead, .room-header p { margin: 0; color: #d4a17c; font-size: 12px; line-height: 1.65; }
.room-status { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; min-height: 30px; padding: 6px 10px; border: 1px solid #ff98374d; border-radius: 30px; background: #46200f; color: #ffc285; font-size: 10px; line-height: 1.5; }
.room-status::before { content: ''; width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #be7747; }
.room-status[data-status='connected']::before, .room-status[data-status='live']::before { background: #ffa12c; box-shadow: 0 0 8px #ff8b4066; }
.room-status[data-status='error'], .room-status[data-status='disconnected'] { color: #ffb0a0; border-color: #d965454d; background: #3c1b16; }
.room-setup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 18px; border-radius: 18px; background: #1b100c80; border: 1px solid #ff8b362b; margin-bottom: 20px; }
.room-setup > *, .room-name-row > *, .room-limit-row > * { min-width: 0; }
.room-setup .field, .room-name-row .field, .room-limit-row .field { margin: 0; }
#roomsPanel input, #roomsPanel select, #roomsPanel textarea { min-width: 0; width: 100%; min-height: 46px; padding: 11px 12px; border: 1px solid #ff8c404d; border-radius: 11px; background: #28160f; color: #ffdfc2; font: inherit; font-size: 16px; }
#roomsPanel input::placeholder { color: #b7805c; }
#roomsPanel select { color-scheme: dark; }
.room-name-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; }
.room-limit-row { display: flex; align-items: end; gap: 12px; }
.room-limit-row .field { flex: 1; }
.room-setup .room-toolbar, .room-setup .room-invite, .room-setup .room-name-row { grid-column: 1 / -1; }
.room-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 15px 0; }
#roomsPanel .btn { min-height: 44px; padding: 11px 15px; white-space: normal; text-wrap: balance; }
.room-toolbar .btn[aria-pressed='true'] { background: #ff8a1d; color: #3e1b0c; border-color: #ffc071; }
.room-toolbar .btn.danger { color: #ad3422; }
.room-invite { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; margin: 16px 0; }
.room-invite > label, .room-invite > input { flex: 1 1 210px; min-width: 0; }
.room-invite > .btn { flex: 0 0 auto; }
.room-invite-code { display: block; overflow-wrap: anywhere; font-size: 11px; color: #d99b6a; line-height: 1.65; }
.room-seats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 11px; margin: 22px 0; }
.room-seat { position: relative; min-width: 0; padding: 17px 11px 12px; border: 1px solid #ff933e5c; border-radius: 18px; background: radial-gradient(ellipse at 50% 0, #8f3d1625, transparent 80%), #2a160e; text-align: center; box-shadow: 0 5px 18px #0002; }
.room-seat.seat-empty { background: #21130d80; border-style: dashed; border-color: #a960364d; box-shadow: none; }
.room-seat.seat-self { border-color: #ff9d3b; background: radial-gradient(ellipse at top, #c2581736, transparent 85%), #32190e; box-shadow: 0 0 0 1px #ff8a292b, 0 0 25px #ff781518; }
.seat-number { position: absolute; top: 9px; left: 11px; font-size: 10px; font-weight: 700; color: #b98761; }
.seat-self .seat-number { color: #ffb669; }
.seat-avatar { display: grid; place-items: center; width: 48px; height: 48px; margin: 7px auto 11px; border: 1px solid #ffb36963; border-radius: 50%; background: linear-gradient(145deg, #ff9425, #e4561c); color: #38190a; font: 700 21px 'Space Grotesk', system-ui, sans-serif; box-shadow: 0 4px 14px #0002; }
.seat-empty .seat-avatar { background: #4b2a18; border-color: #a3623a45; color: #bd865c; box-shadow: none; }
.seat-name { display: block; min-height: 18px; margin: 0 auto 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #ffe0bf; font-size: 12px; font-weight: 700; }
.seat-mic { display: block; min-height: 18px; margin: 0 0 10px; color: #a87c5e; font-size: 10px; }
.seat-mic[data-active='true'], .seat-mic.is-live { color: #ffaf59; }
.room-seat .btn { width: 100%; min-height: 44px; padding: 9px 7px !important; border-radius: 10px; font-size: 11px !important; }
.room-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.room-layout > *, .room-stage { min-width: 0; }
.room-stage { position: relative; display: grid; place-items: center; min-height: 180px; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid #ff8a352e; border-radius: 17px; background: radial-gradient(ellipse at center, #482415, #140e0a 75%); color: #d99f72; text-align: center; }
.room-stage video { display: block; width: 100%; height: 100%; max-height: 440px; background: #100c09; object-fit: contain; }
.room-stage > p { padding: 20px; font-size: 12px; line-height: 1.65; }
.room-stage audio { width: 100%; }
.room-audio-notice { margin: 12px 0; padding: 11px 13px; border: 1px solid #ff953b3d; border-radius: 12px; background: #46210f80; color: #ffc48c; font-size: 11px; line-height: 1.7; }
.room-audio-notice .btn { margin-top: 9px; }
.room-chat-log { height: 240px; min-width: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; padding: 13px; border: 1px solid #ff8a3530; border-radius: 16px; background: #150d09b3; scrollbar-width: thin; scrollbar-color: #a35429 #20120c; }
.room-chat-item { max-width: 96%; padding: 10px 12px; border-radius: 12px; background: #382013; color: #efc09b; overflow-wrap: anywhere; }
.room-chat-item strong { display: inline; margin-right: 7px; font-size: 11px; color: #ffa33b; }
.room-chat-item time, .room-chat-item .timestamp { color: #ae8060; font-size: 9px; }
.room-chat-item p { margin: 5px 0 0; color: #f1c5a3; font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.room-chat-item.mine { align-self: flex-end; background: #63300f; }
.room-chat-item.mine strong { color: #ffc984; }
.room-chat-system { margin: 3px 0; padding: 0 6px; text-align: center; color: #b78a68; font-size: 10px; line-height: 1.65; }
.room-chat-compose { display: flex; align-items: stretch; gap: 8px; margin-top: 11px; }
.room-chat-compose input { flex: 1 1 auto; width: 0 !important; }
.room-chat-compose .btn { flex: 0 0 auto; padding-inline: 13px !important; }
.room-error { margin: 12px 0; padding: 12px 14px; border: 1px solid #d35d3759; border-left: 3px solid #ee7939; border-radius: 11px; background: #412015; color: #ffbd9c; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
#roomsPanel .hint { color: #c28f69; }
#roomsPanel :is(button, input, select, textarea, a):focus-visible { outline: 2px solid #ffb361; outline-offset: 4px; }
@media (max-width: 900px) {
  .room-layout { grid-template-columns: minmax(0, 1fr); }
  .room-chat-log { height: 250px; }
}
@media (max-width: 680px) {
  #roomsPanel { padding: 18px; border-radius: 20px; }
  .room-header { gap: 10px; flex-wrap: wrap; }
  .room-header h2 { font-size: 23px; }
  .room-setup { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .room-seats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
  .room-seat { padding-inline: 9px; }
  .room-name-row { grid-template-columns: minmax(0, 1fr); }
  .room-setup .room-toolbar, .room-setup .room-invite, .room-setup .room-name-row { grid-column: auto; }
}
@media (max-width: 420px) {
  .room-seats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room-status { max-width: 100%; white-space: normal; }
  .room-toolbar .btn { flex: 1 1 130px; }
  .room-invite > .btn { flex: 1 1 auto; }
  .room-stage { min-height: 160px; }
  .room-chat-compose { gap: 6px; }
  .room-chat-compose .btn { padding-inline: 10px !important; font-size: 12px; }
}
#roomsPanel { display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; padding: 16px; }
#roomsPanel .room-header { flex: 0 0 auto; }
#roomsPanel .room-header h2 { margin: 6px 0; }
#roomsPanel .room-setup { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#roomsPanel .room-session { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; }
#roomsPanel .room-layout { flex: 1 1 auto; min-height: 0; }
#roomsPanel .room-stage { position: relative; display: grid; place-items: center; text-align: center; min-height: 80px; }
#roomsPanel .room-stage video { width: 100%; height: 100%; object-fit: contain; }
#sharedStageEmpty { padding: 12px; }
#sharedStageEmpty h3 { margin: 6px 0; font-size: 18px; }
#sharedStageEmpty p { margin: 0; font-size: 11px; max-width: 360px; }
#roomsPanel .room-seat-release { position: absolute; right: 0; top: 0; width: 24px; height: 24px; min-height: 24px; border-radius: 50%; background: #5d2815; color: #ffc38b; }
#roomsPanel .room-bottom-tools { min-height: 36px; align-items: center; }
#roomsPanel .room-bottom-tools .field { display: flex; align-items: center; gap: 6px; margin: 0; }
#roomsPanel .room-bottom-tools select { width: 65px; min-height: 34px; margin: 0; padding: 4px 7px; }
#roomsPanel .room-status { font-size: 10px; }
.room-directory-controls { display: flex; gap: 8px; flex: 0 0 auto; flex-wrap: wrap; margin-bottom: 8px; }
.room-directory-controls input { min-width: 100px; flex: 1; padding: 10px 12px; border-radius: 12px; border: 1px solid #ff852f44; background: #29160f; color: #ffceaa; font-size: 16px; }
.public-live-card { display: flex; flex-direction: column; align-items: flex-start; min-height: 170px; padding: 18px; gap: 10px; border: 1px solid #ff852f44; border-radius: 18px; background: radial-gradient(ellipse at 100% 0,#6b2f14,#25120d); text-align: left; color: #ffd1ac; }
.public-live-card h3 { margin: 0; font-size: 18px; }
.public-live-card p { margin: 0; font-size: 11px; color: #d89a6f; }
.public-live-card .btn { margin-top: auto; }
.shared-studio-entry { margin-top: 10px; }
#browsePublicLives { margin-top: 16px; width: 100%; }
@media(max-width:760px){#roomsPanel{padding:12px}.live-room-fixed .room-seat{min-height:112px}.room-directory-controls .btn{font-size:11px;padding:9px 12px}.shared-studio-entry{font-size:11px;padding:8px 12px}}
