/* Fic Shelf: Apple Books bones, AO3 soul. */
@font-face { font-family: "Inter"; font-weight: 100 900; font-display: swap; src: url("/ao3/fonts/inter.woff2") format("woff2"); }
@font-face { font-family: "Nichrome"; font-weight: 900; font-display: swap; src: url("/ao3/fonts/nichrome.woff2") format("woff2"); }
/* AO3 red for every action, LifeSim charcoal for the frame, the LifeSim ring for progress. */
:root {
  --tint: #990000;
  --tint-soft: #9900001a;
  --bg: #f7f6f3;
  --bg2: #ffffff;
  --bg3: #eeece8;
  --label: #1c1c1e;
  --label2: #1c1c1e99;
  --label3: #1c1c1e4d;
  --sep: #1c1c1e1f;
  --fill: #1c1c1e12;
  --bar: #f7f6f3e0;
  --ink: #1c1c1e;
  --ringc: #ffbb03, #ff8812 8%, #ff3b30 22%, #c10168 40%, #6e1bb0 60%, #003fff 78%, #3d8bff 90%, #ffbb03;
  --shadow: 0 1px 2px #1c1c1e14, 0 8px 20px #1c1c1e1a;
  --sf: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Nichrome", "Inter", Impact, sans-serif;
  --ny: "New York", ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --ao3: "Lucida Grande", "Lucida Sans Unicode", Verdana, Helvetica, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --tint: #ff5a4f; --tint-soft: #ff5a4f22;
    --bg: #141416; --bg2: #1e1e21; --bg3: #2a2a2f;
    --label: #f5f5f7; --label2: #f5f5f799; --label3: #f5f5f74d; --sep: #ffffff1a; --fill: #ffffff14;
    --bar: #141416e0; --shadow: 0 1px 2px #0008, 0 8px 20px #0009;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--label); font: 17px/1.35 var(--sf); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--tint); text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--label2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- layout ---------- */
#app { display: flex; min-height: 100%; }
.sidebar { display: none; }
.content { flex: 1; min-width: 0; padding: 0 20px calc(96px + var(--safe-b)); outline: none; }
@media (min-width: 900px) {
  .sidebar { display: block; width: 264px; flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 12px; border-right: 1px solid var(--sep); background: var(--bg); }
  .content { padding: 0 40px 60px; }
  .tabbar { display: none !important; }
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; font: 700 20px var(--sf); }
.side-brand img { width: 30px; height: 30px; border-radius: 7px; }
.side-h { font: 700 13px var(--sf); color: var(--label2); padding: 16px 10px 6px; letter-spacing: .01em; }
.side-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border-radius: 8px; font-size: 15px; text-align: left; }
.side-item:hover { background: var(--fill); }
.side-item.on { background: var(--tint); color: #fff; }
.side-item .ic { width: 22px; text-align: center; font-size: 16px; color: var(--tint); }
.side-item.on .ic { color: #fff; }
.side-item .ct { margin-left: auto; font-size: 13px; color: var(--label2); font-variant-numeric: tabular-nums; }
.side-item.on .ct { color: #fffc; }
.side-foot { padding: 20px 10px; font-size: 12px; color: var(--label2); line-height: 1.45; }

/* ---------- nav bar + large titles ---------- */
.navbar { position: sticky; top: 0; z-index: 5; margin: 0 -20px; padding: calc(8px + var(--safe-t)) 20px 8px; display: flex; align-items: center; gap: 12px; min-height: 52px;
  background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: .5px solid transparent; transition: border-color .2s; }
.navbar.scrolled { border-bottom-color: var(--sep); }
.navbar .small-title { position: absolute; left: 50%; transform: translateX(-50%); font: 600 17px var(--sf); opacity: 0; transition: opacity .2s; pointer-events: none; white-space: nowrap; }
.navbar.scrolled .small-title { opacity: 1; }
.navbar .right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
@media (min-width: 900px) { .navbar { margin: 0 -40px; padding: 10px 40px; } }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--tint); font-size: 18px; }
.icon-btn:hover { background: var(--fill); }
.icon-btn svg { width: 22px; height: 22px; }
.text-btn { color: var(--tint); font-size: 17px; padding: 4px 6px; }
.large-title { font: 700 34px/1.2 var(--sf); letter-spacing: .01em; margin: 4px 0 2px; }
.subtitle { color: var(--label2); font-size: 15px; margin: 0 0 18px; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; margin: 30px 0 10px; }
.section-h h2 { font: 700 22px var(--sf); margin: 0; letter-spacing: .01em; }
.section-h p { margin: 2px 0 0; font-size: 14px; color: var(--label2); }
.section-h a, .section-h button { font-size: 15px; color: var(--tint); white-space: nowrap; }

/* ---------- pills / segmented ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 99px; padding: 10px 20px; font: 600 16px var(--sf); background: var(--fill); color: var(--label); }
.btn-primary { background: var(--tint); color: #fff; }
.btn-wide { width: 100%; padding: 14px 20px; font-size: 17px; }
.btn-small { padding: 6px 14px; font-size: 14px; }
.btn:active { opacity: .7; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px 16px; padding: 0 20px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 14px; border-radius: 99px; background: var(--bg2); font-size: 15px; box-shadow: 0 0 0 .5px var(--sep); white-space: nowrap; }
.chip.on { background: var(--label); color: var(--bg2); box-shadow: none; }
.chip .ct { opacity: .55; margin-left: 4px; font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; background: var(--fill); border-radius: 9px; padding: 2px; }
.seg button { padding: 5px 14px; border-radius: 7px; font-size: 13px; font-weight: 500; }
.seg button.on { background: var(--bg2); box-shadow: 0 3px 8px #0000001f, 0 3px 1px #0000000a; }
@media (prefers-color-scheme: dark) { .seg button.on { background: #636366; } }

/* ---------- covers ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 26px 18px; }
@media (max-width: 420px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 22px 16px; } }
.book { display: flex; flex-direction: column; gap: 8px; text-align: left; min-width: 0; }
.cover { position: relative; aspect-ratio: 2 / 3; width: 100%; border-radius: 3px 5px 5px 3px; overflow: hidden; box-shadow: var(--shadow); color: #fff; display: flex; flex-direction: column; padding: 11% 10% 9% 13%; container-type: inline-size; transition: transform .2s; }
.book:hover .cover { transform: translateY(-3px); }
.cover::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 7%; background: linear-gradient(90deg, #0000004d, #ffffff26 40%, #0000 100%); }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, #ffffff30, #0000 40%, #0000002e); pointer-events: none; }
.cover .c-fandom { font: 600 6.8cqw/1.2 var(--sf); text-transform: uppercase; letter-spacing: .08em; opacity: .85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cover .c-title { font: 700 12.5cqw/1.08 var(--ny); margin-top: auto; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; text-wrap: balance; letter-spacing: -.01em; }
.cover .c-rule { width: 28%; height: 1.5px; background: currentColor; opacity: .6; margin: 7% 0; }
.cover .c-author { font: 500 7.6cqw/1.2 var(--sf); opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cover .c-rt { position: absolute; top: 5%; right: 6%; }
.cover.big { border-radius: 4px 7px 7px 4px; }
.book-meta { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--label2); min-height: 18px; }
.book-meta .new { color: #fff; background: var(--tint); font: 700 10px var(--sf); padding: 2px 6px; border-radius: 4px; letter-spacing: .04em; }
.book-meta .pct { font-variant-numeric: tabular-nums; }
.book-meta .wip { margin-left: auto; font: 600 11px var(--sf); background: var(--fill); padding: 1px 6px; border-radius: 4px; color: var(--label); }
.book-meta .fin { color: var(--label2); }
.book-meta .dots { margin-left: auto; font-size: 18px; line-height: 1; color: var(--label2); padding: 0 2px; }
.book-meta .wip + .dots { margin-left: 2px; }

/* AO3 required tags squares */
.rt4 { display: grid; grid-template-columns: repeat(2, var(--rt, 22px)); gap: 2px; flex: none; }
.rt4.one { grid-template-columns: var(--rt, 22px); }
.rt { width: var(--rt, 22px); height: var(--rt, 22px); border-radius: 3px; display: grid; place-items: center; font: 700 calc(var(--rt, 22px) * .5)/1 var(--sf); color: #fff; box-shadow: inset 0 0 0 1px #0000002e; }
.rt-g { background: #77a010; } .rt-t { background: #e5c900; color: #3a3300; } .rt-m { background: #e87d0d; } .rt-e { background: #9c0000; } .rt-nr { background: #fff; color: #888; }
.rt-w-yes { background: #9c0000; } .rt-w-choose { background: #e87d0d; } .rt-w-none { background: #fff; color: #bbb; } .rt-w-ext { background: #9c0000; }
.rt-c-ff { background: #c51f1f; } .rt-c-fm { background: #8a1fb1; } .rt-c-mm { background: #1f4fa8; } .rt-c-gen { background: #77a010; } .rt-c-other { background: #222; } .rt-c-none { background: #fff; }
.rt-c-multi { background: conic-gradient(#c51f1f 0 25%, #8a1fb1 0 50%, #1f4fa8 0 75%, #77a010 0); }
.rt-done { background: #77a010; } .rt-wip { background: #9c0000; } .rt-unk { background: #fff; color: #bbb; }

/* ---------- Reading Now ---------- */
.hero-card { display: flex; gap: 18px; padding: 18px; border-radius: 18px; background: var(--bg2); box-shadow: 0 0 0 .5px var(--sep); align-items: center; }
.hero-card .cover { width: 112px; flex: none; }
.hero-card h3 { font: 700 20px/1.2 var(--ny); margin: 0 0 4px; }
.hero-card .by { color: var(--label2); font-size: 15px; margin: 0 0 10px; }
.progress { height: 4px; border-radius: 4px; background: var(--fill); overflow: hidden; margin: 10px 0 8px; }
.progress i { display: block; height: 100%; background: var(--tint); border-radius: 4px; }
.hero-card .where { font-size: 13px; color: var(--label2); margin: 0 0 12px; }
.shelf-row { display: grid; grid-auto-flow: column; grid-auto-columns: 128px; gap: 16px; overflow-x: auto; margin: 0 -20px; padding: 4px 20px 14px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.shelf-row::-webkit-scrollbar { display: none; }
.shelf-row > * { scroll-snap-align: start; }
@media (min-width: 900px) { .shelf-row { margin: 0 -40px; padding: 4px 40px 14px; grid-auto-columns: 140px; } }
.goal { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; padding: 18px; border-radius: 18px; background: var(--bg2); box-shadow: 0 0 0 .5px var(--sep); }
.ring { width: 92px; height: 92px; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .lbl { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font: 700 24px/1 var(--sf); font-variant-numeric: tabular-nums; }
.ring .lbl small { display: block; font: 500 11px var(--sf); color: var(--label2); margin-top: 2px; }
.goal h3 { margin: 0 0 4px; font: 700 18px var(--sf); }
.goal p { margin: 0 0 4px; font-size: 14px; color: var(--label2); }
.goal s { opacity: .7; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.stat { background: var(--bg2); border-radius: 14px; padding: 12px 14px; box-shadow: 0 0 0 .5px var(--sep); }
.stat b { display: block; font: 700 22px var(--sf); font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--label2); }

/* empty state */
.empty { max-width: 560px; margin: 26px auto 0; text-align: center; }
.empty-art { position: relative; height: 170px; margin-bottom: 20px; }
.empty-art .cover { position: relative; width: 100%; }
.empty h2 { font: 700 28px/1.2 var(--ny); margin: 0 0 8px; }
.empty p { color: var(--label2); margin: 0 0 18px; font-size: 16px; line-height: 1.45; }
.empty .btns { display: flex; flex-direction: column; gap: 10px; align-items: stretch; max-width: 360px; margin: 0 auto 16px; }
.privacy { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: var(--label2); background: var(--bg2); padding: 8px 14px; border-radius: 99px; box-shadow: 0 0 0 .5px var(--sep); }
.where-box { text-align: left; margin-top: 22px; background: var(--bg2); border-radius: 14px; box-shadow: 0 0 0 .5px var(--sep); overflow: hidden; }
.where-box summary { padding: 14px 16px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.where-box summary::after { content: "›"; color: var(--label3); font-size: 22px; line-height: 1; transition: transform .2s; }
.where-box[open] summary::after { transform: rotate(90deg); }
.where-box dl { margin: 0; padding: 0 16px 14px; font-size: 15px; }
.where-box dt { font-weight: 600; margin-top: 10px; }
.where-box dd { margin: 2px 0 0; color: var(--label2); }

/* ---------- list rows (iOS grouped) ---------- */
.group { background: var(--bg2); border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 .5px var(--sep); margin-bottom: 18px; }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; min-height: 44px; width: 100%; text-align: left; position: relative; }
.row + .row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--sep); }
.row .grow { flex: 1; min-width: 0; }
.row .chev { color: var(--label3); font-size: 20px; }
.row .val { color: var(--label2); font-size: 15px; }
.row.danger { color: #ff3b30; }
.group-h { font-size: 13px; text-transform: uppercase; color: var(--label2); margin: 22px 16px 6px; letter-spacing: .02em; }
.group-f { font-size: 13px; color: var(--label2); margin: -10px 16px 18px; }

/* ---------- AO3 blurbs (list view + search) ---------- */
.blurbs { display: flex; flex-direction: column; gap: 12px; }
.blurb { background: var(--bg2); border-radius: 14px; padding: 14px 16px; box-shadow: 0 0 0 .5px var(--sep); font: 14px/1.5 var(--ao3); text-align: left; width: 100%; display: block; }
.blurb-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; }
.blurb h3 { font: 600 16px/1.3 var(--sf); margin: 0; color: var(--tint); }
.blurb h3 .by { color: var(--label); font-weight: 400; }
.blurb .fandoms { font-size: 13px; margin: 2px 0 0; color: var(--label2); }
.blurb .date { font-size: 12px; color: var(--label2); white-space: nowrap; }
.taglist { list-style: none; padding: 0; margin: 10px 0 6px; font-size: 13px; line-height: 1.75; }
.taglist li { display: inline; }
.taglist li:not(:last-child)::after { content: ", "; color: var(--label3); }
.taglist .tw { font-weight: 700; }
.taglist .tw::after { font-weight: 400; }
.taglist .tr { color: var(--label); }
.taglist .tg { color: var(--label2); }
.taglist button { color: inherit; border-bottom: 1px dotted var(--label3); }
.taglist button:hover { color: var(--tint); }
.blurb .summ { margin: 6px 0 6px 12px; font-size: 13.5px; color: var(--label); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.blurb .summ p { margin: 0 0 4px; }
.stats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 4px; font-size: 12px; color: var(--label2); margin: 6px 0 0; }
.stats dt { margin: 0; }
.stats dd { margin: 0 10px 0 0; color: var(--label); font-variant-numeric: tabular-nums; }
.spoiler-btn { font: 12px var(--ao3); color: var(--tint); border: 1px solid var(--sep); border-radius: 4px; padding: 1px 8px; margin-left: 4px; }

/* ---------- search & filters ---------- */
.searchbar { display: flex; align-items: center; gap: 8px; background: var(--fill); border-radius: 10px; padding: 8px 10px; margin: 6px 0 14px; }
.searchbar input { flex: 1; border: 0; background: none; outline: none; font-size: 17px; min-width: 0; }
.searchbar svg { width: 18px; height: 18px; color: var(--label2); flex: none; }
.filters { background: var(--bg2); border-radius: 14px; box-shadow: 0 0 0 .5px var(--sep); padding: 14px 16px; margin-bottom: 16px; font-size: 15px; }
.filters summary { font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; }
.filters summary .muted { font-weight: 400; font-size: 13px; }
.f-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 20px; margin-top: 14px; }
.f-grid h4 { margin: 0 0 6px; font: 600 13px var(--sf); color: var(--label2); text-transform: uppercase; letter-spacing: .02em; }
.f-grid label { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 15px; }
.f-grid input[type=checkbox], .f-grid input[type=radio] { accent-color: var(--tint); width: 17px; height: 17px; }
.tagpick { position: relative; }
.tagpick input { width: 100%; border: 0; background: var(--fill); border-radius: 8px; padding: 7px 10px; outline: none; font-size: 15px; }
.tagpick .sugg { position: absolute; z-index: 4; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--bg2); border-radius: 10px; box-shadow: var(--shadow); max-height: 220px; overflow: auto; }
.tagpick .sugg button { display: block; width: 100%; text-align: left; padding: 8px 12px; font-size: 14px; }
.tagpick .sugg button:hover, .tagpick .sugg button.hl { background: var(--fill); }
.picked { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.picked button { font-size: 13px; padding: 3px 10px; border-radius: 99px; background: var(--tint-soft); color: var(--tint); }
.picked.ex button { background: var(--fill); color: var(--label); text-decoration: line-through; }
.quick-ex { font-size: 13px; color: var(--label2); margin-top: 8px; }
.quick-ex button { color: var(--tint); margin-right: 8px; }
.wc { display: flex; gap: 8px; }
.wc input { width: 100%; border: 0; background: var(--fill); border-radius: 8px; padding: 7px 10px; outline: none; font-size: 15px; }

/* ---------- sheet (book page) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 30; background: #0006; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet { background: var(--bg); width: 100%; max-width: 720px; max-height: calc(100% - 28px - var(--safe-t)); border-radius: 14px 14px 0 0; overflow-y: auto; overscroll-behavior: contain; animation: up .35s cubic-bezier(.2, .9, .3, 1.04); padding-bottom: calc(24px + var(--safe-b)); }
@media (min-width: 760px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 16px; max-height: 88vh; } }
@keyframes up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
.sheet-grab { width: 36px; height: 5px; border-radius: 3px; background: var(--label3); margin: 7px auto 0; }
.sheet-top { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; padding: 8px 14px; background: linear-gradient(var(--bg) 60%, #0000); }
.close-x { width: 30px; height: 30px; border-radius: 50%; background: var(--fill); display: grid; place-items: center; color: var(--label2); font-size: 15px; font-weight: 700; }
.bp-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 24px 18px; }
.bp-cover { width: 168px; margin-bottom: 18px; }
.bp-cover .cover { width: 100%; }
.bp-hero h2 { font: 700 26px/1.15 var(--ny); margin: 0 0 6px; text-wrap: balance; }
.bp-hero .by { color: var(--tint); font-size: 17px; margin: 0 0 4px; }
.bp-hero .fan { color: var(--label2); font-size: 14px; margin: 0 0 16px; }
.bp-actions { display: flex; gap: 10px; width: 100%; max-width: 420px; }
.bp-actions .btn-primary { flex: 1; }
.bp-sub { font-size: 13px; color: var(--label2); margin-top: 10px; }
.bp-body { padding: 0 20px; }
.bp-card { background: var(--bg2); border-radius: 14px; padding: 16px; margin-bottom: 14px; box-shadow: 0 0 0 .5px var(--sep); }
.bp-card h3 { font: 700 13px var(--sf); text-transform: uppercase; color: var(--label2); margin: 0 0 10px; letter-spacing: .03em; }
.req { display: flex; gap: 14px; align-items: center; }
.req ul { list-style: none; padding: 0; margin: 0; font-size: 13px; line-height: 1.6; }
.tagdl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; margin: 0; font: 14px/1.5 var(--ao3); }
.tagdl dt { color: var(--label2); font-size: 13px; }
.tagdl dd { margin: 0; }
.tagdl dd .taglist { margin: 0; font-size: 14px; }
@media (max-width: 480px) { .tagdl { grid-template-columns: 1fr; gap: 2px; } .tagdl dd { margin-bottom: 8px; } }
.userstuff-sm { font: 16px/1.55 var(--ny); }
.userstuff-sm p { margin: 0 0 .7em; }
.statgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.statgrid div { display: flex; flex-direction: column; }
.statgrid b { font: 600 17px var(--sf); font-variant-numeric: tabular-nums; }
.statgrid span { font-size: 12px; color: var(--label2); }
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list button { display: flex; width: 100%; padding: 10px 0; text-align: left; gap: 10px; border-bottom: .5px solid var(--sep); font-size: 15px; align-items: baseline; }
.toc-list li:last-child button { border-bottom: 0; }
.toc-list .num { color: var(--label2); width: 26px; flex: none; font-variant-numeric: tabular-nums; }
.toc-list .t { flex: 1; }
.toc-list .w { color: var(--label2); font-size: 13px; }
.toc-list .read .t { color: var(--label2); }
.toc-list .cur .t { color: var(--tint); font-weight: 600; }
.source { font-size: 12px; color: var(--label2); margin: 6px 4px 0; line-height: 1.5; word-break: break-word; }

/* ---------- reader ---------- */
.reader { position: fixed; inset: 0; z-index: 40; background: var(--r-bg); color: var(--r-fg); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  --r-bg: #fff; --r-fg: #1d1d1f; --r-fg2: #6e6e73; --r-line: #00000017; --r-box: #f5f5f7; --r-accent: var(--tint); --r-font: var(--ny); --r-size: 19px; --r-lh: 1.6; --r-measure: 36em; --r-weight: 400; }
.reader[data-theme=quiet] { --r-bg: #4a4a4d; --r-fg: #d6d6d8; --r-fg2: #a5a5aa; --r-line: #ffffff1a; --r-box: #ffffff0f; --r-accent: #ffb3a7; }
.reader[data-theme=paper] { --r-bg: #efece6; --r-fg: #2b2a28; --r-fg2: #7a766e; --r-line: #00000014; --r-box: #00000008; }
.reader[data-theme=bold] { --r-bg: #fff; --r-fg: #000; --r-weight: 600; }
.reader[data-theme=calm] { --r-bg: #f2e3c9; --r-fg: #3b2f1e; --r-fg2: #806a4c; --r-line: #3b2f1e1f; --r-box: #3b2f1e0d; --r-accent: #9a4b1c; }
.reader[data-theme=focus] { --r-bg: #1b1a18; --r-fg: #f2e6d0; --r-fg2: #a3998a; --r-line: #ffffff17; --r-box: #ffffff0a; --r-accent: #ff9a7a; }
.reader[data-theme=archive] { --r-bg: #fff; --r-fg: #2a2a2a; --r-fg2: #666; --r-line: #ddd; --r-box: #f3f3f3; --r-accent: #990000; --r-font: var(--ao3) !important; }
.reader[data-theme=night] { --r-bg: #000; --r-fg: #b68a5c; --r-fg2: #6e5739; --r-line: #ffffff12; --r-box: #ffffff08; --r-accent: #c9773f; }
.r-top, .r-bottom { position: fixed; left: 0; right: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 0 10px;
  background: color-mix(in srgb, var(--r-bg) 82%, transparent); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px); transition: transform .28s ease, opacity .28s; }
.r-top { top: 0; height: calc(50px + var(--safe-t)); padding-top: var(--safe-t); border-bottom: .5px solid var(--r-line); }
.r-bottom { bottom: 0; flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 18px calc(10px + var(--safe-b)); border-top: .5px solid var(--r-line); }
.reader.chrome-off .r-top { transform: translateY(-100%); opacity: 0; }
.reader.chrome-off .r-bottom { transform: translateY(100%); opacity: 0; }
.r-top .r-title { flex: 1; text-align: center; font: 600 15px var(--sf); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--r-fg); }
.r-top .icon-btn { color: var(--r-accent); }
.r-top .icon-btn:hover { background: var(--r-box); }
.r-prog { height: 3px; border-radius: 3px; background: var(--r-line); overflow: hidden; }
.r-prog i { display: block; height: 100%; background: var(--r-accent); width: 0; transition: width .2s; }
.r-status { display: flex; justify-content: space-between; font: 12px var(--sf); color: var(--r-fg2); font-variant-numeric: tabular-nums; gap: 10px; }
.r-page { max-width: var(--r-measure); margin: 0 auto; padding: calc(80px + var(--safe-t)) 24px calc(110px + var(--safe-b)); font-family: var(--r-font); font-size: var(--r-size); line-height: var(--r-lh); font-weight: var(--r-weight); }
.r-page.justify .userstuff { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.r-work-head { text-align: center; margin-bottom: 40px; padding-bottom: 28px; border-bottom: 1px solid var(--r-line); }
.r-work-head h1 { font: 700 1.6em/1.15 var(--r-font); margin: 0 0 .3em; text-wrap: balance; }
.r-work-head .by { font: 500 .85em var(--sf); color: var(--r-fg2); }
.r-work-head .fan { font: .72em var(--sf); color: var(--r-fg2); margin-top: .4em; text-transform: uppercase; letter-spacing: .08em; }
.r-ch-head { text-align: center; margin: 0 0 1.6em; }
.r-ch-head .kicker { font: 600 .62em var(--sf); text-transform: uppercase; letter-spacing: .14em; color: var(--r-fg2); }
.r-ch-head h2 { font: 700 1.35em/1.2 var(--r-font); margin: .25em 0 0; text-wrap: balance; }
.r-ch-head .chby { font: .75em var(--sf); color: var(--r-fg2); margin-top: .4em; }
.r-chapter + .r-chapter { margin-top: 3em; padding-top: 3em; border-top: 1px solid var(--r-line); }
.note { background: var(--r-box); border: 1px solid var(--r-line); border-radius: 10px; margin: 0 0 1.6em; font-size: .82em; line-height: 1.5; overflow: hidden; }
.note > summary, .note > .nh { display: flex; align-items: center; gap: 6px; padding: .6em .9em; font: 600 .82em var(--sf); color: var(--r-fg2); text-transform: uppercase; letter-spacing: .06em; cursor: pointer; list-style: none; }
.note > summary::-webkit-details-marker { display: none; }
.note > summary::after { content: "+"; margin-left: auto; font-size: 1.3em; line-height: 1; }
.note[open] > summary::after { content: "–"; }
.note .nb { padding: 0 1em .8em; }
.note .nb p { margin: 0 0 .6em; }
.note .nb p:last-child { margin-bottom: 0; }
.notes-hidden .note.authornote { display: none; }
.userstuff { overflow-wrap: break-word; }
.userstuff p { margin: 0 0 1em; }
.userstuff img { max-width: 100%; height: auto; border-radius: 4px; }
.userstuff hr { border: 0; text-align: center; margin: 2em 0; }
.userstuff hr::after { content: "⁂"; color: var(--r-fg2); font-size: 1.1em; }
.userstuff blockquote { margin: 1em 0 1em 1em; padding-left: 1em; border-left: 3px solid var(--r-line); }
.userstuff a { color: var(--r-accent); text-decoration: underline; text-underline-offset: 2px; }
.userstuff table { border-collapse: collapse; max-width: 100%; display: block; overflow-x: auto; }
.userstuff td, .userstuff th { border: 1px solid var(--r-line); padding: 4px 8px; }
.userstuff h1, .userstuff h2, .userstuff h3 { font-family: inherit; line-height: 1.25; }
.hide-style .userstuff [style] { color: inherit !important; background: none !important; background-color: transparent !important; font-family: inherit !important; font-size: inherit !important; }
.hide-style .userstuff font { color: inherit !important; font-family: inherit !important; font-size: inherit !important; }
.r-nav { display: flex; justify-content: space-between; gap: 10px; margin: 2.4em 0 0; font-family: var(--sf); }
.r-nav button { flex: 1; padding: .8em 1em; border-radius: 12px; background: var(--r-box); border: 1px solid var(--r-line); color: var(--r-fg); font: 600 15px var(--sf); }
.r-nav button.next { background: var(--r-accent); color: #fff; border-color: transparent; }
.r-nav button:disabled { opacity: .35; }
.r-end { margin: 2.6em 0 0; padding: 1.4em; border-radius: 16px; border: 1px solid var(--r-line); background: var(--r-box); font: 15px/1.5 var(--sf); text-align: center; }
.r-end .msg { font: italic 1.05em/1.45 var(--r-font); margin: 0 0 1em; }
.r-end .msg s { opacity: .55; }
.r-end .row2 { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.r-end .flash { margin: .9em auto 0; padding: .5em .9em; border-radius: 8px; font-size: 14px; max-width: 360px; }
.flash.ok { background: #e3f1cf; color: #2f4a0d; border: 1px solid #b6d68a; }
.flash.again { background: #fbecc5; color: #5b4300; border: 1px solid #e8c766; }
.kudos-btn { display: inline-flex; align-items: center; gap: 6px; padding: .55em 1.2em; border-radius: 99px; border: 1px solid var(--r-line); background: var(--r-bg); color: var(--r-fg); font: 600 15px var(--sf); }
.kudos-btn .h { color: #d0021b; }
.kudos-btn.given { border-color: #d0021b66; }
.comment-box { margin-top: 1em; text-align: left; }
.comment-box textarea { width: 100%; min-height: 110px; border-radius: 12px; border: 1px solid var(--r-line); background: var(--r-bg); color: var(--r-fg); padding: 10px 12px; font: 15px/1.45 var(--sf); resize: vertical; outline: none; }
.comment-box .hint { font-size: 12px; color: var(--r-fg2); margin: 6px 2px 8px; }
.comment-box .saved { font-size: 13px; color: var(--r-fg2); margin: 8px 0 0; text-align: left; }
.comment-box .saved li { margin-bottom: 6px; }

/* panels in the reader (Aa + contents) */
.panel-wrap { position: fixed; inset: 0; z-index: 45; background: #0003; animation: fade .15s; }
.panel { position: fixed; z-index: 46; background: var(--bg2); color: var(--label); border-radius: 16px; box-shadow: 0 20px 60px #0005; overflow: auto; font: 15px var(--sf); animation: pop .22s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.panel.aa { right: 10px; top: calc(56px + var(--safe-t)); width: min(360px, calc(100% - 20px)); max-height: calc(100% - 80px); padding: 14px; }
.panel.toc { left: 10px; top: calc(56px + var(--safe-t)); width: min(420px, calc(100% - 20px)); max-height: calc(100% - 80px); padding: 6px 16px 14px; }
@media (max-width: 600px) {
  .panel.aa, .panel.toc { left: 0; right: 0; top: auto; bottom: 0; width: 100%; border-radius: 16px 16px 0 0; max-height: 82%; padding-bottom: calc(16px + var(--safe-b)); animation: up .3s cubic-bezier(.2, .9, .3, 1.04); }
}
.aa h4 { margin: 14px 2px 8px; font: 600 13px var(--sf); color: var(--label2); }
.aa h4:first-child { margin-top: 2px; }
.aa-size { display: grid; grid-template-columns: 1fr 1fr; background: var(--fill); border-radius: 10px; overflow: hidden; }
.aa-size button { padding: 10px; font-family: var(--ny); }
.aa-size button + button { border-left: .5px solid var(--sep); }
.aa-size .sm { font-size: 15px; } .aa-size .lg { font-size: 24px; }
.themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.theme { border-radius: 12px; padding: 12px 4px 8px; text-align: center; border: 2px solid transparent; box-shadow: 0 0 0 .5px var(--sep); }
.theme .aa-glyph { display: block; font: 600 22px var(--ny); line-height: 1; margin-bottom: 4px; }
.theme small { font: 600 11px var(--sf); }
.theme.on { border-color: var(--tint); }
.fontlist { display: grid; gap: 2px; background: var(--fill); border-radius: 10px; overflow: hidden; padding: 2px; }
.fontlist button { text-align: left; padding: 9px 12px; border-radius: 8px; font-size: 16px; display: flex; justify-content: space-between; }
.fontlist button.on { background: var(--bg2); }
.fontlist button.on::after { content: "✓"; color: var(--tint); font-family: var(--sf); }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: .5px solid var(--sep); }
.opt:last-child { border-bottom: 0; }
.opt .l { display: flex; flex-direction: column; }
.opt .l small { color: var(--label2); font-size: 12px; }
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--fill); border-radius: 31px; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px #00000026, 0 3px 1px #0000000f; transition: transform .2s; }
.switch input:checked + span { background: #34c759; }
.switch input:checked + span::after { transform: translateX(20px); }
.slider { width: 100%; accent-color: var(--tint); }
.toc .toc-mode { display: flex; justify-content: center; margin: 10px 0 6px; }
.toc h3 { font: 700 22px var(--sf); margin: 8px 0 6px; }

/* ---------- comments to post ---------- */
.cmt { background: var(--bg2); border-radius: 14px; padding: 14px 16px; box-shadow: 0 0 0 .5px var(--sep); margin-bottom: 12px; }
.cmt .where { font-size: 13px; color: var(--label2); margin: 0 0 6px; }
.cmt .where b { color: var(--label); }
.cmt blockquote { margin: 0 0 10px; font: 16px/1.5 var(--ny); white-space: pre-wrap; }
.cmt .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.cmt.posted { opacity: .55; }

/* ---------- tab bar ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around; padding: 6px 4px calc(4px + var(--safe-b)); background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: .5px solid var(--sep); }
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; font: 500 10px var(--sf); color: var(--label2); padding: 2px 10px; min-width: 64px; position: relative; }
.tabbar svg { width: 26px; height: 26px; }
.tabbar button.on { color: var(--tint); }
.tabbar .badge { position: absolute; top: -2px; right: 12px; min-width: 18px; height: 18px; border-radius: 9px; background: #ff3b30; color: #fff; font: 600 11px/18px var(--sf); padding: 0 5px; }

/* ---------- menus, toasts, drop ---------- */
.menu { position: fixed; z-index: 50; background: color-mix(in srgb, var(--bg2) 88%, transparent); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); border-radius: 13px; box-shadow: 0 12px 40px #0004, 0 0 0 .5px var(--sep); min-width: 230px; overflow: hidden; animation: pop .18s; }
.menu button { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; text-align: left; padding: 11px 16px; font-size: 16px; }
.menu button + button { border-top: .5px solid var(--sep); }
.menu button:hover { background: var(--fill); }
.menu button.danger { color: #ff3b30; }
.menu .mh { padding: 8px 16px; font-size: 12px; color: var(--label2); border-bottom: .5px solid var(--sep); }
.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translate(-50%, 30px); opacity: 0; pointer-events: none; background: #1c1c1ef2; color: #fff; padding: 11px 18px; border-radius: 14px; font: 15px/1.35 var(--sf); box-shadow: 0 10px 30px #0005; transition: transform .3s cubic-bezier(.2, .9, .3, 1.2), opacity .2s; z-index: 70; max-width: min(92vw, 460px); text-align: center; }
.toast.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.toast a { color: #ff9a8f; }
@media (min-width: 900px) { .toast { bottom: 30px; } }
.drop { position: fixed; inset: 0; z-index: 80; background: #0007; display: grid; place-items: center; padding: 20px; }
.drop-card { border: 3px dashed #fff; border-radius: 24px; padding: 40px 50px; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 20px; text-align: center; }
.drop-card .drop-icon { font-size: 50px; }
.drop-card span { font-size: 14px; opacity: .85; }
.importing { position: fixed; left: 50%; top: calc(14px + var(--safe-t)); transform: translateX(-50%); z-index: 75; background: var(--bg2); color: var(--label); border-radius: 99px; box-shadow: var(--shadow); padding: 8px 16px; font-size: 14px; display: flex; gap: 10px; align-items: center; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--fill); border-top-color: var(--tint); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.report { font-size: 14px; text-align: left; }
.report li { margin-bottom: 6px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ================= AO3 × LifeSim ================= */
body { font-family: var(--sf); }
.wordmark { font: 900 26px/1 var(--display); text-transform: uppercase; letter-spacing: .03em; color: var(--tint); position: relative; padding-bottom: 7px; display: inline-block; }
.wordmark::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--ringc)); }
.m-brand { padding: 4px 0 10px; }
@media (min-width: 900px) { .m-brand { display: none; } }
.large-title { font: 900 40px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; margin: 6px 0 6px; }
.section-h { margin: 34px 0 12px; }
.section-h h2 { font: 700 19px var(--sf); letter-spacing: -.01em; }
.subtitle { font-size: 14px; }

/* sidebar: LifeSim charcoal */
@media (min-width: 900px) {
  .sidebar { background: var(--ink); color: #f5f5f7; border-right: 0; padding: 22px 14px; display: flex !important; flex-direction: column; }
  .content { padding: 0 48px 60px; }
  .navbar { margin: 0 -48px; padding: 10px 48px; }
}
.side-brand { flex-direction: column; align-items: flex-start; gap: 6px; padding: 4px 10px 22px; }
.sidebar .wordmark { color: #fff; font-size: 30px; }
.side-tag { font-size: 12px; color: #ffffff80; font-weight: 500; }
.side-h { color: #ffffff59; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 18px 10px 6px; }
.side-item { padding: 7px 10px; border-radius: 8px; font-size: 14.5px; color: #ffffffd9; }
.side-item .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-item:hover { background: #ffffff12; }
.side-item.on { background: #990000; color: #fff; }
.side-item .ct { color: #ffffff66; }
.side-item.on .ct { color: #ffffffb3; }
.side-foot { margin-top: auto; padding: 22px 6px 4px; color: #ffffff66; font-size: 11.5px; }
.side-foot p { margin: 12px 4px 0; }
.sidebar .love { background: #ffffff0f; border-color: #ffffff1a; color: #fff; }

/* the credit */
.love { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px 7px 8px; border-radius: 99px; background: var(--bg2); border: 1px solid var(--sep); color: var(--label); font-size: 13px; text-decoration: none; }
.love img { border-radius: 50%; flex: none; }
.love-row { text-align: center; margin: 40px 0 10px; }
@media (min-width: 900px) { .content > .love-row { display: none; } }
.empty .love-row { display: block !important; }

/* status chip */
.status-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; background: var(--tint); color: #fff; font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.status-chip i { width: 7px; height: 7px; border-radius: 50%; background: #ffd0d0; }
.status-chip.up { background: #1e8f3c; }
.status-chip.up i { background: #9ff0ae; }

/* cards: flat, one hairline */
.hero-card, .goal, .stat, .bp-card, .blurb, .cmt, .filters, .group, .where-box, .chip, .privacy { box-shadow: none; border: 1px solid var(--sep); }
.hero-card { border-radius: 20px; padding: 20px; gap: 22px; }
.hero-card h3 { font: 700 22px/1.2 var(--ny); }
.goal { margin-top: 14px; border-radius: 20px; grid-template-columns: auto 1fr; padding: 18px 20px; }
.goal .ring { width: 84px; height: 84px; cursor: pointer; }
.goal h3 { font: 700 17px var(--sf); }
.goal p { font-size: 14px; color: var(--label); margin: 0 0 3px; }
.goal p.muted { color: var(--label2); font-size: 13px; }
.goal-stats { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border-top: 1px solid var(--sep); padding-top: 14px; margin-top: 2px; }
.goal-stats div { display: flex; flex-direction: column; cursor: default; }
.goal-stats div[role=button] { cursor: pointer; }
.goal-stats b { font: 800 20px var(--sf); font-variant-numeric: tabular-nums; }
.goal-stats span { font-size: 12.5px; color: var(--label2); }
@media (min-width: 700px) { .goal { grid-template-columns: auto 1fr auto; } .goal-stats { grid-column: auto; border-top: 0; border-left: 1px solid var(--sep); padding: 0 0 0 20px; margin: 0; gap: 22px; } }
.progress i { background: linear-gradient(90deg, var(--ringc)); }
.btn { font-family: var(--sf); }
.btn-primary { background: var(--tint); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
@media (prefers-color-scheme: dark) { .chip.on { background: #fff; color: var(--ink); } }

/* covers: AO3 red, LifeSim charcoal, paper */
.cover { border-radius: 4px 6px 6px 4px; padding: 12% 11% 10% 14%; }
.cover::after { background: linear-gradient(160deg, #ffffff1f, #0000 45%); }
.cover::before { width: 6%; background: linear-gradient(90deg, #00000038, #ffffff1a 50%, #0000); }
.cover.look-red { background: #990000; color: #fff; }
.cover.look-ink { background: #1c1c1e; color: #fff; }
.cover.look-ink .c-rule { background: linear-gradient(90deg, var(--ringc)); opacity: 1; height: 2px; }
.cover.look-paper { background: #fbfaf6; color: #1c1c1e; box-shadow: var(--shadow), inset 0 0 0 1px #1c1c1e14; }
.cover.look-paper .c-rule { background: #990000; opacity: 1; height: 2px; }
.cover.look-paper .c-fandom { color: #990000; opacity: 1; }
.cover .c-rule { width: 24%; }
.cover .c-fandom { font-family: var(--sf); font-weight: 700; }
.cover .c-author { font-family: var(--sf); }
.book-meta .new { background: var(--tint); }

/* tab bar */
.tabbar { border-top: 1px solid var(--sep); }
.tabbar button { font-family: var(--sf); font-weight: 600; }
.tabbar .badge { background: var(--tint); }

/* book page */
.sheet { background: var(--bg); }
.bp-hero h2 { font: 700 28px/1.15 var(--ny); }
.bp-hero .by { font-weight: 600; }
.bp-card h3 { font: 900 16px var(--display); letter-spacing: .05em; color: var(--label); }
.panel { font-family: var(--sf); }
.theme.on { border-color: var(--tint); }
.r-top .r-title, .r-status, .r-nav button, .kudos-btn, .r-end { font-family: var(--sf); }

/* LifeSim blue, in more places, AO3 red still on every action */
:root { --ls-blue: #007aff; }
@media (prefers-color-scheme: dark) { :root { --ls-blue: #3d9bff; } }
.x { color: var(--ls-blue); font-weight: 800; }
.sidebar .x { color: #5fb0ff; }
.side-tag { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #ffffffb3; }
.m-brand { display: flex; align-items: flex-end; gap: 12px; }
.m-tag { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--label2); padding-bottom: 9px; }
.love-now { margin: 16px 0 4px; max-width: 640px; }
.empty .love-now { max-width: 420px; margin: 22px auto 0; }
.side-love { padding: 0 2px 14px; }
.side-love .ls-love { width: 100%; }
.side-love .ls-txt small { white-space: nowrap; }
@media (min-width: 900px) { .m-brand { display: none; } }
.chip.on { background: var(--ls-blue); color: #fff; border-color: var(--ls-blue); }
@media (prefers-color-scheme: dark) { .chip.on { background: var(--ls-blue); color: #fff; } }
.progress i, .r-prog i { background: var(--ls-blue); }
.book-meta .pct { color: var(--ls-blue); font-weight: 600; }
.status-chip { background: #990000; color: #fff; }
.status-chip b { font-weight: 800; margin-left: 2px; }
.status-chip i { background: #ffb3ad; }
.status-chip:hover { background: #7d0000; }

/* No gradient under the wordmark; the credit lives in the sticky top bar */
.wordmark { padding-bottom: 0; }
.wordmark::after { content: none; }
.m-brand { padding: 2px 0 6px; }
.nav-love { display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 13px 4px 4px; border-radius: 99px; text-decoration: none; color: #fff; line-height: 1.1;
  background: linear-gradient(180deg, #ffffff40, #fff0 50%), radial-gradient(circle at 25% 20%, #5fb0ff, #1f8bff 40%, #007aff 75%, #0064d6);
  box-shadow: 0 2px 10px #007aff4d, inset 0 1px 0 #fff6; }
.nav-love img { width: 30px; height: 30px; border-radius: 50%; background: #0b1530; padding: 2px; flex: none; }
.nav-love span { display: flex; flex-direction: column; min-width: 0; white-space: nowrap; }
.nav-love small { font-size: 10.5px; font-weight: 600; opacity: .9; }
.nav-love b { font: 800 14px var(--sf); }
.nav-love:hover { filter: brightness(1.08); }
@media (max-width: 899px) { .navbar .small-title { display: none; } }
@media (min-width: 900px) { .nav-love span { flex-direction: row; gap: 5px; align-items: baseline; } .nav-love small { font-size: 13px; } .nav-love b { font-size: 13px; } .nav-love { padding-right: 15px; } }
@media (max-width: 360px) { .nav-love { gap: 6px; padding-right: 10px; } .nav-love img { width: 26px; height: 26px; } .nav-love small { font-size: 9.5px; } .nav-love b { font-size: 12.5px; } }

/* LifeSim link: "Your fav fic in <city>", in the tab bar and the sidebar */
.ls-city-link { text-decoration: none; }
.lsc-logo { position: relative; display: inline-grid; place-items: center; flex: none; }
.lsc-logo img { border-radius: 50%; background: #0b1530; padding: 2px; display: block; }
.lsc-logo .ext { position: absolute; right: -4px; top: -3px; width: 13px; height: 13px; padding: 2px; border-radius: 50%; background: var(--ls-blue); color: #fff; box-shadow: 0 0 0 1.5px var(--bar); }
.ls-city { display: inline-block; transition: opacity .25s, transform .25s; }
.ls-city.out { opacity: 0; transform: translateY(4px); }
/* tab bar */
.ls-city-link.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 2px 4px; min-width: 0; flex: 0 1 108px; color: var(--ls-blue); font: 600 10px/1.15 var(--sf); text-align: center; }
.ls-city-link.tab .lsc-logo img { width: 26px; height: 26px; }
.ls-city-link.tab .lsc-txt { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-city-link.tab b { font-weight: 800; }
.tabbar button { min-width: 0; flex: 1 1 0; padding: 2px 4px; }
/* sidebar */
.ls-city-link.side { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; padding: 9px 10px; border-radius: 12px; color: #fff; font-size: 14px;
  background: linear-gradient(180deg, #ffffff30, #fff0 50%), radial-gradient(circle at 20% 20%, #5fb0ff, #1f8bff 40%, #007aff 75%, #0064d6); box-shadow: 0 4px 14px #007aff40, inset 0 1px 0 #fff5; }
.ls-city-link.side .lsc-logo img { width: 28px; height: 28px; }
.ls-city-link.side .lsc-logo .ext { display: none; }
.ls-city-link.side .lsc-txt { flex: 1; min-width: 0; line-height: 1.2; }
.ls-city-link.side b { display: block; font: 800 15px var(--sf); }
.ls-city-link.side .lsc-ext { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; opacity: .85; align-self: flex-start; }
.ls-city-link.side .lsc-ext .ext { width: 11px; height: 11px; }
.ls-city-link.side:hover { filter: brightness(1.08); }
.tabbar button span { white-space: nowrap; }
.ls-city-link.tab { flex: 1.25 1 0; gap: 1px; }
.ls-city-link.tab .lsc-txt { display: flex; flex-direction: column; line-height: 1.12; white-space: nowrap; overflow: visible; }
.ls-city-link.tab .lsc-logo img { width: 24px; height: 24px; }
.side-brand + .ls-city-link.side { margin: -8px 0 14px; }

/* the LifeSim wordmark in the top-bar pill and the sidebar button */
.nav-love .nav-mark { height: 19px; width: auto; display: block; margin-top: 1px; filter: drop-shadow(0 1px 2px #0003); }
@media (min-width: 900px) { .nav-love span { align-items: center; } .nav-love .nav-mark { height: 18px; margin-top: 0; } }
.ls-city-link.side .lsc-ext { align-items: center; gap: 2px; }
.ls-city-link.side .side-mark { height: 17px; width: auto; display: block; }

/* The pill: the text, then the LifeSim wordmark at its own ratio (never stretched, no shadow). */
.nav-love { flex-direction: row; align-items: center; gap: 8px; padding: 5px 14px; }
.nav-love small { font-size: 12px; font-weight: 600; white-space: nowrap; }
.nav-love .nav-mark { height: 24px !important; width: auto !important; max-width: none; flex: none; align-self: center; filter: none !important; margin: 0 !important; object-fit: contain; }
.ls-city-link.side .side-mark { width: auto; flex: none; filter: none; }
@media (max-width: 899px) { .nav-love small { font-size: 11px; } .nav-love .nav-mark { height: 22px !important; } }
@media (max-width: 360px) { .nav-love { gap: 6px; padding: 4px 10px; } .nav-love small { font-size: 10px; } .nav-love .nav-mark { height: 19px !important; } }
.nav-love .nav-mark { border-radius: 0 !important; background: none !important; padding: 0 !important; }
@media (max-width: 360px) { .nav-love small { white-space: normal; width: 64px; line-height: 1.1; } }
