/* ============================================================
   Chicky Farm — Game Guide & Resource Hub
   Design Identity: "Farmstead HUD" — immersive game-world UI
   CP: 上海云端次元科技有限公司 | Domain: www.shyunduangame.com
   ============================================================ */

/* ——— Design Tokens ——— */
:root {
  /* Core palette — warm farm colors */
  --green:        #5b9a3e;
  --green-light:  #72b84a;
  --green-pale:   #eaf4e0;
  --green-dark:   #3d6a24;
  --gold:         #f0b429;
  --gold-light:   #f7cc60;
  --gold-pale:    #fff9eb;
  --brown:        #4a3424;
  --brown-light:  #7a6352;
  --brown-pale:   #faf6f0;
  --cream:        #fef9ed;
  --white:        #ffffff;
  --orange:       #f4845f;
  --orange-light: #f6a585;
  --orange-pale:  #fef0ea;
  --red:          #c94a46;
  --red-light:    #d46964;
  --red-pale:     #fce8e6;
  --blue:         #5b8ea8;
  --blue-light:   #7dacbf;
  --blue-pale:    #eaf2f6;
  --border:       #e0d5c4;
  --border-light: #efe7d8;

  /* Farmstead materials */
  --sky-top:      #b8daf7;
  --sky-bottom:   #e8f2fb;
  --grass:        #6daa3a;
  --grass-dark:   #558b2a;
  --straw:        #e8c85a;
  --straw-light:  #f0d980;
  --wood:         #6b4c30;
  --wood-light:   #8b6d50;
  --wood-pale:    #c4a882;
  --wood-dark:    #3e2a18;
  --wood-bg:      #f5ede0;

  /* Typography */
  --font-display: 'Fredoka', 'Nunito', 'Segoe UI', sans-serif;
  --font-body:    'Nunito', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'SF Mono', 'Fira Code', 'Consolas', monospace;

  /* Type scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;
  --radius-egg: 50% 50% 50% 50% / 60% 60% 40% 40%;

  /* Shadows — bouncy cartoon feel */
  --shadow-sm:  0 3px 0 rgba(74, 52, 36, 0.08);
  --shadow-md:  0 6px 0 rgba(74, 52, 36, 0.08);
  --shadow-lg:  0 8px 0 rgba(74, 52, 36, 0.1);
  --shadow-nest: 0 0 0 3px var(--gold-light), 0 6px 0 rgba(74, 52, 36, 0.08);
  --shadow-wood: 0 4px 0 rgba(62, 42, 24, 0.25), 0 8px 20px rgba(74, 52, 36, 0.12);

  /* Layout */
  --header-h: 72px;
  --content-max: 1200px;
  --prose-max: 820px;
  --sidebar-w: 300px;
}

/* ——— Keyframe Animations ——— */
@keyframes cloud-drift {
  0%   { transform: translateX(-120px); }
  100% { transform: translateX(calc(100vw + 120px)); }
}

@keyframes cloud-drift-slow {
  0%   { transform: translateX(-80px); }
  100% { transform: translateX(calc(100vw + 80px)); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

@keyframes float-wide {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-8px) rotate(2deg); }
}

@keyframes wobble {
  0%, 100% { transform: rotate(0deg); }
  25%      { transform: rotate(2deg); }
  75%      { transform: rotate(-2deg); }
}

@keyframes bouncy-lift {
  0%   { transform: translateY(0); }
  40%  { transform: translateY(-6px); }
  60%  { transform: translateY(-2px); }
  100% { transform: translateY(-3px); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240, 180, 41, 0.4); }
  50%      { box-shadow: 0 0 0 8px rgba(240, 180, 41, 0); }
}

@keyframes grain-shift {
  0%, 100% { background-position: 0 0; }
  50%      { background-position: 4px 4px; }
}

@keyframes hatch-in {
  0%   { opacity: 0; transform: translateY(40px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slide-up-fade {
  0%   { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ——— Reset & Base ——— */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--brown);
  background-color: var(--cream);
  background-image:
    /* Subtle grain texture */
    url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='60' height='60' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E"),
    /* Warm sky gradient */
    radial-gradient(ellipse at 50% 0%, rgba(184, 218, 247, 0.15) 0%, transparent 55%),
    radial-gradient(circle at 85% 20%, rgba(240, 180, 41, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 15% 70%, rgba(109, 170, 58, 0.04) 0%, transparent 45%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--green-light); }
ul, ol { padding-left: var(--space-6); }
li { margin-bottom: var(--space-2); }
h1, h2, h3, h4, h5, h6 { line-height: 1.25; font-weight: 700; }
h1, h2, h3 { font-family: var(--font-display); }

::selection { background: var(--gold-light); color: var(--brown); }

:focus-visible {
  outline: 2.5px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ——— Header — Game HUD Bar ——— */
.pf-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: linear-gradient(
    180deg,
    rgba(107, 76, 48, 0.95) 0%,
    rgba(90, 60, 35, 0.93) 100%
  );
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 3px solid rgba(240, 180, 41, 0.35);
  box-shadow: 0 4px 20px rgba(62, 42, 24, 0.25);
  display: flex;
  align-items: center;
  padding: 0 var(--space-8);
  gap: var(--space-8);
}

.pf-header__brand {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--gold-light);
  white-space: nowrap;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: color 0.2s;
}

.pf-header__brand:hover {
  color: var(--gold);
}

.pf-header__brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--straw) 100%);
  border-radius: var(--radius-egg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2), inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

.pf-header__nav {
  display: flex;
  gap: var(--space-1);
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pf-header__nav a {
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-pill);
  color: rgba(255, 255, 255, 0.8);
  font-weight: 700;
  font-size: var(--text-sm);
  transition: all 0.2s;
  font-family: var(--font-display);
  letter-spacing: 0.2px;
}

.pf-header__nav a:hover {
  color: var(--gold-light);
  background: rgba(255, 255, 255, 0.1);
}

.pf-header__nav a.active {
  color: var(--wood-dark);
  background: linear-gradient(135deg, var(--gold) 0%, var(--straw) 100%);
  box-shadow: 0 2px 8px rgba(240, 180, 41, 0.35);
}

/* Mobile nav toggle */
.pf-header__toggle {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  color: var(--gold-light);
  font-size: var(--text-xl);
  line-height: 1;
}

/* ——— Page Wrapper ——— */
.pf-page {
  padding-top: var(--header-h);
  min-height: 100vh;
}

/* ——— Hero Section — Farm Scene ——— */
.pf-hero {
  position: relative;
  padding: var(--space-16) var(--space-8) 0;
  max-width: var(--content-max);
  margin: 0 auto;
  overflow: visible;
}

/* Sky gradient backdrop */
.pf-hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 200vw;
  height: 120%;
  background: linear-gradient(
    180deg,
    var(--sky-top) 0%,
    var(--sky-bottom) 60%,
    rgba(254, 249, 237, 0) 100%
  );
  z-index: -1;
  pointer-events: none;
}

