:root {
  --green: #4FAF52;
  --green-deep: #2B802F;
  --black: #0D0D0F;
  --white: #FFFFFF;
  --grey-50: #F7F7F7;
  --grey-200: #E5E5E5;
  --grey-500: #8A8A8A;
  --grey-800: #1A1A1C;
  --grey-900: #131214;

  --bg-page: var(--black);
  --bg-surface: var(--grey-800);
  --bg-surface-raised: var(--grey-900);
  --text-primary: var(--white);
  --text-secondary: #B0B0B0;
  --border: #26262a;
  --accent: var(--green);
  --accent-hover: var(--green-deep);
  --on-accent: var(--white);
  --chord-accent: var(--green);

  --space-1: 4px; --space-2: 8px; --space-3: 16px;
  --space-4: 24px; --space-5: 32px; --space-6: 48px; --space-7: 64px;
  --radius: 10px;
  --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
  --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Noto Sans Mono', monospace;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --bg: var(--bg-page);
  --bg-card: var(--bg-surface);
  --text: var(--text-primary);
  --text-muted: var(--text-secondary);
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

* { box-sizing: border-box; }
html {
  scroll-padding-top: 100px;
  scroll-behavior: smooth;
}
html, body {
  background-color: var(--bg) !important;
  color: var(--text);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
}
body {
   font-family: var(--font-ui);
   font-size: clamp(1rem, 0.95rem + 0.3vw, 1.1rem);
   line-height: 1.6;
   -webkit-font-smoothing: antialiased;
}


h1, h2, h3, h4, h5, h6 { color: var(--text-primary); }
h1 { font-size: clamp(1.75rem, 1.25rem + 2.5vw, 3rem); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 var(--space-3); }
h2 { font-size: clamp(1.25rem, 1rem + 1.25vw, 1.75rem); font-weight: 600; letter-spacing: -0.01em; margin: 0 0 var(--space-3); }
h3 { font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.35rem); font-weight: 600; margin: 0 0 var(--space-2); }
p { color: var(--text-secondary); margin: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

img, video, svg { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space-3); }
.main-content { flex: 1; }

.breadcrumbs { padding-block: 12px; font-size: 0.8125rem; line-height: 1.5; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 9px; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li { display: flex; align-items: baseline; gap: 9px; min-width: 0; max-width: 100%; }
.breadcrumbs a, .breadcrumbs [aria-current="page"] { min-width: 0; overflow-wrap: anywhere; }
.breadcrumbs a, .breadcrumbs__separator { color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumbs a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.breadcrumbs [aria-current="page"] { color: var(--text-primary); font-weight: 500; }


.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overflow-x-auto { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.min-touch { min-height: 44px; min-width: 44px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-4); }
.toolbar .songs-count { margin-bottom: 0; color: var(--text-secondary); }
.browse-sort { display: flex; align-items: center; gap: 8px; }
.browse-sort .sort-select { flex: 1; min-width: 0; }

/* ── Header / Navbar ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transform: translateY(0);
  transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}

.site-header.nav-hidden {
  transform: translateY(-100%);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-4);
  background: rgba(13, 13, 15, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(38, 38, 42, 0.8);
  min-height: 56px;
}

.site-header.nav-hidden .navbar {
  box-shadow: none;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-3);
  gap: var(--space-4);
}

.nav-brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.nav-brand .hamro { color: var(--white); }

.nav-brand .tab { color: var(--accent); }
.nav-brand:hover { color: var(--accent); }

.nav-logo { max-height: 72px; width: auto; vertical-align: middle; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
  justify-content: flex-end;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-right: var(--space-4);
}

.nav-link {
   position: relative;
   color: var(--grey-500);
   font-weight: 500;
   font-size: 1rem;
   padding: var(--space-2) var(--space-3);
  border-radius: 8px;
  text-decoration: none;
  transition: color 150ms ease-out, background 150ms ease-out;
  white-space: nowrap;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}


.nav-link::after {
  content: '';
  position: absolute;
  left: var(--space-3);
  right: var(--space-3);
  bottom: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 150ms ease-out;
}

.nav-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-link.active {
  color: var(--white);
}

.nav-link--ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--grey-500);
}

.nav-link--ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  border-color: var(--border);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-user-row {
  display: contents;
}

/* ── Modern Search Bar ── */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--grey-900);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: var(--space-1) var(--space-1) var(--space-1) var(--space-3);
  width: 280px;
  max-width: 100%;
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}
.search-bar--block { width: 100%; max-width: none; margin-bottom: var(--space-4); }

.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 175, 82, 0.12);
}

.search-bar__icon {
  flex-shrink: 0;
  color: var(--grey-500);
  pointer-events: none;
}

.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  padding: var(--space-2) var(--space-2);
  outline: none;
  min-width: 0;
}

.search-bar input::placeholder { color: var(--grey-500); }

.search-dropdown {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  width: min(320px, 100vw);
  background: var(--bg-surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 200;
  display: none;
  overflow: hidden;
  left: auto;
}

.search-dropdown:not(:empty) { display: block; }

.suggest-item {
  display: block;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-primary);
}

.suggest-item:last-child { border-bottom: none; }

.suggest-item:hover { background: var(--bg-surface); }

.suggest-title { font-weight: 600; }

.suggest-artist { font-size: 0.8rem; color: var(--text-secondary); }

.search-dropdown mark {
    background: rgba(79, 175, 82, 0.25);
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

.suggest-no-results {
    padding: var(--space-3);
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

/* ── Theme Toggle ── */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--grey-500);
  cursor: pointer;
  transition: background 150ms ease-out, color 150ms ease-out;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
}

.theme-toggle__icon {
  width: 20px;
  height: 20px;
  display: none;
}

[data-theme="dark"] .theme-toggle__icon--moon { display: block; }
[data-theme="light"] .theme-toggle__icon--sun { display: block; }

/* ── User Section ── */
.nav-user {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-app-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: var(--space-2);
}

.nav-app-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 150ms, border-color 150ms, background 150ms;
}

.nav-app-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--bg-surface-raised);
}

.nav-user__profile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  transition: transform 150ms ease-out, opacity 150ms ease-out;
}

.nav-user__profile:hover {
  transform: translateY(-1px);
  opacity: 0.92;
  color: var(--on-accent);
}

.nav-user__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.nav-user__avatar {
  line-height: 1;
}

.nav-user__avatar-img--error {
  display: none !important;
}

.nav-user__avatar--hidden {
  display: none;
}

