/* ============================================================
   สว. ชานม ฟาร์ม สตอรี่ — Complete Design System
   Thai satirical farming simulation game
   Cute + Playful + Meme-worthy + Politically Satirical
   ============================================================ */

/* ------------------------------------------------------------
   GOOGLE FONTS IMPORT
   ------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700;800&display=swap');

/* ------------------------------------------------------------
   DESIGN TOKENS
   ------------------------------------------------------------ */
:root {
  /* Core Brand Colors */
  --green-primary:   #4CAF50;
  --green-dark:      #388E3C;
  --green-light:     #A5D6A7;
  --green-grass:     #6DBF67;
  --brown-warm:      #8B6914;
  --brown-earth:     #654321;
  --brown-soil:      #5D4037;
  --cream:           #FFF8DC;
  --cream-dark:      #F5E6C8;
  --red-alert:       #E74C3C;
  --red-dark:        #C0392B;
  --sky-blue:        #87CEEB;
  --sky-dark:        #5BAAD4;
  --amber:           #FFB800;
  --amber-dark:      #E65100;

  /* Terminal / Log Panel */
  --terminal-green:  #00ff41;
  --terminal-bg:     #1a1a2e;
  --terminal-border: #16213e;

  /* Mama Path Colors */
  --mama-orange:     #FF6B00;
  --mama-yellow:     #FFD700;

  /* Instagram Colors */
  --ig-pink:         #E1306C;
  --ig-purple:       #833AB4;

  /* Neutrals */
  --white:           #ffffff;

  /* Shadows */
  --shadow-sm:       0 2px 8px rgba(0,0,0,0.12);
  --shadow-md:       0 4px 20px rgba(0,0,0,0.18);
  --shadow-lg:       0 8px 40px rgba(0,0,0,0.25);

  /* Border Radius */
  --radius-sm:       8px;
  --radius-md:       14px;
  --radius-lg:       20px;
  --radius-xl:       28px;

  /* Typography */
  --font-main:       'Kanit', 'Sarabun', 'Noto Sans Thai', sans-serif;

  /* Transitions */
  --transition:      0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 0.18s ease;
}

/* ------------------------------------------------------------
   RESET & BASE
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: linear-gradient(
    160deg,
    #d4edda 0%,
    #f0ede0 25%,
    #e8f5e9 55%,
    #fff9ec 80%,
    #f5e6c8 100%
  );
  min-height: 100vh;
  overflow-x: hidden;
  color: #333;
  line-height: 1.5;
}

/* Animated background radials — farm pastoral feel */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 15% 85%, rgba(76,175,80,0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 15%, rgba(139,105,20,0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(255,248,220,0.45) 0%, transparent 70%),
    radial-gradient(ellipse at 70% 90%, rgba(255,184,0,0.06) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* ------------------------------------------------------------
   SCREEN SYSTEM
   ------------------------------------------------------------ */
.screen {
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.5s ease both;
}

.screen[hidden] {
  display: none !important;
}

.screen-active {
  display: block;
}

/* ------------------------------------------------------------
   CONTAINER
   ------------------------------------------------------------ */
.container,
.select-container,
.sim-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.select-container {
  max-width: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 28px 16px;
}

.sim-container {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100vh;
}

/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */

@keyframes bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-10px) scale(1.05); }
}

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

@keyframes shake {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  12%       { transform: translateX(-6px) rotate(-3.5deg); }
  25%       { transform: translateX(6px) rotate(3.5deg); }
  37%       { transform: translateX(-5px) rotate(-2.5deg); }
  50%       { transform: translateX(5px) rotate(2.5deg); }
  62%       { transform: translateX(-3px) rotate(-1.5deg); }
  75%       { transform: translateX(3px) rotate(1.5deg); }
  87%       { transform: translateX(-1px) rotate(-0.5deg); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 6px 0 #2d7a30, 0 8px 20px rgba(76,175,80,0.4);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 6px 0 #2d7a30, 0 12px 30px rgba(76,175,80,0.6);
  }
}

@keyframes pulseSlow {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}

@keyframes pulseAmber {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 0 var(--amber-dark), 0 6px 14px rgba(255,152,0,0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 4px 0 var(--amber-dark), 0 10px 24px rgba(255,152,0,0.6);
  }
}

@keyframes wilt {
  0%   { filter: none; transform: scaleY(1) rotate(0deg); opacity: 1; }
  40%  { filter: sepia(50%) saturate(70%); transform: scaleY(0.88) rotate(-6deg); opacity: 0.85; }
  100% { filter: sepia(100%) saturate(15%) brightness(0.55); transform: scaleY(0.55) rotate(-18deg); opacity: 0.45; }
}

@keyframes chickenDeath {
  0%   { transform: rotate(0deg) scale(1); filter: none; opacity: 1; }
  25%  { transform: rotate(-25deg) scale(0.95); filter: grayscale(40%); }
  55%  { transform: rotate(80deg) scale(0.82) translateY(8px); filter: grayscale(90%); }
  100% { transform: rotate(115deg) scale(0.62) translateY(18px); filter: grayscale(100%) brightness(0.45); opacity: 0.38; }
}

@keyframes chickenBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25%       { transform: translateY(-4px) rotate(-2.5deg); }
  75%       { transform: translateY(-2px) rotate(2.5deg); }
}

@keyframes sway {
  0%, 100% { transform: rotate(-3.5deg) translateY(0); }
  50%       { transform: rotate(3.5deg) translateY(-3px); }
}

@keyframes stampIn {
  0%   { transform: scale(3.5) rotate(-18deg); opacity: 0; }
  55%  { transform: scale(0.88) rotate(3deg); opacity: 1; }
  75%  { transform: scale(1.06) rotate(-2deg); }
  100% { transform: scale(1) rotate(-4deg); opacity: 1; }
}

@keyframes popIn {
  0%   { transform: scale(0.35); opacity: 0; }
  65%  { transform: scale(1.10); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@keyframes floatUp {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-48px); opacity: 0; }
}

@keyframes rainDrop {
  0%   { transform: translateY(-20px); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translateY(64px); opacity: 0; }
}

@keyframes healthPulseRed {
  0%, 100% { box-shadow: 0 0 0 0 rgba(231,76,60,0.55); }
  50%       { box-shadow: 0 0 0 8px rgba(231,76,60,0); }
}

@keyframes shine {
  from { left: -100%; }
  to   { left: 100%; }
}

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

/* ============================================================
   SCREEN 1: SELECTION SCREEN
   ============================================================ */
#screen-select {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
}

/* -----------------------------------------------
   Game Title Block
   ----------------------------------------------- */
.game-title-block {
  text-align: center;
  animation: fadeInUp 0.6s ease both;
}

