
/* =========================
   Active filter indicator
   ========================= */

.activeFilter {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.activeFilter .filterPill {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 7px 12px;
  border-radius: 999px;

  background: rgba(159,211,255,.12);
  border: 1px solid rgba(159,211,255,.35);
  color: var(--text);

  font-size: 13px;
  font-weight: 600;
}

.activeFilter .filterLabel {
  opacity: .75;
}

.activeFilter .filterClear {
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}

.activeFilter .filterClear:hover {
  opacity: .7;
}
:root {
  --bg: #0b0c10;
  --card: #14161c;
  --text: #e9eef7;
  --muted: #a9b2c3;
  --border: rgba(255,255,255,.1);
  --radius: 18px;

  --chord-size: 18px;
  --chord-line-height: 1.55;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: radial-gradient(1200px 800px at 20% 0%, #14162b 0%, var(--bg) 55%);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 14px 40px;
}

header {
  position: sticky;
  top: 0;
  z-index: 10;

  /* slightly tighter so the song appears higher */
  padding: 8px 0 8px;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(11,12,16,.92), rgba(11,12,16,.55), rgba(11,12,16,0));
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

/* ✅ Bigger site title (noticeable) */
h1 {
  margin: 0;
  font-size: clamp(28px, 4.6vw, 46px);
  line-height: 1.12;
}

/* ✅ Bigger subtitle */
.subtitle {
  color: var(--muted);
  font-size: 17px;
  margin-top: 6px;
}

.controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 15px;
  font-size: 14px;
  cursor: pointer;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

/* ✅ Bigger “xxx songs” pill */
.meta {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.pill {
  border: 1px solid var(--border);
  padding: 10px 18px;          /* ⬅️ bigger tap target */
  border-radius: 999px;
  font-size: 15px;

  color: var(--text);
  background: rgba(255,255,255,.06);
  text-decoration: none;

  display: inline-flex;
  align-items: center;

  line-height: 1;              /* keeps vertical centering tight */
}


/* =========================
   SONG TABLE (mobile-safe)
   ========================= */

/* ✅ Critical: prevent table becoming wider than screen */
.songTable {
  width: 100%;
  table-layout: fixed;     /* key fix for Android horizontal overflow */
  border-collapse: collapse;
}

/* Ensure cells can’t expand the table */
.songTable th,
.songTable td {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  vertical-align: middle;
}

/* ✅ Bigger tap targets */
.songTable td {
  padding: 16px 14px;
}

/* Your JS puts a flex row inside the <td> */
.songTable td > div {
  min-height: 56px;
  display: flex;
  align-items: center;

  /* ✅ critical for flex inside table cell */
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

/* subtle row separation */
.songTable tr + tr td {
  border-top: 1px solid rgba(255,255,255,.06);
}

.parts {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.partTitle {
  font-weight: 700;
  margin-bottom: 8px;
}

.sheet {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: var(--chord-size);
  line-height: var(--chord-line-height);

  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;

  padding: 14px 16px;
  margin: 0;

  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.18);

  white-space: pre-wrap;
  overflow-x: hidden;
  overflow-y: visible;

  overflow-wrap: anywhere;
  word-break: break-word;

  -webkit-overflow-scrolling: touch;
}

.status {
  color: var(--muted);
}

.error {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,120,120,.1);
  border: 1px solid rgba(255,120,120,.35);
  color: #ffb4b4;
}

/* -------------------------
   NEW: ABC button styling
   ------------------------- */
.abcBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  text-decoration: none;
  transition: all .15s ease;
}

.abcBtn:hover {
  background: rgba(159,211,255,.15);
  transform: translateY(-1px);
}

/* -------------------------
   NEW: Hidden SEO helper
   ------------------------- */
.seoHidden {
  position: absolute;
  left: -9999px;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* 📱 MOBILE */
@media (max-width: 520px) {
  .wrap { padding: 12px 10px 30px; }

  /* Still big, but not ridiculous */
  h1 { font-size: 24px; }
  .subtitle { font-size: 15px; }

  .pill { font-size: 13px; padding: 7px 12px; }

  /* Even bigger tap target */
  .songTable td { padding: 18px 14px; }

  .songTable td > div { min-height: 64px; }

  .sheet { padding: 12px 14px; }
}

/* Landscape compact mode */
@media (orientation: landscape) and (max-height: 430px) {
  h1 { font-size: 16px; }
  .subtitle { display: none; }
  #meta { display: none !important; }
}
/* =========================
   Chords-by-key table
   ========================= */

.keyTableWrap {
  margin-top: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;

  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0,0,0,.12);
}

.keyTable {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* mobile-safe: prevents runaway width */
  min-width: 720px;    /* allows scroll on small screens rather than squish */
}

.keyTable th,
.keyTable td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.keyTable thead th {
  position: sticky;
  top: 0;
  background: rgba(20,22,28,.95); /* close to --card */
  color: var(--muted);
  font-weight: 700;
  z-index: 1;
}

.keyTable tbody tr:hover td,
.keyTable tbody tr:hover th {
  background: rgba(255,255,255,.03);
}

.keyTable th[scope="row"] {
  text-align: center;
  font-weight: 800;
  color: var(--text);
}

.degMain {
  font-weight: 800;
  color: #9fd3ff; /* matches your abc progress accent */
}
.degMain {
  font-weight: 800;
  color: #9fd3ff;
  background: rgba(159,211,255,.12);
  padding: 2px 6px;
  border-radius: 6px;
}
.nashLine {
  margin: 6px 0 0;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.10);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  opacity: .85;
  white-space: pre;
  overflow-x: auto;
}

.nashTag {
  display: inline-block;
  min-width: 2ch;
  text-align: center;
  font-weight: 700;
  opacity: .9;
}
  .tuneMetaRow{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:center;
    margin-top:14px;
  }
  .tuneMetaPill{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:8px 10px;
    border-radius:999px;
    border:1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.05);
    font-size:14px;
    opacity:.95;
    line-height:1;
    white-space:nowrap;
  }
  .tuneMetaIcon{
    width:16px;
    height:16px;
    display:inline-block;
    opacity:.9;
    flex:0 0 auto;
  }
  .tuneMetaLabel{
    opacity:.75;
    margin-right:2px;
  }
  /* =========================
   Song list dictionary page
   ========================= */

