:root{
  --ink:        #0d1420;
  --ink-2:      #131c2b;
  --panel:      #16202f;
  --panel-2:    #1c2a3d;
  --line:       #2a3b52;
  --parchment:  #e9dfc8;
  --gold:       #d4af61;
  --gold-hi:    #f0d38a;
  --teal:       #4fd6c4;
  --ruby:       #d1495b;
  --text-dim:   #93a2b8;
  --common:     #8fa3b8;
  --rare:       #4f9dd6;
  --epic:       #a86ee0;
  --legendary:  #e0a84f;
  --font-display: 'Cinzel', serif;
  --font-body: 'Manrope', sans-serif;
}

*{box-sizing:border-box;}
html,body{
  margin:0; padding:0; height:100%; width:100%;
  overflow:hidden; overscroll-behavior:none;
  font-family:var(--font-body);
  background:var(--ink);
  color:var(--parchment);
  -webkit-tap-highlight-color:transparent;
  user-select:none;
}

.hidden{ display:none !important; }

/* ---------- Screens ---------- */
.screen{
  position:fixed; inset:0;
  display:flex; align-items:center; justify-content:center;
  background:
    radial-gradient(1200px 800px at 50% -10%, #1c2c42 0%, transparent 60%),
    linear-gradient(180deg, var(--ink-2) 0%, var(--ink) 100%);
  padding:24px;
  z-index:10;
}

.signin-card{
  width:100%; max-width:380px;
  text-align:center;
}

.brand{ margin-bottom: 28px; }
.brand-gem{
  font-size:40px; color:var(--teal);
  text-shadow: 0 0 24px rgba(79,214,196,0.55);
  margin-bottom:6px;
}
.signin-card h1{
  font-family:var(--font-display);
  font-weight:700;
  font-size:32px;
  letter-spacing:0.5px;
  margin:6px 0 8px;
  background:linear-gradient(180deg, var(--gold-hi), var(--gold));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.tagline{
  color:var(--text-dim);
  font-size:15px;
  line-height:1.5;
  margin:0 0 26px;
}

.google-slot{ display:flex; justify-content:center; margin-bottom:14px; min-height:2px; }

.btn{
  display:block; width:100%;
  padding:15px 20px;
  border-radius:14px;
  border:none;
  font-family:var(--font-body);
  font-weight:700;
  font-size:16px;
  cursor:pointer;
  transition:transform .12s ease, filter .12s ease;
}
.btn:active{ transform:scale(0.97); }
.btn-primary{
  background:linear-gradient(180deg, var(--gold-hi), var(--gold));
  color:#241a06;
  box-shadow:0 6px 20px rgba(212,175,97,0.28);
}
.btn-danger{
  background:transparent;
  border:1px solid var(--ruby);
  color:var(--ruby);
  margin-top:18px;
}
.fine-print{
  color:var(--text-dim);
  font-size:12.5px;
  margin-top:14px;
}

/* ---------- Game screen ---------- */
#game-screen{ display:block; padding:0; background:none; }
#map{ position:absolute; inset:0; z-index:1; background:#0a0f18; }

#topbar{
  position:absolute; top:0; left:0; right:0; z-index:5;
  padding: calc(max(12px, env(safe-area-inset-top)) + 4px) 14px 10px;
  background:linear-gradient(180deg, rgba(10,15,24,0.95) 0%, rgba(10,15,24,0.6) 80%, transparent 100%);
  display:flex; flex-direction:column; gap:8px;
  pointer-events:none;
}

/* Big Hero Balance Bar */
.hero-balance-card{
  width:100%;
  background:linear-gradient(180deg, rgba(22,32,47,0.95) 0%, rgba(13,20,32,0.98) 100%);
  border:1px solid rgba(212,175,97,0.5);
  box-shadow:0 0 16px rgba(212,175,97,0.15), 0 4px 16px rgba(0,0,0,0.6);
  border-radius:14px;
  padding:8px 14px;
  text-align:center;
  pointer-events:auto;
  backdrop-filter:blur(8px);
}
/* Artistic Elden Earth Title & Version Tag */
.hero-brand-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--gold-hi);
  display: flex;
  align-items: center;
  gap: 5px;
}
.hero-brand-gem {
  color: var(--teal);
  font-size: 9px;
  filter: drop-shadow(0 0 4px var(--teal));
}
.hero-version-tag {
  font-family: var(--font-body);
  font-size: 8px;
  font-weight: 700;
  color: var(--text-dim);
  opacity: 0.75;
  letter-spacing: 0.5px;
}

/* Dual-Scale Cash Typography */
.hero-balance-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  font-family: var(--font-display);
  color: var(--gold-hi);
  text-shadow: 0 0 12px rgba(212, 175, 97, 0.35);
  line-height: 1;
  margin-top: 4px;
}
.cash-dollar {
  font-size: 16px;
  font-weight: 700;
  margin-right: 1px;
}
.cash-whole {
  font-size: 26px; /* Twice as tall as decimals */
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
}
.cash-point {
  font-size: 16px;
  font-weight: 700;
}
.cash-decimal {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Secondary Substats Row */
.substats-row{
  display:flex; align-items:center; gap:8px;
  pointer-events:auto;
}
.player-chip{
  display:flex; align-items:center; gap:6px;
  background:rgba(22,32,47,0.85);
  border:1px solid var(--line);
  padding:4px 10px 4px 6px;
  border-radius:999px;
  font-weight:700;
  font-size:12px;
  color:var(--parchment);
}
#player-avatar{
  width:22px; height:22px; border-radius:50%;
  background:var(--panel-2);
  display:flex; align-items:center; justify-content:center;
  font-size:13px;
}
.sub-stat{
  flex:1;
  background:rgba(22,32,47,0.85);
  border:1px solid var(--line);
  border-radius:10px;
  padding:4px 6px;
  text-align:center;
}
.sub-stat .stat-label{
  display:block;
  font-size:9px; letter-spacing:0.3px;
  color:var(--text-dim);
}
.sub-stat .stat-value{
  display:block;
  font-family:var(--font-display);
  font-weight:700;
  font-size:11px;
  color:var(--gold-hi);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.icon-btn{
  width:32px; height:32px; border-radius:8px;
  background:rgba(22,32,47,0.85);
  border:1px solid var(--line);
  color:var(--gold);
  font-size:14px;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  pointer-events:auto;
}

#bottombar {
  position: absolute; 
  bottom: calc(52px + max(4px, env(safe-area-inset-bottom))); 
  left: 0; 
  right: 0; 
  z-index: 20;
  display: flex; 
  align-items: center; 
  justify-content: center; 
  gap: 6px;
  padding: 6px 8px;
  background: transparent;
  box-sizing: border-box;
}

.round-btn {
  width: 40px; 
  height: 40px; 
  min-width: 40px;
  max-width: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--gold-hi);
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.btn-earn {
  flex: 1 1 auto;
  min-width: 70px;
  max-width: 105px;
  width: auto;
  padding: 11px 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  color: #241a06;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  text-align: center;
  box-shadow: 0 8px 20px rgba(212,175,97,0.35);
}

/* ---------- Toast (Floats Cleanly Above Buttons) ---------- */
.toast {
  position: absolute; 
  left: 50%; 
  /* Floats cleanly above the BUY LAND and EARN buttons */
  bottom: calc(135px + env(safe-area-inset-bottom)); 
  z-index: 35;
  transform: translateX(-50%);
  background: rgba(13, 20, 32, 0.95);
  border: 1.5px solid var(--gold);
  color: var(--parchment);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13.5px; 
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85), 0 0 14px rgba(212, 175, 97, 0.35);
  transition: opacity .25s ease, transform .25s ease;
  white-space: nowrap;
  pointer-events: none;
}
.toast.hidden { opacity: 0; pointer-events: none; }

/* ---------- Modals ---------- */
.modal{
  position:fixed; inset:0; z-index:30;
  display:flex; align-items:flex-end; justify-content:center;
  background:rgba(6,10,16,0.6);
  backdrop-filter:blur(2px);
}
.modal-card{
  position:relative;
  width:100%; max-width:440px;
  background:linear-gradient(180deg, var(--panel) 0%, var(--ink-2) 100%);
  border:1px solid var(--line);
  border-bottom:none;
  border-radius:22px 22px 0 0;
  padding:28px 22px max(28px, env(safe-area-inset-bottom));
  text-align:center;
  max-height:88vh; overflow-y:auto;
}
.modal-card h2{
  font-family:var(--font-display);
  font-size:22px; margin:0 0 4px;
  color:var(--gold-hi);
}
.modal-sub{ color:var(--text-dim); font-size:13px; margin:0 0 18px; }
.close-btn{
  position:absolute; top:16px; right:16px;
  width:32px; height:32px; border-radius:50%;
  background:var(--panel-2); border:1px solid var(--line);
  color:var(--parchment); font-size:14px; cursor:pointer;
}

