.harmony-learn-root {
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

body.explore-mode .chord-universe-panel {
  min-height: 0;
}

body.explore-mode #chordUniverseGrid {
  display: none !important;
}

body.explore-mode #harmonyCompassExplore {
  display: block;
}

body.explore-mode #composerPanel {
  max-height: 132px;
  overflow: hidden;
}

.harmony-learn-shell {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.4fr);
  gap: 16px;
  min-height: 0;
}

.harmony-learn-hero,
.harmony-learn-paths {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.035);
  border-radius: 8px;
  min-width: 0;
}

.harmony-learn-hero {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.harmony-learn-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.harmony-learn-title h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.25rem;
  letter-spacing: 0;
}

.harmony-learn-title p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 520px;
}

.harmony-learn-mode {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--teal);
  border: 1px solid rgba(0,240,204,0.24);
  background: rgba(0,240,204,0.08);
  border-radius: 999px;
  padding: 4px 8px;
  white-space: nowrap;
}

.harmony-selected-card {
  border: 1px solid rgba(0,240,204,0.16);
  background: rgba(0,240,204,0.055);
  border-radius: 8px;
  padding: 16px;
}

.harmony-selected-symbol {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 750;
  color: var(--text);
  overflow-wrap: anywhere;
}

.harmony-role-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.harmony-role {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 5px 8px;
}

.harmony-role-home { color: var(--teal); background: rgba(0,240,204,0.08); border-color: rgba(0,240,204,0.22); }
.harmony-role-move { color: var(--blue); background: rgba(96,165,250,0.08); border-color: rgba(96,165,250,0.22); }
.harmony-role-tension { color: var(--pink); background: rgba(249,168,212,0.08); border-color: rgba(249,168,212,0.22); }
.harmony-role-color { color: var(--purple); background: rgba(184,157,250,0.08); border-color: rgba(184,157,250,0.22); }
.harmony-role-outside { color: var(--faint); background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.12); }
.harmony-role-explore { color: var(--gold); background: rgba(251,191,36,0.08); border-color: rgba(251,191,36,0.22); }

.harmony-selected-hint {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.harmony-meta-line {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--faint);
}

.harmony-guide {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 14px;
}

.harmony-guide h3,
.harmony-learn-paths h3 {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text);
  letter-spacing: 0;
}

.harmony-guide p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.harmony-journey {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.harmony-journey span {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(0,240,204,0.16);
  background: rgba(0,240,204,0.055);
  border-radius: 7px;
  padding: 8px 6px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
  text-align: center;
}

.harmony-journey span:not(:last-child)::after {
  content: ">";
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translate(50%, -50%);
  color: var(--faint);
  font-size: 0.62rem;
}

.harmony-learn-paths {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.harmony-path-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.harmony-path-header span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.harmony-intent-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.harmony-intent-tab {
  min-width: 0;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.2);
  color: var(--muted);
  border-radius: 7px;
  padding: 9px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.62rem;
}

.harmony-intent-tab span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.harmony-intent-tab span:last-child {
  color: var(--faint);
}

.harmony-intent-tab:hover,
.harmony-intent-tab:focus-visible {
  outline: none;
  border-color: rgba(0,240,204,0.22);
  background: rgba(255,255,255,0.05);
}

.harmony-intent-tab.is-active {
  color: var(--text);
  border-color: rgba(0,240,204,0.28);
  background: rgba(0,240,204,0.08);
}

.harmony-active-intent {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.14);
  border-radius: 8px;
  padding: 12px;
}

.harmony-active-copy {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  margin-bottom: 10px;
}

.harmony-suggestion-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.harmony-suggestion {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.18);
  border-radius: 7px;
  padding: 8px;
  color: var(--text);
  cursor: pointer;
  min-width: 0;
  transition: border-color 0.14s, background 0.14s, transform 0.14s;
}

.harmony-suggestion:hover,
.harmony-suggestion:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(0,240,204,0.28);
  background: rgba(255,255,255,0.055);
}

.harmony-suggestion-main {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.harmony-suggestion-symbol {
  font-family: var(--mono);
  font-size: 0.86rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
}

.harmony-suggestion-roman {
  font-family: var(--mono);
  color: var(--faint);
  font-size: 0.64rem;
  white-space: nowrap;
}

.harmony-suggestion-meta {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 7px;
}

.harmony-mini-badge {
  font-family: var(--mono);
  font-size: 0.54rem;
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 999px;
  padding: 2px 5px;
  background: rgba(255,255,255,0.035);
}

.harmony-add-btn {
  margin-top: 8px;
  border: 1px solid rgba(0,240,204,0.24);
  background: rgba(0,240,204,0.07);
  color: var(--teal);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.62rem;
  padding: 4px 7px;
  cursor: pointer;
}

.harmony-add-btn:hover {
  background: rgba(0,240,204,0.13);
}

.harmony-empty {
  color: var(--faint);
  font-size: 0.72rem;
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: 7px;
  padding: 10px;
}

.harmony-fallback {
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.035);
  border-radius: 8px;
  padding: 18px;
}

@media (max-width: 1280px) {
  .harmony-learn-shell {
    grid-template-columns: 1fr;
  }

  .harmony-intent-tabs {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 760px) {
  .harmony-intent-tabs,
  .harmony-journey {
    grid-template-columns: 1fr;
  }

  .harmony-journey span:not(:last-child)::after {
    display: none;
  }
}