/* CSS Clouds */
.pf-hero__clouds {
  position: absolute;
  top: -60px;
  left: 0;
  right: 0;
  height: 200px;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.pf-hero__cloud {
  position: absolute;
  background: var(--white);
  border-radius: 50%;
  opacity: 0.85;
}

.pf-hero__cloud::before,
.pf-hero__cloud::after {
  content: '';
  position: absolute;
  background: var(--white);
  border-radius: 50%;
}

.pf-hero__cloud--1 {
  width: 140px;
  height: 50px;
  top: 40px;
  border-radius: 50px;
  animation: cloud-drift 35s linear infinite;
}
.pf-hero__cloud--1::before {
  width: 60px;
  height: 60px;
  top: -30px;
  left: 25px;
}
.pf-hero__cloud--1::after {
  width: 45px;
  height: 45px;
  top: -20px;
  left: 65px;
}

.pf-hero__cloud--2 {
  width: 100px;
  height: 36px;
  top: 80px;
  border-radius: 36px;
  animation: cloud-drift-slow 45s linear infinite;
  animation-delay: -15s;
}
.pf-hero__cloud--2::before {
  width: 44px;
  height: 44px;
  top: -22px;
  left: 18px;
}
.pf-hero__cloud--2::after {
  width: 34px;
  height: 34px;
  top: -15px;
  left: 48px;
}

.pf-hero__cloud--3 {
  width: 120px;
  height: 42px;
  top: 15px;
  border-radius: 42px;
  animation: cloud-drift 40s linear infinite;
  animation-delay: -28s;
}
.pf-hero__cloud--3::before {
  width: 52px;
  height: 52px;
  top: -26px;
  left: 22px;
}
.pf-hero__cloud--3::after {
  width: 40px;
  height: 40px;
  top: -18px;
  left: 55px;
}

.pf-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
  position: relative;
  z-index: 1;
}

.pf-hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  animation: slide-up-fade 0.7s ease-out;
}

.pf-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: linear-gradient(135deg, var(--gold) 0%, var(--straw) 100%);
  color: var(--wood-dark);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-egg);
  font-size: var(--text-sm);
  font-weight: 700;
  width: fit-content;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.15);
  animation: wobble 4s ease-in-out infinite;
}

.pf-hero__badge-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.6); opacity: 0.6; }
}

.pf-hero__title {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 700;
  color: var(--wood-dark);
  line-height: 1.15;
  letter-spacing: -0.5px;
  text-shadow: 0 3px 0 rgba(240, 180, 41, 0.25);
}

.pf-hero__title span {
  color: var(--green);
  position: relative;
}

.pf-hero__title span::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 6px;
  background: rgba(240, 180, 41, 0.3);
  border-radius: 3px;
  z-index: -1;
}

.pf-hero__desc {
  font-size: var(--text-lg);
  color: var(--brown-light);
  line-height: 1.7;
  max-width: 480px;
}

.pf-hero__stats {
  display: flex;
  gap: var(--space-8);
}

.pf-hero__stat {
  text-align: center;
  background: var(--white);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  box-shadow: 0 3px 0 rgba(62, 42, 24, 0.15);
  border: 2px solid var(--border);
}

.pf-hero__stat-value {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--green);
  line-height: 1;
}

.pf-hero__stat-label {
  font-size: var(--text-xs);
  color: var(--brown-light);
  margin-top: var(--space-1);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
}

.pf-hero__actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.pf-hero__game {
  position: relative;
  animation: slide-up-fade 0.7s ease-out 0.2s both;
}

.pf-hero__game-inner {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--wood) 0%, var(--wood-light) 100%);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-wood);
}

.pf-hero__game-inner::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: calc(var(--radius-lg) - 4px);
  border: 2px dashed rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

.pf-hero__game iframe {
  width: 100%;
  aspect-ratio: 9 / 16;
  border: none;
  display: block;
  border-radius: calc(var(--radius-lg) - 8px);
  position: relative;
  z-index: 1;
}

