*{
margin:0;
padding:0;
box-sizing:border-box;
}

body{
font-family:'Inter',sans-serif;
background:#FCFCFD;
color:#1f2a44;
overflow-x:hidden;
}

.app{
display:flex;
min-height:100vh;
background:#FCFCFD;
}

.sidebar{
width:320px;
background:#FCFCFD;
padding:38px 40px;
display:flex;
flex-direction:column;
justify-content:space-between;
border-right:1px solid #eee;
position:fixed;
height:100vh;
}

.sidebar h1{
font-family:'Playfair Display',serif;
font-size:30px;
line-height:1;
font-weight:900;
}

.sidebar p{
margin-top:16px;
font-size:11px;
letter-spacing:4px;
opacity:.35;
font-weight:700;
}

.sidebar nav{
margin-top:50px;
display:flex;
flex-direction:column;
gap:12px;
}

.sidebar button{
display:flex;
align-items:center;
gap:14px;
background:none;
border:none;
font-size:13px;
font-weight:700;
letter-spacing:2px;
padding:14px 0;
cursor:pointer;
opacity:.5;
transition:.25s;
color:#1f2a44;
}

.sidebar button i{
font-size:18px;
width:24px;
transition:.25s;
}

.sidebar button:hover,
.sidebar button:hover i{
color:#FE6565;
opacity:1;
}

.sidebar button.active{
color:#0000FE;
opacity:1;
}

main{
margin-left:320px;
padding:40px 64px;
width:100%;
background:#FCFCFD;
}

.top{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:34px;
}

.top h2{
font-family:'Playfair Display',serif;
font-size:48px;
font-weight:900;
}

.sort{
display:flex;
gap:16px;
}

.sort button{
padding:12px 26px;
border:none;
border-radius:14px;
font-weight:700;
cursor:pointer;
background:none;
}

.sort button.active{
background:#0000FE;
color:white;
box-shadow:0 8px 20px rgba(0,0,255,.2);
}

.search-box{
display:flex;
align-items:center;
gap:16px;
background:white;
border:2px solid #0000FE;
border-radius:26px;
padding:20px 24px;
box-shadow:0 10px 30px rgba(0,0,0,.08);
margin-bottom:42px;
}

.search-box i{
color:#0000FE;
font-size:18px;
}

.search-box input{
border:none;
outline:none;
width:100%;
font-size:18px;
background:transparent;
}

.highlight-search{
box-shadow:0 0 0 4px rgba(0,0,255,.15);
}

#hymn-list{
display:grid;
grid-template-columns:repeat(2,1fr);
gap:24px;
}

.hymn-card{
background:white;
padding:28px 32px;
border-radius:28px;
border:1px solid #ddd;
cursor:pointer;
transition:.25s;
position:relative;
overflow:hidden;
}

.hymn-card:hover{
transform:translateY(-4px);
box-shadow:0 18px 35px rgba(0,0,0,.08);
}

.arrow{
position:absolute;
right:28px;
top:50%;
transform:translateY(-50%);
font-size:22px;
color:#0000FE;
opacity:0;
transition:.25s;
}

.hymn-card:hover .arrow{
opacity:1;
} 

small {
  letter-spacing: 6px;
  color: #7F7F7F;
}

.hymn-card small{
font-size:10px;
letter-spacing:6px;
opacity:.25;
display:block;
margin-bottom:14px;
}

.hymn-card h4{
font-family:'Playfair Display',serif;
font-size:22px;
font-weight:800;
}

.floating-search{
  position:fixed;   /* 🔥 THIS is the fix */
  right:20px;       /* align to right */
  bottom:100px;     /* sit above mobile nav */
  width:64px;
  height:64px;
  border:none;
  border-radius:50%;
  background:#0000FE;
  color:white;
  font-size:24px;
  cursor:pointer;
  box-shadow:0 10px 25px rgba(0,0,255,.25);
  z-index:10000;    /* stay above everything */
}

.reader-body{
  background:#FCFCFD;
}

.reader-main{
  margin-left:320px;
  padding:18px 68px 48px;
  width:100%;
  background:#FCFCFD;
}

.reader-top-link{
  margin-bottom:26px;
}

.back-link{
  display:inline-flex;
  align-items:center;
  gap:10px;
  border:none;
  background:none;
  color:#a5abb7;
  font-size:12px;
  font-weight:800;
  letter-spacing:1.6px;
  cursor:pointer;
  transition:.25s;
}

.back-link:hover{
  color:#0000FE;
}

.reader-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:24px;
  margin-bottom:34px;
}

.reader-title-wrap{
  flex:1;
}

.reader-number{
  font-size:11px;
  letter-spacing:5px;
  color:#c3c7d0;
  font-weight:800;
  margin-bottom:12px;
}

.reader-title{
  font-family:'Playfair Display',serif;
  font-size:34px;
  line-height:1.05;
  font-weight:900;
  color:#1f2a44;
  letter-spacing:-0.8px;
}

.reader-actions{
  display:flex;
  gap:14px;
  padding-top:14px;
}

.action-btn{
  width:56px;
  height:56px;
  border:none;
  border-radius:18px;
  background:#fff;
  color:#1f2a44;
  cursor:pointer;
  font-size:22px;
  box-shadow:0 10px 22px rgba(0,0,0,.08);
  transition:.25s;
}

.action-btn:hover{
  transform:translateY(-2px);
  color:#0000FE;
}

.lyrics-panel{
  background:#FCFCFD;
  border:1px solid #e4e6eb;
  border-radius:46px;
  padding:54px 58px;
  min-height:260px;
}

.lyrics-panel pre{
  margin:0;
  padding:0;
  background:transparent;
  border:none;
  border-radius:0;
  box-shadow:none;
  white-space:pre-wrap;
  font-family:'Inter',sans-serif;
  font-size:22px;
  line-height:1.62;
  color:#0f2a57;
}

.reader-footer{
  margin-top:78px;
  border-top:1px solid #e6e8ed;
  padding:46px 0 10px;
  text-align:center;
}

.reader-footer p{
  color:#7f8795;
  font-size:14px;
  margin-bottom:26px;
}

