/* Own room UI; all other game styling remains upstream. */
.friend-dialog {
  box-sizing: border-box; width: min(520px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px); margin: auto; padding: 22px;
  overflow: auto; color: #f5f8ff; background: linear-gradient(155deg, #284d91, #11274d);
  border: 3px solid #edf5ff; border-radius: 12px;
  box-shadow: inset 0 0 0 3px #5b83d6, 0 12px 60px #0009;
  font: 16px/1.5 var(--font); user-select: text;
}
.friend-dialog::backdrop { background: #040b1ccc; backdrop-filter: blur(4px); }
.friend-dialog [hidden], .friend-hud[hidden] { display: none !important; }
.friend-header { display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.friend-header h2 { margin: 0; font-size: 27px; color: #ffd23f; }
.friend-close { border: 0; background: #ffffff16; color: white; font: inherit; font-size: 23px; width: 38px; height: 38px; cursor: pointer; border-radius: 7px; }
.friend-close:hover { background: #ffffff35; }
.friend-intro { color: #c6d6f3; margin: 5px 0 12px; font-size: 14px; }
.friend-status { font-size: 13px; margin: 0 0 18px; color: #b9cbf0; }
.friend-status[data-state="online"] { color: #87efa7; }
.friend-connect > label, .friend-join > label { display: block; color: #dfebff; font-size: 14px; margin-bottom: 5px; }
.friend-connect > input { width: 100%; margin-bottom: 12px; }
.friend-connect > button { width: 100%; }
.friend-divider { font-size: 13px; color: #b9cbf0; text-align: center; margin: 20px 0 14px; }
.friend-join { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.friend-join label { grid-column: 1 / -1; }
.friend-join input { width: 100%; min-width: 0; text-transform: uppercase; letter-spacing: .15em; }
.friend-dialog .btn { font-family: inherit; }
.friend-dialog :focus-visible, .friend-hud:focus-visible { outline: 3px solid #a5dcff; outline-offset: 3px; }
.friend-code-block { background: #07183188; border: 1px solid #6d96d6; border-radius: 9px; padding: 15px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.friend-code-block > span { font-size: 13px; color: #b9cbf0; }
.friend-code { display: block; color: #ffd23f; font: bold 38px/1.3 ui-monospace, monospace; letter-spacing: .18em; padding-left: .18em; }
.friend-members { padding: 0; margin: 17px 0; list-style: none; }
.friend-member { padding: 11px 0; border-bottom: 1px solid #ffffff25; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.friend-member-name { font-weight: bold; overflow-wrap: anywhere; }
.friend-member-detail { font-size: 12px; color: #b9cbf0; text-align: right; }
.friend-room-note { font-size: 13px; color: #cfdef9; min-height: 40px; }
.friend-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.friend-actions button { flex: 1 1 180px; }
.friend-error { color: #ffbdc6; min-height: 20px; font-size: 14px; margin: 14px 0 0; white-space: pre-wrap; }
.friend-footnote { color: #b9cbf0; font-size: 12px; margin: 9px 0 0; }
.friend-hud { position: fixed; z-index: 80; bottom: 12px; left: 50%; transform: translateX(-50%);
  background: #0b1b36e8; color: #dcecff; padding: 8px 13px; border: 1px solid #7fa4dc;
  border-radius: 7px; font: 12px/1.3 var(--font); white-space: nowrap; cursor: pointer; }
@media (max-height: 560px) {
  .friend-dialog { padding: 15px 18px; }
  .friend-member { padding: 6px 0; }
  .friend-room-note { min-height: 0; }
  .friend-hud { bottom: 6px; padding: 5px 9px; }
}
