/* ============================================================
   BINGO Apple UI — sidebar, tab bar, iMessage-style chat
   ============================================================ */

:root {
  --apple-blue: #007AFF;
  --apple-blue-press: #0066d6;
  --apple-gray-1: #f2f2f7;
  --apple-gray-2: #e5e5ea;
  --apple-gray-3: #c7c7cc;
  --apple-label: #1c1c1e;
  --apple-secondary: #8e8e93;
  --apple-separator: rgba(60, 60, 67, 0.12);
  --apple-fill: rgba(120, 120, 128, 0.12);
  --apple-fill-strong: rgba(120, 120, 128, 0.2);
  --apple-bubble-sent: #007AFF;
  --apple-bubble-recv: #e9e9eb;
  --apple-blur: saturate(180%) blur(20px);
  --apple-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body.app-body {
  font-family: var(--apple-font) !important;
  -webkit-font-smoothing: antialiased;
}

/* —— Sidebar (macOS / iPadOS style) —— */
body.app-body .app-sidebar {
  background: color-mix(in srgb, var(--apple-gray-1) 88%, transparent) !important;
  backdrop-filter: var(--apple-blur);
  -webkit-backdrop-filter: var(--apple-blur);
  border-right: 1px solid var(--apple-separator) !important;
  padding: 12px 10px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  visibility: visible !important;
  width: var(--sidebar-width, 244px) !important;
  min-width: var(--sidebar-width, 244px) !important;
  pointer-events: auto !important;
}

body.app-body .app-main {
  margin-left: var(--sidebar-width, 244px) !important;
}

@media (max-width: 768px) {
  body.app-body .app-main {
    margin-left: 0 !important;
  }
}

body.app-body .app-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 2px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

body.app-body .app-sidebar-header {
  padding: 8px 8px 14px !important;
  margin-bottom: 4px;
  border-bottom: 0 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

body.app-body .app-sidebar .logo-full {
  height: 30px !important;
}

body.app-body .sidebar-toggle {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 0;
  background: var(--apple-fill);
  color: var(--apple-label);
  display: grid;
  place-items: center;
  cursor: pointer;
}

body.app-body .app-nav-section {
  list-style: none;
  margin: 14px 10px 6px !important;
  padding: 0 !important;
  font-size: 11px !important;
  font-weight: 650 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--apple-secondary) !important;
}

body.app-body .app-nav-link {
  display: flex !important;
  align-items: center;
  gap: 12px !important;
  min-height: 40px !important;
  padding: 8px 10px !important;
  margin: 0 !important;
  border-radius: 10px !important;
  color: var(--apple-label) !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em;
  text-decoration: none !important;
  transition: background 0.15s ease, color 0.15s ease;
  opacity: 1 !important;
}

body.app-body .app-nav-link:hover {
  background: var(--apple-fill) !important;
}

body.app-body .app-nav-link.active {
  background: var(--apple-fill-strong) !important;
  color: var(--apple-label) !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

body.app-body .app-nav-link .nav-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: transparent;
  color: var(--apple-blue);
}

body.app-body .app-nav-link.active .nav-icon {
  background: var(--apple-blue);
  color: #fff;
}

body.app-body .app-nav-link .nav-icon .icon-svg {
  width: 18px;
  height: 18px;
}

body.app-body .app-nav-link span:not(.nav-icon):not(.app-nav-badge):not(.verified) {
  flex: 1;
  min-width: 0;
}

body.app-body .app-nav-badge {
  min-width: 20px !important;
  height: 20px !important;
  padding: 0 6px !important;
  border-radius: 999px !important;
  background: #ff3b30 !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  display: inline-grid !important;
  place-items: center;
  box-shadow: none !important;
}

body.app-body .app-sidebar-user {
  margin-top: auto !important;
  padding: 10px !important;
  border-radius: 14px !important;
  background: var(--apple-fill) !important;
  border: 0 !important;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

body.app-body .app-sidebar-user:hover {
  background: var(--apple-fill-strong) !important;
}

body.app-body .app-sidebar-user-name {
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
}

body.app-body .app-sidebar-user-role {
  font-size: 12px !important;
  color: var(--apple-secondary) !important;
}

/* —— Bottom tab bar (iOS) —— */
html[data-theme="light"] body.app-body .bottom-nav,
html[data-theme="light"] body.app-body #bottomNav.bottom-nav {
  background: color-mix(in srgb, #f9f9f9 82%, transparent) !important;
  backdrop-filter: var(--apple-blur) !important;
  -webkit-backdrop-filter: var(--apple-blur) !important;
  border-top: 0.5px solid var(--apple-separator) !important;
  box-shadow: none !important;
}

body.app-body .bottom-nav-link {
  color: var(--apple-secondary) !important;
  gap: 1px !important;
  font-size: 10px;
  font-weight: 500;
}

body.app-body .bottom-nav-link.active {
  color: var(--apple-blue) !important;
}

body.app-body .bottom-nav-link .nav-icon .icon-svg {
  width: 26px !important;
  height: 26px !important;
  stroke-width: 1.7;
}

body.app-body .bottom-nav-link--create .bottom-nav-create-orb {
  width: 44px !important;
  height: 44px !important;
  border-radius: 14px !important;
  background: var(--apple-blue) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(0, 122, 255, 0.35) !important;
  display: grid;
  place-items: center;
}

body.app-body .bottom-nav-link--create .nav-icon .icon-svg {
  width: 22px !important;
  height: 22px !important;
  stroke: #fff;
}

body.app-body .bottom-nav-profile.active .bottom-nav-avatar {
  box-shadow: 0 0 0 2px var(--apple-blue) !important;
}

body.app-body .bottom-nav-dot {
  background: #ff3b30 !important;
}

/* —— Messages / iMessage —— */
body.app-body .messages-layout {
  background: #fff !important;
  border: 1px solid var(--apple-separator) !important;
  border-radius: 18px !important;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

body.app-body .chat-list {
  background: #fff !important;
  border-right: 0.5px solid var(--apple-separator) !important;
}

body.app-body .chat-list-header {
  font-family: var(--apple-font) !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  padding: 18px 18px 10px !important;
  border-bottom: 0 !important;
  background: #fff !important;
  color: var(--apple-label);
}

body.app-body .chat-list-subheader {
  padding: 8px 18px 6px;
  font-size: 13px;
  font-weight: 650;
  color: var(--apple-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

body.app-body .chat-list-search {
  margin: 0 14px 12px !important;
  padding: 9px 12px !important;
  background: var(--apple-gray-1) !important;
  border-radius: 12px !important;
  border: 0 !important;
  color: var(--apple-secondary);
}

.chat-list-search .icon-svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.55;
}

body.app-body .chat-list-search input {
  font-size: 15px !important;
  color: var(--apple-label) !important;
}

body.app-body .chat-item {
  margin: 0 8px !important;
  padding: 10px 10px !important;
  border-radius: 14px !important;
  min-height: 68px !important;
  gap: 12px !important;
}

body.app-body .chat-item:hover {
  background: var(--apple-gray-1) !important;
}

body.app-body .chat-item.active {
  background: color-mix(in srgb, var(--apple-blue) 12%, #fff) !important;
}

body.app-body .chat-item .avatar,
body.app-body .chat-item .avatar-md {
  width: 52px !important;
  height: 52px !important;
  border-radius: 50% !important;
  background: linear-gradient(145deg, #d1d1d6, #aeaeb2) !important;
  font-weight: 650;
  color: #fff;
}

body.app-body .chat-item-name {
  font-size: 16px !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em;
  color: var(--apple-label);
}

body.app-body .chat-item-preview {
  font-size: 14px !important;
  color: var(--apple-secondary) !important;
  max-width: 200px !important;
}

body.app-body .chat-item-time {
  font-size: 13px !important;
  color: var(--apple-secondary) !important;
}

body.app-body .chat-item-unread {
  background: var(--apple-blue) !important;
  min-width: 20px !important;
  height: 20px !important;
  font-size: 12px !important;
}

body.app-body .chat-online-dot {
  background: #34c759 !important;
  width: 12px !important;
  height: 12px !important;
  border: 2px solid #fff !important;
  box-shadow: none !important;
}

body.app-body .chat-window {
  background:
    radial-gradient(ellipse at top, rgba(0, 122, 255, 0.04), transparent 55%),
    #f2f2f7 !important;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

body.app-body .chat-window-empty {
  color: var(--apple-secondary) !important;
  gap: 10px !important;
  padding: 32px;
  text-align: center;
}

body.app-body .chat-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: #fff;
  color: var(--apple-blue);
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

body.app-body .chat-empty-icon .icon-svg {
  width: 30px;
  height: 30px;
}

body.app-body .chat-window-header {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 10px 14px !important;
  min-height: 56px;
  background: color-mix(in srgb, #f9f9f9 86%, transparent) !important;
  backdrop-filter: var(--apple-blur);
  -webkit-backdrop-filter: var(--apple-blur);
  border-bottom: 0.5px solid var(--apple-separator) !important;
}

body.app-body .chat-window-header .avatar,
body.app-body .chat-window-header .avatar-sm {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: linear-gradient(145deg, #007AFF, #5856d6) !important;
  color: #fff;
  font-size: 13px;
  font-weight: 650;
}

body.app-body .chat-window-header strong {
  font-size: 16px !important;
  font-weight: 650 !important;
  letter-spacing: -0.02em;
  color: var(--apple-label);
}

body.app-body .chat-header-meta {
  font-size: 12px !important;
  color: var(--apple-secondary) !important;
}

body.app-body .chat-header-meta.is-online {
  color: #34c759 !important;
}

body.app-body .chat-back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: var(--apple-fill);
  color: var(--apple-blue);
  font-size: 18px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

body.app-body .chat-conn {
  display: none !important;
}

body.app-body .chat-messages {
  padding: 14px 12px 8px !important;
  gap: 4px !important;
  background: transparent !important;
}

body.app-body .chat-day-sep {
  align-self: center;
  margin: 12px 0 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--apple-secondary);
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

body.app-body .chat-bubble {
  max-width: min(78%, 420px) !important;
  padding: 9px 13px !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
  letter-spacing: -0.01em;
  border-radius: 18px !important;
  box-shadow: none !important;
  position: relative;
}

body.app-body .chat-bubble.sent {
  align-self: flex-end;
  background: var(--apple-bubble-sent) !important;
  color: #fff !important;
  border-bottom-right-radius: 5px !important;
}

body.app-body .chat-bubble.received {
  align-self: flex-start;
  background: var(--apple-bubble-recv) !important;
  color: var(--apple-label) !important;
  border-bottom-left-radius: 5px !important;
}

body.app-body .chat-bubble img {
  max-width: min(240px, 70vw);
  border-radius: 14px;
  margin-top: 0;
  display: block;
}

body.app-body .chat-bubble--media {
  padding: 3px !important;
  overflow: hidden;
}

body.app-body .chat-bubble--media img {
  border-radius: 15px;
}

body.app-body .chat-bubble + .chat-bubble.sent {
  margin-top: 4px;
}

body.app-body .chat-bubble.sent + .chat-bubble.sent {
  margin-top: 3px;
}

body.app-body .chat-bubble-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
  margin-top: 3px;
  font-size: 11px;
  opacity: 0.72;
}

body.app-body .chat-bubble.received .chat-bubble-meta {
  justify-content: flex-start;
  color: var(--apple-secondary);
  opacity: 1;
}

body.app-body .chat-ticks.read {
  color: #fff !important;
  opacity: 0.95;
}

body.app-body .chat-typing {
  padding: 0 16px 8px;
  font-size: 13px;
  color: var(--apple-secondary);
}

body.app-body .chat-typing::before {
  content: '';
  display: inline-block;
  width: 42px;
  height: 28px;
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 14px;
  background: var(--apple-bubble-recv);
  box-shadow: inset 0 0 0 0 transparent;
}

body.app-body .chat-templates {
  display: flex;
  gap: 8px;
  padding: 0 12px 8px;
  overflow-x: auto;
  border: 0 !important;
  background: transparent;
}

body.app-body .chat-template-btn {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: var(--apple-blue);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  cursor: pointer;
}

body.app-body .chat-input-bar {
  display: flex !important;
  align-items: flex-end;
  gap: 8px !important;
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom)) !important;
  background: color-mix(in srgb, #f9f9f9 90%, transparent) !important;
  backdrop-filter: var(--apple-blur);
  -webkit-backdrop-filter: var(--apple-blur);
  border-top: 0.5px solid var(--apple-separator) !important;
}

body.app-body .chat-composer-btn {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px;
  border-radius: 50% !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--apple-blue) !important;
  display: grid;
  place-items: center;
  padding: 0 !important;
  cursor: pointer;
}

body.app-body .chat-composer-btn .icon-svg {
  width: 24px;
  height: 24px;
}

body.app-body .chat-input-bar--imessage {
  align-items: flex-end !important;
  gap: 10px !important;
}

body.app-body .chat-composer-field {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
  padding: 4px 4px 4px 0;
  border-radius: 22px;
  border: 0.5px solid var(--apple-gray-3, #d1d1d6);
  background: #fff;
}

body.app-body .chat-composer-field textarea,
body.app-body .chat-composer-field #msgInput {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 8px 0 8px 14px !important;
  min-height: 34px !important;
}

body.app-body .chat-composer-field textarea:focus,
body.app-body .chat-composer-field #msgInput:focus {
  border: 0 !important;
}

body.app-body .chat-composer-inline {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

body.app-body .chat-composer-btn--inline {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
}

body.app-body .chat-composer-field .chat-send-btn {
  margin-right: 4px;
  margin-bottom: 2px;
}

body.app-body .chat-input-bar textarea,
body.app-body .chat-input-bar #msgInput {
  flex: 1;
  min-height: 36px !important;
  max-height: 120px;
  border-radius: 20px !important;
  border: 0.5px solid var(--apple-gray-3) !important;
  background: #fff !important;
  padding: 8px 14px !important;
  font-size: 16px !important;
  line-height: 1.3;
  color: var(--apple-label) !important;
  resize: none;
  outline: none;
  box-shadow: none !important;
}

body.app-body .chat-input-bar textarea:focus,
body.app-body .chat-input-bar #msgInput:focus {
  border-color: var(--apple-blue) !important;
}

body.app-body .chat-send-btn,
body.app-body #sendMsg.btn,
body.app-body .chat-input-bar .btn-primary {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: 0 !important;
  background: var(--apple-blue) !important;
  color: #fff !important;
  display: grid !important;
  place-items: center;
  box-shadow: none !important;
  font-size: 0 !important;
}

body.app-body .chat-send-btn .icon-svg,
body.app-body #sendMsg .icon-svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
  fill: #fff;
}

body.app-body .chat-send-btn:disabled,
body.app-body #sendMsg:disabled {
  background: var(--apple-gray-3) !important;
}

@media (max-width: 768px) {
  body.app-body .messages-layout {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    height: calc(100dvh - var(--shell-header-h, 56px) - env(safe-area-inset-top) - var(--shell-bottom-h, 56px)) !important;
  }

  body.app-body .chat-list-header {
    font-size: 34px !important;
    padding-top: 8px !important;
  }

  body.app-body .chat-window {
    background:
      radial-gradient(ellipse at top, rgba(0, 122, 255, 0.05), transparent 50%),
      #f2f2f7 !important;
  }
}

/* Override old teal chat overrides from bingo-ig */
body.app-body .chat-bubble.sent {
  background: var(--apple-bubble-sent) !important;
}
body.app-body .chat-bubble.received {
  background: var(--apple-bubble-recv) !important;
  color: var(--apple-label) !important;
}

.chat-bubble--hit {
  outline: 2px solid var(--apple-blue) !important;
}

.chat-mute-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--apple-secondary);
  margin-left: 4px;
}