.reader-footer-links{
  display:flex;
  justify-content:center;
  gap:42px;
  flex-wrap:wrap;
}

.reader-footer-links a{
  text-decoration:none;
  color:#112752;
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-size:12px;
  font-weight:800;
  letter-spacing:2.6px;
  transition:.25s;
}

.reader-footer-links a:hover{
  color:#0000FE;
}

.reader-footer-links a i{
  font-size:22px;
}

@media (max-width: 900px) {
  body{
    background:#FCFCFD;
  }

  .app{
    display:block;
    min-height:100vh;
    background:#FCFCFD;
  }

  .sidebar{
    display:none;
  }

  main{
    margin-left:0;
    width:100%;
    padding:0 24px 110px;
    background:#FCFCFD;
  }

  .top{
    display:block;
    margin-bottom:28px;
    padding-top:26px;
  }

  .top h2{
    font-family:'Playfair Display',serif;
    font-size:34px;
    line-height:1.08;
    font-weight:900;
    letter-spacing:-0.8px;
    max-width:260px;
    margin-bottom:26px;
  }

  .sort{
    display:flex;
    justify-content:flex-end; /* FIXED */
    align-items:center;
    gap:16px;
    margin-bottom:20px;
  } 

  .sort button{
    min-width:70px;
    height:38px;
    padding:0 18px;
    border:none;
    border-radius:14px;
    background:none;
    font-size:13px;
    font-weight:800;
    letter-spacing:1px;
    color:#a7acb6;
  }

  .sort button.active{
    background:#0000FE;
    color:#fff;
    box-shadow:0 10px 22px rgba(0,0,255,.22);
  }

  .search-box{
    display:flex;
    align-items:center;
    gap:14px;
    min-height:78px;
    padding:0 22px;
    border:2px solid #0000FE;
    border-radius:30px;
    background:#fff;
    box-shadow:0 12px 28px rgba(0,0,0,.08);
    margin-bottom:50px;
  }

  .search-box i{
    font-size:16px;
    color:#8d8fff;
  }

  .search-box input{
    width:100%;
    border:none;
    outline:none;
    background:transparent;
    font-size:16px;
    font-weight:600;
    color:#1f2a44;
  }

  .search-box input::placeholder{
    color:#a9afba;
  }

  #hymn-list{
    display:grid;
    grid-template-columns:1fr;
    gap:18px;
  }

  .hymn-card{
    min-height:104px;
    padding:22px 24px;
    border-radius:30px;
    border:1px solid #e8e8ea;
    background:#FCFCFD;
    box-shadow:none;
    display:flex;
    flex-direction:column;
    justify-content:center;
  }

  .hymn-card small{
    font-size:10px;
    letter-spacing:5px;
    opacity:.2;
    margin-bottom:14px;
  }

  .hymn-card h4{
    font-family:'Playfair Display',serif;
    font-size:22px;
    line-height:1.2;
    font-weight:800;
    padding-right:70px;
  }

  .hymn-card:hover{
    transform:none;
    box-shadow:none;
  }

  .arrow{
    right:24px;
    font-size:24px;
    opacity:1;
    top:auto;
    bottom:22px;
    transform:none;
    display:none;
  }

  .floating-search{
    position:fixed;
    right:20px;
    bottom:90px;
    width:62px;
    height:62px;
    border:none;
    border-radius:50%;
    background:#0000FE;
    color:#fff;
    font-size:24px;
    box-shadow:0 12px 24px rgba(0,0,255,.24);
    z-index:110;
  }

  .mobile-topbar{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    padding:18px 24px 16px;
    background:#FCFCFD;
    border-bottom:1px solid #e7e7ea;
    position:sticky;
    top:0;
    z-index:55;
  }

  .mobile-topbar-left h1{
    font-family:'Playfair Display',serif;
    font-size:22px;
    line-height:1;
    font-weight:900;
    color:#1f2a44;
    letter-spacing:-0.4px;
    margin-bottom:6px;
  }

  .mobile-topbar-left p{
    font-size:10px;
    letter-spacing:2px;
    color:#b1b5bf;
    font-weight:800;
  }

  .mobile-settings-btn{
    width:34px;
    height:34px;
    border:none;
    background:none;
    color:#7d828d;
    font-size:22px;
    padding:0;
    flex-shrink:0;
  }
  
  .floating-search{
    position:fixed;
    right:20px;
    bottom:90px;
    width:62px;
    height:62px;
    border:none;
    border-radius:50%;
    background:#0000FE;
    color:#fff;
    font-size:24px;
    box-shadow:0 12px 24px rgba(0,0,255,.24);
    z-index:110;
  } 
} 

@media (max-width: 900px){
  main,
  .reader-main,
  .search-page-main,
  .favorites-page-main,
  .about-page-main,
  .settings-page-main{
    padding-bottom:110px !important;
  }
}

.search-page-main{
  margin-left:320px;
  padding:46px 70px 36px;
  width:100%;
  background:#FCFCFD;
  min-height:100vh;
}

.search-page-header{
  max-width:760px;
  margin-bottom:36px;
}

.search-page-title{
  font-family:'Playfair Display',serif;
  font-size:48px;
  line-height:1;
  font-weight:900;
  color:#1f2a44;
  letter-spacing:-0.8px;
  margin-bottom:22px;
}

.search-page-subtitle{
  font-size:18px;
  line-height:1.6;
  color:#7d8593;
  max-width:780px;
}

.search-page-bar-row{
  display:flex;
  align-items:stretch;
  gap:18px;
  max-width:710px;
  margin-bottom:54px;
}

.search-page-box{
  flex:1;
  display:flex;
  align-items:center;
  background:#fff;
  border:2px solid #0000FE;
  border-radius:30px;
  min-height:96px;
  padding:0 30px;
  box-shadow:0 18px 34px rgba(0,0,0,.06);
}

.search-page-box input{
  width:100%;
  border:none;
  outline:none;
  background:transparent;
  font-size:18px;
  color:#1f2a44;
}

.search-page-box input::placeholder{
  color:#b0b5c0;
  font-weight:600;
}

