/* =====================================================================
   Qapsol Template — Qaplist (vibe-based playlists) UI
   Static UI only. Reuses variables.css tokens + style.css components.
   Brand red stays primary; muted "vibe tints" only color-code vibes.
   ===================================================================== */

:root {
  /* muted vibe-tint accents (used only on vibe pills/cards/territories) */
  --vibe-teal:  #45c2ad;  --vibe-teal-bg:  rgba(69, 194, 173, 0.10);  --vibe-teal-bd:  rgba(69, 194, 173, 0.30);
  --vibe-amber: #d99a3c;  --vibe-amber-bg: rgba(217, 154, 60, 0.10);  --vibe-amber-bd: rgba(217, 154, 60, 0.30);
  --vibe-blue:  #6aa6e6;  --vibe-blue-bg:  rgba(106, 166, 230, 0.10); --vibe-blue-bd:  rgba(106, 166, 230, 0.30);
  --vibe-pink:  #df7ca2;  --vibe-pink-bg:  rgba(223, 124, 162, 0.10); --vibe-pink-bd:  rgba(223, 124, 162, 0.30);
  --vibe-green: #5cc98a;  --vibe-green-bg: rgba(92, 201, 138, 0.10);  --vibe-green-bd: rgba(92, 201, 138, 0.30);
  /* --surface / --surface-2 now live in variables.css (shared across all pages) */
}

/* ---------------------------------------------------------- layout
   One centered, capped content column gives every Qaplist page the same
   rhythm and alignment. Sections share a consistent 48px vertical gap. */
.qap-main { padding-top: calc(var(--header-h) + var(--sp-2)); }
.qap-container { width: 100%; max-width: 1320px; margin-inline: auto; padding: 0 var(--gutter); }
.qap-section { padding: var(--sp-6) 0; }   /* adjacent sections → consistent 48px rhythm */
.qap-section:last-child { padding-bottom: var(--sp-12); }
.qap-narrow { max-width: 900px; }          /* reading-width column for forms / dense lists */

.qsection-head { margin-bottom: var(--sp-4); }
.qsection-head .eyebrow {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-dim); margin-bottom: 0.35rem;
}
.qsection-head h1,
.qsection-head h2 {
  margin: 0; font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: var(--fs-row-title); color: #fff;
}
.qsection-head .sub { margin: 0.35rem 0 0; color: var(--ink-muted); max-width: 70ch; }
.qsection-head.with-link { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); }
.qlink { color: var(--ink-muted); font-family: var(--font-display); font-weight: 600; white-space: nowrap; }
.qlink:hover { color: var(--accent); }

/* ---------------------------------------------------------- sub-nav */
.qap-subnav {
  display: flex; align-items: center; gap: var(--sp-6);
  max-width: 1320px; margin-inline: auto;
  padding: var(--sp-3) var(--gutter);
  border-bottom: 1px solid var(--border-faint);
  overflow-x: auto; white-space: nowrap;
}
.qap-subnav a {
  position: relative; padding: 0.4rem 0;
  font-family: var(--font-display); font-weight: 700; color: var(--ink-muted);
  transition: var(--t-fast);
}
.qap-subnav a:hover { color: #fff; }
.qap-subnav a.active { color: #fff; }
.qap-subnav a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: calc(-1 * var(--sp-3) - 1px);
  height: 3px; background: var(--accent);
}
.qap-subnav .spacer { margin-left: auto; }

/* ---------------------------------------------------------- buttons */
.btn-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.6rem 1.4rem; border-radius: 999px; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 0.9rem;
  border: 1px solid transparent; transition: var(--t-fast); white-space: nowrap;
}
.btn-pill .material-symbols-outlined { font-size: 1.15rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #c20712; color: #fff; }
.btn-ghost { background: var(--surface-2); color: var(--ink); border-color: var(--border-faint); }
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); }

/* follow toggle */
.btn-follow.is-following { background: transparent; color: var(--ink-muted); border-color: var(--border-line); }
.btn-follow.is-following::after { content: 'Following'; }
.btn-follow:not(.is-following)::after { content: 'Follow'; }
.btn-follow .label { display: none; }

