/* Reader — styles. Themes are CSS variables on <html data-theme>. */
:root {
  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Atkinson Hyperlegible", system-ui, sans-serif;
  --read-font: "Literata", Georgia, serif;
  --read-size: 20px;
  --read-leading: 1.65;
  --measure: 36rem;
  --radius: 12px;
  --side: 284px;
  color-scheme: light;
}
html[data-theme="light"] {
  --bg: #fbfaf7; --surface: #ffffff; --raise: #f3f0ea; --ink: #1d1b18; --ink-2: #57524a; --ink-3: #8c867c;
  --line: #e9e4db; --accent: #b4532a; --accent-soft: #f6e6dc; --on-accent: #fff; --mark: #ffe08a99;
  --shadow: 0 1px 2px #0000000d, 0 8px 28px #00000014; --bar: #fbfaf7d9;
}
html[data-theme="sepia"] {
  --bg: #f4ecd8; --surface: #f8f2e2; --raise: #ece2c8; --ink: #3a2e20; --ink-2: #6b5a44; --ink-3: #98866b;
  --line: #e2d5b6; --accent: #9c4a22; --accent-soft: #ead8bd; --on-accent: #fff; --mark: #f5c96a88;
  --shadow: 0 1px 2px #3a2e2012, 0 8px 28px #3a2e201a; --bar: #f4ecd8d9;
}
html[data-theme="dark"] {
  --bg: #161719; --surface: #1d1e21; --raise: #26272b; --ink: #e7e2d9; --ink-2: #aaa398; --ink-3: #7b766e;
  --line: #2c2d31; --accent: #e3906a; --accent-soft: #3a2a22; --on-accent: #1a1a1a; --mark: #b8862b66;
  --shadow: 0 1px 2px #0006, 0 10px 30px #0008; --bar: #161719d9; color-scheme: dark;
}
html[data-theme="black"] {
  --bg: #000; --surface: #0a0a0a; --raise: #161616; --ink: #d9d4ca; --ink-2: #9d978d; --ink-3: #6d6861;
  --line: #1e1e1e; --accent: #e3906a; --accent-soft: #2a1d17; --on-accent: #111; --mark: #a0742266;
  --shadow: 0 0 0 1px #222; --bar: #000000d9; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink); font: 15px/1.45 var(--ui);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: var(--ink); }
a { color: var(--accent); }
svg.i { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

/* ---------- layout ---------- */
#app { display: flex; min-height: 100%; }
#sidebar {
  width: var(--side); flex: none; height: 100vh; position: sticky; top: 0; overflow-y: auto;
  border-right: 1px solid var(--line); background: var(--surface); padding: 14px 10px 30px;
  scrollbar-width: thin;
}
#main { flex: 1; min-width: 0; }
#scrim { display: none; }
@media (max-width: 899px) {
  #sidebar {
    position: fixed; left: 0; top: 0; z-index: 40; transform: translateX(-102%);
    transition: transform .22s ease; box-shadow: var(--shadow); padding-top: max(14px, env(safe-area-inset-top));
  }
  body.drawer #sidebar { transform: none; }
  body.drawer #scrim { display: block; position: fixed; inset: 0; background: #0005; z-index: 39; }
}

