/* Lyric Book – Rust In Piece */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Cinzel:wght@400;500;600;700&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --lb-leather-dark: #2a0a0a;
  --lb-leather-mid: #4a1515;
  --lb-leather-light: #6b1e1e;
  --lb-leather-highlight: #7a2828;
  --lb-gold: #d4a84b;
  --lb-gold-light: #e8c86e;
  --lb-gold-shine: #f5e4a8;
  --lb-gold-shadow: #8b7332;
  --lb-page-cream: #f4edd4;
  --lb-page-aged: #e8dfc4;
  --lb-page-shadow: #d4c9a8;
  --lb-ink: #2c1810;
  --lb-ink-light: #4a3628;
}

/* ============ ASTRA/WP OVERRIDES ============ */
.entry-content .lyricbook-wrapper {
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow: visible !important;
}
.entry-content .lyricbook-container {
  overflow: visible !important;
}
.lyricbook-wrapper *,
.lyricbook-wrapper *::before,
.lyricbook-wrapper *::after {
  box-sizing: border-box;
}

/* ============ WRAPPER ============ */
.lyricbook-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  min-height: 700px;
}

/* ============ BOOK CONTAINER ============ */
.lyricbook-container {
  perspective: 2000px;
  width: 90%;
  max-width: 1100px;
  height: 85vh;
  max-height: 750px;
  min-height: 500px;
  position: relative;
}

/* ============ BOOK COVER ============ */
.lyricbook-cover {
  width: 100%;
  height: 100%;
  position: absolute;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
  transform-origin: left center;
  z-index: 10;
  border-radius: 4px 12px 12px 4px;
}

.lyricbook-cover.open {
  transform: rotateY(-170deg);
  pointer-events: none;
  z-index: 1;
}

.lyricbook-cover-front {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 4px 12px 12px 4px;
  background:
    radial-gradient(ellipse at 30% 20%, var(--lb-leather-highlight) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, var(--lb-leather-highlight) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 50%, var(--lb-leather-light) 0%, transparent 70%),
    linear-gradient(135deg, var(--lb-leather-dark) 0%, var(--lb-leather-mid) 20%, var(--lb-leather-light) 45%, var(--lb-leather-mid) 55%, var(--lb-leather-mid) 80%, var(--lb-leather-dark) 100%);
  box-shadow:
    inset 0 0 80px rgba(0,0,0,0.5),
    inset 0 0 15px rgba(0,0,0,0.3),
    inset 0 0 200px rgba(0,0,0,0.15),
    4px 4px 20px rgba(0,0,0,0.7),
    8px 8px 40px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  overflow: hidden;
}

.lyricbook-cover-front::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='leather'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='8' stitchTiles='stitch' seed='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23leather)' opacity='0.25'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='400' height='400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='hide'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.015' numOctaves='4' stitchTiles='stitch' seed='7'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23hide)' opacity='0.12'/%3E%3C/svg%3E");
  border-radius: inherit;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.lyricbook-cover-front::after {
  content: '';
  position: absolute;
  inset: 24px;
  border: 3px solid var(--lb-gold);
  border-radius: 3px;
  box-shadow:
    inset 0 0 12px rgba(212, 168, 75, 0.25),
    0 0 6px rgba(212, 168, 75, 0.2),
    inset 0 1px 0 rgba(245, 228, 168, 0.15),
    0 -1px 0 rgba(0,0,0,0.4),
    0 1px 0 rgba(245, 228, 168, 0.1),
    inset 0 -1px 0 rgba(0,0,0,0.3);
  pointer-events: none;
}

.lyricbook-cover-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  transform: rotateY(180deg);
  background: var(--lb-page-cream);
  border-radius: 4px 12px 12px 4px;
}