/* ── Mobile Toggle ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle:hover { background: rgba(255, 255, 255, 0.04); }

.nav-toggle__line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 150ms ease-out, opacity 150ms ease-out;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


.footer { border-top: 1px solid var(--border); padding: var(--space-4) var(--space-3); margin-top: var(--space-4); text-align: center; color: var(--text-secondary); font-size: .875rem; }

.page-hero { padding: var(--space-6) var(--space-3) var(--space-4); text-align: center; }
.page-hero h1 { font-size: 2.8rem; margin-bottom: var(--space-2); }
.page-hero .lead { color: var(--text-secondary); font-size: 1.125rem; }

.btn {
   display: inline-flex; align-items: center; gap: var(--space-2);
   background: var(--accent); color: var(--on-accent);
   font-weight: 600; font-size: 1rem;
   padding: var(--space-2) var(--space-4);
  border: none; border-radius: 8px; cursor: pointer;
  transition: background 150ms ease-out, transform 150ms ease-out;
  min-height: 44px;
  justify-content: center;
  text-decoration: none;
}
.btn:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn:active { transform: scale(0.97); }
.btn-secondary { background: var(--grey-200); color: var(--black); }
.btn-secondary:hover { background: var(--grey-500); color: var(--white); }
.btn-sm { padding: var(--space-1) var(--space-3); font-size: .875rem; min-height: 36px; }

/* Social / OAuth buttons */
.btn-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: transform 120ms ease-out, box-shadow 150ms ease-out, border-color 150ms ease-out;
}
.btn-social:active { transform: scale(0.98); }
.btn-social__icon { flex-shrink: 0; }

.btn-google {
    background: var(--bg-surface-raised);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-google:hover {
    background: var(--bg-page);
    border-color: var(--grey-500);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.btn-google:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: var(--space-3) 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}
.auth-divider span {
    padding: 0 var(--space-3);
}

.page-404 { text-align: center; padding: var(--space-6) var(--space-3); }
.page-404 h1 { font-size: clamp(3rem, 2rem + 5vw, 5rem); color: var(--accent); }

/* App Banner */
.app-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: linear-gradient(135deg, var(--bg-surface-raised), var(--bg-surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}
.app-banner__icon { color: var(--accent); flex-shrink: 0; }
.app-banner__text { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.app-banner__text strong { color: var(--text-primary); font-size: 1rem; }
.app-banner__text span { color: var(--text-secondary); font-size: 0.9rem; }
.app-banner__actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* Requests Board */
.requests-board__section { margin-bottom: var(--space-4); }
.requests-board { padding-top: 0; }

@media (min-width: 641px) {
  .requests-board { padding-top: 120px; }
}
.requests-board__section .section-header { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.requests-board__list { display: flex; flex-direction: column; gap: var(--space-3); }
.request-board__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  flex-wrap: wrap;
}
.request-board__item--published { border-left: 3px solid var(--accent); }
.request-board__body { flex: 1; min-width: 0; }
.request-board__title { display: flex; align-items: baseline; gap: var(--space-2); flex-wrap: wrap; margin-bottom: 4px; }
.request-board__title-link { font-weight: 600; color: var(--text-primary); text-decoration: none; font-size: 1.05rem; }
.request-board__title-link:hover { color: var(--accent); }
.request-board__meta { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 4px; }
.request-board__note { font-size: 0.9rem; color: var(--text-secondary); margin-top: var(--space-1); }
.request-board__actions { flex-shrink: 0; }

.upvote-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-primary);
  transition: background 150ms, border-color 150ms;
  min-width: 50px;
}
.upvote-btn:hover:not(.upvote-btn--disabled) { border-color: var(--accent); }
.upvote-btn--active {
  background: rgba(79,175,82,.12);
  border-color: rgba(79,175,82,.4);
  color: #4ade80;
}
.upvote-btn--disabled { opacity: 0.5; cursor: not-allowed; }
.upvote-btn__arrow { font-size: 0.75rem; line-height: 1; }
.upvote-btn__count { font-weight: 700; font-size: 0.95rem; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-pending { background: rgba(234,179,8,.15); color: #facc15; border: 1px solid rgba(234,179,8,.3); }
.badge-published { background: rgba(79,175,82,.12); color: #4ade80; border: 1px solid rgba(79,175,82,.3); }

.contributors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-3);
}
.contributor-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}
.contributor-card__rank { font-size: 0.75rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; }
.contributor-card__avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.25rem;
}
.contributor-card__name { font-weight: 600; color: var(--text-primary); font-size: 0.95rem; }
.contributor-card__count { font-size: 0.85rem; color: var(--text-secondary); }

.request-song-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    background: linear-gradient(135deg, var(--bg-surface-raised), var(--bg-surface));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-4) var(--space-5);
    flex-wrap: wrap;
}
.request-song-banner__text h2 {
    margin: 0 0 var(--space-1);
    font-size: 1.25rem;
    color: var(--text-primary);
}
.request-song-banner__text p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

@media (max-width: 640px) {
    .request-song-banner {
        flex-direction: column;
        text-align: center;
    }
}
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }

[data-theme="light"] {
  --bg-page: var(--white);
  --bg-surface: var(--grey-50);
  --bg-surface-raised: var(--white);
  --text-primary: var(--black);
  --text-secondary: var(--grey-500);
  --border: var(--grey-200);
}

