/* The reader (sections/reader.js): one box over the page for longer text, centred on wide screens and a
   sheet from the bottom on phones; the text scrolls inside. Its own tokens and base rules, so it looks
   the same over the section pages and over the homepage, whose page tokens differ. */
.reader{
 --bg:#fff;--fill:#f5f5f7;
 --ink:#1d1d1f;--ink-2:#424245;--gray:#6e6e73;--gray-2:#86868b;
 --line:#e5e5ea;--line-2:#d2d2d7;
 --accent:#bc486a;
 --font:-apple-system,BlinkMacSystemFont,"SF Pro Text","Helvetica Neue","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans SC",sans-serif;
 --font-ja:-apple-system,BlinkMacSystemFont,"Hiragino Sans","Hiragino Kaku Gothic ProN","Yu Gothic","Meiryo","Noto Sans JP",sans-serif;
 font:400 16px/1.6 var(--font);line-break:strict;-webkit-font-smoothing:antialiased;
}
:where(.reader) *,:where(.reader) *::before,:where(.reader) *::after{box-sizing:border-box}
:where(.reader) a{color:inherit;text-decoration:none}
:where(.reader) button{font:inherit;color:inherit}
:where(.reader) :focus-visible{outline:2px solid var(--accent);outline-offset:2px}
:where(.reader) [hidden]{display:none!important}
:where(.reader) [lang=ja]{font-family:var(--font-ja)}
:where(.reader) .ext{flex:none;width:9px;height:9px}