/* ---------- Wheel ---------- */
.wheel-wrap{
  position:relative; width:320px; max-width:100%; margin:0 auto 20px;
  display:flex; align-items:center; justify-content:center;
}
.wheel-pointer{
  position:absolute; top:-6px; left:50%; transform:translateX(-50%);
  color:var(--gold-hi); font-size:22px; z-index:2;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
#wheel-canvas{ max-width:100%; height:auto; }
.wheel-balance{
  position:absolute; top:10px; left:10px; z-index:10; display:flex; gap:6px; align-items:center;
  font-family:var(--font-display); color:var(--gold-hi);
}
.wheel-balance .wheel-diamonds{
  display:flex; align-items:center; gap:2px;
}
.wheel-balance .wheel-eb{
  display:flex; align-items:center; gap:2px;
}
.wheel-result{
  min-height:20px; font-weight:700; color:var(--teal); font-size:15px;
}

/* ---------- Live Balances in Diamond Wheel Modal ---------- */
.wheel-balance-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: -6px auto 16px;
  max-width: 290px;
}

.wheel-chip {
  flex: 1;
  background: var(--panel-2);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 6px 10px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wheel-chip.eb-chip {
  border-color: rgba(212, 175, 97, 0.4);
}

.wheel-chip.diamond-chip {
  border-color: rgba(79, 214, 196, 0.4);
}

.wheel-chip-label {
  font-size: 9.5px;
  color: var(--text-dim);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wheel-chip-val {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
}

.wheel-chip.eb-chip .wheel-chip-val {
  color: var(--gold-hi);
}

.wheel-chip.diamond-chip .wheel-chip-val {
  color: var(--teal);
}

/* ---------- Land modal ---------- */
.land-stats{
  display:flex; gap:12px; margin-bottom:18px;
}
.land-stat{
  flex:1; background:var(--panel-2); border:1px solid var(--line);
  border-radius:14px; padding:14px 8px;
}
.land-stat span{
  display:block; font-family:var(--font-display); font-weight:700;
  font-size:18px; color:var(--gold-hi); margin-bottom:4px;
}
.land-stat label{ font-size:11px; color:var(--text-dim); }

.rarity-legend{
  text-align:left; font-size:13px; color:var(--text-dim);
  display:flex; flex-direction:column; gap:8px; margin-bottom:16px;
}
.rarity-legend div{ display:flex; align-items:center; gap:8px; }
.swatch{
  width:12px; height:12px; border-radius:3px; display:inline-block;
}
.swatch.common{ background:var(--common); }
.swatch.rare{ background:var(--rare); }
.swatch.epic{ background:var(--epic); }
.swatch.legendary{ background:var(--legendary); }

.howto{
  text-align:left; color:var(--text-dim); font-size:14px; line-height:1.6;
  padding-left:20px; margin:0 0 8px;
}
.howto li{ margin-bottom:10px; }

/* ---------- Leaflet tweaks ---------- */
.leaflet-container{ background:#0a0f18; font-family:var(--font-body); }
.leaflet-control-attribution{
  background:rgba(10,15,24,0.7) !important;
  color:var(--text-dim) !important;
  font-size:9px !important;
}
.leaflet-control-attribution a{ color:var(--teal) !important; }
.leaflet-control-zoom{ display:none; }

.diamond-icon{
  filter: drop-shadow(0 0 6px rgba(79,214,196,0.85));
  font-size:22px;
  text-align:center;
  line-height:1;
  transform: translateY(2px);
}
.diamond-icon.far{ opacity:0.55; filter:none; }

.player-dot{
  width:18px; height:18px; border-radius:50%;
  background:var(--teal);
  border:3px solid #fff;
  box-shadow:0 0 0 4px rgba(79,214,196,0.25), 0 2px 8px rgba(0,0,0,0.4);
}

.plot-label{
  font-size:9px; color:rgba(255,255,255,0.85);
}

/* ---------- Floating +2 EB Boost Button ---------- */
.boost-btn {
  position: absolute;
  right: 16px;
  /* Floats cleanly above the bottom bar & chat button */
  bottom: calc(125px + env(safe-area-inset-bottom));
  z-index: 22;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(20, 28, 42, 0.95), rgba(12, 18, 28, 0.98));
  border: 1.5px solid var(--gold);
  color: var(--gold-hi);
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(212, 175, 97, 0.4), 0 4px 12px rgba(0, 0, 0, 0.6);
  animation: boostPulse 2s infinite ease-in-out;
  transition: transform 0.2s ease, opacity 0.3s ease;
}

.boost-btn:active {
  transform: scale(0.92);
}

.boost-btn .boost-icon {
  font-size: 16px;
  color: var(--teal);
  animation: boostSpin 3s infinite linear;
}

@keyframes boostPulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 14px rgba(212, 175, 97, 0.35); }
  50% { transform: translateY(-4px); box-shadow: 0 0 24px rgba(212, 175, 97, 0.65); }
}

/* ---------- Buy Tile Modal Styles ---------- */
.buy-modal-cost {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin: 14px 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.buy-modal-cost span {
  color: var(--text-dim);
  font-size: 14px;
}
.buy-modal-cost strong {
  font-family: var(--font-display);
  color: var(--gold-hi);
  font-size: 18px;
}

.modal-actions {
  display: flex;
  gap: 12px;
}
.modal-actions .btn {
  flex: 1;
  padding: 13px 10px;
  font-size: 15px;
}
.btn-secondary {
  background: rgba(22, 32, 47, 0.85);
  border: 1px solid var(--line);
  color: var(--text-dim);
}
.btn-secondary:hover {
  color: var(--parchment);
}

/* ---------- Hero Balance Top Line ---------- */
.hero-top-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.boost-timer-badge {
  background: linear-gradient(90deg, #d4af61, #f0d38a);
  color: #0d1420;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(240, 211, 138, 0.8);
  animation: badgePulse 1.5s infinite alternate ease-in-out;
}

/* ---------- Electric Gold Glowing Active Boost State ---------- */
.hero-balance-card.boosted {
  border: 1.5px solid #f0d38a;
  box-shadow: 0 0 20px rgba(240, 211, 138, 0.6), inset 0 0 14px rgba(212, 175, 97, 0.4);
  animation: electricGlow 1.8s infinite alternate ease-in-out;
}
.hero-balance-card.boosted .hero-balance-value {
  color: #fff9e6;
  text-shadow: 0 0 16px rgba(240, 211, 138, 0.9), 0 0 24px rgba(79, 214, 196, 0.5);
}

@keyframes electricGlow {
  0% { box-shadow: 0 0 14px rgba(212, 175, 97, 0.5), inset 0 0 8px rgba(212, 175, 97, 0.3); }
  50% { box-shadow: 0 0 26px rgba(240, 211, 138, 0.85), inset 0 0 18px rgba(79, 214, 196, 0.35); }
  100% { box-shadow: 0 0 18px rgba(212, 175, 97, 0.6), inset 0 0 10px rgba(212, 175, 97, 0.4); }
}

@keyframes badgePulse {
  0% { transform: scale(0.96); opacity: 0.9; }
  100% { transform: scale(1.04); opacity: 1; }
}

/* ---------- Permanent Multiplier Floating Button ---------- */
.multiplier-btn {
  position: absolute;
  left: 14px;
  /* Floats cleanly above the Compass button, below the side stack */
  bottom: calc(122px + env(safe-area-inset-bottom));
  z-index: 22;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(22, 32, 47, 0.95), rgba(13, 20, 32, 0.98));
  border: 2px solid var(--gold);
  color: var(--gold-hi);
  font-family: var(--font-display);
  cursor: pointer;
  box-shadow: 0 0 18px rgba(212, 175, 97, 0.5), 0 4px 12px rgba(0, 0, 0, 0.7);
  animation: multGlow 2s infinite ease-in-out;
}
.multiplier-btn:active { transform: scale(0.92); }
.multiplier-btn .mult-tag { font-size: 14px; font-weight: 800; line-height: 1; }
.multiplier-btn .mult-sub { font-size: 8px; letter-spacing: 1px; color: var(--teal); }

@keyframes multGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(212, 175, 97, 0.4); }
  50% { transform: translateY(-3px); box-shadow: 0 0 24px rgba(240, 211, 138, 0.8), 0 0 8px var(--teal); }
}

/* Booster Modal Info */
.booster-icon-wrap {
  font-size: 40px;
  color: var(--gold-hi);
  filter: drop-shadow(0 0 12px rgba(212, 175, 97, 0.7));
  margin-bottom: 6px;
}
.booster-info-box {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0 20px;
  text-align: left;
  font-size: 13px;
  color: var(--text-dim);
}
.booster-info-box strong { color: var(--parchment); }
.booster-info-box .gold-text { color: var(--gold-hi); }

/* ---------- Sonar Radar Expanding Pulse Waves ---------- */
.radar-wave {
  transform-origin: center center;
  transform-box: fill-box;
  pointer-events: none !important;
}

.radar-wave.wave-1 {
  animation: radarPulse 3s cubic-bezier(0.2, 0.65, 0.35, 1) infinite;
}

.radar-wave.wave-2 {
  animation: radarPulse 3s cubic-bezier(0.2, 0.65, 0.35, 1) infinite;
  animation-delay: 1.5s;
}

@keyframes radarPulse {
  0% {
    transform: scale(0.04);
    opacity: 0.85;
    stroke-width: 3px;
    fill-opacity: 0.3;
  }
  60% {
    opacity: 0.45;
    fill-opacity: 0.12;
  }
  100% {
    transform: scale(1);
    opacity: 0;
    stroke-width: 1px;
    fill-opacity: 0;
  }
}

