/* 开心农场 —— 样式 */

.lfarm { max-width: 720px; margin: 0 auto; padding: 16px; color: var(--ls-text, #1f2937); }
.lfarm * { box-sizing: border-box; }

.lfarm-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border-radius: 16px; margin-bottom: 14px;
  background: linear-gradient(135deg, #16a34a, #65a30d);
  color: #fff;
}
.lfarm-hero-title { font-size: 20px; font-weight: 700; }
.lfarm-hero-sub { margin-top: 8px; display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.lfarm-hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12.5px; flex: none; }
.lfarm-lv { background: rgba(255, 255, 255, .22); border-radius: 999px; padding: 2px 9px; font-weight: 600; }
.lfarm-bar { display: inline-block; width: 110px; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.lfarm-bar i { display: block; height: 100%; background: #fde047; }
.lfarm-coins { font-weight: 600; }
.lfarm-hero .lfarm-muted { opacity: .85; }

.lfarm-btn {
  appearance: none; border: 0; cursor: pointer; font-size: 13px; line-height: 1;
  padding: 9px 16px; border-radius: 10px; background: #16a34a; color: #fff;
}
.lfarm-hero .lfarm-btn { background: #fff; color: #15803d; font-weight: 600; }

.lfarm-grid { display: grid; gap: 10px; margin-bottom: 14px; }
.lfarm-plot {
  position: relative; min-height: 108px; border-radius: 14px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; overflow: hidden; border: 1px solid #e5e7eb;
}
.lfarm-plot.empty { background: #f6f3ee; }
.lfarm-plot.growing { background: #f0fdf4; border-color: #bbf7d0; }
.lfarm-plot.ready { background: #fefce8; border-color: #fde047; }
.lfarm-soil {
  width: 60%; height: 34px; border-radius: 8px;
  background: repeating-linear-gradient(90deg, #dcb894, #dcb894 8px, #d0a97f 8px, #d0a97f 16px);
}
.lfarm-crop { font-size: 40px; line-height: 1; }
.lfarm-crop.small { font-size: 26px; opacity: .8; }
.lfarm-plot-tip { font-size: 12px; color: #6b7280; }
.lfarm-plot-warn { position: absolute; top: 8px; right: 8px; font-size: 11px; color: #b91c1c; background: #fee2e2; border-radius: 6px; padding: 2px 6px; }
.lfarm-plot-ok { position: absolute; top: 8px; left: 8px; font-size: 11px; color: #15803d; background: #dcfce7; border-radius: 6px; padding: 2px 6px; }
.lfarm-plot-water { font-size: 11px; color: #0369a1; }

.lfarm-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.lfarm-tab {
  appearance: none; border: 0; background: #f3f4f6; cursor: pointer;
  padding: 8px 14px; border-radius: 999px; font-size: 13.5px; color: #4b5563;
}
.lfarm-tab.on { background: #dcfce7; color: #15803d; font-weight: 600; }
.lfarm-panel { min-height: 120px; }
.lfarm-empty { padding: 36px 0; text-align: center; color: #9ca3af; font-size: 13px; }
.lfarm-hint { margin-top: 10px; font-size: 12px; color: #9ca3af; line-height: 1.7; }
.lfarm-muted { color: #9ca3af; font-size: 12px; }

.lfarm-shop { display: flex; flex-direction: column; gap: 8px; }
.lfarm-shop-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; cursor: pointer;
}
.lfarm-shop-item:hover { border-color: #86efac; }
.lfarm-shop-item.locked { opacity: .55; cursor: default; }
.lfarm-shop-icon { font-size: 26px; flex: none; }
.lfarm-shop-body { flex: 1; min-width: 0; }
.lfarm-shop-name { font-size: 14px; font-weight: 600; }
.lfarm-shop-meta { font-size: 12px; color: #9ca3af; margin-top: 2px; }
.lfarm-shop-side { font-size: 14px; font-weight: 700; color: #15803d; }
.lfarm-lock { font-size: 11px; color: #b45309; background: #fef3c7; border-radius: 6px; padding: 2px 6px; }

.lfarm-friend { border: 1px solid #e5e7eb; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: #fff; }
.lfarm-friend-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.lfarm-friend-head img { width: 26px; height: 26px; border-radius: 50%; }
.lfarm-friend-plots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.lfarm-steal {
  appearance: none; border: 1px solid #fde047; background: #fefce8; border-radius: 10px;
  padding: 6px 10px; font-size: 13px; cursor: pointer;
}
.lfarm-steal i { font-style: normal; color: #b45309; margin-left: 6px; }
.lfarm-steal:disabled { opacity: .55; cursor: default; }

.lfarm-rank-row, .lfarm-log-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f3f4f6; font-size: 13.5px; }
.lfarm-rank-no { width: 22px; text-align: center; color: #9ca3af; font-weight: 700; }
.lfarm-rank-row img { width: 26px; height: 26px; border-radius: 50%; }
.lfarm-rank-name { font-weight: 600; }
.lfarm-log-kind { flex: none; width: 22px; height: 22px; border-radius: 6px; background: #dcfce7; color: #15803d; font-size: 12px; display: flex; align-items: center; justify-content: center; }

.lfarm-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 9998;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.lfarm-mask.show { display: flex; }
.lfarm-modal { width: min(460px, 100%); background: #fff; border-radius: 16px; overflow: hidden; }
.lfarm-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid #f1f5f9; font-weight: 600; }
.lfarm-modal-body { padding: 16px 18px; }
.lfarm-modal-foot { display: flex; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid #f1f5f9; background: #fafafa; }
.lfarm-x { appearance: none; border: 0; background: transparent; font-size: 20px; line-height: 1; color: #9ca3af; cursor: pointer; }
.lfarm-pick-line { display: flex; align-items: center; gap: 10px; font-size: 14px; }

.lfarm-toast {
  position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 20px);
  background: #111827; color: #fff; font-size: 13px; padding: 10px 18px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: .2s; z-index: 10000; max-width: 80vw;
}
.lfarm-toast.show { opacity: .95; transform: translate(-50%, 0); }
.lfarm-toast.bad { background: #b91c1c; }

/* 排行榜 / 记录：各自一块白底卡片 —— 换深色背景时不会透出页面的黑，分隔线也不扎眼 */
.lfarm-rank, .lfarm-log {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2px 14px;
}
.lfarm-rank-row:last-child, .lfarm-log-row:last-child { border-bottom: 0; }
.lfarm-log {
  max-height: 268px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 720px) {
  .lfarm { padding: 12px; }
  .lfarm-hero { flex-direction: column; align-items: flex-start; }
  .lfarm-hero-side { align-items: flex-start; }
}
