/* Character hub (features/hub) — one sheet for discover cards, chat header/bubbles, intro, my mates.
   Layout: narrow = one column, the card itself scrolls (app-style full 2:3 hero, sticky tabs + CTA).
   Wide (>= 960px) = two columns: the portrait fills the left column at 2:3, intro/tabs/CTA on the right. No crop, no blur. */
.hub-backdrop { align-items: center; }
.hub-card { position: relative; width: 100%; max-width: 480px; max-height: min(92vh, 860px); display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2); scrollbar-width: none; }
.hub-card::-webkit-scrollbar { display: none; }
.hub-body { display: contents; }
.hub-scroll { min-height: 0; }
.hub-close { position: sticky; top: 10px; z-index: 4; margin: 0 0 -34px 10px; width: 34px; height: 34px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .5); color: #fff; backdrop-filter: blur(4px); }
.hub-close svg { width: 16px; height: 16px; display: block; }
.hub-nav { position: absolute; top: 46%; z-index: 3; width: 38px; height: 38px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .45); color: #fff; backdrop-filter: blur(4px); transition: background .15s; }
.hub-nav svg { width: 20px; height: 20px; display: block; }
.hub-nav:hover { background: rgba(0, 0, 0, .7); }
.hub-nav.prev { left: 10px; }
.hub-nav.next { right: 10px; }