/* ================= PERMANENT COLLAPSABLE FEED HUD ================= */
.live-feed-card {
  position: absolute;
  /* Dynamically clears Notch / Dynamic Island + Hero Card + Substats Row */
  top: calc(max(14px, env(safe-area-inset-top)) + 124px);
  left: 14px;
  width: calc(100% - 28px);
  max-width: 360px;
  z-index: 6;
  /* Almost entirely transparent frosted glass */
  background: rgba(10, 15, 24, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 0 12px rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto !important;
}

/* Interactive Header Bar (Ultra Transparent) */
.feed-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 12px;
  cursor: pointer;
  background: rgba(13, 20, 32, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  user-select: none;
}

.feed-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.feed-badge {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold-hi);
  letter-spacing: 0.8px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.feed-dot {
  width: 5px;
  height: 5px;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--teal);
  animation: feedPulse 1.8s infinite alternate;
}

.feed-unread-pill {
  background: var(--teal);
  color: #0b1118;
  font-size: 9px;
  font-weight: 800;
  border-radius: 8px;
  padding: 1px 5px;
  box-shadow: 0 0 6px rgba(79, 214, 196, 0.8);
}

.feed-toggle-btn {
  background: none;
  border: none;
  color: var(--gold-hi);
  font-size: 12px;
  padding: 0 2px;
  cursor: pointer;
  opacity: 0.85;
}

/* Scrollable Container */
.feed-scroll-container {
  max-height: 72px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Styled Minimal Scrollbar */
.feed-scroll-container::-webkit-scrollbar {
  width: 3px;
}
.feed-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 97, 0.4);
  border-radius: 3px;
}

/* Feed List Items (Bright, Sharp Typography on Transparent BG) */
.feed-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  line-height: 1.35;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 6px rgba(0, 0, 0, 0.8);
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.feed-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.feed-item-content strong {
  color: var(--gold-hi);
  font-weight: 700;
  text-shadow: 0 0 6px rgba(240, 211, 138, 0.4);
}

.feed-item-content em {
  font-style: normal;
  color: #7ef5e6;
  font-weight: 600;
  text-shadow: 0 0 6px rgba(126, 245, 230, 0.4);
}

.feed-item-time {
  font-size: 9px;
  color: #c0cedf;
  white-space: nowrap;
  opacity: 0.85;
}

.feed-empty-msg {
  font-size: 10.5px;
  color: #c0cedf;
  text-align: center;
  padding: 8px 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* Collapsed State (Compact Minimal Bar) */
.live-feed-card.collapsed {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(10, 15, 24, 0.18);
}

.live-feed-card.collapsed .feed-header-line {
  border-bottom: none;
}

.live-feed-card.collapsed .feed-scroll-container {
  display: none;
}

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

.feed-badge {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gold-hi);
  letter-spacing: 0.5px;
}

.feed-dot {
  width: 7px;
  height: 7px;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--teal);
  animation: feedPulse 1.8s infinite alternate;
}

.feed-unread-pill {
  background: var(--teal);
  color: #0b1118;
  font-size: 10px;
  font-weight: 800;
  border-radius: 10px;
  padding: 1px 6px;
  box-shadow: 0 0 6px rgba(79, 214, 196, 0.7);
}

.feed-toggle-btn {
  background: none;
  border: none;
  color: var(--gold-hi);
  font-size: 14px;
  padding: 0 4px;
  cursor: pointer;
}

/* Scrollable Container */
.feed-scroll-container {
  max-height: 82px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Styled Minimal Scrollbar */
.feed-scroll-container::-webkit-scrollbar {
  width: 4px;
}
.feed-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 97, 0.3);
  border-radius: 4px;
}

/* Feed List Items */
.feed-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--parchment);
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(42, 59, 82, 0.35);
}

.feed-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.feed-item-content strong {
  color: var(--gold-hi);
  font-weight: 700;
}

.feed-item-content em {
  font-style: normal;
  color: var(--teal);
}

.feed-item-time {
  font-size: 9.5px;
  color: var(--text-dim);
  white-space: nowrap;
  opacity: 0.8;
}

.feed-empty-msg {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  padding: 12px 0;
}

/* Collapsed State */
.live-feed-card.collapsed {
  border-color: rgba(212, 175, 97, 0.3);
}

.live-feed-card.collapsed .feed-header-line {
  border-bottom: none;
}

.live-feed-card.collapsed .feed-scroll-container {
  display: none;
}

/* ================= EDIT NAME BADGE & WRAPPER ================= */
.info-name-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.edit-name-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1.5px solid var(--gold);
  color: var(--gold-hi);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s ease, background 0.15s ease;
}

.edit-name-badge:active {
  transform: scale(0.9);
}

.edit-name-badge:hover {
  background: var(--line);
  color: #ffffff;
}

/* ---------- Player Info Modal ---------- */
.player-info-card {
  text-align: left;
}
.player-info-card h2 {
  text-align: center;
  margin-bottom: 14px;
}

/* Profile Header */
.profile-header-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 14px;
}
.info-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
}
.info-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.info-name-box {
  flex: 1;
}
.info-player-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--gold-hi);
  letter-spacing: 0.5px;
}

/* Info Sections */
.info-section {
  margin-bottom: 14px;
}
.info-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 6px;
  text-transform: uppercase;
}
.info-cash-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel-2);
  border: 1px solid rgba(212, 175, 97, 0.4);
  border-radius: 10px;
  padding: 10px 14px;
}
.info-cash-val {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-hi);
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ================= PLAYER INFO MAYORSHIP & DIVIDENDS ================= */
.info-mayor-card {
  background: var(--panel-2);
  border: 1px solid rgba(212, 175, 97, 0.45);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.mayor-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mayor-crown-pill {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--parchment);
  background: rgba(13, 20, 32, 0.85);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mayor-crown-pill.active-mayor {
  border-color: var(--gold-hi);
  background: linear-gradient(135deg, rgba(34, 48, 68, 0.95), rgba(20, 28, 42, 0.98));
  color: var(--gold-hi);
  box-shadow: 0 0 10px rgba(212, 175, 97, 0.35);
}

.mayor-crown-pill strong {
  color: #fff9e6;
}

.dividend-rate-pill {
  font-size: 9.5px;
  font-weight: 800;
  background: rgba(79, 214, 196, 0.15);
  border: 1px solid var(--teal);
  color: var(--teal);
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.mayor-dividend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-dim);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 6px;
}

.dividend-val {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--gold-hi);
  text-shadow: 0 0 6px rgba(240, 211, 138, 0.3);
}

/* Parcels Grid */
.parcels-grid-wrap {
  display: flex;
  gap: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.parcel-total-box {
  flex: 0 0 85px;
  background: rgba(13, 20, 32, 0.7);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
}
.parcel-icon { font-size: 24px; margin-bottom: 2px; }
.parcel-total-label { font-size: 10px; color: var(--text-dim); font-weight: 700; }
.parcel-total-num { font-family: var(--font-display); font-size: 20px; color: var(--gold-hi); }

.rarity-badges-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.rarity-badge {
  background: rgba(13, 20, 32, 0.85);
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.rarity-badge .badge-num {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
}
.rarity-badge .badge-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.rarity-badge.common { border: 1px solid var(--common); }
.rarity-badge.common .badge-num, .rarity-badge.common .badge-label { color: var(--common); }

.rarity-badge.rare { border: 1px solid var(--rare); }
.rarity-badge.rare .badge-num, .rarity-badge.rare .badge-label { color: var(--rare); }

.rarity-badge.epic { border: 1px solid var(--epic); }
.rarity-badge.epic .badge-num, .rarity-badge.epic .badge-label { color: var(--epic); }

.rarity-badge.legendary { border: 1px solid var(--legendary); }
.rarity-badge.legendary .badge-num, .rarity-badge.legendary .badge-label { color: var(--legendary); }

/* ---------- Clustered Plot Avatar Badge (Small Circle) ---------- */
.plot-avatar-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0d1420;
  border: 2px solid var(--gold);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.9), 0 0 6px rgba(212, 175, 97, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 12px;
}

.plot-avatar-badge img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* ---------- Diamond Extractor Beacon on Map ---------- */
.extractor-beacon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, #4fd6c4 0%, #0d1420 80%);
  border: 2px solid #4fd6c4;
  box-shadow: 0 0 16px rgba(79, 214, 196, 0.8), 0 0 6px rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  animation: extractorPulse 2.5s infinite alternate ease-in-out;
}

@keyframes extractorPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 12px rgba(79, 214, 196, 0.6); }
  100% { transform: scale(1.1); box-shadow: 0 0 24px rgba(79, 214, 196, 1); }
}