@media print {
   .navbar, .song-controls, .related-section, .other-versions-section, .footer { display: none !important; }
   .chord-sheet-wrapper { border: none; padding: 0; }
   .chord-token { color: #000 !important; background: none !important; }
   body { background: #fff; color: #000; }
 }

/* Song page */
.song-page { padding: var(--space-2) 0; }
.song-hero { position: relative; width: 100%; height: 360px; overflow: hidden; background: var(--bg-surface); margin-bottom: 0; }
.song-hero__img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.song-hero__placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%, #533483 100%); }
.song-hero__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(2, 40, 25, 0.92) 0%, rgba(4, 72, 50, 0.35) 50%, transparent 100%); display: flex; align-items: flex-end; padding-bottom: 28px; }
.song-hero__overlay .container { width: 100%; }
.song-hero__artist { margin-bottom: 6px; }
.song-hero__artist-link { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.song-hero__artist-link:hover .song-hero__artist-name { text-decoration: underline; }
.song-hero__avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.5); flex-shrink: 0; background: var(--accent); display: flex; align-items: center; justify-content: center; line-height: 1; }
.song-hero__avatar--fallback { font-size: 0.65rem; font-weight: 700; color: #fff; line-height: 1; }
.song-hero__artist-name { font-size: 0.72rem; font-weight: 600; color: rgba(255,255,255,0.85); letter-spacing: 0.02em; }
.song-hero__title { font-size: 2.4rem; font-weight: 800; color: #fff; margin: 0 0 8px 0; line-height: 1.15; text-shadow: 0 2px 10px rgba(0,0,0,0.6); }
.song-facts--hero .badge-fact, .song-facts--hero .badge-rating { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.25); backdrop-filter: blur(4px); }
.badge-fact, .badge-rating { font-size: 0.65rem; font-weight: 500; padding: 2px 6px; border-radius: 4px; display: inline-block; color: rgba(255,255,255,0.85); }
.song-link-row { margin: var(--space-4) 0; display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.yt-embed-wrap {
  display: none;
  margin: var(--space-3) 0;
  width: 100%;
}
.yt-embed-wrap iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
}
.other-versions-section { margin: var(--space-5) 0; padding: var(--space-3); background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); }
.other-versions-section h3 { margin: 0 0 var(--space-2); font-size: 1.1rem; color: var(--text-primary); }
.versions-intro { margin: 0 0 var(--space-2); font-size: 0.9rem; color: var(--text-secondary); }
.versions-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.versions-list li { display: flex; align-items: center; gap: var(--space-2); }
.version-link { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--text-primary); text-decoration: none; font-weight: 500; }
.version-link:hover { color: var(--accent); text-decoration: underline; }
.version-tag { display: inline-block; padding: 2px 8px; background: rgba(79,175,82,.12); color: var(--accent); font-size: 0.75rem; font-weight: 600; border-radius: 12px; border: 1px solid rgba(79,175,82,.25); }
#print-stat { color: var(--accent); font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: color 150ms ease-out, text-shadow 150ms ease-out; }
#print-stat:hover { color: var(--accent-hover); text-decoration: underline; }
.meta-stats { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); }

.control-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5);
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}
.control-group { display: flex; align-items: center; gap: var(--space-1); }
.control-group__label {
  color: var(--text-secondary); font-size: 0.8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-right: var(--space-2);
}
.control-btn {
  background: var(--accent); color: var(--on-accent);
  border: none; border-radius: 6px; width: 32px; height: 32px;
  font-weight: 700; cursor: pointer;
  transition: background 150ms ease-out, transform 100ms ease-out, box-shadow 150ms ease-out;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.control-btn:hover { background: var(--accent-hover); }
.control-btn:active { transform: scale(0.93); }
.control-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.control-btn--reset { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.control-btn--reset:hover { background: var(--bg-surface-raised); color: var(--text-primary); }
.control-status {
  min-width: 44px; text-align: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-page); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 8px;
}

.meta-strip {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.meta-actions {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.meta-stats { display: flex; align-items: center; gap: var(--space-4); }
.meta-stat {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-secondary); font-size: 0.85rem;
}
.meta-stat svg { width: 16px; height: 16px; opacity: 0.7; flex-shrink: 0; }
#like-stat { background: transparent; cursor: pointer; display: inline-flex; align-items: center; gap: var(--space-1); transition: color 150ms ease-out, transform 100ms ease-out; }
#like-stat svg { width: 16px; height: 16px; }
#like-stat[data-liked="1"] svg { fill: #10b981; stroke: none; opacity: 1; }
#like-stat[data-liked="0"] svg { fill: none; stroke: var(--text-muted, #6b7280); }
#like-stat:hover svg { stroke: #10b981; }
.login-to-like { color: var(--accent); }

.chord-sheet-wrapper { font-family: var(--font-body); font-size: clamp(19px, 2.8vw, 25px); line-height: 1.7; background: var(--bg-surface); padding: var(--space-3); border-radius: var(--radius); border: 1px solid var(--border); }
/* ── Chord sheet — UG-style stacked chord-unit layout ──────────────── */

.chord-sheet {
   font-family: 'Noto Sans Devanagari', 'Noto Sans Mono', monospace;
   font-size: 1.15rem;
   line-height: 1;
   white-space: normal;
   position: relative;
   overflow: visible;
 }

/* Each lyric line is a flex row of chord-unit columns */
.csheet-line {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  margin: 0;
  line-height: 1;
}

/* Each chord-unit: chord name stacked above its lyric fragment */
.chord-unit {
   display: inline-grid;
   grid-template-rows: 1.3em auto;
   grid-template-columns: auto;
   position: relative;
   vertical-align: bottom;
   min-width: 0;
   max-width: 100%;
}

/* Chord name row — sits in grid row 1 naturally (no longer absolutely positioned) */
.chord-name {
   font-family: 'Noto Sans Mono', monospace;
   font-size: 0.95em;
   font-weight: 700;
   color: var(--accent, #4CAF50);
   white-space: nowrap;
   line-height: 1.3;
   padding-right: 0;
}

/* Padding between words — suppressed when a chord splits mid-word */
.chord-unit:not(.chord-unit--tight) .chord-name {
   padding-right: 0.2em;
}

/* No-chord units: hide the placeholder chord-name visually
   but keep its height so lyric text sits at the same baseline */
.chord-unit--no-chord .chord-name {
  visibility: hidden;
}

/* Lyric fragment — sits in grid row 2 */
.chord-lyric {
   display: inline-block;
   white-space: pre-wrap;
   word-break: normal;
   overflow-wrap: normal;
   line-height: 1.6;
   min-height: 1.6em;
   font-size: 1.05em;
   padding-right: 0;
}

/* Padding between words — suppressed when a chord splits mid-word */
.chord-unit:not(.chord-unit--tight) .chord-lyric {
   padding-right: 0.15em;
}

/* Clickable chord tokens */
.chord-token {
   cursor: pointer;
   border-radius: 2px;
   transition: background 0.1s;
   touch-action: manipulation;
}
.chord-token:hover,
.chord-token:focus {
  background: color-mix(in srgb, var(--accent, #4CAF50) 15%, transparent);
  outline: none;
}

/* Section labels: [Verse 1], [Chorus], etc. */
.csheet-section {
   font-weight: 700;
   font-size: 0.9em;
   text-transform: uppercase;
   letter-spacing: 0.08em;
   color: var(--text-muted, #888);
   margin: 1em 0 0.25em;
   width: 100%;
}

/* Blank line spacer */
.csheet-gap {
  height: 0.75em;
  width: 100%;
  display: block;
}

/* Guitar tab blocks (e|-----|) — MUST wrap: horizontally scrollable container,
   never breaks the page layout. Chord/lyric lines in .csheet-line intentionally
   wrap normally; do NOT unify their white-space behavior. */
.csheet-tab {
   display: block;
   width: 100%;
   max-width: 100%;
   overflow-x: auto;
   -webkit-overflow-scrolling: touch;
}
.csheet-tab pre {
   font-family: 'Noto Sans Mono', monospace;
   font-size: 1em;
   white-space: pre;
   overflow-x: auto;
   margin: 0;
   line-height: 1.4;
   display: inline-block;
   min-width: 100%;
}

.chord-tooltip {
   position: absolute;
   z-index: 100;
   opacity: 0;
   visibility: hidden;
   transform: translateY(4px);
   transition: opacity 120ms ease-out, transform 120ms ease-out, visibility 120ms;
   pointer-events: none;
}
.chord-tooltip__inner {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.45);
}
.chord-diagram { display: block; }
.chord-tooltip.chord-tooltip--show { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.related-section { margin-top: var(--space-4); }
.related-section h3 { margin-bottom: var(--space-3); color: var(--text-primary); }

/* Home page */
.home-page { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.home-hero { text-align: center; padding: var(--space-7) var(--space-3) var(--space-5); }
.home-hero h1 { font-size: 3rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: var(--space-2); color: var(--text-primary); }
.home-hero p { font-size: 1.125rem; color: var(--text-secondary); max-width: 520px; margin: 0 auto; }
.home-section { margin-bottom: var(--space-4); }
.section-header { display: flex; align-items: baseline; gap: var(--space-2); margin-bottom: var(--space-4); }
.section-header h2 { position: relative; padding-bottom: var(--space-2); color: var(--text-primary); }
.section-header h2::after { content: ''; position: absolute; left: 0; bottom: 0; width: 40px; height: 3px; background: var(--accent); border-radius: 2px; }
.song-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-3); }
@media (max-width: 1100px) { .song-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 860px) { .song-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .song-grid { grid-template-columns: repeat(2, 1fr); } }

.artist-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(140px, 1fr);
  gap: var(--space-3);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-1);
  scrollbar-width: thin;
}
.song-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: transform 180ms ease-out, border-color 180ms ease-out, box-shadow 180ms ease-out;
  color: var(--text-primary);
}
.song-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.song-card__thumb { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; background: var(--bg-surface); display: block; }
.song-card__thumb--fallback { width: 100%; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; background: var(--bg-surface); color: var(--accent); font-family: var(--font-mono); font-size: 2rem; font-weight: 700; line-height: 1; }
.song-card__body { padding: var(--space-2) var(--space-3) var(--space-3); }
.song-card__title { color: var(--text-primary); font-weight: 600; font-size: 1.05rem; margin-bottom: 2px; }
.song-card__artist { color: var(--text-secondary); font-size: .9rem; }
[data-theme="dark"] .song-card { background: var(--bg-surface); border-color: var(--border); }
[data-theme="dark"] .song-card__title { color: var(--text-primary); }
[data-theme="dark"] .song-card__artist { color: var(--text-secondary); }
.song-card--center .song-card__body { text-align: center; }

/* Pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 150ms ease-out, background 150ms ease-out;
  flex-shrink: 0;
}
.page-btn:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
}
.page-btn--active {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
.page-btn--active:hover {
  background: var(--accent-hover);
}
.page-gap {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 0 var(--space-1);
  white-space: nowrap;
}

/* Artist / Category pages */
.artist-page, .category-page { padding: var(--space-2) 0; }
.artist-header h1 { font-size: 2rem; color: var(--text-primary); }
.artist-header p { color: var(--text-secondary); }
.song-list { display: flex; flex-direction: column; gap: var(--space-3); }
.song-list-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); background: var(--bg-surface); border-radius: var(--radius); border: 1px solid var(--border); transition: border-color .2s; text-decoration: none; color: var(--text-primary); }
.song-list-item:hover { border-color: var(--accent); }
.song-list-thumb { width: 56px; height: 56px; border-radius: 6px; overflow: hidden; flex-shrink: 0; background: var(--bg-surface); border: 1px solid var(--border); }
.song-list-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.song-list-thumb-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--accent); background: linear-gradient(135deg, var(--black), var(--grey-900)); line-height: 1; }
.song-list-body { display: flex; flex-direction: column; gap: 4px; }
.song-list-title { font-weight: 600; color: var(--text-primary); }
.song-list-meta { font-size: .875rem; color: var(--text-secondary); }
.song-list-meta .song-card__key-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: middle;
}
.song-list-meta .song-card__key-badge.key-badge {
  color: var(--on-accent);
  background: var(--accent);
  border: none;
}
.song-list-meta .song-card__key-badge.capo-badge {
  color: var(--text-secondary);
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
}

