/* Kabook: the theme's tokens, then the phone frame and app screens, covers
   with the status pill and bar, from the brand sprint's round 2
   (kabook-brand/round-2/shared/kabook.css), trimmed to what the landing page
   draws. Every page loads this first. */

/* Fonts, self-hosted. All three are under the SIL Open Font License; the
   licences are beside the files in fonts/. */
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/figtree-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/figtree-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Fraunces as Kabook sets it: 600, SOFT 50, WONK 0, the optical size free. */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/fraunces-600-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/fraunces-600-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/instrument-serif-italic-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/instrument-serif-italic-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Theme ----------
   One set of tokens, each with a light and a dark value. <html data-theme>
   chooses (theme-init.js sets it before the first paint, from the footer's
   switch): "system", the default and what the markup says, follows the
   device's prefers-color-scheme; "light" and "dark" force one. The dark
   values are written twice, for data-theme="dark" and for System on a dark
   device, because CSS cannot join an attribute and a media query.
   A phone's screen takes the app's tokens from its own kl or kd class, which
   kabook.js draws from the phone's data-mode, which follows the page. The
   prerendered still carries neither class, so it follows the page as well,
   from the first paint and with JavaScript off. */

/* The app: round 2's TOKENS and STATUS tables, and the parts of iOS the
   phones draw (cover rim, menus, the strip above a sheet, the keyboard). */