/* ---------- Extractor Modal ---------- */
.extractor-glow-icon {
  font-size: 42px;
  margin-bottom: 6px;
  filter: drop-shadow(0 0 14px rgba(79, 214, 196, 0.8));
  animation: boostPulse 2s infinite ease-in-out;
}
.extractor-status-box {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 14px 0 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-dim);
}
.extractor-status-box .stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.extractor-status-box strong { color: var(--parchment); }
.extractor-status-box .teal-text { color: var(--teal); }
.extractor-status-box .gold-text { color: var(--gold-hi); }
.diamond-ready-val { color: var(--teal); font-size: 16px; font-weight: 800; }
.req-line { font-size: 13px; margin-top: 4px; }

/* ================= 3D DIAMOND & PARTICLE FX ================= */
.diamond-3d-wrapper {
  background: transparent !important;
  border: none !important;
  pointer-events: auto;
}
.diamond-3d-wrapper.far {
  opacity: 0.55;
  filter: grayscale(40%);
}

.gem-anchor {
  position: relative;
  width: 36px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Cast Ground Shadow (breathes with individual diamond rate) */
.gem-shadow {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 6px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.6) 0%, transparent 75%);
  border-radius: 50%;
  animation: shadowPulse var(--hover-dur, 3.2s) ease-in-out infinite;
  animation-delay: var(--hover-delay, 0s);
}

/* 3D Gem Floating / Hovering Animation (Slower, softer, individual) */
.gem-3d {
  position: relative;
  width: 30px;
  height: 36px;
  animation: gemHover var(--hover-dur, 3.2s) ease-in-out infinite;
  animation-delay: var(--hover-delay, 0s);
  will-change: transform;
  transform: translateZ(0); /* Forces mobile GPU compositing layer */
}
.gem-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Specular Star Sparkles */
.gem-sparkle-1, .gem-sparkle-2 {
  position: absolute;
  color: #ffffff;
  font-size: 10px;
  opacity: 0;
  text-shadow: 0 0 6px #fff;
  pointer-events: none;
}
.gem-sparkle-1 { top: 2px; right: 4px; animation: sparkleTwinkle 2.8s infinite 0.4s; }
.gem-sparkle-2 { bottom: 8px; left: 2px; animation: sparkleTwinkle 2.8s infinite 1.6s; font-size: 8px; }

/* Rising Ambient Stardust Particles */
.dust-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #a8f5ec;
  border-radius: 50%;
  box-shadow: 0 0 6px #4fd6c4;
  opacity: 0;
  pointer-events: none;
}
.dust-particle.p1 { left: 6px; bottom: 4px; animation: riseDust 2.2s infinite ease-out; }
.dust-particle.p2 { right: 8px; bottom: 6px; animation: riseDust 2.6s infinite 0.8s ease-out; }
.dust-particle.p3 { left: 16px; bottom: 2px; animation: riseDust 2.4s infinite 1.4s ease-out; }

@keyframes gemHover {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-3.5px) rotate(1deg); } /* Subtle 3.5px hover */
}

@keyframes shadowPulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.6; }
  50% { transform: translateX(-50%) scale(0.8); opacity: 0.35; }
}

@keyframes sparkleTwinkle {
  0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.2) rotate(45deg); }
}

@keyframes riseDust {
  0% { opacity: 0; transform: translateY(0) scale(0.6); }
  30% { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(-22px) scale(1.4); }
}

/* ================= TAP EXPLOSION VFX ================= */
.gem-explosion-container {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}

.burst-spark {
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #4fd6c4 60%, #1d7a6e 100%);
  box-shadow: 0 0 10px #4fd6c4, 0 0 16px #a8f5ec;
  animation: sparkBurst 0.6s cubic-bezier(0.12, 0.85, 0.35, 1) forwards;
}

@keyframes sparkBurst {
  0% {
    transform: translate(0, 0) scale(1.2);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0);
    opacity: 0;
  }
}

/* ---------- Mini 3D Crystal for HUD ---------- */
.hud-gem-icon {
  display: inline-block;
  width: 13px;
  height: 16px;
  vertical-align: -2px;
  margin-left: 2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 38'%3E%3Cpolygon points='16,2 29,12 16,16 3,12' fill='%23a8f5ec'/%3E%3Cpolygon points='3,12 16,16 16,36' fill='%231d7a6e'/%3E%3Cpolygon points='29,12 16,16 16,36' fill='%234fd6c4'/%3E%3Cpolygon points='16,2 20,8 16,16 12,8' fill='rgba(255,255,255,0.85)'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 4px rgba(79, 214, 196, 0.8));
}

/* ================= PHASE 2: 3D PLOTS & ORBITAL EXTRACTOR ================= */

/* 3D Raised Elevation Borders & Rarity Glows */
.owned-plot-3d {
  stroke-linejoin: round;
  stroke-linecap: round;
  transition: fill-opacity 0.3s ease;
}

.owned-plot-3d.rarity-common {
  filter: drop-shadow(0 0 3px rgba(143, 163, 184, 0.5));
}
.owned-plot-3d.rarity-rare {
  filter: drop-shadow(0 0 6px rgba(79, 157, 214, 0.75));
}
.owned-plot-3d.rarity-epic {
  filter: drop-shadow(0 0 8px rgba(168, 110, 224, 0.85));
  animation: epicPulse 3s infinite alternate ease-in-out;
}
.owned-plot-3d.rarity-legendary {
  filter: drop-shadow(0 0 10px rgba(224, 168, 79, 0.95)) drop-shadow(0 0 3px #ffffff);
  animation: legendaryGleam 2.5s infinite alternate ease-in-out;
}

@keyframes epicPulse {
  0% { stroke-opacity: 0.8; fill-opacity: 0.52; }
  100% { stroke-opacity: 1; fill-opacity: 0.65; }
}

@keyframes legendaryGleam {
  0% { stroke-opacity: 0.85; filter: drop-shadow(0 0 6px rgba(224, 168, 79, 0.8)); }
  100% { stroke-opacity: 1; filter: drop-shadow(0 0 14px rgba(224, 168, 79, 1)) drop-shadow(0 0 5px #fff); }
}


/* ================= 2.5D STANDING PLOT SIGNBOARD ================= */
.standing-plot-sign {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  pointer-events: auto !important;
  cursor: pointer;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.9));
  transform-origin: bottom center;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.standing-plot-sign:active {
  transform: scale(0.92);
}

/* Upright Circular Avatar Disc */
.sign-avatar-disc {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #d4af61;
  background: #0d1420;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.9), 0 0 8px rgba(212, 175, 97, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  animation: floatPlotBadge 3s ease-in-out infinite alternate;
}

/* Subtle Vertical Float */
@keyframes floatPlotBadge {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-3px); }
}

/* Golden Stem Pinning Sign into the Ground */
.sign-stem {
  width: 2px;
  height: 12px;
  background: linear-gradient(to bottom, #d4af61, rgba(212, 175, 97, 0.2));
  z-index: 1;
}

/* Soft Ground Shadow Beneath the Stem */
.sign-ground-shadow {
  width: 16px;
  height: 5px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.75) 0%, transparent 80%);
  border-radius: 50%;
  margin-top: -2px;
}

/* ---------- 3D Extractor Beacon with Orbital Energy Rings ---------- */
.extractor-3d-wrap {
  background: transparent !important;
  border: none !important;
  pointer-events: auto !important;
  cursor: pointer;
  transform-origin: bottom center;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.85));
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.extractor-3d-wrap:active {
  transform: scale(0.92);
}

.standing-extractor-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.beacon-root {
  position: relative;
  width: 46px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 600px;
  transform-style: preserve-3d;
}

/* Pulsing Ground Rune */
.beacon-ground-aura {
  position: absolute;
  bottom: 6px;
  width: 24px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(79, 214, 196, 0.8) 0%, transparent 75%);
  box-shadow: 0 0 12px rgba(79, 214, 196, 0.9);
  animation: groundRunePulse 2s infinite alternate ease-in-out;
}

/* 3D Floating Central Extractor Gem */
.beacon-core-gem {
  position: relative;
  width: 22px;
  height: 28px;
  z-index: 2;
  animation: beaconGemFloat 2.2s infinite alternate ease-in-out;
  filter: drop-shadow(0 0 8px rgba(79, 214, 196, 0.9));
}
.beacon-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Orbital Energy Rings */
.orbit-ring {
  position: absolute;
  top: 14px;
  left: 6px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(79, 214, 196, 0.85);
  box-shadow: 0 0 8px rgba(79, 214, 196, 0.6);
  pointer-events: none;
}

.orbit-ring.ring-1 {
  transform: rotateX(65deg) rotateZ(0deg);
  animation: orbitSpin1 3.5s linear infinite;
  border-color: #4fd6c4;
}

.orbit-ring.ring-2 {
  transform: rotateX(65deg) rotateY(40deg) rotateZ(0deg);
  animation: orbitSpin2 4.5s linear infinite reverse;
  border-color: #f0d38a;
  box-shadow: 0 0 8px rgba(240, 211, 138, 0.7);
  width: 28px;
  height: 28px;
  left: 8px;
  top: 16px;
}

@keyframes orbitSpin1 {
  0% { transform: rotateX(65deg) rotateZ(0deg); }
  100% { transform: rotateX(65deg) rotateZ(360deg); }
}

@keyframes orbitSpin2 {
  0% { transform: rotateX(65deg) rotateY(40deg) rotateZ(0deg); }
  100% { transform: rotateX(65deg) rotateY(40deg) rotateZ(360deg); }
}

