/* UI Redesign 2026-11-20: Combines Th? Gi?i Hoa Vi?n sidebar & workflow with airy pastel/glass card hierarchy */
:root {
  --ui-bg: #f4f5fb;
  --ui-surface: rgba(255, 255, 255, 0.96);
  --ui-surface-soft: #f8f9fd;
  --ui-ink: #17213d;
  --ui-muted: #64708a;
  --ui-line: #e2e6f3;
  --ui-brand: #6558e8;
  --ui-brand-2: #8c63ee;
  --ui-rose: #e05288;
  --ui-shadow: 0 12px 32px rgba(28, 38, 82, 0.06);
}

/* Final dark contrast pass: changelog badges and remaining pale utility tiles. */
:root[data-theme-mode="dark"] :is(
  .changelog-version span,
  .release-content em,
  .release-icon,
  .garden-icon,
  .land-unlock-next,
  .land-unlock-next > i
) {
  background: #20263a !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] :is(.changelog-version, .release-content, .land-unlock-next) :is(p,small,span) {
  color: var(--ui-muted) !important;
}

body {
  background: var(--ui-bg);
  color: var(--ui-ink);
}

.app-shell {
  background:
    radial-gradient(circle at 90% 4%, rgba(224, 82, 136, 0.08), transparent 28rem),
    radial-gradient(circle at 10% 85%, rgba(101, 88, 232, 0.09), transparent 30rem),
    var(--ui-bg);
}

/* Sidebar */
.sidebar {
  background: linear-gradient(180deg, #161d3d 0%, #1f2753 58%, #282458 100%);
  box-shadow: 10px 0 32px rgba(21, 27, 58, 0.14);
}
.brand-flower {
  background: linear-gradient(135deg, var(--ui-rose), #7464f0);
  box-shadow: 0 8px 18px rgba(224, 82, 136, 0.28);
}
.nav-link.active {
  background: linear-gradient(100deg, var(--ui-brand), var(--ui-brand-2));
  box-shadow: 0 8px 20px rgba(101, 88, 232, 0.32);
}

/* Topbar */
.topbar {
  border-bottom: 1px solid var(--ui-line);
}
.topbar .eyebrow {
  color: var(--ui-rose);
  font-weight: 800;
}

/* Cards & Surfaces */
.card,
.section-card,
.basic-group,
.activity,
.billing-current,
.billing-purchase,
.billing-history,
.docs-hero,
.docs-guide,
.docs-faq,
.changelog-hero,
.release-card {
  border: 1px solid rgba(222, 226, 240, 0.95);
  border-radius: 18px;
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow);
}

/* Garden Overview & 5 Pastel Resource Cards */
.garden-overview {
  padding: 20px 22px;
  border-radius: 20px;
  gap: 18px;
}
.garden-overview:before {
  width: 4px;
  background: linear-gradient(180deg, var(--ui-rose), var(--ui-brand));
}
.garden-select select {
  border-radius: 12px;
  border: 1px solid var(--ui-line);
  background: #ffffff;
  font-weight: 700;
}
.garden-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  background: transparent;
  border: 0;
}
.garden-stats > div {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--ui-line);
  background: #fafbfe;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.garden-stats > div:nth-child(1) { background: #ecfdf5; border-color: #d1fae5; }
