:root {
  --cream: #f6eddc;
  --cream-2: #f9f3e6;
  --red: #bf3b2b;
  --red-dark: #a5301f;
  --pink: #f5b8c4;
  --pink-soft: #f6c6ce;
  --yellow: #f3cb4b;
  --blue: #a9cfdd;
  --ink: #3c2a24;
  --border: 1.5px solid var(--red);
  --radius: 14px;
  --radius-lg: 22px;
  --font-display: "Prata", "Playfair Display", Georgia, serif;
  --font-body: "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px 40px;
}

.boxed { border: var(--border); border-radius: var(--radius); background: var(--cream-2); }
.boxed-thick { border: 2.5px solid var(--red); border-radius: var(--radius-lg); background: var(--cream-2); }

/* ---------- Header ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 12px 22px;
  position: sticky;
  top: 12px;
  z-index: 50;
  backdrop-filter: blur(6px);
}
.logo {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--red);
  text-decoration: none;
  letter-spacing: 0.5px;
}
.nav { display: flex; gap: 22px; flex: 1; justify-content: center; flex-wrap: wrap; }
.nav a {
  color: var(--red);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.topbar-icons { display: flex; gap: 10px; }
.icon-btn {
  position: relative;
  width: 34px; height: 34px;
  border: var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--red);
  cursor: pointer;
  display: grid; place-items: center;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { background: var(--pink-soft); }
.fav-count {
  position: absolute; top: -6px; right: -6px;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 600;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: grid; place-items: center;
  padding: 0 4px;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 26px;
  margin-top: 26px;
  align-items: stretch;
}
.hero-left {
  background: var(--pink) url("/assets/bg-hero2.webp") center / cover no-repeat;
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 22px;
}
.hero-left h1 {
  font-family: var(--font-display);
  font-size: clamp(56px, 8vw, 92px);
  font-weight: 400;
  color: var(--red);
  line-height: 1;
}
.hero-left p { max-width: 380px; font-size: 14px; color: #7c3a33; }
.hero-right { padding: 22px; }
.hero-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  height: 100%;
}
.hero-grid a {
  border-radius: 12px;
  overflow: hidden;
  background: var(--pink-soft);
  aspect-ratio: 1;
  display: block;
}
.hero-grid img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s;
}
.hero-grid a:hover img { transform: scale(1.07); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 11px 34px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.4px;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-sm { padding: 8px 24px; font-size: 12.5px; }

/* ---------- Sections ---------- */
.section { margin-top: 64px; }
.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 34px;
  color: var(--red);
  margin-bottom: 22px;
}
.section-title.centered { text-align: center; }

