/* Sapphic Shelf — Ink & Blush: crisp cream paper, near-black ink, one blush accent. (Previously "a library at dusk": plum + brass.) */
:root {
  color-scheme: light;
  --room: #FBF7F2;        /* page background (cream) */
  --room-2: #F5EEE6;
  --panel: #FFFFFF;
  --panel-2: #F8F1EA;
  --line: rgba(26, 26, 26, .14);
  --wood: #4b2d26;        /* the library case itself keeps its walnut */
  --wood-hi: #6d4335;
  --wood-lo: #2d1a16;
  --blush: #F2A5A0;       /* THE accent: fills, pills, bars */
  --blush-hover: #E8837C;
  --blush-soft: rgba(242, 165, 160, .22);
  --brass: #A23B35;       /* deep coral: accent used for TEXT/borders/icons on cream (AA, 5.9:1) */
  --brass-ink: #1A1A1A;
  --fg: #1A1A1A;
  --muted: #5B534D;
  --paper: #FFFFFF;
  --ink: #1A1A1A;
  --ink-soft: #4A433E;
  --pencil: #6F6660;
  --violet: #1A1A1A;
  --rose: #B1413A;
  --warn: #8F4410;
  --bad: #B3261E;
  --ok: #1E7143;
  --focus: #1A1A1A;

  --f-display: "Fraunces", "Playfair Display", "Iowan Old Style", Georgia, serif;
  --f-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  --f-cond: "Oswald", "Arial Narrow", sans-serif;

  --slot-h: 212px;
  --plank: 22px;
  --radius: 12px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 80px; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--room);
  background-color: var(--room);
  color: var(--fg);
  font: 15px/1.5 var(--f-ui);
}
a { color: var(--brass); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--blush); color: var(--brass-ink); padding: 8px 12px; border-radius: 6px; z-index: 50; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.wrap, .site-head, .site-foot, main {
  width: 100%; max-width: 1280px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
main { flex: 1; padding-block: 8px 56px; outline: none; }

/* ---------- header ---------- */
.site-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding-block: 18px 14px; }
.logo { font-family: var(--f-display); font-size: 2rem; color: var(--fg); text-decoration: none; line-height: 1; }
.logo em { color: var(--brass); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--fg); }
.site-nav a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--brass); }
.site-foot { padding-block: 24px 32px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }
.site-foot p { margin: 4px 0; }

