/* ==========================================================================
   EliteChess — Chess Empire Strategy & Operations Stylesheet
   Refined Obsidian & Antique Gold Architecture (Desktop + Full-Width Mobile)
   ========================================================================== */

#view-tasks .tasks-hub-container,
#referral-content-wrapper {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 0 48px;
  color: var(--text-primary, #F8FAFC);
  box-sizing: border-box;
}

.emp-page-shell {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  min-width: 0;
}

/* --- 1. Compact Header Bar & Switchable Tabs --- */
.emp-command-hero {
  background: linear-gradient(180deg, #161822 0%, #101219 100%);
  border: 1px solid rgba(212, 175, 55, 0.32);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 24px rgba(0, 0, 0, 0.25);
}

.emp-compact-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.emp-compact-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.emp-crest-badge {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emp-crest-badge svg {
  width: 34px;
  height: 34px;
}

.emp-brand-text {
  min-width: 0;
}

.emp-brand-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.emp-page-title {
  margin: 0;
  font-size: 1.24rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  line-height: 1.15;
}

.emp-class-pill {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #E2E8F0;
}

.emp-class-pill.is-promoted {
  background: rgba(212, 175, 55, 0.18);
  border-color: rgba(212, 175, 55, 0.55);
  color: #FDE68A;
}

.emp-eyebrow {
  font-size: 0.74rem;
  font-weight: 700;
  color: #E5C158;
  margin-top: 2px;
}

.emp-compact-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.emp-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 9px;
  background: #0A0C12;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
  font-size: 0.84rem;
  font-weight: 800;
  color: #FFFFFF;
}

.emp-stat-pill.accent {
  border-color: rgba(212, 175, 55, 0.42);
  background: rgba(212, 175, 55, 0.1);
}

.emp-yield-val {
  color: #FDE68A;
}

.emp-jump-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.emp-jump-btn.primary {
  background: linear-gradient(135deg, #D4AF37 0%, #B45309 100%);
  color: #09090B;
  border-color: transparent;
}

.emp-jump-btn.primary svg,
.emp-streak-btn:not(:disabled) svg,
.emp-alliance-btn.primary svg,
.emp-copy-btn.primary svg,
.emp-promote-btn svg,
.emp-copy-link-btn svg,
.emp-op-btn.claim svg,
#sheet-confirm-upgrade-btn svg {
  color: #09090B !important;
  stroke: currentColor !important;
  width: 15px;
  height: 15px;
}

.emp-main-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.emp-main-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #CBD5E1;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.emp-main-tab-btn:hover {
  border-color: rgba(212, 175, 55, 0.45);
  color: #FFFFFF;
}

.emp-main-tab-btn.active {
  background: rgba(212, 175, 55, 0.18);
  border-color: rgba(212, 175, 55, 0.72);
  color: #FDE68A;
}

.emp-tab-badge {
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #E2E8F0;
  white-space: nowrap;
}

.emp-main-tab-btn.active .emp-tab-badge {
  background: rgba(212, 175, 55, 0.22);
  color: #FDE68A;
}

.emp-tab-badge.ready {
  background: rgba(16, 185, 129, 0.2);
  color: #6EE7B7;
}

/* --- 2. Section Heads & Inline Filter Rail --- */
.emp-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.emp-section-highlight {
  outline: 1px solid rgba(212, 175, 55, 0.6);
  outline-offset: 6px;
  border-radius: 12px;
}

.emp-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.emp-section-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.emp-section-sub {
  margin: 2px 0 0;
  font-size: 0.79rem;
  color: #94A3B8;
}

.emp-count-pill {
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  font-weight: 800;
  color: #D4AF37;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 4px 10px;
  border-radius: 999px;
}

