/*
 * sangeet-fretted.css — shared by: bass, guitar, ukulele
 *
 * TAB blocks, pattern pickers, chord chips and drill chrome for the fretted
 * rooms. The neck itself is sangeet-fretboard.css and the chord box is
 * sangeet-chord-diagram.css; this is the page furniture around them.
 *
 * Every rule here was the same in all of those rooms, so it is written once.
 * Regenerate with: python3 scripts/extract_css_layer.py fretted
 */

.gtab {
  font-family: ui-monospace, Consolas, monospace;
  font-size: .8rem;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  line-height: 1.4;
  color: var(--ink);
  white-space: pre;
  margin: 10px auto;
  width: fit-content;
  max-width: 100%;
  text-align: left;
  tab-size: 1;
}

.with-tab {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 24px;
  align-items: start;
}

/* Sweep pages: text on top, tab block centered below (not split left/right). */
.with-tab.with-tab-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.with-tab.with-tab-stack .gtab,
.with-tab.with-tab-stack .gtab-wrap {
  align-self: center;
  margin: 10px auto;
  width: fit-content;
  max-width: 100%;
}

/* One-string walks: 0–12 and 13–24 as a pair. */
.tab-pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 20px;
  align-items: start;
  margin: 4px 0 16px;
}

.tab-pair-col p { margin: 0 0 2px; }

.tab-pair-col .gtab,
.tab-pair-col .gtab-wrap {
  align-self: start;
  margin: 8px 0;
}

.tab-quad {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  align-items: start;
  margin: 4px 0 16px;
}

.find-home { font-size: .9rem; color: var(--muted); margin: 0 0 6px; }

.pl-mode-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.pl-mode-tabs .btn { font-size: .9rem; }

.pl-mode-tabs .btn.active {
  background: var(--terra); color: #fff; border-color: var(--terra);
}

.pl-panel { display: none; }

.pl-panel.active { display: block; }

.pl-legend { font-size: .85rem; color: var(--muted); margin: .35rem 0 .75rem; }

.pl-stats { font-size: .9rem; margin: .5rem 0 0; }

.pl-presets { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }

.pl-presets .pl-presets-label { font-size: .85rem; color: var(--muted); margin-right: 4px; }

.pl-presets .btn.active {
  background: var(--terra); color: #fff; border-color: var(--terra);
}

.ctrl {
  font: inherit; padding: 6px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: #fffdf8;
}

.drill-jump { margin: 12px 0 4px; }

.drill-jump .btn { font-size: .85rem; padding: 7px 12px; }

.drill-now { font-weight: 700; color: var(--terra); }
.drill-now:not(:empty) { display: block; min-height: 1.2em; margin-bottom: 0.35rem; }
.drill-now:empty { display: none; }
p.row:has(> .drill-now:empty:only-child) { display: none; }

.check-list { list-style: none; padding: 0; margin: 8px 0; }

.check-list li { margin: 6px 0; }

.check-list label { display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }

.strum-pat {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0;
}

.strum-beat {
  min-width: 48px; min-height: 48px; padding: 8px 10px;
  border: 1.5px solid var(--line); border-radius: 10px;
  font-weight: 800; text-align: center; background: #fffdf8;
}

.strum-beat.on { background: var(--ochre); border-color: var(--terra); }

.strum-beat.strong { border-color: var(--terra); }

.strum-beat.accent {
  position: relative;
  background: color-mix(in srgb, var(--ochre) 38%, transparent);
  border-color: var(--terra);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--terra) 55%, transparent);
  font-weight: 800;
}

/* Accent articulation wedge (>) above the strum — same mark as notation above a note. */
.strum-beat.accent::before {
  content: ">";
  position: absolute;
  top: 1px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .72rem;
  line-height: 1;
  color: var(--terra);
  font-weight: 800;
  pointer-events: none;
}

.strum-beat.accent-edit { cursor: pointer; }

.strum-beat.accent-edit:hover,
.strum-beat.accent-edit:focus-visible {
  outline: 2px solid var(--terra);
  outline-offset: 1px;
}

.pat-accent-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 6px; }

.pat-accent-hint { margin: 0 0 10px; font-size: .88rem; color: var(--muted); line-height: 1.45; max-width: 52em; }

.pat-accent-hint-active { color: var(--ink); background: color-mix(in srgb, var(--ochre) 22%, transparent); padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); }

