/* static/css/articles/playable-full-score.css */

/* =========================================================
   Playable Full Score Block
   ========================================================= */

.playable-full-score {
  width: 100%;
  max-width: 100%;
  margin: 32px 0;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

/* =========================================================
   Header
   ========================================================= */

.playable-full-score__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 22px 22px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.playable-full-score__header > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.playable-full-score__title {
  margin: 0;
  color: #111827;
  font-size: 24px;
  font-weight: 850;
  line-height: 1.18;
  word-break: break-word;
}

.playable-full-score__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
  color: #64748b;
  font-size: 12px;
}

.playable-full-score__chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  padding: 3px 9px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

/* =========================================================
   Controls
   ========================================================= */

.playable-full-score__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 14px 22px;
  border-bottom: 1px solid #e5e7eb;
  background: #fbfdff;
}

.playable-full-score__btn {
  min-height: 38px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease,
    background 0.15s ease;
}

.playable-full-score__btn:hover {
  border-color: #4f46e5;
  color: #4f46e5;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.11);
}

.playable-full-score__btn:active {
  transform: translateY(1px);
}

.playable-full-score__btn.is-active,
.playable-full-score__controls .js-play-toggle {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}

.playable-full-score__btn.is-active:hover,
.playable-full-score__controls .js-play-toggle:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
}

.playable-full-score__select {
  min-height: 38px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
}

.playable-full-score__select:hover {
  border-color: #4f46e5;
  color: #4f46e5;
}

.playable-full-score__time {
  margin-left: auto;
  color: #334155;
  font-size: 13px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

/* =========================================================
   Timeline
   ========================================================= */

.playable-full-score__timeline {
  padding: 16px 22px 8px;
  background: #ffffff;
}

.playable-full-score__timeline-bar {
  position: relative;
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
  cursor: pointer;
  touch-action: manipulation;
}

.playable-full-score__timeline-bar:hover {
  background: #dbe3ef;
}

.playable-full-score__timeline-bar::after {
  content: "";
  position: absolute;
  top: -10px;
  right: 0;
  bottom: -10px;
  left: 0;
}

.playable-full-score__timeline-progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4f46e5, #06b6d4);
  transition: width 0.08s linear;
}

.playable-full-score__measure-row {
  position: relative;
  height: 28px;
  margin-top: 8px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 750;
  user-select: none;
}

.playable-full-score__measure-marker {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}

.playable-full-score__measure-marker::before {
  content: "";
  display: block;
  width: 1px;
  height: 9px;
  margin: 0 auto 4px;
  background: rgba(148, 163, 184, 0.45);
}

/* =========================================================
   Status
   ========================================================= */

.playable-full-score__status {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 8px 22px 14px;
  color: #475569;
  font-size: 13px;
}

/* =========================================================
   Piano Keyboard
   Match older playable-midi-block key style, but compact C2-C7.
   ========================================================= */

.playable-full-score__keyboard-wrap {
  width: 100%;
  padding: 0 22px 20px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #ffffff;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.playable-full-score__keyboard-wrap::-webkit-scrollbar {
  height: 8px;
}

.playable-full-score__keyboard-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.playable-full-score__keyboard-wrap::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd5e1;
}

.playable-full-score__keyboard {
  --white-key-width: 16px;
  --white-key-height: 104px;
  --black-key-width: 10px;
  --black-key-height: 66px;

  position: relative;
  display: flex;
  align-items: stretch;
  min-height: var(--white-key-height);
  width: max-content;
  min-width: max-content;
  overflow: visible;
  border: 1px solid #cbd5e1;
  border-radius: 0 0 12px 12px;
  background: #f8fafc;
}

.playable-full-score__white-key,
.playable-full-score__black-key {
  box-sizing: border-box;
  transition:
    background 0.08s ease,
    box-shadow 0.08s ease,
    transform 0.08s ease;
}

.playable-full-score__white-key {
  position: relative;
  width: var(--white-key-width);
  height: var(--white-key-height);
  border-right: 1px solid #cbd5e1;
  background: #ffffff;
  z-index: 1;
}

.playable-full-score__white-key:last-child {
  border-right: 0;
}

