/* App-level glue (template-agnostic). The design CSS was authored for a device
   frame inside the prototype; in a real full-page app, overlays/toasts/nav must
   anchor to the viewport, so we promote them to fixed positioning. */
html, body { min-height: 100%; background: var(--bg-base); }
#root { min-height: 100vh; }

/* !important because the template's components.css loads AFTER app.css and
   would otherwise restore the prototype's `position:absolute` (which anchors to
   the tall .nh-app instead of the viewport, pushing modals off-screen). */
.overlay-bg { position: fixed !important; inset: 0 !important; }
.toast-stack { position: fixed !important; }
.drawer-bg, .drawer { position: fixed !important; }
[data-bp="mobile"] .bottom-nav { position: fixed !important; }

/* --- Mobile header (prevent overflow; design: compact logo + search toggle) --- */
.hdr-search-toggle { display: none; }
[data-bp="mobile"] .logo-word { display: none; }            /* keep only the mark */
[data-bp="mobile"] .hdr-search-toggle { display: grid; margin-left: auto; } /* push all icons right, keep logo left */
[data-bp="mobile"] .hdr-search { display: none; }           /* collapse inline search */
[data-bp="mobile"] .hdr-search.open {                       /* expand as a full-width row */
  display: block; position: absolute; left: 0; right: 0; top: 56px;
  padding: 8px 12px; background: var(--bg-base);
  border-bottom: 1px solid var(--border); z-index: 45;
}
[data-bp="mobile"] .acct .who { display: none; }            /* hide email text, keep avatar */
[data-bp="mobile"] .acct { padding: 0; }

/* --- Card meta: long publisher domains must never push "read" out --- */
.card-meta .src { min-width: 0; flex: 0 1 auto; }
.card-meta .src .src-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta .read { flex-shrink: 0; }
.card-media .photo-label { max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-glyph .ph-src { max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Topics page: Trending + Categories blocks --- */
.topic-block { margin-bottom: 28px; }
.topic-block-h { display: flex; align-items: center; gap: 8px; font-weight: 700;
  font-size: 15px; margin-bottom: 14px; color: var(--text-primary, #1a1a1a); }
.topic-block-h svg { color: var(--accent, #E62B1E); }
.topics-grid-inner { display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.hot-row { display: flex; flex-wrap: wrap; gap: 10px; }
.hot-chip { display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 10px 8px 14px; border-radius: 999px;
  background: var(--bg-elevated, #fff); border: 1px solid var(--border, #e5e5e5);
  font-weight: 600; font-size: 14px; }
.hot-chip.sub { border-color: var(--accent, #E62B1E);
  box-shadow: inset 0 0 0 1px var(--accent, #E62B1E); }
.hot-chip .h-read { cursor: pointer; }
.hot-chip .h-sub { display: grid; place-items: center; width: 24px; height: 24px;
  border-radius: 50%; border: none; cursor: pointer; color: #fff;
  background: var(--accent, #E62B1E); }
.hot-chip.sub .h-sub { background: var(--text-secondary, #16a34a); }

/* Boot splash */
#boot { position: fixed; inset: 0; display: grid; place-items: center; background: #0e0e10; z-index: 999; transition: opacity .3s; }
#boot .m { width: 54px; height: 54px; border-radius: 14px; background: #E62B1E; display: grid; place-items: center; box-shadow: 0 0 40px rgba(230,43,30,.5); animation: bootpulse 1.1s ease-in-out infinite; }
@keyframes bootpulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