.emp-filter-rail {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.emp-filter-btn {
  min-height: 33px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
  color: #94A3B8;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.emp-filter-btn:hover {
  color: #FFFFFF;
  border-color: rgba(212, 175, 55, 0.35);
}

.emp-filter-btn.active {
  background: rgba(212, 175, 55, 0.16);
  border-color: rgba(212, 175, 55, 0.6);
  color: #FDE68A;
}

/* --- 3. Compact High-Contrast Product Cards --- */
.emp-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.emp-product-card {
  background: #141720;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.14s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  min-width: 0;
}

.emp-product-card:hover {
  border-color: rgba(212, 175, 55, 0.55);
  background: #191D29;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 6px 18px rgba(0, 0, 0, 0.24);
}

.emp-product-card:active {
  transform: scale(0.985);
}

.emp-product-card.just-upgraded {
  animation: empCardPop 0.7s cubic-bezier(0.2, 0.9, 0.3, 1);
  border-color: #FBBF24 !important;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.45), 0 0 22px rgba(212, 175, 55, 0.32);
}

@keyframes empCardPop {
  0% { transform: scale(1); }
  30% { transform: scale(1.022); }
  100% { transform: scale(1); }
}

.emp-product-card.can-afford {
  border-color: rgba(212, 175, 55, 0.5);
}

.emp-product-card.is-class-c {
  background: linear-gradient(180deg, rgba(36, 28, 15, 0.92) 0%, #141720 100%);
  border-color: rgba(212, 175, 55, 0.42);
}

.emp-product-card.is-locked {
  background: #12151E;
  border-color: rgba(255, 255, 255, 0.12);
}

.emp-card-top {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.emp-art-frame {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #0A0C12;
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.emp-art-frame.is-exclusive-art {
  border-color: rgba(212, 175, 55, 0.55);
}

.emp-art-img,
.emp-art-svg-wrap,
.empire-art-svg {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emp-lock-pin {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(15, 17, 25, 0.96);
  border: 1px solid rgba(212, 175, 55, 0.65);
  color: #FDE68A;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emp-lock-pin svg {
  width: 9px;
  height: 9px;
}

.emp-card-heading {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.emp-card-subline {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.emp-card-name {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.22;
}

.emp-tier-tag {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #FDE68A;
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
}

.emp-card-yield-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  font-weight: 900;
  color: #FDE68A;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 3px 8px;
  border-radius: 7px;
  flex-shrink: 0;
}

.emp-card-lvl {
  font-family: var(--font-mono, monospace);
  font-size: 0.74rem;
  font-weight: 700;
  color: #E2E8F0;
}

.emp-card-lvl-bar {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 2px;
}

.emp-card-lvl-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #D4AF37 0%, #FBBF24 100%);
  transition: width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.emp-product-card.is-best-roi .emp-card-lvl-fill {
  background: linear-gradient(90deg, #10B981 0%, #34D399 100%);
}

.emp-card-footer {
  margin-top: auto;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.emp-next-gain {
  font-family: var(--font-mono, monospace);
  font-size: 0.73rem;
  font-weight: 700;
  color: #CBD5E1;
  white-space: nowrap;
}

.emp-upgrade-btn {
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.55);
  background: linear-gradient(135deg, #D4AF37 0%, #B45309 100%);
  color: #09090B;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.emp-upgrade-btn:hover {
  opacity: 0.92;
}

.emp-upgrade-btn.dim {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.24);
  color: #F8FAFC;
}

.emp-lock-req-btn {
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.12);
  color: #FDE68A;
  font-size: 0.74rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 7px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.emp-lock-req-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.65);
}

.emp-lock-req-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FCD34D;
  flex-shrink: 0;
}

.emp-lock-req-icon svg {
  width: 13px;
  height: 13px;
}

.emp-lock-req-txt {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.emp-lock-req-arrow {
  color: #FDE68A;
  font-weight: 900;
  flex-shrink: 0;
}

.emp-upgrade-price {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
}

.emp-action-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #E2E8F0;
}

.emp-action-status svg {
  width: 13px;
  height: 13px;
  color: #D4AF37;
}

.emp-action-status.maxed {
  color: #6EE7B7;
}

/* --- 4. Class C Exclusive Showcase --- */
.emp-exclusive-vault {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(212, 175, 55, 0.35);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.emp-exclusive-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.emp-exclusive-eyebrow {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #D4AF37;
}

.emp-exclusive-title {
  margin: 2px 0;
  font-size: 1.04rem;
  font-weight: 800;
  color: #FFFFFF;
}

.emp-exclusive-sub {
  margin: 0;
  font-size: 0.78rem;
  color: #94A3B8;
}

.emp-promote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  border: none;
  background: linear-gradient(135deg, #D4AF37 0%, #B45309 100%);
  color: #09090B;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.emp-ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: #E2E8F0;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.emp-unlocked-pill {
  padding: 5px 11px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6EE7B7;
  font-size: 0.74rem;
  font-weight: 800;
}

/* --- 5. Synergies & Ranks Matrix --- */
.emp-strategy-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.emp-strategy-block {
  background: #111218;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.emp-sub-heading {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: #FFFFFF;
}

.emp-synergy-list,
.emp-rank-ladder {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.emp-synergy-row,
.emp-rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.emp-synergy-row.active,
.emp-rank-row.current {
  border-color: rgba(212, 175, 55, 0.45);
  background: rgba(212, 175, 55, 0.07);
}

.emp-syn-title,
.emp-rank-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: #FFFFFF;
}

.emp-syn-title span {
  color: #D4AF37;
  margin-left: 4px;
}

.emp-syn-req,
.emp-rank-req {
  font-size: 0.7rem;
  color: #94A3B8;
}

.emp-syn-state,
.emp-rank-tag {
  font-size: 0.68rem;
  font-weight: 800;
  color: #64748B;
}

.emp-syn-state.active {
  color: #6EE7B7;
}

.emp-rank-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.emp-rank-mult {
  font-size: 0.74rem;
  font-weight: 800;
  color: #FDE68A;
}

/* --- 6. Daily Streak, Task Operations & Social Missions --- */
.emp-reset-timer {
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
  font-size: 0.74rem;
  color: #94A3B8;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5px 10px;
  border-radius: 8px;
}

.emp-streak-strip {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.1), transparent 55%), #111218;
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 12px;
  padding: 13px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.emp-streak-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

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

.emp-streak-label {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94A3B8;
}

.emp-streak-info strong {
  font-size: 0.9rem;
  color: #FFFFFF;
}

.gold-accent {
  color: #FDE68A;
  font-family: var(--font-mono, monospace);
}

.emp-streak-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.emp-streak-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.66rem;
  color: #94A3B8;
}

.emp-streak-day strong {
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  color: #FDE68A;
}

.emp-streak-day.current {
  border-color: rgba(212, 175, 55, 0.7);
  background: rgba(212, 175, 55, 0.14);
  color: #FFFFFF;
}

.emp-streak-day.claimed {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
  color: #6EE7B7;
}

.emp-streak-day.claimed strong {
  color: #6EE7B7;
}

.emp-streak-day.grand:not(.claimed) {
  border-color: rgba(212, 175, 55, 0.35);
}

.emp-streak-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  border: none;
  background: linear-gradient(135deg, #D4AF37 0%, #B45309 100%);
  color: #09090B;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.emp-streak-btn:disabled {
  background: rgba(255, 255, 255, 0.06);
  color: #64748B;
  cursor: default;
}

.emp-ops-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.emp-ops-meter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.emp-ops-meter-txt {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: #94A3B8;
  white-space: nowrap;
}

.emp-ops-meter-txt strong {
  color: #FFFFFF;
}

.emp-ops-meter-txt .ready-txt {
  font-style: normal;
  color: #FDE68A;
  font-weight: 800;
}

.emp-ops-meter-bar {
  width: 72px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.emp-ops-meter-bar > div {
  height: 100%;
  background: linear-gradient(90deg, #D4AF37, #10B981);
}

.emp-ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
}

.emp-op-card {
  background: #141720;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 13px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 74px;
  box-sizing: border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.14s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  min-width: 0;
  overflow: hidden;
}

.emp-op-card:hover {
  transform: translateY(-1px);
  border-color: rgba(212, 175, 55, 0.36);
  background: #171B26;
}

.emp-op-card:hover .emp-op-icon {
  transform: scale(1.06);
}

.emp-op-card.claimable {
  border-color: rgba(251, 191, 36, 0.65);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.14) 0%, #141720 62%);
  box-shadow: inset 0 1px 0 rgba(251, 191, 36, 0.22), 0 4px 16px rgba(212, 175, 55, 0.1);
}

.emp-op-card.claimed {
  border-color: rgba(16, 185, 129, 0.3);
  background: #11151B;
}

.emp-op-left {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1 1 auto;
  min-width: 0;
}

.emp-op-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: #FDE68A;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.16s ease;
}

.emp-op-icon svg {
  width: 17px;
  height: 17px;
}

.emp-op-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.emp-op-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.emp-op-info h4 {
  margin: 0;
  font-size: 0.87rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emp-ready-badge {
  flex-shrink: 0;
  font-family: var(--font-mono, monospace);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(251, 191, 36, 0.22);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #FEF08A;
}

.emp-op-meta-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 0;
}

.emp-op-prog {
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  font-weight: 700;
  color: #CBD5E1;
}

.emp-op-prog.ready {
  color: #FDE68A;
}

.emp-op-prog.done {
  color: #6EE7B7;
}

.emp-op-perk {
  font-size: 0.68rem;
  font-weight: 700;
  color: #FBBF24;
  white-space: nowrap;
}

.emp-op-prog-bar {
  width: 100%;
  max-width: 155px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin-top: 2px;
}

.emp-op-prog-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #64748B 0%, #94A3B8 100%);
  transition: width 0.35s ease;
}

.emp-op-card.claimable .emp-op-prog-fill {
  background: linear-gradient(90deg, #D4AF37 0%, #FBBF24 100%);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.45);
}

.emp-op-card.claimed .emp-op-prog-fill {
  background: linear-gradient(90deg, #10B981 0%, #34D399 100%);
}

.emp-op-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.emp-op-reward {
  flex-shrink: 0;
}

.emp-op-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  min-width: 104px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #E2E8F0;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.emp-op-btn.start:hover {
  border-color: rgba(212, 175, 55, 0.45);
  color: #FFFFFF;
}

.emp-op-btn.claim {
  background: linear-gradient(135deg, #D4AF37 0%, #B45309 100%);
  color: #09090B;
  border-color: transparent;
}

.emp-op-btn.done {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
  color: #6EE7B7;
  cursor: default;
}

.emp-empty-ops {
  grid-column: 1 / -1;
  padding: 20px 14px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  text-align: center;
  color: #94A3B8;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
}

/* Community Missions */
.emp-social-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.emp-sub-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.emp-bounty-pill {
  font-family: var(--font-mono, monospace);
  font-size: 0.74rem;
  font-weight: 800;
  color: #FDE68A;
}

.emp-social-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.emp-social-card {
  background: #111218;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 9px;
}

.emp-social-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.emp-social-meta {
  min-width: 0;
}

.emp-social-plat {
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #94A3B8;
}

.emp-social-left h4 {
  margin: 1px 0 0;
  font-size: 0.82rem;
  font-weight: 800;
  color: #FFFFFF;
}

.emp-social-right {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* --- 7. Integrated Alliance & Recruit Network --- */
.emp-alliance-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.emp-alliance-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 12px;
}

.emp-invite-console,
.emp-roster-panel {
  background: #111218;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
}

.emp-code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.emp-code-meta {
  min-width: 0;
  flex: 1 1 auto;
}

.emp-code-display {
  font-family: var(--font-mono, monospace);
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #FDE68A;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.emp-copy-chip,
.emp-mini-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.1);
  color: #FDE68A;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

.emp-link-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #08090D;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  padding: 3px 3px 3px 10px;
}

.emp-link-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #CBD5E1;
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
}

.emp-copy-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  border: none;
  background: linear-gradient(135deg, #D4AF37 0%, #B45309 100%);
  color: #09090B;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
}

.emp-share-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.emp-share-chip {
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
  color: #E2E8F0;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.emp-share-chip:hover {
  border-color: rgba(212, 175, 55, 0.45);
}

.emp-alliance-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.emp-kpi-mini {
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.emp-kpi-mini:last-child {
  border-right: none;
}

.emp-kpi-mini span {
  font-size: 0.66rem;
  color: #94A3B8;
  font-weight: 700;
}

.emp-kpi-mini strong {
  font-family: var(--font-mono, monospace);
  font-size: 0.96rem;
  font-weight: 900;
  color: #FFFFFF;
}

.emp-kpi-mini.gold strong {
  color: #FDE68A;
}

.emp-roster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.emp-roster-head h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: #FFFFFF;
}

.emp-roster-head span {
  font-size: 0.72rem;
  color: #D4AF37;
  font-weight: 700;
}

.emp-roster-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px 8px;
  color: #64748B;
  gap: 5px;
}

