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

:root{
  --bg: #fffaf3;
  --panel: #ffffff;
  --text: #2b1c0b;
  --muted: #6e5636;
  --accent: #7b5628;
  --border: #e6d1b6;
  --lyrics-bg: #fffaf2;
  --lyrics-border: #d3b884;
}

/* dark overrides */
body.dark-mode {
  --bg: #14120f;
  --panel: #1f1d1a;
  --text: #efe7d8;
  --muted: #d1b58c;
  --accent: #d8b574;
  --border: #3d352b;
  --lyrics-bg: #26221b;
  --lyrics-border: #b78b4c;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:'Playfair Display', serif;
  transition: background 0.4s ease, color 0.4s ease;
  line-height:1.7;
}

.container{
  max-width:880px;
  margin:0 auto;
  background:var(--panel);
  /* Reduced bottom padding to avoid large gap above fixed footer.
     Dynamic JS will adjust this further when pages are loaded. */
  padding:24px 24px 40px 24px;
  min-height:calc(100vh - 60px);
}

.header-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  flex-wrap:wrap;
}
.book-title{
  font-size:30px;
  margin:0;
  color:var(--accent);
  font-weight:700;
}
.compiled-by{
  margin:0;
  font-style:italic;
  color:var(--muted);
  font-size:15px;
}

/* MOBILE layout */
@media (max-width:600px){
  .header-row{
    flex-direction:column;
    align-items:center;
    gap:4px;
  }
  .book-title{
    text-align:center;
    font-size:26px;
  }
  .compiled-by{
    text-align:center;
  }
}

.divider{border:none;border-top:1px solid var(--border);margin:14px 0 18px}

/* chapter title */
.chapter-title{
  font-size:26px;
  margin:0;
  color:var(--accent);
  font-weight:700;
}

.poet-name{
  font-size:18px;
  color:var(--muted);
  font-style:italic;
  margin-top:6px;
}

/* lyrics */
.lyrics-block{
  margin:18px 0;
  padding:14px 18px;
  background:var(--lyrics-bg);
  border-left:4px solid var(--lyrics-border);
  border-radius:6px;
}
.lyric-line{
  display:block;
  font-size:1.05rem;
  line-height:1.9;
  margin:0.35rem 0;
  color:var(--text);
}

/* TOC items */
.toc-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:12px}
.toc-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(145deg, var(--panel), var(--lyrics-bg));
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 18px;
    transition: background 0.2s ease;
}

.toc-entry:hover {
    background: var(--lyrics-bg);
}

.toc-entry a {
    text-decoration: none !important;
    color: var(--accent);
    font-weight: 700;
}

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

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

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

}
.toc-entry:hover{background:var(--lyrics-bg)}

/* Bottom Nav */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width:880px;
  margin: 0 auto;
  background: var(--panel);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 8px 10px;
  font-size:18px;
  font-weight:700;
  z-index: 20;
}

.nav-btn {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  padding: 8px 18px;
  border-radius:6px;
}

/* Footer line */
.footer-line {
  max-width:880px;
  margin:24px auto 8px auto; /* much smaller bottom margin */
  padding-top:8px;
  border-top:1px solid var(--border);
  color:var(--muted);
  font-size:13px;
  text-align:center;
}


.theme-toggle{
  position:fixed;
  right:24px;
  bottom:60px;
  width:46px;
  height:46px;
  border-radius:50%;
  display:flex;
  justify-content:center;
  align-items:center;
  background:var(--panel);
  border:1px solid var(--border);
  cursor:pointer;
}
/* stanza spacing inside lyrics */
.stanza { margin-bottom: 1.1rem; }    /* space between stanzas */
.stanza:last-child { margin-bottom: 0; }
.lyrics-block .lyric-line { white-space: pre-wrap; } /* preserve spacing inside lines */
.author-img {
    float: right;            /* place it on the right */
    width: 260px;            /* fixed nice size */
    max-width: 40%;          /* prevent overflow on smaller screens */
    margin: 0 0 18px 24px;   /* space on the left + below */
    border-radius: 12px;
    object-fit: cover;
}
@media (max-width: 800px) {
    .author-img {
        float: none;
        display: block;
        margin: 0 auto 20px auto;
        width: 80%;
    }