/* like / dislike */
.ql-vote { display: inline-flex; gap: var(--sp-2); }
.ql-vote button {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.45rem 0.9rem; border-radius: 999px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border-faint); color: var(--ink-muted);
  font-weight: 600; font-size: 0.85rem; transition: var(--t-fast);
}
.ql-vote button .material-symbols-outlined { font-size: 1.1rem; }
.ql-vote .up.is-on { color: var(--vibe-green); border-color: var(--vibe-green-bd); background: var(--vibe-green-bg); }
.ql-vote .down.is-on { color: var(--accent); border-color: var(--accent); background: rgba(229, 8, 21, 0.08); }
.ql-vote button:hover { color: #fff; }

/* ---------------------------------------------------------- avatars / curator */
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 0.85rem;
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--border-faint);
}
.avatar--sm { width: 30px; height: 30px; font-size: 0.72rem; }
.avatar--lg { width: 92px; height: 92px; font-size: 1.8rem; }
.avatar.tint-teal  { background: var(--vibe-teal-bg);  color: var(--vibe-teal);  border-color: var(--vibe-teal-bd); }
.avatar.tint-amber { background: var(--vibe-amber-bg); color: var(--vibe-amber); border-color: var(--vibe-amber-bd); }
.avatar.tint-blue  { background: var(--vibe-blue-bg);  color: var(--vibe-blue);  border-color: var(--vibe-blue-bd); }
.avatar.tint-pink  { background: var(--vibe-pink-bg);  color: var(--vibe-pink);  border-color: var(--vibe-pink-bd); }
.avatar.tint-green { background: var(--vibe-green-bg); color: var(--vibe-green); border-color: var(--vibe-green-bd); }
.avatar.tint-red   { background: rgba(229,8,21,0.10);  color: var(--accent);     border-color: rgba(229,8,21,0.3); }

.curator { display: inline-flex; align-items: center; gap: 0.6rem; }
.curator .meta .name { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 0.9rem; }
.curator .meta .sub { color: var(--ink-dim); font-size: 0.78rem; }

/* ---------------------------------------------------------- vibe pills */
.vibe-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.9rem; border-radius: 999px;
  font-size: 0.85rem; font-style: italic;
  color: var(--ink-muted); background: var(--surface); border: 1px solid var(--border-faint);
  transition: var(--t-fast); cursor: pointer; white-space: nowrap;
}
.vibe-pill:hover { color: #fff; border-color: var(--border-line); }
.vibe-pill.active { color: #fff; background: rgba(229,8,21,0.12); border-color: var(--accent); }
.vibe-pill.teal  { color: var(--vibe-teal);  background: var(--vibe-teal-bg);  border-color: var(--vibe-teal-bd); }
.vibe-pill.amber { color: var(--vibe-amber); background: var(--vibe-amber-bg); border-color: var(--vibe-amber-bd); }
.vibe-pill.blue  { color: var(--vibe-blue);  background: var(--vibe-blue-bg);  border-color: var(--vibe-blue-bd); }
.vibe-pill.pink  { color: var(--vibe-pink);  background: var(--vibe-pink-bg);  border-color: var(--vibe-pink-bd); }
.vibe-pill.green { color: var(--vibe-green); background: var(--vibe-green-bg); border-color: var(--vibe-green-bd); }

/* ---------------------------------------------------------- generic card / stats */
.qcard {
  background: var(--surface); border: 1px solid var(--border-faint);
  border-radius: var(--radius-panel); padding: var(--sp-5);
}
.qstats { display: flex; gap: var(--sp-6); flex-wrap: wrap; }
.qstat .num { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 1.4rem; color: #fff; line-height: 1; }
.qstat .lbl { color: var(--ink-dim); font-size: 0.78rem; margin-top: 0.2rem; }

/* ---------------------------------------------------------- hero band */
.qap-hero { padding: var(--sp-12) 0 var(--sp-6); border-bottom: 1px solid var(--border-faint); position: relative; overflow: hidden; }
.qap-hero::before {
  content: ''; position: absolute; top: -120px; right: -80px; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(229,8,21,0.10) 0%, transparent 70%); pointer-events: none;
}
.qap-hero .eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.6rem; }
.qap-hero h1 { margin: 0 0 0.6rem; font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 4vw, 3rem); color: #fff; letter-spacing: -0.01em; }
.qap-hero p { margin: 0 0 var(--sp-4); color: var(--ink-muted); max-width: 60ch; font-size: 1.05rem; }
.qap-hero .hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

/* ---------------------------------------------------------- live vibe feed */
.vibe-feed { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.vibe-feed-item {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 1rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border-faint); color: var(--ink);
  font-size: 0.85rem;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(229,8,21,0.5); animation: livepulse 2s infinite; flex: 0 0 auto; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(229,8,21,0.5);} 70% { box-shadow: 0 0 0 7px rgba(229,8,21,0);} 100% { box-shadow: 0 0 0 0 rgba(229,8,21,0);} }
