:root {
  --bg: #f8f2e9;
  --card: #fffdf9;
  --ink: #2a1d17;
  --muted: #76655a;
  --line: #e8dccd;
  --accent: #7a2633;
  --accent-ink: #ffffff;
  --accent-soft: #f6e6e3;
  --gold: #e3962b;
  --ok: #2f7d4f;
  --danger: #b3261e;
  --track: #eadfd0;
  --shadow: 0 1px 2px rgba(60, 30, 10, .06), 0 6px 20px rgba(60, 30, 10, .06);
  --radius: 16px;

  --c-vocals: #d1456a;
  --c-drums: #df7a1c;
  --c-bass: #6a4fc0;
  --c-guitar: #2e8b57;
  --c-piano: #2c6db3;
  --c-other: #a87a10;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17120f;
    --card: #221b17;
    --ink: #f4ebe2;
    --muted: #b3a294;
    --line: #3a2f28;
    --accent: #e0a24a;
    --accent-ink: #1c140f;
    --accent-soft: #3a2b1d;
    --track: #3a2f28;
    --shadow: none;
    --c-vocals: #ec6f8f;
    --c-drums: #f19a4b;
    --c-bass: #9b85e6;
    --c-guitar: #55b981;
    --c-piano: #64a0e6;
    --c-other: #d6a93c;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.12rem; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.hidden { display: none !important; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px; align-self: center;
  background: var(--accent);
  box-shadow: inset 0 -7px 0 -3px var(--gold);
}
.brand-name { font-weight: 750; font-size: 1.3rem; letter-spacing: .01em; }
.brand-sub { color: var(--muted); font-size: .85rem; }
@media (max-width: 380px) { .brand-sub { display: none; } }

.wrap { max-width: 1040px; margin: 0 auto; padding: 16px 16px 140px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px;
}
.card > h2 { margin-bottom: 4px; }
.card > .hint { margin: 0 0 14px; color: var(--muted); font-size: .92rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); cursor: pointer;
  font-weight: 600; text-decoration: none; color: var(--ink);
  transition: transform .06s ease, background .15s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.small { min-height: 38px; padding: 0 12px; font-size: .9rem; }
.btn.danger { color: var(--danger); }
.btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Add song */
.add-form { display: grid; gap: 10px; }
.input {
  width: 100%; min-height: 52px; padding: 0 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--bg); font-size: 1rem;
}
.input:focus { border-color: var(--accent); outline: none; }
.add-row { display: flex; gap: 8px; }
.add-row .input { flex: 1; min-width: 0; }
.msg { min-height: 1.4em; margin: 0; font-size: .95rem; }
.msg.error { color: var(--danger); }

/* Library */
.songs { display: grid; gap: 12px; }
@media (min-width: 720px) { .songs { grid-template-columns: 1fr 1fr; } }
.song {
  display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: start;
  padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--card);
  text-decoration: none; color: inherit; position: relative;
}
.song img { width: 112px; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; background: var(--track); }
.song-title { font-weight: 650; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.song-meta { font-size: .85rem; color: var(--muted); margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.chip { font-size: .75rem; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--ink); }
.chip i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.bar { height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; margin-top: 8px; }
.bar > span { display: block; height: 100%; background: var(--gold); border-radius: 99px; transition: width .4s ease; }
.status-ready { color: var(--ok); font-weight: 600; font-size: .85rem; }
.status-error { color: var(--danger); font-size: .85rem; }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); }

details.help summary { cursor: pointer; font-weight: 650; padding: 4px 0; }
details.help ol, details.help ul { padding-left: 1.2em; margin: 8px 0; }
details.help li { margin: 6px 0; }

/* Song page */
.song-head { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; margin-bottom: 16px; }
.song-head img { width: 96px; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; text-decoration: none; font-weight: 600; }
.cols { display: grid; gap: 0 16px; }
@media (min-width: 900px) { .cols { grid-template-columns: 1.1fr 1fr; align-items: start; } }

.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.part { border-top: 1px solid var(--line); padding: 12px 0; }
.part:first-of-type { border-top: 0; }
.part-top { display: flex; align-items: center; gap: 10px; }
.part-name { flex: 1; min-width: 0; }
.part-name b { display: flex; align-items: center; gap: 8px; }
.part-name b i { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--c); }
.part-name span { display: block; font-size: .8rem; color: var(--muted); margin-left: 20px; }
.part.off .part-name, .part.off .vol { opacity: .45; }
.vol { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding-left: 20px; }
.vol output { width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; font-size: .9rem; color: var(--muted); }

