/* ==========================================================================
   Sonjuski — styles.css
   A light, feminine, Google-homepage-inspired design system.
   Static CSS only: no frameworks, no external fonts, no build step.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand palette (measured from the logo + reference background) */
  --blush-bg:    #FEDCE2;  /* homepage background */
  --blush-soft:  #FFF1F5;  /* internal page background */
  --surface:     #FFFFFF;  /* search bar, cards, content surfaces */
  --pink-strong: #F01878;  /* primary hot pink */
  --pink-deep:   #E0006E;  /* darker highlights, active/pressed, links on white */
  --pink-mid:    #F04890;  /* secondary accents, chips */
  --pink-pale:   #F4B6CC;  /* soft fills, hover backgrounds */
  --pink-ink:    #B0185C;  /* deeper pink for small text on tinted fills (WCAG AA) */
  --pink-wash:   #FCE7EE;  /* very soft hover background on white */
  --ink:         #2B2B2B;  /* body text */
  --ink-soft:    #6B6B6B;  /* secondary text */
  --line:        #F0D6DF;  /* hairline borders on pink surfaces */
  --line-soft:   #ECECEC;  /* hairline borders on white */

  /* Typography — system stack only */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Radii */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(120, 20, 60, 0.08);
  --shadow-md: 0 4px 16px rgba(176, 24, 92, 0.12);
  --shadow-lg: 0 10px 34px rgba(176, 24, 92, 0.18);
  --shadow-focus: 0 0 0 4px rgba(240, 24, 120, 0.28);

  /* Spacing rhythm */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* Layout */
  --maxw: 1080px;
  --header-h: 64px;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--blush-soft);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden; /* guard against accidental horizontal scroll */
}

img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

a { color: var(--pink-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 var(--space-3); color: var(--ink); }
p { margin: 0 0 var(--space-4); }

/* --------------------------------------------------------------------------
   3. Accessibility helpers & focus
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--space-3); top: -60px;
  background: var(--surface);
  color: var(--pink-deep);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-md);
  z-index: 200;
  transition: top 0.15s ease;
}
.skip-link:focus { top: var(--space-3); }

/* Visible focus ring on every interactive element */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible,
.chip:focus-visible,
.shortcut:focus-visible {
  outline: 3px solid var(--pink-deep);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
/* Search inputs get a halo instead of a hard outline */
.searchbar:focus-within {
  box-shadow: var(--shadow-md), var(--shadow-focus);
  border-color: transparent;
}

:focus:not(:focus-visible) { outline: none; }

/* --------------------------------------------------------------------------
   4. Layout containers
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.page { padding-bottom: var(--space-8); }

.section-intro {
  padding: var(--space-6) 0 var(--space-4);
}
.section-intro h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.01em;
}
.section-intro p {
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0;
}
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pink-ink);
  margin-bottom: var(--space-2);
}

/* --------------------------------------------------------------------------
   5. Buttons & controls
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font: inherit;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  padding: var(--space-2) var(--space-5);
  cursor: pointer;
  background: var(--surface);
  color: var(--pink-deep);
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { background: var(--pink-wash); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--pink-deep); color: #fff; }   /* white text → AA (4.8:1) */
.btn-primary:hover { background: var(--pink-ink); }
.btn-ghost { background: transparent; box-shadow: none; border-color: var(--pink-pale); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--pink-deep);
  font-weight: 600;
  margin: var(--space-5) 0;
}
.back-link svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   6. Search bar (shared between homepage and header)
   -------------------------------------------------------------------------- */
.searchbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.18s ease;
}
.searchbar:hover { box-shadow: var(--shadow-lg); }
.searchbar .search-icon { width: 22px; height: 22px; color: var(--pink-mid); flex: none; }
.searchbar .search-submit {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--pink-mid);
  cursor: pointer;
  border-radius: 50%;
}
.searchbar .search-submit:hover { color: var(--pink-deep); }
.searchbar .search-submit svg { width: 22px; height: 22px; }
.searchbar input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
}
.searchbar input::placeholder { color: var(--ink-soft); }
.searchbar .clear-btn {
  flex: none;
  display: none;            /* shown via .is-visible when text present */
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}
.searchbar .clear-btn.is-visible { display: inline-flex; }
.searchbar .clear-btn:hover { background: var(--pink-wash); color: var(--pink-deep); }
.searchbar .clear-btn svg { width: 18px; height: 18px; }