@keyframes beaconGemFloat {
  0% { transform: translateY(0px) scale(0.95); }
  100% { transform: translateY(-6px) scale(1.05); }
}

@keyframes groundRunePulse {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.2); opacity: 1; }
}

/* ================= LOADING SCREEN & PROGRESS BAR ================= */
.loader-card {
  width: 100%;
  max-width: 380px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 3D Character Stage Behind Logo */
.loader-stage-wrap {
  position: relative;
  width: 220px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.loader-3d-canvas {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 200px;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 0 16px rgba(79, 214, 196, 0.4));
}

.loader-gem-wrap {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.loader-gem {
  font-size: 34px;
  color: var(--teal);
  text-shadow: 0 0 20px rgba(79, 214, 196, 0.9);
  animation: boostPulse 2s infinite ease-in-out;
}

.loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--gold);
  border-right-color: var(--teal);
  animation: loaderRingSpin 1.8s linear infinite;
}

@keyframes loaderRingSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loader-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--gold-hi);
  margin: 0 0 2px;
}

.loader-sub {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  margin: 0 0 24px;
}

/* Progress Bar Container */
.loader-bar-outer {
  width: 100%;
  height: 10px;
  background: rgba(13, 20, 32, 0.9);
  border: 1px solid rgba(212, 175, 97, 0.5);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.8), inset 0 0 6px rgba(0, 0, 0, 0.9);
  margin-bottom: 8px;
}

.loader-bar-inner {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #4fd6c4 0%, #d4af61 50%, #f0d38a 100%);
  box-shadow: 0 0 14px rgba(240, 211, 138, 0.9);
  border-radius: 999px;
  transition: width 0.25s ease-out;
}

/* Console-like Status Text */
.loader-meta-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: monospace;
  font-size: 11px;
}

.loader-status {
  color: #a8f5ec;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80%;
  text-align: left;
}

.loader-percent {
  color: var(--gold-hi);
  font-weight: 700;
}

/* ---------- Portrait Guard Overlay ---------- */
#portrait-guard {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--ink);
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.portrait-guard-card {
  max-width: 320px;
}

.portrait-guard-icon {
  font-size: 48px;
  margin-bottom: 12px;
  animation: rotatePhone 2.5s infinite ease-in-out;
}

#portrait-guard h2 {
  font-family: var(--font-display);
  color: var(--gold-hi);
  font-size: 20px;
  margin: 0 0 8px;
}

#portrait-guard p {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

@keyframes rotatePhone {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-90deg); }
}

/* Activate overlay whenever mobile device enters landscape mode */
@media screen and (orientation: landscape) and (max-height: 500px) {
  #portrait-guard {
    display: flex !important;
  }
}

/* ================= PHASE 3: HUD MICRO-INTERACTIONS & FLYING GEMS ================= */

/* Floating Combat Text Popups */
.combat-text-popup {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  transform: translate(-50%, 0);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--gold-hi);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.9), 0 0 14px rgba(79, 214, 196, 0.8);
  display: flex;
  align-items: center;
  gap: 4px;
  animation: combatTextFloat 1.1s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes combatTextFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.6);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -18px) scale(1.25);
  }
  80% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -65px) scale(0.85);
  }
}

/* Flying 3D Gem Particle */
.flying-3d-gem {
  position: fixed;
  z-index: 10001;
  pointer-events: none;
  width: 22px;
  height: 26px;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 12px rgba(79, 214, 196, 0.9));
  transition: transform 0.75s cubic-bezier(0.16, 0.85, 0.35, 1), opacity 0.75s ease-in;
}

.flying-3d-gem svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* HUD Counter Impact Bump Animation */
.hud-impact-bump {
  animation: hudBump 0.35s ease-out;
}

@keyframes hudBump {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); color: var(--teal); filter: drop-shadow(0 0 12px var(--teal)); }
  100% { transform: scale(1); }
}

/* ---------- Character Wardrobe Modal ---------- */
.wardrobe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0 10px;
}

.wardrobe-card {
  background: var(--panel-2);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.wardrobe-card:hover, .wardrobe-card.selected {
  border-color: var(--gold-hi);
  background: rgba(22, 32, 47, 0.95);
  box-shadow: 0 0 12px rgba(212, 175, 97, 0.4);
  transform: translateY(-2px);
}

.wardrobe-card .char-icon {
  font-size: 36px;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.6));
}

.wardrobe-card .char-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-hi);
}

.wardrobe-card .char-status {
  font-size: 10px;
  color: var(--teal);
  font-weight: 600;
}

/* ================= 3D GROUND SONAR RADAR ================= */
.sonar-ground-anchor {
  position: relative;
  width: 500px;
  height: 500px;
  pointer-events: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: width, height;
}

/* Outer Dashed Boundary Circle */
.sonar-boundary-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1.5px dashed #4fd6c4;
  background: radial-gradient(circle, rgba(79, 214, 196, 0.04) 0%, rgba(79, 214, 196, 0.01) 80%, transparent 100%);
  box-shadow: 0 0 10px rgba(79, 214, 196, 0.2);
}

/* Continuous Expanding Shockwaves */
.sonar-wave-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #4fd6c4;
  background: radial-gradient(circle, rgba(79, 214, 196, 0.25) 0%, transparent 70%);
  animation: sonarPulse3D 3s cubic-bezier(0.2, 0.65, 0.35, 1) infinite;
}

.sonar-wave-ring.wave-2 {
  animation-delay: 1.5s;
}

@keyframes sonarPulse3D {
  0% {
    transform: scale(0.05);
    opacity: 0.9;
    border-width: 3px;
  }
  60% {
    opacity: 0.45;
  }
  100% {
    transform: scale(1);
    opacity: 0;
    border-width: 1px;
  }
}

/* ---------- BUY LAND MODE CONTROLS ---------- */
.btn-buy-land {
  flex: 1.15 1 auto !important;
  min-width: 85px !important;
  max-width: 120px !important;
  width: auto !important;
  padding: 11px 6px !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #4fd6c4, #289b8d) !important;
  color: #0d1420 !important;
  font-family: var(--font-display) !important;
  font-weight: 800 !important;
  font-size: 13.5px !important;
  letter-spacing: 0.3px;
  white-space: nowrap !important;
  text-align: center;
  box-shadow: 0 8px 20px rgba(79, 214, 196, 0.4) !important;
}
.btn-buy-land:active { transform: scale(0.94); }

.buy-mode-banner {
  position: absolute;
  /* Floats centered cleanly above the raised controller bar */
  bottom: calc(max(18px, env(safe-area-inset-bottom)) + 130px);
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  max-width: 90%;
  z-index: 30;
  background: rgba(13, 20, 32, 0.94);
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  padding: 8px 14px 8px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.8), 0 0 16px rgba(212, 175, 97, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.buy-mode-instruction {
  font-size: 12px;
  font-weight: 700;
  color: var(--parchment);
  white-space: nowrap;
}

.btn-exit-buy {
  width: auto !important;
  padding: 8px 18px !important;
  font-family: var(--font-display) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)) !important;
  color: #1a1204 !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 2px 10px rgba(212, 175, 97, 0.5) !important;
  transition: transform 0.15s ease !important;
}

.btn-exit-buy:active {
  transform: scale(0.92) !important;
}



@keyframes redPulse {
  0% { transform: scale(0.9); box-shadow: 0 0 6px #ff3b30; }
  100% { transform: scale(1.15); box-shadow: 0 0 14px #ff3b30, 0 0 8px #ffffff; }
}

/* Calendar Card Aesthetic */
.calendar-icon-card {
  width: 48px;
  height: 52px;
  background: #f8f9fa;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1.5px solid rgba(212, 175, 97, 0.6);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.cal-card-top {
  background: #d1495b;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  padding: 2px 0;
  letter-spacing: 0.5px;
}

.cal-card-body {
  flex: 1;
  color: #1a2230;
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Calendar Modal Card */
.calendar-modal-card {
  max-width: 400px;
}

.calendar-modal-header {
  margin-bottom: 12px;
}

.cal-modal-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 4px;
}

/* Days List Container */
.calendar-days-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 4px;
  margin: 10px 0 14px;
}

.cal-day-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  transition: all 0.2s ease;
}

.cal-day-row.active {
  border: 1.5px solid var(--gold-hi);
  background: linear-gradient(135deg, rgba(34, 48, 68, 0.95), rgba(20, 28, 42, 0.98));
  box-shadow: 0 0 14px rgba(212, 175, 97, 0.35);
}

.cal-day-row.claimed {
  opacity: 0.55;
  background: rgba(13, 20, 32, 0.6);
}

.cal-day-row.locked {
  opacity: 0.7;
}

.cal-day-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cal-day-badge {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-hi);
}

.cal-reward-amount {
  font-size: 14px;
  font-weight: 800;
  color: var(--teal);
}

.cal-claim-btn {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  color: #1a1204;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(212, 175, 97, 0.4);
  animation: boostPulse 1.8s infinite ease-in-out;
}

.cal-status-claimed {
  font-size: 12px;
  font-weight: 700;
  color: #4fd6c4;
}

