/* =========================================================================
   FOLIO HOME — clean, calm, crisp.
   Interface tokens apply to every surface outside the reading page.
   Ghana green leads, gold highlights, kente as a fine accent.
   ========================================================================= */
.home, #discover, #seriesView, .add-sheet, .add-scrim, .import-tray, .menu, .bindery, .toast, #seriesSheet {
  --desk: #F5F3EE; --desk-2: #ECE8E0;
  --card: #FFFFFF; --chip: #F2EFE9; --btn: #FFFFFF;
  --ink: #1B1A17; --ink-2: #5D584F; --ink-3: #9A948A;
  --rule: #EAE5DC;
  --accent: #1E6B45; --accent-ink: #FFFFFF; --accent-2: #E3A21A; --accent-soft: #E7F1EA;
  --shadow: 32, 26, 16;
  --tooth-o: 0;
  --ui: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-family: var(--ui);
}
body[data-theme="night"] :is(.home, #discover, #seriesView, .add-sheet, .add-scrim, .import-tray, .menu, .bindery, .toast, #seriesSheet) {
  --desk: #121311; --desk-2: #1A1B19;
  --card: #1B1C1A; --chip: #252623; --btn: #262724;
  --ink: #EEEAE2; --ink-2: #B5AFA4; --ink-3: #7F7A70;
  --rule: #2B2C29;
  --accent: #3DA670; --accent-ink: #0D130F; --accent-2: #E8B23A; --accent-soft: #1C2B22;
  --shadow: 0, 0, 0;
}
.toast { font-family: var(--ui); }

/* ---- layout ---- */
#library.home {
  display: grid; grid-template-columns: 236px minmax(0, 1fr) 336px; gap: 0;
  padding: 0; background: var(--desk); color: var(--ink); overflow-y: auto; overflow-x: hidden;
}
.home .side {
  position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 6px;
  padding: calc(var(--safe-t) + 26px) 18px calc(var(--safe-b) + 20px); border-right: 1px solid var(--rule); background: var(--card);
}
.home-main { min-width: 0; padding: calc(var(--safe-t) + 22px) clamp(18px, 2.6vw, 34px) calc(var(--safe-b) + 40px); display: flex; flex-direction: column; gap: 26px; }
.home-side { padding: calc(var(--safe-t) + 22px) 22px calc(var(--safe-b) + 30px) 0; display: flex; flex-direction: column; gap: 18px; }

/* ---- sidebar ---- */
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; }
.brand b { font: 600 25px var(--display); letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; position: relative; overflow: hidden; }
.brand-mark::before { content: ""; width: 15px; height: 18px; border: 2.2px solid #fff; border-radius: 2px 4px 4px 2px; border-left-width: 4px; }
.brand-mark i { position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: repeating-linear-gradient(90deg, #E3A21A 0 6px, #1B1A17 6px 8px, #C2392B 8px 12px, #E3A21A 12px 16px); }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-label { margin: 16px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.nav {
  display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 12px;
  font-size: 14.5px; font-weight: 600; color: var(--ink-2); transition: background-color .15s, color .15s;
}
.nav svg { width: 20px; height: 20px; flex: none; }
.nav:hover { background: var(--chip); color: var(--ink); }
.nav.on { background: var(--accent-soft); color: var(--accent); }
.side-card { margin-top: auto; position: relative; overflow: hidden; padding: 18px 16px 16px; border-radius: 16px; background: var(--chip); display: flex; flex-direction: column; }
.side-card .kente { position: absolute; top: 0; left: 0; right: 0; bottom: auto; height: 5px; }
.side-card b { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1; margin-top: 4px; }
.side-card span { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-top: 4px; }
.side-card small { font-size: 12px; color: var(--ink-3); margin-top: 6px; }

/* ---- buttons & fields ---- */
.home .btn-primary, .home .btn-soft, .btn-primary, .btn-soft {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px;
  border-radius: 12px; font: 700 14.5px var(--ui); white-space: nowrap; transition: transform .15s, filter .15s, background-color .15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-soft { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }
.btn-soft:hover { background: var(--chip); }
.btn-primary:active, .btn-soft:active { transform: scale(.97); }
.btn-primary svg, .btn-soft svg { width: 18px; height: 18px; stroke-width: 2.2; }
.topbar { display: flex; gap: 12px; align-items: center; }
.search { flex: 1; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 12px; background: var(--card); box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink-3); }
.search:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent); }
.search svg { width: 19px; height: 19px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 500 14.5px var(--ui); color: var(--ink); }
.search input::placeholder { color: var(--ink-3); }

