/* KJPTV — Cast & Crew Directory furniture (.dir-*).
   Person cards themselves are the shared .dt-person set in title-detail.css;
   the filter bar, chips and load-more come from catalog.css. */

/* ---- Hero ----------------------------------------------------------------- */
.dir-hero { position: relative; overflow: hidden; padding: calc(var(--nav-height) + 70px) 0 54px; }
.dir-hero-pattern { position: absolute; inset: 0; z-index: 0; opacity: 0.05;
  background: url('assets/brand-pattern.png?v=59e9ff10') center / 320px repeat; }
.dir-hero-scrim { position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(120% 90% at 12% 0%, rgba(6,6,6,0.55) 0%, rgba(6,6,6,0.92) 60%, #060606 100%); }
.dir-hero .container { position: relative; z-index: 2; }
.dir-hero h1 { font-size: clamp(calc(var(--size-display) * 0.6), 7vw, var(--size-display)); font-weight: 900; line-height: 0.94; letter-spacing: -0.042em; }
/* thin gold rule closing the hero */
.dir-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: 1px;
  background: linear-gradient(90deg, rgba(214,157,56,0) 0%, rgba(255,210,107,0.55) 22%, rgba(255,210,107,0.75) 50%, rgba(255,210,107,0.55) 78%, rgba(214,157,56,0) 100%); }
.dir-lede { margin-top: 18px; max-width: 560px; font-size: calc(var(--size-body) * 1.1429); line-height: 1.62; color: var(--text-body); text-wrap: pretty; }
.dir-facts { display: flex; flex-wrap: wrap; gap: 14px 46px; margin-top: 38px; }
.dir-fact-n { font-size: calc(var(--size-heading) * 0.9375); font-weight: 900; line-height: 1; letter-spacing: -0.035em; color: var(--text-heading); font-variant-numeric: tabular-nums; }
.dir-fact-l { margin-top: 7px; font-size: calc(var(--size-meta) * 1.0455); font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--text-muted); }

/* ---- Your follows rail (members only) ------------------------------------- */
.dir-mine { display: none; }
body.view-paid .dir-mine { display: block; }
/* Ten names over two rows — the rest live on the member's own profile */
.dir-mine-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding: 4px 0 0; }
.dir-mine-more { margin-top: 14px; font-size: calc(var(--size-small) * 1.0417); color: var(--text-muted); }
.dir-chip-person { min-width: 0; display: flex; align-items: center; gap: 13px; padding: 10px 22px 10px 10px; border-radius: 999px;
  border: 1px solid var(--border-bevel-strong); background: var(--color-surface-1); box-shadow: var(--bevel-highlight);
  transition: border-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); }
.dir-chip-person:hover { border-color: var(--border-gold); transform: translateY(-2px); }
.dir-chip-face { position: relative; flex: none; width: 48px; height: 48px; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: calc(var(--size-body) * 1.0357); font-weight: 800; color: var(--gold-mustard);
  background: var(--color-surface-3); box-shadow: var(--well-inset); }
.dir-chip-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; }
/* Presence ring, bottom right of the face — members only */
/* The face is the round photo crop, so the presence ring cannot live inside it \u2014
   this wrapper is the positioning context and does not clip. */
.dir-chip-avatar { position: relative; flex: none; width: 48px; height: 48px; }
.dir-chip-dot { position: absolute; z-index: 2; right: -2px; bottom: -2px; width: 13px; height: 13px;
  border-radius: 50%; background: transparent; border: 2.5px solid #6B6868;
  box-shadow: 0 0 0 2px var(--color-surface-1); }