.cal-status-locked {
  font-size: 11px;
  color: var(--text-dim);
}

/* Flying +EB Particle Effect */
.flying-eb-particle {
  position: fixed;
  z-index: 10002;
  pointer-events: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--gold-hi);
  text-shadow: 0 0 12px rgba(240, 211, 138, 0.9), 0 0 20px rgba(0, 0, 0, 0.9);
  transition: transform 0.7s cubic-bezier(0.16, 0.85, 0.35, 1), opacity 0.7s ease-in;
}

/* ================= FLYING EB COIN CASCADE ================= */
.flying-eb-coin {
  position: fixed;
  z-index: 10002;
  pointer-events: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f0d38a, #d4af61);
  border: 1.5px solid #ffffff;
  color: #1a1204;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(240, 211, 138, 0.95), 0 2px 8px rgba(0, 0, 0, 0.6);
  transition: transform 0.75s cubic-bezier(0.16, 0.85, 0.35, 1), opacity 0.75s ease-in;
}

.flying-eb-coin.jackpot-spark {
  width: 32px;
  height: 32px;
  font-size: 14px;
  background: linear-gradient(135deg, #ffffff, #f0d38a, #d4af61);
  border-color: #4fd6c4;
  box-shadow: 0 0 18px rgba(240, 211, 138, 1), 0 0 10px rgba(79, 214, 196, 0.8);
}

/* ================= EXTRACTOR HUD BUTTON ================= */
.extractor-hud-card {
  background: linear-gradient(145deg, #13222e, #09131a);
  border: 1.5px solid rgba(79, 214, 196, 0.65);
  box-shadow: 0 0 12px rgba(79, 214, 196, 0.25), inset 0 0 10px rgba(79, 214, 196, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.extractor-hud-svg {
  width: 22px;
  height: 26px;
  display: block;
  animation: boostPulse 2.6s infinite ease-in-out;
  will-change: transform;
  transform: translateZ(0);
}

/* ================= LEADERBOARD HUD & MODAL ================= */

/* ================= UNIFIED SIDE HUD STACK (MINE + RANKS + CALENDAR + QUESTS) ================= */
.side-hud-stack {
  position: absolute;
  left: 14px;
  /* Lifted cleanly above the 30X Multiplier button */
  bottom: calc(188px + env(safe-area-inset-bottom));
  z-index: 22;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px; /* Tighter gap keeps the stack compact */
  pointer-events: none;
}

.side-hud-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  pointer-events: auto;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.65));
}

.side-hud-btn:active {
  transform: scale(0.9);
}

/* Matching 48px width cards for pixel-perfect vertical alignment */
.side-hud-card {
  width: 48px;
  height: 50px;
  border-radius: 12px;
  overflow: hidden;
  box-sizing: border-box;
}

/* Trophy Button Card */
.trophy-card {
  background: linear-gradient(145deg, #1c2a3d, #0d1420);
  border: 1.5px solid rgba(212, 175, 97, 0.65);
  box-shadow: 0 0 12px rgba(212, 175, 97, 0.25), inset 0 0 10px rgba(212, 175, 97, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.trophy-emoji {
  font-size: 26px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  animation: boostPulse 2.8s infinite ease-in-out;
  will-change: transform;
  transform: translateZ(0);
}

.side-hud-subtext {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--gold-hi);
  margin-top: 3px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* Calendar Card */
.calendar-icon-card {
  background: #f8f9fa;
  border: 1.5px solid rgba(212, 175, 97, 0.6);
  display: flex;
  flex-direction: column;
}

.cal-card-top {
  background: #d1495b;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  padding: 2px 0;
  letter-spacing: 0.5px;
}

.cal-card-body {
  flex: 1;
  color: #1a2230;
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Glowing Red Notification Dot (Anchored to top-right of Calendar) */
.calendar-red-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 13px;
  height: 13px;
  background: #ff3b30;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 10px #ff3b30, 0 0 16px rgba(255, 59, 48, 0.8);
  z-index: 5;
  animation: redPulse 1.6s infinite alternate ease-in-out;
}

/* Leaderboard Modal Card */
.leaderboard-modal-card {
  max-width: 420px;
}

.lb-header-trophy {
  font-size: 36px;
  display: block;
  margin-bottom: 2px;
}

/* Tabs */
.lb-tabs-row {
  display: flex;
  gap: 6px;
  background: rgba(13, 20, 32, 0.7);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.lb-tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  padding: 8px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lb-tab-btn.active {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  color: var(--gold-hi);
  border: 1px solid rgba(212, 175, 97, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Scrollable Leaderboard List */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 4px;
}

.lb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  transition: all 0.2s ease;
}

.lb-row.self-row {
  border: 1.5px solid var(--gold-hi);
  background: linear-gradient(135deg, rgba(34, 48, 68, 0.95), rgba(20, 28, 42, 0.98));
  box-shadow: 0 0 14px rgba(212, 175, 97, 0.3);
}

.lb-rank {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  min-width: 26px;
  text-align: center;
  color: var(--gold-hi);
}

.lb-avatar {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 16px;
  flex-shrink: 0;
}

.mayor-crown-wrap {
  overflow: visible;
}

.crown-icon {
  position: absolute;
  top: -8px;
  right: -6px;
  font-size: 13px;
  filter: drop-shadow(0 0 4px #ffd700);
}

.lb-info {
  flex: 1;
  text-align: left;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lb-name {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--parchment);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-name em {
  color: var(--gold-hi);
  font-style: normal;
  font-size: 10px;
}

.lb-sub {
  font-size: 10px;
  color: var(--text-dim);
}

.lb-metric {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: var(--teal);
  text-align: right;
  white-space: nowrap;
}

.lb-metric.gold { color: var(--gold-hi); }
.lb-metric.teal { color: var(--teal); }
.lb-unit { font-size: 9px; font-weight: 600; opacity: 0.8; }

/* ================= 3D PARCEL PROPS & MUSHROOMS ================= */
.parcel-prop-wrap {
  width: 32px;
  height: 32px;
  pointer-events: none !important;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.75));
}

.parcel-prop-canvas {
  width: 32px;
  height: 32px;
  display: block;
}

/* Epic Landmark Prop Sizing */
.epic-prop-wrap {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 8px rgba(168, 110, 224, 0.5));
}

.epic-canvas {
  width: 44px;
  height: 44px;
}

/* ---------- Zero-CPU Hardware Accelerated Sonar Waves ---------- */
.sonar-gpu-wave-container {
  width: 200px;
  height: 200px;
  transform: translate(-50%, -50%);
  pointer-events: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sonar-gpu-wave {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #4fd6c4;
  background: radial-gradient(circle, rgba(79, 214, 196, 0.2) 0%, transparent 70%);
  animation: gpuSonarRipple 3.2s cubic-bezier(0.18, 0.7, 0.35, 1) infinite;
  will-change: transform, opacity;
}

.sonar-gpu-wave.wave-2 {
  animation-delay: 1.6s;
}

@keyframes gpuSonarRipple {
  0% {
    transform: scale(0.05);
    opacity: 0.85;
    border-width: 3px;
  }
  70% {
    opacity: 0.35;
  }
  100% {
    transform: scale(1);
    opacity: 0;
    border-width: 1px;
  }
}

/* ---------- Menu Red Alert Dot ---------- */
.menu-btn-wrap {
  position: relative !important;
}

.menu-unread-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4757;
  border: 1.5px solid var(--ink);
  box-shadow: 0 0 8px #ff4757;
  animation: pulseDot 1.8s infinite ease-in-out;
  pointer-events: none;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(0.9); opacity: 0.9; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #ff4757; }
}

/* ---------- Realm Guide Modal Cards ---------- */
.guide-modal-card {
  text-align: left !important;
  max-width: 440px !important;
}
.guide-modal-card h2 {
  text-align: center;
}
.guide-header-icon {
  font-size: 34px;
  text-align: center;
  margin-bottom: 2px;
}

/* Cashout Coming Soon Banner */
.cashout-teaser-card {
  background: linear-gradient(135deg, rgba(212, 175, 97, 0.2), rgba(79, 214, 196, 0.15));
  border: 1.5px solid var(--gold);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  box-shadow: 0 0 16px rgba(212, 175, 97, 0.25);
}
.cashout-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 8px rgba(212, 175, 97, 0.6));
}
.cashout-info strong {
  display: block;
  font-family: var(--font-display);
  font-size: 13.5px;
  color: var(--gold-hi);
  margin-bottom: 2px;
}
.cashout-info span {
  font-size: 11.5px;
  color: var(--parchment);
  line-height: 1.4;
  display: block;
}

/* Step Cards List */
.guide-steps-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 48vh;
  overflow-y: auto;
  padding-right: 4px;
}

.guide-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.guide-card-icon {
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}
.guide-card-text strong {
  display: block;
  font-size: 13px;
  color: var(--gold-hi);
  margin-bottom: 3px;
}
.guide-card-text span {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.45;
  display: block;
}

/* ---------- Reddit Community & Support Card ---------- */
.community-support-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(255, 69, 0, 0.12) 0%, rgba(22, 32, 47, 0.95) 100%);
  border: 1.5px solid rgba(255, 69, 0, 0.5);
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 16px;
  text-decoration: none;
  color: var(--parchment);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 12px rgba(255, 69, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.community-support-card:active {
  transform: scale(0.97);
}

.community-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 69, 0, 0.2);
  border: 1px solid rgba(255, 69, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(255, 69, 0, 0.4);
}