.playable-full-score__black-key {
  position: absolute;
  top: 0;
  width: var(--black-key-width);
  height: var(--black-key-height);
  margin-left: calc(var(--black-key-width) / -2);
  border: 1px solid #1e293b;
  border-radius: 0 0 5px 5px;
  background: #334155;
  z-index: 3;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.22);
}

.playable-full-score__key-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 750;
  text-align: center;
  pointer-events: none;
}

.playable-full-score__black-key .playable-full-score__key-label {
  display: none;
}

/* subtle bottom strip, same idea as old playable keys */
.playable-full-score__white-key::before,
.playable-full-score__black-key::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--degree-color, transparent);
}

.playable-full-score__white-key::before {
  border-radius: 0 0 7px 7px;
}

/* Active notes */
.playable-full-score__white-key.is-active-rh,
.playable-full-score__black-key.is-active-rh {
  background: #38bdf8 !important;
  box-shadow:
    0 0 0 2px rgba(15, 23, 42, 0.12),
    0 8px 22px rgba(15, 23, 42, 0.16);
  transform: translateY(2px);
}

.playable-full-score__white-key.is-active-lh,
.playable-full-score__black-key.is-active-lh {
  background: #22c55e !important;
  box-shadow:
    0 0 0 2px rgba(15, 23, 42, 0.12),
    0 8px 22px rgba(15, 23, 42, 0.16);
  transform: translateY(2px);
}

.playable-full-score__white-key.is-active-both,
.playable-full-score__black-key.is-active-both {
  background: #f59e0b !important;
  box-shadow:
    0 0 0 2px rgba(15, 23, 42, 0.12),
    0 8px 22px rgba(15, 23, 42, 0.16);
  transform: translateY(2px);
}

.playable-full-score__white-key.is-active-rh .playable-full-score__key-label,
.playable-full-score__white-key.is-active-lh .playable-full-score__key-label,
.playable-full-score__white-key.is-active-both .playable-full-score__key-label {
  opacity: 0;
}

.playable-full-score__white-key.is-active-rh::after,
.playable-full-score__white-key.is-active-lh::after,
.playable-full-score__white-key.is-active-both::after,
.playable-full-score__black-key.is-active-rh::after,
.playable-full-score__black-key.is-active-lh::after,
.playable-full-score__black-key.is-active-both::after {
  content: attr(data-pitch);
  position: absolute;
  left: 50%;
  bottom: 9px;
  z-index: 4;
  transform: translateX(-50%);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.playable-full-score__black-key.is-active-rh::after,
.playable-full-score__black-key.is-active-lh::after,
.playable-full-score__black-key.is-active-both::after {
  bottom: 10px;
  font-size: 9px;
}

/* =========================================================
   Legend
   ========================================================= */

.playable-full-score__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 22px 20px;
  color: #64748b;
  font-size: 13px;
  font-weight: 650;
}

.playable-full-score__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.playable-full-score__legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.playable-full-score__legend-dot--rh {
  background: #38bdf8;
}

.playable-full-score__legend-dot--lh {
  background: #22c55e;
}

.playable-full-score__legend-dot--both {
  background: #f59e0b;
}

/* =========================================================
   Loading / Error
   ========================================================= */

.playable-full-score__loading,
.playable-full-score__error {
  padding: 18px 20px;
  color: #64748b;
  font-size: 14px;
  font-weight: 750;
}

.playable-full-score__error {
  color: #991b1b;
  background: #fef2f2;
}

/* =========================================================
   Analysis systems / future overlay placeholders
   ========================================================= */

.playable-full-score__systems {
  padding: 0 22px 22px;
}

.playable-full-score-system {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
}

.playable-full-score-system__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.playable-full-score-system__title {
  margin: 0;
  color: #111827;
  font-size: 14px;
  font-weight: 850;
}