/* ---------- sidebar ---------- */
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 14px; font-weight: 700; font-size: 17px; letter-spacing: .01em; }
.brand .mark { font-family: "Literata", serif; color: var(--accent); font-size: 22px; line-height: 1; }
.search { position: relative; margin: 0 6px 12px; }
.search input {
  width: 100%; padding: 9px 12px 9px 34px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); outline: none;
}
.search input:focus { border-color: var(--accent); }
.search svg { position: absolute; left: 10px; top: 9px; width: 17px; height: 17px; color: var(--ink-3); }
.nav a, .nav button.navbtn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border-radius: 8px;
  color: var(--ink); text-decoration: none; text-align: left; min-height: 34px;
}
.nav a:hover, .nav button.navbtn:hover { background: var(--raise); }
.nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav .n { margin-left: auto; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.nav a.on .n { color: var(--accent); }
.nav .label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav .fav { width: 16px; height: 16px; border-radius: 4px; flex: none; background: var(--raise); object-fit: cover; }
.nav .err { color: #c0392b; font-size: 12px; }
.section-h {
  display: flex; align-items: center; gap: 6px; margin: 16px 10px 4px; font-size: 11.5px; font-weight: 650;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3);
}
.folder > button.navbtn .chev { transition: transform .15s; width: 14px; height: 14px; }
.folder.closed > button.navbtn .chev { transform: rotate(-90deg); }
.folder.closed > .feeds { display: none; }
.folder .feeds a { padding-left: 26px; font-size: 14px; }
.side-foot { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 10px; }

/* ---------- list header ---------- */
.lh {
  position: sticky; top: 0; z-index: 10; background: var(--bar); backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line);
  padding: max(10px, env(safe-area-inset-top)) 18px 10px; display: flex; align-items: center; gap: 10px;
}
.lh h1 { font-size: 19px; margin: 0; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lh h1 small { font-weight: 500; color: var(--ink-3); font-size: 13px; margin-left: 8px; }
.iconbtn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 9px; color: var(--ink-2); flex: none; }
.iconbtn:hover { background: var(--raise); color: var(--ink); }
.iconbtn.on { color: var(--accent); }
.menu-btn { display: none; }
@media (max-width: 899px) { .menu-btn { display: inline-grid; } }
.seg { display: inline-flex; background: var(--raise); border-radius: 9px; padding: 2px; flex: none; }
.seg button { padding: 5px 10px; border-radius: 7px; font-size: 13px; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px #0000001a; font-weight: 600; }
@media (max-width: 600px) { .lh .hide-sm { display: none; } }

/* ---------- list items ---------- */
.items { max-width: 880px; margin: 0 auto; padding-bottom: 80px; }
.row {
  display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 15px 20px; border-bottom: 1px solid var(--line);
  cursor: pointer; position: relative; text-decoration: none; color: inherit;
}
.row:hover, .row.sel { background: var(--surface); }
.row.sel { box-shadow: inset 3px 0 0 var(--accent); }
.row .t { font-weight: 640; font-size: 16.5px; line-height: 1.3; letter-spacing: -.005em; margin: 0 0 4px; text-wrap: pretty; }
.row .meta { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-3); flex-wrap: wrap; }
.row .meta .feedname { color: var(--ink-2); font-weight: 550; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.row .snip { color: var(--ink-2); font-size: 14px; line-height: 1.45; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .thumb { width: 92px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--raise); }
.row.story .thumb { display: none; }
.row.read .t { font-weight: 450; color: var(--ink-3); }
.row.read .snip { color: var(--ink-3); }
.row .star { color: var(--accent); }
.row .prog { position: absolute; left: 20px; right: 20px; bottom: -1px; height: 2px; background: var(--line); border-radius: 2px; }
.row .prog i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.view-titles .row { padding: 10px 20px; grid-template-columns: 1fr; }
.view-titles .row .t { font-size: 15px; margin: 0 0 2px; }
.view-titles .row .snip, .view-titles .row .thumb { display: none; }
.view-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; padding: 18px; max-width: 1200px; }
.view-cards .row { grid-template-columns: 1fr; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 0 0 14px; overflow: hidden; }
.view-cards .row > div { padding: 0 16px; }
.view-cards .row .thumb { width: 100%; height: 150px; border-radius: 0; order: -1; }
.view-cards .row .prog { left: 0; right: 0; bottom: 0; }
.list-end { text-align: center; color: var(--ink-3); padding: 40px 20px 60px; }
.empty { text-align: center; padding: 90px 24px; color: var(--ink-2); }
.empty .orn { font-family: "Literata", serif; font-size: 44px; color: var(--accent); opacity: .7; }
.empty h2 { font-family: "Literata", serif; font-weight: 500; font-size: 26px; margin: 10px 0 6px; color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 10px;
  background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; border: 0; min-height: 40px;
}
.btn.ghost { background: var(--raise); color: var(--ink); }
.btn.small { padding: 6px 11px; min-height: 32px; font-size: 13.5px; }
.btn:disabled { opacity: .55; }
.loading { padding: 40px; text-align: center; color: var(--ink-3); }

