/* Library app. One phone-width column; screens swap by hash; fixed tab bar. DM Sans throughout. */
:root {
  --bg: #F7F5F0; --surface: #FFFFFF; --ink: #1B1A17; --muted: #68645C; --line: #E6E2D9; --line-soft: #EFECE5;
  --accent: #2F5D50; --accent-ink: #FFFFFF; --accent-soft: #E4ECE8; --hero: #1F2A2A; --hero-ink: #F7F5F0;
  --hero-muted: #C3CDCA; --bar: #9FD3BF; --danger: #B4473A; --side: #F1EEE7;
  --shadow: 0 1px 2px rgba(27,26,23,.05), 0 8px 24px rgba(27,26,23,.06);
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141615; --surface: #1D201F; --ink: #EDEAE3; --muted: #A39F96; --line: #2C302E; --line-soft: #262A28;
    --accent: #8CC7B2; --accent-ink: #0F1A16; --accent-soft: #1F2C28; --hero: #22302D; --hero-ink: #EDEAE3;
    --hero-muted: #B4C0BC; --bar: #8CC7B2; --danger: #E07A6C; --side: #181A19;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; padding-top: env(safe-area-inset-top, 0px);
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.app { max-width: 560px; margin: 0 auto; padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.pad { padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.screen { animation: in .22s ease; }
@keyframes in { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen, .sheet { animation: none !important; } }

h1, h2 { margin: 0; font-weight: 650; letter-spacing: -.025em; text-wrap: balance; }
.hello { font-size: 32px; line-height: 1.12; }
.h2 { font-size: 22px; }
.sub { margin: 6px 0 0; color: var(--muted); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.section { padding-top: 32px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.card { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); }
.top { display: flex; align-items: center; justify-content: space-between; padding-block: 12px 4px; }
.top.bare { padding-left: max(10px, env(safe-area-inset-left, 0px)); padding-right: max(10px, env(safe-area-inset-right, 0px)); }
.wordmark { font-size: 21px; font-weight: 700; letter-spacing: -.03em; color: var(--ink); }
.icon-btn { width: 44px; height: 44px; border: 0; background: transparent; display: grid; place-items: center; color: var(--ink); border-radius: 50%; flex: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px; display: grid; place-items: center; }
.badge { width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }

.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; font-weight: 500; font-size: 14px; white-space: nowrap; }
.pill.primary { background: var(--accent); color: var(--accent-ink); }
.pill.light { background: var(--hero-ink); color: #1B1A17; }
.pill.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.pill.outline { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.pill.danger { background: var(--danger); color: #fff; }
.pill.small { min-height: 38px; padding: 0 14px; font-size: 13px; }
.link { border: 0; background: transparent; color: var(--accent); font-weight: 500; padding: 8px 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 500; color: var(--ink); }
.chip.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
button.chip { min-height: 36px; }

.row { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
.row::-webkit-scrollbar { display: none; }

/* Covers: the real image when Grimmory has one, a typeset block when it doesn't */
.cover { position: relative; flex: none; border-radius: 3px 7px 7px 3px; overflow: hidden; background: var(--cb, #3D3A35); color: var(--cf, #EDE7DA); box-shadow: 0 6px 16px rgba(27,26,23,.18); }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover .ct { position: absolute; inset: 0; padding: 9% 9%; font-weight: 600; line-height: 1.12; letter-spacing: -.01em; overflow: hidden; }
.cover::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: linear-gradient(90deg, rgba(0,0,0,.18), transparent); }

.tile { width: 112px; flex: none; display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
.tile .t { font-size: 13px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .a { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hero { display: flex; gap: 18px; padding: 18px; background: var(--hero); border-radius: 20px; color: var(--hero-ink); }
.hero .meta { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--hero-muted); }
.hero a { color: var(--hero-ink); }
.progress { height: 4px; border-radius: 2px; background: rgba(255,255,255,.18); }
.progress > i { display: block; height: 100%; border-radius: 2px; background: var(--bar); }
.progress.on-light { background: var(--line-soft); }
.progress.on-light > i { background: var(--accent); }

.list > * { border-top: 1px solid var(--line-soft); }
.list > *:first-child { border-top: 0; }
.item { display: flex; align-items: center; gap: 14px; padding: 12px 0; color: var(--ink); }
.item .t { font-weight: 500; line-height: 1.3; }
.item .s { font-size: 13px; color: var(--muted); }
.state { font-size: 12px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.state.done { color: var(--muted); }

.searchbar { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); color: var(--muted); }
.searchbar input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 16px; color: var(--ink); }

.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 520px) { .grid3 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.segbar { display: flex; gap: 3px; margin-top: 16px; }
.segbar i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.segbar i.r { background: var(--accent); }
.segbar i.p { background: var(--accent); opacity: .45; }

.prose { margin: 0; line-height: 1.6; max-width: 62ch; }
.prose p { margin: 0 0 .8em; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { text-align: right; }

.empty { padding: 36px 0; color: var(--muted); text-align: center; }
.skel { background: var(--line-soft); border-radius: 8px; animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: .55; } to { opacity: 1; } }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)); }
.tabs-in { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tab { min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 500; color: var(--muted); }
.tab[aria-current="page"] { color: var(--ink); font-weight: 600; }
.tab[aria-current="page"] svg { color: var(--accent); }

.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 30; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; max-width: 560px; margin: 0 auto; max-height: 88vh; overflow: auto; background: var(--surface); border-radius: 22px 22px 0 0; padding: 10px max(22px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(22px, env(safe-area-inset-left, 0px)); animation: up .22s ease; }
@keyframes up { from { transform: translateY(30px); opacity: .5; } to { transform: none; opacity: 1; } }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 16px; }
#toasts { position: fixed; left: 0; right: 0; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); z-index: 40; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; max-width: calc(100% - 40px); }
.selbar { position: fixed; left: 0; right: 0; bottom: calc(78px + env(safe-area-inset-bottom, 0px)); z-index: 22; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
.selbar > div { max-width: 528px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow); }
input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin: 0; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); }
.field input { min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); padding: 0 14px; font-size: 16px; }
.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding-block: 40px; max-width: 420px; margin: 0 auto; }
.error { color: var(--danger); font-size: 14px; }
.list button.item { background: none; border: 0; border-bottom: 1px solid var(--line-soft); font: inherit; color: inherit; cursor: pointer; }
.list button.item:last-child { border-bottom: 0; }

/* ---------- Computer layout (body.desk, from 1000px wide): sidebar, top search bar, wider pages ---------- */
body.desk { padding-top: 0; }
body.desk::before { display: none; }
body.desk #tabs { display: none !important; }
body.desk .side { display: flex; position: fixed; top: 0; bottom: 0; left: 0; width: 248px; z-index: 18; overflow-y: auto; flex-direction: column; gap: 2px; padding: 22px 14px 18px; background: var(--side); border-right: 1px solid var(--line); }
body.desk .main { margin-left: 248px; min-width: 0; }
body.desk .dtop { display: flex; position: sticky; top: 0; z-index: 15; align-items: center; gap: 16px; padding: 16px max(40px, calc((100% - 1240px) / 2)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
body.desk .app { max-width: 1320px; margin: 0 auto; padding: 4px 40px 64px; }
body.desk .pad { padding-left: 0; padding-right: 0; }
body.desk .top.bare { padding-left: 0; padding-right: 0; }
body.desk .grid2 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
body.desk .grid3 { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 28px 22px; }
body.desk .login { min-height: calc(100vh - 80px); }
body.desk .sheet { top: 50%; bottom: auto; left: 50%; right: auto; width: min(480px, calc(100vw - 48px)); max-height: 80vh; transform: translate(-50%, -50%); margin: 0; border-radius: 20px; padding: 24px 26px 26px; animation: none; }
body.desk .grab { display: none; }
body.desk #toasts { left: 248px; bottom: 28px; }
body.desk .toast { background: var(--hero); color: var(--hero-ink); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
body.signedout .side, body.signedout .dtop { display: none !important; }
body.signedout .main { margin-left: 0; }

.side .wordmark { padding: 0 10px 18px; font-size: 22px; }
.nav { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--muted); font-weight: 500; min-width: 0; }
.nav > span:not(.n):not(.dot) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav:hover { background: var(--line-soft); color: var(--ink); }
.nav.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.nav .n { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.nav.sub { padding: 6px 10px; font-size: 14px; }
.nav.soon { opacity: .6; }
.side .lbl { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 18px 10px 6px; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.side .me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 4px 0 10px; border-top: 1px solid var(--line); color: var(--ink); }
.side .me .avatar { width: 34px; height: 34px; flex: none; }

.dsearch { flex: 1; max-width: 560px; min-width: 0; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 9px 14px; color: var(--muted); }
.dsearch input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 15px; color: var(--ink); }
.dsearch input::-webkit-search-cancel-button { display: none; }
.kbd { font-size: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--muted); }
.dtop .right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.d-ibtn { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); border: 0; background: none; }
.d-ibtn:hover { background: var(--line-soft); color: var(--ink); }

.d-sec { margin-top: 40px; }
.d-sec:first-child { margin-top: 0; }
body.desk .screen > .section:first-child, body.desk .screen > section.pad:first-child { padding-top: 0; }
.d-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.more { font-size: 14px; color: var(--accent); font-weight: 500; }
.d-crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.d-crumbs a { color: var(--muted); }
.d-crumbs a:hover { color: var(--ink); }
.d-bar { height: 5px; border-radius: 9px; background: var(--line); overflow: hidden; }
.d-bar > i { display: block; height: 100%; background: var(--bar); }
.d-hero .d-bar { background: rgba(255,255,255,.15); }

.d-cr { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; }
.d-cr.solo { grid-template-columns: minmax(0, 1fr); }
.d-hero { background: var(--hero); color: var(--hero-ink); border-radius: 20px; padding: 28px; display: flex; gap: 28px; align-items: stretch; }
.d-hero .meta { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--hero-muted); font-weight: 600; }
.d-hero a { color: var(--hero-ink); }
.d-crlist { display: flex; flex-direction: column; gap: 12px; }
.d-critem { display: flex; gap: 14px; align-items: center; padding: 12px; color: var(--ink); }
.d-shelves { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.d-shelf { padding: 16px; display: flex; flex-direction: column; gap: 12px; color: var(--ink); min-width: 0; }
.d-fan { display: flex; height: 96px; align-items: flex-end; }
.d-fan .cover { margin-right: -26px; }
.d-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 28px 22px; }
.d-tile { display: flex; flex-direction: column; gap: 8px; min-width: 0; color: var(--ink); }
.d-tile .cover { transition: transform .15s; }
.d-tile:hover .cover { transform: translateY(-3px); }
.d-tile .t { font-weight: 500; line-height: 1.25; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.d-tile .a { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.d-book { display: grid; grid-template-columns: 240px minmax(0, 1fr) 280px; gap: 40px; align-items: start; }
.d-book h1 { font-size: 38px; line-height: 1.1; }
.d-facts { padding: 6px 18px; }
.d-facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.d-facts > div:last-child { border-bottom: 0; }
.d-facts span:first-child { color: var(--muted); }
.d-facts span:last-child { text-align: right; }
.d-strip { display: flex; gap: 16px; overflow-x: auto; padding: 4px 0 8px; }
.d-strip .d-tile { width: 118px; flex: none; }
.d-chip { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 99px; background: var(--accent-soft); color: var(--ink); font-size: 13px; }
@media (max-width: 1279px) {
  .d-book { grid-template-columns: 200px minmax(0, 1fr); gap: 32px; }
  .d-book > .d-factcol { grid-column: 2; }
  .d-shelves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.d-series { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.d-series .side-col { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 14px; }
.d-table { width: 100%; border-collapse: collapse; }
.d-table th, .d-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line-soft); font-size: 14px; vertical-align: middle; }
.d-table th { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.d-table tr:last-child td { border-bottom: 0; }
.d-table tbody tr:hover td { background: var(--bg); }
.d-table .num { font-variant-numeric: tabular-nums; color: var(--muted); width: 36px; }
.d-table .ttl { display: flex; align-items: center; gap: 12px; color: var(--ink); min-width: 0; }
.d-table .end { text-align: right; white-space: nowrap; }
.d-state { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--line-soft); color: var(--muted); white-space: nowrap; }
.d-state.read { background: var(--accent-soft); color: var(--accent); }
.d-state.reading { background: color-mix(in srgb, var(--bar) 40%, transparent); color: var(--ink); }
.d-up { background: var(--hero); color: var(--hero-ink); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.d-up .meta { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--hero-muted); font-weight: 600; }
.d-up a { color: var(--hero-ink); }

.d-scards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.d-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.d-ktile { padding: 16px 18px; border: 2px solid transparent; text-align: left; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; color: var(--ink); }
.d-ktile[aria-pressed="true"] { border-color: var(--accent); }
.d-ktile b { font-size: 28px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.d-ktile span { font-size: 13px; color: var(--muted); }
.d-ktools { display: flex; gap: 12px; align-items: center; margin: 20px 0 14px; }
.d-ktools .dsearch { max-width: 360px; }
.d-ktable th { position: sticky; top: 70px; background: var(--surface); z-index: 1; border-bottom: 1px solid var(--line); }
.d-ktable tr.g td { background: var(--bg); font-weight: 600; cursor: pointer; padding: 10px 12px; }
.d-ktable tr.g td .c { font-weight: 400; color: var(--muted); margin-left: 8px; font-size: 13px; }
.d-ktable tr.sel td { background: var(--accent-soft); }
.d-ktable input[type="checkbox"] { width: 16px; height: 16px; }
.caret { display: inline-block; transition: transform .15s; margin-right: 6px; color: var(--muted); vertical-align: -3px; }
.open .caret { transform: rotate(90deg); }
.rowx { opacity: 0; border: 0; background: none; color: var(--muted); padding: 4px 8px; border-radius: 8px; font-size: 13px; }
tr:hover .rowx, .rowx:focus-visible { opacity: 1; }
.rowx:hover { background: var(--line-soft); color: var(--danger); }
.d-selbar { position: sticky; bottom: 20px; margin: 16px auto 0; width: max-content; max-width: 100%; display: flex; align-items: center; gap: 16px; background: var(--hero); color: var(--hero-ink); padding: 10px 12px 10px 20px; border-radius: 99px; box-shadow: 0 12px 32px rgba(0,0,0,.25); z-index: 5; }
.setup-card { display: flex; align-items: center; gap: 14px; padding: 16px; }

/* Search filters: a column on a computer, a sheet on a phone */
.d-sr { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 36px; align-items: start; }
.d-filters { display: flex; flex-direction: column; gap: 18px; }
.d-sr .d-filters { position: sticky; top: 84px; }
.d-filters h3 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; font-weight: 600; }
.d-filters label { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 14px; cursor: pointer; min-width: 0; }
.d-filters input[type="checkbox"] { width: 18px; height: 18px; }
.d-filters label .c { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
#sfchips:empty { display: none; }
#sfchips .chip { flex: none; }
#shelfpick .item { gap: 12px; }

/* "Coming next" pages: a compact, centred empty state */
.soonpage { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; max-width: 460px; margin: 0 auto; padding: 28px 20px 40px; }
body.desk .soonpage { padding-top: 40px; }
.soonpage .badge { width: 56px; height: 56px; border-radius: 16px; }
.soonpage .prose { max-width: 40ch; margin: 0; }

/* Series bundles: a few covers stacked, the front one carries the shadow */
.bundle { border: 0; background: none; padding: 0; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.bstack { position: relative; display: block; width: 100%; aspect-ratio: 2 / 3; margin-top: 10px; }
.bstack .cover { position: absolute; inset: 0; width: calc(100% - 12px) !important; height: calc(100% - 10px) !important; aspect-ratio: auto !important; box-shadow: none; }
.bstack .cover:nth-last-child(2) { box-shadow: 0 6px 16px rgba(27,26,23,.18); top: 10px; left: 0; }
.bstack .cover:nth-last-child(3) { top: 5px; left: 6px; opacity: .85; }
.bstack .cover:nth-last-child(4) { top: 0; left: 12px; opacity: .65; }
.bstack .cover:only-child, .bstack .cover:nth-last-child(1) { top: 10px; box-shadow: 0 6px 16px rgba(27,26,23,.18); }
.bcount { position: absolute; right: 18px; bottom: 6px; z-index: 2; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.bundle:hover .bstack { transform: translateY(-3px); transition: transform .15s; }
.sbgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 12px; }
body.desk .sbgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 30px 22px; }
.sb-tools { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; }
body.desk .sb-tools { flex-direction: row; align-items: center; gap: 16px; }
body.desk .sb-tools .dsearch { max-width: 360px; }
.bgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
body.desk .bgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid3 .d-tile .t { font-size: 13px; }
.grid3 .d-tile .a { font-size: 12px; }
[data-act="group"][aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

/* Your own star rating */
.stars { display: flex; align-items: center; gap: 2px; }
.star { border: 0; background: none; padding: 4px; color: var(--line); border-radius: 8px; display: grid; place-items: center; }
.star.on { color: #C9A66B; }
.star.on svg { fill: currentColor; }
.star:hover { color: #C9A66B; }

/* Computer book page: header (cover | title and actions | details), then the description at a
   reading width under the title, then the rest of the series across the page */
.d-bookhero { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
.d-bookcover { box-shadow: 0 24px 48px rgba(27,26,23,.22); border-radius: 7px; }
.d-bookinfo { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.d-bookinfo h1 { font-size: 40px; line-height: 1.08; }
.d-bookmain { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 44px; align-items: start; margin-top: 40px; }
.d-bookmain > .d-factcol { grid-column: 2; }
.d-about { max-width: 70ch; }
.d-about .h2 { margin-bottom: 12px; }
.d-desc { font-size: 16.5px; line-height: 1.65; }
.d-desc p { margin: 0 0 1em; }
.d-desc p:last-child { margin-bottom: 0; }
.d-desc.clamp { max-height: 19em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
#bookbody #bseries { margin-top: 44px; }
@media (max-width: 1279px) {
  .d-bookhero { grid-template-columns: 200px minmax(0, 1fr); gap: 32px; }
  .d-bookmain { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .d-bookmain > .d-factcol { grid-column: 1; flex-direction: row; align-items: stretch; flex-wrap: wrap; }
  .d-bookmain > .d-factcol > * { flex: 1 1 280px; min-width: 0; }
}

/* Book page: a soft backdrop from the book's own cover, and a quick-facts line */
.d-band { position: relative; isolation: isolate; overflow: hidden; border-radius: 24px; padding: 32px; margin: 0 -32px; }
.d-band-bg { position: absolute; inset: 0; z-index: -1; background: linear-gradient(140deg, color-mix(in srgb, var(--cb) 30%, var(--bg)) 0%, var(--bg) 75%); }
.d-band-bg img { position: absolute; inset: -10%; width: 120%; height: 120%; object-fit: cover; filter: blur(60px) saturate(1.25); opacity: .4; }
.d-band-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 35%, transparent) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 100%); }
.qfacts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); }
.qfacts span { display: inline-flex; align-items: center; gap: 6px; }
.qfacts b { color: var(--ink); font-weight: 600; }
.qfacts a.grlink { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.qfacts a.grlink:hover, .qfacts a.grlink:focus-visible { color: var(--accent); text-decoration: underline; }
@media (prefers-reduced-motion: no-preference) { .d-band-bg img { transition: opacity .4s; } }
.statstrip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 8px; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.d-factcol { display: flex; flex-direction: column; gap: 14px; }
.d-spanel { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; color: var(--ink); }
.d-spanel:hover { box-shadow: 0 1px 2px rgba(27,26,23,.05), 0 12px 28px rgba(27,26,23,.10); }
.d-bookinfo h1 { font-size: 44px; }
.d-desc p:first-child { font-size: 18.5px; line-height: 1.6; color: var(--ink); }
.d-band-bg img { opacity: .32; filter: blur(64px) saturate(.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .d-band-bg img { opacity: .45; filter: blur(64px) saturate(1.2); } }

/* Wishlist and "Waiting for you" */
.wl-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
body.desk .wl-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.wl-card { display: flex; gap: 14px; padding: 14px 16px; align-items: flex-start; }
.wl-inbox { display: grid; grid-template-columns: 1fr; gap: 10px; }
body.desk .wl-inbox { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.wl-note { display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 14px; }
.bell-dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
#askres .list > .item { border-top: 1px solid var(--line-soft); }
#wlbody > .d-sec:first-child { margin-top: 28px; }
.wl-head { align-items: flex-end; margin-bottom: 0; flex-wrap: wrap; }
.wl-count { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; margin-left: 6px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font: 600 15px/1 var(--sans, inherit); vertical-align: middle; }
.wl-count[hidden] { display: none; }
.wl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wl-t { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.wl-memo { font-size: 13px; color: var(--ink); background: var(--line-soft); border-radius: 10px; padding: 6px 10px; margin-top: 4px; overflow-wrap: anywhere; }
.wl-where { font-size: 13px; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.wl-where a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.wl-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.wl-track { list-style: none; margin: 10px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.wl-track li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); text-align: center; line-height: 1.2; }
.wl-track li::before { content: ""; position: absolute; top: 5px; right: 50%; width: 100%; height: 2px; background: var(--line); }
.wl-track li:first-child::before { display: none; }
.wl-track li.done::before, .wl-track li.now::before { background: var(--accent); }
.wl-track .dot { position: relative; z-index: 1; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); }
.wl-track li.done .dot { background: var(--accent); border-color: var(--accent); }
.wl-track li.now .dot { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--accent); }
.wl-track li.now { color: var(--ink); font-weight: 600; }
.wl-ask { display: flex; gap: 12px; padding: 14px 16px; align-items: flex-start; }
.wl-yn .pill { flex: 1 1 120px; justify-content: center; }
#wlgaps > .d-sec { margin-top: 40px; }
body.desk #wllists > .d-sec:first-child { margin-top: 28px; }
.wl-ask .avatar { flex: none; background: var(--accent-soft); color: var(--accent); }
.wl-tools { display: flex; flex-direction: column; gap: 10px; padding: 18px 0 0; }
body:not(.desk) .wl-tools { padding: 16px 16px 0; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
body.desk .wl-tools { flex-direction: row; align-items: center; flex-wrap: wrap; }
body.desk .wl-tools .searchbar { flex: 0 1 360px; }
.wl-more summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.wl-more summary::-webkit-details-marker { display: none; }
.wl-gaps { display: grid; grid-template-columns: 1fr; gap: 10px; }
body.desk .wl-gaps { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); align-items: start; }
.wl-gap { padding: 6px 8px 6px 4px; }
.wl-gap-head { display: flex; align-items: center; gap: 8px; }
.wl-gap-fold { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 8px 10px; color: var(--ink); text-align: left; min-height: 48px; }
.wl-gap-fold .wl-chev { color: var(--muted); flex: none; transition: transform .15s; }
.wl-gap-fold[aria-expanded="true"] .wl-chev { transform: rotate(90deg); }
.wl-gap-list { padding: 0 6px 4px 10px; }
.wl-gap-list .item { gap: 10px; }

/* Clubs */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.h3 { font-size: 17px; font-weight: 600; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.cl-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
body.desk .cl-grid { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.cl-card { display: flex; gap: 14px; padding: 14px 16px; align-items: flex-start; color: var(--ink); }
.cl-cov { flex: none; }
.cl-main { display: flex; flex-direction: column; gap: 3px; }
.cl-readers { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cl-rd-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cl-rd-name { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.cl-rd.mine .cl-rd-name { color: var(--accent); }
.cl-bar { height: 6px; border-radius: 99px; background: var(--line-soft); overflow: hidden; margin-top: 4px; }
.cl-bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.cl-mine { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.cl-range { flex: 1 1 100%; min-width: 0; accent-color: var(--accent); height: 32px; }
.link.muted { color: var(--muted); }
.cl-admin { padding: 0; margin-bottom: 16px; }
.cl-admin > summary { display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; font-weight: 500; list-style: none; min-height: 48px; }
.cl-admin > summary::-webkit-details-marker { display: none; }
.cl-admin > summary::after { content: '›'; color: var(--muted); font-size: 20px; transform: rotate(90deg); transition: transform .15s; }
.cl-admin[open] > summary::after { transform: rotate(-90deg); }
.cl-admin-in { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.cl-members { margin: 0; padding: 0; list-style: none; }
.cl-members .avatar { width: 30px; height: 30px; font-size: 12px; flex: none; background: var(--accent-soft); color: var(--accent); }
.cl-admin select, .cl-admin input:not([type=checkbox]) { min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 0 12px; font-size: 16px; width: 100%; }
.cl-check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.4; cursor: pointer; }
.cl-check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--accent); }
body.desk .cl-pickform { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
body.desk .cl-pickform .cl-check, body.desk .cl-pickform .wl-acts { grid-column: 1 / -1; }
.cl-nhead { display: flex; gap: 14px; align-items: center; margin: 6px 0 10px; }
.cl-note { padding: 12px 0; border-top: 1px solid var(--line-soft); }
.cl-note.held { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); margin: 0 -10px; padding: 12px 10px; border-radius: 10px; }
.cl-note-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 14px; }
.cl-body { margin: 6px 0 4px; white-space: pre-wrap; line-height: 1.5; overflow-wrap: anywhere; }
.cl-lock { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; margin: 8px 0 4px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--line); background: var(--bg); color: var(--muted); font: inherit; font-size: 14px; line-height: 1.4; cursor: pointer; }
.cl-lock svg { flex: none; margin-top: 1px; }
.cl-lock u { color: var(--accent); text-decoration: none; font-weight: 500; }
.cl-note-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.cl-note textarea, .cl-compose textarea { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 10px 12px; font: inherit; font-size: 16px; margin-top: 6px; resize: vertical; }
.cl-compose { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.cl-heart { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--muted); font-size: 13px; min-height: 36px; min-width: 36px; padding: 0 6px; border-radius: 8px; }
.cl-heart.on { color: var(--danger); }
.cl-heart.on svg { fill: currentColor; }
.cl-intro { display: flex; gap: 14px; padding: 16px; align-items: flex-start; margin-bottom: 18px; }
.cl-spots { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 26px; }
body.desk .cl-spots { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 18px; }
.cl-spot { padding: 14px 16px 16px; min-width: 0; }
.cl-spot-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.cl-club { font-weight: 600; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); overflow-wrap: anywhere; min-width: 0; }
.cl-spot-in { display: flex; gap: 16px; align-items: flex-start; }
.cl-spot-text { display: flex; flex-direction: column; gap: 3px; }
.cl-spot-title { margin: 2px 0 0; font-size: 19px; line-height: 1.25; overflow-wrap: anywhere; }
.cl-tbtn, .cl-covbtn, .cl-tilebtn { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.cl-covbtn { flex: none; }
.cl-tilebtn { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.cl-about { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.cl-about-full { margin: 14px 0; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.cl-about-full p { margin: 0 0 10px; }
.cl-covwrap { position: relative; display: inline-block; vertical-align: top; }
.cl-rib { position: absolute; left: 6px; bottom: 6px; z-index: 2; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); white-space: nowrap; }
.cl-rib.w { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.cl-shelf { margin-bottom: 24px; }
.cl-tile { gap: 4px; }
.cl-tiny { min-height: 32px; padding: 0 10px; font-size: 12px; gap: 4px; align-self: flex-start; }
.cl-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 16px 14px; }
.cl-wrap .tile { width: auto; }
.cl-pickhead { display: flex; gap: 16px; align-items: flex-end; margin: 6px 0 4px; }
.cl-find { align-items: flex-start; }
.cl-find .pill { flex: none; }
.cl-find-about { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* The Store */

/* "Already on Kobo": a state, not a button. Same height as the pill it replaces. */
.kobo-state { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: 14px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.kobo-state svg { flex: none; }
.kobo-state.on-hero { color: var(--hero-ink); align-self: flex-start; margin-top: auto; }
.kobo-state.small { min-height: 32px; font-size: 13px; color: var(--muted); }
.kobo-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
/* Series on Home (phone): a row of stacks beside the shelves */
.hs-tile { width: 132px; flex: none; display: flex; }
.hs-tile .bundle { width: 100%; }

/* For you (recommendations) */
.chip .fy-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink, #fff); font-size: 12px; font-weight: 700; }
.fy-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.fy-finder { padding: 14px 16px; margin-bottom: 14px; }
.fy-finder input, .fy-cform input { width: 100%; min-width: 0; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 0 14px; font-size: 16px; }
.fy-connect { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.fy-chead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.fy-chead .small { min-width: 0; overflow-wrap: anywhere; }
.fy-cform { display: flex; flex-wrap: wrap; gap: 8px; }
.fy-cform input { flex: 1 1 160px; }
.fy-cform .pill { flex: none; }
.fy-ask { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: var(--accent-soft); }
.fy-ask p { margin: 0; overflow-wrap: anywhere; }
.fy-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.fy-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fy-card.fy-new { box-shadow: var(--shadow), inset 4px 0 0 var(--accent); }
.fy-top { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.fy-top .cover { flex: none; }
.fy-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.fy-title { margin: 0; font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.fy-info .small { overflow-wrap: anywhere; }
.fy-quote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 4px 12px 12px 4px; font-style: italic; overflow-wrap: anywhere; white-space: pre-wrap; }
.fy-empty { padding: 16px; }
.fy-sent { padding: 14px 16px; margin-top: 16px; }
.fy-sent summary, .fy-manage summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.fy-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; }
.fy-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.fy-list li:first-child { border-top: 0; }
.fy-line { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fy-list .pill { flex: none; }
.fy-st { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.fy-st.fy-done { color: var(--accent); font-weight: 600; }
.fy-mini { width: 54px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; display: inline-block; }
.fy-mini i { display: block; height: 100%; background: var(--accent); }
.fy-h3 { font-size: 15px; margin: 14px 0 0; }
.fy-check { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 14px; }
.fy-out { font-size: 11px; padding: 2px 8px; }
.fy-label { margin: 16px 0 6px; font-weight: 600; }
.fy-people { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.fy-person { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.fy-person:first-child { border-top: 0; }
.fy-person.off { opacity: .55; cursor: default; }
.fy-person .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fy-note { width: 100%; margin-top: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 10px 12px; font: inherit; font-size: 16px; resize: vertical; }
/* wishlist: the admin's "couldn't find it" answer, shown to whoever asked */
.wl-answer { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 8px; padding: 9px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; max-width: 100%; }
.wl-answer-h { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; }
.wl-answer-h svg { flex: none; margin-top: 1px; color: var(--accent); }
.wl-answer-n { font-style: italic; }
.wl-answer .link { padding: 0; min-height: 0; }
/* Books › Authors: one tile per author (photo or initials, count, a peek of covers) */
.au-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; min-width: 0; color: var(--ink); }
.au-face { position: relative; width: 84px; height: 84px; border-radius: 50%; overflow: hidden; background: var(--accent-soft); color: var(--accent); flex: none; margin-bottom: 4px; }
body.desk .au-face { width: 104px; height: 104px; }
.au-ini { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 650; font-size: 26px; letter-spacing: .02em; }
.au-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.au-tile .t { font-weight: 600; font-size: 14px; line-height: 1.2; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.au-tile .a { font-size: 12.5px; color: var(--muted); }
.au-covers { display: flex; justify-content: center; gap: 4px; margin-top: 4px; }
.au-tile:hover .t { text-decoration: underline; text-underline-offset: 3px; }
/* Book page actions, condensed: main action, Kobo toggle, status, shelf, ⋯ More */
.ba { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ba.wide { margin-top: 8px; }
.ba .pill { white-space: nowrap; }
.ba .ba-on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.ba .ba-caret { margin-left: -2px; opacity: .6; }
.ba .ba-more { padding-left: 12px; padding-right: 12px; }
.ba:not(.wide) > .pill:first-child { flex: 1 1 100%; justify-content: center; }
.ba:not(.wide) > .pill:not(:first-child):not(.ba-more) { flex: 1 1 auto; justify-content: center; }
.ba-list .ba-item { width: 100%; text-align: left; display: flex; align-items: center; gap: 12px; color: var(--ink); }
.ba-list .ba-item svg { flex: none; color: var(--muted); }
