/*
 * CASHCOWS // DEGEN DAIRY FARM STYLES
 * Titles: 100% authentic handwritten doodle font ('Gochi Hand').
 * Subtitles, body prose, and all other text: Old clean sans-serif and monospace.
 * X social button, mobile responsiveness, and 100% REAL-TIME ON-CHAIN pasture physics.
 * STRICT COMPLIANCE: ZERO EMOJIS, ZERO DASHES IN ALL USER FACING TEXT
 */

@import url('https://fonts.googleapis.com/css2?family=Gochi+Hand&display=swap');

:root {
  --bg-white: #ffffff;
  --bg-subtle: #f9fbf9;
  --border-black: #000000;
  --rh-green: #00c805;
  --rh-green-glow: #00ff66;
  --rh-green-dark: #008803;
  --rh-green-light: #eafaf1;
  --book-page-bg: #fffef9;
  --book-border: #2c2523;
  --gold: #ffd700;
  --text-dark: #000000;
  --text-muted: #555555;
  
  /* TITLES USE HANDWRITING FONT ONLY */
  --font-title: 'Gochi Hand', 'Comic Sans MS', cursive, sans-serif;
  
  /* SUBTITLES & REST OF TEXT USE THE OLD CLEAN FONTS */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'Courier New', Courier, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
}

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-white);
  color: var(--text-dark);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  text-transform: lowercase;
  user-select: none;
  overflow-x: hidden;
}

/* =========================================================
   PROMINENT MILK DELIMITERS (BETWEEN SECTIONS)
   ========================================================= */
.section-milk-delimiter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: 1100px;
  margin: 44px auto;
  padding: 0 16px;
}

.milk-del-line {
  flex: 1;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    #000000,
    #000000 8px,
    transparent 8px,
    transparent 16px
  );
}

.milk-del-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 2px solid #000000;
  box-shadow: 3px 3px 0 #000000;
  padding: 6px 18px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 900;
  color: #000000;
  white-space: nowrap;
}

.milk-del-icon {
  width: 20px;
  height: 25px;
  object-fit: contain;
}

/* =========================================================
   RETRO MS PAINT CONTAINERS & BUTTONS
   ========================================================= */
.paint-box {
  background: #ffffff;
  border: 2px solid #000000;
  box-shadow: 4px 4px 0 #000000;
  position: relative;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.paint-box:hover {
  box-shadow: 6px 6px 0 #000000;
}

.paint-btn {
  background: var(--rh-green);
  color: #000000;
  border: 2px solid #000000;
  box-shadow: 3px 3px 0 #000000;
  font-family: var(--font-title);
  font-size: 1.25rem;
  padding: 6px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: lowercase;
  text-decoration: none;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.paint-btn:hover {
  background: var(--rh-green-glow);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #000000;
}

.paint-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #000000;
}

.paint-btn.secondary {
  background: #ffffff;
}

.paint-btn.secondary:hover {
  background: #f0f0f0;
}

/* =========================================================
   TOP LIVE TICKER TAPE
   ========================================================= */
.ticker-wrap {
  width: 100%;
  background: #000000;
  color: var(--rh-green);
  padding: 8px 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: bold;
  border-bottom: 2px solid #000000;
}

.ticker-content {
  display: inline-block;
  animation: tickerScroll 32s linear infinite;
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* =========================================================
   NAVBAR WITH CATEGORY ELEMENTS & DELIMITER LINES
   ========================================================= */
.nav-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 2px solid #000000;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.08);
  padding: 8px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.nav-left-cluster {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-handwritten-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(1px 2px 0 rgba(0, 0, 0, 0.15));
  transition: transform 0.1s ease;
}

.brand-handwritten-logo:hover {
  transform: scale(1.04);
}

.nav-links {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 2px solid #000000;
  box-shadow: 3px 3px 0 #000000;
  padding: 4px 8px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.nav-item-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #000000;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.9rem;
  padding: 5px 10px;
  transition: all 0.1s ease;
}

.nav-item-pill:hover {
  background: var(--rh-green-light);
}

.nav-elem-icon {
  width: 18px;
  height: 22px;
  object-fit: contain;
}

.nav-category-delimiter {
  width: 2px;
  height: 20px;
  background: #000000;
  opacity: 0.35;
  margin: 0 2px;
  flex-shrink: 0;
}

.nav-right-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-x-btn {
  background: #000000;
  color: #ffffff;
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-x-btn:hover {
  background: #222222;
  color: var(--rh-green);
}

.x-icon-svg {
  display: block;
}

.footer-x-wrap {
  margin: 16px auto 0;
}

.footer-x-btn {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  padding: 8px 20px;
}

.sound-toggle-btn {
  background: #ffffff;
  color: #000000;
  font-size: 1.1rem;
  padding: 5px 12px;
}

.sound-toggle-btn.sound-off {
  background: #f0f0f0;
  color: #888888;
}

.nav-supply-pill {
  background: var(--rh-green-light);
  border: 1.5px solid #000000;
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--rh-green-dark);
  white-space: nowrap;
}

/* =========================================================
   SLEEK RETRO WALLET DROPDOWN & INLINE TOASTS
   ========================================================= */
.wallet-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #ffffff;
  border: 2px solid #000000;
  box-shadow: 4px 4px 0 #000000;
  padding: 12px;
  display: none;
  flex-direction: column;
  gap: 8px;
  z-index: 250;
  min-width: 250px;
  text-align: left;
}

.wallet-dropdown-menu.open {
  display: flex;
}

.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #ffffff;
  border: 2px solid #000000;
  box-shadow: 4px 4px 0 #000000;
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: bold;
  color: #000000;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* =========================================================
   CONTAINER & SECTIONS
   ========================================================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
}

