:root {
  color-scheme: light;
  --cerneala: #1c140c;
  --roshu: #8e1b1b;
  --aur: #8d6a24;
  --foaie: #f4e7cb;
  --foaie-2: #ead7ae;
  --linie: #c9b48a;
  --azi: #e4c15a;
  --chenar: #3a2a1c;
  --celula: #fbf6ea;
  --hover: #f8efd8;
  --an-ales: #f3d98a;
  --sters: #6a5844;
  --fond: #24180f;
  --fond-lumina: #5a4030;
  --rama: #6b4e32;
  --rama-2: #3a2a1c;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --cerneala: #e8dcc4;
    --roshu: #e0796b;
    --aur: #d2a94f;
    --foaie: #1b1612;
    --foaie-2: #241d17;
    --linie: #4a3c2e;
    --azi: #6b5420;
    --chenar: #8a7354;
    --celula: #251e18;
    --hover: #30271f;
    --an-ales: #4d3d1a;
    --sters: #a8977f;
    --fond: #0d0a08;
    --fond-lumina: #2a1f17;
    --rama: #3a2d22;
    --rama-2: #000;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --cerneala: #e8dcc4;
  --roshu: #e0796b;
  --aur: #d2a94f;
  --foaie: #1b1612;
  --foaie-2: #241d17;
  --linie: #4a3c2e;
  --azi: #6b5420;
  --chenar: #8a7354;
  --celula: #251e18;
  --hover: #30271f;
  --an-ales: #4d3d1a;
  --sters: #a8977f;
  --fond: #0d0a08;
  --fond-lumina: #2a1f17;
  --rama: #3a2d22;
  --rama-2: #000;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, var(--fond-lumina) 0, transparent 40%),
    var(--fond);
  color: var(--cerneala);
  font-family: Palatino, "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
}
.foaie {
  max-width: 1180px;
  margin: 0 auto;
  background: var(--foaie);
  min-height: 100vh;
  padding: 1.2rem 1.3rem 2rem;
  box-shadow: 0 0 0 1px var(--rama), 0 0 0 7px var(--rama-2);
}
.antet { border-bottom: 3px double var(--roshu); padding-bottom: 0.7rem; position: relative; }
.tema {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 0.85rem;
}
.ochi {
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--roshu);
}
h1 {
  font-weight: 500;
  font-size: 1.85rem;
  margin: 0.15rem 0;
  line-height: 1.15;
}
.sub { margin: 0.2rem 0 0; max-width: 46rem; }
.bara {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.9rem;
}
.bara h2 { margin: 0 0.3rem; font-weight: 500; font-size: 1.35rem; min-width: 12rem; text-align: center; }
button, input {
  font: inherit;
  color: inherit;
}
button {
  background: transparent;
  border: 1px solid var(--chenar);
  padding: 0.28rem 0.6rem;
  cursor: pointer;
}
button:hover, button:focus-visible { background: var(--hover); outline: 2px solid var(--aur); outline-offset: 1px; }
button[aria-pressed="true"], button[aria-selected="true"] {
  background: var(--cerneala);
  color: var(--foaie);
}
.stil { display: inline-flex; }
.stil button + button { border-left: 0; }
.an input { width: 5.2rem; background: transparent; border: 1px solid var(--chenar); padding: 0.25rem 0.4rem; }
.pasti { margin: 0.55rem 0; }
.caut label { display: block; font-size: 0.92rem; }
.caut input { width: min(100%, 28rem); background: var(--celula); border: 1px solid var(--chenar); padding: 0.4rem 0.55rem; }
.rez, .rez-gol { margin: 0.35rem 0 0; padding: 0; list-style: none; }
.rez button { display: block; width: 100%; text-align: left; margin: 0 0 0.2rem; }
.cap-butoane { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.7rem 0; }
.metoda { margin: 0.4rem 0 0.8rem; }
.metoda table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.metoda th, .metoda td { border-bottom: 1px solid var(--linie); text-align: left; padding: 0.15rem 0.35rem; }
.rand-an { background: var(--an-ales); }
.capitol { border: 1px solid var(--chenar); background: var(--celula); padding: 0.6rem 0.8rem; margin: 0.4rem 0 0.8rem; }
.capitol h3 { margin: 0 0 0.4rem; color: var(--roshu); font-weight: 500; }
.corp {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.9fr);
  gap: 1rem;
  align-items: start;
}
.capete, .grila { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.28rem; }
.capete { margin-bottom: 0.28rem; text-align: center; font-size: 0.82rem; letter-spacing: 0.04em; }
.capete .rosu, .duminica .num { color: var(--roshu); }
.zi {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 5.1rem;
  padding: 0.28rem 0.32rem 0.2rem;
  background: var(--celula);
  text-align: left;
  line-height: 1.2;
}
.zi.azi { background: var(--azi); }
.zi.aleasa { box-shadow: inset 0 0 0 2px var(--cerneala); }
.num { font-size: 1.05rem; }
.marc { color: var(--roshu); font-size: 0.85rem; align-self: flex-end; margin-top: -1.05rem; }
.sf {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.72rem;
  margin-top: 0.15rem;
}
.nou { margin-top: auto; font-size: 0.68rem; color: var(--sters); }
.feb, .astept, .lipsa { font-size: 0.92rem; }
.ziua {
  border-left: 4px solid var(--roshu);
  padding: 0.2rem 0 0.2rem 0.8rem;
  position: sticky;
  top: 0.4rem;
}
.ziua h2 { margin: 0; font-weight: 500; font-size: 1.55rem; }
.wd, .nou-mare, .perioada, .sfant { margin: 0.15rem 0; }
.sfant { font-size: 1.02rem; }
.fisa { margin: 0.6rem 0; }
.fisa div { margin: 0 0 0.45rem; }
.fisa dt { color: var(--roshu); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.fisa dd { margin: 0; }
.semn-dox, .semn-pol, .semn-priv, .semn-praz { color: var(--roshu); }
.note { margin: 0.2rem 0 0.6rem; padding-left: 1.1rem; }
.note li { margin: 0.2rem 0; }
.taburi { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.citire { margin-top: 0.5rem; max-height: 70vh; overflow: auto; padding-right: 0.3rem; }
.bucata { margin: 0 0 1rem; }
.fel { margin: 0; color: var(--roshu); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.acoperire { margin: 0.2rem 0; font-size: 0.92rem; }
.bucata h3 { font-size: 1rem; font-weight: 500; margin: 0.2rem 0; }
.text { white-space: pre-wrap; font-size: 0.98rem; line-height: 1.45; }
.picior {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.4rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--linie);
}
a { color: var(--roshu); }
@media (max-width: 800px) {
  .foaie { padding: 0.8rem 0.7rem 1.4rem; box-shadow: none; }
  h1 { font-size: 1.45rem; }
  .corp { grid-template-columns: 1fr; }
  .zi { min-height: 3.5rem; }
  .sf { display: none; }
  .ziua { position: static; border-left-width: 3px; padding-left: 0.55rem; }
  .citire { max-height: none; }
  .bara h2 { min-width: 9rem; font-size: 1.15rem; }
}

/* ───────────── taburile de sus și rafturile de tipice ───────────── */
[hidden] { display: none !important; }
mark { background: var(--azi); color: inherit; padding: 0 0.05em; }
.ora-notita { margin: 0.7rem 0 0.45rem; }
.ora-cadru iframe { width: 100%; height: calc(100vh - 11rem); min-height: 560px; border: 1px solid var(--chenar); background: #140e09; }
.foaie.ecran {
  max-width: none;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: 0.6rem;
  box-shadow: none;
}
.foaie.ecran > .antet,
.foaie.ecran > .taburi-sus { flex-shrink: 0; }
.foaie.ecran > .picior { display: none; }
.foaie.ecran .antet { padding-bottom: 0.35rem; }
.foaie.ecran .antet .sub { display: none; }
.foaie.ecran #pavel { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.foaie.ecran .ora-notita { margin: 0.35rem 0; flex-shrink: 0; }
.pavel-cadru { flex: 1 1 auto; min-height: 0; display: flex; }
.pavel-cadru iframe { flex: 1 1 auto; width: 100%; min-height: 0; border: 1px solid var(--chenar); background: #f5f2eb; display: block; }
.foaie.ecran ~ .as-maner,
.foaie.ecran ~ .as-sertar { display: none !important; }

/* asistentul de căutare din tabul Tipicul Sf. Pavel */
.pc-maner, .pc-sertar { display: none !important; }
.foaie.ecran ~ .pc-maner { display: block !important; position: fixed; right: 0; top: 28%; z-index: 45;
  writing-mode: vertical-rl; transform: rotate(180deg); padding: 0.8rem 0.35rem; background: var(--roshu);
  color: var(--foaie); border: 1px solid var(--roshu); border-radius: 0 6px 6px 0; letter-spacing: 0.08em;
  font-size: 0.9rem; box-shadow: 0 2px 8px rgba(0,0,0,0.25); transition: right 0.3s ease; }
.foaie.ecran ~ .pc-maner:hover, .foaie.ecran ~ .pc-maner:focus-visible { background: var(--cerneala); }
body.cu-pc .foaie.ecran ~ .pc-maner { right: min(420px, 100vw); }
.foaie.ecran ~ .pc-sertar.deschis { display: flex !important; position: fixed; top: 0; right: 0; bottom: 0; z-index: 44;
  width: min(420px, 100vw); background: var(--foaie); border-left: 1px solid var(--chenar);
  box-shadow: -6px 0 18px rgba(0,0,0,0.18); flex-direction: column; gap: 0.45rem; padding: 0.7rem 0.8rem; }
.pc-sus { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.pc-sus h2 { margin: 0; font-weight: 500; font-size: 1.15rem; color: var(--roshu); }
.pc-x { font-size: 1.2rem; line-height: 1; padding: 0.15rem 0.55rem; }
.pc-mic { margin: 0; font-size: 0.85rem; color: var(--sters); }
.pc-form input { width: 100%; background: var(--celula); border: 1px solid var(--chenar); padding: 0.45rem 0.55rem; }
.pc-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.pc-chips button { font-size: 0.85rem; padding: 0.15rem 0.5rem; }
.pc-rez { flex: 1; overflow: auto; border-top: 1px solid var(--linie); padding-top: 0.35rem; }
.pc-stare { margin: 0.4rem 0; color: var(--sters); font-size: 0.9rem; }
.pc-hit { display: flex; flex-direction: column; align-items: flex-start; gap: 0.12rem; width: 100%; text-align: left;
  background: var(--celula); margin: 0 0 0.35rem; padding: 0.45rem 0.55rem; }
.pc-hit b { font-weight: 500; }
.pc-meta { font-size: 0.78rem; color: var(--roshu); }
.pc-snip { font-size: 0.82rem; color: var(--sters); line-height: 1.35; }
@media (max-width: 800px) {
  .foaie.ecran ~ .pc-maner { top: auto; bottom: 1rem; writing-mode: horizontal-tb; transform: none;
    border-radius: 6px 0 0 6px; padding: 0.45rem 0.7rem; }
  body.cu-pc .foaie.ecran ~ .pc-maner { display: none !important; }
}
.taburi-sus { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.8rem 0 0.2rem; border-bottom: 1px solid var(--linie); }
.taburi-sus button { border-bottom: none; font-size: 1.02rem; padding: 0.4rem 0.85rem; }
.mic { font-size: 0.82rem; color: var(--sters); font-weight: normal; }
.caut-raft { margin: 0.9rem 0 0.6rem; }
.caut-raft label { display: block; font-size: 0.92rem; }
.rand-caut { display: flex; gap: 0.35rem; max-width: 40rem; }
.rand-caut input { flex: 1; min-width: 0; background: var(--celula); border: 1px solid var(--chenar); padding: 0.4rem 0.55rem; }
.caut-raft .bifa { display: inline-flex; gap: 0.35rem; align-items: center; margin-top: 0.3rem; }
.caut-raft .mic { margin: 0.3rem 0 0; }
.titlu-raft { font-weight: 500; font-size: 1.3rem; margin: 1rem 0 0.5rem; color: var(--roshu); }
.carti { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.45rem; }
.cotor { display: flex; flex-direction: column; gap: 0.2rem; width: 100%; height: 100%; text-align: left; background: var(--celula); padding: 0.55rem 0.7rem; }
.cotor-t { font-size: 1.02rem; }
.cotor-m { font-size: 0.8rem; color: var(--sters); }
.rezultate h3 { font-weight: 500; color: var(--roshu); margin: 0.8rem 0 0.3rem; font-size: 1.05rem; }
.lista-rez { list-style: none; margin: 0; padding: 0; }
.rez-b { display: flex; flex-direction: column; gap: 0.15rem; width: 100%; text-align: left; margin: 0 0 0.25rem; background: var(--celula); }
.rez-b i { color: var(--sters); }
.rez-loc { font-size: 0.82rem; color: var(--roshu); }
.rez-s { font-size: 0.92rem; line-height: 1.35; }
.rezultate { max-height: 55vh; overflow: auto; border-bottom: 1px solid var(--linie); padding-bottom: 0.4rem; }
.carte-sus { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 0.9rem; }
.carte-sus h2 { margin: 0; font-weight: 500; font-size: 1.3rem; flex: 1; min-width: 12rem; }
.carte { display: grid; grid-template-columns: minmax(230px, 0.7fr) minmax(0, 2fr); gap: 1rem; align-items: start; margin-top: 0.6rem; }
.col-cuprins { position: sticky; top: 0.4rem; max-height: 92vh; display: flex; flex-direction: column; border-right: 1px solid var(--linie); padding-right: 0.6rem; }
.col-cuprins h3 { margin: 0 0 0.3rem; font-weight: 500; color: var(--roshu); }
.col-cuprins input { background: var(--celula); border: 1px solid var(--chenar); padding: 0.3rem 0.45rem; margin-bottom: 0.4rem; }
#lista-cuprins { overflow: auto; }
.cuprins { list-style: none; margin: 0; padding: 0; }
.cuprins button { display: flex; justify-content: space-between; gap: 0.5rem; width: 100%; text-align: left; border: none; border-bottom: 1px dotted var(--linie); padding: 0.22rem 0.25rem; font-size: 0.9rem; }
.cuprins .ct i { display: block; font-size: 0.8rem; color: var(--sters); }
.cuprins .cp { color: var(--sters); font-size: 0.8rem; white-space: nowrap; }
.cuprins .niv1 button { padding-left: 1rem; }
.cuprins .niv2 button { padding-left: 1.8rem; font-size: 0.85rem; }
.cuprins .acum > button { background: var(--an-ales); }
.bara-cit { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.bara-cit input { width: 4.2rem; background: var(--celula); border: 1px solid var(--chenar); padding: 0.25rem 0.4rem; }
.comut { display: inline-flex; gap: 0.2rem; margin-left: auto; }
.cap-curent { font-size: 0.88rem; color: var(--roshu); min-height: 1.2em; margin: 0.35rem 0; }
.scan { position: relative; line-height: 0; border: 1px solid var(--linie); }
.scan img { width: 100%; height: auto; display: block; background: #fff; }
.casute span { position: absolute; background: rgba(228, 193, 90, 0.45); outline: 1px solid rgba(142, 27, 27, 0.6); }
.text-pag { background: var(--celula); padding: 0.8rem 1rem; border: 1px solid var(--linie); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .scan img { filter: brightness(0.85) contrast(1.05); }
}
:root[data-theme="dark"] .scan img { filter: brightness(0.85) contrast(1.05); }
@media (max-width: 800px) {
  .carte { grid-template-columns: 1fr; }
  .col-cuprins { position: static; max-height: 40vh; border-right: none; border-bottom: 1px solid var(--linie); padding: 0 0 0.5rem; }
  .taburi-sus button { font-size: 0.92rem; padding: 0.35rem 0.6rem; }
}

/* ───────────── asistentul de traducere ───────────── */
.foaie.lat { max-width: 1680px; }
.btn-trad[aria-pressed="true"] { background: var(--roshu); color: var(--foaie); border-color: var(--roshu); }
.pagina-dubla.cu-trad { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.8rem; align-items: start; }
.trad { border: 1px solid var(--chenar); background: var(--celula); padding: 0.6rem 0.7rem; position: sticky; top: 0.4rem; max-height: 94vh; display: flex; flex-direction: column; gap: 0.45rem; }
.trad-sus, .trad-act { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.trad-sus .comut { margin-left: 0; flex-wrap: wrap; }
.trad select { font: inherit; color: inherit; background: var(--foaie); border: 1px solid var(--chenar); padding: 0.2rem 0.3rem; }
.trad-intreaba { display: flex; gap: 0.35rem; }
.trad-intreaba input { flex: 1; min-width: 0; background: var(--foaie); border: 1px solid var(--chenar); padding: 0.3rem 0.45rem; }
.trad-rez { overflow: auto; flex: 1; min-height: 6rem; }
.trad-bloc { border-top: 1px solid var(--linie); padding-top: 0.4rem; margin-bottom: 0.7rem; }
.trad-bloc h4 { margin: 0 0 0.3rem; font-weight: 500; color: var(--roshu); display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: baseline; }
.mic-b { font-size: 0.75rem; padding: 0.05rem 0.4rem; }
.trad-text { font-size: 0.97rem; }
.cursor { animation: clipeste 1s steps(1) infinite; color: var(--roshu); }
@keyframes clipeste { 50% { opacity: 0; } }
.trad .mic { margin: 0; }
@media (max-width: 1100px) {
  .pagina-dubla.cu-trad { grid-template-columns: 1fr; }
  .trad { position: static; max-height: none; }
}

/* cărțile traduse și istoricul */
.tradusa-card { border: 1px solid var(--chenar); background: var(--celula); padding: 0.7rem 0.9rem; margin-bottom: 0.8rem; }
.tradusa-card h3 { margin: 0 0 0.25rem; font-weight: 500; font-size: 1.15rem; }
.tradusa-card p { margin: 0.35rem 0; }
.progres { height: 0.55rem; border: 1px solid var(--chenar); background: var(--foaie); margin: 0.5rem 0; }
.progres span { display: block; height: 100%; background: var(--roshu); min-width: 2px; }
a.buton { border: 1px solid var(--chenar); padding: 0.28rem 0.6rem; color: inherit; text-decoration: none; }
a.buton:hover { background: var(--hover); }
.tradusa-text { white-space: pre-wrap; border: 1px solid var(--chenar); background: var(--celula); padding: 0.8rem 1rem; line-height: 1.55; }
.istoric { margin-top: 1.2rem; }
.istoric summary { cursor: pointer; font-size: 1.15rem; color: var(--roshu); }
.istoric ul { list-style: none; padding: 0; margin: 0.5rem 0; display: grid; gap: 0.35rem; }
.istoric button { display: flex; flex-direction: column; gap: 0.1rem; width: 100%; text-align: left; background: var(--celula); }
.ist-i { font-size: 0.85rem; color: var(--sters); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 800px) { .pagina-dubla.cu-trad { grid-template-columns: 1fr; } }

/* derularea */
.foi { display: flex; flex-direction: column; gap: 0.9rem; }
.foaie-nr { margin: 0 0 0.25rem; font-size: 0.78rem; color: var(--sters); letter-spacing: 0.04em; }
.foi-capat { text-align: center; padding: 1rem 0 2rem; }
#foi-tradusa { margin-top: 0.5rem; }

/* caseta de traducere glisează */
.foaie { transition: max-width 0.35s ease; }
.pagina-dubla.cu-trad { transition: grid-template-columns 0.35s ease, gap 0.35s ease; }
.pagina-dubla.cu-trad > .trad { min-width: 0; overflow: hidden; transition: transform 0.35s ease, opacity 0.3s ease, visibility 0s linear 0s; }
.pagina-dubla.cu-trad.trad-ascuns { grid-template-columns: minmax(0, 1fr) 0fr; gap: 0; }
.pagina-dubla.cu-trad.trad-ascuns > .trad { transform: translateX(110%); opacity: 0; visibility: hidden; padding-left: 0; padding-right: 0; border-width: 0;
  transition: transform 0.35s ease, opacity 0.3s ease, padding 0.35s ease, visibility 0s linear 0.35s; }
.trad-ascunde { font-size: 1.1rem; line-height: 1; padding: 0.15rem 0.5rem; }
@media (max-width: 800px) { .pagina-dubla.cu-trad.trad-ascuns > .trad { display: none; } }

/* bara cititorului rămâne sus la derulare: Traducere și pagina curentă sunt mereu la îndemână */
.cititor > .bara-cit { position: sticky; top: 0; z-index: 5; background: var(--foaie); padding: 0.35rem 0; border-bottom: 1px solid var(--linie); }
.pagina-dubla.cu-trad > .trad { top: 3.3rem; max-height: calc(100vh - 3.8rem); }
.trad-unde { margin: 0; }

/* semnele de carte puse de mână */
.semn-form { flex-basis: 100%; }
.semn-rand { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; padding: 0.4rem 0.5rem; border: 1px solid var(--chenar); background: var(--celula); }
.semn-rand select, .semn-rand input { font: inherit; color: inherit; background: var(--foaie); border: 1px solid var(--chenar); padding: 0.2rem 0.35rem; }
.semn-rand #semn-zi { width: 4rem; }
.semn-rand #semn-titlu { flex: 1; min-width: 10rem; }
.semn-cifra { font-size: 1.25rem; color: var(--roshu); min-width: 2.2rem; }
.cuprins li { position: relative; }
.semn-x { position: absolute; right: 1.9rem; top: 0.15rem; border: none; font-size: 0.75rem; padding: 0.05rem 0.25rem; color: var(--sters); background: transparent; }
.semn-x:hover { color: var(--roshu); }

/* lunile din cuprins se pliază glisând */
.grupa-cap .sageata { display: inline-block; width: 1em; color: var(--roshu); transition: transform 0.25s ease; }
.grupa.deschis > .grupa-cap .sageata { transform: rotate(90deg); }
.grupa-cap { font-weight: 500; }
.grupa-n { font-style: normal; font-size: 0.75rem; color: var(--sters); margin-left: 0.4rem; }
.grupa-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s ease; }
.grupa.deschis > .grupa-sub { grid-template-rows: 1fr; }
.grupa-sub > ol, .grupa-sub > .grupa-zile { overflow: hidden; min-height: 0; list-style: none; margin: 0; padding: 0; }

/* săritul la zi: lunile stau la vedere, zilele lunii alese glisează dedesubt */
.sari-zi { margin: 0.75rem 0 0.3rem; padding: 0.55rem 0.7rem 0.4rem; border: 1px solid var(--chenar); background: var(--celula); min-width: 0; }
.sari-sus { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }
.sari-zi h3 { margin: 0; font-weight: 500; font-size: 1.05rem; color: var(--roshu); }
.sari-sus .comut { margin-left: 0; }
.sari-luni, .sari-zile { display: flex; gap: 0.28rem; }
.sari-luni { flex-wrap: wrap; margin-top: 0.45rem; }
.sari-luni button, .sari-zile button { padding: 0.16rem 0.45rem; font-size: 0.92rem; }
.sari-zile { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; margin-top: 0.35rem; padding-bottom: 0.35rem; scroll-behavior: smooth; position: relative; }
.sari-zile button { flex: 0 0 auto; min-width: 2.15rem; text-align: center; padding-left: 0.3rem; padding-right: 0.3rem; scroll-snap-align: start; }
.sari-zile { scroll-snap-type: x proximity; }
.sari-zile button.pe-pagina { background: var(--an-ales); }
.sari-zile.intra { animation: zile-intra 0.28s ease; }
@keyframes zile-intra { from { opacity: 0; transform: translateY(-0.45rem); } to { opacity: 1; transform: none; } }
.sari-nume { margin: 0.15rem 0 0.05rem; min-height: 1.35em; font-size: 0.95rem; }
.grupa-zile { padding: 0.15rem 0 0.25rem; }
.grupa-zile .sari-nume { font-size: 0.86rem; }
@media (max-width: 800px) {
  .sari-zi { padding: 0.45rem 0.5rem 0.3rem; }
  .sari-luni button, .sari-zile button { font-size: 0.86rem; }
}

/* asistentul de tipic: sertar care glisează din dreapta */
.as-maner { position: fixed; right: 0; top: 42%; z-index: 40; writing-mode: vertical-rl; transform: rotate(180deg);
  padding: 0.8rem 0.35rem; background: var(--roshu); color: var(--foaie); border: 1px solid var(--roshu);
  border-radius: 0 6px 6px 0; letter-spacing: 0.08em; font-size: 0.9rem; box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: right 0.3s ease; }
.as-maner:hover, .as-maner:focus-visible { background: var(--cerneala); outline-offset: 2px; }
body.cu-asistent .as-maner { right: min(460px, 100vw); }
.as-sertar { position: fixed; top: 0; right: 0; bottom: 0; z-index: 39; width: min(460px, 100vw);
  background: var(--foaie); border-left: 1px solid var(--chenar); box-shadow: -6px 0 18px rgba(0,0,0,0.18);
  display: flex; flex-direction: column; gap: 0.45rem; padding: 0.7rem 0.8rem;
  transform: translateX(105%); visibility: hidden;
  transition: transform 0.3s ease, visibility 0s linear 0.3s; }
.as-sertar.deschis { transform: none; visibility: visible; transition: transform 0.3s ease, visibility 0s; }
.as-sus { display: flex; align-items: center; justify-content: space-between; }
.as-sus h2 { margin: 0; font-weight: 500; font-size: 1.15rem; color: var(--roshu); }
.as-x { font-size: 1.2rem; line-height: 1; padding: 0.15rem 0.55rem; }
.as-zi { margin: 0; font-size: 0.92rem; }
.as-motor { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.as-comut { display: inline-flex; }
.as-comut button + button { border-left: 0; }
.as-motor select { font: inherit; color: inherit; background: var(--celula); border: 1px solid var(--chenar); padding: 0.2rem 0.3rem; max-width: 11rem; }
.as-bifa { font-size: 0.92rem; }
.as-conv { flex: 1; overflow: auto; border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); padding: 0.4rem 0.1rem; }
.as-bloc { margin-bottom: 0.9rem; }
.as-intreb { margin: 0 0 0.3rem; font-weight: 500; color: var(--roshu); }
.as-rasp { white-space: pre-wrap; line-height: 1.5; font-size: 0.97rem; }
.as-stare { display: block; color: var(--sters); font-size: 0.85rem; font-style: italic; }
.as-eroare { color: var(--roshu); font-size: 0.88rem; margin: 0.3rem 0; }
.as-surse { font-size: 0.85rem; margin-top: 0.3rem; color: var(--sters); }
.as-surse ul { margin: 0.25rem 0; padding-left: 1.1rem; }
.as-mic { font-size: 0.82rem; color: var(--sters); }
.as-copie { padding: 0.05rem 0.4rem; margin-top: 0.2rem; }
.as-form textarea { width: 100%; box-sizing: border-box; font: inherit; color: inherit; background: var(--celula);
  border: 1px solid var(--chenar); padding: 0.4rem 0.5rem; resize: vertical; }
.as-act { display: flex; gap: 0.4rem; align-items: center; margin-top: 0.3rem; }
@media (max-width: 520px) { body.cu-asistent .as-maner { right: auto; left: 0; transform: none; border-radius: 6px 0 0 6px; } }

/* ── Psaltirea audio: catismele zilei ── */
.cat-audio { margin: 0.5rem 0 0.2rem; padding: 0.5rem 0.65rem; border: 1px solid var(--linie);
  border-radius: 6px; background: var(--celula); }
.cat-cap { font-size: 0.8rem; color: var(--aur); margin-bottom: 0.3rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.cat-limba { display: inline-flex; border: 1px solid var(--linie); border-radius: 4px; overflow: hidden; }
.cat-l { font: inherit; font-size: 0.78rem; padding: 0.12rem 0.5rem; cursor: pointer; border: 0;
  background: var(--foaie); color: var(--cerneala); }
.cat-l + .cat-l { border-left: 1px solid var(--linie); }
.cat-l:hover { background: var(--hover); }
.cat-l.on { background: var(--an-ales); color: var(--roshu); font-weight: 600; }
.cat-rand { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin: 0.25rem 0; }
.cat-slujba { min-width: 7.5rem; font-weight: 600; font-size: 0.88rem; }
.cat-slujba small { font-weight: 400; color: var(--sters); }
.cat-sau { font-size: 0.78rem; color: var(--sters); margin: 0 0.15rem; }
.cat-b, .cat-audio select { font: inherit; font-size: 0.82rem; padding: 0.2rem 0.55rem; cursor: pointer;
  border: 1px solid var(--linie); border-radius: 4px; background: var(--foaie); color: var(--cerneala); }
.cat-b:hover { background: var(--hover); border-color: var(--aur); }
.cat-b.on { background: var(--an-ales); border-color: var(--aur); }
.cat-b.cat-toate { border-color: var(--aur); color: var(--roshu); font-weight: 600; }
.cat-player { position: fixed; left: 16px; bottom: 0.6rem; z-index: 900;
  width: min(430px, calc(100vw - 32px)); padding: 0.5rem 0.7rem; border-radius: 8px;
  background: var(--foaie); color: var(--cerneala); border: 1px solid var(--aur);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35); }
.cat-player[hidden] { display: none; }
.cat-player audio { width: 100%; height: 36px; display: block; }
.cat-player audio[hidden] { display: none; }
.cat-p-cap { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.3rem; font-size: 0.86rem; }
.cat-p-titlu { flex: 1; min-width: 0; color: var(--roshu); font-weight: 600; }
.cat-p-btn button, .cat-p-coada button { font: inherit; font-size: 0.8rem; cursor: pointer; padding: 0.1rem 0.45rem;
  border: 1px solid var(--linie); border-radius: 4px; background: var(--celula); color: var(--cerneala); }
.cat-p-btn button:disabled { opacity: 0.35; cursor: default; }
.cat-p-coada { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem; }
.cat-p-coada:empty { display: none; }
.cat-p-coada button.on { background: var(--an-ales); border-color: var(--aur); font-weight: 600; }
.cat-p-coada button.gata { opacity: 0.55; }
body.cu-player { padding-bottom: 7.5rem; }

/* ── Slujbele zilei în cărțile de slujbă (ortodox007) ── */
.slujbe-carti { margin-top: 1.2rem; padding-top: 0.7rem; border-top: 1px solid var(--linie); }
.slujbe-carti h3 { margin: 0 0 0.4rem; font-size: 1rem; color: var(--roshu); }
.sc-tab { display: grid; gap: 0.15rem 0; }
.sc-rand { display: grid; grid-template-columns: 6.8rem minmax(0, 1fr); gap: 0.4rem 0.9rem; padding: 0.3rem 0;
  line-height: 1.4; border-bottom: 1px dotted var(--linie); }
.sc-rand:last-child { border-bottom: 0; }
.cu-gr .sc-rand { grid-template-columns: 6.8rem minmax(0, 1fr) minmax(0, 1fr); }
.sc-cap { font-size: 0.75rem; color: var(--sters); font-variant: small-caps; letter-spacing: 0.03em; padding-bottom: 0.15rem; }
.sc-col { min-width: 0; overflow-wrap: anywhere; }
.sc-col a { overflow-wrap: anywhere; }
.sc-it + .sc-it { margin-top: 0.35rem; }
.sc-gol { color: var(--sters); }
.sc-athos { margin: 0.2rem 0 0.6rem; }
.sc-athos small { color: var(--sters); }
@media (max-width: 700px) {
  .cu-gr .sc-rand { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
  .cu-gr .sc-cap { display: none; }
  .cu-gr .sc-col { position: relative; padding-left: 1.9rem; }
  .cu-gr .sc-col::before { content: attr(data-l); position: absolute; left: 0; top: 0.2rem;
    font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--sters); }
}
.sc-carte { display: inline-block; min-width: 6.5rem; font-size: 0.78rem; color: var(--aur);
  font-variant: small-caps; letter-spacing: 0.02em; }
.sc-sursa { font-size: 0.8rem; color: var(--sters); margin: 0.5rem 0 0; }
.sc-sect { display: block; font-size: 0.85rem; margin-top: 0.1rem; color: var(--sters); }
.sc-sect a { color: var(--aur); }
.sc-sub { margin: 0.9rem 0 0.3rem; font-size: 0.92rem; color: var(--roshu); font-weight: normal; font-style: italic; }
.sc-nota { color: var(--sters); }

/* ── Apostolul și Evanghelia (din Calendarul Athos) ── */
.cit-ref { font-weight: 600; color: var(--roshu); }
.cit-text summary { cursor: pointer; font-size: 0.82rem; color: var(--aur); margin-top: 0.2rem; }
.cit-text div { white-space: pre-line; margin-top: 0.3rem; line-height: 1.5; }
.cit-sursa dd { font-size: 0.78rem; color: var(--sters); }
.la-athos { margin: 0.15rem 0 0.4rem; font-size: 0.86rem; }
.la-athos a { color: var(--aur); }
.varianta { margin: 0.2rem 0 0.4rem; font-size: 0.9rem; font-style: italic; color: var(--roshu); }
.text b.subtitlu { display: block; font-weight: 600; color: var(--roshu); }
.lacu { margin: 0.6rem 0 0.8rem; padding: 0.5rem 0.7rem; border: 1px solid var(--roshu); border-radius: 6px; }
.lacu h3 { margin: 0 0 0.3rem; font-size: 1rem; color: var(--roshu); }
.lacu-titlu { margin: 0.35rem 0 0.2rem; font-weight: 600; }
.lacu-f { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin: 0.15rem 0; }
.lacu-eti { min-width: 9.5rem; font-size: 0.9rem; }
.lacu-f audio { height: 2rem; flex: 1 1 14rem; max-width: 100%; }
.lacu-f a { text-decoration: none; }
.lacu-slujba + .lacu-slujba { border-top: 1px dotted var(--roshu); margin-top: 0.4rem; padding-top: 0.2rem; }
.lacu-lista summary { cursor: pointer; font-size: 0.9rem; }
.lacu-lista ol { margin: 0.3rem 0; padding-left: 1.6rem; columns: 2 16rem; font-size: 0.9rem; }
.lacu-p { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; text-align: left; font: inherit; }
.lacu-p:hover { text-decoration: underline; }
.lacu-p.on { color: var(--roshu); font-weight: 600; }