.lyricbook-corner {
  position: absolute;
  width: 50px;
  height: 50px;
  color: var(--lb-gold);
  font-size: 36px;
  line-height: 1;
  opacity: 0.8;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  font-family: 'Cinzel Decorative', serif;
}
.lyricbook-corner.tl { top: 28px; left: 28px; }
.lyricbook-corner.tr { top: 28px; right: 28px; transform: scaleX(-1); }
.lyricbook-corner.bl { bottom: 28px; left: 28px; transform: scaleY(-1); }
.lyricbook-corner.br { bottom: 28px; right: 28px; transform: scale(-1); }

/* Gold text with text-shadow glow — no background-clip (causes clipping with Cinzel Decorative) */
.lyricbook-title {
  font-family: 'Cinzel Decorative', serif;
  font-weight: 900;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: 0.08em;
  text-align: center;
  color: var(--lb-gold);
  text-shadow:
    0 -2px 1px rgba(0,0,0,0.8),
    0 1px 0 rgba(245, 228, 168, 0.35),
    0 2px 3px rgba(0,0,0,0.7),
    0 0 10px rgba(212, 168, 75, 0.2),
    0 0 30px rgba(212, 168, 75, 0.08),
    1px 1px 2px rgba(0,0,0,0.5),
    -1px -1px 1px rgba(0,0,0,0.3);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

@keyframes lbGoldShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.lyricbook-subtitle {
  font-family: 'Cinzel', serif;
  font-weight: 500;
  font-size: clamp(1rem, 2vw, 1.5rem);
  letter-spacing: 0.15em;
  text-align: center;
  color: var(--lb-gold);
  text-shadow:
    0 -2px 1px rgba(0,0,0,0.7),
    0 1px 0 rgba(245, 228, 168, 0.3),
    0 2px 3px rgba(0,0,0,0.6),
    0 0 8px rgba(212, 168, 75, 0.15),
    1px 1px 2px rgba(0,0,0,0.4);
  position: relative;
  z-index: 1;
}

.lyricbook-hint {
  position: absolute;
  bottom: 40px;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--lb-gold);
  opacity: 0;
  animation: lbFadeHint 1s ease-in 2s forwards;
  z-index: 1;
  text-shadow:
    0 -1px 0 rgba(0,0,0,0.5),
    0 1px 1px rgba(245, 228, 168, 0.2);
}

@keyframes lbFadeHint { to { opacity: 0.6; } }

.lyricbook-spine {
  position: absolute;
  left: -15px;
  top: 0;
  width: 30px;
  height: 100%;
  background: linear-gradient(90deg, #1a0505, var(--lb-leather-dark) 40%, #1a0505);
  border-radius: 4px 0 0 4px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
  z-index: 5;
}

.lyricbook-gilded {
  position: absolute;
  right: 0;
  top: 8px;
  bottom: 8px;
  width: 8px;
  background: linear-gradient(
    180deg,
    var(--lb-gold-shadow),
    var(--lb-gold-light) 10%,
    var(--lb-gold) 30%,
    var(--lb-gold-shine) 50%,
    var(--lb-gold) 70%,
    var(--lb-gold-light) 90%,
    var(--lb-gold-shadow)
  );
  border-radius: 0 2px 2px 0;
  z-index: 2;
}

/* ============ BOOK PAGES ============ */
.lyricbook-pages {
  width: 100%;
  height: 100%;
  position: absolute;
  display: none;
  flex-direction: column;
  border-radius: 4px 8px 8px 4px;
  background: var(--lb-page-cream);
  box-shadow:
    inset 0 0 30px rgba(0,0,0,0.1),
    3px 3px 15px rgba(0,0,0,0.3);
  overflow: hidden;
}

.lyricbook-pages.visible { display: flex; }

.lyricbook-pages::after {
  content: '';
  position: absolute;
  right: 0;
  top: 6px;
  bottom: 6px;
  width: 6px;
  background: repeating-linear-gradient(180deg, var(--lb-page-cream) 0px, var(--lb-page-shadow) 1px, var(--lb-page-cream) 2px);
  border-radius: 0 3px 3px 0;
  pointer-events: none;
}

/* ============ PAGE TURN ANIMATION ============ */
.lyricbook-page-flipper {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  perspective: 2000px;
  pointer-events: none;
  z-index: 20;
}

.lyricbook-page-flip {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transform-style: preserve-3d;
  pointer-events: none;
}

.lyricbook-page-flip-front,
.lyricbook-page-flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 4px 8px 8px 4px;
}