/* Homepage search bar is a touch larger */
.home-search .searchbar { padding: var(--space-4) var(--space-5); }
.home-search .searchbar input { font-size: 1.1rem; }

/* --------------------------------------------------------------------------
   7. Homepage
   -------------------------------------------------------------------------- */
.home {
  background: var(--blush-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.home-main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-7) var(--space-5) var(--space-6);
}
.home-logo-card {
  display: inline-block;
  /* Matched to the logo PNG's baked-in off-white background (~#FEFEFE) so the
     wordmark sits on the card with no visible seam, colours untouched. */
  background: #FEFEFE;
  padding: clamp(14px, 2.6vw, 22px) clamp(22px, 5vw, 40px);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  margin: 0 auto var(--space-6);
}
.home-logo {
  display: block;
  width: min(360px, 70vw);
  aspect-ratio: 3 / 2;        /* preserve the 3:2 logo ratio */
  height: auto;
}
.home-search {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
}
/* Circular section shortcuts */
.shortcuts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-5) var(--space-5);
  max-width: 760px;
  margin: var(--space-7) auto 0;
}
.shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  width: 76px;
  color: var(--ink);
  text-align: center;
}
.shortcut:hover { text-decoration: none; }
.shortcut .shortcut-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--pink-strong);
  box-shadow: var(--shadow-sm);
  transition: transform 0.14s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease;
}
.shortcut:hover .shortcut-icon {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  background: var(--pink-strong);
  color: #fff;
}
.shortcut .shortcut-icon svg { width: 28px; height: 28px; }
.shortcut .shortcut-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}
.shortcut:focus-visible { outline: none; }
.shortcut:focus-visible .shortcut-icon {
  outline: 3px solid var(--pink-deep);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   8. Shared internal-page header (rendered by app.js)
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: var(--header-h);
  padding: var(--space-2) var(--space-5);
  max-width: var(--maxw);
  margin: 0 auto;
}
.header-logo { flex: none; }
.header-logo img {
  height: 30px;            /* ~28–32px per spec */
  width: auto;
  aspect-ratio: 3 / 2;
}
.header-search {
  flex: 1 1 auto;
  max-width: 460px;
}
.header-search .searchbar { padding: var(--space-2) var(--space-4); box-shadow: var(--shadow-sm); }
.header-search .searchbar input { font-size: 1rem; }
.header-home {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  color: var(--pink-deep);
  white-space: nowrap;
}
.header-home svg { width: 18px; height: 18px; }

/* Section nav row (category controls) under the header */
.section-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.section-nav .nav-inner {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--space-2) var(--space-5);
  scrollbar-width: thin;
}
.section-nav a {
  flex: none;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--r-pill);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
}
.section-nav a:hover { background: var(--pink-wash); color: var(--pink-deep); text-decoration: none; }
.section-nav a[aria-current="page"] { background: var(--pink-deep); color: #fff; }

/* Mobile menu toggle (hidden on wide screens) */
.header-menu-btn {
  display: none;
  flex: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--pink-deep);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.header-menu-btn svg { width: 22px; height: 22px; }

/* --------------------------------------------------------------------------
   9. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.home .site-footer { border-top: none; background: transparent; }
.site-footer .footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--space-6) var(--space-5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.site-footer .footer-brand { font-weight: 600; color: var(--pink-deep); }

/* --------------------------------------------------------------------------
   10. Generic cards & grids
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--space-5);
}
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.14s ease, box-shadow 0.16s ease;
  display: flex;
  flex-direction: column;
}
a.card:hover, .card.is-link:hover { text-decoration: none; }
.card-media {
  aspect-ratio: 4 / 3;
  background: var(--pink-wash);
  overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.card-title { font-size: 1.1rem; margin: 0; }
.card-sub { color: var(--ink-soft); font-size: 0.9rem; margin: 0; }
.card-text { color: var(--ink); font-size: 0.95rem; margin: 0; }

a.card:hover, .card.hoverable:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Tag pills */
.tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--pink-ink);
  background: var(--pink-wash);
  border-radius: var(--r-pill);
  padding: 2px 10px;
}

