/* ==========================================================================
   Minik Kitaplık — cozy, mobile-first styles
   ========================================================================== */

:root {
  --bg: #fbf6ee;
  --surface: #ffffff;
  --surface-2: #f4ebdf;
  --text: #2b2118;
  --muted: #7a6a5c;
  --border: #eadfce;
  --accent: #c25f3a;
  --accent-soft: #f8e2d6;
  --accent-ink: #ffffff;
  --sage: #6a8f5a;
  --star: #e9a23b;
  --shadow: 0 1px 2px rgb(60 40 20 / 6%), 0 6px 20px rgb(60 40 20 / 7%);
  --radius: 18px;
  --radius-sm: 12px;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Fraunces", Georgia, serif;
  --gutter: 16px;
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1f1a16;
    --surface: #2a231e;
    --surface-2: #332a23;
    --text: #f3e9dc;
    --muted: #b8a796;
    --border: #3d332b;
    --accent: #e8956f;
    --accent-soft: #3f2b21;
    --accent-ink: #1f1a16;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 6px 20px rgb(0 0 0 / 25%);
  }
}

/* --- Base ----------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(1.8rem, 6vw, 2.8rem); }
h2 { font-size: clamp(1.35rem, 4vw, 1.75rem); }
h3 { font-size: 1.15rem; }

a { color: var(--accent); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.main { flex: 1; padding-top: 20px; padding-bottom: 48px; }
.muted { color: var(--muted); }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 16px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* --- Page progress (htmx indicator) ---------------------------------------- */

.page-progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 50;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  opacity: 0; transition: opacity .2s;
}
.page-progress.htmx-request {
  opacity: 1;
  animation: progress 1.2s ease-out forwards;
}
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(.85); } }

/* --- Header / footer ------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; white-space: nowrap;
  font-family: var(--font-head); font-weight: 700; font-size: 1.2rem;
}
.brand-logo { width: auto; height: 44px; flex: none; }

.site-nav { display: flex; align-items: center; gap: 16px; }
.site-nav a {
  color: var(--muted); text-decoration: none; font-weight: 700; font-size: .95rem;
  white-space: nowrap; padding: 8px 0;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--text); }
/* Small round Instagram icon in the top bar (uses .ig-glyph for the gradient) */
.site-nav .nav-instagram {
  width: 34px; height: 34px; padding: 0; color: #fff;
  box-shadow: 0 2px 6px rgb(214 36 159 / 25%); transition: transform .15s;
}
.site-nav .nav-instagram:hover { color: #fff; transform: scale(1.08); }
.site-nav .nav-instagram:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: .9rem; text-align: center;
  padding: 24px 0 calc(24px + env(safe-area-inset-bottom));
}
.site-footer p { margin: 0; }
.footer-inner { display: grid; justify-items: center; gap: 14px; }

/* --- Instagram "follow us" (partials/instagram_button.html, instagram_card.html) --- */

