/* ForumX R68 — responsive ownership layer.
 * Loaded last on public pages to resolve legacy breakpoint conflicts without deleting rollback assets.
 */
:root { --fx-header-bottom: 76px; }

.fx-ui-build-r68 {
  display:inline-flex; align-items:center; min-height:20px; padding:0 7px;
  border:1px solid color-mix(in srgb,var(--accent) 25%,transparent); border-radius:999px;
  color:var(--muted); background:color-mix(in srgb,var(--accent) 6%,transparent);
  font-size:11px; line-height:1; font-weight:750; letter-spacing:.02em;
}

/* Tablet is not a phone: hamburger remains, bottom dock does not. */
@media (min-width: 761px) and (max-width: 980px) {
  :root { --fx-header-bottom: 76px !important; }
  body.fx-forumx { padding-bottom:0 !important; }
  body.fx-forumx .page-shell { padding-bottom:28px !important; }
  body.fx-forumx .mobile-bottom-nav,
  body.fx-unified-v31.fx-forumx .mobile-bottom-nav { display:none !important; }
  .site-header .header-inner {
    min-height:70px !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    grid-template-areas:"brand actions" !important;
    grid-template-rows:auto !important;
    row-gap:0 !important;
  }
  .site-header .header-search { display:none !important; }
  .site-header .main-nav {
    top:calc(var(--fx-header-bottom) + 8px) !important;
    max-height:calc(100dvh - var(--fx-header-bottom) - 20px) !important;
  }
}

/* Real phone layout: single-row header + bottom dock. */
@media (max-width: 760px) {
  :root { --fx-header-bottom: 72px !important; }
  body.fx-forumx { padding-bottom:82px !important; }
  body.fx-forumx .page-shell { padding-bottom:94px !important; }
  .site-header .header-inner {
    min-height:64px !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    grid-template-areas:"brand actions" !important;
    grid-template-rows:auto !important;
    row-gap:0 !important;
    padding-block:10px !important;
  }
  .site-header .header-search { display:none !important; }
  .site-header .main-nav {
    top:calc(var(--fx-header-bottom) + 6px) !important;
    max-height:calc(100dvh - var(--fx-header-bottom) - 16px) !important;
  }
  .site-header .main-nav::before { top:calc(var(--fx-header-bottom) - 1px) !important; }
  body.fx-forumx .mobile-bottom-nav,
  body.fx-unified-v31.fx-forumx .mobile-bottom-nav { display:grid !important; }
  body.fx-forumx .mobile-bottom-nav > a small { font-size:max(11px,.69rem) !important; }

  /* Ban the old 8–10px public UI typography on phone-sized screens. */
  body.fx-forumx :where(
    .thread-meta,.topic-meta,.home-topic-meta,.fx-home-topic-meta,
    .fx-r35-meta,.fx-home-forum-copy small,.fx-home-side-empty,
    .fx-home-side-link,.fx-home-side-link-pill,.fx-home-side-button,
    .fx-footer-r66,.fx-footer-r66 small
  ) { font-size:max(11px,.69rem) !important; }
}

@media (max-width: 420px) {
  .site-header .brand-copy strong { max-width:110px !important; }
  .site-header .header-actions { gap:5px !important; }
  .site-header .action-icon,
  .site-header .profile-chip,
  .site-header .mobile-menu-button,
  .site-header .header-login-button,
  .site-header .header-search-toggle {
    width:40px !important; min-width:40px !important; height:40px !important; min-height:40px !important;
  }
}