.search-page-btn{
  width:148px;
  min-width:148px;
  border:none;
  border-radius:30px;
  background:#0000FE;
  color:#fff;
  font-size:32px;
  cursor:pointer;
  box-shadow:0 18px 34px rgba(0,0,255,.22);
  transition:.25s;
}

.search-page-btn:hover{
  transform:translateY(-2px);
}

.search-results{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:24px;
  max-width:1000px;
}

.search-empty-state{
  grid-column:1 / -1;
  color:#8b93a1;
  font-size:18px;
  padding:10px 2px 30px;
}

.search-footer{
  max-width:1000px;
} 

@media(max-width:900px){
  .search-page-main{
    margin-left:0;
    padding:24px 22px 40px;
  }

  .search-page-title{
    font-size:36px;
    margin-bottom:16px;
  }

  .search-page-subtitle{
    font-size:16px;
  }

  .search-page-bar-row{
    flex-direction:column;
    max-width:100%;
    gap:14px;
  }

  .search-page-box{
    min-height:76px;
    border-radius:24px;
    padding:0 22px;
  }

  .search-page-btn{
    width:100%;
    min-width:0;
    min-height:76px;
    border-radius:24px;
    font-size:28px;
  }

  .search-results{
    grid-template-columns:1fr;
    max-width:100%;
  } 

  .mobile-topbar{
    display:flex;
  } 

  .reader-main{
    margin-left:0 !important;
    width:100% !important;
    padding:18px 20px 110px !important;
    background:#FCFCFD;
    overflow-x:hidden;
  }

  .reader-top-link{
    margin-bottom:18px;
  }

  .back-link{
    font-size:11px;
    letter-spacing:1.2px;
  }

  .reader-header{
    display:block;
    margin-bottom:22px;
  }

  .reader-title-wrap{
    width:100%;
  }

  .reader-number{
    font-size:10px;
    letter-spacing:4px;
    margin-bottom:10px;
  }

  .reader-title{
    font-size:28px !important;
    line-height:1.06;
    letter-spacing:-0.6px;
    width:100%;
    max-width:100%;
    word-break:break-word;
  }

  .reader-actions{
    display:flex;
    gap:12px;
    padding-top:18px;
  }

  .action-btn{
    width:50px;
    height:50px;
    border-radius:16px;
    font-size:19px;
  }

  .lyrics-panel{
    width:100%;
    max-width:100%;
    border-radius:28px;
    padding:28px 22px !important;
    min-height:auto;
    overflow:hidden;
  }

  .lyrics-panel pre{
    width:100%;
    max-width:100%;
    font-size:18px !important;
    line-height:1.72;
    word-break:break-word;
    overflow-wrap:anywhere;
  }

  .reader-footer{
    margin-top:44px;
    padding:32px 0 6px;
  }

  .reader-footer p{
    font-size:13px;
    line-height:1.6;
  }

  .reader-footer-links{
    gap:18px;
    flex-direction:column;
    align-items:center;
  }
}

.favorites-page-main{
  margin-left:320px;
  padding:38px 68px 34px;
  width:100%;
  min-height:100vh;
  background:#FCFCFD;
  display:flex;
  flex-direction:column;
}

.favorites-page-header{
  margin-bottom:34px;
}

.favorites-page-title{
  font-family:'Playfair Display',serif;
  font-size:50px;
  line-height:1;
  font-weight:900;
  color:#1f2a44;
  letter-spacing:-0.8px;
}

.favorites-list{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:24px;
  max-width:1000px;
  min-height:320px;
}

.favorites-empty-state{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  font-family:'Playfair Display',serif;
  font-size:28px;
  font-style:italic;
  color:#c7c7c7;
  min-height:320px;
}

.favorites-footer{
  max-width:1000px;
  margin-top:auto;
}

@media(max-width:900px){
  .favorites-page-main{
    margin-left:0;
    padding:24px 22px 34px;
  }

  .favorites-page-title{
    font-size:38px;
  }

  .favorites-list{
    grid-template-columns:1fr;
    max-width:100%;
  }

  .favorites-empty-state{
    font-size:22px;
    min-height:220px;
  }

  .favorites-footer{
    max-width:100%;
  }
} 

.about-page-main{
  margin-left:320px;
  padding:38px 68px 34px;
  width:100%;
  min-height:100vh;
  background:#FCFCFD;
  display:flex;
  flex-direction:column;
}

.about-page-header{
  margin-bottom:28px;
  max-width:900px;
}

.about-page-title{
  font-family:'Playfair Display',serif;
  font-size:52px;
  line-height:0.95;
  font-weight:900;
  color:#1f2a44;
  letter-spacing:-1px;
  max-width:760px;
}

.about-page-content{
  max-width:930px;
  margin-bottom:34px;
}

.about-page-paragraph{
  font-family:'Playfair Display',serif;
  font-size:23px;
  line-height:1.65;
  color:#4d5667;
}

.dropcap{
  float:left;
  font-family:'Playfair Display',serif;
  font-size:78px;
  line-height:0.8;
  font-weight:900;
  margin-right:12px;
  margin-top:10px;
  color:#4d5667;
}

.about-action-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:16px;
  max-width:770px;
  margin-bottom:48px;
}

.about-action-card{
  min-height:76px;
  border-radius:18px;
  color:#fff;
  text-decoration:none;
  display:flex;
  align-items:center;
  gap:16px;
  padding:0 24px;
  font-size:13px;
  font-weight:800;
  letter-spacing:1.4px;
  box-shadow:0 12px 24px rgba(0,0,0,.10);
  transition:.25s;
}

.about-action-card:hover{
  transform:translateY(-2px);
}

.about-action-card i{
  font-size:22px;
}

.action-blue{
  background:#0000FE;
}

.action-facebook{
  background:#2C7BE5;
}

.action-green{
  background:#2ECC5F;
}

.action-brown{
  background:#6C523D;
}

.about-footer{
  max-width:1000px;
  margin-top:auto;
}

