/* Reading mode on verse pages, and Home's "Pick up where you left off" bar (site/js/reading.js).
   Designer's file: "Verse Page + Reading Mode.html" (2026-12-03). Colours and fonts are gita.css's. */

/* ------------------------------------------------------------ the button on verse pages (beside Bookmark) */
.rm-open { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; padding: 8px 17px; border-radius: 99px; border: none;
  background: var(--ink); color: var(--paper); font: 700 15px var(--ui); cursor: pointer; white-space: nowrap; }
.rm-open:hover { background: var(--saffron); }
.rm-exit kbd { padding: 2px 7px; border-radius: 6px; background: rgba(255, 255, 255, .14); font: 500 11px var(--mono); }
.rm-open[hidden] { display: none; }
@media (hover: none) { .rm-exit kbd { display: none; } .rm-open { padding-right: 17px; } }

/* ------------------------------------------------------------ reading mode */
html.rm-on, html.rm-on body { overflow: hidden; }
.rm { position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column; background: #f9f5ee; color: var(--ink); }
.rm[hidden] { display: none; }
.rm button { font-family: inherit; color: inherit; }
.rm button:focus-visible { outline: 2px solid var(--saffron); outline-offset: 2px; }
.rm-top { flex: none; background: #f9f5ee; }
.rm-topin { max-width: 1160px; margin: 0 auto; padding: 14px 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.rm-exit { justify-self: start; display: flex; gap: 8px; align-items: center; padding: 8px 14px 8px 12px; border-radius: 99px; border: 1.5px solid #e1d6c3;
  background: transparent; font: 600 14px var(--ui); cursor: pointer; white-space: nowrap; }
.rm-exit:hover { background: #ede5d6; }
.rm-exit kbd { background: none; padding: 0; color: #8a7d70; font-size: 10px; }
.rm-where { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; min-width: 0; }
.rm-ch { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--saffron-text); white-space: nowrap; }
.rm-of { font: 500 12px var(--mono); color: var(--ink-muted); }
.rm-tools { justify-self: end; display: flex; gap: 6px; align-items: center; }
.rm-seg { display: flex; padding: 3px; border-radius: 99px; background: #ede5d6; gap: 2px; }
.rm-seg button { min-width: 34px; height: 30px; padding: 0 12px; border-radius: 99px; border: none; background: transparent; color: var(--ink-muted); font: 600 13px var(--ui); cursor: pointer; white-space: nowrap; }
.rm-seg [data-size] { padding: 0; color: var(--ink); font: 600 13px var(--read); }
.rm-seg [data-size].is-big { font-size: 18px; }
.rm-seg button:hover:not(:disabled) { background: var(--card); }
.rm-seg button:disabled { opacity: .35; cursor: default; }
.rm-seg [aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(42, 36, 32, .12); }
.rm-seg .is-hi { font: 400 14px var(--sa); }
.rm-save { display: flex; gap: 6px; align-items: center; padding: 8px 13px; border-radius: 99px; border: 1.5px solid #e1d6c3; background: transparent;
  font: 600 13px var(--ui); cursor: pointer; white-space: nowrap; }
.rm-save:hover { border-color: var(--ink); }
.rm-save[aria-pressed="true"] { background: var(--teal-tint); border-color: var(--teal); color: var(--teal); }
.rm-star { font-size: 15px; line-height: 1; }
.rm-prog { height: 3px; background: #ede5d6; }
.rm-prog span { display: block; height: 3px; background: var(--saffron); }

.rm-main { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; padding: 24px 32px 170px; }
.rm-verse { width: 100%; max-width: 820px; margin: auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.rm-ref { display: flex; gap: 12px; align-items: center; justify-content: center; font: 500 12px var(--mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--saffron-text); }
.rm-dash { width: 18px; height: 1px; background: currentColor; opacity: .5; }
.rm-sa { font-family: var(--sa); line-height: 1.6; padding: 6px 18px; border-radius: 16px; transition: background .2s; text-wrap: balance; }
.rm-sa.is-reading { background: #efe2cc; }
.rm-tr { font: italic 400 18px/1.55 var(--read); color: #7a6c60; }
.rm-rule { display: block; width: 44px; height: 2px; background: var(--saffron); }
.rm-label { margin-bottom: -10px; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #8a7d70; }
.rm-en { max-width: 720px; font-family: var(--read); line-height: 1.6; text-wrap: pretty; }
.rm-en.is-hi { font-family: var(--sa); line-height: 1.75; }
.rm-en span { border-radius: 3px; transition: background .15s, box-shadow .15s; }
.rm-en span.is-lit { background: #e6c99b; box-shadow: 0 0 0 3px #e6c99b; }
.rm-s0 .rm-sa { font-size: clamp(21px, 5.4vw, 30px); } .rm-s0 .rm-en { font-size: clamp(19px, 4.6vw, 25px); }
.rm-s1 .rm-sa { font-size: clamp(24px, 6.2vw, 36px); } .rm-s1 .rm-en { font-size: clamp(21px, 5.2vw, 29px); }
.rm-s2 .rm-sa { font-size: clamp(27px, 7.2vw, 44px); } .rm-s2 .rm-en { font-size: clamp(24px, 6vw, 35px); }
.rm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; }

/* the dock: read aloud, where you are, what to read aloud, previous and next. The same light card as the chapter
   player and the verse page's mini player, a size bigger (designer, 2026-12-03, "Chapter Page.html" and the reading-mode
   screenshot) */
.rm-dock { position: fixed; left: 0; right: 0; bottom: 0; padding: 36px 20px 22px; pointer-events: none;
  background: linear-gradient(rgba(249, 245, 238, 0), #f9f5ee 45%); }
.rm-bar, .rm-pop { pointer-events: auto; max-width: 680px; margin: 0 auto; background: #fffdf8; color: var(--ink);
  box-shadow: 0 18px 40px -14px rgba(42, 36, 32, .38), 0 0 0 1px #e6dccb; }
.rm-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; border-radius: 30px; }
.rm-bar button, .rm-pop button { color: var(--ink); }
.rm-play { position: relative; width: 58px; height: 58px; flex: none; padding: 0; border-radius: 50%; border: none; background: var(--ink); cursor: pointer; }
.rm-play:hover { background: #3a322c; }
.rm-pi { position: absolute; inset: 0; }
.rm-pi::before { content: ""; position: absolute; left: 23px; top: 20px; border-style: solid; border-width: 9px 0 9px 14px;
  border-color: transparent transparent transparent #fbf7ef; }
.is-playing .rm-play { background: #d9953f; }
.is-playing .rm-pi::before { left: 22px; top: 21px; width: 5px; height: 16px; border: none; background: var(--ink); box-shadow: 9px 0 0 var(--ink); }
.rm-play.is-nudge { animation: rm-nudge 1.6s ease-in-out infinite; }
@keyframes rm-nudge { 0%, 100% { box-shadow: 0 0 0 0 rgba(217, 149, 63, .55); } 50% { box-shadow: 0 0 0 10px rgba(217, 149, 63, 0); } }
@media (prefers-reduced-motion: reduce) { .rm-play.is-nudge { animation: none; box-shadow: 0 0 0 4px #d9953f; } }
.rm-status { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 4px 2px; border: none;
  background: transparent; cursor: pointer; text-align: left; }
.rm-vn { font: 700 21px var(--ui); letter-spacing: -.01em; white-space: nowrap; }
.rm-caret { font-size: 13px; color: var(--ink-muted); }
.rm-st { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font: 500 12.5px var(--mono); color: var(--ink-muted); white-space: nowrap; }
.rm-gear { height: 46px; flex: none; padding: 0 18px; border-radius: 99px; border: 1.5px solid #d9a35f; background: transparent;
  font: 600 16px var(--ui); white-space: nowrap; cursor: pointer; }
.rm-gear[aria-expanded="true"], .rm-gear:hover { background: #fbf1e4; }
.rm-gs { display: none; }
.rm-prev, .rm-next { width: 48px; height: 48px; flex: none; display: grid; place-items: center; padding: 0; border-radius: 50%;
  border: 1.5px solid #e1d6c3; background: transparent; font-size: 13px; cursor: pointer; }
.rm-prev:hover:not(:disabled), .rm-next:hover:not(:disabled), .rm-speed:hover { border-color: var(--ink); }
.rm-prev:disabled, .rm-next:disabled { opacity: .35; cursor: default; }
.rm-speed { height: 40px; flex: none; padding: 0 12px; border-radius: 99px; border: 1.5px solid #e1d6c3; background: transparent; font: 600 13px var(--ui); cursor: pointer; }
.rm-speed[hidden] { display: none; }

.rm-ctl { display: contents; }
.rm-play { order: -1; }
.rm-set-x { display: none; }
.rm-pop { margin-bottom: 10px; padding: 12px; border-radius: 24px; }
.rm-pop[hidden] { display: none; }
.rm-pop-head { display: flex; align-items: center; gap: 8px; margin: 4px 6px 12px; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.rm-jt { color: var(--saffron-text); }
.rm-key { margin-left: auto; color: var(--ink-muted); }
.rm-chp, .rm-chn { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid #e1d6c3; background: transparent; font: 600 15px/1 var(--ui); cursor: pointer; }
.rm-chp:disabled, .rm-chn:disabled { opacity: .3; cursor: default; }
.rm-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; max-height: 42vh; overflow-y: auto; padding: 2px; }
.rm-grid button { height: 36px; border-radius: 10px; border: none; background: #f3ece0; font: 600 13px var(--ui); cursor: pointer; }
.rm-grid button.is-read { background: #ebe2d2; color: var(--ink-muted); }
.rm-grid button.is-here { background: #d9953f; color: var(--ink); }
.rm-grid button:hover { outline: 1.5px solid #d9953f; }
.rm-set { display: flex; flex-direction: column; gap: 6px; }
.rm-pop-k { padding: 6px 10px 2px; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--saffron-text); }
.rm-modes { display: flex; flex-direction: column; gap: 4px; }
.rm-modes button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: none; background: transparent;
  text-align: left; cursor: pointer; }
.rm-modes button:hover { background: #f8f2e8; }
.rm-mt { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.rm-modes b { font: 700 16px var(--ui); }
.rm-mt > span { font: 400 14px/1.35 var(--ui); color: var(--ink-muted); }
.rm-modes i { font-style: normal; color: var(--saffron); visibility: hidden; }
.rm-modes [aria-pressed="true"] { background: #f3ece0; }
.rm-modes [aria-pressed="true"] i { visibility: visible; }

@media (max-width: 760px) {
  /* phones (designer, 2026-12-03, reading mode mobile): ✕, where you are and ☆ on top; text size and language move into
     the "Aa" menu in the dock; the dock is two rows, the verse and the menu, then previous, play and next in the middle */
  .rm-topin { grid-template-columns: auto 1fr auto; padding: 10px 14px; gap: 10px; }
  .rm-where { grid-column: 2; grid-row: 1; }
  .rm-ch { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .rm-top .rm-seg { display: none; }
  .rm-exit, .rm-save { width: 46px; height: 46px; padding: 0; justify-content: center; border-radius: 50%; font-size: 18px; }
  .rm-exit-l, .rm-save-l { display: none; }
  .rm-set-x { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 10px; margin-bottom: 4px; border-bottom: 1.5px solid #efe7da; }
  .rm-set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-right: 6px; }
  .rm-main { padding: 18px 18px 200px; }
  .rm-verse { gap: 18px; }
  .rm-tr { font-size: 16px; }
  .rm-dock { padding: 28px 10px 12px; }
  .rm-bar { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "st gear" "ctl ctl";
    gap: 6px 8px; padding: 14px 14px 12px 18px; border-radius: 28px; }
  .rm-status { grid-area: st; padding: 0; }
  .rm-speed { position: absolute; right: 16px; bottom: 21px; height: 38px; }
  .rm-play { order: 0; }
  .rm-gear { grid-area: gear; height: 44px; padding: 0 14px; font-size: 15px; }
  .rm-gl { display: none; } .rm-gs { display: inline; }
  .rm-ctl { grid-area: ctl; display: flex; justify-content: center; align-items: center; gap: 26px; padding-top: 4px; }
  .rm-play { width: 58px; height: 58px; }
  .rm-prev, .rm-next { width: 44px; height: 44px; }
  .rm-vn { font-size: 18px; }
  .rm-st { font-size: 11px; }
  .rm-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@media (max-width: 440px) {
  .rm-seg button { padding: 0 8px; }
  .rm-seg [data-size] { min-width: 30px; }
}

/* ------------------------------------------------------------ Home: pick up where you left off */
.rc-wrap { margin-top: 8px; margin-bottom: 8px; }
.rc { display: flex; align-items: center; gap: 28px; padding: 22px 32px 22px 26px; border-radius: 28px; background: var(--card); box-shadow: 0 1px 0 var(--line); }
.rc-pic { flex: none; width: 102px; height: 102px; border-radius: 50%; object-fit: cover; background: var(--line-2); }
.rc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.rc-eyebrow { font: 500 13px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--saffron-text); }
.rc-title { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.rc-title b { font: 800 clamp(24px, 2.6vw, 32px)/1.1 var(--ui); letter-spacing: -.03em; }
.rc-title i { font: italic 400 clamp(20px, 2vw, 26px) var(--read); color: var(--ink-muted); }
.rc-side { display: flex; align-items: center; gap: 14px 26px; flex-wrap: wrap; justify-content: flex-end; }
.rc-track { display: block; width: 144px; height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.rc-track span { display: block; height: 100%; border-radius: 99px; background: var(--saffron); }
.rc-count { margin-left: -12px; font: 500 14px var(--mono); color: var(--ink-muted); white-space: nowrap; }
.rc-track + .rc-count { margin-left: -12px; }
.rc:not(.is-back) .rc-count { margin-left: 0; }
.rc-over { font: 600 17px var(--ui); color: var(--ink-body); }
.rc-over:hover { color: var(--saffron-text); }
.rc-over[hidden] { display: none; }
.rc-go { min-height: 60px; padding: 14px 30px; font-size: 19px; }
@media (max-width: 900px) {
  .rc { flex-wrap: wrap; gap: 16px 18px; padding: 18px 20px; border-radius: 22px; }
  .rc-pic { width: 72px; height: 72px; }
  .rc-side { width: 100%; justify-content: space-between; gap: 12px 18px; }
  .rc-track { flex: 1; min-width: 80px; width: auto; }
  .rc-go { min-height: 50px; padding: 12px 22px; font-size: 16px; }
}
@media (max-width: 520px) {
  .rc-eyebrow { font-size: 11px; letter-spacing: .14em; }
  .rc-side .rc-go { width: 100%; }
}
