/* The Greek text's fonts, served from this site (from Google Fonts; SIL Open Font
   License, see fonts/README.md). Each face is split by script; a browser downloads only
   the parts a page uses (unicode-range). */
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/eb-garamond-400i-greek-ext.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/eb-garamond-400i-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/eb-garamond-400i-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/eb-garamond-400i-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/eb-garamond-400-greek-ext.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/eb-garamond-400-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/eb-garamond-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/eb-garamond-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/eb-garamond-700-greek-ext.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/eb-garamond-700-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/eb-garamond-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/eb-garamond-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'GFS Didot';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gfs-didot-400-greek-ext.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'GFS Didot';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gfs-didot-400-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'GFS Didot';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gfs-didot-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'GFS Didot';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/gfs-didot-700-greek-ext.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'GFS Didot';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/gfs-didot-700-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'GFS Didot';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/gfs-didot-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'GFS Didot';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gfs-didot-400i-greek-ext.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'GFS Didot';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gfs-didot-400i-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'GFS Didot';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gfs-didot-400i-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'GFS Neohellenic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gfs-neohellenic-400-greek-ext.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'GFS Neohellenic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gfs-neohellenic-400-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'GFS Neohellenic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gfs-neohellenic-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'GFS Neohellenic';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gfs-neohellenic-400i-greek-ext.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'GFS Neohellenic';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gfs-neohellenic-400i-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'GFS Neohellenic';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gfs-neohellenic-400i-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'GFS Neohellenic';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/gfs-neohellenic-700-greek-ext.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'GFS Neohellenic';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/gfs-neohellenic-700-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'GFS Neohellenic';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/gfs-neohellenic-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 400 900;  /* (one variable font: its bold too) */
  font-display: swap;
  src: url(fonts/alegreya-400-greek-ext.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 400 900;  /* (one variable font: its bold too) */
  font-display: swap;
  src: url(fonts/alegreya-400-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 400 900;  /* (one variable font: its bold too) */
  font-display: swap;
  src: url(fonts/alegreya-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 400 900;  /* (one variable font: its bold too) */
  font-display: swap;
  src: url(fonts/alegreya-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Alegreya';
  font-style: italic;
  font-weight: 400 900;  /* (one variable font: its bold too) */
  font-display: swap;
  src: url(fonts/alegreya-400i-greek-ext.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'Alegreya';
  font-style: italic;
  font-weight: 400 900;  /* (one variable font: its bold too) */
  font-display: swap;
  src: url(fonts/alegreya-400i-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'Alegreya';
  font-style: italic;
  font-weight: 400 900;  /* (one variable font: its bold too) */
  font-display: swap;
  src: url(fonts/alegreya-400i-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Alegreya';
  font-style: italic;
  font-weight: 400 900;  /* (one variable font: its bold too) */
  font-display: swap;
  src: url(fonts/alegreya-400i-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'GFS Decker';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gfs-decker2-400-greek-ext.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'GFS Decker';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gfs-decker2-400-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'GFS Decker';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gfs-decker2-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'GFS Complutum';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gfs-complutum-400-greek-ext.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'GFS Complutum';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gfs-complutum-400-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'GFS Complutum';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gfs-complutum-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'GFS Porson';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gfs-porson-400-greek-ext.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'GFS Porson';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gfs-porson-400-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'GFS Porson';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gfs-porson-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gentium-book-plus-400i-greek-ext.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gentium-book-plus-400i-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gentium-book-plus-400i-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gentium-book-plus-400i-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gentium-book-plus-400-greek-ext.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gentium-book-plus-400-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gentium-book-plus-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/gentium-book-plus-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/gentium-book-plus-700-greek-ext.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/gentium-book-plus-700-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/gentium-book-plus-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Gentium Book Plus';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/gentium-book-plus-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #fdf6e3;
  --text: #2b2620;
  --muted: #8b8174;
  --rule: #e6dfd2;
  /* The accent (the verse being read, lit buttons, links): amber, unless another is chosen. */
  --current-bg: #f3e6c4;
  --current-bar: #b07a1e;
  --pause-bg: #f7efdb;
  --player-bg: rgba(253, 246, 227, 0.94);
  --greek: "Gentium Book Plus", "GFS Didot", "Noto Serif", "Times New Roman", serif;
  --font-scale: 0.91;
  color-scheme: light;  /* native controls (the book list, scrollbars) follow the theme */
}
/* The font for the Greek (the Aa menu): Gentium unless another was chosen. Garamond runs
   small, so the text is set about 10% larger for it; the others take that back with
   --font-scale. */
:root[data-font="garamond"] { --greek: "EB Garamond", "Gentium Book Plus", "Noto Serif", "Times New Roman", serif; --font-scale: 1; }
:root[data-font="didot"] { --greek: "GFS Didot", "Gentium Book Plus", "Noto Serif", "Times New Roman", serif; --font-scale: 0.91; }
:root[data-font="neohellenic"] { --greek: "GFS Neohellenic", "Gentium Book Plus", "Noto Serif", "Times New Roman", serif; --font-scale: 1.06; }
/* (Porson is Greek only, in one weight: the Latin, figures aside, is Gentium's.) */
:root[data-font="alegreya"] { --greek: "Alegreya", "Gentium Book Plus", "Noto Serif", "Times New Roman", serif; --font-scale: 0.92; }
:root[data-font="complutum"] { --greek: "GFS Complutum", "Gentium Book Plus", "Noto Serif", "Times New Roman", serif; --font-scale: 0.89; }  /* (Greek only) */
:root[data-font="decker"] { --greek: "GFS Decker", "Gentium Book Plus", "Noto Serif", "Times New Roman", serif; --font-scale: 0.98; }  /* (uncial: its small letters are small capitals; Greek only) */
:root[data-font="system"] { --greek: system-ui, "Noto Sans", Roboto, sans-serif; --font-scale: 0.82; }  /* (the device's own sans-serif, the interface's: nothing to download) */
:root[data-font="porson"] { --greek: "GFS Porson", "Gentium Book Plus", "Noto Serif", "Times New Roman", serif; --font-scale: 1.06; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1d1a16;
    --text: #e9e2d6;
    --muted: #8f8577;
    --rule: #34302a;
    --current-bg: #3d3220;
    --current-bar: #d9a441;
    --pause-bg: #2c271e;
    --player-bg: rgba(29, 26, 22, 0.94);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1d1a16;
  --text: #e9e2d6;
  --muted: #8f8577;
  --rule: #34302a;
  --current-bg: #3d3220;
  --current-bar: #d9a441;
  --pause-bg: #2c271e;
  --player-bg: rgba(29, 26, 22, 0.94);
}

/* Other accents (the Aa menu; amber, above, unless another is chosen): each its colours in
   the light and dark themes. A deep manuscript red, its highlights 12% and 6% of it in
   the paper; in the dark theme lightened and turned a little toward brick (a red lightened
   alone goes pink). */
:root[data-accent="red"] {
  --current-bg: #eedccb;
  --current-bar: #7f1d1d;
  --pause-bg: #f5e9d7;
}
@media (prefers-color-scheme: dark) {
  :root[data-accent="red"]:not([data-theme="light"]) {
    --current-bg: #412821;
    --current-bar: #bf5a4a;
    --pause-bg: #30221c;
  }
}
:root[data-accent="red"][data-theme="dark"] {
  --current-bg: #412821;
  --current-bar: #bf5a4a;
  --pause-bg: #30221c;
}
/* Purple, the porphyry of the purple manuscripts, and blue, as lapis in illumination. In
   the dark theme these two have a neutral near-black rather than the warm one: brown
   muddies them. */
:root[data-accent="purple"] {
  --current-bg: #e9ded5;
  --current-bar: #5a2a6e;
  --pause-bg: #f3eadc;
}
@media (prefers-color-scheme: dark) {
  :root[data-accent="purple"]:not([data-theme="light"]) {
    --bg: #1b1b1d;
    --text: #e5e5e7;
    --muted: #8e8e93;
    --rule: #323235;
    --player-bg: rgba(27, 27, 29, 0.94);
    --current-bg: #3a3041;
    --current-bar: #a77bc0;
    --pause-bg: #2c2731;
  }
}
:root[data-accent="purple"][data-theme="dark"] {
  --bg: #1b1b1d;
  --text: #e5e5e7;
  --muted: #8e8e93;
  --rule: #323235;
  --player-bg: rgba(27, 27, 29, 0.94);
  --current-bg: #3a3041;
  --current-bar: #a77bc0;
  --pause-bg: #2c2731;
}
:root[data-accent="blue"] {
  --current-bg: #e2e0d6;
  --current-bar: #1f3f74;
  --pause-bg: #f0ebdc;
}
@media (prefers-color-scheme: dark) {
  :root[data-accent="blue"]:not([data-theme="light"]) {
    --bg: #1b1b1d;
    --text: #e5e5e7;
    --muted: #8e8e93;
    --rule: #323235;
    --player-bg: rgba(27, 27, 29, 0.94);
    --current-bg: #2d3644;
    --current-bar: #6f98cf;
    --pause-bg: #252a32;
  }
}
:root[data-accent="blue"][data-theme="dark"] {
  --bg: #1b1b1d;
  --text: #e5e5e7;
  --muted: #8e8e93;
  --rule: #323235;
  --player-bg: rgba(27, 27, 29, 0.94);
  --current-bg: #2d3644;
  --current-bar: #6f98cf;
  --pause-bg: #252a32;
}
/* (The accent buttons: a swatch of each, as it is in the theme in use.) */
.accent-choice { display: grid; place-items: center; width: 2.2rem; height: 2rem; padding: 0; }
.accent-choice .swatch { width: 1rem; height: 1rem; border-radius: 50%; background: var(--swatch); }
.accent-choice[data-accent="red"] { --swatch: #7f1d1d; }
.accent-choice[data-accent="amber"] { --swatch: #b07a1e; }
.accent-choice[data-accent="purple"] { --swatch: #5a2a6e; }
.accent-choice[data-accent="blue"] { --swatch: #1f3f74; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .accent-choice[data-accent="red"] { --swatch: #bf5a4a; }
  :root:not([data-theme="light"]) .accent-choice[data-accent="amber"] { --swatch: #d9a441; }
  :root:not([data-theme="light"]) .accent-choice[data-accent="purple"] { --swatch: #a77bc0; }
  :root:not([data-theme="light"]) .accent-choice[data-accent="blue"] { --swatch: #6f98cf; }
}
:root[data-theme="dark"] .accent-choice[data-accent="red"] { --swatch: #bf5a4a; }
:root[data-theme="dark"] .accent-choice[data-accent="amber"] { --swatch: #d9a441; }
:root[data-theme="dark"] .accent-choice[data-accent="purple"] { --swatch: #a77bc0; }
:root[data-theme="dark"] .accent-choice[data-accent="blue"] { --swatch: #6f98cf; }

* { box-sizing: border-box; }
/* (What's scrolled to, the current line, kept clear of the bars: --topbar-h and
   --player-h are their heights on screen, kept up to date by app.js.) */
html {
  scroll-padding-top: calc(var(--topbar-h, 3.5rem) + 0.5rem);
  scroll-padding-bottom: calc(var(--player-h, 7rem) + 0.5rem);
  overflow-x: clip;
}
/* Feel like an app on phones: no double-tap zoom (pinch zoom is off in the viewport tag). */
body { touch-action: manipulation; -webkit-text-size-adjust: 100%; }
/* No blue box flashing over whatever is tapped. */
html { -webkit-tap-highlight-color: transparent; }
/* Hover styles are only for a real pointer (on touch the last thing tapped would stay
   lit); a tap gets a brief press instead. */
@media (hover: none) {
  button:active:not(:disabled), a:active, summary:active { opacity: 0.55; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--greek);
  font-size: 23px;  /* sized for EB Garamond, which runs small; --font-scale takes the others down */
  line-height: 1.55;
}
/* Behind the phone's status bar (the installed app, which draws under it): the page's
   colour, with what scrolls up going under it rather than behind the clock. */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: env(safe-area-inset-top);
  background: var(--bg);
  z-index: 30;
  pointer-events: none;
}
main {
  font-size: calc(var(--text-scale, 1) * var(--font-scale, 1) * 1em);  /* the reader's Text size */
  max-width: 44rem;
  margin: 0 auto;
  /* Room at the end for the last line to come clear of the media bar, however tall the
     bar is (two rows on a narrow phone, the home indicator below it, a larger Interface). */
  padding: 1.5rem 16px calc(var(--player-h, 7rem) + 3rem);
}

/* Title bar, always at the top of the viewport. */
#topbar {
  position: sticky;
  top: 0;
  padding-top: env(safe-area-inset-top);  /* below the notch in the installed app */
  z-index: 4;
  background: var(--player-bg);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.topbar-inner {
  max-width: 56rem;  /* wider than the text: room for a long title and the book beside it */
  margin: 0 auto;
  padding: 0.45rem 16px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow { color: var(--muted); letter-spacing: 0.06em; font-size: 0.85em; white-space: nowrap;
           min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* The title and book, each in the longest form that fits (app.js, fitTopbar). */
#eyebrow .short, #book-label .short { display: none; }
/* Book picker: a button and a short menu under it (a native select fills a phone's
   screen with its list). */
/* The title: in a book of a Testament, a button opening a menu of the Testament's books
   (styled as the book picker); elsewhere just the title. */
#title-picker { position: relative; min-width: 0; display: flex; }
#title-select {
  min-width: 0;  /* (no max-width: with the negative margin below it would clip the title) */
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1rem 0.3rem;
  margin-left: -0.3rem;  /* the text lines up as it did before it was a button */
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}
#title-select svg { flex: none; color: var(--muted); }
#title-select:disabled { cursor: default; }
#title-select:disabled svg { display: none; }
#title-select:not(:disabled):focus-visible, #title-select[aria-expanded="true"] { border-color: var(--rule); outline: none; }
@media (hover: hover) { #title-select:not(:disabled):hover { border-color: var(--rule); } }
#book-picker { position: relative; min-width: 0; }
#book-picker[hidden] { display: none; }
#book-select {
  min-width: 0;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font: inherit;
  font-size: 1.05em;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.1rem 0.3rem;
  cursor: pointer;
}
#book-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#book-select svg { flex: none; color: var(--muted); }
#book-select:focus-visible, #book-select[aria-expanded="true"] { border-color: var(--rule); outline: none; }
@media (hover: hover) { #book-select:hover { border-color: var(--rule); outline: none; } }
#book-menu, #title-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 7;
  min-width: 11rem;
  max-width: calc(100vw - 32px);
  max-height: min(50vh, 24rem);
  max-height: min(50dvh, 24rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 0.3rem 0;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  font-size: 16px;
}
#book-menu a, #title-menu a {
  display: block;
  padding: 0.45rem 0.9rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#book-menu a:focus-visible, #title-menu a:focus-visible { background: var(--current-bg); outline: none; }
@media (hover: hover) { #book-menu a:hover, #title-menu a:hover { background: var(--current-bg); outline: none; } }
#book-menu [aria-selected="true"] a, #title-menu [aria-selected="true"] a { color: var(--current-bar); font-weight: 600; }
#to-start {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font: 13px system-ui, sans-serif;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  height: 1.85rem;  /* as tall as the round buttons beside it */
  padding: 0 0.7rem;
  cursor: pointer;
}
@media (hover: hover) { #to-start:hover { color: var(--text); border-color: var(--current-bar); } }
/* Bookmark the verse being read (filled when it is marked). */
#bookmark {
  margin-left: auto;
  flex: none;
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 50%;
  cursor: pointer;
}
@media (hover: hover) { #bookmark:hover { color: var(--text); border-color: var(--current-bar); } }
#bookmark[aria-pressed="true"] { color: var(--current-bar); border-color: var(--current-bar); }
#bookmark[aria-pressed="true"] path { fill: currentColor; }
/* The bars and their controls, at the reader's Interface size. */
#topbar, #player { zoom: var(--ui-scale, 1); }

/* Text size menu (Aa): text and interface, each stepped smaller or larger. */
#size-picker { position: relative; flex: none; display: flex; }  /* flex: no line box (and descent) around the button */
#size-button {
  height: 1.85rem;
  padding: 0 0.45rem;
  font: 15px var(--greek);
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 0.95rem;
  cursor: pointer;
}
#size-button[aria-expanded="true"] { color: var(--text); border-color: var(--current-bar); }
@media (hover: hover) { #size-button:hover { color: var(--text); border-color: var(--current-bar); } }
#size-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 7;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);  /* (the labels', the choices': the rows' subgrid) */
  gap: 0.85rem 0.6rem;  /* (between the groups: sizes, font, theme, language; label and choices) */
  padding: 0.6rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  font: 14px system-ui, sans-serif;
  color: var(--muted);
  white-space: nowrap;
  width: max-content;  /* (as its rows need: below) */
  max-width: calc(100vw / var(--ui-scale, 1) - 16px);  /* in the bar's (zoomed) units */
  /* (No taller than the room between the bars, scrolling within itself if it must: the
     bars' heights are on screen, so divided by the interface size, as the menu is in it.) */
  max-height: calc((100dvh - var(--topbar-h, 3.5rem) - var(--player-h, 7rem)) / var(--ui-scale, 1) - 1rem);
  overflow-y: auto;
}
/* As wide as its rows need (its labels' and choices'). Where that's more than the screen
   has (a large interface size on a phone), each label above its choices, and the choices
   wrapping rather than running off its edge (theme.js: placeSizes). */
#size-menu.narrow .font-row { display: flex; flex-wrap: wrap; gap: 0.3rem; }
#size-menu.narrow .font-row .size-name { width: 100%; }
#size-menu.narrow :is(.theme-row, .accent-row, .letters-row) .font-choices { flex-wrap: wrap; }
#size-menu[hidden] { display: none; }
/* The rows share the menu's two columns (subgrid): the labels', as wide as the longest in the
   language in use ("Γραμματοσειρά" is longer than "Font"), and the choices'. */
.size-row, .font-row { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; }
.size-steps { display: grid; grid-template-columns: 2rem 3.2rem 2rem; align-items: center; }
/* The choices wrap among themselves, beside the label rather than under it. */
.font-choices { display: flex; flex-wrap: wrap; gap: 0.3rem; min-width: 0; }
.size-name { min-width: 5.2rem; }
.font-choice, .theme-choice, .lang-choice, .accent-choice, .letters-choice {
  padding: 0.2rem 0.5rem;
  font-size: 17px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 6px;
  cursor: pointer;
}
/* The font: a list to choose from, showing the one in use in its own face (and each in the
   list in its own, where the browser draws the list itself). */
.font-select {
  appearance: none;
  justify-self: start;
  min-width: 10rem;
  padding: 0.2rem 2rem 0.2rem 0.6rem;
  font: 17px "Gentium Book Plus", serif;
  color: var(--text);
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='14' height='14'%3E%3Cpath fill='none' stroke='%23888' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.6rem center;
  border: 1px solid var(--rule);
  border-radius: 6px;
  cursor: pointer;
}
@media (hover: hover) { .font-select:hover { border-color: var(--current-bar); } }
.font-select:focus-visible { outline: 2px solid var(--current-bar); outline-offset: 1px; }
.font-select[data-font="gentium"], .font-select option[value="gentium"] { font-family: "Gentium Book Plus", serif; font-size: 15.5px; }
.font-select[data-font="garamond"], .font-select option[value="garamond"] { font-family: "EB Garamond", serif; font-size: 17px; }
.font-select[data-font="didot"], .font-select option[value="didot"] { font-family: "GFS Didot", serif; font-size: 15.5px; }
.font-select[data-font="neohellenic"], .font-select option[value="neohellenic"] { font-family: "GFS Neohellenic", serif; font-size: 17px; }
.font-select[data-font="porson"], .font-select option[value="porson"] { font-family: "GFS Porson", "Gentium Book Plus", serif; font-size: 17px; }
.font-select[data-font="alegreya"], .font-select option[value="alegreya"] { font-family: "Alegreya", serif; font-size: 16.5px; }
.font-select[data-font="complutum"], .font-select option[value="complutum"] { font-family: "GFS Complutum", "Gentium Book Plus", serif; font-size: 16px; }
.font-select[data-font="decker"], .font-select option[value="decker"] { font-family: "GFS Decker", "Gentium Book Plus", serif; font-size: 17px; }
.font-select[data-font="system"], .font-select option[value="system"] { font-family: system-ui, sans-serif; font-size: 15px; }
.font-select option { color: var(--text); background: var(--bg); }
.theme-choice { display: grid; place-items: center; width: 2.2rem; height: 2rem; padding: 0; }  /* an icon each */
.theme-row .font-choices, .accent-row .font-choices, .letters-row .font-choices { flex-wrap: nowrap; }
.letters-choice { font-family: var(--greek); font-size: 15.5px; }  /* (named in Greek, whatever the interface's language) */
.letters-choice[data-letters="capitals"] { letter-spacing: 0.04em; }
/* Majuscule in scriptio continua (the Aa menu's Script): the text one unbroken run, so a
   line may break anywhere in it, as in an inscription. */
:root[data-letters="capitals"] #verses .text { word-break: break-all; }
.lang-choice:not([data-lang="en"]) { font-family: var(--greek); font-size: 15.5px; }
.lang-choice[data-lang="en"] { font-size: 14px; }  /* (each language's name in its own script) */
@media (hover: hover) { .font-choice:hover, .theme-choice:hover, .lang-choice:hover, .accent-choice:hover, .letters-choice:hover { color: var(--text); border-color: var(--current-bar); } }
.font-choice[aria-pressed="true"], .theme-choice[aria-pressed="true"], .lang-choice[aria-pressed="true"],
.accent-choice[aria-pressed="true"], .letters-choice[aria-pressed="true"] { color: var(--text); border-color: var(--current-bar); background: var(--current-bg); }
.size-value { text-align: center; font-variant-numeric: tabular-nums; color: var(--text); }
.size-step {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  padding: 0;
  font: 18px system-ui, sans-serif;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 50%;
  cursor: pointer;
}
@media (hover: hover) { .size-step:hover:not(:disabled) { color: var(--text); border-color: var(--current-bar); } }
.size-step:disabled { opacity: 0.35; cursor: default; }
/* The text's sources and the recording's, after the text. */
.credits { text-align: center; margin: 2.5rem 0 0; padding-top: 0.8rem; border-top: 1px solid color-mix(in srgb, var(--rule) 70%, transparent); }
.credits:empty { display: none; }

#verses { list-style: none; margin: 0; padding: 0; }
/* A book is hundreds of verses (thousands of words): the browser lays out and draws only
   those near the screen, which is most of the work of opening a book on a phone. Each
   remembers its size once drawn; until then it counts as a few lines. Not in focused mode,
   where only three show anyway. */
body:not(.focused) #verses > li { content-visibility: auto; contain-intrinsic-size: auto 6.5em; }
.credit { margin: 0.4rem 0 0; color: var(--muted); font-family: system-ui, sans-serif; font-size: 12px; }
body:not(.show-translation) #translation-credit { display: none; }
body:not(.show-modern) #modern-credit { display: none; }

/* Murray's English, one passage (~5 lines) after the verses it translates. */
.trans {
  margin: -0.2rem 0 1.2rem calc(3rem + 3px + 0.75rem);
  padding: 0.35rem 0.8rem;
  border-left: 2px solid var(--rule);
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 0.78em;
  line-height: 1.55;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease;
}
.trans .lines { font-family: system-ui, sans-serif; font-size: 11px; margin-right: 0.4rem; opacity: 0.8; }
.trans.active { border-left-color: var(--current-bar); color: var(--text); }
body:not(.show-translation) .trans { display: none; }

/* Polylas's modern Greek, one line per verse. */
.verse .mt {
  grid-column: 2;
  margin-top: 0.15rem;
  font-size: 0.8em;
  line-height: 1.45;
  color: color-mix(in srgb, var(--current-bar) 55%, var(--muted));
}
.verse.current .mt { color: color-mix(in srgb, var(--current-bar) 75%, var(--text)); }
body:not(.show-modern) .verse .mt { display: none; }

/* Murray's English for a single line (where split), under the verse. */
.verse .en {
  grid-column: 2;
  margin-top: 0.15rem;
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 0.74em;
  line-height: 1.45;
  color: var(--muted);
}
.verse.current .en { color: color-mix(in srgb, var(--text) 70%, var(--muted)); }
body:not(.show-translation) .verse .en { display: none; }
.verse {
  display: grid;
  grid-template-columns: 3rem 1fr;
  column-gap: 0.75rem;
  margin-bottom: 0.7rem;
  padding: 0.25rem 0.6rem 0.3rem 0;
  border-left: 3px solid transparent;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: background-color 120ms ease;
}
@media (hover: hover) { .verse:hover { background: color-mix(in srgb, var(--current-bg) 35%, transparent); } }
.verse { position: relative; }
.verse .seek-icon {
  position: absolute;
  left: 0.2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  color: var(--muted);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}
@media (hover: hover) { .verse:not(.untimed):hover .seek-icon { opacity: 0.85; } }
@media (hover: none) { .verse .seek-icon { display: none; } }
.verse .num {
  text-align: right;
  color: var(--muted);
  font-size: 0.7em;
  padding-top: 0.35em;
  font-variant-numeric: tabular-nums;
  user-select: none;
}
.verse .num.hidden { visibility: hidden; }
.verse.title { font-style: italic; color: var(--muted); margin-bottom: 1.4rem; }
.verse .para {
  grid-column: 2;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.8em;
  line-height: 1.45;
}
.verse.current .para { color: color-mix(in srgb, var(--text) 70%, var(--muted)); }
body.hide-paraphrase .verse .para { display: none; }
body.hide-paraphrase .verse { margin-bottom: 0.35rem; }
.w { border-radius: 3px; transition: background-color 80ms ease; }
.w.linked {
  background: color-mix(in srgb, var(--current-bar) 22%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--current-bar) 22%, transparent);
}
/* Only where there is real hover: on touch a tap would leave the tint stuck. */
@media (hover: hover) {
  .w[data-gloss]:hover {
    background: color-mix(in srgb, var(--current-bar) 22%, transparent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--current-bar) 22%, transparent);
  }
}

.w { cursor: pointer; }
.w.selected { background: color-mix(in srgb, var(--current-bar) 30%, transparent); border-radius: 3px;
              box-shadow: 0 0 0 2px color-mix(in srgb, var(--current-bar) 30%, transparent); }

#card {
  position: fixed;
  z-index: 3;  /* (under the bars, 4: scrolled with its word, it goes behind them) */
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  padding: 1rem 1.1rem 1.1rem;
  overflow-y: auto;
  font-size: calc(18.5px * var(--text-scale, 1) * var(--font-scale, 1));
  line-height: 1.45;
}
#card-close {
  position: absolute; top: 0.4rem; right: 0.5rem;
  border: 0; background: transparent; color: var(--muted);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 0.2rem 0.4rem;
}
@media (hover: hover) { #card-close:hover { color: var(--text); } }
#card h2 { margin: 0 1.5rem 0.2rem 0; font-weight: 400; font-size: 1.6em; }
#card .gloss-line { color: var(--muted); margin: 0 0 0.8rem; }
#card .token + .token { border-top: 1px solid var(--rule); margin-top: 0.8rem; padding-top: 0.8rem; }
#card .form { color: var(--muted); font-size: 0.85em; margin-bottom: 0.2rem; }
#card .lemma { font-size: 1.25em; }
#card .lemma a {
  font-family: system-ui, sans-serif; font-size: 12px; margin-left: 0.5rem;
  color: var(--current-bar); text-decoration: none; vertical-align: middle;
}
@media (hover: hover) { #card .lemma a:hover { text-decoration: underline; } }
#card .definition { margin-top: 0.15rem; font-family: system-ui, sans-serif; font-size: 14.5px; }
#card .morph { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.45rem 0; }
#card .morph span {
  font-family: system-ui, sans-serif; font-size: 12.5px;
  padding: 0.12rem 0.5rem; border-radius: 999px;
  background: color-mix(in srgb, var(--current-bg) 70%, transparent);
}
#card .role { font-size: 0.92em; }
#card .role code { font-size: 11px; color: var(--muted); margin-left: 0.3rem; }
/* The New Testament's words: Strong's number by the lemma, Robinson's code after the parsing. */
#card .lemma .strongs { font: 12px system-ui, sans-serif; color: var(--muted); margin-left: 0.5rem; }
#card .morph code { font-size: 11px; color: var(--muted); align-self: center; }
#card .note { font-size: 0.85em; color: var(--muted); font-style: italic; margin-top: 0.4rem; }
#card .label { font-family: system-ui, sans-serif; font-size: 11px; letter-spacing: 0.06em;
               text-transform: uppercase; color: var(--muted); margin-right: 0.35rem; }

/* Wide screens: card in the right-hand margin beside the text column (which stays put),
   centred vertically in the space above the player. */
@media (min-width: 76rem) {
  #card {
    top: calc(50vh - 3.75rem);
    transform: translateY(-50%);
    right: 1.25rem;
    width: clamp(14rem, calc((100vw - 44rem) / 2 - 2.5rem), 22rem);
    max-height: calc(100vh - 11rem);
  }
}
/* Narrower screens: card floating above the selected word's line (placed by placeCard). */
@media (max-width: 75.99rem) {
  /* Inside the verse it belongs to (placeCard), scrolling with it; under the bars (4). */
  #card { position: absolute; width: min(22rem, calc(100vw - 16px)); animation: card-in 140ms ease-out; }
  /* (Its verse drawn whatever its place, so the card isn't clipped, and above the verses
     after it.) */
  #verses > li.verse.with-card { content-visibility: visible; z-index: 3; }  /* (over body:not(.focused) #verses > li) */
}
@keyframes card-in { from { opacity: 0; transform: translateY(4px); } }

/* Scholia: the ancient notes on the current verse. */
#scholia {
  position: fixed;
  z-index: 3;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
  font-size: calc(18px * var(--text-scale, 1) * var(--font-scale, 1));
  line-height: 1.5;
}
#scholia[hidden] { display: none; }
.sch-head {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.55rem 0.6rem 0.45rem 1rem;
  border-bottom: 1px solid var(--rule);
}
.sch-title { font-size: 1.1em; }
#scholia-line { font-family: system-ui, sans-serif; font-size: 12.5px; color: var(--current-bar);
                font-variant-numeric: tabular-nums; }
#scholia-close {
  margin-left: auto;
  border: 0; background: transparent; color: var(--muted);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 0 0.3rem;
}
@media (hover: hover) { #scholia-close:hover { color: var(--text); } }
#scholia-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0.3rem 1.35rem 0.6rem 1rem; }
/* Scrolling panels: a thin scrollbar in the theme's colours, with its own gutter (classic
   scrollbars) and room in the padding for overlay ones, so it never covers the counts. */
#scholia-body, #card {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--muted) 55%, transparent) transparent;
  scrollbar-gutter: stable;
}
#scholia .note { color: var(--muted); font-style: italic; }
.sch-src { margin-top: 0.4rem; }
.sch-src summary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0;
  font-family: system-ui, sans-serif;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.sch-src summary::-webkit-details-marker { display: none; }
.sch-src summary::before { content: "▸"; font-size: 16px; line-height: 1; transition: transform 120ms ease; }
.sch-src[open] summary::before { transform: rotate(90deg); }
@media (hover: hover) { .sch-src summary:hover { color: var(--text); } }
.siglum {
  font-family: var(--greek);
  font-size: 16.5px;
  font-weight: 700;
  color: var(--current-bar);
  min-width: 1.1em;
}
.sch-src .count {
  margin-left: auto;
  font-size: 11.5px;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--current-bg) 70%, transparent);
}
.sch { margin: 0.2rem 0 0.65rem; }
.sch .lemma { font-weight: 700; }
.sch .range {
  float: right;
  margin-left: 0.4rem;
  font-family: system-ui, sans-serif;
  font-size: 11px;
  color: var(--muted);
}
.sch-credit {
  margin: 0;
  padding: 0.4rem 1rem 0.55rem;
  border-top: 1px solid var(--rule);
  font-family: system-ui, sans-serif;
  font-size: 11px;
  color: var(--muted);
}

/* Wide screens: in the left-hand margin, like the scholia around the text of a manuscript. */
@media (min-width: 90rem) {
  #scholia {
    top: 4.25rem;
    bottom: 8rem;
    left: 1.25rem;
    width: clamp(16rem, calc((100vw - 44rem) / 2 - 5rem), 26rem);
  }
}
/* Narrower (no room for a column): no toggle; a button on each verse with scholia opens
   them in a popup. */
.sch-btn { display: none; }
@media (max-width: 89.99rem) {
  .toggle:has(#show-scholia) { display: none; }
  .verse:has(.sch-btn) { padding-right: 2.1rem; }
  .sch-btn {
    position: absolute;
    right: 0.15rem;
    top: 0.3rem;
    display: grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    opacity: 0.55;
    cursor: pointer;
  }
  .verse.current .sch-btn { opacity: 1; color: var(--current-bar); }
  @media (hover: hover) { .sch-btn:hover { opacity: 1; color: var(--current-bar); } }
  /* The page behind the popup doesn't scroll, so only the popup has a scrollbar. */
  html:has(body.scholia-popup) { overflow: hidden; }
  body.scholia-popup::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 5;
    background: rgba(0, 0, 0, 0.4);
  }
  body.scholia-popup #scholia {
    z-index: 6;
    top: 50%;
    left: 50%;
    width: min(40rem, calc(100vw - 32px));
    /* A fixed height: it doesn't change size as one verse's notes give way to another's. */
    height: min(70vh, 36rem);
    height: min(70dvh, 36rem);
    transform: translate(-50%, -50%);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
  }
}

#gloss {
  position: absolute;
  z-index: 10;
  max-width: min(22rem, calc(100vw - 16px));
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.85em;
  line-height: 1.35;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
#gloss.none { opacity: 0.75; font-style: italic; }
.verse.current { background: var(--current-bg); border-left-color: var(--current-bar); }
.verse.current .num { color: var(--current-bar); visibility: visible; }
.verse.current.pausing { background: var(--pause-bg); }
.verse.current.held { background: var(--current-bg); box-shadow: inset 0 -2px 0 var(--current-bar); }
.verse.untimed { cursor: default; }

#player {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--player-bg);
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--rule);
  padding: 0.6rem 16px calc(0.6rem + env(safe-area-inset-bottom));
  /* Above the focused-mode animations, and on its own layer: iOS otherwise drops a
     blurred fixed bar while the lines beneath it animate. */
  z-index: 4;
  transform: translateZ(0);
}
#player audio { display: none; }
#player { container: player / inline-size; }  /* (its layout below, when it's narrow) */

/* Media bar: volume, previous / play-pause / next, line box and timeline. */
.playback { flex: none; display: inline-flex; align-items: center; gap: 0.45rem; }
.transport {
  max-width: 44rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: system-ui, sans-serif;
  font-size: 14px;
  color: var(--muted);
}
.tbtn {
  flex: none;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
}
@media (hover: hover) { .tbtn:hover { color: var(--text); border-color: var(--current-bar); } }
.tbtn.play { width: 2.7rem; height: 2.7rem; color: var(--bg); background: var(--current-bar); border-color: var(--current-bar); }
@media (hover: hover) { .tbtn.play:hover { color: var(--bg); filter: brightness(1.08); } }
.tbtn.bare { border-color: transparent; background: transparent; }
.play .icon-pause, body.playing .play .icon-play { display: none; }
body.playing .play .icon-pause { display: block; }

.timeline { flex: 1; min-width: 9rem; display: flex; align-items: center; gap: 0.45rem; }
.time { font-variant-numeric: tabular-nums; font-size: 12.5px; min-width: 2.6rem; text-align: center; }

/* Range inputs (seek and volume): thin track filled up to the thumb (--pct). */
#seek, #volume {
  --pct: 0%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--current-bar) var(--pct), var(--rule) var(--pct));
  cursor: pointer;
  margin: 0;
}
#seek { flex: 1; min-width: 0; }
/* The volume, upright in its pop-up: loud at the top, filled from the bottom. */
#volume {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 4px;
  height: 6rem;
  background: linear-gradient(to top, var(--current-bar) var(--pct), var(--rule) var(--pct));
}
#seek::-webkit-slider-thumb, #volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--current-bar); border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--current-bar);
}
#seek::-moz-range-thumb, #volume::-moz-range-thumb {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--current-bar); border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--current-bar);
}
#seek:focus-visible, #volume:focus-visible { outline: 2px solid var(--current-bar); outline-offset: 4px; }