.garden-stats > div:nth-child(2) { background: #f0f9ff; border-color: #e0f2fe; }
.garden-stats > div:nth-child(3) { background: #fffbeb; border-color: #fef3c7; }
.garden-stats > div:nth-child(4) { background: #faf5ff; border-color: #f3e8ff; }
.garden-stats > div:nth-child(5) { background: #ecfeff; border-color: #cffafe; }
.garden-stats strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--ui-ink);
}
.garden-stats small {
  font-size: 11px;
  color: var(--ui-muted);
  font-weight: 600;
}

/* Primary Action Buttons */
.garden-actions #startButton,
#billingCheckoutButton,
.transfer-primary-btn {
  background: linear-gradient(135deg, var(--ui-rose), #7464f0) !important;
  border: 0 !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(224, 82, 136, 0.24) !important;
}
.garden-actions .button {
  border-radius: 12px;
  font-weight: 700;
}

/* Resource Tabs & Auto Category Tabs */
.resource-tabs {
  background: rgba(255, 255, 255, 0.92) !important;
  border: 1px solid var(--ui-line) !important;
  border-radius: 18px !important;
  box-shadow: var(--ui-shadow) !important;
}
.resource-tabs button.active {
  background: linear-gradient(135deg, #f5f3ff, #fff1f6) !important;
  border-color: #cfc6f8 !important;
  color: #4f40c9 !important;
}
.auto-category-tabs {
  border: 1px solid var(--ui-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}
.auto-category-tabs button.active {
  background: linear-gradient(135deg, var(--ui-brand), var(--ui-brand-2));
  color: #fff;
  box-shadow: 0 6px 16px rgba(101, 88, 232, 0.25);
}

/* Setting Cards & Toggles */
.setting-card {
  border-radius: 14px;
  border: 1px solid var(--ui-line);
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.setting-card:hover {
  border-color: #c4bbf6;
  box-shadow: 0 8px 22px rgba(38, 52, 92, 0.06);
}
.toggle.on {
  background: linear-gradient(90deg, var(--ui-brand), var(--ui-brand-2));
}

/* Right Rail & Activity */
.activity-list article {
  border-radius: 12px;
  border: 1px solid #eef0f7;
  background: #fafbfe;
}

/* Ensure hidden view containers stay hidden even when layout CSS sets display:flex/grid */
#autoCategoryNav[hidden],
.auto-category-tabs[hidden],
.auto-category-subbar[hidden],
#resourceCenterView[hidden],
#gardenOverview[hidden],
#autoSettings[hidden],
.layout-grid[hidden],
.right-rail[hidden],
body.fleet-overview-active #autoCategoryNav,
body.fleet-overview-active .auto-category-tabs,
body.fleet-overview-active .auto-category-subbar,
body.fleet-overview-active #resourceCenterView,
body.fleet-overview-active #gardenOverview,
body.fleet-overview-active #autoSettings,
body.fleet-overview-active .layout-grid,
body.fleet-overview-active .right-rail {
  display: none !important;
}

/* Compact Category Nav & Resource Center inside Chi tiết */
.auto-category-nav {
  border: 1px solid var(--ui-line) !important;
  border-radius: 18px !important;
  background: #fff !important;
  padding: 12px 14px !important;
  box-shadow: 0 8px 22px rgba(34, 48, 86, 0.04) !important;
}
.auto-category-tabs {
  gap: 8px !important;
}
.auto-category-tabs > button {
  border-radius: 12px !important;
  border: 1px solid var(--ui-line) !important;
  background: #fafbfe !important;
  padding: 8px 11px !important;
  min-height: 48px !important;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.auto-category-tabs > button.active {
  background: linear-gradient(135deg, var(--ui-brand), var(--ui-brand-2)) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(101, 88, 232, 0.24) !important;
}
.auto-category-tabs > button.active strong,
.auto-category-tabs > button.active small,
.auto-category-tabs > button.active span {
  color: #fff !important;
}
.resource-center-tabs > button,
.resource-tabs > button {
  border-radius: 12px !important;
  border: 1px solid var(--ui-line) !important;
  background: #fff !important;
  padding: 9px 12px !important;
}
.resource-center-tabs > button.active,
.resource-tabs > button.active {
  border-color: #c4bbf6 !important;
  background: linear-gradient(135deg, #f8f5ff, #fff5fa) !important;
  box-shadow: 0 6px 14px rgba(101, 88, 232, 0.09) !important;
}

/* ==========================================================================
   Mini Games & Events Inner Polish
   (5601 B?nh Ng?t, 5401 C?, 5602 Ch?i T?, 4701 Chuy?n Hoa, 5301 Khoe S?c,
    Gi?y Hoa Gom H??ng, Mu?n Hoa Th?nh M?t, Ng?c V? Th?nh L?)
   ========================================================================== */

/* Shared Mini-game & Event Headings */
.minigame-panel-heading {
  border-radius: 14px;
  border: 1px solid var(--ui-line);
  background: linear-gradient(120deg, #f8f7ff, #fff5f9);
  padding: 12px 15px;
}
.minigame-panel-heading small {
  color: var(--ui-rose);
  font-weight: 800;
  letter-spacing: 0.06em;
}

/* Shared Summary Stat Chips (Pastel Tiles) */
.game2048-summary > span,
.dessert-summary > article,
.flower-battle-summary > article,
.cyclic-note-summary > article,
.cyclic-vase-summary > article {
  border-radius: 14px !important;
  border: 1px solid var(--ui-line) !important;
  background: #fafbfe !important;
  box-shadow: 0 4px 12px rgba(28, 38, 82, 0.04) !important;
}
.game2048-summary > span:nth-child(4n+1),
.dessert-summary > article:nth-child(4n+1),
.flower-battle-summary > article:nth-child(4n+1),
.cyclic-note-summary > article:nth-child(4n+1),
.cyclic-vase-summary > article:nth-child(4n+1) {
  background: #f5f3ff !important;
  border-color: #e4ddff !important;
}
.game2048-summary > span:nth-child(4n+2),
.dessert-summary > article:nth-child(4n+2),
.flower-battle-summary > article:nth-child(4n+2),
.cyclic-note-summary > article:nth-child(4n+2),
.cyclic-vase-summary > article:nth-child(4n+2) {
  background: #fff1f6 !important;
  border-color: #ffdce8 !important;
}
.game2048-summary > span:nth-child(4n+3),
.dessert-summary > article:nth-child(4n+3),
.flower-battle-summary > article:nth-child(4n+3),
.cyclic-note-summary > article:nth-child(4n+3),
.cyclic-vase-summary > article:nth-child(4n+3) {
  background: #ecfdf5 !important;
  border-color: #d1fae5 !important;
}
.game2048-summary > span:nth-child(4n+4),
.dessert-summary > article:nth-child(4n+4),
.flower-battle-summary > article:nth-child(4n+4),
.cyclic-note-summary > article:nth-child(4n+4),
.cyclic-vase-summary > article:nth-child(4n+4) {
  background: #fffbeb !important;
  border-color: #fef3c7 !important;
}

/* Inner Hero Banners (B?nh Ng?t, Ch?i T?, Thi Nhau Khoe S?c) */
.dessert-hero,
.flower-battle-hero {
  border-radius: 16px !important;
  border: 1px solid #e7dffb !important;
  background: linear-gradient(135deg, #fdf5fa 0%, #f3f1ff 100%) !important;
  box-shadow: 0 8px 22px rgba(101, 88, 232, 0.08) !important;
}
.spool-hero {
  background: linear-gradient(135deg, #f0f9ff 0%, #f5f3ff 100%) !important;
  border-color: #d8e8fb !important;
}
.dessert-live {
  background: #fff !important;
  border: 1px solid #e5dcfb !important;
  color: var(--ui-brand) !important;
}

/* Inner Sub-panels, Boards, Task Lists & Shops */
.game2048-copy,
.game2048-shop,
.dessert-grid > section,
.dessert-modes,
.dessert-safety,
.spool-play > div,
.flower-battle-choice,
.flower-battle-grid > section,
.cyclic-note-status,
.cyclic-note-milestone-panel,
.cyclic-note-tasks,
.cyclic-note-unlock,
.cyclic-note-history,
.cyclic-note-shop,
.cyclic-note-roll,
.cyclic-vase-notice,
.cyclic-vase-grid > section,
.cyclic-vase-history,
.honey-event-detail {
  border-radius: 15px !important;
  border: 1px solid var(--ui-line) !important;
  background: #ffffff !important;
  box-shadow: 0 6px 18px rgba(28, 38, 82, 0.04) !important;
}

.flower-battle-choice [data-flower-battle-choices] > article {
  border-radius: 14px !important;
  border: 1px solid var(--ui-line) !important;
  background: #fafbfe !important;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.flower-battle-choice [data-flower-battle-choices] > article:hover {
  border-color: #c4bbf6 !important;
  transform: translateY(-1px);
}

.cyclic-note-unlock button,
.game2048-shop-title button,
[data-vase-shop] button {
  border-radius: 10px !important;
  font-weight: 700 !important;
}

.honey-jars > *,
[data-cyclic-note-tasks] > article {
  border-radius: 13px !important;
  border: 1px solid var(--ui-line) !important;
  background: #fafbfe !important;
}

/* Flower & Item Card Frames (Keep all <img> intact, polish frames, names, counts) */
.flower-transfer-flower,
.warehouse-use-item,
.cultivate-grid > article,
.florist-grid > article {
  border-radius: 16px !important;
  border: 1px solid var(--ui-line) !important;
  background: #ffffff !important;
  box-shadow: 0 6px 18px rgba(28, 38, 82, 0.04) !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.flower-transfer-flower:hover,
.cultivate-grid > article:hover,
.florist-grid > article:hover {
  border-color: #c4bbf6 !important;
  box-shadow: 0 10px 24px rgba(101, 88, 232, 0.08) !important;
}
.flower-transfer-flower-main > span,
.warehouse-use-item > img {
  border-radius: 13px !important;
  border: 1px solid #ece8fb !important;
  background: linear-gradient(145deg, #fdfaff, #fff7fb) !important;
}
.flower-transfer-flower-main > b {
  color: var(--ui-ink) !important;
  font-weight: 800 !important;
}

/* ==========================================================================
   Th? Vui ?i?n Vi?n (actMerge2 / 6801) Inner Polish
   ========================================================================== */
.act-merge2-section .merge2-panel {
  gap: 14px !important;
}
.act-merge2-section .merge2-summary {
  gap: 10px !important;
}
.act-merge2-section .merge2-summary article {
  border-radius: 14px !important;
  border: 1px solid var(--ui-line) !important;
  padding: 11px 13px !important;
  box-shadow: 0 4px 12px rgba(28, 38, 82, 0.04) !important;
}
.act-merge2-section .merge2-summary article:nth-child(6n+1) { background: #fffbeb !important; border-color: #fef3c7 !important; }
.act-merge2-section .merge2-summary article:nth-child(6n+2) { background: #fff1f6 !important; border-color: #ffdce8 !important; }
.act-merge2-section .merge2-summary article:nth-child(6n+3) { background: #faf5ff !important; border-color: #f3e8ff !important; }
.act-merge2-section .merge2-summary article:nth-child(6n+4) { background: #eef2ff !important; border-color: #e0e7ff !important; }
.act-merge2-section .merge2-summary article:nth-child(6n+5) { background: #ecfdf5 !important; border-color: #d1fae5 !important; }
.act-merge2-section .merge2-summary article:nth-child(6n+6) { background: #f0f9ff !important; border-color: #e0f2fe !important; }
.act-merge2-section .merge2-summary small {
  color: var(--ui-muted) !important;
  font-weight: 600 !important;
}
.act-merge2-section .merge2-summary strong {
  color: var(--ui-ink) !important;
}
.act-merge2-section .merge2-progress {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--ui-line);
  background: #fafbfe;
}
.act-merge2-section .merge2-progress .merge2-bar {
  height: 10px !important;
  background: #e9ecf6 !important;
}
.act-merge2-section .merge2-progress .merge2-bar i {
  background: linear-gradient(90deg, var(--ui-rose), #7464f0) !important;
}
.act-merge2-section .merge2-modes button {
  padding: 8px 6px !important;
  border-radius: 12px !important;
  border: 1px solid var(--ui-line) !important;
  font-weight: 700 !important;
  color: var(--ui-muted) !important;
  transition: all 0.16s ease;
}
.act-merge2-section .merge2-modes button.active {
  background: linear-gradient(135deg, var(--ui-rose), #7464f0) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(224, 82, 136, 0.25) !important;
}
.act-merge2-section .merge2-grid > section {
  border-radius: 16px !important;
  border: 1px solid var(--ui-line) !important;
  background: #ffffff !important;
  padding: 14px !important;
  box-shadow: 0 6px 18px rgba(28, 38, 82, 0.04) !important;
}
.act-merge2-section .merge2-board {
  padding: 10px;
  border-radius: 14px;
  background: #f9f4ec;
  border: 1px solid #e7dccb;
  gap: 5px !important;
}
.act-merge2-section .merge2-cell {
  border-radius: 10px !important;
  background: #efe6d8 !important;
  border: 1px dashed #d8cab6;
  color: var(--ui-ink) !important;
}
.act-merge2-section .merge2-cell.item {
  background: #ffffff !important;
  border: 1px solid #e2d6c4 !important;
  box-shadow: 0 2px 6px rgba(28, 38, 82, 0.05);
}
.act-merge2-section .merge2-cell.web {
  background: #f5f3ff !important;
  outline: 0 !important;
  border: 1px dashed #9c88c4 !important;
}
.act-merge2-section .merge2-cell.fog {
  background: #d5d8e2 !important;
  border: 1px solid #c3c8d6 !important;
  color: #64708a !important;
}
.act-merge2-section .merge2-order,
.act-merge2-section .merge2-task {
  border-radius: 12px !important;
  border: 1px solid var(--ui-line) !important;
  background: #fafbfe !important;
  padding: 10px 12px !important;
}
.act-merge2-section .merge2-order.ready,
.act-merge2-section .merge2-task.done {
  background: #ecfdf5 !important;
  outline: 0 !important;
  border-color: #86efac !important;
}
.act-merge2-section .merge2-order em {
  color: var(--ui-rose) !important;
  font-weight: 800 !important;
}

/* Responsive Adjustments */
@media (max-width: 1180px) {
  .garden-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .garden-overview {
    padding: 14px;
    border-radius: 16px;
  }
  .garden-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .garden-stats > div {
    padding: 8px 10px;
    border: 1px solid var(--ui-line);
  }
  .billing-purchase,
  .billing-plan-options,
  .billing-duration {
    grid-template-columns: 1fr !important;
  }
  .billing-history {
    overflow-x: auto;
  }
  .billing-history table {
    min-width: 520px;
  }
}

/* ==========================================================================
   Fleet Overview Page (#fleetOverviewView) & Back-to-Fleet Button
   ========================================================================== */
.garden-select-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.back-to-fleet-btn {
  border: 1px solid var(--ui-line);
  background: #f5f3ff;
  color: #5648d5;
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.back-to-fleet-btn:hover {
  background: #ebe7ff;
}

.fleet-overview {
  display: grid;
  gap: 16px;
}
.fleet-overview[hidden] {
  display: none !important;
}

/* Chuyển hoa đã có lối vào riêng trong Tra cứu & Thao tác nhanh. Giữ nút trong
   DOM để shortcut kích hoạt đúng panel, nhưng không lặp lại ở danh mục Auto. */
#autoCategoryNav [data-auto-category-tab="transfer"] {
  display: none !important;
}
.fleet-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
}
.fleet-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ui-rose);
}
.fleet-hero h2 {
  margin: 4px 0;
  font-size: 26px;
  font-weight: 800;
}
.fleet-hero p {
  margin: 0;
  color: var(--ui-muted);
  font-size: 13px;
}
.fleet-hero-pills {
  margin-top: 10px;
}
.fleet-online-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 99px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 12px;
  font-weight: 700;
}
.fleet-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fleet-add-btn {
  background: linear-gradient(135deg, var(--ui-rose), #7464f0) !important;
  border: 0 !important;
  color: #fff !important;
}

.fleet-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
}
.fleet-toolbar-tabs,
.fleet-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.fleet-tab-pill {
  padding: 7px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ui-muted);
}
.fleet-tab-pill.active {
  background: #f0edff;
  color: #5648d5;
}
.fleet-start-all {
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  color: #047857 !important;
}
.fleet-stop-all {
  background: #fff1f2 !important;
  border-color: #fecdd3 !important;
  color: #be123c !important;
}

.fleet-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(290px, 1fr);
  gap: 16px;
  align-items: start;
}
.fleet-main-col {
  display: grid;
  gap: 16px;
}
.fleet-plan-card,
.fleet-accounts-card,
.fleet-tools-card {
  padding: 18px 20px;
}
.fleet-plan-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.fleet-plan-head small {
  color: var(--ui-rose);
  font-size: 11px;
  font-weight: 800;
}
.fleet-plan-head h3 {
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 800;
}
.fleet-plan-head span {
  font-size: 12px;
  font-weight: 600;
  color: var(--ui-muted);
}
.fleet-plan-progress {
  height: 8px;
  border-radius: 99px;
  background: #eef0f7;
  margin: 12px 0 14px;
  overflow: hidden;
}
.fleet-plan-progress i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--ui-rose), #7464f0);
}

.fleet-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.fleet-kpis article {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--ui-line);
}
.fleet-kpis article small {
  display: block;
  font-size: 11px;
  font-weight: 700;
}
.fleet-kpis article strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  font-weight: 800;
}
.fleet-kpis .kpi-indigo { background: #eef2ff; border-color: #e0e7ff; color: #312e81; }
.fleet-kpis .kpi-emerald { background: #ecfdf5; border-color: #d1fae5; color: #064e3b; }
.fleet-kpis .kpi-amber { background: #fffbeb; border-color: #fef3c7; color: #78350f; }
.fleet-kpis .kpi-rose { background: #fff1f6; border-color: #ffdce8; color: #881337; }

.fleet-accounts-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.fleet-accounts-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}
.fleet-accounts-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.fleet-accounts-controls input {
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--ui-line);
  font-size: 12px;
}
.fleet-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.fleet-filters button {
  border: 1px solid var(--ui-line);
  background: #fff;
  color: var(--ui-muted);
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.fleet-filters button.active {
  background: #6558e8;
  border-color: #6558e8;
  color: #fff;
}

.fleet-account-list {
  display: grid;
  gap: 8px;
}
.fleet-account-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--ui-line);
  background: #fff;
}
.fleet-account-row:hover {
  border-color: #c4bbf6;
}
.fleet-account-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.fleet-account-lv {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.fleet-account-lv.is-good { background: #ecfdf5; color: #047857; }
.fleet-account-lv.is-warn { background: #fffbeb; color: #b45309; }
.fleet-account-lv.is-muted { background: #f1f5f9; color: #475569; }
.fleet-account-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.fleet-account-info small {
  display: block;
  margin-top: 2px;
  color: var(--ui-muted);
  font-size: 11px;
}
.fleet-badge {
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
}
.fleet-badge.is-good { background: #dcfce7; color: #166534; }
.fleet-badge.is-warn { background: #fef3c7; color: #92400e; }
.fleet-badge.is-muted { background: #f1f5f9; color: #475569; }
.fleet-account-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fleet-detail-btn {
  min-height: 34px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
}

.fleet-tools-head small {
  color: var(--ui-rose);
  font-size: 11px;
  font-weight: 800;
}
.fleet-tools-head h3 {
  margin: 2px 0 12px;
  font-size: 17px;
  font-weight: 800;
}
.fleet-shortcuts {
  display: grid;
  gap: 10px;
}
.fleet-shortcuts button {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--ui-line);
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.fleet-shortcuts button:hover {
  border-color: #c4bbf6;
  background: #faf9ff;
}
.shortcut-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 18px;
}
.shortcut-icon.rose { background: #fff1f6; }
.shortcut-icon.indigo { background: #eef2ff; }
.shortcut-icon.emerald { background: #ecfdf5; }
.shortcut-icon.amber { background: #fffbeb; }
.fleet-shortcuts strong {
  display: block;
  font-size: 13px;
  color: var(--ui-ink);
}
.fleet-shortcuts small {
  display: block;
  font-size: 11px;
  color: var(--ui-muted);
}
.fleet-shortcuts em {
  font-style: normal;
  font-weight: 800;
  color: var(--ui-brand);
}

@media (max-width: 980px) {
  .fleet-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .fleet-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fleet-hero {
    padding: 16px;
  }
}

/* ==========================================================================
   Inner Auto Sub-modules ("Ruột con": Đơn Nhóm, Đơn Cư Dân, Trồng Hoa, Chợ, ...)
   ========================================================================== */
.section-card {
  border: 1px solid var(--ui-line) !important;
  border-radius: 20px !important;
  background: #fff !important;
  box-shadow: 0 10px 26px rgba(34, 48, 86, 0.04) !important;
}
.section-heading > span {
  border-radius: 12px;
  background: linear-gradient(135deg, #f3f0ff, #fff0f7);
  color: var(--ui-brand);
  border: 1px solid #e4ddfb;
  font-weight: 800;
}

.basic-group {
  border: 1px solid var(--ui-line) !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 8px 22px rgba(34, 48, 86, 0.04) !important;
}
.basic-group > header {
  background: linear-gradient(135deg, #faf9ff, #fff7fb) !important;
  border-bottom: 1px solid #eef0f7 !important;
}
.basic-group-meta em {
  border-radius: 99px;
  background: #f1eeff;
  color: var(--ui-brand);
  font-weight: 700;
}

.setting-detail {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #ebe8fa;
  background: linear-gradient(180deg, #faf9ff 0%, #ffffff 100%);
}
.setting-detail .detail-field,
.setting-detail .detail-label {
  gap: 8px;
}
.setting-detail input[type="number"],
.setting-detail input[type="search"],
.setting-detail select,
.subpanel input[type="search"],
.field-row input[type="number"] {
  border-radius: 10px !important;
  border: 1px solid #dcd8f0 !important;
  background: #fff !important;
  color: var(--ui-ink) !important;
}

.option-row,
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.config-option,
.segmented button,
.plant-strategy-options button,
.plant-type-options button {
  border-radius: 11px !important;
  border: 1px solid var(--ui-line) !important;
  background: #fff !important;
  color: var(--ui-ink) !important;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}
.config-option.active,
.segmented button.active,
.plant-strategy-options button.active,
.plant-type-options button.active {
  background: linear-gradient(135deg, var(--ui-brand), var(--ui-brand-2)) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 6px 14px rgba(101, 88, 232, 0.22);
}
.config-option.active small,
.config-option.active b {
  color: #fff !important;
}

/* Đơn Nhóm & Đơn Cư Dân / Đơn Khách / Đơn Vải Gỗ */
.group-order-fields,
.group-order-paid,
.group-order-status,
.order-progress,
.guest-order-detail .guest-full {
  border-radius: 12px !important;
  border: 1px solid #ebe8fa !important;
  background: #fff !important;
}
.group-order-status {
  padding: 10px 12px;
  margin-top: 8px;
}
.group-order-status b {
  color: var(--ui-ink);
}
.group-order-status span {
  color: var(--ui-muted);
}
.group-order-rule {
  margin: 8px 0 0;
  color: var(--ui-muted);
  font-size: 12px;
}
.reward-chest-history-open,
.pearl-daily-summary,
[data-group-order-history] {
  border-radius: 12px !important;
  border: 1px solid #e2dcf8 !important;
  background: #faf9ff !important;
  color: var(--ui-ink) !important;
}
[data-group-order-history].has-results em {
  background: #f3f0ff;
  color: var(--ui-brand);
  border-radius: 99px;
}

/* Trồng hoa, Chợ hoa, Hoa nghệ thuật, Hoa linh, Trộm hoa, Ngọc trai */
.subpanel,
.plant-mode-block,
.plant-reserve-card,
.plant-ad-speed-card,
.plant-strategy-card,
.plant-target-card,
.plant-exclusion,
.plant-type-row,
.plant-next-action,
.fresh-market-panel,
.art-sale-panel,
.spirit-panel,
.steal-panel,
.steal-mode-picker,
.field-row,
.setting-line,
.quota {
  border-radius: 15px !important;
  border: 1px solid var(--ui-line) !important;
  background: #fafbfe !important;
}
.choice-card,
.choice-grid > button {
  border-radius: 14px !important;
  border: 1px solid var(--ui-line) !important;
  background: #fff !important;
}
.choice-card.active,
.choice-grid > button.active {
  border-color: var(--ui-brand) !important;
  background: linear-gradient(135deg, #f5f3ff, #fff4f9) !important;
  box-shadow: 0 8px 18px rgba(101, 88, 232, 0.12) !important;
}
.daily-reward-row,
.pearl-place-toolbar,
.pearl-draw-balance,
.game-task-tabs button,
.dragon-boat-skip-green {
  border-radius: 12px !important;
  border: 1px solid #ebe8fa !important;
  background: #fff !important;
}
.game-task-tabs button.active {
  background: linear-gradient(135deg, var(--ui-brand), var(--ui-brand-2)) !important;
  border-color: transparent !important;
  color: #fff !important;
}

/* Dialogs (Đơn Nhóm, Làm Hoa Nghệ Thuật, Rương thưởng...) */
dialog {
  border: 1px solid var(--ui-line) !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 60px rgba(24, 34, 68, 0.2) !important;
}

/* ==========================================================================
   Full Sub-page Redesign Matching Home Page ("V??n hoa c?a b?n")
   ========================================================================== */

/* Section Hero Headers */
.section-card {
  overflow: hidden;
  padding: 0 !important;
}
.section-card > .section-heading {
  padding: 16px 18px !important;
  margin: 0 !important;
  background: linear-gradient(135deg, #fff5fb 0%, #f5f3ff 65%, #f0f9ff 100%) !important;
  border-bottom: 1px solid #ebe8fa !important;
}
.section-card > :not(.section-heading) {
  margin-left: 18px;
  margin-right: 18px;
}
.section-card > :nth-child(2) {
  margin-top: 16px;
}
.section-card > :last-child {
  margin-bottom: 18px;
}
.section-heading > span {
  width: 36px;
  height: 36px;
  border-radius: 12px !important;
  background: linear-gradient(135deg, var(--ui-brand), var(--ui-brand-2)) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 6px 14px rgba(101, 88, 232, 0.24);
}
.section-heading h2 {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: var(--ui-ink) !important;
}
.section-heading p {
  color: var(--ui-muted) !important;
  font-size: 12px !important;
}

/* Basic Auto Groups & Setting Cards */
.basic-group > header {
  padding: 15px 18px !important;
  background: linear-gradient(135deg, #fff5fb 0%, #f5f3ff 70%, #f4f8ff 100%) !important;
}
.basic-group .settings-grid,
.basic-group > .basic-group-list {
  padding: 14px !important;
  gap: 10px !important;
}
.basic-group-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-auto-flow: row !important;
  gap: 10px !important;
  padding: 14px !important;
  align-items: stretch;
}
.basic-group-grid > .setting-card {
  height: 100%;
}
.basic-group-grid > .setting-card.has-detail {
  grid-column: 1 / -1 !important;
  height: auto;
}
@media (max-width: 1120px) {
  .basic-group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 700px) {
  .basic-group-grid {
    grid-template-columns: 1fr !important;
    padding: 10px !important;
  }
}
.setting-card {
  border-radius: 16px !important;
  border: 1px solid var(--ui-line) !important;
  padding: 14px 16px !important;
  box-shadow: 0 4px 12px rgba(34, 48, 86, 0.03) !important;
}
.setting-card:hover {
  border-color: #c4bbf6 !important;
  box-shadow: 0 10px 24px rgba(101, 88, 232, 0.08) !important;
}
.setting-release-badge.is-new,
.setting-badge {
  border-radius: 99px !important;
  background: linear-gradient(135deg, #f43f8e, #7464f0) !important;
  color: #fff !important;
  border: 0 !important;
}

/* Ch? hoa t??i: 9 k? b?n */
.fresh-market-panel {
  padding: 14px 16px !important;
  background: linear-gradient(180deg, #faf9ff 0%, #ffffff 100%) !important;
}
#freshMarketIncome {
  border-radius: 99px !important;
  padding: 5px 12px !important;
  font-weight: 800 !important;
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
}
.fresh-market-shelves {
  gap: 10px !important;
}
.fresh-market-shelf {
  border-radius: 16px !important;
  border: 1px solid var(--ui-line) !important;
  background: #fff !important;
  padding: 12px 10px !important;
  box-shadow: 0 4px 12px rgba(34, 48, 86, 0.03);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.fresh-market-shelf.empty {
  border: 1.5px dashed #d6d0f5 !important;
  background: #faf9ff !important;
  box-shadow: none;
}
.fresh-market-shelf.locked {
  background: #f5f6fa !important;
  border-color: #e6e8f2 !important;
  opacity: 0.78;
}
.fresh-market-shelf.occupied {
  border-color: #c4bbf6 !important;
  background: linear-gradient(180deg, #ffffff 0%, #faf9ff 100%) !important;
  box-shadow: 0 8px 18px rgba(101, 88, 232, 0.09);
}
.fresh-market-shelf > span {
  border-radius: 99px !important;
  background: linear-gradient(135deg, var(--ui-brand), var(--ui-brand-2)) !important;
  color: #fff !important;
  font-weight: 800 !important;
  box-shadow: 0 3px 8px rgba(101, 88, 232, 0.25);
}
.fresh-market-shelf.locked > span {
  background: #94a3b8 !important;
  box-shadow: none;
}

/* Khung th? Hoa & V?t ph?m (gi? nguy?n h?nh ?nh hoa/v?t ph?m, l?m ??p khung + t?n + s? l??ng) */
.flower-tools {
  gap: 10px !important;
  padding: 10px 12px !important;
  border-radius: 14px !important;
  background: #fff !important;
  border: 1px solid var(--ui-line) !important;
}
.flower-tools .search-box {
  border-radius: 11px !important;
  border: 1px solid #e2dff3 !important;
  background: #faf9ff !important;
}
.flower-bg-filters button,
.chips .chip {
  border-radius: 99px !important;
  border: 1px solid var(--ui-line) !important;
  background: #fff !important;
  font-weight: 700 !important;
  transition: all 0.15s ease;
}
.flower-bg-filters button.active,
.chips .chip.active {
  background: linear-gradient(135deg, var(--ui-brand), var(--ui-brand-2)) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 6px 14px rgba(101, 88, 232, 0.24) !important;
}
.flower-card {
  border-radius: 16px !important;
  border: 1.5px solid #e7e4f5 !important;
  padding: 10px 8px 9px !important;
  box-shadow: 0 4px 12px rgba(34, 48, 86, 0.04) !important;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
}
.flower-card:hover {
  transform: translateY(-2px);
  border-color: #b8adec !important;
  box-shadow: 0 10px 20px rgba(101, 88, 232, 0.11) !important;
}
.flower-card.selected {
  border: 2px solid var(--ui-brand) !important;
  box-shadow: 0 10px 22px rgba(101, 88, 232, 0.18) !important;
}
.flower-card .flower-bg-name {
  border-radius: 99px !important;
  padding: 2px 7px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}
.flower-card b {
  font-variant-numeric: tabular-nums;
  font-weight: 800 !important;
  color: var(--ui-ink) !important;
}
.flower-card small {
  font-weight: 700 !important;
  color: var(--ui-muted) !important;
}

/* Art Sale Racks & Spirit Slots & Plant Plots */
.art-rack,
.spirit-slot,
.art-item,
.spirit-item,
.plot-card {
  border-radius: 16px !important;
  border: 1px solid var(--ui-line) !important;
  background: #fff !important;
  box-shadow: 0 4px 12px rgba(34, 48, 86, 0.03);
}
.art-rack.selling,
.spirit-slot.running {
  border-color: #c4bbf6 !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8f6ff 100%) !important;
}
.art-rack > span,
.spirit-slot-number {
  border-radius: 99px !important;
  background: linear-gradient(135deg, var(--ui-brand), var(--ui-brand-2)) !important;
  color: #fff !important;
}
.art-item.selected,
.spirit-item.selected {
  border: 2px solid var(--ui-brand) !important;
  background: linear-gradient(135deg, #f6f4ff, #fff5fa) !important;
}

/* Resource Center (Kho, Ti?m Hoa, B?i d??ng Hoa, Th??ng nh?n du h?nh) & Right Rail */
.resource-center {
  border-radius: 20px !important;
  border: 1px solid var(--ui-line) !important;
  background: #fff !important;
  box-shadow: 0 10px 26px rgba(34, 48, 86, 0.05) !important;
  padding: 16px !important;
}
.right-rail .activity,
.right-rail .card {
  border-radius: 20px !important;
  border: 1px solid var(--ui-line) !important;
  background: #fff !important;
  box-shadow: 0 10px 26px rgba(34, 48, 86, 0.04) !important;
}

@media (max-width: 700px) {
  .section-card > .section-heading {
    padding: 14px !important;
  }
  .section-card > :not(.section-heading) {
    margin-left: 12px;
    margin-right: 12px;
  }
  .section-card > :last-child {
    margin-bottom: 14px;
  }
  .basic-group > header {
    padding: 13px 14px !important;
  }
  .basic-group .settings-grid,
  .basic-group > .basic-group-list {
    padding: 10px !important;
  }
  .setting-detail {
    padding: 10px 11px;
  }
  .option-row,
  .segmented {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .plant-dashboard,
  .plant-strategy-grid,
  .steal-left-column,
  .steal-right-column {
    grid-template-columns: 1fr !important;
  }
}

/* Integration overrides retained from the current production UI. */
.fleet-add-btn { text-decoration: none !important; }
.fleet-accounts-controls input { min-width: 220px; }
@media (max-width: 700px) {
  .garden-overview .garden-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 6px; }
  .garden-overview .garden-stats > div { padding: 8px 10px; border: 1px solid var(--ui-line); }
  .garden-overview .garden-stats strong { overflow-wrap: anywhere; font-size: 14px; }
  .fleet-accounts-controls, .fleet-accounts-controls input { width: 100%; }
}

/* Full-site audit: prevent stats/nav overflow and compact tall inventories. */
#gardenOverview {
  overflow: hidden;
}
#gardenOverview .garden-stats {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
}
#gardenOverview .garden-stats > div {
  min-width: 0 !important;
  width: auto !important;
  overflow: hidden;
}
#gardenOverview .garden-stats strong {
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
#autoCategoryNav {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 10px !important;
}
#autoCategoryNav .auto-category-tabs {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  overflow: visible !important;
}
#autoCategoryNav .auto-category-tabs > button {
  min-width: 0 !important;
  width: 100% !important;
}
#basicSettings .settings-grid,
#basicSettings .basic-group-list {
  max-height: 520px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
#plantExcludeInventory {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
  gap: 8px !important;
  max-height: 220px !important;
  height: auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
#flowerInventory,
#artInventory,
#spiritInventory,
.resource-center .flower-grid {
  max-height: 320px !important;
  overflow-y: auto !important;
  scrollbar-gutter: stable;
}
@media (max-width: 1180px) {
  #gardenOverview .garden-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 980px) {
  .layout-grid {
    display: flex !important;
    flex-direction: column !important;
  }
  .layout-grid > .content-column {
    order: 1 !important;
    width: 100% !important;
  }
  .layout-grid > .right-rail {
    order: 2 !important;
    width: 100% !important;
  }
  #autoCategoryNav .auto-category-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 700px) {
  #gardenOverview .garden-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  #gardenOverview .garden-stats strong {
    font-size: 14px !important;
  }
  #basicSettings .settings-grid,
  #basicSettings .basic-group-list {
    max-height: 440px;
  }
  #plantExcludeInventory {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Steal Cap & Palace Exact-Rarity Policy Controls */
[data-section="06"] select[data-setting-key^="steal_"],
[data-palace-policy] select[data-palace-key],
.main-quest-permissions select[data-main-quest-cap] {
  min-height: 36px;
  min-width: 170px;
  padding: 6px 10px;
  border-radius: 10px !important;
  border: 1px solid #dcd8f0 !important;
  background: #fff !important;
  color: var(--ui-ink) !important;
  font-size: 12px;
  font-weight: 600;
}
.dragon-boat-policy {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}
.dragon-boat-policy .field-row {
  padding: 10px 12px;
  background: #fff !important;
}
.dragon-boat-policy .subpanel-title {
  margin-top: 2px;
}
[data-palace-rarities] {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
@media (max-width: 700px) {
  [data-section="06"] .field-row,
  .dragon-boat-policy .field-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  [data-section="06"] select[data-setting-key^="steal_"],
  [data-palace-policy] select[data-palace-key] {
    width: 100%;
    min-width: 0;
  }
}

/* ==========================================================================
   Editorial Bloom: Typography Upgrade + Auto Light/Dark Theme Switcher
   ========================================================================== */
body {
  font-family: "Be Vietnam Pro", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.topbar h1,
.fleet-hero h2,
.fleet-kpi strong,
.garden-stats strong,
.section-heading h2,
.basic-group h3,
.fleet-accounts-head h3,
.fleet-tools-head h3 {
  font-family: "Plus Jakarta Sans", "Be Vietnam Pro", system-ui, sans-serif;
  letter-spacing: -0.025em;
}
.fleet-kpi strong,
.garden-stats strong,
.flower-card b,
.quota strong {
  font-variant-numeric: tabular-nums;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 99px;
  background: var(--ui-surface);
  border: 1px solid var(--ui-line);
  box-shadow: 0 4px 14px rgba(28, 38, 82, 0.06);
}
.theme-switch button {
  border: 0;
  background: transparent;
  color: var(--ui-muted);
  padding: 5px 10px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease;
}
.theme-switch button.active {
  background: linear-gradient(135deg, var(--ui-brand), var(--ui-brand-2));
  color: #fff;
}
@media (max-width: 700px) {
  .theme-switch button {
    padding: 4px 8px;
    font-size: 11px;
  }
}

/* Dark Theme Tokens (Active when data-theme-mode="dark" or "auto" + OS dark) */
@media (prefers-color-scheme: dark) {
  :root[data-theme-mode="auto"] {
    --ui-bg: #0d1019;
    --ui-surface: #151927;
    --ui-surface-soft: #1c2133;
    --ui-ink: #f1f4ff;
    --ui-muted: #9aa4c7;
    --ui-line: #272e45;
    --ui-brand: #7d71ff;
    --ui-brand-2: #a48cff;
    --ui-rose: #f06298;
    --ui-shadow: 0 16px 38px rgba(0, 0, 0, 0.36);
  }
}

/* Final contrast corrections for legacy markup whose class names do not describe a surface. */
:root[data-theme-mode="dark"] :is(
  .fleet-kpis .kpi-indigo, .fleet-kpis .kpi-emerald, .fleet-kpis .kpi-amber, .fleet-kpis .kpi-rose,
  .cultivate-shop-link, .peddler-permission, .peddler-next, .peddler-next > i,
  #gardenStatus, .changelog-version, .release-content
) {
  background: var(--ui-surface-soft) !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] :is(
  .fleet-kpis article, .cultivate-shop-link, .peddler-permission, .peddler-next,
  #gardenStatus, .changelog-version, .release-content
) :is(h1,h2,h3,h4,p,label,strong,b,span,em):not(.badge) {
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] :is(
  .fleet-kpis article, .cultivate-shop-link, .peddler-permission, .peddler-next,
  #gardenStatus, .changelog-version, .release-content
) small {
  color: var(--ui-muted) !important;
}

/* Release-note and utility badges use the same dark ink/surface at final cascade priority. */
:root[data-theme-mode="dark"] :is(.changelog-version span,.release-content em,.release-icon,.garden-icon,.land-unlock-next,.land-unlock-next>i) {
  background: #20263a !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] :is(.changelog-version,.release-content,.land-unlock-next) :is(p,small,span) {
  color: var(--ui-muted) !important;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme-mode="auto"] :is(
    .fleet-kpis .kpi-indigo, .fleet-kpis .kpi-emerald, .fleet-kpis .kpi-amber, .fleet-kpis .kpi-rose,
    .cultivate-shop-link, .peddler-permission, .peddler-next, .peddler-next > i,
    #gardenStatus, .changelog-version, .release-content
  ) {
    background: var(--ui-surface-soft) !important;
    border-color: var(--ui-line) !important;
    color: var(--ui-ink) !important;
  }
  :root[data-theme-mode="auto"] :is(
    .fleet-kpis article, .cultivate-shop-link, .peddler-permission, .peddler-next,
    #gardenStatus, .changelog-version, .release-content
  ) :is(h1,h2,h3,h4,p,label,strong,b,span,em):not(.badge) {
    color: var(--ui-ink) !important;
  }
  :root[data-theme-mode="auto"] :is(
    .fleet-kpis article, .cultivate-shop-link, .peddler-permission, .peddler-next,
    #gardenStatus, .changelog-version, .release-content
  ) small {
    color: var(--ui-muted) !important;
  }
}

/* Dark surfaces must never inherit the legacy light-theme ink colors. */
:root[data-theme-mode="dark"] .main,
:root[data-theme-mode="dark"] .main label,
:root[data-theme-mode="dark"] .main p,
:root[data-theme-mode="dark"] .main small,
:root[data-theme-mode="dark"] dialog,
:root[data-theme-mode="dark"] dialog label,
:root[data-theme-mode="dark"] dialog p,
:root[data-theme-mode="dark"] dialog small,
:root[data-theme-mode="dark"] .setting-description,
:root[data-theme-mode="dark"] .setting-card small,
:root[data-theme-mode="dark"] .field-row small,
:root[data-theme-mode="dark"] .auto-category-copy small,
:root[data-theme-mode="dark"] .fleet-account-meta,
:root[data-theme-mode="dark"] .fleet-account-subtitle,
:root[data-theme-mode="dark"] .market-buy-history-panel p,
:root[data-theme-mode="dark"] .market-buy-history-panel small,
:root[data-theme-mode="dark"] .activity-list article,
:root[data-theme-mode="dark"] .activity-dialog-list article {
  color: var(--ui-muted) !important;
}
:root[data-theme-mode="dark"] .main h1,
:root[data-theme-mode="dark"] .main h2,
:root[data-theme-mode="dark"] .main h3,
:root[data-theme-mode="dark"] .main h4,
:root[data-theme-mode="dark"] dialog h1,
:root[data-theme-mode="dark"] dialog h2,
:root[data-theme-mode="dark"] dialog h3,
:root[data-theme-mode="dark"] dialog h4,
:root[data-theme-mode="dark"] .setting-name,
:root[data-theme-mode="dark"] .market-buy-history-panel h3 {
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] button.active,
:root[data-theme-mode="dark"] .active > span,
:root[data-theme-mode="dark"] .active > b,
:root[data-theme-mode="dark"] .active > strong,
:root[data-theme-mode="dark"] .status-on,
:root[data-theme-mode="dark"] .toggle.on {
  color: #fff !important;
}

/* Dark mode: legacy Theft cards still carried hard-coded white surfaces. */
:root[data-theme-mode="dark"] .steal-mode-picker,
:root[data-theme-mode="dark"] .steal-history-item,
:root[data-theme-mode="dark"] .steal-cycle-status,
:root[data-theme-mode="dark"] .steal-cycle-status > span,
:root[data-theme-mode="dark"] .steal-history .empty-panel,
:root[data-theme-mode="dark"] .steal-flower-summary .empty-panel {
  background: var(--ui-surface-soft) !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] .steal-mode-picker > div > strong,
:root[data-theme-mode="dark"] .steal-history-item strong,
:root[data-theme-mode="dark"] .steal-cycle-status strong {
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] .steal-history-item small,
:root[data-theme-mode="dark"] .steal-mode-picker small,
:root[data-theme-mode="dark"] .steal-cycle-status > span {
  color: var(--ui-muted) !important;
}
:root[data-theme-mode="dark"] .steal-history-item.stolen > span {
  background: #173827 !important;
  color: #8ee6ac !important;
}
:root[data-theme-mode="dark"] .steal-history-item.failed > span {
  background: #442128 !important;
  color: #ff9da5 !important;
}
/* Rarity chips deliberately stay pastel, so their text must use dark ink. */
:root[data-theme-mode="dark"] .steal-flower em,
:root[data-theme-mode="dark"] .steal-flower b {
  color: #34405a !important;
}
:root[data-theme-mode="dark"] #autoSettings .basic-group > header > span.menu-number,
:root[data-theme-mode="dark"] #autoSettings .section-card > .section-heading > span {
  color: #fff !important;
  opacity: 1 !important;
}
:root[data-theme-mode="dark"] {
  --ui-bg: #0d1019;
  --ui-surface: #151927;
  --ui-surface-soft: #1c2133;
  --ui-ink: #f1f4ff;
  --ui-muted: #9aa4c7;
  --ui-line: #272e45;
  --ui-brand: #7d71ff;
  --ui-brand-2: #a48cff;
  --ui-rose: #f06298;
  --ui-shadow: 0 16px 38px rgba(0, 0, 0, 0.36);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme-mode="auto"] body,
  :root[data-theme-mode="auto"] .app-shell {
    background: var(--ui-bg) !important;
    color: var(--ui-ink) !important;
  }
  :root[data-theme-mode="auto"] .sidebar {
    background: linear-gradient(180deg, #090b12 0%, #0f1320 65%, #16182c 100%) !important;
    border-right: 1px solid var(--ui-line);
  }
  :root[data-theme-mode="auto"] .card,
  :root[data-theme-mode="auto"] .section-card,
  :root[data-theme-mode="auto"] .basic-group,
  :root[data-theme-mode="auto"] .setting-card,
  :root[data-theme-mode="auto"] .fleet-kpi,
  :root[data-theme-mode="auto"] .fleet-account-row,
  :root[data-theme-mode="auto"] .fleet-shortcuts button,
  :root[data-theme-mode="auto"] .fresh-market-shelf,
  :root[data-theme-mode="auto"] .flower-card,
  :root[data-theme-mode="auto"] .art-rack,
  :root[data-theme-mode="auto"] .spirit-slot,
  :root[data-theme-mode="auto"] .plot-card,
  :root[data-theme-mode="auto"] .resource-center,
  :root[data-theme-mode="auto"] .right-rail .activity,
  :root[data-theme-mode="auto"] .right-rail .card,
  :root[data-theme-mode="auto"] .subpanel,
  :root[data-theme-mode="auto"] .setting-detail,
  :root[data-theme-mode="auto"] .auto-category-nav,
  :root[data-theme-mode="auto"] .auto-category-tabs > button,
  :root[data-theme-mode="auto"] .garden-overview,
  :root[data-theme-mode="auto"] .garden-stats > div,
  :root[data-theme-mode="auto"] .activity-list article,
  :root[data-theme-mode="auto"] .dragon-boat-policy .field-row,
  :root[data-theme-mode="auto"] .choice-card,
  :root[data-theme-mode="auto"] .choice-grid > button,
  :root[data-theme-mode="auto"] .config-option,
  :root[data-theme-mode="auto"] .segmented button,
  :root[data-theme-mode="auto"] .fleet-filters button,
  :root[data-theme-mode="auto"] dialog {
    background: var(--ui-surface) !important;
    border-color: var(--ui-line) !important;
    color: var(--ui-ink) !important;
  }
  :root[data-theme-mode="auto"] .fleet-hero,
  :root[data-theme-mode="auto"] .section-card > .section-heading,
  :root[data-theme-mode="auto"] .basic-group > header {
    background: linear-gradient(135deg, rgba(240, 98, 152, 0.14) 0%, rgba(125, 113, 255, 0.18) 65%, rgba(56, 189, 248, 0.1) 100%) !important;
    border-color: var(--ui-line) !important;
  }
  :root[data-theme-mode="auto"] input,
  :root[data-theme-mode="auto"] select,
  :root[data-theme-mode="auto"] textarea,
  :root[data-theme-mode="auto"] .search-box,
  :root[data-theme-mode="auto"] .flower-tools {
    background: var(--ui-surface-soft) !important;
    border-color: var(--ui-line) !important;
    color: var(--ui-ink) !important;
  }
  :root[data-theme-mode="auto"] .topbar h1,
  :root[data-theme-mode="auto"] .setting-name,
  :root[data-theme-mode="auto"] .flower-card b,
  :root[data-theme-mode="auto"] .garden-stats strong,
  :root[data-theme-mode="auto"] .fleet-kpi strong,
  :root[data-theme-mode="auto"] .fleet-shortcuts strong {
    color: var(--ui-ink) !important;
  }
  :root[data-theme-mode="auto"] small,
  :root[data-theme-mode="auto"] p {
    color: var(--ui-muted);
  }
}

:root[data-theme-mode="dark"] body,
:root[data-theme-mode="dark"] .app-shell {
  background: var(--ui-bg) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] .sidebar {
  background: linear-gradient(180deg, #090b12 0%, #0f1320 65%, #16182c 100%) !important;
  border-right: 1px solid var(--ui-line);
}
:root[data-theme-mode="dark"] .card,
:root[data-theme-mode="dark"] .section-card,
:root[data-theme-mode="dark"] .basic-group,
:root[data-theme-mode="dark"] .setting-card,
:root[data-theme-mode="dark"] .fleet-kpi,
:root[data-theme-mode="dark"] .fleet-account-row,
:root[data-theme-mode="dark"] .fleet-shortcuts button,
:root[data-theme-mode="dark"] .fresh-market-shelf,
:root[data-theme-mode="dark"] .flower-card,
:root[data-theme-mode="dark"] .art-rack,
:root[data-theme-mode="dark"] .spirit-slot,
:root[data-theme-mode="dark"] .plot-card,
:root[data-theme-mode="dark"] .resource-center,
:root[data-theme-mode="dark"] .right-rail .activity,
:root[data-theme-mode="dark"] .right-rail .card,
:root[data-theme-mode="dark"] .subpanel,
:root[data-theme-mode="dark"] .setting-detail,
:root[data-theme-mode="dark"] .auto-category-nav,
:root[data-theme-mode="dark"] .auto-category-tabs > button,
:root[data-theme-mode="dark"] .garden-overview,
:root[data-theme-mode="dark"] .garden-stats > div,
:root[data-theme-mode="dark"] .activity-list article,
:root[data-theme-mode="dark"] .dragon-boat-policy .field-row,
:root[data-theme-mode="dark"] .choice-card,
:root[data-theme-mode="dark"] .choice-grid > button,
:root[data-theme-mode="dark"] .config-option,
:root[data-theme-mode="dark"] .segmented button,
:root[data-theme-mode="dark"] .fleet-filters button,
:root[data-theme-mode="dark"] dialog {
  background: var(--ui-surface) !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] .fleet-hero,
:root[data-theme-mode="dark"] .section-card > .section-heading,
:root[data-theme-mode="dark"] .basic-group > header {
  background: linear-gradient(135deg, rgba(240, 98, 152, 0.14) 0%, rgba(125, 113, 255, 0.18) 65%, rgba(56, 189, 248, 0.1) 100%) !important;
  border-color: var(--ui-line) !important;
}
:root[data-theme-mode="dark"] input,
:root[data-theme-mode="dark"] select,
:root[data-theme-mode="dark"] textarea,
:root[data-theme-mode="dark"] .search-box,
:root[data-theme-mode="dark"] .flower-tools {
  background: var(--ui-surface-soft) !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] .topbar h1,
:root[data-theme-mode="dark"] .setting-name,
:root[data-theme-mode="dark"] .flower-card b,
:root[data-theme-mode="dark"] .garden-stats strong,
:root[data-theme-mode="dark"] .fleet-kpi strong,
:root[data-theme-mode="dark"] .fleet-shortcuts strong {
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] small,
:root[data-theme-mode="dark"] p {
  color: var(--ui-muted);
}

/* ==========================================================================
   Popups (Doanh thu, Nhật ký, Lịch sử, Xác nhận, VietQR) & Activity Log
   ========================================================================== */
#activityList,
.activity-dialog-list {
  display: grid;
  gap: 8px;
}
#activityList {
  gap: 6px;
}
#activityList .activity-item {
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 7px;
  padding: 7px 8px !important;
  border-radius: 11px !important;
}
#activityList .activity-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 12px;
}
#activityList .activity-copy .time {
  font-size: 9.5px;
}
#activityList .activity-copy p {
  margin-top: 1px;
  font-size: 11px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
#activityList .activity-item > em {
  padding: 2px 6px;
  font-size: 9px;
}
.activity-item {
  --act-color: #6558e8;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px !important;
  border-radius: 14px !important;
  border: 1px solid var(--ui-line) !important;
  border-left: 3.5px solid var(--act-color) !important;
  background: color-mix(in srgb, var(--act-color) 5%, var(--ui-surface-soft)) !important;
  transition: border-color 0.16s ease, transform 0.14s ease;
}
.activity-item:hover {
  border-color: color-mix(in srgb, var(--act-color) 55%, var(--ui-line)) !important;
  border-left-color: var(--act-color) !important;
}
.activity-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--act-color) 16%, var(--ui-surface));
  border: 1px solid color-mix(in srgb, var(--act-color) 28%, var(--ui-line));
  color: var(--act-color);
  font-size: 15px;
}
.activity-copy .time {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--act-color);
  font-variant-numeric: tabular-nums;
}
.activity-copy p {
  margin: 2px 0 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ui-ink);
  line-height: 1.4;
}
.activity-item > em {
  font-style: normal;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 800;
  background: color-mix(in srgb, var(--act-color) 15%, transparent);
  color: var(--act-color);
  white-space: nowrap;
}
.activity-order { --act-color: #6558e8; }
.activity-plant { --act-color: #10b981; }
.activity-harvest { --act-color: #059669; }
.activity-water { --act-color: #06b6d4; }
.activity-steal { --act-color: #f43f5e; }
.activity-palace { --act-color: #f59e0b; }
.activity-market { --act-color: #ec4899; }
.activity-pearl { --act-color: #8b5cf6; }
.activity-guild { --act-color: #3b82f6; }
.activity-reward { --act-color: #d97706; }
.activity-album { --act-color: #a855f7; }
.activity-connection { --act-color: #0ea5e9; }
.activity-warning { --act-color: #ef4444; }
.activity-general { --act-color: #64748b; }

/* Dialogs & Revenue Popup */
dialog.revenue-dialog,
dialog.activity-dialog,
dialog.art-craft-dialog,
dialog.confirm-dialog,
dialog.billing-pay-dialog,
dialog#gardenListDialog {
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid var(--ui-line) !important;
  border-radius: 22px !important;
  background: var(--ui-surface) !important;
  color: var(--ui-ink) !important;
  box-shadow: 0 26px 70px rgba(15, 20, 45, 0.28) !important;
}
#activityDialog[open] {
  display: flex;
  flex-direction: column;
  width: min(760px, calc(100vw - 24px));
  height: min(760px, 88dvh);
  max-height: 88dvh;
}
#activityDialog .activity-dialog-head,
#activityDialog .activity-dialog-summary {
  flex: 0 0 auto;
}
#activityDialog .activity-dialog-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-top: 12px;
  padding-bottom: 18px;
  align-content: start;
  scrollbar-gutter: stable;
}
dialog::backdrop {
  background: rgba(10, 14, 28, 0.56);
  backdrop-filter: blur(5px);
}
.revenue-head,
.activity-dialog-head,
.garden-dialog-head,
.art-craft-dialog header {
  padding: 16px 20px !important;
  background: linear-gradient(135deg, rgba(224, 82, 136, 0.09) 0%, rgba(101, 88, 232, 0.12) 65%, rgba(56, 189, 248, 0.08) 100%) !important;
  border-bottom: 1px solid var(--ui-line) !important;
}
.revenue-head small,
.activity-dialog-head small,
.garden-dialog-head p {
  color: var(--ui-rose) !important;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.revenue-head h2,
.activity-dialog-head h2,
.garden-dialog-head h2 {
  font-family: "Plus Jakarta Sans", "Be Vietnam Pro", sans-serif;
  letter-spacing: -0.025em;
  color: var(--ui-ink) !important;
}
.revenue-days {
  padding: 12px 20px 0 !important;
  gap: 6px !important;
}
.revenue-days button {
  border-radius: 99px !important;
  border: 1px solid var(--ui-line) !important;
  background: var(--ui-surface-soft) !important;
  color: var(--ui-ink) !important;
  font-weight: 700 !important;
}
.revenue-days button.active {
  background: linear-gradient(135deg, var(--ui-brand), var(--ui-brand-2)) !important;
  border-color: transparent !important;
  color: #fff !important;
}
.revenue-report,
.activity-dialog-summary,
.activity-dialog-list,
.revenue-live {
  padding-left: 20px !important;
  padding-right: 20px !important;
}
.revenue-report article,
.activity-dialog-summary > span,
.market-trade-row,
.reward-chest-history-list > article {
  border-radius: 14px !important;
  border: 1px solid var(--ui-line) !important;
  background: var(--ui-surface-soft) !important;
  color: var(--ui-ink) !important;
}
.revenue-report strong,
.activity-dialog-summary b {
  font-variant-numeric: tabular-nums;
}
@media (max-width: 700px) {
  dialog.revenue-dialog,
  dialog.activity-dialog,
  dialog.art-craft-dialog,
  dialog.confirm-dialog,
  dialog.billing-pay-dialog,
  dialog#gardenListDialog {
    width: calc(100vw - 18px) !important;
    max-width: calc(100vw - 18px) !important;
    max-height: 88dvh !important;
  }
  .revenue-head,
  .activity-dialog-head,
  .revenue-days,
  .revenue-report,
  .activity-dialog-summary,
  .activity-dialog-list {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}
.market-buy-layout{display:grid;grid-template-columns:minmax(0,48fr) minmax(0,52fr);gap:24px;align-items:start}.market-buy-layout>#marketBuySettings{display:block;width:100%;min-width:0}.market-buy-layout>#marketBuySettings>.setting-card,.market-buy-layout>#marketBuySettings .setting-line,.market-buy-layout>#marketBuySettings .setting-detail{box-sizing:border-box;width:100%;max-width:none}.market-buy-layout>#marketBuySettings .field-row{grid-template-columns:minmax(260px,1fr) minmax(130px,180px)}.market-scan-fixed>b{color:#5c4ee5;white-space:nowrap}.market-buy-history-panel{border:1px solid #dfe3f4;border-radius:18px;background:#fbfcff;padding:18px;min-height:260px}.market-buy-history-panel>header{padding-bottom:14px;border-bottom:1px solid #e7e9f4}.market-buy-history-panel>header small{color:#6b5ee8;font-size:10px;font-weight:800;letter-spacing:.12em}.market-buy-history-panel h3{margin:5px 0 3px;color:#16213d;font-size:18px}.market-buy-history-panel p{margin:0;color:#7b8499;font-size:12px}.market-buy-history-list{display:grid;gap:10px;margin-top:14px;max-height:430px;overflow:auto}.market-buy-history-list .market-trade-row{margin:0;background:#fff}@media(max-width:1100px){.market-buy-layout{grid-template-columns:1fr}.market-buy-history-panel{min-height:0}}@media(max-width:700px){.market-buy-layout>#marketBuySettings .field-row{grid-template-columns:1fr}}

/* ==========================================================================
   Typography & Card Uniformity + Mobile Header/Filter Fixes (Light & Dark)
   ========================================================================== */
.basic-group-grid > .setting-card:not(.has-detail) {
  min-height: 76px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.setting-card .setting-name {
  font-size: 13.5px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
}
.setting-card small,
.basic-group > header p,
.section-heading p {
  font-size: 12px !important;
  line-height: 1.45 !important;
}
.basic-group h3 {
  font-size: 15.5px !important;
  font-weight: 800 !important;
}
#gardenOverview {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
@media (max-width: 700px) {
  .topbar {
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 8px 10px !important;
  }
  .topbar h1 {
    font-size: 19px !important;
    white-space: nowrap;
  }
  .topbar .top-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
  }
  .flower-bg-filters {
    display: flex !important;
    flex-wrap: wrap !important;
    overflow-x: visible !important;
    gap: 6px !important;
  }
  .fleet-account-title {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 4px !important;
  }
}

/* ==========================================================================
   Comprehensive Dark Mode Overrides for All Legacy CSS Modules (5 Pages)
   ========================================================================== */
:root[data-theme-mode="dark"] {
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme-mode="auto"] {
    color-scheme: dark;
  }
}

/* Dark Mode: Global Headings, Topbar, Buttons & Legacy Surfaces */
:root[data-theme-mode="dark"] .topbar,
:root[data-theme-mode="dark"] .menu-button,
:root[data-theme-mode="dark"] .icon-button,
:root[data-theme-mode="dark"] .sync-status {
  background: var(--ui-surface) !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] .main h1,
:root[data-theme-mode="dark"] .main h2,
:root[data-theme-mode="dark"] .main h3,
:root[data-theme-mode="dark"] .main h4,
:root[data-theme-mode="dark"] .main strong,
:root[data-theme-mode="dark"] .main b,
:root[data-theme-mode="dark"] dialog h2,
:root[data-theme-mode="dark"] dialog h3,
:root[data-theme-mode="dark"] dialog strong,
:root[data-theme-mode="dark"] dialog b,
:root[data-theme-mode="dark"] #gardenName,
:root[data-theme-mode="dark"] .auto-category-copy strong {
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] .fleet-kpi,
:root[data-theme-mode="dark"] .fleet-toolbar,
:root[data-theme-mode="dark"] .fleet-tab-pill,
:root[data-theme-mode="dark"] .fleet-online-pill,
:root[data-theme-mode="dark"] .fleet-account-lv,
:root[data-theme-mode="dark"] .fleet-badge,
:root[data-theme-mode="dark"] .fleet-detail-btn,
:root[data-theme-mode="dark"] .fleet-remove-btn,
:root[data-theme-mode="dark"] .shortcut-icon,
:root[data-theme-mode="dark"] .reconnect-delay,
:root[data-theme-mode="dark"] .garden-actions .button:not(#startButton),
:root[data-theme-mode="dark"] .basic-group-toggle,
:root[data-theme-mode="dark"] .setting-line,
:root[data-theme-mode="dark"] .quota,
:root[data-theme-mode="dark"] .field-row,
:root[data-theme-mode="dark"] .fresh-market-panel,
:root[data-theme-mode="dark"] #freshMarketIncome,
:root[data-theme-mode="dark"] .flower-bg-filters button:not(.active),
:root[data-theme-mode="dark"] .chips .chip:not(.active),
:root[data-theme-mode="dark"] .ad-skip-control,
:root[data-theme-mode="dark"] .ad-queue-item,
:root[data-theme-mode="dark"] #adQueueCount,
:root[data-theme-mode="dark"] #adWatchAll,
:root[data-theme-mode="dark"] .revenue-report article,
:root[data-theme-mode="dark"] .revenue-live,
:root[data-theme-mode="dark"] .billing-current,
:root[data-theme-mode="dark"] .billing-purchase,
:root[data-theme-mode="dark"] .billing-plan-card,
:root[data-theme-mode="dark"] .billing-duration button:not(.active),
:root[data-theme-mode="dark"] #billingAddMore,
:root[data-theme-mode="dark"] .billing-history,
:root[data-theme-mode="dark"] .billing-history th,
:root[data-theme-mode="dark"] .billing-history td,
:root[data-theme-mode="dark"] .docs-hero,
:root[data-theme-mode="dark"] .docs-guide,
:root[data-theme-mode="dark"] .docs-faq,
:root[data-theme-mode="dark"] .docs-tabs,
:root[data-theme-mode="dark"] .docs-tab-panel,
:root[data-theme-mode="dark"] .docs-faq-grid article,
:root[data-theme-mode="dark"] .changelog-hero,
:root[data-theme-mode="dark"] .release-card,
:root[data-theme-mode="dark"] .resource-center-tabs > button,
:root[data-theme-mode="dark"] .resource-center-panel,
:root[data-theme-mode="dark"] .flower-transfer-nav > button,
:root[data-theme-mode="dark"] .flower-transfer-card,
:root[data-theme-mode="dark"] .flower-transfer-columns > div,
:root[data-theme-mode="dark"] .flower-transfer-account,
:root[data-theme-mode="dark"] .flower-transfer-search,
:root[data-theme-mode="dark"] .flower-transfer-picker,
:root[data-theme-mode="dark"] .flower-transfer-flower,
:root[data-theme-mode="dark"] .flower-transfer-rules span,
:root[data-theme-mode="dark"] .flower-transfer-history-item,
:root[data-theme-mode="dark"] [class*="transfer-history"] > *,
:root[data-theme-mode="dark"] .main-quest-progress,
:root[data-theme-mode="dark"] .main-quest-limit,
:root[data-theme-mode="dark"] .main-quest-permissions > div {
  background: var(--ui-surface-soft) !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] .fleet-tab-pill.active,
:root[data-theme-mode="dark"] .auto-category-tabs > button.active,
:root[data-theme-mode="dark"] .flower-bg-filters button.active,
:root[data-theme-mode="dark"] .chips .chip.active,
:root[data-theme-mode="dark"] .billing-duration button.active {
  background: linear-gradient(135deg, var(--ui-brand), var(--ui-brand-2)) !important;
  border-color: transparent !important;
  color: #fff !important;
}
:root[data-theme-mode="dark"] .shortcut-icon.indigo {
  background: rgba(125, 113, 255, 0.22) !important;
  color: #c7c1ff !important;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme-mode="auto"] .topbar,
  :root[data-theme-mode="auto"] .menu-button,
  :root[data-theme-mode="auto"] .icon-button,
  :root[data-theme-mode="auto"] .sync-status {
    background: var(--ui-surface) !important;
    border-color: var(--ui-line) !important;
    color: var(--ui-ink) !important;
  }
  :root[data-theme-mode="auto"] .main h1,
  :root[data-theme-mode="auto"] .main h2,
  :root[data-theme-mode="auto"] .main h3,
  :root[data-theme-mode="auto"] .main h4,
  :root[data-theme-mode="auto"] .main strong,
  :root[data-theme-mode="auto"] .main b,
  :root[data-theme-mode="auto"] dialog h2,
  :root[data-theme-mode="auto"] dialog h3,
  :root[data-theme-mode="auto"] dialog strong,
  :root[data-theme-mode="auto"] dialog b,
  :root[data-theme-mode="auto"] #gardenName,
  :root[data-theme-mode="auto"] .auto-category-copy strong {
    color: var(--ui-ink) !important;
  }
  :root[data-theme-mode="auto"] .fleet-kpi,
  :root[data-theme-mode="auto"] .fleet-toolbar,
  :root[data-theme-mode="auto"] .fleet-tab-pill,
  :root[data-theme-mode="auto"] .fleet-online-pill,
  :root[data-theme-mode="auto"] .fleet-account-lv,
  :root[data-theme-mode="auto"] .fleet-badge,
  :root[data-theme-mode="auto"] .fleet-detail-btn,
  :root[data-theme-mode="auto"] .fleet-remove-btn,
  :root[data-theme-mode="auto"] .shortcut-icon,
  :root[data-theme-mode="auto"] .reconnect-delay,
  :root[data-theme-mode="auto"] .garden-actions .button:not(#startButton),
  :root[data-theme-mode="auto"] .basic-group-toggle,
  :root[data-theme-mode="auto"] .setting-line,
  :root[data-theme-mode="auto"] .quota,
  :root[data-theme-mode="auto"] .field-row,
  :root[data-theme-mode="auto"] .fresh-market-panel,
  :root[data-theme-mode="auto"] #freshMarketIncome,
  :root[data-theme-mode="auto"] .flower-bg-filters button:not(.active),
  :root[data-theme-mode="auto"] .chips .chip:not(.active),
  :root[data-theme-mode="auto"] .ad-skip-control,
  :root[data-theme-mode="auto"] .ad-queue-item,
  :root[data-theme-mode="auto"] #adQueueCount,
  :root[data-theme-mode="auto"] #adWatchAll,
  :root[data-theme-mode="auto"] .revenue-report article,
  :root[data-theme-mode="auto"] .revenue-live,
  :root[data-theme-mode="auto"] .billing-current,
  :root[data-theme-mode="auto"] .billing-purchase,
  :root[data-theme-mode="auto"] .billing-plan-card,
  :root[data-theme-mode="auto"] .billing-duration button:not(.active),
  :root[data-theme-mode="auto"] #billingAddMore,
  :root[data-theme-mode="auto"] .billing-history,
  :root[data-theme-mode="auto"] .billing-history th,
  :root[data-theme-mode="auto"] .billing-history td,
  :root[data-theme-mode="auto"] .docs-hero,
  :root[data-theme-mode="auto"] .docs-guide,
  :root[data-theme-mode="auto"] .docs-faq,
  :root[data-theme-mode="auto"] .docs-tabs,
  :root[data-theme-mode="auto"] .docs-tab-panel,
  :root[data-theme-mode="auto"] .docs-faq-grid article,
  :root[data-theme-mode="auto"] .changelog-hero,
  :root[data-theme-mode="auto"] .release-card,
  :root[data-theme-mode="auto"] .resource-center-tabs > button,
  :root[data-theme-mode="auto"] .resource-center-panel,
  :root[data-theme-mode="auto"] .flower-transfer-nav > button,
  :root[data-theme-mode="auto"] .flower-transfer-card,
  :root[data-theme-mode="auto"] .flower-transfer-columns > div,
  :root[data-theme-mode="auto"] .flower-transfer-account,
  :root[data-theme-mode="auto"] .flower-transfer-search,
  :root[data-theme-mode="auto"] .flower-transfer-picker,
  :root[data-theme-mode="auto"] .flower-transfer-flower,
  :root[data-theme-mode="auto"] .flower-transfer-rules span,
  :root[data-theme-mode="auto"] .flower-transfer-history-item,
  :root[data-theme-mode="auto"] [class*="transfer-history"] > *,
  :root[data-theme-mode="auto"] .main-quest-progress,
  :root[data-theme-mode="auto"] .main-quest-limit,
  :root[data-theme-mode="auto"] .main-quest-permissions > div {
    background: var(--ui-surface-soft) !important;
    border-color: var(--ui-line) !important;
    color: var(--ui-ink) !important;
  }
  :root[data-theme-mode="auto"] .fleet-tab-pill.active,
  :root[data-theme-mode="auto"] .auto-category-tabs > button.active,
  :root[data-theme-mode="auto"] .flower-bg-filters button.active,
  :root[data-theme-mode="auto"] .chips .chip.active,
  :root[data-theme-mode="auto"] .billing-duration button.active {
    background: linear-gradient(135deg, var(--ui-brand), var(--ui-brand-2)) !important;
    border-color: transparent !important;
    color: #fff !important;
  }
  :root[data-theme-mode="auto"] .shortcut-icon.indigo {
    background: rgba(125, 113, 255, 0.22) !important;
    color: #c7c1ff !important;
  }
}
/* Cherry-picked dark-mode compatibility layers (c87c4d0aa, 470b82410). */
:root[data-theme-mode="dark"] .fleet-kpi.kpi-indigo { background: rgba(99, 102, 241, 0.16) !important; border-color: rgba(129, 140, 248, 0.35) !important; }
:root[data-theme-mode="dark"] .fleet-kpi.kpi-emerald { background: rgba(16, 185, 129, 0.16) !important; border-color: rgba(52, 211, 153, 0.35) !important; }
:root[data-theme-mode="dark"] .fleet-kpi.kpi-amber { background: rgba(245, 158, 11, 0.16) !important; border-color: rgba(251, 191, 36, 0.35) !important; }
:root[data-theme-mode="dark"] .fleet-kpi.kpi-rose { background: rgba(244, 63, 94, 0.16) !important; border-color: rgba(251, 113, 133, 0.35) !important; }
:root[data-theme-mode="dark"] .fleet-hero-actions .button:not(.fleet-add-btn),
:root[data-theme-mode="dark"] .fleet-toolbar-actions .button,
:root[data-theme-mode="dark"] .plant-mode-block,
:root[data-theme-mode="dark"] .plant-reserve-card,
:root[data-theme-mode="dark"] .plant-ad-speed-card,
:root[data-theme-mode="dark"] .plant-strategy-card,
:root[data-theme-mode="dark"] .plant-target-card,
:root[data-theme-mode="dark"] .plant-exclusion,
:root[data-theme-mode="dark"] .plant-type-row,
:root[data-theme-mode="dark"] .plant-next-action,
:root[data-theme-mode="dark"] .plant-reserve-input,
:root[data-theme-mode="dark"] .plant-exclude-inventory > button,
:root[data-theme-mode="dark"] .plant-speed-mode-options button:not(.active),
:root[data-theme-mode="dark"] .plant-speed-presets button:not(.active),
:root[data-theme-mode="dark"] .plant-strategy-options button:not(.active),
:root[data-theme-mode="dark"] .plant-type-options button:not(.active),
:root[data-theme-mode="dark"] .plot-card,
:root[data-theme-mode="dark"] .art-craft-suggest button,
:root[data-theme-mode="dark"] .art-craft-flower-slot,
:root[data-theme-mode="dark"] .cyclic-note-summary article,
:root[data-theme-mode="dark"] .cyclic-note-tasks article,
:root[data-theme-mode="dark"] .cyclic-note-milestone-list > *,
:root[data-theme-mode="dark"] .honey-jar,
:root[data-theme-mode="dark"] .honey-shop,
:root[data-theme-mode="dark"] .honey-shop-options button:not(.active) {
  background: var(--ui-surface-soft) !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] .plant-speed-mode-options button.active,
:root[data-theme-mode="dark"] .plant-speed-presets button.active,
:root[data-theme-mode="dark"] .plant-strategy-options button.active,
:root[data-theme-mode="dark"] .plant-type-options button.active {
  background: linear-gradient(135deg, var(--ui-brand), var(--ui-brand-2)) !important;
  border-color: transparent !important;
  color: #fff !important;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme-mode="auto"] .topbar,
  :root[data-theme-mode="auto"] .menu-button,
  :root[data-theme-mode="auto"] .icon-button,
  :root[data-theme-mode="auto"] .sync-status {
    background: var(--ui-surface) !important;
    border-color: var(--ui-line) !important;
    color: var(--ui-ink) !important;
  }
  :root[data-theme-mode="auto"] .main h1,
  :root[data-theme-mode="auto"] .main h2,
  :root[data-theme-mode="auto"] .main h3,
  :root[data-theme-mode="auto"] .main h4,
  :root[data-theme-mode="auto"] .main strong,
  :root[data-theme-mode="auto"] .main b,
  :root[data-theme-mode="auto"] dialog h2,
  :root[data-theme-mode="auto"] dialog h3,
  :root[data-theme-mode="auto"] dialog strong,
  :root[data-theme-mode="auto"] dialog b,
  :root[data-theme-mode="auto"] #gardenName,
  :root[data-theme-mode="auto"] .auto-category-copy strong {
    color: var(--ui-ink) !important;
  }
  :root[data-theme-mode="auto"] .fleet-kpi,
  :root[data-theme-mode="auto"] .fleet-toolbar,
  :root[data-theme-mode="auto"] .fleet-tab-pill,
  :root[data-theme-mode="auto"] .fleet-online-pill,
  :root[data-theme-mode="auto"] .fleet-account-lv,
  :root[data-theme-mode="auto"] .fleet-badge,
  :root[data-theme-mode="auto"] .fleet-detail-btn,
  :root[data-theme-mode="auto"] .fleet-remove-btn,
  :root[data-theme-mode="auto"] .shortcut-icon,
  :root[data-theme-mode="auto"] .reconnect-delay,
  :root[data-theme-mode="auto"] .garden-actions .button:not(#startButton),
  :root[data-theme-mode="auto"] .basic-group-toggle,
  :root[data-theme-mode="auto"] .setting-line,
  :root[data-theme-mode="auto"] .quota,
  :root[data-theme-mode="auto"] .field-row,
  :root[data-theme-mode="auto"] .fresh-market-panel,
  :root[data-theme-mode="auto"] #freshMarketIncome,
  :root[data-theme-mode="auto"] .flower-bg-filters button:not(.active),
  :root[data-theme-mode="auto"] .chips .chip:not(.active),
  :root[data-theme-mode="auto"] .ad-skip-control,
  :root[data-theme-mode="auto"] .ad-queue-item,
  :root[data-theme-mode="auto"] #adQueueCount,
  :root[data-theme-mode="auto"] #adWatchAll,
  :root[data-theme-mode="auto"] .revenue-report article,
  :root[data-theme-mode="auto"] .revenue-live,
  :root[data-theme-mode="auto"] .billing-current,
  :root[data-theme-mode="auto"] .billing-purchase,
  :root[data-theme-mode="auto"] .billing-plan-card,
  :root[data-theme-mode="auto"] .billing-duration button:not(.active),
  :root[data-theme-mode="auto"] #billingAddMore,
  :root[data-theme-mode="auto"] .billing-history,
  :root[data-theme-mode="auto"] .billing-history th,
  :root[data-theme-mode="auto"] .billing-history td,
  :root[data-theme-mode="auto"] .docs-hero,
  :root[data-theme-mode="auto"] .docs-guide,
  :root[data-theme-mode="auto"] .docs-faq,
  :root[data-theme-mode="auto"] .docs-tabs,
  :root[data-theme-mode="auto"] .docs-tab-panel,
  :root[data-theme-mode="auto"] .docs-faq-grid article,
  :root[data-theme-mode="auto"] .changelog-hero,
  :root[data-theme-mode="auto"] .release-card,
  :root[data-theme-mode="auto"] .resource-center-tabs > button,
  :root[data-theme-mode="auto"] .resource-center-panel,
  :root[data-theme-mode="auto"] .flower-transfer-nav > button,
  :root[data-theme-mode="auto"] .flower-transfer-card,
  :root[data-theme-mode="auto"] .flower-transfer-columns > div,
  :root[data-theme-mode="auto"] .flower-transfer-account,
  :root[data-theme-mode="auto"] .flower-transfer-search,
  :root[data-theme-mode="auto"] .flower-transfer-picker,
  :root[data-theme-mode="auto"] .flower-transfer-flower,
  :root[data-theme-mode="auto"] .flower-transfer-rules span,
  :root[data-theme-mode="auto"] .flower-transfer-history-item,
  :root[data-theme-mode="auto"] [class*="transfer-history"] > *,
  :root[data-theme-mode="auto"] .main-quest-progress,
  :root[data-theme-mode="auto"] .main-quest-limit,
  :root[data-theme-mode="auto"] .main-quest-permissions > div {
    background: var(--ui-surface-soft) !important;
    border-color: var(--ui-line) !important;
    color: var(--ui-ink) !important;
  }
  :root[data-theme-mode="auto"] .fleet-tab-pill.active,
  :root[data-theme-mode="auto"] .auto-category-tabs > button.active,
  :root[data-theme-mode="auto"] .flower-bg-filters button.active,
  :root[data-theme-mode="auto"] .chips .chip.active,
  :root[data-theme-mode="auto"] .billing-duration button.active {
    background: linear-gradient(135deg, var(--ui-brand), var(--ui-brand-2)) !important;
    border-color: transparent !important;
    color: #fff !important;
  }
  :root[data-theme-mode="auto"] .shortcut-icon.indigo {
    background: rgba(125, 113, 255, 0.22) !important;
    color: #c7c1ff !important;
  }
  :root[data-theme-mode="auto"] .fleet-kpi.kpi-indigo { background: rgba(99, 102, 241, 0.16) !important; border-color: rgba(129, 140, 248, 0.35) !important; }
  :root[data-theme-mode="auto"] .fleet-kpi.kpi-emerald { background: rgba(16, 185, 129, 0.16) !important; border-color: rgba(52, 211, 153, 0.35) !important; }
  :root[data-theme-mode="auto"] .fleet-kpi.kpi-amber { background: rgba(245, 158, 11, 0.16) !important; border-color: rgba(251, 191, 36, 0.35) !important; }
  :root[data-theme-mode="auto"] .fleet-kpi.kpi-rose { background: rgba(244, 63, 94, 0.16) !important; border-color: rgba(251, 113, 133, 0.35) !important; }
  :root[data-theme-mode="auto"] .fleet-hero-actions .button:not(.fleet-add-btn),
  :root[data-theme-mode="auto"] .fleet-toolbar-actions .button,
  :root[data-theme-mode="auto"] .plant-mode-block,
  :root[data-theme-mode="auto"] .plant-reserve-card,
  :root[data-theme-mode="auto"] .plant-ad-speed-card,
  :root[data-theme-mode="auto"] .plant-strategy-card,
  :root[data-theme-mode="auto"] .plant-target-card,
  :root[data-theme-mode="auto"] .plant-exclusion,
  :root[data-theme-mode="auto"] .plant-type-row,
  :root[data-theme-mode="auto"] .plant-next-action,
  :root[data-theme-mode="auto"] .plant-reserve-input,
  :root[data-theme-mode="auto"] .plant-exclude-inventory > button,
  :root[data-theme-mode="auto"] .plant-speed-mode-options button:not(.active),
  :root[data-theme-mode="auto"] .plant-speed-presets button:not(.active),
  :root[data-theme-mode="auto"] .plant-strategy-options button:not(.active),
  :root[data-theme-mode="auto"] .plant-type-options button:not(.active),
  :root[data-theme-mode="auto"] .plot-card,
  :root[data-theme-mode="auto"] .art-craft-suggest button,
  :root[data-theme-mode="auto"] .art-craft-flower-slot,
  :root[data-theme-mode="auto"] .cyclic-note-summary article,
  :root[data-theme-mode="auto"] .cyclic-note-tasks article,
  :root[data-theme-mode="auto"] .cyclic-note-milestone-list > *,
  :root[data-theme-mode="auto"] .honey-jar,
  :root[data-theme-mode="auto"] .honey-shop,
  :root[data-theme-mode="auto"] .honey-shop-options button:not(.active) {
    background: var(--ui-surface-soft) !important;
    border-color: var(--ui-line) !important;
    color: var(--ui-ink) !important;
  }
  :root[data-theme-mode="auto"] .plant-speed-mode-options button.active,
  :root[data-theme-mode="auto"] .plant-speed-presets button.active,
  :root[data-theme-mode="auto"] .plant-strategy-options button.active,
  :root[data-theme-mode="auto"] .plant-type-options button.active {
    background: linear-gradient(135deg, var(--ui-brand), var(--ui-brand-2)) !important;
    border-color: transparent !important;
    color: #fff !important;
  }
}

/* ==========================================================================
   Universal Attribute-Based Dark Mode Catch-All (Covers All 25+ Legacy CSS)
   ========================================================================== */
:root[data-theme-mode="dark"] :is(.main, dialog) :is(
  [class*="-card"], [class*="-panel"], [class*="-box"], [class*="-block"],
  [class*="-row"], [class*="-item"], [class*="-slot"], [class*="-rack"],
  [class*="-shelf"], [class*="-tile"], [class*="-note"], [class*="-rule"],
  [class*="-summary"], [class*="-status"], [class*="-toolbar"], [class*="-tabs"],
  [class*="-step"], [class*="-faq"], [class*="-history"], [class*="-field"],
  [class*="-list"] > *, [class*="-grid"] > *,
  button:not(.toggle):not(.active):not(.selected):not(.is-selected):not(.is-active):not(.primary):not(.fleet-add-btn):not(#startButton)
) {
  background: var(--ui-surface-soft) !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] :is(.main, dialog) :is(
  h1, h2, h3, h4, p, strong, b, label, td, th, li, span, em
):not(.active):not(.selected):not(.is-new):not(.is-update):not(.tag):not(.badge):not(.eyebrow):not(.fleet-kicker) {
  color: var(--ui-ink);
}
:root[data-theme-mode="dark"] :is(.main, dialog) :is(small, .muted, .empty-panel) {
  color: var(--ui-muted) !important;
}
:root[data-theme-mode="dark"] :is(.main, dialog) :is(.active, .selected, .is-selected, .is-active, .primary, .fleet-add-btn, #startButton) {
  background: linear-gradient(135deg, var(--ui-brand), var(--ui-brand-2)) !important;
  border-color: transparent !important;
  color: #fff !important;
}
:root[data-theme-mode="dark"] :is(.main, dialog) :is(.active, .selected, .is-selected, .is-active) :is(b, strong, small, span, em) {
  color: #fff !important;
}
:root[data-theme-mode="dark"] .flower-card.flower-bg-1 { border-color: rgba(34, 197, 94, 0.5) !important; }
:root[data-theme-mode="dark"] .flower-card.flower-bg-2 { border-color: rgba(59, 130, 246, 0.55) !important; }
:root[data-theme-mode="dark"] .flower-card.flower-bg-3 { border-color: rgba(168, 85, 247, 0.55) !important; }
:root[data-theme-mode="dark"] .flower-card.flower-bg-4 { border-color: rgba(249, 115, 22, 0.55) !important; }
:root[data-theme-mode="dark"] .flower-card.flower-bg-5 { border-color: rgba(239, 68, 68, 0.6) !important; }

@media (prefers-color-scheme: dark) {
  :root[data-theme-mode="auto"] :is(.main, dialog) :is(
    [class*="-card"], [class*="-panel"], [class*="-box"], [class*="-block"],
    [class*="-row"], [class*="-item"], [class*="-slot"], [class*="-rack"],
    [class*="-shelf"], [class*="-tile"], [class*="-note"], [class*="-rule"],
    [class*="-summary"], [class*="-status"], [class*="-toolbar"], [class*="-tabs"],
    [class*="-step"], [class*="-faq"], [class*="-history"], [class*="-field"],
    [class*="-list"] > *, [class*="-grid"] > *,
    button:not(.toggle):not(.active):not(.selected):not(.is-selected):not(.is-active):not(.primary):not(.fleet-add-btn):not(#startButton)
  ) {
    background: var(--ui-surface-soft) !important;
    border-color: var(--ui-line) !important;
    color: var(--ui-ink) !important;
  }
  :root[data-theme-mode="auto"] :is(.main, dialog) :is(
    h1, h2, h3, h4, p, strong, b, label, td, th, li, span, em
  ):not(.active):not(.selected):not(.is-new):not(.is-update):not(.tag):not(.badge):not(.eyebrow):not(.fleet-kicker) {
    color: var(--ui-ink);
  }
  :root[data-theme-mode="auto"] :is(.main, dialog) :is(small, .muted, .empty-panel) {
    color: var(--ui-muted) !important;
  }
  :root[data-theme-mode="auto"] :is(.main, dialog) :is(.active, .selected, .is-selected, .is-active, .primary, .fleet-add-btn, #startButton) {
    background: linear-gradient(135deg, var(--ui-brand), var(--ui-brand-2)) !important;
    border-color: transparent !important;
    color: #fff !important;
  }
  :root[data-theme-mode="auto"] :is(.main, dialog) :is(.active, .selected, .is-selected, .is-active) :is(b, strong, small, span, em) {
    color: #fff !important;
  }
  :root[data-theme-mode="auto"] .flower-card.flower-bg-1 { border-color: rgba(34, 197, 94, 0.5) !important; }
  :root[data-theme-mode="auto"] .flower-card.flower-bg-2 { border-color: rgba(59, 130, 246, 0.55) !important; }
  :root[data-theme-mode="auto"] .flower-card.flower-bg-3 { border-color: rgba(168, 85, 247, 0.55) !important; }
  :root[data-theme-mode="auto"] .flower-card.flower-bg-4 { border-color: rgba(249, 115, 22, 0.55) !important; }
  :root[data-theme-mode="auto"] .flower-card.flower-bg-5 { border-color: rgba(239, 68, 68, 0.6) !important; }
}
/* Exhaustive dark-mode overrides for legacy modules that declare opaque white surfaces. */
:root[data-theme-mode="dark"] :is(
  ...)
   ========================================================================== */
.section-card,
  .act-merge2-section .merge2-cell.item,
  .act-merge2-section .merge2-grid > section,
  .activity,
  .activity #activityList .activity-item,
  .activity-dialog,
  .activity-dialog-list .activity-item,
  .activity-dialog-summary>span,
  .ad-queue-item,
  .ad-skip-control,
  .art-craft-dialog button,
  .art-craft-dialog form>footer,
  .art-craft-flower img,
  .art-craft-vase>img,
  .art-item,
  .art-rack,
  .auto-category-tabs,
  .basic-group,
  .basic-group-meta em,
  .basic-group>header em,
  .basic-group>header>span,
  .bloom-model-picker button,
  .bloom-rewards,
  .card,
  .chips .chip,
  .choice-card,
  .choice-grid > button,
  .config-option,
  .cultivate-grid > article,
  .cultivate-pager button
) {
  background: var(--ui-surface-soft) !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] :is(
  ...)
   ========================================================================== */
.section-card,
  .act-merge2-section .merge2-cell.item,
  .act-merge2-section .merge2-grid > section,
  .activity,
  .activity #activityList .activity-item,
  .activity-dialog,
  .activity-dialog-list .activity-item,
  .activity-dialog-summary>span,
  .ad-queue-item,
  .ad-skip-control,
  .art-craft-dialog button,
  .art-craft-dialog form>footer,
  .art-craft-flower img,
  .art-craft-vase>img,
  .art-item,
  .art-rack,
  .auto-category-tabs,
  .basic-group,
  .basic-group-meta em,
  .basic-group>header em,
  .basic-group>header>span,
  .bloom-model-picker button,
  .bloom-rewards,
  .card,
  .chips .chip,
  .choice-card,
  .choice-grid > button,
  .config-option,
  .cultivate-grid > article,
  .cultivate-pager button
) :is(h1,h2,h3,h4,p,label,strong,b,span,em):not(.badge):not([class*="status"]):not([class*="rarity"]) {
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] :is(
  ...)
   ========================================================================== */
.section-card,
  .act-merge2-section .merge2-cell.item,
  .act-merge2-section .merge2-grid > section,
  .activity,
  .activity #activityList .activity-item,
  .activity-dialog,
  .activity-dialog-list .activity-item,
  .activity-dialog-summary>span,
  .ad-queue-item,
  .ad-skip-control,
  .art-craft-dialog button,
  .art-craft-dialog form>footer,
  .art-craft-flower img,
  .art-craft-vase>img,
  .art-item,
  .art-rack,
  .auto-category-tabs,
  .basic-group,
  .basic-group-meta em,
  .basic-group>header em,
  .basic-group>header>span,
  .bloom-model-picker button,
  .bloom-rewards,
  .card,
  .chips .chip,
  .choice-card,
  .choice-grid > button,
  .config-option,
  .cultivate-grid > article,
  .cultivate-pager button
) small {
  color: var(--ui-muted) !important;
}
:root[data-theme-mode="dark"] :is(
  .cyclic-note-history,
  .cyclic-note-milestone-list article,
  .cyclic-note-milestone-panel,
  .cyclic-note-roll,
  .cyclic-note-shop,
  .cyclic-note-shop-item,
  .cyclic-note-status,
  .cyclic-note-tasks,
  .cyclic-note-unlock,
  .cyclic-vase-grid > section,
  .cyclic-vase-grid>section,
  .cyclic-vase-history,
  .cyclic-vase-notice,
  .cyclic-vase-shop button,
  .daily-reward-history article,
  .daily-reward-row,
  .dessert-grid > section,
  .dessert-live,
  .dessert-modes,
  .dessert-safety,
  .dragon-boat-flower,
  .dragon-boat-flower-empty,
  .dragon-boat-policy .field-row,
  .dragon-boat-skip-green,
  .event-order,
  .event-story-counts span,
  .feast-detail>section,
  .feast-reward,
  .field-row input[type="number"],
  .fleet-account-row
) {
  background: var(--ui-surface-soft) !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] :is(
  .cyclic-note-history,
  .cyclic-note-milestone-list article,
  .cyclic-note-milestone-panel,
  .cyclic-note-roll,
  .cyclic-note-shop,
  .cyclic-note-shop-item,
  .cyclic-note-status,
  .cyclic-note-tasks,
  .cyclic-note-unlock,
  .cyclic-vase-grid > section,
  .cyclic-vase-grid>section,
  .cyclic-vase-history,
  .cyclic-vase-notice,
  .cyclic-vase-shop button,
  .daily-reward-history article,
  .daily-reward-row,
  .dessert-grid > section,
  .dessert-live,
  .dessert-modes,
  .dessert-safety,
  .dragon-boat-flower,
  .dragon-boat-flower-empty,
  .dragon-boat-policy .field-row,
  .dragon-boat-skip-green,
  .event-order,
  .event-story-counts span,
  .feast-detail>section,
  .feast-reward,
  .field-row input[type="number"],
  .fleet-account-row
) :is(h1,h2,h3,h4,p,label,strong,b,span,em):not(.badge):not([class*="status"]):not([class*="rarity"]) {
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] :is(
  .cyclic-note-history,
  .cyclic-note-milestone-list article,
  .cyclic-note-milestone-panel,
  .cyclic-note-roll,
  .cyclic-note-shop,
  .cyclic-note-shop-item,
  .cyclic-note-status,
  .cyclic-note-tasks,
  .cyclic-note-unlock,
  .cyclic-vase-grid > section,
  .cyclic-vase-grid>section,
  .cyclic-vase-history,
  .cyclic-vase-notice,
  .cyclic-vase-shop button,
  .daily-reward-history article,
  .daily-reward-row,
  .dessert-grid > section,
  .dessert-live,
  .dessert-modes,
  .dessert-safety,
  .dragon-boat-flower,
  .dragon-boat-flower-empty,
  .dragon-boat-policy .field-row,
  .dragon-boat-skip-green,
  .event-order,
  .event-story-counts span,
  .feast-detail>section,
  .feast-reward,
  .field-row input[type="number"],
  .fleet-account-row
) small {
  color: var(--ui-muted) !important;
}
:root[data-theme-mode="dark"] :is(
  .fleet-filters button,
  .fleet-shortcuts button,
  .florist-grid > article,
  .flower-battle-choice,
  .flower-battle-grid > section,
  .flower-battle-grid>section,
  .flower-battle-summary article,
  .flower-bg-filters button,
  .flower-transfer-account,
  .flower-transfer-card,
  .flower-transfer-flower-grid .flower-transfer-flower,
  .flower-transfer-flower-grid.with-breakdown .flower-transfer-breakdown span,
  .flower-transfer-flower-grid.with-breakdown .flower-transfer-flower,
  .flower-transfer-flower-grid.with-breakdown .flower-transfer-flower-main>span,
  .flower-transfer-flower-main>span,
  .flower-transfer-flower.selected .flower-transfer-inline-recommend,
  .flower-transfer-history>header button,
  .flower-transfer-nav>button,
  .flower-transfer-search,
  .flower-transfer-source-choice,
  .flower-transfer-stepper button,
  .flower-transfer-stepper input,
  .flower-transfer-suggestions button,
  .flower-transfer-tile-grid .flower-transfer-flower-main>span,
  .flower-transfer-tile-grid .flower-transfer-source-choice,
  .fresh-market-shelf,
  .friend-delete-preview>div span,
  .friend-send-preview>div span,
  .game-task-tabs button,
  .game2048-shop
) {
  background: var(--ui-surface-soft) !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] :is(
  .fleet-filters button,
  .fleet-shortcuts button,
  .florist-grid > article,
  .flower-battle-choice,
  .flower-battle-grid > section,
  .flower-battle-grid>section,
  .flower-battle-summary article,
  .flower-bg-filters button,
  .flower-transfer-account,
  .flower-transfer-card,
  .flower-transfer-flower-grid .flower-transfer-flower,
  .flower-transfer-flower-grid.with-breakdown .flower-transfer-breakdown span,
  .flower-transfer-flower-grid.with-breakdown .flower-transfer-flower,
  .flower-transfer-flower-grid.with-breakdown .flower-transfer-flower-main>span,
  .flower-transfer-flower-main>span,
  .flower-transfer-flower.selected .flower-transfer-inline-recommend,
  .flower-transfer-history>header button,
  .flower-transfer-nav>button,
  .flower-transfer-search,
  .flower-transfer-source-choice,
  .flower-transfer-stepper button,
  .flower-transfer-stepper input,
  .flower-transfer-suggestions button,
  .flower-transfer-tile-grid .flower-transfer-flower-main>span,
  .flower-transfer-tile-grid .flower-transfer-source-choice,
  .fresh-market-shelf,
  .friend-delete-preview>div span,
  .friend-send-preview>div span,
  .game-task-tabs button,
  .game2048-shop
) :is(h1,h2,h3,h4,p,label,strong,b,span,em):not(.badge):not([class*="status"]):not([class*="rarity"]) {
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] :is(
  .fleet-filters button,
  .fleet-shortcuts button,
  .florist-grid > article,
  .flower-battle-choice,
  .flower-battle-grid > section,
  .flower-battle-grid>section,
  .flower-battle-summary article,
  .flower-bg-filters button,
  .flower-transfer-account,
  .flower-transfer-card,
  .flower-transfer-flower-grid .flower-transfer-flower,
  .flower-transfer-flower-grid.with-breakdown .flower-transfer-breakdown span,
  .flower-transfer-flower-grid.with-breakdown .flower-transfer-flower,
  .flower-transfer-flower-grid.with-breakdown .flower-transfer-flower-main>span,
  .flower-transfer-flower-main>span,
  .flower-transfer-flower.selected .flower-transfer-inline-recommend,
  .flower-transfer-history>header button,
  .flower-transfer-nav>button,
  .flower-transfer-search,
  .flower-transfer-source-choice,
  .flower-transfer-stepper button,
  .flower-transfer-stepper input,
  .flower-transfer-suggestions button,
  .flower-transfer-tile-grid .flower-transfer-flower-main>span,
  .flower-transfer-tile-grid .flower-transfer-source-choice,
  .fresh-market-shelf,
  .friend-delete-preview>div span,
  .friend-send-preview>div span,
  .game-task-tabs button,
  .game2048-shop
) small {
  color: var(--ui-muted) !important;
}
:root[data-theme-mode="dark"] :is(
  .garden-select select,
  .garden-sync-all,
  .group-order-day-grid span,
  .group-order-fields input,
  .group-order-fields select,
  .group-order-history-row,
  .group-order-metrics span,
  .group-order-paid,
  .group-order-status,
  .guest-full,
  .guest-order-detail .guest-full,
  .guest-order-detail>input,
  .guild-catalog-item,
  .guild-flower-item i,
  .guild-flower-item img,
  .guild-flower-no-result,
  .guild-flower-picker [data-guild-flower-selected],
  .guild-flower-result,
  .guild-harvest-detail .guild-flower-item,
  .guild-harvest-detail .guild-flower-time,
  .guild-land-cell,
  .guild-land-level,
  .honey-event-detail,
  .honey-pot,
  .honey-shop-options button,
  .honey-time-window input,
  .land-unlock-next>i,
  .land-unlock-tiers>span,
  .main-quest-detail>label,
  .main-quest-limit
) {
  background: var(--ui-surface-soft) !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] :is(
  .garden-select select,
  .garden-sync-all,
  .group-order-day-grid span,
  .group-order-fields input,
  .group-order-fields select,
  .group-order-history-row,
  .group-order-metrics span,
  .group-order-paid,
  .group-order-status,
  .guest-full,
  .guest-order-detail .guest-full,
  .guest-order-detail>input,
  .guild-catalog-item,
  .guild-flower-item i,
  .guild-flower-item img,
  .guild-flower-no-result,
  .guild-flower-picker [data-guild-flower-selected],
  .guild-flower-result,
  .guild-harvest-detail .guild-flower-item,
  .guild-harvest-detail .guild-flower-time,
  .guild-land-cell,
  .guild-land-level,
  .honey-event-detail,
  .honey-pot,
  .honey-shop-options button,
  .honey-time-window input,
  .land-unlock-next>i,
  .land-unlock-tiers>span,
  .main-quest-detail>label,
  .main-quest-limit
) :is(h1,h2,h3,h4,p,label,strong,b,span,em):not(.badge):not([class*="status"]):not([class*="rarity"]) {
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] :is(
  .garden-select select,
  .garden-sync-all,
  .group-order-day-grid span,
  .group-order-fields input,
  .group-order-fields select,
  .group-order-history-row,
  .group-order-metrics span,
  .group-order-paid,
  .group-order-status,
  .guest-full,
  .guest-order-detail .guest-full,
  .guest-order-detail>input,
  .guild-catalog-item,
  .guild-flower-item i,
  .guild-flower-item img,
  .guild-flower-no-result,
  .guild-flower-picker [data-guild-flower-selected],
  .guild-flower-result,
  .guild-harvest-detail .guild-flower-item,
  .guild-harvest-detail .guild-flower-time,
  .guild-land-cell,
  .guild-land-level,
  .honey-event-detail,
  .honey-pot,
  .honey-shop-options button,
  .honey-time-window input,
  .land-unlock-next>i,
  .land-unlock-tiers>span,
  .main-quest-detail>label,
  .main-quest-limit
) small {
  color: var(--ui-muted) !important;
}
:root[data-theme-mode="dark"] :is(
  .main-quest-permissions select[data-main-quest-cap],
  .main-quest-permissions>div,
  .market-buy-history-list .market-trade-row,
  .market-trade-flower,
  .merge2-cell:has(.merge2-item-icon) small,
  .merge2-grid>section,
  .merge2-modes button,
  .merge2-summary article,
  .order-progress,
  .order-progress>span,
  .pearl-draw-balance,
  .pearl-draw-balance i,
  .pearl-history-entry,
  .pearl-item-symbol,
  .pearl-place,
  .pearl-place-toolbar,
  .pearl-ticket-stock i,
  .peddler-next>i,
  .phone-session-grace-banner>span,
  .plant-speed-actions button,
  .plant-strategy-options button,
  .plant-type-options button,
  .plot-card,
  .real-flower-win-popup button,
  .resource-center-tabs > button,
  .resource-mode-notice article,
  .resource-tabs > button,
  .resource-tabs button,
  .resource-tabs button.active,
  .resource-tabs button:hover
) {
  background: var(--ui-surface-soft) !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] :is(
  .main-quest-permissions select[data-main-quest-cap],
  .main-quest-permissions>div,
  .market-buy-history-list .market-trade-row,
  .market-trade-flower,
  .merge2-cell:has(.merge2-item-icon) small,
  .merge2-grid>section,
  .merge2-modes button,
  .merge2-summary article,
  .order-progress,
  .order-progress>span,
  .pearl-draw-balance,
  .pearl-draw-balance i,
  .pearl-history-entry,
  .pearl-item-symbol,
  .pearl-place,
  .pearl-place-toolbar,
  .pearl-ticket-stock i,
  .peddler-next>i,
  .phone-session-grace-banner>span,
  .plant-speed-actions button,
  .plant-strategy-options button,
  .plant-type-options button,
  .plot-card,
  .real-flower-win-popup button,
  .resource-center-tabs > button,
  .resource-mode-notice article,
  .resource-tabs > button,
  .resource-tabs button,
  .resource-tabs button.active,
  .resource-tabs button:hover
) :is(h1,h2,h3,h4,p,label,strong,b,span,em):not(.badge):not([class*="status"]):not([class*="rarity"]) {
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] :is(
  .main-quest-permissions select[data-main-quest-cap],
  .main-quest-permissions>div,
  .market-buy-history-list .market-trade-row,
  .market-trade-flower,
  .merge2-cell:has(.merge2-item-icon) small,
  .merge2-grid>section,
  .merge2-modes button,
  .merge2-summary article,
  .order-progress,
  .order-progress>span,
  .pearl-draw-balance,
  .pearl-draw-balance i,
  .pearl-history-entry,
  .pearl-item-symbol,
  .pearl-place,
  .pearl-place-toolbar,
  .pearl-ticket-stock i,
  .peddler-next>i,
  .phone-session-grace-banner>span,
  .plant-speed-actions button,
  .plant-strategy-options button,
  .plant-type-options button,
  .plot-card,
  .real-flower-win-popup button,
  .resource-center-tabs > button,
  .resource-mode-notice article,
  .resource-tabs > button,
  .resource-tabs button,
  .resource-tabs button.active,
  .resource-tabs button:hover
) small {
  color: var(--ui-muted) !important;
}
:root[data-theme-mode="dark"] :is(
  .resource-tabs button>i,
  .reward-chest-items span,
  .right-rail .activity,
  .right-rail .card,
  .section-card,
  .section-card[data-section="02"] .plot-map,
  .section-card[data-section="02"] .plot-map .plot-harvest,
  .section-card[data-section="02"] .plot-map .plot-open,
  .section-card[data-section="02"] .plot-map .plot-planted,
  .section-card[data-section="02"] .plot-map .plot-planted:not(.plot-ready),
  .section-card[data-section="03"] .flower-card,
  .section-card[data-section="03"]>.setting-line,
  .section-card[data-section="06"] .field-row,
  .section-card[data-section="06"]>.setting-line,
  .section-card[data-section="07"] .event-progress,
  .section-card[data-section]:not([data-section="01"]),
  .section-card[data-section]:not([data-section="01"]) .choice-card,
  .section-collapse-bottom,
  .segmented button,
  .setting-detail input[type="number"],
  .setting-detail input[type="search"],
  .setting-detail select,
  .smart-friends-status span,
  .spirit-item,
  .spirit-slot,
  .spool-play > div,
  .spool-play>.dessert-modes,
  .spool-play>div,
  .spool-tools,
  .steal-cycle-status span
) {
  background: var(--ui-surface-soft) !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] :is(
  .resource-tabs button>i,
  .reward-chest-items span,
  .right-rail .activity,
  .right-rail .card,
  .section-card,
  .section-card[data-section="02"] .plot-map,
  .section-card[data-section="02"] .plot-map .plot-harvest,
  .section-card[data-section="02"] .plot-map .plot-open,
  .section-card[data-section="02"] .plot-map .plot-planted,
  .section-card[data-section="02"] .plot-map .plot-planted:not(.plot-ready),
  .section-card[data-section="03"] .flower-card,
  .section-card[data-section="03"]>.setting-line,
  .section-card[data-section="06"] .field-row,
  .section-card[data-section="06"]>.setting-line,
  .section-card[data-section="07"] .event-progress,
  .section-card[data-section]:not([data-section="01"]),
  .section-card[data-section]:not([data-section="01"]) .choice-card,
  .section-collapse-bottom,
  .segmented button,
  .setting-detail input[type="number"],
  .setting-detail input[type="search"],
  .setting-detail select,
  .smart-friends-status span,
  .spirit-item,
  .spirit-slot,
  .spool-play > div,
  .spool-play>.dessert-modes,
  .spool-play>div,
  .spool-tools,
  .steal-cycle-status span
) :is(h1,h2,h3,h4,p,label,strong,b,span,em):not(.badge):not([class*="status"]):not([class*="rarity"]) {
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] :is(
  .resource-tabs button>i,
  .reward-chest-items span,
  .right-rail .activity,
  .right-rail .card,
  .section-card,
  .section-card[data-section="02"] .plot-map,
  .section-card[data-section="02"] .plot-map .plot-harvest,
  .section-card[data-section="02"] .plot-map .plot-open,
  .section-card[data-section="02"] .plot-map .plot-planted,
  .section-card[data-section="02"] .plot-map .plot-planted:not(.plot-ready),
  .section-card[data-section="03"] .flower-card,
  .section-card[data-section="03"]>.setting-line,
  .section-card[data-section="06"] .field-row,
  .section-card[data-section="06"]>.setting-line,
  .section-card[data-section="07"] .event-progress,
  .section-card[data-section]:not([data-section="01"]),
  .section-card[data-section]:not([data-section="01"]) .choice-card,
  .section-collapse-bottom,
  .segmented button,
  .setting-detail input[type="number"],
  .setting-detail input[type="search"],
  .setting-detail select,
  .smart-friends-status span,
  .spirit-item,
  .spirit-slot,
  .spool-play > div,
  .spool-play>.dessert-modes,
  .spool-play>div,
  .spool-tools,
  .steal-cycle-status span
) small {
  color: var(--ui-muted) !important;
}
:root[data-theme-mode="dark"] :is(
  .steal-flower i,
  .steal-history-item,
  .subpanel input[type="search"],
  .warehouse-use-item,
  /* ==========================================================================
   Inner Auto Sub-modules ("Ruột con": Đơn Nhóm,
  /* Art Sale Racks & Spirit Slots & Plant Plots */
.art-rack,
  /* Compact Category Nav & Resource Center inside Chi tiết */
.auto-category-nav,
  /* Flower & Item Card Frames (Keep all <img> intact,
  /* Inner Sub-panels,
  /* Khung th? Hoa & V?t ph?m (gi? nguy?n h?nh ?nh hoa/v?t ph?m,
  /* Resource Center (Kho,
  /* Resource Tabs & Auto Category Tabs */
.resource-tabs,
  /* Setting Cards & Toggles */
.setting-card,
  /* Steal Cap & Palace Exact-Rarity Policy Controls */
[data-section="06"] select[data-setting-key^="steal_"],
  /* Đơn Nhóm & Đơn Cư Dân / Đơn Khách / Đơn Vải Gỗ */
.group-order-fields,
  B?i d??ng Hoa,
  Boards,
  Chợ,
  Task Lists & Shops */
.game2048-copy,
  Th??ng nh?n du h?nh) & Right Rail */
.resource-center,
  Ti?m Hoa,
  Trồng Hoa,
  [data-palace-policy] select[data-palace-key],
  counts) */
.flower-transfer-flower,
  l?m ??p khung + t?n + s? l??ng) */
.flower-tools,
  names,
  polish frames,
  Đơn Cư Dân
) {
  background: var(--ui-surface-soft) !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] :is(
  .steal-flower i,
  .steal-history-item,
  .subpanel input[type="search"],
  .warehouse-use-item,
  /* ==========================================================================
   Inner Auto Sub-modules ("Ruột con": Đơn Nhóm,
  /* Art Sale Racks & Spirit Slots & Plant Plots */
.art-rack,
  /* Compact Category Nav & Resource Center inside Chi tiết */
.auto-category-nav,
  /* Flower & Item Card Frames (Keep all <img> intact,
  /* Inner Sub-panels,
  /* Khung th? Hoa & V?t ph?m (gi? nguy?n h?nh ?nh hoa/v?t ph?m,
  /* Resource Center (Kho,
  /* Resource Tabs & Auto Category Tabs */
.resource-tabs,
  /* Setting Cards & Toggles */
.setting-card,
  /* Steal Cap & Palace Exact-Rarity Policy Controls */
[data-section="06"] select[data-setting-key^="steal_"],
  /* Đơn Nhóm & Đơn Cư Dân / Đơn Khách / Đơn Vải Gỗ */
.group-order-fields,
  B?i d??ng Hoa,
  Boards,
  Chợ,
  Task Lists & Shops */
.game2048-copy,
  Th??ng nh?n du h?nh) & Right Rail */
.resource-center,
  Ti?m Hoa,
  Trồng Hoa,
  [data-palace-policy] select[data-palace-key],
  counts) */
.flower-transfer-flower,
  l?m ??p khung + t?n + s? l??ng) */
.flower-tools,
  names,
  polish frames,
  Đơn Cư Dân
) :is(h1,h2,h3,h4,p,label,strong,b,span,em):not(.badge):not([class*="status"]):not([class*="rarity"]) {
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="dark"] :is(
  .steal-flower i,
  .steal-history-item,
  .subpanel input[type="search"],
  .warehouse-use-item,
  /* ==========================================================================
   Inner Auto Sub-modules ("Ruột con": Đơn Nhóm,
  /* Art Sale Racks & Spirit Slots & Plant Plots */
.art-rack,
  /* Compact Category Nav & Resource Center inside Chi tiết */
.auto-category-nav,
  /* Flower & Item Card Frames (Keep all <img> intact,
  /* Inner Sub-panels,
  /* Khung th? Hoa & V?t ph?m (gi? nguy?n h?nh ?nh hoa/v?t ph?m,
  /* Resource Center (Kho,
  /* Resource Tabs & Auto Category Tabs */
.resource-tabs,
  /* Setting Cards & Toggles */
.setting-card,
  /* Steal Cap & Palace Exact-Rarity Policy Controls */
[data-section="06"] select[data-setting-key^="steal_"],
  /* Đơn Nhóm & Đơn Cư Dân / Đơn Khách / Đơn Vải Gỗ */
.group-order-fields,
  B?i d??ng Hoa,
  Boards,
  Chợ,
  Task Lists & Shops */
.game2048-copy,
  Th??ng nh?n du h?nh) & Right Rail */
.resource-center,
  Ti?m Hoa,
  Trồng Hoa,
  [data-palace-policy] select[data-palace-key],
  counts) */
.flower-transfer-flower,
  l?m ??p khung + t?n + s? l??ng) */
.flower-tools,
  names,
  polish frames,
  Đơn Cư Dân
) small {
  color: var(--ui-muted) !important;
}
@media (prefers-color-scheme: dark) {
:root[data-theme-mode="auto"] :is(
  ...)
   ========================================================================== */
.section-card,
  .act-merge2-section .merge2-cell.item,
  .act-merge2-section .merge2-grid > section,
  .activity,
  .activity #activityList .activity-item,
  .activity-dialog,
  .activity-dialog-list .activity-item,
  .activity-dialog-summary>span,
  .ad-queue-item,
  .ad-skip-control,
  .art-craft-dialog button,
  .art-craft-dialog form>footer,
  .art-craft-flower img,
  .art-craft-vase>img,
  .art-item,
  .art-rack,
  .auto-category-tabs,
  .basic-group,
  .basic-group-meta em,
  .basic-group>header em,
  .basic-group>header>span,
  .bloom-model-picker button,
  .bloom-rewards,
  .card,
  .chips .chip,
  .choice-card,
  .choice-grid > button,
  .config-option,
  .cultivate-grid > article,
  .cultivate-pager button
) {
  background: var(--ui-surface-soft) !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="auto"] :is(
  ...)
   ========================================================================== */
.section-card,
  .act-merge2-section .merge2-cell.item,
  .act-merge2-section .merge2-grid > section,
  .activity,
  .activity #activityList .activity-item,
  .activity-dialog,
  .activity-dialog-list .activity-item,
  .activity-dialog-summary>span,
  .ad-queue-item,
  .ad-skip-control,
  .art-craft-dialog button,
  .art-craft-dialog form>footer,
  .art-craft-flower img,
  .art-craft-vase>img,
  .art-item,
  .art-rack,
  .auto-category-tabs,
  .basic-group,
  .basic-group-meta em,
  .basic-group>header em,
  .basic-group>header>span,
  .bloom-model-picker button,
  .bloom-rewards,
  .card,
  .chips .chip,
  .choice-card,
  .choice-grid > button,
  .config-option,
  .cultivate-grid > article,
  .cultivate-pager button
) :is(h1,h2,h3,h4,p,label,strong,b,span,em):not(.badge):not([class*="status"]):not([class*="rarity"]) {
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="auto"] :is(
  ...)
   ========================================================================== */
.section-card,
  .act-merge2-section .merge2-cell.item,
  .act-merge2-section .merge2-grid > section,
  .activity,
  .activity #activityList .activity-item,
  .activity-dialog,
  .activity-dialog-list .activity-item,
  .activity-dialog-summary>span,
  .ad-queue-item,
  .ad-skip-control,
  .art-craft-dialog button,
  .art-craft-dialog form>footer,
  .art-craft-flower img,
  .art-craft-vase>img,
  .art-item,
  .art-rack,
  .auto-category-tabs,
  .basic-group,
  .basic-group-meta em,
  .basic-group>header em,
  .basic-group>header>span,
  .bloom-model-picker button,
  .bloom-rewards,
  .card,
  .chips .chip,
  .choice-card,
  .choice-grid > button,
  .config-option,
  .cultivate-grid > article,
  .cultivate-pager button
) small {
  color: var(--ui-muted) !important;
}
:root[data-theme-mode="auto"] :is(
  .cyclic-note-history,
  .cyclic-note-milestone-list article,
  .cyclic-note-milestone-panel,
  .cyclic-note-roll,
  .cyclic-note-shop,
  .cyclic-note-shop-item,
  .cyclic-note-status,
  .cyclic-note-tasks,
  .cyclic-note-unlock,
  .cyclic-vase-grid > section,
  .cyclic-vase-grid>section,
  .cyclic-vase-history,
  .cyclic-vase-notice,
  .cyclic-vase-shop button,
  .daily-reward-history article,
  .daily-reward-row,
  .dessert-grid > section,
  .dessert-live,
  .dessert-modes,
  .dessert-safety,
  .dragon-boat-flower,
  .dragon-boat-flower-empty,
  .dragon-boat-policy .field-row,
  .dragon-boat-skip-green,
  .event-order,
  .event-story-counts span,
  .feast-detail>section,
  .feast-reward,
  .field-row input[type="number"],
  .fleet-account-row
) {
  background: var(--ui-surface-soft) !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="auto"] :is(
  .cyclic-note-history,
  .cyclic-note-milestone-list article,
  .cyclic-note-milestone-panel,
  .cyclic-note-roll,
  .cyclic-note-shop,
  .cyclic-note-shop-item,
  .cyclic-note-status,
  .cyclic-note-tasks,
  .cyclic-note-unlock,
  .cyclic-vase-grid > section,
  .cyclic-vase-grid>section,
  .cyclic-vase-history,
  .cyclic-vase-notice,
  .cyclic-vase-shop button,
  .daily-reward-history article,
  .daily-reward-row,
  .dessert-grid > section,
  .dessert-live,
  .dessert-modes,
  .dessert-safety,
  .dragon-boat-flower,
  .dragon-boat-flower-empty,
  .dragon-boat-policy .field-row,
  .dragon-boat-skip-green,
  .event-order,
  .event-story-counts span,
  .feast-detail>section,
  .feast-reward,
  .field-row input[type="number"],
  .fleet-account-row
) :is(h1,h2,h3,h4,p,label,strong,b,span,em):not(.badge):not([class*="status"]):not([class*="rarity"]) {
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="auto"] :is(
  .cyclic-note-history,
  .cyclic-note-milestone-list article,
  .cyclic-note-milestone-panel,
  .cyclic-note-roll,
  .cyclic-note-shop,
  .cyclic-note-shop-item,
  .cyclic-note-status,
  .cyclic-note-tasks,
  .cyclic-note-unlock,
  .cyclic-vase-grid > section,
  .cyclic-vase-grid>section,
  .cyclic-vase-history,
  .cyclic-vase-notice,
  .cyclic-vase-shop button,
  .daily-reward-history article,
  .daily-reward-row,
  .dessert-grid > section,
  .dessert-live,
  .dessert-modes,
  .dessert-safety,
  .dragon-boat-flower,
  .dragon-boat-flower-empty,
  .dragon-boat-policy .field-row,
  .dragon-boat-skip-green,
  .event-order,
  .event-story-counts span,
  .feast-detail>section,
  .feast-reward,
  .field-row input[type="number"],
  .fleet-account-row
) small {
  color: var(--ui-muted) !important;
}
:root[data-theme-mode="auto"] :is(
  .fleet-filters button,
  .fleet-shortcuts button,
  .florist-grid > article,
  .flower-battle-choice,
  .flower-battle-grid > section,
  .flower-battle-grid>section,
  .flower-battle-summary article,
  .flower-bg-filters button,
  .flower-transfer-account,
  .flower-transfer-card,
  .flower-transfer-flower-grid .flower-transfer-flower,
  .flower-transfer-flower-grid.with-breakdown .flower-transfer-breakdown span,
  .flower-transfer-flower-grid.with-breakdown .flower-transfer-flower,
  .flower-transfer-flower-grid.with-breakdown .flower-transfer-flower-main>span,
  .flower-transfer-flower-main>span,
  .flower-transfer-flower.selected .flower-transfer-inline-recommend,
  .flower-transfer-history>header button,
  .flower-transfer-nav>button,
  .flower-transfer-search,
  .flower-transfer-source-choice,
  .flower-transfer-stepper button,
  .flower-transfer-stepper input,
  .flower-transfer-suggestions button,
  .flower-transfer-tile-grid .flower-transfer-flower-main>span,
  .flower-transfer-tile-grid .flower-transfer-source-choice,
  .fresh-market-shelf,
  .friend-delete-preview>div span,
  .friend-send-preview>div span,
  .game-task-tabs button,
  .game2048-shop
) {
  background: var(--ui-surface-soft) !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="auto"] :is(
  .fleet-filters button,
  .fleet-shortcuts button,
  .florist-grid > article,
  .flower-battle-choice,
  .flower-battle-grid > section,
  .flower-battle-grid>section,
  .flower-battle-summary article,
  .flower-bg-filters button,
  .flower-transfer-account,
  .flower-transfer-card,
  .flower-transfer-flower-grid .flower-transfer-flower,
  .flower-transfer-flower-grid.with-breakdown .flower-transfer-breakdown span,
  .flower-transfer-flower-grid.with-breakdown .flower-transfer-flower,
  .flower-transfer-flower-grid.with-breakdown .flower-transfer-flower-main>span,
  .flower-transfer-flower-main>span,
  .flower-transfer-flower.selected .flower-transfer-inline-recommend,
  .flower-transfer-history>header button,
  .flower-transfer-nav>button,
  .flower-transfer-search,
  .flower-transfer-source-choice,
  .flower-transfer-stepper button,
  .flower-transfer-stepper input,
  .flower-transfer-suggestions button,
  .flower-transfer-tile-grid .flower-transfer-flower-main>span,
  .flower-transfer-tile-grid .flower-transfer-source-choice,
  .fresh-market-shelf,
  .friend-delete-preview>div span,
  .friend-send-preview>div span,
  .game-task-tabs button,
  .game2048-shop
) :is(h1,h2,h3,h4,p,label,strong,b,span,em):not(.badge):not([class*="status"]):not([class*="rarity"]) {
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="auto"] :is(
  .fleet-filters button,
  .fleet-shortcuts button,
  .florist-grid > article,
  .flower-battle-choice,
  .flower-battle-grid > section,
  .flower-battle-grid>section,
  .flower-battle-summary article,
  .flower-bg-filters button,
  .flower-transfer-account,
  .flower-transfer-card,
  .flower-transfer-flower-grid .flower-transfer-flower,
  .flower-transfer-flower-grid.with-breakdown .flower-transfer-breakdown span,
  .flower-transfer-flower-grid.with-breakdown .flower-transfer-flower,
  .flower-transfer-flower-grid.with-breakdown .flower-transfer-flower-main>span,
  .flower-transfer-flower-main>span,
  .flower-transfer-flower.selected .flower-transfer-inline-recommend,
  .flower-transfer-history>header button,
  .flower-transfer-nav>button,
  .flower-transfer-search,
  .flower-transfer-source-choice,
  .flower-transfer-stepper button,
  .flower-transfer-stepper input,
  .flower-transfer-suggestions button,
  .flower-transfer-tile-grid .flower-transfer-flower-main>span,
  .flower-transfer-tile-grid .flower-transfer-source-choice,
  .fresh-market-shelf,
  .friend-delete-preview>div span,
  .friend-send-preview>div span,
  .game-task-tabs button,
  .game2048-shop
) small {
  color: var(--ui-muted) !important;
}
:root[data-theme-mode="auto"] :is(
  .garden-select select,
  .garden-sync-all,
  .group-order-day-grid span,
  .group-order-fields input,
  .group-order-fields select,
  .group-order-history-row,
  .group-order-metrics span,
  .group-order-paid,
  .group-order-status,
  .guest-full,
  .guest-order-detail .guest-full,
  .guest-order-detail>input,
  .guild-catalog-item,
  .guild-flower-item i,
  .guild-flower-item img,
  .guild-flower-no-result,
  .guild-flower-picker [data-guild-flower-selected],
  .guild-flower-result,
  .guild-harvest-detail .guild-flower-item,
  .guild-harvest-detail .guild-flower-time,
  .guild-land-cell,
  .guild-land-level,
  .honey-event-detail,
  .honey-pot,
  .honey-shop-options button,
  .honey-time-window input,
  .land-unlock-next>i,
  .land-unlock-tiers>span,
  .main-quest-detail>label,
  .main-quest-limit
) {
  background: var(--ui-surface-soft) !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="auto"] :is(
  .garden-select select,
  .garden-sync-all,
  .group-order-day-grid span,
  .group-order-fields input,
  .group-order-fields select,
  .group-order-history-row,
  .group-order-metrics span,
  .group-order-paid,
  .group-order-status,
  .guest-full,
  .guest-order-detail .guest-full,
  .guest-order-detail>input,
  .guild-catalog-item,
  .guild-flower-item i,
  .guild-flower-item img,
  .guild-flower-no-result,
  .guild-flower-picker [data-guild-flower-selected],
  .guild-flower-result,
  .guild-harvest-detail .guild-flower-item,
  .guild-harvest-detail .guild-flower-time,
  .guild-land-cell,
  .guild-land-level,
  .honey-event-detail,
  .honey-pot,
  .honey-shop-options button,
  .honey-time-window input,
  .land-unlock-next>i,
  .land-unlock-tiers>span,
  .main-quest-detail>label,
  .main-quest-limit
) :is(h1,h2,h3,h4,p,label,strong,b,span,em):not(.badge):not([class*="status"]):not([class*="rarity"]) {
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="auto"] :is(
  .garden-select select,
  .garden-sync-all,
  .group-order-day-grid span,
  .group-order-fields input,
  .group-order-fields select,
  .group-order-history-row,
  .group-order-metrics span,
  .group-order-paid,
  .group-order-status,
  .guest-full,
  .guest-order-detail .guest-full,
  .guest-order-detail>input,
  .guild-catalog-item,
  .guild-flower-item i,
  .guild-flower-item img,
  .guild-flower-no-result,
  .guild-flower-picker [data-guild-flower-selected],
  .guild-flower-result,
  .guild-harvest-detail .guild-flower-item,
  .guild-harvest-detail .guild-flower-time,
  .guild-land-cell,
  .guild-land-level,
  .honey-event-detail,
  .honey-pot,
  .honey-shop-options button,
  .honey-time-window input,
  .land-unlock-next>i,
  .land-unlock-tiers>span,
  .main-quest-detail>label,
  .main-quest-limit
) small {
  color: var(--ui-muted) !important;
}
:root[data-theme-mode="auto"] :is(
  .main-quest-permissions select[data-main-quest-cap],
  .main-quest-permissions>div,
  .market-buy-history-list .market-trade-row,
  .market-trade-flower,
  .merge2-cell:has(.merge2-item-icon) small,
  .merge2-grid>section,
  .merge2-modes button,
  .merge2-summary article,
  .order-progress,
  .order-progress>span,
  .pearl-draw-balance,
  .pearl-draw-balance i,
  .pearl-history-entry,
  .pearl-item-symbol,
  .pearl-place,
  .pearl-place-toolbar,
  .pearl-ticket-stock i,
  .peddler-next>i,
  .phone-session-grace-banner>span,
  .plant-speed-actions button,
  .plant-strategy-options button,
  .plant-type-options button,
  .plot-card,
  .real-flower-win-popup button,
  .resource-center-tabs > button,
  .resource-mode-notice article,
  .resource-tabs > button,
  .resource-tabs button,
  .resource-tabs button.active,
  .resource-tabs button:hover
) {
  background: var(--ui-surface-soft) !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="auto"] :is(
  .main-quest-permissions select[data-main-quest-cap],
  .main-quest-permissions>div,
  .market-buy-history-list .market-trade-row,
  .market-trade-flower,
  .merge2-cell:has(.merge2-item-icon) small,
  .merge2-grid>section,
  .merge2-modes button,
  .merge2-summary article,
  .order-progress,
  .order-progress>span,
  .pearl-draw-balance,
  .pearl-draw-balance i,
  .pearl-history-entry,
  .pearl-item-symbol,
  .pearl-place,
  .pearl-place-toolbar,
  .pearl-ticket-stock i,
  .peddler-next>i,
  .phone-session-grace-banner>span,
  .plant-speed-actions button,
  .plant-strategy-options button,
  .plant-type-options button,
  .plot-card,
  .real-flower-win-popup button,
  .resource-center-tabs > button,
  .resource-mode-notice article,
  .resource-tabs > button,
  .resource-tabs button,
  .resource-tabs button.active,
  .resource-tabs button:hover
) :is(h1,h2,h3,h4,p,label,strong,b,span,em):not(.badge):not([class*="status"]):not([class*="rarity"]) {
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="auto"] :is(
  .main-quest-permissions select[data-main-quest-cap],
  .main-quest-permissions>div,
  .market-buy-history-list .market-trade-row,
  .market-trade-flower,
  .merge2-cell:has(.merge2-item-icon) small,
  .merge2-grid>section,
  .merge2-modes button,
  .merge2-summary article,
  .order-progress,
  .order-progress>span,
  .pearl-draw-balance,
  .pearl-draw-balance i,
  .pearl-history-entry,
  .pearl-item-symbol,
  .pearl-place,
  .pearl-place-toolbar,
  .pearl-ticket-stock i,
  .peddler-next>i,
  .phone-session-grace-banner>span,
  .plant-speed-actions button,
  .plant-strategy-options button,
  .plant-type-options button,
  .plot-card,
  .real-flower-win-popup button,
  .resource-center-tabs > button,
  .resource-mode-notice article,
  .resource-tabs > button,
  .resource-tabs button,
  .resource-tabs button.active,
  .resource-tabs button:hover
) small {
  color: var(--ui-muted) !important;
}
:root[data-theme-mode="auto"] :is(
  .resource-tabs button>i,
  .reward-chest-items span,
  .right-rail .activity,
  .right-rail .card,
  .section-card,
  .section-card[data-section="02"] .plot-map,
  .section-card[data-section="02"] .plot-map .plot-harvest,
  .section-card[data-section="02"] .plot-map .plot-open,
  .section-card[data-section="02"] .plot-map .plot-planted,
  .section-card[data-section="02"] .plot-map .plot-planted:not(.plot-ready),
  .section-card[data-section="03"] .flower-card,
  .section-card[data-section="03"]>.setting-line,
  .section-card[data-section="06"] .field-row,
  .section-card[data-section="06"]>.setting-line,
  .section-card[data-section="07"] .event-progress,
  .section-card[data-section]:not([data-section="01"]),
  .section-card[data-section]:not([data-section="01"]) .choice-card,
  .section-collapse-bottom,
  .segmented button,
  .setting-detail input[type="number"],
  .setting-detail input[type="search"],
  .setting-detail select,
  .smart-friends-status span,
  .spirit-item,
  .spirit-slot,
  .spool-play > div,
  .spool-play>.dessert-modes,
  .spool-play>div,
  .spool-tools,
  .steal-cycle-status span
) {
  background: var(--ui-surface-soft) !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="auto"] :is(
  .resource-tabs button>i,
  .reward-chest-items span,
  .right-rail .activity,
  .right-rail .card,
  .section-card,
  .section-card[data-section="02"] .plot-map,
  .section-card[data-section="02"] .plot-map .plot-harvest,
  .section-card[data-section="02"] .plot-map .plot-open,
  .section-card[data-section="02"] .plot-map .plot-planted,
  .section-card[data-section="02"] .plot-map .plot-planted:not(.plot-ready),
  .section-card[data-section="03"] .flower-card,
  .section-card[data-section="03"]>.setting-line,
  .section-card[data-section="06"] .field-row,
  .section-card[data-section="06"]>.setting-line,
  .section-card[data-section="07"] .event-progress,
  .section-card[data-section]:not([data-section="01"]),
  .section-card[data-section]:not([data-section="01"]) .choice-card,
  .section-collapse-bottom,
  .segmented button,
  .setting-detail input[type="number"],
  .setting-detail input[type="search"],
  .setting-detail select,
  .smart-friends-status span,
  .spirit-item,
  .spirit-slot,
  .spool-play > div,
  .spool-play>.dessert-modes,
  .spool-play>div,
  .spool-tools,
  .steal-cycle-status span
) :is(h1,h2,h3,h4,p,label,strong,b,span,em):not(.badge):not([class*="status"]):not([class*="rarity"]) {
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="auto"] :is(
  .resource-tabs button>i,
  .reward-chest-items span,
  .right-rail .activity,
  .right-rail .card,
  .section-card,
  .section-card[data-section="02"] .plot-map,
  .section-card[data-section="02"] .plot-map .plot-harvest,
  .section-card[data-section="02"] .plot-map .plot-open,
  .section-card[data-section="02"] .plot-map .plot-planted,
  .section-card[data-section="02"] .plot-map .plot-planted:not(.plot-ready),
  .section-card[data-section="03"] .flower-card,
  .section-card[data-section="03"]>.setting-line,
  .section-card[data-section="06"] .field-row,
  .section-card[data-section="06"]>.setting-line,
  .section-card[data-section="07"] .event-progress,
  .section-card[data-section]:not([data-section="01"]),
  .section-card[data-section]:not([data-section="01"]) .choice-card,
  .section-collapse-bottom,
  .segmented button,
  .setting-detail input[type="number"],
  .setting-detail input[type="search"],
  .setting-detail select,
  .smart-friends-status span,
  .spirit-item,
  .spirit-slot,
  .spool-play > div,
  .spool-play>.dessert-modes,
  .spool-play>div,
  .spool-tools,
  .steal-cycle-status span
) small {
  color: var(--ui-muted) !important;
}
:root[data-theme-mode="auto"] :is(
  .steal-flower i,
  .steal-history-item,
  .subpanel input[type="search"],
  .warehouse-use-item,
  /* ==========================================================================
   Inner Auto Sub-modules ("Ruột con": Đơn Nhóm,
  /* Art Sale Racks & Spirit Slots & Plant Plots */
.art-rack,
  /* Compact Category Nav & Resource Center inside Chi tiết */
.auto-category-nav,
  /* Flower & Item Card Frames (Keep all <img> intact,
  /* Inner Sub-panels,
  /* Khung th? Hoa & V?t ph?m (gi? nguy?n h?nh ?nh hoa/v?t ph?m,
  /* Resource Center (Kho,
  /* Resource Tabs & Auto Category Tabs */
.resource-tabs,
  /* Setting Cards & Toggles */
.setting-card,
  /* Steal Cap & Palace Exact-Rarity Policy Controls */
[data-section="06"] select[data-setting-key^="steal_"],
  /* Đơn Nhóm & Đơn Cư Dân / Đơn Khách / Đơn Vải Gỗ */
.group-order-fields,
  B?i d??ng Hoa,
  Boards,
  Chợ,
  Task Lists & Shops */
.game2048-copy,
  Th??ng nh?n du h?nh) & Right Rail */
.resource-center,
  Ti?m Hoa,
  Trồng Hoa,
  [data-palace-policy] select[data-palace-key],
  counts) */
.flower-transfer-flower,
  l?m ??p khung + t?n + s? l??ng) */
.flower-tools,
  names,
  polish frames,
  Đơn Cư Dân
) {
  background: var(--ui-surface-soft) !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="auto"] :is(
  .steal-flower i,
  .steal-history-item,
  .subpanel input[type="search"],
  .warehouse-use-item,
  /* ==========================================================================
   Inner Auto Sub-modules ("Ruột con": Đơn Nhóm,
  /* Art Sale Racks & Spirit Slots & Plant Plots */
.art-rack,
  /* Compact Category Nav & Resource Center inside Chi tiết */
.auto-category-nav,
  /* Flower & Item Card Frames (Keep all <img> intact,
  /* Inner Sub-panels,
  /* Khung th? Hoa & V?t ph?m (gi? nguy?n h?nh ?nh hoa/v?t ph?m,
  /* Resource Center (Kho,
  /* Resource Tabs & Auto Category Tabs */
.resource-tabs,
  /* Setting Cards & Toggles */
.setting-card,
  /* Steal Cap & Palace Exact-Rarity Policy Controls */
[data-section="06"] select[data-setting-key^="steal_"],
  /* Đơn Nhóm & Đơn Cư Dân / Đơn Khách / Đơn Vải Gỗ */
.group-order-fields,
  B?i d??ng Hoa,
  Boards,
  Chợ,
  Task Lists & Shops */
.game2048-copy,
  Th??ng nh?n du h?nh) & Right Rail */
.resource-center,
  Ti?m Hoa,
  Trồng Hoa,
  [data-palace-policy] select[data-palace-key],
  counts) */
.flower-transfer-flower,
  l?m ??p khung + t?n + s? l??ng) */
.flower-tools,
  names,
  polish frames,
  Đơn Cư Dân
) :is(h1,h2,h3,h4,p,label,strong,b,span,em):not(.badge):not([class*="status"]):not([class*="rarity"]) {
  color: var(--ui-ink) !important;
}
:root[data-theme-mode="auto"] :is(
  .steal-flower i,
  .steal-history-item,
  .subpanel input[type="search"],
  .warehouse-use-item,
  /* ==========================================================================
   Inner Auto Sub-modules ("Ruột con": Đơn Nhóm,
  /* Art Sale Racks & Spirit Slots & Plant Plots */
.art-rack,
  /* Compact Category Nav & Resource Center inside Chi tiết */
.auto-category-nav,
  /* Flower & Item Card Frames (Keep all <img> intact,
  /* Inner Sub-panels,
  /* Khung th? Hoa & V?t ph?m (gi? nguy?n h?nh ?nh hoa/v?t ph?m,
  /* Resource Center (Kho,
  /* Resource Tabs & Auto Category Tabs */
.resource-tabs,
  /* Setting Cards & Toggles */
.setting-card,
  /* Steal Cap & Palace Exact-Rarity Policy Controls */
[data-section="06"] select[data-setting-key^="steal_"],
  /* Đơn Nhóm & Đơn Cư Dân / Đơn Khách / Đơn Vải Gỗ */
.group-order-fields,
  B?i d??ng Hoa,
  Boards,
  Chợ,
  Task Lists & Shops */
.game2048-copy,
  Th??ng nh?n du h?nh) & Right Rail */
.resource-center,
  Ti?m Hoa,
  Trồng Hoa,
  [data-palace-policy] select[data-palace-key],
  counts) */
.flower-transfer-flower,
  l?m ??p khung + t?n + s? l??ng) */
.flower-tools,
  names,
  polish frames,
  Đơn Cư Dân
) small {
  color: var(--ui-muted) !important;
}
}