.dir-chip-dot.is-on { border-color: #4ED07A; box-shadow: 0 0 0 2px var(--color-surface-1), 0 0 8px rgba(78,208,122,0.55); }
body:not(.view-paid) .dir-chip-dot { display: none; }
.dir-chip-person > span { min-width: 0; }
.dir-chip-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(var(--size-body) * 1.0714); font-weight: 800; letter-spacing: -0.01em; color: var(--text-heading); }
.dir-chip-role { display: block; margin-top: 3px; font-size: var(--size-small); color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-chip-role.is-at { color: var(--gold-mustard); font-weight: 700; }
.dir-mine-empty { padding: 20px 22px; border: 1px dashed var(--border-bevel-strong); border-radius: 14px; font-size: calc(var(--size-body) * 0.9643); color: var(--text-muted); }

/* ---- Your followers rail (members only) ----------------------------------- */
/* Avatar + presence ring + @handle only — no names, no roles. */
.dir-fol { display: none; }
body.view-paid .dir-fol { display: block; }
.dir-fol-count { font-size: calc(var(--size-small) * 1.0417); font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.dir-fol-row { display: flex; flex-wrap: wrap; gap: 18px 14px; padding: 4px 0 0; }
.dir-fol-chip { display: flex; flex-direction: column; align-items: center; gap: 9px; width: 96px; min-width: 0; }
.dir-fol-chip .dir-chip-avatar, .dir-fol-chip .dir-chip-face { width: 54px; height: 54px; }
.dir-fol-chip .dir-chip-face { font-size: calc(var(--size-body) * 1.0714); transition: box-shadow var(--dur-base) var(--ease-out); }
.dir-fol-chip:hover .dir-chip-face { box-shadow: var(--well-inset), 0 0 0 2px var(--gold-mustard); }
.dir-fol-at { max-width: 96px; padding: 3px 9px; border-radius: 999px; font-size: calc(var(--size-meta) * 0.9545); font-weight: 700;
  color: var(--gold-mustard); background: rgba(255,255,255,0.03); border: 1px solid var(--border-bevel-strong);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-fol-note { margin-top: 16px; font-size: calc(var(--size-small) * 1.0417); color: var(--text-muted); }

/* ---- Filter bar additions ------------------------------------------------- */
.dir-bar { flex-direction: column; align-items: stretch; gap: 12px; }
.dir-bar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; min-width: 0; }
.dir-bar-row + .dir-bar-row { padding-top: 12px; border-top: 1px solid var(--border-bevel); }
.dir-bar .sc-select { max-width: 190px; }
.dir-bar .fb-search { margin-left: 0; flex: 1 1 220px; }
.dir-bar .fb-search input { width: 100%; }
.dir-bar .fb-count { margin-left: auto; }
.dir-cred { flex: 1 1 230px; max-width: 340px; gap: 14px; }
.dir-cred .gold-slider { flex: 1; min-width: 96px; }
.dir-cred-val { min-width: 44px; font-size: var(--size-small); font-weight: 700; color: var(--gold-mustard); font-variant-numeric: tabular-nums; }
.dir-clear { margin-left: auto; font-size: var(--size-small); font-weight: 600; color: var(--text-muted); background: none; border: 0; padding: 6px 2px; cursor: pointer; transition: color var(--dur-fast) var(--ease-out); }
.dir-clear:hover { color: var(--gold-mustard); }

/* ---- Watching filter: search + autocomplete ------------------------------- */
.dir-ac { position: relative; display: flex; align-items: center; gap: 8px; flex: 1 1 190px; max-width: 220px;
  padding: 0 10px; border-radius: 8px; background: var(--color-surface-3); border: 1px solid var(--border-bevel);
  transition: border-color var(--dur-fast) var(--ease-out); }
.dir-ac:focus-within { border-color: var(--border-gold); }
.dir-ac > svg { flex: none; width: 16px; height: 16px; color: var(--gold-mustard); }
.dir-ac-input { flex: 1; min-width: 0; padding: 9px 0; background: none; border: 0; outline: none;
  font: inherit; font-size: var(--size-small); font-weight: 600; color: var(--text-heading); }
.dir-ac-input::placeholder { color: var(--text-body); font-weight: 600; }
.dir-ac-x { display: inline-flex; flex: none; padding: 2px; color: var(--text-muted); }
.dir-ac-x svg { width: 13px; height: 13px; }
.dir-ac-x:hover { color: var(--gold-mustard); }
.dir-ac-list { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0; max-height: 264px; overflow-y: auto;
  padding: 6px; border-radius: 12px; background: rgba(14,14,14,0.97); border: 1px solid var(--border-bevel-strong);
  box-shadow: var(--bevel-highlight), var(--shadow-matte-lg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.dir-ac-opt { display: block; width: 100%; text-align: left; padding: 9px 11px; border-radius: 8px;
  font: inherit; font-size: calc(var(--size-small) * 1.0833); font-weight: 600; color: var(--text-body); cursor: pointer; }
.dir-ac-opt:hover, .dir-ac-opt.is-on { color: var(--gold-mustard); background: linear-gradient(180deg, rgba(214,157,56,0.12), rgba(214,157,56,0.03)); }
.dir-ac-opt.has-ic { display: flex; align-items: center; gap: 8px; }
.dir-ac-opt svg { flex: none; width: 14px; height: 14px; color: var(--gold-mustard); }
.dir-ac-opt:hover svg, .dir-ac-opt.is-on svg { color: inherit; }
/* Create mode: the field stops picking and starts naming something new. */
.dir-ac.is-new { border-color: var(--border-gold); }
.dir-ac-empty { padding: 10px 11px; font-size: calc(var(--size-small) * 1.0417); color: var(--text-muted); }


/* Following is a members-only filter */
body:not(.view-paid) .filter-chip[data-who="following"] { display: none; }

/* ---- A–Z index ------------------------------------------------------------ */
.dir-alpha { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 22px; }
.dir-letter { min-width: 30px; padding: 6px 4px; border-radius: 8px; font-size: var(--size-small); font-weight: 700; color: var(--text-muted);
  background: none; border: 1px solid transparent; cursor: pointer; font-variant-numeric: tabular-nums;
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out); }
.dir-letter:hover:not(:disabled) { color: var(--text-heading); border-color: var(--border-bevel-strong); }
.dir-letter.is-active { color: #2a1e08; background: var(--gold-metallic-135); border-color: transparent; box-shadow: var(--bevel-highlight); }
.dir-letter:disabled { opacity: 0.28; cursor: default; }

/* ---- Grid ---------------------------------------------------------------- */
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 18px; }
.dir-empty { padding: 46px 24px; text-align: center; border: 1px dashed var(--border-bevel-strong); border-radius: var(--radius-card); }
.dir-empty h4 { font-size: calc(var(--size-subhead) * 0.9444); font-weight: 800; color: var(--text-heading); }
.dir-empty p { margin-top: 8px; font-size: calc(var(--size-body) * 0.9643); color: var(--text-muted); }
.dir-grid .dt-person-role { min-height: 32px; }
.dir-credits { display: block; margin-top: 6px; font-size: calc(var(--size-meta) * 1.0455); font-weight: 600; color: var(--text-muted); }

@media (max-width: 1024px) {
  .dir-grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
  .dir-mine-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .dir-hero { padding: calc(var(--nav-height) + 38px) 0 40px; }
  /* all four facts stay on one line; the label wraps to two */
  .dir-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    flex-wrap: nowrap; gap: 0 12px; margin-top: 30px; }
  .dir-fact-n { font-size: calc(var(--size-subhead) * 1.2222); }
  .dir-fact-l { margin-top: 6px; font-size: calc(var(--size-meta) * 0.8636); letter-spacing: 0.08em; line-height: 1.35; }
  .dir-bar { padding: 14px; }
  .dir-bar .sc-select, .dir-bar-row .sc-select { max-width: none; width: 100%; }
  .dir-bar .fb-search { flex: 1 1 100%; }
  .dir-bar .fb-count { width: 100%; margin-left: 0; }
  .dir-clear { width: 100%; margin-left: 0; text-align: center; }
  .dir-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  /* One person per row — two chips side by side clip the name and the role */
  .dir-mine-row { grid-template-columns: 1fr; }
  .dir-cred { flex: 1 1 100%; max-width: none; }
  .dir-ac { flex: 1 1 100%; max-width: none; }
  .dir-alpha { gap: 3px; }
  .dir-letter { min-width: 26px; padding: 5px 3px; font-size: var(--size-meta); }
}