.playable-full-score-system__meta {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.playable-full-score-system__body {
  padding: 14px;
}

.playable-full-score-system__progression {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

.playable-full-score-system__chord {
  flex: 0 0 auto;
  min-width: 76px;
  min-height: 54px;
  border: 1px solid #e5e7eb;
  border-radius: 13px;
  background: #ffffff;
  color: #111827;
  padding: 8px 10px;
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 850;
  text-align: center;
}

.playable-full-score-system__chord span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 750;
}

.playable-full-score-system__analysis {
  margin-top: 12px;
  color: #475569;
  font-size: 14px;
  line-height: 1.7;
}

/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 768px) {
  .playable-full-score {
    margin: 26px 0;
    border-radius: 16px;
  }

  .playable-full-score__header {
    flex-direction: column;
    gap: 14px;
    padding: 18px;
  }

  .playable-full-score__title {
    font-size: 22px;
  }

  .playable-full-score__controls {
    padding: 13px 18px;
  }

  .playable-full-score__time {
    width: 100%;
    margin-left: 0;
  }

  .playable-full-score__timeline {
    padding: 14px 18px 8px;
  }

  .playable-full-score__status {
    padding: 8px 18px 14px;
  }

  .playable-full-score__keyboard-wrap {
    padding: 0 18px 18px;
  }

  .playable-full-score__keyboard {
    --white-key-width: 14px;
    --white-key-height: 96px;
    --black-key-width: 9px;
    --black-key-height: 60px;
  }

  .playable-full-score__legend {
    padding: 0 18px 18px;
  }

  .playable-full-score__key-label {
    font-size: 9px;
  }
}

/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 640px) {
  .playable-full-score {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
    margin: 22px 0 22px 50%;
    border-radius: 14px;
    transform: translateX(-50%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.055);
  }

  .playable-full-score__header {
    display: block;
    padding: 15px;
  }

  .playable-full-score__title {
    font-size: 20px;
    line-height: 1.22;
  }

  .playable-full-score__meta {
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .playable-full-score__chip {
    flex: 0 0 auto;
    min-height: 23px;
    padding: 3px 8px;
    font-size: 11px;
  }

  .playable-full-score__controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 13px 15px;
  }

  .playable-full-score__btn,
  .playable-full-score__select {
    width: 100%;
    min-height: 42px;
    padding: 9px 10px;
    border-radius: 12px;
    font-size: 14px;
  }

  .playable-full-score__time {
    grid-column: 1 / -1;
    width: 100%;
    margin-left: 0;
    font-size: 12px;
  }

  .playable-full-score__timeline {
    padding: 13px 15px 8px;
  }

  .playable-full-score__timeline-bar {
    height: 11px;
  }

  .playable-full-score__measure-row {
    height: 26px;
    font-size: 11px;
  }

  .playable-full-score__status {
    padding: 8px 15px 12px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .playable-full-score__status .playable-full-score__chip {
    flex: 0 0 auto;
  }

  .playable-full-score__keyboard-wrap {
    margin-left: -4px;
    margin-right: -4px;
    width: calc(100% + 8px);
    padding: 0 10px 16px;
  }

  .playable-full-score__keyboard {
    --white-key-width: 12px;
    --white-key-height: 88px;
    --black-key-width: 8px;
    --black-key-height: 56px;
  }

  .playable-full-score__key-label {
    display: none;
  }

  .playable-full-score__white-key.is-active-rh::after,
  .playable-full-score__white-key.is-active-lh::after,
  .playable-full-score__white-key.is-active-both::after,
  .playable-full-score__black-key.is-active-rh::after,
  .playable-full-score__black-key.is-active-lh::after,
  .playable-full-score__black-key.is-active-both::after {
    display: none;
  }

  .playable-full-score__legend {
    padding: 0 15px 16px;
    font-size: 12px;
  }

  .playable-full-score__systems {
    padding: 0 15px 16px;
  }

  .playable-full-score-system {
    border-radius: 14px;
  }

  .playable-full-score-system__header {
    display: block;
    padding: 11px 12px;
  }

  .playable-full-score-system__meta {
    margin-top: 3px;
  }

  .playable-full-score-system__body {
    padding: 12px;
  }

  .playable-full-score-system__chord {
    min-width: 72px;
    min-height: 52px;
    font-size: 19px;
  }
}

/* =========================================================
   Very small phones
   ========================================================= */

@media (max-width: 390px) {
  .playable-full-score {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }

  .playable-full-score__title {
    font-size: 19px;
  }

  .playable-full-score__controls {
    grid-template-columns: 1fr;
  }

  .playable-full-score__keyboard {
    --white-key-width: 11px;
    --white-key-height: 82px;
    --black-key-width: 7px;
    --black-key-height: 52px;
  }

  .playable-full-score-system__chord {
    min-width: 68px;
    min-height: 50px;
    font-size: 18px;
  }
}


/* =========================================================
   Full Score System Analysis
   ========================================================= */

.playable-full-score__systems {
  padding: 0 22px 22px;
  background: #ffffff;
}

.playable-full-score-system {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.playable-full-score-system__header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 13px 14px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.playable-full-score-system__eyebrow {
  margin: 0 0 3px;
  color: #4f46e5;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.playable-full-score-system__title {
  margin: 0;
  color: #111827;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.28;
}

.playable-full-score-system__meta {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.playable-full-score-system__actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.playable-full-score-system__btn {
  min-height: 34px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.playable-full-score-system__btn:hover {
  border-color: #4f46e5;
  color: #4f46e5;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.10);
}

.playable-full-score-system__btn--primary {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}

.playable-full-score-system__btn--primary:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
}

.playable-full-score-system__body {
  padding: 14px;
}

.playable-full-score-system__measure-strip {
  position: relative;
  min-height: 48px;
  border: 1px solid #e5e7eb;
  border-radius: 13px;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.18) 1px, transparent 1px) 0 0 / 25% 100%,
    #ffffff;
  overflow: hidden;
}

.playable-full-score-system__measure-labels {
  display: grid;
  grid-template-columns: repeat(var(--measure-count, 4), minmax(64px, 1fr));
  height: 100%;
}

.playable-full-score-system__measure-label {
  padding: 8px 9px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
}

.playable-full-score-system__progression {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.playable-full-score-system__progression::-webkit-scrollbar {
  height: 6px;
}

.playable-full-score-system__progression::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd5e1;
}

.playable-full-score-system__chord {
  position: relative;
  flex: 0 0 82px;
  min-height: 62px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  color: #111827;
  padding: 8px 10px;
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 850;
  text-align: center;
  scroll-snap-align: start;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.playable-full-score-system__chord:hover {
  border-color: #4f46e5;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.12);
}

.playable-full-score-system__chord.is-active {
  border-color: #4f46e5;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.16);
}

.playable-full-score-system__chord.is-active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 7px;
  height: 3px;
  border-radius: 999px;
  background: #4f46e5;
}

.playable-full-score-system__chord span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 750;
}