.section-spacer {
  margin: 36px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 28px;
}

.section-tag {
  display: inline-block;
  background: var(--rh-green-light);
  border: 1px solid #000000;
  box-shadow: 2px 2px 0 #000000;
  color: #000000;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 4px 14px;
  margin-bottom: 10px;
}

/* TITLES USE HANDWRITTEN FONT */
.section-title {
  font-family: var(--font-title);
  font-size: 3.4rem;
  line-height: 1.05;
  margin-bottom: 6px;
}

/* SUBTITLES USE OLD SANS FONT */
.section-subtitle {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* =========================================================
   HERO SECTION: MINT TERMINAL & CALL TO ACTION
   ========================================================= */
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
  padding-top: 10px;
}

.hero-title {
  font-family: var(--font-title);
  font-size: 4.6rem;
  line-height: 1;
  margin-bottom: 16px;
}

.hero-desc {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 24px;
  max-width: 520px;
}

.hero-mint-box {
  padding: 22px;
}

.mint-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px dashed #000000;
}

.live-pulse {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--rh-green-dark);
}

.pulse-circle {
  width: 10px;
  height: 10px;
  background: var(--rh-green);
  border: 1px solid #000000;
  border-radius: 50%;
  animation: pulseAnim 1.4s infinite;
}

@keyframes pulseAnim {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

.progress-track {
  width: 100%;
  height: 22px;
  background: #eeeeee;
  border: 2px solid #000000;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  background: repeating-linear-gradient(
    45deg,
    var(--rh-green),
    var(--rh-green) 12px,
    var(--rh-green-glow) 12px,
    var(--rh-green-glow) 24px
  );
  width: 0%;
  transition: width 0.4s ease;
}

.mint-count-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.qty-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid #000000;
  padding: 8px 14px;
  margin-bottom: 16px;
}

.qty-btns {
  display: flex;
  gap: 8px;
}

.qty-btn {
  width: 38px;
  height: 38px;
  background: #ffffff;
  border: 2px solid #000000;
  box-shadow: 2px 2px 0 #000000;
  font-family: var(--font-title);
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.08s ease;
}

.qty-btn.active, .qty-btn:hover {
  background: var(--rh-green);
  transform: translate(-1px, -1px);
}

.slam-mint-btn {
  width: 100%;
  padding: 14px;
  font-size: 1.55rem;
  background: var(--rh-green);
  animation: pulseBorder 2s infinite;
}