@media(max-width:900px){
  .about-page-main{
    margin-left:0;
    padding:24px 22px 34px;
  }

  .about-page-title{
    font-size:38px;
    max-width:100%;
  }

  .about-page-paragraph{
    font-size:18px;
    line-height:1.75;
  }

  .dropcap{
    font-size:56px;
    margin-top:6px;
    margin-right:10px;
  }

  .about-action-grid{
    grid-template-columns:1fr;
    max-width:100%;
  }

  .about-footer{
    max-width:100%;
  }
} 

.settings-page-main{
  margin-left:320px;
  padding:38px 68px 34px;
  width:100%;
  min-height:100vh;
  background:#FCFCFD;
  display:flex;
  flex-direction:column;
}

.settings-page-title{
  font-family:'Playfair Display',serif;
  font-size:52px;
  line-height:1;
  font-weight:900;
  color:#1f2a44;
  letter-spacing:-1px;
  margin-bottom:54px;
}

.settings-section{
  max-width:770px;
  margin-bottom:56px;
}

.settings-section-label{
  font-size:13px;
  letter-spacing:4px;
  color:#adb2bc;
  font-weight:800;
  margin-bottom:36px;
}

.settings-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.settings-font-row{
  margin-bottom:20px;
}

.settings-row-title{
  font-size:18px;
  font-weight:800;
  color:#112752;
}

.settings-row-value{
  font-size:16px;
  font-weight:800;
  color:#9ca3af;
}

.settings-slider-wrap{
  margin-bottom:44px;
}

.settings-slider{
  width:100%;
  appearance:none;
  -webkit-appearance:none;
  background:transparent;
}

.settings-slider::-webkit-slider-runnable-track{
  height:4px;
  background:linear-gradient(to right,#1f80d2 0%,#1f80d2 16%,#d3d3d6 16%,#d3d3d6 100%);
  border-radius:999px;
}

.settings-slider::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:16px;
  height:16px;
  border-radius:50%;
  background:#1f80d2;
  border:none;
  margin-top:-6px;
  cursor:pointer;
}

.settings-slider::-moz-range-track{
  height:4px;
  background:#d3d3d6;
  border:none;
  border-radius:999px;
}

.settings-slider::-moz-range-thumb{
  width:16px;
  height:16px;
  border-radius:50%;
  background:#1f80d2;
  border:none;
  cursor:pointer;
}

.theme-title-space{
  margin-bottom:28px;
}

.theme-buttons{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
  margin-bottom:40px;
}

.theme-btn{
  min-height:66px;
  border:none;
  background:transparent;
  border-radius:18px;
  font-size:13px;
  font-weight:800;
  letter-spacing:1.8px;
  color:#9da3ad;
  cursor:pointer;
  transition:.25s;
}

.theme-btn.active{
  border:2px solid #0000FE;
  color:#0000FE;
  background:#f7f7ff;
}

.contrast-card{
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  border:2px solid #0000FE;
  background:#FCFCFD;
  border-radius:28px;
  padding:28px 28px;
  box-shadow:0 14px 26px rgba(0,0,0,.08);
  cursor:pointer;
}

.contrast-title{
  font-size:18px;
  font-weight:800;
  color:#112752;
  margin-bottom:6px;
  text-align:left;
}

.contrast-subtitle{
  font-size:14px;
  color:#888f9a;
  text-align:left;
}

.contrast-toggle{
  width:54px;
  height:30px;
  border-radius:999px;
  background:#d9dde4;
  position:relative;
  flex-shrink:0;
  transition:.25s;
}

.contrast-toggle-knob{
  position:absolute;
  top:4px;
  left:4px;
  width:22px;
  height:22px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 2px 6px rgba(0,0,0,.16);
  transition:.25s;
}

.contrast-toggle.active{
  background:#0000FE;
}

.contrast-toggle.active .contrast-toggle-knob{
  left:28px;
}

.reset-app-btn{
  width:100%;
  min-height:90px;
  border:2px solid #f4a0a0;
  background:#FCFCFD;
  border-radius:24px;
  padding:0 30px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  color:#ff1a1a;
  font-size:16px;
  font-weight:900;
  letter-spacing:1px;
  cursor:pointer;
  margin-bottom:54px;
}

.reset-app-btn i{
  font-size:20px;
}

.settings-about-block{
  margin-bottom:52px;
}

.settings-about-block h3{
  font-family:'Playfair Display',serif;
  font-size:24px;
  color:#10264f;
  margin-bottom:14px;
}

.settings-about-block p{
  font-size:16px;
  color:#7d8593;
  line-height:1.6;
  margin-bottom:16px;
}

.settings-about-block small{
  display:block;
  font-size:12px;
  letter-spacing:2px;
  font-weight:800;
  color:#b0b5bf;
}

.settings-contact-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:16px;
  max-width:770px;
}

.settings-contact-card{
  min-height:82px;
  border-radius:18px;
  color:#fff;
  text-decoration:none;
  display:flex;
  align-items:center;
  gap:18px;
  padding:0 24px;
  box-shadow:0 12px 24px rgba(0,0,0,.10);
  transition:.25s;
}

.settings-contact-card:hover{
  transform:translateY(-2px);
}

.settings-contact-card i{
  font-size:22px;
}

.settings-contact-card small{
  display:block;
  font-size:10px;
  letter-spacing:1px;
  font-weight:800;
  opacity:.85;
  margin-bottom:4px;
}

.settings-contact-card strong{
  display:block;
  font-size:13px;
  font-weight:900;
  letter-spacing:.6px;
}

.contact-blue{
  background:#0000FE;
}

.contact-facebook{
  background:#2C7BE5;
}

.contact-green{
  background:#2ECC5F;
}

.contact-brown{
  background:#6C523D;
}

.settings-footer{
  max-width:1000px;
  margin-top:auto;
}

.settings-dark-preview{
  filter:none;
}

.settings-sepia-preview{
  filter:none;
}

.settings-high-contrast-preview{
  filter:none;
}

