/* Marginalia — pearl, black cherry, brown red, cotton candy and golden apricot.
   Fraunces for headlines and quotes, Bricolage Grotesque for the interface,
   DM Mono for numbers, Cormorant Garamond only on generated fic covers. */
:root {
  --bg: #FBF4E4; --surface: #F3E6BD; --surface-2: #FFF9EC; --ink: #640D14; --ink-2: #5E2A27; --muted: #8A4F4A;
  --line: #EBD9B8; --line-2: #E3CBA6; --book: #AD2831; --fic: #B03A62; --candy: #FD9BB7; --apricot: #D8973C;
  --on-candy: #640D14; --on-candy-2: #7A1F2E; --candy-soft: #FDE0E8;
  --c-book: #AD2831; --c-fic: #D9578A; --c-time: #C27A1E; --c-other: #E2A5B8;
  --ramp-1: #F6DCC8; --ramp-2: #EBA894; --ramp-3: #D56A64; --ramp-4: #AD2831; --ramp-5: #640D14;
  --cta-bg: #640D14; --cta-fg: #FBF4E4; --nav-bg: rgba(251,244,228,.94); --scrim: rgba(74,27,30,.5);
  --shadow: 0 12px 28px -18px rgba(100,13,20,.55); --danger: #AD2831;
  --keep: #AD2831; --on-keep: #FBF4E4; --letgo: #FD9BB7; --home: #D8973C;
  --serif: "Fraunces", Georgia, serif; --f: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace; --cover-serif: "Cormorant Garamond", Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #2B0709; --surface: #3C0D12; --surface-2: #4E1A1F; --ink: #F3E6BD; --ink-2: #EBD3B5; --muted: #D9B9A6;
    --line: #5A2228; --line-2: #6B2D33; --book: #F39A8E; --fic: #FD9BB7; --candy-soft: #4E1A2A;
    --c-book: #E0666C; --c-fic: #EE85AA; --c-time: #D99A45; --c-other: #8C4A5C;
    --ramp-1: #5A1D22; --ramp-2: #86333A; --ramp-3: #B5524F; --ramp-4: #DE8A6A; --ramp-5: #F3C89A;
    --cta-bg: #D8973C; --cta-fg: #2B0709; --nav-bg: rgba(43,7,9,.94); --scrim: rgba(0,0,0,.6);
    --shadow: 0 12px 30px -14px rgba(0,0,0,.7); --danger: #F39A8E;
    --keep: #F39A8E; --on-keep: #2B0709; --letgo: #EE85AA; --home: #D99A45;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #2B0709; --surface: #3C0D12; --surface-2: #4E1A1F; --ink: #F3E6BD; --ink-2: #EBD3B5; --muted: #D9B9A6;
  --line: #5A2228; --line-2: #6B2D33; --book: #F39A8E; --fic: #FD9BB7; --candy-soft: #4E1A2A;
  --c-book: #E0666C; --c-fic: #EE85AA; --c-time: #D99A45; --c-other: #8C4A5C;
  --ramp-1: #5A1D22; --ramp-2: #86333A; --ramp-3: #B5524F; --ramp-4: #DE8A6A; --ramp-5: #F3C89A;
  --cta-bg: #D8973C; --cta-fg: #2B0709; --nav-bg: rgba(43,7,9,.94); --scrim: rgba(0,0,0,.6);
  --shadow: 0 12px 30px -14px rgba(0,0,0,.7); --danger: #F39A8E;
  --keep: #F39A8E; --on-keep: #2B0709; --letgo: #EE85AA; --home: #D99A45;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: var(--f); font-size: 15px; line-height: 1.45; font-weight: 400; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--apricot); outline-offset: 2px; }
img { max-width: 100%; }
h1, h2, h3, p, blockquote, figure { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; }

.app { max-width: 560px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 20px) max(20px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 110px) max(20px, env(safe-area-inset-left, 0px)); }
.boot { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); }
.boot svg { width: 44px; height: 44px; color: var(--apricot); animation: twinkle 1.4s ease-in-out infinite; }
@keyframes twinkle { 50% { transform: scale(.7) rotate(20deg); opacity: .6; } }