/* Search page */
.search-page { padding: var(--space-4) 0; max-width: 800px; }
.search-results { display: flex; flex-direction: column; gap: var(--space-3); }
.results-count { color: var(--text-secondary); margin-bottom: var(--space-3); }
.search-result-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); background: var(--bg-surface); border-radius: var(--radius); border: 1px solid var(--border); text-decoration: none; color: var(--text-primary); }
.search-result-item:hover { border-color: var(--accent); }
.result-body { flex: 1; }
.result-title { font-weight: 600; color: var(--text-primary); }
.result-artist-name { font-size: .875rem; color: var(--text-secondary); }
.result-thumb { width: 56px; height: 56px; border-radius: 6px; overflow: hidden; flex-shrink: 0; background: var(--bg-surface); border: 1px solid var(--border); }
.result-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.result-thumb-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--accent); background: linear-gradient(135deg, var(--black), var(--grey-900)); line-height: 1; }
.no-results { color: var(--text-secondary); text-align: center; padding: var(--space-6) 0; }
.no-results-cta { text-align: center; font-size: .9rem; color: var(--text-secondary); }
.no-results-cta a { color: var(--accent); font-weight: 600; text-decoration: underline; }
.empty-state { text-align: center; padding: var(--space-7) var(--space-3); color: var(--text-secondary); }
.empty-state strong { color: var(--text-primary); display: block; margin-bottom: var(--space-1); }
.empty-state-cta { text-align: center; font-size: .9rem; color: var(--text-secondary); }
.empty-state-cta a { color: var(--accent); font-weight: 600; text-decoration: underline; }

/* SEO partials */
.breadcrumbs { display: flex; gap: var(--space-2); margin-bottom: var(--space-3); font-size: .875rem; color: var(--text-secondary); }
.breadcrumbs a { color: var(--accent); }
.breadcrumbs a:hover { color: var(--accent-hover); }