@keyframes pulseBorder {
  0% { box-shadow: 3px 3px 0 #000000; }
  50% { box-shadow: 6px 6px 0 var(--rh-green); }
  100% { box-shadow: 3px 3px 0 #000000; }
}

/* HERO SHOWCASE CARD */
.hero-cow-preview {
  padding: 16px;
  text-align: center;
  background: var(--bg-subtle);
}

.hero-preview-img {
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid #000000;
  object-fit: cover;
  background: #ffffff;
  margin-bottom: 12px;
}

.preview-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #000000;
}

#heroCowName {
  font-family: var(--font-title);
  font-size: 1.35rem;
}

#heroCowTrait {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
}

/* =========================================================
   REAL TIME MINT PASTURE
   ========================================================= */
.farm-arena-box {
  padding: 20px;
  background: #ffffff;
}

.farm-live-feed-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #000000;
  color: var(--rh-green);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: bold;
  padding: 8px 16px;
  border: 2px solid #000000;
  margin-bottom: 14px;
  min-height: 44px;
  overflow: hidden;
}

.feed-label-pill {
  background: var(--rh-green);
  color: #000000;
  padding: 2px 8px;
  font-family: var(--font-title);
  font-size: 1.05rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.feed-marquee-track {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--rh-green);
  transition: opacity 0.25s ease;
}

.farm-canvas-wrap {
  width: 100%;
  height: 480px;
  border: 2px solid #000000;
  box-shadow: 4px 4px 0 #000000;
  position: relative;
  background: #ffffff;
  overflow: hidden;
  cursor: crosshair;
}

.farm-grid-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    linear-gradient(to right, #f2f2f2 1px, transparent 1px),
    linear-gradient(to bottom, #f2f2f2 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
  opacity: 0.8;
}

.farm-barn-graphic {
  position: absolute;
  bottom: 10px;
  left: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid #000000;
  box-shadow: 2px 2px 0 #000000;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  z-index: 5;
}

.farm-stats-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 10;
  flex-wrap: wrap;
}

.farm-stat-pill {
  background: #ffffff;
  border: 2px solid #000000;
  box-shadow: 2px 2px 0 #000000;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
}

.empty-pasture-state {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  background: rgba(255, 255, 255, 0.96);
  border: 2px solid #000000;
  box-shadow: 4px 4px 0 #000000;
  padding: 20px 28px;
  max-width: 440px;
  z-index: 6;
  pointer-events: none;
}

.empty-pasture-title {
  font-family: var(--font-title);
  font-size: 1.8rem;
  color: var(--rh-green-dark);
  margin-bottom: 6px;
}

