/* scales-skin.css — Scales & Chords specifics on the shared cosmic base
   (chord-styles.css supplies .bg / .rail / .shell / .mz-topbar / .mz-hero /
   .card). Tokens all come from the shared theme. */

/* ── Shell: body ~80% width with side gaps + rail gutter ─────────────────── */
/* Shell geometry matches VR's .shell EXACTLY (1080px column, rail-offset 92). */
.sc-shell { width: min(100%, 1080px); margin: 0 auto; padding: 22px 24px 80px 92px; }
@media (max-width: 760px) { .sc-shell { width: auto; padding: 16px 16px 56px; padding-left: 72px; } }

/* ── Tabs ────────────────────────────────────────────────────────────────── */
.sc-tabs {
  display: inline-flex; gap: 5px; padding: 5px; margin: 0 auto 24px;
  border-radius: 14px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.sc-tab {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  padding: 11px 26px; border: 0; border-radius: 10px; background: transparent;
  color: var(--sub); font-family: var(--font-body); font-weight: 600; font-size: 14.5px;
  transition: color .18s ease, background .18s ease;
}
.sc-tab:hover { color: var(--ink); }
.sc-tab.active { color: var(--accent-ink, #fff); background: var(--cta, linear-gradient(135deg, var(--accent2), var(--accent)));
  box-shadow: 0 10px 26px -12px color-mix(in srgb, var(--accent) 70%, transparent); }
@media (max-width: 560px) { .sc-tabs { display: flex; } .sc-tab { flex: 1; justify-content: center; padding: 11px 12px; } }

/* the tabs row should center under the hero */
.sc-shell { display: flex; flex-direction: column; align-items: center; }
.sc-shell > .mz-topbar, .sc-shell > .mz-hero, .sc-shell > .sc-panel,
.sc-shell > #mz-ad-slot, .sc-shell > #mz-ad-slot-2, .sc-shell > .foot { width: 100%; }
/* flex-column won't collapse margins; topbar's 30px margin-bottom is the gap to the hero */
.sc-shell > .mz-hero { margin-top: 0 !important; }

/* ── Panel + card ────────────────────────────────────────────────────────── */
.sc-panel { width: 100%; }
.sc-card { padding: 30px 32px 34px; }
@media (max-width: 600px) { .sc-card { padding: 22px 18px 26px; } }

/* ── Controls: symmetric 2×2 grid (was an uneven flex row) ───────────────── */
.sc-controls {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px;
  max-width: 760px; margin: 0 auto;
}
@media (max-width: 600px) { .sc-controls { grid-template-columns: 1fr; } }
.sc-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sc-field-label { font-family: var(--font-body); font-weight: 600; font-size: 13px; color: var(--ink); }
.sc-select-wrap { position: relative; }
.sc-select-wrap::after {
  content: ""; position: absolute; right: 15px; top: 50%; width: 9px; height: 9px;
  transform: translateY(-65%) rotate(45deg); pointer-events: none;
  border-right: 2px solid var(--sub); border-bottom: 2px solid var(--sub);
}
.sc-select {
  width: 100%; height: 48px; padding: 0 38px 0 15px;
  appearance: none; -webkit-appearance: none;
  border: 1px solid var(--line-strong, var(--line)); border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 42%, transparent);
  color: var(--ink); font-family: var(--font-body); font-size: 14.5px; font-weight: 500;
  cursor: pointer; outline: none; transition: border-color .18s ease, box-shadow .18s ease;
}
.sc-select:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.sc-select:focus { border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.sc-select option { color: #111; background: #fff; }

/* ── Play action ─────────────────────────────────────────────────────────── */
.sc-actions { display: flex; justify-content: center; margin-top: 22px; }
.sc-play {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  height: 50px; padding: 0 30px; border: 0; border-radius: 13px;
  font-family: var(--font-body); font-weight: 700; font-size: 14.5px; letter-spacing: .03em; text-transform: uppercase;
  color: var(--accent-ink, #fff); background: var(--cta, linear-gradient(135deg, var(--accent2), var(--accent)));
  box-shadow: var(--cta-glow, 0 16px 38px -14px rgba(0,0,0,.4));
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}
.sc-play:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.05); }
.sc-play:active:not(:disabled) { transform: translateY(0); }
.sc-play:disabled { opacity: .65; cursor: default; }

/* ── Title ───────────────────────────────────────────────────────────────── */
.sc-title {
  margin: 30px 0 22px; text-align: center;
  font-family: var(--font-display, var(--font-body)); font-weight: 700;
  font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; color: var(--ink);
}

/* ── Notation panel (Verovio renders dark SVG → keep it on white paper) ───── */
.sc-notation {
  background: #fff; border-radius: 14px; padding: 28px 24px; min-height: 180px;
  border: 1px solid var(--line); text-align: center;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.sc-notation svg { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.sc-loading { display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 180px; color: var(--sub); font-family: var(--font-body); font-size: 14.5px;
  background: color-mix(in srgb, var(--surface) 50%, transparent); border: 1px solid var(--line); border-radius: 14px; }
.sc-spin { display: grid; place-items: center; color: var(--accent); animation: sc-spin 1s linear infinite; }
@keyframes sc-spin { to { transform: rotate(360deg); } }
.sc-error { color: #e0445a; font-family: var(--font-body); font-size: 14.5px; }

/* ── Real-time playback highlight (notation staff only) ──────────────────────
   The note currently sounding is recoloured to --sc-note-hi, set per-render by
   scales-app.jsx to the active theme accent (Mono falls back to the Nebula accent
   since its grayscale accent is invisible on the white staff). A plain CSS `fill`
   overrides Verovio's presentation-attribute fills, so the notehead + stem recolour
   cleanly; the !important guards against any inline fill Verovio may emit. */
.sc-notation g.note { transition: fill .12s ease, stroke .12s ease; }
.sc-notation g.note.sc-playing,
.sc-notation g.note.sc-playing * {
  fill: var(--sc-note-hi, var(--accent)) !important;
  stroke: var(--sc-note-hi, var(--accent)) !important;
}

/* ── Note chips ──────────────────────────────────────────────────────────── */
.sc-info {
  margin-top: 24px; padding: 20px 22px; border-radius: 14px;
  background: color-mix(in srgb, var(--ink) 5%, transparent); border: 1px solid var(--line);
}
.sc-info-h { margin: 0 0 14px; font-family: var(--font-body); font-weight: 600; font-size: 14px;
  letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.sc-notes { display: flex; gap: 10px; flex-wrap: wrap; }
.sc-note {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 46px; padding: 9px 14px; border-radius: 11px;
  color: var(--accent-ink, #fff); background: var(--cta, linear-gradient(135deg, var(--accent2), var(--accent)));
  font-family: var(--font-display, var(--font-body)); font-weight: 600; font-size: 16px;
  box-shadow: 0 8px 20px -12px color-mix(in srgb, var(--accent) 80%, transparent);
}