.pf-hero__game-label {
  position: absolute;
  top: -12px;
  right: 20px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--straw) 100%);
  color: var(--wood-dark);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-egg);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.15);
  z-index: 2;
  animation: float 3s ease-in-out infinite;
}

/* Rolling hills wave */
.pf-hero__hills {
  width: 100%;
  height: 60px;
  position: relative;
  margin-top: var(--space-8);
  overflow: hidden;
}

.pf-hero__hills::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background:
    /* Far hill */
    radial-gradient(ellipse at 20% 100%, var(--grass) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 100%, var(--grass-dark) 0%, transparent 50%),
    /* Near hill */
    radial-gradient(ellipse at 50% 100%, var(--grass) 0%, transparent 60%),
    radial-gradient(ellipse at 0% 100%, var(--grass-dark) 0%, transparent 40%),
    radial-gradient(ellipse at 100% 100%, var(--grass) 0%, transparent 45%);
}

/* Fence posts on hills */
.pf-hero__hills::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 8px;
  background:
    linear-gradient(
      90deg,
      var(--wood-pale) 0px,
      var(--wood-pale) 6px,
      transparent 6px,
      transparent 30px,
      var(--wood-pale) 30px,
      var(--wood-pale) 36px,
      transparent 36px,
      transparent 60px,
      var(--wood-pale) 60px,
      var(--wood-pale) 66px,
      transparent 66px,
      transparent 90px,
      var(--wood-pale) 90px,
      var(--wood-pale) 96px,
      transparent 96px
    );
  background-size: 120px 8px;
}

/* Floating farm decorations */
.pf-hero__decor {
  position: absolute;
  pointer-events: none;
  font-size: 1.8rem;
  animation: float-wide 4s ease-in-out infinite;
  z-index: 0;
  opacity: 0.7;
}

.pf-hero__decor--left {
  bottom: 20px;
  left: -10px;
  animation-delay: -1s;
}

.pf-hero__decor--right {
  bottom: 40px;
  right: -5px;
  animation-delay: -2.5s;
  font-size: 2.2rem;
}

/* ——— Buttons — Game Menu Style ——— */
.pf-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
  line-height: 1.4;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
  position: relative;
}

.pf-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.15);
}

.pf-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

.pf-btn--primary {
  background: linear-gradient(180deg, var(--green-light) 0%, var(--green) 100%);
  color: var(--white);
  border-color: var(--green-dark);
}

.pf-btn--primary:hover {
  background: linear-gradient(180deg, #7dc953 0%, var(--green-light) 100%);
  color: var(--white);
  box-shadow: 0 6px 0 rgba(61, 106, 36, 0.5), 0 6px 20px rgba(91, 154, 62, 0.25);
}

.pf-btn--outline {
  background: var(--white);
  color: var(--green);
  border-color: var(--green);
}

.pf-btn--outline:hover {
  background: var(--green-pale);
  color: var(--green-dark);
  border-color: var(--green-dark);
}

.pf-btn--gold {
  background: linear-gradient(180deg, var(--straw-light) 0%, var(--gold) 100%);
  color: var(--wood-dark);
  border-color: #d4a020;
}

.pf-btn--gold:hover {
  background: linear-gradient(180deg, #f5e0a0 0%, var(--straw) 100%);
  color: var(--wood-dark);
  box-shadow: 0 6px 0 rgba(180, 130, 20, 0.4), 0 6px 20px rgba(240, 180, 41, 0.25);
}

.pf-btn--sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

.pf-btn--lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
}

/* ——— Section Styles ——— */
.pf-section {
  padding: var(--space-16) var(--space-8);
  position: relative;
}

.pf-section--alt {
  background:
    url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 0 L24 8 L32 8 L26 14 L28 22 L20 18 L12 22 L14 14 L8 8 L16 8 Z' fill='%23d4c4a8' opacity='0.08'/%3E%3C/svg%3E"),
    linear-gradient(180deg, var(--wood-bg) 0%, var(--brown-pale) 100%);
}

.pf-section--green {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: var(--white);
}

.pf-section__inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.pf-section__header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.pf-section__eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold-light);
  margin-bottom: var(--space-3);
  background: rgba(255, 255, 255, 0.1);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-pill);
}

.pf-section--green .pf-section__eyebrow {
  color: var(--gold-light);
  background: rgba(255, 255, 255, 0.12);
}

.pf-section__title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--wood-dark);
  line-height: 1.2;
}

.pf-section--green .pf-section__title {
  color: var(--white);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pf-section__subtitle {
  margin-top: var(--space-3);
  font-size: var(--text-lg);
  color: var(--brown-light);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.pf-section--green .pf-section__subtitle {
  color: rgba(255, 255, 255, 0.8);
}

/* Woven rope section divider */
.pf-section__divider {
  height: 12px;
  max-width: 100px;
  margin: 0 auto var(--space-10);
  position: relative;
  background:
    repeating-linear-gradient(
      90deg,
      var(--straw) 0px,
      var(--straw) 4px,
      var(--straw-light) 4px,
      var(--straw-light) 8px,
      var(--gold) 8px,
      var(--gold) 12px
    );
  border-radius: 6px;
  opacity: 0.8;
}

/* ——— Cards — Wooden Sign Style ——— */
.pf-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  border: 2px solid var(--border-light);
}

.pf-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-wood);
}