.game-title {
  font-size: clamp(1.7rem, 5.5vw, 2.7rem);
  font-weight: 800;
  color: var(--green-dark);
  text-shadow:
    3px 3px 0 var(--cream-dark),
    5px 5px 0 rgba(139,105,20,0.22),
    0 0 28px rgba(76,175,80,0.35);
  letter-spacing: -0.5px;
  line-height: 1.2;
  animation: bounceSoft 3.2s ease-in-out infinite;
}

.game-subtitle {
  font-size: 1rem;
  font-weight: 500;
  color: var(--brown-warm);
  margin-top: 6px;
  letter-spacing: 1.2px;
  opacity: 0.82;
}

/* -----------------------------------------------
   Budget Display  (฿1,500 pill)
   ----------------------------------------------- */
.budget-display {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--mama-yellow), var(--amber));
  color: var(--brown-earth);
  font-size: 1.4rem;
  font-weight: 800;
  padding: 10px 28px;
  border-radius: 50px;
  box-shadow:
    0 4px 0 #b8860b,
    0 6px 18px rgba(255,184,0,0.45);
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.budget-display::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shine 2.8s ease-in-out infinite;
}

/* -----------------------------------------------
   Selection Card (the big white container)
   ----------------------------------------------- */
.selection-card {
  background: linear-gradient(148deg, rgba(255,255,255,0.97), rgba(255,248,220,0.95));
  border-radius: var(--radius-xl);
  box-shadow:
    var(--shadow-lg),
    0 0 0 2.5px rgba(76,175,80,0.18),
    inset 0 1px 0 rgba(255,255,255,0.85);
  padding: 28px 22px 24px;
  width: 100%;
  animation: fadeInUp 0.7s ease 0.1s both;
  border: 2px solid rgba(76,175,80,0.22);
}

/* -----------------------------------------------
   Path Chooser — Farm vs Mama
   ----------------------------------------------- */
.path-chooser {
  margin-bottom: 22px;
}

.path-chooser-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brown-earth);
  margin-bottom: 14px;
  text-align: center;
}

.path-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Path Cards */
.path-card {
  position: relative;
  cursor: pointer;
  border-radius: var(--radius-md);
  border: 2.5px solid #e0d8c8;
  background: linear-gradient(148deg, #ffffff, #fafaf5);
  padding: 18px 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  user-select: none;
  overflow: hidden;
}

.path-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Farm path */
.path-farm {
  border-color: rgba(76,175,80,0.3);
}

.path-farm:hover,
.path-farm:has(input:checked),
.path-farm.selected {
  border-color: var(--green-primary);
  background: linear-gradient(148deg, #f0fdf0, #e8f5e9);
  box-shadow:
    var(--shadow-md),
    0 0 0 3px rgba(76,175,80,0.30),
    0 0 22px rgba(76,175,80,0.18);
  transform: translateY(-3px) scale(1.02);
}

/* Mama path */
.path-mama {
  border-color: rgba(255,107,0,0.3);
}

.path-mama:hover,
.path-mama:has(input:checked),
.path-mama.selected {
  border-color: var(--mama-orange);
  background: linear-gradient(148deg, #fff8f0, #fff0e0);
  box-shadow:
    var(--shadow-md),
    0 0 0 3px rgba(255,107,0,0.28),
    0 0 22px rgba(255,107,0,0.16);
  transform: translateY(-3px) scale(1.02);
}

.path-emoji {
  font-size: 2.5rem;
  line-height: 1;
  transition: transform var(--transition);
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.15));
}

.path-card:hover .path-emoji,
.path-card:has(input:checked) .path-emoji,
.path-card.selected .path-emoji {
  transform: scale(1.18) rotate(-6deg);
  animation: bounceSoft 1.1s ease-in-out infinite;
}

.path-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--brown-earth);
}

.path-desc {
  font-size: 0.72rem;
  font-weight: 400;
  color: #888;
  line-height: 1.35;
  letter-spacing: 0.1px;
}

/* -----------------------------------------------
   Selector Section + Header
   ----------------------------------------------- */
.selector-section {
  margin-bottom: 20px;
}

.selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;
}

.selector-label {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--brown-earth);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.limit-badge {
  background: var(--red-alert);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 7px rgba(231,76,60,0.38);
  animation: pulseSlow 2s ease infinite;
}

/* -----------------------------------------------
   Breed Grid & Breed Cards
   ----------------------------------------------- */
.breed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(76,175,80,0.32) rgba(0,0,0,0.06);
}

.breed-grid::-webkit-scrollbar {
  width: 4px;
}

.breed-grid::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.06);
  border-radius: 4px;
}

.breed-grid::-webkit-scrollbar-thumb {
  background: rgba(76,175,80,0.36);
  border-radius: 4px;
}

/* Individual breed card */
.breed-card {
  position: relative;
  cursor: pointer;
  border-radius: var(--radius-sm);
  border: 2px solid #e0d8c8;
  background: linear-gradient(148deg, #ffffff, #fafaf5);
  padding: 10px 6px 8px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  user-select: none;
  overflow: hidden;
}

.breed-card input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.breed-card:hover {
  transform: translateY(-3px);
  border-color: var(--green-primary);
  box-shadow: 0 4px 12px rgba(76,175,80,0.22);
}

.breed-card:has(input:checked),
.breed-card.selected {
  border-color: var(--green-primary);
  background: linear-gradient(148deg, #f0fdf0, #e8f5e9);
  box-shadow:
    0 0 0 3px rgba(76,175,80,0.32),
    0 4px 14px rgba(76,175,80,0.22);
}

.breed-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.breed-emoji {
  font-size: 1.6rem;
  line-height: 1;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.14));
  transition: transform var(--transition);
}

.breed-card:has(input:checked) .breed-emoji,
.breed-card.selected .breed-emoji {
  animation: bounceSoft 1.1s ease-in-out infinite;
}

.breed-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brown-earth);
  line-height: 1.2;
}

.breed-desc {
  font-size: 0.58rem;
  color: #aaa;
  line-height: 1.2;
}

/* Price badge on breed card */
.breed-price {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(255,184,0,0.18);
  border: 1px solid rgba(255,184,0,0.45);
  color: var(--brown-warm);
  font-size: 0.58rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 6px;
  line-height: 1;
}

/* -----------------------------------------------
   Random Buttons
   ----------------------------------------------- */
.btn-random-pick {
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--amber);
  background: rgba(255,184,0,0.10);
  border: 2px solid var(--amber);
  border-radius: 20px;
  padding: 5px 14px;
  cursor: pointer;
  transition: all 0.22s ease;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.2px;
}

.btn-random-pick:hover {
  background: var(--amber);
  color: white;
  transform: scale(1.10) rotate(-3deg);
  box-shadow: 0 3px 10px rgba(255,184,0,0.38);
}

.btn-random-pick:active {
  transform: scale(0.94);
}

/* Random All — big orange 3D button */
.random-all-wrap {
  display: flex;
  justify-content: center;
  margin: 10px 0 4px;
}