.empty-pasture-desc {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.realtime-mint-cow {
  position: absolute;
  width: 100px;
  height: 100px;
  cursor: pointer;
  z-index: 15;
  transition: transform 0.08s linear, opacity 0.8s ease;
  animation: spawnDropIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes spawnDropIn {
  0% { transform: translateY(-80px) scale(0.3); opacity: 0; }
  70% { transform: translateY(10px) scale(1.15); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.realtime-mint-cow.despawning {
  animation: departToWallet 1.2s forwards ease-in-out;
  pointer-events: none;
}

@keyframes departToWallet {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: translateY(-40px) scale(1.15); opacity: 0.8; filter: drop-shadow(0 0 10px #ffd700); }
  100% { transform: translateY(-120px) scale(0.2); opacity: 0; }
}

.realtime-mint-cow-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(2px 3px 0 rgba(0, 0, 0, 0.25));
}

.realtime-mint-cow:hover {
  transform: scale(1.18) !important;
}

.live-mint-tag {
  position: absolute;
  top: -38px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border: 2px solid #000000;
  box-shadow: 2px 2px 0 #000000;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.live-mint-tag.user-mint {
  background: #ebf9f0;
  border: 2px solid var(--rh-green-dark);
}

.live-mint-tag::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #000000;
}

.floating-num {
  position: absolute;
  font-family: var(--font-title);
  font-size: 1.8rem;
  color: var(--rh-green-dark);
  text-shadow: 1px 1px 0 #ffffff;
  pointer-events: none;
  z-index: 50;
  animation: floatUpBurst 1s forwards cubic-bezier(0.1, 0.8, 0.3, 1);
}

@keyframes floatUpBurst {
  0% { transform: translate(-50%, 0) scale(0.6); opacity: 1; }
  50% { transform: translate(-50%, -50px) scale(1.25); opacity: 1; }
  100% { transform: translate(-50%, -100px) scale(1.4); opacity: 0; }
}

/* =========================================================
   COWDEX CAROUSEL SECTION
   ========================================================= */
.carousel-wrap {
  position: relative;
  overflow: hidden;
  padding: 10px 0;
}

.carousel-track {
  display: flex;
  gap: 20px;
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.carousel-card {
  flex: 0 0 240px;
  padding: 14px;
  background: #ffffff;
  border: 2px solid #000000;
  box-shadow: 4px 4px 0 #000000;
  text-align: center;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.carousel-card:hover {
  transform: translateY(-4px);
  box-shadow: 6px 8px 0 #000000;
}

.carousel-cow-img {
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid #000000;
  object-fit: cover;
  background: #ffffff;
  margin-bottom: 8px;
}

.carousel-cow-name {
  font-family: var(--font-title);
  font-size: 1.45rem;
  margin-bottom: 2px;
}

.carousel-cow-trait {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--rh-green-dark);
  background: var(--rh-green-light);
  border: 1px solid #000000;
  padding: 2px 8px;
  display: inline-block;
}

.carousel-nav-btns {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.nav-circle-btn {
  width: 44px;
  height: 44px;
  border: 2px solid #000000;
  box-shadow: 3px 3px 0 #000000;
  background: #ffffff;
  font-family: var(--font-title);
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.08s ease;
}

.nav-circle-btn:hover {
  background: var(--rh-green);
  transform: translate(-1px, -1px);
}

/* =========================================================
   THE VINTAGE FARM BOOK MANIFESTO (OPEN TWO-PAGE BOOK)
   ========================================================= */
.farm-book-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
  width: 100%;
}

.book-chapter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.book-tab-btn {
  background: #ffffff;
  border: 2px solid #000000;
  box-shadow: 3px 3px 0 #000000;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 900;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.1s ease;
}

.book-tab-btn.active, .book-tab-btn:hover {
  background: var(--rh-green);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #000000;
}

.farm-book-chassis {
  width: 100%;
  max-width: 1100px;
  background: #3e2d27;
  border: 4px solid #000000;
  box-shadow: 12px 14px 0 rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 16px;
  position: relative;
}

.book-ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 48px;
  background: #ff334b;
  border: 2px solid #000000;
  border-bottom: none;
  z-index: 10;
}

.book-ribbon::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: -2px;
  border-left: 11px solid #ff334b;
  border-right: 11px solid #ff334b;
  border-bottom: 10px solid transparent;
}

.book-spread {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--book-page-bg);
  border: 2px solid #000000;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.08);
}

.book-spine-crease {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.02) 40%, rgba(0, 0, 0, 0.02) 60%, rgba(0, 0, 0, 0.15));
  border-left: 1px dashed rgba(0, 0, 0, 0.3);
  border-right: 1px dashed rgba(0, 0, 0, 0.3);
  pointer-events: none;
  z-index: 8;
}

.book-page {
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 520px;
  background-image: 
    radial-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 0);
  background-size: 18px 18px;
  position: relative;
}

.book-page.left {
  border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.book-page.right {
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
}

.book-page-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #000000;
  padding-bottom: 4px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  color: #666666;
}

.book-chapter-number {
  font-family: var(--font-title);
  font-size: 1.45rem;
  color: var(--rh-green-dark);
  margin-bottom: 2px;
}

.book-chapter-title {
  font-family: var(--font-title);
  font-size: 2.5rem;
  line-height: 1.05;
  margin-bottom: 12px;
  color: #111111;
}

.book-prose {
  font-family: var(--font-sans);
  font-size: 0.96rem;
  line-height: 1.65;
  color: #222222;
  margin-bottom: 14px;
}

.book-prose p {
  margin-bottom: 10px;
}

.milk-delimiter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 14px 0;
}

.milk-delimiter-line {
  flex: 1;
  height: 2px;
  background: #000000;
  opacity: 0.25;
}

.milk-drop-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1.5px solid #000000;
  box-shadow: 2px 2px 0 #000000;
  padding: 2px 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 900;
  color: #000000;
}

.milk-drop-icon {
  width: 16px;
  height: 20px;
  object-fit: contain;
}

