/* /style.css */
/* Colours now come from shared/global.css's theme tokens (--bg-base,
   --bg-surface, --bg-elevated, --text-main, --accent, --shadow-soft, ...)
   so this tool follows the same dark/light mode as the rest of the app —
   see body.light-theme in shared/global.css for the light values. */
:root {
  --text-max: 1100px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-main, Arial, Helvetica, sans-serif);
  background: var(--bg-base);
  color: var(--text-main);
}

.app.pvFullWidth {
  max-width: 1350px;
  width: 100%;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
  border-left: none;
  border-right: none;
  box-shadow: none;
  background: none;
}


.hero {
  text-align: center;
  max-width: var(--text-max);
  margin: 0 auto 20px;
}

.heroTitleText {
  text-align: center;
  font-size: 38px;
  font-weight: 800;
  margin: 16px 0 10px;
  letter-spacing: 0.5px;
}

.app-subtitle {
  margin: 0 auto;
  font-size: 15px;
  font-weight: 400;
  opacity: .78;
  line-height: 1.45;
  max-width: 980px;
}

.app-subtitle a {
  color: var(--accent);
  font-weight: bold;
  text-decoration: none;
}
.app-subtitle a:hover {
  text-decoration: underline;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: end;
  justify-content: flex-start;
  margin-bottom: 14px;
}

.topbar #homeBtn {
  align-self: end;
}

/* Title images */
.app-titleWrap{
  display:flex;
  justify-content:center;
  align-items:center;
  margin:14px 0 6px;
}
.app-titleImg{
  height:auto;
  display:block;
  user-select:none;
  -webkit-user-drag:none;
  padding-bottom: 10px;
  max-width: 100%;
}
.app-titleImgWide{ width:min(600px, 100%); }
.app-titleImgWrapped{ width:min(220px, 55vw); }

.scaleChordRow {
  flex-basis: 100%;
  width: 100%;
  display: flex;
  gap: 12px 16px;
  align-items: stretch;
  flex-wrap: wrap; 
}

.scaleChordPanel {
  flex: 0 0 auto;
  width: fit-content;
  max-width: 100%;
  align-self: stretch;
}

.rightPanels {
  flex: 1 1 360px;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: stretch;
  height: 100%;
}

.rightPanels .analysis {
  flex: 1 1 auto;
  margin-top: 0;
  display: flex;
  flex-direction: column;
}

.rightPanels .controlsPanel {
  flex: 0 0 auto;
  margin-top: 0;
}

.chordsPanel { margin-top: 0; }

.control label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
  opacity: 0.85;
}

.colorPicker {
  width: 56px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--bg-elevated);
  border-radius: 10px;
  background: var(--bg-surface);
  cursor: pointer;
}

select {
  height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--bg-elevated);
  background: var(--bg-surface);
  color: var(--text-main);
  cursor: pointer;
  font-weight: 800;
}

.swatches {
  display: flex;
  gap: 8px;
  align-items: center;
}

.swatch {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--bg-elevated);
  cursor: pointer;
  background: #ddd;
}
.swatch:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button {
  height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--bg-elevated);
  background: var(--bg-surface);
  color: var(--text-main);
  cursor: pointer;
  font-weight: 900;
}
button:active { transform: translateY(1px); }

.btnSubtle {
  font-weight: 700;
  opacity: 0.9;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--bg-elevated);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-surface);
}

.segBtn {
  border: 0;
  border-right: 1px solid var(--bg-elevated);
  border-radius: 0;
  height: 38px;
  padding: 0 10px;
  background: transparent;
  color: var(--text-main);
  font-weight: 800;
  cursor: pointer;
}
.segBtn:last-child { border-right: 0; }
.segBtn.isActive {
  background: var(--bg-elevated);
}

.fingerControl {
  min-width: 320px;
}

.fingerRow {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.checkInline {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
  opacity: 0.9;
  user-select: none;
}
.checkInline input { transform: translateY(1px); }

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.customCard {
  background: var(--bg-surface);
  border: 1px solid var(--bg-elevated);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.stage {
  margin-top: 14px;
}

.mount {
  overflow: hidden; 
  padding-bottom: 4px;
}

.mount svg {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
}

.analysisHeader, .chordsHeader {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.analysisTitle, .chordsTitle {
  font-size: 16px;
  font-weight: 800;
}

.analysisSubtitle, .chordsSubtitle {
  font-size: 13px;
  opacity: 0.75;
}

.chordbar {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  margin-top: 10px;
}

.analysisGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.analysisCard {
  border: 1px solid var(--bg-elevated);
  border-radius: 14px;
  padding: 12px;
  background: var(--bg-base);
  min-height: 72px;
}

.analysisCardWide {
  grid-column: 1 / -1;
}

.currentChordPanel .analysisCardWide {
  grid-column: auto;
}

.analysisLabel {
  font-size: 12px;
  opacity: 0.75;
  margin-bottom: 8px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.analysisBody {
  font-size: 14px;
  line-height: 1.45;
  font-weight: 800;
  word-break: break-word;
}

.chordList {
  margin: 0;
  padding-left: 18px;
}
.chordList li { margin: 4px 0; }
.chordPrimary { font-weight: 900; }
.chordAlt { opacity: 0.85; }
.muted { opacity: 0.75; }

@media (max-width: 980px) {
  .analysisGrid { grid-template-columns: 1fr; }
  .analysisCardWide { grid-column: auto; }
  .fingerControl { min-width: 0; width: 100%; }
}

.hidden {
  display: none;
}

.endnotes {
  margin: 16px auto 0;
  max-width: var(--text-max);
  font-size: 13px;
  font-weight: 800;
  opacity: 0.7;
  text-align: center;
}