/* Mobile-only full-bleed canvas and bottom navigation. Desktop styles stay independent. */
.mobile-nav-label { display: none; }
html.pixel-night-mobile {
  --mobile-safe-top: env(safe-area-inset-top, 0px);
  --mobile-safe-right: env(safe-area-inset-right, 0px);
  --mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
  --mobile-safe-left: env(safe-area-inset-left, 0px);
}
html.pixel-night-mobile.pixel-night-android {
  --mobile-safe-top: 0px; --mobile-safe-right: 0px; --mobile-safe-bottom: 0px; --mobile-safe-left: 0px;
}
html.pixel-night-mobile,
html.pixel-night-mobile body { min-width: 0; width: 100%; max-width: 100%; margin: 0; padding: 0; overflow-x: hidden; overflow-x: clip; }
html.pixel-night-mobile body.logged-in-page { overflow: hidden; }
html.pixel-night-mobile #welcome-screen {
  --mobile-nav-height: 72px;
  --app-nav-height: 72px;
  --mobile-nav-bottom: 0px;
  position: fixed;
  inset-inline: 0;
  top: var(--mobile-viewport-top, 0px);
  bottom: auto;
  display: flex;
  flex-direction: column;
  width: 100%; max-width: none; height: var(--mobile-viewport-height, 100dvh);
  min-height: 0; margin: 0;
  padding: 0 0 calc(var(--mobile-nav-height) + var(--mobile-safe-bottom));
  border: 0; border-radius: 0; overflow: hidden; scroll-padding: 0;
}
html.pixel-night-mobile #welcome-screen .profile-shell {
  display: flex; flex-direction: column; flex: 1 1 0;
  width: 100%; max-width: none; min-height: 0; margin: 0;
  padding: var(--mobile-safe-top) 0 0;
}
html.pixel-night-mobile #welcome-screen .profile-topbar { display: none; }
html.pixel-night-mobile #welcome-screen .profile-layout {
  display: flex; flex-direction: column; flex: 1 1 0;
  width: 100%; min-height: 0; gap: 0; margin: 0; overflow: hidden;
}
html.pixel-night-mobile #welcome-screen .profile-layout > :is(section, article) {
  flex: 1 1 0; width: 100%; max-width: none; min-height: 0; margin: 0;
  border: 0; border-radius: 0; box-shadow: none;
  animation: none; transform: none; scrollbar-width: none;
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
}
html.pixel-night-mobile #welcome-screen .profile-layout > :is(section, article)::-webkit-scrollbar { display: none; }
html.pixel-night-mobile #welcome-screen .profile-layout > #chat-view { display: flex; padding: 0; overflow: hidden; }
html.pixel-night-mobile #welcome-screen .messenger { flex: 1; width: 100%; height: 100%; min-height: 0; }
/* Keep the grid's implicit min-content width from creating a second scroll axis. */
html.pixel-night-mobile #welcome-screen :is(.profile-shell, .profile-layout, .messenger, .conversation-panel, .conversation-header, .chat-form, .message-input-shell) {
  min-width: 0; max-width: 100%;
}
html.pixel-night-mobile #welcome-screen .conversation-panel { width: 100%; overflow: hidden; }
html.pixel-night-mobile #welcome-screen #chat-messages {
  grid-template-columns: minmax(0, 1fr);
  width: 100%; min-width: 0; max-width: 100%;
  overflow-x: hidden; overflow-y: auto;
  overscroll-behavior-x: none; touch-action: pan-y pinch-zoom;
}
html.pixel-night-mobile #welcome-screen #chat-messages > * { min-width: 0; }
html.pixel-night-mobile #welcome-screen #chat-messages > :not(.chat-bubble) { max-width: 100%; }
html.pixel-night-mobile #welcome-screen .chat-gift-category { min-width: 0; overflow-wrap: anywhere; }
html.pixel-night-mobile #welcome-screen .profile-layout > #friends-view { display: flex; overflow: hidden; }
html.pixel-night-mobile #welcome-screen > .profile-nav {
  position: absolute; inset: auto 0 0;
  display: flex; flex-wrap: nowrap; align-items: stretch;
  width: 100%; max-width: none; height: calc(var(--mobile-nav-height) + var(--mobile-safe-bottom));
  margin: 0; gap: 0;
  padding: 4px max(4px, var(--mobile-safe-right)) calc(4px + var(--mobile-safe-bottom)) max(4px, var(--mobile-safe-left));
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  scroll-snap-type: x mandatory; scroll-padding-inline: max(4px, var(--mobile-safe-left)) max(4px, var(--mobile-safe-right));
  overscroll-behavior-x: contain; touch-action: pan-x pinch-zoom;
  -webkit-overflow-scrolling: touch;
  border: 0; border-top: 1px solid var(--theme-border, #ffffff12); border-radius: 0;
  background: var(--theme-panel, #121022); box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none; transform: none;
}
html.pixel-night-mobile #welcome-screen > .profile-nav::-webkit-scrollbar { display: none; }
html.pixel-night-mobile #welcome-screen .profile-nav > .profile-nav-button,
html.pixel-night-mobile #welcome-screen .profile-nav > .mobile-nav-action,
html.pixel-night-mobile #welcome-screen .profile-nav > #profile-settings-wrap {
  flex: 0 0 20%; min-width: 0; width: 20%; max-width: 20%; margin: 0;
  scroll-snap-align: start;
}
html.pixel-night-mobile #welcome-screen .profile-nav > .profile-nav-button,
html.pixel-night-mobile #welcome-screen .profile-nav .mobile-nav-action {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; min-height: 44px; gap: 4px; padding: 6px 1px;
  border: 0; border-radius: 14px; box-shadow: none;
  background: transparent; color: inherit; font: inherit; font-size: 10px; line-height: 1.2;
  transform: none; backdrop-filter: none; -webkit-backdrop-filter: none;
}
html.pixel-night-mobile #welcome-screen #profile-settings-toggle { width: 100%; }
html.pixel-night-mobile #welcome-screen .profile-nav :is(.profile-nav-icon, #profile-settings-toggle img) {
  display: block; flex: 0 0 24px; width: 24px; height: 24px;
}
html.pixel-night-mobile #welcome-screen .profile-nav .notification-toggle > svg { width: 24px; height: 24px; }
html.pixel-night-mobile #welcome-screen .mobile-nav-label,
html.pixel-night-mobile #welcome-screen .profile-nav-label { display: block; font-size: 10px; font-weight: 600; white-space: nowrap; line-height: 1.2; }
html.pixel-night-mobile #welcome-screen #settings-nav .profile-nav-label { display: none; }
html.pixel-night-mobile #welcome-screen #settings-nav .games-nav-compact { display: block; font-size: 10px; line-height: 1.2; }
html.pixel-night-mobile #welcome-screen .profile-nav .profile-nav-button.active,
html.pixel-night-mobile #welcome-screen #profile-settings-toggle[aria-expanded="true"] { background: var(--personal-soft); color: var(--personal-accent); }
html.pixel-night-mobile #welcome-screen .profile-nav .notification-dot { top: 4px; right: calc(50% - 18px); }
@media (max-width: 360px) {
  html.pixel-night-mobile #welcome-screen > .profile-nav:has(#settings-nav:not([hidden])) :is(.mobile-nav-label, .profile-nav-label, .games-nav-compact) { font-size: 9px; }
}
html.pixel-night-mobile #welcome-screen.is-conversation-screen { padding-bottom: 0; }
html.pixel-night-mobile #welcome-screen.is-conversation-screen > .profile-nav { display: none; }
html.pixel-night-mobile #welcome-screen .profile-layout > #public-profile-view { padding: 0 0 20px; }
html.pixel-night-mobile #public-profile-content,
html.pixel-night-mobile .profile-center,
html.pixel-night-mobile .public-profile-hero { width: 100%; max-width: none; margin: 0; padding-inline: 0; }
html.pixel-night-mobile .public-profile-hero > .public-profile-cover { width: 100%; }
html.pixel-night-mobile .public-profile-summary {
  display: grid; grid-template-columns: auto minmax(0, 1fr) 40px;
  align-items: start; column-gap: 10px; row-gap: 8px; padding-inline: 16px;
}
html.pixel-night-mobile .public-profile-avatar { grid-column: 1; grid-row: 1; }
html.pixel-night-mobile .public-profile-identity { grid-column: 2; grid-row: 1; padding-top: 10px; }
html.pixel-night-mobile .public-profile-commands { display: contents; }
html.pixel-night-mobile .public-profile-commands > .profile-menu-wrap { grid-column: 3; grid-row: 1; padding-top: 6px; }
html.pixel-night-mobile #profile-menu-toggle { width: 40px; height: 40px; padding: 0; }
html.pixel-night-mobile .public-profile-actions { grid-column: 1 / -1; grid-row: 2; justify-content: start; }
html.pixel-night-mobile #public-profile-view #profile-wall {
  width: 100%; margin: 16px 0 0; padding: 0 0 14px; border: 0; border-radius: 0;
}
html.pixel-night-mobile #public-profile-view #profile-wall .wall-stream { width: 100%; padding-inline: 0; }
html.pixel-night-mobile #public-profile-view #profile-wall .wall-post { width: 100%; padding-inline: 0; }
html.pixel-night-mobile #public-profile-view #profile-wall .wall-post-header { padding-inline: 18px; }
html.pixel-night-mobile #public-profile-view #profile-wall .wall-post-body { width: 100%; }
html.pixel-night-mobile #public-profile-view #profile-wall .wall-post::before { left: 4px; }
html.pixel-night-mobile #public-profile-view #profile-wall .wall-posts::before { left: 8px; }
html.pixel-night-mobile #welcome-screen .profile-layout > #store-view { padding-inline: 0; }
html.pixel-night-mobile #store-view .store-content { width: 100%; max-width: none; margin: 0; }
html.pixel-night-mobile #store-view .store-products { width: 100%; max-width: none; margin-inline: 0; }
html.pixel-night-mobile #store-view :is(.store-header, .store-categories, .store-status) { padding-inline: 16px; }
html.pixel-night-mobile #profile-settings-menu {
  inset-inline: 0; width: 100%; max-width: none;
  padding-top: var(--mobile-safe-top); border-inline: 0;
}
html.pixel-night-mobile #notifications-dialog {
  position: fixed; inset: var(--mobile-viewport-top, 0px) 0 auto;
  width: 100%; max-width: none; height: var(--mobile-viewport-height, 100dvh); max-height: var(--mobile-viewport-height, 100dvh);
  margin: 0; padding: calc(16px + var(--mobile-safe-top)) max(16px, var(--mobile-safe-right)) calc(16px + var(--mobile-safe-bottom)) max(16px, var(--mobile-safe-left));
  border: 0; border-radius: 0;
}