.btn-random-all {
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(145deg, #FF9800, #F57C00);
  border: none;
  border-radius: 30px;
  padding: 11px 30px;
  cursor: pointer;
  box-shadow:
    0 5px 0 #BF360C,
    0 7px 16px rgba(255,152,0,0.42);
  transition: all 0.2s ease;
  animation: pulseAmber 2.8s ease-in-out infinite;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}

.btn-random-all::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  transition: left 0.45s ease;
}

.btn-random-all:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow:
    0 8px 0 #BF360C,
    0 12px 24px rgba(255,152,0,0.52);
  animation: none;
}

.btn-random-all:hover::after {
  left: 100%;
}

.btn-random-all:active {
  transform: translateY(3px) scale(0.98);
  box-shadow:
    0 2px 0 #BF360C,
    0 2px 8px rgba(255,152,0,0.3);
}

/* -----------------------------------------------
   Shopping Cart Summary
   ----------------------------------------------- */
.cart-summary {
  background: linear-gradient(145deg, var(--cream), var(--cream-dark));
  border: 2px solid rgba(139,105,20,0.22);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-top: 4px;
  box-shadow: var(--shadow-sm);
}

.cart-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.cart-items li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--brown-earth);
}

.cart-items li .item-price {
  font-weight: 700;
  color: var(--brown-warm);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 800;
  color: var(--brown-earth);
  padding-top: 10px;
  border-top: 2px dashed rgba(139,105,20,0.25);
}

.cart-remaining {
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 6px;
  text-align: right;
  transition: color 0.4s ease;
}

.cart-remaining.positive { color: var(--green-dark); }
.cart-remaining.negative { color: var(--red-alert); }

/* -----------------------------------------------
   Mama Path Options
   ----------------------------------------------- */
.mama-options {
  background: linear-gradient(135deg, rgba(255,107,0,0.08), rgba(255,215,0,0.10));
  border: 2px solid rgba(255,107,0,0.28);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 8px;
}

.mama-info {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mama-info-emoji {
  font-size: 2.6rem;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.15));
  animation: mamaFloat 3s ease-in-out infinite;
}

.mama-info p {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brown-earth);
  line-height: 1.4;
}

.mama-quote {
  font-style: italic;
  font-size: 0.8rem;
  color: var(--mama-orange);
  font-weight: 600;
  background: rgba(255,107,0,0.08);
  border-left: 3px solid var(--mama-orange);
  padding: 8px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 6px;
  text-align: left;
}

/* -----------------------------------------------
   Divider & Footer
   ----------------------------------------------- */
.selector-divider {
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(139,105,20,0.22), transparent);
  margin: 4px 0 20px;
}

.start-btn-wrap {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.select-footer {
  text-align: center;
  font-size: 0.78rem;
  color: var(--brown-warm);
  opacity: 0.7;
  font-weight: 500;
  animation: fadeInUp 0.8s ease 0.3s both;
}

.branding {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green-dark);
  opacity: 1;
  margin-top: 4px;
  letter-spacing: 0.5px;
}

/* -----------------------------------------------
   Start Button  (big green 3D)
   ----------------------------------------------- */
.btn-start {
  font-family: var(--font-main);
  font-size: 1.22rem;
  font-weight: 800;
  color: white;
  background: linear-gradient(145deg, #5cc85f, #3da840);
  border: none;
  border-radius: 50px;
  padding: 16px 52px;
  cursor: pointer;
  letter-spacing: 0.5px;
  box-shadow:
    0 6px 0 #2d7a30,
    0 9px 22px rgba(76,175,80,0.42);
  transition: var(--transition);
  animation: pulse 2.6s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.btn-start::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
  transition: left 0.5s ease;
}

.btn-start:hover {
  transform: translateY(-4px) scale(1.07);
  box-shadow:
    0 10px 0 #2d7a30,
    0 16px 32px rgba(76,175,80,0.52);
  animation: none;
}

.btn-start:hover::after {
  left: 100%;
}

.btn-start:active {
  transform: translateY(4px) scale(0.97);
  box-shadow:
    0 2px 0 #2d7a30,
    0 3px 10px rgba(76,175,80,0.3);
}

/* ============================================================
   SCREEN 2: SIMULATION SCREEN
   ============================================================ */
#screen-sim {
  min-height: 100vh;
  padding: 0;
  display: block;
}

/* -----------------------------------------------
   Sim Header
   ----------------------------------------------- */
.sim-header {
  background: linear-gradient(138deg, rgba(255,255,255,0.97), rgba(255,248,220,0.94));
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  box-shadow: var(--shadow-sm);
  border: 2px solid rgba(76,175,80,0.2);
  animation: slideDown 0.5s ease both;
}

.sim-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.sim-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green-dark);
}

.case-badge {
  background: var(--brown-warm);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.6px;
  box-shadow: 0 2px 6px rgba(139,105,20,0.4);
}

/* Day counter badge */
.day-counter {
  background: linear-gradient(135deg, var(--sky-blue), var(--sky-dark));
  color: white;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(91,170,212,0.4);
}

/* -----------------------------------------------
   Budget Bar (money health bar)
   ----------------------------------------------- */
.budget-bar-wrap {
  margin-bottom: 0;
}

.budget-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brown-earth);
  margin-bottom: 6px;
}

.budget-bar-track {
  height: 16px;
  background: #e0e0e0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.14);
  position: relative;
}

.budget-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--green-primary), #8BC34A);
  border-radius: 20px;
  transition: width 1.1s ease, background 1s ease;
  position: relative;
}

.budget-bar-fill::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 6px;
  right: 6px;
  height: 5px;
  background: rgba(255,255,255,0.42);
  border-radius: 10px;
}

/* Budget states matching money level */
.budget-bar-fill.budget-medium {
  background: linear-gradient(90deg, #FF9800, #FFC107);
}

.budget-bar-fill.budget-low {
  background: linear-gradient(90deg, #f44336, var(--red-alert));
  animation: healthPulseRed 1.1s ease-in-out infinite;
}

/* Legacy health bar aliases */
.health-bar-wrap  { /* same as budget-bar-wrap  */ }
.health-bar-label { /* same as budget-bar-label */ }
.health-bar-track { /* same as budget-bar-track */ }

.health-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--green-primary), #8BC34A);
  border-radius: 20px;
  transition: width 1.1s ease, background 1s ease;
  position: relative;
}

.health-bar-fill::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 6px;
  right: 6px;
  height: 5px;
  background: rgba(255,255,255,0.42);
  border-radius: 10px;
}