@media(max-width:900px){
  .settings-page-main{
    margin-left:0;
    padding:24px 22px 34px;
  }

  .settings-page-title{
    font-size:38px;
    margin-bottom:36px;
  }

  .theme-buttons{
    grid-template-columns:1fr;
  }

  .settings-contact-grid{
    grid-template-columns:1fr;
    max-width:100%;
  }

  .reset-app-btn{
    min-height:76px;
    font-size:14px;
  }

  .settings-footer{
    max-width:100%;
  }
} 

/* ===== THEMES ===== */

.theme-dark {
  background: #0f172a;
  color: #f1f5f9;
}

.theme-dark .sidebar,
.theme-dark main,
.theme-dark .app {
  background: #0f172a;
  color: #f1f5f9;
}

.theme-dark .hymn-card,
.theme-dark .search-box,
.theme-dark .lyrics-panel {
  background: #1e293b;
  color: #f1f5f9;
  border-color: #334155;
}

.theme-dark .sidebar button {
  color: #cbd5f5;
}

.theme-dark .sidebar button.active {
  color: #6366f1;
}

/* ===== SEPIA ===== */

.theme-sepia {
  background: #f4ecd8;
  color: #5b4636;
}

.theme-sepia .sidebar,
.theme-sepia main,
.theme-sepia .app {
  background: #f4ecd8;
  color: #5b4636;
}

.theme-sepia .hymn-card,
.theme-sepia .search-box,
.theme-sepia .lyrics-panel {
  background: #fff8e7;
  border-color: #e2d5b8;
}

/* ===== HIGH CONTRAST ===== */

.high-contrast {
  filter:none;
} 

/* ===== SMOOTH PAGE TRANSITIONS ===== */

body{
  opacity:0;
  transform:none;
  transition:opacity .28s ease, background-color .25s ease, color .25s ease;
}

body.page-ready{
  opacity:1;
  transform:none;
}

body.page-leaving{
  opacity:0;
  transform:none;
}

.page-transition-overlay{
  position:fixed;
  inset:0;
  background:#FCFCFD;
  opacity:0;
  pointer-events:none;
  transition:opacity .22s ease;
  z-index:9999;
}

.page-transition-overlay.active{
  opacity:1;
}

.theme-dark .page-transition-overlay{
  background:#0f172a;
}

.theme-sepia .page-transition-overlay{
  background:#f4ecd8;
} 

:root{
  --reader-font-size: 20px;
}

.sidebar{
  position:fixed;
  top:0;
  left:0;
  height:100vh;
  overflow:hidden;
}

.lyrics-panel pre{
  font-size:var(--reader-font-size) !important;
}

.reset-app-btn:hover{
  background:#FCEFF0;
}

.settings-slider{
  width:100%;
  appearance:none;
  -webkit-appearance:none;
  height:4px;
  border-radius:999px;
  background:linear-gradient(to right,#1f80d2 0%,#1f80d2 16%,#d3d3d6 16%,#d3d3d6 100%);
  outline:none;
}

.settings-slider::-webkit-slider-runnable-track{
  height:4px;
  background:transparent;
  border-radius:999px;
}

.settings-slider::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:16px;
  height:16px;
  border-radius:50%;
  background:#1f80d2;
  border:none;
  margin-top:-6px;
  cursor:pointer;
}

.settings-slider::-moz-range-track{
  height:4px;
  background:#d3d3d6;
  border:none;
  border-radius:999px;
}

.settings-slider::-moz-range-thumb{
  width:16px;
  height:16px;
  border-radius:50%;
  background:#1f80d2;
  border:none;
  cursor:pointer;
}

body.theme-light{
  background:#FCFCFD;
  color:#1f2a44;
}

body.theme-light .app,
body.theme-light .sidebar,
body.theme-light main,
body.theme-light .reader-main,
body.theme-light .search-page-main,
body.theme-light .favorites-page-main,
body.theme-light .about-page-main,
body.theme-light .settings-page-main{
  background:#FCFCFD;
  color:#1f2a44;
}

body.theme-dark{
  background:#0f172a;
  color:#f8fafc;
}

body.theme-dark .app,
body.theme-dark .sidebar,
body.theme-dark main,
body.theme-dark .reader-main,
body.theme-dark .search-page-main,
body.theme-dark .favorites-page-main,
body.theme-dark .about-page-main,
body.theme-dark .settings-page-main{
  background:#0f172a;
  color:#f8fafc;
}

body.theme-dark .sidebar{
  border-right:1px solid #223047;
}

body.theme-dark .sidebar h1,
body.theme-dark .top h2,
body.theme-dark .reader-title,
body.theme-dark .search-page-title,
body.theme-dark .favorites-page-title,
body.theme-dark .about-page-title,
body.theme-dark .settings-page-title,
body.theme-dark .settings-about-block h3,
body.theme-dark .hymn-card h4{
  color:#f8fafc;
}

body.theme-dark .sidebar p,
body.theme-dark .reader-number,
body.theme-dark .settings-section-label,
body.theme-dark .settings-row-value,
body.theme-dark .about-page-paragraph,
body.theme-dark .search-page-subtitle,
body.theme-dark .reader-footer p,
body.theme-dark .settings-about-block p,
body.theme-dark .settings-about-block small,
body.theme-dark .contrast-subtitle{
  color:#cbd5e1;
}

body.theme-dark .sidebar button{
  color:#cbd5e1;
}

body.theme-dark .sidebar button.active{
  color:#6366f1;
}

body.theme-dark .hymn-card,
body.theme-dark .search-box,
body.theme-dark .search-page-box,
body.theme-dark .lyrics-panel,
body.theme-dark .action-btn,
body.theme-dark .contrast-card,
body.theme-dark .reset-app-btn{
  background:#1e293b;
  color:#f8fafc;
  border-color:#334155;
}

body.theme-dark .search-box input,
body.theme-dark .search-page-box input{
  color:#f8fafc;
}

body.theme-dark .search-box input::placeholder,
body.theme-dark .search-page-box input::placeholder{
  color:#94a3b8;
}

body.theme-dark .reader-footer,
body.theme-dark .settings-footer,
body.theme-dark .about-footer,
body.theme-dark .favorites-footer,
body.theme-dark .search-footer{
  border-top:1px solid #334155;
}

