/* Reading Notes app (/work/tools/reading): Evie's own reading record, as plain as a newspaper page — the name between rules,
   every read set on the page like a column (headline, the date read, the photo whole); one read is its PDF itself with her
   highlights painted on it and her side notes shown when the pointer rests on one. Nothing else.
   The top bar and the gate are the Songbook's (body.sb-page in style.css); everything inside the app is here. */
.rd-page {
  --ink: #1b1a17; --ink-2: #4a4740; --ink-3: #7c776c; --rule: #1b1a17; --hair: rgba(27, 26, 23, .18); --paper: #fbf9f4;
  --sheet: #f5f1e6; --sheet-2: #fbf9f2; --card: #fff; --frame: #fff; --pdf: none;
  --rd-serif: "Merriweather", Georgia, "Songti TC", "Noto Serif TC", "PMingLiU", serif;
  --rd-text: Georgia, "Times New Roman", "Songti TC", "Noto Serif TC", "PMingLiU", serif;
  --rd-sans: "Karla", "Helvetica Neue", "PingFang TC", "Noto Sans TC", Arial, sans-serif;
  /* the four mark colours, as a highlighter pen on newsprint */
  --vocab: rgba(250, 214, 92, .55); --vocab-dot: #d9a600;
  --key: rgba(240, 128, 112, .38); --key-dot: #c8432f;
  --love: rgba(120, 178, 214, .38); --love-dot: #2f78ad;
  --ask: rgba(170, 140, 205, .36); --ask-dot: #7b55a6;
}
body.rd-page { --desk: #dcd6c8; --desk-ink: #333; background: var(--desk); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.rd-page { --desk: #0d1716; --desk-ink: #e3e9e6; } }   /* the site's deep green */
:root[data-theme="dark"] body.rd-page { --desk: #0d1716; --desk-ink: #e3e9e6; }
.rd-page .sb-top { color: var(--desk-ink); }
.reading-app { flex: 1; min-height: 0; overflow-y: auto; color: var(--ink); font: 17px/1.65 var(--rd-text); background: var(--paper); }
.reading-app button, .reading-app textarea { font: inherit; color: inherit; }
.reading-app a { color: inherit; }
.reading-app :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.rd-paper { max-width: 1100px; margin: 0 auto; padding: 8px 48px 64px; }

/* ---- The front page is a sheet of newsprint lying on the desk: off-white, a little grain, a fold across the middle ---- */
.reading-app { background: var(--desk); }
.reading-app[data-v="home"] .rd-paper { position: relative; max-width: 1080px; min-height: calc(100% - 64px); margin: 28px auto 36px; padding: 34px 46px 56px;
  background-color: var(--sheet);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .27 0 0 0 0 .2 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  box-shadow: 0 1px 1px rgba(40, 32, 18, .12), 0 6px 14px rgba(40, 32, 18, .12), 0 22px 48px rgba(40, 32, 18, .16); }
.reading-app[data-v="home"] .rd-paper::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 26px; transform: translateY(-50%); pointer-events: none;
  background: linear-gradient(to bottom, rgba(40, 32, 18, 0), rgba(40, 32, 18, .045) 48%, rgba(255, 255, 255, .5) 52%, rgba(255, 255, 255, 0)); }

/* the name between rules */
.rd-mast { text-align: center; border-top: 3px solid var(--rule); border-bottom: 1px solid var(--rule); box-shadow: 0 3px 0 -2px var(--sheet), 0 4px 0 -2px var(--rule); }
.rd-name { display: block; padding: 8px 0 10px; font: 900 40px/1.05 var(--rd-serif); letter-spacing: .02em; text-decoration: none; }
html[lang="zh-Hant"] .rd-name { letter-spacing: .3em; padding-left: .3em; font-weight: 700; }
.rd-doc { padding-top: 32px; }
.rd-empty { margin-top: 32px; font-style: italic; color: var(--ink-3); text-align: center; }

/* front page: one newspaper page, every read a column between column rules; the photos are never cropped */
.rd-front { column-count: 3; column-gap: 36px; column-rule: 1px solid var(--hair); }
.rd-col { display: block; break-inside: avoid; margin-bottom: 32px; text-decoration: none; }
.rd-col img { display: block; width: 100%; height: auto; margin-top: 10px; border: 1px solid var(--hair); }
.rd-hed-s { margin: 0; font: 900 18px/1.3 var(--rd-serif); }
.rd-col:hover .rd-hed-s { text-decoration: underline; text-underline-offset: 4px; }
.rd-date { margin: 6px 0 0; font: 12px/1.4 var(--rd-sans); letter-spacing: .06em; color: var(--ink-3); }

/* a section of Evie's own under the PDF */
.rd-aside { max-width: 760px; margin: 40px auto 0; padding: 18px 28px 22px; background: var(--sheet); box-shadow: 0 1px 1px rgba(40, 32, 18, .12), 0 6px 14px rgba(40, 32, 18, .1); }
.rd-aside h2 { margin: 0 0 10px; padding-bottom: 6px; font: 700 20px/1.3 var(--rd-serif); border-bottom: 3px double var(--rule); }
.rd-aside p { margin: 0; font: 17px/1.8 var(--rd-text); white-space: pre-wrap; }
.rd-aside p + p, .rd-aside p + .rd-aside-note, .rd-aside-note + p { margin-top: 12px; }
/* a note of hers on the words above: set in, smaller, a topic to a line */
.rd-aside-note { margin-left: 4px; padding: 2px 0 2px 16px; border-left: 2px solid var(--hair); }
.rd-aside-note p { font-size: 15px; line-height: 1.75; color: var(--ink-2); }
.rd-aside-note p + p { margin-top: 6px; }

/* ---- A read in focus takes 95% of the screen's width under the site's bar; the paper shows dimmed around it, and a click
        there goes back to the whole paper ---- */
.rd-veil { position: fixed; z-index: 39; inset: 52px 0 0; background: rgba(40, 32, 18, .3); cursor: zoom-out; }
.rd-full { position: fixed; z-index: 40; top: 52px; bottom: 2.5vh; left: 2.5vw; right: 2.5vw; overflow-y: auto; padding: 22px 28px 14px; background-color: var(--sheet);
  box-shadow: 0 2px 4px rgba(40, 32, 18, .18), 0 14px 40px rgba(40, 32, 18, .28);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .27 0 0 0 0 .2 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
html.rd-reading, html.rd-reading body { overflow: hidden; }
::view-transition-group(rd-zoom) { animation-duration: .42s; animation-timing-function: cubic-bezier(.22, .8, .24, 1); }
::view-transition-old(rd-zoom), ::view-transition-new(rd-zoom) { height: 100%; object-fit: cover; object-position: top; }
/* the left column: the photo pasted on, and under it the whole paper in small with the read in focus framed */
.rd-side { position: sticky; top: 0; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.rd-map { width: clamp(110px, 16.5vh, 150px); padding: 10px 10px 12px; background: var(--sheet-2); box-shadow: 0 1px 1px rgba(40, 32, 18, .14), 0 6px 14px rgba(40, 32, 18, .14); }
.rd-map-name { display: block; padding: 3px 0 4px; margin-bottom: 6px; font: 700 12px/1 var(--rd-serif); letter-spacing: .25em; text-align: center; text-decoration: none;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
.rd-map-cols { column-count: 3; column-gap: 3px; }   /* a waterfall, as on the front page: the photos run on with no space between them */
.rd-map-col { position: relative; display: block; break-inside: avoid; padding: 0; text-decoration: none; opacity: .6; outline: 1px solid transparent; transition: opacity .15s; }
.rd-map-col:hover { opacity: 1; outline-color: var(--hair); }
.rd-map-col i { display: block; height: 3px; margin-bottom: 2px; background: var(--ink-2); }
.rd-map-col i + i { width: 60%; margin-bottom: 2px; }
.rd-map-col img { display: block; width: 100%; height: auto; }
.rd-map-col.here { z-index: 1; opacity: 1; outline: 2px solid #c8432f; outline-offset: 0; }
.rd-map-col b { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); padding: 2px 4px; background: var(--sheet-2); font: 700 9px/1 var(--rd-sans); letter-spacing: .08em; color: #c8432f; white-space: nowrap; }
.rd-story { position: relative; }
.rd-story-head { position: relative; padding: 0 44px 12px; margin-bottom: 18px; text-align: center; border-bottom: 1px solid var(--hair); }
.rd-hed { margin: 0; font: 900 28px/1.25 var(--rd-serif); }
html[lang="zh-Hant"] .rd-hed, html[lang="zh-Hant"] .rd-hed-s { font-weight: 700; }
.rd-story-head .rd-date { margin-top: 6px; }
.rd-out { position: absolute; top: 0; right: 0; width: 32px; height: 32px; padding: 0; display: grid; place-items: center; text-decoration: none;
  border: 1px solid var(--ink-30, rgba(27, 26, 23, .3)); border-radius: 999px; background: var(--glass, transparent); color: var(--ink) !important; }
.rd-out:hover, .rd-out:focus-visible { border-color: var(--ink); }
/* its name, shown under it on hover (the site's icon buttons are round and quiet; this one says what it does) */
.rd-out::after { content: attr(data-tip); position: absolute; top: calc(100% + 8px); right: 0; padding: 6px 10px; border-radius: 6px; white-space: nowrap;
  background: var(--ink); color: var(--sheet); font: 13px/1.3 var(--rd-sans); letter-spacing: .02em; pointer-events: none;
  opacity: 0; transform: translateY(-2px); transition: opacity .15s, transform .15s; }
.rd-out:hover::after { opacity: 1; transform: none; transition-delay: .25s; }
/* the photo of the original pasted on the left with a strip of tape, at Flickr's default size; it stays in view as the PDF scrolls */
.rd-story-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 26px; align-items: start; }
/* the photo cut out of the paper: no frame, scissor-cut edges a little off straight, lifted off the page by its shadow */
.rd-clip { position: relative; margin: 8px 0 0 4px; padding: 0; transform: rotate(-2deg);
  filter: drop-shadow(0 1px 1.5px rgba(40, 32, 18, .28)) drop-shadow(0 8px 14px rgba(40, 32, 18, .2)); }
.rd-clip img { clip-path: polygon(0.6% 0.9%, 21% 0.2%, 47% 0.8%, 74% 0, 99.6% 0.7%, 99% 22%, 100% 48%, 99.2% 76%, 99.8% 99.4%, 72% 100%, 44% 99.2%, 18% 99.9%, 0.2% 99.3%, 0.9% 71%, 0 44%, 0.7% 19%); }
.rd-clip::before { content: ""; position: absolute; top: -9px; left: 50%; width: 70px; height: 20px; transform: translateX(-50%) rotate(2deg);
  background: rgba(236, 226, 196, .8); box-shadow: 0 1px 2px rgba(40, 32, 18, .18); }
.rd-clip img { display: block; width: auto; height: auto; max-width: min(240px, 17vw); max-height: min(400px, 25vh); }   /* the photo and the small paper fit the screen with the pages: no scrolling */
/* the PDF itself, English on the left and Chinese on the right, to be read side by side (on a phone, zoom in) */
.rd-pdfview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rd-full .rd-pdfview { max-width: calc((97.5vh - 224px) / 1.4143 * 2 + 12px); margin: 0 auto; }   /* the pages as tall as the screen allows, no taller */
.rd-sheet { position: relative; background: var(--card); box-shadow: 0 0 0 1px var(--hair), 0 6px 18px rgba(27, 26, 23, .1); }
.rd-sheet img { display: block; width: 100%; height: auto; filter: var(--pdf); }
/* each read's pages on white notebook paper: a faint grain, the corners not quite square, lifted off the desk */
.rd-pdfview .rd-sheet, .rd-sheet.rd-big-pic:not(.rd-nb-sheet) { background-color: var(--nb-paper); border-radius: 2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .42 0 0 0 0 .36 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  box-shadow: 0 1px 1px rgba(40, 32, 18, .12), 0 3px 6px rgba(40, 32, 18, .1), 0 14px 28px rgba(40, 32, 18, .12); }
.rd-pdfview .rd-sheet img, .rd-sheet.rd-big-pic:not(.rd-nb-sheet) img { mix-blend-mode: multiply; }
.rd-page { --nb-paper: #fffefa; }
/* Evie's highlights painted on the PDF; the ones with a side note are underlined, and resting on one shows the note */
.rd-hit { position: absolute; mix-blend-mode: multiply; border-radius: 1px; }
.rd-hit[data-c="vocab"] { background: var(--vocab); }
.rd-has { cursor: help; box-shadow: inset 0 -2px 0 rgba(27, 26, 23, .55); }
.rd-has.on { outline: 2px solid rgba(27, 26, 23, .55); outline-offset: 1px; }
.rd-has:focus { outline: 2px solid var(--ink); }
/* the note: it stays while the pointer is on it, so its words can be selected and copied */
.rd-pop { position: absolute; z-index: 10; width: max-content; max-width: min(460px, 90vw); padding: 10px 14px; background: var(--card); border: 1px solid var(--ink);
  box-shadow: 3px 3px 0 rgba(27, 26, 23, .18); font: 15px/1.6 var(--rd-text); white-space: pre-wrap; user-select: text; cursor: text; }
.rd-pop[hidden] { display: none; }
.rd-pop hr { margin: 10px 0; border: 0; border-top: 1px solid var(--ink); }

/* marks */
.rd-m { color: inherit; padding: 1px 0; cursor: pointer; }
.rd-vocab { background: var(--vocab); } .rd-key { background: var(--key); } .rd-love { background: var(--love); } .rd-ask { background: var(--ask); }
.rd-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.rd-dot.rd-vocab { background: var(--vocab-dot); } .rd-dot.rd-key { background: var(--key-dot); } .rd-dot.rd-love { background: var(--love-dot); } .rd-dot.rd-ask { background: var(--ask-dot); }
.rd-tool { position: fixed; z-index: 20; display: flex; padding: 3px; background: var(--card); border: 1px solid var(--ink); box-shadow: 3px 3px 0 rgba(27, 26, 23, .18); }
.rd-tool[hidden] { display: none; }
.rd-tool button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; font: 13px var(--rd-sans) !important; white-space: nowrap; background: none; border: 0; cursor: pointer; }
.rd-tool button:hover { background: rgba(27, 26, 23, .06); }
.rd-tool button[data-c=""] { color: var(--ink-2); border-left: 1px solid var(--hair); }

/* only when side notes were changed in this browser */
.rd-foot { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 48px; font: italic 13px var(--rd-text); color: var(--ink-3); }
.rd-foot[hidden] { display: none; }
.rd-dl { padding: 3px 10px; font: 700 12px var(--rd-sans) !important; letter-spacing: .08em; background: none; border: 1px solid var(--ink); cursor: pointer; }

@media (max-width: 1000px) {
  .rd-paper { padding: 8px 28px 56px; }
  .rd-front { column-count: 2; }
}
@media (max-width: 760px) {
  .rd-paper { padding: 4px 16px 48px; }
  .reading-app[data-v="home"] .rd-paper { margin: 12px 10px 24px; padding: 20px 18px 36px; }
  .rd-pdfview { gap: 6px; }
  .rd-full { left: 3vw; right: 3vw; padding: 14px 10px 32px; }
  .rd-side { position: static; }
  .rd-map { width: 160px; }
  .rd-story-head { padding: 0 40px 10px; }
  .rd-hed { font-size: 21px; }
  .rd-story-body { grid-template-columns: minmax(0, 1fr); }
  .rd-clip { position: static; justify-self: center; }
  .rd-clip img { max-width: min(375px, 80vw); }
  .rd-name { font-size: 30px; }
  .rd-hed { font-size: 24px; }
  .rd-front { column-count: 1; }
}

/* ---- Dark: the newsprint turns to the deep green; the PDF pages stay paper, a little dimmed ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .rd-page { --ink: #e6e1d3; --ink-2: rgba(230, 225, 211, .78); --ink-3: rgba(230, 225, 211, .55); --rule: #e6e1d3; --hair: rgba(230, 225, 211, .18); --paper: #0d1716; --sheet: #152321; --sheet-2: #1a2a27; --card: #1b2b28; --frame: #e4dfd2; --pdf: brightness(.86) contrast(1.04); --vocab: rgba(250, 214, 92, .4); --key: rgba(240, 128, 112, .34); --love: rgba(120, 178, 214, .34); --ask: rgba(170, 140, 205, .34); }
  :root:not([data-theme="light"]) .rd-paper::after { opacity: .35; }
}
:root[data-theme="dark"] .rd-page { --ink: #e6e1d3; --ink-2: rgba(230, 225, 211, .78); --ink-3: rgba(230, 225, 211, .55); --rule: #e6e1d3; --hair: rgba(230, 225, 211, .18); --paper: #0d1716; --sheet: #152321; --sheet-2: #1a2a27; --card: #1b2b28; --frame: #e4dfd2; --pdf: brightness(.86) contrast(1.04); --vocab: rgba(250, 214, 92, .4); --key: rgba(240, 128, 112, .34); --love: rgba(120, 178, 214, .34); --ask: rgba(170, 140, 205, .34); }
:root[data-theme="dark"] .rd-paper::after { opacity: .35; }

/* a picture or a PDF page over the whole screen: fitted, then at full size to scroll around (a click switches) */
.rd-clip img, .rd-pdfview .rd-sheet { cursor: zoom-in; }
.rd-pdfview .rd-hit.rd-has { cursor: help; }
.rd-big { position: fixed; inset: 0; z-index: 9; background: rgba(20, 20, 20, .9); opacity: 0; transition: opacity .18s ease; cursor: zoom-out; }
.rd-big.on { opacity: 1; }
.rd-big ~ .rd-pop, .rd-story > .rd-pop { z-index: 12; }
html.rd-bigged .rd-full { overflow: hidden; }
.rd-big-stage { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; overscroll-behavior: contain; }
.rd-big-pic { display: block; cursor: zoom-in; box-shadow: 0 10px 40px rgba(0, 0, 0, .45); }
img.rd-big-pic { max-width: 96vw; max-height: 96vh; width: auto; height: auto; }
.rd-sheet.rd-big-pic { height: auto; width: min(96vw, calc(96vh * 1786 / 2526)); }
.rd-big.full .rd-big-stage { overflow: auto; place-items: start center; }
.rd-big.full .rd-big-pic { cursor: zoom-out; margin: 3vh auto; }
.rd-big.full img.rd-big-pic { max-width: none; max-height: none; }
.rd-big.full .rd-sheet.rd-big-pic { height: auto; width: min(1200px, 94vw); max-width: none; }
.rd-big-x { position: fixed; top: 16px; right: 16px; z-index: 1; background: rgba(20, 20, 20, .55) !important; border-color: rgba(255, 255, 255, .45) !important; color: #fff !important; }
.rd-big-x:hover { border-color: #fff !important; }
.rd-big-x::after { background: #fff; color: #1b1a17; }

/* her section taped into the page's empty space: a slip of paper with green tape, sized with the page (cqw) so it reads like
   part of it, and grows with it in the full-screen view */
.rd-sheet { container-type: inline-size; }
.rd-pin { --r: 1.2deg; position: absolute; padding: 3.2cqw 3cqw 2.6cqw; background: var(--slip); color: var(--ink); transform: rotate(var(--r)); cursor: zoom-in;
  transform-origin: 50% 0; transition: transform .3s cubic-bezier(.3, .7, .3, 1), box-shadow .3s;
  box-shadow: 0 .2cqw .5cqw rgba(40, 32, 18, .18), 0 1.4cqw 3cqw rgba(40, 32, 18, .16); }
.rd-pin::before { content: ""; position: absolute; top: -1.8cqw; left: 50%; width: 20cqw; height: 4.2cqw; transform: translateX(-50%) rotate(-2.5deg);
  background: var(--tape-green); box-shadow: 0 .15cqw .4cqw rgba(40, 32, 18, .15); }
.rd-pin h2 { margin: 0 0 1.2cqw; padding-bottom: .6cqw; font: 700 2.3cqw/1.3 var(--rd-serif); border-bottom: 3px double var(--rule); }
.rd-pin p { margin: 0; font: 1.6cqw/1.6 var(--rd-text); }
html[lang="en"] .rd-pin p { font-size: 1.5cqw; line-height: 1.55; }
.rd-pin p + p, .rd-pin p + .rd-aside-note, .rd-pin .rd-aside-note + p { margin-top: 1cqw; }
.rd-pin .rd-aside-note { margin: 1cqw 0 0; padding: .1cqw 0 .1cqw 1.4cqw; border-left: 2px solid var(--hair); }
.rd-pin .rd-aside-note p { font-size: 1.36cqw; color: var(--ink-2); }
html[lang="en"] .rd-pin .rd-aside-note p { font-size: 1.32cqw; }
.rd-pin .rd-aside-note p + p { margin-top: .5cqw; }
.rd-page { --slip: #fffdf6; --tape-green: rgba(126, 178, 142, .78); }
/* the page stays paper in the dark, so the slip on it does too: the same dimmed paper, the light theme's inks */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rd-page { --nb-paper: #e9e5da; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rd-pin { --slip: #e4dfd2; --ink: #1b1a17; --ink-2: #4a4740; --rule: #1b1a17; --hair: rgba(27, 26, 23, .18); } }
:root[data-theme="dark"] .rd-page { --nb-paper: #e9e5da; }
:root[data-theme="dark"] .rd-pin { --slip: #e4dfd2; --ink: #1b1a17; --ink-2: #4a4740; --rule: #1b1a17; --hair: rgba(27, 26, 23, .18); }

/* ---- Notebooks: reads kept as notebook pages (reading-notes/notebook) lie on the desk under the newspaper, one notebook to a
   section: ruled paper, a red margin, punched holes; every read in it is its first page with its title ---- */
.rd-desk { max-width: 1080px; margin: 0 auto 48px; }
.rd-desk:empty { display: none; }
/* French Learning's page: the notebooks alone on the desk, no newspaper (its name is the page's title, so the notebook's isn't repeated) */
.rd-no-news .rd-mast, .rd-no-news .rd-front, .rd-no-news .rd-nb-name { display: none; }
.reading-app.rd-no-news[data-v="home"] .rd-paper { min-height: 0; margin: 0 auto; padding: 0; background: none; box-shadow: none; }
.reading-app.rd-no-news[data-v="home"] .rd-paper::after { display: none; }
.rd-no-news .rd-desk { margin-top: 28px; }
.rd-nb { position: relative; padding: 26px 40px 30px 74px; background-color: #fdfbf4;
  background-image: linear-gradient(to right, transparent 54px, #e59a9a 54px, #e59a9a 55px, transparent 55px),
    repeating-linear-gradient(to bottom, transparent 0 27px, #bfd0e4 27px 28px);
  box-shadow: 0 1px 1px rgba(40, 32, 18, .12), 0 6px 14px rgba(40, 32, 18, .12), 0 22px 48px rgba(40, 32, 18, .16); color: #1b1a17; }
.rd-nb::before { content: ""; position: absolute; left: 20px; top: 40px; bottom: 40px; width: 14px;
  background: radial-gradient(circle at 7px 7px, var(--desk) 6px, rgba(40, 32, 18, .25) 6.5px, transparent 7.5px) 0 0 / 14px 120px repeat-y; }
.rd-nb + .rd-nb { margin-top: 32px; }
.rd-nb-name { margin: 0 0 22px; font: 900 30px/1.2 var(--rd-serif); }
.rd-nb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px; }
.rd-nb-item { margin: 0; }
.rd-nb-item img { margin: 0 0 10px; transform: rotate(-1deg); box-shadow: 0 2px 6px rgba(40, 32, 18, .18); }
.rd-nb-item .rd-hed-s { font-size: 16px; }
/* a notebook read in focus: its pages one under another, at reading width */
.rd-kicker { margin: 0 0 4px; font: 700 12px/1.3 var(--rd-sans); letter-spacing: .14em; text-transform: uppercase; color: #b5412f; }
.rd-nbview { display: flex; flex-direction: column; gap: 22px; max-width: 1180px; margin: 0 auto; }
/* the pages lie on their side: full screen fits them by their own shape */
.rd-sheet.rd-nb-sheet.rd-big-pic { width: min(96vw, calc(96vh * 297 / 210)); }
.rd-big.full .rd-sheet.rd-nb-sheet.rd-big-pic { width: min(1700px, 94vw); }
.rd-nbview .rd-sheet { cursor: text; container-type: inline-size; }
/* the page's words over its picture, see-through but there to select and copy */
.rd-nb-text { position: absolute; inset: 0; user-select: text; -webkit-user-select: text; }
.rd-nb-text span { position: absolute; color: transparent; white-space: pre; line-height: 1; font-family: sans-serif; transform-origin: 0 0; cursor: text; }
.rd-nb-text span::selection { background: rgba(47, 93, 138, .28); color: transparent; }
.rd-nb-text br::selection { background: transparent; }
@media (max-width: 640px) { .rd-nb { padding: 22px 18px 24px 50px; background-image: linear-gradient(to right, transparent 38px, #e59a9a 38px, #e59a9a 39px, transparent 39px), repeating-linear-gradient(to bottom, transparent 0 27px, #bfd0e4 27px 28px); } .rd-nb::before { left: 10px; } }

/* a long note is a roll of paper taped up beside its title: the title shows, the rest is rolled up under it (a roll a hand
   made, not quite even); the pointer resting on it unrolls it downwards from the tape, which stays where it is, and the roll
   comes to rest at the foot of the paper; moving away rolls it back up. A click reads it full size */
.rd-roll { z-index: 3; padding-top: 2.2cqw; padding-bottom: 1.2cqw; box-shadow: 0 .2cqw .4cqw rgba(40, 32, 18, .16);
  transition: padding .6s cubic-bezier(.25, .7, .3, 1); }
.rd-roll .rd-pin-in { max-height: 4.2cqw; overflow: hidden; transition: max-height .6s cubic-bezier(.25, .7, .3, 1); }
.rd-roll h2 { margin-bottom: .6cqw; }
.rd-roll::before { left: auto; right: 5%; top: -1.5cqw; width: 13cqw; transform: rotate(7deg); z-index: 1; }   /* the tape, beside the title */
.rd-roll::after { content: ""; position: absolute; left: -.2cqw; right: .6cqw; bottom: -1.6cqw; height: 2.9cqw;
  border-radius: 1.2cqw 1.7cqw 1.5cqw 1.1cqw / 1.5cqw 1.3cqw 1.6cqw 1.4cqw; transform: rotate(-.8deg) skewX(-4deg);
  background: linear-gradient(to bottom, #d6cfbd, var(--slip) 34%, #f4efe2 47%, var(--slip) 58%, #cbc3ae 86%, #b3aa93),
    linear-gradient(to right, rgba(0, 0, 0, .06), transparent 6%, transparent 94%, rgba(0, 0, 0, .07));
  background-blend-mode: multiply; box-shadow: 0 .35cqw .7cqw rgba(40, 32, 18, .24); transition: opacity .1s; }
.rd-roll:hover { z-index: 6; padding-top: 3.2cqw; padding-bottom: 2.6cqw; box-shadow: 0 .2cqw .5cqw rgba(40, 32, 18, .18), 0 1.4cqw 3cqw rgba(40, 32, 18, .16); }
.rd-roll:hover .rd-pin-in { max-height: 300cqw; }
.rd-roll:hover::after { opacity: 0; transition: opacity .2s .45s; }   /* the roll runs out as the paper reaches its foot */
/* the paper of every note a little creased: a fold across it and one running down, caught by the light */
.rd-pin { background-image: linear-gradient(97deg, transparent 57%, rgba(60, 50, 30, .05) 58.2%, rgba(255, 255, 255, .55) 58.8%, transparent 60.5%),
  linear-gradient(178deg, transparent 37%, rgba(60, 50, 30, .045) 38.3%, rgba(255, 255, 255, .5) 38.9%, transparent 40.6%),
  linear-gradient(31deg, transparent 80%, rgba(60, 50, 30, .04) 81%, transparent 82.5%); }
/* a small aside: a square yellow sticky note, pressed on without tape */
.rd-page .rd-pin.rd-sticky { --slip: #fbeb8e; --ink: #1b1a17; --ink-2: #4a4740; --rule: #1b1a17; --hair: rgba(27, 26, 23, .18);
  --r: -2.2deg; padding: 2.4cqw 2.4cqw 3cqw;
  background-image: linear-gradient(to bottom, rgba(120, 100, 20, .07), transparent 16%),
    linear-gradient(104deg, transparent 62%, rgba(90, 70, 10, .06) 63.2%, rgba(255, 255, 240, .5) 63.8%, transparent 65.5%);
  box-shadow: 0 .2cqw .4cqw rgba(40, 32, 18, .16), .6cqw 1.6cqw 1.8cqw -1cqw rgba(40, 32, 18, .3); }
.rd-pin.rd-sticky::before { display: none; }
.rd-pin.rd-sticky h2 { font-size: 1.9cqw; border-bottom: 0; padding-bottom: 0; margin-bottom: .8cqw; }

/* the pointer on a note lifts it off the page from where it is stuck, as a hand would; a click brings it up to read */
.rd-pin:not(.rd-roll):hover { z-index: 6; transform: perspective(90cqw) rotate(var(--r)) rotateX(16deg) translateY(-.4cqw);
  box-shadow: 0 1.2cqw 1.6cqw rgba(40, 32, 18, .22), 0 3cqw 5cqw rgba(40, 32, 18, .22); }
.rd-note-big { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(22, 19, 12, .55); cursor: zoom-out;
  opacity: 0; transition: opacity .18s ease; }
.rd-note-big.on { opacity: 1; }
.rd-a4 { --ink: #1b1a17; --ink-2: #4a4740; --rule: #1b1a17; --hair: rgba(27, 26, 23, .18); position: relative; box-sizing: border-box;
  height: min(94vh, 133vw); aspect-ratio: 210 / 297; max-width: 94vw; overflow-y: auto; padding: 6% 8% 5%; cursor: auto;
  background: #fffdf6; color: var(--ink); font-size: 18px; transform: scale(.96); transition: transform .22s cubic-bezier(.3, .7, .3, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .25), 0 24px 60px rgba(0, 0, 0, .35); }
.rd-note-big.on .rd-a4 { transform: none; }
.rd-a4.rd-sticky { background: #fbeb8e linear-gradient(to bottom, rgba(120, 100, 20, .07), transparent 10%); }
.rd-a4 h2 { margin: 0 0 .9em; padding-bottom: .35em; font: 700 1.45em/1.3 var(--rd-serif); border-bottom: 3px double var(--rule); }
.rd-a4.rd-sticky h2 { border-bottom: 0; }
.rd-a4 p { margin: 0; font: 1em/1.75 var(--rd-text); white-space: pre-wrap; }
.rd-a4 p + p, .rd-a4 p + .rd-aside-note, .rd-a4 .rd-aside-note + p { margin-top: .75em; }
.rd-a4 .rd-aside-note { margin: .75em 0 0; padding: .1em 0 .1em .9em; border-left: 2px solid var(--hair); }
.rd-a4 .rd-aside-note p { font-size: .9em; color: var(--ink-2); }
.rd-a4 .rd-aside-note p + p { margin-top: .35em; }

/* the English page in front, the Chinese page lying under it, showing at its right edge; a click on that edge brings it up
   (and the English goes under) */
.rd-full .rd-pdfview.rd-stack { display: block; position: relative; width: calc((97.5vh - 224px) / 1.4143); max-width: 86%; margin: 0; }
.rd-stack .rd-sheet { transition: transform .45s cubic-bezier(.3, .7, .3, 1), filter .3s; z-index: 1; }
.rd-stack .rd-p1 { position: absolute; top: 0; left: 0; width: 100%; }
.rd-stack .rd-back { z-index: 0; transform: translate(10%, 2.2%) rotate(1.6deg); filter: brightness(.965); cursor: pointer; }
.rd-stack .rd-back > * { pointer-events: none; }
.rd-stack .rd-back:hover { transform: translate(12%, 2.2%) rotate(2.1deg); filter: none; }
/* the switch: the Chinese woven in under each paragraph, the pages two by two (longer, so the panel scrolls) */
.rd-story-head { padding-left: 130px; padding-right: 130px; }
.rd-bi-switch { position: absolute; left: 0; top: 4px; display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px;
  font: 13px/1 var(--rd-sans); letter-spacing: .03em; color: var(--ink-2); background: none; border: 1px solid var(--hair); border-radius: 999px; cursor: pointer; }
.rd-bi-switch:hover { color: var(--ink); border-color: var(--ink-3); }
.rd-bi-track { position: relative; width: 28px; height: 16px; border-radius: 8px; background: var(--hair); transition: background .2s; }
.rd-bi-knob { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--sheet-2); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: left .2s; }
.rd-bi-switch[aria-checked="true"] .rd-bi-track { background: #6e9e7d; }
.rd-bi-switch[aria-checked="true"] .rd-bi-knob { left: 14px; }
.rd-full .rd-pdfview.rd-bi { max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 640px) { .rd-story-head { padding-left: 40px; padding-right: 40px; padding-top: 34px; } .rd-full .rd-pdfview.rd-stack { width: 86%; } }

/* a small note (not rolled): its paper is a leaf hinged at its top edge; the pointer on it lifts the leaf right up, as a
   hand lifts a sticky note to see what is under it, so the words beneath show; the tape stays where it is */
.rd-pin:not(.rd-roll) { padding: 0; background: none; box-shadow: none; }
.rd-pin:not(.rd-roll)::before { z-index: 2; }
.rd-pin:not(.rd-roll) .rd-leaf { position: relative; z-index: 1; padding: 3.2cqw 3cqw 2.6cqw; background-color: var(--slip);
  background-image: linear-gradient(97deg, transparent 57%, rgba(60, 50, 30, .05) 58.2%, rgba(255, 255, 255, .55) 58.8%, transparent 60.5%),
    linear-gradient(178deg, transparent 37%, rgba(60, 50, 30, .045) 38.3%, rgba(255, 255, 255, .5) 38.9%, transparent 40.6%),
    linear-gradient(31deg, transparent 80%, rgba(60, 50, 30, .04) 81%, transparent 82.5%);
  box-shadow: 0 .2cqw .5cqw rgba(40, 32, 18, .18), 0 1.4cqw 3cqw rgba(40, 32, 18, .16);
  transform-origin: 50% 0; transition: transform .45s cubic-bezier(.3, .7, .3, 1), box-shadow .45s; }
.rd-page .rd-pin.rd-sticky:not(.rd-roll) { padding: 0; background-image: none; box-shadow: none; }
.rd-page .rd-pin.rd-sticky .rd-leaf { padding: 2.4cqw 2.4cqw 3cqw;
  background-image: linear-gradient(to bottom, rgba(120, 100, 20, .07), transparent 16%),
    linear-gradient(104deg, transparent 62%, rgba(90, 70, 10, .06) 63.2%, rgba(255, 255, 240, .5) 63.8%, transparent 65.5%);
  box-shadow: 0 .2cqw .4cqw rgba(40, 32, 18, .16), .6cqw 1.6cqw 1.8cqw -1cqw rgba(40, 32, 18, .3); }
.rd-pin:not(.rd-roll):hover { transform: rotate(var(--r)); box-shadow: none; }
.rd-pin:not(.rd-roll):hover .rd-leaf { transform: perspective(70cqw) rotateX(84deg); box-shadow: 0 -.4cqw 1.2cqw rgba(40, 32, 18, .25); }

/* back to the front page: said in words */
.rd-out.rd-back-to { width: auto; height: 32px; padding: 0 14px; border-radius: 16px; font: 13px/1 var(--rd-sans); letter-spacing: .03em; color: var(--ink-2); white-space: nowrap; }
.rd-out.rd-back-to:hover, .rd-out.rd-back-to:focus-visible { color: var(--ink); }
.rd-out.rd-back-to::after { display: none; }
/* the pages as wide as the room beside the photo allows (the Chinese page under the English one still shows at its edge);
   a long page scrolls */
.rd-full .rd-pdfview.rd-stack { width: 88%; max-width: none; }

/* landscape pages: as wide as the room beside the photo; the note's layer is an upright page wide, so the note's words keep
   their size beside the page's own */
.rd-full .rd-pdfview.rd-landstack { width: 89%; margin-top: 0; }
.rd-pinlayer { position: absolute; left: 0; top: 0; bottom: 0; container-type: inline-size; pointer-events: none; }
.rd-pinlayer .rd-pin { pointer-events: auto; }
.rd-sheet.rd-land.rd-big-pic { width: min(96vw, calc(96vh * var(--ar))); }

/* a red word on a notebook page: nothing over it until the pointer rests there, then a faint wash while its note shows */
.rd-hit[data-c="word"] { background: none; cursor: help; border-radius: 2px; }
.rd-hit[data-c="word"].on, .rd-hit[data-c="word"]:hover { background: rgba(181, 65, 47, .12); }

/* a run of landscape pages, one language; the Chinese run lies under the English one */
.rd-ldoc { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 16px; transition: transform .45s cubic-bezier(.3, .7, .3, 1), filter .3s; }
.rd-ldoc .rd-sheet { transition: none; transform: none; }
.rd-back .rd-pinlayer .rd-pin { pointer-events: none; }
.rd-back .rd-pinlayer .rd-pin.rd-above { pointer-events: auto; }   /* a note taped above the sheet shows whichever page is on top: it answers the pointer even when its page lies underneath */
/* room under the read's title for a long note, taped there above the first page */
.rd-full .rd-pdfview.rd-landstack.rd-roomtop { margin-top: 76px; }
/* a small note sits where it covers nothing: it does not lift */
.rd-pin:not(.rd-roll):hover { transform: rotate(var(--r)); }
.rd-pin:not(.rd-roll):hover .rd-leaf { transform: none; box-shadow: 0 .2cqw .5cqw rgba(40, 32, 18, .18), 0 1.4cqw 3cqw rgba(40, 32, 18, .16); }

/* each landscape page on a sheet of paper as wide as the room beside the photo; the page itself (its pictures, highlights and
   notes) sized so its text reads at 15 px, in the middle of the sheet. The Chinese run lies under the English one, showing only
   a sliver at its right edge, a little more when the pointer is on it */
.rd-full .rd-pdfview.rd-landstack, .rd-full .rd-pdfview.rd-landstack.zh-front { width: 95%; }
.rd-landstack .rd-ldoc.rd-p1 { width: 100%; }
.rd-ldoc .rd-sheetpaper { position: relative; background-color: var(--nb-paper); border-radius: 2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .42 0 0 0 0 .36 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  box-shadow: 0 1px 1px rgba(40, 32, 18, .12), 0 3px 6px rgba(40, 32, 18, .1), 0 14px 28px rgba(40, 32, 18, .12); }
.rd-full .rd-ldoc .rd-sheetpaper > .rd-sheet { margin: 0 auto; background: none; box-shadow: none; border-radius: 0; }
.rd-ldoc .rd-sheetpaper > .rd-sheet { width: 100%; }   /* the text fills the sheet's width */
.rd-landstack .rd-ldoc.rd-back { transform-origin: 0 0; transform: translate(1.8%, 10px) rotate(.25deg); filter: brightness(.97); }
.rd-landstack .rd-ldoc.rd-back:hover { transform: translate(4.5%, 10px) rotate(.4deg); filter: none; }
/* a read whose headline is on its page: the head above keeps only the date and the way back (its name stays for screen readers) */
.rd-hed-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the head of a read: tall enough for the way back, with room under it before the pages */
.rd-story-head { min-height: 34px; padding-bottom: 16px; margin-bottom: 26px; }
.rd-out.rd-back-to { top: -4px; }