/* Switch */
.switch { position: relative; width: 58px; height: 34px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span {
  position: absolute; inset: 0; border-radius: 99px; background: var(--track); transition: background .15s;
}
.switch span::after {
  content: ""; position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s;
}
.switch input:checked + span { background: var(--c, var(--accent)); }
.switch input:checked + span::after { transform: translateX(24px); }
.switch input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Range sliders */
input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; margin: 0; flex: 1;
  --p: 50%; --c: var(--accent);
}
input[type=range]::-webkit-slider-runnable-track {
  height: 8px; border-radius: 99px;
  background: linear-gradient(to right, var(--c) var(--p), var(--track) var(--p));
}
input[type=range]::-moz-range-track { height: 8px; border-radius: 99px; background: var(--track); }
input[type=range]::-moz-range-progress { height: 8px; border-radius: 99px; background: var(--c); }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%;
  background: #fff; border: 2px solid var(--c); box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
input[type=range]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--c);
}

/* Stepper (key and speed) */
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper .btn { width: 56px; min-height: 56px; padding: 0; font-size: 1.6rem; line-height: 1; }
.stepper .value { flex: 1; text-align: center; }
.stepper .value b { display: block; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.stepper .value span { color: var(--muted); font-size: .88rem; }
.reset { margin-top: 10px; }

/* Loop */
.loop-times { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.loop-times .btn { flex-direction: column; gap: 0; min-height: 60px; line-height: 1.2; }
.loop-times .btn small { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Record */
.rec-btn {
  width: 100%; min-height: 64px; font-size: 1.1rem; border-radius: 16px;
  background: var(--danger); border-color: var(--danger); color: #fff;
}
.rec-btn .dot { width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.rec-btn.recording { animation: pulse 1.2s ease-in-out infinite; }
.rec-btn.recording .dot { border-radius: 3px; }
@keyframes pulse { 50% { opacity: .75; } }
.check { display: flex; align-items: center; gap: 10px; margin: 10px 0; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }
.takes { display: grid; gap: 10px; margin-top: 14px; }
.take { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.take-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-bottom: 8px; }
.take .vol { padding-left: 0; }
.take label.lbl { width: 6.2em; font-size: .85rem; color: var(--muted); flex: none; }

/* Mixes */
.mix { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding: 12px 0; }
.mix-info { min-width: 0; flex: 1 1 180px; }
.mix-info b { display: block; }
.save-row { display: flex; gap: 8px; margin-bottom: 8px; }
.save-row .input { flex: 1; min-width: 0; min-height: 48px; }

/* Bottom player */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--card); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgba(40, 20, 10, .10);
  padding: 8px 16px; padding-bottom: max(10px, env(safe-area-inset-bottom));
}
.player-in { max-width: 1040px; margin: 0 auto; }
.seek { position: relative; }
.seek .loop-zone {
  position: absolute; top: 9px; height: 14px; border-radius: 4px;
  background: color-mix(in srgb, var(--gold) 35%, transparent); pointer-events: none;
}
.times { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: -4px; }
.transport { display: flex; align-items: center; justify-content: center; gap: 14px; }
.transport .btn { min-height: 48px; min-width: 56px; }
.play-btn { width: 64px; height: 64px; min-width: 64px; border-radius: 50% !important; padding: 0 !important; }
.play-btn svg { width: 28px; height: 28px; }
.player .state { font-size: .8rem; color: var(--muted); text-align: center; min-height: 1.2em; }

.loading { padding: 30px 12px; text-align: center; }
.loading .bar { max-width: 360px; margin: 14px auto 0; }

#toast {
  position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px;
  max-width: min(92vw, 460px); opacity: 0; pointer-events: none; transition: all .2s; z-index: 50; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn { text-align: center; }
#showAll { min-height: auto; padding: 10px 12px; margin-top: 4px; line-height: 1.3; }
@media (max-width: 520px) {
  h1 { font-size: 1.15rem; }
  .song-head { grid-template-columns: 80px 1fr; }
  .song-head img { width: 80px; }
}

/* ---------- Scale (Sa) ---------- */
.scale-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.tile {
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 12px 10px; text-align: center;
  background: var(--bg); display: flex; flex-direction: column; align-items: center; min-width: 0;
}
.tile .lbl { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; }
.tile b { font-size: 2.4rem; line-height: 1.15; font-weight: 750; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.tile b sup { font-size: 1.1rem; font-weight: 700; margin-left: 2px; vertical-align: 1.1rem; color: var(--gold); }
.tile small { font-size: .8rem; color: var(--muted); line-height: 1.3; }
.tile.now { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.tile.now b { color: var(--accent); }

.scale-slider { display: flex; align-items: flex-start; gap: 10px; }
.scale-slider > .btn { width: 56px; min-height: 48px; padding: 0; font-size: 1.05rem; flex: none; }
.slider-wrap { flex: 1; min-width: 0; position: relative; padding-bottom: 24px; }
.slider-wrap input[type=range] { height: 48px; position: relative; z-index: 1; }
.scale-ticks { position: absolute; left: 13px; right: 13px; top: 30px; height: 30px; pointer-events: none; }
.scale-ticks .t { position: absolute; top: 0; width: 1px; height: 5px; background: var(--line); transform: translateX(-.5px); }
.scale-ticks .t.half { height: 7px; background: color-mix(in srgb, var(--muted) 45%, transparent); }
.scale-ticks .t.major { height: 10px; width: 2px; background: var(--muted); transform: translateX(-1px); }
.scale-ticks .t em {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  font-style: normal; font-size: .74rem; font-weight: 650; color: var(--muted); white-space: nowrap;
}
.scale-ticks .t.zero { background: var(--accent); }
.scale-ticks .t.zero em { color: var(--accent); }
.scale-ticks .t.zero em::after { content: ""; position: absolute; left: 50%; top: -3px; }
.scale-dir { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); padding: 0 66px; margin-top: 2px; }
.scale-jumps { justify-content: center; margin-top: 12px; }
.scale-jumps .btn { min-width: 92px; }
.my-scale {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line);
}
.my-scale label { font-weight: 650; }
.my-scale select.input { width: auto; min-height: 42px; padding: 0 10px; flex: 0 0 auto; }
.my-scale .btn { flex: 1 1 auto; }
@media (max-width: 520px) {
  .scale-slider { flex-wrap: wrap; }
  .slider-wrap { order: -1; flex: 1 0 100%; }
  .scale-slider > .btn { flex: 1; }
  .scale-dir { display: none; }
  .scale-ticks .t em { font-size: .66rem; }
  .tile b { font-size: 2rem; }
}

/* ---------- Raaga ---------- */
.cols > .wide { grid-column: 1 / -1; }
.raga-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.raga-top .hint { margin: 2px 0 12px; color: var(--muted); font-size: .92rem; }
.sa-badge {
  flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: inset 0 -6px 0 -2px var(--gold);
}
.sa-badge span { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; opacity: .85; line-height: 1; }
.sa-badge b { font-size: 1.35rem; line-height: 1.1; }
.ragas { display: grid; gap: 10px; }
@media (min-width: 720px) { .ragas { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.raga { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--bg); }
.raga.top { border-color: color-mix(in srgb, var(--gold) 70%, var(--line)); background: color-mix(in srgb, var(--gold) 9%, var(--card)); }
.raga-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.raga h3 { font-size: 1.12rem; }
.raga .match { font-size: .78rem; font-weight: 700; color: var(--accent); white-space: nowrap; }
.raga-meta { font-size: .82rem; color: var(--muted); margin-top: 2px; }
.raga-notes { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 6px; }
.raga-notes .sw {
  font-size: .82rem; font-weight: 650; padding: 2px 8px; border-radius: 8px;
  background: var(--card); border: 1px solid var(--line);
}
.raga p { margin: 0; font-size: .9rem; line-height: 1.45; }
.sw.komal { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.sw.tivra::before { content: "ˈ"; font-weight: 800; margin-right: 1px; }
.swara-chart { margin-top: 12px; }
.swara-chart summary { cursor: pointer; font-weight: 650; padding: 6px 0; }
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; margin-top: 8px; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.bar-track { height: 80px; width: 100%; max-width: 30px; display: flex; align-items: flex-end; }
.bar-track span { display: block; width: 100%; border-radius: 6px 6px 2px 2px; background: var(--track); }
.bar-col.used .bar-track span { background: var(--gold); }
.bar-col .sw { font-size: .72rem; font-weight: 650; color: var(--muted); }
.bar-col.used .sw { color: var(--ink); }
.fine { margin: 10px 0 0 !important; font-size: .8rem !important; }
.song-raga { font-size: .82rem; margin-top: 2px; color: var(--ink); }
.sa-mini {
  display: inline-block; font-weight: 700; font-size: .75rem; padding: 1px 7px; border-radius: 99px; margin-right: 4px;
  background: var(--accent); color: var(--accent-ink);
}

/* Parts view switch */
.seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 12px;
  background: var(--track); border-radius: 12px;
}
.seg button {
  min-height: 40px; border: 0; border-radius: 9px; background: transparent; cursor: pointer;
  font-weight: 650; font-size: .92rem; color: var(--muted);
}
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.part.missing .part-name span { margin-left: 20px; }
select.input { color: var(--ink); background: var(--bg); }
.m-only { display: none; font-weight: 500; color: var(--muted); font-size: .85rem; }
@media (max-width: 520px) { .m-only { display: inline; } }

/* Lyrics (karaoke) */
.lyrics-card { padding-bottom: 14px; }
.ly-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ly-top .hint { margin: 2px 0 12px; color: var(--muted); font-size: .92rem; }
.ly-big-btn { flex: none; }
.script-seg button { font-size: 1rem; }
.ly-view {
  --ly-size: 1.05;
  position: relative; height: clamp(300px, 46vh, 480px); overflow-y: auto; overscroll-behavior: contain;
  border-radius: 14px; background: var(--bg); border: 1px solid var(--line);
  padding: 8px 18px; scroll-behavior: smooth;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 36px, #000 calc(100% - 44px), transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 36px, #000 calc(100% - 44px), transparent 100%);
}
.ly-view.plain { -webkit-mask-image: none; mask-image: none; height: auto; max-height: 420px; }
.ly-list { padding: 120px 0 180px; }
.ly-view.plain .ly-list { padding: 8px 0; }
.ly-line {
  margin: 0; padding: 7px 10px; border-radius: 10px;
  font-size: calc(1.15rem * var(--ly-size)); line-height: 1.45; font-weight: 600;
  color: var(--muted); transition: color .3s ease, transform .3s ease, opacity .3s ease;
  transform-origin: left center; cursor: default;
}
.ly-view.timed .ly-line { cursor: pointer; }
.ly-view.timed .ly-line:hover { background: color-mix(in srgb, var(--track) 50%, transparent); }
.ly-view.plain .ly-line { color: var(--ink); font-weight: 500; }
.ly-view.timed .ly-line { opacity: .62; }
.ly-view.timed .ly-line.past { opacity: .38; }
.ly-view.timed .ly-line.now {
  opacity: 1; transform: scale(1.1); color: var(--ink);
  background: color-mix(in srgb, var(--accent-soft) 70%, transparent);
  box-shadow: inset 4px 0 0 var(--accent);
}
.ly-line.now .ly-txt {
  background: linear-gradient(90deg, var(--accent) 0, var(--accent) var(--p, 0%), var(--ink) var(--p, 0%), var(--ink) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ly-line[lang="hi"], .ly-line[lang="kn"] { line-height: 1.6; }
.ly-gap { padding: 10px 10px; }
.ly-dots { display: inline-flex; gap: 8px; }
.ly-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); transition: background .2s ease; }
.ly-gap.now .ly-dots i { background: var(--track); }
.ly-gap[data-count="3"] .ly-dots i:nth-child(-n+1),
.ly-gap[data-count="2"] .ly-dots i:nth-child(-n+2),
.ly-gap[data-count="1"] .ly-dots i { background: var(--gold); }
.ly-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 12px; }
.ly-timing, .ly-size { display: flex; align-items: center; gap: 8px; }
.ly-timing b { min-width: 64px; text-align: center; font-size: .9rem; font-variant-numeric: tabular-nums; }
.ly-tools .lbl { font-size: .85rem; color: var(--muted); font-weight: 600; }
.ly-fix { margin-top: 12px; }
.ly-fix > summary, .ly-paste > summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--accent); padding: 4px 0; }
.ly-forms { margin-top: 10px; }
.ly-forms textarea.input { min-height: 140px; padding: 10px 14px; line-height: 1.5; resize: vertical; margin: 8px 0; font: inherit; }
.ly-paste { margin-top: 4px; }