/* The media bar's side: the volume and the playback speed. With a mouse the volume's slider
   pops up above the speaker while it's hovered (or focused); on a touch screen there's no
   slider, only mute: phones set the volume with their own buttons (an iPhone won't let a
   page set it at all). */
.side { flex: none; display: inline-flex; align-items: center; gap: 0.35rem; }
.volume { position: relative; flex: none; display: inline-flex; align-items: center; }
.vol-pop {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 2px);  /* (touching the button: the pointer can move up into it) */
  z-index: 5;
  display: flex;
  padding: 0.75rem 0.6rem;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
  transform: translateX(-50%);
  visibility: hidden;
  opacity: 0;
  transition: opacity 120ms ease, visibility 0s 120ms;
}
@media (hover: hover) {
  .volume:hover .vol-pop, .volume:focus-within .vol-pop { visibility: visible; opacity: 1; transition: opacity 120ms ease; }
}
@media (hover: none) { .vol-pop { display: none; } }
/* The speed: a pill showing it, with the menu itself laid over it unseen (a tap opens the
   phone's own picker; 16px, so an iPhone doesn't zoom in), the pill no wider than its label. */
.speed-pill {
  position: relative;
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 3.4rem;  /* (as wide as its widest, "1.75×": it keeps its shape as the speed changes) */
  height: 1.85rem;
  padding: 0;
  font: 13px system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 999px;
}
#speed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  font-size: 16px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
#speed option { background: var(--bg); color: var(--text); }
/* At the end of the chapter: a button cycling stop (⏹), continue (on to the next: ⇥) and
   repeat (🔂), as a music player's. */
