/* ==========================================================================
   BeeHiwe Loops (Shorts) discovery - page body only.

   Loaded by layout/shorts/beehiwe/shell.html and by nothing else. The header,
   sidebar and footer belong to the parent theme and are untouched: every rule
   is namespaced under .bh-app / .bh-loops-app, and the one rule that reaches
   outside (#main-container, below) is safe because the theme's page swap
   replaces #container_content wholesale and takes this <link> with it.

   The full-screen Loop player at /shorts/<id> is a different template with its
   own stylesheet and is not affected by anything here.

   PARENT THEME LEAKS
   ------------------
   youplay's stylesheets style bare elements, and night-mode.css does it with
   !important, so a plain class rule here loses:

     night-mode.css:84  p, span, h1..h6, button, input, li { color: #eee !important }
     night-mode.css:83  a { color: #eee !important }
     night-mode.css:85  li { background: #212121 !important; border-color: #444 !important }
     night-mode.css:89  ul { background: #212121 !important; border-color: #444 !important }

   The reset block below neutralises them, which is why colour and background
   declarations on p / span / h1-h3 / a / button / ul / li carry !important
   throughout this file. They are ordered after the reset, so equal-specificity
   component rules win on source order.
   ========================================================================== */

/* --- page canvas -------------------------------------------------------- */

/* The shorts route is not in container.html's `container-full` list, so the
   parent pins it to a 1056px column - too narrow for a five-card Loop row
   beside a discovery rail. Widened to the same cap the other BeeHiwe body
   redesigns use, here rather than in the shared template so no other page's
   offset can change. */
#main-container.container {
   box-sizing: border-box;
   width: 100%;
   max-width: 1750px;
   /* centred in the space left of the nav, so the only display wide enough to
      hit the cap splits the remainder evenly instead of stranding it all on
      the right */
   margin-left: auto;
   margin-right: auto;
   padding-left: 20px;
   padding-right: 20px;
}

.bh-app {
   --bh-card:        #202325;
   --bh-raise:       #2b2e31;
   --bh-line:        rgba(255, 255, 255, .09);
   --bh-line-soft:   rgba(255, 255, 255, .07);
   --bh-text:        #e8eaed;
   --bh-text-dim:    #aab0b6;
   --bh-text-mute:   #8f969d;
   --bh-accent:      #ffb800;
   --bh-accent-wash: rgba(255, 184, 0, .10);
   --bh-accent-line: rgba(255, 184, 0, .24);

   --bh-rail:   clamp(272px, 21%, 330px);
   --bh-gap:    18px;
   --bh-r-card: 12px;
   --bh-r-btn:  9px;

   /* Loop row: how many cards are visible, and the gap between them. Both are
      re-declared per breakpoint; the card width is derived from them so the
      row is always exactly full with no trailing sliver. */
   --bh-cols:  5;
   --bh-lgap:  13px;

   color: var(--bh-text);
   font-size: 15px;
}

.bh-app *,
.bh-app *::before,
.bh-app *::after { box-sizing: border-box; }

/* --- parent theme reset (see header note) ------------------------------- */

.bh-app :where(p, span, h1, h2, h3, h4, a, button, input, li, small, b, strong) {
   color: inherit !important;
}
.bh-app :where(ul, ol, li) {
   background: transparent !important;
   border-color: var(--bh-line-soft) !important;
}

.bh-app :where(a) { text-decoration: none; }
.bh-app :where(a:hover) { text-decoration: none; }
.bh-app :where(img) { max-width: 100%; display: block; }
.bh-app :where(h1, h2, h3, p, ul, ol) { margin: 0; padding: 0; font-weight: inherit; }
.bh-app :where(ul, ol) { list-style: none; }
.bh-app :where(button) { font: inherit; background: none; border: 0; cursor: pointer; }

.bh-app :focus-visible {
   outline: 2px solid var(--bh-accent);
   outline-offset: 2px;
   border-radius: 4px;
}

.bh-dot { color: var(--bh-text-mute) !important; margin: 0 4px; }
.bh-verified { flex: none; vertical-align: -2px; }