/* ---------- reader ---------- */
#reader {
  position: fixed; inset: 0; z-index: 30; background: var(--bg); overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
body.reading { overflow: hidden; }
.r-bar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 6px;
  padding: max(8px, env(safe-area-inset-top)) 10px 8px; background: var(--bar);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  transition: transform .25s ease; border-bottom: 1px solid transparent;
}
.r-bar.scrolled { border-bottom-color: var(--line); }
.r-bar.hide { transform: translateY(-110%); }
.r-bar .r-feed { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; opacity: 0; transition: opacity .2s; }
.r-bar.scrolled .r-feed { opacity: 1; }
.r-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 6; pointer-events: none; }
.r-progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }
.r-banner { max-width: var(--measure); margin: 14px auto 0; padding: 9px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--ink-2); font-size: 13.5px; }

.article {
  max-width: calc(var(--measure) + 44px); margin: 0 auto; padding: 28px 22px 40px;
  font-family: var(--read-font); font-size: var(--read-size); line-height: var(--read-leading);
  font-optical-sizing: auto; font-kerning: normal; font-variant-ligatures: common-ligatures contextual;
  hanging-punctuation: first allow-end; overflow-wrap: break-word;
}
.article .kicker { font: 650 12px/1.3 var(--ui); letter-spacing: .09em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.article .kicker a { color: inherit; text-decoration: none; }
.article h1.title {
  font-family: var(--read-font); font-size: 1.85em; line-height: 1.14; font-weight: 640; letter-spacing: -.012em;
  margin: 0 0 .5em; text-wrap: balance;
}
.article .byline { font: 13.5px/1.4 var(--ui); color: var(--ink-3); display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 2.1em; padding-bottom: 1.4em; border-bottom: 1px solid var(--line); }
.article .body { color: var(--ink); text-wrap: pretty; }
.article.justify .body { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.article .body p { margin: 0 0 1.05em; }
.article .body > div > p:first-child, .article .body > p:first-child { margin-top: 0; }
.article .body h1, .article .body h2, .article .body h3, .article .body h4 {
  line-height: 1.25; font-weight: 650; margin: 1.8em 0 .6em; letter-spacing: -.005em; text-wrap: balance;
}
.article .body h1 { font-size: 1.4em; } .article .body h2 { font-size: 1.25em; } .article .body h3 { font-size: 1.1em; }
.article .body h4, .article .body h5, .article .body h6 { font-size: 1em; }
.article .body img, .article .body video { max-width: 100%; height: auto; display: block; margin: 1.5em auto; border-radius: 6px; }
.article .body p img { display: inline-block; margin: .2em 0; vertical-align: middle; }
.article .body figure { margin: 1.8em 0; }
.article .body figcaption { font: 13.5px/1.45 var(--ui); color: var(--ink-3); text-align: center; margin-top: -.6em; }
.article .body blockquote {
  margin: 1.5em 0; padding: .1em 0 .1em 1.1em; border-left: 3px solid var(--accent); color: var(--ink-2);
}
.article .body hr { border: 0; height: auto; margin: 2.2em 0; text-align: center; overflow: visible; }
.article .body hr::after { content: "⁂"; color: var(--ink-3); font-size: 1.05em; }
.article .body a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article .body a[data-item] { text-decoration-style: dotted; }
.article .body ul, .article .body ol { padding-left: 1.4em; margin: 0 0 1.05em; }
.article .body li { margin: .3em 0; }
.article .body pre { font: .78em/1.55 ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--raise); padding: 14px 16px; border-radius: 8px; overflow-x: auto; }
.article .body code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .85em; background: var(--raise); padding: .1em .3em; border-radius: 4px; }
.article .body pre code { background: none; padding: 0; font-size: 1em; }
.article .body .tablewrap { overflow-x: auto; margin: 1.4em 0; }
.article .body table { border-collapse: collapse; font: 14.5px/1.45 var(--ui); min-width: 60%; }
.article .body td, .article .body th { border: 1px solid var(--line); padding: 6px 10px; vertical-align: top; }
.article .body th { background: var(--raise); }
.article .body sup, .article .body sub { line-height: 0; }
.article .body mark.hl { background: var(--mark); color: inherit; border-radius: 2px; padding: 0 1px; }
.article audio { width: 100%; margin: 0 0 1.6em; }

