/*
 * FORRE_DARK - Profile Mobile Overrides
 * Mobile bottom nav: applies on all pages for logged-in users.
 * Profile-layout overrides (widget stacking, header hiding) remain scoped to body.tw-page-profile.
 */

/* Bottom nav: hidden on desktop, visible on mobile */
.tw-mobile-bottom-nav {
  display: none;
}

/* Mobil top-util: dold på desktop (markup kan finnas i center-kolumnen) */
.tw-mob-top-util {
  display: none;
}

/* Mobile page blocks are opt-in under 768px only */
.tw-mob-view {
  display: none;
}

.tw-mob-desktop-only {
  display: block;
}

@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  body:not(.builder-edit-mode) > header > div {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  body:not(.builder-edit-mode) > header > div > div:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body:not(.builder-edit-mode) > header > div > div:nth-child(2) > div:last-child {
    display: none !important;
  }

  body:not(.builder-edit-mode) .tw-mob-shout-shell {
    display: flex;
    width: 100%;
  }

  body:not(.builder-edit-mode) #shoutboxToggle {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
  }

  /* Hide footers entirely on mobile when bottom nav is enabled */
  body.has-mobile-nav .tw-site-footer,
  body.has-mobile-nav .clean-footer,
  body.has-mobile-nav footer.clean-footer {
    display: none !important;
  }

  /* Keep shout strip visible at the very top on mobile */
  body.has-mobile-nav > header {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 960;
    padding-top: env(safe-area-inset-top);
    background: rgba(14, 14, 14, 0.98);
    backdrop-filter: none;
  }

  body.has-mobile-nav > header > div {
    grid-template-columns: minmax(0, 1fr) !important;
    padding: 4px 10px 5px !important;
    gap: 5px !important;
  }

  body.has-mobile-nav > header [data-builder-brand="header"] {
    display: none !important;
  }

  body.has-mobile-nav > header > div > div:nth-child(2) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
  }

  body.has-mobile-nav > header > div > div:nth-child(2) > div:last-child {
    display: none !important;
  }

  body.has-mobile-nav #shoutboxToggle {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 34px;
  }

  body.has-mobile-nav .tw-mob-shout-shell {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-right: 0;
    box-sizing: border-box;
  }

  body.has-mobile-nav #shoutboxToggle {
    width: 100%;
    max-width: 100%;
  }

  body.has-mobile-nav #shoutboxToggle > div:first-child {
    width: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
    justify-content: center;
  }

  body.has-mobile-nav #shoutboxToggle > div:first-child span {
    display: none;
  }

  body.has-mobile-nav #shoutContent {
    min-width: 0;
    flex: 1 1 auto;
    padding-left: 42px !important;
    /* Utrymme så ticker inte ritas under absolut-positionerad shout-notis-knapp */
    padding-right: 38px !important;
    font-size: 10px !important;
  }

  body.has-mobile-nav .tw-mob-shout-notif-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 1px solid rgba(39, 150, 242, 0.35);
    border-radius: 0;
    background: var(--surface-3);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  }

  body.has-mobile-nav .tw-mob-shout-notif-btn:active {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(39, 150, 242, 0.1);
  }

  body.has-mobile-nav .tw-mob-shout-notif-btn i {
    font-size: 14px;
  }

  body.has-mobile-nav .tw-mob-shout-notif-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 0;
    background: var(--danger);
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Top-util: tunn utility-strip (ikon + kort etikett), badges i hörn utan höjdkrock */
  body.has-mobile-nav:not(.builder-edit-mode) .tw-mob-util-label {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: hidden;
    white-space: nowrap;
    border: 0;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: rgba(241, 245, 249, 0.92);
    text-overflow: ellipsis;
    line-height: 1;
  }

  body.has-mobile-nav:not(.builder-edit-mode) .tw-mob-top-util {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    margin: 0 0 2px;
    padding: 0;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  body.has-mobile-nav:not(.builder-edit-mode) .tw-mob-top-util-item {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 34px;
    padding: 0 5px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0;
    background: rgba(20, 20, 20, 0.92);
    color: rgba(226, 232, 240, 0.9);
    text-decoration: none;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
  }

  body.has-mobile-nav:not(.builder-edit-mode) .tw-mob-top-util-item:has(.tw-mob-top-util-badge) {
    padding-right: 11px;
  }

  body.has-mobile-nav:not(.builder-edit-mode) .tw-mob-top-util-item:active {
    border-color: rgba(39, 150, 242, 0.42);
    color: rgba(248, 250, 252, 0.98);
    background: rgba(39, 150, 242, 0.07);
  }

  body.has-mobile-nav:not(.builder-edit-mode) .tw-mob-top-util-item--profile {
    flex: 0 0 34px;
    min-width: 34px;
    max-width: 34px;
    padding: 0;
    gap: 0;
    border-color: rgba(39, 150, 242, 0.32);
    background: rgba(18, 22, 28, 0.95);
  }

  body.has-mobile-nav:not(.builder-edit-mode) .tw-mob-top-util-item--profile img {
    width: 30px;
    height: 30px;
    object-fit: cover;
    display: block;
  }

  body.has-mobile-nav:not(.builder-edit-mode) .tw-mob-top-util-initial {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
    color: rgba(147, 197, 253, 0.98);
    background: rgba(39, 150, 242, 0.1);
  }

  body.has-mobile-nav:not(.builder-edit-mode) .tw-mob-top-util-item i {
    flex-shrink: 0;
    font-size: 12px;
    color: rgba(147, 197, 253, 0.98);
  }

  body.has-mobile-nav:not(.builder-edit-mode) .tw-mob-top-util-item span:not(.tw-mob-top-util-badge):not(.tw-mob-util-label) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.has-mobile-nav:not(.builder-edit-mode) .tw-mob-top-util-badge {
    position: absolute;
    top: 1px;
    right: 2px;
    z-index: 2;
    margin-left: 0;
    min-width: 13px;
    height: 13px;
    padding: 0 3px;
    border-radius: 0;
    border: 1px solid rgba(0, 0, 0, 0.28);
    background: var(--primary);
    color: #fff;
    font-size: 7px;
    font-weight: 900;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
  }

  body.has-mobile-nav:not(.builder-edit-mode) .tw-mob-top-util-badge--live {
    background: var(--success);
    color: #06140a;
    border-color: rgba(0, 0, 0, 0.22);
  }

  /* Mycket smal vy: ikon + sr-only-etikett (aria-label på länkarna) */
  @media (max-width: 360px) {
    body.has-mobile-nav:not(.builder-edit-mode) .tw-mob-util-label {
      position: absolute !important;
      width: 1px !important;
      height: 1px !important;
      padding: 0 !important;
      margin: -1px !important;
      overflow: hidden !important;
      clip: rect(0, 0, 0, 0) !important;
      white-space: nowrap !important;
      border: 0 !important;
    }

    body.has-mobile-nav:not(.builder-edit-mode) .tw-mob-top-util-item:has(.tw-mob-top-util-badge) {
      padding-right: 9px;
    }

    body.has-mobile-nav:not(.builder-edit-mode) .tw-mob-top-util-item {
      gap: 0;
      padding: 0 4px;
    }

    body.has-mobile-nav:not(.builder-edit-mode) .tw-mob-top-util-item i {
      font-size: 13px;
    }
  }

  .tw-mob-hub-btn-lfg-badge {
    position: absolute;
    top: 1px;
    right: 1px;
    z-index: 3;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 0;
    background: var(--success);
    color: #06140a;
    font-size: 8px;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
    font-variant-numeric: tabular-nums;
  }

  .tw-mob-hub-btn.is-open .tw-mob-hub-btn-lfg-badge {
    transform: rotate(-90deg);
  }

  body.has-mobile-nav #shoutContent .tw-shout-ticker-viewport {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    -webkit-mask-image: none;
    mask-image: none;
  }

  /* Ticker-raden scrollar i track — undvik per-item max-width/ellipsis som gör raden “snäv”. */
  body.has-mobile-nav #shoutContent .tw-shout-ticker-item,
  body.has-mobile-nav #shoutContent .tw-shout-ticker-text {
    max-width: none;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
  }

  body.has-mobile-nav #shoutboxDropdown {
    min-width: 0 !important;
    width: calc(100vw - 16px) !important;
    right: 0 !important;
    left: auto !important;
  }

  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  /* ── Admin edit button: hide completely on mobile ── */
  #builder-toggle,
  #admin-edit-toggle {
    display: none !important;
  }

  /* ── Messenger FAB: lift above bottom nav on all pages ── */
  body.has-mobile-nav .messenger-fab-btn,
  body.has-mobile-nav #messengerFabBtn,
  body.has-mobile-nav #messengerLauncherBtn {
    bottom: calc(56px + env(safe-area-inset-bottom) + 12px) !important;
  }

  /* Hub mobile: hide floating messenger launcher entirely. */
  body.tw-page-hub.has-mobile-nav .messenger-fab-btn,
  body.tw-page-hub.has-mobile-nav #messengerFabBtn,
  body.tw-page-hub.has-mobile-nav #messengerLauncherBtn {
    display: none !important;
  }

  /* ── General mobile content layout for ALL pages with bottom nav ── */
  body.has-mobile-nav .clean-shell {
    overflow-x: hidden;
  }

  body.has-mobile-nav .clean-content {
    padding-left: 0;
    padding-right: 0;
    overflow-x: hidden;
  }

  /* Page builder column stacking for all pages */
  body.has-mobile-nav .pb-row {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
  }

  /* Columns: LayoutRenderer writes inline flex/max-width — need !important to override */
  body.has-mobile-nav .pb-col,
  body.has-mobile-nav .pb-col-100,
  body.has-mobile-nav .pb-col-75,
  body.has-mobile-nav .pb-col-66,
  body.has-mobile-nav .pb-col-50,
  body.has-mobile-nav .pb-col-33,
  body.has-mobile-nav .pb-col-25,
  body.has-mobile-nav [class*="pb-col-width-"] {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body.has-mobile-nav .pb-wrapper {
    overflow-x: hidden;
    max-width: 100vw !important;
    padding: 0 !important;
  }

  body.has-mobile-nav .pb-content-area,
  body.has-mobile-nav .pb-page-background,
  body.has-mobile-nav .tw-page-content {
    overflow-x: hidden;
    max-width: 100vw;
  }

  /*
   * Fast mobil-header (shout + util): en källa till offset.
   * När Showdown (.tw-sc) finns ligger den I FLÖDET mellan header och .pb — då får .tw-sc margin-top
   * (så den inte ritas under shout), men .pb-page-background ska INTE få samma offset igen (annars jättelucka).
   */
  body.has-mobile-nav:not(.tw-page-messenger) {
    --tw-mob-fixed-header-h: 74px;
  }

  body.has-mobile-nav:not(.builder-edit-mode):not(.tw-page-messenger) .tw-sc {
    margin-top: calc(var(--tw-mob-fixed-header-h) + env(safe-area-inset-top)) !important;
    margin-bottom: 5px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.has-mobile-nav .pb-page-background {
    /* Sidor utan Showdown (t.ex. builder): hela offset på .pb (ingen .tw-sc i DOM). */
    padding: calc(var(--tw-mob-fixed-header-h, 74px) + env(safe-area-inset-top)) 10px 12px;
    border-radius: 0;
  }

  /* Messenger: egen scroll/layout — behåll 0. */
  body.tw-page-messenger.has-mobile-nav .pb-page-background {
    padding-top: 0 !important;
  }

  /* Med Showdown: default.php nollar top-padding — lägg bara normal gutter under banner (ingen dubbel header-offset). */
  body.has-mobile-nav:not(.tw-page-messenger) .tw-sc ~ .pb-page-background {
    padding: 10px 10px 12px !important;
  }

  body.has-mobile-nav .pb-content-area {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }

  body.has-mobile-nav .tw-widget {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0;
    border-radius: 0;
  }

  /* ─ end general mobile layout ─ */

  body.tw-page-profile .pb-wrapper,
  body.tw-page-profile .pb-content-area,
  body.tw-page-profile .pb-page-background,
  body.tw-page-profile .tw-page-content {
    overflow-x: hidden;
  }

  body.tw-page-profile .pb-page-background {
    padding: 8px 12px;
  }

  body.tw-page-profile .pb-content-area {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }

  body.tw-page-profile .pb-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
  }

  body.tw-page-profile .pb-col-100,
  body.tw-page-profile .pb-col-75,
  body.tw-page-profile .pb-col-66,
  body.tw-page-profile .pb-col-50,
  body.tw-page-profile .pb-col-33,
  body.tw-page-profile .pb-col-25 {
    width: 100%;
    min-width: 0;
  }

  body.tw-page-profile .pb-wrapper .tw-widget {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
  }

  body.tw-page-profile .tw-widget,
  body.tw-page-profile .tw-widget * {
    font-family: var(--font-family), Roboto, sans-serif;
  }

  body.tw-page-profile .tw-widget .tw-widget-body {
    padding-left: 12px;
    padding-right: 12px;
  }

  body.tw-page-profile .tw-ministats-grid .stat-value,
  body.tw-page-profile .tw-stat-grid .stat-value,
  body.tw-page-profile .tw-profile-ministats .value {
    font-size: 15px;
  }

  body.tw-page-profile .tw-ministats-grid .stat-label,
  body.tw-page-profile .tw-stat-grid .stat-label,
  body.tw-page-profile .tw-profile-ministats .label {
    font-size: 7px;
  }

  body.tw-page-profile .tw-profile-playstyle-dna svg,
  body.tw-page-profile .tw-profile-playstyle-dna .tw-radar-svg {
    width: 100%;
    height: auto;
    filter: none;
  }

  body.tw-page-profile .tw-profile-playstyle-dna text,
  body.tw-page-profile .tw-profile-playstyle-dna .tw-radar-label {
    font-size: 9px;
  }

  body.tw-page-profile .tw-profile-widget-4 .pfw4-head {
    display: grid;
    justify-items: center;
    gap: 8px;
    text-align: center;
  }

  body.tw-page-profile .tw-profile-widget-4 .pfw4-avatar-wrap,
  body.tw-page-profile .tw-profile-widget-4 .pfw4-avatar,
  body.tw-page-profile .tw-profile-widget-4 .pfw4-avatar img {
    width: 72px;
    height: 72px;
    border-radius: 0;
    border: 2px solid var(--primary);
  }

  body.tw-page-profile .tw-profile-widget-4 .pfw4-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
  }

  body.tw-page-profile .tw-profile-widget-4 .pfw4-socials {
    justify-content: center;
    gap: 12px;
  }

  body.tw-page-profile .tw-profile-widget-4 .pfw4-social,
  body.tw-page-profile .tw-profile-widget-4 .pfw4-social a {
    width: 36px;
    height: 36px;
  }

  body.tw-page-profile .tw-profile-widget-4 .pfw4-social i,
  body.tw-page-profile .tw-profile-widget-4 .pfw4-social svg {
    width: 20px;
    height: 20px;
    font-size: 20px;
  }

  body.tw-page-profile .tw-navband-sticky,
  body.tw-page-profile > header,
  body.tw-page-profile > section {
    display: none;
  }

  /* Hide desktop navbar on all logged-in pages that have the bottom nav */
  body.has-mobile-nav > header,
  body.has-mobile-nav > section {
    display: none;
  }

  /* ============================================================
     BOTTOM NAVIGATION — redesigned per FORRE.NU Mobile spec
     ============================================================ */

  .tw-mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    height: calc(64px + env(safe-area-inset-bottom));
    padding: 0 0 env(safe-area-inset-bottom);
    background: var(--surface-5);
    backdrop-filter: saturate(150%) blur(14px);
    -webkit-backdrop-filter: saturate(150%) blur(14px);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 -10px 36px rgba(0, 0, 0, 0.42);
    display: grid;
    grid-template-columns: 1fr 1fr 64px 1fr 1fr;
    /* stretch: undvik tom “luft” ovanför ikoner (align-items: end lämnade gap mot navens övre kant) */
    align-items: stretch;
  }

  .tw-mobile-bottom-nav--guest {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
  }

  .tw-mobile-bottom-nav--guest .tw-mobile-bottom-item {
    justify-content: center;
    padding-left: 2px;
    padding-right: 2px;
  }

  .tw-mobile-bottom-nav--guest button.tw-mobile-bottom-item {
    border: 0;
    background: transparent;
    font: inherit;
    color: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .tw-mobile-bottom-nav--guest .tw-mobile-bottom-item--guest-login {
    color: var(--primary);
    font-weight: 800;
  }

  .tw-mobile-bottom-item {
    position: relative;
    min-height: 0;
    height: auto;
    align-self: stretch;
    padding: 2px 0 6px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease;
    font-family: var(--font-family), Roboto, sans-serif;
    width: 100%;
    justify-self: center;
  }

  .tw-mobile-bottom-item i {
    font-size: 18px;
    line-height: 1;
  }

  .tw-mob-hub-btn {
    position: relative;
    inline-size: 100%;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: auto;
    min-height: 52px;
    flex: 1 1 auto;
    align-self: stretch;
    justify-self: stretch;
    margin: 0;
    border: 1px solid var(--primary);
    border-radius: 0;
    background: transparent;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(0);
    z-index: 953;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .tw-mob-hub-btn .tw-mob-hub-ico {
    position: absolute;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .tw-mob-hub-btn .tw-mob-hub-ico--close {
    opacity: 0;
    transform: rotate(-90deg);
  }

  .tw-mob-hub-btn.is-open {
    background: var(--primary);
    color: #fff;
    transform: translateY(0) rotate(90deg);
    box-shadow: 0 10px 20px rgba(0,0,0,0.34);
  }

  .tw-mob-hub-btn.is-open .tw-mob-hub-ico--menu {
    opacity: 0;
  }

  .tw-mob-hub-btn.is-open .tw-mob-hub-ico--close {
    opacity: 1;
    transform: rotate(0deg);
  }

  /* Active: färg — top-linje = tw-mob-premium-v1 inset (full bredd). Fallback utan premium-klass: */
  .tw-mobile-bottom-item.is-active {
    color: var(--primary);
  }

  body.has-mobile-nav:not(.tw-mob-premium-v1) .tw-mobile-bottom-item.is-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
  }

  /* Tap feedback */
  .tw-mobile-bottom-item:active {
    opacity: 0.7;
  }

  /* Badge wrapper (for positioning dot/pill over icon) */
  .tw-mob-badge-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Small red dot badge — Chat unread */
  .tw-mob-dot-badge {
    position: absolute;
    top: -2px;
    right: -3px;
    width: 6px;
    height: 6px;
    background: var(--danger);
    border-radius: 50%;
    pointer-events: none;
  }

  /* Numbered pill badge — Social friend requests */
  .tw-mob-pill-badge {
    position: absolute;
    top: -4px;
    right: -7px;
    min-width: 16px;
    height: 12px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--danger);
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    border-radius: 20px;
    pointer-events: none;
    line-height: 1;
  }

  /* Avatar thumbnail in bottom nav */
  .tw-mobile-bottom-avatar {
    width: 22px;
    height: 22px;
    object-fit: cover;
    border: 1px solid var(--border);
    border-radius: 0;
  }

  /* Legacy classes — kept for backwards compatibility, visually suppressed */
  .tw-mobile-bottom-item-primary { color: var(--text-muted); }
  .tw-mobile-bottom-primary-icon { display: none; }
  .tw-mobile-bottom-ico-wrap     { position: relative; display: inline-flex; }
  .tw-mobile-bottom-badge        { display: none; } /* replaced by tw-mob-dot/pill-badge */

  /* ============================================================
     MOBILE APP COMPONENT SYSTEM
     All classes use tw-mob-* prefix (mobile-specific)
     ============================================================ */

  /* ── SECTION HEADER ── */
  .tw-mob-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    margin: 20px 0 10px;
  }

  .tw-mob-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-section-action {
    font-size: 10px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    background: none;
    border: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  /* ── LIST ROW ── */
  .tw-mob-list {
    display: flex;
    flex-direction: column;
  }

  .tw-mob-list-row {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 14px;
    min-height: 52px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    transition: background 0.1s ease;
    text-decoration: none;
    color: inherit;
  }

  .tw-mob-list-row:active,
  .tw-mob-list-row.is-tapped {
    background: rgba(255,255,255,0.02);
  }

  .tw-mob-list-avatar {
    width: 36px;
    height: 36px;
    border-radius: 0;
    border: 1px solid var(--border);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    position: relative;
  }

  .tw-mob-list-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .tw-mob-online-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    border: 2px solid var(--surface-2);
    pointer-events: none;
  }

  .tw-mob-list-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .tw-mob-list-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-list-sub {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-list-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 6px;
  }

  .tw-mob-list-meta {
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  /* Leaderboard variant */
  .tw-mob-list-row--lb.is-top1 { background: linear-gradient(90deg, rgba(255,215,0,0.06) 0%, transparent 100%); }
  .tw-mob-list-row--lb.is-top2 { background: linear-gradient(90deg, rgba(192,192,192,0.06) 0%, transparent 100%); }
  .tw-mob-list-row--lb.is-top3 { background: linear-gradient(90deg, rgba(205,127,50,0.06) 0%, transparent 100%); }
  .tw-mob-list-row--lb.is-mine { background: rgba(39,150,242,0.04); border-left: 3px solid var(--primary); }
  .tw-mob-list-row--lb.is-zebra-a { border-color: rgba(255,255,255,0.05); }
  .tw-mob-list-row--lb.is-zebra-b { border-color: rgba(255,255,255,0.09); }

  .tw-mob-lb-hero {
    margin: 0 14px 6px;
    padding: 14px;
    border: 1px solid rgba(39,150,242,0.25);
    background: linear-gradient(180deg, rgba(39,150,242,0.10) 0%, rgba(26,26,26,0.92) 72%);
  }

  .tw-mob-lb-hero-top,
  .tw-mob-lb-hero-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .tw-mob-lb-hero-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-lb-hero-title,
  .tw-mob-lb-hero-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.05;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-lb-hero-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-lb-hero-live.is-live {
    border-color: rgba(34,197,94,0.35);
    color: var(--success);
  }

  .tw-mob-lb-hero-main {
    margin-top: 14px;
    align-items: flex-end;
  }

  .tw-mob-lb-hero-rank {
    font-size: 34px;
    font-weight: 900;
    line-height: 1;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-lb-hero-copy {
    flex: 1;
    min-width: 0;
  }

  .tw-mob-lb-hero-sub {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-lb-hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
  }

  .tw-mob-lb-hero-metric {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .tw-mob-lb-hero-metric-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-lb-hero-metric-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-lb-card {
    display: block;
    padding: 12px;
    text-decoration: none;
    color: inherit;
    background: var(--surface-2);
  }

  .tw-mob-lb-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .tw-mob-lb-pos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,0.12);
    background: var(--surface-3);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-list-row--lb.is-top1 .tw-mob-lb-pos {
    border-color: rgba(251,191,36,0.35);
    color: #f5cf62;
  }

  .tw-mob-list-row--lb.is-top2 .tw-mob-lb-pos {
    border-color: rgba(203,213,225,0.35);
    color: #d6dce4;
  }

  .tw-mob-list-row--lb.is-top3 .tw-mob-lb-pos {
    border-color: rgba(205,127,50,0.35);
    color: #d89a64;
  }

  .tw-mob-lb-avatar {
    position: relative;
  }

  .tw-mob-lb-head {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .tw-mob-lb-name-row,
  .tw-mob-lb-meta-row,
  .tw-mob-lb-foot {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }

  .tw-mob-lb-self,
  .tw-mob-lb-live-pill,
  .tw-mob-lb-mode-badge,
  .tw-mob-lb-rank-badge,
  .tw-mob-lb-foot-pill,
  .tw-mob-profile-status,
  .tw-mob-profile-season-pill,
  .tw-mob-profile-quick-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 24px;
    padding: 0 8px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-lb-self,
  .tw-mob-profile-season-pill {
    color: var(--primary);
    border-color: rgba(39,150,242,0.28);
    background: rgba(39,150,242,0.10);
  }

  .tw-mob-lb-live-pill,
  .tw-mob-profile-status--online {
    color: var(--success);
    border-color: rgba(34,197,94,0.28);
    background: rgba(34,197,94,0.10);
  }

  .tw-mob-profile-status--offline {
    color: var(--text-secondary);
  }

  .tw-mob-lb-mode-badge {
    color: #9dd5ff;
    border-color: rgba(39,150,242,0.24);
    background: rgba(39,150,242,0.08);
  }

  .tw-mob-lb-rank-badge {
    color: #ffd37c;
    border-color: rgba(245,158,11,0.24);
    background: rgba(245,158,11,0.08);
  }

  .tw-mob-lb-progress,
  .tw-mob-profile-rank-track {
    margin-top: 10px;
  }

  .tw-mob-lb-progress {
    height: 5px;
    background: var(--surface-5);
    overflow: hidden;
  }

  .tw-mob-lb-progress-bar {
    display: block;
    height: 100%;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
  }

  .tw-mob-lb-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
  }

  .tw-mob-lb-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .tw-mob-lb-stat-value {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-lb-stat-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-lb-my-row {
    margin-top: 10px;
  }

  /* LFG join button */
  .tw-mob-lfg-join {
    height: 28px;
    padding: 0 10px;
    background: var(--primary);
    color: var(--text-primary);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 0;
    border-radius: 0;
    cursor: pointer;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.1s;
    font-family: var(--font-family), Roboto, sans-serif;
  }
  .tw-mob-lfg-join:active { opacity: 0.8; }

  .tw-mob-lfg-join--link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
  }

  .tw-mob-lfg-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    background: var(--surface-2);
  }

  .tw-mob-lfg-action {
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--border);
    background: var(--surface-3);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-lfg-action:active {
    opacity: 0.85;
  }

  /* Accept / Decline (friend requests) */
  .tw-mob-accept-btn {
    height: 28px;
    padding: 0 10px;
    background: transparent;
    color: var(--success);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid rgba(34,197,94,0.4);
    border-radius: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font-family), Roboto, sans-serif;
  }
  .tw-mob-decline-btn {
    height: 28px;
    padding: 0 10px;
    background: transparent;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid var(--border);
    border-radius: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  /* ── STATUS BAR (Home top strip) ── */
  .tw-mob-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    height: 48px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    overflow: hidden;
  }

  .tw-mob-status-avatar {
    width: 28px;
    height: 28px;
    border-radius: 0;
    border: 1px solid var(--border);
    flex-shrink: 0;
    object-fit: cover;
  }

  .tw-mob-status-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-rank-badge {
    height: 16px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 0;
    flex-shrink: 0;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-status-level {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
    margin-left: auto;
    flex-shrink: 0;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-home-hero {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: var(--surface-2);
  }

  .tw-mob-home-hero-body {
    padding: 10px 14px 12px;
  }

  .tw-mob-home-hero-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
  }

  .tw-mob-home-kicker {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-home-streak {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-home-xp {
    width: 100%;
    height: 6px;
    border: 0;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255,255,255,0.08);
  }

  .tw-mob-home-xp::-webkit-progress-bar {
    background: rgba(255,255,255,0.08);
  }

  .tw-mob-home-xp::-webkit-progress-value {
    background: var(--primary);
  }

  .tw-mob-home-xp::-moz-progress-bar {
    background: var(--primary);
  }

  .tw-mob-home-xp-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
    font-size: 10px;
    color: var(--text-tertiary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-section-header--tight {
    margin: 14px 0 8px;
  }

  .tw-mob-focus-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin: 0 14px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    background: var(--surface-3);
    text-decoration: none;
    min-height: 52px;
  }

  .tw-mob-focus-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .tw-mob-focus-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-focus-sub {
    font-size: 11px;
    color: var(--text-tertiary);
    line-height: 1.3;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-focus-cta {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-live-widget-stack {
    display: grid;
    gap: 8px;
    margin: 8px 14px 0;
  }

  .tw-mob-live-widget-stack .pb-widget {
    border: 1px solid var(--border);
    background: var(--surface-2);
  }

  .tw-mob-quick-grid {
    margin: 0 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .tw-mob-quick-item {
    min-height: 58px;
    border: 1px solid var(--border);
    background: var(--surface-3);
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--font-family), Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
  }

  .tw-mob-quick-item:active {
    background: var(--surface-4);
    color: var(--text-primary);
  }

  .tw-mob-quick-label {
    white-space: nowrap;
  }

  /* ── COMPOSER ── */
  .tw-mob-composer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
  }

  .tw-mob-composer--stack {
    align-items: flex-start;
  }

  .tw-mob-composer-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .tw-mob-composer-avatar {
    width: 28px;
    height: 28px;
    border-radius: 0;
    border: 1px solid var(--border);
    overflow: hidden;
    flex-shrink: 0;
    object-fit: cover;
  }

  .tw-mob-composer-input {
    flex: 1;
    height: 36px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font-family), Roboto, sans-serif;
    padding: 0 10px;
    border-radius: 0;
    outline: none;
    -webkit-appearance: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }

  .tw-mob-composer-input::placeholder {
    color: rgba(255,255,255,0.18);
  }

  .tw-mob-composer-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(39,150,242,0.15);
  }

  .tw-mob-composer-send {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: var(--text-primary);
    border: 0;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
  }
  .tw-mob-composer-send.is-visible {
    opacity: 1;
    pointer-events: auto;
  }
  .tw-mob-composer-send i { font-size: 13px; }

  .tw-mob-composer-controls {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .tw-mob-composer-camera,
  .tw-mob-composer-visibility {
    min-height: 30px;
    padding: 0 8px;
    border: 1px solid var(--border);
    background: var(--surface-3);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-composer-camera {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .tw-mob-composer-visibility select {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-family), Roboto, sans-serif;
    outline: none;
    padding: 0;
  }

  .tw-mob-composer-preview {
    border: 1px solid var(--border);
    background: var(--surface-1);
  }

  .tw-mob-composer-preview img {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: cover;
  }

  .tw-mob-composer-preview-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-top: 1px solid var(--border);
  }

  .tw-mob-composer-preview-actions label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-composer-preview-actions select {
    min-height: 26px;
    border: 1px solid var(--border);
    background: var(--surface-3);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-family: var(--font-family), Roboto, sans-serif;
    padding: 0 6px;
    outline: none;
  }

  .tw-mob-composer-size {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 10px;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-composer-remove {
    min-height: 26px;
    padding: 0 8px;
    border: 1px solid rgba(231,76,60,0.45);
    background: transparent;
    color: var(--danger);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  /* ── PULSE CARDS (horizontal scroll) ── */
  .tw-mob-pulse-track {
    display: flex;
    gap: 8px;
    padding: 0 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tw-mob-pulse-track::-webkit-scrollbar { display: none; }

  .tw-mob-news-card {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 10px;
    padding: 0 14px 10px;
    text-decoration: none;
    color: inherit;
  }

  .tw-mob-news-media {
    width: 108px;
    height: 86px;
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--surface-2);
  }

  .tw-mob-news-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .tw-mob-news-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
  }

  .tw-mob-news-kicker {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--primary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-news-title {
    font-size: 13px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-family), Roboto, sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .tw-mob-news-excerpt {
    font-size: 11px;
    line-height: 1.35;
    color: var(--text-secondary);
    font-family: var(--font-family), Roboto, sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .tw-mob-news-meta {
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-pulse-card {
    flex: 0 0 110px;
    scroll-snap-align: start;
    background: var(--surface-3);
    border: 1px solid var(--border);
    padding: 10px;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    transition: transform 0.1s ease;
  }
  .tw-mob-pulse-card:active { transform: scale(0.97); }

  .tw-mob-pulse-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
  }
  .tw-mob-pulse-card--online::before { background: var(--success); }
  .tw-mob-pulse-card--lfg::before   { background: var(--primary); }
  .tw-mob-pulse-card--warn::before  { background: var(--warning); }
  .tw-mob-pulse-card--danger::before{ background: var(--danger);  }

  .tw-mob-pulse-hero {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    margin-bottom: 4px;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-pulse-label {
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.20);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  /* ── WALL POST ── */
  .tw-mob-wall-post {
    position: relative;
    overflow: hidden;
    padding: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    background: transparent;
  }

  .tw-mob-wall-post-main {
    position: relative;
    z-index: 2;
    transition: transform 0.2s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    background: var(--surface-2);
    border: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  }

  .tw-mob-wall-post.is-swiped .tw-mob-wall-post-main {
    transform: translateX(-116px);
  }

  .tw-mob-wall-swipe-actions {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 116px;
    display: grid;
    grid-template-rows: 1fr 1fr;
    z-index: 1;
  }

  .tw-mob-wall-swipe-btn {
    border: 0;
    border-left: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--surface-3);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    min-height: 44px;
  }

  .tw-mob-wall-swipe-btn:last-child {
    border-bottom: 0;
  }

  .tw-mob-wall-swipe-btn:active {
    background: var(--surface-5);
  }

  .tw-mob-wall-post-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
  }

  .tw-mob-wall-avatar {
    width: 32px;
    height: 32px;
    border-radius: 0;
    border: 1px solid var(--border);
    object-fit: cover;
    cursor: pointer;
    flex-shrink: 0;
  }

  .tw-mob-wall-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-wall-ts {
    font-size: 9px;
    color: var(--text-tertiary);
    margin-left: auto;
    flex-shrink: 0;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-wall-body {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.5;
    margin-bottom: 10px;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-wall-media {
    margin-bottom: 10px;
    border: 1px solid var(--border);
    background: var(--surface-1);
    overflow: hidden;
  }

  .tw-mob-wall-media img {
    width: 100%;
    display: block;
    max-height: 320px;
    object-fit: cover;
  }

  .tw-mob-wall-actions {
    display: flex;
    gap: 20px;
  }

  .tw-mob-wall-action {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    border: 0;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    padding: 4px 2px;
    font-family: var(--font-family), Roboto, sans-serif;
    transition: color 0.12s ease;
  }
  .tw-mob-wall-action:active,
  .tw-mob-wall-action:hover {
    color: var(--primary);
  }
  .tw-mob-wall-action:focus-visible {
    outline: none;
    box-shadow: var(--ring-focus, 0 0 0 2px rgba(39, 150, 242, 0.42));
    border-radius: 0;
  }
  .tw-mob-wall-action i { font-size: 14px; }
  .tw-mob-action-count  { font-size: 11px; }
  .tw-mob-wall-action--liked { color: var(--danger); }

  /* ── INLINE TABS (Social, etc.) ── */
  .tw-mob-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: transparent;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .tw-mob-tabs::-webkit-scrollbar { display: none; }

  .tw-mob-tab {
    flex: 0 0 auto;
    padding: 0 14px;
    height: 40px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    white-space: nowrap;
    transition: color 0.15s;
    font-family: var(--font-family), Roboto, sans-serif;
  }
  .tw-mob-tab.is-active { color: var(--primary); }
  .tw-mob-tab.is-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
  }

  .tw-mob-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 12px;
    padding: 0 4px;
    background: var(--danger);
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    border-radius: 20px;
    margin-left: 4px;
    vertical-align: middle;
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-tabs--sticky {
    position: sticky;
    top: calc(44px + env(safe-area-inset-top));
    left: 0;
    right: 0;
    width: 100%;
    z-index: 35;
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-tab-panels {
    padding-top: 0;
    margin-top: 0;
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-empty-state {
    margin-top: 0;
  }

  body.tw-page-friends .tw-mob-view--social {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-social-intro {
    padding: 10px 14px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    background: var(--surface-2);
    display: grid;
    gap: 10px;
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-social-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-social-title i {
    color: var(--primary);
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-social-sub {
    margin: 4px 0 0;
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-social-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-social-stat {
    border: 1px solid var(--border);
    background: var(--surface-3);
    padding: 8px 8px 7px;
    display: grid;
    gap: 4px;
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-social-stat.is-hot {
    border-color: rgba(245,158,11,0.45);
    background: rgba(245,158,11,0.10);
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-social-stat.is-live {
    border-color: rgba(34,197,94,0.45);
    background: rgba(34,197,94,0.10);
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-social-stat-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-social-stat-value {
    font-size: 17px;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-social-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-social-quick-btn {
    min-height: 38px;
    border: 1px solid var(--border);
    background: var(--surface-3);
    color: var(--text-secondary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-social-quick-btn:active {
    opacity: 0.82;
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-tab-badge {
    min-width: 18px;
    height: 14px;
    border-radius: 0;
    padding: 0 4px;
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-social-card {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    background: var(--surface-2);
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-list-row--social {
    border-bottom: 0;
    min-height: 56px;
    padding: 11px 14px 9px;
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-social-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0 14px 10px;
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-social-btn {
    min-height: 36px;
    border: 1px solid var(--border);
    background: var(--surface-3);
    color: var(--text-secondary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-social-btn--primary {
    border-color: rgba(39,150,242,0.48);
    background: rgba(39,150,242,0.13);
    color: var(--primary);
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-social-btn:active {
    opacity: 0.82;
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-row-actions--requests {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-row-actions--requests form {
    margin: 0;
  }

  body.tw-page-friends .tw-mob-view--social .tw-mob-row-actions--requests .tw-mob-accept-btn,
  body.tw-page-friends .tw-mob-view--social .tw-mob-row-actions--requests .tw-mob-decline-btn {
    width: 100%;
    min-height: 34px;
    font-size: 10px;
    letter-spacing: 0.05em;
  }

  /* ── FILTER CHIPS (Leaderboard) ── */
  .tw-mob-chips {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .tw-mob-chips::-webkit-scrollbar { display: none; }

  body.tw-page-leaderboard .tw-mob-view--leaderboard .tw-mob-chips {
    position: fixed;
    top: calc(44px + env(safe-area-inset-top));
    left: 0;
    right: 0;
    width: 100%;
    z-index: 35;
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }

  body.tw-page-leaderboard .tw-mob-view--leaderboard > .tw-mob-list {
    padding-top: 50px;
  }

  .tw-mob-chip {
    flex: 0 0 auto;
    height: 28px;
    padding: 0 12px;
    background: var(--surface-3);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 0;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.1s, color 0.1s;
    font-family: var(--font-family), Roboto, sans-serif;
  }
  .tw-mob-chip.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
  }
  .tw-mob-chip--live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: default;
    border-color: rgba(34,197,94,0.35);
    color: rgba(34,197,94,0.90);
    background: rgba(34,197,94,0.10);
  }
  .tw-mob-chip--live strong {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--text-primary);
  }
  .tw-mob-chip--live.is-live {
    box-shadow: 0 0 0 1px rgba(34,197,94,0.16) inset;
  }
  .tw-mob-chip:active { opacity: 0.8; }

  /* ── HUB MENU (center button popup) ── */
  .tw-mob-hub-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: calc(64px + env(safe-area-inset-bottom));
    left: 0;
    background: rgba(0,0,0,0.60);
    z-index: 950;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .tw-mob-hub-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .tw-mob-hub-backdrop[hidden],
  .tw-mob-hub-menu[hidden],
  .tw-mob-chat-quote-chip[hidden] {
    display: none !important;
  }

  .tw-mob-hub-menu {
    position: fixed;
    top: calc(44px + env(safe-area-inset-top));
    left: 0;
    right: 0;
    bottom: calc(64px + env(safe-area-inset-bottom));
    max-height: none;
    background: var(--surface-2);
    border: 0;
    border-radius: 0;
    box-shadow: inset 0 0 0 1px rgba(39,150,242,0.10), 0 -12px 40px rgba(0,0,0,0.50);
    overflow-y: auto;
    z-index: 951;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
    pointer-events: none;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .tw-mob-hub-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .tw-mob-hub-menu::before {
    content: '';
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    display: block;
    height: 2px;
    background: var(--primary);
    opacity: 0.55;
    z-index: 2;
  }

  .tw-mob-hub-profile {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    text-decoration: none;
    color: inherit;
    border-left: 3px solid var(--primary);
    background: rgba(39, 150, 242, 0.04);
  }

  .tw-mob-hub-av {
    position: relative;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 0;
    overflow: hidden;
    background: var(--surface-4);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
  }

  .tw-mob-hub-av img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .tw-mob-hub-online-dot {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 11px;
    height: 11px;
    border: 2px solid var(--surface-2);
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 1px rgba(34,197,94,0.35), 0 0 10px rgba(34,197,94,0.55);
  }

  .tw-mob-hub-info {
    min-width: 0;
  }

  .tw-mob-hub-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-hub-epic {
    margin-top: 1px;
    font-size: 11px;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-hub-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
  }

  .tw-mob-hub-tag {
    height: 18px;
    padding: 0 6px;
    border: 1px solid transparent;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-hub-tag--rank {
    color: #d9e5f0;
    border-color: rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
  }

  .tw-mob-hub-tag--level {
    color: var(--primary);
    border-color: rgba(39,150,242,0.22);
    background: rgba(39,150,242,0.12);
  }

  .tw-mob-hub-tag--streak {
    color: var(--success);
    border-color: rgba(34,197,94,0.25);
    background: rgba(34,197,94,0.10);
  }

  /* Profile border-bottom removed — streak+xp block now acts as visual divider */
  .tw-mob-hub-profile {
    border-bottom: 0;
  }

  /* ── STREAK BAR ──────────────────────────────────────────────────── */
  .tw-mob-hub-streak-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    border-left: 3px solid var(--border);
    background: transparent;
  }

  .tw-mob-hub-streak-bar.tw-mob-hub-streak--zero {
    border-left-color: var(--border);
    background: transparent;
  }

  .tw-mob-hub-streak-bar.tw-mob-hub-streak--low {
    border-left-color: rgba(34,197,94,0.45);
    background: rgba(34,197,94,0.04);
  }

  .tw-mob-hub-streak-bar.tw-mob-hub-streak--active {
    border-left-color: var(--success);
    background: rgba(34,197,94,0.06);
  }

  .tw-mob-hub-streak-bar.tw-mob-hub-streak--hot {
    border-left-color: var(--warning);
    background: rgba(245,158,11,0.06);
  }

  .tw-mob-hub-streak-bar.tw-mob-hub-streak--legend {
    border-left-color: var(--primary);
    background: rgba(39,150,242,0.06);
  }

  .tw-mob-hub-streak-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
  }

  .tw-mob-hub-streak-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
  }

  .tw-mob-hub-streak-label {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-hub-streak-bar.tw-mob-hub-streak--zero .tw-mob-hub-streak-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
  }

  .tw-mob-hub-streak-sub {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-tertiary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-hub-streak-bar.tw-mob-hub-streak--hot .tw-mob-hub-streak-sub,
  .tw-mob-hub-streak-bar.tw-mob-hub-streak--legend .tw-mob-hub-streak-sub {
    font-weight: 700;
    color: var(--text-secondary);
  }

  /* ── XP PROGRESS BAR ─────────────────────────────────────────────── */
  .tw-mob-hub-xp-wrap {
    padding: 6px 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .tw-mob-hub-xp-track {
    height: 3px;
    background: rgba(255,255,255,0.07);
    overflow: hidden;
    position: relative;
  }

  .tw-mob-hub-xp-fill {
    height: 100%;
    width: var(--xp-pct, 0%);
    background: var(--primary);
    position: relative;
    transition: width 0.6s ease;
  }

  .tw-mob-hub-xp-fill--glow::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-glow);
    filter: blur(4px);
    opacity: 0.7;
  }

  .tw-mob-hub-xp-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
    font-size: 10px;
    color: var(--text-tertiary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-hub-xp-pct {
    font-weight: 700;
    color: var(--primary);
  }

  /* ── PLAYER SEARCH ───────────────────────────────────────────────── */
  .tw-mob-hub-search {
    padding: 10px 16px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .tw-mob-hub-search-form {
    display: block;
  }

  .tw-mob-hub-search-row {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--surface-3);
    border: 1px solid var(--border);
    height: 42px;
  }

  .tw-mob-hub-search-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    font-family: var(--font-family), Roboto, sans-serif;
    appearance: none;
    -webkit-appearance: none;
  }

  .tw-mob-hub-search-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
  }

  .tw-mob-hub-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
  }

  .tw-mob-hub-search-input:focus {
    outline: none;
  }

  .tw-mob-hub-search-row:focus-within {
    border-color: var(--primary);
  }

  .tw-mob-hub-search-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: transparent;
    border: none;
    border-left: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    margin: 0;
    touch-action: manipulation;
  }

  .tw-mob-hub-search-btn:active {
    background: var(--surface-4);
    color: var(--primary);
  }

  /* ── HOVER RECENTS ──────────────────────────────────────────────── */
  .tw-mob-hub-recents {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.05);
  }

  .tw-mob-hub-recents-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
  }

  .tw-mob-hub-recents-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-hub-recents-clear {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-tertiary);
    background: none;
    border: none;
    padding: 2px 0;
    cursor: pointer;
    font-family: var(--font-family), Roboto, sans-serif;
    touch-action: manipulation;
  }

  .tw-mob-hub-recents-clear:active {
    color: var(--text-secondary);
  }

  .tw-mob-hub-recents-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .tw-mob-hub-recent-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-family), Roboto, sans-serif;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    min-height: 38px;
    touch-action: manipulation;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .tw-mob-hub-recent-item:active {
    color: var(--text-primary);
  }

  .tw-mob-hub-recent-ico {
    flex-shrink: 0;
    color: var(--text-muted);
    width: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .tw-mob-hub-recent-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tw-mob-hub-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .tw-mob-platform-badge {
    height: 22px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 0;
    background: var(--surface-4);
    color: var(--text-tertiary);
    font-size: 9px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-platform-key {
    color: var(--text-muted);
  }

  .tw-mob-platform-value {
    color: var(--text-tertiary);
  }

  .tw-mob-platform-visibility {
    height: 22px;
    padding: 0 8px;
    border: 1px solid rgba(39,150,242,0.32);
    border-radius: 0;
    background: rgba(39,150,242,0.10);
    color: var(--primary);
    font-size: 9px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-hub-menu.tw-mob-platform-hidden [data-platform-value="1"] {
    color: transparent;
    text-shadow: 0 0 6px rgba(255,255,255,0.45);
    user-select: none;
  }

  .tw-mob-hub-quick {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .tw-mob-hub-quick-card {
    min-height: 72px;
    padding: 10px;
    border: 1px solid rgba(39,150,242,0.28);
    background: var(--tint-blue-strong, rgba(39, 150, 242, 0.15));
    text-decoration: none;
    color: inherit;
    display: grid;
    align-content: space-between;
    gap: 3px;
  }

  .tw-mob-hub-quick-kicker {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-hub-quick-value {
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-hub-quick-meta {
    font-size: 10px;
    color: var(--text-secondary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-hub-me-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .tw-mob-hub-me-item {
    height: 26px;
    padding: 0 8px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 0;
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-hub-me-item i {
    color: var(--primary);
    font-size: 11px;
  }

  .tw-mob-hub-me-item--profile .tw-mob-hub-me-av {
    width: 18px;
    height: 18px;
    border-radius: 0;
    border: 1px solid rgba(39, 150, 242, 0.35);
    object-fit: cover;
    flex-shrink: 0;
  }

  .tw-mob-hub-me-item--profile .tw-mob-hub-me-av--ph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 0;
    border: 1px solid rgba(39, 150, 242, 0.35);
    background: var(--surface-4);
    font-size: 9px;
    font-weight: 900;
    color: var(--primary);
    flex-shrink: 0;
  }

  .tw-mob-hub-nav-badge {
    margin-left: auto;
    flex-shrink: 0;
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(39, 150, 242, 0.45);
    border-radius: 0;
    background: rgba(39, 150, 242, 0.14);
    color: var(--primary);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
  }

  .tw-mob-hub-nav-badge--live {
    border-color: rgba(34, 197, 94, 0.45);
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
  }

  .tw-mob-hub-me-item--coffee {
    position: relative;
    overflow: hidden;
    border-color: rgba(23, 143, 219, 0.85);
    background: linear-gradient(135deg, #00abe7 0%, #178fdb 100%);
    color: #ffffff;
    justify-content: space-between;
    padding: 0 10px;
    box-shadow: 0 0 0 1px rgba(0, 171, 231, 0.28), 0 0 14px rgba(0, 171, 231, 0.24);
  }

  .tw-mob-hub-me-item--coffee i,
  .tw-mob-hub-me-item--coffee span {
    color: #ffffff;
  }

  .tw-mob-hub-me-item--coffee::before {
    content: '';
    position: absolute;
    top: -8px;
    bottom: -8px;
    left: -38px;
    width: 26px;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.34) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(14deg);
    opacity: 0.72;
    animation: twMobCoffeeSweep 3.8s ease-in-out infinite;
    pointer-events: none;
  }

  .tw-mob-hub-me-item--coffee .tw-coffee-cta-badge {
    display: inline-flex;
    align-items: center;
    height: 18px;
    padding: 0 7px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .tw-mob-hub-platform-empty {
    padding: 0 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .tw-mob-hub-platform-empty a {
    height: 30px;
    border: 1px solid rgba(0,171,231,0.72);
    border-radius: 0;
    background: linear-gradient(135deg, rgba(0,171,231,0.18) 0%, rgba(23,143,219,0.12) 100%);
    color: #7fd6ff;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    font-family: var(--font-family), Roboto, sans-serif;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 0 0 1px rgba(0,171,231,0.12), 0 0 14px rgba(0,171,231,0.16);
  }

  .tw-mob-hub-platform-empty a:hover,
  .tw-mob-hub-platform-empty a:active {
    color: #ffffff;
    border-color: rgba(0,171,231,0.92);
    background: linear-gradient(135deg, rgba(0,171,231,0.24) 0%, rgba(23,143,219,0.18) 100%);
  }

  @keyframes twMobCoffeeSweep {
    0% { transform: translateX(0) rotate(14deg); opacity: 0; }
    14% { opacity: 0.78; }
    30% { transform: translateX(150px) rotate(14deg); opacity: 0; }
    100% { transform: translateX(150px) rotate(14deg); opacity: 0; }
  }

  .tw-mob-hub-nav {
    padding: 6px 0;
  }

  .tw-mob-hub-item {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 48px;
    padding: 0 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.1s ease;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-hub-item:active {
    background: rgba(255,255,255,0.02);
  }

  .tw-mob-hub-item.tw-mob-hub-item--notif-nav {
    border-left: 3px solid var(--primary);
    background: rgba(39, 150, 242, 0.06);
  }

  .tw-mob-hub-icon {
    width: 20px;
    height: 20px;
    color: var(--primary);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .tw-mob-hub-divider {
    height: 1px;
    margin: 8px 16px;
    background: rgba(255,255,255,0.04);
  }

  .tw-mob-hub-logout {
    color: var(--danger);
  }

  .tw-mob-hub-logout .tw-mob-hub-icon {
    color: var(--danger);
  }

  .tw-mob-hub-version {
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    text-align: center;
    font-size: 8px;
    color: rgba(255,255,255,0.08);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  /* ── NOTIFICATION SHEET ── */
  .tw-mob-notif-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 952;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .tw-mob-notif-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .tw-mob-notif-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 72vh;
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    border-radius: 0;
    z-index: 953;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .tw-mob-notif-sheet.is-open {
    transform: translateY(0);
  }

  .tw-mob-notif-handle {
    display: block;
    width: 42px;
    height: 3px;
    margin: 8px auto;
    border-radius: 0;
    background: rgba(255,255,255,0.18);
  }

  .tw-mob-notif-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 14px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .tw-mob-notif-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-notif-mark {
    color: var(--primary);
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-notif-list {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .tw-mob-notif-row {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    text-decoration: none;
    color: inherit;
  }

  .tw-mob-notif-row {
    transition: background-color 0.15s ease, border-left-color 0.15s ease;
  }

  .tw-mob-notif-row.is-unread {
    background: rgba(39,150,242,0.03);
    border-left: 2px solid var(--primary);
    padding-left: 12px;
  }

  .tw-mob-notif-ico {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 0;
    background: var(--surface-3);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
  }

  .tw-mob-notif-copy {
    min-width: 0;
  }

  .tw-mob-notif-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-notif-sub {
    margin-top: 2px;
    font-size: 10px;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-notif-time {
    font-size: 9px;
    color: var(--text-muted);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-notif-empty {
    min-height: 160px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 8px;
    color: var(--text-tertiary);
    font-family: var(--font-family), Roboto, sans-serif;
    text-align: center;
    padding: 16px;
  }

  .tw-mob-notif-empty strong {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
  }

  .tw-mob-notif-empty span {
    font-size: 10px;
  }

  .tw-mob-notif-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
    background: var(--surface-3);
  }

  .tw-mob-notif-all-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(39, 150, 242, 0.42);
    background: rgba(39, 150, 242, 0.1);
    color: var(--primary);
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-notif-all-link:active {
    background: rgba(39, 150, 242, 0.16);
  }

  .tw-mob-copy-toast {
    position: fixed;
    left: 50%;
    bottom: calc(80px + env(safe-area-inset-bottom));
    transform: translate(-50%, 10px);
    opacity: 0;
    border: 1px solid var(--border);
    border-radius: 0;
    background: var(--surface-3);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    padding: 9px 14px;
    z-index: 980;
    transition: opacity 0.18s ease, transform 0.2s ease;
    pointer-events: none;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-copy-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  /* ── BOTTOM SHEET (Quick Profile) ── */
  .tw-mob-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.50);
    z-index: 950;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .tw-mob-sheet-backdrop[aria-hidden="true"] {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .tw-mob-sheet-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .tw-mob-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 70vh;
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    overflow-y: auto;
    z-index: 951;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .tw-mob-sheet[aria-hidden="true"] {
    transform: translateY(100%);
    visibility: hidden;
    pointer-events: none;
  }
  .tw-mob-sheet.is-open {
    transform: translateY(0);
  }

  .tw-mob-sheet-handle {
    display: block;
    width: 40px;
    height: 3px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    margin: 8px auto;
    flex-shrink: 0;
  }

  .tw-mob-sheet-accent {
    height: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, transparent 100%);
  }

  .tw-mob-sheet-banner {
    height: 44px;
    background: var(--surface-5);
    position: relative;
  }

  .tw-mob-sheet-avatar-wrap {
    position: absolute;
    bottom: -18px;
    left: 14px;
  }

  .tw-mob-sheet-avatar {
    width: 40px;
    height: 40px;
    border-radius: 0;
    border: 2px solid var(--surface-2);
    object-fit: cover;
  }

  .tw-mob-sheet-head {
    padding: 24px 14px 10px;
  }

  .tw-mob-sheet-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-sheet-handle-text {
    font-size: 10px;
    color: rgba(255,255,255,0.25);
    margin-bottom: 8px;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-sheet-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
  }

  .tw-mob-sheet-tag {
    height: 18px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 0;
    border-radius: 0;
    font-family: var(--font-family), Roboto, sans-serif;
  }
  .tw-mob-sheet-tag--level  { background: rgba(39,150,242,0.15); color: var(--primary); }
  .tw-mob-sheet-tag--online { background: rgba(34,197,94,0.15);  color: var(--success); }

  .tw-mob-sheet-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid rgba(255,255,255,0.04);
  }

  .tw-mob-sheet-info-label {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 2px;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-sheet-info-val {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-sheet-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    padding: 10px 14px 14px;
  }

  .tw-mob-sheet-action-btn {
    height: 40px;
    background: var(--surface-3);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.1s;
    border-radius: 0;
  }
  .tw-mob-sheet-action-btn:active { background: rgba(255,255,255,0.05); }
  .tw-mob-sheet-action-btn i { font-size: 12px; color: var(--primary); }
  .tw-mob-sheet-action-btn span {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-secondary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-sheet-footer {
    padding: 8px 14px;
    font-size: 8px;
    color: rgba(255,255,255,0.12);
    border-top: 1px solid rgba(255,255,255,0.03);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  /* ── ME-PAGE: PROFILE HEADER ── */
  .tw-mob-profile-hero-card {
    margin: 0 14px;
    padding: 14px;
    border: 1px solid rgba(39,150,242,0.24);
    background: linear-gradient(180deg, rgba(39,150,242,0.10) 0%, rgba(26,26,26,0.94) 68%);
  }

  .tw-mob-profile-head {
    padding: 20px 14px;
    display: flex;
    align-items: flex-end;
    gap: 12px;
  }

  .tw-mob-profile-head--hero {
    padding: 0;
    align-items: center;
  }

  .tw-mob-profile-head-copy {
    min-width: 0;
    flex: 1;
  }

  .tw-mob-profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 0;
    border: 2px solid var(--border);
    object-fit: cover;
    flex-shrink: 0;
  }

  .tw-mob-profile-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-profile-handle {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-bottom: 6px;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-profile-status-row,
  .tw-mob-profile-quick-actions,
  .tw-mob-profile-rank-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
  }

  .tw-mob-profile-status-row {
    margin-top: 12px;
  }

  .tw-mob-profile-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 0 rgba(255,255,255,0.18);
    flex-shrink: 0;
  }

  .tw-mob-profile-rank-copy,
  .tw-mob-profile-latest-meta {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-profile-quick-actions {
    margin-top: 12px;
  }

  .tw-mob-progression-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
  }

  .tw-mob-progress-cell {
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid var(--border);
    background: var(--surface-3);
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .tw-mob-progress-cell--achievements {
    background: rgba(39,150,242,0.08);
    border-color: rgba(39,150,242,0.20);
  }

  .tw-mob-progress-cell--achievements.is-empty {
    background: var(--surface-3);
    border-color: var(--border);
  }

  .tw-mob-progress-kicker {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-progress-main {
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-progress-meta {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-progress-bar {
    height: 4px;
    background: var(--surface-5);
    overflow: hidden;
  }

  .tw-mob-progress-fill {
    height: 100%;
    background: var(--primary);
    box-shadow: 0 0 6px var(--primary-glow);
  }

  .tw-mob-progress-dots {
    display: flex;
    gap: 5px;
  }

  .tw-mob-progress-dot {
    flex: 1 1 0;
    height: 4px;
    background: rgba(255,255,255,0.10);
  }

  .tw-mob-progress-dot.is-filled {
    background: var(--primary);
    box-shadow: 0 0 6px var(--primary-glow);
  }

  .tw-mob-profile-quick-action {
    text-decoration: none;
    flex: 1 1 calc(50% - 4px);
  }

  .tw-mob-stats-strip--season .tw-mob-stat-cell:first-child,
  .tw-mob-stats-strip--season .tw-mob-stat-cell:nth-child(2) {
    border-top-width: 1px;
  }

  .tw-mob-profile-latest-card {
    margin: 12px 14px 0;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: var(--surface-3);
  }

  .tw-mob-profile-latest-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-profile-latest-title {
    margin-top: 6px;
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  /* ── ME-PAGE: NEXT GOAL ── */
  .tw-mob-next-goal {
    margin: 12px 14px 0;
    background: var(--surface-3);
    border: 1px solid var(--border);
    padding: 14px;
  }

  .tw-mob-goal-label {
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-goal-bar-bg {
    height: 4px;
    background: var(--surface-5);
    margin-bottom: 6px;
    position: relative;
    overflow: hidden;
  }

  .tw-mob-goal-bar-fill {
    height: 100%;
    background: var(--primary);
    box-shadow: 0 0 6px var(--primary-glow);
    transition: width 0.4s ease;
    min-width: 0;
    max-width: 100%;
  }

  .tw-mob-goal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .tw-mob-goal-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-goal-pct {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-goal-meta {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-achievements-panel {
    margin: 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    background: var(--surface-3);
  }

  .tw-mob-achievements-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
  }

  .tw-mob-achievement-stat {
    min-width: 0;
    padding: 8px 9px;
    border: 1px solid rgba(255,255,255,0.06);
    background: var(--surface-2);
  }

  .tw-mob-achievement-stat span {
    display: block;
    margin-bottom: 4px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-achievement-stat strong {
    display: block;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-achievements-list {
    display: grid;
    gap: 8px;
  }

  .tw-mob-achievement-item,
  .tw-mob-achievements-empty {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid rgba(255,255,255,0.06);
    background: var(--surface-2);
  }

  .tw-mob-achievement-item--locked {
    background: rgba(255,255,255,0.02);
    border-color: rgba(255,255,255,0.10);
  }

  .tw-mob-achievement-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(39,150,242,0.12);
    color: var(--primary);
    font-size: 13px;
  }

  .tw-mob-achievement-icon--locked {
    background: rgba(255,255,255,0.06);
    color: var(--text-tertiary);
  }

  .tw-mob-achievement-copy {
    min-width: 0;
  }

  .tw-mob-achievement-name {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-achievement-meta,
  .tw-mob-achievements-empty-copy {
    margin-top: 3px;
    font-size: 10px;
    color: var(--text-secondary);
    line-height: 1.35;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-achievement-state {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--success);
    white-space: nowrap;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-achievement-state--locked {
    color: var(--text-tertiary);
  }

  .tw-mob-achievements-empty {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .tw-mob-achievements-empty-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(39,150,242,0.10);
    color: var(--primary);
  }

  .tw-mob-achievements-empty-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  /* ── ME-PAGE: STATS STRIP ── */
  .tw-mob-stats-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0 14px;
  }

  .tw-mob-stat-cell {
    padding: 14px 10px;
    border: 1px solid rgba(51,51,51,0.30);
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .tw-mob-stat-hero {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-stat-label {
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.20);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  /* ── SETTINGS ROWS (Me-page) ── */
  .tw-mob-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-family: var(--font-family), Roboto, sans-serif;
    transition: background 0.1s;
  }
  .tw-mob-settings-row:active { background: rgba(255,255,255,0.02); }
  .tw-mob-settings-row i { font-size: 12px; color: var(--text-muted); }

  /* ── COLLAPSE SECTION ── */
  .tw-mob-collapse-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    min-height: 48px;
  }

  .tw-mob-collapse-header i.tw-mob-collapse-caret {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
  }
  .tw-mob-collapse-header.is-open i.tw-mob-collapse-caret { transform: rotate(180deg); }

  .tw-mob-collapse-body {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.2s ease;
  }
  .tw-mob-collapse-body.is-open { max-height: 600px; }

  /* ── SEARCH INPUT (Chat page) ── */
  .tw-mob-search-wrap {
    padding: 10px 14px;
  }
  .tw-mob-search-wrap-inner {
    position: relative;
  }
  .tw-mob-search-input {
    width: 100%;
    height: 36px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font-family), Roboto, sans-serif;
    padding: 0 10px 0 32px;
    border-radius: 0;
    outline: none;
    box-sizing: border-box;
    -webkit-appearance: none;
  }
  .tw-mob-search-wrap-inner i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--text-muted);
    pointer-events: none;
  }

  /* ── OFFLINE BAR ── */
  .tw-mob-offline-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 28px;
    background: var(--warning);
    color: #000;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-family), Roboto, sans-serif;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
  }
  .tw-mob-offline-bar.is-visible { display: flex; }

  .tw-mob-pull-refresh {
    position: fixed;
    top: 8px;
    left: 50%;
    width: 36px;
    height: 36px;
    transform: translate(-50%, -14px) scale(0.9);
    opacity: 0;
    pointer-events: none;
    z-index: 1900;
    transition: opacity 0.15s ease, transform 0.15s ease;
  }

  .tw-mob-pull-refresh svg {
    width: 36px;
    height: 36px;
  }

  .tw-mob-pull-refresh.is-visible {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }

  .tw-mob-pull-refresh.is-refreshing {
    animation: twMobPullSpin 0.9s linear infinite;
  }

  .tw-mob-pull-ring-bg,
  .tw-mob-pull-ring {
    fill: none;
    stroke-width: 2;
  }

  .tw-mob-pull-ring-bg {
    stroke: rgba(255,255,255,0.14);
  }

  .tw-mob-pull-ring {
    stroke: var(--primary);
    stroke-linecap: round;
    stroke-dasharray: 88;
    stroke-dashoffset: 88;
    transition: stroke-dashoffset 0.08s linear;
  }

  @keyframes twMobPullSpin {
    to { transform: translate(-50%, 0) rotate(360deg); }
  }

  /* ── ANIMATIONS ── */
  @keyframes twMobLikePulse {
    0%   { transform: scale(1.0); }
    50%  { transform: scale(1.3); }
    100% { transform: scale(1.0); }
  }
  .tw-mob-like-pulse { animation: twMobLikePulse 0.15s ease-out; }

  @keyframes twMobSlideInUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0);   }
  }
  .tw-mob-slide-in { animation: twMobSlideInUp 0.2s ease-out; }

  @keyframes twMobFadeSlide {
    from { opacity: 0; transform: translateX(8px); }
    to   { opacity: 1; transform: translateX(0);   }
  }
  .tw-mob-tab-content { animation: twMobFadeSlide 0.2s ease-out; }



  body.tw-page-profile .tw-prof-panel,
  body.tw-page-profile .tw-prof-drawer {
    will-change: transform;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  body.tw-page-profile .tw-prof-panel {
    position: fixed;
    inset: 0;
    top: auto;
    width: 100vw;
    max-height: 100vh;
    height: 100vh;
    left: 0;
    right: 0;
    z-index: 2000;
    opacity: 1;
    visibility: hidden;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.3s;
  }

  body.tw-page-profile .tw-prof-panel.is-open {
    visibility: visible;
    transform: translateY(0);
  }

  body.tw-page-profile .tw-prof-panel-shell {
    max-height: 100vh;
    height: 100vh;
  }

  body.tw-page-profile .tw-prof-panel-header {
    position: sticky;
    top: 0;
    z-index: 3;
    padding-top: calc(10px + env(safe-area-inset-top));
  }

  body.tw-page-profile .tw-prof-panel-close {
    width: auto;
    min-width: 44px;
    height: 44px;
    padding: 0 10px;
    font-size: 0;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-tertiary);
  }

  body.tw-page-profile .tw-prof-panel-close::before {
    content: '<- Tillbaka';
  }

  body.tw-page-profile .tw-prof-panel-close {
    line-height: 44px;
  }

  body.tw-page-profile .tw-prof-panel-close > * {
    display: none;
  }

  body.tw-page-profile .tw-prof-panel-tabs {
    position: sticky;
    top: calc(44px + env(safe-area-inset-top));
    z-index: 2;
    overflow-x: auto;
    scrollbar-width: none;
    justify-content: flex-start;
  }

  body.tw-page-profile .tw-prof-panel-tabs::-webkit-scrollbar {
    display: none;
  }

  body.tw-page-profile .tw-prof-tab {
    flex: 0 0 auto;
    min-width: 90px;
    min-height: 44px;
    padding: 0 12px;
  }

  body.tw-page-profile .tw-prof-panel-body {
    padding: 12px;
    padding-bottom: calc(74px + env(safe-area-inset-bottom));
  }

  body.tw-page-profile .tw-prof-savebar {
    position: sticky;
    bottom: 0;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    z-index: 4;
  }

  body.tw-page-profile .tw-prof-input,


  /* =====================================================
     MESSENGER MOBILE - REACTIONS & QUOTES
     ===================================================== */

  .tw-mob-chat-reactions-menu {
    position: fixed;
    display: flex;
    gap: 8px;
    z-index: 999;
    padding: 12px;
    border-radius: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.2s ease-out;
  }

  @keyframes slideUp {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .tw-mob-reaction-btn {
    min-width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 1px solid var(--border);
    background: var(--surface-3);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .tw-mob-reaction-btn:active,
  .tw-mob-reaction-btn:focus {
    background: var(--primary);
    border-color: var(--primary);
  }

  /* Quote bar above compose - REMOVED, now inline chip */

  /* Quote chip inline in compose */
  .tw-mob-chat-quote-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 160px;
    padding: 4px 8px;
    border-left: 2px solid var(--primary);
    background: rgba(39, 150, 242, 0.08);
    border-radius: 0;
  }

  .tw-mob-chat-quote-chip-text {
    font-size: 11px;
    font-style: italic;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .tw-mob-chat-quote-chip-close {
    flex: 0 0 auto;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    border-radius: 0;
    transition: color 0.15s ease;
    font-size: 10px;
  }

  .tw-mob-chat-quote-chip-close:active {
    color: var(--primary);
  }

  /* Quote bar above compose - REMOVED, now inline chip */

  /* Media buttons in compose */
  .tw-mob-chat-media-btn {
    flex: 0 0 auto;
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: var(--surface-3);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 0;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .tw-mob-chat-media-btn:active,
  .tw-mob-chat-media-btn:focus {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(39, 150, 242, 0.1);
  }

  .tw-mob-chat-media-btn svg {
    width: 16px;
    height: 16px;
  }

  /* Reaction badge on message */
  .tw-mob-chat-reaction-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: auto;
    height: auto;
    padding: 0;
    margin-left: 4px;
    font-size: 10px;
    border: 0;
    background: transparent;
    border-radius: 0;
    line-height: 1;
  }

  body.tw-page-profile .tw-prof-textarea,
  body.tw-page-profile .tw-prof-btn,
  body.tw-page-profile .tw-prof-chip {
    min-height: 44px;
    font-size: 16px;
  }

  body.tw-page-profile .tw-prof-switch {
    min-width: 44px;
    min-height: 24px;
    padding: 4px;
  }

  body.tw-page-profile .tw-prof-drawer-backdrop {
    z-index: 2099;
    background: rgba(0, 0, 0, 0.40);
  }

  body.tw-page-profile .tw-prof-drawer {
    position: fixed;
    inset: 0;
    z-index: 2100;
    width: 100vw;
    height: 100vh;
    transform: translateY(100%);
    transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
    border: 0;
  }

  body.tw-page-profile .tw-prof-drawer.is-open {
    transform: translateY(0);
  }

  body.tw-page-profile .tw-prof-drawer-header {
    position: sticky;
    top: 0;
    z-index: 2;
    padding-top: calc(10px + env(safe-area-inset-top));
  }

  body.tw-page-profile .tw-prof-drawer-header .tw-prof-panel-close {
    width: auto;
    min-width: 44px;
    height: 44px;
    font-size: 0;
  }

  body.tw-page-profile .tw-prof-drawer-header .tw-prof-panel-close::before {
    content: '<- Tillbaka till socials';
    font-size: 10px;
    font-weight: 600;
    color: var(--text-tertiary);
  }

  body.tw-page-profile .tw-prof-drawer-body {
    padding: 12px;
    overflow-y: auto;
  }

  body.tw-page-profile .tw-prof-social-icon {
    width: 36px;
    height: 36px;
  }

  body.tw-page-profile .tw-prof-drawer-footer {
    position: sticky;
    bottom: 0;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  }

  body.tw-page-profile .tw-prof-drawer-footer .tw-prof-btn-primary {
    width: 100%;
    min-height: 48px;
    font-weight: 700;
  }

  /* ── MOBILE VIEW SWITCHING ── */
  .tw-mob-view {
    display: block;
    width: 100%;
  }

  .tw-mob-desktop-only {
    display: none !important;
  }

  .tw-mob-page-block {
    margin: 12px 0;
  }

  .tw-mob-tab-panels {
    display: block;
  }

  .tw-mob-tab-panel {
    display: block;
  }

  .tw-mob-tab-panel[hidden] {
    display: none !important;
  }

  .tw-mob-row-actions {
    gap: 6px;
  }

  .tw-mob-empty-state {
    margin: 10px 14px;
    padding: 14px;
    border: 1px solid var(--border);
    background: var(--surface-2);
  }

  .tw-mob-empty-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-empty-sub {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-week-summary {
    padding: 0 14px 10px;
    font-size: 12px;
    color: var(--text-secondary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  .tw-mob-lb-my-row {
    position: sticky;
    bottom: calc(56px + env(safe-area-inset-bottom));
    background: var(--surface-1);
    border-top: 1px solid var(--border);
    z-index: 5;
  }

  /* Chat page strict mobile prompt overrides */
  body.tw-page-messenger .mc-msg-bubble,
  body.tw-page-messenger .mc-message-row.incoming .mc-msg-bubble,
  body.tw-page-messenger .mc-message-row.outgoing .mc-msg-bubble {
    border-radius: 0 !important;
    max-width: 75% !important;
  }

  body.tw-page-messenger .ms-row,
  body.tw-page-messenger .ms-search-input,
  body.tw-page-messenger .mc-input,
  body.tw-page-messenger .mc-input-wrap {
    border-radius: 0 !important;
  }

  body.tw-page-messenger .mc-input-wrap {
    position: sticky;
    bottom: calc(56px + env(safe-area-inset-bottom));
    background: var(--surface-2);
    z-index: 6;
  }

  body.tw-mobile-overlay-open .tw-mobile-bottom-nav,
  body.tw-mobile-drawer-open .tw-mobile-bottom-nav,
  body.messenger-full-open .tw-mobile-bottom-nav {
    display: none;
  }

  body.tw-page-profile.messenger-v2-active .messenger-full-overlay {
    z-index: 2000;
    backdrop-filter: none;
    background: rgba(0, 0, 0, 0.40);
  }

  body.tw-page-profile.messenger-v2-active .messenger-full-panel {
    z-index: 2001;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    border-left: 0;
    border-radius: 0;
    transform: translateY(100%);
  }

  body.tw-page-profile.messenger-v2-active .messenger-full-panel.open {
    transform: translateY(0);
  }

  body.tw-page-profile.messenger-v2-active .messenger-full-toolbar {
    min-height: 52px;
    padding-top: env(safe-area-inset-top);
  }

  body.tw-page-profile .messenger-fab-btn {
    display: none !important;
  }

  body.tw-page-profile .chat-window,
  body.tw-page-profile .chat-window.minimized {
    width: 100vw !important;
    max-width: 100vw !important;
    border-radius: 0 !important;
    right: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
  }

  body.tw-page-profile .chat-window-header,
  body.tw-page-profile .chat-window-input {
    min-height: 44px;
  }

  body.tw-page-profile .chat-window-input textarea,
  body.tw-page-profile .chat-window-input input {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  body.tw-page-profile .pb-page-background {
    padding: 8px;
  }

  body.tw-page-profile .tw-widget .tw-widget-title {
    font-size: 10px;
  }

  body.tw-page-profile .tw-profile-playstyle-dna text,
  body.tw-page-profile .tw-profile-playstyle-dna .tw-radar-label {
    font-size: 8px;
  }

  body.tw-page-profile .tw-ministats-grid,
  body.tw-page-profile .tw-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.tw-page-profile .tw-prof-section {
    padding: 10px 8px;
  }
}

@media (max-width: 360px) {
  body.tw-page-profile .pb-page-background,
  body.tw-page-profile .tw-prof-panel-body,
  body.tw-page-profile .tw-prof-drawer-body {
    padding-left: 8px;
    padding-right: 8px;
  }

  body.tw-page-profile .tw-prof-chip,
  body.tw-page-profile .tw-prof-btn,
  .tw-mobile-bottom-item {
    font-size: 8px;
  }

  body.tw-page-profile .tw-prof-inline-grid,
  body.tw-page-profile .tw-prof-inline-grid-grow {
    grid-template-columns: 1fr;
  }
}

/* Leaderboard fallback: force mobile view on touch devices even if viewport reports desktop width */
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  body.tw-page-hub .tw-news-widget-list .tw-news-card:nth-child(n + 2) {
    display: none;
  }

  body.tw-page-messenger {
    --tw-mobile-header-offset: calc(44px + env(safe-area-inset-top));
    --tw-messenger-top-height: 58px;
    --tw-messenger-tabs-height: 41px;
    --tw-messenger-request-strip-height: 0px;
  }

  body.tw-page-messenger .season-countdown-widget,
  body.tw-page-messenger .widget-season-countdown {
    display: none !important;
  }

  body.tw-page-messenger .tw-mob-chat-top {
    position: fixed !important;
    top: var(--tw-mobile-header-offset);
    left: 0;
    right: 0;
    width: 100%;
    z-index: 92;
    background: var(--surface-3);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }

  body.tw-page-messenger .tw-mob-chat-tabs {
    position: fixed !important;
    top: calc(var(--tw-mobile-header-offset) + var(--tw-messenger-top-height));
    left: 0;
    right: 0;
    width: 100%;
    z-index: 91;
    margin: 0;
    background: var(--surface-2);
  }

  body.tw-page-messenger .tw-mob-chat-request-strip {
    display: none !important;
  }

  body.tw-page-messenger .tw-mob-chat-list-panel {
    padding-top: calc(var(--tw-messenger-top-height) + var(--tw-messenger-tabs-height) + 2px) !important;
  }

  body.tw-page-leaderboard .tw-mob-view--leaderboard {
    display: block;
    width: 100%;
  }

  body.tw-page-leaderboard .tw-lb-page-wrap.tw-mob-desktop-only {
    display: none !important;
  }

  /* Legacy leaderboard widget fallback (runtime tw-lb* markup) */
  body.tw-page-leaderboard .tw-lb-colh {
    display: none !important;
  }

  body.tw-page-leaderboard .tw-lb-toolbar {
    position: fixed !important;
    top: calc(44px + env(safe-area-inset-top));
    left: 0;
    right: 0;
    width: 100%;
    z-index: 92;
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 0;
    padding: 8px 10px;
  }

  body.tw-page-leaderboard .tw-lb-body {
    padding-top: 56px;
  }

  body.tw-page-leaderboard .tw-lb-toolbar .tw-lb-chip[href*='sort=wins'],
  body.tw-page-leaderboard .tw-lb-toolbar .tw-lb-chip[href*='sort=form'],
  body.tw-page-leaderboard .tw-lb-toolbar .tw-lb-chip[href*='sort=mvp'],
  body.tw-page-leaderboard .tw-lb-toolbar .tw-lb-player-count {
    display: none !important;
  }

  body.tw-page-leaderboard .tw-lb-row {
    display: block !important;
    border: 1px solid var(--border);
    background: var(--surface-2);
    padding: 10px;
    margin-bottom: 8px;
  }

  body.tw-page-leaderboard .tw-lb-pos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 22px;
    margin-right: 8px;
    font-size: 12px;
    font-weight: 800;
    color: var(--primary);
    border: 1px solid rgba(39,150,242,0.35);
  }

  body.tw-page-leaderboard .tw-lb-row.tw-lb-top1 .tw-lb-pos {
    color: #FFD700;
    border-color: rgba(255,215,0,0.45);
  }

  body.tw-page-leaderboard .tw-lb-row.tw-lb-top2 .tw-lb-pos {
    color: #C0C0C0;
    border-color: rgba(192,192,192,0.45);
  }

  body.tw-page-leaderboard .tw-lb-row.tw-lb-top3 .tw-lb-pos {
    color: #CD7F32;
    border-color: rgba(205,127,50,0.45);
  }

  body.tw-page-leaderboard .tw-lb-player {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
  }

  body.tw-page-leaderboard .tw-lb-rank-cell,
  body.tw-page-leaderboard .tw-lb-stat,
  body.tw-page-leaderboard .tw-lb-delta,
  body.tw-page-leaderboard .tw-lb-exp {
    display: inline-block;
    margin-right: 8px;
    margin-top: 4px;
    font-size: 11px;
  }

  body.tw-page-leaderboard .tw-lb-pagination {
    padding-bottom: calc(56px + env(safe-area-inset-bottom));
  }

  body.tw-page-leaderboard .tw-lb-mobile-hero {
    margin: 0 0 8px;
    padding: 12px 12px 10px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    background: var(--surface-2);
  }

  body.tw-page-leaderboard .tw-lb-mobile-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  body.tw-page-leaderboard .tw-lb-mobile-hero-kicker {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  body.tw-page-leaderboard .tw-lb-mobile-hero-live {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 20px;
    padding: 0 7px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: var(--font-family), Roboto, sans-serif;
  }

  body.tw-page-leaderboard .tw-lb-mobile-hero-live.is-live {
    border-color: rgba(34,197,94,0.35);
    color: var(--success);
    background: rgba(34,197,94,0.08);
  }

  body.tw-page-leaderboard .tw-lb-mobile-hero-dot {
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    display: inline-block;
  }

  body.tw-page-leaderboard .tw-lb-mobile-hero-main {
    margin-top: 8px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
  }

  body.tw-page-leaderboard .tw-lb-mobile-hero-title {
    margin: 0;
    font-size: 20px;
    line-height: 1;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  body.tw-page-leaderboard .tw-lb-mobile-hero-sort {
    font-size: 10px;
    color: var(--text-tertiary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  body.tw-page-leaderboard .tw-lb-mobile-hero-meta {
    margin-top: 7px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 10px;
    color: var(--text-secondary);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  body.tw-page-leaderboard .tw-lb-toolbar {
    top: calc(44px + env(safe-area-inset-top));
    padding: 8px 10px;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  body.tw-page-leaderboard .tw-lb-toolbar::-webkit-scrollbar {
    display: none;
  }

  body.tw-page-leaderboard .tw-lb-toolbar .tw-lb-chip {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }

  body.tw-page-leaderboard .tw-lb-body {
    padding-top: 98px;
  }

  body.tw-page-leaderboard .tw-lb-row {
    padding: 10px;
    margin-bottom: 6px;
  }

  body.tw-page-leaderboard .tw-lb-row .tw-lb-player {
    margin: 6px 0 4px;
  }

  body.tw-page-leaderboard .tw-lb-row .tw-lb-pname {
    font-size: 13px;
    line-height: 1.2;
  }

  body.tw-page-leaderboard .tw-lb-row .tw-lb-rank-cell,
  body.tw-page-leaderboard .tw-lb-row .tw-lb-stat,
  body.tw-page-leaderboard .tw-lb-row .tw-lb-delta,
  body.tw-page-leaderboard .tw-lb-row .tw-lb-exp {
    font-size: 10px;
    margin-top: 5px;
  }

  body.tw-page-leaderboard .tw-lb-row.tw-lb-top1,
  body.tw-page-leaderboard .tw-lb-row.tw-lb-top2,
  body.tw-page-leaderboard .tw-lb-row.tw-lb-top3 {
    border-left-width: 3px;
    border-left-style: solid;
  }

  body.tw-page-leaderboard .tw-lb-row.tw-lb-top1 { border-left-color: rgba(255,215,0,0.55); }
  body.tw-page-leaderboard .tw-lb-row.tw-lb-top2 { border-left-color: rgba(192,192,192,0.55); }
  body.tw-page-leaderboard .tw-lb-row.tw-lb-top3 { border-left-color: rgba(205,127,50,0.55); }

  body.tw-page-leaderboard .tw-lb-row.is-me {
    border-left-width: 3px;
  }

  /* HUB mobile runtime layout (PageBuilder widgets) */
  body.tw-page-hub.has-mobile-nav .pb-content-area {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding: 0 10px 10px !important;
  }

  body.tw-page-hub.has-mobile-nav .pb-content-area > .pb-row,
  body.tw-page-hub.has-mobile-nav .pb-content-area > .pb-row > .pb-col,
  body.tw-page-hub.has-mobile-nav .pb-content-area > .pb-row > .pb-col > .builder-drop-zone {
    display: contents !important;
  }

  body.tw-page-hub.has-mobile-nav .pb-widget {
    border: 1px solid var(--border);
    background: var(--surface-2);
    margin: 0 !important;
    position: relative;
  }

  body.tw-page-hub.has-mobile-nav .pb-widget[data-widget='daily-reward'] {
    order: 10;
    border-left: 3px solid var(--primary);
  }

  body.tw-page-hub.has-mobile-nav .pb-widget[data-widget='victory-vibes'] {
    order: 20;
    border-left: 3px solid rgba(245,158,11,0.7);
  }

  body.tw-page-hub.has-mobile-nav .pb-widget[data-widget='LFG:quick-dock'] {
    order: 30;
  }

  body.tw-page-hub.has-mobile-nav .pb-widget[data-widget='hub-tracker-activity'] {
    order: 40;
  }

  body.tw-page-hub.has-mobile-nav .pb-widget[data-widget='LFG:feed-panel'] {
    order: 50;
  }

  body.tw-page-hub.has-mobile-nav .pb-widget[data-widget='hub-creators-live'] {
    order: 60;
  }

  body.tw-page-hub.has-mobile-nav .pb-widget[data-widget='events:competitive-calendar'] {
    order: 70;
  }

  body.tw-page-hub.has-mobile-nav .pb-widget[data-widget='news-feed'] {
    order: 80;
  }

  body.tw-page-hub.has-mobile-nav .pb-widget[data-widget='wall-post'] {
    order: 90;
    max-height: 56vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.tw-page-hub.has-mobile-nav .pb-widget[data-widget='daily-reward']::before,
  body.tw-page-hub.has-mobile-nav .pb-widget[data-widget='LFG:quick-dock']::before,
  body.tw-page-hub.has-mobile-nav .pb-widget[data-widget='LFG:feed-panel']::before,
  body.tw-page-hub.has-mobile-nav .pb-widget[data-widget='hub-tracker-activity']::before,
  body.tw-page-hub.has-mobile-nav .pb-widget[data-widget='news-feed']::before {
    display: block;
    padding: 8px 10px 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-family: var(--font-family), Roboto, sans-serif;
  }

  body.tw-page-hub.has-mobile-nav .pb-widget[data-widget='daily-reward']::before {
    content: 'Progression';
  }

  body.tw-page-hub.has-mobile-nav .pb-widget[data-widget='LFG:quick-dock']::before {
    content: 'Dagens fokus';
  }

  body.tw-page-hub.has-mobile-nav .pb-widget[data-widget='LFG:feed-panel']::before {
    content: 'Live pulse';
  }

  body.tw-page-hub.has-mobile-nav .pb-widget[data-widget='hub-tracker-activity']::before {
    content: 'Snabba vagar';
  }

  body.tw-page-hub.has-mobile-nav .pb-widget[data-widget='news-feed']::before {
    content: 'Community / senaste';
  }
}

/* Desktop guard: bottom-sheet is mobile-only and must never render on desktop. */
@media (min-width: 769px) {
  .tw-mob-sheet-backdrop,
  .tw-mob-sheet,
  .tw-mob-sheet * {
    display: none !important;
    pointer-events: none !important;
    opacity: 0 !important;
    transform: translateY(100%) !important;
  }
}