.emp-roster-empty h4 {
  margin: 0;
  font-size: 0.86rem;
  color: #CBD5E1;
}

.emp-roster-empty p {
  margin: 0;
  font-size: 0.74rem;
  max-width: 260px;
}

.emp-roster-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.emp-custom-codes-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.emp-custom-codes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.emp-code-quota-pill {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  font-weight: 800;
  color: #FDE68A;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 999px;
  padding: 2px 8px;
}

.emp-roster-row,
.emp-custom-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.76rem;
  min-width: 0;
}

.emp-custom-code-row.muted {
  color: #94A3B8;
  font-size: 0.74rem;
}

.emp-custom-code-name {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emp-custom-code-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.emp-mini-copy.accent {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.42);
  color: #6EE7B7;
}

.emp-roster-user {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.emp-roster-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.emp-roster-status {
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

.emp-roster-status.activated {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.42);
  color: #6EE7B7;
}

.emp-roster-status.pending {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #FDE68A;
}

.emp-roster-status.suspended {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.38);
  color: #FCA5A5;
}

.emp-roster-user > span {
  font-size: 0.66rem;
  color: #94A3B8;
}

.emp-roster-royalties {
  font-family: var(--font-mono, monospace);
  font-weight: 800;
  color: #6EE7B7;
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- 8. Empire Upgrade Strategy Drawer Modal --- */
#modal-empire-upgrade-sheet {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.78);
  align-items: flex-end;
  justify-content: center;
  padding: 10px;
}

#modal-empire-upgrade-sheet.active {
  display: flex !important;
}

.empire-upgrade-sheet-box {
  background: #13141B;
  border: 1px solid rgba(212, 175, 55, 0.35);
  width: min(100vw - 12px, 440px);
  max-height: min(88dvh, calc(100vh - 20px));
  overflow-y: auto;
  border-radius: 18px;
  padding: 20px 16px 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

@media (min-width: 768px) {
  #modal-empire-upgrade-sheet {
    align-items: center !important;
  }
}

.sheet-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #E2E8F0;
  font-size: 1.2rem;
  cursor: pointer;
}

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

.emp-art-frame.is-modal-art {
  width: 64px;
  height: 64px;
  border-radius: 14px;
}

.emp-art-frame.is-modal-art .emp-art-img,
.emp-art-frame.is-modal-art .empire-art-svg {
  width: 52px;
  height: 52px;
}

.sheet-upgrade-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 900;
  color: #FFFFFF;
}

.sheet-upgrade-desc {
  margin: 0;
  font-size: 0.78rem;
  color: #94A3B8;
  line-height: 1.42;
}

.sheet-level-progression-pill {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.76rem;
  font-weight: 800;
  color: #CBD5E1;
}

.sheet-level-progression-pill .gold-text {
  color: #FDE68A;
}

.sheet-profit-matrix {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 11px;
  padding: 11px;
}

.sheet-profit-divider {
  width: 1px;
  height: 34px;
  background: rgba(255, 255, 255, 0.08);
}

.sheet-profit-col {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sheet-profit-col-label {
  font-size: 0.66rem;
  color: #94A3B8;
  font-weight: 700;
}

.sheet-profit-col-val {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: var(--font-mono, monospace);
  font-size: 0.92rem;
  font-weight: 900;
  color: #FFFFFF;
}

.sheet-profit-col.highlight-gold .sheet-profit-col-val {
  color: #FDE68A;
}

.sheet-conditions-box {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  padding: 11px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sheet-conditions-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94A3B8;
}

.sheet-conditions-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sheet-cond-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: #CBD5E1;
}

.sheet-cond-row.met {
  color: #6EE7B7;
}

.sheet-cond-text {
  flex: 1;
}

.sheet-cond-prog {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: #94A3B8;
}

.sheet-cond-go {
  border: none;
  border-radius: 6px;
  padding: 3px 8px;
  background: rgba(212, 175, 55, 0.16);
  color: #FDE68A;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.sheet-payback-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.76rem;
  color: #94A3B8;
}

.sheet-cost-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font-mono, monospace);
  font-size: 1.3rem;
  font-weight: 900;
  color: #FFFFFF;
}

.btn-sheet-go-ahead {
  width: 100%;
  min-height: 44px;
  border-radius: 11px;
  border: none;
  background: linear-gradient(135deg, #D4AF37 0%, #B45309 100%);
  color: #09090B;
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
}

.btn-sheet-go-ahead.locked,
.btn-sheet-go-ahead.maxed,
.btn-sheet-go-ahead.cannot-afford {
  background: rgba(255, 255, 255, 0.08);
  color: #94A3B8;
}

/* --- 9. Responsive Tablet & Full-Width Mobile UX --- */
@media (max-width: 980px) {
  .emp-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .emp-social-grid,
  .emp-alliance-grid,
  .emp-strategy-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  #view-tasks .tasks-hub-container,
  #referral-content-wrapper {
    padding: 4px 10px 84px !important;
  }
  #view-tasks .emp-upgrade-btn {
    white-space: nowrap !important;
    min-height: 34px !important;
    padding: 0 11px !important;
  }
}

