/* ==================== THỜI TIẾT & CHỢ NHẢY SÓNG V3 ==================== */
body.hay-farm-mode #app { isolation: isolate; }
.orchard-backdrop { display: none; }
body.hay-farm-mode .orchard-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(180deg, #291a144d, #24180f75 65%, #21150db5), url("/static/hay-orchard-v2.webp") center 35% / cover no-repeat, #342318;
}
[data-tab="task"][hidden] { display: none !important; }
#adBannerBar,
.ad-banner-bar {
  display: none !important;
}

/* Căn đều 4 tab thanh điều hướng dưới và 3 subtab Quà & Bạn */
.nav,
body.hay-farm-mode .nav {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
.task-subtabs,
body.hay-farm-mode .task-subtabs {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

/* Harvest boost dual actions */
.crop-head-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 6px;
}
.crop-head-actions .pill {
  flex: 1 1 auto;
  justify-content: center;
  text-align: center;
}
.pill.task-boost {
  background: linear-gradient(180deg, #ffb300, #ef6c00);
  color: #fff;
  font-weight: 800;
  border: 1.5px solid #ffe082;
  box-shadow: 0 3px 0 #b25000;
}

/* Spotlight Coach-Mark Tour V3 (dẫn qua từng tab, không đụng layout nền) */
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: auto;
}
.tour-overlay[hidden] {
  display: none !important;
}
.tour-spotlight {
  position: fixed;
  border-radius: 18px;
  border: 3px solid #ffca28;
  box-shadow: 0 0 0 9999px rgba(12, 8, 4, 0.78), 0 0 22px rgba(255, 202, 40, 0.75);
  pointer-events: none;
  transition: top 0.26s ease, left 0.26s ease, width 0.26s ease, height 0.26s ease;
}
.tour-card {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 430px;
  background: linear-gradient(165deg, #fffdf7 0%, #ffefd0 100%);
  border: 2.5px solid #f59e0b;
  border-radius: 20px;
  padding: 14px 16px;
  color: #2b190d;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.48);
  z-index: 96;
  display: block !important;
}
.tour-card.dock-bottom {
  bottom: calc(env(safe-area-inset-bottom) + 84px);
  top: auto;
}
.tour-card.dock-top {
  top: calc(env(safe-area-inset-top) + 74px);
  bottom: auto;
}
.tour-progress {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  margin-bottom: 10px;
}
.tour-dot {
  height: 5px;
  border-radius: 999px;
  background: rgba(146, 64, 14, 0.18);
}
.tour-dot.done {
  background: #2e7d32;
}
.tour-dot.active {
  background: #ef6c00;
}
.tour-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.tour-step-badge {
  font-size: 11px;
  font-weight: 800;
  color: #b45309;
  background: rgba(245, 158, 11, 0.22);
  padding: 3px 9px;
  border-radius: 999px;
}
.tour-skip {
  border: 0;
  background: transparent;
  color: #7c583b;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 6px;
  cursor: pointer;
}
.tour-title {
  margin: 0 0 6px;
  font-family: 'Baloo 2', sans-serif;
  font-size: 17.5px;
  font-weight: 800;
  line-height: 1.25;
  color: #241308;
}
.tour-desc {
  margin: 0 0 13px;
  font-size: 13px;
  line-height: 1.5;
  color: #4e321d;
}
.tour-desc b {
  color: #bf360c;
}
.tour-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.tour-btn {
  border-radius: 12px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  border: 0;
}
.tour-btn.ghost {
  background: rgba(124, 88, 59, 0.14);
  color: #5c3d24;
}
.tour-btn.primary {
  flex: 1;
  background: linear-gradient(180deg, #ff9800, #e65100);
  color: #fff;
  box-shadow: 0 3px 0 #9c3800;
}

.weather-banner {
  position: relative;
  border-radius: 18px;
  padding: 13px 14px;
  margin: 0 0 12px;
  border: 2px solid rgba(255, 224, 163, 0.35);
  background: linear-gradient(135deg, rgba(64, 42, 24, 0.94), rgba(43, 28, 17, 0.96));
  color: #fff6e6;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}
.weather-banner.is-hazard {
  border-color: #ff8a50;
  background: linear-gradient(135deg, rgba(110, 32, 20, 0.95), rgba(62, 22, 16, 0.97));
}
.weather-banner.kind-rain {
  border-color: #64b5f6;
  background: linear-gradient(135deg, rgba(25, 58, 86, 0.95), rgba(20, 40, 60, 0.97));
}
.weather-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.weather-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 17px;
  line-height: 1.2;
}
.weather-emoji {
  font-size: 26px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.35));
}
.weather-timer {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  white-space: nowrap;
}
.weather-desc {
  font-size: 12.5px;
  line-height: 1.42;
  color: #ffe8c8;
  margin: 7px 0 9px;
}
.weather-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.18);
  font-size: 11.5px;
  color: #ffdca8;
}
.weather-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.weather-btn {
  border: 0;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  background: #ffb300;
  color: #26160a;
}
.weather-btn.secondary {
  background: rgba(255, 255, 255, 0.16);
  color: #fff5e4;
}

