/* The films right to left (Hebrew). Linked only from a right-to-left film page (site/films_i18n.py), after the
   player's own styles.
   What mirrors: the text and the wash behind it, the paper beside it, the menu, the controls, the chapter marks.
   What never mirrors: the drawings, photographs and scans, the stone's plate, the shop sign's board, the German
   calendar pages. */

/* Hebrew type: Frank Ruhl Libre; no italics, no letter-spacing, no capitals. Latin inside it stays upright too. */
:root { --serif: "Frank Ruhl Libre", "Spectral", Georgia, serif; --mono: "Frank Ruhl Libre", "Courier Prime", "Courier New", monospace; }
html[dir=rtl] body *:not(.plate, .plate *, .board, .board *, .sheet.ger, .sheet.ger *, [lang=de], .scap .de, .fmenu h3, .inv li, .md, .md *) {
  letter-spacing: 0 !important; text-transform: none !important; font-style: normal !important; }
html[dir=rtl] .inv li span { letter-spacing: 0; font-style: normal; }
html[dir=rtl] .chapters button:hover::before { letter-spacing: 0; left: auto; right: 0; }
html[dir=rtl] .pnav button, html[dir=rtl] .pnav kbd, html[dir=rtl] .pnhow h2, html[dir=rtl] .pnhow dt, html[dir=rtl] .pnhow .ok { font-family: var(--serif); }

/* What stays left to right: the plate on the stone, the German calendar, the words of the papers, the transcriptions. */
html[dir=rtl] .plate, html[dir=rtl] .board, html[dir=rtl] .sheet.ger, html[dir=rtl] [lang=de], html[dir=rtl] .md { direction: ltr; }
html[dir=rtl] .md { text-align: left; }
html[dir=rtl] .scap .de, html[dir=rtl] .scap .en, html[dir=rtl] .fmenu h3 { unicode-bidi: plaintext; }
/* A line that may be all Latin (a paper's own words, a directory entry) reads in its own direction. */
html[dir=rtl] .doc .tr, html[dir=rtl] .vtext .en, html[dir=rtl] .vtext h2 { unicode-bidi: plaintext; text-align: start; }
/* The pocket inventory: the policeman's German line, and under it the Hebrew. */
html[dir=rtl] .inv li { direction: ltr; text-align: right; }
html[dir=rtl] .inv li span { direction: rtl; }
/* The calendar page of the film's own language is a Hebrew page. */
html[dir=rtl] .sheet.eng, html[dir=rtl] .sheet.eng * { font-family: "Frank Ruhl Libre", "Old Standard TT", Georgia, serif; }

/* The text box and the wash behind it: on the right. The paper and the photographs: on the left. */
html[dir=rtl] .text { left: auto; right: clamp(16px, 5vw, 80px); }
html[dir=rtl] .doc, html[dir=rtl] .prints { right: auto; left: clamp(16px, 5vw, 80px); }
@media (min-width: 761px) {
  html[dir=rtl] .wash { background: linear-gradient(270deg, rgba(0,0,0,.86) 0%, rgba(0,0,0,.6) 30%, transparent 56%); }
}
html[dir=rtl] .stone .sopen { left: 16px; right: 16px; }

/* The viewer: the page on the right, its words on the left. */
html[dir=rtl] .vtext { padding: 56px 12px 40px 36px; }
html[dir=rtl] .vtext .en { margin: .4em 16px 1.2em 0; }
html[dir=rtl] .vclose { right: auto; left: 14px; }

/* Controls, the way back, the chapter marks, the buttons at the foot. */
html[dir=rtl] .controls { right: auto; left: 14px; }
html[dir=rtl] .backlink { left: auto; right: 14px; }
html[dir=rtl] .chapters { left: auto; right: clamp(16px, 5vw, 80px); }
html[dir=rtl] .chapters .chnow { margin-left: 0; margin-right: 14px; }
html[dir=rtl] .pnav { right: auto; left: clamp(16px, 3vw, 40px); }
html[dir=rtl] .ending .names span { margin-left: 0; margin-right: .8em; }
html[dir=rtl] .stone .next small { margin-left: 0; margin-right: .6em; }

/* The menu slides in from the left. */
html[dir=rtl] .fmenu { right: auto; left: 0; border-left: 0; border-right: 1px solid rgba(233,226,212,.12); }
html[dir=rtl] .fmenu:not(.on) { transform: translateX(-102%); }
html[dir=rtl] .fmenu .fm-close { float: left; }
html[dir=rtl] .fmenu [data-ch] { text-align: right; border-left: 0; border-right: 3px solid transparent; }
html[dir=rtl] .fmenu [data-ch].on { border-right-color: var(--accent); }

@media (max-width: 760px) {
  html[dir=rtl] .pausednote { left: auto; right: 16px; }
  html[dir=rtl] .doc, html[dir=rtl] .prints { right: auto; left: 16px; }
  html[dir=rtl] .vtext { padding: 56px 16px 24px; }
}