body.theme-dark .reader-footer-links a{
  color:#f8fafc;
}

body.theme-sepia{
  background:#f4ecd8;
  color:#5b4636;
}

body.theme-sepia .app,
body.theme-sepia .sidebar,
body.theme-sepia main,
body.theme-sepia .reader-main,
body.theme-sepia .search-page-main,
body.theme-sepia .favorites-page-main,
body.theme-sepia .about-page-main,
body.theme-sepia .settings-page-main{
  background:#f4ecd8;
  color:#5b4636;
}

body.theme-sepia .sidebar{
  border-right:1px solid #deceb0;
}

body.theme-sepia .sidebar h1,
body.theme-sepia .top h2,
body.theme-sepia .reader-title,
body.theme-sepia .search-page-title,
body.theme-sepia .favorites-page-title,
body.theme-sepia .about-page-title,
body.theme-sepia .settings-page-title,
body.theme-sepia .settings-about-block h3,
body.theme-sepia .hymn-card h4{
  color:#5b4636;
}

body.theme-sepia .sidebar p,
body.theme-sepia .reader-number,
body.theme-sepia .settings-section-label,
body.theme-sepia .settings-row-value,
body.theme-sepia .about-page-paragraph,
body.theme-sepia .search-page-subtitle,
body.theme-sepia .reader-footer p,
body.theme-sepia .settings-about-block p,
body.theme-sepia .settings-about-block small,
body.theme-sepia .contrast-subtitle{
  color:#7b6757;
}

body.theme-sepia .sidebar button{
  color:#6e5a48;
}

body.theme-sepia .sidebar button.active{
  color:#0000FE;
}

body.theme-sepia .hymn-card,
body.theme-sepia .search-box,
body.theme-sepia .search-page-box,
body.theme-sepia .lyrics-panel,
body.theme-sepia .action-btn,
body.theme-sepia .contrast-card,
body.theme-sepia .reset-app-btn{
  background:#fff8e7;
  color:#5b4636;
  border-color:#e2d5b8;
}

body.theme-sepia .search-box input,
body.theme-sepia .search-page-box input{
  color:#5b4636;
}

body.theme-sepia .search-box input::placeholder,
body.theme-sepia .search-page-box input::placeholder{
  color:#9a8876;
}

body.theme-sepia .reader-footer,
body.theme-sepia .settings-footer,
body.theme-sepia .about-footer,
body.theme-sepia .favorites-footer,
body.theme-sepia .search-footer{
  border-top:1px solid #deceb0;
}

body.theme-sepia .reader-footer-links a{
  color:#5b4636;
}

body.high-contrast{
  filter:contrast(1.15);
}

body.high-contrast .sidebar,
body.high-contrast main,
body.high-contrast .reader-main,
body.high-contrast .search-page-main,
body.high-contrast .favorites-page-main,
body.high-contrast .about-page-main,
body.high-contrast .settings-page-main{
  background:#000 !important;
  color:#fff !important;
}

body.high-contrast .hymn-card,
body.high-contrast .search-box,
body.high-contrast .search-page-box,
body.high-contrast .lyrics-panel,
body.high-contrast .action-btn,
body.high-contrast .contrast-card,
body.high-contrast .reset-app-btn{
  background:#000 !important;
  color:#fff !important;
  border:2px solid #fff !important;
}

body.high-contrast .sidebar h1,
body.high-contrast .top h2,
body.high-contrast .reader-title,
body.high-contrast .search-page-title,
body.high-contrast .favorites-page-title,
body.high-contrast .about-page-title,
body.high-contrast .settings-page-title,
body.high-contrast .settings-about-block h3,
body.high-contrast .hymn-card h4,
body.high-contrast .contrast-title,
body.high-contrast .settings-row-title{
  color:#fff !important;
}

body.high-contrast .sidebar p,
body.high-contrast .reader-number,
body.high-contrast .settings-section-label,
body.high-contrast .settings-row-value,
body.high-contrast .about-page-paragraph,
body.high-contrast .search-page-subtitle,
body.high-contrast .reader-footer p,
body.high-contrast .settings-about-block p,
body.high-contrast .settings-about-block small,
body.high-contrast .contrast-subtitle{
  color:#ddd !important;
}

body.high-contrast .sidebar button{
  color:#fff !important;
}

body.high-contrast .sidebar button.active{
  color:#00a2ff !important;
}

body.high-contrast .reader-footer,
body.high-contrast .settings-footer,
body.high-contrast .about-footer,
body.high-contrast .favorites-footer,
body.high-contrast .search-footer{
  border-top:1px solid #fff !important;
}

body.high-contrast .reader-footer-links a{
  color:#fff !important;
} 

.sidebar{
  position:fixed;
  top:0;
  left:0;
  height:100vh;
  overflow:hidden; /* prevents scroll */
}

.settings-page-main{
  overflow-y:auto;
  min-height:100vh;
}

.mobile-bottom-nav, .mobile-topbar-left {
  display: none;
}

/* ===== MOBILE NAV FINAL FIX ===== */

@media (max-width:900px){ 

  .mobile-topbar-left {
    display: block;
  }

  .mobile-topbar{
    display:flex;
  }

  .mobile-bottom-nav{
    display:grid;
    position:sticky;
    left:12px;
    right:12px;
    bottom:12px;
    height:74px;

    background:rgba(252,252,253,0.96);
    border:1px solid #e7e7ea;
    border-radius:24px;

    grid-template-columns:repeat(4,1fr);
    align-items:center;

    padding:6px 8px 8px;

    z-index:9999;

    box-shadow:0 10px 30px rgba(0,0,0,.08);

    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
  }

  .mobile-bottom-nav button{
    border:none;
    background:none;

    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;

    gap:4px;

    color:#a7acb6;

    font-size:10px;
    font-weight:800;
    letter-spacing:1px;
    text-transform:uppercase;
  }

  .mobile-bottom-nav button i{
    font-size:22px;
  }

  .mobile-bottom-nav button.active{
    color:#0000FE;
  }

  /* VERY IMPORTANT: prevents content hiding behind nav */
  main,
  .reader-main,
  .search-page-main,
  .favorites-page-main,
  .about-page-main,
  .settings-page-main{
    padding-bottom:120px !important;
  }
} 