.vibe-feed-item strong { color: #fff; }

/* ---------------------------------------------------------- vibe territory cards */
.vibe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--sp-4); }
.vibe-card {
  position: relative; display: block; padding: var(--sp-5); padding-left: calc(var(--sp-5) + 4px);
  background: var(--surface); border: 1px solid var(--border-faint);
  border-radius: var(--radius-panel); overflow: hidden; transition: var(--t-base);
}
.vibe-card:hover { background: var(--surface-2); border-color: var(--border-line); transform: translateY(-2px); }
.vibe-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ink-dim); }
.vibe-card.teal::before  { background: var(--vibe-teal); }
.vibe-card.amber::before { background: var(--vibe-amber); }
.vibe-card.blue::before  { background: var(--vibe-blue); }
.vibe-card.pink::before  { background: var(--vibe-pink); }
.vibe-card.green::before { background: var(--vibe-green); }
.vibe-card.red::before   { background: var(--accent); }
.vibe-card .vc-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: #fff; font-style: italic; margin-bottom: 0.5rem; }
.vibe-card .vc-meta { display: flex; gap: var(--sp-4); color: var(--ink-dim); font-size: 0.8rem; }
.vibe-card .vc-meta b { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------- qaplist (list) cards */
.qlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp-5); }
.qlist-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border-faint);
  border-radius: var(--radius-panel); transition: var(--t-base);
}
.qlist-card:hover { border-color: var(--border-line); transform: translateY(-2px); }
.qlist-cover { position: relative; aspect-ratio: 3 / 2; overflow: hidden; }
.qlist-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qlist-cover .scrim { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.15) 55%, transparent 100%); }
.qlist-cover .vibe-name {
  position: absolute; left: var(--sp-4); right: var(--sp-4); bottom: var(--sp-3);
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: #fff; font-style: italic;
}
.qlist-cover .visibility {
  position: absolute; top: var(--sp-3); right: var(--sp-3);
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.7rem; font-weight: 600;
  background: rgba(0,0,0,0.6); color: var(--ink); border: 1px solid var(--border-faint); backdrop-filter: blur(4px);
}
.qlist-cover .visibility .material-symbols-outlined { font-size: 0.9rem; }
.qlist-body { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3); flex: 1; }
.qlist-platforms { display: flex; gap: 0.3rem; }
.plat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-dim); }
.qlist-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.qlist-score { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--ink-muted); font-size: 0.82rem; }
.qlist-score .material-symbols-outlined { font-size: 1rem; color: var(--vibe-green); }