/* Plot badges for Greenhouse & Hazard */
.plot-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 2px 0 4px;
  min-height: 20px;
}
.plot-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  line-height: 1.3;
}
.plot-badge.gh {
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #81c784;
}
.plot-badge.shield {
  background: #e3f2fd;
  color: #0d47a1;
  border: 1px solid #64b5f6;
}
.plot-badge.danger {
  background: #ffebee;
  color: #b71c1c;
  border: 1px solid #ef9a9a;
}
.plot-sub-actions {
  display: flex;
  gap: 4px;
  width: 100%;
  margin-top: 5px;
}
.plot-sub-actions .pill {
  flex: 1;
  font-size: 10.5px;
  padding: 5px 6px;
}

/* Surge Market Board */
.market-hero-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 16px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #3e2718, #28180e);
  color: #fff3df;
  border: 1.5px solid rgba(255, 204, 128, 0.3);
}
.surge-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}
.surge-card {
  border-radius: 16px;
  padding: 12px 13px;
  background: linear-gradient(180deg, #fffdf7 0%, #fff4dc 100%);
  border: 2px solid #ffb74d;
  color: #2c1b10;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.14);
}
.surge-card.warm {
  background: linear-gradient(180deg, #ffffff 0%, #f5f9f0 100%);
  border-color: #a5d6a7;
}
.surge-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.surge-card-top .emo {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}
.surge-card-info {
  flex: 1;
  min-width: 0;
}
.surge-card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 16px;
}
.surge-mult {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #d84315;
  color: #fff;
}
.surge-card.warm .surge-mult {
  background: #2e7d32;
}
.surge-mult.soldout {
  background: #8d6e63;
}
.surge-quota-wrap {
  margin: 8px 0 9px;
}
.surge-quota-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #6d4c41;
  margin-bottom: 3px;
  font-weight: 600;
}
.surge-quota-bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(109, 76, 65, 0.16);
  overflow: hidden;
}
.surge-quota-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff6d00, #ffab00);
}
.surge-card.warm .surge-quota-fill {
  background: linear-gradient(90deg, #43a047, #8bc34a);
}
.surge-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.surge-owned {
  font-size: 12px;
  font-weight: 700;
  color: #4e342e;
}

/* ==================== MỜI BẠN 3% + NHÀ KÍNH V3 ==================== */
.ref-v3-hero {
  border-radius: 18px;
  padding: 15px 14px;
  margin-bottom: 12px;
  background: linear-gradient(145deg, #4b2e19 0%, #2d1b0e 100%);
  border: 2px solid rgba(255, 193, 7, 0.45);
  color: #fff8eb;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.ref-v3-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: linear-gradient(90deg, #ffb300, #fb8c00);
  color: #261407;
  margin-bottom: 7px;
}
.ref-v3-title {
  font-family: 'Baloo 2', sans-serif;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.22;
  margin: 0 0 10px;
  color: #fff8eb;
}
.ref-perk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.ref-perk-card {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 224, 130, 0.28);
  border-radius: 13px;
  padding: 9px 10px;
}
.ref-perk-card b {
  display: block;
  font-size: 12.5px;
  color: #ffd54f;
  margin-bottom: 3px;
}
.ref-perk-card span {
  display: block;
  font-size: 11.2px;
  line-height: 1.38;
  color: #f7e6cc;
}
.ref-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.ref-stat-box {
  background: linear-gradient(180deg, #fffdf8, #f9efe0);
  border: 1.5px solid rgba(141, 110, 99, 0.28);
  border-radius: 14px;
  padding: 9px 8px;
  text-align: center;
  color: #2e1c10;
}
.ref-stat-box .v {
  font-family: 'Baloo 2', sans-serif;
  font-size: 16.5px;
  font-weight: 800;
  color: #bf360c;
  line-height: 1.15;
}
.ref-stat-box .k {
  font-size: 11px;
  font-weight: 600;
  color: #6d4c41;
  margin-top: 2px;
}
.ref-tier-v3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 248, 232, 0.72);
  border: 1px solid rgba(216, 155, 64, 0.3);
  margin-top: 7px;
}
.ref-tier-v3-left {
  min-width: 0;
}
.ref-tier-v3-left b {
  display: block;
  font-size: 13px;
  color: #2d1b0e;
}
.ref-tier-v3-left small {
  font-size: 11px;
  color: #795548;
}
.ref-tier-v3-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}
.ref-bonus-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.ref-bonus-pill.gold {
  background: #fff3cd;
  color: #9a5b00;
  border: 1px solid #ffca28;
}
.ref-bonus-pill.gh {
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #81c784;
}