/* —— Chat ··· action sheet —— */
.chat-action-sheet {
  position: fixed;
  inset: 0;
  z-index: 7000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.chat-action-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.chat-action-sheet__panel {
  position: relative;
  width: min(440px, 100%);
  margin: 0 10px calc(10px + env(safe-area-inset-bottom));
  padding: 8px 10px 10px;
  border-radius: 18px;
  background: color-mix(in srgb, #f2f2f7 78%, transparent);
  backdrop-filter: saturate(180%) blur(28px);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  border: 0.5px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: chat-sheet-up 0.22s ease;
}

@keyframes chat-sheet-up {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.chat-action-sheet__handle {
  width: 36px;
  height: 4px;
  border-radius: 99px;
  background: rgba(60, 60, 67, 0.28);
  margin: 4px auto 8px;
}

.chat-action-sheet__title {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--apple-secondary);
  margin: 0 0 6px;
}

.chat-action-sheet__panel button {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--apple-blue);
  font: inherit;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: -0.01em;
}

.chat-action-sheet__panel button:active {
  background: rgba(255, 255, 255, 0.95);
}

.chat-action-sheet__panel button.is-warn { color: #ff9500; }
.chat-action-sheet__panel button.is-danger { color: #ff3b30; font-weight: 600; }
.chat-action-sheet__panel button.is-cancel {
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--apple-label);
  font-weight: 650;
}

/* —— Stronger glassmorphism menu —— */
body.app-body .app-sidebar {
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.72) 0%,
    rgba(242, 242, 247, 0.55) 100%
  ) !important;
  backdrop-filter: saturate(190%) blur(28px) !important;
  -webkit-backdrop-filter: saturate(190%) blur(28px) !important;
  border-right: 0.5px solid rgba(255, 255, 255, 0.55) !important;
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.04);
  border-radius: 0 24px 24px 0;
}