/* ---------- Cards ---------- */
.cards-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
}
.cards-row .card { scroll-snap-align: start; }
.row-end { display: flex; justify-content: flex-end; margin-top: 10px; }
.row-center { display: flex; justify-content: center; margin-top: 26px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.card {
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(191, 59, 43, 0.18);
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(140, 60, 40, 0.14); }
.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  display: block;
}
.card-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
  opacity: 0.96;
}
.card.c-yellow .card-media { background: var(--yellow); }
.card.c-blue   .card-media { background: var(--blue); }
.card.c-pink   .card-media { background: var(--pink); }
.card.c-red    .card-media { background: #cf6a55; }

.badge {
  position: absolute; top: 10px; left: 10px;
  z-index: 2;
  background: var(--cream-2);
  border: 1px solid var(--red);
  color: var(--red);
  font-size: 10.5px; font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.badge.paid { background: var(--red); color: #fff; }

.heart {
  position: absolute; top: 8px; right: 8px;
  z-index: 2;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(249, 243, 230, 0.9);
  color: var(--red);
  cursor: pointer;
  display: grid; place-items: center;
  font-size: 15px;
  line-height: 1;
}
.heart:hover { background: #fff; }
.heart.on { background: var(--red); color: #fff; }

.card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.card-meta { font-size: 11.5px; color: #9b6e60; }
.card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card-dl {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--red);
  border-radius: 999px;
  padding: 7px 16px;
  text-decoration: none;
  white-space: nowrap;
}
.card-dl:hover { background: var(--red-dark); }
.card-src {
  font-size: 11px;
  color: #b08376;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-src:hover { color: var(--red); }

/* ---------- Filters ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  position: sticky;
  top: 76px;
  z-index: 40;
}
#q {
  flex: 1 1 220px;
  border: var(--border);
  border-radius: 999px;
  background: #fff;
  padding: 9px 18px;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
}
#q:focus { box-shadow: 0 0 0 3px rgba(191, 59, 43, 0.15); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: var(--border);
  background: transparent;
  color: var(--red);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.chip:hover { background: var(--pink-soft); }
.chip.active { background: var(--red); color: #fff; }
#tag-select {
  border: var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--red);
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}
.result-count { font-size: 12px; color: #9b6e60; margin-left: auto; }

/* ---------- Category bars ---------- */
.cat-bars { display: flex; flex-direction: column; gap: 14px; }
.cat-bar {
  border-radius: var(--radius);
  padding: 18px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  border: none;
  text-align: left;
  font-family: var(--font-body);
  transition: transform .18s;
}
.cat-bar:hover { transform: translateX(6px); }
.cat-bar h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  flex-shrink: 0;
}
.cat-bar p { font-size: 12px; opacity: 0.85; max-width: 520px; }
.cat-bar .cat-n { margin-left: auto; font-size: 13px; font-weight: 600; white-space: nowrap; }
.cat-bar.b-yellow { background: var(--yellow); color: #7a4a12; }
.cat-bar.b-yellow h3 { color: var(--red); }
.cat-bar.b-blue { background: var(--blue); color: #23505e; }
.cat-bar.b-blue h3 { color: #17414e; }
.cat-bar.b-red { background: var(--red); color: #f7d9d2; }
.cat-bar.b-red h3 { color: #fff; }
.cat-bar.b-pink { background: var(--pink); color: #8c3f37; }
.cat-bar.b-pink h3 { color: var(--red); }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 30px;
  align-items: center;
}
.about-img { overflow: hidden; aspect-ratio: 4/3; padding: 0; }
.about-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-text p { margin-bottom: 18px; max-width: 480px; }
.about-panel {
  background: var(--blue);
  border-radius: var(--radius);
  padding: 22px 26px;
  font-family: var(--font-display);
  color: #17414e;
  font-size: 16px;
  line-height: 1.8;
}

/* ---------- CTA ---------- */
.cta {
  margin-top: 70px;
  background: var(--yellow) url("/assets/bg-cta2.webp") center right / cover no-repeat;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  min-height: 420px;
  padding: 44px 48px;
}
.cta h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  color: var(--red);
  margin-bottom: 12px;
}
.cta p { max-width: 420px; margin-bottom: 20px; color: #7a4a12; }
.cta-text { max-width: 52%; }

/* ---------- Footer ---------- */
.footer {
  margin-top: 60px;
  border-top: var(--border);
  padding-top: 24px;
  display: flex;
  gap: 30px;
  align-items: baseline;
  flex-wrap: wrap;
}
.logo-sm { font-size: 20px; }
.footer p { font-size: 12px; color: #9b6e60; max-width: 640px; }
.footer a { color: var(--red); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero, .about { grid-template-columns: 1fr; }
  .cta { background-position: center left; min-height: 340px; padding: 30px 26px; }
  .cta-text { max-width: 55%; }
  .cta h2 { font-size: 24px; }
  .hero-left { padding: 40px 24px; }
  .filters { top: 8px; }
  .topbar { position: static; }
  .nav { justify-content: flex-start; gap: 14px; }
  .cat-bar { flex-wrap: wrap; gap: 8px; }
  .cat-bar .cat-n { margin-left: 0; }
}

/* ---------- Multi-page additions ---------- */
.nav a.active { text-decoration: underline; text-underline-offset: 5px; }
.card { position: relative; }
.card[hidden] { display: none; }
.grid-big .card { content-visibility: auto; contain-intrinsic-size: 260px 360px; }
.page-head { margin-top: 40px; }
.page-head .section-title { font-size: 44px; margin-bottom: 8px; }
.page-intro { color: #8a5b4d; max-width: 640px; font-size: 14.5px; }
.page-intro.centered { margin: 0 auto; text-align: center; }
.section-tight { margin-top: 26px; }
.section-title.sub { font-size: 26px; margin-top: 40px; }
.empty-note { text-align: center; color: #9b6e60; margin-top: 30px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.about-page p { max-width: 680px; margin-bottom: 14px; }
.about-page a { color: var(--red); }
.steps { max-width: 680px; margin: 10px 0 10px 20px; display: grid; gap: 8px; font-size: 14.5px; }
.card-desc { font-size: 12px; color: #8a5b4d; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cat-bar { text-decoration: none; }
a.icon-btn { text-decoration: none; }

/* ---------- Pagination / brush pages ---------- */
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { color: var(--red); }
.pagination { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.pg {
  min-width: 36px; height: 36px;
  display: grid; place-items: center;
  border: var(--border); border-radius: 999px;
  color: var(--red); text-decoration: none;
  font-size: 13px; font-weight: 600; padding: 0 10px;
}
.pg:hover { background: var(--pink-soft); }
.pg.active { background: var(--red); color: #fff; }
.pg-dots { border: none; }
.breadcrumbs { margin-top: 26px; font-size: 12.5px; color: #9b6e60; }
.breadcrumbs a { color: var(--red); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.brush-hero {
  display: grid; grid-template-columns: 1.1fr 1fr;
  gap: 30px; margin-top: 20px; align-items: start;
}
.brush-media { position: relative; overflow: hidden; aspect-ratio: 4/3; padding: 0; }
.brush-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brush-media .badge { top: 14px; left: 14px; }
.brush-info { display: flex; flex-direction: column; gap: 14px; }
.brush-info .section-title { margin-bottom: 0; font-size: 38px; }
.brush-author { color: #8a5b4d; font-size: 14px; }
.brush-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-link { text-decoration: none; display: inline-block; }
.brush-actions { margin-top: 6px; }
.brush-howto { font-size: 12.5px; color: #9b6e60; max-width: 420px; }
.brush-howto a { color: var(--red); }
@media (max-width: 900px) { .brush-hero { grid-template-columns: 1fr; } }

/* ---------- Tag & Top pages ---------- */
.tag-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.top-links-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; max-width: 860px; margin: 0 auto; }
.top-list { list-style: none; counter-reset: topn; display: flex; flex-direction: column; gap: 22px; margin-top: 10px; }
.top-item {
  counter-increment: topn;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  background: var(--cream-2);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  position: relative;
}
.top-item::before {
  content: counter(topn);
  position: absolute;
  top: -12px; left: -12px;
  width: 40px; height: 40px;
  background: var(--red); color: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 19px;
  z-index: 2;
}
.top-media { display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; background: var(--pink-soft); }
.top-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.top-info { display: flex; flex-direction: column; gap: 8px; }
.top-title { font-family: var(--font-display); font-weight: 400; font-size: 22px; }
.top-title a { color: var(--red); text-decoration: none; }
.top-title a:hover { text-decoration: underline; }
.top-meta { font-size: 12.5px; color: #9b6e60; }
.top-blurb { font-size: 14px; max-width: 560px; }
.top-actions { margin-top: auto; padding-top: 8px; }
@media (max-width: 700px) { .top-item { grid-template-columns: 1fr; } }

/* ---------- Mobile header & typography ---------- */
@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; gap: 8px 12px; padding: 10px 14px; }
  .logo { font-size: 20px; }
  .topbar-icons { margin-left: auto; }
  .icon-btn { width: 30px; height: 30px; }
  .nav {
    order: 3; flex: 1 1 100%;
    justify-content: flex-start; flex-wrap: nowrap;
    overflow-x: auto; gap: 16px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
  .page-head .section-title { font-size: 29px; }
  .section-title { font-size: 26px; }
  .brush-info .section-title { font-size: 27px; }
  .hero-left { padding: 36px 22px; }
  .hero-left h1 { font-size: clamp(40px, 13vw, 64px); }
}