/* ---------------------------------------------------------- resonance wall */
.resonance-input { display: flex; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.resonance-input input {
  flex: 1; padding: 0.8rem 1.1rem; border-radius: 999px;
  background: var(--bg); color: var(--ink); border: 1px solid var(--border-line); font-size: 0.95rem;
}
.resonance-input input::placeholder { color: var(--ink-muted); }
.resonance-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.resonance-item {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  padding: var(--sp-4); background: var(--surface); border: 1px solid var(--border-faint); border-radius: var(--radius-card);
}
.resonance-item .phrase { color: #fff; font-style: italic; font-size: 1rem; margin-bottom: 0.25rem; }
.resonance-item .who { color: var(--ink-dim); font-size: 0.78rem; }

/* ---------------------------------------------------------- title rows (list contents) — reuses .cm-episode look */
.qtitle-row { display: flex; align-items: flex-start; gap: var(--sp-4); padding: var(--sp-4) 0; border-bottom: 1px solid var(--border-faint); }
.qtitle-row:last-child { border-bottom: 0; }
.qtitle-handle { color: var(--ink-dim); cursor: grab; padding-top: 0.4rem; }
.qtitle-poster { flex: 0 0 132px; width: 132px; aspect-ratio: 16/9; height: auto; object-fit: cover; border-radius: var(--radius-card); }
.qtitle-body { flex: 1; min-width: 0; }
.qtitle-head { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.qtitle-head h3 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: #fff; }
.plat-badge { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.12rem 0.45rem; border-radius: 4px; border: 1px solid var(--border-faint); color: var(--ink-muted); background: var(--surface-2); }
.qtitle-meta { color: var(--ink-dim); font-size: 0.82rem; margin: 0.15rem 0 0.4rem; }
.qtitle-note { color: var(--ink-muted); font-size: 0.9rem; font-style: italic; }
.qtitle-note .material-symbols-outlined { font-size: 1rem; vertical-align: middle; color: var(--ink-dim); }
.qtitle-actions { display: flex; gap: 0.4rem; align-items: center; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--border-faint); color: var(--ink-muted); cursor: pointer; transition: var(--t-fast); }
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }

/* ---------------------------------------------------------- AI completion suggestions */
.ai-suggest { background: linear-gradient(135deg, rgba(229,8,21,0.06), rgba(33,109,107,0.05)); border: 1px solid rgba(229,8,21,0.2); border-radius: var(--radius-panel); padding: var(--sp-5); }
.ai-suggest .ai-label { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--accent); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: var(--sp-3); }
.ai-suggest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--sp-4); }
.ai-sg-card { background: var(--bg); border: 1px solid var(--border-faint); border-radius: var(--radius-card); overflow: hidden; }
.ai-sg-card img { width: 100%; aspect-ratio: 16/9; height: auto; object-fit: cover; display: block; }
.ai-sg-body { padding: var(--sp-3); }
.ai-sg-body h4 { margin: 0 0 0.15rem; font-family: var(--font-display); font-weight: 700; font-size: 0.92rem; color: #fff; }
.ai-sg-body .m { color: var(--ink-dim); font-size: 0.75rem; margin-bottom: var(--sp-3); }
.ai-sg-actions { display: flex; gap: 0.4rem; }
.ai-sg-actions .btn-pill { padding: 0.35rem 0.8rem; font-size: 0.78rem; }

/* ---------------------------------------------------------- collision callout */
.collision { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5); border-radius: var(--radius-panel); background: var(--vibe-blue-bg); border: 1px solid var(--vibe-blue-bd); }
.collision .material-symbols-outlined { font-size: 1.8rem; color: var(--vibe-blue); }
.collision .c-text { flex: 1; color: var(--ink); }
.collision .c-text b { color: #fff; }

/* ---------------------------------------------------------- leaderboard */
.lb-podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); margin-bottom: var(--sp-5); }
.lb-pod { text-align: center; padding: var(--sp-5) var(--sp-4); background: var(--surface); border: 1px solid var(--border-faint); border-radius: var(--radius-panel); }
.lb-pod .rank { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; }
.lb-pod.gold .rank { color: #f5c451; } .lb-pod.silver .rank { color: #c9ccd6; } .lb-pod.bronze .rank { color: #cd8e5b; }
.lb-pod .avatar { margin: var(--sp-3) auto; }
.lb-pod .name { font-family: var(--font-display); font-weight: 700; color: #fff; }
.lb-pod .score { color: var(--accent); font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin-top: 0.3rem; }
.lb-pod .score span { display: block; color: var(--ink-dim); font-size: 0.72rem; font-weight: 400; }

.leaderboard { display: flex; flex-direction: column; gap: var(--sp-3); }
.lb-row { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-3) var(--sp-4); background: var(--surface); border: 1px solid var(--border-faint); border-radius: var(--radius-card); transition: var(--t-fast); }
.lb-row:hover { border-color: var(--border-line); }
.lb-rank { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--ink-dim); min-width: 28px; text-align: center; }
.lb-info { flex: 1; min-width: 0; }
.lb-info .name { font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.lb-info .meta { color: var(--ink-dim); font-size: 0.78rem; }
.lb-score { text-align: right; font-family: var(--font-display); font-weight: 700; color: var(--accent); }
.lb-score span { display: block; color: var(--ink-dim); font-size: 0.7rem; font-weight: 400; }

/* ---------------------------------------------------------- top chart rows */
.qchart { display: flex; flex-direction: column; gap: var(--sp-2); }
.qchart-row { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-3) var(--sp-4); background: var(--surface); border: 1px solid var(--border-faint); border-radius: var(--radius-card); transition: var(--t-fast); }
.qchart-row:hover { border-color: var(--border-line); }
.qc-rank { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--ink-dim); min-width: 24px; text-align: center; }
.qc-rank.top { color: var(--vibe-amber); }
.qc-poster { flex: 0 0 44px; width: 44px; aspect-ratio: 2/3; height: auto; object-fit: cover; border-radius: 4px; }
.qc-info { flex: 1; min-width: 0; }
.qc-info .t { font-family: var(--font-display); font-weight: 700; color: #fff; font-size: 0.95rem; }
.qc-info .m { color: var(--ink-dim); font-size: 0.78rem; }
.qc-score { color: var(--vibe-green); font-weight: 700; white-space: nowrap; }

/* ---------------------------------------------------------- profile header */
.qprofile-header { display: flex; gap: var(--sp-6); align-items: center; flex-wrap: wrap; padding: var(--sp-6) 0; }
.qprofile-id { flex: 1; min-width: 240px; }
.qprofile-id h1 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: #fff; }
.qprofile-id .handle { color: var(--ink-dim); }
.qprofile-id .bio { color: var(--ink-muted); margin: var(--sp-3) 0; max-width: 60ch; }
.rank-badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.7rem; border-radius: 999px; background: rgba(245,196,81,0.1); border: 1px solid rgba(245,196,81,0.3); color: #f5c451; font-size: 0.78rem; font-weight: 700; }

/* ---------------------------------------------------------- create form */
.create-step { margin-bottom: var(--sp-6); }
.create-step .step-label { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-display); font-weight: 700; color: #fff; font-size: 1.1rem; margin-bottom: var(--sp-3); }
.create-step .step-num { width: 26px; height: 26px; border-radius: 50%; background: rgba(229,8,21,0.12); color: var(--accent); border: 1px solid rgba(229,8,21,0.3); display: inline-flex; align-items: center; justify-content: center; font-size: 0.85rem; }
.vibe-name-input { width: 100%; padding: 1rem 1.2rem; font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; background: var(--bg); color: #fff; border: 1px solid var(--border-line); border-radius: var(--radius-card); }
.vibe-name-input::placeholder { color: var(--ink-dim); font-style: italic; }
.example-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: var(--sp-3); }
.cover-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--sp-3); }
.cover-tile { aspect-ratio: 3/2; border-radius: var(--radius-card); overflow: hidden; cursor: pointer; border: 2px solid transparent; }
.cover-tile img { width: 100%; height: 100%; object-fit: cover; }
.cover-tile.selected { border-color: var(--accent); }
.cover-tile.upload { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 0.3rem; background: var(--surface); border: 2px dashed var(--border-line); color: var(--ink-muted); font-size: 0.8rem; }
.add-search { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center; margin-bottom: var(--sp-3); }
.add-search input { flex: 1; min-width: 200px; padding: 0.7rem 1rem; background: var(--bg); color: var(--ink); border: 1px solid var(--border-line); border-radius: var(--radius-card); }
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-3); }
.result-card { position: relative; border: 1px solid var(--border-faint); border-radius: var(--radius-card); overflow: hidden; background: var(--bg); }
.result-card img { width: 100%; aspect-ratio: 16/9; height: auto; object-fit: cover; display: block; }
.result-card .rc-body { padding: var(--sp-2) var(--sp-3); }
.result-card .rc-body .t { font-weight: 600; font-size: 0.85rem; color: var(--ink); }
.result-card .rc-add { position: absolute; top: 0.4rem; right: 0.4rem; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; border: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.visibility-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-3); }
.vis-opt { display: flex; gap: var(--sp-3); padding: var(--sp-4); border: 1px solid var(--border-faint); border-radius: var(--radius-card); cursor: pointer; background: var(--surface); }
.vis-opt.selected { border-color: var(--accent); background: rgba(229,8,21,0.06); }
.vis-opt .material-symbols-outlined { color: var(--ink-muted); }
.vis-opt.selected .material-symbols-outlined { color: var(--accent); }
.vis-opt .t { font-weight: 700; color: #fff; font-size: 0.92rem; }
.vis-opt .d { color: var(--ink-dim); font-size: 0.78rem; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-4); border: 1px solid var(--border-faint); border-radius: var(--radius-card); margin-top: var(--sp-3); }
.switch { width: 46px; height: 26px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-faint); position: relative; cursor: pointer; flex: 0 0 auto; transition: var(--t-fast); }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink-muted); transition: var(--t-fast); }
.switch.on { background: var(--accent); border-color: var(--accent); }
.switch.on::after { left: 22px; background: #fff; }

/* ---------------------------------------------------------- vibe hero (territory) */
.vibe-hero { padding: calc(var(--header-h) + var(--sp-6)) 0 var(--sp-6); position: relative; overflow: hidden; border-bottom: 1px solid var(--border-faint); }
.vibe-hero .eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.6rem; }
.vibe-hero h1 { margin: 0 0 0.6rem; font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 5vw, 3.4rem); color: #fff; font-style: italic; }
.vibe-hero .live { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--ink-muted); margin-bottom: var(--sp-4); }
.vibe-hero.teal::before, .vibe-hero.amber::before, .vibe-hero.blue::before, .vibe-hero.pink::before, .vibe-hero.green::before {
  content: ''; position: absolute; top: -140px; right: -100px; width: 460px; height: 460px; pointer-events: none;
}
.vibe-hero.teal::before  { background: radial-gradient(circle, var(--vibe-teal-bg) 0%, transparent 70%); }
.vibe-hero.amber::before { background: radial-gradient(circle, var(--vibe-amber-bg) 0%, transparent 70%); }
.vibe-hero.blue::before  { background: radial-gradient(circle, var(--vibe-blue-bg) 0%, transparent 70%); }
.vibe-hero.pink::before  { background: radial-gradient(circle, var(--vibe-pink-bg) 0%, transparent 70%); }
.vibe-hero.green::before { background: radial-gradient(circle, var(--vibe-green-bg) 0%, transparent 70%); }