/* ---------- buttons, fields, chips ---------- */
.btn { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 9px 18px; border: 1px solid var(--line); background: rgba(26,26,26,.06); text-decoration: none; color: var(--fg); white-space: nowrap; }
.btn:hover { border-color: rgba(26,26,26,.3); }
.btn.primary { background: var(--blush); color: var(--brass-ink); border-color: var(--brass); font-weight: 600; }
.btn.danger { border-color: rgba(255,138,128,.5); color: var(--bad); }
.btn.small { padding: 6px 14px; font-size: .9rem; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.google { background: #fff; color: #222; border-color: #fff; font-weight: 500; }
.field { display: grid; gap: 6px; }
.field label, .label { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.field .hint { font-size: .82rem; color: var(--muted); }
input[type=text], input[type=email], input[type=url], input[type=search], input[type=number], textarea, select {
  width: 100%; min-width: 0; background: rgba(26,26,26,.06); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px;
}
textarea { resize: vertical; min-height: 7rem; }
select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
select option { background: var(--panel); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { cursor: pointer; border: 1px solid var(--line); background: rgba(26,26,26,.04); border-radius: 999px; padding: 5px 12px; font-size: .88rem; line-height: 1.3; }
.chip:hover { border-color: rgba(26,26,26,.35); }
.chip[aria-pressed="true"] { background: var(--blush); color: var(--brass-ink); border-color: var(--brass); }
.chip.avoid[aria-pressed="true"] { background: var(--bad); border-color: var(--bad); color: #2a0d0b; }
.chip .n { opacity: .7; font-variant-numeric: tabular-nums; margin-left: 4px; }
.tag { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 10px; font-size: .8rem; background: rgba(26,26,26,.07); border: 1px solid var(--line); color: var(--fg); text-decoration: none; }
a.tag:hover { border-color: var(--brass); }
.tag.genre { border-color: rgba(242,165,160,.45); color: var(--brass); }
.err { color: var(--bad); font-size: .88rem; margin: 0; }
.okmsg { color: var(--ok); font-size: .88rem; margin: 0; }

/* ---------- panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
h1.page { font-family: var(--f-display); font-weight: 600; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.05; margin: 12px 0 6px; text-wrap: balance; }
h2.sec { font-family: var(--f-display); font-weight: 600; font-size: 1.7rem; margin: 0 0 10px; }
.lede { color: var(--muted); max-width: 64ch; margin: 0 0 18px; }

/* ---------- library ---------- */
.lib-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 24px; margin: 6px 0 16px; }
.lib-head h1 { margin: 0; }
.tally { color: var(--muted); margin: 0; font-variant-numeric: tabular-nums; }
.tally b { color: var(--fg); font-weight: 500; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.toolbar .search { flex: 1 1 18rem; min-width: 0; }
.toolbar select { width: auto; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { cursor: pointer; border: 0; background: none; padding: 8px 14px; }
.seg button[aria-pressed="true"] { background: var(--blush); color: var(--brass-ink); }
.filters { display: grid; gap: 14px; margin-bottom: 16px; }
.filters details { background: rgba(26,26,26,.035); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.filters summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 500; list-style: none; }
.filters summary::-webkit-details-marker { display: none; }
.filters summary::before { content: "▸"; color: var(--brass); transition: transform .15s; }
.filters details[open] summary::before { transform: rotate(90deg); }
.filters summary .count { color: var(--brass); font-size: .85rem; }
.filters .inner { display: grid; gap: 10px; padding-top: 10px; }
.filters .chips { max-height: 220px; overflow: auto; padding: 2px; }
.active-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: .9rem; }
.linkbtn { cursor: pointer; background: none; border: 0; color: var(--brass); text-decoration: underline; padding: 0; }

.case { position: relative; border-radius: 6px; padding: 18px 14px 0;
  background:
    linear-gradient(90deg, var(--wood-lo), var(--wood) 14px, transparent 14px, transparent calc(100% - 14px), var(--wood) calc(100% - 14px), var(--wood-lo)),
    linear-gradient(to bottom, var(--wood-hi), var(--wood) 18px, transparent 18px);
  box-shadow: 0 30px 60px rgba(26,26,26,.20); }
.shelf { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; row-gap: var(--plank); padding: 0 14px var(--plank); min-height: calc(var(--slot-h) + var(--plank));
  background-color: #160e12;
  background-image:
    linear-gradient(to bottom, transparent 0 var(--slot-h), var(--wood-hi) var(--slot-h), var(--wood) calc(var(--slot-h) + 5px), var(--wood-lo) calc(var(--slot-h) + var(--plank))),
    linear-gradient(to bottom, rgba(26,26,26,.25), rgba(26,26,26,.00) 40px);
  background-size: 100% calc(var(--slot-h) + var(--plank)), 100% calc(var(--slot-h) + var(--plank)); }
.slot { position: relative; height: var(--slot-h); display: flex; align-items: flex-end; padding-inline: 1px; }
.spine { --c: #7a1f3d; --t: #f6e9ee; position: relative; cursor: pointer; padding: 12px 0 10px; width: var(--w, 34px); height: var(--h, 180px); text-decoration: none;
  background: linear-gradient(90deg, rgba(26,26,26,.13), rgba(26,26,26,.10) 22%, rgba(26,26,26,0) 45%, rgba(26,26,26,.10)), var(--c);
  color: var(--t); border-radius: 2px 2px 1px 1px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 6px;
  transition: transform .18s ease, box-shadow .18s ease; box-shadow: inset 0 -3px 0 rgba(26,26,26,.08); }
.spine:hover, .spine:focus-visible { transform: translateY(-10px); box-shadow: 0 10px 18px rgba(26,26,26,.20); z-index: 2; }
.spine .t { writing-mode: vertical-rl; white-space: normal; overflow: hidden; overflow-wrap: anywhere; flex: 1 1 auto; min-height: 0; max-height: 100%; max-width: 100%;
  font-family: var(--f-display); font-size: var(--fs, 15px); line-height: 1.08; text-align: center; }
.spine.v1 .t { font-family: var(--f-cond); text-transform: uppercase; letter-spacing: .08em; font-size: calc(var(--fs, 15px) * .8); }
.spine.v2 .t { font-style: italic; }
.spine .a { writing-mode: vertical-rl; font-family: var(--f-cond); text-transform: uppercase; font-size: 8px; letter-spacing: .08em; opacity: .75; white-space: nowrap; overflow: hidden; max-height: var(--ah, 46px); flex: none; }
.spine.b1::before, .spine.b1::after { content: ""; position: absolute; left: 3px; right: 3px; height: 2px; background: var(--band, var(--brass)); opacity: .85; }
.spine.b1::before { top: 7px; } .spine.b1::after { bottom: 6px; }
.spine.b2::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 9px; background: rgba(26,26,26,.11); }
.ribbon { position: absolute; bottom: -15px; left: 50%; width: 7px; height: 20px; margin-left: 2px; background: var(--rose); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); pointer-events: none; z-index: 1; }
.plate { height: 128px; width: 30px; margin: 0 6px; border-radius: 3px; background: linear-gradient(160deg, #e7c88f, #a9803f); color: #3a2510; display: grid; place-items: center; font-family: var(--f-display); font-size: 1.4rem; box-shadow: 0 2px 0 rgba(26,26,26,.16); }
.tip { position: absolute; z-index: 5; pointer-events: none; background: #1A1A1A; color: #FBF7F2; border: 1px solid rgba(242,165,160,.5); border-radius: 8px; padding: 8px 10px; max-width: 280px; font-size: .82rem; line-height: 1.35; box-shadow: 0 8px 22px rgba(26,26,26,.23); opacity: 0; transition: opacity .12s; }
.tip.on { opacity: 1; }
.tip b { display: block; font-family: var(--f-display); font-weight: 600; font-size: 1.05rem; }
.tip span { color: var(--muted); }
.empty { padding: 48px 16px; text-align: center; color: var(--muted); font-family: var(--f-display); font-size: 1.3rem; }

.list { display: grid; gap: 8px; }
.row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; background: rgba(26,26,26,.035); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: inherit; }
.row:hover { border-color: rgba(242,165,160,.5); }
.row .mini { width: 34px; height: 52px; border-radius: 2px; background: var(--c); box-shadow: inset 4px 0 0 rgba(26,26,26,.11); }
.row .ti { font-family: var(--f-display); font-size: 1.25rem; line-height: 1.15; }
.row .au { color: var(--muted); font-size: .9rem; }
.row .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.row .num { text-align: right; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row .num b { display: block; color: var(--fg); font-size: 1rem; font-weight: 500; }

/* ---------- book page ---------- */
.book-top { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 28px; align-items: start; margin: 12px 0 24px; }
.cover { aspect-ratio: 2 / 3; width: 100%; max-width: 240px; border-radius: 4px 8px 8px 4px; background: linear-gradient(90deg, rgba(26,26,26,.16), rgba(26,26,26,.08) 7%, rgba(26,26,26,.04)), var(--c); color: var(--t); display: grid; place-items: center; text-align: center; padding: 24px; box-shadow: 0 20px 40px rgba(26,26,26,.23); }
.cover span { font-family: var(--f-display); font-size: 1.6rem; line-height: 1.1; border: 1.5px solid currentColor; outline: 1px solid currentColor; outline-offset: 5px; padding: 18px 12px; text-wrap: balance; overflow-wrap: anywhere; }
.book-top h1 { margin-top: 0; }
.by { font-family: var(--f-display); font-style: italic; font-size: 1.35rem; color: var(--muted); margin: 0 0 12px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 12px 0; color: var(--muted); }
.stars { color: var(--brass); letter-spacing: 2px; }
.book-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.book-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; min-width: 0; }
.aside { display: grid; gap: 16px; position: sticky; top: 16px; }
.cw-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cw-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.cw-list .lvl { color: var(--warn); font-size: .82rem; white-space: nowrap; }

.paper { background: var(--paper); color: var(--ink); border-radius: 6px; padding: 22px 24px 22px 56px; position: relative;
  background-image: linear-gradient(to right, transparent 0 40px, rgba(242,165,160, .45) 40px 41px, transparent 41px); }
.paper h2 { font-family: var(--f-display); font-weight: 600; font-size: 1.7rem; margin: 0 0 12px; color: var(--ink); }
.entry { padding: 14px 0; border-bottom: 1px solid rgba(80,110,160,.2); }
.entry:last-child { border-bottom: 0; }
.entry .who { font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--pencil); display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.entry .who b { color: var(--ink-soft); font-weight: 600; }
.entry .body { font-family: var(--f-hand); font-size: 1.45rem; line-height: 1.35; margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.entry .tags { display: flex; flex-wrap: wrap; gap: 4px; }
.entry .tag { background: rgba(242,165,160,.08); border-color: rgba(242,165,160,.25); color: var(--violet); }
.entry .acts { display: flex; gap: 12px; margin-top: 6px; }
.entry .acts button { cursor: pointer; background: none; border: 0; padding: 0; color: var(--pencil); font-size: .8rem; text-decoration: underline; }
.spoiler .body { filter: blur(6px); cursor: pointer; user-select: none; }
.spoiler-note { font-size: .8rem; color: #8a3e63; }
.social .entry .body { font-size: 1.3rem; color: #3a2f45; }
.paper .muted { color: var(--pencil); }

/* reading-notes form */
.form { display: grid; gap: 18px; }
.form .q { display: grid; gap: 8px; }
.form .q > .label { font-size: .82rem; }
.form .q h3 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 1.3rem; }
.stars-in { display: inline-flex; gap: 2px; }
.stars-in button { cursor: pointer; background: none; border: 0; font-size: 1.6rem; line-height: 1; color: rgba(26,26,26,.25); padding: 2px; }
.stars-in button.on { color: var(--brass); }
.cw-pick { display: grid; gap: 6px; }
.cw-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 6px 10px; border-radius: 8px; background: rgba(255,178,122,.08); }
.cw-row .seg button { padding: 4px 10px; font-size: .82rem; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { margin-top: 4px; accent-color: var(--brass); width: 18px; height: 18px; flex: none; }
.filter-in { max-width: 320px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- cover colors ---------- */
.cover-col { display: grid; gap: 12px; max-width: 240px; }
.cover { transition: background-color .4s ease, color .4s ease, outline-color .2s; }
.cover span { border-color: var(--band, currentColor); outline-color: var(--band, currentColor); }
.cover.over { outline: 3px dashed var(--brass); outline-offset: 6px; }
.cover-pick { display: grid; gap: 8px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches button { width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(26,26,26,.25); cursor: pointer; }
.swatches button[aria-checked="true"] { border-color: var(--fg); box-shadow: 0 0 0 3px var(--brass); }

/* ---------- filter bar ---------- */
.fbar-wrap { position: relative; margin: 2px 0 14px; }
.fbar { display: flex; align-items: stretch; gap: 2px; overflow-x: auto; scrollbar-width: thin;
  background: var(--panel); border: 1px solid var(--line); border-top: 3px solid #E8837C; border-radius: 0 0 var(--radius) var(--radius); padding: 0 6px; }
.fb-item, .fb-link { flex: none; cursor: pointer; background: none; border: 0; color: var(--fg); padding: 12px 12px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: .95rem; border-bottom: 2px solid transparent; }
.fb-item:hover, .fb-link:hover { border-bottom-color: rgba(239,118,39,.6); }
.fb-item[aria-expanded="true"] { border-bottom-color: #E8837C; color: #8F4410; }
.fb-link[aria-pressed="true"] { color: #8F4410; border-bottom-color: #E8837C; font-weight: 600; }
.fb-all { color: #8F4410; font-family: var(--f-display); font-size: 1.2rem; font-style: italic; padding-right: 16px; }
.fb-caret { font-size: .7rem; opacity: .7; }
.fb-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #E8837C; color: #1A1A1A; font-size: .75rem; font-weight: 700; display: inline-grid; place-items: center; }
.fb-sep { flex: none; width: 1px; margin: 10px 6px; background: var(--line); }
.fb-panel { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; display: grid; gap: 10px; padding: 16px 18px;
  background: var(--panel-2); border: 1px solid rgba(239,118,39,.45); border-radius: var(--radius); box-shadow: 0 24px 48px rgba(26,26,26,.25); max-height: min(70vh, 520px); overflow: auto; }
.fb-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fb-panel-head b { font-family: var(--f-display); font-weight: 600; font-size: 1.5rem; }
.fb-hint { margin: 0; color: var(--muted); font-size: .88rem; }
.lib-tags { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.lib-tags summary { cursor: pointer; color: var(--brass); font-size: .88rem; }
.lib-tags .inner { display: grid; gap: 8px; margin-top: 10px; }

/* ---------- trophies ---------- */
.trophies { margin: 4px 0 22px; }
.trophy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.trophy-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px 16px; border-radius: var(--radius);
  background: radial-gradient(120% 90% at 0% 0%, rgba(242,165,160,.14), transparent 60%), var(--panel); border: 1px solid var(--line); }
.trophy-card.locked { background: var(--panel); }
.trophy-art { display: inline-block; line-height: 0; filter: drop-shadow(0 6px 10px rgba(26,26,26,.16)); }
.trophy-card:not(.locked) .trophy-art svg { animation: trophy-bob 3.2s ease-in-out infinite; }
@keyframes trophy-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.trophy-text { display: grid; gap: 4px; min-width: 0; }
.trophy-text b { font-family: var(--f-display); font-weight: 600; font-size: 1.35rem; line-height: 1.1; }
.tier { font-size: .82rem; font-weight: 600; letter-spacing: .04em; }
.tier.bronze { color: #8F4F1C; } .tier.silver { color: #5E6670; } .tier.gold { color: #8A6200; } .tier.none { color: var(--muted); font-weight: 400; }
.meter { display: block; height: 6px; border-radius: 3px; background: rgba(26,26,26,.08); overflow: hidden; margin-top: 2px; }
.meter i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--brass), #8A6200); }
.ladder { margin-top: 4px; }
.ladder summary { cursor: pointer; font-size: .82rem; color: var(--brass); }
.ladder-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px 4px; margin-top: 8px; }
.ladder-step { display: grid; justify-items: center; gap: 2px; font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; opacity: .55; }
.ladder-step.got { opacity: 1; color: var(--fg); }
.trophy-pop { position: fixed; left: 50%; top: 50%; z-index: 70; transform: translate(-50%, -40%) scale(.85); opacity: 0; transition: transform .35s cubic-bezier(.2,1.4,.4,1), opacity .25s;
  display: grid; justify-items: center; gap: 6px; padding: 24px 30px; border-radius: 18px; text-align: center;
  background: radial-gradient(circle at 50% 30%, rgba(247,207,85,.25), transparent 65%), var(--panel-2); border: 1px solid rgba(242,165,160,.6); box-shadow: 0 30px 60px rgba(26,26,26,.27); cursor: pointer; }
.trophy-pop.go { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.trophy-pop b { font-family: var(--f-display); font-weight: 600; font-size: 1.8rem; }
@media (prefers-reduced-motion: reduce) { .trophy-card .trophy-art svg { animation: none !important; } .trophy-pop { transition: none; } }

/* ---------- cover images ---------- */
.cover.has-img { padding: 0; overflow: hidden; background: var(--c); }
.cover-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.row .mini-img { width: 34px; height: 52px; object-fit: cover; border-radius: 2px; box-shadow: 0 2px 6px rgba(26,26,26,.18); }
.cover-queue { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.cover-card { display: grid; gap: 10px; align-content: start; }
.cover-card img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; background: rgba(26,26,26,.05); }

/* ---------- shelves & profiles ---------- */
.shelf-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 4px 0 14px; }
.shelf-ctl .seg button { padding: 6px 12px; font-size: .88rem; }
.who-link { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
.who-link:hover b { color: var(--violet); }
.profile-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; margin: 14px 0 18px; }
.avatar { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-display); font-size: 2.4rem; color: #fff; background: radial-gradient(circle at 30% 25%, rgba(26,26,26,.25), transparent 55%), var(--c); box-shadow: 0 0 0 3px var(--brass); }
.bio { margin: 8px 0 0; max-width: 60ch; }
.tabs .n { opacity: .7; font-variant-numeric: tabular-nums; }
.cw-mini { margin-top: 12px; font-size: .9rem; color: var(--ink-soft); }
.cw-mini summary { cursor: pointer; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--pencil); }

/* ---------- admin & account ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 18px; }
.tabs button { cursor: pointer; border: 1px solid var(--line); background: none; border-radius: 999px; padding: 7px 14px; }
.tabs button[aria-selected="true"] { background: var(--blush); color: var(--brass-ink); border-color: var(--brass); }
.tabs .badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--rose); color: #fff; font-size: .75rem; }
.queue { display: grid; gap: 14px; }
.qitem { display: grid; gap: 12px; }
.qgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.status { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; }
.status.pending { color: var(--warn); } .status.approved { color: var(--ok); } .status.rejected { color: var(--bad); }
.drop { border: 1.5px dashed rgba(242,165,160,.5); border-radius: 10px; padding: 22px 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; text-align: center; }
.drop.over { background: rgba(242,165,160,.12); border-color: var(--brass); }
.report-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: .9rem; color: var(--muted); }
.report-list b { color: var(--fg); font-weight: 500; }
.progress { height: 6px; border-radius: 3px; background: rgba(26,26,26,.08); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--blush); transition: width .2s; }

/* ---------- sign in dialog, toast, ads ---------- */
dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--fg); padding: 0; width: min(420px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(10, 6, 12, .7); backdrop-filter: blur(3px); }
.signin { display: grid; gap: 12px; padding: 26px; position: relative; }
.signin h2 { font-family: var(--f-display); font-weight: 600; font-size: 1.8rem; margin: 0; }
.signin p { margin: 0; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.close-x { position: absolute; top: 10px; right: 10px; cursor: pointer; background: none; border: 0; color: var(--muted); font-size: 1.1rem; width: 36px; height: 36px; border-radius: 50%; }
.close-x:hover { background: rgba(26,26,26,.08); }
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px); background: #1A1A1A; color: #FBF7F2; border: 1px solid rgba(242,165,160,.5); border-radius: 999px; padding: 10px 18px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100% - 32px); }
.toast.on { opacity: 1; transform: translateX(-50%); }
.ad-slot { display: grid; place-items: center; min-height: 100px; margin: 20px 0; }
.ad-slot::before { content: "Advertisement"; display: block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.setup { max-width: 640px; margin: 40px auto; }
.setup code { background: rgba(26,26,26,.08); padding: 1px 6px; border-radius: 4px; }

@media (max-width: 860px) {
  .book-grid { grid-template-columns: minmax(0, 1fr); }
  .aside { position: static; }
}
@media (max-width: 620px) {
  :root { --slot-h: 190px; }
  .book-top { grid-template-columns: 1fr; }
  .profile-head { grid-template-columns: 1fr; }
  .avatar { width: 60px; height: 60px; font-size: 1.9rem; }
  .cover { max-width: 180px; }
  .cover-col { max-width: 100%; }
  .row { grid-template-columns: 34px minmax(0, 1fr); }
  .row .num { grid-column: 2; text-align: left; }
  .row .num b { display: inline; margin-right: 6px; }
  .paper { padding: 18px 16px 18px 46px; background-image: linear-gradient(to right, transparent 0 32px, rgba(242,165,160, .45) 32px 33px, transparent 33px); }
}
@media (prefers-reduced-motion: reduce) {
  .spine, .toast, .tip { transition: none; }
}

/* ---------- folding boxes (tropes, representation, warnings) ---------- */
.fold { padding: 0; }
.fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: var(--radius); }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--brass); border-bottom: 2px solid var(--brass); transform: rotate(45deg) translateY(-2px); transition: transform .15s; flex: none; }
.fold[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.fold > summary:hover { background: rgba(26,26,26,.03); }
.fold-t { font-family: var(--f-display); font-size: 1.35rem; line-height: 1.2; }
.fold-n { font-size: .78rem; color: var(--brass-ink); background: var(--blush); border-radius: 999px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.fold-n:empty { display: none; }
.fold-body { padding: 0 18px 16px; display: grid; gap: 8px; }
.paper.fold { padding: 0 0 0 40px; }
.paper.fold > summary { color: var(--ink); padding: 18px 20px 18px 16px; }
.paper.fold > summary:hover { background: rgba(26,26,26,.01); }
.paper.fold .fold-body { padding: 0 24px 18px 16px; }
.paper.fold .fold-n { background: rgba(242,165,160,.14); color: var(--violet); }
.paper.fold > summary::after { border-color: var(--violet); }
/* inside the notes form */
.form .fold-q { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(26,26,26,.025); gap: 0; }
.form .fold-q > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.form .fold-q > summary::-webkit-details-marker { display: none; }
.form .fold-q > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--brass); border-bottom: 2px solid var(--brass); transform: rotate(45deg) translateY(-2px); transition: transform .15s; flex: none; }
.form .fold-q[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.form .fold-q .fold-t { font-size: 1.2rem; }
.form .fold-q .fold-body { padding: 0 14px 14px; }
.fold-n.ask { background: transparent; color: var(--warn); border: 1px solid rgba(255,178,122,.5); }
.rep-grp { display: grid; gap: 6px; }
.rep-grp + .rep-grp { margin-top: 10px; }
.grp-label { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fb-panel .grp-label { color: var(--brass); }
.rep-sections { display: grid; }

/* ---------- about this book ---------- */
.about { display: grid; gap: 6px; margin: 4px 0 16px; max-width: 64ch; }
.about-text { margin: 0; color: var(--fg); opacity: .92; white-space: pre-wrap; line-height: 1.6; }
.about-text.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.about .linkbtn { justify-self: start; font-size: .88rem; }
.about-edit { color: var(--muted) !important; }
.about-form { gap: 12px; }
.about-form textarea { min-height: 12rem; }
.qgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }

/* ---------- discussion ---------- */
.talk-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 8px; }
.talk-head h2 { margin: 0; }
.talk-tabs { margin: 4px 0 8px; border-color: rgba(43,34,54,.2); }
.talk-tabs button { color: var(--ink-soft); padding: 6px 12px; font-size: .88rem; }
.talk-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.thread { padding: 4px 0 10px; border-bottom: 1px solid rgba(80,110,160,.2); }
.thread:last-child { border-bottom: 0; }
.thread > .entry { border-bottom: 0; padding-bottom: 6px; }
.entry .kind { background: rgba(242,165,160,.14); color: #8a3e63; border-radius: 999px; padding: 0 8px; letter-spacing: .06em; }
.topic-t { font-family: var(--f-display); font-weight: 600; font-size: 1.45rem; line-height: 1.2; margin: 6px 0 0; color: var(--ink); }
.replies { margin: 0 0 4px 18px; padding-left: 16px; border-left: 2px solid rgba(242,165,160,.35); display: grid; }
.entry.reply { padding: 8px 0; border-bottom: 1px dashed rgba(80,110,160,.18); }
.entry.reply:last-child { border-bottom: 0; }
.entry.reply .body { font-size: 1.3rem; margin: 2px 0; }
.replies .more { justify-self: start; color: var(--violet); font-size: .85rem; margin: 6px 0; }
.reply-bar { margin-left: 18px; padding-left: 18px; }
.reply-btn { cursor: pointer; background: none; border: 1px solid rgba(43,34,54,.2); border-radius: 999px; padding: 3px 12px; color: var(--ink-soft); font-size: .82rem; }
.reply-btn:hover { border-color: var(--violet); color: var(--violet); }
.composer { display: grid; gap: 8px; margin: 8px 0; padding: 12px; background: rgba(26,26,26,.55); border: 1px solid rgba(43,34,54,.15); border-radius: 8px; }
.composer.topic { margin: 8px 0 14px; }
.composer textarea, .composer input[type=text] { background: #fffaf2; color: var(--ink); border-color: rgba(43,34,54,.25); }
.composer textarea { min-height: 5rem; font-family: var(--f-hand); font-size: 1.3rem; line-height: 1.3; }
.composer .label { color: var(--ink-soft); }
.composer .check { color: var(--ink-soft); }
.composer .btn:not(.primary) { color: var(--ink); border-color: rgba(43,34,54,.3); }
.composer .err { color: #a33; }

/* ---------- covers dropped on spines ---------- */
.spine.drop-on { outline: 3px dashed var(--brass); outline-offset: 3px; transform: translateY(-10px); z-index: 3; }
.spine.saving { animation: spine-wait 1s ease-in-out infinite; }
@keyframes spine-wait { 50% { opacity: .55; } }
.drop-hint { margin-left: auto; font-size: .82rem; color: var(--muted); }
.cover-link-row { display: flex; gap: 6px; }
.cover-link-row input { flex: 1 1 auto; min-width: 0; padding: 6px 10px; font-size: .85rem; }
@media (prefers-reduced-motion: reduce) { .spine.saving { animation: none; opacity: .6; } }
@media (max-width: 620px) {
  .replies { margin-left: 4px; padding-left: 12px; }
  .reply-bar { margin-left: 4px; padding-left: 14px; }
  .drop-hint { display: none; }
}

/* ---------- where to buy ---------- */
.by-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 12px; }
.by-row .by { margin: 0; }
.buy { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.buy-ico { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px 0 8px; border-radius: 999px; border: 1px solid var(--line); background: rgba(26,26,26,.05); color: var(--fg); text-decoration: none; font-size: .78rem; font-weight: 500; letter-spacing: .02em; transition: border-color .15s, background .15s, color .15s; }
.buy-ico:hover, .buy-ico:focus-visible { border-color: var(--brass); color: var(--brass); background: rgba(242,165,160,.08); }
.buy-svg { display: inline-flex; width: 16px; height: 16px; }
.buy-svg svg { width: 100%; height: 100%; }
.buy-ico.amazon .buy-svg { color: #8F4410; }
.buy-ico.kindle .buy-svg { color: #2F5F9E; }
.buy-ico.bn .buy-svg { color: #1E7143; }
.buy-fields { border: 1px dashed var(--line); border-radius: var(--radius); padding: 10px 14px 14px; margin: 0; display: grid; gap: 10px; }
.buy-fields legend { padding: 0 6px; }
.aff-note { font-size: .78rem; opacity: .85; }
@media (max-width: 420px) { .buy-l { display: none; } .buy-ico { padding: 0 8px; } }

/* ---------- reader roles ---------- */
.roles { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.role { font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; border-radius: 999px; padding: 2px 9px; border: 1px solid var(--line); background: rgba(26,26,26,.06); color: var(--fg); font-weight: 600; }
.role-author { border-color: rgba(242,165,160,.6); color: var(--brass); }
.role-editor { border-color: rgba(156,199,255,.5); color: #2F5F9E; }
.role-narrator { border-color: rgba(242,165,160,.5); color: #8F2F29; }
.role-beta-reader { border-color: rgba(155,227,181,.5); color: var(--ok); }
.role-arc-reader { border-color: rgba(255,178,122,.5); color: var(--warn); }
.roles.tiny { margin: 0; gap: 3px; }
.roles.tiny .role { font-size: .62rem; padding: 0 6px; }
/* badges on paper (book pages) */
.paper .role { background: rgba(43,34,54,.06); border-color: rgba(43,34,54,.2); color: var(--ink-soft); }
.paper .role-author { color: #8a5a1c; border-color: rgba(138,90,28,.4); }
.paper .role-editor { color: #2f5f9e; border-color: rgba(47,95,158,.35); }
.paper .role-narrator { color: #8a3e63; border-color: rgba(138,62,99,.35); }
.paper .role-beta-reader { color: #2f7a4e; border-color: rgba(47,122,78,.35); }
.paper .role-arc-reader { color: #a5531f; border-color: rgba(165,83,31,.35); }

/* ---------- book club ---------- */
.club-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: -4px 0 14px; font-size: .92rem; }
.club-line:empty { display: none; }
.club-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(155,227,181,.18); }
.club-pop { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--fg); padding: 0; width: min(92vw, 480px); box-shadow: 0 30px 60px rgba(26,26,26,.25); }
.club-pop::backdrop { background: rgba(15,8,18,.65); }
.club-pop-in { display: grid; grid-template-columns: 64px 1fr; gap: 18px; padding: 22px; }
.club-pop h2 { font-family: var(--f-display); font-weight: 600; font-size: 1.6rem; line-height: 1.15; margin: 2px 0 8px; text-wrap: balance; }
.club-pop p { margin: 0 0 10px; }
.eyebrow { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ok); margin: 0 !important; }
.club-spine { height: 170px; border-radius: 3px 5px 5px 3px; background: linear-gradient(90deg, rgba(26,26,26,.16), rgba(26,26,26,.08) 12%, rgba(26,26,26,.05)), var(--c); color: var(--t); display: flex; align-items: center; justify-content: center; padding: 10px 0; box-shadow: 0 10px 20px rgba(26,26,26,.18); border-top: 3px solid var(--band); border-bottom: 3px solid var(--band); transform: rotate(-4deg); }
.club-spine span { writing-mode: vertical-rl; font-family: var(--f-display); font-size: .95rem; overflow: hidden; max-height: 100%; }
@media (max-width: 420px) { .club-pop-in { grid-template-columns: 1fr; } .club-spine { display: none; } }

/* ---------- messages ---------- */
.nav-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: var(--rose); color: #fff; font-size: .7rem; font-weight: 700; line-height: 1; vertical-align: 1px; }
.chat { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 16px; height: calc(100dvh - 170px); min-height: 460px; }
.chat-list { overflow: auto; padding-right: 4px; }
.chat-h { margin: 0 0 8px; }
.chat-sec { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 18px 0 6px; font-weight: 600; }
.chat-items { display: grid; gap: 2px; }
.chat-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--fg); text-decoration: none; }
.chat-item:hover { background: rgba(26,26,26,.04); }
.chat-item.on { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--brass); }
.ci-main { display: grid; min-width: 0; }
.ci-t { font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-s { font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-spine { width: 14px; height: 38px; border-radius: 2px; background: var(--c); border-top: 2px solid var(--band); border-bottom: 2px solid var(--band); }
.ci-av, .avatar.sm { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 700; font-size: .9rem; }
.chat-empty { margin: 4px 10px; }
.chat-pane { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-head > div { flex: 1 1 auto; min-width: 0; }
.chat-title { font-family: var(--f-display); font-size: 1.35rem; color: var(--fg); text-decoration: none; }
a.chat-title:hover { color: var(--brass); }
.chat-back { display: none; color: var(--brass); font-size: .9rem; white-space: nowrap; }
.chat-blank { margin: auto; padding: 24px; text-align: center; max-width: 42ch; }
.chat-feed { flex: 1 1 auto; overflow: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.chat-hello { margin: auto; text-align: center; max-width: 40ch; }
.day { align-self: center; font-size: .72rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin: 10px 0 4px; }
.bubble-row { display: flex; }
.bubble-row.mine { justify-content: flex-end; }
.bubble { max-width: min(78%, 560px); background: var(--panel-2); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 8px 12px 6px; }
.bubble-row.mine .bubble { background: var(--blush); color: var(--brass-ink); border-color: var(--brass); border-radius: 16px 16px 4px 16px; }
.b-who { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .78rem; font-weight: 600; margin-bottom: 2px; }
.b-who a { color: var(--brass); text-decoration: none; }
.b-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
.b-meta { display: flex; gap: 10px; justify-content: flex-end; font-size: .7rem; opacity: .7; margin-top: 2px; }
.b-acts { display: inline-flex; gap: 8px; opacity: 0; transition: opacity .15s; }
.bubble:hover .b-acts, .bubble:focus-within .b-acts { opacity: 1; }
.b-acts button { cursor: pointer; background: none; border: 0; padding: 0; color: inherit; font-size: inherit; text-decoration: underline; }
@media (hover: none) { .b-acts { opacity: 1; } }
.chat-compose { border-top: 1px solid var(--line); padding: 10px 12px; display: grid; gap: 4px; }
.chat-compose-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-in { flex: 1 1 auto; min-height: 42px !important; max-height: 160px; resize: none; padding: 10px 12px; border-radius: 20px; line-height: 1.35; }
@media (max-width: 760px) {
  .chat { grid-template-columns: 1fr; height: calc(100dvh - 150px); }
  .chat.has-open .chat-list { display: none; }
  .chat:not(.has-open) .chat-pane { display: none; }
  .chat-back { display: inline; }
  .bubble { max-width: 88%; }
}

/* ---------- librarian tools ---------- */
.lib-tools { border-color: rgba(242,165,160,.35); }
.lib-tools > summary .fold-t::before { content: "✦ "; color: var(--brass); }
.lib-sec { border-top: 1px dashed var(--line); padding-top: 8px; }
.lib-sec > summary { cursor: pointer; color: var(--brass); font-size: .9rem; font-weight: 500; }
.lib-sec .inner { display: grid; gap: 8px; margin-top: 8px; }
.lib-sec .chips { max-height: 260px; overflow: auto; padding: 2px; }
.lib-tools .cw-row { font-size: .85rem; }

/* ---------- admin: tag lists ---------- */
.tag-panel { display: grid; gap: 14px; }
.tag-add { display: grid; gap: 6px; }
.tag-add-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-add-row input { flex: 1 1 16rem; min-width: 0; }
.tag-add-row select, .tag-row select { width: auto; }
.tag-rows { display: grid; gap: 6px; }
.tag-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto auto; gap: 8px; align-items: center; }
.tag-row:not(:has(select)) { grid-template-columns: minmax(0, 1fr) auto auto auto; }
.tag-row input { padding: 7px 10px; }
.tag-n { white-space: nowrap; min-width: 5.5rem; text-align: right; }
@media (max-width: 620px) {
  .tag-row, .tag-row:not(:has(select)) { grid-template-columns: 1fr auto auto; }
  .tag-row input, .tag-row select { grid-column: 1 / -1; }
  .tag-n { text-align: left; }
}

/* ---------- anonymous comments ---------- */
.anon-entry .who b { font-style: italic; }
.mine-note { font-size: .78rem; color: var(--pencil); font-style: italic; }
.composer.anon { border-style: dashed; }
.talk-head .btn:not(.primary) { color: var(--ink); border-color: rgba(43,34,54,.3); background: rgba(26,26,26,.4); }
.talk-head .btn:not(.primary):hover { border-color: var(--violet); color: var(--violet); }

/* ---------- spice ---------- */
.flames { display: inline-flex; gap: 1px; line-height: 1; vertical-align: -1px; }
.flames .off { filter: grayscale(1); opacity: .28; }
.flames.small { font-size: .8rem; }
.nospice { font-size: .78rem; color: var(--muted); }
.paper .nospice { color: var(--pencil); }
.spice-fact { display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none; }
.spice-fact:hover { color: var(--brass); }
.fires-in { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.fires-in > button:not(.chip) { cursor: pointer; background: none; border: 0; font-size: 1.5rem; line-height: 1; padding: 2px; filter: grayscale(1); opacity: .35; transition: filter .12s, opacity .12s, transform .12s; }
.fires-in > button:not(.chip):hover { opacity: .7; transform: translateY(-2px); }
.fires-in > button.on { filter: none; opacity: 1; }
.nospice-chip { margin-left: 8px; }
.fires-say { margin-left: 6px; }
.spice-chip { white-space: nowrap; }

/* ---------- suspected AI & Banned Books ---------- */
.ai-vote { display: grid; gap: 8px; }
.ai-vote .meter { height: 6px; border-radius: 3px; background: rgba(26,26,26,.08); overflow: hidden; }
.ai-vote .meter i { display: block; height: 100%; background: linear-gradient(90deg, #2F5F9E, var(--rose)); }
.ai-box > summary .fold-t::before { content: "🤖 "; }
.banned-note { margin: 6px 0 10px; padding: 8px 12px; border-radius: 8px; background: rgba(255,138,128,.1); border: 1px solid rgba(255,138,128,.35); color: var(--fg); font-size: .9rem; max-width: 64ch; }
.fb-banned { color: var(--bad) !important; }

/* ---------- tag picker (librarian) ---------- */
.tag-picker { display: grid; gap: 6px; }
.picker-row { display: flex; gap: 6px; }
.picker-row input { flex: 1 1 auto; min-width: 0; }
.picker-row select { width: auto; max-width: 48%; font-size: .82rem; padding: 6px 28px 6px 8px; }
.picker-hint:empty { display: none; }
.picker-hint { color: var(--brass); }

/* ---------- librarian badge, librarian's note, authors ---------- */
.role-librarian { border-color: rgba(242,165,160,.7); color: var(--brass-ink) !important; background: var(--blush) !important; }
.lib-note-wrap { margin: 0 0 12px; max-width: 64ch; display: grid; gap: 4px; }
.lib-note-wrap:empty { display: none; }
.lib-note { position: relative; background: var(--paper); color: var(--ink); border-radius: 4px 10px 10px 4px; padding: 12px 16px 10px; box-shadow: inset 4px 0 0 var(--brass), 0 8px 18px rgba(26,26,26,.11); }
.lib-note-h { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #8a5a1c; font-weight: 700; margin-bottom: 4px; }
.lib-note p { margin: 0; font-family: var(--f-hand); font-size: 1.35rem; line-height: 1.3; white-space: pre-wrap; overflow-wrap: anywhere; }
.lib-note-by { font-size: .8rem; color: var(--pencil); margin-top: 4px; }
.lib-note-by a { color: #8a5a1c; }
.lib-note.editing { display: grid; gap: 8px; }
.lib-note.editing textarea { background: #fffaf2; color: var(--ink); border-color: rgba(43,34,54,.25); font-family: var(--f-hand); font-size: 1.25rem; }
.lib-note.editing .btn:not(.primary):not(.danger) { color: var(--ink); border-color: rgba(43,34,54,.3); }
.lib-note-edit { justify-self: start; font-size: .85rem; color: var(--muted) !important; }
.author-here { margin: -6px 0 12px; font-size: .9rem; color: var(--muted); }
.author-here a { color: var(--brass); }
.author-tools { margin: 0 0 12px; border: 1px dashed rgba(242,165,160,.5); border-radius: var(--radius); padding: 8px 12px; max-width: 64ch; }
.author-tools summary { cursor: pointer; color: var(--brass); font-size: .9rem; }
.author-tools .inner { display: grid; gap: 8px; margin-top: 8px; }
.author-tools input[type=date] { width: auto; }
.author-claim { border: 1px dashed var(--line); border-radius: var(--radius); padding: 10px 12px; }
.qitem .author-claim { border-color: rgba(242,165,160,.45); }

/* ---------- coming soon ---------- */
.soon-banner { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; padding: 6px 12px 6px 6px; border-radius: 999px; background: linear-gradient(90deg, rgba(242,165,160,.22), rgba(239,118,39,.18)); border: 1px solid rgba(242,165,160,.45); font-size: .9rem; }
.soon-pill { background: var(--rose); color: #fff; font-weight: 700; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.slot { position: relative; }
.soon-tag { position: absolute; top: -6px; left: 50%; transform: translateX(-50%) rotate(-6deg); background: var(--rose); color: #fff; font-size: .58rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 2px 6px; border-radius: 3px; box-shadow: 0 2px 6px rgba(26,26,26,.18); pointer-events: none; z-index: 3; }
.spine.soon { filter: saturate(.85); }
.tag.soon-tag-l { border-color: rgba(242,165,160,.6); color: var(--rose); }

/* ---------- slim ad banners ---------- */
.ad-slot.ad-banner { min-height: 0; margin: 28px 0 8px; display: block; width: 100%; place-items: normal; justify-items: normal; }
.ad-slot.ad-banner::before { display: none; }
.ad-slot.ad-code { display: grid; place-items: center; }
.ad-slot.ad-code::before { content: "Sponsored"; display: block; font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
main > .ad-slot.ad-banner:first-child { margin: 0 0 18px; }
.house-ad { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(26,26,26,.025); opacity: .92; transition: opacity .15s, border-color .15s; }
.house-ad:hover { opacity: 1; border-color: rgba(242,165,160,.4); }
.house-ad.img { display: block; padding: 0; overflow: hidden; }
.house-ad.img img { display: block; width: 100%; max-height: 120px; object-fit: cover; }
.ha-tag { font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); writing-mode: vertical-rl; transform: rotate(180deg); }
.ha-spine { width: 12px; height: 44px; border-radius: 2px; background: var(--c); border-top: 2px solid var(--band); border-bottom: 2px solid var(--band); }
.ha-main { display: grid; min-width: 0; }
.ha-t { font-family: var(--f-display); font-size: 1.15rem; color: var(--fg); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.ha-t:hover { color: var(--brass); }
.ha-s { font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) {
  .house-ad { grid-template-columns: auto minmax(0, 1fr); }
  .ha-tag { writing-mode: horizontal-tb; transform: none; grid-column: 1 / -1; }
  .ha-go { grid-column: 1 / -1; justify-self: start; }
}

/* notes open once a book is on your Read shelf */
.notes-gate { display: grid; gap: 10px; justify-items: start; }
.notes-gate h2 { margin: 0; }

/* ---------- authors and series ---------- */
.by a.author-link { color: inherit; text-decoration: underline; text-decoration-color: rgba(242,165,160,.5); text-underline-offset: 3px; }
.by a.author-link:hover { color: var(--brass); }
.series-fields input[type=number] { width: 7rem; }
.series-strip { margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(26,26,26,.03); max-width: 64ch; display: grid; gap: 10px; }
.series-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; font-family: var(--f-display); font-size: 1.15rem; }
.series-h a { color: var(--brass); }
.series-books { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.sb { flex: none; width: 84px; display: grid; gap: 3px; text-decoration: none; color: var(--fg); }
.sb-cover { aspect-ratio: 2 / 3; width: 100%; border-radius: 2px 4px 4px 2px; background: linear-gradient(90deg, rgba(26,26,26,.16), rgba(26,26,26,.08) 8%, rgba(26,26,26,.04)), var(--c); color: var(--t); display: grid; place-items: center; overflow: hidden; padding: 6px; font-family: var(--f-display); font-size: .7rem; line-height: 1.1; text-align: center; box-shadow: 0 6px 12px rgba(26,26,26,.16); transition: transform .15s; }
.sb-cover.has-img { padding: 0; }
.sb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
a.sb:hover .sb-cover { transform: translateY(-3px); }
.sb.here .sb-cover { outline: 2px solid var(--brass); outline-offset: 2px; }
.sb-no { font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sb.here .sb-no { color: var(--brass); }
.sb-t { font-size: .78rem; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sb-soon { font-size: .62rem; color: var(--rose); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.series-nav { display: flex; justify-content: space-between; gap: 12px; font-size: .88rem; }
.series-nav a { color: var(--brass); }

/* ---------- home page ---------- */
.home-hero { display: grid; gap: 8px; margin: 10px 0 22px; }
.home-hero h1 { margin: 0; font-size: clamp(2.4rem, 7vw, 3.6rem); }
.home-hero h1::after { content: ""; display: block; width: 72px; height: 3px; margin-top: 10px; background: var(--blush); border-radius: 2px; }
.home-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; margin: 22px 0 8px; }
.home-tile { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--fg); text-decoration: none; transition: border-color .15s, transform .15s, background .15s; }
.home-tile:hover, .home-tile:focus-visible { border-color: var(--brass); transform: translateY(-2px); background: var(--panel-2); }
.ht-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; background: rgba(242,165,160,.12); color: var(--brass); }
.ht-main { display: grid; min-width: 0; }
.ht-t { font-family: var(--f-display); font-size: 1.3rem; line-height: 1.15; display: flex; align-items: center; gap: 4px; }
.ht-s { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .home-tile { transition: none; } .home-tile:hover { transform: none; } }

.botd { display: grid; grid-template-columns: minmax(150px, 230px) minmax(0, 1fr); gap: 28px; align-items: start; padding: 24px; border-radius: 14px; border: 1px solid rgba(242,165,160,.35);
  background: radial-gradient(120% 140% at 0% 0%, rgba(242,165,160,.16), transparent 55%), radial-gradient(120% 140% at 100% 100%, rgba(239,118,39,.12), transparent 50%), var(--panel); }
.botd-cover { display: block; aspect-ratio: 2 / 3; border-radius: 4px 8px 8px 4px; overflow: hidden; box-shadow: 0 22px 40px rgba(26,26,26,.23); transform: rotate(-1.5deg); transition: transform .2s; }
.botd-cover:hover { transform: rotate(0) translateY(-3px); }
.botd-cover .cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.botd-main { display: grid; gap: 10px; min-width: 0; }
.botd-eyebrow { color: var(--brass) !important; }
.botd-t { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.9rem, 4.5vw, 2.7rem); line-height: 1.05; margin: 0; text-wrap: balance; }
.botd-t a { color: var(--fg); text-decoration: none; }
.botd-t a:hover { color: var(--brass); }
.botd .by { margin: 0; }
.botd-blurb { margin: 0; color: var(--fg); opacity: .9; line-height: 1.6; max-width: 62ch; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.botd-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 4px; }
.botd-buy { margin-left: auto; }
@media (max-width: 620px) {
  .botd { grid-template-columns: 1fr; padding: 18px; gap: 18px; }
  .botd-cover { width: min(60%, 200px); justify-self: center; }
  .botd-buy { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .botd-cover { transform: none; transition: none; } }
.botd-why { margin: -4px 0 0; font-size: .9rem; color: var(--rose); font-style: italic; }

/* logo: the shelf mark beside the name */
.logo { display: inline-flex; align-items: flex-end; gap: 10px; }
.logo-mark { width: 40px; height: 38px; flex: none; margin-bottom: -2px; transition: transform .2s; }
.logo:hover .logo-mark { transform: rotate(-4deg) translateY(-1px); }
@media (max-width: 420px) { .logo { font-size: 1.6rem; gap: 8px; } .logo-mark { width: 32px; height: 30px; } }
@media (prefers-reduced-motion: reduce) { .logo-mark { transition: none; } }

/* account: blocked readers and delete account */
.blocked-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.blocked-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line, rgba(26,26,26,.08)); }
.blocked-list li:last-child { border-bottom: 0; }
.danger-zone { border-color: rgba(255,138,128,.35); }
.danger-zone .form { display: grid; gap: 10px; }

/* installed app (Android / home-screen): respect the phone's notch and gesture bar */
@media (display-mode: standalone) {
  body { padding-bottom: env(safe-area-inset-bottom); }
  .site-head { padding-top: calc(18px + env(safe-area-inset-top)); }
}

/* ---------- phones: the menu becomes an app-style tab bar along the bottom ---------- */
.tab-only, .lib-suggest { display: none; }
@media (max-width: 620px) {
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .site-head { padding-block: 12px 10px; }
  .site-nav { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; flex-wrap: nowrap; justify-content: space-around; gap: 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: rgba(251, 247, 242, .96); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
  .site-nav a, .site-nav #signin-btn { flex: 1 1 0; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0 2px;
    border: 0; border-radius: 0; background: none; color: var(--muted); font-size: .7rem; font-weight: 500; line-height: 1.1; white-space: nowrap; box-shadow: none; height: auto; min-height: 0; }
  .site-nav a[hidden] { display: none; }
  .site-nav a::before, .site-nav #signin-btn::before { content: ''; width: 24px; height: 24px; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
  .site-nav a[aria-current="page"] { color: var(--brass); border: 0; }
  .site-nav .tab-only { display: flex; }
  .site-nav [data-nav="submit"], .site-nav [data-nav="admin"] { display: none; }
  .signed-in .site-nav #signin-btn { display: none; }   /* Sign out lives on the Account page */
  .site-nav .nav-badge { position: absolute; top: 0; left: calc(50% + 6px); margin: 0; }
  .site-nav [data-nav="home"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-7 9 7v9a1 1 0 0 1-1 1h-5v-6h-6v6H4a1 1 0 0 1-1-1z'/%3E%3C/svg%3E"); }
  .site-nav [data-nav="library"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h4v16H4zM10 4h4v16h-4zM15.5 5l3.5-1 3 15-3.5 1z'/%3E%3C/svg%3E"); }
  .site-nav [data-nav="community"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.2'/%3E%3Ccircle cx='17' cy='9.5' r='2.5'/%3E%3Cpath d='M3 20c.8-3.6 3.2-5.5 6-5.5s5.2 1.9 6 5.5M15.5 14.6c2.6-.3 4.6 1.4 5.5 4.4'/%3E%3C/svg%3E"); }
  .site-nav [data-nav="reader"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h12v18l-6-4-6 4z'/%3E%3C/svg%3E"); }
  .site-nav [data-nav="messages"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z'/%3E%3C/svg%3E"); }
  .site-nav [data-nav="account"], .site-nav #signin-btn { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1.5-4 4.5-6 8-6s6.5 2 8 6'/%3E%3C/svg%3E"); }
  .lib-suggest { display: inline-flex; }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* ---------- Your Book of the Day note ---------- */
.botd-note { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }

/* ---------- reading preferences, favorites on profiles ---------- */
.prefs { display: grid; gap: 14px; }
.prefs .chips { max-height: 220px; overflow-y: auto; padding: 2px; }
.fav-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.fav-line .label { margin-right: 2px; }
.avail { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: rgba(155,227,181,.14); color: var(--ok); border: 1px solid rgba(155,227,181,.35); }
.avail::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- ARC reads ---------- */
.arc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.arc-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; padding: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.arc-cover { display: block; }
.arc-cover .cover-img { width: 96px; height: auto; border-radius: 3px 6px 6px 3px; box-shadow: 0 10px 18px rgba(26,26,26,.18); }
.arc-main { display: grid; gap: 6px; align-content: start; min-width: 0; }
.arc-t { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 1.5rem; line-height: 1.1; }
.arc-t a { color: var(--fg); text-decoration: none; }
.arc-note { margin: 0; padding: 8px 12px; border-radius: 8px; background: var(--panel-2); font-size: .9rem; }
.arc-ask { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.arc-ask input { flex: 1 1 220px; min-width: 0; }
.arc-state { font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); }
.arc-state.pending { color: var(--warn); border-color: rgba(255,178,122,.4); }
.arc-state.sent { color: var(--ok); border-color: rgba(155,227,181,.4); }
.arc-state.declined { color: var(--muted); }

/* ---------- Author studio ---------- */
.studio-sec { display: grid; gap: 10px; margin-top: 26px; }
.studio-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.studio-book { display: grid; gap: 10px; align-content: start; }
.sb-t { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 1.4rem; }
.sb-t a { color: var(--fg); text-decoration: none; }
.studio-tools { align-items: end; }
.studio-tools .field { margin: 0; }
.req-list, .team-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.req-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.team-list { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.team-card { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.tc-main { display: grid; gap: 6px; min-width: 0; }
.tc-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tc-name { font-weight: 600; color: var(--fg); text-decoration: none; }
.tc-name:hover { color: var(--brass); }
.tc-stars { color: var(--brass); font-size: .85rem; font-weight: 600; }
.tc-status { font-size: .75rem; color: var(--warn); }
.tc-why { margin: 0; font-size: .85rem; color: var(--rose-soft, #8F2F29); }
.tc-acts { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- author notes on a reader's profile ---------- */
.author-notes { display: grid; gap: 12px; border-color: rgba(242,165,160,.35); }
.an-sums { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.an-sum .stars { color: var(--brass); }
.an-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.an-list li { padding: 10px 12px; border-radius: 8px; background: var(--panel-2); }
.an-list li .stars { color: var(--brass); }
.an-list p { margin: 4px 0 0; }
.an-form { display: grid; gap: 10px; }
.star-pick { display: flex; gap: 2px; }
.star-pick button { width: 36px; height: 36px; border: 0; background: none; color: var(--muted); font-size: 1.5rem; cursor: pointer; border-radius: 6px; }
.star-pick button.on { color: var(--brass); }
.star-pick button:focus-visible { outline: 2px solid var(--focus); }
@media (max-width: 520px) { .arc-card { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; } .arc-cover .cover-img { width: 72px; } .studio-books, .team-list { grid-template-columns: minmax(0, 1fr); } }

/* formats & sales (21_formats_and_sales.sql) */
.chips.formats { margin-top: 6px; }
.tag.fmt { background: transparent; }
.tag.fmt.narr { cursor: default; }
.tag.sale { background: #d0262f; border-color: #d0262f; color: #fff; font-weight: 800; letter-spacing: .03em; }
.sale-tag { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%) rotate(-6deg); background: #d0262f; color: #fff; font-size: .58rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 2px 6px; border-radius: 3px; box-shadow: 0 2px 6px rgba(26,26,26,.18); pointer-events: none; z-index: 3; }
.fb-link.fb-sale { color: #B3261E; }
.fmt-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.fb-link.fb-sale[aria-pressed="true"] { font-weight: 700; }

/* librarian points */
.points .pt-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-bottom:12px}
.pt-stat{display:flex;flex-direction:column;gap:2px;padding:12px 14px;border:1px solid var(--line,#e6d9e3);border-radius:12px}
.pt-stat b{font-size:1.9rem;line-height:1.1;font-variant-numeric:tabular-nums}
.pt-stat span{font-weight:600}
.pt-bar{height:8px;border-radius:99px;background:var(--line,#eee);overflow:hidden;margin:4px 0 12px}
.pt-bar i{display:block;height:100%;background:var(--violet,#8a2d6b);border-radius:99px}
.pt-rules,.pt-recent{list-style:none;padding:0;margin:8px 0;display:flex;flex-direction:column;gap:6px}
.pt-rules li,.pt-recent li{display:flex;justify-content:space-between;gap:12px}
.pt-table{width:100%;border-collapse:collapse;margin-top:12px;font-variant-numeric:tabular-nums}
.pt-table th,.pt-table td{text-align:left;padding:6px 8px;border-bottom:1px solid var(--line,#e6d9e3)}

/* Community Raffle pop-up */
dialog.pop { width: min(560px, calc(100% - 24px)); }
.raffle-pop { padding: 30px 32px 22px; position: relative; max-height: calc(100dvh - 24px); overflow-y: auto; }
.raffle-pop .pt-bar i { background: var(--blush); }
.raffle-pop h2 { font-family: var(--f-display); font-weight: 600; font-size: clamp(30px, 6vw, 40px); line-height: 1.05; margin: 6px 0 12px; }
.raffle-pop h2 i { color: var(--brass); }
.raffle-pop > p { margin: 0 0 14px; line-height: 1.55; }
.rp-kicker { margin: 0 !important; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.rp-box { background: var(--room-2); border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; }
.rp-row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.rp-row b { font-size: 1.35rem; } .rp-pts { color: var(--brass); font-weight: 600; }
.rp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-chip { padding: 4px 11px; border-radius: 99px; border: 1px solid var(--line); font-size: 14px; } .rp-chip b { color: var(--brass); }
.rp-lib { display: flex; flex-direction: column; gap: 4px; border: 1px solid rgba(242,165,160, .45); border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; }
.rp-lib .linkbtn { align-self: flex-start; color: var(--brass); font-weight: 600; padding: 6px 0; min-height: 44px; }
.rp-why { font-style: italic; color: var(--muted); font-size: 15px; }
.rp-actions { justify-content: flex-end; }
.rp-fine { text-align: center; font-size: 12px; color: var(--muted); margin: 10px 0 0 !important; }
@media (max-width: 560px) { dialog.raffle-pop { margin: auto 0 0; width: 100%; max-width: 100%; max-height: 92dvh; border-radius: 22px 22px 0 0; padding: 22px 18px 18px; } .rp-actions .btn { flex: 1; text-align: center; } }

/* Today's desk + links workload */
.desk-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.desk-score { display: flex; flex-direction: column; align-items: flex-end; } .desk-score b { font-size: 1.8rem; line-height: 1; } .desk-score span { color: var(--muted); font-size: .85rem; }
.desk .pt-bar i { background: var(--blush); }
.desk-list, .wl-list { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-direction: column; gap: 10px; }
.desk-list li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) auto; gap: 10px 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.desk-list li.done { opacity: .7; }
.desk-needs { display: flex; flex-wrap: wrap; gap: 6px; }
.desk-needs .chip { font-size: .8rem; padding: 3px 10px; cursor: default; }
.desk-needs .chip.need { border-color: rgba(255, 178, 122, .55); color: var(--warn); }
.desk-needs .chip.ok { color: var(--ok); }
.wl-row { display: grid; grid-template-columns: minmax(0, 1.1fr) repeat(3, minmax(0, 1fr)) auto; gap: 10px 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.wl-title { display: flex; flex-direction: column; } .wl-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wl-field input { width: 100%; } .wl-bn { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }
.wl-save { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
@media (max-width: 900px) { .wl-row, .desk-list li { grid-template-columns: 1fr; } }
.wl-bn .check { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; margin: 0; }
.wl-bn { flex-direction: column; align-items: flex-start; gap: 4px; } .wl-bn input[type=checkbox] { width: auto; flex: none; }

/* library: filters down the left side, results on the right */
.lib-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
.lib-side { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
.side-top { display: flex; justify-content: space-between; align-items: baseline; }
.side-top h2 { font-family: var(--f-display); font-weight: 600; font-size: 1.6rem; margin: 0 0 4px; }
.side-close, .filter-btn { display: none; }
.side-sec { border-top: 1px solid var(--line); padding: 12px 0 10px; }
.side-sec h3 { margin: 0 0 6px; font-size: .95rem; font-weight: 700; }
.side-hint { margin: 0 0 6px; color: var(--muted); font-size: .8rem; }
.side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.side-list label { display: flex; align-items: center; gap: 9px; padding: 4px 0; cursor: pointer; font-size: .92rem; min-height: 30px; }
.side-list input[type=checkbox] { width: 17px; height: 17px; flex: none; accent-color: var(--brass); margin: 0; }
.side-list .sl-l { flex: 1; min-width: 0; }
.side-list .sl-n { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.side-list label:hover .sl-l { color: var(--brass); }
.sl-sale { color: #B3261E; font-weight: 600; }
.see-more { padding: 4px 0; } .side-sec .filter-in { width: 100%; margin: 2px 0 6px; }
.side-sec .grp-label { display: block; margin: 8px 0 2px; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--brass); }
.side-foot { border-top: 1px solid var(--line); padding-top: 12px; }
.soon-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 26px 20px; }
.soon-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--fg); }
.soon-cover { position: relative; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; background: var(--c, #5a3a8e); color: var(--t, #fff); display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; font-family: var(--f-display); font-size: 1.2rem; box-shadow: 0 12px 26px rgba(26,26,26,.18); margin-bottom: 6px; transition: transform .15s; }
.soon-card:hover .soon-cover { transform: translateY(-3px); }
.soon-cover.has-img { padding: 0; } .soon-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.soon-date { position: absolute; left: 8px; bottom: 8px; background: rgba(26, 26, 26, .9); color: var(--blush); font-family: var(--f-body, Figtree), sans-serif; font-size: .75rem; font-weight: 700; padding: 4px 9px; border-radius: 99px; }
.soon-genre { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--brass); font-weight: 700; }
.soon-title { line-height: 1.25; } .soon-author { color: var(--muted); font-size: .88rem; }
.soon-tropes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; } .soon-tropes .chip { font-size: .72rem; padding: 2px 8px; cursor: default; }
@media (max-width: 800px) {
  .lib-layout { grid-template-columns: 1fr; }
  .filter-btn, .side-close { display: inline-flex; }
  .lib-side { display: none; position: fixed; inset: 0; z-index: 60; max-height: none; background: var(--room); padding: 18px 16px 40px; }
  .lib-side.open { display: block; }
  .soon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
}

/* ---------- helpers ---------- */
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- profile pictures ---------- */
.avatar { flex: none; overflow: hidden; }
.avatar.has-img { background: var(--room); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.md { width: 64px; height: 64px; font-size: 1.8rem; }
.avatar.sm { box-shadow: none; }
.avatar.xs { width: 24px; height: 24px; font-size: .75rem; font-family: inherit; font-weight: 700; box-shadow: none; vertical-align: middle; }
.who .avatar.xs { margin-right: 2px; }
.pic-row { display: flex; gap: 16px; align-items: center; }
.pic-row .linkbtn { vertical-align: middle; }

/* ---------- socials ---------- */
.ico { display: inline-flex; width: 18px; height: 18px; flex: none; vertical-align: -4px; }
.ico svg { width: 100%; height: 100%; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.social { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: rgba(26,26,26,.04); color: var(--fg); font-size: .9rem; font-weight: 600; text-decoration: none; }
.social:hover { border-color: var(--brass); color: var(--brass); }
.s-instagram .ico { color: #A23B35; } .s-tiktok .ico { color: #1B6F76; } .s-youtube .ico { color: #B3261E; }
.socials-in { border: 0; padding: 0; margin: 0; }
.qgrid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.socials-in label .ico { width: 16px; height: 16px; vertical-align: -3px; }

/* ---------- video reviews ---------- */
.video-btn { display: inline-flex; align-items: center; gap: 9px; margin: 10px 0 2px; padding: 8px 15px 8px 10px; border-radius: 999px; background: linear-gradient(135deg, rgba(242,165,160,.18), rgba(127,227,232,.14)); border: 1px solid rgba(242,165,160,.45); color: var(--fg); font-weight: 600; font-size: .92rem; text-decoration: none; }
.video-btn .ico { width: 22px; height: 22px; color: #A23B35; }
.video-btn small { font-weight: 400; color: var(--muted); }
.video-btn:hover { border-color: var(--brass); }
.video-list { display: flex; flex-direction: column; gap: 4px; }
.video-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; text-decoration: none; color: var(--fg); }
.video-row:hover { background: rgba(26,26,26,.05); }
.video-row .vr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.video-row > .ico { width: 24px; height: 24px; color: #A23B35; }

/* ---------- favorite book ---------- */
.fav-fact { color: #8F2F29; }
.fav-fact a { color: inherit; font-weight: 600; }
.fav-row { margin: 10px 0 0; }
.fav-btn[aria-pressed="true"] { background: rgba(242,165,160,.18); border-color: #A23B35; color: #8F2F29; }
.fav-slot { margin: 0 0 18px; }
.fav-book { display: inline-flex; gap: 14px; align-items: center; padding: 12px 18px 12px 12px; border-radius: 14px; border: 1px solid rgba(242,165,160,.4); background: linear-gradient(135deg, rgba(242,165,160,.12), transparent); max-width: 100%; }
.fav-book > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fav-cover { width: 54px; aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; flex: none; background: var(--c); color: var(--t); display: grid; place-items: center; font-size: .55rem; text-align: center; padding: 3px; text-decoration: none; box-shadow: 0 6px 14px rgba(26,26,26,.18); }
.fav-cover.has-img { padding: 0; } .fav-cover img { width: 100%; height: 100%; object-fit: cover; }
.fav-k { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #8F2F29; font-weight: 700; }
.fav-t { font-family: var(--f-display); font-size: 1.25rem; color: var(--fg); text-decoration: none; line-height: 1.15; }
.fav-acts { margin-top: 4px; font-size: .85rem; color: var(--muted); }
.fav-pick { margin-top: 10px; max-width: 520px; display: flex; flex-direction: column; gap: 8px; }
.fav-pick-top { display: flex; justify-content: space-between; align-items: baseline; }
.fav-pick-list { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; }
.fav-pick-list button { width: 100%; text-align: left; background: none; border: 0; color: var(--fg); padding: 9px 8px; border-radius: 8px; cursor: pointer; font: inherit; }
.fav-pick-list button:hover, .fav-pick-list button:focus-visible { background: rgba(26,26,26,.06); }

/* ---------- Community ---------- */
.comm-head { margin: 8px 0 16px; }
.comm-tabs { display: flex; gap: 4px; margin: 0 0 16px; border-bottom: 1px solid var(--line); }
.ct-tab { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 14px; color: var(--muted); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.ct-tab:hover { color: var(--fg); }
.ct-tab[aria-current="true"] { color: var(--brass); border-bottom-color: var(--brass); }
.ct-chat { display: none; }
.comm { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 24px; align-items: start; }
.comm-posts { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.cp { display: flex; flex-direction: column; gap: 8px; }
.cp-img { display: block; margin: -4px -4px 4px; border-radius: 10px; overflow: hidden; max-height: 340px; }
.cp-img img { width: 100%; height: 100%; max-height: 340px; object-fit: cover; display: block; }
.cp-full .cp-img, .cp-full .cp-img img { max-height: 480px; }
.cp-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: .82rem; color: var(--muted); }
.cp-kind { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(242,165,160,.18); color: var(--brass); }
.cp-kind.k-blog { background: rgba(242,165,160,.16); color: #8F2F29; }
.cp-title { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 1.7rem; line-height: 1.15; }
.cp-title a { color: var(--fg); text-decoration: none; } .cp-title a:hover { color: var(--brass); }
.cp-body p { margin: 0 0 .8em; line-height: 1.6; } .cp-body p:last-child { margin-bottom: 0; }
.cp-foot { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 4px; }
.cp-acts { display: inline-flex; gap: 12px; margin-left: auto; }
.cp-editor textarea { min-height: 14rem; }
.comm-chat { position: sticky; top: 12px; display: flex; flex-direction: column; height: calc(100vh - 40px); max-height: 760px; min-height: 420px; padding: 0; overflow: hidden; }
.comm-chat-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.comm-chat-head h2 { margin: 0; } .comm-chat-head p { margin: 4px 0 0; }
.comm-feed { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.cm { display: flex; gap: 10px; padding: 7px 4px; border-radius: 10px; }
.cm:hover { background: rgba(26,26,26,.03); }
.cm-av { flex: none; text-decoration: none; }
.cm-main { min-width: 0; flex: 1; }
.cm-who { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; font-size: .88rem; }
.cm-who a, .cm-who b { color: var(--fg); font-weight: 700; text-decoration: none; }
.cm-who time { color: var(--muted); font-size: .75rem; }
.cm.mine .cm-who a { color: var(--brass); }
.cm-body { margin: 1px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.cm .b-acts { display: none; gap: 10px; font-size: .75rem; }
.cm:hover .b-acts, .cm:focus-within .b-acts { display: flex; }
.cm .b-acts button { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font: inherit; text-decoration: underline; }
.comm-chat .chat-compose { border-top: 1px solid var(--line); padding: 10px 12px; }
.comm-signin { display: flex; justify-content: center; }
@media (max-width: 900px) {
  .comm { grid-template-columns: 1fr; }
  .comm[data-tab="main"] .comm-chat, .comm[data-tab="chat"] .comm-main { display: none; }
  .ct-chat { display: inline-block; }
  .comm-chat { position: static; height: calc(100vh - 230px); min-height: 380px; }
  .cm .b-acts { display: flex; }
}
.paper .video-btn { color: #3b2340; background: rgba(242,165,160,.16); border-color: rgba(190,80,130,.5); }
.paper .video-btn small { color: #7a5a72; }
.paper .video-btn .ico { color: #c2477f; }
.paper .video-btn:hover { border-color: #a0773a; }
.cm-who .roles { display: contents; }
.form label.btn, .pic-row label.btn { text-transform: none; letter-spacing: normal; font-size: .9rem; font-weight: 600; color: var(--fg); display: inline-flex; margin: 0; }
@media (max-width: 900px) { .comm-chat { height: calc(100dvh - 320px); } }

/* ---------- Community threads ---------- */
.comm-main { min-width: 0; }
.comm-threads { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.th-head { display: flex; gap: 12px; align-items: center; }
.th-search { flex: 1; } .th-search input { width: 100%; }
.th-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 10px; }
.th-pick { display: flex; flex-direction: column; gap: 4px; }
.th-pick select { width: 100%; }
.th-count { margin: 0; }
.th-list { display: flex; flex-direction: column; gap: 12px; }
.th-card { padding: 16px 18px; }
.th-card.pinned { border-color: rgba(242,165,160,.55); }
.th-top { display: flex; gap: 14px; align-items: flex-start; }
.th-main { flex: 1; min-width: 0; }
.th-title { margin: 0; font-size: 1.12rem; line-height: 1.3; }
.th-title a { color: var(--fg); text-decoration: none; } .th-title a:hover { color: var(--brass); }
.th-badge { display: inline-block; margin-right: 8px; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); vertical-align: 2px; }
.th-badge.pin { color: var(--brass); }
.th-meta { margin: 3px 0 0; font-size: .82rem; color: var(--muted); }
.th-meta a { color: inherit; font-weight: 600; }
.th-excerpt { margin: 8px 0 0; line-height: 1.5; overflow-wrap: anywhere; }
.th-tags { margin-top: 10px; gap: 6px; }
.th-tags .tag { font-size: .78rem; text-decoration: none; }
.tag.rep-tag { background: rgba(242,165,160,.14); border-color: rgba(242,165,160,.45); color: #8F2F29; }
.th-replies { flex: none; display: flex; flex-direction: column; align-items: center; min-width: 64px; padding: 6px 8px; border-radius: 12px; background: rgba(26,26,26,.04); color: var(--fg); text-decoration: none; text-align: center; font-size: .78rem; }
.th-replies b { font-size: 1.3rem; line-height: 1.1; }
.th-op { display: flex; flex-direction: column; gap: 10px; }
.th-h1 { margin: 4px 0 0; font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.12; }
.th-h1 .th-badge { font-family: var(--f-body, Figtree), sans-serif; }
.th-by { display: flex; gap: 10px; align-items: center; font-size: .92rem; }
.th-by a { color: var(--fg); font-weight: 700; }
.th-body p, .th-rbody p { margin: 0 0 .7em; line-height: 1.6; overflow-wrap: anywhere; } .th-body p:last-child, .th-rbody p:last-child { margin-bottom: 0; }
.spoiler-blur { filter: blur(6px); cursor: pointer; user-select: none; }
.th-acts { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }
.th-rh { margin: 8px 0 0; }
.th-replies-list { display: flex; flex-direction: column; }
.th-reply { display: flex; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.th-reply .th-rbody { margin-top: 4px; }
.th-reply .th-acts { margin-top: 4px; }
.th-compose-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.th-form .fold-q { margin: 0; }
.th-rc-inline { display: none; }
.th-by > span { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
@media (max-width: 620px) { .th-head { flex-wrap: wrap; } .th-head .btn { width: 100%; justify-content: center; } .th-replies { display: none; } .th-rc-inline { display: inline; } .th-card { padding: 14px; } .th-top { gap: 10px; } }

/* ---------- points next to names, leaderboard ---------- */
.role.role-pts { color: var(--brass); border-color: rgba(242,165,160,.55); background: rgba(242,165,160,.1); font-variant-numeric: tabular-nums; }
.paper .role.role-pts { color: #8a5a06; border-color: rgba(160,119,58,.5); background: rgba(242,165,160,.14); }
.cp-kind.k-authors { background: rgba(127,227,232,.14); color: #17666C; }
.lb-banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; text-decoration: none; color: var(--fg); border-color: rgba(242,165,160,.5); background: linear-gradient(135deg, rgba(242,165,160,.14), rgba(242,165,160,.08)); }
.lb-banner:hover { border-color: var(--brass); }
.lb-b-ico { font-size: 1.8rem; }
.lb-b-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lb-b-go { color: var(--brass); font-weight: 600; white-space: nowrap; }
.comm-leaders { display: flex; flex-direction: column; gap: 14px; }
.lb-head { display: flex; flex-direction: column; gap: 12px; }
.lb-head-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.lb-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.lb-facts > div { background: rgba(26,26,26,.04); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.lb-facts b { font-size: 1.05rem; }
.lb-you { margin: 0; padding: 10px 14px; border-radius: 12px; background: rgba(242,165,160,.12); font-weight: 600; }
.lb-champ { display: flex; align-items: center; gap: 14px; border-color: rgba(247,207,85,.6); }
.lb-champ > div { display: flex; flex-direction: column; }
.lb-crown { font-size: 2rem; }
.lb-list { list-style: none; margin: 0; padding: 6px 10px; }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.lb-row:last-child { border-bottom: 0; }
.lb-row.me { background: rgba(242,165,160,.1); border-radius: 10px; }
.lb-rank { width: 2.4rem; text-align: center; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.lb-row.top .lb-rank { font-size: 1.5rem; }
.lb-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lb-name a { color: var(--fg); font-weight: 700; text-decoration: none; } .lb-name a:hover { color: var(--brass); }
.lb-pts { display: flex; flex-direction: column; align-items: flex-end; }
.lb-pts b { font-size: 1.2rem; color: var(--brass); font-variant-numeric: tabular-nums; }
.lb-draws { margin: 8px 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 620px) { .lb-b-go { display: none; } .comm-tabs { overflow-x: auto; gap: 0; } .ct-tab { padding: 10px 8px; white-space: nowrap; font-size: .9rem; } .lb-facts { grid-template-columns: 1fr 1fr 1fr; } .lb-facts > div { padding: 8px 10px; } .lb-facts b { font-size: .92rem; } }
.lb-head-top select { width: auto; max-width: 100%; }
.cp-sub { margin: 1.1em 0 .35em; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); font-weight: 700; }
.cp-body > .cp-sub:first-child { margin-top: .2em; }

/* ---------- tagging books & authors in comments ---------- */
.tag-tools { position: relative; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag-tool { appearance: none; border: 1px dashed rgba(242,165,160,.5); background: rgba(242,165,160,.07); color: var(--brass); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.tag-tool:hover { border-style: solid; }
.tag-pop { position: absolute; left: 0; top: calc(100% + 6px); z-index: 40; width: min(420px, 92vw); background: var(--panel, #EFE7DE); border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: 0 18px 40px rgba(26,26,26,.20); display: flex; flex-direction: column; gap: 8px; }
.tag-pop-top { display: flex; justify-content: space-between; align-items: baseline; }
.tag-pop-list { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; }
.tag-pop-list button { width: 100%; text-align: left; background: none; border: 0; color: var(--fg); padding: 8px; border-radius: 8px; font: inherit; cursor: pointer; }
.tag-pop-list button:hover, .tag-pop-list button:focus-visible { background: rgba(26,26,26,.07); }
.chat-compose .tag-pop { top: auto; bottom: calc(100% + 6px); }
.mention { display: inline-flex; align-items: center; gap: 3px; padding: 0 8px; border-radius: 999px; font-weight: 600; text-decoration: none; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: baseline; }
.mention.m-book { background: rgba(242,165,160,.16); color: #8F2F29; border: 1px solid rgba(242,165,160,.4); }
.mention.m-author { background: rgba(242,165,160,.14); color: var(--brass); border: 1px solid rgba(242,165,160,.4); }
.mention.m-gone { color: var(--muted); font-style: italic; }
.paper .mention.m-book { color: #8a2d5b; background: rgba(242,165,160,.18); border-color: rgba(190,80,130,.4); }
.paper .mention.m-author { color: #7a5214; background: rgba(242,165,160,.18); border-color: rgba(160,119,58,.45); }
.tag-prompt { width: min(520px, 94vw); }
.tp-book { display: flex; gap: 14px; align-items: center; }
.tp-book > div { display: flex; flex-direction: column; }

/* ---------- likes, replies-to, edits ---------- */
.like-btn { appearance: none; border: 0; background: none; color: var(--muted); font: inherit; font-size: .85rem; font-weight: 600; padding: 2px 6px; border-radius: 999px; cursor: pointer; font-variant-numeric: tabular-nums; }
.like-btn:hover:not(.own) { color: #A23B35; background: rgba(242,165,160,.1); }
.like-btn[aria-pressed="true"] { color: #A23B35; }
.like-btn.own { cursor: default; }
.cm-who .like-btn { margin-left: auto; }
.quote-line { display: block; width: 100%; text-align: left; appearance: none; border: 0; border-left: 3px solid rgba(242,165,160,.5); background: rgba(26,26,26,.04); color: var(--muted); font: inherit; font-size: .82rem; padding: 4px 10px; margin: 4px 0 2px; border-radius: 0 8px 8px 0; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-line b { color: var(--fg); }
.quote-line.gone { cursor: default; font-style: italic; }
.reply-banner { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: .85rem; color: var(--muted); padding: 6px 10px; border-radius: 10px; background: rgba(242,165,160,.1); margin-bottom: 6px; }
.reply-banner span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edited { color: var(--muted); font-size: .75rem; }
.edit-box { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.edit-box textarea { width: 100%; min-height: 4.5rem; }
@keyframes flashy { from { background: rgba(242,165,160,.28); } to { background: transparent; } }
.flash { animation: flashy 1.8s ease-out; border-radius: 10px; }

/* ---------- Community comments on a book page ---------- */
.comm-pill { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(127,180,200,.2); color: #2f6070; }
.ce-where { margin: 2px 0 6px; font-size: .9rem; color: #6b5a63; }
.ce-where a { font-weight: 600; }

/* ---------- librarian: suggested tags · admin: delete ---------- */
.sug-box:empty { display: none; }
.sug-box { padding: 10px 12px; border-radius: 12px; background: rgba(242,165,160,.1); border: 1px solid rgba(242,165,160,.35); }
.sug-list { display: flex; flex-direction: column; gap: 6px; }
.sug-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sug-row > span { flex: 1; min-width: 0; }
.del-tools { border-color: rgba(255,122,110,.35); }
.del-list { display: flex; flex-direction: column; gap: 4px; }

/* ---------- reading goal & reading list ---------- */
.goal { display: flex; flex-direction: column; gap: 12px; }
.goal-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.goal-big { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; }
.goal-big b { font-family: var(--f-display); font-weight: 600; font-size: 3rem; line-height: 1; color: var(--brass); }
.goal .meter, .goal-line .meter { display: block; height: 10px; border-radius: 999px; background: rgba(26,26,26,.1); overflow: hidden; }
.goal .meter i, .goal-line .meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--brass), #A23B35); border-radius: inherit; }
.goal-line { display: flex; align-items: center; gap: 10px; margin: 8px 0 0; color: var(--fg); text-decoration: none; font-size: .9rem; max-width: 360px; }
.goal-line .meter { flex: 1; }
.sec-sm { margin: 14px 0 8px; font-size: 1rem; }
.pick-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px 14px; }
.pick-card { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pick-cover { aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; background: var(--c); color: var(--t); display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px; font-family: var(--f-display); text-decoration: none; box-shadow: 0 8px 18px rgba(26,26,26,.16); margin-bottom: 4px; }
.pick-cover.has-img { padding: 0; } .pick-cover img { width: 100%; height: 100%; object-fit: cover; }
.pick-t { color: var(--fg); font-weight: 700; text-decoration: none; line-height: 1.25; } .pick-t:hover { color: var(--brass); }
.pick-why { font-size: .78rem; color: #8F2F29; line-height: 1.3; }
.pick-card .btn { margin-top: 4px; align-self: flex-start; }

/* ---------- suggest a book ---------- */
.note-box { border-color: rgba(242,165,160,.45); background: linear-gradient(135deg, rgba(242,165,160,.1), rgba(242,165,160,.06)); margin-bottom: 16px; }
.sb-cover-prev:empty { display: none; }
.sb-cover-prev { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sb-cover-prev img { width: 90px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 6px 14px rgba(26,26,26,.16); }

/* ---------- Librarian's desk + librarian chat ---------- */
.desk-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.desk-col { min-width: 0; }
.lib-chat { position: sticky; top: 12px; height: calc(100vh - 40px); max-height: 720px; }
.cm-system { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 8px; text-align: center; margin: 8px 0; padding: 10px 14px; border-radius: 12px; background: linear-gradient(135deg, rgba(242,165,160,.18), rgba(242,165,160,.14)); border: 1px solid rgba(242,165,160,.4); font-weight: 600; }
.cm-system time { color: var(--muted); font-size: .75rem; font-weight: 400; }
@media (max-width: 900px) { .desk-wrap { grid-template-columns: 1fr; } .lib-chat { position: static; height: 560px; } }

/* ---------- edit requests ---------- */
.edit-req-line { margin: 8px 0 0; font-size: .9rem; }
.req-status.approved { color: #1E7143; } .req-status.declined { color: #B3261E; } .req-status.open { color: var(--muted); }
.req-dialog { width: min(640px, 95vw); }
.req-dialog .form { display: flex; flex-direction: column; gap: 12px; }
.req-item.del { border-color: rgba(255,122,110,.35); }
.req-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.req-kind { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(242,165,160,.18); color: var(--brass); }
.req-kind.delete { background: rgba(255,122,110,.16); color: #B3261E; }
.req-count { margin-left: auto; font-size: .8rem; font-weight: 700; color: var(--brass); }
.req-note { margin: 0; padding: 8px 12px; border-left: 3px solid rgba(242,165,160,.5); background: rgba(26,26,26,.04); border-radius: 0 8px 8px 0; white-space: pre-wrap; }
.req-ribbon { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 18px; margin: 0 0 14px; border-radius: 14px; background: #fff; border: 1px solid rgba(242,165,160,.55); box-shadow: 0 10px 24px rgba(26,26,26,.16); }
.req-ribbon.del { border-color: rgba(255,122,110,.6); }
.req-ribbon > b { font-family: var(--f-display); font-weight: 600; font-size: 1.5rem; }
.req-ribbon .form-actions { margin: 0; }
.ribbon-no { display: flex; gap: 8px; flex: 1 1 100%; } .ribbon-no input { flex: 1; }
.req-detail { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.req-diff td.old { color: var(--muted); text-decoration: line-through; white-space: pre-wrap; } .req-diff td.new { color: #1E7143; white-space: pre-wrap; }
.slot.mark-this .spine { outline: 4px solid #B3261E; outline-offset: 3px; } .slot.mark-keep .spine { outline: 4px solid #1E7143; outline-offset: 3px; }
.mk { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .78rem; font-weight: 700; } .mk.this { background: rgba(255,122,110,.2); color: #B3261E; } .mk.keep { background: rgba(127,211,160,.2); color: #1E7143; }
.req-book { display: flex; gap: 16px; align-items: flex-start; } .req-book .pick-cover { width: 120px; flex: none; }

/* word counts */
.word-count { margin: 4px 0 0; font-size: .82rem; color: var(--muted); }
.word-count.ok { color: var(--ok); font-weight: 600; }
/* TBR awards on reviews */
.award-btn { display: flex; width: fit-content; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: inherit; font: inherit; font-size: .84rem; cursor: pointer; }
.award-btn:hover { border-color: var(--brass); }
.award-btn[aria-pressed="true"] { background: color-mix(in srgb, var(--brass) 14%, transparent); border-color: var(--brass); font-weight: 600; }
.award-n { min-width: 1.4em; padding: 0 6px; border-radius: 999px; background: var(--blush); color: #fff; font-size: .75rem; text-align: center; }
.award-own { margin: 8px 0 0; font-size: .84rem; color: var(--muted); }
/* cover requests */
.req-cover { display: flex; gap: 12px; align-items: flex-start; }
.req-cover img { width: 70px; height: auto; border-radius: 4px; box-shadow: 0 2px 8px rgba(26,26,26,.09); }
/* admin activity + users */
.act-list { list-style: none; margin: 0; padding: 0; }
.act-day { margin: 14px 0 4px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.act-row { display: grid; grid-template-columns: 1.6em 1fr auto; gap: 8px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.act-row time { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.act-text { min-width: 0; overflow-wrap: anywhere; }
.act-who { font-weight: 700; }
.act-user-top { display: flex; gap: 14px; align-items: center; margin-top: 10px; }
.user-table-wrap { overflow-x: auto; margin-top: 8px; }
.user-table { min-width: 620px; }
.user-cell { display: flex; gap: 8px; align-items: center; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.user-cell:hover b { text-decoration: underline; }

/* librarian chat bubble on every page */
.lib-dock { position: fixed; right: 18px; bottom: 18px; z-index: 900; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.lib-dock-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 999px; border: 1px solid var(--brass); background: var(--blush); color: var(--brass-ink, #1A1A1A); font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 6px 22px rgba(26,26,26,.16); }
.lib-dock-btn:hover { filter: brightness(1.06); }
.lib-dock-btn .badge { margin-left: 2px; }
.lib-dock.open .lib-dock-btn .lib-dock-label::after { content: ' ▾'; }
.lib-dock-panel { width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 110px)); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius, 14px); box-shadow: 0 14px 48px rgba(26,26,26,.20); overflow: hidden; }
.lib-dock-panel[hidden] { display: none; }
.lib-dock-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.lib-dock-tools { display: flex; align-items: center; gap: 10px; }
.lib-dock-x { background: none; border: 0; color: var(--fg); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.lib-dock-body { flex: 1; min-height: 0; display: flex; }
.lib-dock-body > * { flex: 1; min-width: 0; }
.dock-chat { position: static; height: 100%; max-height: none; display: flex; flex-direction: column; border: 0; border-radius: 0; margin: 0; padding: 0; }
.dock-chat .chat-feed { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px; }
.dock-chat .chat-compose { padding: 8px 10px 10px; border-top: 1px solid var(--line); }
.lib-send-btn { margin-top: 8px; }
@media (max-width: 600px) { .lib-dock { right: 12px; bottom: 12px; } .lib-dock-btn { padding: 10px 13px; } .lib-dock-label { display: none; } .lib-dock.open .lib-dock-label { display: none; } }
@media print { .lib-dock { display: none; } }
.lib-dock .dock-chat { position: static; height: 100%; min-height: 0; max-height: none; }
.lib-dock-tools a { white-space: nowrap; }
@media (max-width: 620px) {
  .lib-dock { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .lib-dock-panel { height: min(520px, calc(100dvh - 190px)); }
  .lib-dock-head .muted { display: none; }
}

/* "New from Admin" pop-up */
dialog.np-pop { padding: 0; overflow: hidden; width: min(520px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; }
.np-img { position: relative; height: 200px; background: var(--wood-lo) center / cover no-repeat; }
.np-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 45%, var(--panel)); }
.np-body { padding: 6px 30px 24px; position: relative; }
.np-pop.no-img .np-body { padding-top: 30px; }
.np-pop h2 { font-family: var(--f-display); font-weight: 600; font-size: clamp(30px, 6vw, 40px); line-height: 1.05; margin: 6px 0 12px; }
.np-pop h2 i { color: var(--brass); }
.np-meta { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.np-teaser { margin: 0 0 18px; line-height: 1.55; }
.np-pop .close-x { z-index: 2; background: rgba(251, 247, 242, .85); color: var(--fg); }
.np-preview { margin: 0 0 8px; display: inline-block; padding: 3px 10px; border-radius: 99px; background: var(--rose); color: #fff; font-size: 12px; font-weight: 600; }
.pop-set { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px 14px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.pop-set legend { padding: 0 6px; color: var(--brass); font-weight: 600; }
.pop-fields { display: flex; flex-direction: column; gap: 10px; }
.pop-fields > .btn { align-self: flex-start; }
@media (max-width: 560px) { dialog.np-pop { margin: auto 0 0; width: 100%; max-width: 100%; max-height: 92dvh; border-radius: 22px 22px 0 0; } .np-body { padding: 4px 18px 18px; } .np-img { height: 160px; } .rp-actions .btn { flex: 1; text-align: center; } }
.pop-fields textarea { min-height: 84px; height: 96px; }

/* ---------- weekly games: Sapphle + Shelf Hop ---------- */
.g-wrap { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.g-nav { display: flex; gap: 8px; }
.g-nav a { flex: 1; display: flex; flex-direction: column; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--fg); text-decoration: none; font-weight: 600; }
.g-nav a span { font-weight: 400; font-size: .8rem; color: var(--muted); }
.g-nav a[aria-current="page"] { border-color: var(--brass); background: rgba(242,165,160, .1); }
.g-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.g-head h1 { margin: 0; }
.g-q { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--brass); background: none; color: var(--brass); font: 600 1.1rem var(--f-ui); cursor: pointer; flex: none; }
.g-sub { margin: -4px 0 0; color: var(--muted); }
.g-body { display: flex; flex-direction: column; gap: 14px; }
.g-soon h2, .g-end h2, .g-help h2, .hop-invite h2 { font-family: var(--f-display); font-weight: 600; font-size: clamp(28px, 6vw, 38px); line-height: 1.05; margin: 6px 0 10px; }
.g-soon h2 i, .hop-invite h2 i { color: var(--brass); }
.g-count { margin: 12px 0; color: var(--muted); } .g-count b { color: var(--brass); font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.g-clues { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: c; }
.g-clues li { display: grid; grid-template-columns: 11rem 1fr; gap: 10px; align-items: start; padding: 8px 0; border-top: 1px solid var(--line); }
.g-clues li:first-child { border-top: 0; }
.g-clues li.locked { opacity: .55; }
.g-cl { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brass); padding-top: 2px; }
.g-blur { width: 110px; overflow: hidden; border-radius: 6px; transition: filter .4s; }
.g-cover { width: 100%; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; background: var(--wood-lo); box-shadow: 0 4px 14px rgba(26,26,26,.16); }
.g-cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-titlecard { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 10%; background: var(--violet); color: #fff; text-align: center; }
.g-titlecard b { font-family: var(--f-display); font-weight: 600; font-size: 1.15rem; line-height: 1.1; } .g-titlecard span { font-size: .75rem; opacity: .85; }
.g-cover.mini { width: 40px; flex: none; border-radius: 3px; box-shadow: none; } .g-cover.mini .g-titlecard { padding: 3px; } .g-cover.mini .g-titlecard b { font-size: .5rem; } .g-cover.mini .g-titlecard span { display: none; }
.g-cover.big { width: 140px; flex: none; }
.g-rows { display: flex; flex-direction: column; gap: 8px; }
.g-row { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.g-row.win { border-color: var(--brass); }
.g-guess { margin: 0 0 8px; } .g-row.win .g-guess { margin: 0; }
.g-fb { display: flex; flex-wrap: wrap; gap: 6px; }
.g-chip { display: inline-flex; flex-direction: column; padding: 5px 10px; border-radius: 8px; background: var(--room-2); font-size: .85rem; min-width: 5.5rem; }
.g-chip small { font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.g-chip.hit { background: rgba(155, 227, 181, .16); outline: 1px solid rgba(155, 227, 181, .5); }
.g-chip.near { background: rgba(242,165,160, .16); outline: 1px solid rgba(242,165,160, .5); }
.g-guessbox { display: flex; flex-direction: column; gap: 10px; }
.g-left { margin: 0; font-weight: 600; color: var(--brass); }
.g-input-wrap { position: relative; }
.g-input { width: 100%; font-size: 1rem; }
.g-sug { list-style: none; margin: 4px 0 0; padding: 0; border-radius: var(--radius); overflow: hidden; }
.g-sug:empty { display: none; }
.g-sug li.muted { padding: 10px 12px; background: var(--room-2); }
.g-sug button { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 12px; border: 0; border-top: 1px solid var(--line); background: var(--room-2); color: var(--fg); font: inherit; text-align: left; cursor: pointer; min-height: 44px; }
.g-sug button:hover, .g-sug button:focus-visible { background: var(--panel-2); }
.g-sug button span { font-size: .8rem; color: var(--muted); }
.g-mc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .g-mc-grid .btn { white-space: normal; text-align: left; }
.g-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.g-end { display: flex; flex-direction: column; gap: 14px; }
.g-reveal { display: flex; gap: 16px; align-items: flex-end; } .g-reveal h2 { margin: 0 0 2px; } .g-reveal p { margin: 0 0 12px; }
.g-like { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.g-like-b { display: flex; flex-direction: column; gap: 6px; color: var(--fg); text-decoration: none; font-size: .85rem; } .g-like-b .g-cover { max-width: 110px; }
.g-share { display: flex; gap: 10px; align-items: center; background: var(--room-2); border-radius: var(--radius); padding: 10px 12px; }
.g-share pre { flex: 1; margin: 0; white-space: pre-wrap; font: .9rem/1.45 var(--f-ui); overflow-wrap: anywhere; }
.g-stats { display: flex; flex-direction: column; gap: 10px; }
.g-stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.g-stat b { display: block; font-family: var(--f-display); font-weight: 600; font-size: 2rem; line-height: 1; } .g-stat span { font-size: .75rem; color: var(--muted); }
.g-dist .grp-label { margin: 0 0 4px; }
.g-bar { display: flex; align-items: center; gap: 8px; margin: 3px 0; font-size: .85rem; } .g-bar > span { width: 1em; }
.g-bar i { font-style: normal; background: var(--panel-2); padding: 1px 8px; border-radius: 4px; text-align: right; min-width: 1.6em; }
.g-bar i.on { background: var(--blush); color: var(--brass-ink); }
.g-help ul { padding-left: 1.2em; line-height: 1.55; }
dialog.g-help, dialog.hop-invite { padding: 26px 28px 20px; }
/* Shelf Hop */
.hop-top { display: flex; gap: 12px; align-items: stretch; }
.hop-target { flex: 1; background: var(--panel); border: 1px solid var(--brass); border-radius: var(--radius); padding: 10px 14px; }
.hop-target .grp-label { margin: 0 0 6px; color: var(--brass); }
.hop-mini { display: flex; gap: 10px; align-items: center; } .hop-mini > div { display: flex; flex-direction: column; } .hop-mini span { font-size: .85rem; }
.hop-status { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 10px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); white-space: nowrap; }
.hop-status b { font-family: var(--f-display); font-weight: 600; font-size: 1.6rem; color: var(--brass); }
.hop-trail { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .85rem; }
.hop-trail li { display: flex; align-items: center; gap: 6px; } .hop-trail li + li::before { content: '→'; color: var(--muted); }
.hop-trail li > span { padding: 3px 10px; border-radius: 99px; background: var(--room-2); } .hop-trail li.cur > span { background: var(--blush); color: var(--brass-ink); font-weight: 600; }
.hop-trail small { color: var(--muted); font-style: italic; }
.hop-book { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: start; } .hop-book h2 { font-family: var(--f-display); font-weight: 600; font-size: 1.8rem; line-height: 1.05; margin: 0; } .hop-book > div > .muted { margin: 2px 0 10px; }
.hop-cur > .grp-label { margin: 0 0 8px; }
.hop-grp .grp-label { margin: 10px 0 5px; }
.g-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.g-tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; min-height: 36px; border-radius: 99px; border: 1px solid rgba(242,165,160, .55); background: transparent; color: var(--fg); font: inherit; font-size: .88rem; cursor: pointer; }
.g-tag small { font-size: .7rem; color: var(--muted); }
.g-tag:hover, .g-tag.open { background: rgba(242,165,160, .16); border-color: var(--brass); }
.g-tag.hint { box-shadow: 0 0 0 3px rgba(242,165,160, .55); animation: g-pulse 1.4s ease-in-out 3; }
@keyframes g-pulse { 50% { box-shadow: 0 0 0 7px rgba(242,165,160, .15); } }
.g-tag.off { opacity: .42; border-style: dashed; border-color: var(--line); cursor: not-allowed; }
.hop-notes { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; } .hop-notes summary { cursor: pointer; color: var(--muted); }
.hop-list ul { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.hop-pick { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 4px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.hop-pick:hover { background: rgba(26,26,26,.04); } .hop-pick > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; } .hop-pick small { color: var(--muted); font-size: .8rem; }
.hop-pick.been { opacity: .6; } .hop-go { color: var(--brass); font-weight: 600; white-space: nowrap; }
.hop-final { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hop-final li { display: flex; flex-direction: column; gap: 3px; } .hop-final a { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; }
.hop-final li.shown a { opacity: .75; } .hop-via { font-size: .78rem; color: var(--brass); padding-left: 50px; font-style: italic; }
@media (max-width: 600px) {
  .g-clues li { grid-template-columns: 1fr; gap: 3px; }
  .hop-book { grid-template-columns: 84px 1fr; gap: 12px; } .hop-book h2 { font-size: 1.4rem; }
  .g-stat-row { grid-template-columns: repeat(2, 1fr); }
  .g-cover.big { width: 104px; }
  .g-mc-grid { grid-template-columns: 1fr; }
}

/* ---------- Admin: Social planner ---------- */
.social-planner { display: flex; flex-direction: column; gap: 14px; }
.social-planner h3 { margin: 0; font-size: 1.05rem; }
.sp-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sp-nav input[type="date"] { min-height: 40px; }
.sp-day { margin: 0; }
.sp-week { display: grid; grid-template-columns: repeat(7, minmax(108px, 1fr)); gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.sp-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 52px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.sp-chip small { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.sp-chip.short { border-color: rgba(255, 178, 122, .55); }
.sp-chip.short small { color: var(--warn); }
.sp-chip.done { border-color: rgba(155, 227, 181, .5); }
.sp-chip.on { outline: 2px solid var(--brass); outline-offset: 1px; }
.sp-plat-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px; margin-bottom: 10px; }
.sp-gap { color: var(--warn); font-weight: 600; font-size: .9rem; }
.sp-ok { color: var(--ok); font-size: .9rem; }
.sp-cards { display: flex; flex-direction: column; gap: 12px; margin-bottom: 10px; }
.sp-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--room-2); display: flex; flex-direction: column; gap: 8px; }
.sp-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sp-slot { color: var(--brass); font-weight: 700; }
.sp-title { flex: 1; min-width: 12rem; }
.sp-pill { padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; border: 1px solid var(--line); }
.sp-pill.s-ready { border-color: var(--brass); color: var(--brass); }
.sp-pill.s-posted { border-color: rgba(155, 227, 181, .6); color: var(--ok); }
.sp-pill.s-skipped { color: var(--muted); }
.sp-meta { margin: 0; }
.sp-slugs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sp-book { padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: .78rem; color: var(--muted); }
.sp-field { display: flex; flex-direction: column; gap: 3px; }
.sp-field textarea, .sp-field input, .sp-field select { width: 100%; min-height: 40px; }
.sp-field textarea { resize: vertical; }
.sp-status { max-width: 220px; }
.sp-count { align-self: flex-end; color: var(--muted); margin-top: -4px; }
.sp-count.over { color: var(--bad); font-weight: 700; }
.sp-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sp-acts .btn { min-height: 40px; }
.sp-del { margin-left: auto; color: var(--bad); }
.sp-todos ul { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sp-todo { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.sp-todo .check { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; }
.sp-todo.done > .check span { text-decoration: line-through; color: var(--muted); }
.sp-todo-notes { flex-basis: 100%; padding-left: 28px; }
.sp-add-todo { display: flex; gap: 8px; }
.sp-add-todo input { flex: 1; min-height: 40px; }
.sp-overdue summary { cursor: pointer; color: var(--warn); min-height: 32px; }
@media (max-width: 700px) {
  .sp-week { grid-template-columns: repeat(7, 140px); }
  .sp-wide { display: none; }
  .sp-nav .btn { min-width: 44px; }
  .sp-nav { flex-wrap: nowrap; }
  .sp-nav .btn { padding-inline: 10px; white-space: nowrap; }
  .sp-nav input[type="date"] { flex: 1; min-width: 0; }
  .sp-del { margin-left: 0; }
}

/* share button + menu */
.share { position: relative; display: inline-block; }
.share > summary { list-style: none; cursor: pointer; }
.share > summary::-webkit-details-marker { display: none; }
.share-menu { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; min-width: 190px; display: flex; flex-direction: column; padding: 6px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(26,26,26,.20); }
.share-menu a, .share-menu button { display: block; width: 100%; padding: 9px 12px; min-height: 40px; border: 0; border-radius: 8px; background: none; color: var(--fg); font: inherit; font-size: .95rem; text-align: left; text-decoration: none; cursor: pointer; }
.share-menu a:hover, .share-menu button:hover, .share-menu a:focus-visible, .share-menu button:focus-visible { background: rgba(242,165,160,.14); }
.fav-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cp-foot .share-menu { left: auto; right: 0; }
@media (max-width: 600px) { .share-menu { left: 0; right: auto; } .cp-foot .share-menu { left: 0; right: auto; } }

/* ---------- formatted blog posts ---------- */
.cp-body .pb-card { display: flex; gap: 18px; margin: 18px 0; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--room-2); }
.pb-cover-link { flex: none; }
.pb-cover { width: 120px; aspect-ratio: 2/3; object-fit: cover; border-radius: 6px; box-shadow: 0 6px 16px rgba(26,26,26,.18); display: block; }
.pb-cover-blank { display: flex; align-items: center; justify-content: center; padding: 8px; text-align: center; font-family: var(--f-display); background: linear-gradient(160deg, var(--violet), var(--rose)); color: #fff; }
.pb-main { min-width: 0; flex: 1; }
.pb-main h3 { margin: 0 0 2px; font-family: var(--f-display); font-weight: 600; font-size: 1.5rem; line-height: 1.15; }
.pb-main h3 a { color: var(--fg); text-decoration: none; }
.pb-main h3 a:hover { color: var(--brass); }
.pb-by { margin: 0 0 8px; color: var(--muted); font-style: italic; }
.pb-genres { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.pb-g { padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.pb-text p { margin: 0 0 8px; }
.pb-spice { margin: 0 0 10px; color: var(--muted); }
.pb-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.pb-buy { border-color: var(--brass); color: var(--brass); }
.pb-disc { font-size: .85rem; color: var(--muted); }
.pb-center { text-align: center; margin: 22px 0; }
.pb-sub { margin: 24px 0; padding: 18px; border-radius: 14px; border: 1px solid var(--brass); background: rgba(242,165,160,.08); text-align: center; }
.pb-sub h3 { margin: 0 0 6px; font-family: var(--f-display); font-weight: 600; font-size: 1.5rem; }
.pb-sub p { margin: 0 0 12px; color: var(--muted); }
.pb-tools { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.pb-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.pb-bar .btn { min-height: 36px; }
.pb-picker { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.pb-preview { padding: 14px 16px; border: 1px dashed var(--brass); border-radius: var(--radius); }
@media (max-width: 560px) { .cp-body .pb-card { flex-direction: column; } .pb-cover { width: 110px; } }
/* follow */
.follow-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.follow-btn.on { border-color: var(--brass); color: var(--brass); }
.follow-btn .f-off { display: none; }
.follow-btn.on:hover .f-on { display: none; }
.follow-btn.on:hover .f-off { display: inline; }
.follow-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow: auto; }
.follow-list li { display: flex; align-items: center; gap: 10px; }
dialog.follow-list { padding: 24px; }

/* reviews tab on a reader's profile */
.rr-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.rr-item { display: flex; gap: 16px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
.rr-cover { flex: none; width: 76px; }
.rr-img { width: 76px; aspect-ratio: 2/3; object-fit: cover; border-radius: 4px; display: block; box-shadow: 0 4px 12px rgba(26,26,26,.16); }
.rr-blank { display: flex; align-items: center; justify-content: center; width: 76px; aspect-ratio: 2/3; padding: 4px; border-radius: 4px; background: linear-gradient(160deg, var(--violet), var(--rose)); color: #fff; font-size: .7rem; text-align: center; }
.rr-main { min-width: 0; flex: 1; }
.rr-main h3 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 1.35rem; line-height: 1.15; }
.rr-main h3 a { color: var(--fg); text-decoration: none; }
.rr-main h3 a:hover { color: var(--brass); }
.rr-meta { margin: 2px 0 8px; color: var(--muted); font-size: .88rem; }
.rr-body { margin: 0 0 8px; font-family: var(--f-hand); font-size: 1.3rem; line-height: 1.35; }
.rr-body.spoiler { font-family: inherit; font-size: 1rem; }
.rr-tags { margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 5px; }
.rr-tag { padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.rr-acts { margin: 0; display: flex; gap: 14px; flex-wrap: wrap; }
@media (max-width: 520px) { .rr-item { gap: 12px; padding: 12px; } .rr-cover, .rr-img, .rr-blank { width: 60px; } }
/* deal tag + prices on blog book cards */
.pb-tag { display: inline-block; margin: 0 0 6px; padding: 2px 10px; border-radius: 999px; background: #d4243b; color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.pb-card.has-tag { border-color: rgba(212, 36, 59, .55); }
.pb-price { margin: 0 0 10px; }
.pb-price-line { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.pb-price-line s { color: var(--muted); }
.pb-now { color: #B3261E; font-size: 1.25rem; }
.pb-off { padding: 1px 8px; border-radius: 6px; background: rgba(212, 36, 59, .18); color: #B3261E; font-size: .8rem; font-weight: 700; }
.pb-price-note { margin: 2px 0 0; color: var(--muted); font-size: .78rem; font-style: italic; }
.pb-deal-row { display: flex; flex-wrap: wrap; gap: 10px; }
.pb-deal-row label { display: flex; flex-direction: column; gap: 3px; flex: 1 1 120px; }

/* =====================================================================
   INK & BLUSH — overrides (kept at the end so the old rules stay readable)
   Accent rules: blush #F2A5A0 for fills/pills, deep coral var(--brass) for text.
   ===================================================================== */
h1, h2, h3, .logo { font-family: var(--f-display); letter-spacing: -.012em; font-optical-sizing: auto; }
h1, h1.page { font-weight: 700; }
.logo { font-weight: 700; }
.logo em { color: var(--fg); font-style: normal; }
a { text-underline-offset: 2px; }
body { font-feature-settings: "ss01" 0; }

/* header + nav */
.site-head { border-bottom: 1px solid var(--line); }
.site-nav a { color: var(--fg); font-weight: 500; }
.site-nav a:hover { color: var(--brass); }
.site-nav a[aria-current="page"] { border-bottom: 3px solid var(--blush); }
#signin-btn { background: var(--blush); border-color: var(--blush); color: var(--brass-ink); font-weight: 600; }
#signin-btn:hover { background: var(--blush-hover); border-color: var(--blush-hover); }

/* buttons */
.btn { background: #fff; border: 1.5px solid rgba(26,26,26,.28); font-weight: 600; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--fg); background: var(--blush-soft); }
.btn.primary { background: var(--blush); border-color: var(--blush); color: var(--brass-ink); }
.btn.primary:hover { background: var(--blush-hover); border-color: var(--blush-hover); }
.btn.google { background: #fff; border-color: rgba(26,26,26,.28); }
input[type=text], input[type=email], input[type=url], input[type=search], input[type=number], textarea, select { background: #fff; border: 1.5px solid rgba(26,26,26,.28); }
input:focus, textarea:focus, select:focus { border-color: var(--fg); }
/* Buy buttons: black pills (Amazon), outlined (everything else) */
.buy-ico.amazon { background: #1A1A1A; border-color: #1A1A1A; color: #fff; }
.buy-ico.amazon .buy-svg { color: #fff; }
.buy-ico.amazon:hover { background: #333; color: #fff; border-color: #333; }
.cta a.btn[href*="amazon"], .cta a.btn[href*="amzn"] { background: #1A1A1A; border-color: #1A1A1A; color: #fff; }
.cta a.btn[href*="amazon"]:hover, .cta a.btn[href*="amzn"]:hover { background: #333; }

/* tags / genre pills: blush */
.tag.genre, .chip.genre { background: var(--blush); border-color: var(--blush); color: var(--brass-ink); font-weight: 600; }
a.tag.genre:hover, a.chip.genre:hover { background: var(--blush-hover); border-color: var(--blush-hover); }
.tag, .chip { background: #fff; }
.chip[aria-pressed="true"] { color: var(--brass-ink); }

/* panels read as clean white cards on cream */
.panel, .home-tile, .botd { box-shadow: 0 1px 2px rgba(26,26,26,.04); }
.home-tile:hover, .home-tile:focus-visible { background: #fff; border-color: var(--fg); }
.cover, .cover.has-img, .botd-cover { box-shadow: 0 10px 24px rgba(26,26,26,.18); }

/* dark floating bits keep readable text */
.tip, .toast { color: #FBF7F2; }
.req-ribbon { color: var(--fg); }

/* ===== Community Phase 1: Question of the Week, book cards in threads, upvotes + Hot/New/Top (Ink & Blush) ===== */
.qotw { background: #F2A5A0; color: #1A1A1A; border-radius: 16px; padding: 20px 22px; margin: 0 0 16px; }
.qotw-tag { display: inline-flex; align-items: center; gap: 6px; background: #1A1A1A; color: #fff; border-radius: 999px; padding: 3px 12px; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.qotw-q { margin: 10px 0 6px; font-family: 'Fraunces', Georgia, serif; font-size: clamp(1.35rem, 3.4vw, 1.75rem); line-height: 1.18; font-weight: 700; color: #1A1A1A; overflow-wrap: anywhere; }
.qotw-text { margin: 0 0 14px; color: #1A1A1A; }
.qotw-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: .9rem; }
.qotw .btn { background: #1A1A1A; color: #fff; border-color: #1A1A1A; font-weight: 600; }
.qotw .btn:hover { background: #333; border-color: #333; }
.qotw-count, .qotw-note { color: #1A1A1A; }
.qotw-empty { background: #FBE9E7; border: 1.5px dashed rgba(26,26,26,.3); }
.th-badge.qotw { background: #F2A5A0; color: #1A1A1A; border-radius: 999px; padding: 1px 9px; font-size: .72rem; font-weight: 700; letter-spacing: .03em; margin-right: 6px; }
.th-card.is-qotw { border-color: #F2A5A0; }

.th-vote { flex: none; display: flex; align-items: flex-start; }
.th-vote .like-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-width: 44px; min-height: 44px; padding: 4px 6px; border: 1.5px solid rgba(26,26,26,.2); border-radius: 10px; background: #fff; color: #1A1A1A; font-size: .95rem; line-height: 1.15; white-space: pre-line; }
.th-vote .like-btn[aria-pressed="true"] { background: #F2A5A0; border-color: #F2A5A0; color: #1A1A1A; }
.th-vote .like-btn:hover:not(.own) { background: #FBE9E7; color: #1A1A1A; }
.th-vote .like-btn.own { background: rgba(26,26,26,.04); border-color: transparent; }
.th-sort { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 6px; }
.th-sort-btn { appearance: none; cursor: pointer; border: 1.5px solid rgba(26,26,26,.2); background: #fff; color: #1A1A1A; border-radius: 999px; padding: 6px 16px; font: inherit; font-size: .9rem; font-weight: 600; min-height: 36px; }
.th-sort-btn:hover { border-color: rgba(26,26,26,.45); }
.th-sort-btn[aria-pressed="true"] { background: #1A1A1A; border-color: #1A1A1A; color: #fff; }
.th-op .like-btn[aria-pressed="true"], .th-acts .like-btn[aria-pressed="true"] { color: #A23B35; }

.bm-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; }
.bm-card { display: flex; gap: 12px; align-items: flex-start; background: #FBF7F2; border: 1px solid var(--line); border-radius: 12px; padding: 10px; min-width: 0; }
.bm-cover-link { flex: none; display: block; }
.bm-cover { display: block; width: 56px; height: 84px; object-fit: cover; border-radius: 6px; box-shadow: 0 4px 12px rgba(26,26,26,.2); background: rgba(26,26,26,.08); }
.bm-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.bm-title { margin: 0; font-family: 'Fraunces', Georgia, serif; font-size: 1.05rem; line-height: 1.2; font-weight: 600; overflow-wrap: anywhere; }
.bm-title a { color: #1A1A1A; text-decoration: none; }
.bm-title a:hover { text-decoration: underline; }
.bm-by { margin: 0; font-size: .85rem; color: #5B534D; }
.bm-genres { margin: 2px 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.bm-genres .pb-g { background: #F2A5A0; color: #1A1A1A; font-weight: 600; font-size: .75rem; border-radius: 999px; padding: 1px 9px; }
.bm-acts { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 0; }
.bm-buy, .pb-buy { background: #1A1A1A; color: #fff; border-color: #1A1A1A; font-weight: 600; }
.bm-buy:hover, .pb-buy:hover { background: #333; border-color: #333; }
.bm-shop, .pb-shop { background: #fff; color: #1A1A1A; border: 1.5px solid rgba(26,26,26,.28); font-weight: 600; }
.th-bodywrap { min-width: 0; }
@media (max-width: 620px) {
  .th-top { flex-wrap: wrap; }
  .th-vote .like-btn { min-height: 44px; }
  .bm-cover { width: 48px; height: 72px; }
  .qotw { padding: 16px; }
}

/* ===== Community Book Club: nominate + vote, leaderboard, Currently reading banner (Ink & Blush) ===== */
.bc-teaser { background: #fff; border: 1.5px solid #F2A5A0; border-radius: 16px; padding: 18px 20px; margin: 0 0 16px; }
.bc-teaser-tag { display: inline-flex; background: #F2A5A0; color: #1A1A1A; border-radius: 999px; padding: 3px 12px; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.bc-teaser-q { margin: 10px 0 4px; font-family: 'Fraunces', Georgia, serif; font-size: clamp(1.2rem, 3vw, 1.5rem); line-height: 1.2; font-weight: 700; color: #1A1A1A; }
.bc-teaser-text { margin: 0 0 12px; color: #1A1A1A; }
.bc-teaser .btn { background: #1A1A1A; color: #fff; border-color: #1A1A1A; font-weight: 600; }
.bc-reading { display: flex; gap: 16px; align-items: center; background: #1A1A1A; color: #FBF7F2; border-radius: 16px; padding: 16px 18px; margin: 0 0 16px; }
.bc-reading-cover { flex: none; }
.bc-reading .bm-cover { width: 72px; height: 108px; }
.bc-reading-main { min-width: 0; }
.bc-tag { background: #F2A5A0 !important; color: #1A1A1A !important; }
.bc-reading-t { margin: 8px 0 2px; font-family: 'Fraunces', Georgia, serif; font-size: clamp(1.25rem, 3.4vw, 1.6rem); line-height: 1.15; color: #FBF7F2; overflow-wrap: anywhere; }
.bc-reading-by { margin: 0 0 10px; color: #E9DFD6; }
.bc-reading-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bc-reading-acts .bm-acts { margin: 0; }
.bc-reading .bm-buy { background: #F2A5A0; color: #1A1A1A; border-color: #F2A5A0; }
.bc-reading .bm-buy:hover { background: #E8837C; border-color: #E8837C; }
.bc-reading .btn { background: transparent; color: #FBF7F2; border: 1.5px solid rgba(251,247,242,.55); font-weight: 600; }
.bc-reading .bm-shop { background: #FBF7F2; color: #1A1A1A; border-color: #FBF7F2; }
.bc-head { margin: 0 0 12px; }
.bc-title { margin: 0 0 6px; font-family: 'Fraunces', Georgia, serif; font-size: 1.5rem; line-height: 1.15; }
.bc-dates { margin: 0 0 8px; line-height: 1.9; }
.bc-pill { display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: .78rem; font-weight: 700; background: rgba(26,26,26,.08); color: #1A1A1A; }
.bc-pill.on { background: #F2A5A0; }
.bc-msg { margin: 8px 0 0; font-size: .9rem; min-height: 0; }
.bc-msg:empty { display: none; }
.bc-msg.err { color: #A23B35; font-weight: 600; }
.bc-nominate { margin: 0 0 12px; }
.bc-results { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bc-hit { display: flex; gap: 10px; align-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #FBF7F2; }
.bc-hit-cover { flex: none; width: 36px; height: 54px; object-fit: cover; border-radius: 4px; background: rgba(26,26,26,.08); }
.bc-hit-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.bc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bc-item { display: grid; grid-template-columns: 28px 52px minmax(0, 1fr); gap: 10px; align-items: start; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.bc-item.lead { border-color: #F2A5A0; box-shadow: 0 0 0 1px #F2A5A0 inset; }
.bc-rank { font-family: 'Fraunces', Georgia, serif; font-weight: 700; font-size: 1.3rem; color: #5B534D; text-align: center; padding-top: 6px; }
.bc-vote { appearance: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 48px; min-height: 52px; border: 1.5px solid rgba(26,26,26,.25); background: #fff; color: #1A1A1A; border-radius: 10px; font: inherit; line-height: 1.15; }
.bc-vote b { font-size: 1rem; }
.bc-vote:hover:not(:disabled) { background: #FBE9E7; }
.bc-vote.on { background: #F2A5A0; border-color: #F2A5A0; }
.bc-vote:disabled { opacity: .55; cursor: default; }
.bc-card { min-width: 0; }
.bc-card .bm-card { margin: 0; }
.bc-by { margin: 6px 0 0; }
.bc-empty { text-align: center; }
.bc-winner { margin: 0 0 12px; border-color: #F2A5A0; }
.bc-winner-t { margin: 8px 0 2px; font-family: 'Fraunces', Georgia, serif; font-size: 1.35rem; }
@media (max-width: 620px) {
  .bc-item { grid-template-columns: 52px minmax(0, 1fr); }
  .bc-rank { display: none; }
  .bc-reading { align-items: flex-start; padding: 14px; }
  .bc-reading .bm-cover { width: 56px; height: 84px; }
}

/* This or That (daily poll) */
.tot { background: #fff; border: 1.5px solid #F2A5A0; border-radius: 16px; padding: 18px 20px; margin: 0 0 16px; }
.tot-tag { display: inline-block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brass, #A23B35); font-weight: 600; }
.tot-q { font-family: Fraunces, Georgia, serif; font-size: 1.25rem; line-height: 1.25; margin: 6px 0 14px; color: #1A1A1A; }
.tot-grid { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 10px; align-items: stretch; }
.tot-side { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 12px 8px; border: 1.5px solid rgba(26,26,26,.12); border-radius: 12px; background: #FBF7F2; min-width: 0; }
.tot-side.mine { border-color: #F2A5A0; background: #FDEEEC; }
.tot-or { align-self: center; font-family: Fraunces, Georgia, serif; font-style: italic; color: #5B534D; }
.tot-cover { display: block; line-height: 0; }
.tot-img { width: 92px; height: 138px; object-fit: cover; border-radius: 6px; box-shadow: 0 2px 8px rgba(26,26,26,.18); display: block; background: #eadfd6; }
.tot-title { margin: 4px 0 0; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.tot-trope { font-family: Fraunces, Georgia, serif; font-size: 1.15rem; }
.tot-by { margin: 0; font-size: .85rem; color: #5B534D; overflow-wrap: anywhere; }
.tot-vote { background: #F2A5A0; color: #1A1A1A; width: 100%; max-width: 180px; min-height: 44px; }
.tot-vote:hover { background: #E8837C; }
.tot-result { position: relative; width: 100%; max-width: 200px; min-height: 36px; border-radius: 10px; background: #fff; border: 1.5px solid rgba(26,26,26,.15); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.tot-bar { position: absolute; inset: 0 auto 0 0; background: rgba(242,165,160,.55); }
.tot-result.mine .tot-bar { background: #F2A5A0; }
.tot-pct { position: relative; font-weight: 600; font-size: .95rem; padding: 6px 8px; }
.tot-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 2px 0 0; }
.tot-foot { margin: 12px 0 0; font-size: .85rem; color: #5B534D; text-align: center; }
@media (max-width: 560px) { .tot-grid { grid-template-columns: minmax(0,1fr); } .tot-or { justify-self: center; } .tot-img { width: 80px; height: 120px; } }