/* Nail-head corners */
.pf-card--nest {
  background:
    radial-gradient(circle at 18px 18px, var(--wood-pale) 6px, transparent 7px),
    radial-gradient(circle at calc(100% - 18px) 18px, var(--wood-pale) 6px, transparent 7px),
    radial-gradient(circle at 18px calc(100% - 18px), var(--wood-pale) 6px, transparent 7px),
    radial-gradient(circle at calc(100% - 18px) calc(100% - 18px), var(--wood-pale) 6px, transparent 7px),
    linear-gradient(180deg, var(--white) 0%, #fefdf9 100%);
  border: 3px solid var(--wood-pale);
  box-shadow:
    0 0 0 4px var(--border-light),
    0 6px 0 rgba(107, 76, 48, 0.15),
    0 8px 20px rgba(74, 52, 36, 0.08);
}

.pf-card--nest:hover {
  box-shadow:
    0 0 0 4px var(--border-light),
    0 8px 0 rgba(107, 76, 48, 0.2),
    0 12px 28px rgba(74, 52, 36, 0.12);
}

.pf-card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--green-pale), var(--gold-pale));
}

.pf-card__body {
  padding: var(--space-6);
}

.pf-card__tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-egg);
  margin-bottom: var(--space-3);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
  transition: transform 0.2s;
}

.pf-card__tag:hover {
  transform: scale(1.05);
}

.pf-card__tag--green { background: var(--green-pale); color: var(--green-dark); }
.pf-card__tag--gold { background: var(--gold-pale); color: var(--wood-dark); }
.pf-card__tag--red { background: var(--red-pale); color: var(--red); }
.pf-card__tag--blue { background: var(--blue-pale); color: var(--blue); }

.pf-card__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--wood-dark);
  margin-bottom: var(--space-2);
}

.pf-card__text {
  color: var(--brown-light);
  font-size: var(--text-sm);
  line-height: 1.7;
}

.pf-card__meta {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  color: var(--brown-light);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-light);
}

.pf-card__footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ——— Card Grids ——— */
.pf-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.pf-card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.pf-card-grid--4 { grid-template-columns: repeat(4, 1fr); }
.pf-card-grid--chars {
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

/* ——— Character Cards ——— */
.pf-char-card {
  background:
    radial-gradient(circle at 18px 18px, var(--wood-pale) 5px, transparent 6px),
    radial-gradient(circle at calc(100% - 18px) 18px, var(--wood-pale) 5px, transparent 6px),
    radial-gradient(circle at 18px calc(100% - 18px), var(--wood-pale) 5px, transparent 6px),
    radial-gradient(circle at calc(100% - 18px) calc(100% - 18px), var(--wood-pale) 5px, transparent 6px),
    linear-gradient(180deg, var(--white) 0%, #fefdf9 100%);
  border-radius: var(--radius-lg);
  border: 3px solid var(--wood-pale);
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pf-char-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 8px 0 rgba(107, 76, 48, 0.2),
    0 12px 28px rgba(74, 52, 36, 0.12);
}

.pf-char-card__header {
  padding: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  border-bottom: 2px dashed var(--border);
  background: linear-gradient(180deg, var(--gold-pale), transparent);
}

.pf-char-card__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-pale), var(--gold-pale));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.1);
}

.pf-char-card__name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--wood-dark);
}

.pf-char-card__role {
  font-size: var(--text-sm);
  color: var(--brown-light);
  font-weight: 600;
}

.pf-char-card__body {
  padding: var(--space-6);
}

.pf-char-card__stats {
  display: flex;
  gap: var(--space-4);
}

.pf-char-card__stat {
  flex: 1;
  text-align: center;
}

.pf-char-card__stat small {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--brown-light);
  text-transform: uppercase;
}

.pf-char-card__stat-bar {
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  margin-top: var(--space-1);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.pf-char-card__stat-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
  position: relative;
}

.pf-char-card__stat-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px 4px 0 0;
}

.pf-char-card__stat-fill--atk { background: var(--red); }
.pf-char-card__stat-fill--def { background: var(--blue); }
.pf-char-card__stat-fill--spd { background: var(--gold); }
.pf-char-card__stat-fill--uti { background: var(--green); }

.pf-char-card__pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.pf-char-card__pros,
.pf-char-card__cons {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}

.pf-char-card__pros {
  background: var(--green-pale);
  border: 1px solid rgba(109, 170, 58, 0.15);
}

.pf-char-card__cons {
  background: var(--red-pale);
  border: 1px solid rgba(201, 74, 70, 0.1);
}

.pf-char-card__pros h4 { color: var(--green-dark); margin-bottom: var(--space-2); font-family: var(--font-display); }
.pf-char-card__cons h4 { color: var(--red); margin-bottom: var(--space-2); font-family: var(--font-display); }
.pf-char-card__pros ul,
.pf-char-card__cons ul { padding-left: var(--space-4); }
.pf-char-card__pros li,
.pf-char-card__cons li { margin-bottom: var(--space-1); font-size: var(--text-xs); }

/* ——— Guide Cards (large, featured) ——— */
.pf-guide-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  background:
    radial-gradient(circle at 18px 18px, var(--wood-pale) 5px, transparent 6px),
    radial-gradient(circle at calc(100% - 18px) 18px, var(--wood-pale) 5px, transparent 6px),
    radial-gradient(circle at 18px calc(100% - 18px), var(--wood-pale) 5px, transparent 6px),
    radial-gradient(circle at calc(100% - 18px) calc(100% - 18px), var(--wood-pale) 5px, transparent 6px),
    linear-gradient(180deg, var(--white) 0%, #fefdf9 100%);
  border-radius: var(--radius-lg);
  border: 3px solid var(--wood-pale);
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pf-guide-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 8px 0 rgba(107, 76, 48, 0.2),
    0 12px 28px rgba(74, 52, 36, 0.1);
}