.playable-full-score-system__analysis {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.playable-full-score-system__analysis-card {
  padding: 12px 13px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
}

.playable-full-score-system__analysis-card h4 {
  margin: 0 0 6px;
  color: #111827;
  font-size: 14px;
  font-weight: 850;
}

.playable-full-score-system__analysis-card p {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.7;
}

.playable-full-score-system__lyric {
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid #fde68a;
  border-radius: 14px;
  background: #fffbeb;
  color: #92400e;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.65;
}

.playable-full-score-system__empty {
  margin-top: 12px;
  padding: 12px 13px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
  font-weight: 750;
}

.playable-full-score-system.is-current {
  border-color: rgba(79, 70, 229, 0.46);
  box-shadow: 0 16px 38px rgba(79, 70, 229, 0.13);
}

.playable-full-score-system.is-current .playable-full-score-system__header {
  background: linear-gradient(90deg, rgba(79, 70, 229, 0.10), rgba(6, 182, 212, 0.07));
}

.playable-full-score-system.is-current .playable-full-score-system__eyebrow {
  color: #3730a3;
}

.playable-full-score-system.is-current .playable-full-score-system__title {
  color: #111827;
}

/* =========================================================
   Learn Mode helpers
   ========================================================= */

.playable-full-score-system__analysis-card:first-child {
  background: #f8fafc;
}

.playable-full-score-system__analysis-card:last-child {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.playable-full-score-system__analysis-card:last-child h4 {
  color: #166534;
}

.playable-full-score-system__analysis-card:last-child p {
  color: #166534;
}

.playable-full-score-system__btn:focus-visible,
.playable-full-score-system__chord:focus-visible,
.playable-full-score__btn:focus-visible,
.playable-full-score__select:focus-visible,
.playable-full-score__timeline-bar:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.22);
  outline-offset: 3px;
}

.playable-full-score-system__btn:active,
.playable-full-score-system__chord:active {
  transform: translateY(1px);
}