.bh-mini-avatar {
   width: 24px; height: 24px; border-radius: 50%;
   overflow: hidden; flex: none; display: block;
}
.bh-mini-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Announcements for copy-link and other non-visual outcomes. */
.bh-sr-live {
   position: absolute; width: 1px; height: 1px;
   margin: -1px; padding: 0; border: 0;
   clip: rect(0 0 0 0); clip-path: inset(50%);
   overflow: hidden; white-space: nowrap;
}

/* --- page heading ------------------------------------------------------- */

.bh-page-head {
   display: flex; align-items: flex-end; justify-content: space-between;
   gap: 18px; flex-wrap: wrap;
   padding-top: 16px;
}
.bh-page-head-text { min-width: 0; }

.bh-page-title {
   display: flex; align-items: center; gap: 10px;
   font-size: clamp(28px, 2vw, 32px);
   font-weight: 700; letter-spacing: -.022em;
   line-height: 1.18;
   color: var(--bh-text) !important;
}
.bh-page-icon { display: inline-flex; }
.bh-page-icon svg { width: 26px; height: 26px; }
.bh-ico-loops { color: #ffb800 !important; }

.bh-page-sub {
   margin-top: 7px;
   font-size: 14.5px; line-height: 1.5;
   color: var(--bh-text-dim) !important;
}

/* Outlined so it reads as the page's own action and cannot be mistaken for
   the global Create button in the header. */
.bh-upload-loop { flex: none; }

/* --- filter bar --------------------------------------------------------- */

.bh-filters {
   display: flex; align-items: center; gap: 14px;
   margin: 18px 0;
}

.bh-filter-scroll {
   display: flex; align-items: center; gap: 9px;
   flex: 1 1 auto; min-width: 0;
   overflow-x: auto; overflow-y: visible;
   scrollbar-width: none; -ms-overflow-style: none;
}
.bh-filter-scroll::-webkit-scrollbar { display: none; }

.bh-pill {
   display: inline-flex; align-items: center; gap: 7px;
   height: 36px; padding: 0 14px; flex: none;
   border-radius: var(--bh-r-btn);
   background: var(--bh-raise);
   border: 1px solid var(--bh-line);
   font-size: 13.5px; font-weight: 500;
   color: var(--bh-text) !important;
   white-space: nowrap;
   transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.bh-pill:hover { background: #3a3e42; border-color: rgba(255, 255, 255, .18); }

/* Selected filter carries the BeeHiwe gold. */
.bh-pill.is-active {
   background: var(--bh-accent-wash);
   border-color: var(--bh-accent-line);
   color: #ffd97a !important;
}
.bh-pill.is-active:hover { background: rgba(255, 184, 0, .17); }
.bh-pill.is-active .bh-pill-icon { color: var(--bh-accent) !important; }

.bh-pill-icon { display: inline-flex; color: var(--bh-text-mute) !important; }
.bh-pill-icon svg { width: 15px; height: 15px; }
.bh-pill-caret { display: inline-flex; margin-left: 1px; color: var(--bh-text-mute) !important; }
.bh-ico-fire  { color: #f97316 !important; }
.bh-ico-clock { color: #60a5fa !important; }

.bh-hue-0 { color: #a78bfa !important; }
.bh-hue-1 { color: #60a5fa !important; }
.bh-hue-2 { color: #4ade80 !important; }
.bh-hue-3 { color: #f472b6 !important; }
.bh-hue-4 { color: #22d3ee !important; }

.bh-pill-sep {
   flex: none; width: 1px; height: 22px;
   background: var(--bh-line); margin: 0 3px;
}

/* --- "More" dropdown ---------------------------------------------------- */

.bh-more { position: relative; flex: none; }

.bh-more-menu {
   position: absolute; top: calc(100% + 7px); right: 0; z-index: 30;
   min-width: 210px; max-height: 320px; overflow-y: auto;
   padding: 6px;
   background: var(--bh-raise) !important;
   border: 1px solid var(--bh-line) !important;
   border-radius: var(--bh-r-btn);
   box-shadow: 0 10px 26px rgba(0, 0, 0, .40);
}
.bh-more-menu[hidden] { display: none; }
.bh-more-menu li { background: transparent !important; }
.bh-more-menu a {
   display: flex; align-items: center; justify-content: space-between; gap: 10px;
   padding: 8px 10px; border-radius: 6px;
   font-size: 13.5px; color: var(--bh-text) !important;
}
.bh-more-menu a:hover { background: rgba(255, 255, 255, .08); }
.bh-more-menu a.is-active { color: #ffd97a !important; background: var(--bh-accent-wash); }
.bh-more-count { font-size: 12px; color: var(--bh-text-mute) !important; }

/* --- shared controls ---------------------------------------------------- */

.bh-btn-primary {
   display: inline-flex; align-items: center; justify-content: center; gap: 7px;
   height: 38px; padding: 0 18px;
   border-radius: var(--bh-r-btn);
   background: linear-gradient(135deg, #ffc62b 0%, #ff9d00 100%);
   color: #17120a !important;
   font-size: 14px; font-weight: 600; white-space: nowrap;
   transition: filter .15s ease;
}
.bh-btn-primary:hover { filter: brightness(1.07); }

.bh-btn-ghost {
   display: inline-flex; align-items: center; justify-content: center; gap: 7px;
   height: 38px; padding: 0 18px;
   border-radius: var(--bh-r-btn);
   background: rgba(255, 255, 255, .09);
   border: 1px solid var(--bh-line);
   color: var(--bh-text) !important;
   font-size: 14px; font-weight: 500; white-space: nowrap;
   transition: background .15s ease;
}
.bh-btn-ghost:hover { background: rgba(255, 255, 255, .15); }

.bh-btn-outline {
   display: inline-flex; align-items: center; justify-content: center; gap: 7px;
   height: 38px; padding: 0 16px;
   border-radius: var(--bh-r-btn);
   background: var(--bh-accent-wash);
   border: 1px solid var(--bh-accent-line);
   color: var(--bh-accent) !important;
   font-size: 13.5px; font-weight: 600; white-space: nowrap;
   transition: background .15s ease, border-color .15s ease;
}
.bh-btn-outline:hover {
   background: rgba(255, 184, 0, .17);
   border-color: rgba(255, 184, 0, .42);
}

.bh-btn-lg { height: 40px; padding: 0 20px; font-size: 14.5px; }

.bh-card {
   background: var(--bh-card);
   border: 1px solid var(--bh-line);
   border-radius: var(--bh-r-card);
   padding: 16px;
}

.bh-sec-head {
   display: flex; align-items: center; justify-content: space-between;
   gap: 14px; margin-bottom: 13px;
}
.bh-sec-title {
   display: flex; align-items: center; gap: 9px;
   font-size: 17px; font-weight: 600; letter-spacing: -.015em;
   color: var(--bh-text) !important;
}
.bh-sec-icon { display: inline-flex; }
.bh-sec-icon svg { width: 17px; height: 17px; }
.bh-sec-count { font-size: 12.5px; color: var(--bh-text-mute) !important; white-space: nowrap; }

.bh-view-all {
   display: inline-flex; align-items: center; gap: 5px;
   font-size: 12.5px; font-weight: 500;
   color: var(--bh-text-dim) !important;
   white-space: nowrap;
   transition: color .15s ease;
}
.bh-view-all:hover { color: var(--bh-accent) !important; }

/* One failing panel says so where the panel is, instead of blanking the page. */
.bh-sec-error {
   display: flex; align-items: center; gap: 9px;
   padding: 14px 15px;
   border-radius: 10px;
   background: rgba(239, 68, 68, .09) !important;
   border: 1px solid rgba(239, 68, 68, .26);
   font-size: 13px; line-height: 1.45;
   color: #f7b4b4 !important;
}
.bh-sec-error-icon { display: inline-flex; flex: none; color: #ef7676 !important; }

/* --- layout ------------------------------------------------------------- */

.bh-body {
   display: grid;
   grid-template-columns: minmax(0, 1fr) var(--bh-rail);
   gap: var(--bh-gap);
   align-items: start;
   padding-bottom: 28px;
}
.bh-col-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.bh-col-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* --- Loop feed rail ----------------------------------------------------- */

.bh-rail-wrap { position: relative; }

.bh-rail {
   display: flex; gap: var(--bh-lgap);
   overflow-x: auto; scroll-behavior: smooth;
   scrollbar-width: none; -ms-overflow-style: none;
   scroll-snap-type: x proximity;
   /* room for the focus ring on the cards' own controls */
   padding: 2px;
   margin: -2px;
}
.bh-rail::-webkit-scrollbar { display: none; }

.bh-rail-next,
.bh-rail-prev {
   position: absolute; top: 34%; transform: translateY(-50%);
   width: 34px; height: 34px; border-radius: 50%;
   display: flex; align-items: center; justify-content: center;
   background: var(--bh-raise) !important;
   border: 1px solid var(--bh-line);
   color: var(--bh-text) !important; z-index: 4;
   box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
   transition: background .15s ease;
}
.bh-rail-next { right: -6px; }
.bh-rail-prev { left: -6px; }
.bh-rail-next:hover,
.bh-rail-prev:hover { background: #363a3e !important; }
.bh-rail-next[hidden],
.bh-rail-prev[hidden] { display: none; }

/* --- Loop card ---------------------------------------------------------- */

.bh-lcard {
   flex: 0 0 calc((100% - (var(--bh-cols) - 1) * var(--bh-lgap)) / var(--bh-cols));
   min-width: 0;
   scroll-snap-align: start;
   display: flex; flex-direction: column; gap: 10px;
}

/* The clip lives on the thumbnail, not on the media box: the media box also
   holds the overflow menu, which opens past its own edge and must not be cut
   off by the rounding that the poster needs. */
.bh-lcard-media {
   position: relative;
   aspect-ratio: 9 / 16;
   border-radius: var(--bh-r-card);
   background: var(--bh-raise) !important;
   border: 1px solid var(--bh-line);
}

.bh-lcard-thumb {
   position: absolute; inset: 0; display: block;
   border-radius: calc(var(--bh-r-card) - 1px);
   overflow: hidden;
}
.bh-lcard-thumb img {
   width: 100%; height: 100%; object-fit: cover;
   transition: transform .35s ease;
}
.bh-lcard:hover .bh-lcard-thumb img { transform: scale(1.045); }

.bh-lcard-veil {
   position: absolute; inset: 0;
   background:
      linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, transparent 22%),
      linear-gradient(180deg, transparent 52%, rgba(0, 0, 0, .78) 100%);
}

.bh-lcard-play {
   position: absolute; left: 50%; top: 50%;
   transform: translate(-50%, -50%) scale(.85);
   width: 46px; height: 46px; border-radius: 50%;
   display: flex; align-items: center; justify-content: center;
   background: rgba(0, 0, 0, .55);
   border: 1px solid rgba(255, 255, 255, .3);
   color: #fff !important;
   opacity: 0;
   transition: opacity .2s ease, transform .2s ease;
}
.bh-lcard-play svg { margin-left: 2px; }
.bh-lcard:hover .bh-lcard-play,
.bh-lcard-thumb:focus-visible .bh-lcard-play {
   opacity: 1; transform: translate(-50%, -50%) scale(1);
}

.bh-lcard-badge {
   position: absolute; top: 9px; left: 9px; z-index: 2;
   padding: 3px 7px; border-radius: 5px;
   font-size: 9.5px; font-weight: 700; letter-spacing: .06em;
   color: #fff !important;
}
.bh-badge-new      { background: rgba(99, 102, 241, .94) !important; }
.bh-badge-trending { background: rgba(234, 88, 12, .94) !important; }

.bh-lcard-views {
   position: absolute; left: 9px; bottom: 10px; z-index: 2;
   display: inline-flex; align-items: center; gap: 4px;
   padding: 2px 7px; border-radius: 5px;
   background: rgba(0, 0, 0, .62);
   font-size: 11px; font-weight: 500;
   color: #fff !important;
}

/* Engagement rail, lower-right of the card. */
.bh-lcard-rail {
   position: absolute; right: 8px; bottom: 10px; z-index: 3;
   display: flex; flex-direction: column; align-items: center; gap: 9px;
}

.bh-act {
   display: flex; flex-direction: column; align-items: center; gap: 2px;
   width: 38px; padding: 0;
   color: #fff !important;
   text-align: center;
}
.bh-act svg {
   width: 30px; height: 30px; padding: 6px;
   border-radius: 50%;
   background: rgba(0, 0, 0, .52);
   transition: background .15s ease, color .15s ease, transform .15s ease;
}
.bh-act:hover svg { background: rgba(0, 0, 0, .74); transform: scale(1.06); }
.bh-act-count {
   font-size: 10.5px; font-weight: 600; line-height: 1.2;
   color: #fff !important;
   text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
}
.bh-act-like.is-on svg { color: #ff4d67 !important; background: rgba(0, 0, 0, .62); }

.bh-lcard-body { display: flex; flex-direction: column; gap: 7px; min-width: 0; }

.bh-lcard-title {
   font-size: 14px; font-weight: 600; line-height: 1.35;
   letter-spacing: -.008em;
   color: var(--bh-text) !important;
   display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
   overflow: hidden;
   transition: color .15s ease;
}
.bh-lcard:hover .bh-lcard-title { color: var(--bh-accent) !important; }

.bh-lcard-tag {
   font-size: 12px; font-weight: 500;
   color: #7fb4ff !important;
   white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bh-lcard-tag a { color: #7fb4ff !important; }
.bh-lcard-tag a:hover { color: #a9cdff !important; }

.bh-lcard-by { display: flex; align-items: center; gap: 7px; min-width: 0; }
.bh-lcard-by .bh-mini-avatar { width: 22px; height: 22px; }
.bh-lcard-owner {
   display: flex; align-items: center; gap: 4px;
   flex: 1 1 auto; min-width: 0;
   font-size: 12px; font-weight: 500;
   color: var(--bh-text-dim) !important;
   white-space: nowrap; overflow: hidden;
}
.bh-lcard-owner a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- card / row overflow menu ------------------------------------------- */

.bh-menu { position: relative; flex: none; }

.bh-lcard-media > .bh-menu { position: absolute; top: 6px; right: 6px; z-index: 4; }

.bh-menu-btn {
   width: 28px; height: 28px; border-radius: 50%;
   display: flex; align-items: center; justify-content: center;
   color: #fff !important;
   background: rgba(0, 0, 0, .5);
   transition: background .15s ease;
}
.bh-menu-btn:hover { background: rgba(0, 0, 0, .74); }

.bh-menu-flat .bh-menu-btn {
   width: 24px; height: 24px;
   background: transparent;
   color: var(--bh-text-mute) !important;
}
.bh-menu-flat .bh-menu-btn:hover {
   background: rgba(255, 255, 255, .09);
   color: var(--bh-text) !important;
}

.bh-menu-list {
   position: absolute; top: calc(100% + 6px); right: 0; z-index: 40;
   min-width: 168px; padding: 5px;
   background: var(--bh-raise) !important;
   border: 1px solid var(--bh-line) !important;
   border-radius: var(--bh-r-btn);
   box-shadow: 0 10px 26px rgba(0, 0, 0, .45);
}
.bh-menu-list[hidden] { display: none; }
.bh-menu-list li { background: transparent !important; }
.bh-menu-list a,
.bh-menu-list button {
   display: flex; align-items: center; gap: 9px; width: 100%;
   padding: 8px 9px; border-radius: 6px;
   font-size: 13px; text-align: left;
   color: var(--bh-text) !important;
}
.bh-menu-list a:hover,
.bh-menu-list button:hover { background: rgba(255, 255, 255, .08); }
.bh-menu-list svg { flex: none; color: var(--bh-text-mute) !important; }

/* --- trending rail ------------------------------------------------------ */

.bh-trend-list { display: flex; flex-direction: column; }

.bh-trend-item {
   display: grid;
   grid-template-columns: 22px 46px minmax(0, 1fr) 24px;
   align-items: center; gap: 10px;
   padding: 10px 0;
   border-bottom: 1px solid var(--bh-line-soft);
}
.bh-trend-item:last-child { border-bottom: 0; padding-bottom: 0; }
.bh-trend-item:first-child { padding-top: 0; }

.bh-trend-rank {
   font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums;
   color: var(--bh-accent) !important; letter-spacing: -.03em;
}

.bh-trend-thumb {
   display: block; width: 46px; height: 62px;
   border-radius: 7px; overflow: hidden;
   background: var(--bh-raise) !important;
   border: 1px solid var(--bh-line-soft);
}
.bh-trend-thumb img { width: 100%; height: 100%; object-fit: cover; }

.bh-trend-body { min-width: 0; }
.bh-trend-title {
   font-size: 13px; font-weight: 500; line-height: 1.38;
   color: var(--bh-text) !important;
   display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
   overflow: hidden;
   transition: color .15s ease;
}
.bh-trend-item:hover .bh-trend-title { color: var(--bh-accent) !important; }
.bh-trend-sub {
   margin-top: 4px;
   font-size: 11.5px; color: var(--bh-text-mute) !important;
   white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bh-trend-sub a { color: var(--bh-text-mute) !important; }
.bh-trend-sub a:hover { color: var(--bh-text-dim) !important; }

/* --- top creators ------------------------------------------------------- */

.bh-creator-list { display: flex; flex-direction: column; }

.bh-creator {
   display: flex; align-items: center; gap: 10px;
   padding: 10px 0;
   border-bottom: 1px solid var(--bh-line-soft);
}
.bh-creator:last-child { border-bottom: 0; padding-bottom: 0; }
.bh-creator:first-child { padding-top: 0; }

.bh-creator-avatar {
   width: 38px; height: 38px; border-radius: 50%;
   overflow: hidden; flex: none; display: block;
}
.bh-creator-avatar img { width: 100%; height: 100%; object-fit: cover; }

.bh-creator-body { min-width: 0; flex: 1 1 auto; }
.bh-creator-name {
   display: flex; align-items: center; gap: 5px;
   font-size: 13.5px; font-weight: 600;
   color: var(--bh-text) !important;
   white-space: nowrap; overflow: hidden;
}
.bh-creator-name a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bh-creator-meta {
   margin-top: 3px;
   font-size: 11.5px; color: var(--bh-text-mute) !important;
}

.bh-follow {
   flex: none;
   min-width: 68px; height: 30px; padding: 0 13px;
   border-radius: 999px;
   background: rgba(255, 255, 255, .09);
   border: 1px solid var(--bh-line);
   font-size: 12.5px; font-weight: 600;
   color: var(--bh-text) !important;
   white-space: nowrap;
   transition: background .15s ease, color .15s ease;
}
.bh-follow:hover { background: rgba(255, 255, 255, .16); }
.bh-follow.is-following {
   background: transparent;
   border-color: var(--bh-accent-line);
   color: var(--bh-accent) !important;
}
.bh-follow-sm {
   min-width: 0; height: 24px; padding: 0 10px;
   font-size: 11px; font-weight: 600;
}

/* --- categories --------------------------------------------------------- */

.bh-cat-grid {
   display: grid;
   grid-template-columns: repeat(6, minmax(0, 1fr));
   gap: 12px;
}
.bh-cat-card.is-extra { display: none; }
.bh-cat-grid.is-open .bh-cat-card.is-extra { display: block; }

.bh-cat-card > a {
   display: flex; flex-direction: column; gap: 3px;
   height: 100%; padding: 14px;
   border-radius: var(--bh-r-card);
   background: var(--bh-card) !important;
   border: 1px solid var(--bh-line);
   transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.bh-cat-card > a:hover { transform: translateY(-2px); }
.bh-cat-card > a.is-active { border-color: var(--bh-accent-line); }

.bh-cat-icon {
   display: inline-flex; margin-bottom: 7px;
   width: 32px; height: 32px; border-radius: 9px;
   align-items: center; justify-content: center;
}
.bh-cat-name {
   font-size: 14px; font-weight: 600; letter-spacing: -.01em;
   color: var(--bh-text) !important;
   white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bh-cat-count { font-size: 11.5px; color: var(--bh-text-mute) !important; }

/* Category tints, kept low enough that a category card never outweighs the
   Loop cards above it. */
.bh-tint-0 > a { background: linear-gradient(160deg, rgba(96, 165, 250, .10), transparent 62%), var(--bh-card) !important; }
.bh-tint-0 .bh-cat-icon { background: rgba(96, 165, 250, .14); color: #60a5fa !important; }
.bh-tint-1 > a { background: linear-gradient(160deg, rgba(244, 114, 182, .10), transparent 62%), var(--bh-card) !important; }
.bh-tint-1 .bh-cat-icon { background: rgba(244, 114, 182, .14); color: #f472b6 !important; }
.bh-tint-2 > a { background: linear-gradient(160deg, rgba(34, 211, 238, .10), transparent 62%), var(--bh-card) !important; }
.bh-tint-2 .bh-cat-icon { background: rgba(34, 211, 238, .14); color: #22d3ee !important; }
.bh-tint-3 > a { background: linear-gradient(160deg, rgba(74, 222, 128, .10), transparent 62%), var(--bh-card) !important; }
.bh-tint-3 .bh-cat-icon { background: rgba(74, 222, 128, .14); color: #4ade80 !important; }
.bh-tint-4 > a { background: linear-gradient(160deg, rgba(167, 139, 250, .10), transparent 62%), var(--bh-card) !important; }
.bh-tint-4 .bh-cat-icon { background: rgba(167, 139, 250, .14); color: #a78bfa !important; }
.bh-tint-5 > a { background: linear-gradient(160deg, rgba(255, 184, 0, .10), transparent 62%), var(--bh-card) !important; }
.bh-tint-5 .bh-cat-icon { background: rgba(255, 184, 0, .14); color: #ffb800 !important; }

.bh-tint-0 > a:hover { border-color: rgba(96, 165, 250, .38); }
.bh-tint-1 > a:hover { border-color: rgba(244, 114, 182, .38); }
.bh-tint-2 > a:hover { border-color: rgba(34, 211, 238, .38); }
.bh-tint-3 > a:hover { border-color: rgba(74, 222, 128, .38); }
.bh-tint-4 > a:hover { border-color: rgba(167, 139, 250, .38); }
.bh-tint-5 > a:hover { border-color: rgba(255, 184, 0, .38); }

/* --- empty states ------------------------------------------------------- */

.bh-blank {
   display: flex; flex-direction: column; align-items: center;
   text-align: center; gap: 9px;
   padding: 56px 24px;
   background: var(--bh-card);
   border: 1px solid var(--bh-line);
   border-radius: var(--bh-r-card);
}
.bh-blank-sm { padding: 40px 24px; }
.bh-blank-icon { color: var(--bh-text-mute) !important; }
.bh-blank-title { font-size: 16px; font-weight: 600; color: var(--bh-text) !important; }
.bh-blank-sub {
   font-size: 13.5px; color: var(--bh-text-mute) !important;
   max-width: 420px; line-height: 1.55;
}
.bh-blank .bh-btn-primary,
.bh-blank .bh-btn-ghost { margin-top: 8px; }

/* ==========================================================================
   Light mode - follows the parent theme's day/night cookie
   ========================================================================== */

.bh-app.bh-light {
   --bh-card:        #ffffff;
   --bh-raise:       #eef0f2;
   --bh-line:        rgba(0, 0, 0, .10);
   --bh-line-soft:   rgba(0, 0, 0, .08);
   --bh-text:        #16191d;
   --bh-text-dim:    #545b63;
   --bh-text-mute:   #6b727a;
   --bh-accent:      #a86800;
   --bh-accent-wash: rgba(255, 152, 0, .12);
   --bh-accent-line: rgba(255, 152, 0, .34);
}
.bh-app.bh-light .bh-ico-loops { color: #d98d00 !important; }
.bh-app.bh-light .bh-pill:hover { background: #e3e6e9; border-color: rgba(0, 0, 0, .16); }
.bh-app.bh-light .bh-pill.is-active,
.bh-app.bh-light .bh-more-menu a.is-active { color: #7a4b00 !important; }
.bh-app.bh-light .bh-pill.is-active:hover { background: rgba(255, 152, 0, .18); }
.bh-app.bh-light .bh-btn-ghost { background: rgba(0, 0, 0, .04); }
.bh-app.bh-light .bh-btn-ghost:hover { background: rgba(0, 0, 0, .08); }
.bh-app.bh-light .bh-btn-outline:hover { background: rgba(255, 152, 0, .2); }
.bh-app.bh-light .bh-follow { background: rgba(0, 0, 0, .04); }
.bh-app.bh-light .bh-follow:hover { background: rgba(0, 0, 0, .08); }
.bh-app.bh-light .bh-menu-list a:hover,
.bh-app.bh-light .bh-menu-list button:hover,
.bh-app.bh-light .bh-more-menu a:hover { background: rgba(0, 0, 0, .05); }
.bh-app.bh-light .bh-menu-list,
.bh-app.bh-light .bh-more-menu { box-shadow: 0 10px 26px rgba(0, 0, 0, .13); }
.bh-app.bh-light .bh-rail-next,
.bh-app.bh-light .bh-rail-prev { box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.bh-app.bh-light .bh-rail-next:hover,
.bh-app.bh-light .bh-rail-prev:hover { background: #e3e6e9 !important; }
.bh-app.bh-light .bh-lcard-tag,
.bh-app.bh-light .bh-lcard-tag a { color: #1d63c9 !important; }
.bh-app.bh-light .bh-sec-error {
   background: rgba(220, 38, 38, .07) !important;
   border-color: rgba(220, 38, 38, .22);
   color: #9b2222 !important;
}
.bh-app.bh-light .bh-sec-error-icon { color: #c23333 !important; }
/* the card overlays keep white type over their own dark scrim */
.bh-app.bh-light .bh-act,
.bh-app.bh-light .bh-act-count,
.bh-app.bh-light .bh-lcard-views,
.bh-app.bh-light .bh-lcard-badge,
.bh-app.bh-light .bh-lcard-media > .bh-menu .bh-menu-btn { color: #fff !important; }

/* ==========================================================================
   Responsive

   The Loop row keeps a whole number of cards at every width by changing
   --bh-cols rather than the card width, so the row never ends on a sliver.
   ========================================================================== */

@media (max-width: 1560px) {
   .bh-app { --bh-cols: 4; }
   .bh-cat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 1280px) {
   .bh-app { --bh-cols: 3; --bh-rail: clamp(260px, 24%, 300px); }
   .bh-cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* rail drops under the main column; sections take the mobile reading order */
@media (max-width: 1024px) {
   .bh-body {
      display: flex; flex-direction: column;
      align-items: stretch; gap: 20px;
   }
   .bh-col-main, .bh-col-side { display: contents; }

   .bh-loop-feed { order: 1; }
   .bh-trending  { order: 2; }
   .bh-creators  { order: 3; }
   .bh-cats      { order: 4; }

   .bh-app { --bh-cols: 3; }
}

@media (max-width: 860px) {
   .bh-app { --bh-cols: 2.6; }
   .bh-cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
   .bh-app { --bh-cols: 2.15; --bh-gap: 16px; }
   .bh-page-head { align-items: flex-start; }
   .bh-upload-loop { width: 100%; }
}

@media (max-width: 560px) {
   #main-container.container { padding-left: 14px; padding-right: 14px; }
   .bh-app { --bh-cols: 1.35; --bh-gap: 14px; --bh-lgap: 11px; }
   .bh-card { padding: 14px; }

   .bh-page-head { padding-top: 14px; }
   .bh-page-sub { font-size: 13.5px; }

   /* the arrows are redundant next to a swipeable rail */
   .bh-rail-next, .bh-rail-prev { display: none; }

   .bh-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
   .bh-trend-item { grid-template-columns: 22px 44px minmax(0, 1fr) 24px; }
}

@media (prefers-reduced-motion: reduce) {
   .bh-app *, .bh-app *::before, .bh-app *::after {
      transition-duration: .01ms !important;
      animation-duration: .01ms !important;
   }
   .bh-rail { scroll-behavior: auto; }
}