@media (max-width: 640px) {
  .emp-page-shell {
    gap: 14px;
  }
  .emp-command-hero {
    padding: 11px 12px;
    border-radius: 12px;
    gap: 9px;
  }
  .emp-compact-bar {
    gap: 8px;
  }
  .emp-crest-badge {
    width: 30px;
    height: 30px;
  }
  .emp-crest-badge svg {
    width: 30px;
    height: 30px;
  }
  .emp-page-title {
    font-size: 1.12rem;
  }
  .emp-compact-right {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
  }
  .emp-stat-pill {
    min-height: 32px;
    padding: 0 9px;
    font-size: 0.78rem;
    justify-content: center;
    min-width: 0;
  }
  .emp-jump-btn {
    min-height: 32px;
    padding: 0 11px;
    font-size: 0.75rem;
    white-space: nowrap;
  }
  .emp-main-tabs {
    gap: 5px;
    padding-top: 8px;
  }
  .emp-main-tab-btn {
    flex-direction: column;
    gap: 2px;
    min-height: 44px;
    padding: 5px 4px;
    font-size: 0.75rem;
  }
  .emp-tab-badge {
    font-size: 0.62rem;
    padding: 1px 6px;
  }
  .emp-filter-rail {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 5px;
    padding-bottom: 2px;
    mask-image: linear-gradient(to right, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(to right, #000 92%, transparent);
  }
  .emp-filter-rail::-webkit-scrollbar {
    display: none;
  }
  .emp-filter-btn {
    flex: 0 0 auto;
    min-height: 31px;
    padding: 0 11px;
    font-size: 0.72rem;
  }
  .emp-product-grid,
  .emp-ops-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .emp-product-card {
    padding: 11px 12px;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
  }
  .emp-op-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 10px 11px;
    gap: 6px 10px;
  }
  .emp-op-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    margin-left: 0;
    flex-shrink: 0;
  }
  .emp-op-reward {
    font-size: 0.67rem;
    line-height: 1.2;
    padding: 3px 7px;
    white-space: nowrap;
  }
  .emp-streak-strip {
    padding: 11px 12px;
    gap: 9px;
  }
  .emp-streak-days {
    gap: 4px;
  }
  .emp-streak-day {
    padding: 6px 2px;
    font-size: 0.62rem;
  }
  .emp-streak-day strong {
    font-size: 0.66rem;
  }
  .emp-streak-btn {
    padding: 0 12px;
    min-height: 34px;
    font-size: 0.74rem;
  }
  .emp-social-card {
    flex-direction: row;
    align-items: center;
    padding: 10px 11px;
  }
  .emp-social-right {
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    flex-shrink: 0;
  }
  .emp-alliance-head-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .emp-invite-console,
  .emp-roster-panel {
    padding: 12px;
  }
  .emp-share-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- 10. Light Theme Compatibility --- */
html.light-theme .emp-command-hero,
body.light-theme .emp-command-hero,
html.light-theme .emp-product-card,
body.light-theme .emp-product-card,
html.light-theme .emp-streak-strip,
body.light-theme .emp-streak-strip,
html.light-theme .emp-op-card,
body.light-theme .emp-op-card,
html.light-theme .emp-social-card,
body.light-theme .emp-social-card,
html.light-theme .emp-invite-console,
body.light-theme .emp-invite-console,
html.light-theme .emp-roster-panel,
body.light-theme .emp-roster-panel,
html.light-theme .emp-strategy-block,
body.light-theme .emp-strategy-block,
html.light-theme .empire-upgrade-sheet-box,
body.light-theme .empire-upgrade-sheet-box {
  background: #FFFFFF;
  border-color: #E2E8F0;
  color: #0F172A;
}

html.light-theme .emp-stat-pill,
body.light-theme .emp-stat-pill {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: #0F172A;
}

html.light-theme .emp-yield-val,
body.light-theme .emp-yield-val {
  color: #B45309;
}

html.light-theme .emp-page-title,
body.light-theme .emp-page-title,
html.light-theme .emp-section-title,
body.light-theme .emp-section-title,
html.light-theme .emp-card-name,
body.light-theme .emp-card-name,
html.light-theme .emp-op-info h4,
body.light-theme .emp-op-info h4,
html.light-theme .sheet-upgrade-title,
body.light-theme .sheet-upgrade-title {
  color: #0F172A;
}

/* --- 11. Live 3h Vault, Rank Progress, Super Chest & Best ROI Highlights --- */
.emp-rank-strip {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 2px;
}

.emp-rank-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #94A3B8;
  font-weight: 700;
}

.emp-rank-meta strong {
  color: #FDE68A;
}

.emp-rank-bar {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.emp-rank-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #D4AF37 0%, #FBBF24 100%);
  transition: width 0.35s ease;
}

.emp-vault-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(10, 12, 18, 0.78);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 10px;
  padding: 9px 12px;
}

.emp-vault-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.emp-vault-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.emp-vault-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #94A3B8;
}

.emp-vault-amount {
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  font-weight: 800;
  color: #FDE68A;
}

.emp-vault-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.emp-vault-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10B981 0%, #D4AF37 100%);
  transition: width 0.4s ease;
}

.emp-vault-sub {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748B;
}

.emp-harvest-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #94A3B8;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.12s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.emp-harvest-btn.is-ready {
  background: linear-gradient(135deg, #D4AF37 0%, #B45309 100%);
  color: #09090B;
  border-color: transparent;
}

.emp-harvest-btn.is-ready svg {
  color: #09090B !important;
  stroke: currentColor !important;
  width: 15px;
  height: 15px;
}

.emp-harvest-btn.is-full {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #06281E;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
}

.emp-harvest-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.emp-super-chest-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: radial-gradient(circle at left center, rgba(212, 175, 55, 0.12), transparent 48%), #141720;
  border: 1px solid rgba(212, 175, 55, 0.32);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.emp-super-chest-card.unlocked {
  border-color: rgba(251, 191, 36, 0.78);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.18) 0%, #141720 68%);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.15);
}

.emp-super-chest-card.claimed {
  border-color: rgba(16, 185, 129, 0.35);
  opacity: 0.85;
}

.emp-chest-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.emp-chest-emblem {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.28) 0%, rgba(212, 175, 55, 0.08) 70%);
  border: 1px solid rgba(251, 191, 36, 0.5);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.emp-chest-coin-art {
  width: 28px;
  height: 28px;
  animation: empCoinFloat 2.8s ease-in-out infinite;
}

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

.emp-chest-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.emp-chest-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: #FFFFFF;
}

.emp-chest-reward {
  flex-shrink: 0;
}

