:root {
  --my-bg: rgb(50 50 51);
  --my-bg-page: rgb(74 74 77);

  --my-accent1: lightseagreen;
  --my-accent2: steelblue;

  /* Text */
  --my-text1: rgb(215 215 216);
  --my-text2: #999;

  /* Rules / dividers */
  --my-rule-color: rgba(255, 255, 255, 0.15);

  /* UI elements */
  --my-toolbar-bg: rgb(50 50 51);
  --my-button-bg: rgb(74 74 77);
  --my-button-bg-hover: rgb(90 90 92);

  /* Bible verse surface */
  --my-verse-bg: rgba(0, 0, 0, 0.1);

  /* Shadows */
  --my-page-shadow: rgba(0, 0, 0, 0.15);
  --my-toolbar-shadow: rgba(0, 0, 0, 0.35);

  /* Fonts */
  --my-font-default: system-ui, -apple-system, serif;
  --my-font-courier: "Courier New", Courier, monospace;
}

/* -------------------------
   COURIER FONT SWITCH
------------------------- */

html[data-font="courier"] p,
html[data-font="courier"] li,
html[data-font="courier"] aside p {
  font-family: var(--my-font-courier);
}

/* -------------------------
   GLOBAL BASE
------------------------- */

html {
  background-color: var(--my-bg);
  color: var(--my-text1);
}

body {
  font-family: var(--my-font-default);
  font-size: 1.1em;
  margin: 0;
}

/* -------------------------
   TEXT & STRUCTURE
------------------------- */

a {
  color: inherit;
  text-decoration: underline;
}

aside {
  color: var(--my-text2);
  margin-bottom: 2rem;
  margin-left: 2rem;
}

p {
  line-height: 1.5em;
  margin-top: 0;
  text-align: justify;
}

h2 {
  margin-bottom: 0.75em;
  margin-top: 0;
}

h3 {
  border-bottom: 1px dotted gray;
  margin-bottom: 0.5em;
  margin-top: 2.5rem;
  padding-bottom: 0.5em;
}

h4 {
  margin-bottom: 0.25rem;
  margin-top: 2em;
}

h5 {
  font-size: 1em;
  margin-bottom: 0;
}

hr {
  background: var(--my-rule-color);
  border: none;
  height: 1px;
  margin: 2rem 0;
}

/* -------------------------
   IMAGES
------------------------- */

img {
  display: block;
  height: auto;
  margin: 2rem auto;
  max-width: 100%;
  opacity: 0.95;
}

img + p,
p + img {
  margin-top: 2.5rem;
}

/* -------------------------
   READER TOOLBAR
------------------------- */

.reader-toolbar {
  align-items: center;
  background: var(--my-toolbar-bg);
  border-radius: 3rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  box-shadow: 0 0.4rem 1rem var(--my-toolbar-shadow);
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  left: 50%;
  padding: 0.6rem 1.2rem;
  position: fixed;
  transform: translateX(-50%);
  transition: transform 0.35s ease, opacity 0.35s ease;
  z-index: 1000;
}

.reader-toolbar.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(150%);
}

.reader-toolbar button {
  align-items: center;
  background: var(--my-button-bg);
  border: none;
  border-radius: 50%;
  color: var(--my-text1);
  cursor: pointer;
  display: flex;
  font-size: 1.2em;
  height: 2.6rem;
  justify-content: center;
  transition: background 0.2s ease, transform 0.1s ease;
  width: 2.6rem;
}

.reader-toolbar button:hover {
  background: var(--my-button-bg-hover);
  outline: 1px solid white;
}

.reader-toolbar button:active {
  transform: scale(0.92);
}

/* -------------------------
   BIBLE VERSE BLOCK
------------------------- */

.bible-verse {
  background-color: var(--my-verse-bg);
  border-radius: 1rem;
  margin: 0 auto 1rem;
  padding: 1rem;
}

.bible-verse h6 {
  font-size: inherit;
  margin: 0;
  padding: 0;
}

.bible-verse p {
  margin-bottom: 1rem;
}

.bible-verse p:only-child,
.bible-verse p:last-child {
  margin-bottom: 0;
}