body.app-body .app-nav-link {
  border-radius: 14px !important;
}

body.app-body .app-nav-link .nav-icon {
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.7);
}

body.app-body .app-nav-link.active .nav-icon {
  background: var(--apple-blue) !important;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.35);
}

body.app-body .app-sidebar-user {
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.55) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 0.5px solid rgba(255, 255, 255, 0.7) !important;
}

html[data-theme="light"] body.app-body .bottom-nav,
html[data-theme="light"] body.app-body #bottomNav.bottom-nav {
  background: rgba(255, 255, 255, 0.68) !important;
  backdrop-filter: saturate(200%) blur(30px) !important;
  -webkit-backdrop-filter: saturate(200%) blur(30px) !important;
  border: 0 !important;
  border-top: 0 !important;
  border-radius: 28px !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14) !important;
  left: 14px !important;
  right: 14px !important;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  width: auto !important;
}

body.app-body .bottom-nav-link {
  color: #8e8e93 !important;
  border-radius: 16px;
}

body.app-body .bottom-nav-link.active {
  color: #007AFF !important;
}

body.app-body .bottom-nav-link--create .bottom-nav-create-orb {
  width: 46px !important;
  height: 46px !important;
  border-radius: 50% !important;
  background: #007AFF !important;
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(0, 122, 255, 0.4) !important;
  margin-top: 0 !important;
}