.end-side { flex: none; display: inline-flex; align-items: center; gap: 0.25rem; }
#end-mode svg { display: none; }
#end-mode[data-mode="continue"] .em-continue, #end-mode[data-mode="repeat"] .em-repeat,
#end-mode[data-mode="stop"] .em-stop { display: block; }
.speed-pill:focus-within { outline: 2px solid var(--current-bar); outline-offset: 2px; }
@media (hover: hover) { .speed-pill:hover { color: var(--text); border-color: var(--current-bar); } }
@media (max-width: 340px) {  /* (the smallest phones: room for "1.75×" beside the speaker) */
  .side { gap: 0.15rem; }
  .side #mute { width: 1.6rem; }
  .speed-pill { width: 2.9rem; font-size: 12px; }
}
#mute .vol-x, body.muted #mute .vol-waves { display: none; }
body.muted #mute .vol-x { display: inline; }

/* The settings (focused, pause on hover, paraphrase, …): a row of pills, lit when on; on a
   narrow screen the row scrolls sideways rather than wrapping. */
.controls {
  max-width: 56rem;
  margin: 0.45rem auto 0;
  display: flex;
  flex-wrap: nowrap;
  justify-content: safe center;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 1px;  /* (room for a pill's focus ring) */
  font-family: system-ui, sans-serif;
  font-size: 13px;
  color: var(--muted);
}
.controls::-webkit-scrollbar { display: none; }