/* ==================== NGÂN HÀNG & RÚT TIỀN V3 ==================== */
.bank-v3-hero {
  position: relative;
  border-radius: 20px;
  padding: 16px 15px;
  margin-bottom: 10px;
  background: linear-gradient(145deg, #2d4a22 0%, #1b3316 58%, #251a12 100%);
  border: 2px solid rgba(165, 214, 167, 0.45);
  color: #f6fff4;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}
.bank-v3-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.bank-v3-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(129, 199, 132, 0.22);
  border: 1px solid rgba(165, 214, 167, 0.5);
  color: #c8e6c9;
}
.bank-v3-bal-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.bank-v3-bal {
  font-family: 'Baloo 2', sans-serif;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  color: #ffffff;
}
.bank-v3-vnd {
  font-family: 'Baloo 2', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #ffd54f;
  background: rgba(0, 0, 0, 0.26);
  padding: 3px 10px;
  border-radius: 999px;
}
.bank-v3-prog-wrap {
  margin: 11px 0 12px;
  background: rgba(0, 0, 0, 0.24);
  border-radius: 12px;
  padding: 8px 10px;
}
.bank-v3-prog-head {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 11.5px;
  color: #e8f5e9;
  margin-bottom: 5px;
}
.bank-v3-prog-bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}
.bank-v3-prog-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #66bb6a, #ffd54f);
}
.bank-v3-cta {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  font-family: 'Baloo 2', sans-serif;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(180deg, #ffd54f 0%, #ffb300 100%);
  color: #261407;
  box-shadow: 0 4px 0 #b27600;
}
.bank-v3-cta:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.bank-v3-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.bank-v3-hl {
  background: linear-gradient(180deg, #fffdf8, #f7efe2);
  border: 1.5px solid rgba(141, 110, 99, 0.28);
  border-radius: 13px;
  padding: 8px 7px;
  text-align: center;
  color: #2d1b0e;
}
.bank-v3-hl b {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  color: #1b5e20;
}
.bank-v3-hl span {
  display: block;
  font-size: 10.8px;
  color: #6d4c41;
  margin-top: 2px;
}

/* Sheet Rút Tiền V3 */
.withdraw-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.w-method-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 10px 11px;
  border-radius: 13px;
  border: 2px solid rgba(141, 110, 99, 0.28);
  background: #fffdf9;
  color: #2c1a0e;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.w-method-card.wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.w-method-card.active {
  border-color: #2e7d32;
  background: #eef8f0;
  box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.16);
}
.w-method-card.ton-card.active {
  border-color: #0288d1;
  background: #e8f6fe;
  box-shadow: 0 0 0 2px rgba(2, 136, 209, 0.18);
}
.w-method-title {
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.w-method-sub {
  font-size: 10.8px;
  font-weight: 700;
  color: #2e7d32;
}
.w-method-card.ton-card .w-method-sub {
  color: #01579b;
}
.withdraw-preset-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 6px 0 10px;
}
.withdraw-preset-grid button {
  border: 1.5px solid rgba(141, 110, 99, 0.35);
  background: #fff9ee;
  color: #3e2723;
  border-radius: 10px;
  padding: 7px 4px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1.2;
}
.withdraw-preset-grid button small {
  display: block;
  font-size: 9.8px;
  font-weight: 600;
  color: #795548;
}
.withdraw-receipt-card {
  background: linear-gradient(180deg, #f4fbf5 0%, #e8f5e9 100%);
  border: 1.5px solid #81c784;
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 10px;
  color: #1b3316;
}
.withdraw-receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  padding: 3px 0;
}
.withdraw-receipt-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 6px;
  margin-top: 5px;
  border-top: 1px dashed rgba(46, 125, 50, 0.35);
  font-size: 13.5px;
  font-weight: 800;
}
.withdraw-receipt-total b {
  font-family: 'Baloo 2', sans-serif;
  font-size: 19px;
  color: #1b5e20;
}
.withdraw-elig-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.w-elig-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef8f0;
  color: #1b5e20;
  border: 1px solid #a5d6a7;
}
.w-elig-pill.bad {
  background: #ffebee;
  color: #b71c1c;
  border-color: #ef9a9a;
}