.lyricbook-page-flip-front {
  background: var(--lb-page-cream);
  box-shadow:
    inset 0 0 20px rgba(0,0,0,0.05),
    4px 0 12px rgba(0,0,0,0.2);
  /* Gilt right edge */
  border-right: 4px solid var(--lb-gold);
  border-top: 1px solid var(--lb-page-shadow);
  border-bottom: 1px solid var(--lb-page-shadow);
}

/* Gilt edge shimmer on front */
.lyricbook-page-flip-front::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 6px;
  bottom: 6px;
  width: 4px;
  background: linear-gradient(
    180deg,
    var(--lb-gold-shadow),
    var(--lb-gold-light) 15%,
    var(--lb-gold-shine) 40%,
    var(--lb-gold) 60%,
    var(--lb-gold-light) 85%,
    var(--lb-gold-shadow)
  );
  border-radius: 0 2px 2px 0;
}

.lyricbook-page-flip-back {
  background: var(--lb-page-aged);
  transform: rotateY(180deg);
  box-shadow:
    inset 0 0 20px rgba(0,0,0,0.08),
    -4px 0 12px rgba(0,0,0,0.15);
  border-left: 4px solid var(--lb-gold);
  border-top: 1px solid var(--lb-page-shadow);
  border-bottom: 1px solid var(--lb-page-shadow);
}

/* Gilt edge shimmer on back */
.lyricbook-page-flip-back::after {
  content: '';
  position: absolute;
  left: -4px;
  top: 6px;
  bottom: 6px;
  width: 4px;
  background: linear-gradient(
    180deg,
    var(--lb-gold-shadow),
    var(--lb-gold-light) 15%,
    var(--lb-gold-shine) 40%,
    var(--lb-gold) 60%,
    var(--lb-gold-light) 85%,
    var(--lb-gold-shadow)
  );
  border-radius: 2px 0 0 2px;
}

@keyframes lbPageTurnForward {
  0% { transform: rotateY(0deg); box-shadow: 0 0 0 rgba(0,0,0,0); }
  30% { box-shadow: -10px 0 30px rgba(0,0,0,0.2); }
  70% { box-shadow: -5px 0 15px rgba(0,0,0,0.15); }
  100% { transform: rotateY(-180deg); box-shadow: 0 0 0 rgba(0,0,0,0); }
}

@keyframes lbPageTurnBackward {
  0% { transform: rotateY(-180deg); box-shadow: 0 0 0 rgba(0,0,0,0); }
  30% { box-shadow: 10px 0 30px rgba(0,0,0,0.2); }
  70% { box-shadow: 5px 0 15px rgba(0,0,0,0.15); }
  100% { transform: rotateY(0deg); box-shadow: 0 0 0 rgba(0,0,0,0); }
}

.lyricbook-page-flip.turning-forward {
  animation: lbPageTurnForward 1s cubic-bezier(0.645, 0.045, 0.355, 1) forwards;
}

.lyricbook-page-flip.turning-backward {
  animation: lbPageTurnBackward 1s cubic-bezier(0.645, 0.045, 0.355, 1) forwards;
}

.lyricbook-page-content {
  flex: 1;
  padding: 40px 50px 60px;
  overflow-y: auto;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: var(--lb-gold) var(--lb-page-aged);
}

.lyricbook-page-content::-webkit-scrollbar { width: 6px; }
.lyricbook-page-content::-webkit-scrollbar-track { background: var(--lb-page-aged); }
.lyricbook-page-content::-webkit-scrollbar-thumb { background: var(--lb-gold); border-radius: 3px; }