/* Auth pages */
.auth-page { padding: var(--space-6) var(--space-3); display: flex; justify-content: center; }
.auth-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-5); width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 1.75rem; margin-bottom: var(--space-3); color: var(--text-primary); }
.form-group { margin-bottom: var(--space-3); }
.form-group label { display: block; font-weight: 500; margin-bottom: var(--space-1); color: var(--text-primary); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; background: var(--bg-surface-raised); color: var(--text-primary); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,175,82,.15); }
.btn-block { width: 100%; justify-content: center; }
.alert { padding: var(--space-3); border-radius: 8px; margin-bottom: var(--space-3); font-size: .95rem; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
[data-theme="dark"] .alert-error { background: #450a0a; color: #fecaca; border-color: #7f1d1d; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
[data-theme="dark"] .alert-success { background: #052e16; color: #bbf7d0; border-color: #14532d; }
.auth-alt { margin-top: var(--space-3); }
.form-preview-img { max-height: 120px; margin-top: var(--space-2); border-radius: var(--radius); border: 1px solid var(--border); display: block; }
.form-preview-img--sm { max-height: 64px; }
.form-divider { border: none; border-top: 1px solid var(--border); margin: var(--space-4) 0; }
.form-section-title { margin-bottom: var(--space-3); color: var(--text-primary); }
.form-inline { display: inline; }
.form-required { color: #ef4444; }

/* Request song page */
.request-song { max-width: 860px; margin: 0 auto; padding: var(--space-6) var(--space-3); }
.request-song__header { margin-bottom: var(--space-4); }
.request-song__header h1 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.2rem); margin-bottom: var(--space-2); }
.request-song__header p { color: var(--text-secondary); margin: 0; }
.request-song__cta { display: inline-flex; align-items: center; gap: var(--space-2); margin-top: var(--space-3); }
.request-song__section { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-4); margin-bottom: var(--space-4); }
.request-song__section-title { font-size: 1.05rem; font-weight: 600; margin-bottom: var(--space-3); color: var(--text-primary); }
.request-song__toolbar { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-2); }
.request-song__hint { font-size: .9rem; color: var(--text-secondary); margin-bottom: var(--space-2); line-height: 1.5; }
.request-song__example { background: var(--bg-page); border: 1px solid var(--border); border-radius: 8px; padding: var(--space-3); font-family: var(--font-mono); font-size: .85rem; overflow-x: auto; margin-bottom: var(--space-3); white-space: pre; color: var(--text-secondary); }
.request-song__preview { margin-top: var(--space-3); }
.request-song__actions { display: flex; gap: var(--space-2); align-items: center; }
.request-song__submit { flex: 1; justify-content: center; }
.request-song__divider { text-align: center; margin: var(--space-5) 0 var(--space-3); font-size: .85rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
.request-song__divider::before, .request-song__divider::after { content: ''; display: inline-block; width: 24px; height: 1px; background: var(--border); margin: 0 12px; vertical-align: middle; }
.request-song__list { display: flex; flex-direction: column; gap: var(--space-3); }
.request-song__item { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-3); }
.request-song__item-header { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); margin-bottom: 4px; flex-wrap: wrap; }
.request-song__item-title { font-weight: 600; color: var(--text-primary); }
.request-song__item-meta { font-size: .85rem; color: var(--text-secondary); margin-bottom: 4px; }
.request-song__admin-note { margin-top: var(--space-2); padding: var(--space-2); background: var(--bg-surface-raised); border-radius: var(--radius); font-size: .85rem; border: 1px solid var(--border); }

@media (max-width: 640px) {
  .request-song__item-header { flex-direction: column; align-items: flex-start; }
  .request-song__actions { flex-direction: column; }
  .request-song__submit { width: 100%; }
}