.install-app-btn{
  position:fixed;
  left:20px;
  bottom:90px;
  display:none;
  align-items:center;
  gap:10px;
  border:none;
  border-radius:18px;
  padding:14px 18px;
  background:#0000FE;
  color:#fff;
  font-size:14px;
  font-weight:800;
  box-shadow:0 12px 24px rgba(0,0,255,.24);
  z-index:120;
}

.install-app-btn i{
  font-size:16px;
}

.install-app-btn.show-install-btn{
  display:flex;
}

.install-help{
  position:fixed;
  left:20px;
  right:20px;
  bottom:160px;
  padding:12px 14px;
  border-radius:16px;
  background:rgba(31,42,68,0.96);
  color:#fff;
  font-size:13px;
  line-height:1.45;
  box-shadow:0 12px 24px rgba(0,0,0,.18);
  z-index:119;
  display:none;
}

.install-help.show-install-help{
  display:block;
}

@media (max-width:900px){
  .install-app-btn{
    left:20px;
    bottom:96px;
    padding:12px 16px;
    font-size:13px;
  }

  .install-help{
    left:16px;
    right:16px;
    bottom:168px;
    font-size:12px;
  }
} 

.lyrics-panel pre{
  font-size: var(--reader-font-size) !important;
} 

/* ===== DARK MODE MOBILE + TEXT CORRECTIONS ===== */
body.theme-dark,
body.theme-dark .reader-body,
body.theme-dark .reader-main,
body.theme-dark .search-page-main,
body.theme-dark .favorites-page-main,
body.theme-dark .about-page-main,
body.theme-dark .settings-page-main,
body.theme-dark main,
body.theme-dark .app,
body.theme-dark .sidebar{
  color:#ffffff;
}

body.theme-dark .sidebar h1,
body.theme-dark .sidebar p,
body.theme-dark .top h2,
body.theme-dark .reader-title,
body.theme-dark .reader-number,
body.theme-dark .reader-footer p,
body.theme-dark .reader-footer-links a,
body.theme-dark .search-page-title,
body.theme-dark .search-page-subtitle,
body.theme-dark .favorites-page-title,
body.theme-dark .about-page-title,
body.theme-dark .about-page-paragraph,
body.theme-dark .settings-page-title,
body.theme-dark .settings-section-label,
body.theme-dark .settings-row-title,
body.theme-dark .settings-row-value,
body.theme-dark .settings-about-block h3,
body.theme-dark .settings-about-block p,
body.theme-dark .settings-about-block small,
body.theme-dark .contrast-title,
body.theme-dark .contrast-subtitle,
body.theme-dark .back-link,
body.theme-dark .hymn-card h4,
body.theme-dark .hymn-card small,
body.theme-dark .lyrics-panel pre{
  color:#ffffff !important;
}

body.theme-dark .mobile-topbar{
  background:#182544 !important;
  border-bottom:1px solid #2a3a63;
}

body.theme-dark .mobile-topbar-left h1,
body.theme-dark .mobile-topbar-left p,
body.theme-dark .mobile-settings-btn,
body.theme-dark .mobile-settings-btn i{
  color:#ffffff !important;
}

body.theme-dark .mobile-bottom-nav{
  background:#182544 !important;
  border:1px solid #2a3a63 !important;
}

body.theme-dark .mobile-bottom-nav button,
body.theme-dark .mobile-bottom-nav button i,
body.theme-dark .mobile-bottom-nav button span{
  color:#ffffff !important;
}

body.theme-dark .mobile-bottom-nav button.active,
body.theme-dark .mobile-bottom-nav button.active i,
body.theme-dark .mobile-bottom-nav button.active span{
  color:#ffffff !important;
}

/* ===== SEPIA MODE MOBILE + TEXT CORRECTIONS ===== */
body.theme-sepia,
body.theme-sepia .reader-body,
body.theme-sepia .reader-main,
body.theme-sepia .search-page-main,
body.theme-sepia .favorites-page-main,
body.theme-sepia .about-page-main,
body.theme-sepia .settings-page-main,
body.theme-sepia main,
body.theme-sepia .app,
body.theme-sepia .sidebar{
  color:#5b4636;
}

body.theme-sepia .sidebar h1,
body.theme-sepia .sidebar p,
body.theme-sepia .top h2,
body.theme-sepia .reader-title,
body.theme-sepia .reader-number,
body.theme-sepia .reader-footer p,
body.theme-sepia .reader-footer-links a,
body.theme-sepia .search-page-title,
body.theme-sepia .search-page-subtitle,
body.theme-sepia .favorites-page-title,
body.theme-sepia .about-page-title,
body.theme-sepia .about-page-paragraph,
body.theme-sepia .settings-page-title,
body.theme-sepia .settings-section-label,
body.theme-sepia .settings-row-title,
body.theme-sepia .settings-row-value,
body.theme-sepia .settings-about-block h3,
body.theme-sepia .settings-about-block p,
body.theme-sepia .settings-about-block small,
body.theme-sepia .contrast-title,
body.theme-sepia .contrast-subtitle,
body.theme-sepia .back-link,
body.theme-sepia .hymn-card h4,
body.theme-sepia .hymn-card small,
body.theme-sepia .lyrics-panel pre{
  color:#5b4636 !important;
}

body.theme-sepia .mobile-topbar{
  background:#fff8e7 !important;
  border-bottom:1px solid #e2d5b8;
}

body.theme-sepia .mobile-topbar-left h1,
body.theme-sepia .mobile-topbar-left p,
body.theme-sepia .mobile-settings-btn,
body.theme-sepia .mobile-settings-btn i{
  color:#5b4636 !important;
}

body.theme-sepia .mobile-bottom-nav{
  background:#fff8e7 !important;
  border:1px solid #e2d5b8 !important;
}

body.theme-sepia .mobile-bottom-nav button,
body.theme-sepia .mobile-bottom-nav button i,
body.theme-sepia .mobile-bottom-nav button span{
  color:#5b4636 !important;
}

