#hub { width: min(100% - 40px, 1280px); margin: 0 auto 80px; min-width: 0; color: var(--ink); font-family: var(--font); }
#hub:empty { display: none; }
#hub *, #hub *::before, #hub *::after { box-sizing: border-box; }
.hub-search { position: relative; margin: 0 0 28px; }
.hub-search-input { display: block; width: 100%; min-height: 56px; padding: 14px 20px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--card-2); color: var(--ink); font: inherit; font-size: 16px; outline-offset: 3px; }
.hub-search-input::placeholder { color: var(--ink-dim); }
.hub-search-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.hub-search-results[hidden] { display: none; }
.hub-banner-slot { margin-bottom: 38px; }
.hub-banner { position: relative; isolation: isolate; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-2); min-height: 300px; }
.hub-banner-bg { position: absolute; z-index: -2; inset: -10%; width: 120%; height: 120%; object-fit: cover; filter: blur(20px) brightness(.35); animation: hub-zoom 24s ease-in-out infinite alternate; }
.hub-banner::before { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, var(--bg-1), transparent); opacity: .9; }
@keyframes hub-zoom { from { transform: scale(1); } to { transform: scale(1.08); } }
.hub-banner-content { min-height: 100%; padding: clamp(24px, 4vw, 48px); display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.hub-banner-copy { flex: 1 1 55%; min-width: 0; }
.hub-eyebrow { margin: 0 0 10px; color: var(--honey); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.hub-banner-title { margin: 0 0 10px; font-size: clamp(24px, 3.4vw, 44px); line-height: 1.1; }
.hub-banner-desc { max-width: 620px; margin: 0; color: var(--ink); line-height: 1.5; display: -webkit-box; overflow: hidden; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.hub-banner-meta { color: var(--honey); margin: 12px 0 0; }
.hub-banner-image { width: min(34%, 390px); aspect-ratio: 16 / 10; object-fit: cover; border-radius: 16px; border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.hub-banner-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }
.hub-play, .hub-page-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; border-radius: 12px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.hub-play { border: 0; color: var(--bg-0); background: var(--honey); }
.hub-page-link { color: var(--ink); border: 1px solid var(--line-strong); background: var(--card-2); }
.hub-shelf { min-width: 0; margin: 0 0 34px; }
.hub-shelf-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.hub-heading { margin: 0; font-size: clamp(20px, 2vw, 27px); line-height: 1.2; }
.hub-controls { display: flex; gap: 8px; }
.hub-arrow { width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--card); color: var(--ink); font: inherit; font-size: 26px; line-height: 1; cursor: pointer; }
.hub-row { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(165px, 19%, 220px); gap: 14px; overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x mandatory; padding: 0 0 10px; scrollbar-color: var(--line-strong) transparent; }
.hub-card { min-width: 0; display: block; overflow: hidden; scroll-snap-align: start; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); text-decoration: none; }
.hub-card:hover, .hub-card:focus-visible { border-color: var(--honey); }
.hub-card-image { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--bg-2); }
.hub-card-body { display: flex; flex-direction: column; gap: 5px; padding: 12px; }
.hub-card-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.hub-card-meta, .hub-community-meta { color: var(--ink-dim); font-size: 13px; }
.hub-card-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-community { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.hub-community-side { display: grid; gap: 20px; min-width: 0; }
.hub-panel { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.hub-panel .hub-heading { margin-bottom: 16px; }
.hub-review { display: flex; gap: 12px; min-height: 44px; padding: 12px 0; color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); }
.hub-review-image { width: 82px; height: 52px; flex: 0 0 82px; object-fit: cover; border-radius: 8px; background: var(--bg-2); }
.hub-review-content { display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.hub-review-body { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; line-height: 1.4; }
.hub-community-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; padding: 8px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.hub-community-line .hub-community-meta { text-align: right; flex-shrink: 0; }
.hub-empty { color: var(--ink-dim); line-height: 1.5; }
@media (max-width: 700px) {
  #hub { width: calc(100% - 32px); }
  .hub-banner { min-height: 360px; }
  .hub-banner-content { flex-direction: column-reverse; align-items: flex-start; justify-content: center; gap: 16px; }
  .hub-banner-copy { flex: 0 1 auto; }
  .hub-banner-image { width: min(55%, 210px); }
  .hub-banner-desc { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
  .hub-community { grid-template-columns: minmax(0, 1fr); }
  .hub-controls { display: none; }
  .hub-row { grid-auto-columns: 165px; }
}
@media (prefers-reduced-motion: reduce) { .hub-banner-bg { animation: none; } .hub-row { scroll-behavior: auto; } }

.hub-card-wrap { position: relative; min-width: 0; scroll-snap-align: start; }
.hub-favorite { position: absolute; z-index: 2; top: 8px; right: 8px; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 50%; background: #101827e8; color: #ffdb7e; font: 28px/1 system-ui,sans-serif; cursor: pointer; }
.hub-favorite:focus-visible { outline: 2px solid var(--honey); outline-offset: 2px; }
.hub-favorite:disabled { opacity: .7; }

#siteHeader { flex-wrap: wrap; row-gap: 4px; }
.hub-nav { flex: 0 0 100%; display: flex; align-items: center; min-width: 0; height: 40px; gap: 4px; }
.hub-nav-strip { display: flex; align-items: center; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(to right, transparent, #000 8px, #000 calc(100% - 12px), transparent); }
.hub-nav-strip::-webkit-scrollbar { display: none; }
.hub-nav-link, .hub-nav-search { flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 10px; border: 0; border-radius: 99px; background: transparent; color: var(--ink-dim); font: 600 13px/1 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer; }
.hub-nav-link:hover, .hub-nav-link[aria-current="true"], .hub-nav-search:hover { color: var(--honey); background: var(--honey-soft); }
.hub-nav-link:focus-visible, .hub-nav-search:focus-visible { outline: 2px solid var(--honey); outline-offset: -2px; }
.hub-nav-link[hidden] { display: none; }
.hub-nav-search { min-width: 40px; }
#hub section[id], #catalog, .hub-search { scroll-margin-top: var(--hub-header-height, 130px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* The portal hero glow is wider than a phone screen and widened the layout viewport. */
.hero { overflow-x: clip; }
.heroStats .stat[hidden] { display: none; }
