:root {
  --bg-top: #ece0c6;
  --bg-bottom: #cdb892;
  --panel: rgba(243, 233, 210, 0.86);
  --panel-strong: #f6efdc;
  --text: #26201a;
  --muted: #5c5140;
  --accent: #2f5140;
  --accent-strong: #a8791f;
  --line: rgba(38, 32, 26, 0.18);
  --shadow: 0 26px 70px rgba(38, 30, 18, 0.28);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "EB Garamond", Georgia, serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(246, 239, 220, 0.75), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(168, 121, 31, 0.22), transparent 26%),
    radial-gradient(circle at 50% 120%, rgba(47, 81, 64, 0.35), transparent 55%),
    linear-gradient(165deg, var(--bg-top), var(--bg-bottom));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(38, 32, 26, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 32, 26, 0.05) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 88%);
  pointer-events: none;
}

.page-shell {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 64px 24px 40px;
}

.hero {
  max-width: 760px;
  margin-bottom: 36px;
  animation: fade-up 700ms ease both;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  font-weight: 600;
}

h1,
h2,
h3 {
  font-family: "Cinzel", serif;
  line-height: 1.02;
  letter-spacing: 0.01em;
}

h1 {
  margin: 0;
  font-family: "Cinzel Decorative", "Cinzel", serif;
  font-weight: 700;
  font-size: clamp(2.9rem, 7vw, 5.4rem);
  color: #23372b;
  text-shadow: 0 1px 0 rgba(246, 239, 220, 0.6);
}

.hero-copy,
.result-summary,
.info-strip p,
.result-meta dd {
  color: var(--muted);
  line-height: 1.7;
}

.hero-copy {
  max-width: 60ch;
  margin-top: 18px;
  font-size: 1.15rem;
}

.app-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 20px;
  align-items: stretch;
}

.panel,
.info-strip article {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.panel::after,
.info-strip article::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 5px;
  border: 1px solid rgba(168, 121, 31, 0.35);
  pointer-events: none;
}

.panel-form {
  padding: 28px;
  animation: fade-up 800ms ease 80ms both;
}

.converter-form label,
.result-kicker,
.result-meta dt,
.examples span {
  display: block;
  font-family: "Cinzel", serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.input-row {
  display: flex;
  gap: 14px;
  margin-top: 12px;
}

input,
button {
  font: inherit;
}

input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(38, 32, 26, 0.24);
  border-radius: 6px;
  padding: 18px 20px;
  font-size: 1.1rem;
  background: rgba(246, 239, 220, 0.94);
  color: var(--text);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px rgba(47, 81, 64, 0.16);
}