/* Lyrics full screen: the lyrics fill the screen above the player bar. */
body.lyrics-big { overflow: hidden; }
body.lyrics-big .lyrics-card {
  position: fixed; z-index: 25; inset: 0; margin: 0; border-radius: 0; border: 0;
  display: flex; flex-direction: column;
  padding: max(14px, env(safe-area-inset-top)) max(16px, calc((100vw - 1000px) / 2)) 150px;
}
body.lyrics-big .ly-view { flex: 1; height: auto; max-height: none; }
body.lyrics-big .ly-fix, body.lyrics-big .lyrics-card > .fine { display: none; }
body.lyrics-big .ly-line { font-size: calc(1.5rem * var(--ly-size)); }
@media (max-width: 520px) {
  .ly-view { height: clamp(260px, 42vh, 380px); padding: 6px 8px; }
  .ly-view.timed .ly-line.now { transform: scale(1.05); }
  .ly-top .hint { font-size: .86rem; }
  .ly-tools { justify-content: flex-start; }
}

.ly-btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; flex: none; }
.lyrics-card.closed .ly-top { align-items: center; }
.lyrics-card.closed .ly-top .hint { margin-bottom: 0; }
.ly-show-btn { flex: none; }
body.lyrics-big #lyHide { display: none; }
@media (max-width: 520px) {
  .lyrics-card.closed .ly-top { flex-direction: column; align-items: stretch; }
  .ly-btns { flex-direction: column; }
}

/* Riyaz not reachable / time left */
.card.offline { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, var(--card)); }
.card.offline p { margin: 8px 0 0; }
.eta { margin: 12px 0 0; font-weight: 650; font-variant-numeric: tabular-nums; }