.health-bar-fill.health-medium {
  background: linear-gradient(90deg, #FF9800, #FFC107);
}

.health-bar-fill.health-low {
  background: linear-gradient(90deg, #f44336, var(--red-alert));
  animation: healthPulseRed 1.1s ease-in-out infinite;
}

/* -----------------------------------------------
   Sim Layout (farm + log panel side by side)
   ----------------------------------------------- */
.sim-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

/* ============================================================
   FARM SCENE
   ============================================================ */
.farm-scene {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 3px solid rgba(109,191,103,0.52);
  flex: 1;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.6s ease 0.2s both;
}

/* Sky */
.farm-sky {
  background: linear-gradient(180deg, var(--sky-blue) 0%, #b8e8ff 100%);
  height: 66px;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}

.farm-sun {
  font-size: 2.1rem;
  animation: bounceSoft 4.2s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(255,215,0,0.65));
}

.farm-cloud {
  font-size: 1.55rem;
  opacity: 0.88;
  animation: sway 6.5s ease-in-out infinite;
}

.farm-cloud--2 {
  animation-delay: -3.2s;
  animation-duration: 8.5s;
}

/* Farm Ground */
.farm-ground {
  flex: 1;
  background: linear-gradient(180deg, #7bc67a 0%, #5da858 30%, #4a8f45 100%);
  display: flex;
  align-items: flex-end;
  padding: 12px 14px 16px;
  gap: 12px;
  position: relative;
  min-height: 200px;
}

/* Soil stripe at bottom */
.farm-ground::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 26px;
  background: linear-gradient(180deg, #5D4037, #4E342E);
  border-top: 2px solid #3e2723;
}

/* Environmental FX */
.env-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 10;
}

.rain-drop {
  position: absolute;
  top: -20px;
  font-size: 1rem;
  animation: rainDrop 1.25s linear infinite;
}

.stress-mark {
  position: absolute;
  font-size: 1.2rem;
  animation: floatUp 2.2s ease forwards;
}

/* -----------------------------------------------
   Character Area — Senator
   ----------------------------------------------- */
.character-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 5;
  margin-bottom: 26px;
}

.senator-char {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
}

.senator-emoji {
  font-size: 2.6rem;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.2));
  transition: filter 0.5s ease;
  animation: bounceSoft 3.6s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.senator-emoji svg {
  display: block;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.2));
  transition: filter 0.5s ease, transform 0.5s ease;
}

/* Senator states */
#senator-char.senator-stressed .senator-emoji,
.senator-char.senator-stressed .senator-emoji {
  animation: shake 0.55s ease infinite;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3)) sepia(35%);
}

#senator-char.senator-stressed .senator-emoji svg,
.senator-char.senator-stressed .senator-emoji svg {
  filter: sepia(35%);
}

#senator-char.senator-hopeless .senator-emoji,
.senator-char.senator-hopeless .senator-emoji {
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.42)) grayscale(82%) brightness(0.65);
  animation: none;
  transform: rotate(-12deg);
}

#senator-char.senator-hopeless .senator-emoji svg,
.senator-char.senator-hopeless .senator-emoji svg {
  filter: grayscale(82%) brightness(0.65);
}

.senator-name-tag {
  background: rgba(255,255,255,0.92);
  border: 1.5px solid var(--brown-warm);
  border-radius: 7px;
  padding: 2px 9px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--brown-earth);
  white-space: nowrap;
  margin-top: 3px;
  box-shadow: var(--shadow-sm);
}

.senator-bubble {
  position: absolute;
  top: -46px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 2px solid var(--amber);
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brown-earth);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.senator-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--amber);
}

.senator-bubble.visible {
  opacity: 1;
}

/* -----------------------------------------------
   Chicken Coop Area
   ----------------------------------------------- */
.coop-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
  margin-bottom: 26px;
}

.coop-structure {
  position: relative;
}

.coop-roof {
  width: 110px;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 30px solid #8B5E3C;
  margin: 0 auto;
  filter: drop-shadow(0 -2px 4px rgba(0,0,0,0.22));
}

.coop-body {
  width: 110px;
  background: linear-gradient(180deg, #A0522D, #7D3C1A);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  border: 3px solid #5C3317;
  border-top: none;
  padding: 10px 8px 8px;
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: flex-end;
  box-shadow: inset 0 -4px 9px rgba(0,0,0,0.22), var(--shadow-sm);
}

.coop-label {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255,255,255,0.86);
  margin-top: 5px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.55);
}

/* Individual chicken units */
.chicken-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: relative;
}

.chicken-emoji {
  font-size: 1.8rem;
  line-height: 1;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.25));
  animation: chickenBob 1.9s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.5s ease, transform 0.5s ease;
}

.chicken-emoji svg {
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
  transition: filter 0.5s ease, transform 0.5s ease;
}

.chicken-unit:nth-child(2) .chicken-emoji {
  animation-delay: -0.95s;
}

.chicken-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.52);
}

.chicken-status-dot--healthy  { background: var(--green-primary); }
.chicken-status-dot--stressed { background: var(--amber); animation: pulseSlow 0.8s ease infinite; }
.chicken-status-dot--dead     { background: #757575; }

.chicken-label {
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(255,255,255,0.82);
  text-shadow: 0 1px 2px rgba(0,0,0,0.55);
}

/* Chicken states */
#chicken-1.chicken-stressed .chicken-emoji,
#chicken-2.chicken-stressed .chicken-emoji,
.chicken-unit.chicken-stressed .chicken-emoji {
  animation: shake 0.5s ease-in-out infinite;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.28)) sepia(42%);
}

#chicken-1.chicken-stressed .chicken-emoji svg,
#chicken-2.chicken-stressed .chicken-emoji svg,
.chicken-unit.chicken-stressed .chicken-emoji svg {
  filter: sepia(42%);
}

#chicken-1.chicken-stressed .chicken-status-dot,
#chicken-2.chicken-stressed .chicken-status-dot,
.chicken-unit.chicken-stressed .chicken-status-dot {
  background: var(--amber);
  animation: pulseSlow 0.8s ease infinite;
}

#chicken-1.chicken-dead .chicken-emoji,
#chicken-2.chicken-dead .chicken-emoji,
.chicken-unit.chicken-dead .chicken-emoji {
  animation: chickenDeath 1.25s ease forwards;
  pointer-events: none;
}

#chicken-1.chicken-dead .chicken-emoji svg,
#chicken-2.chicken-dead .chicken-emoji svg,
.chicken-unit.chicken-dead .chicken-emoji svg {
  filter: grayscale(100%) brightness(0.45);
}

#chicken-1.chicken-dead .chicken-status-dot,
#chicken-2.chicken-dead .chicken-status-dot,
.chicken-unit.chicken-dead .chicken-status-dot {
  background: #757575;
  animation: none;
}

/* -----------------------------------------------
   Vegetable Plot Area
   ----------------------------------------------- */
.veggie-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
  margin-bottom: 26px;
}

.veggie-plot {
  position: relative;
}

