  /* ══════════════════════════════════════════
     LIGHT THEME (default)
  ══════════════════════════════════════════ */
  :root {
    --bg:        #f5f2ee;
    --surface:   #ede9e3;
    --surface2:  #e4dfd7;
    --card:      #faf8f5;
    --border:    #d4cdc4;
    --gold:      #b07a10;
    --gold2:     #c98f20;
    --gold-lt:   rgba(176,122,16,0.10);
    --red:       #c0392b;
    --text:      #1a1410;
    --muted:     #7a6e60;
    --chord:     #c0392b;
    --chord-bg:  rgba(192,57,43,0.07);
    --radius:    12px;
    --radius-lg: 20px;
    --shadow:    0 2px 16px rgba(0,0,0,0.06);
    --header-bg:    rgba(245,242,238,0.94);
    --sticky-ad-bg: rgba(245,242,238,0.97);
    --grad1: rgba(176,122,16,0.07);
    --grad2: rgba(192,57,43,0.05);
  }

  /* ══════════════════════════════════════════
     DARK THEME
  ══════════════════════════════════════════ */
  [data-theme="dark"] {
    --bg:        #111008;
    --surface:   #1c1a12;
    --surface2:  #252218;
    --card:      #1a1810;
    --border:    #38341f;
    --gold:      #d4960e;
    --gold2:     #e8aa20;
    --gold-lt:   rgba(212,150,14,0.12);
    --red:       #e05040;
    --text:      #f0ead8;
    --muted:     #9a9070;
    --chord:     #e05040;
    --chord-bg:  rgba(224,80,64,0.10);
    --shadow:    0 2px 16px rgba(0,0,0,0.28);
    --header-bg:    rgba(17,16,8,0.94);
    --sticky-ad-bg: rgba(17,16,8,0.97);
    --grad1: rgba(212,150,14,0.07);
    --grad2: rgba(224,80,64,0.05);
  }

  /* ── Smooth theme transition ── */
  *, *::before, *::after {
    box-sizing: border-box; margin: 0; padding: 0;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  }
  img, svg, iframe { transition: none !important; }

  html { scroll-behavior: smooth; }

  body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
  }

  body::before {
    content: '';
    position: fixed; inset: 0;
    background:
      radial-gradient(ellipse 80% 60% at 20% 10%, var(--grad1) 0%, transparent 60%),
      radial-gradient(ellipse 60% 50% at 80% 80%, var(--grad2) 0%, transparent 60%);
    pointer-events: none; z-index: 0;
  }

  /* ── TOP LEADERBOARD AD ── */
  .ad-leaderboard {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center; padding: 8px 20px;
  }

  .ad-slot {
    background: var(--surface2); border: 1px dashed var(--border); border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: var(--muted); font-size: 0.72rem; letter-spacing: 0.1em;
    text-transform: uppercase; font-family: 'DM Mono', monospace;
  }

  .ad-leaderboard .ad-slot { width: 100%; max-width: 728px; height: 90px; }

  /* ── MAIN LAYOUT ── */
  .layout {
    max-width: 1100px; margin: 0 auto; padding: 28px 20px;
    display: grid; grid-template-columns: 1fr 300px;
    gap: 28px; position: relative; z-index: 1; align-items: start;
  }
  @media (max-width: 768px) { .layout { grid-template-columns: 1fr; padding: 16px; gap: 20px; } }

  /* ── PAGE BREADCRUMB ── */
  .page-breadcrumb {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.76rem; color: var(--muted); flex-wrap: wrap; margin-bottom: 14px;
  }
  .page-breadcrumb a { color: var(--muted); text-decoration: none; }
  .page-breadcrumb a:hover { color: var(--gold); }
  .page-breadcrumb .sep { color: var(--border); }
  .page-breadcrumb .current { color: var(--text); font-weight: 500; }
  @media (max-width: 540px) { .page-breadcrumb .current { display: none; } }

  /* ── SONG HERO ── */
  .song-hero {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow); margin-bottom: 20px;
    animation: fadeUp 0.4s ease both;
  }

  .hero-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--gold) 0%, var(--gold2) 60%, #f5c842 100%);
  }

  .hero-body {
    padding: 22px 28px 18px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 20px; flex-wrap: wrap;
  }

  .song-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 900;
    color: var(--text); line-height: 1.15; margin-bottom: 4px; letter-spacing: -0.3px;
  }

  .song-artist { font-size: 0.9rem; color: var(--muted); font-weight: 400; }
  .song-artist a { color: var(--gold); font-weight: 600; text-decoration: none; }
  .song-artist a:hover { text-decoration: underline; }

  .hero-meta { flex-shrink: 0; }

  .key-pill {
    background: var(--chord-bg); border: 1px solid rgba(192,57,43,0.2);
    border-radius: 10px; padding: 8px 14px; text-align: center;
  }
  .key-label { font-size: 0.6rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
  .key-value { font-family: 'DM Mono', monospace; font-size: 1.05rem; font-weight: 500; color: var(--chord); margin-top: 2px; }

  /* ── TRANSPOSE BAR ── */
  .transpose-bar {
    background: var(--surface); border-top: 1px solid var(--border);
    padding: 10px 28px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  }

  .transpose-label { font-size: 0.72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; flex-shrink: 0; }
  .transpose-controls { display: flex; align-items: center; gap: 6px; }

  .t-btn {
    width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--border);
    background: var(--card); font-size: 1rem; font-weight: 600; color: var(--text);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-family: 'DM Sans', sans-serif;
  }
  .t-btn:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-lt); }

  .t-display { font-family: 'DM Mono', monospace; font-size: 0.82rem; color: var(--chord); font-weight: 500; min-width: 28px; text-align: center; }

  .t-reset { font-size: 0.72rem; color: var(--muted); background: none; border: none; cursor: pointer; font-family: 'DM Sans', sans-serif; text-decoration: underline; }
  .t-reset:hover { color: var(--gold); }

  .bar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
  .font-controls { display: flex; align-items: center; gap: 6px; }
  .font-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

  .f-btn {
    width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--border);
    background: var(--card); font-size: 0.78rem; font-weight: 600; color: var(--muted);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-family: 'DM Mono', monospace;
  }
  .f-btn:hover { border-color: var(--gold); color: var(--gold); }

  .bar-divider { width: 1px; height: 20px; background: var(--border); flex-shrink: 0; }

  .btn-outline {
    border: 1px solid var(--border); border-radius: 7px; padding: 6px 12px;
    font-family: 'DM Sans', sans-serif; font-size: 0.75rem; font-weight: 600;
    color: var(--muted); background: var(--card); cursor: pointer;
    text-decoration: none; display: inline-flex; align-items: center; gap: 5px;
  }
  .btn-outline:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-lt); }

  /* ── THEME TOGGLE ── */
  .theme-toggle {
    width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px;
    background: var(--surface2); color: var(--muted);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 17px; flex-shrink: 0; padding: 0; line-height: 1;
  }
  .theme-toggle:hover { border-color: var(--gold); color: var(--gold); }
  .theme-toggle .icon-moon { display: inline; }
  .theme-toggle .icon-sun  { display: none; }
  [data-theme="dark"] .theme-toggle .icon-moon { display: none; }
  [data-theme="dark"] .theme-toggle .icon-sun  { display: inline; }

  @media (max-width: 540px) {
    .transpose-bar { padding: 10px 16px; }
    .hero-body { padding: 16px 16px 14px; }
    .font-controls { display: none; }
    .bar-divider { display: none; }
  }

  /* ── CHORD SHEET CARD ── */
  .chord-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow);
    overflow: hidden; margin-bottom: 20px; animation: fadeUp 0.4s ease 0.08s both;
  }

  .chord-card-header {
    padding: 13px 22px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px; background: var(--surface);
  }

  .chord-card-header h2 { font-family: 'Playfair Display', serif; font-size: 0.95rem; font-weight: 700; color: var(--text); }

  .chord-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }

  /* ── CHORD SHEET ── */
  .chord-sheet {
    padding: 26px 28px; font-family: 'DM Mono', monospace;
    font-size: 0.88rem; line-height: 1.95; color: var(--text);
    white-space: pre-wrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  @media (max-width: 540px) { .chord-sheet { padding: 18px 16px; font-size: 0.82rem; } .chord-card-header { padding: 11px 16px; } }

  .chord-sheet .ch {
    color: var(--chord); font-weight: 500; background: var(--chord-bg);
    border-radius: 3px; padding: 0 3px; cursor: help; display: inline-block;
  }
  .chord-sheet .ch:hover { background: rgba(192,57,43,0.15); }
  [data-theme="dark"] .chord-sheet .ch:hover { background: rgba(224,80,64,0.2); }

  .chord-sheet .section-label {
    display: inline-block; background: var(--gold-lt);
    border: 1px solid rgba(176,122,16,0.3); border-radius: 5px;
    padding: 1px 8px; font-size: 0.7rem; font-weight: 600; color: var(--gold);
    text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 2px;
    font-family: 'DM Sans', sans-serif;
  }

  /* ── MID AD ── */
  .ad-mid { display: flex; justify-content: center; margin: 4px 0 20px; }
  .ad-mid .ad-slot { width: 100%; max-width: 468px; height: 60px; }

  /* ── YOUTUBE ── */
  .yt-section { margin-bottom: 20px; }
  .yt-section.hidden { display: none; }
  .yt-wrap {
    position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }
  .yt-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

  /* ── SIDEBAR ── */
  .sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 80px; align-self: start; }
  .ad-sidebar { display: flex; flex-direction: column; gap: 16px; }
  .ad-sidebar .ad-rect { width: 100%; height: 250px; border-radius: var(--radius); }
  .ad-sidebar .ad-half { width: 100%; height: 600px; max-height: 55vh; border-radius: var(--radius); }

  .s-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }

  .s-card-head { padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--surface); display: flex; align-items: center; gap: 8px; }
  .s-card-head h3 { font-family: 'Playfair Display', serif; font-size: 0.9rem; font-weight: 700; color: var(--text); }

  .more-songs { display: flex; flex-direction: column; }
  .more-song-link { display: flex; align-items: center; gap: 10px; padding: 10px 18px; text-decoration: none; color: var(--text); font-size: 0.82rem; border-bottom: 1px solid var(--border); }
  .more-song-link:last-child { border-bottom: none; }
  .more-song-link:hover { background: var(--gold-lt); color: var(--gold); }
  .more-song-link::before { content: '♩'; color: var(--border); font-size: 0.75rem; flex-shrink: 0; }
  .more-song-link:hover::before { color: var(--gold); }
  .more-song-link.active { background: var(--gold-lt); color: var(--gold); font-weight: 600; }
  .more-song-link.active::before { color: var(--gold); }

  /* ── FB CTA ── */
  .fb-cta { background: linear-gradient(135deg, #1a1f36, #151b30); border: 1px solid #2a3060; border-radius: var(--radius-lg); padding: 20px; text-align: center; }
  .fb-cta .fb-icon { font-size: 28px; margin-bottom: 8px; }
  .fb-cta h3 { font-size: 0.9rem; font-weight: 600; color: yellow; margin-bottom: 6px; }
  .fb-cta p { font-size: 0.78rem; color: white; margin-bottom: 14px; }
  .fb-btn { display: inline-block; background: #1877f2; color: white; text-decoration: none; border-radius: 8px; padding: 9px 18px; font-size: 0.82rem; font-weight: 600; }
  .fb-btn:hover { background: #0d6fe0; }

  /* ── SCROLLBAR ── */
  ::-webkit-scrollbar { width: 6px; height: 6px; }
  ::-webkit-scrollbar-track { background: var(--bg); }
  ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
  ::-webkit-scrollbar-thumb:hover { background: var(--muted); }

  /* ── ANIMATIONS ── */
  @keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

  /* ── PRINT STYLES ── */
  @media print {
    #site-header, .ad-leaderboard, .ad-mid, .ad-sidebar,
    .sidebar, .transpose-bar, #site-footer, .yt-section { display: none !important; }
    .layout { grid-template-columns: 1fr; }
    .song-hero, .chord-card { box-shadow: none; border-color: #ccc; }
    body::before { display: none; }
  }