/* Small meta badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--pink-deep);   /* white text → AA (4.8:1) */
  border-radius: var(--r-pill);
  padding: 3px 10px;
}
.badge.subtle { background: var(--pink-wash); color: var(--pink-ink); }
.badge svg { width: 14px; height: 14px; flex: none; }

/* --------------------------------------------------------------------------
   11. Books — Google-results-style list
   -------------------------------------------------------------------------- */
.result-list { display: flex; flex-direction: column; gap: var(--space-5); margin-top: var(--space-4); }
.result-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--space-5);
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.16s ease, transform 0.14s ease;
}
.result-row:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.result-row .result-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--pink-wash);
}
.result-row .result-cover img { width: 100%; height: 100%; object-fit: cover; }
.result-row h3 { margin: 0 0 var(--space-1); font-size: 1.2rem; }
.result-row h3 a { color: var(--pink-deep); }
.result-row .byline { color: var(--ink-soft); font-size: 0.92rem; margin: 0 0 var(--space-2); }
.result-row p { margin: 0 0 var(--space-2); color: var(--ink); }

/* --------------------------------------------------------------------------
   12. Pictures — chips, gallery, lightbox
   -------------------------------------------------------------------------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-4) 0 var(--space-5);
}
.chip {
  border: 1px solid var(--pink-pale);
  background: var(--surface);
  color: var(--pink-deep);
  border-radius: var(--r-pill);
  padding: var(--space-2) var(--space-4);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.chip:hover { background: var(--pink-wash); }
.chip[aria-pressed="true"] {
  background: var(--pink-deep);
  border-color: var(--pink-deep);
  color: #fff;
}

/* Masonry via CSS columns; DOM order preserved for keyboard + lightbox nav */
.gallery {
  column-gap: var(--space-4);
  columns: 4 220px;
}
.gallery .photo {
  break-inside: avoid;
  margin: 0 0 var(--space-4);
  display: block;
  width: 100%;
  border: none;
  background: var(--surface);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  padding: 0;
  text-align: left;
  transition: transform 0.14s ease, box-shadow 0.16s ease;
}
.gallery .photo:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.gallery .photo img { width: 100%; height: auto; display: block; }
.gallery .photo .photo-cap {
  display: block;
  padding: var(--space-3) var(--space-4);
  font-size: 0.88rem;
  color: var(--ink);
}
.gallery .photo .photo-cat { color: var(--ink-soft); font-size: 0.78rem; display: block; margin-top: 2px; }

.pictures-search { max-width: 520px; margin: var(--space-2) 0; }
.gallery-empty { padding: var(--space-7) 0; text-align: center; color: var(--ink-soft); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(43, 12, 24, 0.78);
  padding: var(--space-5);
}
.lightbox.is-open { display: flex; }
.lightbox-figure {
  margin: 0;
  max-width: min(900px, 92vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.lightbox-figure img {
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  background: var(--pink-wash);
}
.lightbox-figure figcaption {
  padding: var(--space-4) var(--space-5);
  color: var(--ink);
}
.lightbox-figure figcaption .lb-cat { color: var(--ink-soft); font-size: 0.85rem; }
.lightbox-btn {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--pink-deep);
  cursor: pointer;
  box-shadow: var(--shadow-md);
}
.lightbox-btn:hover { background: #fff; }
.lightbox-btn svg { width: 26px; height: 26px; }
.lightbox-close { top: var(--space-5); right: var(--space-5); }
.lightbox-prev { left: var(--space-4); top: 50%; transform: translateY(-50%); }
.lightbox-next { right: var(--space-4); top: 50%; transform: translateY(-50%); }
.lightbox-counter {
  position: absolute;
  bottom: var(--space-5);
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.85rem;
  background: rgba(0,0,0,0.35);
  padding: 2px 12px;
  border-radius: var(--r-pill);
}

/* --------------------------------------------------------------------------
   13. Music
   -------------------------------------------------------------------------- */
.music-card .card-media { aspect-ratio: 1 / 1; }
.music-card .kind { color: var(--pink-deep); }
.tracklist { margin-top: var(--space-2); display: flex; flex-direction: column; gap: 2px; }
.tracklist li {
  color: var(--ink-soft);
  font-size: 0.9rem;
  padding: var(--space-1) 0;
  border-top: 1px dashed var(--line);
}
.tracklist li:first-child { border-top: none; }
.media-note {
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-top: var(--space-2);
}
details.music-details > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--pink-deep);
  list-style: none;
  padding: var(--space-2) 0;
}
details.music-details > summary::-webkit-details-marker { display: none; }
details.music-details > summary::after { content: " ▾"; }
details.music-details[open] > summary::after { content: " ▴"; }