.songListPage .songGrid {
  column-width: 260px;
  column-gap: 16px;
}

.songListPage .songItem {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin: 0 0 10px 0;

  /* ✅ KEY FIX: keep title + button on one line */
  display: flex;
  align-items: center;
  gap: 10px;
}

/* nice card-like title link */
.songListPage .songLink {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.12);
  color: var(--text);
  text-decoration: none;

  overflow: hidden;
  transition: transform .12s ease, background .12s ease;

  /* ✅ KEY FIX: let link take remaining space */
  flex: 1 1 auto;
  min-width: 0; /* critical for ellipsis */
}

.songListPage .songLink:hover {
  background: rgba(159,211,255,.10);
  transform: translateY(-1px);
}

.songListPage .songTitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0; /* critical inside flex */
}

/* ABC editor button (separate element) */
.songListPage .abcEditBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  text-decoration: none;
  transition: all .15s ease;
  flex: 0 0 auto;
}

.songListPage .abcEditBtn:hover {
  background: rgba(159,211,255,.15);
  transform: translateY(-1px);
}

.songListPage .abcEditIcon {
  width: 18px;
  height: 18px;
  stroke: #9fd3ff;
  opacity: .9;
}

@media (max-width: 520px) {
  .songListPage .songGrid { column-width: 180px; }
  .songListPage .songLink { padding: 12px 12px; }
}

/* =========================
   Burger menu
   ========================= */
.menuSection {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .6;
  padding: 8px 14px 4px;
}

.burgerWrap{
  position: relative;           /* ✅ anchor dropdown to this box */
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--text);
}



.burgerBtn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  cursor: pointer;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 12px;
}

.burgerBtn span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

/* open state */
.burgerBtn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.burgerBtn.open span:nth-child(2) {
  opacity: 0;
}
.burgerBtn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.burgerMenu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);

  min-width: 220px;
  padding: 10px;
  border-radius: 14px;

  background: rgba(20,22,28,.98);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);

  display: none;
  flex-direction: column;
  gap: 6px;

  z-index: 50;
}

.burgerMenu a {
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
    display: block;
  white-space: nowrap;   /* prevents wrapping */
  padding: 10px 14px;

  transition: background .12s ease, transform .12s ease;
}