.book-footer-page-num {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  border-top: 1px solid #000000;
  padding-top: 6px;
  margin-top: 12px;
  color: #666666;
}

.book-illustration-centered-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
}

.book-illustration-box {
  border: 2px solid #000000;
  box-shadow: 4px 4px 0 #000000;
  background: #ffffff;
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 340px;
  width: 100%;
}

.book-illustration-img {
  width: 220px;
  height: 220px;
  border: 2px solid #000000;
  box-shadow: 3px 3px 0 #000000;
  object-fit: cover;
  background: #ffffff;
  margin-bottom: 12px;
}

.book-figure-caption {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  color: #222222;
  line-height: 1.45;
}

.book-turn-controls {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 1100px;
  margin-top: 16px;
}

/* =========================================================
   DYNAMIC MILKING ANIMATION MODAL (ON REVEAL)
   ========================================================= */
.milking-modal-overlay,
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  padding: 16px;
}

.milking-modal-overlay.open,
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.milking-modal-box {
  background: #ffffff;
  border: 4px solid #000000;
  box-shadow: 10px 10px 0 #000000;
  max-width: 480px;
  width: 100%;
  padding: 24px;
  text-align: center;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: #ffffff;
  border: 2px solid #000000;
  box-shadow: 2px 2px 0 #000000;
  font-family: var(--font-sans);
  font-weight: 900;
  cursor: pointer;
}

.milking-pumping-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 0;
}

.udder-pumps-graphic {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
}

.pump-teat {
  width: 16px;
  height: 36px;
  background: #fca5b5;
  border: 2px solid #000000;
  border-radius: 0 0 12px 12px;
  animation: teatPump 0.4s infinite alternate ease-in-out;
}

.pump-teat:nth-child(2) {
  animation-delay: 0.2s;
}

@keyframes teatPump {
  0% { transform: scaleY(1); }
  100% { transform: scaleY(0.7) translateY(-6px); }
}

.milk-flow-jet {
  width: 4px;
  height: 35px;
  background: #ffffff;
  border-left: 1px solid #000000;
  border-right: 1px solid #000000;
  margin: 0 auto;
  animation: flowBurst 0.3s infinite linear;
}

@keyframes flowBurst {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}

.glass-milk-bottle {
  width: 100px;
  height: 160px;
  border: 3px solid #000000;
  border-radius: 14px 14px 24px 24px;
  background: #f2f5f7;
  position: relative;
  overflow: hidden;
  box-shadow: 4px 4px 0 #000000;
  margin: 10px auto;
}

.glass-bottle-fill {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 0%;
  background: #ffffff;
  border-top: 3px solid var(--rh-green);
  transition: height 0.25s linear;
}

.bottle-bubble {
  position: absolute;
  background: rgba(0, 200, 5, 0.3);
  border-radius: 50%;
  animation: bubbleFloat 1s infinite linear;
}

@keyframes bubbleFloat {
  0% { transform: translateY(20px); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(-90px); opacity: 0; }
}