.soil-strip {
  width: 110px;
  height: 18px;
  background: linear-gradient(180deg, #5D4037, #4E342E);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border: 2px solid #3e2723;
  position: relative;
}

.soil-strip::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 8px;
  right: 8px;
  height: 3px;
  background: rgba(255,255,255,0.10);
  border-radius: 4px;
}

.veggie-display {
  background: linear-gradient(180deg, var(--green-grass) 0%, #5aaa54 100%);
  border: 2px solid #4a8a45;
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 6px 8px 8px;
  display: flex;
  gap: 5px;
  justify-content: center;
  width: 110px;
  box-shadow: var(--shadow-sm);
}

.veggie-emoji {
  font-size: 1.5rem;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.18));
  animation: sway 2.6s ease-in-out infinite;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.8s ease, transform 0.8s ease, opacity 0.8s ease;
}

.veggie-emoji svg {
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
  transition: filter 0.8s ease, transform 0.8s ease, opacity 0.8s ease;
}

.veggie-emoji:nth-child(2) { animation-delay: -1.3s; }
.veggie-emoji:nth-child(3) { animation-delay: -0.85s; }

.veggie-label {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255,255,255,0.86);
  margin-top: 5px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.55);
}

/* Veggie states */
.veggie-plot.veggie-wilting .veggie-emoji,
.veggie-display.veggie-wilting .veggie-emoji {
  animation: wilt 3.2s ease forwards;
}

.veggie-plot.veggie-wilting .veggie-emoji svg,
.veggie-display.veggie-wilting .veggie-emoji svg {
  animation: wilt 3.2s ease forwards;
}

.veggie-plot.veggie-wilted .veggie-emoji,
.veggie-display.veggie-wilted .veggie-emoji,
.veggie-plot.veggie-dead .veggie-emoji,
.veggie-display.veggie-dead .veggie-emoji {
  filter: sepia(100%) saturate(15%) brightness(0.48) !important;
  transform: scaleY(0.48) rotate(-22deg) !important;
  opacity: 0.36 !important;
  animation: none !important;
}

.veggie-plot.veggie-wilted .veggie-emoji svg,
.veggie-display.veggie-wilted .veggie-emoji svg,
.veggie-plot.veggie-dead .veggie-emoji svg,
.veggie-display.veggie-dead .veggie-emoji svg {
  filter: sepia(100%) saturate(15%) brightness(0.48) !important;
  opacity: 0.36 !important;
  animation: none !important;
}

/* -----------------------------------------------
   Mama Scene (Mama path visual)
   ----------------------------------------------- */
.mama-assets {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 5;
  margin-bottom: 26px;
}

.mama-stack {
  display: flex;
  flex-direction: row;
  gap: 6px;
  align-items: flex-end;
}

.mama-emoji-big {
  font-size: 3rem;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.18));
  animation: mamaFloat 2.8s ease-in-out infinite;
}

.mama-emoji-big:nth-child(2) { animation-delay: -1.4s; font-size: 2.4rem; }
.mama-emoji-big:nth-child(3) { animation-delay: -0.7s; font-size: 2.8rem; }

.mama-stack-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255,255,255,0.88);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  text-align: center;
  margin-top: 2px;
}

/* ============================================================
   VERBOSE LOG PANEL
   ============================================================ */
.log-panel {
  background: var(--terminal-bg);
  border-radius: var(--radius-lg);
  border: 2px solid #2a2a4a;
  box-shadow:
    var(--shadow-lg),
    inset 0 0 60px rgba(0,255,65,0.03),
    0 0 0 1px rgba(0,255,65,0.10);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 240px;
  max-height: 360px;
  animation: fadeInUp 0.6s ease 0.3s both;
  position: relative;
}

/* CRT scanline overlay — DISABLED to prevent text overlap */
/* .log-panel::before removed — was causing text to be unreadable */

.log-header {
  background: linear-gradient(90deg, #0c0c18, #1a1a2e, #0c0c18);
  color: var(--terminal-green);
  font-family: 'Courier New', 'Courier', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 10px 14px;
  letter-spacing: 1.2px;
  border-bottom: 1px solid rgba(0,255,65,0.22);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  text-shadow: 0 0 9px rgba(0,255,65,0.65);
  position: relative;
  z-index: 2;
}

/* Blinking dots in header */
.log-blink {
  color: var(--terminal-green);
  animation: pulseSlow 1s ease-in-out infinite;
  font-size: 0.6rem;
}

.log-body {
  flex: 1;
  overflow-y: auto;
  max-height: 500px;
  padding: 12px 14px;
  position: relative;
  z-index: 2;
  scroll-behavior: smooth;
}

/* Custom scrollbar */
.log-body::-webkit-scrollbar {
  width: 4px;
}

.log-body::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.3);
}

.log-body::-webkit-scrollbar-thumb {
  background: rgba(0,255,65,0.32);
  border-radius: 4px;
}

/* Log init messages (boot text) */
.log-init {
  font-family: 'Courier New', 'Courier', monospace;
  font-size: 0.76rem;
  line-height: 1.6;
  color: rgba(160,160,192,0.55);
  font-style: italic;
}

/* Individual log entries */
.log-entry {
  font-family: 'Kanit', sans-serif;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--terminal-green);
  padding: 6px 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(0,255,65,0.08);
  border-radius: 4px;
  background: rgba(0,255,65,0.03);
  display: block;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* New entry animation */
.log-entry-new {
  animation: fadeIn 0.3s ease both;
}

.log-entry .log-time {
  color: rgba(0,255,65,0.48);
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.68rem;
}

.log-entry .log-msg {
  color: #b8b8d8;
  flex: 1;
}

/* Color-coded entry types */
.log-entry.log-warn .log-msg  { color: var(--amber); }
.log-entry.log-error .log-msg { color: #ff7070; font-weight: 700; }
.log-entry.log-fatal .log-msg {
  color: var(--red-alert);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(231,76,60,0.55);
}
.log-entry.log-ok .log-msg    { color: var(--terminal-green); }

.log-footer {
  background: rgba(0,0,0,0.42);
  border-top: 1px solid rgba(0,255,65,0.12);
  padding: 6px 14px;
  font-family: 'Courier New', monospace;
  font-size: 0.68rem;
  color: rgba(0,255,65,0.52);
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 2;
}

.log-cursor {
  animation: blinkCursor 1s step-end infinite;
  color: var(--terminal-green);
}

/* Skip button */
.btn-skip {
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251,191,36,0.15);
  border: 2px solid rgba(251,191,36,0.4);
  border-radius: 12px;
  padding: 10px 28px;
  cursor: pointer;
  margin: 10px auto;
  display: block;
  transition: all 0.2s;
}

.btn-skip:hover {
  background: rgba(251,191,36,0.3);
  transform: scale(1.05);
}

/* ============================================================
   RESULT SCREEN (separate page, not overlay)
   ============================================================ */