.lyricbook-page-content::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.04' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23p)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.lyricbook-page-content > * { position: relative; z-index: 1; }

/* ============ NAVIGATION BAR ============ */
.lyricbook-nav {
  flex-shrink: 0;
  height: 50px;
  background: linear-gradient(0deg, var(--lb-page-shadow), var(--lb-page-cream));
  border-top: 1px solid var(--lb-page-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-radius: 0 0 4px 4px;
  z-index: 5;
}

.lyricbook-nav-btn {
  background: none;
  border: none;
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: var(--lb-leather-mid);
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.2s;
  letter-spacing: 0.05em;
}

.lyricbook-nav-btn:hover { background: rgba(139, 32, 32, 0.1); color: var(--lb-leather-dark); }
.lyricbook-nav-btn:disabled { opacity: 0.3; cursor: default; }

.lyricbook-page-num {
  font-family: 'EB Garamond', serif;
  font-size: 0.9rem;
  color: var(--lb-ink-light);
  font-style: italic;
}

/* ============ TABLE OF CONTENTS ============ */
.lyricbook-toc-header {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--lb-leather-mid);
  text-align: center;
  margin-bottom: 30px;
  letter-spacing: 0.1em;
}

.lyricbook-search {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--lb-page-shadow);
  border-radius: 4px;
  font-family: 'EB Garamond', serif;
  font-size: 1.1rem;
  background: rgba(255,255,255,0.5);
  color: var(--lb-ink);
  margin-bottom: 24px;
  outline: none;
  transition: border-color 0.2s;
}

.lyricbook-search:focus { border-color: var(--lb-gold); box-shadow: 0 0 0 2px rgba(212, 168, 75, 0.2); }
.lyricbook-search::placeholder { color: var(--lb-page-shadow); font-style: italic; }

.lyricbook-album-group { margin-bottom: 24px; }

.lyricbook-album-name {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--lb-leather-mid);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--lb-page-shadow);
  display: flex;
  align-items: center;
  gap: 10px;
}

.lyricbook-album-thumb {
  width: 32px;
  height: 32px;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.lyricbook-song-list { list-style: none; padding: 0; margin: 0; }

.lyricbook-song-item {
  display: flex;
  align-items: baseline;
  padding: 4px 0 4px 12px;
  cursor: pointer;
  transition: all 0.15s;
  border-radius: 3px;
}

.lyricbook-song-item:hover { background: rgba(139, 32, 32, 0.06); }

.lyricbook-song-title {
  font-family: 'EB Garamond', serif;
  font-size: 1.05rem;
  color: var(--lb-ink);
}

.lyricbook-song-dots {
  flex: 1;
  border-bottom: 1px dotted var(--lb-page-shadow);
  margin: 0 8px;
  min-width: 20px;
  position: relative;
  top: -4px;
}

.lyricbook-song-page {
  font-family: 'EB Garamond', serif;
  font-size: 0.95rem;
  color: var(--lb-ink-light);
  font-style: italic;
  white-space: nowrap;
}

/* ============ VIEW TOGGLE ============ */
.lyricbook-view-tabs {
  display: flex;
  gap: 3px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--lb-leather-dark), var(--lb-leather-mid));
  border-radius: 8px;
  padding: 4px;
  width: 100%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15), inset 0 1px 2px rgba(0,0,0,0.2);
}

.lyricbook-view-tab {
  flex: 1;
  padding: 10px 20px;
  border: none;
  background: none;
  font-family: 'Cinzel Decorative', serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(245, 228, 168, 0.6);
  cursor: pointer;
  border-radius: 5px;
  transition: all 0.25s;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.lyricbook-view-tab:hover {
  color: var(--lb-gold-light);
  background: rgba(255,255,255,0.08);
}

.lyricbook-view-tab.active {
  background: var(--lb-page-cream);
  color: var(--lb-leather-mid);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  text-shadow: none;
}

.lyricbook-alpha-header {
  font-family: 'Cinzel Decorative', serif;
  font-size: 2rem;
  color: var(--lb-leather-mid);
  margin: 20px 0 8px;
  opacity: 0.4;
}

/* ============ ALBUM GRID VIEW ============ */
.lyricbook-album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
  padding: 10px 0;
}