/* --------------------------------------------------------------------------
   14. Recipes
   -------------------------------------------------------------------------- */
.recipe-card .recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin-top: var(--space-1);
}
.recipe-card .recipe-meta span { display: inline-flex; align-items: center; gap: 4px; }
.recipe-card .recipe-meta svg { width: 15px; height: 15px; flex: none; color: var(--pink-mid); }
.media-player { width: 100%; margin-top: var(--space-3); }
.recipe-columns { display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--space-6); }
.recipe-block h3 { color: var(--pink-deep); font-size: 1.05rem; }
/* Recipe listing: the image links to its full recipe page */
.recipe-image-link { display: block; cursor: pointer; }
.recipe-image-link img { transition: transform 0.2s ease; }
.recipe-image-link:hover img { transform: scale(1.04); }
.recipe-image-link:focus-visible { outline: 3px solid var(--pink-deep); outline-offset: -3px; }
.ingredient-list li {
  padding: var(--space-2) 0;
  border-bottom: 1px dashed var(--line);
  color: var(--ink);
}
.step-list { counter-reset: step; display: flex; flex-direction: column; gap: var(--space-4); }
.step-list li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--space-3);
  align-items: start;
}
.step-list li::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--pink-deep);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   15. Journal
   -------------------------------------------------------------------------- */
.journal-card .card-media { aspect-ratio: 16 / 9; }
.journal-date { color: var(--ink-soft); font-size: 0.85rem; }
.article {
  max-width: 70ch;
  margin: 0 auto;
}
.article .article-hero {
  aspect-ratio: 16 / 7;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--pink-wash);
  margin-bottom: var(--space-5);
}
.article .article-hero img { width: 100%; height: 100%; object-fit: cover; }
.article h1 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
.article p { font-size: 1.05rem; }
.article .quote {
  border-left: 4px solid var(--pink-mid);
  background: var(--pink-wash);
  padding: var(--space-4) var(--space-5);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: var(--space-5) 0;
  color: var(--ink);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   16. Detail pages (books / crochet)
   -------------------------------------------------------------------------- */
.detail-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-6);
  align-items: start;
  margin-bottom: var(--space-6);
}
.detail-cover {
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--pink-wash);
  box-shadow: var(--shadow-md);
}
.detail-cover.book { aspect-ratio: 2 / 3; }
.detail-cover.square { aspect-ratio: 1 / 1; }
.detail-cover.wide { aspect-ratio: 4 / 3; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-head h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: var(--space-2); }
.detail-head .byline { color: var(--ink-soft); font-size: 1.05rem; margin-bottom: var(--space-4); }
.detail-section { margin: var(--space-6) 0; }
.detail-section h2 { font-size: 1.3rem; color: var(--pink-deep); }
.materials-list li {
  padding: var(--space-2) 0 var(--space-2) var(--space-5);
  position: relative;
  border-bottom: 1px dashed var(--line);
}
.materials-list li::before {
  content: "";
  position: absolute;
  left: 4px; top: 50%;
  width: 8px; height: 8px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--pink-mid);
}
.meta-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-4); }