#screen-result {
  min-height: 100vh;
  padding: 20px 16px 40px;
  display: flex;
  justify-content: center;
  animation: fadeInUp 0.5s ease both;
}

.result-container {
  max-width: 540px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-x: hidden;
}

.result-card {
  background: linear-gradient(162deg, #ffffff, #fefaf0);
  border-radius: var(--radius-xl);
  border: 3px solid var(--red-alert);
  box-shadow:
    0 0 0 6px rgba(231,76,60,0.14),
    var(--shadow-lg),
    inset 0 1px 0 rgba(255,255,255,0.92);
  padding: 28px 20px 24px;
  width: 100%;
  animation: popIn 0.52s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  position: relative;
  overflow: hidden;
  word-wrap: break-word;
}

/* IG Image Preview Section */
.ig-previews-section {
  background: linear-gradient(145deg, #ffffffee, #FFF8DCee);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-md);
  border: 2px solid rgba(76,175,80,0.2);
}

.ig-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brown-earth);
  margin-bottom: 4px;
  text-align: center;
}

.ig-section-desc {
  font-size: 0.75rem;
  color: #888;
  text-align: center;
  margin-bottom: 16px;
}

.ig-previews {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ig-preview-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ig-preview-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green-dark);
}

.ig-preview-img {
  width: 100%;
  max-width: 400px;
  border-radius: 12px;
  border: 2px solid #ddd;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.btn-save-single {
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(145deg, #E1306C, #833AB4);
  border: none;
  border-radius: 10px;
  padding: 8px 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-save-single:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(193,53,132,0.4);
}

.btn-save-single:active {
  transform: translateY(1px);
}

/* -----------------------------------------------
   Result Header
   ----------------------------------------------- */
.result-header {
  text-align: center;
  margin-bottom: 20px;
  position: relative;
}

/* Big FAIL stamp */
.result-fail-stamp {
  display: inline-block;
  font-family: 'Courier New', monospace;
  font-size: 3rem;
  font-weight: 900;
  color: var(--red-alert);
  border: 5px solid var(--red-alert);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  line-height: 1.2;
  letter-spacing: 7px;
  text-shadow:
    0 0 22px rgba(231,76,60,0.52),
    2px 2px 0 rgba(231,76,60,0.32);
  box-shadow:
    0 0 24px rgba(231,76,60,0.32),
    inset 0 0 12px rgba(231,76,60,0.12);
  transform: rotate(-4deg);
  animation: stampIn 0.62s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  opacity: 0.92;
}

.result-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--brown-earth);
  margin-top: 12px;
}

.result-tagline {
  font-size: 0.82rem;
  color: #888;
  margin-top: 4px;
  font-weight: 400;
}

/* -----------------------------------------------
   Death Cards
   ----------------------------------------------- */
.result-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.death-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(138deg, #fff5f5, #fff0f0);
  border: 1.5px solid rgba(231,76,60,0.22);
  border-left: 4px solid var(--red-alert);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  box-shadow: var(--shadow-sm);
  animation: fadeInUp 0.4s ease both;
}

.death-card:nth-child(2) { animation-delay: 0.08s; }
.death-card:nth-child(3) { animation-delay: 0.16s; }

/* Veggie death card — green tinted */
.death-card--veggie {
  background: linear-gradient(138deg, #f5fff5, #f0fff0);
  border-color: rgba(76,175,80,0.22);
  border-left-color: var(--green-primary);
}

.death-icon {
  font-size: 1.65rem;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.2));
}

.death-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.death-info strong {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brown-earth);
}

.death-cause {
  font-size: 0.8rem;
  color: #666;
  font-weight: 400;
  line-height: 1.4;
}

/* Mama result card — orange themed */
.mama-result-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(138deg, #fff8f0, #fff4e0);
  border: 1.5px solid rgba(255,107,0,0.22);
  border-left: 4px solid var(--mama-orange);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  box-shadow: var(--shadow-sm);
  animation: fadeInUp 0.4s ease both;
}

/* -----------------------------------------------
   Stats Grid
   ----------------------------------------------- */
.result-stats {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #f5f5f5;
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #555;
  border: 1px solid #e4e4e4;
  flex: 1;
  min-width: 120px;
}

.stat-icon {
  font-size: 1rem;
}

/* -----------------------------------------------
   Result Conclusion (blockquote)
   ----------------------------------------------- */
.result-conclusion {
  background: linear-gradient(138deg, #fffde7, #fff9c4);
  border-left: 4px solid var(--amber);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 14px 18px 14px 28px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brown-earth);
  font-style: italic;
  word-wrap: break-word;
  overflow-wrap: break-word;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  line-height: 1.55;
  position: relative;
}

.result-conclusion::before {
  content: '\201C';
  position: absolute;
  top: -4px;
  left: 12px;
  font-size: 3rem;
  color: rgba(255,184,0,0.3);
  font-family: Georgia, serif;
  line-height: 1;
}

/* -----------------------------------------------
   Compare Banner — satirical highlight
   ----------------------------------------------- */
.compare-banner {
  background: linear-gradient(135deg, var(--mama-yellow), var(--amber));
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 14px;
  box-shadow: 0 4px 0 #b8860b, 0 6px 18px rgba(255,184,0,0.38);
  position: relative;
  overflow: hidden;
}

.compare-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
  animation: shine 3s ease-in-out infinite;
}

.compare-banner p {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--brown-earth);
  text-align: center;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

/* -----------------------------------------------
   Hashtag Strip
   ----------------------------------------------- */
.hashtag-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.hashtag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  cursor: default;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  display: inline-block;
}

.hashtag:hover {
  transform: translateY(-2px) scale(1.06);
}

/* Color variants */
.hashtag,
.hashtag--green {
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  color: var(--green-dark);
  border: 1.5px solid rgba(56,142,60,0.25);
  box-shadow: 0 1px 4px rgba(56,142,60,0.15);
}

