/* Sarangi room styles — tokens and page shell from css/sangeet-theme.css.
   The shell (.wrap, the sidebar, main, footer) is declared once in the theme;
   nothing here may redeclare it. */
/* No `*`, `html` or `a` reset here: the theme already declares those identically, and
   the older rooms' copies of them are duplication this file need not inherit. */
h1 { font-family: var(--font-display); font-size: 2.2rem; line-height: 1.15; margin: 0 0 10px; font-weight: 600; }
h2 { font-size: 1.5rem; margin: 40px 0 12px; padding-bottom: 6px; border-bottom: 3px solid var(--ochre); display: inline-block; }
h3 { font-size: 1.1rem; color: var(--terra); margin: 22px 0 8px; }
.lead { font-size: 1.1rem; color: #4a3728; }
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin: 16px 0;
}
.note {
  border-left: 5px solid var(--ochre); background: #fbf1da;
  padding: 12px 16px; border-radius: 8px; margin: 16px 0; color: #5a4a34;
}
.tip { border-left-color: var(--green); background: #eef3e7; }
.warn { border-left-color: #c45c26; background: #fceee6; }
.btn.nav { background: var(--terra); color: #fff; }
.btn.nav::after { content: "\2192"; margin-left: 8px; font-weight: 700; }
.btn.play { background: var(--green, #2a7a62); }
.btn.play::before { content: "\25B6"; margin-right: 8px; font-size: 0.85em; }
.btn.play.is-stop { background: #5a4a34; }
.btn.play.is-stop::before { content: none; }
.btn.small { padding: 6px 11px; font-size: 0.85rem; border-radius: 8px; }
.row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }

ol.steps { padding-left: 1.25rem; }
ol.steps li { margin: 0.55rem 0; }
ul.plain { list-style: none; padding-left: 0; }
ul.plain li { margin: 0.5rem 0; }

table.grid { border-collapse: collapse; width: max-content; max-width: 100%; margin: 12px 0; font-size: 0.95rem; }
table.grid th, table.grid td { text-align: left; padding: 7px 11px; border-bottom: 1px solid #eadfce; vertical-align: top; }
table.grid th { color: var(--terra); font-weight: 800; font-size: 0.82rem; letter-spacing: 0.03em; text-transform: uppercase; }
table.grid td.num { font-variant-numeric: tabular-nums; font-family: ui-monospace, Consolas, monospace; }
.table-wrap { overflow-x: auto; margin: 12px 0; }

.sargam { font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.06em; color: #3d2c1c; }
.np { font-size: 0.95em; color: var(--muted); }

/* .from-theory is declared in sangeet-theme.css so every room's theory bridge reads
   the same. Do not restate it here: this file is a <link> after the theme, so a copy
   would win on source order and quietly put this room on its own dialect. */

/* —— The neck diagram ——
   Positions are placed by physical string ratio, not on a grid, so the dots
   crowd toward the bridge on purpose. Colour carries the finger; the drone pair
   is drawn flat because it is never stopped. */
.neck-wrap {
  overflow-x: auto; background: #f7efe0; border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px 4px; margin: 14px 0;
}
.neck-svg { display: block; width: 100%; min-width: 560px; height: auto; }
.neck-board { fill: #efe0c6; stroke: #d9c39b; }
.neck-nut { stroke: #8a6f4a; stroke-width: 5; stroke-linecap: round; }
.neck-string { stroke: #7d6a4a; stroke-linecap: round; }
.neck-string.is-drone { stroke: #b3a487; }
.neck-end { fill: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.neck-name { fill: var(--ink); font-size: 15px; font-weight: 800; }
.neck-role { fill: var(--muted); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.neck-drone { fill: var(--muted); font-size: 12px; font-style: italic; }

.neck-pos { cursor: pointer; }
.neck-pos circle { fill: #fff; stroke: var(--terra); stroke-width: 2; transition: transform 0.12s ease, fill 0.12s ease; transform-box: fill-box; transform-origin: center; }
.neck-pos .neck-swar { fill: var(--ink); font-size: 13px; font-weight: 800; pointer-events: none; }
.neck-pos .neck-finger { fill: var(--muted); font-size: 11px; font-weight: 700; pointer-events: none; }
.neck-pos.is-open circle { fill: #f3e6cf; stroke-dasharray: 3 3; }
.neck-pos.is-drone circle { fill: #e6ddc9; stroke: #b3a487; }
.neck-pos.f1 circle { stroke: #2a7a62; }
.neck-pos.f2 circle { stroke: #c88a2e; }
.neck-pos.f3 circle { stroke: #b4503a; }
.neck-pos.fx circle { stroke: #8a7bb0; stroke-dasharray: 4 3; }
.neck-pos:hover circle, .neck-pos:focus-visible circle { transform: scale(1.18); fill: #f7efe0; }
.neck-pos:focus-visible { outline: none; }
.neck-pos:focus-visible circle { stroke-width: 3.5; }
.neck-pos.lit circle { fill: var(--terra); transform: scale(1.22); }
.neck-pos.lit .neck-swar { fill: #fff; }

.neck-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 8px 0 2px; font-size: 0.84rem; color: var(--muted); }
.neck-legend span { display: inline-flex; align-items: center; gap: 6px; }
.neck-legend i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid; background: #fff; }
.neck-legend .k1 { border-color: #2a7a62; }
.neck-legend .k2 { border-color: #c88a2e; }
.neck-legend .k3 { border-color: #b4503a; }
.neck-legend .kx { border-color: #8a7bb0; border-style: dashed; }
.neck-legend .k0 { border-color: var(--terra); border-style: dashed; background: #f3e6cf; }

/* —— Phrase cards —— */
.play-card { margin: 14px 0; }
.play-card .pattern {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1.02rem; letter-spacing: 0.05em; margin: 0.35rem 0 0.7rem; color: #3d2c1c;
}
.play-card .hint { font-size: 0.9rem; color: var(--muted); margin: 0 0 0.6rem; }
.play-card .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; min-height: 1.9em; }
.play-card .chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.8em; padding: 4px 9px; border-radius: 8px; cursor: pointer;
  background: #f3e6cf; font-weight: 700; font-size: 0.88rem;
  font-family: ui-monospace, Consolas, monospace;
}
.play-card .chip:hover { background: #ecdbbd; }
.play-card .chip.slide { background: #e4ecdd; box-shadow: inset 2px 0 0 var(--green); }
/* A held beat: the same note continuing, so it is the same chip drawn quieter
   rather than a gap. One chip per beat means the row can be counted. */
.play-card .chip.hold { background: #f7efe0; color: #b3a487; }
.play-card .chip.on { background: var(--terra); color: #fff; }
.play-card .chip.hold.on { background: var(--terra-soft, #c9714f); color: #fff; }
.play-card .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* —— The four strings, as a table you can bow —— */
table.strings td, table.strings th { padding: 8px 11px; }
table.strings tr.sounding { background: #eef3e7; }
table.strings tr.is-drone td { color: var(--muted); }
table.strings .gauge { display: inline-block; height: 3px; border-radius: 2px; background: #7d6a4a; vertical-align: middle; }

/* —— The drone switch ——
   A switch, not a play button: it is meant to stay on while you do something else. */
.drone-switch {
  display: inline-flex; align-items: center; gap: 10px; margin: 10px 0;
  padding: 10px 14px; border-radius: 10px; background: #f7efe0; border: 1px solid var(--line);
  font-weight: 700; cursor: pointer;
}
.drone-switch input { width: 1.1rem; height: 1.1rem; accent-color: var(--green, #2a7a62); }
.drone-switch .sub { display: block; font-weight: 400; font-size: 0.84rem; color: var(--muted); }

/* —— The meend slider —— */
.meend-slider { margin: 14px 0; }
.meend-slider .track { display: flex; align-items: center; gap: 12px; }
.meend-slider input[type="range"] {
  flex: 1; min-width: 12rem; accent-color: var(--terra);
}
.meend-slider .readout {
  min-width: 5.5rem; text-align: center; font-family: ui-monospace, Consolas, monospace;
  font-size: 1.15rem; font-weight: 700; color: var(--terra);
  font-variant-numeric: tabular-nums;
}
.meend-slider .ends {
  display: flex; justify-content: space-between; font-size: 0.82rem;
  color: var(--muted); margin-top: 4px;
}

/* —— Anatomy and reference lists —— */
.anatomy-list { columns: 1; }
@media (min-width: 700px) { .anatomy-list { columns: 2; gap: 1.6rem; } }
.anatomy-list li { break-inside: avoid; margin: 0.45rem 0; }
.cols { columns: 1; }
@media (min-width: 760px) { .cols { columns: 2; gap: 1.7rem; } }
.cols li, .cols p { break-inside: avoid; }

.routine-day {
  border-left: 4px solid var(--ochre); padding: 10px 14px; margin: 12px 0;
  background: var(--panel); border-radius: 0 10px 10px 0;
}
.routine-day h3 { margin: 0 0 6px; }

/* —— A taal grid, for jhyaure —— */
table.taal { border-collapse: collapse; margin: 12px 0; font-family: ui-monospace, Consolas, monospace; }
table.taal th, table.taal td {
  border: 1px solid #e2d4bb; padding: 7px 10px; text-align: center; min-width: 3.1rem;
}
table.taal th { background: #f7efe0; font-size: 0.78rem; color: var(--muted); font-family: var(--font-sans); }
table.taal td.sam { background: #fbf1da; font-weight: 800; }
table.taal td.rest { color: #c9bda6; }

/* —— Figures —— */
figure.lesson-fig { margin: 18px 0 8px; max-width: 720px; }
figure.lesson-fig img {
  display: block; width: 100%; height: auto; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--panel);
}
figure.lesson-fig figcaption { margin-top: 8px; font-size: 0.9rem; color: var(--muted); line-height: 1.45; }
figure.lesson-fig .credit { display: block; margin-top: 4px; font-size: 0.78rem; color: var(--muted); }
figure.lesson-fig .credit a { color: var(--muted); text-decoration: underline; }

@media (max-width: 820px) {
  h1 { font-size: 1.75rem; }
  .neck-svg { min-width: 520px; }
}