/* ---- hero banner ---- */
.hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 42%); min-height: 250px;
  border-radius: 22px; overflow: hidden; background: linear-gradient(135deg, #FBF1DF, #F7E7CB); color: #1B1A17;
}
body[data-theme="night"] .hero { background: linear-gradient(135deg, #2A2318, #211C14); color: #F1EADB; }
.hero-text { padding: clamp(22px, 3vw, 34px); display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 2; }
.hero-greet { margin: 0 0 8px; font-size: 13.5px; font-weight: 700; color: #9A6A12; letter-spacing: .01em; }
body[data-theme="night"] .hero-greet { color: #E8B23A; }
.hero h1 { margin: 0; font: 500 clamp(28px, 3.3vw, 40px) / 1.08 var(--display); letter-spacing: -.02em; max-width: 14ch; }
.hero-sub { margin: 10px 0 0; font-size: 14.5px; line-height: 1.55; color: color-mix(in srgb, currentColor 68%, transparent); max-width: 40ch; }
.hero-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.hero .btn-soft { background: rgba(255,255,255,.7); box-shadow: none; color: #1B1A17; }
body[data-theme="night"] .hero .btn-soft { background: rgba(255,255,255,.08); color: #F1EADB; }
.hero-art { position: relative; }
.hero-art picture, .hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-art img { object-fit: cover; object-position: 55% 52%; }
.hero-art::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, #F9EDD6 0%, rgba(249,237,214,.4) 9%, transparent 26%); }
body[data-theme="night"] .hero-art::before { background: linear-gradient(90deg, #271F15 0%, rgba(39,31,21,.4) 9%, transparent 26%); }
.hero-kente { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; z-index: 3; }

/* ---- sections ---- */
.block { display: flex; flex-direction: column; gap: 14px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.block-head h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.block-sub { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.view-toggle { display: flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--chip); }
.view-toggle button { width: 34px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-3); }
.view-toggle button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(var(--shadow), .12); }
.view-toggle svg { width: 17px; height: 17px; }
.chips { display: flex; gap: 8px; align-items: center; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips .tab {
  height: 36px; padding: 0 14px; border-radius: 10px; font: 600 13.5px var(--ui); color: var(--ink-2);
  background: var(--card); box-shadow: inset 0 0 0 1px var(--rule); white-space: nowrap;
}
.chips .tab.is-on { background: var(--ink); color: var(--card); box-shadow: none; }
.chips .tab.sort { background: none; box-shadow: none; font-style: normal; font-family: var(--ui); color: var(--ink-3); }
.chips-spacer { flex: 1; }

/* ---- covers: flat, crisp, with a hint of spine ---- */
.cv {
  position: relative; display: block; width: 100%; aspect-ratio: 2 / 3; border-radius: 6px 10px 10px 6px; overflow: hidden;
  background: var(--chip); box-shadow: 0 1px 2px rgba(var(--shadow), .12), 0 10px 22px -12px rgba(var(--shadow), .45);
  transition: transform .25s cubic-bezier(.3,.7,.2,1), box-shadow .25s;
}
.cv img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cv::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.22) 0, rgba(255,255,255,.16) 2.5%, rgba(0,0,0,.06) 4.5%, transparent 9%); }
.cv .cloth { position: absolute; inset: 0; }
.cv.lifted { visibility: hidden; }

.shelf.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 26px 20px; }
.card { display: flex; flex-direction: column; gap: 8px; min-width: 0; animation: rise .45s cubic-bezier(.3,.7,.2,1) both; }
.card > .cv { cursor: pointer; touch-action: manipulation; }
@media (hover: hover) { .card > .cv:hover, .card .cv-stack:hover .cv:last-child { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(var(--shadow), .12), 0 18px 30px -14px rgba(var(--shadow), .5); } }
.card > .cv:active { transform: scale(.97); }
.card-t { font-size: 14px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.card-a { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -4px; }
.card-p { display: flex; align-items: center; gap: 8px; }
.bar { flex: 1; height: 4px; border-radius: 4px; background: var(--chip); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.card-p small { font-size: 11.5px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cv.fresh { animation: cardDrop .8s cubic-bezier(.3,1.35,.5,1) both; }
@keyframes cardDrop { from { transform: translateY(-40px) scale(.9); opacity: 0; } }
/* a series: the covers fanned behind each other */
.cv-stack { position: relative; aspect-ratio: 2 / 3; cursor: pointer; margin-right: 14px; }
.cv-stack .cv { position: absolute; inset: 0; }
.cv-stack .cv:nth-child(1) { transform: translate(14px, -10px) scale(.9); filter: brightness(.82); }
.cv-stack .cv:nth-child(2) { transform: translate(7px, -5px) scale(.95); filter: brightness(.9); }
.cv-stack .count { position: absolute; z-index: 3; right: -10px; top: -14px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px;
  display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--accent-2); color: #1B1A17; box-shadow: 0 0 0 3px var(--desk); }

/* ---- continue reading row ---- */
.cr-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 14px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 8px; }
.cr-item { display: flex; gap: 14px; align-items: center; text-align: left; padding: 12px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1px var(--rule); transition: box-shadow .2s, transform .2s; }
.cr-item:hover { box-shadow: inset 0 0 0 1px var(--rule), 0 12px 24px -16px rgba(var(--shadow), .45); }
.cr-item:active { transform: scale(.98); }
.cr-item .cv { width: 64px; flex: none; border-radius: 4px 7px 7px 4px; }
.cr-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cr-info b { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-info span { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-info .card-p { margin-top: 8px; }

/* ---- right panel ---- */
.panel { background: var(--card); border-radius: 20px; padding: 20px; box-shadow: inset 0 0 0 1px var(--rule); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-head h3 { margin: 0; font-size: 16px; font-weight: 800; }
.now { display: flex; flex-direction: column; align-items: center; text-align: center; }
.now .eyebrow { align-self: stretch; text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px; }
.now .cv { width: 150px; box-shadow: 0 2px 4px rgba(var(--shadow), .14), 0 24px 40px -18px rgba(var(--shadow), .6); cursor: pointer; }
.now h3 { margin: 18px 0 2px; font: 500 21px / 1.2 var(--display); }
.now .by { font-size: 13.5px; color: var(--ink-3); }
.now .ser { margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }
.now-stats { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; margin: 18px 0; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.now-stats div { display: flex; flex-direction: column; gap: 2px; }
.now-stats div + div { border-left: 1px solid var(--rule); }
.now-stats b { font-size: 17px; font-weight: 800; }
.now-stats span { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.now .btn-primary { width: 100%; }
.now-empty { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; color: var(--ink-3); font-size: 14px; padding: 8px 0; }
.now-empty b { color: var(--ink); font-size: 16px; }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 16px; }
.week div { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.week i { width: 30px; height: 30px; border-radius: 50%; background: var(--chip); display: grid; place-items: center; }
.week .done i { background: var(--accent); }
.week .done i::after { content: ""; width: 9px; height: 5px; border: 2.2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.week .today { color: var(--ink); }
.week .today i { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent-2); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-grid div { padding: 12px 14px; border-radius: 14px; background: var(--chip); display: flex; flex-direction: column; gap: 2px; }
.stat-grid b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.stat-grid span { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.goal { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule); }
.goal-ring { position: relative; width: 52px; height: 52px; flex: none; }
.goal-ring svg { width: 52px; height: 52px; transform: rotate(-90deg); fill: none; stroke-width: 5; }
.goal-ring circle { stroke: var(--chip); }
.goal-ring .arc { stroke: var(--accent-2); stroke-linecap: round; stroke-dasharray: 113.1; stroke-dashoffset: 113.1; transition: stroke-dashoffset .8s cubic-bezier(.3,.7,.2,1); }
.goal-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 15px; font-weight: 800; }
.goal-text { flex: 1; display: flex; flex-direction: column; }
.goal-text b { font-size: 14px; font-weight: 800; }
.goal-text span { font-size: 12.5px; color: var(--ink-3); }
.goal-step { display: flex; gap: 4px; }
.goal-step button { width: 30px; height: 30px; border-radius: 8px; background: var(--chip); font-weight: 800; font-size: 16px; color: var(--ink-2); }

/* the 3D shelf view inside the clean layout */
.shelf:not(.grid) { padding-top: 6px; }
.home .empty { padding: 30px 10px 10px; }
.home .empty h2 { font: 500 28px var(--display); }
.home .empty-actions .btn-primary, .home .empty-actions .btn-soft { height: 46px; }

/* ---- portrait tablet: icon rail, panels below the hero ---- */
@media (max-width: 1179px) {
  #library.home { grid-template-columns: 84px minmax(0, 1fr); }
  .home .side { padding-inline: 12px; align-items: center; }
  .home .brand b, .side-label, .nav span, .side-card { display: none; }
  .brand { padding: 0 0 18px; }
  .nav { width: 52px; height: 48px; justify-content: center; padding: 0; }
}
.home-side.home-side-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 0; }
@media (max-width: 1179px) and (min-width: 761px) {
  .home-side-inline .now { flex-direction: row; text-align: left; align-items: center; gap: 18px; flex-wrap: wrap; }
  .home-side-inline .now .eyebrow { width: 100%; margin-bottom: 4px; }
  .home-side-inline .now .cv { width: 96px; }
  .home-side-inline .now .now-body { flex: 1; min-width: 160px; display: flex; flex-direction: column; align-items: flex-start; }
  .home-side-inline .now h3 { margin-top: 0; }
  .home-side-inline .now-stats { margin: 12px 0; }
}

/* ---- phones: bottom tab bar ---- */
@media (max-width: 760px) {
  #library.home { grid-template-columns: minmax(0, 1fr); padding-bottom: 72px; }
  .home .side { position: fixed; z-index: 20; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; padding: 6px 8px calc(var(--safe-b) + 6px); border-right: 0; border-top: 1px solid var(--rule); }
  .home .brand { display: none; }
  .side-nav { flex-direction: row; justify-content: space-around; width: 100%; }
  .nav { flex-direction: column; gap: 2px; height: 52px; width: auto; flex: 1; font-size: 10.5px; }
  .nav span { display: block; }
  #btnLibTheme { display: none; }
  .home-side-inline { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { height: 200px; order: -1; }
  .hero-art::before { background: linear-gradient(0deg, #F9EDD6 0%, transparent 30%); }
  .shelf.grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 20px 14px; }
}

/* --- polish --- */
/* generated cloth covers scale their lettering to the cover size */
.cv { container-type: inline-size; }
.cv .cloth { padding: 14% 11% 11%; }
.cv .cloth b { font-size: clamp(8px, 12.5cqw, 20px); line-height: 1.15; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.cv .cloth small { font-size: clamp(7px, 8cqw, 12px); }
.cv .cloth hr { margin: 6% auto; }
/* now-reading card sits at the top of its panel */
.home-side.home-side-inline .now { align-content: flex-start; align-self: start; }
/* hero buttons stay on one line where there's room */
.hero-actions { flex-wrap: nowrap; }
@media (max-width: 1340px) and (min-width: 1180px) { .hero { grid-template-columns: minmax(0, 1fr) 38%; } .hero-actions .btn-soft { padding: 0 14px; } }
@media (max-width: 520px) { .hero-actions { flex-wrap: wrap; } }

/* =========================================================================
   EDITORIAL PASS — fewer boxes, real typography, ink & paper
   ========================================================================= */
.home { --accent-soft: transparent; }
/* one quiet primary: ink, flat, no glow */
.btn-primary { background: var(--ink); color: var(--card); box-shadow: none; border-radius: 10px; }
.btn-primary:hover { filter: none; background: color-mix(in srgb, var(--ink) 86%, var(--accent)); }
.link-btn { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 4px; font: 700 14.5px var(--ui); color: inherit; border-bottom: 1.5px solid transparent; }
.link-btn svg { width: 17px; height: 17px; stroke-width: 2; transition: transform .2s; }
.link-btn:hover svg { transform: translateX(3px); }
.hero .link-btn { color: #1B1A17; }
body[data-theme="night"] .hero .link-btn { color: #F1EADB; }

/* sidebar: text, not pills */
.home .side { background: var(--desk); }
.nav.on { background: none; color: var(--ink); font-weight: 800; position: relative; }
.nav.on::before { content: ""; position: absolute; left: -18px; top: 11px; bottom: 11px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav:hover { background: none; color: var(--ink); }
.side-card { background: none; padding: 14px 12px 0; border-top: 1px solid var(--rule); border-radius: 0; }
.side-card .kente { display: none; }
.side-card b { font: 500 28px var(--display); }

/* the banner: a flat paper panel and the picture, cleanly cut */
.hero { background: #F1E8D8; border-radius: 18px; grid-template-columns: minmax(0, 1fr) 44%; min-height: 280px; }
body[data-theme="night"] .hero { background: #1E1B16; }
.hero-art::before { display: none; }
.hero-kente { height: 3px; }
.hero-greet { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #8A6A2A; }
.hero h1 { font-weight: 400; letter-spacing: -.025em; }
.hero h1.is-book { font-size: clamp(30px, 3.6vw, 46px); font-style: italic; max-width: 16ch; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-sub { font-size: 14px; }

/* section titles in the book face */
.block-head h2 { font: 400 25px var(--display); letter-spacing: -.015em; }
.block { gap: 16px; }
.home-main { gap: 38px; }

/* filters: quiet text, ink pill only when chosen */
.chips .tab { background: none; box-shadow: none; padding: 0 12px; color: var(--ink-3); }
.chips .tab:hover { color: var(--ink); }
.chips .tab.is-on { background: var(--ink); color: var(--card); }
.view-toggle { background: none; }
.view-toggle button.on { box-shadow: inset 0 0 0 1px var(--rule); }

/* continue reading: a calm list, hairline between rows */
.cr-row { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); grid-auto-columns: auto; gap: 0 28px; overflow: visible; padding: 0; }
.cr-item { background: none; box-shadow: none; border-radius: 0; border-top: 1px solid var(--rule); padding: 14px 0; }
.cr-item:hover { box-shadow: none; }
.cr-item .cv { width: 52px; }
.cr-info b { font: 500 16.5px var(--display); }

/* library grid: covers do the talking */
.shelf.grid { gap: 30px 22px; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }
.cv { border-radius: 3px 6px 6px 3px; box-shadow: 0 1px 1px rgba(var(--shadow), .12), 0 8px 18px -10px rgba(var(--shadow), .42); }
.card-t { font: 500 15px/1.25 var(--display); }
.card-p .bar { height: 2px; }
.bar i { background: var(--ink); }
body[data-theme="night"] .bar i { background: var(--accent); }
.cv-stack .count { background: var(--ink); color: var(--card); }

/* right column: no boxes, a hairline down the side */
.home-side { border-left: 1px solid var(--rule); padding-left: 26px; margin-top: 22px; margin-bottom: 22px; gap: 28px; }
.home-side.home-side-inline { border-left: 0; padding-left: 0; margin: 0; gap: 36px; }
.panel { background: none; box-shadow: none; padding: 0; border-radius: 0; }
.now { align-items: flex-start; text-align: left; }
.now .eyebrow { margin-bottom: 14px; }
.now .cv { width: 132px; }
.now-body { display: flex; flex-direction: column; align-items: flex-start; width: 100%; }
.now h3 { font: 400 23px/1.15 var(--display); margin-top: 16px; }
.now .ser { background: none; padding: 0; margin-top: 6px; color: var(--ink-2); font-weight: 600; }
.now-line { width: 100%; margin: 16px 0 6px; }
.now-line .bar { display: block; height: 2px; }
.now-meta { font-size: 12.5px; color: var(--ink-3); font-weight: 600; margin-bottom: 16px; }
.now .btn-primary { width: auto; }
.now-empty { align-items: flex-start; text-align: left; }
.panel-head h3 { font: 400 20px var(--display); }
.stat-grid div { background: none; padding: 0 0 10px; border-bottom: 1px solid var(--rule); border-radius: 0; }
.stat-grid b { font: 500 26px var(--display); }
.week i { width: 24px; height: 24px; }
.week .done i { background: var(--ink); }
body[data-theme="night"] .week .done i { background: var(--accent); }
.goal-step button { background: none; box-shadow: inset 0 0 0 1px var(--rule); }

@media (max-width: 1179px) and (min-width: 761px) {
  .home-side.home-side-inline { grid-template-columns: 1fr; }
  .home-side-inline .now { display: grid; grid-template-columns: 110px 1fr; gap: 0 22px; align-items: end; }
  .home-side-inline .now .eyebrow { grid-column: 1 / -1; }
  .home-side-inline .now .cv { width: 110px; }
  .home-side-inline .now h3 { margin-top: 0; }
}
@media (max-width: 760px) {
  .home-side { border-left: 0; padding-left: 0; }
  .hero { grid-template-columns: 1fr; }
}

/* hidden sheets must not cast shadows from just off-screen */
.add-sheet:not(.open), .sheet:not(.open) { box-shadow: none; visibility: hidden; transition: transform .5s var(--ease-paper), visibility 0s .5s; }
.add-sheet.open, .sheet.open { visibility: visible; transition: transform .5s var(--ease-paper); }
.import-tray:not(.on) { box-shadow: none; visibility: hidden; transition: transform .5s, visibility 0s .5s; }
.hero .link-btn, .hero .btn-primary { white-space: nowrap; }
.now .btn-soft { height: 40px; }