.hashtag--amber {
  background: linear-gradient(135deg, #fff8e1, #ffe082);
  color: #6d4c00;
  border: 1.5px solid rgba(255,184,0,0.32);
  box-shadow: 0 1px 4px rgba(255,184,0,0.18);
}

.hashtag--red {
  background: linear-gradient(135deg, #ffebee, #ffcdd2);
  color: var(--red-dark);
  border: 1.5px solid rgba(231,76,60,0.25);
  box-shadow: 0 1px 4px rgba(231,76,60,0.15);
}

/* -----------------------------------------------
   Result Action Buttons
   ----------------------------------------------- */
.result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Share button — blue gradient */
.btn-share {
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(138deg, #2196F3, #1565C0);
  border: none;
  border-radius: 50px;
  padding: 12px 22px;
  cursor: pointer;
  flex: 1;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow:
    0 4px 0 #0d47a1,
    0 6px 16px rgba(21,101,192,0.42);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-share:hover {
  transform: translateY(-3px);
  box-shadow:
    0 7px 0 #0d47a1,
    0 12px 26px rgba(21,101,192,0.52);
}

.btn-share:active {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 #0d47a1,
    0 2px 8px rgba(21,101,192,0.3);
}

/* Share count badge */
#share-count,
.share-badge {
  background: rgba(255,255,255,0.25);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.32);
}

/* Instagram save button */
.btn-save-ig {
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(145deg, var(--ig-pink), #C13584, var(--ig-purple));
  border: none;
  border-radius: 14px;
  padding: 12px 22px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow:
    0 4px 0 #6a1b8a,
    0 6px 16px rgba(193,53,132,0.42);
  flex: 1;
  min-width: 120px;
}

.btn-save-ig:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow:
    0 7px 0 #6a1b8a,
    0 12px 24px rgba(193,53,132,0.52);
}

.btn-save-ig:active {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 #6a1b8a,
    0 2px 8px rgba(193,53,132,0.3);
}

/* Replay button — green outline */
.btn-replay {
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-dark);
  background: transparent;
  border: 2.5px solid var(--green-primary);
  border-radius: 50px;
  padding: 10px 22px;
  cursor: pointer;
  flex: 1;
  min-width: 120px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-replay:hover {
  background: var(--green-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(76,175,80,0.42);
}

.btn-replay:active {
  transform: translateY(2px);
  box-shadow: none;
}

/* ============================================================
   OPTION CARDS  (legacy — chicken/veggie selector in 2-col)
   ============================================================ */
.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.option-card {
  position: relative;
  cursor: pointer;
  border-radius: var(--radius-md);
  border: 2.5px solid #e0d8c8;
  background: linear-gradient(148deg, #ffffff, #fafaf5);
  padding: 16px 12px 14px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
  user-select: none;
  overflow: hidden;
}

.option-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 30%, rgba(76,175,80,0.08), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.option-card:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: var(--green-primary);
  box-shadow: var(--shadow-md), 0 0 0 3px rgba(76,175,80,0.22);
}

.option-card:hover::before { opacity: 1; }

.option-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.option-card:has(input:checked),
.option-card.selected {
  border-color: var(--green-primary);
  background: linear-gradient(148deg, #f0fdf0, #e8f5e9);
  box-shadow:
    var(--shadow-md),
    0 0 0 3.5px rgba(76,175,80,0.32),
    0 0 22px rgba(76,175,80,0.15);
  transform: translateY(-2px);
}

.option-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.option-emoji {
  font-size: 2.4rem;
  line-height: 1;
  transition: transform var(--transition);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.option-card:hover .option-emoji,
.option-card:has(input:checked) .option-emoji,
.option-card.selected .option-emoji {
  transform: scale(1.15) rotate(-5deg);
  animation: bounceSoft 1.1s ease-in-out infinite;
}

.option-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brown-earth);
  margin-top: 4px;
}

.option-desc {
  font-size: 0.72rem;
  font-weight: 400;
  color: #888;
  letter-spacing: 0.2px;
}

.option-check {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 22px;
  height: 22px;
  background: var(--green-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0;
  transform: scale(0);
  transition: var(--transition);
  box-shadow: 0 2px 7px rgba(76,175,80,0.52);
}

.option-card:has(input:checked) .option-check,
.option-card.selected .option-check {
  opacity: 1;
  transform: scale(1);
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast {
  position: fixed;
  bottom: 42px;
  left: 50%;
  transform: translateX(-50%) translateY(22px);
  background: rgba(30, 30, 50, 0.94);
  color: white;
  padding: 12px 26px;
  border-radius: 14px;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10000;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 8px 28px rgba(0,0,0,0.38);
  backdrop-filter: blur(6px);
}

.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.hidden  { display: none !important; }
.visible { opacity: 1 !important; }

.state-stressed { animation: shake 0.6s ease-in-out infinite !important; }
.state-wilting  { animation: wilt 3.2s ease forwards !important; }
.state-dead     {
  animation: chickenDeath 1.25s ease forwards !important;
  filter: grayscale(100%) !important;
}

/* Floating text popup (event feedback) */
.float-text {
  position: absolute;
  font-size: 0.85rem;
  font-weight: 700;
  pointer-events: none;
  animation: floatUp 2.5s ease forwards;
  z-index: 20;
  text-shadow: 0 1px 3px rgba(0,0,0,0.32);
  white-space: nowrap;
}

/* Select container full screen flex centering */
#screen-select {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
}

/* Divider */
.selector-divider {
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(139,105,20,0.22), transparent);
  margin: 4px 0 20px;
}

/* Select footer */
.start-btn-wrap {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

.select-footer {
  text-align: center;
  font-size: 0.78rem;
  color: var(--brown-warm);
  opacity: 0.7;
  font-weight: 500;
  animation: fadeInUp 0.8s ease 0.3s both;
}

/* Game title block */
.game-title-block {
  text-align: center;
  animation: fadeInUp 0.6s ease both;
}

/* Health bar (full aliased set for JS interop) */
.health-bar-wrap {
  margin-bottom: 0;
}

.health-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brown-earth);
  margin-bottom: 6px;
}

.health-bar-track {
  height: 16px;
  background: #e0e0e0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.14);
  position: relative;
}

/* Sim header details */
.sim-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.sim-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green-dark);
}

/* farm-scene additions */
.farm-ground {
  flex-wrap: wrap;
}

/* Additional game-title-block tweaks */
.game-title-block {
  animation: fadeInUp 0.6s ease both;
}

/* ============================================================
   RESPONSIVE — TABLET & DESKTOP
   ============================================================ */

/* 600px: sim layout side-by-side, breed grid 4 cols */
@media (min-width: 600px) {
  .sim-layout {
    flex-direction: row;
    align-items: stretch;
  }

  .farm-scene {
    flex: 1.2;
    min-height: 360px;
  }

  .log-panel {
    flex: 1;
    max-height: none;
    min-height: 360px;
  }

  .farm-ground {
    align-content: flex-end;
    justify-content: space-around;
  }

  .character-area,
  .coop-area,
  .veggie-area {
    margin-bottom: 28px;
  }

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

/* 768px: bigger padding, cards */
@media (min-width: 768px) {
  .sim-container {
    padding: 20px;
  }

  .selection-card {
    padding: 36px 30px 32px;
  }

  .option-grid {
    gap: 16px;
  }

  .option-card {
    padding: 20px 16px 18px;
  }

  .option-emoji {
    font-size: 2.8rem;
  }

  .result-card {
    padding: 36px 32px 28px;
  }

  .log-header {
    font-size: 0.76rem;
  }

  .log-entry {
    font-size: 0.82rem;
  }
}

/* 900px: max container, optimal farm spacing */
@media (min-width: 900px) {
  .sim-container {
    padding: 24px 16px;
  }

  .farm-ground {
    justify-content: space-evenly;
    padding: 16px 20px 22px;
  }
}

/* ============================================================
   PREFERS-REDUCED-MOTION  (accessibility)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   NEW SCREEN 1 ELEMENTS — สว. ชานม ฟาร์ม สตอรี่ v2
   ============================================================ */

/* Section title (path chooser heading) */
.section-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--brown-earth);
  text-align: center;
  margin-bottom: 14px;
  line-height: 1.4;
}