.community-content {
  flex: 1;
}

.comm-badge {
  display: inline-block;
  background: #ff4500;
  color: #ffffff;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 999px;
  margin-bottom: 3px;
}

.community-content strong {
  display: block;
  font-family: var(--font-display);
  font-size: 13.5px;
  color: #ff9068;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.community-content span {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.35;
  display: block;
}

.community-arrow {
  font-size: 16px;
  color: #ff9068;
  font-weight: 800;
  padding-left: 4px;
  transition: transform 0.2s ease;
}

.community-support-card:hover .community-arrow {
  transform: translateX(3px);
}

/* ================= GLOBAL COMMUNITY CHAT DRAWER ================= */
.chat-hud-btn {
  position: relative;
  background: var(--panel-2) !important;
  border-color: rgba(79, 214, 196, 0.4) !important;
}

.chat-unread-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff4757;
  border: 1.5px solid var(--ink);
  box-shadow: 0 0 8px #ff4757;
  animation: pulseDot 1.8s infinite;
}

/* Chat Drawer Backdrop & Slide-up Container */
.chat-drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.chat-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 12, 0.65);
  backdrop-filter: blur(4px);
}

.chat-drawer-panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 62vh;
  margin: 0 auto;
  background: rgba(13, 20, 32, 0.96);
  border-top: 1.5px solid var(--gold);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.8), 0 0 20px rgba(212, 175, 97, 0.25);
  display: flex;
  flex-direction: column;
  animation: slideUpChat 0.3s cubic-bezier(0.18, 0.85, 0.32, 1);
  overflow: hidden;
}

@keyframes slideUpChat {
  0% { transform: translateY(100%); }
  100% { transform: translateY(0); }
}

/* Header */
.chat-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(22, 32, 47, 0.7);
}

.chat-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-header-title h3 {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--gold-hi);
  margin: 0;
}

.chat-live-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 8px #2ecc71;
}

.chat-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
}

/* Messages List */
.chat-messages-list {
  flex: 1;
  padding: 12px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-message-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  animation: fadeInMsg 0.25s ease-out;
}

@keyframes fadeInMsg {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

.chat-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #182232;
  border: 1px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
}

.chat-msg-bubble {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px 10px;
  max-width: 82%;
}

.chat-message-row.self .chat-msg-bubble {
  background: rgba(79, 214, 196, 0.12);
  border-color: rgba(79, 214, 196, 0.4);
}

.chat-msg-sender {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.chat-sender-name {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold-hi);
}

.chat-sender-time {
  font-size: 9.5px;
  color: var(--text-dim);
}

.chat-msg-text {
  font-size: 12.5px;
  color: var(--parchment);
  line-height: 1.4;
  word-break: break-word;
}

.chat-system-msg {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-dim);
  padding: 8px 0;
}

/* Footer Input */
.chat-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(13, 20, 32, 0.98);
}

.chat-input {
  flex: 1;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--parchment);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease;
}

.chat-input:focus {
  border-color: var(--teal);
}

.chat-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--teal), #1d7a6e);
  border: none;
  color: #0d1420;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(79, 214, 196, 0.4);
  transition: transform 0.15s ease;
}

.chat-send-btn:active {
  transform: scale(0.9);
}

/* ---------- Game Treasury Bottom Ad Banner ---------- */
.treasury-ad-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: rgba(10, 15, 24, 0.98);
  border-top: 1px solid rgba(212, 175, 97, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 18;
  overflow: hidden;
  box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.8);
}

.treasury-ad-container ins.adsbygoogle {
  background: transparent !important;
}

/* ---------- Push Fullscreen / Vignette Ads Below Phone Status Bar & Notch ---------- */
body > div[style*="2147483647"],
.adsbygoogle-noablate,
div[id*="google-ads-annotation"],
div.google-anno-skip,
div[aria-label="Advertisement"] {
  padding-top: max(28px, env(safe-area-inset-top)) !important;
  box-sizing: border-box !important;
}

