/* ==========================================
   🔐 인증 화면
   ========================================== */
#auth-screen { transition: opacity 0.4s ease; }

/* 입력 필드 포커스 */
input:focus { outline: none; }

/* 농장 설정 모달 */
#farm-settings-modal > div { animation: slide-up 0.3s ease; }

/* ==========================================
   기본
   ========================================== */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: 'Segoe UI', -apple-system, sans-serif; }

/* ==========================================
   🎬 농부 씬
   ========================================== */
#farmer-scene {
  position: relative;
  width: 100%;
  max-width: 512px;
  margin: 0 auto;
  height: 200px;
  overflow: visible;  /* 농부 머리가 씬 위로 약간 나와도 OK */
  background: transparent;
}
.scene-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 0; }
.scene-sky {
  position: absolute; top: 0; left: 0; right: 0; height: 62%;
  background: linear-gradient(180deg, #5ba8d4 0%, #87ceeb 60%, #aedff7 100%);
}
.scene-ground {
  position: absolute; bottom: 0; left: 0; right: 0; height: 42%;
  background: linear-gradient(180deg, #5db347 0%, #4a9e3f 50%, #3d8a34 100%);
}
.cloud {
  position: absolute; font-size: 1.3rem; opacity: 0.85;
  animation: cloud-drift linear infinite;
}
.cloud-1 { top: 10%; animation-duration: 18s; animation-delay: 0s;   left: -5%; }
.cloud-2 { top: 20%; animation-duration: 26s; animation-delay: -9s;  left: -5%; font-size: 1rem; opacity: 0.6; }
.cloud-3 { top: 6%;  animation-duration: 32s; animation-delay: -16s; left: -5%; }
@keyframes cloud-drift {
  from { transform: translateX(-80px); }
  to   { transform: translateX(calc(100vw + 80px)); }
}
.scene-sun {
  position: absolute; font-size: 1.6rem; top: 8px; right: 14px;
  animation: sun-bob 4s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(255,220,0,0.6));
  transition: opacity 0.5s;
}
@keyframes sun-bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-4px)} }
.bg-crops {
  position: absolute; bottom: 28px; left: 0; right: 0;
  display: flex; justify-content: space-around; padding: 0 6px;
  font-size: 1.5rem; pointer-events: none;
}

/* ==========================================
   🧑‍🌾 농부 캐릭터 - 완전히 새로운 구조
   ========================================== */
.farmer-char {
  position: absolute;
  bottom: 22px;      /* 땅 위에 서도록 */
  left: 10%;
  width: 60px;       /* 표시 너비 */
  z-index: 10;
  transform-origin: bottom center;
  transition: left 0.07s linear;
  /* 캐릭터 영역 위로 말풍선 공간 확보 */
}

/* 실제 이미지 - farmer2_sprite.png (372x634) */
#farmer-img {
  display: block;
  width: 60px;       /* CSS 표시 너비 */
  height: auto;      /* 비율 유지 → 자동으로 102px (60 * 634/372) */
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transform-origin: bottom center;
}

/* 말풍선: 캐릭터 바로 위에 표시, 화면 아래서도 잘 보임 */
.farmer-bubble {
  position: absolute;
  bottom: 100%;       /* 캐릭터 이미지 바로 위 */
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 4px;
  background: white;
  border: 2px solid #34d399;
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  z-index: 20;
  animation: bubble-pop 0.3s cubic-bezier(0.175,0.885,0.32,1.275);
  pointer-events: none;
}
/* 말풍선 꼬리 */
.farmer-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #34d399;
}
@keyframes bubble-pop {
  from { transform: translateX(-50%) scale(0.5); opacity:0; }
  to   { transform: translateX(-50%) scale(1);   opacity:1; }
}

/* ── 애니메이션 상태 ── */
.farmer-char.idle    { animation: farmer-idle 2.5s ease-in-out infinite; }
.farmer-char.walking { animation: farmer-walk-bob 0.38s ease-in-out infinite; }
.farmer-char.planting{ animation: farmer-plant 0.45s ease-in-out infinite alternate; }
.farmer-char.happy   { animation: farmer-happy 0.4s ease-in-out 3; }
.farmer-char.working { animation: farmer-work 0.6s ease-in-out infinite alternate; }