body.app-body .app-nav-link {
  border-radius: 16px !important;
}

body.app-body .app-nav-link .nav-icon {
  border-radius: 14px !important;
}

html[data-theme="light"] body.app-body .mobile-top-bar,
html[data-theme="light"] body.app-body #mobileTopBar.mobile-top-bar {
  background: rgba(255, 255, 255, 0.7) !important;
  border-bottom: 0 !important;
  backdrop-filter: saturate(190%) blur(24px) !important;
  -webkit-backdrop-filter: saturate(190%) blur(24px) !important;
}

html[data-theme="dark"] body.app-body .mobile-top-bar,
html[data-theme="dark"] body.app-body #mobileTopBar.mobile-top-bar {
  background: color-mix(in srgb, var(--shell-surface, #111113) 88%, transparent) !important;
  border-bottom: 1px solid var(--shell-border, rgba(255, 255, 255, 0.08)) !important;
}

html[data-theme="dark"] body.app-body .bottom-nav,
html[data-theme="dark"] body.app-body #bottomNav.bottom-nav {
  background: color-mix(in srgb, var(--shell-surface, #111113) 72%, transparent) !important;
}

html[data-theme="light"] body.app-body .app-sidebar {
  background: rgba(255, 255, 255, 0.62) !important;
  backdrop-filter: saturate(190%) blur(30px) !important;
  -webkit-backdrop-filter: saturate(190%) blur(30px) !important;
  border-right: 0 !important;
  border-radius: 0 28px 28px 0 !important;
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.06);
}

/* Kill conflicting profile chrome */
body.app-body .ig-profile .profile-header,
body.app-body .ig-profile__header {
  flex-direction: row !important;
  align-items: flex-end !important;
  text-align: left !important;
}

body.app-body .ig-profile .profile-cover,
body.app-body .ig-profile__cover.profile-cover {
  height: 148px !important;
  border-radius: 0 !important;
}

@media (min-width: 769px) {
  body.app-body .ig-profile .profile-cover,
  body.app-body .ig-profile__cover.profile-cover {
    height: 200px !important;
    border-radius: 18px !important;
  }
}

/* —— Mobile profile: keep flex layout from bingo-ig —— */
@media (max-width: 768px) {
  body.app-body .ig-profile {
    max-width: 100% !important;
    padding: 0 0 calc(var(--shell-bottom-h, 72px) + 16px) !important;
    overflow-x: clip;
  }

  body.app-body:not(.profile-page-active) .ig-profile__cover,
  body.app-body:not(.profile-page-active) .ig-profile__cover.profile-cover {
    height: 148px !important;
    width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }

  body.app-body:not(.profile-page-active) .ig-profile__header.profile-header,
  body.app-body:not(.profile-page-active) .profile-header.ig-profile__header {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    gap: 14px !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
  }

  body.app-body:not(.profile-page-active) .ig-profile__body {
    margin-top: -42px !important;
    padding: 0 16px !important;
  }

  body.app-body .ig-profile__stats,
  body.app-body .ig-profile__stats.profile-stats {
    display: flex !important;
    width: auto !important;
    flex: 1 !important;
    margin: 0 0 8px !important;
  }

  body.app-body .ig-profile__actions.profile-actions {
    display: flex !important;
    width: 100% !important;
  }

  body.app-body .ig-profile .profile-grid {
    width: 100% !important;
    margin: 0 !important;
  }
}

/* Responsive: hide bottom nav on PC only */
@media (min-width: 769px) {
  body.app-body .bottom-nav,
  body.app-body #bottomNav {
    display: none !important;
  }
}
