/* Yuanfeng Hometown shell for the standalone Farmers Delight wiki. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f6f3f7;
  --bg-card: #ffffff;
  --text-primary: #2a2138;
  --text-secondary: #5d5369;
  --text-muted: #81778d;
  --border: #e4dde9;
  --green: #e94093;
  --green-dark: #c92f78;
  --green-light: #f06eae;
  --yf-primary: #e94093;
  --yf-primary-dark: #c92f78;
  --yf-secondary: #8b5cf6;
  --yf-dark: #2a2138;
  --yf-darker: #1f1729;
  --yf-light: #fdf4f9;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: #faf8fb;
  color: var(--text-primary);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  line-height: 1.7;
}

a {
  color: var(--yf-primary-dark);
  text-decoration: none;
}

a:hover {
  color: var(--yf-primary);
}

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

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--yf-primary);
  background: rgba(31, 23, 41, 0.97);
  box-shadow: 0 6px 22px rgba(31, 23, 41, 0.18);
  backdrop-filter: blur(12px);
}

.nav {
  width: min(100% - 36px, 1420px);
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--yf-light);
}

.nav-logo:hover {
  color: #ffffff;
}

.nav-logo-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: #3a2b4a;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2);
}

.nav-logo-mark img {
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
}

.nav-logo-copy {
  min-width: 0;
  display: grid;
  line-height: 1.18;
}

.nav-logo-copy strong {
  color: #ffffff;
  font-size: 1.08rem;
}

.nav-logo-copy small {
  margin-top: 3px;
  color: #bfb5c8;
  font-size: 0.68rem;
}

.nav-links {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border-radius: 6px;
  color: #d9d1df;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-links a.active {
  background: var(--yf-primary);
  color: #ffffff;
}

.nav-toggle {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
}

.nav-toggle svg {
  width: 21px;
  height: 21px;
}

.nav-toggle .nav-icon-close,
.nav-toggle[aria-expanded="true"] .nav-icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-icon-close {
  display: block;
}

.wiki-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.wiki-breadcrumb a {
  color: var(--yf-primary-dark);
}

.footer {
  position: relative;
  z-index: 3;
  padding: 28px 20px;
  border-top: 2px solid var(--yf-primary);
  background: var(--yf-darker);
  color: #bfb5c8;
  text-align: center;
}

.footer p {
  margin: 4px 0;
  font-size: 0.8rem;
}

.footer a {
  color: #f38aba;
}

.footer a:hover {
  color: #ffffff;
}

@media (max-width: 900px) {
  .nav {
    width: min(100% - 24px, 1420px);
    min-height: 64px;
  }

  .nav-logo-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .nav-logo-mark img {
    width: 31px;
    height: 31px;
  }

  .nav-logo-copy small {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    max-height: 0;
    overflow: hidden;
    display: grid;
    gap: 2px;
    padding: 0 12px;
    border-bottom: 0 solid var(--yf-primary);
    background: var(--yf-darker);
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.22s ease, padding 0.22s ease, opacity 0.18s ease;
  }

  .nav-links.open {
    max-height: 360px;
    padding-top: 10px;
    padding-bottom: 12px;
    border-bottom-width: 2px;
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    width: 100%;
    min-height: 44px;
  }
}

@media (max-width: 420px) {
  .nav-logo-copy strong {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