.emp-chest-steps {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.emp-chest-pip {
  width: 22px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.emp-chest-pip.done {
  background: #10B981;
}

.emp-chest-count {
  font-size: 0.72rem;
  color: #94A3B8;
  font-weight: 700;
}

.emp-chest-btn {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #94A3B8;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.emp-chest-btn.ready {
  background: linear-gradient(135deg, #D4AF37 0%, #B45309 100%);
  color: #09090B;
  border-color: transparent;
}

.emp-roi-tag {
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #6EE7B7;
}

.emp-product-card.is-best-roi {
  border-color: rgba(16, 185, 129, 0.55);
}

.emp-nav-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  margin-left: auto;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.75);
}

@media (max-width: 640px) {
  .emp-vault-strip {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
  }
  .emp-harvest-btn {
    min-height: 36px;
    padding: 0 11px;
    font-size: 0.74rem;
  }
  .emp-super-chest-card {
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
  }
  .emp-chest-btn {
    width: 100%;
    min-height: 38px;
  }
}

@media (max-width: 359px) {
  .emp-vault-strip {
    flex-direction: column;
    align-items: stretch;
  }
  .emp-harvest-btn {
    width: 100%;
  }
}

html.light-theme .emp-vault-strip,
body.light-theme .emp-vault-strip,
html.light-theme .emp-super-chest-card,
body.light-theme .emp-super-chest-card {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

html.light-theme .emp-chest-title-row,
body.light-theme .emp-chest-title-row {
  color: #0F172A;
}

html.light-theme .emp-card-lvl-bar,
body.light-theme .emp-card-lvl-bar,
html.light-theme .emp-op-prog-bar,
body.light-theme .emp-op-prog-bar,
html.light-theme .emp-vault-bar,
body.light-theme .emp-vault-bar,
html.light-theme .emp-rank-bar,
body.light-theme .emp-rank-bar {
  background: rgba(15, 23, 42, 0.1);
}

/* --- 12. Floating Rewards, Coin Sparks, Tactile Buttons & Mobile Badge --- */
.floating-reward-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.floating-reward-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(16, 18, 28, 0.96), rgba(32, 26, 14, 0.96));
  border: 1px solid rgba(251, 191, 36, 0.65);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), 0 0 14px rgba(212, 175, 55, 0.28);
  color: #FDE68A;
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
  animation: empFloatRewardUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.floating-reward-item small {
  font-family: var(--font-main, sans-serif);
  font-size: 0.7rem;
  font-weight: 700;
  color: #CBD5E1;
}

@keyframes empFloatRewardUp {
  0% { opacity: 0; transform: translateY(8px) scale(0.86); }
  18% { opacity: 1; transform: translateY(-4px) scale(1.04); }
  75% { opacity: 1; transform: translateY(-28px) scale(1); }
  100% { opacity: 0; transform: translateY(-44px) scale(0.96); }
}

.emp-coin-spark {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #FEF08A 0%, #D4AF37 70%, #B45309 100%);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.85);
  pointer-events: none;
  z-index: 9999;
  animation: empSparkFly 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes empSparkFly {
  0% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  100% { opacity: 0; transform: translate3d(var(--dx, 0px), var(--dy, -36px), 0) scale(0.2); }
}

.emp-vault-bar-fill {
  position: relative;
  overflow: hidden;
}

.emp-vault-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.35) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: empVaultShimmer 2.8s infinite ease-in-out;
}

@keyframes empVaultShimmer {
  0% { transform: translateX(-100%); }
  55%, 100% { transform: translateX(120%); }
}

.emp-harvest-btn.is-full,
.emp-chest-btn.ready,
.emp-op-card.claimable .emp-op-btn.claim {
  animation: empBeaconGlow 1.9s infinite ease-in-out;
}

@keyframes empBeaconGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(212, 175, 55, 0); }
  50% { box-shadow: 0 0 16px rgba(212, 175, 55, 0.42); }
}

.emp-main-tab-btn,
.emp-filter-btn,
.emp-upgrade-btn,
.emp-streak-btn,
.emp-chest-btn,
.emp-op-btn,
.emp-jump-btn {
  transition: transform 0.12s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  touch-action: manipulation;
}

.emp-main-tab-btn:active,
.emp-filter-btn:active,
.emp-upgrade-btn:active:not(:disabled),
.emp-streak-btn:active:not(:disabled),
.emp-chest-btn:active:not(:disabled),
.emp-op-btn:active:not(:disabled),
.emp-jump-btn:active {
  transform: scale(0.96);
}

#app-mobile-nav .mobile-nav-item {
  position: relative;
}

#app-mobile-nav .mobile-nav-item .emp-nav-dot {
  position: absolute;
  top: 6px;
  right: calc(50% - 17px);
  margin: 0;
  animation: empDotPulse 1.8s infinite;
}

#app-mobile-nav .mobile-nav-item.mobile-nav-empire-center .emp-nav-dot {
  top: -12px;
  right: calc(50% - 23px);
  z-index: 6;
  border: 1.5px solid #090A0F;
}

@keyframes empDotPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 6px rgba(16, 185, 129, 0.7); }
  50% { transform: scale(1.25); box-shadow: 0 0 12px rgba(16, 185, 129, 0.95); }
}

@media (prefers-reduced-motion: reduce) {
  .emp-vault-bar-fill::after,
  .emp-harvest-btn.is-full,
  .emp-chest-btn.ready,
  .emp-op-card.claimable .emp-op-btn.claim,
  .emp-chest-coin-art,
  #app-mobile-nav .mobile-nav-item .emp-nav-dot {
    animation: none !important;
  }
}

/* --- 13. Real Chess Coin Icons & Jewel Reward Chips --- */
.emp-coin-img {
  display: inline-block;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 5px rgba(212, 175, 55, 0.48));
}

.emp-coin-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
  font-size: 0.74rem;
  font-weight: 800;
  color: #FEF08A;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.2) 0%, rgba(180, 83, 9, 0.14) 100%);
  border: 1px solid rgba(251, 191, 36, 0.38);
  padding: 4px 9px 4px 7px;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  white-space: nowrap;
  flex-shrink: 0;
}

.emp-coin-chip.is-lg {
  font-size: 0.78rem;
  padding: 4px 10px 4px 8px;
  border-color: rgba(251, 191, 36, 0.55);
}

.emp-coin-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
  color: #FEF08A;
  font-weight: 900;
  vertical-align: middle;
}

.emp-streak-headline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.emp-sd-coin {
  margin: 2px 0;
}

.emp-vault-amount {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.emp-chest-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

html.light-theme .emp-coin-chip,
body.light-theme .emp-coin-chip {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.18), rgba(217, 119, 6, 0.1));
  border-color: rgba(180, 83, 9, 0.35);
  color: #92400E;
}

html.light-theme .emp-coin-inline,
body.light-theme .emp-coin-inline {
  color: #B45309;
}

html.light-theme .emp-op-card.claimable,
body.light-theme .emp-op-card.claimable {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14) 0%, #FFFFFF 65%);
}

html.light-theme .emp-ready-badge,
body.light-theme .emp-ready-badge {
  color: #92400E;
}