.lyricbook-album-card {
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: 6px;
  padding: 12px;
}

.lyricbook-album-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  background: rgba(255,255,255,0.5);
}

.lyricbook-album-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  margin-bottom: 8px;
}

.lyricbook-album-card-name {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--lb-leather-mid);
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.lyricbook-album-card-count {
  font-family: 'EB Garamond', serif;
  font-size: 0.8rem;
  color: var(--lb-ink-light);
  font-style: italic;
  margin-top: 2px;
}

/* ============ BACK TO TOC BUTTON ============ */
.lyricbook-back-toc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--lb-page-shadow);
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  color: var(--lb-leather-mid);
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 4px;
  transition: all 0.2s;
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}

.lyricbook-back-toc:hover {
  background: rgba(139, 32, 32, 0.08);
  border-color: var(--lb-leather-mid);
}

/* ============ LYRIC PAGE ============ */
.lyricbook-lyric-page { padding-bottom: 20px; }

.lyricbook-album-art {
  width: 120px;
  height: 120px;
  float: right;
  margin: 0 0 16px 20px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  object-fit: cover;
}

.lyricbook-song-heading {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--lb-leather-mid);
  margin-bottom: 4px;
  line-height: 1.3;
}

.lyricbook-album-label {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--lb-ink-light);
  margin-bottom: 20px;
}

.lyricbook-lyrics {
  font-family: 'EB Garamond', serif;
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--lb-ink);
  white-space: pre-wrap;
}

.lyricbook-lyrics .verse { margin-bottom: 16px; }

.lyricbook-divider {
  text-align: center;
  margin: 20px 0;
  color: var(--lb-gold);
  font-size: 1.2rem;
  letter-spacing: 0.5em;
  opacity: 0.5;
}

/* ============ STREAMING LINKS ============ */
.lyricbook-streaming {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 8px 0;
  clear: none;
}

.lyricbook-streaming-label {
  font-family: 'EB Garamond', serif;
  font-size: 0.85rem;
  color: var(--lb-ink-light);
  font-style: italic;
  white-space: nowrap;
}

.lyricbook-streaming-icons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lyricbook-streaming-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--lb-page-aged);
  color: var(--lb-ink-light);
  transition: all 0.2s;
  text-decoration: none;
  border: 1px solid transparent;
}

.lyricbook-streaming-link svg {
  width: 16px;
  height: 16px;
}

.lyricbook-streaming-link:hover {
  background: var(--lb-leather-mid);
  color: white;
  border-color: var(--lb-leather-mid);
  transform: scale(1.1);
}

/* ============ CLOSE BUTTON ============ */
.lyricbook-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--lb-page-shadow);
  background: var(--lb-page-cream);
  color: var(--lb-ink-light);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}

.lyricbook-close:hover { background: var(--lb-leather-mid); color: white; border-color: var(--lb-leather-mid); }

/* ============ TRANSITIONS ============ */
.lyricbook-page-transition { animation: lbPageIn 0.3s ease-out; }
@keyframes lbPageIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }

/* ============ RESPONSIVE – TABLET ============ */
@media (max-width: 1024px) {
  .lyricbook-container { width: 95%; max-height: 700px; }
  .lyricbook-page-content { padding: 30px 35px 60px; }
  .lyricbook-album-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 16px; }
}