button {
  border: 0;
  border-radius: 6px;
  padding: 18px 24px;
  font-family: "Cinzel", serif;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #f6efdc;
  background: linear-gradient(135deg, var(--accent), #1f3b2d);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

button:hover,
button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(31, 59, 45, 0.32);
  filter: saturate(1.05);
}

.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.examples span {
  flex-basis: 100%;
}

.examples button {
  padding: 10px 14px;
  color: var(--text);
  background: rgba(255, 250, 241, 0.88);
  border: 1px solid rgba(24, 50, 41, 0.12);
  box-shadow: none;
}

.gender-toggle {
  margin: 20px 0 0;
  padding: 0;
  border: 0;
}

.gender-toggle legend {
  padding: 0;
  margin-bottom: 10px;
  font-family: "Cinzel", serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.gender-options {
  display: flex;
  gap: 10px;
}

.gender-options label {
  flex: 1;
  position: relative;
  cursor: pointer;
}

.gender-options input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.gender-options span {
  display: block;
  padding: 14px 16px;
  text-align: center;
  font-family: "Cinzel", serif;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: 6px;
  border: 1px solid rgba(38, 32, 26, 0.24);
  background: rgba(246, 239, 220, 0.9);
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease,
    transform 180ms ease;
}

.gender-options label:hover span {
  transform: translateY(-1px);
}

.gender-options input:checked + span {
  color: #f6efdc;
  background: linear-gradient(135deg, var(--accent), #1f3b2d);
  border-color: transparent;
}

.gender-options input:focus-visible + span {
  box-shadow: 0 0 0 4px rgba(47, 81, 64, 0.2);
}

.panel-result {
  padding: 22px;
  animation: fade-up 800ms ease 160ms both;
}

.result-card {
  height: 100%;
  min-height: 320px;
  padding: 30px;
  border-radius: 6px;
  background:
    radial-gradient(circle at top right, rgba(168, 121, 31, 0.2), transparent 30%),
    linear-gradient(180deg, rgba(246, 239, 220, 0.98), rgba(230, 217, 190, 0.94));
}

.result-card.is-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#browse-detail.is-empty {
  justify-content: flex-start;
}

.result-card h2 {
  margin: 12px 0 16px;
  color: #23372b;
  font-size: clamp(2.2rem, 6vw, 4rem);
}

.pronounce {
  margin: -8px 0 14px;
  font-family: "EB Garamond", serif;
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--accent-strong);
}

.result-kicker {
  color: var(--accent-strong);
}

.result-meta {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.result-meta div {
  padding-top: 16px;
  border-top: 1px solid rgba(168, 121, 31, 0.32);
}

.result-meta dt {
  margin-bottom: 8px;
}

.result-meta dd {
  margin: 0;
}

.try-another {
  margin-top: 26px;
  width: 100%;
  padding: 15px 20px;
  font-family: "Cinzel", serif;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--text);
  background: rgba(246, 239, 220, 0.92);
  border: 1px solid rgba(168, 121, 31, 0.5);
  border-radius: 6px;
  box-shadow: none;
}

.try-another:hover,
.try-another:focus-visible {
  color: #f6efdc;
  background: linear-gradient(135deg, var(--accent-strong), #7a5514);
  border-color: transparent;
}

.surprise {
  margin-top: 18px;
  width: 100%;
  padding: 15px 20px;
  font-family: "Cinzel", serif;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  color: var(--text);
  background: rgba(246, 239, 220, 0.9);
  border: 1px solid rgba(47, 81, 64, 0.4);
  border-radius: 6px;
  box-shadow: none;
}

.surprise:hover,
.surprise:focus-visible {
  color: #f6efdc;
  background: linear-gradient(135deg, var(--accent), #1f3b2d);
  border-color: transparent;
}

.themes {
  margin-top: 20px;
}

.themes-label {
  display: block;
  margin-bottom: 10px;
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.theme-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-chip {
  padding: 9px 14px;
  font-family: "EB Garamond", serif;
  font-size: 0.98rem;
  color: var(--text);
  background: rgba(246, 239, 220, 0.88);
  border: 1px solid rgba(38, 32, 26, 0.2);
  border-radius: 999px;
  box-shadow: none;
}

.theme-chip:hover,
.theme-chip:focus-visible {
  color: #f6efdc;
  background: linear-gradient(135deg, var(--accent-strong), #7a5514);
  border-color: transparent;
}

.result-lore {
  margin: 18px 0 0;
  padding: 14px 16px;
  font-style: italic;
  color: #45402f;
  background: rgba(168, 121, 31, 0.12);
  border-left: 3px solid var(--accent-strong);
  border-radius: 4px;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
}

.chip-btn {
  padding: 11px 16px;
  font-family: "Cinzel", serif;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--text);
  background: rgba(246, 239, 220, 0.92);
  border: 1px solid rgba(38, 32, 26, 0.22);
  border-radius: 6px;
  box-shadow: none;
}

.chip-btn:hover,
.chip-btn:focus-visible {
  color: #f6efdc;
  background: linear-gradient(135deg, var(--accent), #1f3b2d);
  border-color: transparent;
}

.action-status {
  font-size: 0.92rem;
  color: var(--accent);
}

.alternatives {
  margin-top: 20px;
  animation: fade-up 500ms ease both;
}

.alt-heading {
  margin: 0 0 12px;
  font-family: "Cinzel", serif;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.alt-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.alt-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  color: var(--text);
  background: rgba(246, 239, 220, 0.82);
  border: 1px solid rgba(38, 32, 26, 0.16);
  border-radius: 6px;
  box-shadow: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.alt-item:hover,
.alt-item:focus-visible {
  transform: translateX(3px);
  border-color: rgba(168, 121, 31, 0.6);
  background: rgba(246, 239, 220, 0.98);
}

.alt-name {
  display: block;
  font-family: "Cinzel", serif;
  font-size: 1.15rem;
  color: #23372b;
}

.alt-meaning {
  display: block;
  margin-top: 4px;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
}

.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(38, 32, 26, 0.28);
  border-radius: 6px;
  background: rgba(246, 239, 220, 0.45);
  color: rgba(92, 81, 64, 0.7);
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.ad-leaderboard {
  margin: 24px 0 4px;
  min-height: 90px;
}

.ad-infeed {
  margin-top: 20px;
  min-height: 120px;
}

.ad-sticky {
  position: sticky;
  bottom: 12px;
  margin: 26px auto 0;
  max-width: 728px;
  min-height: 70px;
  backdrop-filter: blur(6px);
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 22px 0 20px;
  border-bottom: 1px solid rgba(38, 32, 26, 0.18);
}

.tab {
  padding: 12px 20px;
  font-family: "Cinzel", serif;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease;
}

.tab:hover {
  color: var(--text);
  transform: none;
  box-shadow: none;
}

.tab.is-active {
  color: #23372b;
  border-bottom-color: var(--accent-strong);
}

.field-hint {
  margin: 10px 0 0;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--muted);
}

.browse {
  animation: fade-up 500ms ease both;
}

.browse-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.browse-controls .theme-chip.is-active {
  color: #f6efdc;
  background: linear-gradient(135deg, var(--accent), #1f3b2d);
  border-color: transparent;
}

.browse-gender {
  display: flex;
  gap: 8px;
}

.browse-gender label {
  flex: 0 0 auto;
}

.browse-gender span {
  padding: 10px 14px;
}

.browse-count {
  margin: 16px 2px 12px;
  font-family: "Cinzel", serif;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.browse-empty {
  margin: 22px 2px;
  font-style: italic;
  color: var(--muted);
}

.browse-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 62vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(246, 239, 220, 0.55);
}

.browse-row {
  display: flex;
  align-items: stretch;
  margin: 0;
  border-bottom: 1px solid rgba(38, 32, 26, 0.12);
}

.browse-row:last-child {
  border-bottom: 0;
}

.browse-name-btn {
  flex: 1;
  display: block;
  text-align: left;
  padding: 11px 16px;
  font-family: "Cinzel", serif;
  font-size: 1.02rem;
  color: #23372b;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.browse-name-btn:hover {
  transform: none;
  box-shadow: none;
  background: rgba(246, 239, 220, 0.85);
}

.browse-name-btn.is-active {
  color: #f6efdc;
  background: linear-gradient(135deg, var(--accent), #1f3b2d);
}

.star-btn {
  flex: 0 0 auto;
  width: 46px;
  padding: 0;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--accent-strong);
  background: transparent;
  border: 0;
  border-left: 1px solid rgba(38, 32, 26, 0.1);
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
}

.star-btn:hover {
  transform: none;
  box-shadow: none;
  background: rgba(168, 121, 31, 0.14);
}

.star-btn.is-on {
  color: #a8791f;
}

.finder-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}

.baby-search {
  flex: 1 1 200px;
  min-width: 0;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid rgba(38, 32, 26, 0.24);
  border-radius: 6px;
  background: rgba(246, 239, 220, 0.94);
  color: var(--text);
}

.baby-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(47, 81, 64, 0.16);
}

.baby-letter {
  flex: 0 0 auto;
  padding: 12px 14px;
  font-family: "EB Garamond", serif;
  font-size: 1rem;
  color: var(--text);
  background: rgba(246, 239, 220, 0.94);
  border: 1px solid rgba(38, 32, 26, 0.24);
  border-radius: 6px;
  cursor: pointer;
}

.shortlist {
  margin: 16px 0 4px;
  padding: 14px 16px;
  border: 1px solid rgba(168, 121, 31, 0.4);
  border-radius: 8px;
  background: rgba(168, 121, 31, 0.08);
}

.shortlist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.shortlist-title {
  font-family: "Cinzel", serif;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.shortlist-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 6px 6px 12px;
  font-family: "Cinzel", serif;
  font-size: 0.92rem;
  color: #23372b;
  background: rgba(246, 239, 220, 0.95);
  border: 1px solid rgba(38, 32, 26, 0.18);
  border-radius: 999px;
}

.chip-remove {
  width: 22px;
  height: 22px;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  color: var(--muted);
  background: rgba(38, 32, 26, 0.08);
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  cursor: pointer;
}

.chip-remove:hover {
  transform: none;
  box-shadow: none;
  color: #f6efdc;
  background: var(--accent-strong);
}

@media (max-width: 860px) {
  .browse-list {
    max-height: 40vh;
  }
}

.info-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.info-strip article {
  padding: 24px;
  animation: fade-up 820ms ease both;
}

.info-strip h3 {
  margin: 0 0 12px;
  font-size: 1.7rem;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .page-shell {
    padding-top: 42px;
  }

  .app-grid,
  .info-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  h1 {
    line-height: 1;
  }

  .panel-form,
  .panel-result,
  .result-card,
  .info-strip article {
    padding: 20px;
  }

  .input-row {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}

/* ----- SEO landing pages + footer ----- */
.seo-wrap {
  max-width: 960px;
}

.seo-home {
  color: var(--accent-strong);
  text-decoration: none;
}

.seo-home:hover {
  text-decoration: underline;
}

.seo-cta {
  margin-top: 16px;
}

.seo-cta a {
  color: var(--accent);
  font-weight: 500;
}

.seo-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.seo-item {
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.seo-name {
  display: block;
  font-family: "Cinzel", serif;
  font-size: 1.15rem;
  color: #23372b;
}

.seo-meaning {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.55;
}

.site-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.seo-links-label {
  font-family: "Cinzel", serif;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}

.seo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.seo-links a {
  color: var(--accent);
  text-decoration: none;
}

.seo-links a:hover {
  text-decoration: underline;
}

/* ----- Explore tab ----- */
.explore {
  animation: fade-up 500ms ease both;
}

.explore-panel {
  padding: 30px;
}

.explore-title {
  margin: 0 0 22px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: #23372b;
}

.explore-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 26px;
}

.explore-group .seo-links {
  flex-direction: column;
  gap: 10px;
}

.explore-group .seo-links a {
  font-family: "EB Garamond", serif;
  font-size: 1.05rem;
}
