:root{font-family:system-ui,-apple-system,"Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif;color:#202c40;background:#f5f7fb;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer}.wrap{width:min(1060px,calc(100% - 32px));margin:auto}.hero{background:linear-gradient(115deg,#192d51,#344e83);color:white;padding:38px 0 36px}.eyebrow{font-size:11px;letter-spacing:.2em;color:#bfd1f3;font-weight:700}h1{font-size:clamp(23px,3.5vw,35px);margin:10px 0}h2{font-size:17px;margin:0}.hero p{margin:0;color:#d6e1f5}.panel{background:white;border:1px solid #e1e7f0;border-radius:18px;padding:24px;box-shadow:0 8px 24px #2239580a}.filters{margin-top:24px}.search-row{display:flex;gap:10px;margin:14px 0}input[type=search],select{border:1px solid #cdd6e4;border-radius:10px;background:white;color:#223047;padding:12px 13px;min-height:45px;outline-offset:2px}input[type=search]{width:100%;min-width:0}select{width:100%}.clear{border:1px solid #cbd4e3;border-radius:10px;background:#fff;color:#34496d;padding:10px 16px;white-space:nowrap}fieldset{border:0;padding:0;margin:0 0 25px}legend{font-size:13px;font-weight:700;margin-bottom:10px;color:#52637e}.radios{display:flex;flex-wrap:wrap;gap:9px 17px}.radios label{font-size:14px;display:flex;align-items:center;gap:5px}.radios input{accent-color:#385ca5}.section-head{padding-top:19px;border-top:1px solid #edf0f5}.filter-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}.filter-grid label,.sort{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:700;color:#52637e}.results{margin:28px 0 60px}.results-bar{display:flex;justify-content:space-between;align-items:end;gap:12px;margin-bottom:16px}.results-bar h2{font-size:20px}.results-bar h2 span{color:#355fb2}.results-bar h2 .unit{font-size:14px;margin-left:4px}.results-bar p{color:#7b879a;font-size:12px;margin:5px 0 0}.sort{min-width:210px}.sort select{padding:9px 12px;min-height:40px}.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.book{background:#fff;border:1px solid #e1e7f0;border-radius:15px;padding:19px;display:flex;flex-direction:column;gap:13px;min-width:0;box-shadow:0 3px 12px #22395808}.book-title{font-size:16px;line-height:1.55;margin:0;font-weight:750;overflow-wrap:anywhere}.meta{display:grid;grid-template-columns:82px 1fr;gap:5px 8px;font-size:13px;margin:0}.meta dt{color:#78869b}.meta dd{margin:0;overflow-wrap:anywhere}.tags{display:flex;flex-wrap:wrap;gap:7px}.tag{background:#eef3fa;color:#425a80;border-radius:6px;padding:5px 9px;font-size:12px}.tag.status{background:#eaf4ed;color:#33644a}.tag.stop{background:#fff0e9;color:#99513d}.links{display:flex;gap:8px;margin-top:auto}.links a{flex:1;text-align:center;text-decoration:none;font-size:13px;font-weight:700;padding:11px 5px;border:1px solid #aebfdd;color:#28549a;border-radius:9px}.links a:hover{background:#eef4ff}.links a.amazon{color:#775120;border-color:#dbc59e}.empty{text-align:center;padding:45px 15px;color:#6b7890;background:#fff;border-radius:12px}.more-row{text-align:center;margin-top:20px}.more-row button{background:#284e91;color:#fff;border:0;border-radius:10px;padding:12px 32px}footer{text-align:center;color:#7b879a;font-size:12px;padding:25px 15px 35px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}[hidden]{display:none!important}@media(max-width:700px){.hero{padding:28px 0}.panel{padding:18px}.cards{grid-template-columns:1fr}.results-bar{align-items:end}.sort{min-width:135px;max-width:47%}.results-bar h2{font-size:17px}.book{padding:16px}.filter-grid{gap:10px}.filter-grid select{font-size:13px;padding:10px 6px}.search-row{gap:7px}.clear{padding:9px;font-size:12px}}

/* Updated filter and sorting controls */
.hero h1{display:flex;flex-direction:column;gap:4px;line-height:1.3}
.hero-years{font-size:clamp(19px,2.6vw,27px);font-weight:650}
.hero-main{font-size:clamp(27px,4vw,40px);font-weight:800}
.filter-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.filter-grid label{min-width:0}
.filter-grid select{border:2px solid #cdd6e4;font-weight:600;transition:border-color .15s,background-color .15s,box-shadow .15s}
.filter-grid select.is-selected{border-color:#315db3;background:#edf4ff;color:#163e82;box-shadow:0 0 0 2px #315db31a}
select:focus-visible,input:focus-visible,button:focus-visible{outline:3px solid #7ea6f2;outline-offset:2px}
.sort{min-width:255px;font-size:15px;color:#244775}
.sort-heading{font-size:16px;font-weight:800}
.sort select{min-height:50px;padding:11px 14px;border:2px solid #5275b4;background:#f1f5ff;color:#1e467e;font-size:15px;font-weight:750}
.sort select.is-selected{background:#e4efff;border-color:#2259b0;box-shadow:0 0 0 2px #2259b01c}
@media(max-width:700px){.filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.filter-grid select{font-size:14px;padding:10px 8px;min-height:47px}.results-bar{align-items:stretch;flex-wrap:wrap}.sort{width:100%;max-width:none;min-width:0}.sort select{width:100%}}

/* Cover images */
.book-body {display:grid;grid-template-columns:112px minmax(0,1fr);gap:16px;align-items:start}
.book-cover {width:112px;aspect-ratio:2/3;overflow:hidden;border-radius:8px;background:#edf1f7;border:1px solid #dfe6f0}
.book-cover-image {width:100%;height:100%;object-fit:contain;display:block;background:#fff}
.book-cover-placeholder {height:100%;display:flex;align-items:center;justify-content:center;text-align:center;padding:8px;color:#7d8aa0;font-size:12px;font-weight:750;letter-spacing:.07em}
.book-details {min-width:0;display:flex;flex-direction:column;gap:12px}
.book-details .meta {grid-template-columns:72px minmax(0,1fr)}
@media(max-width:420px) {
  .book-body {grid-template-columns:90px minmax(0,1fr);gap:12px}
  .book-cover {width:90px}
  .book-details .meta {grid-template-columns:64px minmax(0,1fr);font-size:12px}
  .book-title {font-size:15px}
}

/* Spreadsheet-driven genre checkboxes, three columns */
.genre-fieldset {margin:20px 0 0;padding:16px;border:1px solid #dce5f2;border-radius:12px;background:#fbfcff}
.genre-fieldset legend {padding:0 7px;font-size:14px;color:#34496d}
.genre-count {color:#315db3;font-size:12px}
.genre-checkboxes {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 12px}
.genre-option {display:flex;align-items:center;gap:8px;min-width:0;padding:10px 12px;border:1px solid #dce5f2;border-radius:9px;background:#fff;font-size:14px;font-weight:600;color:#34496d;cursor:pointer;overflow-wrap:anywhere}
.genre-option input {width:17px;height:17px;flex:0 0 auto;accent-color:#315db3;cursor:pointer}
.genre-option:has(input:checked) {border-color:#315db3;background:#edf4ff;color:#163e82}
.genre-option:focus-within {outline:2px solid #7ea6f2;outline-offset:2px}
@media(max-width:700px){.genre-checkboxes{gap:7px}.genre-option{padding:9px 6px;gap:5px;font-size:12px}.genre-option input{width:15px;height:15px}.genre-fieldset{padding:12px 8px}}
@media(max-width:370px){.genre-option{font-size:11px;padding:8px 4px;gap:4px}}

/* Collapsible filters */
.filter-details {margin-top:18px;border:1px solid #dce5f2;border-radius:13px;background:#fff;overflow:hidden}
.filter-toggle {display:flex;align-items:center;gap:10px;padding:16px 18px;cursor:pointer;list-style:none;color:#244775;background:#f5f8ff;user-select:none}
.filter-toggle::-webkit-details-marker {display:none}
.filter-toggle:hover {background:#eaf1ff}
.filter-toggle:focus-visible {outline:3px solid #7ea6f2;outline-offset:-3px}
.filter-toggle-title {font-size:16px;font-weight:800}
.filter-toggle-hint {font-size:12px;color:#697c99;margin-left:auto}
.filter-toggle-chevron {width:10px;height:10px;border-right:2px solid #315db3;border-bottom:2px solid #315db3;transform:rotate(45deg);transition:transform .15s;margin-left:8px;margin-top:-5px;flex:none}
.filter-details[open] .filter-toggle-chevron {transform:rotate(225deg);margin-top:5px}
.filter-content {padding:18px;border-top:1px solid #e3eaf4}
.filter-content .filter-grid {grid-template-columns:repeat(3,minmax(0,1fr));margin-top:0}
.filter-content .genre-fieldset {margin-top:18px;margin-bottom:0}
.filter-active-count {display:inline-block;font-size:12px;background:#315db3;color:#fff;border-radius:99px;padding:2px 8px;margin-left:4px}
.filter-active-count[hidden] {display:none}
@media(max-width:700px){.filter-content{padding:12px}.filter-content .filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.filter-toggle{padding:14px 12px}.filter-toggle-hint{font-size:10px}}
@media(max-width:390px){.filter-toggle-hint{display:none}.filter-toggle-chevron{margin-left:auto}}

/* New features */
.site-nav{display:flex;gap:18px;margin-top:18px}.site-nav a{color:#fff;font-weight:700;text-underline-offset:4px}
.favorites-toggle{display:flex;align-items:center;gap:7px;font-size:14px;font-weight:700;color:#34496d;white-space:nowrap}
.favorites-toggle input{accent-color:#d43d66;width:18px;height:18px}
.book-card-head{display:flex;justify-content:space-between;align-items:center;min-height:25px;margin:-5px 0 -7px}
.new-badge{background:#d94b31;color:#fff;font-weight:800;font-size:11px;padding:4px 9px;border-radius:5px;letter-spacing:.05em}
.favorite-button{border:1px solid #d9dfe9;background:#fff;border-radius:50%;width:35px;height:35px;font-size:24px;line-height:1;color:#6b7890;display:grid;place-items:center}
.favorite-button.is-favorite{color:#d43d66;background:#fff0f4;border-color:#f0a9bd}
.loading{min-height:220px;background:#fff;border:1px solid #e1e7f0;border-radius:15px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:11px;color:#34496d;margin-bottom:14px;text-align:center}
.loading>span:last-child{font-size:13px;color:#77859a}
.spinner{width:36px;height:36px;border:4px solid #dce6f5;border-top-color:#315db3;border-radius:50%;animation:spin .85s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.spinner{animation:none}}
.contributors{margin:28px 0 60px}.contributor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.contributor{background:white;border:1px solid #e1e7f0;border-radius:16px;padding:20px;min-width:0}
.contributor-header{display:flex;align-items:center;gap:14px;margin-bottom:18px}.contributor-avatar{width:80px;height:80px;flex:0 0 80px;border-radius:50%;object-fit:cover;background:#e8eef7}
.contributor h2{font-size:18px;overflow-wrap:anywhere}.contributor a{color:#315db3;overflow-wrap:anywhere}.contributor-section{margin-top:15px}.contributor-section h3{font-size:12px;color:#6b7890;margin:0 0 6px}.contributor-section p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7;font-size:14px}
.genre-pill{display:inline-block;padding:4px 9px;background:#eef3fa;border-radius:7px;margin:3px;font-size:12px}
@media(max-width:700px){.contributor-grid{grid-template-columns:1fr}.results-bar .favorites-toggle{order:2}.results-bar .sort{order:3}}

/* Clear header navigation and centered contributor cards */
.site-nav{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}
.site-nav a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 20px;border:1px solid rgba(255,255,255,.48);border-radius:10px;background:rgba(255,255,255,.10);color:#fff;text-decoration:none;font-weight:750;transition:background .15s,border-color .15s}
.site-nav a:hover,.site-nav a:focus-visible{background:rgba(255,255,255,.24);border-color:#fff}
.site-nav a[aria-current="page"]{background:#fff;color:#1e3d70;border-color:#fff}
.contributors.wrap{margin:28px auto 60px}
.contributor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;max-width:1000px;margin-inline:auto;justify-content:center}
.contributor{width:100%}
@media(max-width:700px){.site-nav{gap:8px}.site-nav a{flex:1;padding:10px 12px;font-size:14px}.contributor-grid{grid-template-columns:minmax(0,1fr);max-width:520px}}

/* Final: prominent title, understated centered navigation */
.hero .hero-main{font-size:clamp(30px,5vw,48px);font-weight:800;line-height:1.2}
.hero .hero-years{font-size:clamp(18px,2.6vw,26px);font-weight:650}
.site-nav{display:flex;justify-content:center;flex-wrap:wrap;gap:8px 24px;margin-top:22px;padding-top:16px;border-top:1px solid rgba(255,255,255,.24)}
.site-nav a{display:inline-flex;align-items:center;justify-content:center;flex:none;min-height:40px;padding:7px 9px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:#c9d8f2;text-decoration:none;font-size:14px;font-weight:650}
.site-nav a:hover,.site-nav a:focus-visible{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.6);color:#fff}
.site-nav a[aria-current="page"]{background:transparent;color:#fff;border-color:#fff;font-weight:800}
.contributors-heading{text-align:center;font-size:24px;margin:8px 0 8px}
.contributors-intro{text-align:center;color:#687991;margin:0 0 24px}
@media(max-width:700px){.site-nav{gap:8px 14px}.site-nav a{flex:none;font-size:14px;padding:8px 10px}.hero .hero-main{font-size:clamp(26px,6.8vw,38px)}}

/* Book card layout: title above, tappable cover and BOOK☆WALKER-style check */
.book-title{margin:0;font-size:16px;line-height:1.55;overflow-wrap:anywhere}
.book-body{display:grid;grid-template-columns:112px minmax(0,1fr);gap:16px;align-items:start}
.book-cover.favorite-cover{position:relative;display:block;width:112px;aspect-ratio:2/3;height:auto;padding:0;overflow:visible;border:1px solid #dfe6f0;border-radius:8px;background:#fff;cursor:pointer}
.favorite-cover .book-cover-image{width:100%;height:100%;border-radius:7px;object-fit:contain}
.favorite-cover .book-cover-placeholder{height:100%;display:flex;align-items:center;justify-content:center}
.favorite-check{position:absolute;right:-7px;bottom:-7px;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;border:2px solid #a8b6c9;background:#fff;color:transparent;box-shadow:0 2px 6px #1d2e481f;font-size:21px;font-weight:900;line-height:1}
.favorite-cover.is-favorite .favorite-check{background:#238b62;border-color:#238b62;color:#fff}
.favorite-cover:hover .favorite-check{box-shadow:0 0 0 3px #238b6229}
.favorite-cover:focus-visible{outline:3px solid #7ea6f2;outline-offset:5px}
.book-details .meta{grid-template-columns:75px minmax(0,1fr);gap:7px 8px}
.book-genres{display:flex;flex-wrap:wrap;gap:5px;align-items:center}
.book-genres .genre-pill{margin:0;background:#eef3fa;color:#425a80;padding:4px 8px;border-radius:7px}
@media(max-width:420px){.book-body{grid-template-columns:90px minmax(0,1fr);gap:12px}.book-cover.favorite-cover{width:90px}.book-details .meta{grid-template-columns:65px minmax(0,1fr);font-size:12px}.favorite-check{width:29px;height:29px}}

/* Collaborator's one optional external link */
.contributor-external-link{display:inline-flex;align-items:center;gap:6px;padding:9px 13px;border:1px solid #cbd9d1;border-radius:9px;background:#f5faf7;color:#24553e;font-weight:700;text-decoration:none;max-width:100%;overflow-wrap:anywhere}
.contributor-external-link::after{content:"↗";font-size:13px}
.contributor-external-link:hover,.contributor-external-link:focus-visible{background:#e7f3eb;text-decoration:underline}

/* Favorite heart overlay */
.favorite-check{color:#7b879a;font-size:23px;font-weight:700}
.favorite-cover.is-favorite .favorite-check{background:#fff0f4;border-color:#d43d66;color:#d43d66}
.favorite-cover:hover .favorite-check{box-shadow:0 0 0 3px #d43d6629}

/* Cream background for each book title */
.book .book-title {
  background: #F5EAD4;
  color: #513E2D;
  padding: 11px 14px;
  border-radius: 9px;
  line-height: 1.55;
}
@media (max-width: 420px) {
  .book .book-title { padding: 10px 12px; }
}

/* Quick filters next to search-target radio buttons */
.search-target-row{display:flex;align-items:center;justify-content:space-between;gap:12px 24px;flex-wrap:wrap}
.search-target-row .radios{flex:1 1 auto}
.quick-filters{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.quick-filter{display:inline-flex;align-items:center;gap:6px;padding:7px 11px;border:1px solid #cbd6e8;border-radius:9px;background:#f7f9fd;color:#304b77;font-size:13px;font-weight:750;white-space:nowrap;cursor:pointer}
.quick-filter input{width:17px;height:17px;accent-color:#315db3;cursor:pointer}
.quick-filter:has(input:checked){border-color:#315db3;background:#e8f1ff;color:#183f83}
.quick-filter:focus-within{outline:2px solid #7ea6f2;outline-offset:2px}
/* NEW badge directly after book title, with strong contrast */
.book .book-title{display:block}
.new-badge-inline{display:inline-block;vertical-align:baseline;margin-left:9px;padding:3px 9px;border-radius:5px;background:#d52e35;color:#fff;font-size:12px;font-weight:900;line-height:1.5;letter-spacing:.05em;white-space:nowrap;box-shadow:0 1px 4px #9c172c38}
@media(max-width:700px){.search-target-row{align-items:flex-start}.quick-filters{width:100%;gap:8px}.quick-filter{font-size:12px}}

/* Preview: publish status badge */
.book-status-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 24px;
}

.book-publish-badge {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
}

.book-publish-badge.status-pending {
  background: #fff0d9;
  color: #925400;
}

.book-publish-badge.status-processing {
  background: #e6f0ff;
  color: #2458a6;
}

.book-publish-badge.status-failed {
  background: #ffe7e7;
  color: #a52c2c;
}

.book-publish-badge.status-published {
  background: #e4f5e9;
  color: #246b42;
}

.book-publish-badge.status-hidden {
  background: #e9eaed;
  color: #555d69;
}

/* Preview: title and publish badge on one row */
.book-heading-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.book-heading-row .book-title {
  flex: 1;
  min-width: 0;
}
.book-heading-row .book-publish-badge {
  flex-shrink: 0;
}
