:root {
  --bg: #fbf8f4;
  --panel: #ffffff;
  --hero: #f7efe1;
  --text: #1c1917;
  --muted: #6b635d;
  --border: rgba(120, 113, 108, 0.18);
  --brand: #8b6f47;
  --brand-strong: #a07f4d;
  --rose: #e38ba4;
  --sky: #5aa9e6;
  --violet: #9c88ff;
  --shadow: 0 14px 40px rgba(69, 51, 33, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--brand);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  line-height: 1.05;
}

p {
  margin: 0;
}

.container {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
}

.container.narrow {
  width: min(760px, calc(100vw - 32px));
}

.section {
  padding: 40px 0;
}

.section.compact {
  padding: 16px 0 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(120, 113, 108, 0.08);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
}

.brand img {
  height: 56px;
  width: auto;
  object-fit: contain;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.main-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: #514943;
  font-size: 14px;
  font-weight: 600;
  transition: 160ms ease;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--brand);
  color: #fff;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid rgba(120, 113, 108, 0.08);
  background: #fff;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 14px;
}

.footer-links a:hover {
  color: var(--brand);
}

.hero,
.panel,
.cta-banner,
.filters-panel,
.name-card,
.seo-name-card,
.step-card,
.faq-item,
.internal-link-card {
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero,
.panel,
.cta-banner {
  border-radius: 32px;
}

.hero {
  background: var(--hero);
  overflow: hidden;
}

.hero-home,
.hero-generator,
.hero-seo {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 24px;
  padding: 48px;
}

.hero-detail,
.hero-banner {
  padding: 48px;
}

.hero-banner {
  min-height: 200px;
  background:
    linear-gradient(90deg, rgba(247, 239, 225, 1) 0%, rgba(247, 239, 225, 0.86) 40%, rgba(247, 239, 225, 0.2) 100%),
    url("/public/banner-right.jpg") right center / cover no-repeat;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-copy h1 {
  font-size: clamp(3rem, 6vw, 4.5rem);
}

.hero-copy p,
.hero-banner p,
.hero-detail p,
.cta-banner p {
  max-width: 64ch;
  color: var(--muted);
  font-size: 17px;
}

.hero-copy em,
.hero-banner em,
.hero-detail em,
.center-head em,
.section-head em,
.faq-item em {
  font-style: italic;
}

.hero-media img {
  border-radius: 24px;
}

.eyebrow,
.eyebrow-pill {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  font-weight: 700;
}

.eyebrow {
  color: #8b8177;
}

.eyebrow-pill {
  align-self: flex-start;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: #655a50;
  border: 1px solid rgba(120, 113, 108, 0.12);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.actions.split {
  justify-content: space-between;
}

.button,
button.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 14px 24px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 160ms ease;
}

.button.primary {
  background: var(--brand);
  color: #fff;
}

.button.primary:hover {
  background: var(--brand-strong);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.82);
  color: var(--brand);
  border: 1px solid rgba(120, 113, 108, 0.12);
}

.button.ghost:hover {
  background: #fff;
}

.text-link {
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
}

.section-head,
.center-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.center-head {
  justify-content: center;
  text-align: center;
}

.section-head h2,
.center-head h2 {
  font-size: clamp(2.4rem, 5vw, 3.3rem);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.category-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 270px;
  padding: 28px 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 28px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(69, 51, 33, 0.12);
}

.category-art {
  display: grid;
  place-items: center;
  min-height: 170px;
}

.category-art img {
  width: 148px;
  height: 148px;
  object-fit: contain;
}

.category-title {
  color: var(--brand);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 28px;
  line-height: 1.1;
  text-align: center;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.step-card {
  padding: 28px;
  background: #fff;
  border-radius: 28px;
}

.step-num {
  color: #cec1b4;
  font-size: 58px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
}

.step-card h3 {
  margin-top: 10px;
  font-size: 34px;
}

.step-card p {
  margin-top: 8px;
  color: var(--muted);
}

.browse-layout,
.detail-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 24px;
}

.detail-layout {
  align-items: start;
}

.filters-panel,
.generator-form,
.subtle,
.error-panel,
.empty-state {
  padding: 24px;
  background: #fff;
}

.filters-panel {
  border-radius: 28px;
  position: sticky;
  top: 92px;
  height: fit-content;
}

.filters-form {
  display: grid;
  gap: 20px;
}

.filter-group,
.field {
  display: grid;
  gap: 8px;
}

.filter-group > span,
.field > label,
.filter-group > label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #857a72;
}

input[type="text"],
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(120, 113, 108, 0.16);
  background: #fbf8f4;
  font: inherit;
  color: var(--text);
}

textarea {
  resize: vertical;
}

input[type="text"]:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(139, 111, 71, 0.18);
  border-color: rgba(139, 111, 71, 0.35);
  background: #fff;
}

.chip-grid {
  display: grid;
  gap: 8px;
}

.chip-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.chip-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.chip-option,
.tag-chip,
.letter-chip {
  position: relative;
  display: block;
  cursor: pointer;
}

