/* NOTE: font-family/size/weight declarations below are mostly superseded by typography.css,
   which loads after this file and is the single source of truth for typography. The Limelight/
   Georgia and Quicksand mentions still in this file no longer take visual effect for the
   selectors typography.css covers — don't edit fonts here, edit typography.css instead. */
:root {
  --paper: #f7f3ea; --paper-2: #fffdf8; --ink: #1b1a17; --muted: #726f68;
  --line: #d9d3c7; --accent: #755c3b; --accent-soft: #e8ddcd;
  --success: #3e6a50; --danger: #a54a42; --shadow: 0 16px 40px rgba(44,35,25,.08);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); font-family: "Quicksand", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { margin: 0; min-height: 100vh; }
button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.no-select, .no-select * {
  -webkit-user-select: none !important; user-select: none !important;
  -webkit-touch-callout: none !important;
}
.app-header {
  position: sticky; top: 0; z-index: 20; min-height: 78px;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) 20px 14px;
  background: rgba(247,243,234,.94); backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(117,92,59,.16); touch-action: manipulation;
}
.app-header h1 { margin: 1px 0 0; font-size: 1.15rem; letter-spacing: -.02em; }
.eyebrow,.hero-kicker { margin:0; font-size:.68rem; font-weight:800; letter-spacing:.16em; color:var(--accent); }
.version { border:1px solid var(--line); border-radius:999px; padding:7px 10px; font-size:.75rem; font-weight:800; background:var(--paper-2); }
main { width:min(1040px,100%); margin:0 auto; padding:34px 18px 80px; }
.hero { padding:16px 0 24px; }
.hero h2 { max-width:800px; margin:10px 0 12px; font-family:"Limelight",Georgia,"Times New Roman",serif; font-size:clamp(2.25rem,7vw,4.9rem); line-height:.98; letter-spacing:-.055em; font-weight:600; }
.hero-copy { max-width:720px; color:var(--muted); font-size:1rem; line-height:1.65; }
.search-panel { margin-top:28px; padding:18px; background:var(--paper-2); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); }
.search-panel>label { display:block; margin-bottom:9px; font-size:.78rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.search-row { display:grid; grid-template-columns:1fr auto; gap:10px; }
.search-row input { min-width:0; width:100%; min-height:52px; border:1px solid var(--line); border-radius:12px; padding:0 15px; background:white; color:var(--ink); outline:none; }
.search-row input:focus,input:focus,select:focus { border-color:var(--accent); box-shadow:0 0 0 4px rgba(117,92,59,.12); outline:none; }
.search-row button,.primary-button { min-width:112px; border:0; border-radius:12px; background:var(--ink); color:white; padding:0 20px; font-weight:800; cursor:pointer; }
.search-row button:disabled { opacity:.65; cursor:wait; }
.button-spinner { display:none; width:18px; height:18px; border:2px solid rgba(255,255,255,.35); border-top-color:white; border-radius:50%; animation:spin .8s linear infinite; }
.loading .button-label { display:none; }.loading .button-spinner { display:inline-block; }
@keyframes spin { to { transform:rotate(360deg); } }
.search-options { display:flex; flex-wrap:wrap; gap:8px; margin-top:13px; }
.mode-option input { position:absolute; opacity:0; pointer-events:none; }
.mode-option span { display:block; padding:7px 10px; border:1px solid var(--line); border-radius:999px; color:var(--muted); font-size:.72rem; font-weight:800; cursor:pointer; }
.mode-option input:checked+span { background:var(--accent-soft); color:var(--accent); border-color:transparent; }
.search-tools { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:14px; }
.text-button { border:0; background:transparent; color:var(--accent); padding:4px 0; font-weight:800; cursor:pointer; }
.status-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:12px 0 36px; }
.status-grid.two-column { grid-template-columns:repeat(2,1fr); }
.status-card { display:flex; align-items:center; justify-content:space-between; min-height:82px; padding:16px; border:1px solid var(--line); border-radius:15px; background:rgba(255,253,248,.7); }
.status-label { margin:0 0 6px; color:var(--muted); font-size:.7rem; font-weight:800; text-transform:uppercase; letter-spacing:.09em; }
.status-value { margin:0; font-size:.95rem; font-weight:800; }
.status-dot { width:12px; height:12px; border-radius:50%; border:2px solid var(--line); }
.status-dot.loading { border-color:var(--accent); animation:pulse 1s ease-in-out infinite; }
.status-dot.success { border-color:var(--success); background:var(--success); }
.status-dot.error { border-color:var(--danger); background:var(--danger); }
@keyframes pulse { 50% { transform:scale(.7); opacity:.5; } }
.merge-mark { color:var(--accent); font-weight:900; font-size:.72rem; }
.results-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-bottom:13px; border-bottom:1px solid var(--line); }
.results-heading h2 { margin:4px 0 0; font-family:"Limelight",Georgia,"Times New Roman",serif; font-size:clamp(1.6rem,4vw,2.3rem); }
.heading-actions { display:flex; gap:8px; align-items:center; }
.icon-button { width:42px; height:42px; display:grid; place-items:center; border:1px solid var(--line); border-radius:50%; background:var(--paper-2); cursor:pointer; }
.icon-button svg { width:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.outline-button,.amazon-result-button { min-height:40px; border:1px solid var(--line); border-radius:10px; background:var(--paper-2); color:var(--ink); padding:0 12px; font-weight:800; cursor:pointer; }
.message { margin:22px 0; padding:17px 18px; border:1px dashed var(--line); border-radius:14px; color:var(--muted); line-height:1.5; }
.message.error { border-color:rgba(165,74,66,.45); color:var(--danger); background:rgba(165,74,66,.04); }
.results-list { display:grid; gap:14px; }
.book-card { display:grid; grid-template-columns:92px 1fr; gap:17px; padding:16px; border:1px solid var(--line); border-radius:var(--radius); background:var(--paper-2); box-shadow:0 8px 24px rgba(44,35,25,.045); }
.cover-wrap { position:relative; width:92px; aspect-ratio:2/3; overflow:hidden; border-radius:8px; background:var(--accent-soft); }
.book-cover { width:100%; height:100%; object-fit:cover; display:block; }
.cover-placeholder { position:absolute; inset:0; display:grid; place-items:center; padding:8px; text-align:center; color:var(--accent); font-size:.62rem; font-weight:900; letter-spacing:.08em; }
.book-content { min-width:0; }
.book-topline { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:23px; }
.provider-badges { display:flex; flex-wrap:wrap; gap:5px; }
.provider-badge,.score-badge { border:1px solid var(--line); border-radius:999px; padding:4px 7px; font-size:.62rem; font-weight:900; letter-spacing:.04em; text-transform:uppercase; }
.book-title { margin:10px 0 3px; font-family:"Limelight",Georgia,"Times New Roman",serif; font-size:1.35rem; line-height:1.12; }
.book-subtitle,.book-author { margin:4px 0; color:var(--muted); line-height:1.35; }
.book-author { color:var(--ink); font-weight:700; }.book-subtitle:empty { display:none; }
.book-meta { display:flex; flex-wrap:wrap; gap:7px; margin-top:12px; }
.meta-pill { padding:5px 8px; border-radius:7px; background:#f1ece3; color:var(--muted); font-size:.72rem; font-weight:700; }
.book-footer { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; margin-top:15px; padding-top:11px; border-top:1px solid #ebe5da; color:var(--muted); font-size:.72rem; }
.book-actions { margin-top:12px; }
.amazon-result-button { min-height:36px; font-size:.76rem; }
.import-dialog { width:min(680px,calc(100% - 24px)); border:0; padding:0; border-radius:20px; background:var(--paper-2); box-shadow:0 28px 80px rgba(0,0,0,.25); }
.import-dialog::backdrop { background:rgba(27,26,23,.55); backdrop-filter:blur(4px); }
.dialog-shell { padding:22px; }
.dialog-header { display:flex; justify-content:space-between; gap:18px; }
.dialog-header h2 { margin:5px 0 0; font-family:"Limelight",Georgia,"Times New Roman",serif; }
.dialog-close { border:0; background:transparent; font-size:1.8rem; line-height:1; cursor:pointer; }
.dialog-copy { color:var(--muted); line-height:1.5; }
.dialog-shell label { display:grid; gap:6px; color:var(--muted); font-size:.75rem; font-weight:800; }
.dialog-shell input,.dialog-shell select { width:100%; min-height:44px; border:1px solid var(--line); border-radius:10px; padding:0 11px; background:white; color:var(--ink); }
.dialog-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:14px; }
.full-width { grid-column:1/-1; }
.asin-readout { margin-top:13px; padding:10px 12px; background:#f1ece3; border-radius:10px; font-size:.78rem; color:var(--muted); }
.dialog-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:18px; }
.dialog-actions button { min-height:42px; }
@media(max-width:700px){ main{padding-top:22px}.status-grid.two-column{grid-template-columns:1fr}.status-card{min-height:68px}.results-heading{align-items:flex-start}.heading-actions{flex-direction:column-reverse;align-items:flex-end}.outline-button{font-size:.72rem}.dialog-grid{grid-template-columns:1fr}.full-width{grid-column:auto} }
@media(max-width:520px){ .search-row{grid-template-columns:1fr}.search-row button{min-height:50px}.search-tools{align-items:flex-start}.book-card{grid-template-columns:74px 1fr;gap:13px;padding:13px}.cover-wrap{width:74px}.score-badge{display:none}.book-title{font-size:1.15rem} }

.series-result-button {
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0 12px;
  font-size: .76rem;
  font-weight: 800;
  cursor: pointer;
}
.book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.book-series { margin:8px 0 0; color:var(--accent); font-size:.82rem; font-weight:900; }
.series-dialog { width:min(620px,calc(100% - 24px)); max-height:min(82vh,760px); border:0; padding:0; border-radius:20px; background:var(--paper-2); box-shadow:0 28px 80px rgba(0,0,0,.25); }
.series-dialog::backdrop { background:rgba(27,26,23,.55); backdrop-filter:blur(4px); }
.series-shell { padding:22px; }
.series-book-list { display:grid; gap:8px; margin-top:18px; }
.series-book-row { display:grid; grid-template-columns:42px 1fr auto; align-items:center; gap:11px; padding:12px; border:1px solid var(--line); border-radius:12px; background:white; }
.series-book-row.current { border-color:var(--accent); background:var(--accent-soft); }
.series-order { width:34px; height:34px; display:grid; place-items:center; border-radius:50%; background:var(--paper); font-weight:900; color:var(--accent); }
.series-book-title { margin:0; font-family:"Limelight",Georgia,"Times New Roman",serif; font-size:1rem; }
.series-current-label { color:var(--accent); font-size:.66rem; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.series-search-book { border:0; background:transparent; color:var(--accent); font-size:.72rem; font-weight:900; cursor:pointer; padding:6px; }
@media(max-width:520px){.series-book-row{grid-template-columns:36px 1fr}.series-search-book{grid-column:2;justify-self:start;padding-left:0}}

.result-group{margin:28px 0}.result-group-title{margin:0 0 12px;font-family:"Limelight",Georgia,"Times New Roman",serif;font-size:1.35rem}.result-group-list{display:grid;gap:14px}.provider-badges{max-width:100%}.provider-badge{white-space:nowrap}

.search-note{color:var(--muted);font-size:.75rem;font-weight:700}
.cover-options{display:flex;gap:7px;margin-top:12px;overflow-x:auto;padding-bottom:3px}
.cover-options[hidden],.edition-options[hidden]{display:none}
.cover-option{width:42px;height:62px;flex:0 0 auto;padding:0;overflow:hidden;border:2px solid transparent;border-radius:6px;background:var(--accent-soft);cursor:pointer}
.cover-option.active{border-color:var(--accent)}
.cover-option img{width:100%;height:100%;object-fit:cover;display:block}
.edition-options{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}
.edition-option{border:1px solid var(--line);border-radius:999px;background:#f4efe7;color:var(--muted);padding:6px 9px;font-size:.68rem;font-weight:800;cursor:pointer}
.edition-option.active{background:var(--accent-soft);color:var(--accent);border-color:transparent}

/* v0.6.3 compact result cards */
.cover-placeholder[hidden],.book-details[hidden]{display:none!important}
.book-card{grid-template-columns:72px 1fr;gap:14px;padding:12px;border-radius:12px;box-shadow:none}
.cover-wrap{width:72px;border-radius:7px;align-self:start}
.book-title{margin:2px 0 3px;font-family:inherit;font-size:1rem;line-height:1.24}
.book-subtitle,.book-author{margin:2px 0;font-size:.84rem;line-height:1.28}
.book-author{color:var(--muted);font-weight:500}
.book-series{margin:5px 0 0;font-size:.75rem}
.details-toggle{margin-top:7px;padding:0;border:0;background:transparent;color:var(--accent);font-size:.75rem;font-weight:800;cursor:pointer}
.book-details{grid-column:1/-1;margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}
.book-topline{min-height:auto;margin-bottom:9px}
.provider-badge,.score-badge{border:0;border-radius:6px;padding:0;color:var(--muted);font-size:.64rem;font-weight:700;text-transform:none;letter-spacing:0}
.provider-badge+.provider-badge:before{content:" · ";margin-right:5px}
.book-meta{display:block;margin-top:0;color:var(--muted);font-size:.75rem;line-height:1.4}
.cover-options{margin-top:10px}
.edition-options{display:block;margin-top:10px}
.edition-label{display:grid;gap:5px;color:var(--muted);font-size:.7rem;font-weight:800}
.edition-select{width:100%;min-height:40px;border:1px solid var(--line);border-radius:8px;background:white;padding:0 10px;color:var(--ink)}
.book-footer{margin-top:10px;padding-top:9px}
.book-actions{margin-top:9px;display:flex;flex-wrap:wrap;gap:8px}
.meta-pill,.edition-option{display:none}
@media(max-width:520px){.book-card{grid-template-columns:64px 1fr;gap:12px;padding:11px}.cover-wrap{width:64px}.book-title{font-size:.97rem}.book-details{grid-column:1/-1}}

/* v0.7.0 — shared home shell */
:root{
  --forest:#20382c;
  --forest-deep:#14241c;
  --forest-soft:#dfe8df;
  --walnut:#9a5c31;
  --walnut-dark:#75401f;
  --cream:#f3eee4;
  --ivory:#fffaf0;
  --gold:#d2a862;
  --shell-max:980px;
}
html[data-theme="dark"]{
  --paper:#14231b;
  --paper-2:#1b2d23;
  --ink:#f3ede1;
  --muted:#b9b1a4;
  --line:#34483c;
  --accent:#d0a464;
  --accent-soft:#283d31;
  color-scheme:dark;
}
html[data-theme="light"]{color-scheme:light}
body{padding-bottom:88px;background:var(--paper);transition:background .2s ease,color .2s ease}
.app-header{position:sticky;top:0;z-index:30;max-width:var(--shell-max);margin:0 auto;padding:14px 22px;background:color-mix(in srgb,var(--paper) 92%,transparent);backdrop-filter:blur(16px);border-bottom:1px solid var(--line)}
.brand-lockup{display:flex;align-items:center;gap:11px;border:0;background:transparent;color:var(--ink);padding:0;cursor:pointer;text-align:left}
.brand-monogram{width:40px;height:40px;display:grid;place-items:center;border-radius:12px;background:var(--forest);color:var(--ivory);font-family:"Limelight",Georgia,serif;font-weight:800;letter-spacing:.04em;box-shadow:inset 0 0 0 1px rgba(255,255,255,.1)}
.brand-copy{display:grid;line-height:1.05}.brand-copy strong{font-family:"Limelight",Georgia,serif;font-size:1.08rem}.brand-copy small{margin-top:5px;color:var(--muted);font-size:.68rem;font-weight:800;letter-spacing:.06em}
.header-actions{display:flex;align-items:center;gap:8px}.header-icon-button,.profile-button{width:40px;height:40px;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;background:var(--paper-2);color:var(--ink);cursor:pointer}.header-icon-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.profile-button{background:var(--walnut);border-color:transparent;color:#fff;font-weight:900}.theme-sun{display:none}html[data-theme="dark"] .theme-moon{display:none}html[data-theme="dark"] .theme-sun{display:block}
#appMain{max-width:var(--shell-max);margin:0 auto;padding:0 22px 34px}.app-page[hidden]{display:none!important}
.home-page{padding-top:24px}.home-hero{position:relative;overflow:hidden;display:flex;align-items:flex-end;justify-content:space-between;gap:28px;min-height:250px;padding:34px;border-radius:24px;background:linear-gradient(125deg,var(--forest-deep),var(--forest));color:var(--ivory);box-shadow:0 20px 45px rgba(26,38,30,.18)}.home-hero:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 76% 8%,rgba(255,221,160,.2),transparent 32%),linear-gradient(90deg,transparent 0 62%,rgba(255,255,255,.035) 62% 63%,transparent 63%)}.home-hero>*{position:relative}.home-hero h1{max-width:590px;margin:8px 0 10px;font-family:"Limelight",Georgia,"Times New Roman",serif;font-size:clamp(2.2rem,6vw,4.2rem);line-height:.98;letter-spacing:-.035em}.home-hero p:not(.home-kicker){max-width:530px;margin:0;color:rgba(255,250,240,.74);line-height:1.55}.home-kicker{margin:0;color:var(--gold);font-size:.67rem;font-weight:900;letter-spacing:.14em}.primary-wood-button{flex:none;display:inline-flex;align-items:center;gap:9px;min-height:48px;padding:0 18px;border:0;border-radius:13px;background:var(--walnut);color:white;font-weight:900;box-shadow:0 9px 22px rgba(0,0,0,.18);cursor:pointer}.primary-wood-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2}
.reading-nook{position:relative;overflow:hidden;margin-top:20px;padding:24px;border:1px solid var(--line);border-radius:20px;background:linear-gradient(180deg,color-mix(in srgb,var(--forest) 93%,black),var(--forest-deep));color:var(--ivory);box-shadow:0 12px 28px rgba(27,37,29,.13)}.reading-nook:after{content:"";position:absolute;left:24px;right:24px;bottom:18px;height:12px;border-radius:50%;background:rgba(0,0,0,.24);filter:blur(8px)}.nook-light{position:absolute;top:-80px;left:22%;width:220px;height:190px;background:radial-gradient(ellipse,rgba(255,225,168,.27),transparent 68%);pointer-events:none}.section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:15px}.section-heading.compact{position:relative}.section-heading h2{margin:4px 0 0;font-family:"Limelight",Georgia,"Times New Roman",serif;font-size:1.7rem}.reading-nook .section-heading h2{color:var(--ivory)}.quiet-link{border:0;background:transparent;color:var(--accent);font-weight:900;cursor:pointer;padding:5px}.reading-nook .quiet-link{color:var(--gold)}.current-book-empty{position:relative;z-index:1;display:flex;align-items:center;gap:18px;min-height:118px;padding:18px;border-radius:14px;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.08)}.current-book-empty h3{margin:0 0 6px;font-family:"Limelight",Georgia,serif;font-size:1.2rem}.current-book-empty p{margin:0;color:rgba(255,250,240,.65);font-size:.86rem}.empty-book{width:66px;height:88px;flex:none;position:relative;border-radius:4px 8px 8px 4px;background:linear-gradient(90deg,#8a542f 0 8px,#a9683a 8px);box-shadow:7px 9px 15px rgba(0,0,0,.28)}.empty-book:after{content:"";position:absolute;top:7px;bottom:7px;right:-4px;width:5px;border-radius:0 3px 3px 0;background:#e6d7b9}.empty-book span{position:absolute;left:18px;right:10px;top:17px;height:1px;background:rgba(255,255,255,.35);box-shadow:0 6px rgba(255,255,255,.2)}
.home-section{margin-top:30px}.shelf-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.shelf-card{display:flex;align-items:center;gap:13px;min-height:92px;padding:15px;border:1px solid var(--line);border-radius:16px;background:var(--paper-2);color:var(--ink);text-align:left;cursor:pointer;box-shadow:0 8px 22px rgba(40,31,22,.04)}.shelf-icon{width:42px;height:42px;flex:none;display:grid;place-items:center;border-radius:12px;background:var(--accent-soft);color:var(--accent)}.shelf-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.shelf-card>span:last-child{display:grid;gap:5px}.shelf-card strong{font-family:"Limelight",Georgia,serif;font-size:1.05rem}.shelf-card small{color:var(--muted)}.shelf-card b{color:var(--ink)}
.home-book-shelf{position:relative;min-height:160px;padding:18px 18px 30px;border-radius:18px;background:linear-gradient(180deg,color-mix(in srgb,var(--forest) 94%,black),var(--forest-deep));display:flex;gap:15px;align-items:flex-end;overflow-x:auto}.home-book-shelf:after{content:"";position:absolute;left:0;right:0;bottom:10px;height:16px;background:linear-gradient(#8d512d,#683719);box-shadow:0 5px 8px rgba(0,0,0,.3)}.empty-shelf{position:relative;z-index:1;width:100%;display:flex;align-items:center;justify-content:center;gap:20px;min-height:110px;border:1px dashed rgba(255,255,255,.18);border-radius:13px;background:rgba(255,255,255,.035);color:var(--ivory);cursor:pointer}.empty-shelf span:last-child{display:grid;gap:4px;text-align:left}.empty-shelf small{color:rgba(255,250,240,.62)}.empty-shelf-books{display:flex;align-items:flex-end;gap:4px}.empty-shelf-books i{display:block;width:14px;height:60px;border-radius:2px 3px 0 0;background:#a76338}.empty-shelf-books i:nth-child(2){height:76px;background:#d3b77d}.empty-shelf-books i:nth-child(3){height:52px;background:#6f8a73}.home-book{position:relative;z-index:1;width:88px;flex:0 0 auto}.home-book img,.home-cover-fallback{width:76px;aspect-ratio:2/3;object-fit:cover;border-radius:4px 6px 6px 4px;box-shadow:7px 8px 13px rgba(0,0,0,.32)}.home-cover-fallback{background:linear-gradient(120deg,#754525,#b47745)}.home-book h3{margin:9px 0 2px;color:var(--ivory);font-size:.72rem;line-height:1.2}.home-book p{margin:0;color:rgba(255,250,240,.58);font-size:.62rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.search-page-inner{padding-top:10px}.search-page .hero,.find-book-page .hero{padding-top:18px}.search-page .hero h2,.find-book-page .hero h2{font-size:clamp(2rem,6vw,3.5rem)}
html[data-theme="dark"] .book-card,html[data-theme="dark"] .status-card,html[data-theme="dark"] .search-panel,html[data-theme="dark"] .series-book-row{background:var(--paper-2)}html[data-theme="dark"] input,html[data-theme="dark"] select{background:#122019!important;color:var(--ink)!important;border-color:var(--line)!important}html[data-theme="dark"] .edition-select{background:#122019}html[data-theme="dark"] .message{background:rgba(255,255,255,.02)}
@media(max-width:700px){#appMain{padding-inline:14px}.app-header{padding-inline:15px}.home-hero{display:block;min-height:285px;padding:27px 23px}.home-hero h1{font-size:2.55rem}.primary-wood-button{margin-top:23px}.shelf-grid{grid-template-columns:1fr}.shelf-card{min-height:76px}.reading-nook{padding:19px}.home-book-shelf{margin-inline:-2px}}
@media(max-width:430px){.home-hero{border-radius:19px}.current-book-empty{align-items:flex-start}.empty-book{width:54px;height:74px}.section-heading h2{font-size:1.45rem}.brand-copy strong{font-size:1rem}}


/* v0.7.1 — V&Z Book Club home visual rules
   No gradients, vintage/retro 1990s, squared edges, compact layout. */
:root{
  --vz-paper:#eee5d2;
  --vz-paper-2:#f7f0df;
  --vz-ink:#28241e;
  --vz-muted:#6d665b;
  --vz-forest:#263b2e;
  --vz-forest-deep:#17251d;
  --vz-walnut:#704526;
  --vz-brass:#a98745;
  --vz-line:#b9ab91;
}
html[data-theme="dark"]{
  --vz-paper:#18251d;
  --vz-paper-2:#213129;
  --vz-ink:#eee4cf;
  --vz-muted:#b9ac94;
  --vz-forest:#1d3025;
  --vz-forest-deep:#111d16;
  --vz-walnut:#8b5a32;
  --vz-brass:#bd9a54;
  --vz-line:#48584c;
}
body{
  background:var(--vz-paper);
  color:var(--vz-ink);
  font-family:"Limelight",Georgia,"Times New Roman",serif;
}
.app-header{
  min-height:52px;
  padding-block:6px;
  border-bottom:2px solid var(--vz-line);
  background:var(--vz-paper-2);
  box-shadow:0 2px 0 rgba(55,43,28,.18);
}
.brand-lockup,.header-icon-button,.profile-button{border-radius:50%!important}
.brand-monogram{
  width:38px;height:32px;border-radius:10px!important;
  border:2px solid var(--vz-walnut);
  background:var(--vz-forest);
  color:#f4ead5;
  font-family:"Courier New",monospace;
  font-size:.72rem;
  letter-spacing:-.06em;
}
.brand-copy strong{
  font-family:"Limelight",Georgia,"Times New Roman",serif;
  font-variant:small-caps;
  letter-spacing:.035em;
}
.brand-copy small{font-family:"Courier New",monospace;letter-spacing:.03em}
.home-page{padding-top:12px}
.home-hero{
  min-height:178px;
  padding:20px 22px;
  border:2px solid #152119;
  border-radius:var(--radius);
  background:var(--vz-forest);
  color:#f5ead4;
  box-shadow:5px 5px 0 color-mix(in srgb,var(--vz-walnut) 72%,black);
}
.home-hero:before{display:none}
.home-hero h1{
  max-width:640px;
  margin:5px 0 7px;
  font-family:"Limelight",Georgia,"Times New Roman",serif;
  font-size:clamp(1.65rem,4.5vw,2.85rem);
  line-height:1.04;
  letter-spacing:-.015em;
}
.home-hero p:not(.home-kicker){max-width:590px;line-height:1.35;color:#d8ccb7;font-size:.88rem}
.home-kicker{
  color:#d0ae68;
  font-family:"Courier New",monospace;
  font-size:.62rem;
  letter-spacing:.09em;
}
.primary-wood-button{
  min-height:38px;
  padding:0 13px;
  border:2px outset #9a704d;
  border-radius:12px;
  background:var(--vz-walnut);
  box-shadow:none;
  font-family:"Courier New",monospace;
  font-size:.72rem;
  text-transform:uppercase;
  letter-spacing:.03em;
}
.primary-wood-button:active{border-style:inset}
.reading-nook{
  margin-top:14px;
  padding:15px;
  border:2px solid #142119;
  border-radius:16px;
  background:var(--vz-forest-deep);
  box-shadow:4px 4px 0 rgba(72,48,28,.55);
}
.reading-nook:after,.nook-light{display:none}
.section-heading{margin-bottom:9px}
.section-heading h2{margin-top:2px;font-size:1.28rem;letter-spacing:.005em}
.quiet-link{
  padding:3px 0;
  border-radius:8px;
  font-family:"Courier New",monospace;
  font-size:.68rem;
  text-transform:uppercase;
  text-decoration:underline;
}
.current-book-empty{
  min-height:88px;
  gap:12px;
  padding:11px;
  border:1px solid #556559;
  border-radius:14px;
  background:#203127;
}
.current-book-empty h3{margin-bottom:3px;font-size:1rem}
.current-book-empty p{font-size:.76rem;line-height:1.3}
.empty-book{
  width:47px;height:65px;
  border-radius:4px;
  background:#9b6238;
  border-left:7px solid #704326;
  box-shadow:4px 4px 0 rgba(0,0,0,.28);
}
.empty-book:after{border-radius:4px;background:#ddcfb3}
.home-section{margin-top:18px}
.shelf-grid{gap:7px}
.shelf-card{
  min-height:66px;
  gap:9px;
  padding:9px 10px;
  border:1px solid var(--vz-line);
  border-radius:12px;
  background:var(--vz-paper-2);
  color:var(--vz-ink);
  box-shadow:2px 2px 0 rgba(75,55,32,.13);
}
.shelf-icon{
  width:31px;height:31px;
  border:1px solid var(--vz-line);
  border-radius:10px;
  background:transparent;
  color:var(--vz-walnut);
}
.shelf-icon svg{width:17px;height:17px}
.shelf-card>span:last-child{gap:2px}
.shelf-card strong{font-size:.92rem}
.shelf-card small{font-size:.69rem;color:var(--vz-muted)}
.home-book-shelf{
  min-height:128px;
  padding:12px 12px 24px;
  border:2px solid #142119;
  border-radius:14px;
  background:var(--vz-forest-deep);
  gap:10px;
}
.home-book-shelf:after{
  bottom:7px;height:11px;
  background:var(--vz-walnut);
  border-top:1px solid #a77a50;
  box-shadow:0 3px 0 rgba(0,0,0,.28);
}
.empty-shelf{
  min-height:84px;
  gap:13px;
  border:1px dashed #647367;
  border-radius:14px;
  background:#203127;
}
.empty-shelf-books i{border-radius:3px;background:#9c6038}
.empty-shelf-books i:nth-child(2){background:#c1a66c}
.empty-shelf-books i:nth-child(3){background:#637b68}
.home-book{width:76px}
.home-book img,.home-cover-fallback{
  width:64px;
  border-radius:8px;
  box-shadow:4px 4px 0 rgba(0,0,0,.32);
}
.home-cover-fallback{background:#79502f}
.home-book h3{margin-top:6px;font-size:.65rem}.home-book p{font-size:.57rem}
@media(max-width:700px){
  #appMain{padding-inline:10px}
  .app-header{padding-inline:10px}
  .home-hero{min-height:0;padding:17px 15px}
  .home-hero h1{font-size:2rem}
  .primary-wood-button{margin-top:14px}
  .shelf-grid{grid-template-columns:repeat(3,1fr)}
  .shelf-card{display:grid;grid-template-columns:31px 1fr;min-width:0}
  .reading-nook{padding:12px}
}
@media(max-width:520px){
  .shelf-grid{grid-template-columns:1fr}
  .shelf-card{min-height:54px}
  .home-hero h1{font-size:1.72rem}
}


/* v0.7.3 virtual reading room home */
@media(min-width:700px){.home-page{max-width:560px}.app-header{max-width:560px}}




/* v0.7.14 headerless shell */
.app-header{display:none!important}
#appMain{margin-top:0!important}
.nav-search-circle{margin-top:-18px}


/* v0.7.17 flat minimalist direction (glass effects removed) */
.room-home{position:relative}
#heroMount{overflow:hidden}

.hero-current-book{
  position:absolute;left:6%;right:38%;bottom:12%;z-index:11;
  border:0;padding:0;background:none;color:#fdf9f0;
  text-shadow:0 2px 18px rgba(0,0,0,.55),0 1px 3px rgba(0,0,0,.6);
}
.hero-current-book .home-kicker{color:rgba(253,249,240,.75);font-family:inherit;text-transform:none}
.hero-current-book h2{margin:6px 0 4px;font-family:"Limelight",Georgia,"Times New Roman",serif;font-size:clamp(1.3rem,5vw,1.7rem);line-height:1.08}
.hero-current-book p{margin:0 0 10px;color:rgba(253,249,240,.75);font-size:.85rem}
.hero-current-book .quiet-link{display:inline-block;margin-right:10px;color:#fdf9f0;opacity:.85}
.hero-current-book .quiet-link:hover,.hero-current-book .quiet-link:active{opacity:1}


/* Flat minimal buttons — no accent highlight fills */
.quiet-link{color:var(--ink);font-weight:600;opacity:.7;background:none;border:0;font-family:inherit;text-transform:none}
.quiet-link:hover,.quiet-link:active{opacity:1}


/* v0.8.0 functional MVP */
.mvp-page-inner{max-width:760px;margin:0 auto;padding:28px 18px 120px}.mvp-page-header,.mvp-section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:22px}.mvp-page-header h1,.mvp-section-heading h2{margin:4px 0 0}.mvp-muted{color:var(--muted,#756f67);margin:4px 0}.mvp-tabs,.mvp-filter-row{display:flex;gap:8px;overflow-x:auto;padding:2px 0 12px;scrollbar-width:none}.mvp-tabs button,.mvp-filter-row button{white-space:nowrap;border:1px solid var(--line,#cfc5b8);background:transparent;color:inherit;padding:9px 13px;border-radius:12px}.mvp-tabs button.active,.mvp-filter-row button.active{background:var(--ink,#24352c);color:var(--paper,#f4eee4);border-color:transparent}.mvp-book-grid{display:grid;gap:12px}.mvp-book-card{display:grid;grid-template-columns:82px 1fr;gap:14px;padding:12px;background:var(--surface,#f7f2e9);border:1px solid var(--line,#d9d0c3);border-radius:14px}.mvp-cover{aspect-ratio:2/3;background:#d8d0c4;display:grid;place-items:center;overflow:hidden;border-radius:4px;font-size:10px}.mvp-cover img{width:100%;height:100%;object-fit:cover}.mvp-book-info{display:grid;gap:9px;min-width:0}.mvp-book-info h3{margin:1px 0 2px;font-size:17px}.mvp-book-info p{margin:0}.mvp-shelf-label{font-size:10px;letter-spacing:.12em}.mvp-progress{height:5px;background:rgba(128,128,128,.22);overflow:hidden;border-radius:99px}.mvp-progress span{display:block;height:100%;background:currentColor}.mvp-book-meta{display:flex;flex-wrap:wrap;gap:10px;font-size:12px;color:var(--muted,#756f67)}.mvp-empty{min-height:220px;display:grid;place-content:center;text-align:center;gap:7px;border:1px dashed var(--line,#cfc5b8);border-radius:14px}.mvp-calendar-title{font-size:20px;font-weight:700;margin-bottom:14px}.mvp-calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}.mvp-calendar-grid>b{text-align:center;font-size:11px;padding:8px 0}.mvp-calendar-grid>button,.mvp-calendar-grid>i{min-height:54px}.mvp-calendar-grid>button{border:1px solid var(--line,#d2c8bb);background:var(--surface,#f7f2e9);color:inherit;border-radius:10px;display:grid;place-content:center;gap:1px}.mvp-calendar-grid>button.logged{outline:2px solid currentColor}.mvp-calendar-grid small{font-size:9px}.mvp-goal-form{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end;margin-bottom:20px}.mvp-goal-form label{display:grid;gap:6px}.mvp-stat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.mvp-stat{padding:16px;background:var(--surface,#f7f2e9);border:1px solid var(--line,#d9d0c3);border-radius:14px}.mvp-stat p{margin:0 0 8px;color:var(--muted,#756f67)}.mvp-stat strong{font-size:24px}.mvp-stat .mvp-progress{margin-top:12px}.mvp-tbx-add{display:grid;grid-template-columns:auto 1fr auto;gap:8px;margin-bottom:18px}.mvp-tbx-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.mvp-tbx-list{padding:15px;background:var(--surface,#f7f2e9);border:1px solid var(--line,#d9d0c3);border-radius:14px}.mvp-tbx-list h3{margin:2px 0 12px}.mvp-tbx-item{display:grid;grid-template-columns:auto 1fr auto;gap:9px;align-items:center;padding:8px 0;border-top:1px solid var(--line,#d9d0c3)}.mvp-tbx-item button{border:0;background:transparent;color:inherit;font-size:19px}.mvp-check{display:flex!important;grid-template-columns:none!important;flex-direction:row;align-items:center;gap:8px}.mvp-dialog textarea{width:100%;resize:vertical}.add-to-library{margin-top:8px}.mvp-book-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}.current-badge{display:inline-flex;align-items:center;padding:8px 12px;border-radius:10px;background:var(--accent-soft);color:var(--accent);font-size:.78rem;font-weight:700}@media(max-width:560px){.mvp-goal-form{grid-template-columns:1fr}.mvp-tbx-grid,.mvp-stat-grid{grid-template-columns:1fr}.mvp-tbx-add{grid-template-columns:1fr}.mvp-page-header{align-items:flex-start}.mvp-book-card{grid-template-columns:70px 1fr}}

/* v0.8.1 private-library design pass */
:root{
  --paper:#eee7da;
  --paper-2:#f8f3e9;
  --surface:#f8f3e9;
  --ink:#20241f;
  --muted:#746f64;
  --line:#c9bead;
  --accent:#6b3526;
  --accent-soft:#e5d5bf;
  --forest:#26382d;
  --forest-deep:#17251d;
  --walnut:#6a402a;
  --brass:#a8874f;
  --shadow:none;
  --radius:0;
}
html,body{background:var(--paper);color:var(--ink)}
body:before{content:"";position:fixed;inset:0;pointer-events:none;opacity:.035;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E")}
#appMain{width:min(520px,100%);padding:0 0 106px}
.app-page{min-height:100vh}
.home-page{max-width:none!important}
.room-home{background:var(--forest-deep)}
#heroMount{border-bottom:7px solid var(--walnut);box-shadow:0 3px 0 #3e281c}
.hero-current-book{left:20px;right:42%;bottom:7%;padding-left:12px;border-left:2px solid rgba(255,255,255,.52)}
.hero-current-book .home-kicker{font-size:.58rem;letter-spacing:.18em;text-transform:uppercase}
.hero-current-book h2{font-size:clamp(1.16rem,5vw,1.55rem);font-weight:500}
.hero-current-book p{font-size:.72rem;line-height:1.35;max-width:220px}
.hero-current-book .quiet-link{font-size:.68rem;letter-spacing:.05em;text-transform:uppercase;border-bottom:1px solid currentColor;padding:0 0 2px;margin:0 10px 4px 0}
.home-kicker,.eyebrow,.hero-kicker{font-family:"Courier New",monospace;color:var(--accent);font-size:.61rem;letter-spacing:.17em}

/* Library becomes a collection, not a settings dashboard */
.mvp-page-inner{max-width:none;padding:30px 16px 120px}
.mvp-page-header{align-items:flex-start;margin-bottom:22px;padding-bottom:20px;border-bottom:3px double var(--line)}
.mvp-page-header h1{font-family:"Limelight",Georgia,"Times New Roman",serif;font-weight:500;font-size:2.7rem;letter-spacing:-.045em;line-height:.95}
.mvp-page-header .outline-button{margin-top:3px}
.mvp-tabs{gap:0;padding:0;margin:0 -16px 20px;border-bottom:1px solid var(--line)}
.mvp-tabs button{padding:12px 14px;border:0;border-right:1px solid var(--line);border-radius:10px;background:transparent;font-family:"Courier New",monospace;font-size:.65rem;letter-spacing:.09em;text-transform:uppercase}
.mvp-tabs button.active{background:var(--forest);color:#f4ecdc}
.mvp-filter-row{gap:18px;padding:0 0 17px;margin-bottom:4px;border-bottom:1px solid var(--line)}
.mvp-filter-row button{padding:4px 0;border:0;border-radius:999px;font-size:.72rem;color:var(--muted);background:none}
.mvp-filter-row button.active{background:none;color:var(--accent);border-bottom:2px solid var(--accent)}
.mvp-book-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 14px;padding-top:14px}
.mvp-book-card{display:flex;flex-direction:column;gap:10px;padding:0;border:0;border-radius:12px;background:transparent;min-width:0}
.mvp-cover{width:100%;aspect-ratio:2/3;border:1px solid rgba(42,34,27,.25);border-radius:8px;background:#d5cab9;box-shadow:5px 6px 0 rgba(75,55,32,.16)}
.mvp-book-info{gap:6px;padding:0 2px}
.mvp-book-info h3{margin:2px 0 1px;font-family:"Limelight",Georgia,"Times New Roman",serif;font-size:1rem;line-height:1.12;font-weight:600}
.mvp-book-info p{font-size:.75rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mvp-shelf-label{font-family:"Courier New",monospace;font-size:.56rem!important;letter-spacing:.13em;color:var(--accent)}
.mvp-progress{height:3px;border-radius:999px;background:#d5cbbb}
.mvp-progress span{background:var(--accent)}
.mvp-book-meta{display:grid;grid-template-columns:1fr 1fr;gap:3px 7px;font-family:"Courier New",monospace;font-size:.58rem}
.mvp-book-meta span:last-child{display:none}
.mvp-book-card .edit-book{min-height:32px;width:100%;margin-top:2px;background:transparent}
.mvp-empty{grid-column:1/-1;border:1px solid var(--line);border-radius:14px;background:var(--paper-2)}

.mvp-section-heading{align-items:flex-start;padding-bottom:15px;border-bottom:3px double var(--line)}
.mvp-section-heading h2{font-family:"Limelight",Georgia,serif;font-size:2rem;font-weight:500}
.mvp-calendar-title{font-family:"Limelight",Georgia,serif;font-weight:500;font-size:1.1rem;color:var(--muted)}
.mvp-calendar-grid{gap:5px;background:none;border:0}
.mvp-calendar-grid>b{background:none;color:var(--muted);font-family:inherit;font-size:.62rem;font-weight:700}
.mvp-calendar-grid>i,.mvp-calendar-grid>button{background:#efe9dc;border:0;border-radius:10px;color:#b9b09d}
.mvp-calendar-grid>button.logged{outline:0;background:var(--accent);color:#fff;box-shadow:none}
.mvp-calendar-grid>button.logged small{color:rgba(255,255,255,.8)}
.mvp-calendar-grid{gap:3px}
.mvp-calendar-grid>b{font-size:.55rem;padding:4px 0}
.mvp-calendar-grid>button,.mvp-calendar-grid>i{min-height:32px}
.mvp-calendar-grid>button span{font-size:.68rem}
.mvp-calendar-grid small{font-size:.5rem}
.log-today-button{margin-top:14px;width:100%;border:0;background:var(--accent);color:#fff;font-weight:700;padding:12px;border-radius:14px;font-size:.88rem;cursor:pointer}
.log-today-button.done{background:var(--accent-soft);color:var(--accent)}
.mvp-goal-form{padding:16px;border:1px solid var(--line);background:var(--paper-2)}
.mvp-stat-grid{grid-template-columns:1fr 1fr;gap:1px;background:var(--line);border:1px solid var(--line)}
.mvp-stat{padding:18px 14px;border:0;border-radius:14px;background:var(--paper-2)}
.mvp-stat strong{font-family:"Limelight",Georgia,serif;font-size:1.8rem;font-weight:500}
.mvp-tbx-add{padding:14px;border:1px solid var(--line);background:var(--paper-2)}
.mvp-tbx-grid{grid-template-columns:1fr;gap:12px}
.mvp-tbx-list{border:1px solid var(--line);border-radius:14px;background:var(--paper-2);padding:16px}
.mvp-tbx-list h3{font-family:"Limelight",Georgia,serif;font-size:1.25rem;font-weight:500}

/* Search feels like a library catalogue */
.search-page-inner{padding:30px 16px 120px}
.search-page .hero,.find-book-page .hero{padding:0 0 20px}
.search-page .hero h2,.find-book-page .hero h2{font-size:clamp(2.4rem,11vw,3.7rem);line-height:.93;font-weight:500;max-width:460px}
.search-page .hero-copy,.find-book-page .hero-copy{font-size:.86rem;line-height:1.55}
.search-panel{margin-top:22px;padding:0;border:0;border-radius:var(--radius);background:transparent;box-shadow:none}
.search-panel>label{font-family:"Courier New",monospace;font-size:.62rem}
.search-row{gap:0;border:1px solid var(--line);background:var(--paper-2)}
.search-row input{border:0;border-radius:10px;background:transparent}
.search-row button,.primary-button{border-radius:10px;background:var(--forest);color:#f8f1e5}
.search-options{gap:0;border-bottom:1px solid var(--line)}
.mode-option span{border:0;border-right:1px solid var(--line);border-radius:8px;padding:9px 10px;font-family:"Courier New",monospace;font-size:.58rem}
.mode-option input:checked+span{background:var(--accent-soft);color:var(--accent)}
.status-grid{gap:1px;background:var(--line);border:1px solid var(--line);margin-bottom:30px}
.status-card{border:0;border-radius:12px;background:var(--paper-2)}
.results-heading{border-bottom:3px double var(--line)}
.message{border-radius:10px;background:rgba(248,243,233,.55)}
.results-list{gap:1px;background:var(--line);border:1px solid var(--line)}
.book-card{border:0;border-radius:12px;background:var(--paper-2);box-shadow:none}
.cover-wrap{border-radius:8px;box-shadow:3px 4px 0 rgba(75,55,32,.14)}
.book-title{font-size:1.25rem;font-weight:500}
.provider-badge,.score-badge,.meta-pill{border-radius:6px}
.details-toggle{color:var(--accent)}
.outline-button,.amazon-result-button,.series-result-button{border-radius:10px;background:transparent}
.icon-button{border-radius:50%;background:transparent}

/* Fixed bottom rail */
.nav-search-circle{width:auto;height:auto;margin:0;background:none;border:0}

.dialog-shell,.series-shell{background:var(--paper-2)}
.import-dialog,.series-dialog,.mvp-dialog{border-radius:16px}
.dialog-shell input,.dialog-shell select,.dialog-shell textarea{border-radius:8px;background:#fffdf8}

@media(max-width:560px){
  .mvp-page-header{align-items:flex-start}
  .mvp-page-header h1{font-size:2.35rem}
  .mvp-book-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 12px}
  .mvp-book-card{grid-template-columns:none}
  .mvp-stat-grid{grid-template-columns:1fr 1fr}
  .mvp-goal-form,.mvp-tbx-add{grid-template-columns:1fr}
  .hero-current-book{right:39%;left:16px}
}

/* v0.8.1 modern neutral aesthetic pass */
:root{
  --paper:#f5f5f2;
  --paper-2:#ffffff;
  --surface:#ffffff;
  --ink:#171918;
  --muted:#70746f;
  --line:#dedfda;
  --accent:#315c46;
  --accent-soft:#e8f0eb;
  --forest:#315c46;
  --forest-deep:#1d382b;
  --walnut:#315c46;
  --brass:#8b957f;
  --shadow:0 10px 30px rgba(20,28,23,.06);
}
html,body{background:var(--paper)}
body:before{display:none}
.room-home{background:#111714}
#heroMount{border-bottom:0;box-shadow:none}
.mvp-page-header,.mvp-section-heading{border-bottom:1px solid var(--line)}
.mvp-tabs{background:var(--paper-2)}
.mvp-tabs button.active{background:var(--ink);color:#fff}
.mvp-book-card{background:transparent}
.mvp-cover{border-color:rgba(20,25,22,.12);box-shadow:0 8px 20px rgba(20,28,23,.10)}
.mvp-empty,.mvp-goal-form,.mvp-stat,.mvp-tbx-add,.mvp-tbx-list,
.status-card,.book-card,.search-row{background:var(--paper-2)}
.search-row button,.primary-button{background:var(--ink);color:#fff}
.results-heading{border-bottom:1px solid var(--line)}
.dialog-shell,.series-shell{background:#fff}
.dialog-shell input,.dialog-shell select,.dialog-shell textarea{background:#fff}

html[data-theme="dark"]{
  --paper:#111412;
  --paper-2:#191d1a;
  --surface:#191d1a;
  --ink:#f4f6f3;
  --muted:#a8aea9;
  --line:#303530;
  --accent:#79a98d;
  --accent-soft:#24372c;
  --forest:#79a98d;
  --forest-deep:#101612;
}
html[data-theme="dark"] .search-row button,
html[data-theme="dark"] .primary-button,
html[data-theme="dark"] .mvp-tabs button.active{background:#f4f6f3;color:#151815}
html[data-theme="dark"] .dialog-shell input,
html[data-theme="dark"] .dialog-shell select,
html[data-theme="dark"] .dialog-shell textarea{background:#202521}

/* v0.8.1 debug access: center Home button */
.debug-shell{max-width:380px}
.debug-shell .dialog-actions{flex-wrap:wrap;justify-content:flex-start}
.debug-shell .dialog-actions button{flex:1 1 auto}
.debug-dialog, .font-editor{
  position:fixed; top:auto; bottom:0; left:0; right:0; margin:0;
  width:100%; max-width:100%; height:34vh; max-height:34vh;
  border-radius:20px 20px 0 0;
}
.debug-dialog .dialog-shell, .font-editor .dialog-shell{
  max-height:34vh; overflow-y:auto;
}
.font-row{border-top:1px solid var(--line);padding:12px 0}
.font-row:first-of-type{border-top:0}
.font-row-label{margin:0 0 8px;font-size:.78rem;font-weight:700;color:var(--ink)}
.font-row-controls{display:grid;grid-template-columns:1.6fr .8fr .8fr .7fr;gap:6px}
.font-row-controls input,.font-row-controls select{border:1px solid var(--line);border-radius:8px;padding:6px 7px;font-size:.78rem;background:#fff;color:var(--ink);width:100%}
.font-row-status{margin:6px 0 0;font-size:.68rem;color:var(--muted)}
.font-row-status.ok{color:var(--accent)}
.font-row-status.err{color:var(--danger)}
@media(max-width:480px){.font-row-controls{grid-template-columns:1fr 1fr}}
.debug-version-row{display:flex;align-items:center;justify-content:space-between;padding:16px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.debug-version-row span{color:var(--muted);font-size:.9rem}
.debug-version-row strong{font-size:1rem;letter-spacing:.02em}

/* v0.9.0 — home dashboard & bottom nav (consolidated; replaces prior scattered overrides) */
.home-dashboard{margin:0;padding:22px 16px 18px;display:grid;gap:16px}
.dashboard-calendar{border:1px solid var(--line);border-radius:var(--radius);padding:18px 20px;background:var(--paper-2);box-shadow:var(--shadow)}
.dashboard-calendar h2{margin:4px 0 12px;font-family:"Limelight",Georgia,"Times New Roman",serif;font-size:1.3rem;font-weight:500}
.reading-progress{margin:8px 0 0;display:flex;align-items:center;gap:8px}
.reading-progress-track{flex:1;height:6px;border-radius:99px;background:rgba(255,255,255,.28);overflow:hidden}
.reading-progress-fill{height:100%;background:#dfead1;border-radius:99px}
.reading-progress-label{font-size:.72rem;font-weight:700;white-space:nowrap;color:inherit}
.home-progress{margin:6px 0 0;color:var(--accent);font-size:.82rem;font-weight:600}
.book-lightbox{position:relative;border:0;border-radius:20px;padding:22px;max-width:340px;width:calc(100% - 48px);background:var(--paper-2);color:var(--ink);box-shadow:0 30px 60px rgba(0,0,0,.35)}
.book-lightbox::backdrop{background:rgba(10,14,11,.55)}
.book-lightbox img{width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:12px;margin-bottom:14px}
.book-lightbox h2{margin:0 0 4px;font-family:"Limelight",Georgia,"Times New Roman",serif;font-size:1.25rem}
.book-lightbox p{margin:0}
.book-lightbox .dialog-close{position:absolute;top:14px;right:14px;border:0;background:transparent;font-size:1.4rem;line-height:1;color:var(--muted);cursor:pointer}
.home-links{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.home-links button{display:flex;flex-direction:column;gap:6px;min-height:96px;padding:16px;border:1px solid var(--line);border-radius:16px;background:var(--paper-2);color:var(--ink);text-align:left;font-family:inherit;cursor:pointer;box-shadow:var(--shadow)}
.home-links button svg{width:20px;height:20px;color:var(--accent)}
.home-links b{font-family:"Limelight",Georgia,"Times New Roman",serif;font-size:1.15rem;font-weight:600}
.home-links button span{color:var(--muted);font-size:.78rem}
.bottom-nav{position:fixed;z-index:40;left:50%;bottom:max(10px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(430px,calc(100% - 24px));height:70px;display:grid;grid-template-columns:1fr 1fr 1fr;align-items:center;padding:7px 12px;border:1px solid var(--line);border-radius:22px;background:color-mix(in srgb,var(--paper-2) 94%,transparent);backdrop-filter:blur(18px);box-shadow:0 14px 36px rgba(24,31,25,.14)}
.nav-button{height:54px;display:grid;place-items:center;align-content:center;gap:3px;border:0;background:transparent;color:var(--muted);font-size:.66rem;font-weight:700;cursor:pointer;opacity:.6}
.nav-button svg{width:21px;height:21px}
.nav-button.active{opacity:1;color:var(--accent)}
.nav-home-center{position:relative}
.nav-home-circle{width:46px;height:46px;display:grid;place-items:center;margin-top:-26px;border-radius:50%;background:var(--accent);color:#fff;box-shadow:0 8px 18px rgba(28,83,55,.25)}
.nav-home-circle svg{width:21px;height:21px}
.nav-home-center>span:last-child{margin-top:-2px}
.nav-version{position:absolute;top:-16px;right:10px;font-size:.6rem;font-weight:600;color:var(--muted);opacity:.55;letter-spacing:.02em}

/* v0.9.26 — rebuilt find-book search grid + detail page under unique fb- namespace (replaces v0.9.22 block) */
.fb-cols-control{display:flex;border:1px solid var(--line);border-radius:10px;overflow:hidden}
.fb-cols-control button{min-width:34px;min-height:34px;border:0;border-right:1px solid var(--line);background:var(--paper-2);color:var(--muted);font-weight:800;font-size:.8rem;cursor:pointer}
.fb-cols-control button:last-child{border-right:0}
.fb-cols-control button.active{background:var(--ink);color:var(--paper)}
.heading-actions{display:flex;align-items:center;gap:10px}

.fb-results-list{background:none;border:0;display:grid;gap:22px}
.fb-grid{display:grid;grid-template-columns:repeat(var(--grid-cols,3),1fr);gap:14px 10px}
.fb-group-title{font-family:"Limelight",Georgia,"Times New Roman",serif;font-size:1.35rem;margin:0 0 12px}
.fb-card{display:flex;flex-direction:column;gap:6px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;cursor:pointer}
.fb-card:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:8px}
.fb-cover-wrap{position:relative;width:100%;aspect-ratio:2/3;border-radius:8px;box-shadow:0 4px 10px rgba(44,35,25,.08);background:var(--accent-soft);overflow:hidden}
.fb-cover-img{width:100%;height:100%;object-fit:cover;display:block}
.fb-cover-wrap .cover-placeholder span{font-size:.55rem}
.fb-badge{position:absolute;top:5px;right:5px;border:0;background:rgba(27,26,23,.72);color:#fff;border-radius:999px;padding:2px 7px;font-size:.6rem}
.fb-title{font-family:var(--font-h3-family);font-weight:var(--font-h3-weight);font-style:var(--font-h3-style);font-size:.82rem;line-height:1.18;margin:2px 0 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.fb-author{font-family:var(--font-caption-family);font-weight:var(--font-caption-weight);font-size:.68rem;color:var(--muted);margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:520px){.fb-cols-control{display:none}}

.fb-detail-page{max-width:520px;margin:0 auto;padding:14px 18px 100px}
.fb-detail-header{display:flex;padding-bottom:6px}
.fb-detail-hero{display:flex;flex-direction:column;align-items:center;padding:8px 0 18px;text-align:center}
.fb-detail-cover-wrap{position:relative;width:150px;aspect-ratio:2/3;border-radius:8px;overflow:hidden;box-shadow:0 14px 30px rgba(44,35,25,.18);background:var(--accent-soft)}
.fb-detail-cover{width:100%;height:100%;object-fit:cover;display:block}
#fbDetailTitle{font-family:var(--font-h1-family);font-weight:var(--font-h1-weight);font-style:var(--font-h1-style);font-size:1.5rem;margin:16px 0 2px}
.fb-detail-subtitle{color:var(--muted);margin:0 0 4px}
.fb-detail-author{font-weight:800;margin:0 0 10px}
.fb-detail-tags{display:flex;gap:6px;flex-wrap:wrap;justify-content:center;margin-bottom:12px}
.fb-detail-tags .fb-tag{font-size:.68rem;font-weight:800;padding:5px 11px;border-radius:999px;background:var(--accent-soft);color:var(--accent)}
.fb-detail-rating{font-weight:800;font-size:.85rem;margin-bottom:8px}
.fb-detail-actions{display:grid;gap:9px;margin-bottom:22px}
.fb-detail-actions button{min-height:50px;display:flex;align-items:center;justify-content:center;gap:8px}
.fb-detail-actions button svg{width:18px;height:18px}
.fb-detail-actions button:disabled{opacity:.55;cursor:default}
.fb-detail-section{margin-bottom:20px}
.fb-detail-section h2{font-family:var(--font-h2-family);font-weight:var(--font-h2-weight);font-size:1rem;margin:0 0 8px}
.fb-detail-section p{font-size:.88rem;line-height:1.55;margin:0}
.fb-meta-row{display:flex;justify-content:space-between;padding:10px 0;border-top:1px solid var(--line);font-size:.82rem}
.fb-meta-row span:first-child{color:var(--muted)}
.fb-meta-row span:last-child{font-weight:700}
