/* Shared layout and notation styles for Eastern Singing lessons */
#alankars .sargam-line { margin: 8px 0 4px; }
#custom-alankar-err { color: var(--terra); font-size: 0.88rem; min-height: 1.2em; margin: 6px 0 0; }
#custom-alankar-input { width: 100%; min-height: 4.5em; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); font-family: ui-monospace, Consolas, monospace; font-size: 0.95rem; background: #fffdf8; color: var(--ink); resize: vertical; }
#custom-saved-list { margin: 4px 0 10px; display: flex; flex-direction: column; gap: 6px; }
#custom-saved-list:empty::before { content: 'No saved alankars yet — write one and hit Save.'; color: var(--muted); font-size: 0.88rem; }
#intro > h2 { margin-top: 0; border-bottom: none; padding-bottom: 0; }
#own-tunes .tunes-go { display: inline-block; margin: 6px 0 8px; padding: 10px 16px; background: var(--terra); color: #fff; font-weight: 700; border-radius: 10px; text-decoration: none; }
#own-tunes .tunes-go:hover { background: var(--terra-soft); color: #fff; }
#own-tunes > h2 { font-size: 2.15rem; line-height: 1.2; margin: 56px 0 12px; border-bottom-width: 4px; }
#pitch-meter { position: fixed; left: 0; right: 0; z-index: 49; bottom: var(--pitch-meter-bottom, 72px); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 14px; background: #3a2a1c; color: #fdf6e9; border-top: 1px solid #5a4a34; box-shadow: 0 -2px 12px rgba(0, 0, 0, .2); font-size: 0.82rem; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
#pitch-meter #micBtn { padding: 6px 12px; border-radius: 8px; border: 1px solid #6b5340; background: #5a4330; color: #fdf6e9; cursor: pointer; font-weight: 700; }
#pitch-meter #micBtn.live { background: #5c7a4a; border-color: #7a9a68; }
#pitch-meter #micBtn.on { background: #5c7a4a; border-color: #7a9a68; }
#pitch-meter #micBtn:hover { background: #c8663a; border-color: #c8663a; }
#pitch-meter #micMode { padding: 5px 8px; border-radius: 6px; border: 1px solid #6b5340; background: #2f2015; color: #fdf6e9; font-size: 0.8rem; }
#pitch-meter .pm-cents { min-width: 3.5em; font-weight: 700; color: #d9a441; }
#pitch-meter .pm-cents.off { color: #ff2d9b; }
#pitch-meter .pm-cents.on { color: #22d17c; }
#pitch-meter .pm-gauge { flex: 1 1 140px; min-width: 120px; max-width: 220px; height: 28px; position: relative; border-radius: 6px; background: linear-gradient(90deg, #5a3048 0%, #3a3a2a 42%, #2f4a38 50%, #3a3a2a 58%, #5a3048 100%); border: 1px solid #6b5340; overflow: hidden; }
#pitch-meter .pm-gauge::before { content: ""; position: absolute; left: 50%; top: 2px; bottom: 2px; width: 2px; margin-left: -1px; background: rgba(253, 246, 233, 0.55); }
#pitch-meter .pm-hint { flex: 1 1 100%; margin: 0; font-size: 0.72rem; color: #c4b090; line-height: 1.3; }
#pitch-meter .pm-hint.hidden { display: none; }
#pitch-meter .pm-labels { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; font-variant-numeric: tabular-nums; }
#pitch-meter .pm-labels strong { font-weight: 800; color: #f0d9b0; }
#pitch-meter .pm-needle { position: absolute; top: 3px; bottom: 3px; width: 4px; margin-left: -2px; border-radius: 2px; background: #ff2d9b; left: 50%; transition: left 0.05s linear, background 0.1s; opacity: 0.25; }
#pitch-meter .pm-needle.live { opacity: 1; }
#pitch-meter .pm-needle.on { background: #22d17c; }
.alankar-run { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 2px 0 18px; font-size: 0.88rem; color: var(--muted); }
.alankar-run input[type=number] { width: 3.2em; padding: 3px 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); font: inherit; }
.alankar-run label { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-weight: 500; }
.alankar-score { font-variant-numeric: tabular-nums; color: var(--terra); font-weight: 700; min-width: 2.6em; }
.alankar-thaat { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 16px 0 18px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); font-family: system-ui, "Segoe UI", sans-serif; }
.alankar-thaat label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.alankar-thaat select { font: inherit; font-weight: 500; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.alankar-thaat-notes { font-size: 0.92rem; color: var(--muted); }
.badge { display:inline-block; background: var(--terra); color:#fff; font-size:.72rem; font-weight:700; padding:3px 10px; border-radius: 20px; letter-spacing:.04em; vertical-align: middle; margin-left: 8px; }
.custom-pad { margin: 12px 0 14px; }
.custom-save-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 8px; }
.custom-save-row button { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-weight: 600; color: var(--ink); }
.custom-save-row button.primary { background: var(--terra); color: #fff; border-color: var(--terra); }
.custom-save-row button:hover { border-color: var(--terra); }
.custom-save-row input[type="text"] { flex: 1 1 12em; min-width: 10em; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: #fffdf8; color: var(--ink); font-size: 0.95rem; }
.custom-saved-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf8; }
.custom-saved-item .actions { display: flex; gap: 6px; }
.custom-saved-item .actions button { padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-size: 0.85rem; color: var(--ink); }
.custom-saved-item .actions button.danger:hover { border-color: #a33; color: #a33; }
.custom-saved-item .actions button:hover { border-color: var(--terra); }
.custom-saved-item .meta { color: var(--muted); font-size: 0.8rem; }
.custom-saved-item .name { flex: 1 1 8em; font-weight: 600; cursor: pointer; border: none; background: none; text-align: left; padding: 0; color: var(--ink); font-size: 0.95rem; }
.custom-saved-item .name:hover { color: var(--terra); }
.custom-saved-item.active { border-color: var(--ochre); background: #faf3e0; }
.grid-wrap { overflow-x: auto; margin: 14px 0 6px; }
.harm-blacks { position: absolute; left: 0; top: 0; right: 0; height: var(--bk-h); z-index: 2; pointer-events: none; }
.harm-key { margin: 0; padding: 0; cursor: pointer; font-family: inherit; -webkit-tap-highlight-color: transparent; pointer-events: auto; }
.harm-key .key-labels { display: flex; flex-direction: column; align-items: center; gap: 1px; padding-bottom: 0; pointer-events: none; }
.harm-key .name { font-size: 0.55rem; font-weight: 700; line-height: 1.05; pointer-events: none; opacity: 0.92; position: relative; }
.harm-key .name.name-komal { text-decoration: underline; text-underline-offset: 1px; }
.harm-key .name.name-tivra { padding-top: 0.3em; background-image: linear-gradient(currentColor, currentColor); background-size: 1.2px 0.22em; background-position: center 0; background-repeat: no-repeat; }
.harm-key .pitch { font-size: 0.68rem; font-weight: 800; line-height: 1.1; pointer-events: none; letter-spacing: -0.02em; }
.harm-key.black { position: absolute; top: 0; width: var(--bk-w); height: 100%; border: 1px solid #0a0806; border-radius: 0 0 4px 4px; background: linear-gradient(180deg, #4a4540 0%, #1c1814 55%, #0e0c0a 100%); color: #e8dcc8; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 0.28rem; box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.45); transform: translateX(-50%); }
.harm-key.black .name { font-size: 0.45rem; font-weight: 600; }
.harm-key.black .pitch { font-size: 0.55rem; }
.harm-key.black.active-tap { background: linear-gradient(180deg, #2e2a26 0%, #12100e 100%); box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.5); }
.harm-key.black.is-sa { box-shadow: 0 0 0 2px var(--ochre), inset 0 2px 3px rgba(0, 0, 0, 0.45); }
.harm-key.black.is-sa-pc .pitch { color: var(--ochre); }
.harm-key.black.playing { background: linear-gradient(180deg, #2e2a26 0%, #12100e 100%); box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.5); }
.harm-key.black:active { background: linear-gradient(180deg, #2e2a26 0%, #12100e 100%); box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.5); }
.harm-key.black:hover { background: linear-gradient(180deg, #5a554e 0%, #2a2420 100%); }
.harm-key.is-sa-pc .pitch { color: var(--terra); }
.harm-key.white { width: var(--wk); height: 100%; border: 1px solid #8a7a68; border-bottom-width: 3px; border-radius: 0 0 5px 5px; background: linear-gradient(180deg, #fffcf6 0%, #f3ebe0 70%, #e6dccf 100%); color: #3d2b1f; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 0.35rem; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.06); }
.harm-key.white.active-tap { background: linear-gradient(180deg, #ebe2d4 0%, #d9cbb8 100%); border-bottom-width: 1px; padding-bottom: calc(0.35rem + 2px); }
.harm-key.white.is-sa { box-shadow: inset 0 -3px 0 var(--terra); }
.harm-key.white.playing { background: linear-gradient(180deg, #ebe2d4 0%, #d9cbb8 100%); border-bottom-width: 1px; padding-bottom: calc(0.35rem + 2px); }
.harm-key.white:active { background: linear-gradient(180deg, #ebe2d4 0%, #d9cbb8 100%); border-bottom-width: 1px; padding-bottom: calc(0.35rem + 2px); }
.harm-key.white:hover { background: linear-gradient(180deg, #fff 0%, #f7f0e6 100%); }
.harm-keys { position: relative; height: calc(var(--wk) * 4.6); display: flex; }
.harm-octave { position: relative; display: flex; flex-direction: column; align-items: center; }
.harm-octave + .harm-octave { margin-left: 3px; padding-left: 3px; border-left: 1px dashed rgba(240, 210, 160, 0.22); }
.harm-octave-label { margin-top: 5px; font-size: 0.68rem; color: #d4b896; letter-spacing: 0.04em; font-weight: 600; }
.harm-whites { display: flex; height: 100%; position: relative; z-index: 1; }
.harmonium-brand { font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; font-size: 0.95rem; letter-spacing: 0.06em; color: #f0d9b0; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45); }
.harmonium-case { --wk: clamp(1.7rem, 3.2vw, 2.35rem); --bk-w: calc(var(--wk) * 0.62); --bk-h: 58%; background: linear-gradient(180deg, rgba(255, 220, 170, 0.12), transparent 28%), linear-gradient(90deg, #5c3a22 0%, #7a4e2e 18%, #5a3820 50%, #7a4e2e 82%, #4a2e1a 100%); border-radius: 12px 12px 8px 8px; padding: 10px 10px 8px; box-shadow: inset 0 1px 0 rgba(255, 230, 190, 0.22), inset 0 -2px 0 rgba(0, 0, 0, 0.25), 0 10px 28px rgba(40, 20, 8, 0.28); border: 1px solid #3a2414; }
.harmonium-keyboard { display: flex; align-items: flex-end; gap: 0; min-width: max-content; margin: 0 auto; position: relative; }
.harmonium-keyboard-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 5px; background: #140e0a; border: 2px solid #24180f; padding: 10px 8px 6px; }
.harmonium-stops { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.harmonium-stops .cap { width: auto; height: auto; border-radius: 3px; padding: 2px 7px; font-size: 0.62rem; color: #e8d0a8; background: #3d2818; border: 1px solid #2a1a10; letter-spacing: 0.04em; }
.harmonium-stops span { width: 1.15rem; height: 1.15rem; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #d4b896, #6b4a2e 55%, #2a180c); border: 1px solid #1a1008; box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.4); }
.harmonium-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 2px 8px; flex-wrap: wrap; }
.harmonium-utils { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; padding: 0 2px; }
.harmonium-utils button.util { min-width: auto; padding: 6px 10px; border-radius: 6px; border: 1px solid #3a2818; background: #6b4a30; color: #f0d9b0; cursor: pointer; font-size: 0.82rem; font-weight: 600; }
.harmonium-utils button.util:hover { background: #7d5738; border-color: #f0d9b0; }
.lead { font-size: 1.12rem; color: #4a3728; }
.name.oct-high::before { content: "•"; position: absolute; left: 50%; top: 0; transform: translate(-50%, -85%); font-size: 0.55em; line-height: 1; color: inherit; text-decoration: none; pointer-events: none; }
.name.oct-low::after { content: "•"; position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 70%); font-size: 0.55em; line-height: 1; color: inherit; text-decoration: none; pointer-events: none; }
.pivot-palta { margin: 16px 0 18px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: #faf3e6; }
.pivot-palta .pivot-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 10px; }
.pivot-palta button.primary { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--terra); background: var(--terra); color: #fff; cursor: pointer; font-weight: 600; font-size: 0.9rem; }
.pivot-palta button.primary:hover { filter: brightness(1.05); }
.pivot-palta h4 { margin: 0 0 6px; font-size: 1.05rem; }
.pivot-palta label { font-size: 0.9rem; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.pivot-palta select { padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: #fffdf8; color: var(--ink); font-size: 0.9rem; }
.placeholder { border: 2px dashed var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--muted); font-size: 0.92rem; margin: 18px 0; background: #faf3e6; }
.playbtn { background: var(--terra); color:#fff; border:none; width:30px; height:30px; border-radius:50%; cursor:pointer; font-size:.75rem; line-height:1; display:inline-flex; align-items:center; justify-content:center; padding:0; vertical-align: middle; margin-right: 6px; }
.playbtn.playing { background: var(--green); width: auto; min-width: 30px; padding: 0 10px; border-radius: 15px; font-size: .68rem; font-weight: 700; letter-spacing: .02em; }
.playbtn:hover { background: var(--terra-soft); }
.sargam-line .tok:focus-visible { outline: 2px solid var(--terra); outline-offset: 1px; }
.sargam-line .tok:hover { background: #ead7b0; outline: 1px solid var(--terra); }
.sw { display:inline-block; padding: 2px 9px; border-radius: 20px; font-weight: 700; font-size: 0.82rem; color:#fff; background: var(--terra); }
.sw-fixed { background: var(--green); }
.sw-komal { background: #6b6152; }
.sw-tivra { background: var(--ochre); color:#3d2b1f; }
.sw.name-komal { text-decoration: underline; text-underline-offset: 2px; }
.sw.name-tivra { position: relative; display: inline-block; padding-top: 0.42em; background-image: linear-gradient(currentColor, currentColor); background-size: 1.5px 0.38em; background-position: center 0.02em; background-repeat: no-repeat; }
.sw.oct-high { position: relative; }
.sw.oct-high::before { content: "•"; position: absolute; left: 50%; top: 0; transform: translate(-50%, -85%); font-size: 0.55em; line-height: 1; color: inherit; text-decoration: none; pointer-events: none; }
.sw.oct-low { position: relative; }
.sw.oct-low::after { content: "•"; position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 70%); font-size: 0.55em; line-height: 1; color: inherit; text-decoration: none; pointer-events: none; }
.swara-board { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.swara-key { position: relative; min-width: 48px; padding: 14px 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; text-align: center; font-weight: 700; font-size: 0.85rem; color: var(--ink); box-shadow: var(--shadow); }
.swara-key small { display:block; font-weight:500; font-size:.68rem; color:var(--muted); }
.swara-key.active { background: var(--ochre); border-color: var(--ochre); }
.swara-key.fixed { border-bottom: 3px solid var(--green); }
.swara-key.komal { color: #5a4a34; background: #f3e6cf; }
.swara-key.tivra { color: #3d2b1f; background: #f7e8c4; }
.swara-key:hover { border-color: var(--terra); }
.tok.name-komal { text-decoration: underline; text-underline-offset: 2px; }
body.sangeet-has-practice-bar.sangeet-has-pitch-meter .wrap { padding-bottom: 168px; }
body.sangeet-has-practice-bar.sangeet-has-pitch-meter main { padding-bottom: 168px; }
code { background: #f3e6cf; padding: 1px 6px; border-radius: 5px; font-size: .9em; }
h1 { font-size: 2.3rem; line-height: 1.15; margin: 0 0 10px; }
h3 { font-size: 1.2rem; margin: 30px 0 8px; color: var(--terra); }
h4 { font-size: 1.05rem; margin: 22px 0 6px; color: var(--terra-soft); }
p { margin: 0 0 14px; }
pre.sargam { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; overflow-x: auto; font-family: ui-monospace, Consolas, monospace; font-size: 0.95rem; line-height: 1.7; box-shadow: var(--shadow); }
section > h2 { font-size: 1.7rem; margin: 56px 0 14px; padding-bottom: 8px; border-bottom: 3px solid var(--ochre); display: inline-block; }
table { border-collapse: collapse; width: max-content; max-width: 100%; margin: 16px 0; font-size: 0.96rem; background: var(--panel); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.grid { width: auto; min-width: max-content; max-width: 100%; text-align: center; }
table.grid .sam { box-shadow: inset 0 3px 0 var(--terra); }
table.grid td { text-align: center; white-space: nowrap; padding: 8px 10px; }
table.grid td.beat-on { background: var(--ochre) !important; }
table.grid th { text-align: center; white-space: nowrap; padding: 8px 10px; }
table.grid thead th { background: #efe0c6; color: var(--muted); font-weight: 600; font-size: .82rem; }
td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: none; }
ul.check { list-style: none; padding-left: 0; }
ul.check li { padding: 6px 0 6px 30px; position: relative; }
ul.check li::before { content: "☐"; position: absolute; left: 4px; color: var(--terra); font-size: 1.1rem; }
@media (max-width: 820px) {
  #pitch-meter { font-size: 0.78rem; padding: 7px 10px; gap: 6px 8px; }
  body.sangeet-has-practice-bar.sangeet-has-pitch-meter .wrap { padding-bottom: 190px; }
  body.sangeet-has-practice-bar.sangeet-has-pitch-meter main { padding-bottom: 190px; }
  h1 { font-size: 1.8rem; }
}

/* Additional shared Eastern Singing table & harmonium rules */
.harm-key.black.playing { background: linear-gradient(180deg, #8a6a3a 0%, #3a2818 100%); color: #fff6e0; box-shadow: 0 0 0 1px var(--ochre), inset 0 2px 3px rgba(0, 0, 0, 0.45); }
.harm-key.white.playing { background: linear-gradient(180deg, #f6e4bc 0%, #e2c07a 100%); border-color: var(--ochre); box-shadow: inset 0 -2px 0 rgba(180, 120, 40, 0.25); }
.playbtn.playing { background: var(--green); }
.sw { position: relative; display: inline-block; }
th { background: #f3e6cf; font-weight: 700; }

/* BEGIN DARK (generated by scripts/gen_dark.py; do not edit) */
html[data-theme="dark"] #custom-alankar-err {
  color: var(--terra);
}
html[data-theme="dark"] #custom-alankar-input {
  border: 1px solid var(--line);
  background: #2a210b;
  color: var(--ink);
}
html[data-theme="dark"] #custom-saved-list:empty::before {
  color: var(--muted);
}
html[data-theme="dark"] #intro > h2 {
  border-bottom: none;
}
html[data-theme="dark"] #own-tunes .tunes-go {
  background: #b5451d;
  color: #ffffff;
}
html[data-theme="dark"] #own-tunes .tunes-go:hover {
  background: #c8663a;
  color: #ffffff;
}
html[data-theme="dark"] #pitch-meter {
  background: #3a2a1c;
  color: #fdf6e9;
  border-top: 1px solid #977c57;
}
html[data-theme="dark"] #pitch-meter #micBtn {
  border: 1px solid #6b5340;
  background: #5a4330;
  color: #fdf6e9;
}
html[data-theme="dark"] #pitch-meter #micBtn.live {
  background: #5c7a4a;
  border-color: #7a9a68;
}
html[data-theme="dark"] #pitch-meter #micBtn.on {
  background: #5c7a4a;
  border-color: #7a9a68;
}
html[data-theme="dark"] #pitch-meter #micBtn:hover {
  background: #c8663a;
  border-color: #c8663a;
}
html[data-theme="dark"] #pitch-meter #micMode {
  border: 1px solid #6b5340;
  background: #2f2015;
  color: #fdf6e9;
}
html[data-theme="dark"] #pitch-meter .pm-cents {
  color: #e7c688;
}
html[data-theme="dark"] #pitch-meter .pm-cents.off {
  color: #e774b0;
}
html[data-theme="dark"] #pitch-meter .pm-cents.on {
  color: #84ebb9;
}
html[data-theme="dark"] #pitch-meter .pm-gauge {
  background: linear-gradient(90deg, #5a3048 0%, #3a3a2a 42%, #2f4a38 50%, #3a3a2a 58%, #5a3048 100%);
  border: 1px solid #6b5340;
}
html[data-theme="dark"] #pitch-meter .pm-gauge::before {
  background: rgba(44, 33, 15, 0.55);
}
html[data-theme="dark"] #pitch-meter .pm-hint {
  color: #cdbda2;
}
html[data-theme="dark"] #pitch-meter .pm-labels strong {
  color: #f0d9b0;
}
html[data-theme="dark"] #pitch-meter .pm-needle {
  background: #ff2d9b;
}
html[data-theme="dark"] #pitch-meter .pm-needle.on {
  background: #255e42;
}
html[data-theme="dark"] .alankar-run {
  color: var(--muted);
}
html[data-theme="dark"] .alankar-run input[type=number] {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}
html[data-theme="dark"] .alankar-score {
  color: var(--terra);
}
html[data-theme="dark"] .alankar-thaat {
  background: var(--panel);
  border: 1px solid var(--line);
}
html[data-theme="dark"] .alankar-thaat label {
  color: var(--ink);
}
html[data-theme="dark"] .alankar-thaat select {
  border: 1px solid var(--line);
  background: #1a1a1a;
  color: var(--ink);
}
html[data-theme="dark"] .alankar-thaat-notes {
  color: var(--muted);
}
html[data-theme="dark"] .badge {
  background: #b5451d;
  color: #ffffff;
}
html[data-theme="dark"] .custom-save-row button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}
html[data-theme="dark"] .custom-save-row button.primary {
  background: #b5451d;
  color: #ffffff;
  border-color: var(--terra);
}
html[data-theme="dark"] .custom-save-row button:hover {
  border-color: var(--terra);
}
html[data-theme="dark"] .custom-save-row input[type="text"] {
  border: 1px solid var(--line);
  background: #2a210b;
  color: var(--ink);
}
html[data-theme="dark"] .custom-saved-item {
  border: 1px solid var(--line);
  background: #2a210b;
}
html[data-theme="dark"] .custom-saved-item .actions button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}
html[data-theme="dark"] .custom-saved-item .actions button.danger:hover {
  border-color: #aa3333;
  color: #cc8f8f;
}
html[data-theme="dark"] .custom-saved-item .actions button:hover {
  border-color: var(--terra);
}
html[data-theme="dark"] .custom-saved-item .meta {
  color: var(--muted);
}
html[data-theme="dark"] .custom-saved-item .name {
  border: none;
  background: none;
  color: var(--ink);
}
html[data-theme="dark"] .custom-saved-item .name:hover {
  color: var(--terra);
}
html[data-theme="dark"] .custom-saved-item.active {
  border-color: var(--ochre);
  background: #2c2512;
}
html[data-theme="dark"] .harm-key.black {
  border: 1px solid #a78a6d;
  background: linear-gradient(180deg, #4a4540 0%, #1c1814 55%, #0e0c0a 100%);
  color: #e8dcc8;
}
html[data-theme="dark"] .harm-key.black.active-tap {
  background: linear-gradient(180deg, #2e2a26 0%, #12100e 100%);
}
html[data-theme="dark"] .harm-key.black.is-sa-pc .pitch {
  color: var(--ochre);
}
html[data-theme="dark"] .harm-key.black.playing {
  background: linear-gradient(180deg, #2e2a26 0%, #12100e 100%);
}
html[data-theme="dark"] .harm-key.black:active {
  background: linear-gradient(180deg, #2e2a26 0%, #12100e 100%);
}
html[data-theme="dark"] .harm-key.black:hover {
  background: linear-gradient(180deg, #5a554e 0%, #2a2420 100%);
}
html[data-theme="dark"] .harm-key.is-sa-pc .pitch {
  color: var(--terra);
}
html[data-theme="dark"] .harm-key.white {
  border: 1px solid #8a7a68;
  background: linear-gradient(180deg, #2b200b 0%, #282117 70%, #2b251e 100%);
  color: #dccfc6;
}
html[data-theme="dark"] .harm-key.white.active-tap {
  background: linear-gradient(180deg, #2b251b 0%, #312b22 100%);
}
html[data-theme="dark"] .harm-key.white.playing {
  background: linear-gradient(180deg, #2b251b 0%, #312b22 100%);
}
html[data-theme="dark"] .harm-key.white:active {
  background: linear-gradient(180deg, #2b251b 0%, #312b22 100%);
}
html[data-theme="dark"] .harm-key.white:hover {
  background: linear-gradient(180deg, #1a1a1a 0%, #282015 100%);
}
html[data-theme="dark"] .harm-octave + .harm-octave {
  border-left: 1px dashed rgba(96, 74, 38, 0.22);
}
html[data-theme="dark"] .harm-octave-label {
  color: #d6ba9a;
}
html[data-theme="dark"] .harmonium-brand {
  color: #f0d9b0;
}
html[data-theme="dark"] .harmonium-case {
  background: linear-gradient(180deg, rgba(61, 42, 15, 0.12), transparent 28%), linear-gradient(90deg, #5c3a22 0%, #7a4e2e 18%, #5a3820 50%, #7a4e2e 82%, #4a2e1a 100%);
  border: 1px solid #be7743;
}
html[data-theme="dark"] .harmonium-keyboard-wrap {
  background: #140e0a;
  border: 2px solid #b77d52;
}
html[data-theme="dark"] .harmonium-stops .cap {
  color: #e8d0a8;
  background: #3d2818;
  border: 1px solid #bb774c;
}
html[data-theme="dark"] .harmonium-stops span {
  background: radial-gradient(circle at 35% 30%, #3c3124, #6b4a2e 55%, #2a180c);
  border: 1px solid #c78048;
}
html[data-theme="dark"] .harmonium-utils button.util {
  border: 1px solid #b57d4b;
  background: #6b4a30;
  color: #f0d9b0;
}
html[data-theme="dark"] .harmonium-utils button.util:hover {
  background: #7d5738;
  border-color: #5c4927;
}
html[data-theme="dark"] .lead {
  color: #d2c5ba;
}
html[data-theme="dark"] .name.oct-high::before {
  color: inherit;
}
html[data-theme="dark"] .name.oct-low::after {
  color: inherit;
}
html[data-theme="dark"] .pivot-palta {
  border: 1px solid var(--line);
  background: #2a2212;
}
html[data-theme="dark"] .pivot-palta button.primary {
  border: 1px solid var(--terra);
  background: #b5451d;
  color: #ffffff;
}
html[data-theme="dark"] .pivot-palta label {
  color: var(--ink);
}
html[data-theme="dark"] .pivot-palta select {
  border: 1px solid var(--line);
  background: #2a210b;
  color: var(--ink);
}
html[data-theme="dark"] .placeholder {
  border: 2px dashed var(--line);
  color: var(--muted);
  background: #2a2212;
}
html[data-theme="dark"] .playbtn {
  background: #b5451d;
  color: #ffffff;
  border: none;
}
html[data-theme="dark"] .playbtn.playing {
  background: #5c7a4a;
}
html[data-theme="dark"] .playbtn:hover {
  background: #c8663a;
}
html[data-theme="dark"] .sargam-line .tok:focus-visible {
  outline: 2px solid var(--terra);
}
html[data-theme="dark"] .sargam-line .tok:hover {
  background: #372d1a;
  outline: 1px solid var(--terra);
}
html[data-theme="dark"] .sw {
  color: #ffffff;
  background: #b5451d;
}
html[data-theme="dark"] .sw-fixed {
  background: #5c7a4a;
}
html[data-theme="dark"] .sw-komal {
  background: #6b6152;
}
html[data-theme="dark"] .sw-tivra {
  background: #6b4e14;
  color: #dccfc6;
}
html[data-theme="dark"] .sw.oct-high::before {
  color: inherit;
}
html[data-theme="dark"] .sw.oct-low::after {
  color: inherit;
}
html[data-theme="dark"] .swara-key {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}
html[data-theme="dark"] .swara-key small {
  color: var(--muted);
}
html[data-theme="dark"] .swara-key.active {
  background: #6b4e14;
  border-color: var(--ochre);
}
html[data-theme="dark"] .swara-key.fixed {
  border-bottom: 3px solid var(--green);
}
html[data-theme="dark"] .swara-key.komal {
  color: #c5baab;
  background: #2f2616;
}
html[data-theme="dark"] .swara-key.tivra {
  color: #dccfc6;
  background: #342a13;
}
html[data-theme="dark"] .swara-key:hover {
  border-color: var(--terra);
}
html[data-theme="dark"] code {
  background: #2f2616;
}
html[data-theme="dark"] h3 {
  color: var(--terra);
}
html[data-theme="dark"] h4 {
  color: var(--terra-soft);
}
html[data-theme="dark"] pre.sargam {
  background: var(--panel);
  border: 1px solid var(--line);
}
html[data-theme="dark"] section > h2 {
  border-bottom: 3px solid var(--ochre);
}
html[data-theme="dark"] table {
  background: var(--panel);
}
html[data-theme="dark"] table.grid td.beat-on {
  background: #6b4e14 !important;
}
html[data-theme="dark"] table.grid thead th {
  background: #312818;
  color: var(--muted);
}
html[data-theme="dark"] td {
  border-bottom: 1px solid var(--line);
}
html[data-theme="dark"] th {
  border-bottom: 1px solid var(--line);
}
html[data-theme="dark"] tr:last-child td {
  border-bottom: none;
}
html[data-theme="dark"] ul.check li::before {
  color: var(--terra);
}
html[data-theme="dark"] .harm-key.black.playing {
  background: linear-gradient(180deg, #8a6a3a 0%, #3a2818 100%);
  color: #fff6e0;
}
html[data-theme="dark"] .harm-key.white.playing {
  background: linear-gradient(180deg, #362b14 0%, #45381f 100%);
  border-color: var(--ochre);
}
html[data-theme="dark"] .playbtn.playing {
  background: #5c7a4a;
}
html[data-theme="dark"] th {
  background: #2f2616;
}
/* END DARK */