/* Status badges (shared public + admin) */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-pending     { background: rgba(251,191,36,.12); color: #fbbf24; border: 1px solid rgba(251,191,36,.25); }
.badge-in_progress  { background: rgba(59,130,246,.12); color: #60a5fa; border: 1px solid rgba(59,130,246,.25); }
.badge-fulfilled    { background: rgba(79,175,82,.12); color: #4ade80; border: 1px solid rgba(79,175,82,.25); }
.badge-rejected     { background: rgba(239,68,68,.12); color: #f87171; border: 1px solid rgba(239,68,68,.25); }
[data-theme="light"] .badge-pending     { background: #fefee7; color: #854d0e; border-color: #fde047; }
[data-theme="light"] .badge-in_progress  { background: #eff6ff; color: #1d4ed8; border-color: #93c5fd; }
[data-theme="light"] .badge-fulfilled    { background: #dcfce7; color: #166534; border-color: #86efac; }
[data-theme="light"] .badge-rejected     { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.profile-page { padding: var(--space-4) 0; }

.profile-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.profile-avatar-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--on-accent);
  line-height: 1;
}

.profile-avatar-img--error {
  display: none !important;
}

.profile-avatar-fallback--hidden {
  display: none;
}

.profile-header-info {
  flex: 1;
  min-width: 0;
}

.profile-header h1 {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.profile-header p {
  color: var(--text-secondary);
  margin-bottom: 0;
}

.profile-header .toolbar {
  margin-top: var(--space-3);
}

.profile-section { margin-bottom: var(--space-4); }

.profile-section h2 { font-size: 1.25rem; color: var(--text-primary); margin-bottom: var(--space-3); }

/* Comments */
.comments-section { margin-top: var(--space-5); padding-top: var(--space-5); border-top: 1px solid var(--border); }
.comments-section h3 { font-size: 1.25rem; color: var(--text-primary); margin-bottom: var(--space-4); }
.comment-form { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.comment-form textarea { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-surface); color: var(--text-primary); font-family: inherit; font-size: 0.95rem; resize: vertical; }
.comment-form textarea:focus { outline: none; border-color: var(--accent); }
.comment-list { display: flex; flex-direction: column; gap: var(--space-4); }
.comment-list[style*="--depth"] { padding-left: calc(var(--depth, 0) * var(--space-4)); }
.comment-item { padding: var(--space-3) 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }
.comment-header { display: flex; align-items: center; gap: var(--space-2); margin-bottom: 6px; }
.comment-header strong { color: var(--text-primary); font-weight: 600; }
.comment-body { color: var(--text); line-height: 1.6; margin: 0 0 var(--space-2); }
.comment-actions { display: flex; gap: var(--space-3); margin-top: var(--space-2); flex-wrap: wrap; }
.comment-actions button { background: none; border: none; padding: 0; font-size: 0.85rem; font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.comment-actions .reply-toggle, .comment-actions .comment-edit-btn { color: var(--text-secondary); }
.comment-actions .reply-toggle:hover, .comment-actions .comment-edit-btn:hover { color: var(--accent); }
.comment-actions .btn-danger, .comment-actions .comment-delete-btn { color: #c0392b; background: none; border: none; padding: 0; font-size: 0.85rem; font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.comment-actions .btn-danger:hover, .comment-actions .comment-delete-btn:hover { color: #a93226; }
.comment-edited-badge { font-size: 0.75rem; color: var(--text-secondary); font-style: italic; margin-left: 6px; }
.comment-deleted { color: var(--text-secondary); font-style: italic; }
.reply-actions { display: flex; gap: var(--space-3); margin-top: var(--space-2); }
.reply-submit-btn, .reply-cancel-btn { background: none; border: none; padding: 0; font-size: 0.85rem; font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.reply-submit-btn { color: var(--accent); }
.reply-submit-btn:hover { color: var(--accent-hover); }
.reply-cancel-btn { color: var(--text-secondary); }
.reply-cancel-btn:hover { color: var(--text-primary); }
.reply-form { display: none; }

/* Admin */
.admin-body { display: flex; min-height: 100vh; }
.sidebar { width: 260px; background: var(--black); border-right: 1px solid var(--grey-800); padding: var(--space-4) 0; }
.sidebar-brand { padding: 0 var(--space-4) var(--space-4); font-size: 1.25rem; font-weight: 700; color: var(--white); }
.sidebar-brand a { color: var(--white); text-decoration: none; }
.sidebar-brand a:hover { color: var(--accent); }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 var(--space-2); }
.sidebar-link { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); color: var(--grey-500); border-radius: 6px; text-decoration: none; font-size: .95rem; }
.sidebar-link:hover, .sidebar-link.active { color: var(--accent); background: rgba(79,175,82,.12); }
.sidebar-divider { height: 1px; background: var(--grey-800); margin: var(--space-2) var(--space-3); }
.sidebar-close { display: none; position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); font-size: 1.25rem; cursor: pointer; }
.topbar-menu-btn { display: none; background: transparent; border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); width: 40px; height: 40px; align-items: center; justify-content: center; cursor: pointer; font-size: 1.25rem; }
.main-wrapper { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 64px; border-bottom: 1px solid var(--border); background: var(--bg-surface-raised); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--space-5); }
.page-body { padding: var(--space-5); flex: 1; background: var(--bg-page); }
.page-header { margin-bottom: var(--space-4); }
.page-header h2 { font-size: 1.5rem; color: var(--text-primary); }
.page-header p { color: var(--text-secondary); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
.stat-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-4); }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: .875rem; color: var(--text-secondary); margin-top: 4px; }
.card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card-header { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); }
.card-body { padding: var(--space-4); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.data-table th { font-weight: 600; color: var(--text-secondary); font-size: .875rem; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-3); gap: var(--space-3); }
.alert { padding: var(--space-3); border-radius: 8px; margin-bottom: var(--space-3); }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
[data-theme="dark"] .alert-success { background: #052e16; color: #bbf7d0; border-color: #14532d; }
.song-form { display: flex; flex-direction: column; gap: var(--space-3); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.editor-layout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.editor-main, .editor-preview { display: flex; flex-direction: column; }
.preview-header { padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--border); color: var(--text-primary); }
.preview-pane { padding: var(--space-3); background: var(--bg-surface); border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); min-height: 200px; }
.form-actions { display: flex; gap: var(--space-2); padding-top: var(--space-2); }




.artist-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid var(--border); flex-shrink: 0; }
.artist-photo-fallback { width: 120px; height: 120px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 48px; font-weight: 700; color: var(--on-accent); background: linear-gradient(135deg, var(--black), var(--grey-900)); border: 3px solid var(--grey-800); flex-shrink: 0; line-height: 1; }
.artist-header { display: flex; gap: var(--space-4); align-items: center; margin-bottom: var(--space-4); }
.artist-info { flex: 1; }
.artist-info h1 { margin-bottom: var(--space-2); }
.artist-info p { color: var(--text-secondary); }


/* ── View-more link ── */
.view-more {
  color: var(--accent);
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  white-space: nowrap;
}
.view-more:hover { text-decoration: underline; }

/* ── Section header ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.section-header h2 {
  position: relative;
  padding-bottom: var(--space-2);
  color: var(--text-primary);
}
.section-header h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ── Sort select ── */
.sort-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 36px 8px 16px;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A8A8A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
}
.sort-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,175,82,.15);
}

/* ── Artist avatar inside song card ── */
.artist-avatar-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-3) 0;
}
.artist-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}
.artist-avatar--fallback {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--accent);
  line-height: 1;
}


/* ── Compact artist avatar inside song cards / list rows ── */
.song-card__artist-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.song-card__artist-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.song-card__artist-avatar--fallback {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--accent);
  flex-shrink: 0;
  line-height: 1;
}
.song-card__meta {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  z-index: 1;
  font-size: 0.65rem;
  color: var(--accent);
}
.song-card__meta:empty { display: none; }
.song-card__meta .song-card__key-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.55rem;
  font-weight: 600;
  white-space: nowrap;
}
.song-card__meta .song-card__key-badge.key-badge {
  color: var(--on-accent);
  background: var(--accent);
  border: none;
}
.song-card__meta .song-card__key-badge.capo-badge {
  color: var(--text-secondary);
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
}


.song-list-artist-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.song-list-artist-avatar--fallback {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--accent);
  flex-shrink: 0;
  line-height: 1;
}
.song-list-artist-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.result-artist-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.result-artist-avatar--fallback {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--accent);
  flex-shrink: 0;
  line-height: 1;
}
.result-artist-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.result-artist-name {
  font-size: .875rem;
  color: var(--text-secondary);
}
.result-meta {
  font-size: 0.65rem;
  color: var(--accent);
  margin-top: var(--space-1);
}
.result-meta:empty { margin-top: 0; }
.result-meta .song-card__key-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.55rem;
  font-weight: 600;
  white-space: nowrap;
}
.result-meta .song-card__key-badge.key-badge {
  color: var(--on-accent);
  background: var(--accent);
  border: none;
}
.result-meta .song-card__key-badge.capo-badge {
  color: var(--text-secondary);
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
}


.versions-list-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--bg-surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color .2s;
}
.versions-list-item:hover {
  border-color: var(--accent);
}

/* ── Footer ── */
.site-footer {
  background: var(--bg-page);
  border-top: 1px solid var(--border);
  margin-top: var(--space-6);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-5) var(--space-6);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-6);
}