/* ---------------------------------------------------------- list detail hero */
.qd-hero { position: relative; width: 100%; min-height: 56vh; display: flex; align-items: flex-end; overflow: hidden; }
.qd-hero .bg { position: absolute; inset: 0; }
.qd-hero .bg img { width: 100%; height: 100%; object-fit: cover; }
.qd-hero .scrim { position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg) 4%, rgba(17,17,17,0.5) 40%, transparent 80%), linear-gradient(90deg, rgba(17,17,17,0.7), transparent 60%); }
.qd-hero .qd-inner { position: relative; z-index: 2; width: 100%; padding: 0 0 var(--sp-6); }
.qd-hero .eyebrow { color: var(--accent); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; }
.qd-hero h1 { margin: 0.4rem 0 var(--sp-3); font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 4.5vw, 3.2rem); color: #fff; font-style: italic; }
.qd-byline { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.qd-actions { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.25rem 0.7rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; color: var(--ink-muted); background: var(--surface-2); border: 1px solid var(--border-faint);
}
.badge .material-symbols-outlined { font-size: 0.95rem; }

/* ---------------------------------------------------------- responsive */
@media (max-width: 991.98px) {
  .lb-podium { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
  .qd-hero { min-height: 60vh; }
  .qprofile-header { gap: var(--sp-4); }
  .resonance-input { flex-direction: column; }
  .resonance-input .btn-pill { width: 100%; justify-content: center; }
  .qtitle-poster { flex-basis: 104px; width: 104px; }
}

/* =====================================================================
   Layout-system refactor — classes that replace all inline styles and
   enforce consistent rhythm, alignment and card heights.
   ===================================================================== */

/* equal-height cards in every grid */
.vibe-grid, .qlist-grid, .entry-cards { align-items: stretch; }
.vibe-card, .qlist-card, .entry-card { height: 100%; }

/* smaller section heading variant (subsection titles) */
.qsection-head.sm h1, .qsection-head.sm h2 { font-size: 1.15rem; }

/* default copy inside the AI / feature band (was inline) */
.ai-suggest p { color: var(--ink-muted); max-width: 72ch; margin: 0 0 var(--sp-4); }

/* discover entry cards (leaderboard / charts shortcuts) */
.entry-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--sp-4); }
.entry-card { display: block; }
.entry-card:hover { border-color: var(--border-line); background: var(--surface-2); }
.entry-card .head {
  display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: #fff;
}
.entry-card .head .material-symbols-outlined { color: var(--accent); }
.entry-card p { margin: 0; color: var(--ink-muted); }