.pf-guide-card__image {
  height: 100%;
  min-height: 220px;
  background: linear-gradient(135deg, var(--green-pale) 0%, var(--gold-pale) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
  overflow: hidden;
}

.pf-guide-card__image::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
  pointer-events: none;
}

.pf-guide-card__body {
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pf-guide-card__body .pf-card__tag {
  margin-bottom: var(--space-3);
}

.pf-guide-card__body .pf-card__title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
}

.pf-guide-card__read {
  margin-top: var(--space-4);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--green);
  font-family: var(--font-display);
  transition: gap 0.2s;
}

.pf-guide-card__read::after {
  content: '→';
  transition: transform 0.2s;
}

.pf-guide-card:hover .pf-guide-card__read::after {
  transform: translateX(4px);
}

/* ——— Timeline (for updates) ——— */
.pf-timeline {
  position: relative;
  padding-left: var(--space-8);
}

.pf-timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  background: repeating-linear-gradient(
    180deg,
    var(--wood-pale) 0px,
    var(--wood-pale) 8px,
    var(--wood) 8px,
    var(--wood) 12px
  );
  border-radius: 2px;
}

.pf-timeline__item {
  position: relative;
  margin-bottom: var(--space-8);
  padding-left: var(--space-8);
}

.pf-timeline__item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 6px;
  width: 20px;
  height: 20px;
  background: var(--white);
  border: 4px solid var(--green);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.pf-timeline__item--major::before {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(240, 180, 41, 0.3);
}

.pf-timeline__version {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--green);
  margin-bottom: var(--space-1);
}

.pf-timeline__date {
  font-size: var(--text-xs);
  color: var(--brown-light);
  margin-bottom: var(--space-3);
}

.pf-timeline__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--wood-dark);
  margin-bottom: var(--space-2);
}

.pf-timeline__body {
  color: var(--brown-light);
  line-height: 1.7;
}

.pf-timeline__changes {
  margin-top: var(--space-3);
  list-style: none;
  padding: 0;
}

.pf-timeline__changes li {
  padding: var(--space-1) 0;
  font-size: var(--text-sm);
  color: var(--brown-light);
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.pf-timeline__changes li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  margin-top: 8px;
  flex-shrink: 0;
}

.pf-timeline__tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px var(--space-3);
  border-radius: var(--radius-egg);
  margin-left: var(--space-2);
}

.pf-timeline__tag--new { background: var(--green-pale); color: var(--green-dark); }
.pf-timeline__tag--fix { background: var(--blue-pale); color: var(--blue); }
.pf-timeline__tag--bal { background: var(--gold-pale); color: var(--wood-dark); }

/* ——— Lore Cards ——— */
.pf-lore-card {
  background:
    radial-gradient(circle at 18px 18px, var(--wood-pale) 5px, transparent 6px),
    radial-gradient(circle at calc(100% - 18px) 18px, var(--wood-pale) 5px, transparent 6px),
    radial-gradient(circle at 18px calc(100% - 18px), var(--wood-pale) 5px, transparent 6px),
    radial-gradient(circle at calc(100% - 18px) calc(100% - 18px), var(--wood-pale) 5px, transparent 6px),
    linear-gradient(180deg, var(--white) 0%, #fefdf9 100%);
  border-radius: var(--radius-lg);
  border: 3px solid var(--wood-pale);
  padding: var(--space-8);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pf-lore-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-wood);
}

.pf-lore-card__chapter {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--green);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.pf-lore-card__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--wood-dark);
  margin-bottom: var(--space-4);
}

.pf-lore-card__text {
  color: var(--brown-light);
  line-height: 1.8;
}

.pf-lore-card__text p {
  margin-bottom: var(--space-4);
}

.pf-lore-card__quote {
  margin: var(--space-6) 0;
  padding: var(--space-4) var(--space-6);
  border-left: 4px solid var(--gold);
  background: var(--gold-pale);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--brown);
}

/* ——— Feature Grid ——— */
.pf-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.pf-feature {
  text-align: center;
  padding: var(--space-8) var(--space-6);
  background:
    radial-gradient(circle at 18px 18px, var(--wood-pale) 5px, transparent 6px),
    radial-gradient(circle at calc(100% - 18px) 18px, var(--wood-pale) 5px, transparent 6px),
    radial-gradient(circle at 18px calc(100% - 18px), var(--wood-pale) 5px, transparent 6px),
    radial-gradient(circle at calc(100% - 18px) calc(100% - 18px), var(--wood-pale) 5px, transparent 6px),
    linear-gradient(180deg, var(--white) 0%, #fefdf9 100%);
  border-radius: var(--radius-lg);
  border: 3px solid var(--wood-pale);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pf-feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-wood);
}

.pf-feature__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--space-4);
  background: linear-gradient(135deg, var(--green-pale), var(--gold-pale));
  border-radius: var(--radius-egg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.1);
  animation: float 3s ease-in-out infinite;
}

.pf-feature:nth-child(2) .pf-feature__icon { animation-delay: -1s; }
.pf-feature:nth-child(3) .pf-feature__icon { animation-delay: -2s; }

.pf-feature__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--wood-dark);
  margin-bottom: var(--space-2);
}

.pf-feature__text {
  font-size: var(--text-sm);
  color: var(--brown-light);
  line-height: 1.7;
}