:root, [data-theme="light"], .kl { color-scheme: light; --bg: #F3F1F8; --card: #FFFFFF; --raised: #FFFFFF; --ink: #17141F; --mute: #6E6A7A; --faint: #A7A3B1; --acc: #6D35F2; --acc-p: #5A22E0; --on-acc: #FFFFFF; --acc-t: #EFE9FE; --danger: #E5243B; --line: rgba(23,20,31,.11); --glass: rgba(255,255,255,.78);
  --wish: #D6366F; --wish-on: #FFFFFF; --next: #F0870C; --next-on: #2B1700; --reading: #6D35F2; --reading-on: #FFFFFF; --paused: #1679BC; --paused-on: #FFFFFF; --done: #178748; --done-on: #FFFFFF; --quit: #76727F; --quit-on: #FFFFFF;
  --cv-rim: rgba(0, 0, 0, .14); --menu: rgba(250, 249, 253, .9); --under: color-mix(in srgb, var(--bg) 55%, #000); --kb: color-mix(in srgb, var(--bg) 70%, #c5c7cf); --key: #fff; --key-ink: #000; --key-fn: #adb0ba; --tab-on: var(--acc); }
[data-theme="dark"], .kd { color-scheme: dark; --bg: #0D0B12; --card: #1C1924; --raised: #26222F; --ink: #F4F2F8; --mute: #9C97A8; --faint: #6B6677; --acc: #9F7BFF; --acc-p: #B69BFF; --on-acc: #16101F; --acc-t: #2A2142; --danger: #FF5A6A; --line: rgba(244,242,248,.12); --glass: rgba(44,40,54,.72);
  --wish: #FF6E9C; --wish-on: #16101F; --next: #FFA43C; --next-on: #16101F; --reading: #9F7BFF; --reading-on: #16101F; --paused: #4CB2F2; --paused-on: #16101F; --done: #3DCB7E; --done-on: #16101F; --quit: #8F8B99; --quit-on: #16101F;
  --cv-rim: rgba(255, 255, 255, .1); --menu: rgba(40, 36, 50, .92); --under: #1b1b1d; --kb: #2c2c2e; --key: #6b6b6e; --key-ink: #fff; --key-fn: #464648; --tab-on: var(--acc-p); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] { color-scheme: dark; --bg: #0D0B12; --card: #1C1924; --raised: #26222F; --ink: #F4F2F8; --mute: #9C97A8; --faint: #6B6677; --acc: #9F7BFF; --acc-p: #B69BFF; --on-acc: #16101F; --acc-t: #2A2142; --danger: #FF5A6A; --line: rgba(244,242,248,.12); --glass: rgba(44,40,54,.72);
    --wish: #FF6E9C; --wish-on: #16101F; --next: #FFA43C; --next-on: #16101F; --reading: #9F7BFF; --reading-on: #16101F; --paused: #4CB2F2; --paused-on: #16101F; --done: #3DCB7E; --done-on: #16101F; --quit: #8F8B99; --quit-on: #16101F;
    --cv-rim: rgba(255, 255, 255, .1); --menu: rgba(40, 36, 50, .92); --under: #1b1b1d; --kb: #2c2c2e; --key: #6b6b6e; --key-ink: #fff; --key-fn: #464648; --tab-on: var(--acc-p); }
}

/* The site around the phones. Dark is the app's dark: the field, cards and
   nav on its background and card colours, its text and secondary text, its
   violet. Glows (--glow-*) and shadows (--sh-*) are RGB triplets, used as
   rgb(var(--glow-v) / .14), so each theme can set its own: the glows keep
   their colours, which on near-black make a dim haze, and the shadows turn
   black. --inv-* are the status colours for the toasts, which are drawn
   inverted (dark on a light page, light on a dark one). Covers never change. */
:root, [data-theme="light"] { --s-bg: #fff; --s-field: #F7F5FD; --s-nav: rgba(255, 255, 255, .86); --s-nav-w: rgba(247, 245, 253, .84); --s-ink: #16131F; --s-on-ink: #fff; --s-prose: #2b2734; --s-quote: #3d3850; --s-lead: #4a4558; --s-foot: #48444f; --s-body: #57526a; --s-mute: #6B6679; --s-line: rgba(22, 19, 31, .1); --s-card: #fff; --s-soft: #F6F3FD; --s-fill: #F3F1F8; --s-row: #F8F6FC; --s-band: #F8F6FC; --s-acc: #6D35F2; --s-sel: rgba(109, 53, 242, .2); --s-st-mix: #000; --s-dim: rgba(22, 19, 31, .045); --s-pick: #F6F3FD; --s-pick-on: #fff;
  --s-plank: #fff; --s-plank-2: #ECE7F8; --s-toast: #17141F; --s-toast-ink: #fff; --an-bg: #FBF9FF; --an-wait: #F1EFF4; --an-got: #DCF5E5; --an-got-ink: #116336;
  --glow-v: 109 53 242; --glow-p: 214 54 111; --glow-o: 240 135 12; --sh: 40 20 90; --sh-deep: 60 20 150; --sh-cv: 30 10 70; --sh-ic: 50 20 120;
  --inv-wish: #FF6E9C; --inv-next: #FFA43C; --inv-reading: #9F7BFF; --inv-paused: #4CB2F2; --inv-done: #3DCB7E; --inv-quit: #8F8B99; }
[data-theme="dark"] { --s-bg: #0D0B12; --s-field: #0F0C17; --s-nav: rgba(28, 25, 36, .82); --s-nav-w: rgba(28, 25, 36, .82); --s-ink: #F4F2F8; --s-on-ink: #16101F; --s-prose: #DCD8E5; --s-quote: #D3CFDD; --s-lead: #C5C0D1; --s-foot: #C0BBCB; --s-body: #B8B3C5; --s-mute: #9C97A8; --s-line: rgba(244, 242, 248, .12); --s-card: #1C1924; --s-soft: #26222F; --s-fill: #26222F; --s-row: #231F2C; --s-band: #13101B; --s-acc: #9F7BFF; --s-sel: rgba(159, 123, 255, .34); --s-st-mix: #fff; --s-dim: rgba(0, 0, 0, .12); --s-pick: #15121D; --s-pick-on: #2A2636;
  --s-plank: #2A2536; --s-plank-2: #1B1824; --s-toast: #F4F2F8; --s-toast-ink: #17141F; --an-bg: #121019; --an-wait: #24212D; --an-got: #163B27; --an-got-ink: #7FE0A8;
  --glow-v: 109 53 242; --glow-p: 214 54 111; --glow-o: 240 135 12; --sh: 0 0 0; --sh-deep: 0 0 0; --sh-cv: 0 0 0; --sh-ic: 0 0 0;
  --inv-wish: #D6366F; --inv-next: #F0870C; --inv-reading: #6D35F2; --inv-paused: #1679BC; --inv-done: #178748; --inv-quit: #76727F; }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] { --s-bg: #0D0B12; --s-field: #0F0C17; --s-nav: rgba(28, 25, 36, .82); --s-nav-w: rgba(28, 25, 36, .82); --s-ink: #F4F2F8; --s-on-ink: #16101F; --s-prose: #DCD8E5; --s-quote: #D3CFDD; --s-lead: #C5C0D1; --s-foot: #C0BBCB; --s-body: #B8B3C5; --s-mute: #9C97A8; --s-line: rgba(244, 242, 248, .12); --s-card: #1C1924; --s-soft: #26222F; --s-fill: #26222F; --s-row: #231F2C; --s-band: #13101B; --s-acc: #9F7BFF; --s-sel: rgba(159, 123, 255, .34); --s-st-mix: #fff; --s-dim: rgba(0, 0, 0, .12); --s-pick: #15121D; --s-pick-on: #2A2636;
    --s-plank: #2A2536; --s-plank-2: #1B1824; --s-toast: #F4F2F8; --s-toast-ink: #17141F; --an-bg: #121019; --an-wait: #24212D; --an-got: #163B27; --an-got-ink: #7FE0A8;
    --glow-v: 109 53 242; --glow-p: 214 54 111; --glow-o: 240 135 12; --sh: 0 0 0; --sh-deep: 0 0 0; --sh-cv: 0 0 0; --sh-ic: 0 0 0;
    --inv-wish: #D6366F; --inv-next: #F0870C; --inv-reading: #6D35F2; --inv-paused: #1679BC; --inv-done: #178748; --inv-quit: #76727F; }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; touch-action: manipulation; scroll-behavior: smooth; }
html, body { overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
svg { display: block; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; text-align: inherit; }
button:disabled { cursor: default; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }
p, h1, h2, h3, h4, h5, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
input { font: inherit; color: inherit; }
hr { border: 0; margin: 0; }
.wrap { width: min(1180px, 100% - 48px); margin-inline: auto; }
@media (max-width: 560px) { .wrap { width: calc(100% - 32px); } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:root { --a-ui: -apple-system, 'SF Pro Text', system-ui, sans-serif; --a-book: 'Fraunces', Georgia, serif; --f-sans: 'Figtree', system-ui, sans-serif; --f-serif: 'Instrument Serif', Georgia, serif; --f-book: 'Fraunces', Georgia, serif; --f-mono: ui-monospace, 'SF Mono', Menlo, monospace; }

/* Fraunces, as Kabook sets it: semibold, a little soft, never wonky. */
.fr { font-family: var(--f-book); font-weight: 600; font-variation-settings: 'SOFT' 50, 'WONK' 0, 'opsz' var(--opsz, 24); letter-spacing: -.005em; }

/* Status vars on anything that carries data-s */
[data-s=wish] { --st: var(--wish); --on: var(--wish-on); }
[data-s=next] { --st: var(--next); --on: var(--next-on); }
[data-s=reading] { --st: var(--reading); --on: var(--reading-on); }
[data-s=paused] { --st: var(--paused); --on: var(--paused-on); }
[data-s=done] { --st: var(--done); --on: var(--done-on); }
[data-s=quit] { --st: var(--quit); --on: var(--quit-on); }
.dot { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--st, #999); }
.gl { fill: none; stroke: currentColor; stroke-width: var(--gl-w, 1.8); stroke-linecap: round; stroke-linejoin: round; }
.gl path[d^="M8 13.2"] { fill: currentColor; stroke-width: 1.2; }
.ic { fill: none; stroke: currentColor; stroke-width: var(--ic-w, 1.9); stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Covers ---------- */
.cv { position: relative; display: block; flex: none; aspect-ratio: 2 / 3; container-type: inline-size; border-radius: 3px; overflow: hidden; background: #ddd; box-shadow: var(--cv-sh, 0 1px 2px rgba(0, 0, 0, .14), 0 4px 12px -4px rgba(0, 0, 0, .22)); transform: translateZ(0); }
.cv > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cv::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit; background: linear-gradient(180deg, rgba(255, 255, 255, .16), transparent 22%); box-shadow: inset 0 0 0 .5px var(--cv-rim); }
[data-cycle] .cv[data-book] { cursor: pointer; transition: transform .25s cubic-bezier(.2, .9, .3, 1.2); }
[data-cycle] .cv[data-book]:hover { transform: translateY(-3px); }
[data-cycle] .cv[data-book]:active { transform: scale(.96); }

/* The overlay: a 4 pt bar at list size, a pill with the word from 57 pt up.
   The bar carries a white hairline on top so it parts from any cover; the
   pill is opaque with a white ring, so its word reads the same on every cover. */
.ov { position: absolute; z-index: 2; display: flex; align-items: center; pointer-events: none; color: var(--on); font-family: var(--a-ui); left: 0; right: 0; bottom: 0; height: 4px; background: var(--st); box-shadow: 0 -1px 0 rgba(255, 255, 255, .6); }
.ov .gl { flex: none; display: none; }
.ov b { font-weight: inherit; white-space: nowrap; display: none; }
@container (min-width: 57px) {
  .ov { left: 4px; right: auto; bottom: 4px; height: 15px; padding: 0 5px 0 4px; gap: 2.5px; border-radius: 99px; font-size: 7.6px; font-weight: 650; letter-spacing: .01em; box-shadow: 0 1px 3px rgba(0, 0, 0, .3), 0 0 0 .75px rgba(255, 255, 255, .5); }
  .ov .gl, .ov b { display: block; }
  .ov .gl { width: 8px; height: 8px; stroke-width: 2.2; }
}
@container (min-width: 100px) {
  .ov { left: 6px; bottom: 6px; height: 20px; padding: 0 8px 0 6px; gap: 3.5px; font-size: 9.8px; }
  .ov .gl { width: 10px; height: 10px; }
}
@container (min-width: 140px) {
  .ov { left: 8px; bottom: 8px; height: 24px; padding: 0 10px 0 7px; gap: 4px; font-size: 11.5px; }
  .ov .gl { width: 12px; height: 12px; }
}
.cv.bump { animation: v-bump .5s cubic-bezier(.3, 1.5, .5, 1); }
.cv.bump .ov { animation: v-pop .55s cubic-bezier(.3, 1.6, .5, 1); transform-origin: left center; }
@keyframes v-bump { 40% { transform: scale(1.05) rotate(-1deg); } }
@keyframes v-pop { 0% { transform: translateY(8px) scale(.5); opacity: 0; } 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cv.bump, .cv.bump .ov { animation: none !important; } }

/* No cover: violet, the title in Fraunces, the bookmark in the corner. Never a grey box. */
.cv-none { background: none; }
.ph { position: absolute; inset: 0; display: flex; flex-direction: column; text-align: left; overflow: hidden; padding: 11cqw 10cqw; color: #fff;
  background: radial-gradient(120% 70% at 20% 0%, hsl(var(--h) 90% 72%), transparent 60%), linear-gradient(165deg, hsl(var(--h) 75% 58%), hsl(calc(var(--h) + 12) 70% 34%)); }
.ph b { font: 600 15cqw/1.04 var(--f-book); font-variation-settings: 'SOFT' 50, 'WONK' 0, 'opsz' 30; letter-spacing: -.01em; overflow-wrap: anywhere; }
.ph i { margin-top: 5cqw; font: 500 8.5cqw/1.2 var(--f-sans); font-style: normal; opacity: .8; }
.ph u { position: absolute; right: 10cqw; bottom: 10cqw; width: 11cqw; height: 22cqw; background: rgba(255, 255, 255, .85); clip-path: polygon(0 0, 100% 0, 100% 62%, 50% 48%, 0 62%); text-decoration: none; }
/* Loading: a soft violet shimmer, never a spinner. */

/* ---------- iPhone frame ---------- */
.phone { --ph-w: 286px; --ph-h: 604px; position: relative; flex: none; width: var(--ph-w); height: var(--ph-h); padding: 8px; border-radius: 50px; background: #121212; box-shadow: inset 0 0 0 1.5px #3c3c3e, inset 0 0 0 3px #0a0a0a, 0 1px 0 1px rgba(255, 255, 255, .06), var(--ph-shadow, 0 30px 60px -24px rgba(0, 0, 0, .38)); }
.phone::before { content: ''; position: absolute; left: -2px; top: 112px; width: 3px; height: 54px; border-radius: 2px 0 0 2px; background: #2a2a2c; box-shadow: 0 70px 0 #2a2a2c; }
.phone::after { content: ''; position: absolute; right: -2px; top: 150px; width: 3px; height: 86px; border-radius: 0 2px 2px 0; background: #2a2a2c; }
.ph-screen { position: relative; width: 100%; height: 100%; border-radius: 42px; overflow: hidden; background: var(--bg); color: var(--ink); isolation: isolate; font: 400 12px/1.3 var(--a-ui); text-align: left; letter-spacing: -.005em; }
.ph-island { position: absolute; z-index: 60; top: 9px; left: 50%; width: 82px; height: 24px; margin-left: -41px; border-radius: 20px; background: #000; }
.ph-sb { position: absolute; z-index: 55; inset: 0 0 auto; height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 3px 24px 0 34px; font: 600 13px/1 -apple-system, 'SF Pro Text', system-ui, sans-serif; pointer-events: none; color: var(--ink); background: linear-gradient(var(--bg) 60%, transparent); }
.ph-sb .ic3 { display: flex; align-items: center; gap: 4px; } .ph-sb svg { height: 10px; width: auto; }
.ph-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; padding: 42px 0 96px; scrollbar-width: none; overscroll-behavior: contain; }
.ph-scroll::-webkit-scrollbar { display: none; }
.ph-home { position: absolute; z-index: 70; bottom: 6px; left: 50%; width: 96px; height: 4px; margin-left: -48px; border-radius: 4px; background: var(--ink); opacity: .85; pointer-events: none; }

/* Tab bar: iOS 26 floating glass, and the pre-26 bar */
.ks-tabs { position: absolute; z-index: 25; left: 40px; right: 40px; bottom: 18px; height: 50px; border-radius: 30px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 4px; background: var(--glass); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6); box-shadow: 0 0 0 .5px var(--line), 0 8px 24px -8px rgba(0, 0, 0, .25); }
.ks-tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 24px; font: 600 8.5px/1 var(--a-ui); color: var(--ink); transition: background .2s, color .2s; }
.ks-tabs .ic { width: 19px; height: 19px; stroke-width: 1.9; }
.ks-tabs button.on { color: var(--tab-on); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.ks-tabs button.on .ic { fill: color-mix(in srgb, var(--acc) 24%, transparent); }
.ks-tabs b { font-weight: inherit; }

/* Bars and buttons */
.ks { padding: 0 12px; }
.ks-bar { position: relative; display: flex; justify-content: space-between; align-items: center; height: 34px; margin: 4px 0 8px; }
.ks-c { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--glass); color: var(--acc); box-shadow: 0 0 0 .5px var(--line), 0 4px 12px -6px rgba(0, 0, 0, .25); }
.ks-c .ic { width: 17px; height: 17px; }
.ks-c.sm { width: 28px; height: 28px; } .ks-c.sm .ic { width: 14px; height: 14px; }
.ks-gc { display: flex; border-radius: 99px; background: var(--glass); box-shadow: 0 0 0 .5px var(--line), 0 4px 12px -6px rgba(0, 0, 0, .25); }
.ks-gc .ks-c { background: none; box-shadow: none; width: 38px; }
.ks-lt { font: 700 25px/1.1 var(--a-ui); letter-spacing: -.01em; margin: 0 4px 12px; }
.ks-sub { margin: -8px 4px 14px; color: var(--mute); font-size: 11px; }
.ks-btn { display: inline-flex; justify-content: center; align-items: center; height: 32px; padding: 0 16px; border-radius: 99px; background: var(--acc); color: var(--on-acc); font: 600 12px/1 var(--a-ui); }
.ks-btn.wide { width: 100%; height: 36px; }
.ks-btn2 { display: block; margin: 10px auto 0; color: var(--acc); font: 500 12px/1 var(--a-ui); }
.ks-link { color: var(--acc); font-size: 12px; }
.ks-link.sm { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; } .ks-link.sm .ic { width: 13px; height: 13px; }

/* Reading */
.ks-now { display: flex; justify-content: center; gap: 18px; align-items: flex-start; }
.ks-nowb { width: 104px; text-align: center; }
.ks-now.n1 .ks-nowb { width: 140px; }
.ks-nowb .cv { margin: 0 auto 9px; }
.ks-bt { display: block; font: 600 12px/1.2 var(--a-book); font-variation-settings: 'SOFT' 50, 'WONK' 0, 'opsz' 17; letter-spacing: -.005em; }
.ks-ba { display: block; margin-top: 2px; color: var(--mute); font-size: 10.5px; }
.ks-empty { color: var(--mute); padding: 30px 0; text-align: center; width: 100%; }
.ks-empty.sm { padding: 18px 0; font-size: 11px; }
.ks-sh { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 4px 9px; }
.ks-sh .ks-shh { font: 600 13px/1 var(--a-ui); color: var(--mute); }
.ks-hrow { display: flex; gap: 11px; overflow-x: auto; padding: 0 4px 6px; margin-bottom: 14px; scrollbar-width: none; }
.ks-hrow::-webkit-scrollbar { display: none; }

/* Grouped lists */
.ks-group { background: var(--card); border-radius: 14px; margin: 0 0 14px; overflow: hidden; }
.ks-li { position: relative; display: flex; align-items: center; gap: 10px; padding: 0 12px; min-height: 38px; }
.ks-li + .ks-li::before { content: ''; position: absolute; top: 0; left: var(--sep-l, 12px); right: 0; border-top: .5px solid var(--line); }
.ks-sw + .ks-sw::before { display: none; }
.ks-sts .ks-li, .stp-list .ks-li { --sep-l: 40px; }
.ks-gi { width: 18px; display: grid; place-items: center; color: var(--st); }
.ks-gi .gl { width: 17px; height: 17px; }
.ks-l { flex: 1; min-width: 0; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ks-l.acc { color: var(--acc); } .ks-l.danger { color: var(--danger); } .ks-l.mute { color: var(--mute); }
.ks-n, .ks-v { color: var(--mute); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ks-chev { width: 11px; height: 11px; color: var(--faint); stroke-width: 2.6; flex: none; }
.ks-gh { font: 600 11px/1 var(--a-ui); color: var(--mute); margin: 16px 12px 7px; }
.ks-gf { margin: -8px 12px 14px; font-size: 10px; line-height: 1.35; color: var(--mute); }
.ks-acc { color: var(--acc); width: 17px; height: 17px; flex: none; }
.ks-li.flash { animation: flash 1.4s ease-out; }
@keyframes flash { 0%, 30% { background: color-mix(in srgb, var(--st) 22%, transparent); } 100% { background: transparent; } }
.ks-li.flash .ks-n { animation: count 0.6s cubic-bezier(.3, 1.6, .5, 1); color: var(--st); font-weight: 600; }
@keyframes count { 0% { transform: translateY(-6px) scale(1.4); } }

/* Search */
.ks-search { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; margin: 0 0 10px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--mute); }
.ks-search .ic { width: 14px; height: 14px; flex: none; }
.ks-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 13px; color: var(--ink); -webkit-appearance: none; appearance: none; padding: 0; }
.ks-search input::placeholder { color: var(--mute); }
.ks-search input::-webkit-search-cancel-button { display: none; }
.ks-search.on { background: var(--card); box-shadow: 0 0 0 .5px var(--line), 0 4px 14px -8px rgba(0, 0, 0, .3); }
.ks-clr { width: 16px; height: 16px; border-radius: 50%; background: var(--mute); color: var(--card); display: grid; place-items: center; flex: none; }
.ks-clr .ic { width: 10px; height: 10px; stroke-width: 3; }
.ks-meta { display: flex; justify-content: space-between; align-items: center; margin: 0 4px 8px; color: var(--mute); font-size: 11px; }
.ks-sortb { display: flex; align-items: center; gap: 2px; color: var(--acc); font-size: 11px; font-weight: 500; }
.ks-sortb .ic { width: 11px; height: 11px; }
.ks-off { display: flex; align-items: center; gap: 6px; width: fit-content; margin: -4px 4px 12px; padding: 5px 10px 5px 8px; border-radius: 99px; background: var(--card); box-shadow: 0 0 0 .5px var(--line); font-size: 10.5px; font-weight: 500; color: var(--mute); animation: off-in .5s cubic-bezier(.3, 1.4, .5, 1); }
.ks-off .ic { width: 13px; height: 13px; color: var(--acc); }
@keyframes off-in { from { transform: translateY(-6px); opacity: 0; } }

/* Book rows */
.ks-list .ks-li { --sep-l: 58px; min-height: 64px; padding-top: 7px; padding-bottom: 7px; gap: 11px; }
.ks-bi { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ks-bi b { font: 600 12.5px/1.2 var(--a-book); font-variation-settings: 'SOFT' 50, 'WONK' 0, 'opsz' 17; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ks-bi b.sys { font-family: var(--a-ui); font-variation-settings: normal; }
.ks-bi > span { color: var(--mute); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ks-bi > .ks-st { display: flex; align-items: center; gap: 4px; margin-top: 2px; color: var(--mute); font-size: 10px; }
.ks-st .dot { width: 6px; height: 6px; }
.ks-stars { display: inline-flex; gap: 1px; margin-left: 4px; color: var(--acc); }
.ks-stars .star { width: 9px; height: 9px; }
.star { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.star.on { fill: currentColor; }
.ks-stars .star:not(.on) { display: none; }
.ks-in { color: var(--ink) !important; font-weight: 500; }
.ks-nores { color: var(--mute); font-size: 11px; min-height: 64px !important; justify-content: center; text-align: center; line-height: 1.45; }
.ks-nores b { color: var(--ink); font-weight: 600; }
.ks-addb { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: var(--acc); border: 1.6px solid currentColor; flex: none; }
.ks-addb .ic { width: 13px; height: 13px; stroke-width: 2.4; }
.ks-nob { list-style: none; }
/* Swipeable rows: the row slides over its actions */
.ks-list .ks-li.ks-sw { padding: 0; overflow: hidden; display: block; min-height: 0; }
.ks-row { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; min-height: 64px; padding: 7px 12px; background: var(--card); transform: translateX(var(--sx, 0)); transition: transform .35s cubic-bezier(.2, 1.1, .3, 1); }
.ks-sw.dragging .ks-row { transition: none; }
.ks-sw.sw-t .ks-row { transform: translateX(var(--sx, -112px)); }
.ks-sw.sw-l .ks-row { transform: translateX(var(--sx, 92px)); }
.ks-sw + .ks-sw .ks-row::before { content: ''; position: absolute; top: 0; left: 58px; right: 0; border-top: .5px solid var(--line); }
.ks-swl, .ks-swt { position: absolute; top: 0; bottom: 0; display: flex; }
.ks-swl { left: 0; width: 92px; background: var(--st); }
.ks-swt { right: 0; width: 112px; }
.ks-swl button, .ks-swt button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font: 600 9.5px/1 var(--a-ui); color: #fff; }
.ks-swl button { color: var(--on); }
.ks-swl .gl { width: 17px; height: 17px; stroke-width: 2.2; }
.ks-swt .ic { width: 17px; height: 17px; }
.ks-swt .st { background: var(--acc); color: var(--on-acc); } .ks-swt .del { background: var(--danger); }
.ks-swt b, .ks-swl b { font-weight: inherit; }

/* Book screen */
.ks-hero { text-align: center; padding: 4px 0 14px; }
.ks-hero .flip { margin: 0 auto 12px; display: block; width: 112px; }
.ks-hero .flip-b { border-radius: 3px; background: var(--card); box-shadow: 0 0 0 .5px var(--line), 0 10px 24px -10px rgba(0, 0, 0, .4); padding: 10px 9px; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.ks-hero .flip-b b { font: 600 10.5px/1.15 var(--a-book); }
.ks-hero .flip-b .ks-stars { margin: 0; } .ks-hero .flip-b .ks-stars .star { width: 8px; height: 8px; }
.ks-hero .flip-b p { font-size: 9.5px; line-height: 1.35; color: var(--ink); }
.ks-hero .flip-b small { margin-top: auto; font-size: 8.5px; color: var(--mute); }
.ks-bt2 { font: 600 19px/1.12 var(--a-book); font-variation-settings: 'SOFT' 50, 'WONK' 0, 'opsz' 28; letter-spacing: -.01em; padding: 0 10px; }
.ks-hero .ks-ba { font-size: 12px; margin-top: 4px; }
.ks-tap { cursor: pointer; }
.ks-sv { display: inline-flex; align-items: center; gap: 4px; color: color-mix(in oklab, var(--st) 82%, var(--ink)); font-size: 12.5px; font-weight: 500; }
.ks-sv .gl { width: 14px; height: 14px; color: var(--st); }
.ks-sv .ic { width: 11px; height: 11px; color: var(--mute); }
.ks-rate { display: flex; gap: 3px; color: var(--acc); }
.ks-rate button { display: grid; place-items: center; width: 22px; height: 26px; }
.ks-rate .star { width: 18px; height: 18px; stroke-width: 1.4; transition: transform .2s; }
.ks-rate .star:not(.on) { color: var(--faint); }
.ks-rate button.pop .star { animation: star-pop .5s var(--d, 0ms) cubic-bezier(.3, 1.8, .5, 1) both; }
@keyframes star-pop { 0% { transform: scale(.4); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
.ks-note { display: block; width: 100%; padding: 10px 12px; min-height: 52px; border: 0; outline: 0; resize: none; font: inherit; font-size: 12.5px; line-height: 1.4; color: var(--ink); field-sizing: content; }
.ks-note::placeholder { color: var(--faint); }
.ks-note:focus { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--acc) 45%, transparent); }
.ks-about p { padding: 10px 12px; font-size: 11.5px; line-height: 1.45; color: var(--ink); }
.ks-tog { width: 36px; height: 22px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 14%, transparent); position: relative; transition: background .2s; flex: none; }
.ks-tog::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.ks-tog.on { background: var(--acc); } .ks-tog.on::after { transform: translateX(14px); }
.ks-tog.sm { width: 28px; height: 17px; } .ks-tog.sm::after { width: 13px; height: 13px; } .ks-tog.sm.on::after { transform: translateX(11px); }
.ks-hist .ks-li { --sep-l: 30px; }
.ks-hist .dot { width: 8px; height: 8px; }
.ks-hist .ks-li:not(:last-child)::after { content: ''; position: absolute; left: 15.5px; top: 24px; height: 28px; border-left: 1px dashed color-mix(in srgb, var(--mute) 60%, transparent); }
.ks-hist .fresh { animation: fresh 1.2s ease-out; }
@keyframes fresh { 0% { background: color-mix(in srgb, var(--st) 26%, transparent); } 100% { background: transparent; } }
.ks-foot { margin: -4px 12px 8px; font-size: 10px; color: var(--mute); }

/* Menus: iOS pull-down, glass */
.ks-menu { position: absolute; z-index: 40; right: 18px; width: 176px; padding: 4px 0; border-radius: 14px; background: var(--menu); backdrop-filter: blur(24px) saturate(1.8); -webkit-backdrop-filter: blur(24px) saturate(1.8); box-shadow: 0 0 0 .5px var(--line), 0 18px 40px -12px rgba(0, 0, 0, .45); transform-origin: top right; transform: scale(.7); opacity: 0; transition: transform .28s cubic-bezier(.2, 1.3, .4, 1), opacity .15s; }
.ks-menu.on { transform: none; opacity: 1; }
.ks-menu button { display: flex; align-items: center; gap: 6px; width: 100%; height: 32px; padding: 0 12px 0 8px; font-size: 12.5px; }
.ks-menu button + button { border-top: .5px solid var(--line); }
.ks-menu hr { height: 6px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.ks-menu button:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.ks-menu button > span:nth-child(2) { flex: 1; text-align: left; }
.ks-menu .danger { color: var(--danger); }
.ks-mh { padding: 6px 12px 5px 28px; font-size: 10px; color: var(--mute); }
.ks-mc { width: 14px; flex: none; } .ks-mc .ic { width: 12px; height: 12px; stroke-width: 2.6; }
.ks-menu .gl { width: 15px; height: 15px; color: var(--st); }
.ks-mi { width: 14px; height: 14px; }
.ks-mv { color: var(--mute); font-size: 11px; margin-right: 2px; }

/* Lists */
.ks-lr { min-height: 64px !important; --sep-l: 96px; }
.ks-fan { position: relative; width: 70px; height: 48px; flex: none; }
.ks-fan .cv { position: absolute; top: 2px; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.ks-fan .cv:nth-child(1) { left: 0; z-index: 3; } .ks-fan .cv:nth-child(2) { left: 18px; z-index: 2; transform: scale(.94); } .ks-fan .cv:nth-child(3) { left: 36px; z-index: 1; transform: scale(.88); }
.ks-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 10px; padding: 0 4px; }
.ks-gc1 { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.ks-gc1 .cv { margin-bottom: 7px; }
.ks-gc1 .ks-bt { font-size: 10.5px; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ks-gc1 .ks-ba { font-size: 9.5px; }

/* Empty states: ContentUnavailableView with Kabook's drawing */
.ks-cu { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 46px 18px 20px; }
.ks-cu .ill { width: 74px; height: 74px; margin-bottom: 6px; }
.ks-cu .ks-cuh { font: 700 15px/1.2 var(--a-ui); letter-spacing: -.01em; }
.ks-cu p { font-size: 11.5px; line-height: 1.4; color: var(--mute); max-width: 210px; }
.ks-cu .ks-btn { margin-top: 8px; }

/* Sheets */
.ph-scroll.sheet { padding: 0; overflow: hidden; background: #000; }
.ks-under { height: 52px; background: var(--under); }
.ks-sheet { position: absolute; top: 46px; left: 0; right: 0; bottom: 0; background: var(--bg); border-radius: 22px 22px 0 0; padding: 10px 12px 0; overflow: hidden auto; scrollbar-width: none; }
.ks-sheet::-webkit-scrollbar { display: none; }
.ks-sbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 10px; min-height: 30px; }
.ks-sbar b { font: 600 13.5px/1 var(--a-ui); }
.ks-sbar > :first-child { justify-self: start; } .ks-sbar > :last-child { justify-self: end; }
.ks-pill { height: 28px; padding: 0 12px; border-radius: 99px; background: var(--glass); color: var(--acc); font-size: 12.5px; box-shadow: 0 0 0 .5px var(--line), 0 4px 12px -6px rgba(0, 0, 0, .2); }
.ks-pill.r { font-weight: 600; }
.ks-pill.pro { background: var(--acc); color: var(--on-acc); font-weight: 600; box-shadow: none; transition: opacity .2s; }
.ks-pill.pro:disabled { opacity: .35; }
.ks-fix { min-height: 14px; margin: -2px 6px 6px; font-size: 10.5px; color: var(--mute); }
.ks-fix b { color: var(--ink); font-weight: 600; }
.ks-sheet .ks-list .ks-li { min-height: 56px; padding-top: 6px; padding-bottom: 6px; }
.ks-byhand .ks-li { min-height: 40px; }
/* Settings */
/* The set-a-password sheet at the medium detent */
/* Context menu, lifted */
/* Paywall card (Plus is a placeholder) */

/* Keyboard */
.ks-kb { position: absolute; z-index: 22; left: 0; right: 0; bottom: 0; padding: 7px 3px 26px; background: var(--kb); display: grid; gap: 8px; }
.ks-kb .r { display: flex; justify-content: center; gap: 4px; }
.ks-kb .k { display: grid; place-items: center; width: 22px; height: 30px; border-radius: 5px; background: var(--key); color: var(--key-ink); font: 400 13.5px/1 var(--a-ui); box-shadow: 0 1px 0 rgba(0, 0, 0, .3); text-align: center; }
.ks-kb .k.w { width: 30px; background: var(--key-fn); }
.ks-kb .k.w2 { width: 50px; font-size: 11px; background: var(--key-fn); }
.ks-kb .k.sp { flex: 0 1 132px; width: auto; font-size: 11px; }
.ks-kb .k.go { background: var(--acc); color: var(--on-acc); }
.ks-kb .k.tap { animation: key-tap .25s; }
@keyframes key-tap { 0% { transform: translateY(-6px) scale(1.25); } }

/* ---------- Shelves ---------- */
.shelf-in { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 22px 14px; }

/* Cover flip */
.flip { perspective: 900px; cursor: pointer; display: inline-block; }
.flip-in { position: relative; transition: transform .7s cubic-bezier(.3, 1.2, .4, 1); transform-style: preserve-3d; }
.flip.flipped .flip-in { transform: rotateY(180deg); }
.flip-f, .flip-b { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip-b { position: absolute; inset: 0; transform: rotateY(180deg); overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .flip-in { transition: none; } }

/* Toast: drawn inverted, dark on a light page and light on a dark one, its
   dots in the other theme's status colours (--inv-*). */
.toast { position: fixed; z-index: 90; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 99px; background: var(--s-toast); color: var(--s-toast-ink); font: 500 14px/1.2 var(--f-sans); box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .45); transform: translate(-50%, 30px); opacity: 0; visibility: hidden; pointer-events: none; transition: transform .4s cubic-bezier(.2, 1.4, .4, 1), opacity .2s, visibility 0s linear .4s; white-space: nowrap; max-width: calc(100vw - 32px); }
.toast span { overflow: hidden; text-overflow: ellipsis; }
.toast .dot { width: 9px; height: 9px; --wish: var(--inv-wish); --next: var(--inv-next); --reading: var(--inv-reading); --paused: var(--inv-paused); --done: var(--inv-done); --quit: var(--inv-quit); }
.toast.on { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .4s cubic-bezier(.2, 1.4, .4, 1), opacity .2s, visibility 0s; }

/* ---------- Site additions ---------- */
/* Cover widths and the no-cover hues as classes (kabook.js sets them), so no
   element needs a style attribute and the CSP can forbid inline styles. */
.cv { width: 72px; }
.cv.w-26 { width: 26px; } .cv.w-30 { width: 30px; } .cv.w-34 { width: 34px; } .cv.w-38 { width: 38px; } .cv.w-58 { width: 58px; } .cv.w-60 { width: 60px; } .cv.w-74 { width: 74px; } .cv.w-76 { width: 76px; } .cv.w-92 { width: 92px; } .cv.w-100 { width: 100px; } .cv.w-112 { width: 112px; } .cv.w-120 { width: 120px; } .cv.w-140 { width: 140px; } .cv.w-150 { width: 150px; } .cv.w-170 { width: 170px; }
.hue-0 { --h: 254; } .hue-1 { --h: 255; } .hue-2 { --h: 256; } .hue-3 { --h: 257; } .hue-4 { --h: 258; } .hue-5 { --h: 259; } .hue-6 { --h: 260; } .hue-7 { --h: 261; } .hue-8 { --h: 262; } .hue-9 { --h: 263; } .hue-10 { --h: 264; } .hue-11 { --h: 265; } .hue-12 { --h: 266; } .hue-13 { --h: 267; } .hue-14 { --h: 268; } .hue-15 { --h: 269; } .hue-16 { --h: 270; } .hue-17 { --h: 271; }
.ks-menu.at-78 { top: 78px; }
[data-cover] { display: contents; }
.ks-shh { display: block; }

/* Phones scroll on their own, as pakratt's do: the screen is its own scroll
   area that never chains out to the page, rows take only vertical pans so a
   sideways swipe is the row's, and the Next up strip snaps and keeps its
   sideways overscroll to itself. */
.ks-sheet { overscroll-behavior: contain; }
.ks-hrow { overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0 4px; -webkit-overflow-scrolling: touch; }
.ks-hrow > .cv { scroll-snap-align: start; }
.ks-li, .ks-row, .ks-gc1, .ks-nowb { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.ks-kb, .ks-tabs { user-select: none; -webkit-user-select: none; }
/* The parts of a phone over its scroll area (the tab bar, the keyboard, the
   strip above a sheet, the island) are still the phone: a drag that starts on them moves
   neither the phone nor the page. Taps still work. */
.ks-tabs, .ks-kb, .ks-under, .ph-island, .ph-scroll.sheet { touch-action: none; }
.ks-sheet { touch-action: pan-y; }

/* The wordmark's weight: 750 is not a value SVG's font-weight attribute takes. */
.wm text { font-weight: 750; }
/* A row's swipe actions show only while it slides, so their colour cannot
   bleed through the group's rounded corners at rest. */
.ks-sw:not(.sw-t):not(.sw-l):not(.dragging) :is(.ks-swl, .ks-swt) { visibility: hidden; }
