:root{
  --bg:#fbf7ef;
  --ink:#1d1b16;
  --muted:#6a6257;
  --card:#ffffff;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --stroke: rgba(29,27,22,.12);
  --brand:#7c3aed;
  --brand2:#06b6d4;
  --radius:9px;
  --radius2:6px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color:var(--ink);
  background:
    radial-gradient(1000px 400px at 20% 0%, rgba(124,58,237,.12), transparent 60%),
    radial-gradient(900px 420px at 80% 10%, rgba(6,182,212,.10), transparent 60%),
    var(--bg);
  background-repeat: no-repeat;
  background-size: 1400px 700px, 1400px 760px, auto;
  background-position: 0 0, 100% 0, 0 0;
}
a{color:inherit}
.wrap{max-width:1100px;margin:0 auto;padding:0 18px}
.topbar{
  position:sticky;top:0;z-index:5;
  background: rgba(251,247,239,.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--stroke);
}
.topbar-inner{display:flex;align-items:center;justify-content:space-between;padding:12px 18px}
.brand{
  font-weight:900;letter-spacing:.2px;text-decoration:none;
  display:inline-flex;align-items:center;gap:10px;
}
.brand:before{
  content:"";
  width:14px;height:14px;border-radius:4px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow:0 6px 18px rgba(124,58,237,.22);
}
.pill{
  font-size:13px;text-decoration:none;
  padding:8px 12px;border-radius:999px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.6);
}
.strew-link,.strew-footer{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 10px;
}
.strew-logo{
  display:block;
  height:20px;
  width:auto;
  image-rendering:auto;
}
.hero{
  display:flex;align-items:center;justify-content:space-between;
  gap:18px;margin:18px 0 8px;
  padding:18px;border:1px solid var(--stroke);
  border-radius: var(--radius);
  background: rgba(255,255,255,.58);
}
.hero h1{margin:0 0 6px;font-size:28px;line-height:1.12}
.lede{margin:0;color:var(--muted);max-width:60ch}
.sticker{
  width:140px;height:82px;
  border-radius: 18px;
  border:1px dashed rgba(29,27,22,.25);
  background: linear-gradient(135deg, rgba(124,58,237,.14), rgba(6,182,212,.12));
  display:flex;align-items:center;justify-content:center;
  text-align:center;font-weight:900;line-height:1.05;
  transform: rotate(2deg);
}
.sticker span{display:block;font-weight:700;color:var(--muted);font-size:12px;margin-top:4px}
.section{margin:18px 0 26px}
.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:12px}
.section-head h2{margin:0;font-size:20px}
.section-head p{margin:0;color:var(--muted)}
.cards{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:14px;
}
@media (max-width: 980px){.cards{grid-template-columns: repeat(2, minmax(0, 1fr));}}
@media (max-width: 640px){
  .cards{grid-template-columns: 1fr;}
  .hero{flex-direction:column;align-items:flex-start}
  .hero-right{display:none}
}
.card{
  position:relative;
  display:grid;
  grid-template-columns: 120px 1fr;
  gap:12px;
  padding:12px;
  border-radius: var(--radius);
  border:1px solid var(--stroke);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.rank{
  position:absolute;top:8px;left:8px;right:auto;
  font-weight:900;font-size:12px;
  padding:6px 10px;border-radius:999px;
  background: rgba(251,247,239,.92);
  border:1px solid rgba(29,27,22,.16);
  box-shadow: 0 10px 18px rgba(0,0,0,.10);
  backdrop-filter: blur(6px);
}
.cover{
  width:120px;
  position:relative;
}
.isbn-under{
  margin-top:6px;
  font-size:11px;
  color:rgba(29,27,22,.45);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.cover picture, .cover img{display:block;width:100%;height:auto;border-radius: var(--radius2)}
.cover img{background:#faf7f2;border:1px solid var(--stroke)}
.cover-fallback{
  width:100%;aspect-ratio: 320/440;
  border-radius: var(--radius2);
  border:1px solid var(--stroke);
  background: repeating-linear-gradient(45deg, rgba(29,27,22,.05) 0, rgba(29,27,22,.05) 8px, rgba(29,27,22,.02) 8px, rgba(29,27,22,.02) 16px);
}
.meta{
  min-width:0;
  display:flex;
  flex-direction:column;
}
.title{
  margin:4px 0 6px;
  font-size:16px;line-height:1.2;
  overflow:hidden;
  display:-webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap:anywhere;
  word-break: break-word;
  hyphens: auto;
}
.byline{display:flex;gap:10px;flex-wrap:wrap;color:var(--muted);font-size:13px;margin-bottom:8px}
.reads{font-weight:800;color:rgba(29,27,22,.72)}
.desc{margin:0 0 10px;color:var(--muted);font-size:13px;line-height:1.35}
.actions{
  margin-top:auto;
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
  gap:10px;
}
.btn{
  appearance:none;border:0;
  display:inline-flex;align-items:center;justify-content:center;
  gap:8px;
  padding:9px 12px;border-radius:12px;
  text-decoration:none;
  font-weight:800;font-size:13px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color:white;
  box-shadow: 0 10px 25px rgba(124,58,237,.22);
}
.btn-amazon{
  background: linear-gradient(#ffd978, #f7b52c);
  color:#111;
  border:1px solid rgba(0,0,0,.22);
  box-shadow: 0 6px 16px rgba(0,0,0,.10);
  text-shadow:none;
}
.btn-amazon:hover{filter:brightness(0.98)}
.btn-amazon:active{transform:translateY(1px)}
.btn-secondary{
  background: rgba(255,255,255,.8);
  color: var(--ink);
  border:1px solid var(--stroke);
  box-shadow:none;
}
.btn:disabled{opacity:.55;cursor:not-allowed}
.loadmore{margin-top:14px;display:flex;align-items:center;justify-content:center;gap:12px}
.muted{color:var(--muted);font-size:13px}
.empty{
  padding:16px;border-radius: var(--radius);
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.6);
  color:var(--muted);
}
.explainer{
  padding:16px;border-radius: var(--radius);
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.6);
}
.explainer h2{margin:0 0 8px}
.explainer p{margin:0 0 10px;color:var(--muted);max-width:78ch}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 10px}
.chip{
  font-size:12px;font-weight:800;
  padding:6px 10px;border-radius:999px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.7);
}
.footer{margin:26px 0 40px}
.footer-inner{
  display:flex;justify-content:space-between;gap:12px;
  padding-top:14px;border-top:1px solid var(--stroke);
  color:var(--muted);font-size:13px;
}

.promo{
  position:fixed;
  right:16px;
  bottom:16px;
  width:min(340px, calc(100vw - 32px));
  padding:12px 12px 10px;
  border-radius: var(--radius);
  border:1px solid rgba(29,27,22,.14);
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 40px rgba(0,0,0,.16);
  backdrop-filter: blur(10px);
  z-index: 50;
}
.promo-title{font-weight:900;margin:2px 26px 6px;line-height:1.15}
.promo-body{color:var(--muted);font-size:13px;line-height:1.35;margin:0 26px 10px}
.promo-cta{
  display:inline;
  font-weight:900;
  font-size:13px;
  color:#2563eb;
  text-decoration:underline;
  text-underline-offset: 2px;
  margin-left:26px;
}
.promo-cta:hover{color:#1d4ed8}
.promo-cta:active{color:#1e40af}
.promo-close{
  position:absolute;
  top:8px;
  right:8px;
  width:28px;
  height:28px;
  border-radius: 10px;
  border:1px solid rgba(29,27,22,.14);
  background: rgba(255,255,255,.8);
  color: rgba(29,27,22,.7);
  font-weight:900;
  line-height: 1;
  cursor:pointer;
}
.promo-close:hover{background: rgba(255,255,255,.95)}