@media (max-width: 768px) {
  .playable-full-score-system__analysis {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .playable-full-score-system__actions {
    margin-top: 10px;
  }

  .playable-full-score-system__btn {
    flex: 1 1 auto;
  }

  .playable-full-score-system__measure-strip {
    min-height: 44px;
    overflow-x: auto;
  }

  .playable-full-score-system__measure-labels {
    min-width: 320px;
  }

  .playable-full-score-system__chord {
    flex-basis: 76px;
    min-height: 58px;
    border-radius: 13px;
    font-size: 20px;
  }

  .playable-full-score-system__analysis-card p,
  .playable-full-score-system__lyric {
    font-size: 13.5px;
    line-height: 1.65;
  }
}

@media (max-width: 390px) {
  .playable-full-score-system__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .playable-full-score-system__chord {
    flex-basis: 72px;
    min-height: 54px;
    font-size: 19px;
  }
}

/* =========================================================
   Per-section mini player
   ========================================================= */

.playable-full-score-section-player {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid #e5e7eb;
  border-radius: 15px;
  background: #ffffff;
}

.playable-full-score-section-player__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.playable-full-score-section-player__btn {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
}

.playable-full-score-section-player__speed {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
}

.playable-full-score-section-player__time {
  margin-left: auto;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.playable-full-score-section-player__timeline {
  position: relative;
  width: 100%;
  height: 8px;
  margin-top: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.playable-full-score-section-player__timeline-progress {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4f46e5, #06b6d4);
  transition: width 0.08s linear;
}

.playable-full-score-section-player__status {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.playable-full-score-section-player__keyboard-wrap {
  width: 100%;
  margin-top: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.playable-full-score-section-player__keyboard {
  --white-key-width: 14px;
  --white-key-height: 82px;
  --black-key-width: 9px;
  --black-key-height: 52px;
}

.playable-full-score-section-player__legend {
  padding: 10px 0 0;
  font-size: 12px;
}

@media (max-width: 640px) {
  .playable-full-score-section-player {
    padding: 11px;
    border-radius: 14px;
  }

  .playable-full-score-section-player__controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .playable-full-score-section-player__time {
    grid-column: 1 / -1;
    margin-left: 0;
  }

  .playable-full-score-section-player__status {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .playable-full-score-section-player__keyboard {
    --white-key-width: 12px;
    --white-key-height: 76px;
    --black-key-width: 8px;
    --black-key-height: 48px;
  }
}

.playable-full-score-system__chord strong {
  display: block;
  font-size: 22px;
  font-weight: 850;
  line-height: 1.1;
}

.playable-full-score-system__chord span {
  display: block;
  margin-top: 6px;
  color: #4f46e5;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.playable-full-score-system__chord-meaning {
  display: block;
  margin-top: 4px;
  max-width: 110px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}


/* =========================================================
   Harmony Overview - compact collapsible UI
   ========================================================= */

.playable-full-score__overview {
  padding: 0 22px 18px;
  background: #ffffff;
}

.playable-full-score-overview {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.055);
}

.playable-full-score-overview__summary {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  list-style: none;
  cursor: pointer;
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.1), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.playable-full-score-overview__summary::-webkit-details-marker {
  display: none;
}

.playable-full-score-overview__summary-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 16px;
  font-weight: 900;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    color 0.16s ease;
}

.playable-full-score-overview[open] .playable-full-score-overview__summary-icon {
  transform: rotate(180deg);
  background: #4f46e5;
  color: #ffffff;
}

.playable-full-score-overview__summary-main {
  min-width: 0;
}

.playable-full-score-overview__eyebrow {
  display: block;
  margin: 0 0 4px;
  color: #4f46e5;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.playable-full-score-overview__summary-main strong {
  display: block;
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.25;
}

.playable-full-score-overview__summary-main small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.playable-full-score-overview__summary-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 360px;
}

.playable-full-score-overview__summary-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.playable-full-score-overview__body {
  display: grid;
  gap: 14px;
  padding: 16px 18px 18px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.playable-full-score-overview__quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.playable-full-score-overview__quick-card,
.playable-full-score-overview__card,
.playable-full-score-overview__note-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
}

.playable-full-score-overview__quick-card {
  min-width: 0;
  padding: 12px;
  background: #f8fafc;
}

.playable-full-score-overview__quick-card span {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.playable-full-score-overview__quick-card strong {
  display: block;
  color: #0f172a;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.25;
}

.playable-full-score-overview__quick-card p {
  margin: 7px 0 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.5;
}

.playable-full-score-overview__note-card {
  padding: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.playable-full-score-overview__note-card h5,
.playable-full-score-overview__card h5 {
  margin: 0 0 9px;
  color: #0f172a;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.3;
}

.playable-full-score-overview__note-card p,
.playable-full-score-overview__card p,
.playable-full-score-overview__card li {
  margin: 0 0 8px;
  color: #475569;
  font-size: 13px;
  line-height: 1.65;
}

.playable-full-score-overview__note-card p:last-child,
.playable-full-score-overview__card p:last-child {
  margin-bottom: 0;
}

.playable-full-score-overview__takeaway {
  padding: 10px 11px;
  border-radius: 13px;
  background: #eef2ff;
  color: #3730a3 !important;
  font-weight: 800;
}

.playable-full-score-overview__card {
  padding: 14px;
}

.playable-full-score-overview__card--full {
  grid-column: 1 / -1;
}

.playable-full-score-overview__degree-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.playable-full-score-overview__degree-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  background: #f8fafc;
}

.playable-full-score-overview__degree-item > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.playable-full-score-overview__degree-item > div strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 13px;
  font-weight: 950;
}

.playable-full-score-overview__degree-item > div span {
  color: #4f46e5;
  font-family: Georgia, serif;
  font-size: 17px;
  font-weight: 900;
  text-align: right;
}

.playable-full-score-overview__degree-item p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
}

.playable-full-score-overview__section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.playable-full-score-overview__section-head p {
  margin: 4px 0 0;
  max-width: 760px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

.playable-full-score-overview__section-head > span {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 900;
}

.playable-full-score-overview__nashville-list {
  display: grid;
  gap: 9px;
}

.playable-full-score-overview__nashville-item {
  padding: 12px 13px;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  background: #ffffff;
}

.playable-full-score-overview__nashville-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.playable-full-score-overview__nashville-title strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
}

.playable-full-score-overview__nashville-title small {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.playable-full-score-overview__number-line {
  margin: 0 0 5px !important;
  color: #111827 !important;
  font-weight: 900;
}

.playable-full-score-overview__roman-line {
  margin: 0 0 6px !important;
  color: #4f46e5 !important;
  font-weight: 850;
}

.playable-full-score-overview__idea-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.playable-full-score-overview__idea-item {
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  background: #f8fafc;
}

.playable-full-score-overview__idea-item strong {
  display: block;
  margin-bottom: 5px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
}

.playable-full-score-overview__idea-item p {
  margin: 0;
  color: #64748b;
  font-size: 12.5px;
  line-height: 1.6;
}

.playable-full-score-overview__bottom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.playable-full-score-overview__card ol {
  margin: 0;
  padding-left: 18px;
}

@media (max-width: 1080px) {
  .playable-full-score-overview__quick-grid,
  .playable-full-score-overview__degree-list,
  .playable-full-score-overview__idea-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .playable-full-score-overview__summary {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .playable-full-score-overview__summary-chips {
    grid-column: 2 / -1;
    justify-content: flex-start;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .playable-full-score__overview {
    padding: 0 18px 16px;
  }

  .playable-full-score-overview__quick-grid,
  .playable-full-score-overview__degree-list,
  .playable-full-score-overview__idea-list,
  .playable-full-score-overview__bottom-grid {
    grid-template-columns: 1fr;
  }

  .playable-full-score-overview__summary,
  .playable-full-score-overview__body {
    padding: 14px;
  }

  .playable-full-score-overview__summary-main strong {
    font-size: 16px;
  }

  .playable-full-score-overview__section-head {
    display: block;
  }

  .playable-full-score-overview__section-head > span {
    margin-top: 8px;
  }
}

@media (max-width: 640px) {
  .playable-full-score__overview {
    padding: 0 15px 15px;
  }

  .playable-full-score-overview__summary {
    gap: 10px;
  }

  .playable-full-score-overview__summary-chips {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .playable-full-score-overview__summary-chips span {
    flex: 0 0 auto;
  }
}