.milked-reveal-card {
  display: none;
  flex-direction: column;
  align-items: center;
  animation: popCow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popCow {
  0% { transform: scale(0.4) rotate(-6deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.milked-cow-img {
  width: 160px;
  height: 160px;
  border: 3px solid #000000;
  box-shadow: 4px 4px 0 #000000;
  object-fit: cover;
  background: #ffffff;
  margin: 10px auto;
}

.milked-traits-box {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 8px;
}

.milked-trait-pill {
  background: var(--rh-green-light);
  border: 1px solid #000000;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
}

/* =========================================================
   MODAL MULTI-MINT REVEAL CAROUSEL
   ========================================================= */
.modal-carousel-container {
  width: 100%;
  margin-top: 10px;
  position: relative;
}

.modal-carousel-viewport {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.modal-carousel-track {
  display: flex;
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.modal-carousel-slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4px 8px;
  box-sizing: border-box;
}

.modal-carousel-slide .milked-cow-img {
  width: 170px;
  height: 170px;
  border: 3px solid #000000;
  box-shadow: 4px 4px 0 #000000;
  object-fit: cover;
  background: #ffffff;
  margin: 8px auto;
}

.modal-slide-title {
  font-family: var(--font-title);
  font-size: 1.85rem;
  margin-top: 4px;
}

.modal-carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.modal-nav-btn {
  width: 36px;
  height: 36px;
  border: 2px solid #000000;
  box-shadow: 2px 2px 0 #000000;
  background: #ffffff;
  font-family: var(--font-title);
  font-size: 1.25rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.08s ease;
}

.modal-nav-btn:hover {
  background: var(--rh-green);
  transform: translate(-1px, -1px);
}

.modal-nav-indicator {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  background: var(--rh-green-light);
  border: 1px solid #000000;
  padding: 4px 12px;
}

.modal-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}

.modal-dot {
  width: 10px;
  height: 10px;
  border: 1.5px solid #000000;
  background: #ffffff;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.1s ease;
}

.modal-dot.active {
  background: var(--rh-green);
  transform: scale(1.25);
  box-shadow: 0 0 4px var(--rh-green);
}

/* =========================================================
   WALLET SELECTION MODAL (CHOOSE YOUR WALLET)
   ========================================================= */
.wallet-select-modal-box {
  background: #ffffff;
  max-width: 440px;
  width: 90%;
  padding: 28px 24px;
  position: relative;
  border: 3px solid #000000;
  box-shadow: 8px 8px 0 #000000;
  animation: popCow 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.wallet-select-title {
  font-family: var(--font-title);
  font-size: 2.3rem;
  color: #000000;
  text-align: center;
  line-height: 1.1;
  margin-bottom: 4px;
}

.wallet-select-subtitle {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 18px;
}

.wallet-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wallet-option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #ffffff;
  border: 2px solid #000000;
  box-shadow: 3px 3px 0 #000000;
  cursor: pointer;
  transition: all 0.1s ease;
  user-select: none;
}

.wallet-option-card:hover {
  background: var(--rh-green-light);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 #000000;
}

.wallet-option-card:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 #000000;
}

.wallet-option-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wallet-option-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wallet-option-icon svg,
.wallet-option-icon img {
  width: 100%;
  height: 100%;
}

.wallet-option-name {
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: #000000;
}

.wallet-option-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: bold;
  padding: 3px 8px;
  border: 1px solid #000000;
  background: #f0f0f0;
}

.wallet-option-badge.detected {
  background: var(--rh-green);
  color: #000000;
}

/* =========================================================
   WALLET LIMIT REACHED MODAL & ANIMATED MILK SPILL
   ========================================================= */
.wallet-limit-modal-box {
  background: #ffffff;
  max-width: 440px;
  width: 90%;
  padding: 28px 22px;
  text-align: center;
  position: relative;
  border: 3px solid #000000;
  box-shadow: 8px 8px 0 #000000;
  animation: popCow 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.limit-milk-animation-wrap {
  width: 100%;
  height: 130px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
  position: relative;
}

.milk-overflow-bottle {
  position: relative;
  width: 130px;
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.limit-milk-carton-icon .tipping-carton {
  width: 64px;
  height: 64px;
  object-fit: contain;
  animation: cartonTipOver 2.2s infinite ease-in-out;
  transform-origin: bottom right;
}

@keyframes cartonTipOver {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  35%, 65% { transform: rotate(-32deg) translateY(-6px); }
}

.milk-spill-stream {
  width: 6px;
  height: 38px;
  background: #ffffff;
  border: 1.5px solid #000000;
  position: absolute;
  top: 48px;
  left: 28px;
  animation: milkStreamFlow 1s infinite linear;
}

@keyframes milkStreamFlow {
  0% { transform: scaleY(0.6); opacity: 0.8; }
  50% { transform: scaleY(1.15); opacity: 1; }
  100% { transform: scaleY(0.6); opacity: 0.8; }
}

.milk-spill-puddle {
  width: 96px;
  height: 22px;
  background: #ffffff;
  border: 2px solid #000000;
  border-radius: 50%;
  position: absolute;
  bottom: 8px;
  left: 17px;
  box-shadow: 2px 2px 0 #000000;
  animation: puddleExpand 2.2s infinite ease-in-out;
}

@keyframes puddleExpand {
  0%, 100% { transform: scale(0.88); }
  50% { transform: scale(1.18); }
}

.milk-splash-bubble {
  position: absolute;
  background: #ffffff;
  border: 1.5px solid #000000;
  border-radius: 50%;
}

.milk-splash-bubble.b1 {
  width: 10px;
  height: 10px;
  bottom: 22px;
  left: 12px;
  animation: bubblePop1 1.2s infinite ease-out;
}

.milk-splash-bubble.b2 {
  width: 14px;
  height: 14px;
  bottom: 20px;
  right: 20px;
  animation: bubblePop2 1.4s infinite ease-out 0.3s;
}

.milk-splash-bubble.b3 {
  width: 8px;
  height: 8px;
  bottom: 28px;
  left: 50px;
  animation: bubblePop1 1s infinite ease-out 0.6s;
}

@keyframes bubblePop1 {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(-24px) scale(1.2); opacity: 0; }
}

@keyframes bubblePop2 {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(-28px) scale(1.3); opacity: 0; }
}

.limit-modal-title {
  font-family: var(--font-title);
  font-size: 2.4rem;
  color: #cc0000;
  line-height: 1.1;
  margin-bottom: 6px;
}

.limit-modal-badge {
  display: inline-block;
  background: #ffe6e6;
  color: #cc0000;
  border: 1.5px solid #cc0000;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  padding: 4px 12px;
  margin-bottom: 12px;
}

.limit-modal-desc {
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 18px;
}

/* =========================================================
   SIMPLIFIED FOOTER & REAL CONTRACT LINK
   ========================================================= */
.footer {
  border-top: 2px solid #000000;
  padding: 36px 16px;
  margin-top: 50px;
  background: #ffffff;
  text-align: center;
}

.footer-stickers {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

.footer-sticker {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.footer-disclaimer {
  font-family: var(--font-title);
  font-size: 2rem;
  color: #000000;
  margin-top: 8px;
}

/* =========================================================
   COMPREHENSIVE MOBILE RESPONSIVENESS (< 868px & < 480px)
   ========================================================= */
@media (max-width: 868px) {
  .nav-header {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 14px;
    gap: 10px;
  }

  .nav-left-cluster {
    justify-content: space-between;
    width: 100%;
  }

  .brand-handwritten-logo {
    height: 44px;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    padding: 6px 8px;
  }

  .nav-item-pill {
    font-size: 0.85rem;
    padding: 3px 8px;
  }

  .nav-right-cluster {
    width: 100%;
    justify-content: space-between;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-title {
    font-size: 3.4rem;
  }

  .hero-desc {
    font-size: 1.05rem;
  }

  .farm-canvas-wrap {
    height: 380px;
  }

  .farm-stats-overlay {
    top: 8px;
    right: 8px;
  }

  .farm-stat-pill {
    font-size: 0.75rem;
    padding: 3px 6px;
  }

  .realtime-mint-cow {
    width: 85px;
    height: 85px;
  }

  .book-spread {
    grid-template-columns: 1fr;
  }

  .book-spine-crease {
    display: none;
  }

  .book-page.left {
    border-right: none;
    border-bottom: 2px dashed rgba(0, 0, 0, 0.2);
    min-height: auto;
    padding: 24px 20px;
  }

  .book-page.right {
    border-left: none;
    min-height: auto;
    padding: 24px 20px;
  }

  .book-illustration-img {
    width: 180px;
    height: 180px;
  }

  .book-chapter-title {
    font-size: 2.1rem;
  }

  .section-title {
    font-size: 2.7rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.8rem;
  }

  .section-title {
    font-size: 2.3rem;
  }

  .section-subtitle {
    font-size: 0.95rem;
  }

  .paint-btn {
    font-size: 1.15rem;
    padding: 6px 12px;
  }

  .slam-mint-btn {
    font-size: 1.35rem;
  }

  .milk-del-pill {
    font-size: 0.85rem;
    padding: 4px 12px;
  }

  .farm-canvas-wrap {
    height: 320px;
  }

  .realtime-mint-cow {
    width: 72px;
    height: 72px;
  }

  .carousel-card {
    flex: 0 0 200px;
  }

  .book-illustration-img {
    width: 160px;
    height: 160px;
  }

  .footer-disclaimer {
    font-size: 1.6rem;
  }
}