/* Farm options wrapper (collapsible) */
.farm-options {
  animation: fadeIn 0.35s ease both;
}

.farm-options[hidden] {
  display: none !important;
}

/* Mama options wrapper (collapsible) */
.mama-options[hidden] {
  display: none !important;
}

/* Mama big floating emoji */
.mama-big-emoji {
  font-size: 3rem;
  line-height: 1;
  display: block;
  filter: drop-shadow(0 3px 7px rgba(0,0,0,0.18));
  animation: mamaFloat 2.8s ease-in-out infinite;
}

/* Action buttons row (Start + Random All) */
.action-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

@media (min-width: 480px) {
  .action-buttons {
    flex-direction: row;
    justify-content: center;
  }
}

/* Cart item as div (not li) */
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--brown-earth);
  padding: 3px 0;
}

/* Cart summary header */
.cart-summary h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brown-earth);
  margin-bottom: 10px;
}

/* Cart remaining text */
.cart-remaining {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  font-weight: 700;
  margin-top: 4px;
  color: var(--green-dark);
}

/* Mama info heading */
.mama-info h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--mama-orange);
  margin-bottom: 4px;
}

/* Day counter spacing fix (ensure gap below budget bar) */
.day-counter {
  margin-top: 8px;
}

/* Hashtag pill (used in result screen via JS) */
.hashtag-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  cursor: default;
  display: inline-block;
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  color: var(--green-dark);
  border: 1.5px solid rgba(56,142,60,0.25);
  box-shadow: 0 1px 4px rgba(56,142,60,0.15);
  transition: transform 0.22s ease;
}

.hashtag-pill:nth-child(3n+1) {
  background: linear-gradient(135deg, #fff8e1, #ffe082);
  color: #6d4c00;
  border-color: rgba(255,184,0,0.32);
  box-shadow: 0 1px 4px rgba(255,184,0,0.18);
}

.hashtag-pill:nth-child(3n+2) {
  background: linear-gradient(135deg, #ffebee, #ffcdd2);
  color: var(--red-dark);
  border-color: rgba(231,76,60,0.25);
  box-shadow: 0 1px 4px rgba(231,76,60,0.15);
}

.hashtag-pill:hover {
  transform: translateY(-2px) scale(1.06);
}

/* Mama assets in sim scene */
.mama-assets[hidden] {
  display: none !important;
}

.mama-assets {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: fadeIn 0.4s ease both;
}

.mama-stack {
  display: flex;
  gap: 4px;
  align-items: flex-end;
}

.mama-emoji-big {
  font-size: 2.4rem;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.18));
  animation: mamaFloat 2.8s ease-in-out infinite;
}

.mama-emoji-big:nth-child(2) { animation-delay: 0.35s; }
.mama-emoji-big:nth-child(3) { animation-delay: 0.7s; }

.mama-stack-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--mama-orange);
  text-align: center;
}

/* Farm assets visibility */
.farm-assets[hidden] {
  display: none !important;
}

/* Coop area layout */
.coop-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.coop-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brown-warm);
  text-align: center;
}

.coop-chickens {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

/* Chicken unit */
.chicken-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
  transition: all 0.4s ease;
}

.chicken-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--brown-earth);
}

/* Veggie area */
.veggie-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.veggie-plot {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  transition: all 0.5s ease;
}

.veggie-emoji {
  font-size: 2rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
  transition: all 0.5s ease;
}

.veggie-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--green-dark);
  text-align: center;
}

/* Path-inner flex layout */
.path-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  pointer-events: none;
}

/* Result detail hidden state */
.result-details[hidden] {
  display: none !important;
}

/* Mama result card */
.mama-result-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: linear-gradient(145deg, rgba(255,107,0,0.08), rgba(255,215,0,0.08));
  border: 1.5px solid rgba(255,107,0,0.28);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.mama-result-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.15));
}

.mama-result-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mama-result-info strong {
  font-size: 0.92rem;
  color: var(--mama-orange);
}

/* Senator bubble (speech bubble) */
.senator-bubble {
  position: absolute;
  top: -38px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 2px solid var(--green-primary);
  border-radius: 12px;
  padding: 5px 10px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--brown-earth);
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0,0,0,0.14);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 5;
}

.senator-bubble:not(:empty) {
  opacity: 1;
}

/* Senator name tag */
.senator-name-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  background: var(--green-dark);
  padding: 2px 10px;
  border-radius: 12px;
  text-align: center;
  margin-top: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.22);
}

/* Character area */
.character-area {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
}

.senator-char {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transition: transform 0.4s ease;
}

/* Senator stress/hopeless visual states */
.senator-char.senator-stressed {
  animation: shake 1.2s ease-in-out infinite;
}

.senator-char.senator-hopeless {
  filter: grayscale(60%) brightness(0.8);
  transform: translateY(4px);
}

/* Chicken visual states */
.chicken-unit.chicken-stressed {
  animation: shake 0.8s ease-in-out infinite;
  filter: saturate(180%);
}

.chicken-unit.chicken-dead {
  animation: chickenDeath 1.3s ease forwards;
  pointer-events: none;
}

/* Veggie plot states */
.veggie-plot.veggie-wilting .veggie-emoji {
  animation: wilt 3s ease forwards;
}

.veggie-plot.veggie-wilted .veggie-emoji {
  filter: sepia(100%) saturate(15%) brightness(0.5);
  transform: scaleY(0.55) rotate(-18deg);
  opacity: 0.4;
}

/* (duplicate log styles removed — defined in LOG PANEL section above) */

/* Sim layout */
.sim-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

/* Farm scene */
.farm-scene {
  background: linear-gradient(180deg, var(--sky-blue) 0%, #b8e0f7 35%, #c8e8c0 60%, #8DBF68 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 260px;
  display: flex;
  flex-direction: column;
}

.farm-sky {
  padding: 10px 16px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 50px;
  position: relative;
}

.farm-sun {
  font-size: 2rem;
  filter: drop-shadow(0 0 10px rgba(255,220,0,0.7));
  animation: bounceSoft 4s ease-in-out infinite;
}

.farm-cloud {
  font-size: 1.5rem;
  animation: sway 5s ease-in-out infinite;
  opacity: 0.85;
}

.farm-ground {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 8px 12px 16px;
  gap: 14px;
  flex-wrap: wrap;
}