.footer-brand {
  grid-column: 1 / -1;
}

.footer-logo-wrap {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-bottom: var(--space-3);
}

.footer-logo {
  max-height: 48px;
  width: auto;
}

.footer-site-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}
.footer-site-name .hamro { color: var(--white); }

.footer-site-name .tab { color: var(--accent); }

.footer-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

.footer-heading {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 150ms ease-out;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-social {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 150ms ease-out, border-color 150ms ease-out, background 150ms ease-out;
}

.footer-social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(79, 175, 82, 0.08);
}

.footer-app-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: border-color 150ms ease-out, background 150ms ease-out;
}

.app-badge:hover {
  border-color: var(--accent);
  background: rgba(79, 175, 82, 0.08);
  color: var(--accent);
}
.app-badge__small { font-size: 10px; line-height: 1; }
.app-badge__large { font-weight: 600; line-height: 1.2; }

.page-app-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-2);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.page-app-cta__text {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-app-cta__text .tab {
  color: var(--accent);
}

.page-app-cta__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

@media (max-width: 640px) {
  .page-app-cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: var(--space-2) var(--space-3);
    gap: var(--space-2);
    flex-wrap: nowrap;
  }

  .page-app-cta__text {
    font-size: 0.75rem;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page-app-cta__badges {
    gap: var(--space-1);
    flex-wrap: nowrap;
    flex-shrink: 0;
  }

  .app-badge {
    padding: 4px 8px;
    font-size: 0.7rem;
    border-radius: 6px;
    gap: 4px;
  }

  .app-badge svg {
    width: 14px;
    height: 14px;
  }

  .app-badge__small {
    display: none;
  }

  .app-badge__large {
    font-size: 0.7rem;
  }
}

.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: var(--space-6);
  padding: var(--space-4) 0;
  background: var(--bg-surface);
}

.footer-bottom-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.footer-cta a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.footer-cta a:hover {
  text-decoration: underline;
}

.footer-cta__sep {
  color: var(--border);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-4);
}

.sitemap-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}
.sitemap-list a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 150ms ease-out;
}
.sitemap-list a:hover {
  color: var(--accent);
}

@media (max-width: 640px) {
  html { scroll-padding-top: 68px; }
}

@media (max-width: 640px) {
  body { padding-top: 68px; }
}

@media (max-width: 640px) {
  .container { padding: 0 var(--space-3); }
  .navbar { padding: var(--space-2) var(--space-3); }
  .nav-brand { font-size: 1.1rem; }
  .nav-logo { max-height: 44px; }
  .home-hero { padding: var(--space-5) var(--space-3) var(--space-4); }
  .page-hero { padding: var(--space-5) var(--space-3) var(--space-4); }
  .page-hero h1 { font-size: 1.75rem; }
  .song-page { padding: var(--space-2) 0; }
  .artist-page, .category-page { padding: var(--space-3) 0; }
  .profile-page { padding: var(--space-3) 0; }
  .search-page { padding: var(--space-3) 0; }
  .auth-page { padding: var(--space-4) var(--space-3); }
  .auth-card { padding: var(--space-4); }
  .footer-container { padding: var(--space-4) var(--space-3); }
  .footer-bottom-inner { padding: var(--space-3) var(--space-3); }
  .song-grid { gap: var(--space-3); }
  .artist-grid { grid-auto-columns: minmax(120px, 1fr); }
  .song-card__body { padding: var(--space-2) var(--space-3) var(--space-3); }
  .song-card__title { font-size: 1rem; }
  .song-list-item { padding: var(--space-3); gap: var(--space-3); }
  .song-list-thumb { width: 48px; height: 48px; }
  .search-result-item { padding: var(--space-3); gap: var(--space-3); }
  .result-thumb { width: 48px; height: 48px; }
  .card { border-radius: 10px; }
  .stat-card { padding: var(--space-3); }
  .stat-value { font-size: 1.5rem; }
  .page-body { padding: var(--space-4); }
  .toolbar { flex-direction: column; align-items: stretch; }
  .bulk-controls { flex-direction: column; align-items: stretch; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; }
  .data-table th, .data-table td { padding: 10px 12px; font-size: .875rem; }
  .comment-item { padding: var(--space-3); }
  .artist-avatar, .artist-avatar--fallback { width: 64px; height: 64px; font-size: 1.5rem; line-height: 1; }
  .artist-header { gap: var(--space-3); }
  .home-section { margin-bottom: var(--space-5); }
  .section-header { flex-direction: column; align-items: flex-start; gap: var(--space-1); margin-bottom: var(--space-3); }
  .section-header h2 { font-size: 1.25rem; }
  .song-grid { gap: var(--space-3); }
  .song-card { border-radius: 10px; }
  .song-card__body { padding: var(--space-2) var(--space-3) var(--space-3); }
  .song-card__title { font-size: 0.95rem; }
  .song-card__artist { font-size: 0.8rem; }
  .song-card__meta { font-size: 0.55rem; }
  .song-card__thumb--fallback { font-size: 1.5rem; }
  .view-more { align-self: flex-end; }
  .song-page { padding: var(--space-2) 0; }
  .song-hero { height: 260px; }
  .song-hero__title { font-size: 1.5rem; }
  .control-bar { padding: var(--space-2) var(--space-3); gap: var(--space-2); }
  .control-group__label { font-size: 0.7rem; }
  .control-btn { width: 28px; height: 28px; font-size: 0.85rem; }
  .control-status { font-size: 0.8rem; padding: 3px 6px; }
   .chord-sheet-wrapper { padding: var(--space-3); }
  .meta-strip { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
}

@media (max-width: 640px) {
  .nav-link { min-height: 44px; }
}

@media (max-width: 640px) {
  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-3);
  }

  .profile-avatar-wrap {
    width: 80px;
    height: 80px;
  }

  .profile-avatar-fallback {
    font-size: 2rem;
  }

  .profile-header h1 {
    font-size: 1.5rem;
  }

  .profile-header .toolbar {
    width: 100%;
    flex-direction: column;
  }

  .profile-header .toolbar .btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .navbar { padding: var(--space-3) var(--space-3); }

  .nav-container {
    gap: 0;
    padding: 0 var(--space-3);
  }

  .nav-brand { font-size: 1.15rem; }

  .nav-logo { max-height: 44px; }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: center;
    background: rgba(13, 13, 15, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: var(--space-5) var(--space-4);
    gap: var(--space-1);
    z-index: 999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(-4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 180ms ease-out, opacity 180ms ease-out, visibility 180ms ease-out;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    width: 100%;
    max-width: 400px;
  }

  .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-4);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 150ms ease-out, color 150ms ease-out;
    text-align: center;
    width: 100%;
    position: relative;
    overflow: hidden;
  }

  .nav-link:hover,
  .nav-link:focus {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    outline: none;
  }

  .nav-link.active {
    background: rgba(79, 175, 82, 0.1);
    color: var(--accent);
    font-weight: 600;
  }

  .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
  }

  .nav-link::before { display: none; }

  .nav-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    padding-top: var(--space-4);
    margin-top: var(--space-3);
    border-top: 1px solid var(--border);
    width: 100%;
    max-width: 400px;
  }

  .search-bar {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: var(--space-3) var(--space-3);
    transition: border-color 150ms ease-out, background 150ms ease-out;
  }

  .search-bar:focus-within {
    border-color: var(--accent);
    background: rgba(79, 175, 82, 0.06);
  }

  .search-bar__icon {
    color: var(--text-secondary);
  }

  .search-bar input {
    color: var(--text-primary);
    font-size: 0.95rem;
  }

  .search-bar input::placeholder {
    color: var(--text-secondary);
  }

  .nav-user-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    width: 100%;
    max-width: 400px;
  }

  .nav-user {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    width: 100%;
    max-width: 400px;
  }

  .nav-user__profile {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 150ms ease-out, opacity 150ms ease-out;
  }

  .nav-user__profile:hover {
    transform: translateY(-1px);
    opacity: 0.92;
  }

  .nav-user__avatar {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--on-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  .nav-user__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
  }

  .nav-user .nav-link--ghost {
    white-space: nowrap;
    padding: var(--space-2) var(--space-3);
    border-radius: 10px;
    transition: background 150ms ease-out;
    text-align: center;
  }

  .nav-user .nav-link--ghost:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    transition: background 150ms ease-out, border-color 150ms ease-out;
  }

  .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
  }

  .nav-app-links {
    display: flex;
    gap: var(--space-2);
    padding-top: var(--space-2);
    width: 100%;
    max-width: 400px;
  }

  .nav-app-link {
    flex: 1;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: background 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out;
    padding: 0 var(--space-3);
  }

  .nav-app-link:hover {
    background: rgba(79, 175, 82, 0.12);
    border-color: var(--accent);
    color: var(--accent);
  }

  .nav-app-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }
}