body.theme-sepia .mobile-bottom-nav button.active,
body.theme-sepia .mobile-bottom-nav button.active i,
body.theme-sepia .mobile-bottom-nav button.active span{
  color:#5b4636 !important;
}

/* ===== FIXED NAVIGATION, INSTALL CTA, SORTING + BACK TO TOP ===== */
.sidebar{
  position:fixed;
  top:0;
  left:0;
  height:100vh;
  height:100dvh;
  overflow:hidden;
  z-index:100;
}

.sidebar h1{
  font-size:clamp(24px,2.1vw,30px);
  line-height:1.04;
}

.sidebar nav{
  margin-top:34px;
  gap:6px;
}

.sidebar button{
  padding:11px 0;
}

.top h2{
  max-width:none;
  padding:0;
  background:transparent;
  font-size:clamp(32px,3.2vw,42px);
  line-height:1.08;
}

.hymn-card h4{
  font-size:19px;
  line-height:1.28;
}

.reader-title{
  font-size:clamp(30px,3.2vw,42px);
  line-height:1.08;
}

.sort button{
  border:1px solid rgba(31,42,68,.16);
  background:rgba(255,255,255,.58);
  color:#4f5b73;
  font-family:'Inter',sans-serif;
  font-size:13px;
  font-weight:700;
  letter-spacing:.08em;
  transition:color .2s ease,background .2s ease,border-color .2s ease,transform .2s ease;
}

.sort button:hover{
  color:#0000FE;
  border-color:rgba(0,0,254,.35);
  transform:translateY(-1px);
}

.sort button.active{
  border-color:#0000FE;
}

.sidebar .install-nav-btn{
  margin-top:8px;
  padding:12px 15px;
  border:1px solid rgba(255,255,255,.35);
  border-radius:16px;
  background:linear-gradient(135deg,#0000FE 0%,#5757ff 100%);
  color:#fff;
  opacity:1;
  box-shadow:0 12px 28px rgba(0,0,254,.24);
  letter-spacing:1.4px;
}

.sidebar .install-nav-btn:hover{
  color:#fff;
  opacity:1;
  transform:translateY(-2px);
  box-shadow:0 16px 34px rgba(0,0,254,.3);
}

.install-nav-btn:not(.show-install-btn),
.install-mobile-nav-btn:not(.show-install-btn){
  display:none !important;
}

.install-mobile-nav-btn{
  color:#0000FE !important;
}

.back-to-top{
  position:fixed;
  right:24px;
  bottom:28px;
  width:54px;
  height:54px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.58);
  border-radius:20px;
  background:linear-gradient(145deg,rgba(0,0,254,.72),rgba(87,87,255,.42));
  color:#fff;
  font-size:18px;
  font-family:'Inter',sans-serif;
  font-weight:800;
  cursor:pointer;
  opacity:0;
  visibility:hidden;
  transform:translateY(16px) scale(.92);
  backdrop-filter:blur(16px) saturate(145%);
  -webkit-backdrop-filter:blur(16px) saturate(145%);
  box-shadow:0 14px 34px rgba(0,0,80,.2),inset 0 1px 0 rgba(255,255,255,.35);
  transition:opacity .28s ease,transform .28s ease,visibility .28s ease,box-shadow .2s ease;
  z-index:11000;
}

.back-to-top span{
  position:relative;
  z-index:1;
  font-size:22px;
  line-height:1;
}

.reader-footer,
.search-footer,
.favorites-footer,
.about-footer,
.settings-footer{
  background:transparent;
  border-top:1px solid rgba(127,135,149,.22);
  color:inherit;
}

.back-to-top::before{
  content:"";
  position:absolute;
  inset:5px;
  border-radius:15px;
  background:linear-gradient(120deg,rgba(255,255,255,.22),transparent 55%);
  pointer-events:none;
}

.back-to-top.is-visible{
  opacity:1;
  visibility:visible;
  transform:translateY(0) scale(1);
  animation:back-to-top-breathe 5s ease-in-out infinite;
}

.back-to-top:hover{
  transform:translateY(-3px) scale(1.03);
  box-shadow:0 18px 40px rgba(0,0,80,.28),inset 0 1px 0 rgba(255,255,255,.45);
}

.back-to-top:focus-visible{
  outline:3px solid rgba(254,101,101,.65);
  outline-offset:3px;
}

@keyframes back-to-top-breathe{
  0%,100%{box-shadow:0 14px 34px rgba(0,0,80,.2),inset 0 1px 0 rgba(255,255,255,.35)}
  50%{box-shadow:0 17px 38px rgba(0,0,254,.28),inset 0 1px 0 rgba(255,255,255,.42)}
}

@media (max-width:900px){
  .mobile-topbar{
    position:fixed;
    top:0;
    left:0;
    right:0;
    min-height:68px;
    padding:13px 18px 11px;
    align-items:center;
    z-index:1000;
  }

  .mobile-topbar-left h1{
    max-width:250px;
    font-size:18px;
    line-height:1.05;
    margin-bottom:5px;
  }

  .mobile-topbar-left p{
    font-size:8px;
    letter-spacing:1.6px;
  }

  .app{
    padding-top:68px;
  }

  .top h2{
    max-width:100%;
    padding:0;
    background:transparent;
    font-size:28px;
    line-height:1.1;
  }

  .hymn-card h4{
    padding-right:0;
    font-size:18px;
    line-height:1.28;
  }

  .reader-title{
    font-size:26px !important;
    line-height:1.12;
  }

  .mobile-bottom-nav{
    position:fixed;
    left:12px;
    right:12px;
    bottom:12px;
    width:calc(100% - 24px);
    margin:0;
    z-index:10000;
  }

  .mobile-bottom-nav.has-install{
    grid-template-columns:repeat(5,1fr);
  }

  .back-to-top{
    right:18px;
    bottom:100px;
    width:46px;
    height:46px;
    border-radius:17px;
  }
}

@media (prefers-reduced-motion:reduce){
  .back-to-top,
  .back-to-top.is-visible{
    animation:none;
    transition:none;
  }
}