@media (max-width: 640px) {
  .emp-op-info h4 {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .emp-op-btn {
    min-width: 88px;
  }
  .emp-card-footer {
    flex-wrap: wrap;
    gap: 6px 8px;
  }
  .emp-next-gain {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #modal-invite-share .invite-share-modal-box,
  #modal-create-referral-code .modal-box {
    width: calc(100vw - 20px) !important;
    max-width: 440px !important;
    max-height: 90dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 18px 14px !important;
  }
  #modal-invite-share .invite-social-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  #modal-invite-share .invite-perks-banner {
    padding: 10px !important;
    gap: 8px !important;
  }
  #modal-invite-share .perk-highlight-val {
    font-size: 0.98rem !important;
  }
  #modal-invite-share .invite-link-box {
    padding: 4px 4px 4px 10px !important;
    gap: 6px;
  }
  #modal-invite-share .modal-invite-link-input {
    min-width: 0;
    font-size: 0.74rem !important;
  }
  #modal-invite-share #btn-modal-copy-link {
    padding: 9px 12px !important;
    font-size: 0.74rem !important;
  }
}

@media (max-width: 400px) {
  .emp-compact-right {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 5px;
  }
  .emp-stat-pill {
    padding: 0 7px;
    font-size: 0.72rem;
  }
  .emp-streak-days {
    gap: 3px;
  }
  .emp-streak-day {
    padding: 5px 1px;
    font-size: 0.58rem;
  }
  .emp-streak-day strong {
    font-size: 0.6rem;
  }
}

.emp-product-card:focus-visible,
.emp-main-tab-btn:focus-visible,
.emp-filter-btn:focus-visible,
.emp-upgrade-btn:focus-visible,
.emp-copy-chip:focus-visible,
.emp-copy-link-btn:focus-visible,
.emp-share-chip:focus-visible,
.emp-mini-copy:focus-visible {
  outline: 2px solid #FBBF24;
  outline-offset: 2px;
}

/* --- 14. Round 2 Design Polish, Copied States & Empty Frames --- */
.emp-product-card,
.emp-op-card,
.emp-social-card {
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.emp-kpi-coin-val,
.emp-roster-royalties {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.emp-empty-ops {
  padding: 28px 18px;
  gap: 7px;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
}

.emp-empty-ops strong {
  color: #E2E8F0;
  font-size: 0.88rem;
}

.emp-empty-icon,
.emp-roster-empty-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.28);
  color: #FBBF24;
  margin-bottom: 4px;
}

.emp-roster-empty {
  padding: 24px 16px;
  gap: 8px;
}

.emp-roster-cta {
  margin-top: 6px;
}

.emp-code-quota-pill.is-paid,
#create-code-cost-badge.is-paid {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.42);
  color: #FDE68A;
}

.emp-copy-chip[data-copied],
.emp-copy-link-btn[data-copied],
.emp-mini-copy[data-copied],
#modal-invite-share #btn-modal-copy-link[data-copied],
#modal-invite-share .btn-copy-code-chip[data-copied] {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: rgba(16, 185, 129, 0.55) !important;
  color: #6EE7B7 !important;
}

#modal-invite-share .modal-close-btn,
#modal-create-referral-code .modal-close-btn,
.sheet-close-btn {
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  .emp-product-card,
  .emp-op-card,
  .emp-social-card {
    transition: none;
  }
}

/* --- 15. Comprehensive Light Theme Overrides (Empire, Tasks, Invite, Modals) --- */
html.light-theme .emp-command-hero,
body.light-theme .emp-command-hero {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

html.light-theme .emp-product-card,
body.light-theme .emp-product-card,
html.light-theme .emp-op-card,
body.light-theme .emp-op-card,
html.light-theme .emp-social-card,
body.light-theme .emp-social-card,
html.light-theme .emp-streak-strip,
body.light-theme .emp-streak-strip,
html.light-theme .emp-invite-console,
body.light-theme .emp-invite-console,
html.light-theme .emp-roster-panel,
body.light-theme .emp-roster-panel,
html.light-theme .emp-strategy-block,
body.light-theme .emp-strategy-block {
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

html.light-theme .emp-product-card:hover,
body.light-theme .emp-product-card:hover {
  border-color: rgba(180, 83, 9, 0.42);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

html.light-theme .emp-product-card.can-afford,
body.light-theme .emp-product-card.can-afford {
  border-color: rgba(180, 83, 9, 0.45);
}

html.light-theme .emp-product-card.is-best-roi,
body.light-theme .emp-product-card.is-best-roi {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.09) 0%, #FFFFFF 45%);
  border-color: rgba(217, 119, 6, 0.55);
}

html.light-theme .emp-product-card.is-class-c,
body.light-theme .emp-product-card.is-class-c {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.07) 0%, #FFFFFF 45%);
}

html.light-theme .emp-class-pill,
body.light-theme .emp-class-pill {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #334155;
}

html.light-theme .emp-class-pill.is-promoted,
body.light-theme .emp-class-pill.is-promoted {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(5, 150, 105, 0.4);
  color: #047857;
}

html.light-theme .emp-eyebrow,
body.light-theme .emp-eyebrow,
html.light-theme .emp-rank-meta,
body.light-theme .emp-rank-meta,
html.light-theme .emp-vault-sub,
body.light-theme .emp-vault-sub,
html.light-theme .emp-section-sub,
body.light-theme .emp-section-sub,
html.light-theme .emp-syn-req,
body.light-theme .emp-syn-req,
html.light-theme .emp-rank-req,
body.light-theme .emp-rank-req,
html.light-theme .emp-chest-count,
body.light-theme .emp-chest-count,
html.light-theme .emp-ops-meter-txt,
body.light-theme .emp-ops-meter-txt,
html.light-theme .emp-social-plat,
body.light-theme .emp-social-plat,
html.light-theme .emp-tel-label,
body.light-theme .emp-tel-label,
html.light-theme .emp-kpi-mini span,
body.light-theme .emp-kpi-mini span,
html.light-theme .emp-custom-code-row.muted,
body.light-theme .emp-custom-code-row.muted,
html.light-theme .emp-roster-user span,
body.light-theme .emp-roster-user span,
html.light-theme .emp-roster-empty p,
body.light-theme .emp-roster-empty p {
  color: #475569;
}

html.light-theme .emp-rank-meta strong,
body.light-theme .emp-rank-meta strong,
html.light-theme .emp-vault-title,
body.light-theme .emp-vault-title,
html.light-theme .emp-vault-amount,
body.light-theme .emp-vault-amount {
  color: #0F172A;
}

html.light-theme .emp-jump-btn,
body.light-theme .emp-jump-btn,
html.light-theme .emp-ghost-btn,
body.light-theme .emp-ghost-btn {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #0F172A;
}

html.light-theme .emp-main-tabs,
body.light-theme .emp-main-tabs {
  background: #F1F5F9;
  border-color: #E2E8F0;
}

html.light-theme .emp-main-tab-btn,
body.light-theme .emp-main-tab-btn {
  color: #475569;
}

html.light-theme .emp-main-tab-btn:hover,
body.light-theme .emp-main-tab-btn:hover {
  color: #0F172A;
}

html.light-theme .emp-main-tab-btn.active,
body.light-theme .emp-main-tab-btn.active {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.08));
  border-color: rgba(180, 83, 9, 0.35);
  color: #92400E;
}

html.light-theme .emp-tab-badge,
body.light-theme .emp-tab-badge {
  background: #E2E8F0;
  color: #334155;
}

