/* ── BODY LAYOUT ── */
body {
  font-family: var(--font-ui);
  min-height: 100dvh;
  background: #eaf8ff;
  padding-top: var(--bar-height);
}

body.genre-open {
  padding-top: calc(var(--bar-height) + var(--genre-bar-height));
}

/* ── MAIN CONTENT AREA ── */
main {
  position: relative;
  min-height: calc(100dvh - var(--bar-height));
  overflow: hidden;

  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.95), transparent 26%),
    radial-gradient(circle at 80% 18%, rgba(130, 210, 255, 0.42), transparent 30%),
    radial-gradient(circle at 48% 82%, rgba(90, 190, 230, 0.28), transparent 35%),
    linear-gradient(135deg, #f8fdff 0%, #dff6ff 38%, #c7eefc 100%);

  transition: margin-left 0.3s ease;
}

/* watery shine overlay */
main::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.35) 35%, transparent 55%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0 0.08rem, transparent 0.08rem 1.4rem);
  opacity: 0.75;
}

/* soft water blobs */
main::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(circle at 30% 35%, rgba(255, 255, 255, 0.38), transparent 22%),
    radial-gradient(circle at 72% 70%, rgba(255, 255, 255, 0.26), transparent 25%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

main > * {
  position: relative;
  z-index: 2;
}

/* when side menu is open, push content right */
main.menu-open {
  margin-left: var(--menu-width);
}


/* ── HYMN LIST ── */
.hymn-list {
  list-style: none;
  margin: 0 auto;
  padding: 1rem;
  padding-bottom: 6rem; /* space for sort button */
  width: 90%;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.hymn-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  min-height: var(--touch-target);  /* 44px — never smaller */
  border-radius: 0.5rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(232, 160, 32, 0.15);
  transition: background 0.2s, transform 0.12s, box-shadow 0.2s;
}

.hymn-item:hover {
  background: rgba(255, 255, 255, 0.90);
  box-shadow: 0 2px 12px rgba(232, 160, 32, 0.20);
  transform: translateX(4px);
}

.hymn-number {
  flex: 0 0 2.75rem;
  font-size: 0.8125rem;    /* 13px — small label, not reading text */
  font-weight: 700;
  color: var(--clr-gold);
  text-align: right;
  letter-spacing: 0.04em;
}

.hymn-title {
  flex: 1;
  font-size: 1rem;         /* 16px — readable on every screen */
  font-weight: 500;
  color: #1a2e1a;
  line-height: 1.45;
}

/* states */
.loading,
.error {
  text-align: center;
  padding: 2rem;
  font-size: 0.9375rem;
  color: rgba(0, 0, 0, 0.45);
}

.error {
  color: rgba(193, 39, 45, 0.7);
}


/* ── Mobile (≤ 600px) ── */
@media (max-width: 600px) {
  .hymn-list {
    padding: 0.75rem;
    gap: 0.35rem;
  }

  .hymn-item {
    padding: 0.9rem 0.85rem;
    gap: 0.75rem;
    border-radius: 0.45rem;
  }

  /* 16px is the mobile font floor — never go below this for content */
  .hymn-title {
    font-size: 1rem;
  }

  .hymn-number {
    flex: 0 0 2.4rem;
    font-size: 0.8125rem;
  }
}


/* ── Large screens (≥ 1024px) ── */
@media (min-width: 1024px) {
  .hymn-list {
    padding: 1.5rem;
  }

  .hymn-item:hover {
    transform: translateX(6px);
  }

  .hymn-title {
    font-size: 1rem;
  }
}