.pat-accent-row .btn.sel { background: var(--ochre); border-color: var(--terra); color: var(--ink); }

.strum-beat .sub { display: block; font-size: .68rem; font-weight: 600; color: var(--muted); }

.strum-beat.rest { color: var(--muted); background: transparent; border-style: dashed; }

.strum-beat.chunk { color: var(--muted); border-style: dashed; }

.strum-beat.editable { cursor: pointer; }
.strum-beat.editable:hover,
.strum-beat.editable:focus-visible {
  border-color: var(--terra);
  outline: none;
  box-shadow: 0 0 0 2px rgba(184, 90, 42, 0.2);
}

.strum-build-row { align-items: center; gap: 12px 20px; flex-wrap: wrap; margin: 4px 0 8px; }

.strum-pat.dense { gap: 5px; }

.strum-pat.dense .strum-beat { min-width: 32px; min-height: 44px; padding: 6px 3px; font-size: .9rem; }

.strum-accent-demo { margin: 12px 0 16px; max-width: 36em; }

.pat-legend { margin: 0 0 4px; font-size: .95rem; }

.pat-library { margin: 1.1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); }

.pat-library:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }

.pat-library h3 { margin: 0 0 6px; font-size: 1.05rem; }

.pat-hint { margin: 0 0 10px; font-size: .88rem; color: var(--muted); line-height: 1.45; max-width: 52em; }

.pat-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; }

.pat-pick .btn { font-size: .85rem; padding: 7px 12px; line-height: 1.25; text-align: left; }

.pat-pick .btn.sel { background: var(--ochre); border-color: var(--terra); color: var(--ink); }

.pat-stage {
  margin-top: 1.35rem; padding-top: 1.15rem;
  border-top: 2px solid var(--ochre);
}

.pat-stage-title { margin: 0 0 6px; }

.pat-cap { margin: 0 0 10px; line-height: 1.45; }

.pat-meta { color: var(--muted); font-size: .85rem; font-weight: 700; }

.pima-letter {
  display: inline-block;
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 800;
  min-width: 1.35em;
  text-align: center;
  background: #fbf1da;
  border-radius: 6px;
  padding: 0 6px;
  color: var(--terra);
}

.pima-jobs {
  display: grid;
  gap: 12px;
  margin: 12px 0;
}

.pima-jobs .card { margin: 0; }

.tab-pre {
  font-size: .82rem; overflow: auto; background: #fffdf8;
  padding: 12px; border: 1px solid var(--line); border-radius: 8px;
  font-family: ui-monospace, Consolas, monospace; line-height: 1.35;
  margin: 8px 0;
}

.chart { font-family: ui-monospace, Consolas, monospace; font-size: .9rem; }

.chord-meet h3 { margin-top: 0; }

.rel {
  display: inline-block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--terra);
  background: #fbf1da;
  border-radius: 999px;
  padding: 2px 8px;
  margin: 0 6px 6px 0;
  vertical-align: middle;
}

.hear-in { margin: 12px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); }

.hear-in .btn { margin-top: 8px; }

.track h3 { margin: 0 0 8px; font-size: 1.02rem; }

.track p { margin: 0; }

.track-b { border-top: 4px solid var(--green); }

.track-i { border-top: 4px solid var(--ochre); }

.track-a { border-top: 4px solid var(--terra); }

.btn.ghost.sel {
  background: var(--ochre);
  border-color: var(--terra);
  color: var(--ink);
}

.song-list .song-group {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 14px 0 2px;
  padding: 0;
}