.rd-lock,.rd-lock body{overflow:hidden}
.reader{width:min(720px,100vw - 48px);max-width:none;max-height:min(85dvh,900px);margin:auto;padding:0;border:0;border-radius:14px;background:var(--bg);color:var(--ink);box-shadow:0 30px 80px -20px #1d1d1f59,0 0 0 1px #1d1d1f0f;overflow:hidden}
.reader[open]{display:flex;flex-direction:column;animation:rd-in .22s ease-out}
.reader::backdrop{background:#1d1d1f66;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:rd-fade .22s ease-out}
.rd-in{display:flex;flex:1 1 auto;flex-direction:column;min-height:0}
.rd-head{display:flex;align-items:flex-start;gap:16px;padding:20px 20px 14px 28px;border-bottom:1px solid var(--line)}
.rd-head>div{flex:1;min-width:0}
.rd-head h3{margin:0;font-size:18px;font-weight:600;line-height:1.45;overflow-wrap:anywhere;text-wrap:pretty}
.rd-meta{margin:6px 0 0;color:var(--gray);font-size:12px;line-height:1.6}
.rd-meta a{display:inline-flex;align-items:center;gap:4px;transition:color .15s}
.rd-meta a:hover{color:var(--accent)}
.rd-x{flex:none;display:grid;place-items:center;width:36px;height:36px;margin:-4px -6px 0 0;padding:0;border:0;border-radius:50%;background:var(--fill);color:var(--ink-2);cursor:pointer;transition:background-color .15s,color .15s}
.rd-x:hover{background:#fbe9ef;color:var(--accent)}
.rd-x svg{width:14px;height:14px}
.rd-back{flex:none;display:grid;place-items:center;width:36px;height:36px;margin:-4px -8px 0 -12px;padding:0;border:0;border-radius:50%;background:none;color:var(--ink-2);cursor:pointer;transition:background-color .15s,color .15s}
.rd-back:hover{background:var(--fill);color:var(--accent)}
.rd-back svg{width:14px;height:14px}
.reader .rd-body{flex:1;min-height:0;max-width:none;padding:20px 28px 28px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.rd-body:focus{outline:none}
.rd-body>*{max-width:640px}
.rd-body p b{font-weight:600}
/* An interview's or news report's picture, over its text, with where it is from. */
.rd-fig{margin:0 0 20px}
.rd-fig img{display:block;width:100%;height:auto;max-height:min(56vh,480px);object-fit:cover;border-radius:8px;background:var(--fill)}
.rd-fig figcaption{margin-top:8px;color:var(--gray);font-size:12px;line-height:1.5}
.rd-fig a{display:inline-flex;align-items:baseline;gap:3px;color:inherit}
.rd-body .cap{color:var(--gray);font-size:13px;line-height:1.6}
.rd-body .bk-name{margin:0 0 12px;color:var(--gray);font-size:13px}
@keyframes rd-in{from{opacity:0;transform:translateY(12px) scale(.98)}}
@keyframes rd-fade{from{opacity:0}}
.book-body h4{margin:20px 0 8px;font-size:15px;font-weight:600;line-height:1.5}
.book-body h4:first-child{margin-top:0}
.book-body p{margin:0 0 12px;color:var(--ink);font-size:15px;line-height:1.85;text-wrap:pretty}
.book-body .bk-src{margin:16px 0 0;color:var(--gray);font-size:12px}

/* Over an interview's text, and in Benito's box on 年华 and 足迹: the rows elsewhere on the site it belongs
   with. Here rather than in shell.css, so an interview opened on the homepage or 柯南 has them too. */
.rd-rel{margin:0 0 20px;padding:0 0 16px;border-bottom:1px solid var(--line)}
.rd-body .rd-rel p{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px;margin:0 0 8px;font-size:13px;line-height:1.5}
.rd-body .rd-rel p:last-child{margin-bottom:0}
.rd-rel b{flex:none;margin-right:4px;color:var(--gray);font-size:12px;font-weight:400}
.rd-rel a{display:inline-flex;align-items:baseline;gap:6px;max-width:100%;padding:3px 10px;border:1px solid var(--line-2);border-radius:14px;color:var(--ink-2);overflow-wrap:anywhere;transition:border-color .15s,color .15s}
.rd-rel a span{flex:none;color:var(--gray-2);font-size:11px;transition:color .15s}
.rd-rel a:hover{border-color:var(--accent);color:var(--accent)}
.rd-rel a:hover span{color:var(--accent)}

/* A song's lyrics: each verse in Japanese, one sung line to a line, with its Chinese under it. */
.ly-st{margin:0 0 24px}
.book-body .ly-ja{margin:0;font-size:15px;line-height:1.8}
.book-body .ly-zh{margin:8px 0 0;color:var(--gray);font-size:13.5px;line-height:1.75}

@media (max-width:760px){
 .reader{width:100%;max-height:92dvh;margin:auto 0 0;border-radius:16px 16px 0 0;box-shadow:0 -12px 40px -12px #1d1d1f59}
 .reader[open]{animation:rd-up .26s cubic-bezier(.2,.8,.2,1)}
 .rd-head{padding:16px 14px 12px 20px}
 .rd-head h3{font-size:16px}
 .reader .rd-body{padding:16px 20px calc(24px + env(safe-area-inset-bottom))}
}
@keyframes rd-up{from{transform:translateY(100%)}}
@media (prefers-reduced-motion:reduce){
 .reader,.reader::backdrop{animation:none!important}
}
/* An interview's source under its text, and the Japanese folded under that. */
.book-body .rd-cite{margin-top:24px;padding-top:12px;border-top:1px solid var(--line);line-height:1.7}
.rd-cite a{display:inline-flex;align-items:baseline;gap:3px;color:inherit;text-decoration:underline;text-decoration-color:var(--line-2);text-underline-offset:3px}
.rd-ja{margin:14px 0 0}
.rd-ja summary{display:inline-flex;align-items:center;gap:6px;padding:4px 12px;border:1px solid var(--line-2);border-radius:14px;color:var(--ink-2);font-size:13px;cursor:pointer;list-style:none;transition:border-color .15s,color .15s}
.rd-ja summary::-webkit-details-marker{display:none}
.rd-ja summary::after{content:'';width:6px;height:6px;border-right:1.3px solid currentColor;border-bottom:1.3px solid currentColor;transform:translateY(-2px) rotate(45deg);transition:transform .15s}
.rd-ja[open] summary::after{transform:translateY(1px) rotate(-135deg)}
.rd-ja summary:hover{border-color:var(--accent);color:var(--accent)}
.rd-ja-in{margin-top:14px;color:var(--ink-2)}