@media (max-width: 640px) {
  .song-page { padding: var(--space-2) 0; }
  .song-hero { height: 240px; }
  .song-hero__title { font-size: 1.4rem; }
  .song-hero__artist-name { font-size: 0.7rem; }
  .song-hero__avatar { width: 20px; height: 20px; }
  .control-bar { flex-direction: column; align-items: stretch; gap: var(--space-1); padding: var(--space-2); background: rgba(10, 10, 15, 0.6); border: 1px solid rgba(63, 63, 70, 0.5); border-radius: 12px; }
  .control-group { gap: 3px; }
  .control-group__label { font-size: 0.6rem; }
  .control-btn { min-width: 38px; min-height: 38px; width: auto; height: auto; font-size: 0.75rem; padding: 0 5px; }
  .control-status { font-size: 0.7rem; padding: 0 4px; }
.chord-sheet-wrapper { padding: var(--space-4); line-height: 1.6; border-radius: 8px; overflow-x: visible; }
   .meta-strip { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
  .meta-stats { gap: var(--space-3); }
  .song-link-row { flex-direction: column; align-items: stretch; gap: var(--space-2); padding: var(--space-2) 0; }
  .song-link-btn { text-align: center; }
  .related-section { margin-top: var(--space-4); padding: 0 var(--space-2); }
  .related-section h3 { font-size: 1.1rem; }
  .related-section .song-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
  .comments-section { padding: var(--space-4) var(--space-3); }
  .comment-form textarea { font-size: 0.9rem; padding: var(--space-3); min-height: 90px; }
  .comment-item { padding: var(--space-3) 0; }
  #chord-sheet { margin-bottom: var(--space-5); }
  #print-stat { font-size: 0.85rem; }
  .chord-sheet { font-size: 1.1rem; }
  .chord-token { min-width: 44px; min-height: 32px; }
  .chord-tooltip { z-index: 1000; }
}

@media (max-width: 768px) {
  .form-row, .editor-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { display: none; }
  .sidebar.open { display: flex; position: fixed; inset: 0; z-index: 200; width: 260px; }
  .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 199; }
  .sidebar-overlay.open { display: block; }
  .main-wrapper { margin-left: 0 !important; }
  .page-body { padding: var(--space-4); }
  .data-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .sidebar-close { display: flex; }
  .topbar-menu-btn { display: inline-flex; }
  .topbar-left { display: flex; align-items: center; gap: var(--space-3); }
  .song-list-title, .song-list-meta, .result-title, .result-artist-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .song-list-body { min-width: 0; flex: 1; }
  .result-body { min-width: 0; flex: 1; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .bulk-controls { flex-direction: column; align-items: stretch; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; }
  .chord-sheet-wrapper { padding: var(--space-3); }
  .comments-section { padding: var(--space-3); }
  .nav-brand { font-size: 1rem; }

  .page-app-cta__text {
    font-size: 0.75rem;
  }

  .app-badge {
    padding: 3px 6px;
    font-size: 0.65rem;
  }

  .app-badge svg {
    width: 12px;
    height: 12px;
  }

  .app-badge__small {
    font-size: 7px;
  }

  .app-badge__large {
    font-size: 0.65rem;
  }
}

@media (max-width: 640px) {
  .artist-header { flex-direction: column; align-items: center; text-align: center; }
}

@media (max-width: 640px) {
  .artist-avatar,
  .artist-avatar--fallback {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
    text-align: center;
  }

  .footer-brand {
    grid-column: 1;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-app-badges {
    justify-content: center;
  }

  .footer-heading {
    text-align: center;
  }

  .footer-links {
    text-align: center;
  }

  .footer-bottom-inner {
    flex-direction: column;
    gap: var(--space-2);
    text-align: center;
    padding: var(--space-4);
  }

  .footer-container { padding: var(--space-4) var(--space-4); }
  .home-hero { padding: var(--space-5) var(--space-3) var(--space-4); }
  .home-hero h1 { font-size: clamp(1.5rem, 1.2rem + 3vw, 2.5rem); }
  .auth-card { padding: var(--space-4); }

  .nav-app-links { display: none; }
}

@media (max-width: 640px) {
}