/* hero */
.hub-media { position: relative; flex: none; background: var(--surface-2); touch-action: pan-y; }
.hub-img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; object-position: top; }
.hub-media::after { content: ""; position: absolute; inset: auto 0 0 0; height: 110px; background: linear-gradient(to top, var(--surface), transparent); pointer-events: none; }
.hub-new { position: absolute; top: 14px; right: 14px; z-index: 2; padding: 3px 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.hub-like { position: absolute; right: 12px; bottom: 12px; z-index: 2; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 12px 0 10px; line-height: 1; border-radius: 999px; background: rgba(0, 0, 0, .5); color: #fff; font-size: 14px; font-weight: 600; backdrop-filter: blur(4px); transition: transform .15s; }
.hub-like:hover { transform: scale(1.05); }
.hub-like[aria-pressed="true"] .hub-like-icon { color: var(--accent); }
.hub-like-icon { font-size: 17px; line-height: 1; display: block; transform: translateY(-1px); }
.hub-like-count { display: block; line-height: 1; }

/* tabs */
.hub-tabs { position: sticky; top: 0; z-index: 2; display: flex; background: var(--surface); border-bottom: 1px solid var(--line); }
.hub-tabs { margin-top: -1px; }
.hub-tabs button { flex: 1; height: 44px; font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.hub-tabs button.active { color: var(--ink); border-bottom-color: var(--ink); }

/* intro pane */
.hub-pane { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px 20px; }
.hub-head { display: flex; flex-direction: column; gap: 2px; }
.hub-name { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.1; }
.hub-spec { color: var(--gold); font-size: 13px; }
.hub-episode-title { font-weight: 600; font-size: 15px; margin-top: 4px; }
.hub-stats { display: flex; gap: 18px; }
.hub-stat { display: flex; flex-direction: column; gap: 1px; }
.hub-stat b { font-size: 16px; font-weight: 600; }
.hub-stat span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.hub-tags .chip { height: 28px; padding: 0 10px; font-size: 12px; }
.hub-hook { color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.hub-section { display: flex; flex-direction: column; gap: 8px; }
.hub-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.hub-text { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.hub-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.hub-cast { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.hub-cast::-webkit-scrollbar { display: none; }
.hub-cast-card { flex: 0 0 112px; display: flex; flex-direction: column; gap: 4px; padding: 0; text-align: left; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 2px solid transparent; transition: border-color .15s; }
.hub-cast-card.active { border-color: var(--ink); }
.hub-cast-img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--surface-2); }
.hub-cast-name { padding: 0 8px; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-cast-sub { padding: 0 8px 8px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-creator { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.hub-creator-name { font-size: 14px; font-weight: 600; }
.hub-script { display: flex; flex-direction: column; gap: 8px; }
.hub-script .hub-narration { font-family: var(--serif); font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.hub-script .hub-cut { width: 100%; border-radius: 12px; object-fit: cover; max-height: 220px; }
.hub-script .hub-first { padding: 10px 14px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; line-height: 1.5; }
.hub-disclaimer { font-size: 11px; color: var(--muted); line-height: 1.4; }
.hub-disclaimer-box { padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--line); }
.hub-comment-list { display: flex; flex-direction: column; gap: 10px; }
.hub-comment { display: flex; gap: 10px; align-items: flex-start; }
.hub-comment-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }
.hub-comment-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hub-comment-author { font-size: 12px; font-weight: 600; color: var(--muted); }
.hub-comment-text { font-size: 14px; line-height: 1.45; word-break: break-word; }
.hub-comment-delete { color: var(--muted); font-size: 18px; line-height: 1; padding: 0 4px; }
.hub-comment-form { display: flex; gap: 8px; }
.hub-comment-form input { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); font: inherit; font-size: 14px; outline: none; }
.hub-comment-form input:focus { border-color: var(--line-2); }
.hub-empty { color: var(--muted); font-size: 14px; }

/* gallery */
.hub-gallery-count { font-size: 13px; color: var(--muted); }
.hub-gallery-section { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.hub-gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hub-gallery-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.hub-gallery-row::-webkit-scrollbar { display: none; }
.hub-gallery-row .hub-slot { flex: 0 0 84px; }
.hub-slot { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.hub-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hub-slot.locked img { filter: blur(6px) brightness(.55); transform: scale(1.08); }
.hub-slot.locked::after { content: "🔒"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.hub-slot-hint { font-size: 12px; color: var(--muted); }

/* sticky CTA */
.hub-foot { position: sticky; bottom: 0; z-index: 2; flex: none; margin-top: auto; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.hub-cta { display: flex; width: 100%; justify-content: center; }

@media (max-width: 480px) {
  #hubSheet { padding: 0; align-items: flex-end; }
  .hub-card { max-width: none; max-height: 94vh; border-radius: var(--r-lg) var(--r-lg) 0 0; border-left: 0; border-right: 0; border-bottom: 0; }
}

/* Wide: two columns. Portrait column width follows the card height at 2:3. */
@media (min-width: 960px) {
  .hub-card { max-width: calc(min(86vh, 800px) * 2 / 3 + 440px); height: min(86vh, 800px); max-height: none; display: grid; grid-template-columns: auto 1fr; overflow: hidden; }
  .hub-media { width: calc(min(86vh, 800px) * 2 / 3); height: 100%; }
  .hub-img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: center top; }
  .hub-media::after { display: none; }
  .hub-close { position: absolute; top: 10px; left: 10px; margin: 0; }
  .hub-nav { top: 50%; transform: translateY(-50%); }
  .hub-nav.next { left: calc(min(86vh, 800px) * 2 / 3 - 48px); right: auto; }
  .hub-body { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
  .hub-tabs { position: static; }
  .hub-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .hub-foot { position: static; margin-top: 0; }
  .hub-name { font-size: 32px; }
}

/* Top creators rows (mates page) */
.creator-list { display: flex; flex-direction: column; gap: 8px; }
.creator-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s; }
.creator-row:hover { border-color: var(--line-2); }
.creator-row.blocked { opacity: .65; cursor: default; }
.creator-rank { width: 22px; text-align: center; font-weight: 700; font-size: 14px; color: var(--muted); }
.creator-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--surface-2); flex: none; }
.creator-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.creator-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.creator-stats { font-size: 12px; color: var(--muted); }
.creator-blocked { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.creator-chev { font-size: 22px; color: var(--muted); line-height: 1; }

/* Creator channel sheet */
.channel-card { position: relative; width: 100%; max-width: 640px; max-height: min(92vh, 860px); overflow-y: auto; overscroll-behavior: contain; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2); padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.channel-card .hub-close { position: absolute; top: 12px; right: 12px; left: auto; margin: 0; }
.channel-head { display: flex; align-items: center; gap: 14px; padding-right: 40px; }
.channel-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--surface-2); flex: none; }
.channel-head-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.channel-name { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.1; }
.channel-stats { font-size: 13px; color: var(--muted); }
.channel-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
@media (max-width: 480px) { .channel-card { max-width: none; max-height: 94vh; border-radius: var(--r-lg) var(--r-lg) 0 0; border-left: 0; border-right: 0; border-bottom: 0; } }