html.light-theme .emp-main-tab-btn.active .emp-tab-badge,
body.light-theme .emp-main-tab-btn.active .emp-tab-badge {
  background: rgba(180, 83, 9, 0.16);
  color: #78350F;
}

html.light-theme .emp-tab-badge.ready,
body.light-theme .emp-tab-badge.ready,
html.light-theme .emp-main-tab-btn.active .emp-tab-badge.ready,
body.light-theme .emp-main-tab-btn.active .emp-tab-badge.ready {
  background: rgba(16, 185, 129, 0.18);
  color: #047857;
}

html.light-theme .emp-harvest-btn:disabled,
body.light-theme .emp-harvest-btn:disabled {
  background: #E2E8F0;
  border-color: #CBD5E1;
  color: #475569;
}

html.light-theme .emp-count-pill,
body.light-theme .emp-count-pill {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #334155;
}

html.light-theme .emp-filter-btn,
body.light-theme .emp-filter-btn {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: #475569;
}

html.light-theme .emp-filter-btn.active,
body.light-theme .emp-filter-btn.active {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(180, 83, 9, 0.45);
  color: #92400E;
}

html.light-theme .emp-art-frame,
body.light-theme .emp-art-frame {
  background: #F8FAFC;
  border-color: #E2E8F0;
}

html.light-theme .emp-card-lvl,
body.light-theme .emp-card-lvl,
html.light-theme .emp-next-gain,
body.light-theme .emp-next-gain {
  color: #475569;
}

html.light-theme .emp-tier-tag,
body.light-theme .emp-tier-tag {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
}

html.light-theme .emp-roi-tag,
body.light-theme .emp-roi-tag {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(180, 83, 9, 0.35);
  color: #92400E;
}

html.light-theme .emp-card-yield-pill,
body.light-theme .emp-card-yield-pill {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(180, 83, 9, 0.32);
}

html.light-theme .emp-card-yield-pill strong,
body.light-theme .emp-card-yield-pill strong {
  color: #92400E;
}

html.light-theme .emp-upgrade-btn.dim,
body.light-theme .emp-upgrade-btn.dim {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #475569;
}

html.light-theme .emp-lock-req-btn,
body.light-theme .emp-lock-req-btn {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: #475569;
}

html.light-theme .emp-lock-req-arrow,
body.light-theme .emp-lock-req-arrow {
  color: #B45309;
}

html.light-theme .emp-exclusive-vault,
body.light-theme .emp-exclusive-vault {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.06) 0%, #FFFFFF 100%);
  border-color: rgba(5, 150, 105, 0.25);
}

html.light-theme .emp-exclusive-eyebrow,
body.light-theme .emp-exclusive-eyebrow {
  color: #047857;
}

html.light-theme .emp-exclusive-title,
body.light-theme .emp-exclusive-title,
html.light-theme .emp-sub-heading,
body.light-theme .emp-sub-heading,
html.light-theme .emp-syn-title,
body.light-theme .emp-syn-title,
html.light-theme .emp-rank-name,
body.light-theme .emp-rank-name,
html.light-theme .emp-ops-meter-txt strong,
body.light-theme .emp-ops-meter-txt strong,
html.light-theme .emp-streak-info strong,
body.light-theme .emp-streak-info strong,
html.light-theme .emp-social-left h4,
body.light-theme .emp-social-left h4,
html.light-theme .emp-roster-head h3,
body.light-theme .emp-roster-head h3,
html.light-theme .emp-roster-user strong,
body.light-theme .emp-roster-user strong,
html.light-theme .emp-roster-empty h4,
body.light-theme .emp-roster-empty h4,
html.light-theme .emp-kpi-mini strong,
body.light-theme .emp-kpi-mini strong,
html.light-theme .emp-empty-ops strong,
body.light-theme .emp-empty-ops strong {
  color: #0F172A;
}

html.light-theme .emp-synergy-row,
body.light-theme .emp-synergy-row,
html.light-theme .emp-rank-row,
body.light-theme .emp-rank-row,
html.light-theme .emp-custom-code-row,
body.light-theme .emp-custom-code-row,
html.light-theme .emp-roster-row,
body.light-theme .emp-roster-row {
  background: #F8FAFC;
  border-color: #E2E8F0;
}

html.light-theme .emp-synergy-row.active,
body.light-theme .emp-synergy-row.active,
html.light-theme .emp-rank-row.unlocked,
body.light-theme .emp-rank-row.unlocked {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(5, 150, 105, 0.3);
}

html.light-theme .emp-rank-row.current,
body.light-theme .emp-rank-row.current {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(180, 83, 9, 0.42);
}

html.light-theme .emp-syn-title span,
body.light-theme .emp-syn-title span,
html.light-theme .emp-rank-mult,
body.light-theme .emp-rank-mult,
html.light-theme .emp-bounty-pill,
body.light-theme .emp-bounty-pill,
html.light-theme .emp-kpi-mini.gold strong,
body.light-theme .emp-kpi-mini.gold strong,
html.light-theme .emp-roster-head span,
body.light-theme .emp-roster-head span,
html.light-theme .emp-roster-royalties,
body.light-theme .emp-roster-royalties {
  color: #92400E;
}

html.light-theme .emp-syn-state,
body.light-theme .emp-syn-state,
html.light-theme .emp-rank-tag,
body.light-theme .emp-rank-tag {
  background: #E2E8F0;
  color: #475569;
}

html.light-theme .emp-syn-state.active,
body.light-theme .emp-syn-state.active,
html.light-theme .emp-roster-status.activated,
body.light-theme .emp-roster-status.activated {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(5, 150, 105, 0.35);
  color: #047857;
}

html.light-theme .emp-roster-status.pending,
body.light-theme .emp-roster-status.pending {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(180, 83, 9, 0.32);
  color: #92400E;
}

html.light-theme .emp-roster-status.suspended,
body.light-theme .emp-roster-status.suspended {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(220, 38, 38, 0.35);
  color: #B91C1C;
}

html.light-theme .emp-reset-timer,
body.light-theme .emp-reset-timer {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #475569;
}

html.light-theme .emp-reset-timer strong,
body.light-theme .emp-reset-timer strong {
  color: #0F172A;
}

html.light-theme .emp-streak-day,
body.light-theme .emp-streak-day {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: #475569;
}

html.light-theme .emp-streak-day strong,
body.light-theme .emp-streak-day strong {
  color: #0F172A;
}

html.light-theme .emp-streak-day.current,
body.light-theme .emp-streak-day.current {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(180, 83, 9, 0.5);
  color: #92400E;
}

html.light-theme .emp-streak-day.claimed,
body.light-theme .emp-streak-day.claimed {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(5, 150, 105, 0.35);
  color: #047857;
}

html.light-theme .emp-streak-btn:disabled,
body.light-theme .emp-streak-btn:disabled,
html.light-theme .emp-chest-btn:disabled,
body.light-theme .emp-chest-btn:disabled {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #64748B;
}

html.light-theme .emp-chest-pip,
body.light-theme .emp-chest-pip,
html.light-theme .emp-ops-meter-bar,
body.light-theme .emp-ops-meter-bar {
  background: #E2E8F0;
}

