/* RackUp Lobby — Yahoo Pool inspired dark theme */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #1a1a2e;
  color: #e0e0e0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  height: 100dvh; /* dynamic viewport height — excludes iOS browser chrome */
  height: 100vh; /* fallback for older browsers */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@supports (height: 100dvh) {
  body { height: 100dvh; }
}

/* ── Header ── */
.header {
  background: #16213e;
  border-bottom: 2px solid #0f3460;
  padding: 8px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header h1 {
  font-size: 22px;
  color: #0a8c4a;
  letter-spacing: 2px;
}

.header h1 span {
  color: #e0e0e0;
  font-weight: 300;
}

.room-name {
  font-size: 15px;
  color: #ccc;
  font-weight: 600;
}

.room-name .room-label {
  color: #ffc800;
}

/* Room select — hidden on desktop, shown on mobile */
.room-select {
  display: none;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.connection-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 3px;
  font-weight: 600;
}

.connection-badge.connected { background: #0a3d24; color: #0dcc6b; }
.connection-badge.connecting { background: #3d3500; color: #ffc800; }
.connection-badge.error { background: #3d0000; color: #ff4444; }

.username-input {
  background: #0d1b2a;
  border: 1px solid #0f3460;
  color: #e0e0e0;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 13px;
  width: 130px;
}

.username-input:focus {
  outline: none;
  border-color: #0a8c4a;
}

/* My rating badge in header */
.my-rating {
  font-size: 13px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
}

.my-rating:empty { display: none; }

/* Auth button in header */
.auth-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
  border: 1px solid #0f3460;
  background: transparent;
  color: #ccc;
  transition: background 0.15s;
  white-space: nowrap;
}

.auth-btn:hover { background: #1e2d4a; }
.auth-btn:empty { display: none; }

.auth-btn.guest {
  border-color: #ffc800;
  color: #ffc800;
}

.auth-btn.logged-in {
  border-color: #0a8c4a;
  color: #0a8c4a;
}

/* Auth modal overlay */
.auth-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.auth-overlay.visible {
  display: flex;
}

.auth-modal {
  background: #16213e;
  border: 1px solid #0f3460;
  border-radius: 8px;
  padding: 24px 28px;
  min-width: 300px;
  max-width: 380px;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: modal-appear 0.2s ease-out;
}

@keyframes modal-appear {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.auth-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: #666;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.auth-close:hover { color: #ccc; }

.auth-modal h3 {
  font-size: 16px;
  color: #e0e0e0;
  margin-bottom: 4px;
}

.auth-modal .auth-subtitle {
  font-size: 12px;
  color: #888;
  margin-bottom: 16px;
}

.auth-modal label {
  display: block;
  font-size: 12px;
  color: #999;
  margin-bottom: 4px;
  margin-top: 10px;
}

.auth-modal input[type="text"],
.auth-modal input[type="password"] {
  width: 100%;
  background: #0d1b2a;
  border: 1px solid #0f3460;
  color: #e0e0e0;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
}

.auth-modal input:focus {
  border-color: #0a8c4a;
}

.auth-modal .auth-submit {
  width: 100%;
  margin-top: 16px;
  padding: 10px;
  background: #0a8c4a;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.auth-modal .auth-submit:hover { background: #0ba854; }
.auth-modal .auth-submit:disabled {
  background: #555;
  cursor: default;
}

.auth-modal .auth-error {
  color: #ff6b6b;
  font-size: 12px;
  margin-top: 8px;
  min-height: 16px;
}

.auth-modal .auth-switch {
  text-align: center;
  margin-top: 12px;
  font-size: 12px;
  color: #888;
}

.auth-modal .auth-switch a {
  color: #4fc3f7;
  cursor: pointer;
  text-decoration: none;
}
.auth-modal .auth-switch a:hover { text-decoration: underline; }

.auth-modal .auth-stats {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #0f3460;
  font-size: 12px;
  color: #888;
}

.auth-modal .auth-stats span {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-modal .auth-stats .stat-value {
  font-size: 16px;
  font-weight: 700;
  color: #e0e0e0;
}

/* ── Main layout ── */
.lobby-main {
  display: grid;
  grid-template-columns: 170px 1fr 190px;
  grid-template-rows: 1fr auto;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* ── Left sidebar: rooms + rating legend ── */
.left-sidebar {
  background: #16213e;
  border-right: 1px solid #0f3460;
  overflow-y: auto;
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
}

.sidebar-section-title {
  padding: 10px 12px 6px;
  font-size: 11px;
  text-transform: uppercase;
  color: #666;
  letter-spacing: 1px;
}

.room-list .room-item {
  padding: 8px 12px;
  cursor: pointer;
  border-left: 3px solid transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  transition: background 0.15s;
}

.room-list .room-item:hover {
  background: #1e2d4a;
}

.room-list .room-item.active {
  background: #1e2d4a;
  border-left-color: #0a8c4a;
}

.room-item .room-count {
  font-size: 11px;
  color: #666;
  min-width: 16px;
  text-align: right;
}

/* Rating legend */
.rating-legend {
  padding: 8px 12px;
  margin-top: auto;
  border-top: 1px solid #0f3460;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #999;
  padding: 2px 0;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Rating tier colors */
.rating-master { color: #ff4444; }
.rating-expert { color: #e040fb; }
.rating-advanced { color: #ffc800; }
.rating-intermediate { color: #4fc3f7; }
.rating-beginner { color: #aaa; }
.rating-provisional { color: #666; font-style: italic; }

.swatch-master { background: #ff4444; }
.swatch-expert { background: #e040fb; }
.swatch-advanced { background: #ffc800; }
.swatch-intermediate { background: #4fc3f7; }
.swatch-beginner { background: #aaa; }
.swatch-provisional { background: #666; }

/* ── Action buttons ── */
.action-buttons {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid #0f3460;
}

.btn-play-now {
  background: #0a8c4a;
  color: white;
  border: none;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s;
  letter-spacing: 0.5px;
}

.btn-play-now:hover { background: #0ba854; }

.btn-create-table {
  background: transparent;
  color: #ccc;
  border: 1px solid #0f3460;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s;
}

.btn-create-table:hover { background: #1e2d4a; }

/* ── Table area (center) ── */
.table-area {
  overflow-y: auto;
  grid-row: 1;
  display: flex;
  flex-direction: column;
}

.table-area-header {
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #0f3460;
  background: #16213e;
  flex-shrink: 0;
}

.table-area-header h2 {
  font-size: 14px;
  color: #ffc800;
  font-weight: 600;
}

.table-count {
  font-size: 12px;
  color: #666;
}

/* Yahoo-style table list */
.table-list {
  flex: 1;
  overflow-y: auto;
}

.table-list-header {
  display: grid;
  grid-template-columns: 52px 1fr 1fr 60px;
  padding: 6px 12px;
  font-size: 11px;
  text-transform: uppercase;
  color: #555;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #0f3460;
  background: #141e30;
  position: sticky;
  top: 0;
  z-index: 1;
}

.table-row {
  display: grid;
  grid-template-columns: 52px 1fr 1fr 60px;
  padding: 6px 12px;
  border-bottom: 1px solid #0d1b2a;
  cursor: pointer;
  transition: background 0.1s;
  align-items: center;
  min-height: 32px;
}

.table-row:hover {
  background: #1e2d4a;
}

.table-row.waiting {
  background: rgba(255, 200, 0, 0.05);
}

.table-row.playing {
  background: rgba(58, 134, 255, 0.05);
}

.table-row.open {
  background: rgba(10, 140, 74, 0.03);
}

.table-num {
  font-size: 12px;
  color: #666;
  font-weight: 600;
}

.table-seat {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.table-seat .seat-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.table-seat .seat-rating {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.8;
}

.table-seat.empty {
  color: #444;
  font-style: italic;
}

.join-btn {
  background: #0a8c4a;
  color: white;
  border: none;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s;
}

.join-btn:hover { background: #0dcc6b; }

.watch-btn {
  background: transparent;
  color: #3a86ff;
  border: 1px solid #3a86ff;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s;
}

.watch-btn:hover { background: rgba(58, 134, 255, 0.15); }

.rejoin-btn {
  color: #ff9800;
  border-color: #ff9800;
  font-weight: 600;
}
.rejoin-btn:hover { background: rgba(255, 152, 0, 0.15); }

.table-watchers {
  font-size: 12px;
  color: #555;
  text-align: center;
}

.table-watchers.has-watchers {
  color: #888;
}

/* ── Player sidebar (right) ── */
.player-sidebar {
  background: #16213e;
  border-left: 1px solid #0f3460;
  overflow-y: auto;
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
}

.player-sidebar-header {
  padding: 10px 12px 6px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-shrink: 0;
}

.player-sidebar-header h3 {
  font-size: 11px;
  text-transform: uppercase;
  color: #666;
  letter-spacing: 1px;
}

.online-count {
  font-size: 11px;
  color: #0a8c4a;
  font-weight: 600;
}

.player-list-header {
  display: grid;
  grid-template-columns: 1fr 36px 28px;
  padding: 4px 12px;
  font-size: 10px;
  text-transform: uppercase;
  color: #444;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #0f3460;
  flex-shrink: 0;
}

.player-list {
  flex: 1;
  overflow-y: auto;
}

.player-item {
  display: grid;
  grid-template-columns: 1fr 36px 28px;
  padding: 4px 12px;
  font-size: 12px;
  align-items: center;
  cursor: default;
  transition: background 0.1s;
  position: relative;
}

.player-item:hover {
  background: #1e2d4a;
}

.player-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-rtng {
  font-weight: 600;
  font-size: 11px;
  text-align: right;
}

.player-tbl {
  font-size: 11px;
  color: #555;
  text-align: right;
}

.player-item.at-table .player-name {
  opacity: 0.6;
}

/* Player hover card */
.player-hover-card {
  display: none;
  position: fixed;
  transform: translate(-100%, -50%);
  margin-left: -10px;
  background: #1e2d4a;
  border: 1px solid #0f3460;
  border-radius: 6px;
  padding: 10px 14px;
  min-width: 160px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  pointer-events: auto;
}

/* Invisible bridge so mouse can cross the gap from player item to card */
.player-hover-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: -14px;
  bottom: 0;
  width: 14px;
}

.player-item.hovered .player-hover-card {
  display: block;
}

.hover-card-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.hover-card-rating {
  font-size: 12px;
  margin-bottom: 6px;
}

.hover-card-stats {
  font-size: 11px;
  color: #888;
  line-height: 1.5;
}

.challenge-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 5px 0;
  background: #2e7d32;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.challenge-btn:hover { background: #388e3c; }
.challenge-btn:disabled {
  background: #555;
  cursor: default;
  opacity: 0.7;
}

/* Invite toast */
.invite-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e2d4a;
  border: 1px solid #0f3460;
  border-radius: 8px;
  padding: 14px 20px;
  min-width: 260px;
  z-index: 1000;
  box-shadow: 0 6px 24px rgba(0,0,0,0.6);
  text-align: center;
  animation: toast-slide-in 0.3s ease-out;
}
@keyframes toast-slide-in {
  from { transform: translateX(-50%) translateY(-20px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}
.invite-toast .invite-from {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}
.invite-toast .invite-rating {
  font-size: 12px;
  color: #888;
  margin-bottom: 10px;
}
.invite-toast .invite-label {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 10px;
}
.invite-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.invite-actions button {
  padding: 6px 18px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}
.invite-accept {
  background: #2e7d32;
  color: #fff;
}
.invite-accept:hover { background: #388e3c; }
.invite-decline {
  background: transparent;
  color: #e57373;
  border: 1px solid #e57373 !important;
}
.invite-decline:hover { background: rgba(229,115,115,0.1); }

/* Brief toast (declined/expired feedback) */
.invite-toast-brief {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e2d4a;
  border: 1px solid #0f3460;
  border-radius: 6px;
  padding: 8px 16px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  animation: toast-slide-in 0.3s ease-out;
}

/* Mobile play bar (hidden on desktop) */
.mobile-play-bar { display: none; }

/* ── Chat panel (center column only) ── */
.chat-panel {
  background: #0d1b2a;
  border-top: 2px solid #0f3460;
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  height: 160px;
  flex-shrink: 0;
}

.chat-header {
  padding: 5px 14px;
  font-size: 11px;
  text-transform: uppercase;
  color: #555;
  letter-spacing: 1px;
  border-bottom: 1px solid #0f3460;
  flex-shrink: 0;
}

.chat-header #chat-room-label {
  color: #ffc800;
  font-weight: 600;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 6px 14px;
  font-size: 12px;
  line-height: 1.6;
}

.chat-msg .chat-sender {
  font-weight: 600;
}

.chat-msg.system {
  color: #888;
  font-style: italic;
}

.chat-msg.system .chat-sender {
  display: none;
}

.chat-input-row {
  display: flex;
  border-top: 1px solid #0f3460;
  flex-shrink: 0;
}

.chat-input-label {
  padding: 8px 10px;
  font-size: 12px;
  color: #666;
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  background: #16213e;
  border: none;
  color: #e0e0e0;
  padding: 8px 10px;
  font-size: 12px;
  outline: none;
}

.chat-input::placeholder {
  color: #444;
}

.chat-send-btn {
  background: #0a8c4a;
  color: white;
  border: none;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.chat-send-btn:hover {
  background: #0ba854;
}

/* ── Mobile tab bar (hidden on desktop) ── */
.mobile-tab-bar {
  display: none;
}

/* ── Mobile: tab-based layout for phones (portrait + landscape) ── */
@media (max-width: 932px) {
  .header {
    padding: 6px 12px;
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }

  .mobile-tab-bar {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }

  .header-left { gap: 8px; }
  .header h1 { font-size: 18px; }
  .connection-badge { display: none; }
  .room-name { display: none; }

  .room-select {
    display: block;
    background: #0d1b2a;
    color: #ffc800;
    border: 1px solid #0f3460;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23ffc800'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
    cursor: pointer;
  }

  .username-input { display: none; }
  .my-rating { font-size: 12px; }
  .auth-btn { font-size: 11px; padding: 4px 8px; }
  .auth-modal { min-width: 260px; max-width: calc(100vw - 32px); padding: 20px; }

  /* Tab bar */
  .mobile-tab-bar {
    display: flex;
    background: #16213e;
    border-bottom: 2px solid #0f3460;
    flex-shrink: 0;
  }

  .mobile-tab {
    flex: 1;
    padding: 10px 0;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
  }

  .mobile-tab.active {
    color: #e0e0e0;
    border-bottom-color: #0a8c4a;
  }

  .mobile-tab .tab-badge {
    font-size: 10px;
    color: #0a8c4a;
    margin-left: 4px;
  }

  /* Main layout: single column, no grid */
  .lobby-main {
    display: flex;
    flex-direction: column;
    grid-template-columns: unset;
    grid-template-rows: unset;
    overflow: hidden;
  }

  /* Hide left sidebar entirely */
  .left-sidebar { display: none; }

  /* Tab panels: only active one is visible */
  .table-area,
  .player-sidebar,
  .chat-panel {
    display: none;
    flex: 1;
    min-height: 0; /* critical: allows flex child to shrink below content size for scrolling */
    overflow: hidden;
    border: none;
    grid-row: unset;
    grid-column: unset;
    height: auto;
  }

  .table-area.mobile-active,
  .player-sidebar.mobile-active,
  .chat-panel.mobile-active {
    display: flex;
    flex-direction: column;
  }

  /* Tables tab — the table-list is the scrollable region */
  .table-area.mobile-active .table-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-area-header {
    padding: 8px 12px;
  }

  .table-list-header,
  .table-row {
    grid-template-columns: 44px 1fr 1fr 56px;
    padding: 7px 10px;
    min-height: 44px; /* touch target */
    gap: 4px;
  }

  .table-list-header {
    font-size: 10px;
    gap: 4px;
  }

  .table-num { font-size: 12px; }
  .table-seat { font-size: 13px; }

  .join-btn {
    padding: 6px 14px;
    font-size: 12px;
  }

  .watch-btn {
    padding: 4px 10px;
    font-size: 11px;
  }

  /* Play Now bar pinned to bottom */
  .mobile-play-bar {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    background: #16213e;
    border-top: 1px solid #0f3460;
    flex-shrink: 0;
  }

  .mobile-play-bar .btn-play-now {
    flex: 1;
    padding: 12px;
    font-size: 14px;
  }

  .mobile-play-bar .btn-create-table {
    padding: 12px 16px;
    font-size: 12px;
  }

  /* Players tab */
  .player-sidebar.mobile-active {
    border-left: none;
  }

  .player-sidebar.mobile-active .player-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .player-list-header,
  .player-item {
    grid-template-columns: 1fr 44px 32px;
    padding: 8px 14px;
    min-height: 44px;
  }

  .player-name { font-size: 14px; }
  .player-rtng { font-size: 13px; }
  .player-tbl { font-size: 12px; }

  /* Hover cards on mobile: tap to toggle (not hover) */
  .player-hover-card { display: none !important; }
  .player-item.tapped .player-hover-card { display: block !important; }

  /* Chat tab */
  .chat-panel.mobile-active {
    height: auto;
    flex: 1;
    border-top: none;
  }

  .chat-panel.mobile-active .chat-messages {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 14px;
    padding: 10px 14px;
    line-height: 1.7;
  }

  .chat-input-row {
    flex-shrink: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }

  .chat-input {
    padding: 12px 10px;
    font-size: 14px;
  }

  .chat-send-btn {
    padding: 12px 20px;
    font-size: 14px;
  }

  .chat-input-label {
    padding: 12px 10px;
    font-size: 13px;
  }

  /* Safe area for all edge content in landscape */
  .table-area-header,
  .table-list-header,
  .table-row,
  .mobile-play-bar,
  .player-sidebar-header,
  .player-list-header,
  .player-item {
    padding-left: max(10px, env(safe-area-inset-left, 0px));
    padding-right: max(10px, env(safe-area-inset-right, 0px));
  }

  .chat-panel.mobile-active .chat-messages {
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
  }
}
