/* Sala de carrera: cabecera y acciones fijas, solo el centro se desplaza.
   Usa la misma escala de #ui; no agrega filtros sobre el canvas animado. */
.lobby-card:has(.lobby-room.is-visible) {
  width: 780px; max-width: calc(100% - 28px); max-height: calc(100% - 24px);
  padding: 0; overflow: hidden; border-radius: 22px;
  border: 1px solid #627089; background: linear-gradient(145deg, #192236, #0a101c 70%);
  box-shadow: 0 18px 50px #0008, inset 0 1px #ffffff18;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.screen-lobby > .pause-scrim { backdrop-filter: none; -webkit-backdrop-filter: none; }
.lobby-card > .lobby-msg:empty { display: none; }
.lobby-room { min-height: 0; gap: 0; }
.lobby-room-header { display: flex; gap: 18px; align-items: center; flex-shrink: 0; padding: 16px 22px; border-bottom: 1px solid #ffffff14; }
.lobby-heading { flex: 1; min-width: 0; }
.lobby-room .pin-title { text-align: left; font-size: 27px; margin-top: 4px; }
.lobby-invite { position: relative; display: flex; align-items: center; gap: 10px; }
.lobby-invite > span { max-width: 75px; font: 600 10px/1.4 var(--body); color: #aebad0; letter-spacing: .06em; }
.lobby-room .lobby-code { margin: 0; padding: 8px 12px 8px 17px; font-size: 24px; line-height: 1; min-height: 44px; }
.lobby-room .lobby-copy-toast { position: absolute; top: 100%; right: 0; height: auto; margin-top: 2px; font-size: 9px; pointer-events: none; }
.lobby-room .lobby-leave {
  display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 10px;
  color: #ffd7d1; border-color: #ff665d88;
  background: linear-gradient(145deg, #7f221f, #3b1012);
  box-shadow: inset 0 1px #ffffff18, 0 5px 18px #3b000055;
}
.lobby-room .lobby-leave:hover { border-color: #ff8c83; background: linear-gradient(145deg, #9c2b26, #4a1416); }
.lobby-leave .ic, .lobby-armory-icon { display: flex; width: 22px; height: 22px; }
.lobby-leave svg, .lobby-armory-icon svg { width: 100%; height: 100%; }
.lobby-room-body { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; padding: 20px 22px; scrollbar-width: none; }
/* Sin barra de desplazamiento a la vista: con la fila de accesos en una
   sola linea el cuerpo entra casi siempre entero, y la barra vertical
   quedaba dibujada al costado sin nada que desplazar. El scroll SIGUE
   funcionando (overflow-y:auto arriba) para las pantallas donde si hace
   falta; solo se oculta el riel. */
.lobby-room-body::-webkit-scrollbar { width: 0; height: 0; }
.lobby-room .lobby-mode-picker { align-content: start; margin: 0; gap: 10px; }
.lobby-room .lobby-mode-label, .lobby-section-heading h3 { margin: 0; font: 600 13px/1.3 var(--body); letter-spacing: .03em; text-transform: none; text-align: left; color: #d2def0; }
.lobby-room .lobby-mode-chip { min-height: 45px; font-size: 14px; color: #bdc9dc; }
.lobby-room .lobby-mode-chip.on { color: var(--gold-ink); }
.lobby-room .lobby-mode-chip.on[data-mode="flood"] { color: #180a2c; }
.lobby-room .lobby-mode-rules { font-size: 14px; text-align: left; min-height: 2.7em; }
.lobby-room .lobby-mode-help { font-size: 13px; text-align: left; justify-content: flex-start; }
.lobby-room .lobby-mode-help::before { flex-basis: 6px; }
.lobby-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.lobby-player-count { font: 600 12px/1.3 var(--body); color: #a6b7d0; }
.lobby-room .lobby-player-row { display: grid; grid-template-columns: 10px minmax(0,1fr) auto; column-gap: 8px; row-gap: 4px; padding: 9px 10px; border-radius: 12px; min-height: 58px; }
.lobby-room .lobby-player-row .lb { font-size: 14px; font-weight: 600; }
.lobby-room .lobby-player-dot { grid-column: 1; grid-row: 1; width: 8px; height: 8px; }
.lobby-room .lobby-mode-vote { grid-column: 2; grid-row: 2; justify-self: start; padding: 1px 6px; font-size: 10px; max-width: 100%; }
.lobby-room .lobby-ready-dot { grid-column: 3; grid-row: 1; width: auto; font: 600 11px/1.2 var(--body); color: #9eacc1; }
.lobby-room .is-ready .lobby-ready-dot { color: #91edb0; }
.lobby-player-kit { grid-column: 3; grid-row: 2; text-align: right; font: 400 10px/1.3 var(--body); color: #a6b7d0; }
.lobby-empty-seat { display: flex; flex-direction: column; justify-content: center; gap: 5px; border: 1px dashed #64708877; border-radius: 12px; padding: 12px; color: #9faec4; font: 400 12px/1.3 var(--body); }
.lobby-empty-seat strong { color: #d0dbea; font-weight: 500; }
.lobby-room-footer { display: flex; align-items: stretch; flex-shrink: 0; gap: 16px; padding: 14px 22px; background: #0c1321; border-top: 1px solid #ffffff19; }
.lobby-shop-actions { display: grid; grid-template-columns: repeat(3, 1fr); flex: 1 1 520px; gap: 10px; min-width: 0; }
.lobby-room .lobby-armory { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 12px; text-align: left; padding: 10px 14px; border-color: #ffd95a50; background: linear-gradient(125deg, #ffd95a15, #ffffff04); }
.lobby-armory strong, .lobby-armory small { display: block; }
.lobby-armory > span:nth-child(2) { flex: 1; }
.lobby-armory strong { font-size: 14px; color: #ffe49a; }
.lobby-armory small { font-size: 12px; font-weight: 400; color: #abbad0; margin-top: 3px; }
.lobby-armory-icon { color: #ffdf85; flex-shrink: 0; }
/* Los tres accesos (poderes, power-ups, skins) en UNA fila y del mismo
   tamaño. Antes Skins colgaba solo en una segunda fila y se leía como un
   botón de otra categoría. Para que los tres títulos entren en una columna
   más angosta se les saca el "· Tienda" (redundante: el subtítulo ya lo
   dice) y el texto se deja partir en dos renglones en vez de desbordar. */
.lobby-room .lobby-armory strong { white-space: normal; line-height: 1.2; }
.lobby-room .lobby-skins { padding-top: 10px; padding-bottom: 10px; }
.lobby-room .lobby-ready-control { min-width: 150px; min-height: 44px; align-self: center; margin: 0; }
.lobby-room .lobby-ready-control b { font: 600 17px/1 var(--display); }
.lobby-room .lobby-countdown { min-width: 190px; text-align: center; font-size: 40px; padding: 0; line-height: 1.2; }
.lobby-nopowers[hidden] { display: none; }
.lobby-nopowers { display: grid; grid-template-columns: 1fr auto; gap: 4px 18px; flex: 1; align-items: center; border-left: 3px solid #ffda70; padding-left: 12px; }
.lobby-nopowers p { margin: 0; font-family: var(--body); }
.lobby-nopowers-title { color: #ffe49a; font-size: 15px; font-weight: 600; }
.lobby-nopowers-sub { color: #b9c7dd; font-size: 13px; line-height: 1.3; }
.lobby-nopowers-actions { display: flex; grid-column: 2; grid-row: 1 / span 2; gap: 8px; }
.has-powers-prompt .lobby-shop-actions { display: none; }
.screen-lobby.is-canvas-shop .lobby-card,
.screen-lobby.is-canvas-shop > .pause-scrim { display: none; }
.lobby-room button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lobby-room .lobby-msg { padding: 8px 16px; }

/* En horizontal se aprovecha el ancho; los controles no desaparecen al
   desplazar jugadores o modos. Sin animaciones ni blur extra en móviles. */
[data-platform="touch"] .lobby-card:has(.lobby-room.is-visible) { width: 860px; max-width: calc(100% - 32px); max-height: calc(100% - 24px); border-radius: 18px; }
[data-platform="touch"] .lobby-room-header { padding: 8px 14px; gap: 10px; }
[data-platform="touch"] .lobby-heading .duel-eyebrow { font-size: 10px; }
[data-platform="touch"] .lobby-room .pin-title { font-size: 24px; margin-top: 2px; }
[data-platform="touch"] .lobby-room-body { padding: 10px 14px; gap: 16px; }
[data-platform="touch"] .lobby-room .lobby-mode-picker { gap: 6px; }
[data-platform="touch"] .lobby-room .lobby-mode-chip { min-height: 46px; font-size: 16px; }
[data-platform="touch"] .lobby-room .lobby-mode-rules { font-size: 14px; min-height: 0; }
[data-platform="touch"] .lobby-room .lobby-mode-help { font-size: 13px; }
[data-platform="touch"] .lobby-room .lobby-player-row { min-height: 50px; padding: 6px 9px; }
[data-platform="touch"] .lobby-section-heading { margin-bottom: 6px; }
[data-platform="touch"] .lobby-room .lobby-player-row .lb { font-size: 15px; }
[data-platform="touch"] .lobby-room-footer { padding: 8px 14px; gap: 10px; }
[data-platform="touch"] .lobby-shop-actions { flex-basis: 470px; gap: 7px; }
[data-platform="touch"] .lobby-room .lobby-armory { padding: 7px 9px; gap: 7px; }
[data-platform="touch"] .lobby-armory strong { font-size: 12px; }
[data-platform="touch"] .lobby-armory small { font-size: 10px; }
[data-platform="touch"] .lobby-room .lobby-skins { padding-top: 5px; padding-bottom: 5px; }
[data-platform="touch"] .lobby-room .lobby-ready-control { min-width: 140px; }
[data-platform="touch"] .lobby-room .lobby-ready-control,
[data-platform="touch"] .lobby-room .lobby-leave,
[data-platform="touch"] .lobby-nopowers-actions .duel-button { min-height: 52px; }
[data-platform="touch"] .lobby-nopowers { gap: 4px 10px; }
[data-platform="touch"] .lobby-nopowers-actions .duel-button { max-width: 150px; font-size: 14px; }
@media (max-aspect-ratio: 1/1) {
  .lobby-room-body { grid-template-columns: 1fr; }
  .lobby-room-header { flex-wrap: wrap; }
  .lobby-invite > span { display: none; }
  .lobby-room-footer { flex-wrap: wrap; }
  .lobby-shop-actions { flex-basis: 100%; }
  .lobby-room .lobby-ready-control { flex: 1; }
  .lobby-nopowers { grid-template-columns: 1fr; }
  .lobby-nopowers-actions { grid-row: auto; grid-column: 1; }
}