/* Related items strip */
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-4); margin-top: var(--space-4); }

/* --------------------------------------------------------------------------
   17. Search results page
   -------------------------------------------------------------------------- */
.search-head { padding: var(--space-6) 0 var(--space-2); }
.search-head h1 { font-size: 1.5rem; }
.search-summary { color: var(--ink-soft); margin-bottom: var(--space-4); }
.search-results { display: flex; flex-direction: column; gap: var(--space-4); margin-top: var(--space-2); }
.search-result {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: var(--space-4);
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.16s ease, transform 0.14s ease;
}
.search-result:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.search-result .result-thumb {
  width: 72px; height: 72px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--pink-wash);
}
.search-result .result-thumb img { width: 100%; height: 100%; object-fit: cover; }
.search-result .result-thumb.no-img {
  display: flex; align-items: center; justify-content: center;
  color: var(--pink-mid);
}
.search-result .result-thumb.no-img svg { width: 28px; height: 28px; }
.search-result h3 { margin: 0; font-size: 1.1rem; }
.search-result h3 a { color: var(--pink-deep); }
.search-result .result-meta { display: flex; align-items: center; gap: var(--space-2); margin: 2px 0 var(--space-2); flex-wrap: wrap; }
.search-result .result-snippet { margin: 0; color: var(--ink); font-size: 0.95rem; }
mark { background: #FFE08A; color: inherit; padding: 0 1px; border-radius: 3px; }

/* Empty / no-results states */
.empty-state {
  text-align: center;
  padding: var(--space-7) var(--space-5);
  max-width: 540px;
  margin: 0 auto;
}
.empty-state .empty-icon {
  width: 64px; height: 64px;
  margin: 0 auto var(--space-4);
  color: var(--pink-mid);
}
.empty-state .empty-icon svg { width: 100%; height: 100%; }
.empty-state h2 { font-size: 1.3rem; }
.empty-state p { color: var(--ink-soft); }
.empty-suggestions { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; margin-top: var(--space-4); }

/* --------------------------------------------------------------------------
   18. Favorites
   -------------------------------------------------------------------------- */
.fav-group { margin-bottom: var(--space-6); }
.fav-group h2 { font-size: 1.25rem; color: var(--pink-deep); display: flex; align-items: center; gap: var(--space-2); }
.fav-group h2 svg { width: 22px; height: 22px; }
.fav-note { color: var(--ink-soft); font-size: 0.9rem; font-style: italic; }

/* --------------------------------------------------------------------------
   19. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .recipe-columns { grid-template-columns: 1fr; gap: var(--space-5); }
  .detail-head { grid-template-columns: 160px 1fr; gap: var(--space-5); }
}

@media (max-width: 768px) {
  .header-search { display: none; }      /* collapse search into a toggle on tablet/mobile */
  .header-menu-btn { display: inline-flex; }
  .site-header.search-open .header-search {
    display: block;
    order: 5;
    flex-basis: 100%;
    max-width: none;
    margin-top: var(--space-2);
  }
  .site-header .header-inner { flex-wrap: wrap; }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .gallery { columns: 2 150px; }
}

@media (max-width: 560px) {
  .container { padding: 0 var(--space-4); }
  .grid.cols-2, .grid.cols-3, .grid.cols-auto { grid-template-columns: 1fr; }
  .result-row { grid-template-columns: 90px 1fr; gap: var(--space-4); }
  .detail-head { grid-template-columns: 1fr; }
  .detail-cover { max-width: 220px; }
  .detail-cover.book { max-width: 180px; }
  .search-result { grid-template-columns: 56px 1fr; }
  .search-result .result-thumb { width: 56px; height: 56px; }
  .shortcuts { gap: var(--space-4) var(--space-5); }
  .home-main { padding: var(--space-6) var(--space-4) var(--space-5); }
  .gallery { columns: 1; }
  .lightbox-prev { left: var(--space-2); }
  .lightbox-next { right: var(--space-2); }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