.btn-instagram {
  background: var(--surface); border-color: var(--border); color: var(--text);
  padding-left: 8px; gap: 10px;
}
.btn-instagram:hover { border-color: #d6249f; }
.btn-instagram:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ig-glyph {
  display: inline-grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%; color: #fff;
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}
.btn-sm { min-height: 38px; padding-top: 4px; padding-bottom: 4px; font-size: .9rem; }
.btn-sm .ig-glyph { width: 26px; height: 26px; }

.ig-card {
  display: grid; gap: 14px; align-items: center; padding: 18px 20px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, #d6249f 10%, transparent), transparent 55%),
    var(--surface);
}
.ig-card-title { margin: 0 0 4px; font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; }
.ig-card-sub { margin: 0; color: var(--muted); font-size: .95rem; }
.ig-card-sub strong { color: var(--text); white-space: nowrap; }
.ig-card .btn-instagram { justify-self: start; }
.post-follow { max-width: 760px; margin-left: auto; margin-right: auto; }
@media (min-width: 640px) {
  .ig-card { grid-template-columns: 1fr auto; padding: 20px 24px; }
}

/* --- Buttons, pills, chips ------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .15s, background .15s;
}
.btn:active { transform: scale(.97); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-soft { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.btn-block { width: 100%; }
[hidden] { display: none !important; }

.btn .when-busy { display: none; }
.btn.htmx-request .when-idle { display: none; }
.btn.htmx-request .when-busy { display: inline; }

.pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); font-size: .8rem; font-weight: 700;
}

.chip {
  --chip-bg: var(--surface-2);
  --chip-fg: var(--text);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--chip-bg); color: var(--chip-fg);
  font-size: .85rem; font-weight: 700; text-decoration: none; white-space: nowrap;
}
/* Chips that are links (go to the filtered review list) get hover/tap feedback;
   plain chips (home page cards) stay flat so the two look different. */
a.chip {
  box-shadow: 0 1px 0 rgb(0 0 0 / 8%);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
a.chip:hover { filter: brightness(.95); transform: translateY(-1px); box-shadow: 0 3px 8px rgb(60 40 20 / 18%); }
a.chip:active { transform: scale(.96); box-shadow: none; }
a.chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.tag-row { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-mark {
  display: inline-grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-2); color: var(--muted);
}

/* One-line horizontal tag slider (home "Konulara göz atın").
   Touch: swipe. Mouse: arrow buttons, shown only when there's more to scroll
   (app.js toggles .can-prev / .can-next on [data-slider]). */
.tag-slider { display: flex; align-items: center; gap: 8px; }
.tag-slider-viewport { position: relative; flex: 1; min-width: 0; }
.tag-slider-track {
  display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scroll-behavior: smooth;
  scrollbar-width: none; padding: 4px 2px 6px; /* room for the chip hover lift/shadow */
}
.tag-slider-track::-webkit-scrollbar { display: none; }
.tag-slider-track > .chip { scroll-snap-align: start; flex: none; }

/* Fade the edge(s) where more chips are hidden */
.tag-slider.can-next .tag-slider-track { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
.tag-slider.can-prev .tag-slider-track { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); }
.tag-slider.can-prev.can-next .tag-slider-track {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}

.slider-arrow {
  display: none; position: absolute; top: 50%; z-index: 1; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%; padding: 0; cursor: pointer;
  place-items: center; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow);
}
.slider-arrow:hover { background: var(--surface-2); }
.slider-arrow--prev { left: -4px; }
.slider-arrow--next { right: -4px; }
/* Arrows only for mouse users; touch screens swipe */
@media (hover: hover) and (pointer: fine) {
  .tag-slider.can-prev .slider-arrow--prev,
  .tag-slider.can-next .slider-arrow--next { display: grid; }
}

/* Filter chips are radio buttons styled as chips */
.chip-scroller {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px;
  scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding-inline: var(--gutter);
}
.chip-scroller::-webkit-scrollbar { display: none; }
.chip-radio {
  cursor: pointer; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); padding: 8px 14px; min-height: 40px;
}
.chip-radio::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--chip-bg); flex: none;
}
.chip-radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip-radio small { opacity: .7; font-weight: 600; }
.chip-radio:has(input:checked) { background: var(--chip-bg); color: var(--chip-fg); border-color: transparent; }
.chip-radio:has(input:checked)::before { background: currentColor; }
.chip-radio:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.chip-radio:first-child { --chip-bg: var(--text); --chip-fg: var(--bg); }

/* --- Search ---------------------------------------------------------------- */

.search-field {
  display: flex; align-items: center; gap: 10px; flex: 1;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 0 16px; min-height: 50px; color: var(--muted); box-shadow: var(--shadow);
}
.search-field:focus-within { border-color: var(--accent); }
.search-field input {
  flex: 1; border: 0; outline: 0; background: transparent; color: var(--text);
  font: inherit; min-width: 0; padding: 12px 0;
}

.filters { display: grid; gap: 12px; margin-bottom: 16px; }

/* --- Sections ---------------------------------------------------------------*/

.section { margin-top: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.link-arrow { font-weight: 700; text-decoration: none; color: var(--accent); }

.page-head { margin: 0 0 14px; }
.page-head h1 { font-size: clamp(1.45rem, 4.5vw, 1.9rem); margin-bottom: .25em; }
.page-head .lead { font-size: .98rem; margin: 0; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--sage); text-decoration: none; margin-bottom: 8px;
}

/* --- Hero ----------------------------------------------------------------- */