/* ---------- Territory Scope Bar ---------- */
.lb-scope-row {
  display: flex;
  gap: 6px;
  background: rgba(10, 15, 24, 0.85);
  padding: 5px;
  border-radius: 12px;
  border: 1.5px solid var(--gold);
  margin-bottom: 8px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.lb-scope-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  padding: 8px 2px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lb-scope-btn.active {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  color: #1a1204;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(212, 175, 97, 0.5);
}

.lb-title-glow {
  color: var(--gold-hi) !important;
  font-weight: 600;
}

/* ================= 10X COLOSSAL 3D DYSON SPHERE CITADELS ================= */

/* Master Monument Container: Anchored strictly at Ground Level (bottom: 0) */
.citadel-3d-monument {
  position: relative !important;
  width: 90px !important;
  height: 180px !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  z-index: 100 !important;
  transform-style: flat !important;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

/* ---------- 1. Under-Construction Growth Pin (All Positive Heights) ---------- */
.citadel-growth-pin {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Touches the exact ground surface (0px) */
.growth-ground-pulse {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(ellipse, var(--r-color, #4fd6c4) 0%, transparent 75%);
  box-shadow: 0 0 16px var(--r-color, #4fd6c4);
  animation: groundRunePulse 2s infinite alternate ease-in-out;
}

/* Crystalline Pylon rises from 10px to 74px */
.growth-pin-stem {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 64px;
  background: linear-gradient(to top, var(--r-color, #4fd6c4), rgba(240, 211, 138, 0.9));
  border-radius: 2px;
  box-shadow: 0 0 10px var(--r-color, #4fd6c4);
}

/* Seed Core floats high above ground at 74px */
.growth-seed-core {
  position: absolute;
  bottom: 74px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 40px;
  filter: drop-shadow(0 0 18px var(--r-color, #4fd6c4));
  animation: coreFloat 2s infinite alternate ease-in-out;
  line-height: 1;
}

/* Timer Pill floats at the very top at 132px */
.growth-timer-pill {
  position: absolute;
  bottom: 132px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(13, 20, 32, 0.97);
  border: 1.5px solid var(--r-color, #4fd6c4);
  color: var(--gold-hi);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 0 18px var(--r-color, #4fd6c4), 0 4px 12px rgba(0, 0, 0, 0.9);
  letter-spacing: 0.5px;
  animation: boostPulse 2s infinite ease-in-out;
}

/* ---------- 2. Fully Grown 3D Dyson Sphere Monument (All Positive Heights) ---------- */
.dyson-monument-root {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Ground shadow pinned at 0px */
.dyson-ground-shadow {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,0.9) 0%, transparent 75%);
  box-shadow: 0 0 20px var(--core-color, #4fd6c4);
}

/* Kinetic Rotating Rings centered at 48px above ground */
.dyson-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--core-color, #4fd6c4);
  box-shadow: 0 0 10px var(--core-color, #4fd6c4);
  left: 50%;
  transform-origin: center center;
  will-change: transform;
  transform: translateZ(0); /* Zero CPU overhead */
}

.dyson-ring.ring-1 {
  width: 78px;
  height: 78px;
  bottom: 42px;
  margin-left: -39px;
  animation: dysonSpin1 4s linear infinite;
}

.dyson-ring.ring-2 {
  width: 64px;
  height: 64px;
  bottom: 49px;
  margin-left: -32px;
  border-color: #f0d38a;
  animation: dysonSpin2 5s linear infinite reverse;
}

.dyson-ring.ring-3 {
  width: 48px;
  height: 48px;
  bottom: 57px;
  margin-left: -24px;
  animation: dysonSpin3 3.5s linear infinite;
}

@keyframes dysonSpin1 { 0% { transform: rotateX(70deg) rotateZ(0deg); } 100% { transform: rotateX(70deg) rotateZ(360deg); } }
@keyframes dysonSpin2 { 0% { transform: rotateX(60deg) rotateY(45deg) rotateZ(0deg); } 100% { transform: rotateX(60deg) rotateY(45deg) rotateZ(360deg); } }
@keyframes dysonSpin3 { 0% { transform: rotateY(70deg) rotateZ(0deg); } 100% { transform: rotateY(70deg) rotateZ(360deg); } }

/* Avatar Chamber centered at 64px above ground */
.dyson-core-avatar {
  position: absolute;
  bottom: 64px;
  left: 50%;
  transform: translateX(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #0d1420;
  border: 2.5px solid var(--core-color, #4fd6c4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  z-index: 5;
  box-shadow: 0 0 24px var(--core-color, #4fd6c4), 0 0 10px #fff;
  animation: coreFloat 2.5s infinite alternate ease-in-out;
  overflow: hidden;
}

/* Spire Tip shining at 134px above ground */
.dyson-spire-tip {
  position: absolute;
  bottom: 134px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 16px;
  color: var(--core-color, #4fd6c4);
  text-shadow: 0 0 12px #fff, 0 0 20px var(--core-color, #4fd6c4);
  animation: sparkleTwinkle 2s infinite;
}

@keyframes coreFloat { 0% { transform: translate(-50%, 0px); } 100% { transform: translate(-50%, -6px); } }

/* ---------- Citadel Holographic Chamber Modal ---------- */
.citadel-chamber-card { max-width: 420px; }
.citadel-badge-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(79, 214, 196, 0.15);
  border: 1px solid var(--teal);
  letter-spacing: 0.8px;
}

.citadel-dyson-stage {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 10px auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 500px;
}

.dyson-outer-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--teal);
  box-shadow: 0 0 14px var(--teal);
}
.dyson-outer-ring.ring-a { width: 120px; height: 120px; animation: dysonSpin1 4s linear infinite; }
.dyson-outer-ring.ring-b { width: 95px; height: 95px; border-color: var(--gold); animation: dysonSpin2 5s linear infinite reverse; }

.dyson-core-chamber {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(13, 20, 32, 0.95);
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(212, 175, 97, 0.8);
  overflow: hidden;
}

.citadel-stats-box {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

/* ---------- Siege Reflex Combat Arena ---------- */
.siege-card { max-width: 380px; text-align: center; }
.shield-hp-wrap { margin-bottom: 18px; }
.shield-hp-labels { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.shield-hp-bar-outer {
  width: 100%;
  height: 12px;
  background: rgba(13, 20, 32, 0.9);
  border: 1.5px solid var(--ruby);
  border-radius: 999px;
  overflow: hidden;
}
.shield-hp-bar-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #ff4757, #ff6b81);
  box-shadow: 0 0 12px #ff4757;
  transition: width 0.25s ease-out;
}

/* Reflex Timing Bar */
.reflex-gauge-container {
  position: relative;
  width: 100%;
  height: 42px;
  background: #0d1420;
  border: 2px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

.reflex-sweet-spot {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 40%;
  width: 20%;
  background: linear-gradient(90deg, rgba(212,175,97,0.4), rgba(240,211,138,0.9), rgba(212,175,97,0.4));
  border-left: 2px solid var(--gold-hi);
  border-right: 2px solid var(--gold-hi);
  box-shadow: 0 0 16px rgba(240, 211, 138, 0.8);
}

.reflex-needle {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 50%;
  width: 6px;
  background: #ffffff;
  border-radius: 3px;
  box-shadow: 0 0 12px #ffffff, 0 0 6px var(--teal);
}

/* ---------- Citadel Modal Guide Box ---------- */
.citadel-guide-box {
  background: rgba(13, 20, 32, 0.85);
  border: 1.5px solid rgba(212, 175, 97, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  text-align: left;
}

.citadel-guide-box .guide-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-hi);
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.citadel-guide-box p {
  font-size: 12px;
  color: var(--teal);
  font-weight: 700;
  margin: 0 0 6px;
}

.guide-rules-hint {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.45;
  display: block;
}

.guide-rules-hint strong {
  color: var(--parchment);
}

/* ================= CITADEL UPGRADE FORGE ================= */
.citadel-upgrade-card {
  max-width: 420px;
  text-align: center;
}

.forge-icon {
  font-size: 38px;
  color: var(--gold-hi);
  text-shadow: 0 0 14px rgba(240, 211, 138, 0.9);
  margin-bottom: 2px;
  animation: boostPulse 2s infinite ease-in-out;
  will-change: transform;
  transform: translateZ(0);
}

/* Comparison Box */
.forge-comparison-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--panel-2);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 12px 0 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}

.forge-tier-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.forge-col-sub {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.forge-tier-badge {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(13, 20, 32, 0.85);
}

.forge-perk-text {
  font-size: 11px;
  color: var(--teal);
  font-weight: 700;
}

.forge-arrow {
  font-size: 20px;
  color: var(--gold-hi);
  font-weight: 800;
  padding: 0 8px;
}

.forge-timer-notice {
  font-size: 11.5px;
  color: var(--gold-hi);
  background: rgba(212, 175, 97, 0.12);
  border: 1px dashed var(--gold);
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 16px;
}

/* Dual Payment Buttons */
.forge-payment-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.forge-btn-eb {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)) !important;
  color: #1a1204 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

.forge-btn-diamonds {
  background: linear-gradient(180deg, var(--teal), #1d7a6e) !important;
  color: #0d1420 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  box-shadow: 0 0 12px rgba(79, 214, 196, 0.4) !important;
}

.btn-citadel-upgrade {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)) !important;
  color: #1a1204 !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  margin-top: 8px !important;
}

/* ---------- Diamond Extractor Upgrade Elements ---------- */
.extractor-level-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.extractor-level-pill {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: var(--teal);
  background: rgba(79, 214, 196, 0.15);
  border: 1px solid var(--teal);
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

.extractor-next-perk {
  font-size: 11px;
  color: var(--gold-hi);
  font-weight: 700;
}

.btn-extractor-upgrade {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)) !important;
  color: #1a1204 !important;
  font-weight: 800 !important;
  font-size: 14px !important;
  box-shadow: 0 4px 14px rgba(212, 175, 97, 0.4) !important;
}

.extractor-locked-notice {
  font-size: 11.5px;
  color: var(--text-dim);
  background: rgba(13, 20, 32, 0.85);
  border: 1px dashed var(--line);
  padding: 8px 12px;
  border-radius: 10px;
  margin-bottom: 10px;
}

/* ================= WEEKLY REALM TREASURY POOL UI ================= */

/* Side Floating HUD Button */
.weekly-pool-btn {
  position: absolute;
  right: 14px;
  bottom: calc(188px + env(safe-area-inset-bottom));
  z-index: 22;
  background: linear-gradient(135deg, rgba(22, 32, 47, 0.96), rgba(13, 20, 32, 0.98));
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  padding: 6px 14px 6px 10px;
  display: flex;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(212, 175, 97, 0.4), 0 4px 12px rgba(0, 0, 0, 0.7);
  animation: boostPulse 2.8s infinite ease-in-out;
  transition: transform 0.15s ease;
}

.weekly-pool-btn:active {
  transform: scale(0.92);
}

.pool-btn-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pool-icon {
  font-size: 20px;
  filter: drop-shadow(0 0 6px rgba(240, 211, 138, 0.9));
}

.pool-btn-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.pool-tag {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-hi);
  letter-spacing: 0.5px;
}

.pool-sub {
  font-size: 9px;
  font-weight: 700;
  color: var(--teal);
}

/* Modal Styling */
.weekly-pool-card {
  max-width: 420px;
  text-align: center;
}

.pool-glow-crown {
  font-size: 40px;
  filter: drop-shadow(0 0 16px rgba(240, 211, 138, 0.9));
  margin-bottom: 2px;
}

.pool-hero-stats {
  background: var(--panel-2);
  border: 1.5px solid rgba(212, 175, 97, 0.45);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}

.pool-stat-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.pool-stat-divider {
  width: 1px;
  height: 38px;
  background: var(--line);
  margin: 0 10px;
}

.pool-stat-label {
  font-size: 9px;
  color: var(--text-dim);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.pool-stat-cash {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--parchment);
}

.pool-stat-pool {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--gold-hi);
  text-shadow: 0 0 10px rgba(240, 211, 138, 0.4);
}

.pool-countdown-card {
  background: rgba(79, 214, 196, 0.12);
  border: 1px solid var(--teal);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--parchment);
  margin-bottom: 14px;
}

.pool-countdown-card strong {
  color: var(--teal);
  font-family: var(--font-display);
  font-size: 13px;
}

.pool-tiers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  margin-bottom: 12px;
}

.pool-tier-item {
  background: rgba(13, 20, 32, 0.85);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.pool-tier-item.tier-top3 {
  border-color: rgba(212, 175, 97, 0.5);
  background: linear-gradient(135deg, rgba(34, 48, 68, 0.7), rgba(20, 28, 42, 0.9));
}

.tier-badge {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  color: var(--gold-hi);
  margin-bottom: 3px;
}

.tier-desc {
  font-size: 11px;
  color: var(--text-dim);
}

.tier-desc strong {
  color: var(--teal);
}

/* Monday Celebration Claim Modal */
.weekly-reward-card {
  max-width: 380px;
  text-align: center;
}

.reward-fireworks-icon {
  font-size: 44px;
  animation: coreFloat 2s infinite alternate ease-in-out;
  margin-bottom: 4px;
}

.reward-payout-box {
  background: var(--panel-2);
  border: 1.5px solid var(--gold);
  border-radius: 14px;
  padding: 16px;
  margin: 14px 0;
  box-shadow: 0 0 20px rgba(212, 175, 97, 0.35);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reward-rank-badge {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--gold-hi);
}

.reward-amount-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 8px;
}

.reward-cash-val {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--teal);
  text-shadow: 0 0 10px rgba(79, 214, 196, 0.6);
}

/* ================= SINGLE ACTIVE SESSION CONFLICT MODAL ================= */
.session-conflict-card {
  max-width: 380px;
  text-align: center;
  border-top: 2px solid var(--ruby) !important;
}

.session-conflict-icon {
  font-size: 40px;
  margin-bottom: 6px;
  animation: boostPulse 2s infinite ease-in-out;
}

.session-conflict-info {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 12px 0 16px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.45;
}