@keyframes farmer-idle    { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-3px)} }
@keyframes farmer-walk-bob{ 0%,100%{transform:translateY(0)} 50%{transform:translateY(-5px)} }
@keyframes farmer-plant   { from{transform:rotate(-12deg) translateY(2px)} to{transform:rotate(12deg) translateY(4px)} }
@keyframes farmer-happy   { 0%,100%{transform:translateY(0)} 30%{transform:translateY(-12px) rotate(-4deg)} 70%{transform:translateY(-12px) rotate(4deg)} }
@keyframes farmer-work    { from{transform:rotate(-8deg) translateY(0)} to{transform:rotate(8deg) translateY(4px)} }

/* 방향 전환 */
.farmer-char.face-left  #farmer-img { transform: scaleX(-1); }
.farmer-char.face-right #farmer-img { transform: scaleX(1); }

/* ── 시간대 배경 ── */
#farmer-scene.dawn-mode  .scene-sky { background: linear-gradient(180deg,#ff6b35,#ffa55a 40%,#ffd1a0); }
#farmer-scene.dusk-mode  .scene-sky { background: linear-gradient(180deg,#c25b00,#e8820a 40%,#ffb347); }
#farmer-scene.night-mode .scene-sky { background: linear-gradient(180deg,#0f1b33,#1a2f55 60%,#2d4870); }
#farmer-scene.night-mode .scene-ground { background: linear-gradient(180deg,#2d5a1e,#234a17 40%,#1a3811); }
#farmer-scene.night-mode .scene-sun  { opacity: 0; }