/* ——— Prose (article/guide content) ——— */
.pf-prose {
  max-width: var(--prose-max);
  margin: 0 auto;
  padding: var(--space-12) var(--space-8);
}

.pf-prose h1 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  color: var(--wood-dark);
  margin-bottom: var(--space-4);
  line-height: 1.2;
}

.pf-prose h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--wood-dark);
  margin: var(--space-12) 0 var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 3px solid var(--gold);
}

.pf-prose h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--wood-dark);
  margin: var(--space-8) 0 var(--space-3);
}

.pf-prose p {
  margin-bottom: var(--space-4);
  color: var(--brown-light);
  line-height: 1.8;
}

.pf-prose ul, .pf-prose ol {
  margin-bottom: var(--space-6);
}

.pf-prose li {
  color: var(--brown-light);
  line-height: 1.8;
}

.pf-prose strong {
  color: var(--brown);
}

.pf-prose blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-4) var(--space-6);
  border-left: 4px solid var(--gold);
  background: var(--gold-pale);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--brown);
}

.pf-prose img {
  border-radius: var(--radius-md);
  margin: var(--space-6) auto;
}

/* Tips callout */
.pf-prose .pf-tip {
  background: var(--green-pale);
  border: 2px solid rgba(109, 170, 58, 0.2);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-6) 0;
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.pf-prose .pf-tip__icon {
  font-size: var(--text-xl);
  flex-shrink: 0;
}

.pf-prose .pf-tip__text {
  font-size: var(--text-sm);
  color: var(--green-dark);
  line-height: 1.7;
}

.pf-prose .pf-tip__text strong {
  color: var(--green-dark);
}

/* Warning callout */
.pf-prose .pf-warning {
  background: var(--red-pale);
  border: 2px solid rgba(201, 74, 70, 0.15);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-6) 0;
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.pf-prose .pf-warning__icon {
  font-size: var(--text-xl);
  flex-shrink: 0;
}

.pf-prose .pf-warning__text {
  font-size: var(--text-sm);
  color: var(--red);
  line-height: 1.7;
}

/* Steps */
.pf-steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
}

.pf-steps li {
  counter-increment: step;
  position: relative;
  padding-left: var(--space-12);
  margin-bottom: var(--space-6);
  min-height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pf-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--green-light), var(--green));
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  box-shadow: 0 3px 0 rgba(61, 106, 36, 0.3);
}

.pf-steps li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 17px;
  top: 40px;
  bottom: -10px;
  width: 2px;
  background: var(--border);
  border-radius: 1px;
}

/* ——— FAQ Accordion ——— */
.pf-faq {
  max-width: var(--prose-max);
  margin: 0 auto;
}

.pf-faq__item {
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  overflow: hidden;
  background: var(--white);
  transition: all 0.2s;
}

.pf-faq__item:hover {
  border-color: var(--wood-pale);
  box-shadow: 0 3px 0 rgba(107, 76, 48, 0.1);
}

.pf-faq__item--open {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-pale);
}

.pf-faq__q {
  width: 100%;
  padding: var(--space-5) var(--space-6);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--brown);
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  line-height: 1.5;
}

.pf-faq__q-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-pale);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: var(--text-sm);
  font-weight: 700;
  transition: transform 0.3s, background 0.3s, color 0.3s;
}

.pf-faq__item--open .pf-faq__q-icon {
  transform: rotate(45deg);
  background: var(--green);
  color: var(--white);
}

.pf-faq__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.pf-faq__item--open .pf-faq__a {
  max-height: 500px;
}

.pf-faq__a-inner {
  padding: 0 var(--space-6) var(--space-5);
  color: var(--brown-light);
  font-size: var(--text-sm);
  line-height: 1.7;
}

/* ——— Breadcrumb ——— */
.pf-breadcrumb {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  font-size: var(--text-sm);
  color: var(--brown-light);
  margin-bottom: var(--space-10);
  flex-wrap: wrap;
}

.pf-breadcrumb a {
  color: var(--brown-light);
}

.pf-breadcrumb a:hover {
  color: var(--green);
}

.pf-breadcrumb__sep {
  color: var(--border);
  font-size: var(--text-xs);
}

/* ——— Screenshot Gallery ——— */
.pf-gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-4);
}

.pf-gallery__item {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  background: linear-gradient(135deg, var(--green-pale), var(--gold-pale));
  transition: all 0.25s;
  border: 3px solid var(--wood-pale);
  position: relative;
}

.pf-gallery__item:hover {
  transform: scale(1.05);
  border-color: var(--green);
  box-shadow: var(--shadow-wood);
}

.pf-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lightbox */
.pf-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(62, 42, 24, 0.94);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pf-lightbox--open {
  display: flex;
}

.pf-lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.pf-lightbox__close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 50%;
  color: var(--white);
  font-size: var(--text-2xl);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.pf-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.pf-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 50%;
  color: var(--white);
  font-size: var(--text-xl);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.pf-lightbox__nav:hover { background: rgba(255, 255, 255, 0.24); }
.pf-lightbox__nav--prev { left: var(--space-6); }
.pf-lightbox__nav--next { right: var(--space-6); }

/* ——— Contact Form ——— */
.pf-form {
  background:
    radial-gradient(circle at 18px 18px, var(--wood-pale) 5px, transparent 6px),
    radial-gradient(circle at calc(100% - 18px) 18px, var(--wood-pale) 5px, transparent 6px),
    radial-gradient(circle at 18px calc(100% - 18px), var(--wood-pale) 5px, transparent 6px),
    radial-gradient(circle at calc(100% - 18px) calc(100% - 18px), var(--wood-pale) 5px, transparent 6px),
    linear-gradient(180deg, var(--white) 0%, #fefdf9 100%);
  border-radius: var(--radius-lg);
  border: 3px solid var(--wood-pale);
  padding: var(--space-8);
}

.pf-form__group {
  margin-bottom: var(--space-5);
}

.pf-form__label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--wood-dark);
  margin-bottom: var(--space-2);
}