/* my-qaplist profile strip */
.qprofile-strip { display: flex; align-items: center; gap: var(--sp-5); flex-wrap: wrap; }
.qprofile-strip .info { flex: 1; min-width: 220px; }
.qprofile-strip h1 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: #fff; }
.qprofile-strip .handle { color: var(--ink-dim); }
.qprofile-strip .qstats { margin-top: var(--sp-3); }

/* in-page tabs (distinct from the top sub-nav) */
.qtabs { display: flex; gap: var(--sp-5); border-bottom: 1px solid var(--border-faint); overflow-x: auto; white-space: nowrap; }
.qtabs a { position: relative; padding: 0 0 var(--sp-3); font-family: var(--font-display); font-weight: 700; color: var(--ink-muted); transition: var(--t-fast); cursor: pointer; }
.qtabs a:hover { color: #fff; }
.qtabs a.active { color: #fff; }
.qtabs a.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--accent); }
.qtab-panels { margin-top: var(--sp-5); }

/* empty state */
.empty-state { text-align: center; color: var(--ink-muted); padding: var(--sp-6); }
.empty-state .ico-lg { font-size: 2.6rem; color: var(--ink-dim); }
.empty-state p { margin: 0.5rem 0 1rem; }

/* per-title note input on create */
.note-input { width: 100%; margin-top: 0.4rem; padding: 0.5rem 0.8rem; background: var(--bg); color: var(--ink); border: 1px solid var(--border-faint); border-radius: var(--radius-card); font-size: 0.85rem; }
.note-input::placeholder { color: var(--ink-dim); }

/* create action row + switch text */
.create-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.switch-row .t { font-weight: 700; color: #fff; }
.switch-row .d { color: var(--ink-dim); font-size: 0.82rem; }
.switch-row .switch-label { flex: 1; }

/* horizontal people rows (who's building / same orbit) */
.people-row { display: flex; gap: var(--sp-5); flex-wrap: wrap; }

/* charts vibe selector */
.vibe-select { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* vibe-hero eyebrow tint matches the territory colour */
.vibe-hero.teal  .eyebrow { color: var(--vibe-teal); }
.vibe-hero.amber .eyebrow { color: var(--vibe-amber); }
.vibe-hero.blue  .eyebrow { color: var(--vibe-blue); }
.vibe-hero.pink  .eyebrow { color: var(--vibe-pink); }
.vibe-hero.green .eyebrow { color: var(--vibe-green); }

/* the detail hero already caps inner content via .qap-container */

/* small helpers referenced by the pages (keep markup class-only) */
.sub { color: var(--ink-muted); }
.text-muted-2 { color: var(--ink-muted); }
.qd-create-title { font-family: var(--font-display); font-weight: 800; color: #fff; margin: 0; }
.lb-pod .name-link { color: #fff; }
.lb-pod .name-link:hover { color: var(--accent); }
