/* Basuri room layout — tokens from css/sangeet-theme.css */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

a { color: var(--terra); }
a:hover { color: var(--terra-soft); }

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;
}
figure.lesson-fig {
  margin: 18px 0 8px;
  max-width: 720px;
}
figure.lesson-fig img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
}
figure.lesson-fig.fig-contain img {
  max-height: none;
  object-fit: contain;
  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; }
.fig-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 16px 0;
}
.fig-row figure.lesson-fig {
  flex: 1 1 280px;
  margin: 0;
  max-width: none;
}
.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; }
.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; }
table.fingering { border-collapse: collapse; width: max-content; max-width: 100%; max-width: 520px; margin: 10px 0; font-size: 0.95rem; }
table.fingering th, table.fingering td { text-align: left; padding: 7px 10px; border-bottom: 1px solid #eadfce; }
table.fingering th { color: var(--terra); font-weight: 800; }
.holes {
  display: inline-flex; gap: 5px; align-items: center; font-family: ui-monospace, Consolas, monospace;
  letter-spacing: 0.04em;
}
.hole {
  width: 1.1em; height: 1.1em; border-radius: 50%; border: 2px solid var(--ink);
  display: inline-block; vertical-align: middle;
}
.hole.closed { background: var(--ink); }
.hole.open { background: transparent; }
/* Half-cover: pad still on the near half, slit open toward the far edge */
.hole.half {
  background: linear-gradient(90deg, var(--ink) 52%, transparent 52%);
}
.fingering-demo {
  display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: flex-start;
  margin: 12px 0 4px;
}
.fingering-demo .demo {
  min-width: 9.5rem;
}
.fingering-demo .demo .label {
  display: block; font-size: 0.82rem; font-weight: 700; color: var(--terra);
  margin-bottom: 4px;
}
.fingering-demo .demo .holes { font-size: 1.15rem; }
.fingering-demo .demo .hint {
  display: block; font-size: 0.78rem; color: var(--muted); margin-top: 4px; max-width: 11rem;
}

.play-card { margin: 14px 0; }
.play-card .sargam {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1.05rem; letter-spacing: 0.04em; margin: 0.35rem 0 0.75rem;
  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 10px; min-height: 1.8em;
}
.play-card .chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.7em; padding: 3px 8px; border-radius: 8px;
  background: #f3e6cf; font-weight: 700; font-size: 0.88rem;
}
.play-card .chip.on { background: var(--terra); color: #fff; }
.play-card .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn.stop { background: #5a4a34; }
.btn.stop:hover { background: #3d2c1c; }
.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; }
.tuner-card { max-width: 34rem; }
.tuner-actions {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px;
}
.tuner-mode {
  font-size: 0.88rem; color: var(--muted); display: inline-flex; gap: 6px; align-items: center;
}
.tuner-mode select {
  font: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--ink);
}
.btn.live { background: var(--green, #2a7a62); }
.tuner-readout {
  text-align: center; padding: 18px 10px 8px; margin: 8px 0 4px;
  border-radius: 12px; background: #f7efe0;
}
.tuner-swar {
  font-family: var(--font-display); font-size: clamp(2.8rem, 10vw, 4rem);
  font-weight: 600; line-height: 1; color: var(--terra); margin: 0;
}
.tuner-name { font-size: 1.05rem; color: #4a3728; margin: 8px 0 4px; }
.tuner-hz {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1.35rem; font-weight: 700; color: var(--ink); margin: 6px 0;
}
.tuner-west { font-size: 0.92rem; color: var(--muted); }
.cents-meter { margin: 18px 0 10px; }
.cents-track {
  position: relative; height: 14px; border-radius: 999px;
  background: linear-gradient(90deg, #e8c4a8, #eef3e7 50%, #e8c4a8);
  border: 1px solid var(--line);
}
.cents-needle {
  position: absolute; top: -4px; width: 4px; height: 22px; margin-left: -2px;
  border-radius: 2px; background: var(--muted); left: 50%;
  transition: left 0.08s linear, background 0.15s ease;
}
.cents-needle.hearing { background: var(--terra); }
.cents-needle.in-tune { background: var(--green, #2a7a62); }
.cents-mark {
  position: absolute; top: 18px; font-size: 0.72rem; color: var(--muted);
}
.cents-mark.left { left: 0; }
.cents-mark.mid { left: 50%; transform: translateX(-50%); }
.cents-mark.right { right: 0; }
.cents-value { margin-top: 22px; font-size: 0.9rem; color: var(--muted); text-align: center; }
.tuner-meta {
  display: flex; flex-wrap: wrap; gap: 12px 20px; justify-content: space-between;
  font-size: 0.9rem; color: var(--muted); margin-top: 8px;
}
.ladder-overview .ladder-steps { padding-left: 1.2rem; margin: 0.5rem 0; }
.ladder-overview .ladder-steps li { margin: 0.45rem 0; }
.ladder-overview .bridge-step {
  background: #fceee6; margin-left: -8px; padding: 6px 8px; border-radius: 8px;
  list-style-position: inside;
}
@media (max-width: 820px) {
  
  h1 { font-size: 1.75rem; }
}

/* Flute layout calculator */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 12px 14px;
  margin: 12px 0;
}
.calc-field label {
  display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 4px;
}
.calc-field input, .calc-field select {
  width: 100%; font: inherit; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
}
.calc-field .hint { font-size: 0.8rem; color: var(--muted); margin: 4px 0 0; }
.calc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.calc-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 10px; margin: 14px 0;
}
.calc-stat {
  background: #f7efe0; border-radius: 10px; padding: 10px 12px;
  border: 1px solid var(--line);
}
.calc-stat strong {
  display: block; font-size: 1.15rem; color: var(--terra); font-variant-numeric: tabular-nums;
}
.calc-stat span { font-size: 0.78rem; color: var(--muted); }
table.calc-table { width: max-content; max-width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 10px 0; }
table.calc-table th, table.calc-table td {
  text-align: left; padding: 7px 8px; border-bottom: 1px solid #eadfce;
  vertical-align: top;
}
table.calc-table th { color: var(--terra); font-weight: 800; font-size: 0.8rem; }
table.calc-table td.num { font-variant-numeric: tabular-nums; font-family: ui-monospace, Consolas, monospace; }
.flute-svg-wrap {
  overflow-x: auto; background: #f7efe0; border: 1px solid var(--line);
  border-radius: 12px; padding: 12px; margin: 14px 0;
}
.flute-svg-wrap svg { display: block; width: 100%; min-width: 520px; height: auto; }
.anatomy-list { columns: 1; }
@media (min-width: 700px) { .anatomy-list { columns: 2; gap: 1.5rem; } }
.anatomy-list li { break-inside: avoid; margin: 0.4rem 0; }