@media (min-width: 1100px) {
  .tab-quad { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 720px) {
  .pima-jobs { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 780px) {
  .with-tab { grid-template-columns: minmax(0, 1fr) minmax(200px, 48%); }

  .with-tab .gtab { margin: 0 auto; }

  .with-tab.with-tab-stack { display: flex; flex-direction: column; }

  .with-tab.with-tab-stack .gtab,
    .with-tab.with-tab-stack .gtab-wrap { align-self: center; margin: 10px auto; }
}

@media (min-width: 820px) {
  .tab-pair { grid-template-columns: 1fr 1fr; }
}

/* Lifted fretted lesson & drill rules shared across bass, guitar, and ukulele */
.controls input { font: inherit; width: 4.5rem; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: inherit; }
.drill pre { margin: 0 0 10px; padding: 10px 12px; overflow-x: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; font-size: 0.82rem; line-height: 1.35; }
.drill pre.gym-tab { margin: 0 0 10px; padding: 12px 14px; overflow-x: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; font: 0.95rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.02em; white-space: pre; max-width: 100%; }
.drill pre.gym-tab:empty { min-height: 4.5em; }
.drill-board { margin-top: 10px; }
.first-read-label { margin: 0 0 6px; font-size: 0.82rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.first-read-neck .gfret-mark.map .gfret-mlab { opacity: 0.85; }
.first-read-neck .gfret-mark.map circle { fill: var(--terra); opacity: 0.45; }
.first-read-neck .gfret-mark.map rect { fill: var(--terra); opacity: 0.45; }
.first-read-neck .gfret-mark.open.map circle { opacity: 0.55; }
.first-read-neck .gfret-mark.open.map rect { opacity: 0.55; }
.first-read-neck .gfret-svg { width: 100%; max-width: 640px; height: auto; }
.first-read-neck.gfret { width: min(100%, 640px); max-width: 640px; margin: 12px auto 0; align-self: center; }
.first-read-row { display: flex; flex-direction: column; gap: 1rem; align-items: stretch; margin: 10px 0 0; }
.first-read-row .gstaff-wrap { margin: 0; }
.first-read-tab { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.first-read-tab .gtab-wrap { width: fit-content; max-width: 100%; margin-left: auto; margin-right: auto; }
.first-read-tab pre.gtab { margin: 10px auto 0; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.gstaff-cap { font-size: .85rem; color: var(--muted); margin: 6px 0 0; }
.gstaff-wrap { overflow-x: auto; margin: 10px 0; }
.gym-status { font-size: 0.85rem; color: var(--muted); min-height: 1.2em; margin: 8px 0 0; font-variant-numeric: tabular-nums; }
.rhy-pick { margin: 8px 0; }
.routine-ready { margin: 6px 0 0; font-size: .9rem; color: var(--muted); }
.rs-card { display: none; }
.rs-card.on { display: block; }
.solo-keys { margin: 12px 0 0; max-width: 100%; overflow-x: auto; }
.solo-status { font-size: 0.85rem; color: var(--muted); min-height: 1.2em; font-variant-numeric: tabular-nums; }
.toc { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; margin: 14px 0 0; padding: 0; border: none; background: transparent; position: static; width: auto; min-width: 0; height: auto; overflow: visible; }
.toc a { display: inline; padding: 0; border: none; border-radius: 0; font-size: 0.95rem; color: var(--terra); text-decoration: none; line-height: 1.4; }
.toc a:hover { background: transparent; text-decoration: underline; color: var(--terra-soft); }
table.routine { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: .95rem; }
table.routine td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: center; }
table.routine td:first-child { text-align: left; }
table.routine td:first-child span { display: block; font-size: .85rem; color: var(--muted); }
table.routine th { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: center; }
table.routine th:first-child { text-align: left; }
@media (max-width: 720px) {
  .first-read-row { grid-template-columns: 1fr; }
}

/* BEGIN DARK (generated by scripts/gen_dark.py; do not edit) */
html[data-theme="dark"] .gtab {
  background: #2a210b;
  border: 1px solid var(--line);
  color: var(--ink);
}
html[data-theme="dark"] .find-home {
  color: var(--muted);
}
html[data-theme="dark"] .pl-mode-tabs .btn.active {
  background: #b5451d;
  color: #ffffff;
  border-color: var(--terra);
}
html[data-theme="dark"] .pl-legend {
  color: var(--muted);
}
html[data-theme="dark"] .pl-presets .pl-presets-label {
  color: var(--muted);
}
html[data-theme="dark"] .pl-presets .btn.active {
  background: #b5451d;
  color: #ffffff;
  border-color: var(--terra);
}
html[data-theme="dark"] .ctrl {
  border: 1px solid var(--line);
  background: #2a210b;
}
html[data-theme="dark"] .drill-now {
  color: var(--terra);
}
html[data-theme="dark"] .strum-beat {
  border: 1.5px solid var(--line);
  background: #2a210b;
}
html[data-theme="dark"] .strum-beat.on {
  background: #6b4e14;
  border-color: var(--terra);
}
html[data-theme="dark"] .strum-beat.strong {
  border-color: var(--terra);
}
html[data-theme="dark"] .strum-beat.accent {
  background: color-mix(in srgb, #6b4e14 38%, transparent);
  border-color: var(--terra);
}
html[data-theme="dark"] .strum-beat.accent::before {
  color: var(--terra);
}
html[data-theme="dark"] .strum-beat.accent-edit:hover,
html[data-theme="dark"] .strum-beat.accent-edit:focus-visible {
  outline: 2px solid var(--terra);
}
html[data-theme="dark"] .pat-accent-hint {
  color: var(--muted);
}
html[data-theme="dark"] .pat-accent-hint-active {
  color: var(--ink);
  background: color-mix(in srgb, #6b4e14 22%, transparent);
  border: 1px solid var(--line);
}
html[data-theme="dark"] .pat-accent-row .btn.sel {
  background: #6b4e14;
  border-color: var(--terra);
  color: var(--ink);
}
html[data-theme="dark"] .strum-beat .sub {
  color: var(--muted);
}
html[data-theme="dark"] .strum-beat.rest {
  color: var(--muted);
  background: transparent;
}
html[data-theme="dark"] .strum-beat.chunk {
  color: var(--muted);
}
html[data-theme="dark"] .strum-beat.editable:hover,
html[data-theme="dark"] .strum-beat.editable:focus-visible {
  border-color: var(--terra);
  outline: none;
}
html[data-theme="dark"] .pat-library {
  border-top: 1px solid var(--line);
}
html[data-theme="dark"] .pat-library:first-of-type {
  border-top: 0;
}
html[data-theme="dark"] .pat-hint {
  color: var(--muted);
}
html[data-theme="dark"] .pat-pick .btn.sel {
  background: #6b4e14;
  border-color: var(--terra);
  color: var(--ink);
}
html[data-theme="dark"] .pat-stage {
  border-top: 2px solid var(--ochre);
}
html[data-theme="dark"] .pat-meta {
  color: var(--muted);
}
html[data-theme="dark"] .pima-letter {
  background: #2f2610;
  color: var(--terra);
}
html[data-theme="dark"] .tab-pre {
  background: #2a210b;
  border: 1px solid var(--line);
}
html[data-theme="dark"] .rel {
  color: var(--terra);
  background: #2f2610;
}
html[data-theme="dark"] .hear-in {
  border-top: 1px dashed var(--line);
}
html[data-theme="dark"] .track-b {
  border-top: 4px solid var(--green);
}
html[data-theme="dark"] .track-i {
  border-top: 4px solid var(--ochre);
}
html[data-theme="dark"] .track-a {
  border-top: 4px solid var(--terra);
}
html[data-theme="dark"] .btn.ghost.sel {
  background: #6b4e14;
  border-color: var(--terra);
  color: var(--ink);
}
html[data-theme="dark"] .song-list .song-group {
  color: var(--muted);
}
html[data-theme="dark"] .controls input {
  border: 1px solid var(--line);
  background: var(--bg);
  color: inherit;
}
html[data-theme="dark"] .drill pre {
  background: var(--bg);
  border: 1px solid var(--line);
}
html[data-theme="dark"] .drill pre.gym-tab {
  background: var(--bg);
  border: 1px solid var(--line);
}
html[data-theme="dark"] .first-read-label {
  color: var(--muted);
}
html[data-theme="dark"] .first-read-neck .gfret-mark.map circle {
  fill: var(--terra);
}
html[data-theme="dark"] .first-read-neck .gfret-mark.map rect {
  fill: var(--terra);
}
html[data-theme="dark"] .gstaff-cap {
  color: var(--muted);
}
html[data-theme="dark"] .gym-status {
  color: var(--muted);
}
html[data-theme="dark"] .routine-ready {
  color: var(--muted);
}
html[data-theme="dark"] .solo-status {
  color: var(--muted);
}
html[data-theme="dark"] .toc {
  border: none;
  background: transparent;
}
html[data-theme="dark"] .toc a {
  border: none;
  color: var(--terra);
}
html[data-theme="dark"] .toc a:hover {
  background: transparent;
  color: var(--terra-soft);
}
html[data-theme="dark"] table.routine td {
  border-bottom: 1px solid var(--line);
}
html[data-theme="dark"] table.routine td:first-child span {
  color: var(--muted);
}
html[data-theme="dark"] table.routine th {
  border-bottom: 1px solid var(--line);
}
/* END DARK */
