/* chordresult-skin.css — single-song-only additions on top of the shared cosmic
   base (css/chord-styles.css): access wall, premium locks, the real wavesurfer
   mixer extras, and See-Also thumbnails. The listing page (chordanalyzer-library)
   does NOT load this file, so these rules are scoped to library.php only. */

/* ── No-JS fallback message ─────────────────────────────────────────────────── */
.landing-noscript { max-width: 640px; margin: 80px auto; text-align: center;
  color: var(--sub, #ccc); font-family: var(--font-body, system-ui, sans-serif); padding: 0 20px; }

/* ── See-Also real thumbnails ───────────────────────────────────────────────── */
.sa-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sa-thumb .play { position: relative; z-index: 1; }

/* ── Mixer toggle header (button styled like a card-h) ──────────────────────── */
.cr-mixer-toggle { appearance: none; border: 0; background: transparent; cursor: pointer; color: var(--ink);
  display: inline-flex; align-items: center; gap: 10px; padding: 0; }
.cr-chev { display: inline-grid; place-items: center; color: var(--sub); transition: transform .2s ease; }
.cr-chev.up { transform: rotate(180deg); }

/* ── Mixer: loading + waveform + per-stem buttons ───────────────────────────── */
.cr-mixer-loading { margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 12px;
  color: var(--sub); font-size: 13.5px; }
.cr-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong);
  border-top-color: var(--accent); animation: cr-spin .8s linear infinite; }
@keyframes cr-spin { to { transform: rotate(360deg); } }

.stem-wave { width: 100%; height: 46px; margin: 4px 0 12px; border-radius: 8px; overflow: hidden;
  background: color-mix(in srgb, var(--ink) 6%, transparent); }
.cr-stem-btns { display: inline-flex; align-items: center; gap: 6px; }
.cr-stem-btn { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--sub); cursor: pointer; display: grid; place-items: center;
  font: inherit; font-size: 12px; font-weight: 700; transition: .14s; }
.cr-stem-btn:hover { color: var(--accent); border-color: var(--accent-line); }
.cr-stem-btn.on { color: #fff; background: var(--cta); border-color: transparent; }
.cr-stem-btn svg { width: 14px; height: 14px; }

/* ── Premium lock affordance on controls ────────────────────────────────────── */
.ctl.cr-locked { position: relative; }
.ctl.cr-locked .ctl-lbl svg:last-child { color: var(--accent); opacity: .9; }
.ctl.cr-locked .ctl-val,
.ctl.cr-locked .ctl-stepper,
.ctl.cr-locked .ctl-toggle { opacity: .6; }
.view-tab svg + svg { margin-left: 2px; color: var(--accent); }

/* ── Access wall overlay ────────────────────────────────────────────────────── */
.cr-wall { position: fixed; inset: 0; z-index: 7500; display: grid; place-items: center; padding: 24px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.cr-wall-card { width: min(440px, 100%); text-align: center; padding: 38px 30px; border-radius: 22px;
  background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-pop);
  animation: toast-in .3s ease; }
.cr-wall-icon { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 18px; display: grid; place-items: center;
  color: #fff; background: var(--cta); box-shadow: var(--cta-glow); }
.cr-wall-card h2 { margin: 0 0 10px; font-family: var(--font-display); font-style: var(--display-style);
  font-size: 26px; font-weight: 600; color: var(--ink); }
.cr-wall-card p { margin: 0 0 24px; color: var(--sub); font-size: 14.5px; line-height: 1.6; }
.cr-wall-btn { display: block; width: 100%; padding: 13px 20px; border-radius: 12px; font: inherit;
  font-weight: 600; font-size: 14.5px; cursor: pointer; text-decoration: none; margin-bottom: 10px; border: 1px solid transparent; }
.cr-wall-btn.primary { color: #fff; background: var(--cta); box-shadow: var(--cta-glow); }
.cr-wall-btn.primary:hover { filter: brightness(1.08); }
.cr-wall-btn.ghost { color: var(--ink); background: transparent; border-color: var(--line-strong); }
.cr-wall-btn.ghost:hover { border-color: var(--accent-line); }

/* ── Upgrade modal centring ─────────────────────────────────────────────────── */
.modal.cr-upgrade { width: min(440px, 100%); }
.modal.cr-upgrade .cr-wall-icon { width: 56px; height: 56px; }

/* ── Mobile ─────────────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .cr-wall-card { padding: 30px 22px; }
  .mixer-stems { grid-template-columns: 1fr; }

  /* The 4 progression-view tabs must never push the page wider than the viewport.
     Stack the header and let the tab bar scroll inside its own card instead. */
  .app { overflow-x: hidden; }
  .prog-top { flex-direction: column; align-items: stretch; gap: 14px; }
  .view-switch { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .view-switch::-webkit-scrollbar { display: none; }
  .view-tab { flex: 0 0 auto; white-space: nowrap; }

  /* Diagram tabs row can also overflow on very narrow screens. */
  .diag-top { flex-wrap: wrap; gap: 10px; }
  .inst-switch { overflow-x: auto; scrollbar-width: none; }
  .inst-switch::-webkit-scrollbar { display: none; }
}