/* ── 타임바 (씬 내 하단) ── */
.scene-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 3px 10px 5px;
  background: linear-gradient(0deg,rgba(0,0,0,0.35),transparent);
  z-index: 6;
}
.time-bar-label { display:flex; justify-content:space-between; font-size:0.58rem; color:rgba(255,255,255,0.92); font-weight:600; margin-bottom:3px; text-shadow:0 1px 2px rgba(0,0,0,0.5); }
.time-bar-track { height:5px; background:rgba(255,255,255,0.25); border-radius:3px; overflow:hidden; }
.time-bar-fill  { height:100%; background:linear-gradient(90deg,#fbbf24,#f59e0b); border-radius:3px; transition:width 1s linear; }
.time-period-icons { display:flex; justify-content:space-between; margin-top:2px; }
.period-icon { font-size:0.7rem; opacity:0.4; transition:opacity 0.5s,transform 0.3s; }
.period-icon.active { opacity:1; transform:scale(1.3); }

/* ==========================================
   탭
   ========================================== */
.tab-btn { color:#6b7280; border-bottom:2px solid transparent; }
.tab-btn:hover { color:#059669; }
.active-tab { color:#059669; border-bottom:2px solid #059669; font-weight:600; }

/* ==========================================
   농장 그리드
   ========================================== */
.farm-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; max-width:300px; margin:0 auto; }
.farm-cell {
  aspect-ratio:1; border-radius:12px; border:2px solid #a7f3d0;
  background:linear-gradient(135deg,#ecfdf5,#d1fae5); cursor:pointer;
  transition:all 0.2s; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:2px;
  min-height:76px; position:relative; overflow:hidden;
}
.farm-cell:hover { transform:scale(1.04); border-color:#34d399; box-shadow:0 4px 12px rgba(52,211,153,0.3); }
.farm-cell.empty   { background:linear-gradient(135deg,#fefce8,#fef3c7); border-color:#fde68a; }
.farm-cell.planted { background:linear-gradient(135deg,#ecfdf5,#bbf7d0); border-color:#6ee7b7; }
.farm-cell.growing { background:linear-gradient(135deg,#d1fae5,#6ee7b7); border-color:#34d399; }
.farm-cell.ready   { background:linear-gradient(135deg,#fef3c7,#fde68a); border-color:#f59e0b; animation:pulse-ready 1.5s infinite; }
.farm-cell.boosted { border-color:#a78bfa !important; }
@keyframes pulse-ready { 0%,100%{box-shadow:0 0 0 0 rgba(245,158,11,0.4)} 50%{box-shadow:0 0 0 6px rgba(245,158,11,0)} }
.cell-emoji { font-size:1.7rem; line-height:1; }
.cell-name  { font-size:0.48rem; color:#6b7280; font-weight:500; text-align:center; }
.cell-stage { font-size:0.52rem; color:#059669; font-weight:600; }
.cell-days  { position:absolute; top:2px; right:3px; font-size:0.48rem; color:#6b7280; background:rgba(255,255,255,0.8); padding:1px 3px; border-radius:4px; }
.stage-0 .cell-emoji{font-size:1.1rem;opacity:0.7}
.stage-1 .cell-emoji{font-size:1.4rem}
.stage-2 .cell-emoji{font-size:1.7rem}
.stage-3 .cell-emoji{font-size:2rem;filter:drop-shadow(0 2px 4px rgba(0,0,0,0.15))}

/* ==========================================
   인벤토리
   ========================================== */
.inv-card {
  background:white; border:1.5px solid #e5e7eb; border-radius:12px;
  padding:10px 6px; text-align:center; cursor:pointer; transition:all 0.2s; position:relative;
}
.inv-card:hover { border-color:#6ee7b7; background:#f0fdf4; transform:translateY(-2px); box-shadow:0 4px 12px rgba(0,0,0,0.08); }
.inv-card.rarity-common    { border-color:#e5e7eb; }
.inv-card.rarity-rare      { border-color:#93c5fd; background:linear-gradient(135deg,#fff,#eff6ff); }
.inv-card.rarity-epic      { border-color:#c4b5fd; background:linear-gradient(135deg,#fff,#f5f3ff); }
.inv-card.rarity-legendary { border-color:#fbbf24; background:linear-gradient(135deg,#fffbeb,#fef3c7); box-shadow:0 0 8px rgba(251,191,36,0.3); }
.inv-emoji  { font-size:1.7rem; margin-bottom:3px; }
.inv-name   { font-size:0.6rem; color:#374151; font-weight:600; line-height:1.2; }
.inv-count  { position:absolute; top:3px; right:5px; background:#374151; color:white; font-size:0.58rem; font-weight:700; padding:1px 4px; border-radius:7px; min-width:16px; }
.inv-rarity { font-size:0.53rem; margin-top:2px; font-weight:600; }
.rarity-common    .inv-rarity { color:#9ca3af; }
.rarity-rare      .inv-rarity { color:#3b82f6; }
.rarity-epic      .inv-rarity { color:#8b5cf6; }
.rarity-legendary .inv-rarity { color:#f59e0b; }
.quick-card { background:#f0fdf4; border:1px solid #d1fae5; border-radius:10px; padding:5px 3px; text-align:center; }
.quick-card .q-emoji { font-size:1.3rem; }
.quick-card .q-count { font-size:0.58rem; color:#374151; font-weight:700; }

/* 필터 */
.filter-btn { background:#f3f4f6; color:#6b7280; border:1px solid #e5e7eb; transition:all 0.2s; }
.filter-btn:hover,.active-filter { background:#d1fae5; color:#059669; border-color:#6ee7b7; font-weight:600; }

/* 스캔 로그 */
.log-item { background:#f0fdf4; border-left:3px solid #34d399; border-radius:0 8px 8px 0; padding:7px 9px; display:flex; align-items:center; gap:7px; }
.log-item.rarity-rare      { border-color:#3b82f6; background:#eff6ff; }
.log-item.rarity-epic      { border-color:#8b5cf6; background:#f5f3ff; }
.log-item.rarity-legendary { border-color:#f59e0b; background:#fffbeb; }

/* ==========================================
   🏪 상점
   ========================================== */
.shop-box-card {
  background:white; border:1.5px solid #e5e7eb; border-radius:14px;
  padding:14px 8px; text-align:center; cursor:pointer; transition:all 0.2s;
}
.shop-box-card:hover { transform:translateY(-3px); box-shadow:0 6px 16px rgba(0,0,0,0.1); border-color:#34d399; }
.shop-price { font-weight:700; font-size:0.8rem; color:#059669; }

.shop-item-card {
  background:white; border:1.5px solid #e5e7eb; border-radius:12px;
  padding:10px; display:flex; align-items:center; gap:8px;
  cursor:pointer; transition:all 0.2s;
}
.shop-item-card:hover { border-color:#6ee7b7; background:#f0fdf4; }
.shop-item-card .s-emoji { font-size:1.6rem; flex-shrink:0; }
.shop-item-card .s-info  { flex:1; }
.shop-item-card .s-name  { font-size:0.72rem; font-weight:600; color:#374151; }
.shop-item-card .s-price { font-size:0.65rem; color:#059669; font-weight:700; margin-top:1px; }
.shop-item-card .s-rarity{ font-size:0.55rem; font-weight:600; margin-top:1px; }

/* ==========================================
   💼 알바
   ========================================== */
.job-card {
  background:white; border:1.5px solid #e5e7eb; border-radius:14px;
  padding:12px; cursor:pointer; transition:all 0.2s; position:relative;
}
.job-card:hover { border-color:#6ee7b7; box-shadow:0 4px 12px rgba(0,0,0,0.08); transform:translateY(-1px); }
.job-card.active { border-color:#3b82f6; background:#eff6ff; cursor:default; }
.job-card .job-emoji { font-size:2rem; }
.job-card .job-title { font-weight:700; font-size:0.85rem; color:#374151; }
.job-card .job-desc  { font-size:0.68rem; color:#6b7280; margin-top:1px; }
.job-card .job-meta  { display:flex; gap:6px; margin-top:6px; flex-wrap:wrap; }
.job-tag {
  font-size:0.6rem; font-weight:600; padding:2px 7px; border-radius:10px;
  background:#f0fdf4; color:#059669; border:1px solid #d1fae5;
}
.job-tag.time { background:#eff6ff; color:#3b82f6; border-color:#bfdbfe; }
.job-tag.reward { background:#fffbeb; color:#d97706; border-color:#fde68a; }
.job-tag.premium { background:#f5f3ff; color:#7c3aed; border-color:#ddd6fe; }

/* ==========================================
   🎁 박스 개봉
   ========================================== */
.box-reveal-bg { position:absolute; inset:0; background:rgba(0,0,0,0.7); }
.box-reveal-card {
  position:relative; z-index:1;
  background:white; border-radius:24px; padding:30px 28px;
  text-align:center; min-width:240px;
  animation: pop-in 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
}
@keyframes pop-in { from{transform:scale(0.5);opacity:0} to{transform:scale(1);opacity:1} }
.box-shake { animation: box-shake 0.5s ease-in-out infinite; }
@keyframes box-shake {
  0%,100%{transform:rotate(0deg) scale(1)}
  20%{transform:rotate(-10deg) scale(1.1)}
  40%{transform:rotate(10deg) scale(1.1)}
  60%{transform:rotate(-8deg) scale(1.05)}
  80%{transform:rotate(8deg) scale(1.05)}
}
.box-open-flash { animation: flash-open 0.3s ease; }
@keyframes flash-open { 0%,100%{opacity:1} 50%{opacity:0} }

/* ==========================================
   🌅 새날 배너
   ========================================== */
.new-day-banner { background:rgba(255,255,255,0.95); border-radius:20px; padding:20px 36px; text-align:center; box-shadow:0 8px 32px rgba(0,0,0,0.2); animation:day-banner-in 0.5s cubic-bezier(0.175,0.885,0.32,1.275); }
@keyframes day-banner-in { from{transform:scale(0.6) translateY(-30px);opacity:0} to{transform:scale(1) translateY(0);opacity:1} }

/* ==========================================
   이펙트
   ========================================== */
@keyframes toast-in  { from{opacity:0;transform:translate(-50%,20px)} to{opacity:1;transform:translate(-50%,0)} }
@keyframes toast-out { from{opacity:1;transform:translate(-50%,0)} to{opacity:0;transform:translate(-50%,20px)} }
.toast-show { animation: toast-in  0.3s ease forwards; }
.toast-hide { animation: toast-out 0.3s ease forwards; }

@keyframes slide-up { from{transform:translateY(100%)} to{transform:translateY(0)} }
#cell-modal > div { animation: slide-up 0.3s ease; }

@keyframes sparkle { 0%{transform:scale(1)} 25%{transform:scale(1.3) rotate(-5deg)} 50%{transform:scale(1.2) rotate(5deg)} 100%{transform:scale(1)} }
.sparkle { animation: sparkle 0.5s ease; }

/* ==========================================
   🎰 카지노 / 돼지 레이싱
   ========================================== */
.pig-racer {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: left 0.1s linear;
  z-index: 2;
  width: 36px;
}
.pig-label {
  font-size: 0.5rem;
  font-weight: 700;
  color: #374151;
  background: rgba(255,255,255,0.85);
  border-radius: 4px;
  padding: 0 3px;
  margin-top: 1px;
  white-space: nowrap;
  text-align: center;
}
.pig-racer.running .pig-emoji {
  animation: pig-run 0.25s steps(2) infinite;
}
@keyframes pig-run {
  0%   { transform: translateY(0) scaleX(1); }
  50%  { transform: translateY(-4px) scaleX(1.1); }
  100% { transform: translateY(0) scaleX(1); }
}
.pig-racer.winner .pig-emoji {
  animation: pig-win 0.4s ease-in-out infinite alternate;
}
@keyframes pig-win {
  from { transform: translateY(0) rotate(-10deg) scale(1.2); }
  to   { transform: translateY(-8px) rotate(10deg) scale(1.4); }
}
.pig-bet-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.pig-bet-card:hover { border-color: #a855f7; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(168,85,247,0.2); }
.pig-bet-card.selected { border-color: #a855f7; background: #faf5ff; box-shadow: 0 0 0 3px rgba(168,85,247,0.2); }
.pig-bet-card.winner-card { border-color: #f59e0b; background: #fffbeb; }
.pig-bet-card .odd-badge {
  position: absolute; top: -6px; right: -6px;
  background: #dc2626; color: white;
  font-size: 0.48rem; font-weight: 700;
  padding: 1px 4px; border-radius: 8px;
  white-space: nowrap;
}
.condition-bar {
  height: 3px; border-radius: 2px;
  background: #e5e7eb; overflow: hidden; margin-top: 2px;
}
.condition-fill { height: 100%; border-radius: 2px; }

/* ==========================================
   🏆 랭킹
   ========================================== */
.rank-card {
  display: flex; align-items: center; gap-10px;
  padding: 8px 10px; border-radius: 12px;
  background: white; border: 1.5px solid #e5e7eb;
}
.rank-card.rank-1 { background: linear-gradient(135deg,#fffbeb,#fef3c7); border-color: #f59e0b; }
.rank-card.rank-2 { background: linear-gradient(135deg,#f9fafb,#f3f4f6); border-color: #9ca3af; }
.rank-card.rank-3 { background: linear-gradient(135deg,#fff7ed,#fed7aa); border-color: #f97316; }
.hof-card {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 12px;
  background: linear-gradient(135deg,#fffbeb,#fef3c7);
  border: 1.5px solid #fbbf24;
}

/* ==========================================
   수확물 판매 카드
   ========================================== */
.sell-card {
  background: white; border: 1.5px solid #e5e7eb; border-radius: 12px;
  padding: 8px 6px; text-align: center; cursor: pointer;
  transition: all 0.2s; position: relative;
}
.sell-card:hover { border-color: #34d399; background: #f0fdf4; transform: translateY(-1px); }
.sell-card .sell-rarity-badge {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  font-size: 0.48rem; font-weight: 700; padding: 1px 6px; border-radius: 8px;
  white-space: nowrap; color: white;
}

.legendary-popup { position:fixed; inset:0; background:rgba(0,0,0,0.7); display:flex; align-items:center; justify-content:center; z-index:100; }
.legendary-inner { background:linear-gradient(135deg,#fffbeb,#fef3c7); border:3px solid #f59e0b; border-radius:24px; padding:28px 22px; text-align:center; animation:pop-in 0.4s cubic-bezier(0.175,0.885,0.32,1.275); }

/* ==========================================
   🌦️ 날씨 시스템
   ========================================== */

/* 파티클 레이어 */
.weather-particles {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5;
}

/* 날씨별 씬 배경 */
#farmer-scene.weather-sunny   .scene-sky { background: linear-gradient(180deg,#2e86de 0%,#54a0ff 50%,#74b9ff 100%); }
#farmer-scene.weather-cloudy  .scene-sky { background: linear-gradient(180deg,#636e72 0%,#b2bec3 50%,#dfe6e9 100%); }
#farmer-scene.weather-rainy   .scene-sky { background: linear-gradient(180deg,#2d3436 0%,#636e72 50%,#b2bec3 100%); }
#farmer-scene.weather-storm   .scene-sky { background: linear-gradient(180deg,#1e0028 0%,#2d003d 40%,#4a0060 100%); }
#farmer-scene.weather-windy   .scene-sky { background: linear-gradient(180deg,#0984e3 0%,#74b9ff 50%,#a9d3ff 100%); }
#farmer-scene.weather-foggy   .scene-sky { background: linear-gradient(180deg,#636e72 0%,#b2bec3 60%,#dfe6e9 100%); }
#farmer-scene.weather-snowy   .scene-sky { background: linear-gradient(180deg,#74b9ff 0%,#a9d3ff 50%,#dfe6e9 100%); }
#farmer-scene.weather-rainbow .scene-sky { background: linear-gradient(180deg,#6c5ce7 0%,#a29bfe 40%,#fdcb6e 100%); }

/* 구름 날씨 → 구름 더 많이 */
#farmer-scene.weather-cloudy .cloud,
#farmer-scene.weather-foggy  .cloud  { opacity: 0.95; filter: grayscale(0.5); }
#farmer-scene.weather-storm  .cloud  { opacity: 1; filter: grayscale(1); font-size: 1.8rem; animation-duration: 8s !important; }
#farmer-scene.weather-snowy  .cloud  { opacity: 0.9; filter: brightness(1.3); }

/* 맑은 날 → 태양 더 밝게 */
#farmer-scene.weather-sunny  #scene-sun { filter: drop-shadow(0 0 12px rgba(255,220,0,0.9)); font-size: 2rem; }
#farmer-scene.weather-rainbow #scene-sun { opacity:0; }
#farmer-scene.weather-storm  #scene-sun { opacity: 0; }
#farmer-scene.weather-rainy  #scene-sun { opacity: 0.2; }
#farmer-scene.weather-snowy  #scene-sun { opacity: 0.4; }

/* ── 빗방울 ── */
.raindrop {
  position: absolute; top: -10px; width: 2px; height: 12px;
  background: linear-gradient(180deg, transparent, rgba(100,160,255,0.8));
  border-radius: 1px; animation: rain-fall linear infinite;
}
#farmer-scene.weather-storm .raindrop {
  width: 2px; height: 16px;
  background: linear-gradient(180deg, transparent, rgba(150,150,255,0.9));
  animation-duration: 0.3s !important;
}
@keyframes rain-fall {
  from { transform: translateY(0) rotate(10deg); opacity: 1; }
  to   { transform: translateY(220px) rotate(10deg); opacity: 0.3; }
}

/* ── 눈송이 ── */
.snowflake {
  position: absolute; top: -20px; opacity: 0.8; color: white;
  animation: snow-fall linear infinite;
  text-shadow: 0 0 4px rgba(150,200,255,0.8);
}
@keyframes snow-fall {
  from { transform: translateY(0) rotate(0deg) translateX(0); opacity: 0.9; }
  50%  { transform: translateY(100px) rotate(180deg) translateX(15px); }
  to   { transform: translateY(220px) rotate(360deg) translateX(-10px); opacity: 0.2; }
}

/* ── 안개 ── */
.fog-strip {
  position: absolute; left: -20%; width: 140%; height: 22px;
  background: linear-gradient(90deg, transparent, rgba(220,230,240,0.55), rgba(200,215,230,0.6), transparent);
  border-radius: 50%;
  animation: fog-drift ease-in-out infinite alternate;
}
@keyframes fog-drift {
  from { transform: translateX(-5%) scaleY(1); opacity: 0.5; }
  to   { transform: translateX(5%)  scaleY(1.2); opacity: 0.9; }
}
.fog-strip:nth-child(1) { animation-duration: 4s; }
.fog-strip:nth-child(2) { animation-duration: 5.5s; animation-delay: 1s; }
.fog-strip:nth-child(3) { animation-duration: 3.8s; animation-delay: 2s; }
.fog-strip:nth-child(4) { animation-duration: 6s;   animation-delay: 0.5s; }

/* ── 바람선 ── */
.wind-line {
  position: absolute; left: -100%; height: 2px; width: 60%;
  background: linear-gradient(90deg, transparent, rgba(120,180,255,0.5), transparent);
  border-radius: 2px;
  animation: wind-blow linear infinite;
}
@keyframes wind-blow {
  from { transform: translateX(0); opacity: 0.8; }
  to   { transform: translateX(250%); opacity: 0; }
}
.wind-line:nth-child(1){animation-duration:0.7s;} .wind-line:nth-child(2){animation-duration:0.9s;}
.wind-line:nth-child(3){animation-duration:0.6s;} .wind-line:nth-child(4){animation-duration:1.1s;}
.wind-line:nth-child(5){animation-duration:0.8s;} .wind-line:nth-child(6){animation-duration:1.0s;}

/* ── 무지개 호 ── */
.rainbow-arc {
  position: absolute; top: -30px; left: 50%; width: 200px; height: 200px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 12px solid transparent;
  border-top: 12px solid rgba(255,0,0,0.25);
  box-shadow:
    0 0 0 10px rgba(255,165,0,0.2),
    0 0 0 20px rgba(255,255,0,0.15),
    0 0 0 30px rgba(0,200,0,0.15),
    0 0 0 40px rgba(0,0,255,0.12),
    0 0 0 50px rgba(150,0,200,0.1);
  animation: rainbow-shimmer 3s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes rainbow-shimmer { from{opacity:0.6;} to{opacity:1;} }

/* ── 번개 ── */
.lightning-flash {
  position: absolute; inset: 0;
  background: rgba(200,180,255,0);
  animation: lightning 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes lightning {
  0%,100%{ background:rgba(200,180,255,0); }
  5%      { background:rgba(200,180,255,0.4); }
  6%      { background:rgba(200,180,255,0); }
  7%      { background:rgba(200,180,255,0.3); }
  8%      { background:rgba(200,180,255,0); }
}

/* ── 반짝이 별 ── */
.sparkle-star {
  position: absolute; font-size: 0.8rem;
  animation: sparkle-twinkle 1.5s ease-in-out infinite alternate;
}
@keyframes sparkle-twinkle {
  from { opacity:0.3; transform:scale(0.8); }
  to   { opacity:1; transform:scale(1.2); }
}

/* ── 날씨 피해 셀 ── */
.farm-cell.weather-damaged {
  animation: damage-shake 0.4s ease-in-out;
  border-color: #ef4444 !important;
  background: linear-gradient(135deg,#fef2f2,#fee2e2) !important;
}
@keyframes damage-shake {
  0%,100%{ transform:translateX(0); }
  25%    { transform:translateX(-4px); }
  75%    { transform:translateX(4px); }
}

/* ── 날씨 배지 (농장 셀 위) ── */
.weather-cell-badge {
  position: absolute; top: 2px; right: 2px;
  font-size: 0.42rem; font-weight: 800; padding: 1px 4px;
  border-radius: 6px; z-index: 2; line-height: 1.4; white-space: nowrap;
}
.weather-cell-badge.good { background: rgba(16,185,129,0.9); color: white; }
.weather-cell-badge.bad  { background: rgba(239,68,68,0.9);  color: white; }
.weather-cell-badge.grow { background: rgba(59,130,246,0.9); color: white; }

/* farm-cell에 position:relative 필요 */
.farm-cell { position: relative; }

/* ── 날씨 효과 배너 ── */
.weather-effect-banner {
  transition: opacity 0.3s;
}
.weather-effect-bonus { background: linear-gradient(90deg,#d1fae5,#a7f3d0); color: #065f46; border: 1px solid #6ee7b7; }
.weather-effect-damage { background: linear-gradient(90deg,#fee2e2,#fecaca); color: #991b1b; border: 1px solid #fca5a5; }

/* ── 폭풍 시 흔들림 ── */
#farmer-scene.weather-storm .bg-crops { animation: storm-shake 0.5s ease-in-out infinite alternate; }
@keyframes storm-shake { from{transform:rotate(-1deg);} to{transform:rotate(1deg);} }

/* ── 눈 올 때 땅 색상 ── */
#farmer-scene.weather-snowy .scene-ground { background: linear-gradient(180deg,#e8f4fd 0%,#c5e8f5 50%,#a0d4ec 100%); }

/* ── 토스트 날씨 타입 ── */
.toast-weather { background: linear-gradient(90deg,#0369a1,#0284c7) !important; }