/* type */
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; }
.mono { font-family: var(--mono); font-weight: 400; }
.cap { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 400; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.h1 { font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1; letter-spacing: -.02em; }
.h1 i, .h2 i { color: var(--book); }
.h2 { font-family: var(--serif); font-weight: 400; font-size: 25px; line-height: 1.08; letter-spacing: -.02em; }
.h3 { font-family: var(--serif); font-weight: 400; font-size: 20px; line-height: 1.12; letter-spacing: -.015em; }
.label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sparkle { display: inline-block; width: 1em; height: 1em; vertical-align: -.1em; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grow { flex: 1; min-width: 0; }

/* layout bits */
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.top .acts { display: flex; gap: 8px; }
.sec { margin-top: 34px; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.sec-h.fic { border-color: var(--fic); }
.sec-h.fic .cap { color: var(--fic); }
.sec-h .cap { color: var(--ink); }
.sec-h a, .sec-h button.link { font-size: 13px; color: var(--muted); }
.rule { border-top: 1px solid var(--ink); padding-top: 14px; }
.sub { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.4; }

/* buttons & controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; font-weight: 500; font-size: 14.5px; text-decoration: none; color: var(--ink); }
.btn.primary { background: var(--cta-bg); color: var(--cta-fg); border-color: var(--cta-bg); }
.btn.outline { border-color: var(--ink); }
.btn.gold { background: var(--apricot); color: #640D14; border-color: var(--apricot); font-weight: 600; }
.btn.fic { background: var(--fic); color: #FBF4E4; border-color: var(--fic); }
:root[data-theme="dark"] .btn.fic { color: #2B0709; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.fic { color: #2B0709; } }
.btn.sm { min-height: 38px; font-size: 13px; padding: 0 14px; }
.btn.block { width: 100%; }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn svg { width: 15px; height: 15px; }
.icon-btn { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; padding: 0; text-decoration: none; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.solid { background: var(--cta-bg); color: var(--cta-fg); border-color: var(--cta-bg); }
.avatar { font-family: var(--serif); font-size: 20px; }
.link { background: none; border: 0; padding: 4px 0; font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--apricot); }
.link.fic { color: var(--fic); }
.link.book { color: var(--book); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--cta-bg); color: var(--cta-fg); border-color: var(--cta-bg); }
.chip.fic[aria-pressed="true"] { background: var(--fic); border-color: var(--fic); color: #FBF4E4; }
.chip .n { font-family: var(--mono); font-size: 11px; opacity: .75; }
.seg { display: flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; gap: 2px; }
.seg .chip { flex: 1; justify-content: center; border: 0; min-height: 36px; }
.seg.inline { display: inline-flex; }
.seg.inline .chip { flex: none; }
.streak { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--apricot); color: #640D14; font-size: 13px; font-weight: 600; border: 0; }
.streak svg { width: 13px; height: 13px; }

.field { display: grid; gap: 5px; font-size: 12.5px; font-weight: 500; color: var(--muted); min-width: 0; border: 0; padding: 0; margin: 0; }
.field legend { padding: 0; margin-bottom: 5px; }
.input, .field input, .field select, .field textarea { width: 100%; min-width: 0; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); border-radius: 12px; padding: 11px 12px; font-weight: 400; font-size: 15px; }
.field textarea, textarea.input { resize: vertical; line-height: 1.5; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span2 { grid-column: 1 / -1; }
.check { display: inline-flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; line-height: 1.4; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--cta-bg); flex: none; }
input[type="range"] { width: 100%; accent-color: var(--book); }
.card { background: var(--surface); border-radius: 22px; padding: 18px; }
.card.plain { background: transparent; border: 1px solid var(--line); }
.panel { margin-top: 18px; }

/* progress */
.bar { height: 2px; background: var(--line-2); position: relative; }
.bar i { position: absolute; left: 0; top: -1px; height: 4px; background: var(--book); }
.bar.fic i { background: var(--c-fic); }
.bar.time i { background: var(--c-time); }
.ticks { display: flex; gap: 2px; }
.ticks span { flex: 1; height: 5px; background: var(--line-2); }
.ticks span.on { background: var(--c-fic); }
.ticks span.new { background: var(--candy); }
.ticks.big span { height: 10px; }
.pct { font-family: var(--serif); font-size: 24px; line-height: 1; letter-spacing: -.02em; }
.pct small { font-size: 15px; }

/* book covers */
.cover { position: relative; aspect-ratio: 2 / 3; width: 100%; border-radius: 2px 5px 5px 2px; overflow: hidden; container-type: inline-size; flex: none; box-shadow: 0 10px 22px -14px rgba(100,13,20,.7); }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover .gen { position: absolute; inset: 0; padding: 12cqw 10cqw; display: flex; flex-direction: column; justify-content: space-between; background: var(--c); color: var(--t); }
.cover .gen b { font-family: var(--serif); font-weight: 400; font-size: 12cqw; line-height: 1.02; letter-spacing: -.02em; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: break-word; hyphens: auto; }
.cover .gen span { font-family: var(--mono); font-size: 6.4cqw; letter-spacing: .1em; text-transform: uppercase; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.2) 0, rgba(255,255,255,.06) 4%, transparent 9%); pointer-events: none; }
.badge { position: absolute; left: -6px; top: -8px; z-index: 2; background: var(--apricot); color: #640D14; border-radius: 999px; padding: 3px 8px; font-family: var(--mono); font-size: 10px; white-space: nowrap; }
.badge.candy { background: var(--candy); }
.own-tag { position: absolute; right: -6px; top: -8px; z-index: 2; background: var(--ink); color: var(--bg); border-radius: 999px; padding: 2px 6px; font-family: var(--mono); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; line-height: 1.3; box-shadow: 0 1px 3px rgba(0,0,0,.25); pointer-events: none; }
/* Buttons centre their content vertically, so a tile beside a taller neighbour (a title that wraps
   to two lines) used to slide down. Laying the content out as a grid packed to the top keeps every
   cover in a row on the same line, wherever tiles are used. */
.cover-btn { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; padding: 0; border: 0; background: none; text-align: left; width: 100%; color: inherit; text-decoration: none; }
.cover-btn.row { display: flex; }

/* fic covers: cloth + pattern + foil label */
.fcover { position: relative; aspect-ratio: 2 / 3; width: 100%; overflow: hidden; border-radius: 2px 5px 5px 2px; container-type: inline-size; flex: none;
  background-color: var(--cl); color: var(--pat); box-shadow: 0 2px 0 rgba(0,0,0,.08), 0 12px 24px -14px rgba(100,13,20,.75); }
.fcover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.26) 0, rgba(255,255,255,.08) 4%, transparent 9%); pointer-events: none; }
.m-lattice { background-image: repeating-linear-gradient(45deg, currentColor 0 1px, transparent 1px 7cqw), repeating-linear-gradient(-45deg, currentColor 0 1px, transparent 1px 7cqw); }
.m-scale { background-image: radial-gradient(circle at 50% 0, transparent 3.4cqw, currentColor 3.4cqw 4.1cqw, transparent 4.5cqw); background-size: 8.4cqw 6.6cqw; }
.m-dots { background-image: radial-gradient(currentColor .9cqw, transparent 1.3cqw), radial-gradient(currentColor .9cqw, transparent 1.3cqw); background-size: 8cqw 8cqw; background-position: 0 0, 4cqw 4cqw; }
.m-stripe { background-image: repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 4.4cqw); }
.m-floret { background-image: radial-gradient(circle, transparent 1.7cqw, currentColor 1.7cqw 2.3cqw, transparent 2.7cqw), radial-gradient(currentColor .9cqw, transparent 1.3cqw); background-size: 11cqw 11cqw; background-position: 0 0, 5.5cqw 5.5cqw; }
.m-plain { background-image: none; }
.fcover .lbl { position: absolute; left: 13%; right: 13%; top: 24%; padding: 9cqw 4cqw 7cqw; text-align: center; background: var(--cl); border: 1px solid var(--line-f); outline: 1px solid var(--line-f); outline-offset: -3.4cqw; color: var(--ink-f); }
.fcover.l-frame .lbl { inset: 9cqw; top: 9cqw; display: flex; flex-direction: column; justify-content: space-between; padding: 16cqw 6cqw 12cqw; }
.fcover.l-band .lbl { left: 0; right: 0; top: 33%; height: 36%; border-left: 0; border-right: 0; outline: 0; box-shadow: inset 0 3px 0 -2px var(--line-f), inset 0 -3px 0 -2px var(--line-f); display: flex; flex-direction: column; justify-content: center; padding: 0 8cqw; }
.fcover .ft { font-family: var(--cover-serif); font-style: italic; font-weight: 600; font-size: 12.5cqw; line-height: 1.04; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.fcover .fr { width: 12cqw; height: 1px; background: var(--line-f); margin: 5cqw auto 4cqw; }
.fcover .ff { font-family: var(--cover-serif); font-weight: 600; font-size: 5.2cqw; letter-spacing: .18em; text-transform: uppercase; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fcover .fa { position: absolute; left: 0; right: 0; bottom: 7cqw; text-align: center; font-family: var(--cover-serif); font-style: italic; font-size: 7.2cqw; color: var(--ink-f); }
.fcover.l-frame .fa, .fcover.l-band .fa { display: none; }

/* today */
.greet { margin-bottom: 14px; }
.greet .h1 { font-size: 46px; }
.greet .h1 svg { width: 30px; height: 30px; color: var(--apricot); vertical-align: 2px; }
.now { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.now > .cover-btn { width: 78px; flex: none; }
.now .kind { display: flex; align-items: center; gap: 6px; color: var(--book); }
.now .kind.plain { color: var(--muted); }
.now .kind svg { width: 13px; height: 13px; }
.now .t { font-family: var(--serif); font-size: 24px; line-height: 1.05; letter-spacing: -.02em; margin-top: 3px; }
.now .a { font-size: 13px; color: var(--muted); }
.now form { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.now form .input { width: 86px; padding: 8px 10px; }
/* Now reading: a swipeable row of compact cards when more than one book is open */
.q-short { display: none; }
.now-strip.many { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 20px; margin: 0 -20px; padding: 14px 20px 6px; scrollbar-width: none; overscroll-behavior-x: contain; }
.now-strip.many::-webkit-scrollbar { display: none; }
.now-strip.many .now { position: relative; flex: 0 0 min(276px, calc(100% - 80px)); scroll-snap-align: start; align-items: flex-start; background: var(--surface); border: 0; border-radius: 18px; padding: 12px; gap: 12px; }
.now-strip.many .now > .cover-btn { width: 54px; }
.now-strip.many .now .kind span { font-size: 9px !important; }
.now-strip.many .now .kind svg { width: 11px; height: 11px; }
.now-strip.many .now .t { font-size: 17px; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.now-strip.many .now .a { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-strip.many .now .pct { font-size: 18px; }
.now-strip.many .now .pct small { font-size: 12px; }
.now-strip.many .now .row.between { margin-top: 10px !important; }
.now-strip.many .now .row.between .mono { font-size: 11px; }
.now-strip.many .now .bar { margin-top: 10px !important; background: var(--line-2); }
.now .now-act { margin-top: 10px; align-items: center; gap: 10px; }
.now-strip.many .now .t { -webkit-line-clamp: 1; }
.now-strip.many .now form .input { width: 52px; padding: 5px 7px; font-size: 13px; border-radius: 10px; }
.now-strip.many .now .btn.sm { min-height: 30px; padding: 0 12px; font-size: 12px; white-space: nowrap; }
.now-strip.many .now .timer-btn { padding: 0 8px; }
.now-strip.many .q-long { display: none; }
.now-strip.many .q-short { display: inline; }
.fic-row { display: flex; gap: 16px; padding: 18px 0; align-items: center; border-bottom: 1px solid var(--line); }
.fic-row > .fc { width: 58px; flex: none; }
.quote-card { position: relative; overflow: hidden; background: var(--surface); border-radius: 22px; padding: 24px 22px 20px; }
.quote-card .qm { position: absolute; right: 14px; top: -22px; font-family: var(--serif); font-size: 150px; line-height: 1; color: var(--apricot); pointer-events: none; }
.quote-card blockquote { position: relative; font-family: var(--serif); font-style: italic; font-size: 23px; line-height: 1.22; letter-spacing: -.015em; }
.goal-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 14px; }
.goal-duo .n { font-family: var(--serif); font-size: 40px; line-height: 1; }
.minutes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; height: 96px; margin-top: 12px; border-bottom: 1px solid var(--line-2); }
.minutes > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.minutes i { display: block; width: 18px; max-width: 100%; background: var(--c-time); border-radius: 4px 4px 0 0; }
.minutes i.zero { height: 2px; background: var(--line-2); border-radius: 0; }
.minutes i.today { outline: 2px solid var(--ink); outline-offset: 2px; }
.minutes b { font-family: var(--mono); font-weight: 400; font-size: 10px; margin-bottom: 4px; }
.dlabels { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; text-align: center; font-family: var(--mono); font-size: 10px; color: var(--muted); margin-top: 6px; }
.club-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; background: none; border-left: 0; border-right: 0; width: 100%; text-align: left; margin-top: 24px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list .tt { font-family: var(--serif); font-size: 17px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.when { font-family: var(--mono); font-size: 11px; text-align: right; white-space: nowrap; color: var(--muted); }
.when b { display: block; font-family: var(--f); font-weight: 600; font-size: 13px; color: var(--ink); }
.shelf-row { display: grid; grid-auto-flow: column; grid-auto-columns: 92px; gap: 14px; overflow-x: auto; padding: 14px 0 6px; scrollbar-width: none; }
.shelf-row::-webkit-scrollbar { display: none; }
.shelf-row .t { font-family: var(--serif); font-size: 14px; line-height: 1.15; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* library */
.subnav { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.subnav button { background: none; border: 0; padding: 0 0 10px; font-size: 14.5px; font-weight: 500; color: var(--muted); }
.subnav button[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--ink); margin-bottom: -1px; }
.search { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); background: transparent; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 15px; color: var(--ink); }
.search svg { width: 17px; height: 17px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 14px; }
@media (min-width: 520px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile .t { font-family: var(--serif); font-size: 15px; line-height: 1.12; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .a { font-size: 11.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .m { font-family: var(--mono); font-size: 10px; color: var(--muted); display: flex; gap: 5px; align-items: center; flex-wrap: wrap; margin-top: 5px; }
.tile .m svg { width: 12px; height: 12px; }
.add-tile { aspect-ratio: 2 / 3; border-radius: 4px; border: 1px dashed var(--line-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 8px; font-size: 13px; text-align: center; color: var(--muted); }
.add-tile svg { width: 22px; height: 22px; color: var(--apricot); }
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 30px 16px; }
.empty > svg { width: 40px; height: 40px; color: var(--apricot); }
.sparks { display: inline-flex; gap: 1px; color: var(--apricot); line-height: 0; }
.sparks svg { width: 13px; height: 13px; }
.sparks.big svg { width: 26px; height: 26px; }
.sp-part { position: relative; display: inline-flex; }
.sp-part > span { position: absolute; inset: 0 auto 0 0; overflow: hidden; display: inline-flex; }
.hist-list { list-style: none; margin: 8px 0 0; padding: 0; }
.hist { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.hist .mono { color: var(--muted); }
.rate-tap { cursor: pointer; touch-action: manipulation; }
.rate-tap .sparks.big { gap: 6px; }
.rate-tap .sparks.big svg { width: 32px; height: 32px; }

/* commonplace */
.quotes { border-top: 1px solid var(--ink); }
.q { padding: 22px 0 12px; border-bottom: 1px solid var(--line); }
.q blockquote { font-family: var(--serif); font-size: 22px; line-height: 1.22; letter-spacing: -.015em; white-space: pre-wrap; overflow-wrap: anywhere; }
.q.fic blockquote { font-style: italic; }
.q .src { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.q .src .cap { color: var(--book); }
.q.fic .src .cap { color: var(--fic); }
.q .acts { display: flex; flex: none; }
.q .acts button { width: 42px; height: 42px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; padding: 0; border-radius: 50%; }
.q .acts svg { width: 18px; height: 18px; }
.q .acts .on { color: var(--apricot); }
.tagfic { font-family: var(--mono); font-size: 8.5px; letter-spacing: .1em; padding: 2px 5px; background: var(--fic); color: #FBF4E4; text-transform: uppercase; }

/* archive */
.arch-head { background: var(--candy); color: var(--on-candy); margin: calc(-1 * (env(safe-area-inset-top, 0px) + 20px)) -20px 0; padding: calc(env(safe-area-inset-top, 0px) + 24px) 20px 22px; position: relative; overflow: hidden; }
.arch-head .cap { color: var(--on-candy); }
.arch-head .h1 i { color: var(--on-candy); }
.arch-head .bg-spark { position: absolute; right: -24px; top: 54px; width: 130px; height: 130px; color: rgba(100,13,20,.07); pointer-events: none; }
.arch-head > :not(.bg-spark) { position: relative; }
.arch-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; border-top: 1px solid rgba(100,13,20,.25); padding-top: 14px; margin-top: 16px; }
.arch-figs .n { font-family: var(--serif); font-size: 26px; line-height: 1; }
.arch-figs .cap { font-size: 8.5px; color: var(--on-candy-2); margin-top: 4px; }
.arch-head .icon-btn { border-color: rgba(100,13,20,.3); color: var(--on-candy); }
.arch-head .icon-btn.solid { background: #640D14; color: var(--candy); border-color: #640D14; }

/* sheets */
.sheet { position: fixed; inset: 0; z-index: 50; background: var(--bg); }
.sheet-panel { position: relative; height: 100%; overflow-y: auto; overscroll-behavior: contain; max-width: 560px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) max(20px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 48px) max(20px, env(safe-area-inset-left, 0px)); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.sheet-head .ttl { flex: 1; text-align: center; }
.book-hero { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; align-items: end; }
.book-hero .h1 { font-size: 32px; }
.fic-hero { background: var(--candy); color: var(--on-candy); margin: calc(-1 * (env(safe-area-inset-top, 0px) + 14px)) -20px 0; padding: calc(env(safe-area-inset-top, 0px) + 14px) 20px 28px; }
.fic-hero .sheet-head .icon-btn, .fic-hero .btn { border-color: rgba(100,13,20,.3); color: var(--on-candy); }
.fic-hero .fcover { width: 150px; margin: 4px auto 0; }
.toggles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.toggle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 72px; border-radius: 14px; border: 1px solid var(--fic); background: transparent; color: var(--fic); font-size: 12.5px; font-weight: 500; }
.toggle svg { width: 20px; height: 20px; }
.toggle[aria-pressed="true"] { background: var(--fic); color: #FBF4E4; }
:root[data-theme="dark"] .toggle[aria-pressed="true"] { color: #2B0709; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toggle[aria-pressed="true"] { color: #2B0709; } }
.badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.badges span { font-family: var(--mono); font-size: 11px; padding: 4px 8px; border: 1px solid var(--line-2); }
.badges .rt { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: var(--candy-soft); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; }
.stepper button { width: 46px; height: 42px; border: 0; background: transparent; font-size: 20px; color: var(--ink); }
.stepper span { width: 1px; height: 20px; background: var(--line-2); }
.big-n { font-family: var(--serif); font-size: 56px; line-height: .85; letter-spacing: -.02em; }
.time-in { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.time-in label { display: flex; flex-direction: column; gap: 5px; text-align: center; }
.time-in input { width: 100%; height: 60px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); color: var(--ink); text-align: center; font-family: var(--mono); font-size: 26px; padding: 0; }
.notes { list-style: none; margin: 0; padding: 0; }
.note { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.note .pg { display: inline-block; border-radius: 999px; padding: 3px 8px; font-family: var(--mono); font-size: 10.5px; white-space: nowrap; color: #640D14; }
.note .tag { font-size: 11px; color: var(--muted); margin-top: 5px; }
.note p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.note.quote p { font-family: var(--serif); font-size: 17px; line-height: 1.3; }
.note.spoiler:not(.shown) p { filter: blur(5px); user-select: none; }
.note-acts { display: flex; gap: 16px; margin-top: 6px; flex-wrap: wrap; }
.note-acts button { background: none; border: 0; padding: 2px 0; font-size: 12px; font-weight: 500; color: var(--muted); }
.composer textarea { border: 0; background: transparent; resize: vertical; min-height: 72px; width: 100%; padding: 2px; font-size: 15px; outline: none; color: var(--ink); }
.composer .opts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line-2); padding-top: 10px; }
.composer .opts input[type="number"], .composer .opts input[type="text"], .composer .opts select { width: auto; min-width: 0; border: 1px solid var(--line-2); background: var(--surface-2); border-radius: 10px; padding: 6px 8px; font-size: 13px; color: var(--ink); }
.composer .opts input[type="number"], .composer .opts input[type="text"] { width: 84px; }
.review-grid { display: grid; gap: 12px; }
@media (min-width: 520px) { .review-grid.has-notes { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.review-grid textarea { min-height: 200px; }
.review-notes { border-left: 2px solid var(--apricot); padding-left: 12px; max-height: 320px; overflow: auto; display: grid; gap: 12px; align-content: start; font-size: 13px; }
.review-notes p { white-space: pre-wrap; overflow-wrap: anywhere; }
.results { display: grid; gap: 0; margin-top: 14px; border-top: 1px solid var(--ink); }
.result { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.result .tt { font-family: var(--serif); font-size: 19px; line-height: 1.12; }
.dup-note { font-size: 13px; font-weight: 600; color: var(--book); margin-top: 8px; }
.card .dup-note { margin-top: 0; }
.result .bb { font-size: 13px; color: var(--muted); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.thinking { display: flex; align-items: center; gap: 10px; color: var(--muted); margin-top: 16px; }
.thinking i { width: 9px; height: 9px; border-radius: 50%; background: var(--apricot); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.7); } }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 18px; }
.tabs::-webkit-scrollbar { display: none; }
.filebox { display: block; border: 1px dashed var(--fic); border-radius: 16px; padding: 18px; text-align: center; font-weight: 500; background: var(--candy-soft); }
.filebox.book { border-color: var(--line-2); background: transparent; }
.filebox input { display: block; margin: 10px auto 0; max-width: 100%; font-size: 13px; }
.parsed { display: grid; gap: 0; }
.parsed .field { padding: 10px 0; border-bottom: 1px solid var(--line); }
.parsed .field input { border: 0; background: transparent; padding: 0; border-radius: 0; font-weight: 500; }
.swatches { display: flex; justify-content: space-between; gap: 6px; }
.swatches button { width: 42px; height: 42px; border-radius: 50%; border: 0; padding: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.swatches button[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 3px; }
.motifs { display: flex; justify-content: space-between; gap: 6px; }
.motifs button { display: flex; flex-direction: column; align-items: center; gap: 5px; border: 0; background: transparent; padding: 0; font-size: 11px; color: var(--muted); }
.motifs .t { width: 46px; height: 46px; border-radius: 8px; container-type: inline-size; }
.motifs button[aria-pressed="true"] { color: var(--ink); }
.motifs button[aria-pressed="true"] .t { outline: 2px solid var(--ink); outline-offset: 2px; }
.preview { display: grid; place-items: center; background: var(--surface); border-radius: 18px; padding: 22px; }
.preview .fcover { width: 190px; }
.preview img { max-height: 420px; max-width: 100%; border-radius: 4px; box-shadow: var(--shadow); }
.tpls { display: flex; justify-content: space-between; gap: 6px; }
.tpls button { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: transparent; padding: 0; font-size: 12px; color: var(--muted); }
.tpls .t { width: 54px; height: 68px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line-2); }
.tpls button[aria-pressed="true"] { color: var(--ink); }
.tpls button[aria-pressed="true"] .t { outline: 2px solid var(--ink); outline-offset: 3px; }
.th-paper { background: #FFF9EC; } .th-ink { background: #2B0709; } .th-page { background: #FFFBF0 repeating-linear-gradient(transparent 0 7px, #EBD9B8 7px 8px); }
.th-cloth { background-color: #AD2831; color: rgba(216,151,60,.7); background-image: repeating-linear-gradient(45deg, currentColor 0 1px, transparent 1px 8px), repeating-linear-gradient(-45deg, currentColor 0 1px, transparent 1px 8px); }

/* stats */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.tiles > div { padding: 14px 12px 16px 0; border-bottom: 1px solid var(--line); }
.tiles > div:nth-child(odd) { border-right: 1px solid var(--line); }
.tiles > div:nth-child(even) { padding-left: 14px; }
.tiles .n { font-family: var(--serif); font-size: 42px; line-height: 1; margin-top: 6px; letter-spacing: -.02em; }
.tiles .n.sm { font-size: 34px; }
.lg { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }
.type-card { position: relative; overflow: hidden; background: #640D14; color: #F3E6BD; border-radius: 24px; padding: 22px; }
:root[data-theme="dark"] .type-card { background: var(--surface-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .type-card { background: var(--surface-2); } }
.type-card .cap { color: #FD9BB7; }
.type-card .big { font-family: var(--serif); font-size: 42px; line-height: 1; margin-top: 10px; letter-spacing: -.02em; }
.type-card p { margin-top: 10px; font-size: 14px; max-width: 250px; }
.type-card .s1 { position: absolute; right: 18px; top: 16px; width: 70px; height: 70px; color: #D8973C; }
.type-card .s2 { position: absolute; right: 92px; top: 68px; width: 24px; height: 24px; color: #FD9BB7; }
.type-card .pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.type-card .pills span { font-size: 12px; padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(243,230,189,.4); }
.callout { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--surface); flex-wrap: wrap; }
.callout.stack { display: block; }
.callout .cl-row { display: flex; align-items: center; gap: 10px; }
.callout .cl-row > span.small { flex: 1; min-width: 0; }
.callout .cl-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 8px; }
.callout .cl-foot .link { flex: none; }
.shelf-top { margin-bottom: 0; }
.shelf-top .h1 { min-width: 0; }
.shelf-set .ss-row { border-top: 1px solid var(--line-2); padding: 16px 0; }
.shelf-set .ss-row:first-child { border-top: 0; padding-top: 4px; }
.shelf-set .ss-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.shelf-set .ss-t { font-weight: 600; }
.shelf-set .ss-h p, .shelf-set .ss-row > p { margin-top: 3px; }
.shelf-set .btn.block { margin-top: 8px; }
.switch { -webkit-appearance: none; appearance: none; flex: none; width: 44px; height: 26px; border-radius: 999px; background: var(--line-2); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s; }
.switch:checked { background: var(--cta-bg); }
.switch:checked::after { transform: translateX(18px); }
.switch:focus-visible { outline: 2px solid var(--cta-bg); outline-offset: 2px; }
.fly { position: relative; margin-top: 14px; }
.fly .grid-l { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line-2); }
.fly .grid-t { position: absolute; right: 0; font-family: var(--mono); font-size: 9.5px; color: var(--muted); }
.fly .cols { display: grid; gap: 2px; position: relative; }
.fly button { display: flex; flex-direction: column; align-items: center; border: 0; background: transparent; padding: 6px 0 4px; border-radius: 10px; color: inherit; }
.fly button[aria-pressed="true"] { background: var(--surface); }
.fly .up, .fly .dn { height: 84px; display: flex; width: 100%; justify-content: center; }
.fly .up { align-items: flex-end; } .fly .dn { align-items: flex-start; }
.fly .up i { width: 12px; background: var(--c-book); border-radius: 4px 4px 0 0; }
.fly .dn i { width: 12px; background: var(--c-fic); border-radius: 0 0 4px 4px; }
.fly .base { width: 100%; height: 2px; background: var(--ink); }
.fly .m { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-top: 6px; }
.hbars { display: flex; flex-direction: column; gap: 13px; margin-top: 16px; }
.hbars .top-l { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.hbars .top-l span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: capitalize; }
.hbars .tr { height: 12px; margin-top: 6px; }
.hbars .tr i { display: block; height: 12px; border-radius: 0 4px 4px 0; min-width: 2px; }
.vcols { display: grid; gap: 10px; align-items: end; height: 150px; margin-top: 16px; border-bottom: 2px solid var(--ink); }
.vcols > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.vcols i { display: block; width: 30px; max-width: 100%; border-radius: 4px 4px 0 0; }
.vcols b { font-family: var(--mono); font-weight: 400; font-size: 11px; margin-bottom: 4px; }
.vlabels { display: grid; gap: 10px; font-family: var(--mono); font-size: 10px; color: var(--muted); text-align: center; margin-top: 6px; }
.clock { display: grid; place-items: center; margin-top: 10px; }
.clock svg { width: 100%; max-width: 320px; height: auto; }
.heat-h, .heat { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.heat-h { font-family: var(--mono); font-size: 10px; color: var(--muted); text-align: center; margin-top: 14px; }
.heat { margin-top: 6px; }
.heat span { aspect-ratio: 1; border-radius: 8px; }
.heat span.z { box-shadow: inset 0 0 0 1px var(--line-2); }
.heat span.f { box-shadow: inset 0 0 0 1px var(--line); opacity: .5; }
.heat span.today { outline: 2px solid var(--ink); outline-offset: 1px; }
.legend-ramp { display: flex; align-items: center; gap: 4px; margin-top: 12px; justify-content: flex-end; }
.legend-ramp span:not(.mono) { width: 16px; height: 16px; border-radius: 4px; flex: none; }
.ring-card { display: flex; gap: 18px; align-items: center; background: var(--surface); border-radius: 22px; padding: 18px; }
.ring-card svg { width: 112px; height: 112px; flex: none; }
.goal-rows { display: grid; gap: 14px; margin-top: 14px; }
.goal-rows .top-l { display: flex; justify-content: space-between; font-size: 13.5px; }
.goal-rows .bar { margin-top: 8px; }

/* tab bar */
.tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; background: var(--nav-bg); border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; align-items: flex-start; padding: 6px 8px calc(env(safe-area-inset-bottom, 0px) + 8px); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 52px; padding: 6px 4px; border: 0; background: transparent; color: var(--muted); font-size: 10.5px; font-weight: 500; }
.tab svg { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--ink); }
.tab[data-v="archive"][aria-current="page"] { color: var(--fic); }

/* shelf: read or release */
.split { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line-2); }
.split span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-variant-numeric: tabular-nums; }
.legend b { font-weight: 600; }
.own-list li { grid-template-columns: 46px minmax(0, 1fr) auto; align-items: start; }
.own-row.off .meta, .own-row.off > .cover-btn { opacity: .62; }
.own-row.gone { opacity: .5; }
.own-row .tt { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.own-row .ctl { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.own-row .st { min-height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.own-row .st.s-reading { border-color: var(--ink); }
.own-row .st.s-read { background: var(--cta-bg); border-color: var(--cta-bg); color: var(--cta-fg); }
.own-row .st.s-dnf { text-decoration: line-through; color: var(--muted); }
.dec { display: flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.dec button { flex: 1; min-height: 32px; padding: 0 8px; border: 0; background: transparent; font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.dec button + button { border-left: 1px solid var(--line-2); }
.dec .d-keep[aria-pressed="true"], .dec-seg .d-keep[aria-pressed="true"] { background: var(--keep); color: var(--on-keep); }
.dec .d-letgo[aria-pressed="true"], .dec-seg .d-letgo[aria-pressed="true"] { background: var(--letgo); color: #640D14; }
.dec .d-home[aria-pressed="true"], .dec-seg .d-home[aria-pressed="true"] { background: var(--home); color: #640D14; }
.otags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.otag { font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; background: var(--surface); color: var(--ink-2); }
.otag.un { background: var(--cta-bg); color: var(--cta-fg); }
.otag.lgo { background: var(--candy-soft); color: var(--ink); }
.otag.sp { background: var(--apricot); color: #640D14; }
.otag.lib { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); }
.un-item { position: relative; }
.un-item .badge { left: -4px; top: -6px; }
.un-x { position: absolute; right: -6px; top: -8px; width: 28px; height: 28px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; background: var(--ink); color: var(--bg); }
.un-x svg { width: 14px; height: 14px; }
.vols { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.vol { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 12.5px; font-weight: 500; color: var(--ink); }
.vol .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vol .mono { font-size: 11px; color: var(--muted); }
.vol.v-keep { border-color: var(--keep); }
.vol.v-letgo { background: var(--candy-soft); border-color: var(--letgo); }
.vol.v-home { border-color: var(--home); border-style: dashed; }
.snotes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.snotes li { padding: 7px 10px; border-radius: 10px; background: var(--surface-2); }
.snotes li.w { background: var(--candy-soft); }
.snotes li.g { box-shadow: inset 3px 0 0 var(--keep); }
.list.wide li { grid-template-columns: 42px minmax(0, 1fr); }
.list.wide li > .row { grid-column: 1 / -1; justify-content: flex-start !important; }
.listing { padding: 18px 0; border-bottom: 1px solid var(--line); }
.listing pre { margin: 12px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 12px; line-height: 1.55; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.pick { display: flex; gap: 14px; padding: 14px; border-radius: 18px; background: var(--surface); }
.scan-card { display: flex; gap: 14px; align-items: center; }
.scan-ic { width: 46px; height: 46px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--cta-bg); color: var(--cta-fg); }
.scan-ic svg { width: 24px; height: 24px; }
.callout .input[type="date"] { min-height: 38px; }

/* toast */
#toast .toast { position: fixed; z-index: 70; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 86px); width: max-content; max-width: calc(100% - 32px);
  background: var(--cta-bg); color: var(--cta-fg); border-radius: 16px; padding: 12px 16px; display: flex; gap: 12px; align-items: center; font-weight: 500; font-size: 14px; box-shadow: 0 12px 30px -10px rgba(0,0,0,.45); }
#toast button { background: none; border: 0; color: inherit; font-weight: 600; text-decoration: underline; padding: 4px; }

/* club */
.days { display: flex; justify-content: space-between; gap: 4px; }
.days span { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11px; border: 1px solid var(--line-2); color: var(--muted); }
.days span.on { background: var(--cta-bg); color: var(--cta-fg); border-color: var(--cta-bg); }
.pill { display: inline-flex; border-radius: 999px; padding: 4px 10px; font-family: var(--mono); font-size: 11px; background: var(--apricot); color: #640D14; }

/* auth */
.auth { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; gap: 22px; max-width: 420px; margin: 0 auto; }
.auth .h1 { font-size: 54px; }
.auth .h1 svg { width: 34px; height: 34px; color: var(--apricot); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- paper ---------- */
/* A faint grain and long paper fibres behind everything, so the pearl reads as paper rather than flat colour. */
:root { --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .39 0 0 0 0 .05 0 0 0 0 .08 0 0 0 .9 -.38'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); --fibre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .09' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .32 0 0 0 0 .2 0 0 0 .7 -.48'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E"); --grain-op: .5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .95 0 0 0 0 .9 0 0 0 0 .74 0 0 0 .9 -.38'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); --grain-op: .28; } }
:root[data-theme="dark"] { --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .95 0 0 0 0 .9 0 0 0 0 .74 0 0 0 .9 -.38'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); --grain-op: .28; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background-image: var(--grain), var(--fibre); background-size: 240px 240px, 600px 600px; opacity: var(--grain-op); }
.sheet::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: var(--grain), var(--fibre); background-size: 240px 240px, 600px 600px; opacity: var(--grain-op); }
.card, .quote-card { background-image: var(--grain); background-size: 240px 240px; }

/* ---------- motion ---------- */
.view-in { animation: view-in .32s cubic-bezier(.2, .7, .2, 1); }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }
.sheet.sheet-in .sheet-panel { animation: sheet-in .38s cubic-bezier(.2, .8, .2, 1); }
.sheet.sheet-in { animation: fade-in .2s ease-out; }
@keyframes sheet-in { from { opacity: .4; transform: translateY(26px); } }
@keyframes fade-in { from { opacity: 0; } }
#toast .toast { animation: toast-in .34s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 14px) scale(.96); } }
.timerbar.bar-in { animation: bar-in .4s cubic-bezier(.2, .9, .3, 1.15); }
@keyframes bar-in { from { opacity: 0; transform: translate(-50%, 20px); } }
/* Covers lift a little under a finger, like picking a book off the shelf. */
.cover-btn .cover { transition: transform .18s ease, box-shadow .18s ease; }
.cover-btn:active .cover { transform: translateY(-3px) rotate(-1deg) scale(.98); box-shadow: 0 16px 26px -14px rgba(100,13,20,.75); }
@media (hover: hover) { .cover-btn:hover .cover { transform: translateY(-3px); } }
.btn, .chip, .icon-btn, .tab { transition: transform .12s ease, background-color .2s ease, color .2s ease; }
.btn:active, .chip:active, .icon-btn:active { transform: scale(.96); }
.tab svg { transition: transform .25s cubic-bezier(.2, .9, .3, 1.4); }
.tab[aria-current="page"] svg { transform: translateY(-1px) scale(1.08); }
.burst { position: fixed; left: 50%; top: 45%; z-index: 80; pointer-events: none; }
.burst i { position: absolute; left: 0; top: 0; width: 22px; height: 22px; margin: -11px; opacity: 0; animation: burst 1.1s cubic-bezier(.15, .8, .3, 1) forwards; }
.burst i svg { width: 100%; height: 100%; }
@keyframes burst { 0% { opacity: 0; transform: translate(0, 0) scale(.2); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(var(--s)); } }
@media (prefers-reduced-motion: reduce) { .cover-btn:active .cover, .cover-btn:hover .cover, .tab[aria-current="page"] svg { transform: none; } }

/* Reading timer: a slim bar that sits above the tab bar on every screen while a session runs. */
.timerbar { position: fixed; z-index: 31; left: 50%; transform: translateX(-50%); width: min(560px, calc(100% - 20px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 74px);
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 999px; background: var(--cta-bg); color: var(--cta-fg); box-shadow: var(--shadow); }
.timerbar .tb-book { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; color: inherit; padding: 0; text-align: left; }
.timerbar .tb-t { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.timerbar .tb-t .cap { font-size: 9px; opacity: .75; }
.timerbar .tb-t b { font-family: var(--serif); font-weight: 400; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timerbar .tb-clock { font-size: 15px; font-variant-numeric: tabular-nums; }
.timerbar .icon-btn { width: 40px; height: 40px; min-width: 40px; border-color: transparent; background: rgba(255,255,255,.14); color: inherit; }
.timerbar .icon-btn.solid { background: var(--cta-fg); color: var(--cta-bg); }
.timerbar .icon-btn svg { width: 18px; height: 18px; }
.tb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--candy); flex: none; animation: tb-pulse 1.6s ease-in-out infinite; }
.tb-dot.off { animation: none; opacity: .5; }
@keyframes tb-pulse { 50% { opacity: .35; transform: scale(.8); } }
body.timing .app { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 170px); }
.netbar { position: fixed; z-index: 29; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 72px); max-width: calc(100% - 32px); padding: 5px 12px; border-radius: 999px; background: var(--ink); color: var(--bg); font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; opacity: .92; }
body.timing .netbar { bottom: calc(env(safe-area-inset-bottom, 0px) + 134px); }
body.timing #toast .toast { bottom: calc(env(safe-area-inset-bottom, 0px) + 136px); }
.timer-btn { padding-left: 10px; padding-right: 10px; }
.timer-btn svg, .timer-cta svg { width: 17px; height: 17px; }
.timer-btn.on { background: var(--cta-bg); color: var(--cta-fg); border-color: var(--cta-bg); }
.timer-cta { display: flex; align-items: center; justify-content: center; gap: 8px; }
.timer-done { text-align: center; padding: 18px 0 22px; }
.timer-done .big-n { font-family: var(--mono); font-size: 56px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* Release calendar (Library → Upcoming → Calendar). */
.up-toggle { margin-bottom: 18px; }
.cal-export { gap: 14px; margin-bottom: 8px; }
.cal-month { margin-top: 30px; }
.cal-month .h2 i { color: var(--muted); }
.cal { margin-top: 12px; }
.cal-dow, .cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow span { font-family: var(--mono); font-size: 10px; color: var(--muted); text-align: center; padding-bottom: 4px; }
.cal-day { position: relative; aspect-ratio: 3 / 4; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); padding: 0; overflow: hidden; color: var(--muted); }
.cal-day.pad { background: none; border: 0; }
.cal-day.past { opacity: .5; }
.cal-day.today { border-color: var(--ink); border-width: 1.5px; }
.cal-day .cal-n { position: absolute; left: 4px; top: 3px; font-family: var(--mono); font-size: 10px; z-index: 2; }
.cal-day.has { border: 0; box-shadow: var(--shadow); }
.cal-day.has .cover { position: absolute; inset: 0; height: 100%; border-radius: 0; box-shadow: none; }
.cal-day.has .cal-n { color: #FBF4E4; background: rgba(43,7,9,.72); border-radius: 4px; padding: 0 3px; left: 3px; top: 3px; }
.cal-more { position: absolute; right: 3px; bottom: 3px; z-index: 2; font-family: var(--mono); font-size: 9.5px; background: var(--apricot); color: #640D14; border-radius: 999px; padding: 0 5px; }
.cal-list { list-style: none; margin: 10px 0 0; padding: 0; }
.cal-list li > .cover-btn { gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.cal-list .tt { display: block; font-family: var(--serif); font-size: 16px; line-height: 1.2; }
.cal-list .small { display: block; }
.cal-when { width: 62px; flex: none; color: var(--book); }

/* More tab sheet */
.more-tile { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); text-align: left; }
.more-tile.on { border-color: var(--ink); }
.more-tile > svg { width: 26px; height: 26px; flex: none; color: var(--book); }
.more-tile b { display: block; font-family: var(--serif); font-weight: 400; font-size: 20px; }
.more-tile .chev { width: 18px; height: 18px; transform: rotate(180deg); color: var(--muted); }
.more-av { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--cta-bg); color: var(--cta-fg); font-family: var(--serif); font-size: 15px; }

/* Netlify injects a "Powered by Netlify" iframe on Free-plan projects. This is a personal app, so hide it. */
#nl-badge-frame, #nl-hud-frame { display: none !important; }

/* iOS Safari zooms the page in whenever a text box or menu with text under 16px is tapped, and leaves it zoomed.
   On touch screens, keep form controls at 16px so the page never zooms on its own. */
@media (pointer: coarse) {
  input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea { font-size: 16px !important; }
}

/* Save a quote: type-to-search "From" picker */
.qn-thumb { width: 34px; flex: none; }
.qn-thumb .fcover { font-size: 4px; }
.qn-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.qn-list li + li { border-top: 1px solid var(--line); }
.qn-list button { display: flex; gap: 12px; align-items: center; width: 100%; padding: 9px 12px; border: 0; background: none; text-align: left; color: var(--ink); font: inherit; }
.qn-list button > span { display: grid; gap: 2px; }
.qn-list button:active, .qn-list button.first { background: var(--line); }
.qn-list .tt, .qn-chosen .tt { font-family: var(--serif); font-size: 16px; line-height: 1.15; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qn-chosen { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); }
.qn-empty { padding: 4px 2px; }

/* Quote card options */
.card-opts { display: grid; gap: 10px; margin-top: 22px; }
.card-opts > .label { margin-top: 8px; }
.swatches { display: flex; gap: 6px; overflow-x: auto; padding: 7px 6px 6px; margin: 0 -6px; scrollbar-width: none; }
.swatches button { display: flex; flex-direction: column; align-items: center; gap: 5px; border: 0; background: none; padding: 0; font-size: 11.5px; color: var(--muted); flex: none; width: 58px; }
.swatches button > span { position: relative; width: 40px; height: 40px; border-radius: 50%; display: block; }
.swatches button > span i { position: absolute; right: 2px; bottom: 2px; width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); }
.swatches button[aria-pressed="true"] { color: var(--ink); }
.swatches button[aria-pressed="true"] > span { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Archive: sort and filter row, WIP checker, tappable ships and tags */
.arch-ctl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.arch-ctl select.input { width: 100%; min-width: 0; max-width: 100%; min-height: 38px; padding: 0 24px 0 12px; border-radius: 999px; background-color: transparent; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.arch-ctl #arch-sort { grid-column: 1 / -1; justify-self: start; width: auto; }
.pill.candy { background: var(--candy); color: #640D14; flex: none; }
.fresh-row { padding: 13px 0; border-bottom: 1px solid var(--line); gap: 10px; align-items: center; }
.ships { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.ships .link { font-size: 13px; font-weight: 400; color: var(--muted); padding: 0; text-align: left; }
.tags .tg { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: var(--candy-soft); border: 0; color: var(--ink); text-align: left; }
.hbars > button { padding: 0; }
/* Library: series */
.ser-strip { display: flex; gap: 10px; overflow-x: auto; padding: 14px 2px 4px 6px; margin: 0 -6px; scrollbar-width: none; }
.ser-strip::-webkit-scrollbar { display: none; }
.sv { width: 58px; flex: none; }
.sv .mono { display: block; text-align: center; font-size: 10.5px; color: var(--muted); margin-top: 6px; }
.sv.up .cover { opacity: .5; }
.sv-mark { position: absolute; right: -5px; top: -6px; z-index: 2; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center; font-family: var(--mono); font-size: 9.5px; background: var(--cta-bg); color: var(--cta-fg); }
.sv-mark.now { background: var(--apricot); color: #640D14; }
.sv-mark.off { background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.snotes li.row { display: flex; gap: 10px; align-items: center; }
.snotes li .link { flex: none; font-size: 13px; padding: 0; }
/* Book club: two ratings side by side */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.duo .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duo-edit { display: grid; gap: 10px; }
.rate-row { display: grid; grid-template-columns: minmax(48px, 30%) minmax(0, 1fr) 40px; gap: 12px; align-items: center; font-size: 14px; font-weight: 500; }
.rate-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rate-row .mono { text-align: right; font-size: 13px; }

/* Author names that open the author page */
.who { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; text-decoration: underline; text-decoration-color: var(--line-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tt .who { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Stats: compare */
.cmps { display: flex; flex-direction: column; gap: 18px; margin-top: 16px; }
.cmp .top-l { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.cmp-bar { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; align-items: center; margin-top: 6px; }
.cmp-bar > span:last-child { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cmp-bar i { display: block; height: 10px; border-radius: 0 4px 4px 0; min-width: 2px; flex: none; max-width: calc(100% - 64px); }
.cmp-bar b { font-weight: 400; font-size: 12px; white-space: nowrap; }
.sw.dash { background: none; border-top: 2px dashed var(--muted); height: 0; border-radius: 0; }
.race { display: block; width: 100%; height: auto; margin-top: 12px; overflow: visible; }
.race .ax { stroke: var(--ink); stroke-width: 1.5; }
.race .gl { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 3; }
.race .gt { font-family: var(--mono); font-size: 9px; fill: var(--muted); }
.race .ln-a { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.race .ln-b { fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-dasharray: 5 4; stroke-linejoin: round; }
.race-t { display: grid; margin-top: 6px; font-family: var(--mono); font-size: 10px; color: var(--muted); text-align: center; }
.tops { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.tops li { display: flex; align-items: baseline; gap: 6px; font-size: 13.5px; padding: 5px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.tops li > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tops li .mono { margin-left: auto; flex: none; }
.tops em { font-style: normal; font-family: var(--mono); font-size: 9px; padding: 1px 5px; border-radius: 999px; background: var(--apricot); color: #640D14; flex: none; }

/* Comments on AO3 */
.comment-box { margin-top: 14px; }
.comment-box.ask { padding: 14px; border-radius: 14px; background: var(--candy-soft); }
.comment-box .small svg { width: 14px; height: 14px; vertical-align: -2px; color: var(--fic); }
.nudge-row { padding: 14px 0; border-bottom: 1px solid var(--line); }

/* A note with a progress update */
textarea.pnote { display: block; resize: none; overflow: hidden; min-height: 40px; line-height: 1.35; }
.now form .input.pnote { flex: 1 0 100%; width: 100%; padding: 8px 10px; font-size: 13.5px; }
.now-strip.many .now form { flex-wrap: wrap !important; }
.now-strip.many .now form .input.pnote { width: 100%; padding: 6px 8px; font-size: 12.5px; min-height: 34px; }
textarea.pnote.block { width: 100%; }
/* Activity timeline */
.acts { list-style: none; margin: 4px 0 0; padding: 0; }
.act-day { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 16px 0 4px; }
.act { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.act-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font-size: 13px; color: var(--book); }
.act-finish .act-ic { background: var(--apricot); color: #640D14; }
.act-dnf .act-ic { color: var(--muted); }
.act-t { font-size: 14px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.act-note { margin-top: 6px; padding: 8px 12px; border-left: 2px solid var(--apricot); background: var(--surface); border-radius: 0 10px 10px 0; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.act-note.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.act .note-acts { margin-top: 6px; }
.act-edit { margin-top: 8px; }

/* Shared book club */
.linked { color: var(--keep); }
.card.connect { background: var(--surface); }
.invite .input[readonly] { font-family: var(--mono); font-size: 12.5px; min-width: 0; }
.duo-prog { display: grid; gap: 10px; }
.pp-who { font-weight: 600; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duo-prog .bar { background: var(--line-2); }
.club-notes { display: grid; gap: 10px; }
.cnote { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.cnote.mine { box-shadow: inset 3px 0 0 var(--apricot); }
.cnote.ahead { box-shadow: inset 3px 0 0 var(--fic); }
.cnote p { margin-top: 4px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.cn-who { font-weight: 600; font-size: 13px; }
.cnote .link.small, .cn-hidden .link.small { font-size: 12px; padding: 2px 0; }
.cn-hidden { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--fic); font-size: 13px; color: var(--ink-2); }
.cn-hidden svg { width: 13px; height: 13px; vertical-align: -2px; color: var(--fic); }
.cn-form textarea { resize: vertical; }

/* Book description: clamp long ones until "More" */
.blurb { white-space: pre-line; }
.blurb.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* Add to your library options */
.add-opt { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; border: 0; color: var(--ink); padding: 16px 18px; }
.add-opt > span:first-child { width: 28px; flex: none; display: grid; place-items: center; }
.add-opt .h3 { line-height: 1.15; }
.add-opt .small { margin-top: 3px; }
/* A .card that is also a .cover-btn keeps the card's padding and background. */
.card.cover-btn { padding: 18px; background-color: var(--surface); text-align: left; }

/* Book club meeting this week, on Today */
.club-row.soon { background: var(--surface); border: 0; border-radius: 18px; padding: 16px 18px; }
.release-day .label svg { width: 13px; height: 13px; color: var(--apricot); }
.release-day .rd-one { display: flex; align-items: center; gap: 16px; margin-top: 12px; text-align: left; width: 100%; }
.release-day .rd-cover { width: 64px; flex: none; }
.release-day .h2 i { color: var(--book); }
.club-row.soon b { color: var(--ink); }
/* Price-check links on Selling */
.price-links { gap: 6px 14px; margin-top: 8px; align-items: baseline; }

/* Yearly goal on Today */
.year-goal { display: block; margin-top: 16px; padding: 14px 16px; border-radius: 16px; background: var(--surface); }
.year-goal .bar { position: relative; }
.year-goal .bar b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .55; border-radius: 1px; }

/* Packing */
.pack-cur { margin-top: 16px; }
.pack-cur .n.heavy { color: var(--letgo-ink, #B03A62); }

/* Printable box labels: only the labels print, one per page */
#print-area { display: none; }
@media print {
  body.printing > *:not(#print-area) { display: none !important; }
  body.printing { background: #fff !important; }
  body.printing #print-area { display: block; color: #000; font-family: Georgia, serif; }
  .label-page { page-break-after: always; break-after: page; padding: 24px; }
  .lp-top { display: flex; justify-content: space-between; font: 600 14px/1 ui-monospace, monospace; letter-spacing: .12em; }
  .lp-frag { border: 2px solid #000; padding: 4px 8px; }
  .lp-n { font-size: 120px; line-height: 1; margin-top: 30px; }
  .lp-room { font-size: 44px; font-style: italic; margin-top: 10px; border-bottom: 2px solid #000; padding-bottom: 12px; }
  .lp-count { font: 600 16px/1 ui-monospace, monospace; letter-spacing: .12em; margin-top: 14px; }
  .label-page ol { columns: 2; column-gap: 28px; font-size: 13px; line-height: 1.45; margin-top: 18px; padding-left: 20px; }
  .label-page ol i { color: #555; }
}

/* Card options (quote and rec cards) */
.card-opts { gap: 12px; }
.card-opts > .label { margin-top: 12px; }
.card-opts .tpls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 6px 6px 0; }
.card-opts .tpls button { gap: 8px; font-size: 12.5px; min-width: 0; }
.card-opts .tpls .t { width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: 8px; }
.card-opts .swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 8px; overflow: visible; padding: 4px 0 0; margin: 0; }
.card-opts .swatches button { width: auto; height: auto; border-radius: 0; box-shadow: none; outline: 0; gap: 7px; min-width: 0; font-size: 12px; }
.card-opts .swatches button > span { width: 44px; height: 44px; }
.card-opts .swatches button > span i { box-shadow: 0 0 0 2px var(--bg); }
.card-opts .seg .chip { flex: 1; padding: 0 8px; white-space: nowrap; }
.card-opts .opt-pair { display: grid; grid-template-columns: 3fr 2fr; gap: 8px; }
.card-opts .opt-pair .seg:only-child { grid-column: 1 / -1; }
.card-opts .field .small { margin-top: 2px; }
.card-opts .shows { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.th-highlight { background: linear-gradient(transparent 38%, rgba(253,155,183,.8) 38% 52%, transparent 52%), repeating-linear-gradient(#FBF7EE 0 6px, rgba(42,26,23,.18) 6px 8px); }
.th-plate { background: #F3E6BD; box-shadow: inset 0 0 0 4px #F3E6BD, inset 0 0 0 5.5px #A8772A, inset 0 0 0 8px #F3E6BD, inset 0 0 0 9px #A8772A !important; }
.th-mark { background: #640D14; position: relative; overflow: hidden; }
.th-mark::before { content: '“'; position: absolute; left: -2px; top: -22px; font: 700 80px/1 Fraunces, serif; color: #AD2831; }
.th-ao3 { background: linear-gradient(#FD9BB7 0 32%, #FBF4E4 32%); }
.card-opts .tpls button { position: relative; }
.card-opts .fonts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.card-opts .fonts .chip { justify-content: center; padding: 0 6px; min-width: 0; font-size: 14px; }
.card-opts .fonts .f-fraunces { font-family: Fraunces, serif; font-size: 15px; }
.card-opts .fonts .f-cormorant { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 17px; font-weight: 600; }
.card-opts .fonts .f-hand { font-family: Caveat, cursive; font-size: 19px; font-weight: 600; }

/* Series: Hardcover check */
.ser-check { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.ser-check .small { flex: 1; min-width: 160px; }
.ser-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.ser-miss { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.ser-miss li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.ser-miss li:first-child { border-top: 0; }
.ser-miss .tt { font-family: var(--serif); font-size: 16px; line-height: 1.2; }
.ser-miss .sm-cv .cover .gen b { font-size: 6px; }
.ser-miss .sm-cv .cover .gen span { display: none; }
.sv.ghost .cover { opacity: .38; filter: grayscale(.35); box-shadow: none; }
.sv.ghost .mono { opacity: .7; }
.ser-miss .sm-cv .cover { opacity: .5; filter: grayscale(.35); }
.ser-sum { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; text-align: left; }
.ser-sum.warn { background: var(--candy-soft); }
.ser-sum .mono { color: var(--muted); letter-spacing: .06em; margin-right: 4px; }
.ser-sum .chev { font-size: 20px; line-height: 1; color: var(--muted); flex: none; }