.r-end { font-family: var(--ui); text-align: center; padding: 30px 0 calc(90px + env(safe-area-inset-bottom)); }
.end-mark { font-family: "Literata", serif; color: var(--ink-3); font-size: 26px; margin-bottom: 14px; }
.read-state { display: inline-flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--ink-3); min-height: 28px; }
.read-state .pill { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.read-state button { color: var(--accent); font-weight: 600; }
.next-card {
  display: flex; align-items: center; gap: 16px; width: 100%; max-width: 30rem; margin: 22px auto 0; padding: 18px 20px;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: left; box-shadow: var(--shadow);
  transition: transform .12s ease;
}
.next-card:active { transform: scale(.985); }
.next-card .lbl { font-size: 11.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.next-card .nt { font-family: var(--read-font); font-size: 18px; line-height: 1.3; margin-top: 3px; color: var(--ink); }
.next-card .arrow { margin-left: auto; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; flex: none; }
.end-links { display: flex; justify-content: center; gap: 18px; margin-top: 18px; font-size: 14px; flex-wrap: wrap; }
.end-links a, .end-links button { color: var(--ink-2); text-decoration: none; }
.end-links a:hover, .end-links button:hover { color: var(--accent); }

.hl-pop {
  position: fixed; z-index: 60; display: flex; gap: 2px; background: var(--ink); color: var(--bg); border-radius: 10px;
  padding: 4px; box-shadow: var(--shadow); font: 600 13.5px var(--ui);
}
.hl-pop button { padding: 7px 11px; border-radius: 7px; }
.hl-pop button:hover { background: #ffffff22; }

/* ---------- popovers, modal, toast ---------- */
.pop {
  position: fixed; z-index: 50; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 8px; min-width: 230px; max-width: calc(100vw - 20px); font-family: var(--ui);
}
.pop .mi { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 8px; text-align: left; font-size: 14.5px; }
.pop .mi:hover { background: var(--raise); }
.pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.aa { width: 320px; padding: 16px; }
.aa .r { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.aa .r:last-child { margin-bottom: 0; }
.aa .lab { width: 64px; font-size: 12px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; flex: none; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line); }
.swatch.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--surface) inset; }
.swatch[data-v="light"] { background: #fbfaf7; } .swatch[data-v="sepia"] { background: #f4ecd8; }
.swatch[data-v="dark"] { background: #1d1e21; } .swatch[data-v="black"] { background: #000; }
.swatch[data-v="auto"] { background: linear-gradient(135deg, #fbfaf7 50%, #1d1e21 50%); }
.fontgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; flex: 1; }
.fontgrid button { padding: 8px 4px; border-radius: 8px; border: 1px solid var(--line); font-size: 15px; }
.fontgrid button.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.stepper { display: flex; align-items: center; flex: 1; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.stepper button { flex: 1; padding: 7px 0; font-size: 17px; }
.stepper button:hover { background: var(--raise); }
.stepper span { min-width: 54px; text-align: center; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

#modal { position: fixed; inset: 0; z-index: 70; background: #0006; display: grid; place-items: center; padding: 16px; }
.sheet {
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); width: 100%; max-width: 480px;
  max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px;
}
.sheet h2 { margin: 0 0 6px; font-size: 19px; }
.sheet p { color: var(--ink-2); margin: 0 0 14px; }
.sheet .acts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
@media (max-width: 600px) {
  #modal { place-items: end center; padding: 0; }
  .sheet { border-radius: 18px 18px 0 0; max-width: none; padding-bottom: max(22px, env(safe-area-inset-bottom)); }
}
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.field input[type=text], .field input[type=url], .field input[type=password], .field select, .field textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); outline: none;
}
.field input:focus, .field select:focus { border-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: 14.5px; }
.check input { margin-top: 3px; accent-color: var(--accent); width: 17px; height: 17px; flex: none; }
.check small { display: block; color: var(--ink-3); }

#toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translate(-50%, 30px);
  z-index: 80; background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 12px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: all .22s ease; max-width: calc(100vw - 30px); display: flex; gap: 14px; align-items: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast button { color: var(--accent); font-weight: 700; filter: brightness(1.3); }

/* ---------- pages ---------- */
.page { max-width: 760px; margin: 0 auto; padding: 22px 20px 90px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; }
.card h3 { margin: 0 0 4px; font-size: 16px; }
.card .sub { color: var(--ink-3); font-size: 13.5px; margin: 0 0 14px; }
.card ol { padding-left: 1.2em; margin: 0 0 14px; color: var(--ink-2); }
.card ol li { margin-bottom: 4px; }
.job { padding: 10px 12px; border-radius: 10px; background: var(--raise); margin-top: 10px; font-size: 14px; }
.job b { text-transform: capitalize; }
.feedtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.feedtable td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.feedtable td:first-child { width: 100%; }
.feedtable .ft { font-weight: 600; } .feedtable .fu { color: var(--ink-3); font-size: 12px; word-break: break-all; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 99px; background: var(--raise); font-size: 13px; }
.chip button { color: var(--ink-3); }
.stat { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat div { background: var(--raise); border-radius: 10px; padding: 10px 12px; }
.stat b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--ink-3); }

.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; padding: 20px; max-width: 1200px; margin: 0 auto; }
.story { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.story .cover { height: 132px; background: var(--raise) center/cover no-repeat; position: relative; }
.story .cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, #00000055); }
.story .in { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.story h3 { margin: 0; font-family: "Literata", serif; font-weight: 600; font-size: 18px; line-height: 1.25; }
.story .bar { height: 5px; background: var(--raise); border-radius: 5px; overflow: hidden; }
.story .bar i { display: block; height: 100%; background: var(--accent); }
.story .facts { font-size: 12.5px; color: var(--ink-3); }
.story .nx { font-size: 13.5px; color: var(--ink-2); }
.story .acts { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; }

.quote { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; margin: 0 0 22px; }
.quote q { font-family: var(--read-font); font-size: 18px; line-height: 1.55; quotes: none; display: block; }
.quote .note { margin-top: 6px; color: var(--ink-2); font-size: 14px; }
.quote a { font-size: 13px; color: var(--ink-3); text-decoration: none; }

.kbd { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; }
.kbd kbd { font: 600 12.5px ui-monospace, monospace; background: var(--raise); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; justify-self: start; }

/* ---------- login ---------- */
body.auth { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
html:not([data-theme]) body.auth { background: #fbfaf7; color: #1d1b18; }
.auth-card { width: 100%; max-width: 360px; background: #fff; border: 1px solid #e9e4db; border-radius: 18px; padding: 30px 26px; box-shadow: 0 8px 28px #00000014; text-align: center; }
.auth-mark { font-family: "Literata", serif; color: #b4532a; font-size: 40px; line-height: 1; }
.auth-card h1 { font-family: "Literata", serif; font-weight: 600; margin: 10px 0 4px; }
.auth-card p { color: #57524a; margin: 0 0 18px; font-size: 14.5px; }
.auth-card input { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid #e0dacf; margin-bottom: 10px; font-size: 16px; }
.auth-card button { width: 100%; padding: 12px; border-radius: 10px; background: #b4532a; color: #fff; font-weight: 650; font-size: 16px; margin-top: 4px; }
.auth-card .err { color: #b3261e; min-height: 1em; margin: 12px 0 0; }