.burgerMenu a:hover {
  background: rgba(159,211,255,.12);
  transform: translateY(-1px);
}

.burgerMenu.open {
  display: flex;
}
/* =========================
   Mobile burger fix
   ========================= */
@media (max-width: 640px) {
  .burgerWrap {
    position: absolute;
    top: 10px;
    right: 10px;
  }
}
@media (max-width: 640px) {
  .burgerBtn {
    width: 40px;
    height: 40px;
  }
}

/* =========================
   Chords-by-key: mobile fix
   ========================= */
@media (max-width: 520px) {

  /* Make the table area feel "full width" inside the card */
  .keyTableWrap {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 10px;
    padding-right: 10px;

    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Allow the table to shrink instead of forcing 720px */
  .keyTable {
    min-width: 0;        /* overrides your 720px */
    width: 100%;
    table-layout: fixed; /* keep it sane */
    font-size: 13px;
  }

  /* Tighten cells + allow wrapping if needed */
  .keyTable th,
  .keyTable td {
    padding: 10px 8px;
    white-space: normal;     /* overrides nowrap */
    overflow-wrap: anywhere; /* breaks long chord symbols safely */
    line-height: 1.15;
  }

  /* Keep the Key column readable */
  .keyTable th[scope="row"] {
    width: 44px;
    font-weight: 800;
  }

  /* Slightly smaller highlight pill so it doesn't bloat cells */
  .degMain {
    padding: 1px 4px;
    border-radius: 6px;
  }
}

/* =========================
   Back link + breadcrumbs
   ========================= */

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 7px 12px;
  border-radius: 999px;

  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);

  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;

  transition: transform .12s ease, background .12s ease;
}

.backlink:hover {
  background: rgba(159,211,255,.12);
  transform: translateY(-1px);
}

.breadcrumbs {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  opacity: .95;

  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .12s ease, border-color .12s ease;
}

.breadcrumbs a:hover {
  color: var(--text);
  border-bottom-color: rgba(159,211,255,.45);
}

/* Make the separators look intentional */
.breadcrumbs .sep {
  opacity: .6;
}

/* Mobile: keep it tidy */
@media (max-width: 520px) {
  .breadcrumbs { font-size: 12px; margin-top: 6px; }
  .backlink { font-size: 12px; padding: 6px 10px; }
}
/* =========================
   Dark theme selects (filters)
   ========================= */

.songListPage select.btn {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  color: var(--text);

  padding: 10px 38px 10px 14px; /* room for chevron */
  border-radius: 999px;
  font-size: 14px;
  line-height: 1.1;

  cursor: pointer;
}

/* Dropdown arrow */
.songListPage select.btn {
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(233,238,247,.9) 50%),
    linear-gradient(135deg, rgba(233,238,247,.9) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

/* Focus ring */
.songListPage select.btn:focus {
  outline: none;
  border-color: rgba(159,211,255,.55);
  box-shadow: 0 0 0 3px rgba(159,211,255,.18);
}

/* Disabled look */
.songListPage select.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

/* Important: make the actual option list readable */
.songListPage select.btn option {
  background: #14161c; /* close to your --card */
  color: var(--text);
}

/* =========================
   Tune meta pills (song page)
   ========================= */

.tuneMetaRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tuneMetaPill {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 6px 10px;
  border-radius: 999px;

  font-size: 14px;
  line-height: 1;
  white-space: nowrap;

  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--text);
}

/* icons */
.tuneMetaIcon {
  display: inline-flex;
  opacity: .85;
}

/* label text (Rhythm / Meter / Key) */
.tuneMetaLabel {
  opacity: .75;
  font-weight: 500;
}

/* clickable version */
.tuneMetaLink {
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .08s ease;
}

.tuneMetaLink:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.25);
}

.tuneMetaLink:active {
  transform: translateY(1px);
}

/* accessibility */
.tuneMetaLink:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(159,211,255,.6);
}


.tuneMetaLink {
  text-decoration: none;
}
.tuneMetaLink:hover {
  background: rgba(255,255,255,.08);
}
/* Highlight the song's key row in the "Chords by key" table */
.keyTable tr.isSongKeyRow > th,
.keyTable tr.isSongKeyRow > td {
  background: rgba(159, 211, 255, .10);
}