/* ============ RESPONSIVE – MOBILE ============ */
@media (max-width: 768px) {
  .lyricbook-wrapper {
    padding: 10px 5px;
    min-height: auto;
  }
  .lyricbook-container {
    width: 98%;
    height: 85vh;
    max-height: none;
    min-height: 400px;
  }
  .lyricbook-cover-front {
    padding: 30px 20px;
  }
  .lyricbook-cover-front::after { inset: 10px; border-width: 1px; }
  .lyricbook-corner { display: none; }
  .lyricbook-spine { display: none; }
  .lyricbook-gilded { width: 4px; }

  /* Title sizing */
  .lyricbook-title { font-size: clamp(1.8rem, 8vw, 2.8rem); margin-bottom: 12px; }
  .lyricbook-subtitle { font-size: clamp(0.8rem, 3vw, 1.1rem); }
  .lyricbook-hint { font-size: 0.75rem; bottom: 24px; }

  /* Pages content */
  .lyricbook-page-content {
    padding: 16px 16px 20px;
  }
  .lyricbook-toc-header { font-size: 1.3rem; margin-bottom: 16px; }
  .lyricbook-search {
    font-size: 1rem;
    padding: 10px 12px;
    margin-bottom: 16px;
  }

  /* View tabs – full width on mobile */
  .lyricbook-view-tabs {
    width: 100%;
  }
  .lyricbook-view-tab {
    padding: 8px 10px;
    font-size: 0.75rem;
  }

  /* Album grid */
  .lyricbook-album-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
  }
  .lyricbook-album-card { padding: 8px; }
  .lyricbook-album-card-name { font-size: 0.65rem; }
  .lyricbook-album-card-count { font-size: 0.7rem; }

  /* Song list – larger touch targets */
  .lyricbook-song-item {
    padding: 8px 8px 8px 8px;
    min-height: 44px;
  }
  .lyricbook-song-title { font-size: 1rem; }
  .lyricbook-album-name { font-size: 0.95rem; }
  .lyricbook-album-thumb { width: 28px; height: 28px; }

  /* Lyric page */
  .lyricbook-album-art { width: 70px; height: 70px; margin: 0 0 10px 12px; }
  .lyricbook-song-heading { font-size: 1.2rem; }
  .lyricbook-album-label { font-size: 0.85rem; margin-bottom: 12px; }
  .lyricbook-lyrics { font-size: 1rem; line-height: 1.6; }
  .lyricbook-divider { margin: 12px 0; }

  /* Streaming links */
  .lyricbook-streaming { gap: 6px; }
  .lyricbook-streaming-link { width: 34px; height: 34px; }
  .lyricbook-streaming-link svg { width: 18px; height: 18px; }

  /* Back to TOC button */
  .lyricbook-back-toc { font-size: 0.75rem; padding: 6px 10px; margin-bottom: 12px; }

  /* Nav bar */
  .lyricbook-nav {
    height: 44px;
    padding: 0 10px;
  }
  .lyricbook-nav-btn {
    font-size: 0.75rem;
    padding: 6px 10px;
    min-height: 36px;
  }
  .lyricbook-page-num { font-size: 0.8rem; }

  /* Close button */
  .lyricbook-close {
    width: 32px;
    height: 32px;
    font-size: 1rem;
    top: 6px;
    right: 6px;
  }

  /* Slightly faster on mobile for performance */
  .lyricbook-page-flip.turning-forward {
    animation-duration: 0.7s;
  }
  .lyricbook-page-flip.turning-backward {
    animation-duration: 0.7s;
  }
}

/* ============ RESPONSIVE – SMALL MOBILE ============ */
@media (max-width: 400px) {
  .lyricbook-container { width: 100%; }
  .lyricbook-page-content { padding: 12px 12px 16px; }
  .lyricbook-title { font-size: clamp(1.5rem, 7vw, 2.2rem); }
  .lyricbook-subtitle { font-size: 0.8rem; }
  .lyricbook-album-grid { grid-template-columns: repeat(2, 1fr); }
  .lyricbook-album-art { width: 60px; height: 60px; }
  .lyricbook-nav-btn { font-size: 0.7rem; padding: 4px 8px; }
}