.pf-form__input,
.pf-form__select,
.pf-form__textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--brown);
  background: var(--cream);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pf-form__input:focus,
.pf-form__select:focus,
.pf-form__textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-pale);
}

.pf-form__textarea {
  min-height: 140px;
  resize: vertical;
}

.pf-form__success {
  display: none;
  text-align: center;
  padding: var(--space-12);
}

.pf-form__success--show {
  display: block;
}

.pf-form__success-icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  animation: bouncy-lift 0.6s ease-out;
}

.pf-form__success-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--green);
  margin-bottom: var(--space-2);
}

.pf-form__success-text {
  color: var(--brown-light);
}

/* ——— Share Buttons ——— */
.pf-share {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

.pf-share__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill);
  border: 2px solid var(--border);
  background: var(--white);
  color: var(--brown);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.pf-share__btn:hover {
  border-color: var(--green);
  color: var(--green);
  transform: translateY(-2px);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.08);
}

/* ——— Table of Contents ——— */
.pf-toc {
  background:
    radial-gradient(circle at 18px 18px, var(--wood-pale) 5px, transparent 6px),
    radial-gradient(circle at calc(100% - 18px) 18px, var(--wood-pale) 5px, transparent 6px),
    radial-gradient(circle at 18px calc(100% - 18px), var(--wood-pale) 5px, transparent 6px),
    radial-gradient(circle at calc(100% - 18px) calc(100% - 18px), var(--wood-pale) 5px, transparent 6px),
    linear-gradient(180deg, var(--white) 0%, #fefdf9 100%);
  border: 3px solid var(--wood-pale);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  margin-bottom: var(--space-8);
}

.pf-toc__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--wood-dark);
  margin-bottom: var(--space-4);
}

.pf-toc__list {
  list-style: none;
  padding: 0;
}

.pf-toc__list li {
  margin-bottom: var(--space-1);
}

.pf-toc__list a {
  display: block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--brown-light);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: all 0.15s;
}

.pf-toc__list a:hover {
  background: var(--green-pale);
  color: var(--green-dark);
}

/* ——— Stats Bar — Wooden Fence Style ——— */
.pf-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  padding: var(--space-10) var(--space-8);
  max-width: var(--content-max);
  margin: 0 auto;
}

.pf-stats-bar__item {
  text-align: center;
  padding: var(--space-6);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(254, 253, 249, 0.95) 100%
  );
  border-radius: var(--radius-lg);
  border: 3px solid var(--wood-pale);
  box-shadow:
    0 0 0 3px var(--border-light),
    0 4px 0 rgba(107, 76, 48, 0.15);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pf-stats-bar__item:hover {
  transform: translateY(-3px);
}

.pf-stats-bar__icon {
  font-size: 2.2rem;
  margin-bottom: var(--space-3);
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

.pf-stats-bar__item:nth-child(2) .pf-stats-bar__icon { animation-delay: -0.75s; }
.pf-stats-bar__item:nth-child(3) .pf-stats-bar__icon { animation-delay: -1.5s; }
.pf-stats-bar__item:nth-child(4) .pf-stats-bar__icon { animation-delay: -2.25s; }

.pf-stats-bar__value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--wood-dark);
  line-height: 1;
}

.pf-stats-bar__label {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--brown-light);
  margin-top: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* ——— Footer — Farm Silo Style ——— */
.pf-footer {
  background: linear-gradient(180deg, var(--wood-dark) 0%, #2a1a0e 100%);
  color: rgba(255, 255, 255, 0.72);
  padding: var(--space-16) var(--space-8) var(--space-8);
  position: relative;
  border-top: 4px solid var(--gold);
}

.pf-footer::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 12px solid var(--gold);
}

.pf-footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-10);
}

.pf-footer__brand {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: var(--space-3);
}

.pf-footer__desc {
  font-size: var(--text-sm);
  line-height: 1.7;
}

.pf-footer__col-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--straw-light);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: var(--space-4);
}

.pf-footer__nav {
  list-style: none;
  padding: 0;
}

.pf-footer__nav li {
  margin-bottom: var(--space-2);
}

.pf-footer__nav a {
  color: rgba(255, 255, 255, 0.55);
  font-size: var(--text-sm);
  transition: color 0.15s;
}

.pf-footer__nav a:hover {
  color: var(--gold-light);
}

.pf-footer__bottom {
  max-width: var(--content-max);
  margin: var(--space-10) auto 0;
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.35);
}

/* ——— Sidebar (for content pages) ——— */
.pf-content-layout {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-12) var(--space-8);
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: var(--space-10);
}

.pf-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.pf-sidebar__card {
  background:
    radial-gradient(circle at 18px 18px, var(--wood-pale) 5px, transparent 6px),
    radial-gradient(circle at calc(100% - 18px) 18px, var(--wood-pale) 5px, transparent 6px),
    radial-gradient(circle at 18px calc(100% - 18px), var(--wood-pale) 5px, transparent 6px),
    radial-gradient(circle at calc(100% - 18px) calc(100% - 18px), var(--wood-pale) 5px, transparent 6px),
    linear-gradient(180deg, var(--white) 0%, #fefdf9 100%);
  border: 3px solid var(--wood-pale);
  border-radius: var(--radius-md);
  padding: var(--space-6);
}

.pf-sidebar__card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--wood-dark);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--gold);
}