/* Narrow screens: volume, the play buttons (centred) and the line on one row, the timeline below. */
@media (max-width: 600px) {
  /* (minmax(0, …): the side columns give way, rather than push the bar past the screen.) */
  .transport { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); row-gap: 0.35rem; }
  .side { justify-self: start; min-width: 0; }
  .end-side { justify-self: end; min-width: 0; max-width: 100%; }
  .transport #position { width: auto; flex: 0 1 6.5rem; min-width: 2.6rem; }
  .timeline { grid-column: 1 / -1; min-width: 0; }
}
/* Too narrow even for that (a large interface size on a phone): the play buttons have the
   first row to themselves, volume and speed and the end of the chapter and the line below
   them, rather than running into one another. */
@container player (max-width: 18.5rem) {
  .transport {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "play play" "side end" "time time";
  }
  .playback { grid-area: play; justify-self: center; }
  .side { grid-area: side; }
  .end-side { grid-area: end; }
  .timeline { grid-area: time; }
}

#position {
  width: 6.5rem;
  padding: 0.2rem 0.3rem;
  text-align: center;
  font: inherit;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: text;
}
@media (hover: hover) { #position:hover { border-color: var(--rule); } }
#position:focus { outline: none; border-color: var(--current-bar); color: var(--text); background: var(--bg); }
#position.invalid { border-color: #c0392b; }
.toggle {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  height: 1.9rem;
  padding: 0 0.8rem;
  white-space: nowrap;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 100ms ease, border-color 100ms ease, color 100ms ease;
}
.toggle:has(input:checked) { color: var(--text); background: var(--current-bg); border-color: var(--current-bar); }
/* (The checkbox itself is kept, unseen: the keyboard and screen readers use it.) */
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.toggle:has(input:focus-visible) { outline: 2px solid var(--current-bar); outline-offset: 1px; }
@media (hover: hover) { .toggle:hover { border-color: var(--current-bar); } }
@media (hover: none) { .toggle:active { opacity: 0.55; } }

/* Focused mode: only the current verse (large, centred) and its neighbours, in exactly
   the space between the bars: the page never scrolls. The current verse is always shown
   whole; a long neighbour is cut off at the edge rather than pushing it out of view.
   (--topbar-h and --player-h are the bars' heights, kept up to date by app.js.) */
html:has(body.focused) { overflow: hidden; }
body.focused .credits { display: none; }
body.focused main {
  height: calc(100vh - var(--topbar-h, 3rem) - var(--player-h, 7rem));
  height: calc(100svh - var(--topbar-h, 3rem) - var(--player-h, 7rem));  /* phones: toolbars shown */
  display: flex;
  flex-direction: column;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
body.focused #verses {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr);
  overflow-y: clip;
  overflow-x: visible;  /* the step buttons sit in the left margin */
}
body.focused #verses > li:not(.f-cur):not(.f-prev):not(.f-next) { display: none; }
body.focused #verses > li.trans { display: none; }
body.focused .verse.f-prev { grid-row: 1; align-self: end; }
body.focused .verse.f-cur { grid-row: 2; }
body.focused .verse.f-next { grid-row: 3; align-self: start; }
body.focused .verse { transition: opacity 200ms ease; }
/* The neighbours are context only: no hover, highlight or clicks. */
body.focused .verse.f-prev,
body.focused .verse.f-next { opacity: 0.4; pointer-events: none; }
body.focused .verse.f-cur { font-size: 1.3em; margin: 1.4rem 0; padding-top: 0.5rem; padding-bottom: 0.6rem; }
body.focused .verse.f-cur .num { visibility: visible; }
/* Phones: sit the verse lower, leaving room for a word's card above it. */
@media (max-width: 600px) {
  body.focused #verses { grid-template-rows: minmax(0, 3fr) auto minmax(0, 2fr); }
}

/* Focused mode: previous / play-pause / next, stacked at the left of the reading area.
   They stay put while the verses change beside them. */
#focus-controls { display: none; }
body.focused main { position: relative; }
body.focused #focus-controls {
  position: absolute;
  left: calc(16px - 3rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 16px;
}
#focus-controls button {
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}
@media (hover: hover) { #focus-controls button:hover { color: var(--text); border-color: var(--current-bar); } }
#fc-play { color: var(--current-bar); }
#fc-play .icon-pause, body.playing #fc-play .icon-play { display: none; }
body.playing #fc-play .icon-pause { display: block; }
body.focused .verse.f-cur .seek-icon { display: none; }
/* Too narrow for the left margin: the controls take a gutter of their own, and the
   verses (and their highlight) start to the right of it. */
@media (max-width: 52rem) {
  body.focused #focus-controls { left: 8px; }
  body.focused #verses { padding-left: 2.1rem; }
}
/* Phones: no buttons (the media bar and swipes step verses), so no gutter either. */
@media (max-width: 600px) {
  body.focused #focus-controls { display: none; }
  body.focused #verses { padding-left: 0; }
}

@media (max-width: 520px) {
  body { font-size: 21px; }
  .topbar-inner { gap: 0.4rem; }
  .to-start-text { display: none; }  /* icon only */
  #to-start { padding: 0; width: 1.85rem; height: 1.85rem; justify-content: center; flex-shrink: 0; }
  #home { flex-shrink: 0; }
  /* iPhones zoom in on any text box under 16px when it's tapped. */
  input, select, textarea { font-size: 16px !important; }
  .trans { margin-left: calc(2.2rem + 3px + 0.5rem); }
  .verse { grid-template-columns: 2.2rem 1fr; column-gap: 0.5rem; }
  @media (hover: hover) { .verse:not(.untimed):hover .num { visibility: hidden; } }  /* narrow column: the icon takes its place */
}

/* Back to the library. */
#home {
  display: grid;
  place-items: center;
  color: var(--muted);
  border-radius: 6px;
  padding: 0.15rem;
}
@media (hover: hover) { #home:hover { color: var(--text); } }

/* Only the controls a text has data for: a library text without a recording keeps the
   position box (for jumping to a line or section). */
body.no-audio .playback, body.no-audio .timeline, body.no-audio .side,
body.no-audio .toggle:has(#focused), body.no-audio .toggle:has(#hold-on-hover), body.no-audio .toggle:has(#follow), body.no-audio #end-mode,
body.no-paraphrase .toggle:has(#show-paraphrase), body.no-modern .toggle:has(#show-modern),
body.no-translation .toggle:has(#show-translation), body.no-scholia .toggle:has(#show-scholia) { display: none; }
body.no-audio.no-paraphrase.no-modern.no-translation.no-scholia .controls { display: none; }
body.features-unknown .controls { visibility: hidden; }  /* (a text not opened before: until its book comes) */
body.no-audio .transport { display: flex; justify-content: center; }
body.no-audio #position { width: 8rem; margin-left: 0; border-color: var(--rule); }
body.no-audio .verse { cursor: auto; }
@media (hover: hover) { body.no-audio .verse:hover { background: none; } }

/* Prose: a paragraph per speech, the section (Stephanus) that opens it in the margin and
   later ones marked in the text. */
#verses.prose .verse { margin-bottom: 0.9rem; line-height: 1.6; }
#verses.prose .num { visibility: visible; padding-top: 0.45em; }
/* (Its margin goes to the sentence on that line: app.js, proseMarginClick.) */
#verses.prose .prose-para:has(.sent) { cursor: pointer; }
#verses.prose .prose-para:has(.sent) .text { cursor: auto; }
/* Prose with a recording: the sentence being read lights up (a sentence carried into the
   next section lights up there in turn); a sentence is tapped to go to it. The paragraph
   itself isn't a target, and there is no focused mode. */
#verses.prose .sent {
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 120ms ease;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
#verses.prose .sent.current { background: var(--current-bg); box-shadow: 0 0 0 2px var(--current-bg); }
#verses.prose .sent.current.pausing { background: var(--pause-bg); box-shadow: 0 0 0 2px var(--pause-bg); }
#verses.prose .sent.held { box-shadow: 0 0 0 2px var(--current-bg), inset 0 -2px 0 var(--current-bar); }
@media (hover: hover) {
  #verses.prose .verse:hover { background: none; }
  #verses.prose .sent:hover { background: color-mix(in srgb, var(--current-bg) 45%, transparent); }
}
body.prose-text .toggle:has(#focused) { display: none; }
.speaker { color: var(--muted); font-size: 0.78em; letter-spacing: 0.05em; margin-right: 0.15em; }
/* A part named rather than numbered (the prayers): its name over it, in line with the
   text, and in the English interface its English name after it. A row as a verse's is,
   which a tap picks (to bookmark the part), lit as the verse playing is. */
.part-head {
  list-style: none;
  position: relative;
  display: grid;
  grid-template-columns: 3rem 1fr;
  column-gap: 0.75rem;
  margin: 1.2rem 0 0.4rem;
  padding: 0.3rem 0.6rem 0.3rem 0;
  border-left: 3px solid transparent;
  border-radius: 0 4px 4px 0;
  color: var(--muted);
  font-size: 0.85em;
  letter-spacing: 0.04em;
  line-height: 1.4;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 120ms ease;
}
.part-head:first-child { margin-top: 0; }
.part-head .part-label { grid-column: 2; }
.part-head .part-en { opacity: 0.8; }
.part-head .part-en::before { content: "·"; margin: 0 0.55em; }  /* (as much room either side) */
@media (hover: hover) { .part-head:hover { background: color-mix(in srgb, var(--current-bg) 45%, transparent); } }
.part-head.picked { background: var(--current-bg); border-left-color: var(--current-bar); color: var(--text); }
@media (max-width: 520px) { .part-head { grid-template-columns: 2.2rem 1fr; column-gap: 0.5rem; } }  /* (as a verse's) */
/* No position box (a part is found by its heading); without it and anything else to show, no bar. */
body.named-parts.no-audio #position { display: none; }
body.named-parts.no-audio.no-paraphrase.no-modern.no-translation.no-scholia #player { display: none; }
.ref-mark {
  font: 11px system-ui, sans-serif;
  color: var(--muted);
  vertical-align: 0.35em;
  padding: 0 0.1em;
  user-select: none;
}

/* Where the position box jumped to. */
@keyframes located { from { background-color: var(--current-bg); } to { background-color: transparent; } }
.located { animation: located 1.8s ease-out; border-radius: 4px; }

/* The library (index.html). */
/* The library is all navigation: it follows the reader's Interface size, not Text. */
/* (Below the status bar in the installed app: the body, which isn't zoomed.) */
body.library { padding-top: env(safe-area-inset-top); }
.library main { padding-bottom: calc(4rem + env(safe-area-inset-bottom)); font-size: 1em; }
.library main, .library-tools { zoom: var(--ui-scale, 1); }
.library-tools {
  position: absolute;
  top: calc(0.9rem + env(safe-area-inset-top));
  right: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.library h1[title], .library .sub[title] { cursor: help; }
.library h1 { font-weight: 400; font-size: 1.6em; margin: 0.6rem auto 0.2rem; text-align: center; width: fit-content; }  /* (only as wide as the name: what a tap on it takes) */
.library .sub { text-align: center; color: var(--muted); font: 13px system-ui, sans-serif; margin: 0 auto 1.5rem; width: fit-content; }
.library h1:has(+ .sub[hidden]) { margin-bottom: 1.7rem; }  /* (a Greek interface: no English under it) */
.category { margin: 2rem 0 0; }
.category > h2 {
  font: 600 12px system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.35rem;
  margin: 0 0 0.6rem;
}
.category .empty { color: var(--muted); font: italic 14px system-ui, sans-serif; margin: 0.4rem 0; }
.work { padding: 0.55rem 0; border-bottom: 1px solid color-mix(in srgb, var(--rule) 60%, transparent); }
.work:last-child { border-bottom: none; }
/* A work's title row: a link to it (one book), or a button folding out its list (several),
   with a chevron at the end that turns when open. */
.work-head {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
  color: var(--text);
  text-decoration: none;
}
.work-title { font-size: 1.15em; }
.work-author { color: var(--muted); font-size: 0.8em; }
.hidden-text .work-title, .hidden-text .member-row { color: var(--muted); }
.fold-row {
  width: 100%;
  padding: 0;
  font: inherit;
  text-align: left;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.fold-mark { flex: none; margin-left: auto; align-self: center; color: var(--muted); transition: transform 150ms ease; }
.fold-row[aria-expanded="true"] .fold-mark { transform: rotate(180deg); color: var(--current-bar); }
@media (hover: hover) {
  a.work-head:hover .work-title, .work-head.fold-row:hover .work-title { color: var(--current-bar); }
  .fold-row:hover .fold-mark { color: var(--text); }
}
.library .book-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.3rem;
  margin: 0.5rem 0 0.2rem;
  padding: 0;
  list-style: none;
  font-size: 0.8em;
}
.library .book-list[hidden], .library .member-list[hidden] { display: none; }
/* Books named by a shared word and a letter (Ῥαψῳδία Α): the word once, above them. */
.library .book-list.short { grid-template-columns: repeat(auto-fill, minmax(6.4rem, 1fr)); }
.library .book-list .book-list-name {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.95em;
  margin-bottom: 0.1rem;
}
.library .book-list a {
  display: block;
  padding: 0.2rem 0.55rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid var(--rule);
  border-radius: 6px;
}
@media (hover: hover) { .library .book-list a:hover { border-color: var(--current-bar); } }
.library .book-list a[aria-current="true"] { color: var(--current-bar); border-color: var(--current-bar); }
/* A collection's books, each with a toggle for its chapters. */
.library .member-list {
  margin: 0.4rem 0 0.2rem;
  padding: 0;
  list-style: none;
  font-size: 0.85em;
  border: 1px solid var(--rule);
  border-radius: 10px;
}
.library .member + .member { border-top: 1px solid color-mix(in srgb, var(--rule) 60%, transparent); }
/* A book in a collection: a link (one chapter) or a row folding out its chapters. */
.member-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  color: var(--text);
  text-decoration: none;
}
.member-row[aria-current="true"] { color: var(--current-bar); font-weight: 600; }
@media (hover: hover) { .member-row:hover { color: var(--current-bar); } }
/* The day's readings: each passage, with what it is read as at the end. */
.reading-kind { margin-left: auto; color: var(--muted); font-size: 0.8em; white-space: nowrap; }
.reading-note { padding: 0.35rem 0.9rem; color: var(--muted); }
.library .chapters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(2.3rem, 1fr));
  gap: 0.3rem;
  margin: 0.1rem 0.8rem 0.5rem;
  padding: 0;
  list-style: none;
}
.library .chapters[hidden] { display: none; }
.library .chapters a {
  display: block;
  padding: 0.15rem 0;
  text-align: center;
  color: var(--muted);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--rule);
  border-radius: 6px;
}
@media (hover: hover) { .library .chapters a:hover { color: var(--text); border-color: var(--current-bar); } }
.library .chapters a[aria-current="true"] { color: var(--current-bar); border-color: var(--current-bar); }

/* A text's download button, at the end of its row: an arrow with the size, a ring filling
   with the progress, a dashed ring while queued, a ring with an arrow when paused, a tick. */
.work-line, .member-line { display: flex; align-items: center; gap: 0.5rem; }
.work-line > :first-child, .member-line > :first-child { flex: 1; min-width: 0; }
.member-line > .download { margin-right: 0.6rem; }
/* A book's own download, beside its link in the grid: just the icon. */
.library .book-list li { display: flex; align-items: center; gap: 0.25rem; }
.library .book-list li > a { flex: 1; min-width: 0; }
.download {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 5.4rem;  /* (all one width, so the chevrons before them line up) */
  min-height: 1.75rem;
  padding: 0.1rem 0.55rem;
  font: 12px system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
}
.download svg { flex: none; }
.download[data-state="running"], .download[data-state="queued"] { color: var(--text); }
.download[data-state="done"] { color: var(--current-bar); border-color: transparent; }
@media (hover: hover) { .download:hover { color: var(--text); border-color: var(--current-bar); } }
.download.compact { min-width: 2.1rem; width: 2.1rem; height: 2rem; padding: 0; border-radius: 50%; }
/* The book's own, in the reader's top bar: round, as the bookmark beside it. */
#download-slot { flex: none; display: flex; }
/* A narrow top bar (a large interface size on a phone): room for the title and book made
   by leaving out, first, the way back to the beginning, then the download (which the
   library has too). */
#topbar { container: topbar / inline-size; }
@container topbar (max-width: 21rem) { #to-start { display: none; } }
@container topbar (max-width: 17.5rem) { #download-slot { display: none; } }
#download-slot[hidden] { display: none; }
#download-slot .download { width: 1.85rem; min-width: 0; height: 1.85rem; min-height: 0; }
#download-slot .download[data-state="done"] { border-color: var(--rule); }

/* A download button's menu (pause, resume, remove), by the button. */
.dl-menu {
  position: fixed;
  z-index: 20;
  display: grid;
  min-width: 12rem;
  max-width: calc(100vw - 16px);
  padding: 0.3rem;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  font: 14px system-ui, sans-serif;
}
.dl-menu-title { padding: 0.35rem 0.6rem 0.25rem; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-menu-item {
  padding: 0.55rem 0.6rem;
  text-align: left;
  font: inherit;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.dl-menu-item.danger { color: #c0392b; }
@media (hover: hover) { .dl-menu-item:hover { background: var(--current-bg); } }
.dl-menu-item:focus-visible { outline: 2px solid var(--current-bar); outline-offset: -2px; }

/* What's downloaded, under the library's heading: a button opening the downloads panel. */
#downloads { text-align: center; color: var(--muted); font: 12px system-ui, sans-serif; margin: -1rem 0 1.5rem; }
#downloads[hidden] { display: none; }
#downloads .dl-open {
  font: inherit;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
}
@media (hover: hover) { #downloads .dl-open:hover { border-color: var(--current-bar); } }
#downloads .dl-note { margin-top: 0.5rem; }
/* The texts of the whole library on this device (home.js): offered, then their progress
   (once kept, they're in the downloads panel). */
#local-library { text-align: center; color: var(--muted); font: 12px system-ui, sans-serif; margin: -0.8rem 0 1.5rem; }
#local-library[hidden] { display: none; }
#local-library .ll-keep {
  font: inherit;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
}
#local-library .ll-remove { font: inherit; color: var(--muted); background: none; border: 0; padding: 0.2rem; text-decoration: underline; cursor: pointer; }
@media (hover: hover) { #local-library .ll-keep:hover { border-color: var(--current-bar); color: var(--text); } }
/* The downloads panel: everything saved or on its way, each with its own control, and all
   of them removed at once. */
#dl-panel {
  width: min(28rem, calc(100vw - 32px));
  max-height: min(80vh, 40rem);
  padding: 0;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  font: 14px system-ui, sans-serif;
}
#dl-panel::backdrop { background: rgba(0, 0, 0, 0.35); }
#dl-panel[open] { display: flex; flex-direction: column; }
.dl-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.8rem 0.9rem 0.6rem; border-bottom: 1px solid var(--rule); }
.dl-head h2 { margin: 0; font: 600 15px system-ui, sans-serif; flex: 1; }
.dl-head .dl-total { color: var(--muted); font-size: 12px; }
.dl-close { width: 2rem; height: 2rem; padding: 0; font: 20px system-ui, sans-serif; color: var(--muted); background: transparent; border: 0; border-radius: 50%; cursor: pointer; }
.dl-list { list-style: none; margin: 0; padding: 0.3rem 0; overflow-y: auto; }
.dl-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.9rem; }
.dl-row + .dl-row { border-top: 1px solid color-mix(in srgb, var(--rule) 60%, transparent); }
.dl-name { flex: 1; min-width: 0; font-family: var(--greek); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-state { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dl-row .icon-btn {
  flex: none; width: 2rem; height: 2rem; display: grid; place-items: center; padding: 0;
  color: var(--muted); background: transparent; border: 1px solid var(--rule); border-radius: 50%; cursor: pointer;
}
.dl-row .icon-btn.remove { color: #c0392b; }
@media (hover: hover) { .dl-row .icon-btn:hover { border-color: var(--current-bar); color: var(--text); } }
.dl-foot { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 0.7rem 0.9rem; border-top: 1px solid var(--rule); }
.dl-foot button {
  font: inherit; padding: 0.45rem 0.9rem; color: var(--text); background: transparent;
  border: 1px solid var(--rule); border-radius: 999px; cursor: pointer;
}
.dl-foot .remove-queued { color: #c0392b; }
.dl-foot { flex-wrap: wrap; }
.dl-foot .remove-all { color: #c0392b; border-color: color-mix(in srgb, #c0392b 50%, var(--rule)); }
.dl-foot .remove-all.armed { color: #fff; background: #c0392b; border-color: #c0392b; }
/* The texts, then the recordings, each under its own small heading. */
.dl-section { padding: 0.55rem 0.9rem 0.15rem; color: var(--muted); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.dl-section + .dl-row { border-top: 0; }
.dl-name-box { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dl-sub { color: var(--muted); font-size: 12px; }
.dl-row.armed { flex-wrap: wrap; }  /* (the confirmation on a line of its own, where there's no room) */
.dl-row.armed .dl-name-box { flex-basis: 12rem; }
.dl-row.armed .icon-btn.remove { margin-left: auto; }
.dl-foot:empty { display: none; }
.dl-row .icon-btn.remove.armed { width: auto; padding: 0 0.7rem; border-radius: 999px; color: #fff; background: #c0392b; border-color: #c0392b; font: 12px system-ui, sans-serif; white-space: nowrap; }
.dl-empty { padding: 1.2rem 0.9rem; color: var(--muted); text-align: center; }

/* Bookmarks, at the top of the library. */
#bookmarks[hidden] { display: none; }
.marks { list-style: none; margin: 0; padding: 0; }
.marks li { display: flex; align-items: center; gap: 0.4rem; border-bottom: 1px solid color-mix(in srgb, var(--rule) 60%, transparent); }
.marks li:last-child { border-bottom: none; }
.mark { flex: 1; min-width: 0; display: grid; padding: 0.45rem 0; color: var(--text); text-decoration: none; }
.mark-label { font-size: 0.95em; }
.mark-snippet { color: var(--muted); font-size: 0.78em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (hover: hover) { .mark:hover .mark-label { color: var(--current-bar); } }
.mark-delete {
  flex: none;
  width: 2rem;
  height: 2rem;
  padding: 0;
  font: 20px system-ui, sans-serif;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
@media (hover: hover) { .mark-delete:hover { color: var(--text); background: var(--current-bg); } }
.mark-delete:disabled { opacity: 0.4; }
.library .notice { color: var(--muted); font: 14px system-ui, sans-serif; text-align: center; margin-top: 2rem; }
.library .notice code { font-size: 13px; }
/* Verse without a paraphrase under each line: set closer. */
body.no-paraphrase #verses:not(.prose) .verse { margin-bottom: 0.15rem; padding-top: 0.1rem; padding-bottom: 0.1rem; }
/* Without a recording, the line or paragraph the σχόλια panel is showing. */
body.show-scholia .verse.noted, body.scholia-popup .verse.noted { border-left-color: color-mix(in srgb, var(--current-bar) 60%, transparent); background: color-mix(in srgb, var(--current-bg) 40%, transparent); }

/* A bookmarked verse: a ribbon at the left of its row. */
.verse.bookmarked::before, .part-head.bookmarked::before {
  content: "";
  position: absolute;
  left: 0.45rem;
  top: 0;
  width: 0.5rem;
  height: 0.85rem;
  background: var(--current-bar);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%);
  opacity: 0.8;
}
@media (hover: hover) { .verse.bookmarked:not(.untimed):hover::before { opacity: 0; } }
body.focused .verse.bookmarked:not(.f-cur)::before { display: none; }

/* A passing message (bookmark added or removed), above the media bar. */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--player-h, 7rem) + 0.8rem);
  z-index: 8;
  max-width: calc(100vw - 32px);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font: 14px system-ui, sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transform: translateX(-50%);
  animation: toast-in 180ms ease-out;
  transition: opacity 250ms ease;
}
#toast[hidden] { display: none; }
#toast.out { opacity: 0; }
/* A longer one (the library's name, what it means): a few lines, centred. */
#toast.long { width: max-content; max-width: min(24rem, calc(100vw - 32px)); white-space: normal; text-align: center; line-height: 1.45; border-radius: 14px; padding: 0.6rem 1rem; }
/* (The library has no media bar to sit above.) */
.library #toast { bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 6px); } }

/* Showing a range of the book (?v=40-60): which, and the way back to all of it. */
.range-note { text-align: center; margin: 0 0 1rem; font: 13px system-ui, sans-serif; color: var(--muted); }
.range-note a { color: var(--current-bar); text-decoration: none; }
body.focused .range-note, body.focused .plan-note-top { display: none; }
body.focused:not(.at-last) .chapter-nav, body.focused:not(.at-last) .plan-end { display: none; }

/* While a book loads: grey lines in place of the verses, shown only if it takes a moment. */
#verses.loading { animation: skel-in 250ms ease 180ms both; }
@keyframes skel-in { from { opacity: 0; } }
.skel { display: grid; grid-template-columns: 3rem 1fr; column-gap: 0.75rem; row-gap: 0.45rem; padding: 0.35rem 0; margin-bottom: 0.7rem; }
.skel .sk-line { grid-column: 2; height: 0.8em; width: var(--w, 80%); border-radius: 4px; }
.skel .sk-sub { height: 0.6em; width: calc(var(--w, 80%) - 12%); opacity: 0.6; }
.skel .sk-line, .sch-skel span, .card-skel span, .lib-skel span {
  background: linear-gradient(90deg, var(--rule) 25%, color-mix(in srgb, var(--rule) 45%, var(--bg)) 50%, var(--rule) 75%);
  background-size: 300% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
body.hide-paraphrase .skel .sk-sub { display: none; }
@media (max-width: 520px) { .skel { grid-template-columns: 2.2rem 1fr; column-gap: 0.5rem; } }

/* Notes not loaded yet: a few grey lines in the σχόλια panel. */
.sch-skel { display: grid; gap: 0.55rem; padding: 0.7rem 0; }
.sch-skel span { display: block; height: 0.75em; border-radius: 4px; }
.sch-skel span:nth-child(1) { width: 40%; }
.sch-skel span:nth-child(2) { width: 92%; }
.sch-skel span:nth-child(3) { width: 85%; }
.sch-skel span:nth-child(4) { width: 60%; }

/* A word's card before its data comes: the word, then grey lines. */
.card-skel { display: grid; gap: 0.6rem; padding: 0.5rem 0 0.3rem; min-width: 14rem; }
.card-skel span { display: block; height: 0.75em; border-radius: 4px; }
.card-skel span:nth-child(1) { width: 55%; height: 1em; }
.card-skel span:nth-child(2) { width: 90%; }
.card-skel span:nth-child(3) { width: 70%; }
.card-skel span:nth-child(4) { width: 82%; }
.card-skel span:nth-child(5) { width: 45%; }

/* The library before its list comes: grey rows. */
.lib-skel { margin: 2rem 0 0; display: grid; gap: 0.9rem; animation: skel-in 250ms ease 180ms both; }
.lib-skel span { display: block; height: 0.9em; border-radius: 4px; width: var(--w, 60%); }
.lib-skel span.h { height: 0.6em; width: 5rem; margin-top: 0.6rem; }

/* Moving between pages: the old page fades into the new; in the reader the bars stay
   where they are (browsers with cross-document view transitions; others just load). */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  #topbar { view-transition-name: topbar; }
  #player { view-transition-name: player; }
  ::view-transition-group(*) { animation-duration: 200ms; }
}

/* Reading plans, at the top of the library: each with its progress (the days read, and a
   mark where the days gone reach), the next day's reading, and every day folded out. */
#plans[hidden] { display: none; }
.plans-head { display: flex; align-items: flex-end; gap: 0.5rem; border-bottom: 1px solid var(--rule); margin: 0 0 0.6rem; }
.plans-head h2 {
  flex: 1;
  font: 600 12px system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 0.35rem;
  margin: 0;
}
.plan-new {
  margin-bottom: 0.3rem;
  padding: 0.2rem 0.65rem;
  font: 12px system-ui, sans-serif;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
}
@media (hover: hover) { .plan-new:hover { color: var(--text); border-color: var(--current-bar); } }
.plan { display: grid; gap: 0.35rem; }
.plan-top { display: flex; align-items: baseline; gap: 0.6rem; }
.plan-length { flex: 1; color: var(--muted); font: 12px system-ui, sans-serif; }
.plan-bar {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--current-bar) var(--done), color-mix(in srgb, var(--rule) 80%, transparent) var(--done));
}
.plan-bar::after {  /* where the plan should have got to by today */
  content: "";
  position: absolute;
  left: clamp(0px, calc(var(--due) - 1px), calc(100% - 2px));
  top: -3px;
  width: 2px;
  height: 12px;
  border-radius: 1px;
  background: var(--muted);
  opacity: 0.6;
}
.plan-status { display: flex; justify-content: space-between; gap: 0.5rem; color: var(--muted); font: 12px system-ui, sans-serif; }
.plan-count { font-variant-numeric: tabular-nums; }
.plan-next {
  display: flex;
  align-items: baseline;  /* (the Greek's tall line box sets it low when centred) */
  gap: 0.75rem;
  margin-top: 0.15rem;
  padding: 0.55rem 0.8rem;
  color: var(--text);
  text-decoration: none;
  background: var(--pause-bg);
  border: 1px solid var(--rule);
  border-radius: 10px;
}
.plan-day { flex: none; color: var(--muted); font: 13px/1.3 system-ui, sans-serif; }
.plan-reading {  /* (a long day, many short books in it: two lines, then …) */
  flex: 1; min-width: 0; font-size: 0.85em; line-height: 1.3;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.plan-go { flex: none; color: var(--current-bar); font: 600 13px/1.3 system-ui, sans-serif; }
@media (hover: hover) { .plan-next:hover { border-color: var(--current-bar); } }
.plan-fold { display: flex; align-items: center; gap: 0.4rem; color: var(--muted); font: 12px system-ui, sans-serif; padding: 0.2rem 0; }
.plan-days {
  position: relative;
  max-height: 18rem;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid color-mix(in srgb, var(--rule) 60%, transparent);
}
.plan-days[hidden] { display: none; }
.plan-row { display: flex; align-items: center; gap: 0.55rem; padding: 0.25rem 0; }
.plan-row + .plan-row { border-top: 1px solid color-mix(in srgb, var(--rule) 45%, transparent); }
.plan-row.today .plan-row-day { color: var(--current-bar); font-weight: 600; }
.plan-tick {
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  padding: 0;
  color: transparent;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 50%;
  cursor: pointer;
}
.plan-tick[aria-pressed="true"] { color: var(--bg); background: var(--current-bar); border-color: var(--current-bar); }
@media (hover: hover) { .plan-tick:hover { border-color: var(--current-bar); } }
.plan-row-link { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 0.6rem; color: var(--text); text-decoration: none; }
.plan-row-day { flex: none; min-width: 4.6rem; color: var(--muted); font: 12px system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.plan-row-label { min-width: 0; font-size: 0.92em; }
@media (hover: hover) { .plan-row-link:hover .plan-row-label { color: var(--current-bar); } }
.plan-delete {
  flex: none;
  align-self: center;
  min-width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  padding: 0 0.5rem;
  font: 12px system-ui, sans-serif;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
}
@media (hover: hover) { .plan-delete:hover { color: #c0392b; border-color: var(--rule); } }
.plan-delete.armed { color: #fff; background: #c0392b; border-color: #c0392b; }

/* The new plan dialog (as the downloads panel). */
#plan-dialog {
  width: min(28rem, calc(100vw - 32px));
  max-height: min(85vh, 40rem);
  padding: 0;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  font: 14px system-ui, sans-serif;
}
#plan-dialog::backdrop { background: rgba(0, 0, 0, 0.35); }
.plan-form { display: grid; gap: 0.5rem; padding: 0.9rem 0 0; }
.plan-field { display: grid; grid-template-columns: 4.3rem 1fr; align-items: center; gap: 0.5rem; padding: 0 0.9rem; }
.plan-label { color: var(--muted); }
.plan-inputs { display: flex; gap: 0.4rem; min-width: 0; }
.plan-form select, .plan-form input {
  min-width: 0;
  padding: 0.4rem 0.5rem;
  font: 15px system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
}
.plan-form .plan-pick { flex: 1; font-family: var(--greek); font-size: 16px; }
.plan-field[hidden] { display: none; }
.plan-to { align-self: center; color: var(--muted); }
.plan-form input[name="count"] { width: 5rem; }
.plan-form select:focus, .plan-form input:focus { outline: none; border-color: var(--current-bar); }
.plan-preview { padding: 0 0.9rem; min-height: 8.5rem; transition: opacity 120ms ease; }
.plan-preview.stale { opacity: 0.5; }
.plan-note { margin: 0.2rem 0 0.4rem; color: var(--muted); font-size: 13px; }
.plan-sample { margin: 0; padding: 0; list-style: none; }
.plan-sample li { display: flex; align-items: baseline; gap: 0.6rem; padding: 0.15rem 0; font-family: var(--greek); font-size: 15px; }
.plan-sample .plan-gap { color: var(--muted); padding-left: 0.5rem; }
.plan-create {
  font: inherit; padding: 0.45rem 1rem; color: var(--bg) !important; background: var(--current-bar) !important;
  border-color: var(--current-bar) !important;
}
.plan-create:disabled { opacity: 0.5; cursor: default; }

/* In the reader, a reading plan's day: what it is, above the verses; at their end, its next
   part, or marking it read and the next day. */
.plan-note-top { margin: 0 0 0.4rem; color: var(--muted); font: 12px system-ui, sans-serif; text-align: center; }
.plan-note-top a { color: inherit; }
.plan-end { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.6rem; margin: 2rem 0 1rem; font: 14px system-ui, sans-serif; }
.plan-end .plan-msg { color: var(--muted); }
.plan-end a, .plan-end button {
  font: inherit;
  padding: 0.5rem 1rem;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
}
.plan-end .primary { color: var(--bg); background: var(--current-bar); border-color: var(--current-bar); }
.plan-end .done-mark { color: var(--current-bar); border-color: transparent; cursor: default; }

/* At the foot of a chapter or book: the one before and the one after. */
.chapter-nav { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; margin: 2rem 0 1rem; font: 14px system-ui, sans-serif; }
.chapter-nav a {
  min-width: 0;
  padding: 0.5rem 1rem;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chapter-nav .next { margin-left: auto; }
@media (hover: hover) { .chapter-nav a:hover, .plan-end a:hover { border-color: var(--current-bar); } }
/* A bookmark made in a reading plan's day not yet read: it opens the plan there. */
.mark-plan { display: block; color: var(--current-bar); font: 11px system-ui, sans-serif; letter-spacing: 0.02em; margin-top: 0.1rem; }
.plan-note-top .plan-readings { font-family: var(--greek); font-size: 1.15em; margin-left: 0.35em; }
.plan-note-top a .plan-readings { margin-left: 0.15em; }
.range-note .greek-name { font-family: var(--greek); font-size: 1.12em; }
/* No plans yet: just a button to make one, at the right. */
#plans.no-plans { text-align: right; margin: -1rem 0 -0.9rem; }  /* (closer to the heading, and the list) */
.plan-start {  /* (where "+ New plan" is, once there are plans) */
  margin-bottom: 0.3rem;
  padding: 0.2rem 0.65rem;
  font: 12px system-ui, sans-serif;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
}
@media (hover: hover) { .plan-start:hover { color: var(--text); border-color: var(--current-bar); } }

/* While a dialog is open (the downloads panel, a new reading plan), the page behind it
   stays still; the dialog's own list scrolls without carrying the page on. */
html:has(dialog[open]), html:has(dialog[open]) body { overflow: hidden; }
dialog, .dl-list, .plan-days { overscroll-behavior: contain; }

/* The app's scrollbar (native.js): where the page scrolls, between the bars. */
.app-scrollbar { position: fixed; right: 2px; width: 4px; z-index: 25; pointer-events: none;
                 opacity: 0; transition: opacity 300ms ease 200ms; }
.app-scrollbar.shown { opacity: 1; transition-delay: 0s; transition-duration: 100ms; }
.app-scrollbar[hidden] { display: none; }
.app-scrollbar > div { position: relative; width: 100%; border-radius: 2px; background: var(--muted); opacity: 0.7;
                       touch-action: none; transition: width 120ms ease, margin 120ms ease; }
/* (While it shows, the thumb can be held: a wider place to take it by than it looks.) */
.app-scrollbar.shown > div { pointer-events: auto; }
.app-scrollbar > div::before { content: ""; position: absolute; inset: -12px -2px -12px -28px; }
.app-scrollbar.dragging > div { width: 8px; margin-left: -4px; opacity: 1; background: var(--current-bar); }
/* (The app: no stretch or bounce at the ends of the page.) */
html.app-no-overscroll { overscroll-behavior: none; }