html.light-theme .emp-op-icon,
body.light-theme .emp-op-icon {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #334155;
}

html.light-theme .emp-op-prog,
body.light-theme .emp-op-prog {
  color: #64748B;
}

html.light-theme .emp-op-prog.ready,
body.light-theme .emp-op-prog.ready {
  color: #B45309;
}

html.light-theme .emp-op-prog.done,
body.light-theme .emp-op-prog.done {
  color: #047857;
}

html.light-theme .emp-op-btn.start,
body.light-theme .emp-op-btn.start {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #0F172A;
}

html.light-theme .emp-op-btn.done,
body.light-theme .emp-op-btn.done {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(5, 150, 105, 0.3);
  color: #047857;
}

html.light-theme .emp-empty-ops,
body.light-theme .emp-empty-ops {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: #475569;
}

html.light-theme .emp-code-display,
body.light-theme .emp-code-display {
  color: #92400E;
}

html.light-theme .emp-copy-chip,
body.light-theme .emp-copy-chip,
html.light-theme .emp-share-chip,
body.light-theme .emp-share-chip,
html.light-theme .emp-mini-copy,
body.light-theme .emp-mini-copy {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: #0F172A;
}

html.light-theme .emp-mini-copy.accent,
body.light-theme .emp-mini-copy.accent {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(5, 150, 105, 0.35);
  color: #047857;
}

html.light-theme .emp-copy-chip[data-copied],
body.light-theme .emp-copy-chip[data-copied],
html.light-theme .emp-copy-link-btn[data-copied],
body.light-theme .emp-copy-link-btn[data-copied],
html.light-theme .emp-mini-copy[data-copied],
body.light-theme .emp-mini-copy[data-copied],
html.light-theme #modal-invite-share #btn-modal-copy-link[data-copied],
body.light-theme #modal-invite-share #btn-modal-copy-link[data-copied] {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: rgba(5, 150, 105, 0.45) !important;
  color: #047857 !important;
}

html.light-theme .emp-link-bar,
body.light-theme .emp-link-bar,
html.light-theme .emp-alliance-kpis,
body.light-theme .emp-alliance-kpis {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

html.light-theme .emp-kpi-mini,
body.light-theme .emp-kpi-mini {
  border-right-color: #E2E8F0;
}

html.light-theme .emp-link-input,
body.light-theme .emp-link-input {
  color: #0F172A;
}

html.light-theme .emp-code-quota-pill,
body.light-theme .emp-code-quota-pill,
html.light-theme #create-code-cost-badge.is-paid,
body.light-theme #create-code-cost-badge.is-paid {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(180, 83, 9, 0.35);
  color: #92400E;
}

/* Upgrade Sheet Modal Light Theme */
html.light-theme .sheet-close-btn,
body.light-theme .sheet-close-btn {
  background: #F1F5F9;
  color: #334155;
  border-color: #CBD5E1;
}

html.light-theme .sheet-level-progression-pill,
body.light-theme .sheet-level-progression-pill {
  background: #F1F5F9;
  color: #334155;
  border-color: #CBD5E1;
}

html.light-theme .sheet-level-progression-pill .gold-text,
body.light-theme .sheet-level-progression-pill .gold-text {
  color: #B45309;
}

html.light-theme .sheet-profit-matrix,
body.light-theme .sheet-profit-matrix,
html.light-theme .sheet-conditions-box,
body.light-theme .sheet-conditions-box,
html.light-theme .sheet-cost-box,
body.light-theme .sheet-cost-box {
  background: #F8FAFC;
  border-color: #E2E8F0;
}

html.light-theme .sheet-profit-divider,
body.light-theme .sheet-profit-divider {
  background: #CBD5E1;
}

html.light-theme .sheet-profit-col-label,
body.light-theme .sheet-profit-col-label,
html.light-theme .sheet-conditions-title,
body.light-theme .sheet-conditions-title,
html.light-theme .sheet-payback-strip,
body.light-theme .sheet-payback-strip {
  color: #475569;
}

html.light-theme .sheet-profit-col-val,
body.light-theme .sheet-profit-col-val,
html.light-theme .sheet-cost-num,
body.light-theme .sheet-cost-num,
html.light-theme .sheet-payback-strip strong,
body.light-theme .sheet-payback-strip strong {
  color: #0F172A;
}

html.light-theme .sheet-profit-col.highlight-gold .sheet-profit-col-val,
body.light-theme .sheet-profit-col.highlight-gold .sheet-profit-col-val {
  color: #047857;
}

html.light-theme .sheet-cond-row,
body.light-theme .sheet-cond-row {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: #334155;
}

html.light-theme .sheet-cond-row.met,
body.light-theme .sheet-cond-row.met {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(5, 150, 105, 0.25);
  color: #047857;
}

html.light-theme .btn-sheet-go-ahead.locked,
body.light-theme .btn-sheet-go-ahead.locked,
html.light-theme .btn-sheet-go-ahead.cannot-afford,
body.light-theme .btn-sheet-go-ahead.cannot-afford {
  background: #E2E8F0;
  color: #475569;
  border-color: #CBD5E1;
}

/* Invite Share & Create Custom Code Modals Light Theme */
html.light-theme #modal-invite-share .invite-share-modal-box,
body.light-theme #modal-invite-share .invite-share-modal-box,
html.light-theme #modal-create-referral-code .modal-box,
body.light-theme #modal-create-referral-code .modal-box {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
  color: #0F172A !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16) !important;
}

html.light-theme #modal-invite-share .invite-perks-banner,
body.light-theme #modal-invite-share .invite-perks-banner,
html.light-theme #modal-invite-share .invite-link-box,
body.light-theme #modal-invite-share .invite-link-box,
html.light-theme #modal-invite-share .invite-modal-qr-container,
body.light-theme #modal-invite-share .invite-modal-qr-container {
  background: #F8FAFC !important;
  border-color: #CBD5E1 !important;
}

html.light-theme #modal-invite-share .modal-invite-link-input,
body.light-theme #modal-invite-share .modal-invite-link-input,
html.light-theme #modal-create-referral-code #custom-code-input,
body.light-theme #modal-create-referral-code #custom-code-input,
html.light-theme #modal-create-referral-code #custom-code-label-input,
body.light-theme #modal-create-referral-code #custom-code-label-input {
  background: #FFFFFF !important;
  color: #0F172A !important;
  border-color: #CBD5E1 !important;
}

html.light-theme #modal-invite-share .modal-invite-link-input,
body.light-theme #modal-invite-share .modal-invite-link-input {
  background: transparent !important;
}

html.light-theme #modal-invite-share .btn-social-share,
body.light-theme #modal-invite-share .btn-social-share {
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  color: #0F172A;
}

html.light-theme #modal-invite-share .btn-share-twitter svg,
body.light-theme #modal-invite-share .btn-share-twitter svg {
  fill: #0F172A;
}

html.light-theme #modal-invite-share .invite-code-badge,
body.light-theme #modal-invite-share .invite-code-badge {
  color: #92400E !important;
}

html.light-theme #modal-create-referral-code #custom-code-preview-link,
body.light-theme #modal-create-referral-code #custom-code-preview-link {
  color: #92400E !important;
}