.pf-sidebar__card ul {
  list-style: none;
  padding: 0;
}

.pf-sidebar__card li {
  margin-bottom: var(--space-2);
}

.pf-sidebar__card a {
  font-size: var(--text-sm);
  color: var(--brown-light);
  font-weight: 600;
  display: block;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.pf-sidebar__card a:hover {
  background: var(--green-pale);
  color: var(--green-dark);
}

/* ——— Pagination ——— */
.pf-pagination {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  margin-top: var(--space-10);
}

.pf-pagination__btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--brown);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.pf-pagination__btn:hover { border-color: var(--green); color: var(--green); }
.pf-pagination__btn--active {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: var(--white);
  border-color: var(--green-dark);
}

/* ——— Tag Pills ——— */
.pf-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.pf-tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-egg);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--brown-pale);
  color: var(--brown-light);
  transition: all 0.15s;
}

.pf-tag:hover {
  background: var(--green-pale);
  color: var(--green-dark);
  transform: scale(1.05);
}

/* ——— Scroll-Reveal Animation ——— */
.pf-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.pf-reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ——— Utility ——— */
.pf-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.pf-text-center { text-align: center; }
.pf-mt-8 { margin-top: var(--space-8); }
.pf-mb-8 { margin-bottom: var(--space-8); }

/* ——— Section Decorative Grass Divider ——— */
.pf-grass-divider {
  height: 24px;
  background:
    /* Grass blades */
    repeating-linear-gradient(
      85deg,
      transparent 0px,
      transparent 6px,
      var(--grass) 6px,
      var(--grass) 8px,
      transparent 8px,
      transparent 14px
    ),
    repeating-linear-gradient(
      95deg,
      transparent 0px,
      transparent 8px,
      var(--grass-dark) 8px,
      var(--grass-dark) 10px,
      transparent 10px,
      transparent 16px
    );
  opacity: 0.4;
}

/* ——— Responsive ——— */
@media (max-width: 1024px) {
  .pf-card-grid { grid-template-columns: repeat(2, 1fr); }
  .pf-card-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .pf-features { grid-template-columns: repeat(2, 1fr); }
  .pf-gallery { grid-template-columns: repeat(3, 1fr); }
  .pf-content-layout { grid-template-columns: 1fr; }
  .pf-sidebar { display: none; }
  .pf-stats-bar { grid-template-columns: repeat(2, 1fr); }
  .pf-footer__inner { grid-template-columns: 1fr 1fr; }
  .pf-hero__inner { grid-template-columns: 1fr; gap: var(--space-8); }
  .pf-hero__title { font-size: var(--text-4xl); }
  .pf-hero__game { max-width: 320px; margin: 0 auto; }
  .pf-hero__game-inner { max-width: 320px; }
  .pf-hero__clouds { display: none; }
  .pf-hero__hills { height: 40px; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }

  .pf-header { padding: 0 var(--space-4); }
  .pf-header__nav { display: none; }
  .pf-header__toggle { display: block; }

  .pf-header--open .pf-header__nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(107, 76, 48, 0.98) 0%, rgba(90, 60, 35, 0.98) 100%);
    backdrop-filter: blur(16px);
    border-bottom: 3px solid rgba(240, 180, 41, 0.3);
    padding: var(--space-4);
    gap: var(--space-1);
  }

  .pf-header--open .pf-header__nav a {
    color: rgba(255, 255, 255, 0.75);
  }

  .pf-card-grid,
  .pf-card-grid--chars,
  .pf-features { grid-template-columns: 1fr; }
  .pf-card-grid--2 { grid-template-columns: 1fr; }
  .pf-gallery { grid-template-columns: repeat(2, 1fr); }
  .pf-guide-card { grid-template-columns: 1fr; }
  .pf-guide-card__image { height: 180px; min-height: auto; }
  .pf-stats-bar { grid-template-columns: 1fr 1fr; gap: var(--space-4); }
  .pf-footer__inner { grid-template-columns: 1fr; gap: var(--space-8); }

  .pf-hero { padding: var(--space-8) var(--space-4); }
  .pf-hero::before { display: none; }
  .pf-hero__title { font-size: var(--text-3xl); }
  .pf-hero__stats { gap: var(--space-4); flex-wrap: wrap; }
  .pf-hero__game { max-width: 280px; }
  .pf-hero__game-inner { max-width: 280px; }
  .pf-hero__actions { flex-direction: column; }
  .pf-hero__hills { height: 32px; margin-top: var(--space-4); }
  .pf-hero__decor { display: none; }

  .pf-prose { padding: var(--space-8) var(--space-4); }
  .pf-prose h1 { font-size: var(--text-3xl); }
  .pf-section { padding: var(--space-10) var(--space-4); }
  .pf-section__title { font-size: var(--text-3xl); }
  .pf-content-layout { padding: var(--space-8) var(--space-4); }

  .pf-timeline { padding-left: var(--space-4); }

  .pf-char-card__pros-cons { grid-template-columns: 1fr; }

  .pf-lightbox__nav { display: none; }
}

@media (max-width: 480px) {
  .pf-gallery { grid-template-columns: 1fr 1fr; }
  .pf-stats-bar { grid-template-columns: 1fr; }
  .pf-hero__stats { flex-direction: column; align-items: center; }
}