.chip-option input,
.tag-chip input,
.letter-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip-option span,
.tag-chip span,
.letter-chip span {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fbf8f4;
  color: #53483f;
  border: 1px solid rgba(120, 113, 108, 0.12);
  font-size: 13px;
  font-weight: 600;
  transition: 160ms ease;
}

.chip-option.active span,
.tag-chip.active span,
.letter-chip.active span {
  background: var(--brand);
  color: #fff;
}

.tag-chip span {
  min-height: auto;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}

.letter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.letter-chip span {
  aspect-ratio: 1 / 1;
  padding: 0;
}

.chip-wrap,
.meta-row,
.chips,
.internal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.names-grid,
.seo-name-grid,
.faq-list {
  display: grid;
  gap: 18px;
}

.names-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.names-grid.two-up,
.seo-name-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.name-card,
.seo-name-card,
.faq-item,
.internal-link-card {
  padding: 24px;
  background: #fff;
  border-radius: 28px;
}

.name-card-top,
.title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.title-row {
  align-items: baseline;
  justify-content: start;
}

.name-card h3,
.seo-name-card h3,
.faq-item h3 {
  font-size: 38px;
}

.meaning {
  margin-top: 10px;
  color: var(--muted);
}

.gender-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1px solid rgba(120, 113, 108, 0.12);
}

.gender-chip.F { background: #fff0f4; color: #b94b74; }
.gender-chip.M { background: #eff7ff; color: #2471b5; }
.gender-chip.U { background: #f4f1ff; color: #6f54d8; }

.favorite-icon {
  appearance: none;
  border: 0;
  background: #f7f4ef;
  color: #a79d95;
  border-radius: 999px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 22px;
  transition: 160ms ease;
}

.favorite-icon.is-favorite,
.favorite-toggle.is-favorite {
  background: #ffe6ef;
  color: #c14472;
}

.meta-pill,
.pill,
.muted-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f2efea;
  color: #5e544b;
  font-size: 12px;
  font-weight: 600;
}

.meta-pill.amber {
  background: #fff3df;
  color: #9a6c1c;
}

.meta-pill.violet {
  background: #f2efff;
  color: #6551cc;
}

.muted-badge {
  background: rgba(139, 111, 71, 0.08);
  color: var(--brand);
}

.detail-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.detail-side {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 92px;
}

.side-panel {
  padding: 20px;
}

.side-content {
  margin-top: 10px;
}

.serif-highlight,
.quote {
  color: var(--brand-strong);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 30px;
  font-style: italic;
}

.quote {
  margin-top: 20px;
  max-width: 20ch;
}

.story-panel .lead {
  margin-top: 16px;
  color: var(--brand-strong);
  font-size: 24px;
  font-style: italic;
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 1.5;
}

.back-link {
  display: inline-block;
  margin-bottom: 18px;
  color: #7a7067;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.popularity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.popularity-track {
  flex: 1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #ece6de;
}

.popularity-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f6b44d, #e38ba4);
}

.generator-form .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field.full {
  grid-column: 1 / -1;
}

.fit-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: #ecf9f1;
  color: #17623d;
  border: 1px solid rgba(23, 98, 61, 0.08);
}

.small-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 32px;
  background: linear-gradient(135deg, #f7efe1, #fffaf5);
}

.faq-item h3 {
  font-size: 30px;
}

.faq-item p {
  margin-top: 10px;
  color: var(--muted);
}

.internal-link-card {
  display: grid;
  gap: 8px;
}

.internal-link-card strong {
  color: var(--brand);
  font-size: 24px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
}

.internal-link-card span,
.seo-explainer {
  color: var(--muted);
}

.empty-state,
.subtle,
.error-panel {
  display: grid;
  gap: 12px;
}

.error-panel {
  border-color: rgba(191, 66, 66, 0.2);
  background: #fff5f5;
}

@media (max-width: 1080px) {
  .category-grid,
  .names-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .browse-layout,
  .detail-layout,
  .hero-home,
  .hero-generator,
  .hero-seo {
    grid-template-columns: 1fr;
  }

  .filters-panel,
  .detail-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100vw - 24px, 1120px);
  }

  .header-bar,
  .footer-row {
    flex-direction: column;
    align-items: start;
  }

  .main-nav {
    width: 100%;
  }

  .hero-home,
  .hero-generator,
  .hero-seo,
  .hero-banner,
  .hero-detail,
  .cta-banner,
  .panel,
  .filters-panel,
  .name-card,
  .seo-name-card,
  .faq-item,
  .internal-link-card {
    padding: 22px;
    border-radius: 24px;
  }

  .category-grid,
  .step-grid,
  .names-grid,
  .names-grid.two-up,
  .seo-name-grid,
  .generator-form .form-grid {
    grid-template-columns: 1fr;
  }

  .chip-grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chip-grid.three {
    grid-template-columns: 1fr;
  }

  .letter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .name-card h3,
  .seo-name-card h3 {
    font-size: 30px;
  }
}
