/* PASSAGES AND SKETCHBOOKS (@ovi 2026-10-31). See passage.js. Every colour pair is chosen here, light text on a dark card, so it reads on any page theme. */
.ps-wrap { position: fixed; inset: 0; z-index: 2147483640; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,.62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.ps-card { width: min(100%, 520px); max-height: 90vh; overflow-y: auto; -webkit-overflow-scrolling: touch; box-sizing: border-box;
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); background: #17171a; color: #f2f2f3; border-radius: 16px 16px 0 0;
  font: 400 15px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
@media (min-width: 700px) { .ps-wrap { align-items: center; } .ps-card { border-radius: 16px; } }
.ps-card h3 { margin: 0 0 10px; font-size: 17px; font-weight: 700; }
.ps-card blockquote.ps-q { color: #f2f2f3 !important; margin: 0 0 10px; padding: 8px 12px; border-left: 3px solid #e0b341; background: rgba(255,255,255,.07); border-radius: 0 8px 8px 0;
  font: italic 400 14.5px/1.5 Georgia, "Times New Roman", serif; max-height: 24vh; overflow-y: auto; }
.ps-note, .ps-search { width: 100%; box-sizing: border-box; margin: 0 0 12px; padding: 11px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.07); color: #f2f2f3; font: inherit; resize: vertical; }
.ps-note::placeholder, .ps-search::placeholder { color: rgba(242,242,243,.55); }
.ps-main { display: block; width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 0; background: #f2f2f3; color: #111; font: 700 15px/1.25 inherit; cursor: pointer; text-align: center; }
.ps-main:disabled, .ps-nb:disabled, .ps-ghost:disabled { opacity: .5; }
.ps-busy::after { content: "…"; }
.ps-or { margin: 16px 0 8px; color: rgba(242,242,243,.7); font-size: 13px; }
.ps-from { margin: 12px 0 4px; font-weight: 700; font-size: 13px; color: rgba(242,242,243,.8); }
.ps-list { max-height: 36vh; overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 6px; }
.ps-dim { color: rgba(242,242,243,.65); font-size: 13.5px; padding: 6px 2px; }
.ps-dim a { color: #9fe; }
.ps-nb, .ps-bk, .ps-mk { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 46px; padding: 9px 12px; text-align: left;
  border-radius: 10px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: #f2f2f3; font: inherit; cursor: pointer; }
.ps-nb { flex-direction: row; align-items: center; gap: 10px; }
.ps-nb .ps-t, .ps-bk .ps-t { flex: 1 1 auto; font-weight: 600; }
.ps-s { color: rgba(242,242,243,.6); font-size: 12.5px; }
.ps-cloth { width: 14px; height: 30px; border-radius: 3px; flex: none; background: #222; }
.ps-c-claret { background: #6d1f2c; } .ps-c-forest { background: #1f4a34; } .ps-c-navy { background: #1d2f55; } .ps-c-tan { background: #9a7a4a; } .ps-c-plum { background: #54295f; } .ps-c-black { background: #2a2a2e; }
.ps-row { display: flex; gap: 8px; margin-top: 14px; }
.ps-ghost { flex: 1 1 0; min-height: 44px; border-radius: 10px; border: 1px solid rgba(255,255,255,.28); background: transparent; color: #f2f2f3; font: 600 14px/1 inherit; cursor: pointer; }

/* placing a passage: a bar under the sketchbook's top bar */
.ps-place { position: fixed; left: 8px; right: 8px; top: calc(env(safe-area-inset-top) + 62px); z-index: 2147483500; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; border-radius: 12px; background: #17171a; color: #f2f2f3; box-shadow: 0 6px 24px rgba(0,0,0,.45); font: 400 13.5px/1.35 ui-sans-serif, system-ui, sans-serif; }
.ps-pt { display: flex; flex-direction: column; flex: 1 1 200px; } .ps-pt span { color: rgba(242,242,243,.75); font-size: 12.5px; }
.ps-pa { display: flex; gap: 6px; }
.ps-pa button { min-height: 40px; padding: 0 12px; border-radius: 9px; border: 1px solid rgba(255,255,255,.3); background: transparent; color: #f2f2f3; font: 600 13px/1 inherit; cursor: pointer; }
.ps-pa button[data-ps="end"] { background: #f2f2f3; color: #111; border-color: #f2f2f3; }

/* a toast, the way back to the book, and the hint while a book is open to take a passage */
.ps-toast { position: fixed; left: 12px; right: 12px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 2147483645; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  padding: 11px 14px; border-radius: 12px; background: #17171a; color: #f2f2f3; box-shadow: 0 6px 24px rgba(0,0,0,.5); font: 500 14px/1.35 ui-sans-serif, system-ui, sans-serif; }
.ps-toast button { min-height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid rgba(255,255,255,.35); background: #f2f2f3; color: #111; font: 700 13px/1 inherit; cursor: pointer; }
.ps-back { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 2147483520; min-height: 42px; padding: 0 16px; border-radius: 21px;
  border: 1px solid rgba(255,255,255,.35); background: #17171a; color: #f2f2f3; font: 600 13.5px/1 ui-sans-serif, system-ui, sans-serif; box-shadow: 0 4px 18px rgba(0,0,0,.4); cursor: pointer; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-hint { position: fixed; left: 8px; right: 8px; top: calc(env(safe-area-inset-top) + 58px); z-index: 2147483650; padding: 9px 12px; border-radius: 12px; background: #17171a; color: #f2f2f3;
  font: 400 13.5px/1.4 ui-sans-serif, system-ui, sans-serif; box-shadow: 0 6px 24px rgba(0,0,0,.45); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.ps-hint button { min-height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.3); background: transparent; color: #f2f2f3; font: 600 12.5px/1 inherit; cursor: pointer; }

/* a passage on a leaf of a sketchbook, and anywhere a sketchbook is read */
.ovi-passage { margin: .8em 0; padding: .25em 0 .25em .9em; border-left: 3px solid currentColor; font-style: normal; }
.ovi-passage p { margin: .25em 0; }
.ovi-passage .ovi-pnote { opacity: 1; }
.ovi-passage .ovi-pnote::before { content: "\270E  "; opacity: .55; }
.ovi-passage .ovi-psrc { font-size: .82em; opacity: .7; }
