/* JTabs - CSNAWorks template look (Master App Template colors) */
:root {
  --primary: #4CAF50; --primary-dark: #2E7D32; --primary-deep: #1B6E20; --primary-soft: #C8E6C9; --secondary: #66BB6A;
  --ink: #1f2d1f; --muted: #5f6f60; --line: #dfe7df; --bg: #ffffff; --panel: #f4f8f4;
  --error: #E53935; --chord: #1565C0; --warn: #FFC107;
  --lyric-size: clamp(20px, 1.6vw + 14px, 34px);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

#app { height: 100%; display: flex; flex-direction: column; padding-bottom: 16px; }

/* top bar */
.topbar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 2px solid var(--primary); background: #fff; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--primary-dark); font-size: 19px; min-width: 0; }
.logo-box { background: #fff; display: inline-flex; padding: 2px 4px; border-radius: 6px; }
.logo-box img { height: 28px; width: auto; display: block; }
.menu { margin-left: auto; display: flex; gap: 4px; }
.menu-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; border: 0; background: none;
  padding: 4px 8px; border-radius: 10px; color: var(--primary-dark); font-size: 12px; font-weight: 700; min-width: 54px; }
.menu-btn:hover, .menu-btn:focus-visible { background: var(--primary-soft); }
.band-dot { position: absolute; top: 3px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 2px #fff; }

/* song area */
.song-area { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.song-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.key-badge { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 58px; padding: 4px 8px;
  border-radius: 12px; background: var(--primary-soft); color: var(--primary-deep); }
.key-badge small { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.key-badge b { font-size: 26px; line-height: 1; }
.song-title { flex: 1; min-width: 0; }
.song-title h1 { margin: 0; font-size: 20px; line-height: 1.2; color: var(--primary-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-title div { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toggle, .shout-btn { display: flex; align-items: center; gap: 6px; border: 2px solid var(--primary); background: #fff; color: var(--primary-dark);
  border-radius: 999px; padding: 7px 12px; font-weight: 800; font-size: 14px; white-space: nowrap; }
.toggle .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--primary); }
.toggle[aria-pressed="false"] { border-color: #9aa59a; color: var(--muted); }
.toggle[aria-pressed="false"] .dot { background: #c5ccc5; }
.shout-btn { background: var(--primary); color: #fff; }
.shout-btn:active { background: var(--primary-dark); }

.lyrics { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 16px 28px; font-size: var(--lyric-size); line-height: 1.25; }
.lyrics:focus { outline: none; }
.ln { display: flex; flex-wrap: wrap; align-items: flex-end; margin: 0 0 .25em; }
.w { display: inline-flex; align-items: flex-end; white-space: nowrap; }
.seg { display: inline-flex; flex-direction: column; }
.ch { color: var(--chord); font-weight: 800; font-size: .82em; min-height: 1.15em; padding-right: .35em; white-space: nowrap; }
.ln:not(.has-ch) .ch { display: none; }
.ly { white-space: pre; }
.ch-only .ly { display: none; }
.chorus { padding-left: .6em; border-left: 4px solid var(--primary-soft); }
.sec { margin: .7em 0 .25em; font-size: .62em; font-weight: 800; color: var(--primary-dark); text-transform: uppercase; letter-spacing: .08em; }
.gap { height: .6em; }
.hide-chords .ch, .hide-chords .ch-only { display: none; }
.hide-chords .seg, .hide-chords .w { display: inline; }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); font-size: 17px; }
.empty b { display: block; color: var(--primary-dark); font-size: 20px; margin-bottom: 6px; }

/* set panel */
.set-panel { border-top: 2px solid var(--primary); background: var(--panel); }
.set-body { max-height: 34vh; display: flex; flex-direction: column; }
.set-panel:not(.open) .set-body { display: none; }
.set-head { padding: 8px 14px 4px; font-size: 15px; }
.set-head .label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.set-head b { color: var(--primary-dark); }
.set-list { list-style: none; margin: 0; padding: 0 8px 6px; overflow-y: auto; overscroll-behavior: contain; }
.set-list li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-size: 17px; cursor: pointer; }
.set-list li:hover { background: #e8f2e8; }
.set-list li.current { background: var(--primary-soft); font-weight: 800; color: var(--primary-deep); }
.set-list .num { width: 1.6em; text-align: right; color: var(--muted); font-size: 14px; }
.set-list .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-list .k { font-weight: 800; color: var(--primary-dark); }
/* one solid bar between lyrics and set list: Prev | expand/collapse | Next */
.nav-row { display: flex; align-items: stretch; background: var(--primary); color: #fff; min-height: 56px; }
.nav-btn { flex: 1; display: flex; align-items: center; justify-content: flex-start; gap: 8px; border: 0; border-radius: 0;
  background: transparent; color: #fff; padding: 6px 12px; }
.nav-btn.next { justify-content: flex-end; text-align: right; }
.nav-btn:hover:not(:disabled), .expand-btn:hover { background: rgba(0,0,0,.10); }
.nav-btn:active:not(:disabled), .expand-btn:active { background: rgba(0,0,0,.18); }
.nav-btn svg { width: 30px; height: 30px; stroke-width: 3; }
.nav-btn:disabled { color: rgba(255,255,255,.55); cursor: default; }
.nav-text { display: flex; flex-direction: column; line-height: 1.1; }
.nav-text small { font-size: 12px; opacity: .9; }
.nav-text b { font-size: 20px; }
.nav-btn.keychange .nav-text b { background: var(--warn); color: #222; border-radius: 6px; padding: 0 6px; }
.expand-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; border: 0; border-radius: 0;
  border-left: 1px solid rgba(255,255,255,.45); border-right: 1px solid rgba(255,255,255,.45);
  background: transparent; color: #fff; padding: 2px 16px; font-size: 12px; font-weight: 800; min-width: 92px; }
.expand-btn svg { width: 26px; height: 26px; stroke-width: 3; }
.set-panel { border-top: 0; }
.set-panel:not(.open) .nav-row { min-height: 48px; }

.watermark { position: fixed; left: 0; right: 0; bottom: 0; height: 16px; text-align: center; font-size: 10px; line-height: 16px;
  color: rgba(120,120,120,.75); background: #fff; pointer-events: none; z-index: 1000; }

/* modals */
.overlay { position: fixed; inset: 0 0 16px; background: rgba(20,40,20,.45); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 12px; }
.modal { background: #fff; border-radius: 16px; width: min(640px, 100%); max-height: 100%; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.modal-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 2px solid var(--primary-soft); }
.modal-head h2 { margin: 0; font-size: 20px; color: var(--primary-dark); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-body { padding: 12px 14px; overflow-y: auto; overscroll-behavior: contain; flex: 1; min-height: 0; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--line); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 2px solid var(--primary); background: #fff; color: var(--primary-dark);
  border-radius: 12px; padding: 9px 14px; font-weight: 700; min-height: 44px; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.danger { border-color: var(--error); color: var(--error); }
.btn.danger.solid { background: var(--error); color: #fff; }
.btn.big { width: 100%; font-size: 17px; min-height: 54px; margin-bottom: 10px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { display: inline-flex; flex-direction: column; align-items: center; border: 0; background: none; color: var(--primary-dark); font-size: 11px; font-weight: 700; padding: 4px 6px; border-radius: 8px; }
.icon-btn:hover { background: var(--primary-soft); }
.icon-btn.danger { color: var(--error); }
.close-btn { border: 0; background: none; padding: 6px; border-radius: 8px; color: var(--muted); display: flex; align-items: center; gap: 4px; font-weight: 700; }
.close-btn:hover { background: var(--panel); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border-bottom: 1px solid var(--line); min-height: 58px; background: #fff; }
.rows li .main { flex: 1; min-width: 0; cursor: pointer; }
.rows li .main b { display: block; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows li .main span { font-size: 14px; color: var(--muted); }
.rows li .k { font-weight: 800; color: var(--primary-dark); min-width: 2.4em; text-align: center; }
.rows li.active-set { background: #eef7ee; }
.tag { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-deep); margin-left: 6px; vertical-align: middle; }
.tag.grey { background: #eceff1; color: #455a64; }
.grip { display: flex; align-items: center; justify-content: center; width: 34px; height: 40px; color: #8a978a; touch-action: none; }
.grip svg { width: 26px; height: 26px; }
.drag-rows li { user-select: none; -webkit-user-select: none; position: relative; overflow: hidden; }
.drag-rows li::before { content: ""; position: absolute; inset: 0; background: var(--primary-soft); transform: scaleX(0); transform-origin: left; z-index: 0; }
.drag-rows li.dragsort-pressing::before { transform: scaleX(1); transition: transform 2s linear; }
.drag-rows li > * { position: relative; z-index: 1; }
.hint { font-size: 14px; color: var(--muted); background: var(--panel); border-radius: 10px; padding: 8px 10px; margin: 0 0 10px; }
.field { display: block; margin-bottom: 10px; }
.field span { display: block; font-size: 13px; font-weight: 700; color: var(--primary-dark); margin-bottom: 3px; }
.field input, .field textarea, .field select { width: 100%; font: inherit; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); }
.field textarea { font-family: ui-monospace, Consolas, monospace; font-size: 15px; min-height: 220px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.or { text-align: center; color: var(--muted); font-size: 13px; margin: 6px 0 10px; font-weight: 700; }
.err { background: #fdecea; color: #a12622; border: 1px solid #f5c2c0; border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-size: 15px; }
.ok { background: #e8f5e9; color: var(--primary-deep); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 14px 4px; }
.spin { width: 22px; height: 22px; border: 3px solid var(--primary-soft); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.preview { border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 18px; max-height: 46vh; overflow-y: auto; overscroll-behavior: contain; }
.check-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 17px; }
.check-row input { width: 22px; height: 22px; accent-color: var(--primary); }

/* chord grid (SHOUT) */
.grid-title { font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 6px 0; }
.chord-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; margin-bottom: 12px; }
.chord-grid button { border: 2px solid var(--primary); background: #fff; color: var(--primary-deep); border-radius: 10px; font-weight: 800; font-size: 19px; min-height: 52px; }
.chord-grid button:hover, .chord-grid button:focus-visible { background: var(--primary-soft); }
.chord-grid.song button { background: var(--primary); color: #fff; }
.shout-show { position: fixed; inset: 0; z-index: 2000; background: rgba(27,110,32,.94); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; cursor: pointer; }
.shout-chord { font-size: min(42vw, 52vh); font-weight: 900; line-height: 1; letter-spacing: -.02em; }
.shout-from { font-size: 22px; font-weight: 700; margin-top: 10px; }
.shout-show small { margin-top: 18px; opacity: .8; }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: #263238; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 15px;
  z-index: 3000; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; }
.toast.error { background: var(--error); }

@media (max-width: 520px) {
  .brand #appName { display: inline; }
  .menu-btn { min-width: 48px; padding: 4px 4px; }
  .song-head { flex-wrap: wrap; }
  .song-title { order: 2; flex-basis: calc(100% - 70px); }
  .key-badge { order: 1; }
  .shout-btn { order: 3; margin-left: auto; }
  .toggle { order: 4; }
  .row2 { grid-template-columns: 1fr; }
  .modal { border-radius: 14px; }
  .overlay { padding: 6px; }
}
@media (min-width: 900px) {
  .lyrics { padding: 16px 32px 32px; }
  .set-body { max-height: 30vh; }
}
.band-dot.off { background: var(--warn); }

/* v0.9.0 universal hamburger menu */
.hamburger { margin-left: auto; min-width: 64px; }
.hamburger svg { width: 28px; height: 28px; }
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list button { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; border: 0; border-bottom: 1px solid var(--line);
  background: #fff; padding: 14px 8px; min-height: 64px; border-radius: 0; color: var(--ink); }
.menu-list button:hover, .menu-list button:focus-visible { background: var(--panel); }
.menu-list svg { width: 28px; height: 28px; color: var(--primary-dark); }
.menu-list b { display: block; font-size: 18px; color: var(--primary-dark); }
.menu-list span span { font-size: 14px; color: var(--muted); }
.menu-list .chev { margin-left: auto; color: #9aa59a; width: 22px; height: 22px; }
.radio-row { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); font-size: 17px; cursor: pointer; }
.radio-row input[type=radio] { width: 22px; height: 22px; accent-color: var(--primary); }
.radio-row input[type=number] { width: 84px; font: inherit; padding: 6px 8px; border: 2px solid var(--line); border-radius: 8px; }

/* v0.9.1 drop-down menu (anchored under the hamburger, no dimmed backdrop) */
.dd-menu { position: fixed; top: 58px; right: 8px; width: min(340px, calc(100vw - 16px)); max-height: calc(100vh - 90px); overflow-y: auto;
  overscroll-behavior: contain; background: #fff; border: 2px solid var(--primary); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 60; }
.dd-menu .menu-list button { min-height: 56px; padding: 10px 12px; }
.dd-menu .menu-list li:last-child > button { border-bottom: 0; }
.dd-sub { list-style: none; margin: 0; padding: 0 0 0 18px; background: var(--panel); border-bottom: 1px solid var(--line); }
.dd-sub button { background: var(--panel) !important; }
.chev.sub { transition: transform .15s; margin-left: auto; color: #9aa59a; width: 22px; height: 22px; }
[aria-expanded="true"] > .chev.sub { transform: rotate(180deg); }

/* v0.10.0 SHOUT tiles: chord names always fit inside their tile */
.chord-grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
.chord-grid button { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: clip; padding: 0 4px;
  font-size: clamp(14px, 3.6vw, 19px); letter-spacing: -.01em; }
.chord-grid button.long { font-size: clamp(12px, 3vw, 16px); }

/* v0.10.1 section labels in parentheses, all caps (boss: caps OK): "(VERSE 1)" */
.sec { text-transform: uppercase; letter-spacing: .04em; font-size: .68em; }

/* v0.10.2 pull-down-to-refresh indicator */
.ptr { position: fixed; top: 64px; left: 50%; transform: translate(-50%, 0); z-index: 70; display: flex; align-items: center; gap: 8px;
  background: #fff; color: var(--primary-dark); border: 2px solid var(--primary); border-radius: 999px; padding: 6px 14px; font-weight: 800;
  font-size: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.18); opacity: 0; pointer-events: none; transition: opacity .12s; }
.ptr.show { opacity: 1; }
.ptr.ready { background: var(--primary); color: #fff; }
.ptr.busy svg { animation: spin .8s linear infinite; }
.lyrics { overscroll-behavior-y: contain; }

/* v0.11.0 notification permission bar */
.notif-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; background: var(--primary-soft); color: var(--primary-deep);
  font-size: 15px; border-bottom: 1px solid var(--line); }
.notif-bar svg { color: var(--primary-dark); }
.notif-bar span { flex: 1; min-width: 180px; }
.notif-bar .btn { min-height: 38px; padding: 6px 12px; }

/* v0.12.1 compact header, smaller menu icon, centered SHOUT + Chords */
.topbar { padding: 3px 10px; gap: 6px; }
.logo-box img { height: 20px; }
.brand { font-size: 16px; gap: 6px; }
.hamburger { min-width: 0; padding: 2px 6px; font-size: 10px; gap: 0; }
.hamburger svg { width: 20px; height: 20px; }
.band-dot { top: 1px; right: 4px; width: 8px; height: 8px; }
.dd-menu { top: 40px; }
.ptr { top: 44px; }
.song-head { flex-wrap: wrap; padding: 6px 12px; gap: 6px 10px; }
.key-badge { order: 1; min-width: 50px; padding: 2px 6px; }
.key-badge b { font-size: 22px; }
.song-title { order: 2; flex: 1 1 calc(100% - 70px); }
.song-title h1 { font-size: 18px; }
.song-actions { order: 3; flex: 1 1 100%; display: flex; justify-content: center; gap: 10px; }
.song-actions .shout-btn, .song-actions .toggle { margin: 0; padding: 6px 14px; }
@media (max-width: 520px) { .shout-btn, .toggle { order: initial; margin-left: 0; } }

/* v0.13.0 transpose: Key badge is a button */
button.key-badge { border: 2px solid transparent; cursor: pointer; font: inherit; }
button.key-badge:hover, button.key-badge:focus-visible { border-color: var(--primary); }
.key-badge .tp-hint { font-size: 9px; letter-spacing: .02em; text-transform: none; opacity: .85; }
.key-badge.moved { background: var(--warn); color: #222; }
.tkeys button.cur { background: var(--primary); color: #fff; }

/* v0.13.1 large displays: Key | title | SHOUT + Chords all on one line */
@media (min-width: 700px) {
  .song-head { flex-wrap: nowrap; }
  .song-title { flex: 1 1 auto; }
  .song-actions { flex: 0 0 auto; justify-content: flex-end; }
}

/* v0.13.2 small screens: Key + title/author stay on one line; text that doesn't fit scrolls sideways by itself */
.song-title h1, .song-title div { text-overflow: clip; overflow: hidden; white-space: nowrap; }
.song-title .mq { display: inline-block; white-space: nowrap; }
.song-title .scrolling .mq { animation: jt-mq var(--mq-time, 6s) ease-in-out 1.2s infinite alternate; }
@keyframes jt-mq { 0%, 12% { transform: translateX(0); } 88%, 100% { transform: translateX(var(--mq-dist, 0)); } }
@media (max-width: 699px) {
  .song-head { flex-wrap: wrap; }
  .key-badge { order: 1; flex: 0 0 auto; }
  .song-title { order: 2; flex: 1 1 0; min-width: 0; }
  .song-actions { order: 3; flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .song-title .scrolling .mq { animation-duration: 20s; } }

/* v0.13.3 only title/author scroll (clipped inside their own box, never under the Key button); lyrics left margin */
.song-head { overflow: hidden; }
.key-badge { position: relative; z-index: 1; background-clip: padding-box; }
.song-title { overflow: hidden; min-width: 0; }
@media (max-width: 699px) { .lyrics { padding-left: 8px; } }          /* small displays: 2 mm less than before (16 -> 8 px) */
@media (min-width: 700px) { .lyrics { padding-left: 12px; } }         /* large displays: lyrics start at the Key button's left edge */

/* v0.13.4 tighter lyric line spacing (font size unchanged) */
.lyrics { line-height: 1.08; }
.ln { margin: 0 0 .1em; }
.ch { min-height: 1.02em; line-height: 1.02; }
.ly { line-height: 1.12; }
.gap { height: .35em; }
.sec { margin: .45em 0 .12em; }

/* v0.13.6 one empty line where a paragraph ends (before every section label, not before the first one) */
.sec { margin-top: 1.15em; }
.gap + .sec { margin-top: .8em; }
.lyrics > .sec:first-child { margin-top: 0; }

/* v0.13.7 labels: the empty line is a real element now (works on every song/browser); caps also in the text itself */
.sec { margin-top: .15em; text-transform: uppercase; }
.gap + .sec { margin-top: .15em; }
.sec-gap { height: 1.1em; }
.lyrics > .sec:first-child { margin-top: 0; }

/* v0.14.1 bigger CSNAWorks logo + JTabs name inside the same header height */
.topbar { padding: 2px 10px; min-height: 0; }
.logo-box { padding: 0 2px; }
.logo-box img { height: 30px; }
.brand { font-size: 23px; line-height: 1; gap: 8px; letter-spacing: -.01em; }
.brand #appName { display: inline; }
.hamburger { padding: 1px 6px; line-height: 1; }

/* v0.15.0 MAT parity batch A: help button, sliding divider, visible scroll bars, tour, repeated-paragraph label */
.help-btn { margin-left: auto; min-width: 0; padding: 1px 6px; font-size: 10px; line-height: 1; }
.help-btn svg { width: 20px; height: 20px; }
.help-btn + .hamburger { margin-left: 2px; }
.split-grip { height: 12px; background: var(--primary-dark); cursor: ns-resize; touch-action: none; display: flex; align-items: center; justify-content: center; }
.split-grip span { width: 44px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.75); box-shadow: 0 -3px 0 -1px rgba(255,255,255,0); }
.split-grip.drag, .split-grip:hover { background: var(--primary-deep); }
.set-body { overflow: hidden; }
.sb-thumb { position: fixed; width: 6px; border-radius: 4px; background: rgba(46,125,50,.55); cursor: grab; touch-action: none; display: none; }
.sb-thumb:hover, .sb-thumb.drag { width: 8px; background: var(--primary-dark); }
.lyrics, .set-list, .modal-body, .dd-menu, .preview { scrollbar-width: none; }
.lyrics::-webkit-scrollbar, .set-list::-webkit-scrollbar, .modal-body::-webkit-scrollbar, .dd-menu::-webkit-scrollbar, .preview::-webkit-scrollbar { display: none; }
.tour { position: fixed; inset: 0; z-index: 4000; }
.tour-hole { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(10,30,10,.6); border: 3px solid var(--warn); pointer-events: none; transition: all .2s; }
.tour-tip { position: fixed; left: 12px; right: 12px; max-width: 420px; margin: 0 auto; background: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.tour-tip b { color: var(--primary-dark); font-size: 18px; }
.tour-tip p { margin: 4px 0 10px; font-size: 16px; }
.tour-btns { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.tour-btns .muted { margin-right: auto; font-size: 13px; }
.sec.repeat { color: var(--primary-deep); background: var(--primary-soft); display: inline-block; padding: 1px 8px; border-radius: 6px; }

/* v0.16.0 language toggle Eng | Esp */
.lang-btn { margin-left: auto; border: 1.5px solid var(--primary); background: #fff; color: var(--muted); border-radius: 999px; padding: 2px 8px;
  font-size: 12px; font-weight: 800; display: flex; gap: 4px; align-items: center; line-height: 1.3; }
.lang-btn i { font-style: normal; color: #b9c4b9; }
.lang-btn .on { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 3px; }
.lang-btn + .help-btn { margin-left: 4px; }

/* v0.19.0 Ad strips (AdManager, top under the title bar + bottom above the watermark) and Don't disturb.
   Don't disturb slides them away: the top strip moves up, the bottom strip moves down, both fold to nothing. */
.spot-cw { position: relative; flex: none; display: flex; justify-content: center; align-items: center; overflow: hidden;
  max-height: 100px; padding: 2px 0; background: #fafafa; opacity: 1;
  transition: max-height .45s ease, padding .45s ease, transform .45s ease, opacity .45s ease; }
.spot-top { border-bottom: 1px solid var(--line); }
.spot-bottom { border-top: 1px solid var(--line); }
.spot-cw.empty { display: none; }
.spot-cw a { display: block; line-height: 0; }
.spot-cw img { display: block; max-width: 100%; height: auto; }
.spot-label { position: absolute; top: 2px; left: 4px; font-size: 9px; line-height: 1.2; color: #555; border: 1px solid #e5e5e5; border-radius: 3px; padding: 0 3px; background: #fafafa; z-index: 1; }
body.dnd .spot-cw { max-height: 0; padding: 0; opacity: 0; border-width: 0; }
body.dnd .spot-top { transform: translateY(-100%); }
body.dnd .spot-bottom { transform: translateY(100%); }
.dnd-btn { color: #c62828; min-width: 0; padding: 1px 4px; font-size: 9px; line-height: 1; max-width: 58px; text-align: center; white-space: normal; margin-left: 2px; }
.dnd-btn svg { width: 22px; height: 22px; stroke: #c62828; fill: none; stroke-width: 2.4; }
.dnd-btn[aria-pressed="true"] { background: #ffebee; border-radius: 10px; font-weight: 700; }
.dnd-btn[aria-pressed="true"] svg { fill: #c62828; stroke: #fff; }
.dnd-btn[aria-pressed="true"] svg circle { stroke: #c62828; }
.band-dot.ask { background: #e65100 !important; }

/* v0.19.0 Gigs */
.gig-list li { align-items: flex-start; }
.gig-day { flex: none; width: 48px; text-align: center; border: 2px solid var(--primary); border-radius: 10px; padding: 2px 0; color: var(--primary-dark); }
.gig-day b { display: block; font-size: 20px; line-height: 1.1; }
.gig-day small { display: block; font-size: 11px; text-transform: uppercase; }
.gig-list .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.gig-alarm { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.gig-alarm svg { width: 15px; height: 15px; }
.gig-list .btn svg { width: 18px; height: 18px; }
.gig-when { display: flex; gap: 10px; }
.gig-when .field { flex: 1; }
.gig-past summary { cursor: pointer; padding: 10px 4px; font-weight: 600; color: var(--muted); }
.gig-ring { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 18px; padding: 10px 0; }
.gig-ring svg { width: 64px; height: 64px; color: #c62828; animation: gigshake .5s ease-in-out infinite alternate; }
.gig-ring b { font-size: 24px; }
@keyframes gigshake { from { transform: rotate(-12deg); } to { transform: rotate(12deg); } }
/* v0.19.0 gig rows: the text gets the full width, the buttons go on their own line under it */
.gig-list li { flex-wrap: wrap; }
.rows.gig-list li .main { flex: 1 1 calc(100% - 64px); cursor: default; }
.rows.gig-list li .main b, .rows.gig-list li .main span { white-space: normal; overflow: visible; text-overflow: clip; }
.gig-list li > .btn { margin-left: 58px; min-height: 40px; padding: 6px 12px; }
.gig-list li > .btn + .btn { margin-left: 0; }

/* v0.19.0 title bar: Eng|Esp, Don't disturb, Menu (Help moved into the menu) */
.lang-btn + .dnd-btn { margin-left: 6px; }
.dnd-btn + .hamburger { margin-left: 2px; }

/* v0.20.0 text size buttons AZ- / AZ+ at the top right of the lyrics window; the first line leaves room for them.
   Words wrap between words (.ln is a wrapping flex row); a single word wider than the screen may break between its
   chord pieces instead of running off the edge. */
.lyrics-wrap { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.fs-btns { position: absolute; top: 6px; right: 14px; display: flex; gap: 4px; z-index: 3; }
.fs-btns button { min-width: 44px; height: 34px; padding: 0 8px; border: 1.5px solid var(--primary); border-radius: 9px;
  background: rgba(255,255,255,.92); color: var(--primary-dark); font: 800 14px/1 system-ui, sans-serif; letter-spacing: .02em; cursor: pointer; }
.fs-btns button:active { background: var(--primary-soft); }
.fs-btns button:disabled { opacity: .4; cursor: default; }
.lyrics > :first-child { margin-right: 104px; }
.lyrics { overflow-x: hidden; }
.w { max-width: 100%; flex-wrap: wrap; }

/* v0.20.1 (boss): AZ- / AZ+ stacked vertically (AZ+ on top); the first lines of the song leave room on the right */
.fs-btns { flex-direction: column-reverse; gap: 4px; }
.lyrics > :first-child { margin-right: 0; }
.lyrics > :nth-child(-n+3) { margin-right: 58px; }
