/* Orthodox Reading Room — electronic books only */
.reading-room-page{max-width:1180px;margin:0 auto}
.reading-room-hero{margin:0 0 22px;padding:clamp(24px,4vw,46px);border:1px solid rgba(214,171,85,.42);border-radius:24px;background:radial-gradient(circle at 84% 10%,rgba(214,171,85,.18),transparent 32%),linear-gradient(145deg,rgba(92,18,20,.95),rgba(38,14,10,.98) 58%,rgba(15,10,7,.99));box-shadow:var(--shadow)}
.reading-room-hero h1{max-width:820px}.reading-room-hero .copy{max-width:900px;font-size:1.05rem;line-height:1.65}
.ebook-count{display:inline-flex;align-items:center;gap:10px;margin-top:10px;padding:9px 13px;border:1px solid rgba(240,212,141,.24);border-radius:999px;background:rgba(255,255,255,.05)}
.ebook-count strong{font:1.45rem/1 var(--display);color:var(--gold-soft)}.ebook-count span{color:#eadbc6;font-size:.86rem}
.ebook-category{margin:0 0 28px;scroll-margin-top:84px}
.ebook-category-head{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:12px;padding-bottom:10px;border-bottom:1px solid rgba(214,171,85,.18)}
.ebook-category-head h2{margin:0}.ebook-category-head span{color:var(--muted);font-size:.83rem}
.ebook-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.ebook-card{position:relative;display:flex;flex-direction:column;min-height:310px;padding:21px;border:1px solid rgba(214,171,85,.23);border-radius:20px;background:linear-gradient(150deg,rgba(255,248,232,.07),rgba(255,248,232,.025));box-shadow:0 12px 28px rgba(0,0,0,.16);overflow:hidden}
.ebook-card:after{content:"☦";position:absolute;right:12px;top:2px;font:4.8rem/1 var(--display);color:rgba(240,212,141,.055);pointer-events:none}
.ebook-card .ebook-language{align-self:flex-start;padding:4px 8px;border-radius:999px;border:1px solid rgba(214,171,85,.28);color:var(--gold-soft);font-size:.72rem;font-weight:800}
.ebook-card h3{margin:1rem 0 .35rem;color:#fff0d4;font-size:1.35rem;position:relative;z-index:1}
.ebook-card .ebook-original-title{margin:.1rem 0 .65rem;color:#d8c8b2;font-style:italic;font-size:.86rem;line-height:1.35}
.ebook-card .ebook-card-meta{margin:0 0 .8rem;color:var(--gold-soft);font-size:.78rem}
.ebook-card .ebook-card-desc{color:#d9cbbb;line-height:1.52}
.ebook-card .ebook-card-actions{margin-top:auto;padding-top:12px}
.ebook-card .ebook-card-actions .btn{width:100%}
.ebook-reader-page{max-width:1180px;margin:0 auto}
.ebook-progress{position:sticky;top:0;z-index:55;height:4px;background:rgba(255,255,255,.06);margin:-18px -14px 15px}.ebook-progress span{display:block;width:0;height:100%;background:linear-gradient(90deg,#b67d1e,#f0d48d)}
.ebook-reader-head{margin:0 auto 18px;max-width:920px;padding:24px;border:1px solid rgba(214,171,85,.3);border-radius:20px;background:rgba(33,20,14,.82);box-shadow:var(--shadow)}
.ebook-reader-head h1{margin-bottom:.35rem}.ebook-original-title{color:#d6c6b0;font-style:italic}.ebook-meta{color:var(--gold-soft);font-size:.85rem}
.ebook-toolbar{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.ebook-toolbar .btn{min-height:38px}
.ebook-toc{margin-top:16px;border:1px solid rgba(214,171,85,.2);border-radius:14px;background:rgba(255,255,255,.035)}
.ebook-toc summary{cursor:pointer;padding:12px 14px;color:var(--gold-soft);font-weight:800}.ebook-toc nav{display:grid;gap:2px;max-height:320px;overflow:auto;padding:0 10px 12px}
.ebook-toc a{padding:7px 9px;border-radius:8px;color:#e7d8c4;text-decoration:none;font-size:.86rem}.ebook-toc a:hover{background:rgba(214,171,85,.1)}
.ebook-paper{--ebook-font:1.08rem;max-width:860px;margin:0 auto;padding:clamp(24px,5vw,58px);border:1px solid #c7aa73;border-radius:10px;background:linear-gradient(rgba(255,255,255,.28),rgba(255,255,255,.08)),#f4e6c8;color:#24180f;box-shadow:0 22px 60px rgba(0,0,0,.35);font-family:Georgia,"Times New Roman",serif;font-size:var(--ebook-font);line-height:1.75}
.ebook-paper.is-wide{max-width:1040px}
.ebook-paper p{margin:0 0 1.15em;text-align:justify;hyphens:auto}
.ebook-paper p:first-of-type:first-letter{float:left;margin:.08em .12em 0 0;font-size:3.2em;line-height:.8;color:#741112;font-family:Georgia,"Times New Roman",serif}
.ebook-heading{scroll-margin-top:28px;margin:2em 0 .8em;color:#5e160f;font-family:Georgia,"Times New Roman",serif;line-height:1.25;text-align:center}
.ebook-paper h2{font-size:1.5em}.ebook-verse{text-align:left!important;margin-left:auto!important;margin-right:auto!important;max-width:720px;white-space:normal}
.ebook-source{max-width:860px;margin:18px auto 0;padding:18px;border:1px solid rgba(214,171,85,.22);border-radius:14px;color:#d9cbbb;background:rgba(255,255,255,.035);font-size:.86rem;line-height:1.55}
.ebook-source a{color:var(--gold-soft)}
@media(max-width:900px){.ebook-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ebook-paper{padding:28px 24px}.app-nav{overflow-x:auto;justify-content:flex-start}.app-nav>a{flex:0 0 auto}}
@media(max-width:620px){.ebook-grid{grid-template-columns:1fr}.ebook-category-head{align-items:start;flex-direction:column;gap:4px}.ebook-card{min-height:0}.reading-room-hero{padding:22px 17px;border-radius:18px}.ebook-reader-head{padding:18px 15px}.ebook-toolbar .btn{flex:1 1 auto}.ebook-paper{padding:24px 16px;border-radius:0;font-size:1.02rem;line-height:1.68}.ebook-paper p{text-align:left}.ebook-progress{margin:-18px -8px 12px}}
@media(prefers-reduced-motion:reduce){.ebook-progress span{transition:none}}

/* Unpublished catalogue cards are visibly distinct from readable ebooks. */
.ebook-in-preparation{margin-block:28px 34px}
.ebook-in-preparation>.copy{max-width:920px;margin:0 0 18px;color:#e7d8c4}
.ebook-card--preparation{min-height:0;background:linear-gradient(145deg,rgba(255,248,232,.045),rgba(33,20,14,.45))}
.ebook-card--preparation .ebook-card-desc{flex:1}
.ebook-preparation-status{margin:10px 0 0;padding:11px 12px;border-left:3px solid #d3b575;border-radius:5px;background:rgba(240,212,141,.07);color:#f5e6c5;font-size:.86rem;line-height:1.45}
.ebook-preparation-warning{margin:10px 0 0;color:#e1cdb0;font-size:.79rem}
@media(max-width:620px){.ebook-in-preparation{margin-block:20px 28px}.ebook-card--preparation{padding:18px}}

/* Reading Room redesign — original illustrated book covers and fast discovery. */
.ebook-filters{display:grid;grid-template-columns:minmax(190px,2.1fr) repeat(2,minmax(140px,1fr)) auto;gap:12px;align-items:end;margin:0 0 26px;padding:17px;border:1px solid rgba(214,171,85,.27);border-radius:18px;background:rgba(33,20,14,.75)}
.ebook-filter-field{display:grid;gap:6px;min-width:0}
.ebook-filter-field label{font-size:.85rem;font-weight:700;color:#fae8cb}
.ebook-filter-field input,.ebook-filter-field select{width:100%;min-width:0;min-height:44px;padding:9px 12px;border-radius:10px;border:1px solid rgba(235,201,137,.48);background:#221810;color:#fff1d8;font:inherit}
.ebook-filter-field input::placeholder{color:#c5b59e}
.ebook-filter-field select option{background:#221810;color:#fff1d8}
.ebook-filter-field :is(input,select):focus-visible,.ebook-filter-reset:focus-visible{outline:3px solid #f0d48d;outline-offset:2px}
.ebook-filter-reset{min-height:44px}
.ebook-filter-count{grid-column:1 / -1;margin:0;color:#e9d6b4;font-size:.9rem}
.ebook-filter-empty{margin:14px 0 28px;padding:18px;border:1px solid rgba(214,171,85,.3);border-radius:12px;color:#f6e4c8}
.ebook-category[hidden],.ebook-card[hidden],.ebook-filter-empty[hidden],.ebook-toolbar [hidden]{display:none!important}
.ebook-cover-link{align-self:center;display:block;position:relative;width:min(168px,90%);margin:0 auto 10px;border-radius:5px;overflow:hidden;box-shadow:7px 12px 24px rgba(0,0,0,.34);transition:transform .2s ease}
.ebook-cover-link:hover{transform:translateY(-3px)}
.ebook-cover{display:block;width:100%;height:auto;aspect-ratio:2/3;object-fit:contain;background:#21170e}
.ebook-card .ebook-language{margin-top:5px}
.ebook-card .ebook-cover-link~h3{margin-top:.65rem}
.ebook-preparation-toggle{margin:8px 0 26px;padding:12px 17px;border:1px solid rgba(214,171,85,.2);border-radius:15px;background:rgba(21,15,13,.56)}
.ebook-preparation-toggle>summary{cursor:pointer;color:#f5dcaf;font-weight:750;padding:5px 3px;min-height:34px;list-style-position:inside}
.ebook-preparation-toggle .ebook-in-preparation{margin:16px 0 0}
.ebook-reader-cover{float:right;width:clamp(92px,17vw,145px);height:auto;aspect-ratio:2/3;object-fit:contain;margin:0 0 14px 22px;border-radius:4px;box-shadow:5px 10px 22px rgba(0,0,0,.35)}
.ebook-reader-head:after{content:"";display:table;clear:both}
.ebook-reader-status{min-height:1.35em;margin:8px 0 0;color:#f4d48c;font-size:.86rem}
.ebook-paper.is-night{background:#171e29;color:#f5ecdd;border-color:#6d7e92;box-shadow:0 16px 38px rgba(0,0,0,.4)}
.ebook-paper.is-night .ebook-heading{color:#f3d392}
.ebook-paper.is-night p:first-of-type:first-letter{color:#f2ca85}
.ebook-paper.is-night a{color:#ffe4a0}
.ebook-night-mode .ebook-reader-head{background:#15202b;border-color:rgba(170,190,211,.35)}
@media(max-width:900px){.ebook-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.ebook-filter-field:first-child{grid-column:1/-1}.ebook-filter-reset{align-self:end}}
@media(max-width:620px){.ebook-filters{grid-template-columns:1fr;gap:11px;padding:14px}.ebook-filter-field:first-child{grid-column:auto}.ebook-filter-count{grid-column:auto}.ebook-cover-link{width:min(156px,75%)}.ebook-reader-cover{float:none;display:block;width:112px;margin:0 auto 16px}.ebook-toolbar{gap:6px}.ebook-toolbar .btn{flex:1 1 45%;font-size:.84rem;padding:8px}.ebook-preparation-toggle{padding:10px 13px}.ebook-paper.is-night{border-radius:0}}
@media(prefers-reduced-motion:reduce){.ebook-cover-link{transition:none}}

/* Book-cover presentation: keep the original burgundy/gold Orthodox artwork prominent. */
.ebook-card{isolation:isolate;align-items:stretch}
.ebook-cover-link{width:min(226px,92%);margin:1px auto 20px;border:2px solid #e3bc78;border-radius:6px;background:linear-gradient(140deg,#4b1b24,#170d16);box-shadow:inset 4px 0 6px rgba(0,0,0,.28),0 14px 28px rgba(0,0,0,.46);transform-origin:50% 70%;outline-offset:5px;z-index:1}
.ebook-cover-link::after{content:"";position:absolute;pointer-events:none;inset:4px auto 4px 4px;width:7px;border-right:1px solid rgba(255,237,196,.35);background:linear-gradient(90deg,rgba(0,0,0,.45),rgba(255,222,155,.07))}
.ebook-cover-link:hover{transform:translateY(-3px);box-shadow:0 18px 32px rgba(0,0,0,.5)}
.ebook-cover-link:focus-visible{outline:3px solid #f0d48d}
.ebook-cover{width:100%;height:auto;aspect-ratio:2/3;object-fit:contain;vertical-align:middle}
.ebook-reader-cover{width:clamp(150px,18vw,192px);height:auto;box-shadow:0 12px 24px rgba(0,0,0,.45);border:2px solid #e3bc78;border-radius:5px}
.ebook-card h3{margin-top:.25rem}
@media(max-width:900px){.ebook-cover-link{width:min(220px,95%)}}
@media(max-width:620px){.ebook-cover-link{width:min(208px,86%)}.ebook-reader-cover{float:none;display:block;width:clamp(140px,42vw,175px);margin:0 auto 20px}}

/* One untouched red Orthodox book photograph for book cards only; no overlay or drawing. */
.ebook-cover-link,.ebook-cover-link:hover{
  display:block;
  width:min(174px,86%);
  height:auto;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  overflow:visible;
  transform:none;
}
.ebook-cover-link::after{display:none!important;content:none!important}
.ebook-cover,.ebook-reader-cover{
  display:block;
  aspect-ratio:140/189;
  height:auto;
  object-fit:contain;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.ebook-reader-cover{width:clamp(140px,17vw,180px)}
@media(max-width:900px){.ebook-cover-link{width:min(174px,86%)}}
@media(max-width:620px){
  .ebook-cover-link{width:min(174px,80%)}
  .ebook-reader-cover{width:160px;margin:0 auto 20px}
}

/* Accessible publication credits: never inherit the cream-paper ink on the dark footer. */
.ebook-reader-page .ebook-source {
  background: #251610;
  border: 1px solid rgba(232,190,116,.44);
  color: #f3e8d6;
  font-size: 1rem;
  line-height: 1.7;
}
.ebook-reader-page .ebook-source p,
.ebook-reader-page .ebook-source span,
.ebook-reader-page .ebook-source li {
  color: #f3e8d6;
  opacity: 1;
}
.ebook-reader-page .ebook-source strong,
.ebook-reader-page .ebook-source b {
  color: #fff7e9;
  font-weight: 750;
  opacity: 1;
}
.ebook-reader-page .ebook-source a,
.ebook-reader-page .ebook-source a:visited {
  color: #ffd37b;
  text-decoration: underline;
  text-underline-offset: .17em;
  opacity: 1;
}
.ebook-reader-page .ebook-source a:hover,
.ebook-reader-page .ebook-source a:focus-visible {
  color: #fff0bd;
  text-decoration-thickness: 2px;
}
.ebook-reader-page .ebook-source a:focus-visible {
  outline: 2px solid #fff0bd;
  outline-offset: 3px;
}
@media (max-width:620px) {
  .ebook-reader-page .ebook-source { padding: 18px 16px; font-size: 1rem; }
}

/* Keep title and description readable on the DARK ebook header even with the site's light theme. */
body[data-page="reading-room"] .ebook-reader-page .ebook-reader-head { color:#fff7e8; }
body[data-page="reading-room"] .ebook-reader-page .ebook-reader-head h1,
body[data-page="reading-room"] .ebook-reader-page .ebook-reader-head h2 { color:#fffaf0 !important;opacity:1;text-shadow:none; }
body[data-page="reading-room"] .ebook-reader-page .ebook-reader-head > p.eyebrow,
body[data-page="reading-room"] .ebook-reader-page .ebook-reader-head > p.ebook-meta { color:#ffdf91 !important;opacity:1; }
body[data-page="reading-room"] .ebook-reader-page .ebook-reader-head > p.ebook-original-title { color:#fff1d0 !important;opacity:1; }
body[data-page="reading-room"] .ebook-reader-page .ebook-reader-head > p.copy { color:#fff4e2 !important;opacity:1;line-height:1.7; }
body[data-page="reading-room"] .ebook-reader-page .ebook-reader-head .ebook-toc summary,
body[data-page="reading-room"] .ebook-reader-page .ebook-reader-head .ebook-toc nav a { color:#ffe5a7 !important;opacity:1; }
body[data-page="reading-room"] .ebook-reader-page .ebook-reader-head .ebook-reader-status,
body[data-page="reading-room"] .ebook-reader-page .ebook-reader-head .ebook-story-audio p,
body[data-page="reading-room"] .ebook-reader-page .ebook-reader-head .ebook-story-audio label,
body[data-page="reading-room"] .ebook-reader-page .ebook-reader-head .ebook-story-audio .small { color:#fff0d5 !important;opacity:1; }