.hero {
  background:
    radial-gradient(circle at 90% 10%, var(--accent-soft), transparent 45%),
    radial-gradient(circle at 0% 100%, color-mix(in srgb, var(--sage) 18%, transparent), transparent 50%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  padding: 28px 20px;
  box-shadow: var(--shadow);
}
.hero h1 { max-width: 16ch; }
.hero-search { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

/* --- Cards ------------------------------------------------------------------ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 16px;
}
.card-grid--books { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

.review-card, .book-card, .post-card { display: flex; flex-direction: column; overflow: hidden; transition: transform .2s; }
.review-card:hover, .book-card:hover, .post-card:hover { transform: translateY(-3px); }
.card-link { color: inherit; text-decoration: none; display: flex; flex-direction: column; flex: 1; }

.card-cover {
  aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden;
  display: grid; place-items: center;
}
.book-card .card-cover { aspect-ratio: 3 / 4; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; }

.cover-placeholder {
  width: 100%; height: 100%; display: grid; place-content: center; text-align: center; gap: 4px;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface-2));
  color: var(--muted); padding: 12px;
}
.cover-placeholder span { font-size: 2.4rem; }

.card-body { padding: 14px 16px 10px; display: grid; gap: 6px; }
.card-title { margin: 0; font-size: 1.15rem; }
.card-meta { margin: 0; color: var(--muted); font-size: .9rem; }
.card-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-excerpt { margin: 0; font-size: .95rem; }
.review-card .tag-row { padding: 4px 16px 16px; }

.stars { color: var(--border); letter-spacing: 1px; font-size: 1rem; white-space: nowrap; }
.star.is-on { color: var(--star); }

.load-more { grid-column: 1 / -1; display: flex; justify-content: center; padding-top: 8px; }
.results-count { color: var(--muted); font-size: .95rem; }

/* Featured review on home */
.featured { display: grid; overflow: hidden; color: inherit; text-decoration: none; }
.featured-cover { aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.featured-cover img { width: 100%; height: 100%; object-fit: cover; }
.featured-body { padding: 20px; }
.featured-body h2 { margin-bottom: 4px; }

/* --- Blog ------------------------------------------------------------------ */

.post-card-cover { aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.post-card-cover img { width: 100%; height: 100%; object-fit: cover; }

.post { max-width: 760px; margin: 0 auto; }
.post-head { margin-bottom: 20px; }
.post-head h1 { margin-bottom: .3em; }
.post-cover { margin: 0 0 28px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--surface-2); }
.post-cover img { width: 100%; max-height: 460px; object-fit: cover; }
.post .prose { max-width: none; }

/* --- Review & book pages ----------------------------------------------------- */

.notice {
  background: var(--accent-soft); color: var(--accent); font-weight: 700;
  padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px;
}

.review-hero { display: grid; gap: 20px; margin-bottom: 24px; }
.review-cover {
  width: min(220px, 60%); aspect-ratio: 3 / 4; border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: 0 10px 30px rgb(60 40 20 / 18%); background: var(--surface-2);
  transform: rotate(-2deg);
}
.review-cover img { width: 100%; height: 100%; object-fit: cover; }
.review-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .95rem; }

.review-layout { display: grid; gap: 24px; }
.review-side { display: grid; gap: 16px; align-content: start; }

.book-facts { padding: 18px; }
.facts-title { font-size: 1.2rem; margin-bottom: 4px; }
.book-card:not(:has(a)):hover { transform: none; }
.facts { margin: 12px 0 16px; display: grid; gap: 8px; }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 8px; font-size: .95rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }

.side-list { padding: 16px 18px; }
.side-list ul { margin: 0; padding-left: 18px; }

.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.link-list a { display: grid; gap: 4px; padding: 14px 16px; color: inherit; text-decoration: none; }

/* Author / publisher header */
.profile { display: flex; align-items: center; gap: 16px; margin: 8px 0 20px; }
.profile h1 { margin: 0 0 4px; }
.profile-photo { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; flex: none; }
.profile-photo--logo { border-radius: var(--radius-sm); object-fit: contain; background: var(--surface); }
.profile-initial {
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
  font-family: var(--font-head); font-size: 2.2rem; font-weight: 700;
}

/* "Similar reviews" horizontal slider (review detail) */
.slider {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px var(--gutter) 12px; margin: 0 calc(var(--gutter) * -1);
  scroll-padding-inline: var(--gutter); scrollbar-width: thin;
}
.slide {
  flex: 0 0 160px; scroll-snap-align: start; overflow: hidden;
  display: flex; flex-direction: column; color: inherit; text-decoration: none;
  transition: transform .2s;
}
.slide:hover { transform: translateY(-3px); }
.slide-cover { aspect-ratio: 3 / 4; background: var(--surface-2); overflow: hidden; }
.slide-cover img { width: 100%; height: 100%; object-fit: cover; }
.slide-cover .cover-placeholder span { font-size: 1.8rem; }
.slide-body { padding: 10px 12px 12px; display: grid; gap: 4px; }
.slide-title {
  margin: 0; font-size: .98rem; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.slide .card-meta { font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slide .stars { font-size: .85rem; }

/* --- Prose: the HTML written in the admin ------------------------------------ */

.prose { font-size: 1.08rem; line-height: 1.75; max-width: 68ch; overflow-wrap: break-word; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose img { border-radius: var(--radius); margin: 1.5em auto; box-shadow: var(--shadow); }
.prose figure { margin: 1.8em 0; }
.prose figure img { margin: 0 auto; }
.prose figcaption { text-align: center; color: var(--muted); font-size: .9rem; margin-top: .6em; }
.prose blockquote {
  margin: 1.5em 0; padding: 16px 20px; border-radius: var(--radius);
  background: var(--accent-soft); border-left: 5px solid var(--accent);
  font-family: var(--font-head); font-size: 1.15rem;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose hr { border: 0; text-align: center; margin: 2em 0; }
.prose hr::after { content: "✦ ✦ ✦"; color: var(--muted); letter-spacing: .5em; }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--border); padding: 8px; text-align: left; }
.prose iframe, .prose video { max-width: 100%; border-radius: var(--radius); }

/* Handy helpers you can use inside review HTML */
.prose .callout {
  background: var(--surface-2); border-radius: var(--radius); padding: 16px 18px; margin: 1.5em 0;
}
.prose .gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.prose .gallery img { margin: 0; }

/* --- Reader lists ("Okudum" / "Alacaklarım"), stored in the browser ----------- */

.shelf-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 12px; }
.shelf-btn {
  /* "On" state is a soft tint (selected), not a solid fill, so it doesn't look like an action button */
  --on-bg: #e4eedc; --on-fg: #3f6a32; /* Okudum: sage */
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 8px 10px; border-radius: 999px; cursor: pointer;
  /* Off: outline + text in the button's own color. On: soft tint fill + ✓ */
  border: 1.5px solid color-mix(in srgb, var(--on-fg) 45%, transparent);
  background: transparent; color: var(--on-fg);
  font: inherit; font-weight: 700; font-size: .92rem;
  transition: background .15s, border-color .15s, transform .15s;
}
.shelf-btn--buy { --on-bg: #fbe9c6; --on-fg: #7a4e0e; } /* Alacaklarım: honey */
@media (prefers-color-scheme: dark) {
  .shelf-btn { --on-bg: #2e3a28; --on-fg: #b0d69c; }
  .shelf-btn--buy { --on-bg: #3e3020; --on-fg: #f2c879; }
}
.shelf-btn::before { content: "+"; font-size: 1.1em; line-height: 1; }
.shelf-btn:hover { border-color: var(--on-fg); background: color-mix(in srgb, var(--on-bg) 45%, transparent); }
.shelf-btn:active { transform: scale(.97); }
.shelf-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.shelf-btn[aria-pressed="true"] { background: var(--on-bg); border-color: var(--on-fg); color: var(--on-fg); }
.shelf-btn[aria-pressed="true"]::before { content: "✓"; }
.shelf-link { grid-column: 1 / -1; justify-self: center; font-size: .88rem; font-weight: 700; text-decoration: none; }

/* Home: "Listelerim" link, only when the visitor has saved something */
.shelf-summary {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px;
  margin-top: 16px; padding: 14px 18px; color: inherit; text-decoration: none;
}
.shelf-summary-title { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; }
.shelf-summary-counts { color: var(--muted); font-size: .95rem; flex: 1; }
.shelf-summary-counts b { color: var(--text); }

/* /listem/ page */
.shelf-tabs {
  display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 18px;
  background: var(--surface-2); border-radius: 999px;
}
.shelf-tab {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 6px 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--muted); font: inherit; font-weight: 700;
}
.shelf-tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.shelf-tab:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.shelf-tab-count {
  min-width: 22px; padding: 0 6px; border-radius: 999px; text-align: center;
  background: var(--accent-soft); color: var(--accent); font-size: .8rem;
}
.shelf-grid { list-style: none; padding: 0; margin: 0; }
.shelf-item .card-meta { font-size: .85rem; }
.shelf-item-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 12px 12px; margin-top: auto;
}
.shelf-item-buy { font-weight: 700; font-size: .88rem; text-decoration: none; }
.shelf-item-remove {
  margin-left: auto; border: 0; background: none; cursor: pointer; padding: 6px 2px;
  color: var(--muted); font: inherit; font-size: .85rem; font-weight: 700;
}
.shelf-item-remove:hover { color: var(--accent); }

/* --- Empty states ----------------------------------------------------------- */

.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty-emoji { font-size: 3rem; margin: 0; }
.empty h1 { color: var(--text); }

/* --- Larger screens --------------------------------------------------------- */

@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .hero { padding: 44px 40px; }
  .hero-search { flex-direction: row; max-width: 560px; }
  .chip-scroller { flex-wrap: wrap; overflow: visible; margin: 0; padding-inline: 2px; }
  .featured { grid-template-columns: 2fr 3fr; }
  .featured-cover { aspect-ratio: auto; min-height: 260px; }
  .featured-body { padding: 28px; align-self: center; }
}

@media (min-width: 900px) {
  .review-hero { grid-template-columns: 240px 1fr; align-items: end; }
  .review-cover { width: 100%; }
  .review-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .review-side { position: sticky; top: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