.keyTable tr.isSongKeyRow > th {
  border-left: 3px solid rgba(159, 211, 255, .85);
}

.keyTable tr.isSongKeyRow > th,
.keyTable tr.isSongKeyRow > td {
  border-top-color: rgba(159, 211, 255, .18);
  border-bottom-color: rgba(159, 211, 255, .18);
}

/* =========================
   Chord shapes section
   ========================= */
.chordShapesGrid{
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.chordShape{
  border: 1px solid var(--border);
  background: rgba(0,0,0,.14);
  border-radius: 14px;
  padding: 10px;
  overflow: hidden;
}

.chordShapeName{
  font-weight: 800;
  margin-bottom: 8px;
}

.chordShape svg{
  width: 100%;
  height: auto;
  display: block;
}

.chordShape .mutedHint{
  margin-top: 6px;
  font-size: 12px;
  opacity: .75;
}

/* =========================
   Chord Dictionary page (scoped)
   ========================= */

body.chordDictPage {
  margin: 0 !important;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
  background: #0b0f14 !important;
  color: #d9e0ea !important;
}

body.chordDictPage header {
  position: sticky !important;
  top: 0 !important;
  z-index: 5 !important;
  background: #0b0f14 !important;
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
  padding: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.chordDictPage .headerInner {
  max-width: 1320px !important;
  margin: 0 auto !important;
  padding: 14px 18px !important;
}

body.chordDictPage .topRow {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

body.chordDictPage h1 {
  margin: 0 !important;
  font-size: 18px !important;
  letter-spacing: .2px !important;
  line-height: 1.2 !important;
}

body.chordDictPage .row {
  margin-top: 10px !important;
  display: flex !important;
  gap: 10px !important;
  align-items: center !important;
  flex-wrap: wrap !important;
}

body.chordDictPage input[type="search"] {
  width: min(720px, 100%) !important;
  background: #0f1620 !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  color: #d9e0ea !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  outline: none !important;
}

body.chordDictPage input[type="search"]::placeholder {
  color: rgba(217,224,234,.55) !important;
}

body.chordDictPage .pill {
  font-size: 12px !important;
  padding: 4px 8px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  background: rgba(255,255,255,.04) !important;
  white-space: nowrap !important;
}

body.chordDictPage .wrap {
  max-width: 1320px !important;
  margin: 0 auto !important;
  padding: 14px 18px 28px !important;
}

body.chordDictPage .grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap: 12px !important;
}

@media (max-width: 1100px) {
  body.chordDictPage .grid { grid-template-columns: repeat(3, minmax(220px, 1fr)) !important; }
}
@media (max-width: 820px) {
  body.chordDictPage .grid { grid-template-columns: repeat(2, minmax(200px, 1fr)) !important; }
}
@media (max-width: 520px) {
  body.chordDictPage .grid { grid-template-columns: 1fr !important; }
}

body.chordDictPage a.card {
  display: block !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  border-radius: 12px !important;
  background: rgba(255,255,255,.03) !important;
  color: #d9e0ea !important;
  text-decoration: none !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  transition: background .12s ease, transform .12s ease !important;
}

body.chordDictPage a.card:hover {
  background: rgba(255,255,255,.06) !important;
  transform: translateY(-1px) !important;
}

body.chordDictPage .err {
  color: #ffb4b4 !important;
  white-space: pre-wrap !important;
  margin-top: 12px !important;
}
/* ChordDictionary burger: match site burger look */
body.chordDictPage .burgerWrap { position: relative; }

body.chordDictPage .burgerBtn{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  cursor: pointer;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 12px;
}

body.chordDictPage .burgerBtn span{
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

/* open state (if your JS toggles .open on the button) */
body.chordDictPage .burgerBtn.open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
body.chordDictPage .burgerBtn.open span:nth-child(2){ opacity: 0; }
body.chordDictPage .burgerBtn.open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

body.chordDictPage .burgerMenu{
  position: absolute;
  right: 0;
  top: calc(100% + 10px);

  min-width: 220px;
  padding: 10px;
  border-radius: 14px;

  background: rgba(20,22,28,.98);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);

  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 50;
}

body.chordDictPage .burgerMenu.open{ display: flex; }

body.chordDictPage .burgerMenu a{
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  transition: background .12s ease, transform .12s ease;
}

body.chordDictPage .burgerMenu a:hover{
  background: rgba(159,211,255,.12);
  transform: translateY(-1px);
}

/* =========================
   Chords Viewer page (scoped)
   ========================= */

body.chordsViewerPage {
  margin: 0 !important;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
  background: #0b0f14 !important;
  color: #d9e0ea !important;
}

body.chordsViewerPage header {
  padding: 16px 18px !important;
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
  position: sticky !important;
  top: 0 !important;
  background: #0b0f14 !important;
  z-index: 5 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.chordsViewerPage h1 {
  margin: 0 !important;
  font-size: 18px !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
}

body.chordsViewerPage .controls {
  margin-top: 10px !important;
  display: flex !important;
  gap: 10px !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
}

body.chordsViewerPage button {
  background: #1b2430 !important;
  color: #d9e0ea !important;
  border: 1px solid rgba(255,255,255,.15) !important;
  border-radius: 999px !important;
  padding: 6px 14px !important;
  cursor: pointer !important;
  font-size: 14px !important;
}

body.chordsViewerPage button.active {
  background: #2e3a4d !important;
  border-color: #7aa2f7 !important;
}

body.chordsViewerPage .pill {
  font-size: 12px !important;
  padding: 4px 8px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  background: rgba(255,255,255,.04) !important;
}

body.chordsViewerPage .grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  gap: 14px !important;
  padding: 14px !important;
}

body.chordsViewerPage .card {
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 14px !important;
  padding: 12px !important;
  background: rgba(255,255,255,.03) !important;
}

body.chordsViewerPage .chart {
  width: 260px !important;
  margin: 0 auto !important;
}

body.chordsViewerPage .err {
  margin-top: 10px !important;
  font-size: 12px !important;
  color: #ffb4b4 !important;
  white-space: pre-wrap !important;
}

/* =========================
   Song origin flag (left of title)
   ========================= */

.songListPage .songFlag{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 18px;
  height: 18px;
  flex: 0 0 18px;

  margin-right: 8px;

  font-size: 16px;     /* emoji size */
  line-height: 1;

  /* helps emoji alignment */
  transform: translateY(0.5px);
  opacity: .95;
}

/* On tiny screens, keep it readable but compact */
@media (max-width: 520px) {
  .songListPage .songFlag{
    width: 16px;
    height: 16px;
    flex-basis: 16px;
    font-size: 15px;
    margin-right: 6px;
  }
/* QR */
.metaRow{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap; /* stacks on small screens */
}

.metaLeft{
  flex: 1 1 420px;
  min-width: 260px;
}

.metaRight{
  flex: 0 0 auto;
}

.qrMiniCard{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  border-radius: 14px;
  padding: 10px;
  width: 140px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
}

#qr{
  width: 128px;
  height: 128px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.qrMiniLabel{
  font-size: 12px;
  opacity: .75;
}
/* =========================
   Complexity pill (song page)
   ========================= */

.complexityPill {
  text-decoration: none;
  font-weight: 600;
  transition: background .15s ease, transform .08s ease, border-color .15s ease;
}

.complexityPill:hover {
  background: rgba(159,211,255,.12);
  border-color: rgba(159,211,255,.45);
  transform: translateY(-1px);
}

/* Optional subtle color accents */

.complexityPill.isBeginner {
  border-color: rgba(120, 220, 140, .35);
  background: rgba(120, 220, 140, .10);
}

.complexityPill.isIntermediate {
  border-color: rgba(255, 200, 120, .35);
  background: rgba(255, 200, 120, .10);
}

.complexityPill.isAdvanced {
  border-color: rgba(255, 150, 120, .35);
  background: rgba(255, 150, 120, .10);
}

.complexityPill.isComplex {
  border-color: rgba(255, 120, 160, .35);
  background: rgba(255, 120, 160, .10);
}

.complexityPill.isUnknown {
  opacity: .65;
}

.fsBtn{
  width:44px;
  height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: rgba(233,238,247,.85);   /* ✅ slightly muted (not harsh white) */
  cursor:pointer;
  transition: all .15s ease;
}

.fsBtn:hover{
  background: rgba(159,211,255,.12);
  transform: translateY(-1px);
}
