/* zombiefactory.css — Zombie Factory idle clicker game */

/* ── Overlay ── */
.zf-overlay {
  position: fixed;
  top: calc(var(--sait, 0px) + 48px);
  left: 0;
  right: 0;
  bottom: calc(50px + var(--saib, 0px));
  background: #060402;
  z-index: 11000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  overflow: hidden;
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  color: #a08850;
}
.zf-overlay.zf-overlay-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Splash ── */
.zf-splash {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #030201;
  z-index: 100;
  transition: opacity 0.6s ease-in;
}
.zf-splash.fading { opacity: 0; pointer-events: none; }
.zf-splash-bg {
  position: absolute; inset: 0;
  background: #030201;
}
.zf-splash-img {
  width: 100%; height: 100%;
  object-fit: contain;
  position: absolute; inset: 0;
}
.zf-splash-bottom {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  width: 60%; max-width: 320px; z-index: 2;
}
.zf-splash-label {
  font-family: 'Cinzel', serif;
  font-size: 10px; color: #8acc00;
  letter-spacing: 3px; text-align: center;
  margin-bottom: 10px; text-shadow: 0 0 10px #33550044;
}
.zf-splash-track {
  height: 4px; background: #0a0a06;
  border-radius: 4px; border: 1px solid #1a2208;
  overflow: hidden; box-shadow: 0 0 12px #00000088;
}
.zf-splash-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg,#336600,#88cc00,#aaffaa,#88cc00,#336600);
  background-size: 200% 100%;
  border-radius: 4px; box-shadow: 0 0 8px #66cc0088;
  animation: zf-shimmer 1.5s linear infinite;
  transition: width 0.1s linear;
}
.zf-splash-vignette {
  position: absolute; bottom: 0; left: 0; right: 0; height: 22%;
  background: linear-gradient(to top, #030201ee, #030201aa, transparent);
  z-index: 1;
}

/* ── Toolbar ── */
.zf-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: linear-gradient(180deg, #0e0c08, #090806);
  border-bottom: 1px solid #1f1d10;
  flex-shrink: 0;
  z-index: 20;
}
.zf-toolbar-close {
  padding: 3px 10px;
  background: rgba(10,8,6,.8);
  border: 1px solid #3a3828;
  border-radius: 4px;
  color: #aaa870;
  cursor: pointer;
  font-size: 10px;
  font-family: 'Cinzel', serif;
  letter-spacing: 1px;
  flex-shrink: 0;
  transition: color .15s, border-color .15s;
}
.zf-toolbar-close:hover { color: #ff6644; border-color: #884422; }
.zf-toolbar-spacer { flex: 1; }
.zf-vol-group {
  display: flex;
  align-items: center;
  gap: 4px;
}
.zf-toolbar-toggle {
  padding: 2px 6px;
  background: transparent;
  border: 1px solid #3a3828;
  border-radius: 4px;
  color: #aaa870;
  cursor: pointer;
  font-size: 10px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color .15s, border-color .15s;
}
.zf-toolbar-toggle.muted { color: #664430; border-color: #2a1810; }
.zf-toolbar-toggle:hover { color: #ccbb88; border-color: #5a5838; }
.zf-vol-slider {
  width: 60px;
  height: 4px;
  accent-color: #7acc00;
  flex-shrink: 1;
  min-width: 30px;
  cursor: pointer;
}
.zf-vol-text {
  font-size: 9px;
}

/* ── Game wrap (desktop) ── */
.zf-game-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  z-index: 2;
}

/* ── Main layout ── */
.zf-main {
  display: flex;
  flex: 1;
  min-height: 0;
  position: relative;
  z-index: 2;
}
.zf-left {
  width: 278px;
  background: linear-gradient(180deg, #0f0d09, #0a0907);
  border-right: 1px solid #1f1d10;
  display: flex; flex-direction: column;
  overflow: hidden; min-height: 0;
  box-shadow: inset -4px 0 16px #00000044;
  flex-shrink: 0;
}
.zf-center {
  flex: 1;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  background: linear-gradient(to bottom, #0a0806, #060503);
}
.zf-right {
  width: 314px;
  background: linear-gradient(180deg, #0f0d09, #0a0907);
  border-left: 1px solid #1f1d10;
  display: flex; flex-direction: column;
  min-height: 0;
  box-shadow: inset 4px 0 16px #00000044;
  flex-shrink: 0;
}

/* ── Stats bar ── */
.zf-stats-bar {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: linear-gradient(180deg, #0f0d09, #0a0907);
  border-bottom: 1px solid #1f1d10;
  flex-shrink: 0; box-shadow: 0 2px 12px #000000aa;
}
.zf-stat-cell {
  text-align: center; padding: 9px 4px;
  border-right: 1px solid #3a3828;
  position: relative;
}
.zf-stat-cell:last-child { border-right: none; }
.zf-stat-cell::before {
  content: ''; position: absolute; top: 0; left: 20%; right: 20%; height: 1px;
  opacity: .8;
}
.zf-stat-val {
  font-family: 'Share Tech Mono', monospace;
  font-size: 20px; line-height: 1.1; letter-spacing: .5px;
}
.zf-stat-label {
  font-size: 7px; color: #b0aa78; letter-spacing: 2px;
  font-family: 'Cinzel', serif; margin-top: 1px;
}

/* ── Header ── */
.zf-header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid #1f1d10;
  background: linear-gradient(160deg, #181410, #0f0d09);
  flex-shrink: 0; position: relative; overflow: hidden;
}
.zf-header-fire {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #66220000, #cc440099, #ff880066, #cc440099, #66220000);
}
.zf-title-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.zf-title {
  font-family: 'Cinzel', serif; font-size: 14px; font-weight: 900;
  color: #88cc00; letter-spacing: 1.5px; line-height: 1.2; white-space: nowrap;
  text-shadow: 0 0 20px #55aa0077, 0 0 40px #33880044, 0 2px 0 #0a1a00, 0 3px 8px #000000bb;
}
.zf-torch {
  font-size: 14px; flex-shrink: 0;
  animation: zf-torchFlicker 1.5s ease-in-out infinite;
  filter: drop-shadow(0 0 6px #ff6600);
}
.zf-subtitle {
  font-size: 8px; color: #b0aa68; letter-spacing: 2px;
  font-family: 'Cinzel', serif; text-transform: uppercase;
}
.zf-divider-line {
  display: flex; align-items: center; gap: 6px; margin-bottom: 4px;
}
.zf-divider-line::before, .zf-divider-line::after {
  content: ''; flex: 1; height: 1px;
}
.zf-divider-line::before { background: linear-gradient(to right, transparent, #2a3800); }
.zf-divider-line::after { background: linear-gradient(to left, transparent, #2a3800); }

/* ── Tap area ── */
.zf-tap-area {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative; overflow: hidden; min-height: 0;
}
.zf-tap-aurora {
  position: absolute; border-radius: 50%; pointer-events: none;
}
.zf-tap-aurora-1 {
  width: 520px; height: 520px;
  animation: zf-auroraRotate 28s linear infinite;
}
.zf-tap-aurora-2 {
  width: 340px; height: 340px;
  animation: zf-auroraRotate 18s linear infinite reverse;
}
.zf-tap-wisp {
  position: absolute; width: 0; height: 0; pointer-events: none;
}
.zf-tap-mist {
  position: absolute; bottom: 0; left: 5%; right: 5%; height: 80px;
  pointer-events: none; animation: zf-groundMist 5s ease-in-out infinite;
}
.zf-tomb-wrap {
  position: relative; z-index: 3; cursor: pointer;
  user-select: none; touch-action: manipulation;
}
.zf-tomb-float { animation: zf-tombFloat 6s ease-in-out infinite; }
.zf-tap-label {
  margin-top: 16px; font-size: 9px; letter-spacing: 4px;
  font-family: 'Cinzel', serif; text-transform: uppercase;
  z-index: 3; opacity: .75;
}
.zf-ground-fog {
  position: absolute; bottom: 0; left: 0; right: 0; height: 100px;
  background: linear-gradient(to top, rgba(8,6,2,.96), rgba(10,8,3,.7), transparent);
  pointer-events: none; z-index: 2;
}

/* ── Combo indicator ── */
.zf-combo {
  position: absolute; top: 10px; right: 14px;
  background: linear-gradient(135deg, #0e0900, #0a0600);
  border: 1px solid #4a2800; border-radius: 6px;
  padding: 4px 12px; z-index: 10;
  font-family: 'Share Tech Mono', monospace; font-size: 12px;
  color: #ffaa33; box-shadow: 0 0 14px #aa440033, inset 0 1px 0 #331800;
}

/* ── Building rows ── */
.zf-bldg-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px;
  background: linear-gradient(135deg, #120f09 0%, #0e0c08 60%, #110f0a 100%);
  border: none; border-bottom: 1px solid #1f1d10;
  cursor: pointer; color: #a08850; text-align: left; width: 100%;
  transition: background .18s, transform .08s;
  touch-action: manipulation; position: relative; overflow: hidden;
}
.zf-bldg-row:not(:disabled):hover {
  background: linear-gradient(135deg, #1c1811 0%, #141208 100%);
}
.zf-bldg-row:not(:disabled):active { transform: scale(.985); }
.zf-bldg-row.affordable {
  border-left: 3px solid #5a9a00;
  background: linear-gradient(135deg, #141209 0%, #0f0d08 100%);
}
.zf-bldg-row:disabled { opacity: .35; cursor: not-allowed; }
.zf-bldg-emoji {
  font-size: 24px; width: 32px; text-align: center; flex-shrink: 0;
}
.zf-bldg-info { flex: 1; min-width: 0; }
.zf-bldg-name {
  font-family: 'Cinzel', serif; font-size: 11px;
  color: #a09060; letter-spacing: .3px; margin-bottom: 2px;
}
.zf-bldg-row.affordable .zf-bldg-name { color: #aaee22; }
.zf-bldg-cost {
  font-size: 10px; color: #b09050;
  font-family: 'Share Tech Mono', monospace;
}
.zf-bldg-row.affordable .zf-bldg-cost { color: #dd9922; }
.zf-bldg-count {
  font-family: 'Cinzel', serif; font-size: 16px;
  color: #7acc00; min-width: 26px; text-align: right; flex-shrink: 0;
  text-shadow: 0 0 8px #5a9a0066;
}
.zf-bldg-count.empty { color: #1e1c10; text-shadow: none; }
.zf-bldg-locked {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-bottom: 1px solid #2e2818; opacity: .45;
}
.zf-progress-bar {
  margin-top: 4px; display: flex; align-items: center; gap: 6px;
}
.zf-progress-track {
  flex: 1; height: 2px; background: #14120e; border-radius: 1px; overflow: hidden;
}
.zf-progress-fill {
  height: 100%; background: linear-gradient(90deg, #3a6600, #7acc00);
  transition: width .4s;
}
.zf-progress-label {
  font-size: 8px; color: #8a8060;
  font-family: 'Share Tech Mono', monospace; flex-shrink: 0;
}

/* ── Synergy badge ── */
.zf-synergy-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px;
  background: linear-gradient(135deg, #0e0d08, #0a0c06);
  border: 1px solid #2a2a10; border-radius: 4px;
  font-size: 9px; color: #88cc00;
  font-family: 'Share Tech Mono', monospace; white-space: nowrap;
}

/* ── Buy mode bar ── */
.zf-buymode-bar {
  display: flex; gap: 4px; padding: 7px 10px;
  background: linear-gradient(to bottom, #0c0a07, #090806);
  border-bottom: 1px solid #181610; flex-shrink: 0;
}
.zf-buymode-label {
  font-size: 8px; color: #b0aa68; font-family: 'Cinzel', serif;
  letter-spacing: 1.5px; display: flex; align-items: center;
  margin-right: 4px; white-space: nowrap;
}
.zf-buymode-btn {
  flex: 1; padding: 5px 2px;
  background: transparent;
  border: 1px solid #2a2818; border-radius: 4px;
  color: #a09060; cursor: pointer;
  font-family: 'Share Tech Mono', monospace; font-size: 10px;
  letter-spacing: .5px; transition: color .12s, background .12s, border-color .12s;
  touch-action: manipulation;
}
.zf-buymode-btn.active {
  background: linear-gradient(135deg, #1c1a08, #141208);
  border-color: #556600; color: #aaee00;
  box-shadow: 0 0 10px #4a7a0033, inset 0 1px 0 #334400;
}
.zf-save-btn {
  padding: 5px 9px; background: transparent;
  border: 1px solid #2a2818; border-radius: 4px;
  color: #aaa860; cursor: pointer;
  font-family: 'Share Tech Mono', monospace; font-size: 10px;
  touch-action: manipulation; flex-shrink: 0;
}

/* ── Tab buttons ── */
.zf-tab-bar {
  display: flex; border-bottom: 1px solid #1f1d10;
  background: linear-gradient(to bottom, #0c0b08, #090806);
  flex-shrink: 0; position: relative;
}
.zf-tab-bar::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #66220000, #cc440066, #ff880044, #cc440066, #66220000);
}
.zf-tab {
  flex: 1; padding: 8px 3px; background: transparent;
  border: none; border-bottom: 2px solid transparent;
  cursor: pointer; font-family: 'Cinzel', serif; font-size: 8px;
  letter-spacing: .5px; color: #aaa870;
  transition: color .2s, border-color .2s, background .2s;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  text-transform: uppercase; position: relative;
}
.zf-tab.active {
  color: #99dd00;
  background: linear-gradient(to bottom, #0e1008, #0a0c06);
}
.zf-tab.active::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #7acc00, transparent);
}
.zf-tab:hover:not(.active) { color: #bbaa66; }

/* ── Tab badge ── */
.zf-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: linear-gradient(135deg, #557000, #3a5500);
  color: #ccff88; font-size: 8px; font-weight: 900; border-radius: 10px;
  font-family: 'Share Tech Mono', monospace;
  animation: zf-badgePop .25s ease-out;
  box-shadow: 0 0 6px #66aa0055, inset 0 1px 0 #88cc0033;
}

/* ── Panel content ── */
.zf-panel {
  flex: 1; overflow-y: auto; min-height: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.zf-panel-padded {
  flex: 1; overflow-y: auto; padding: 8px 10px; min-height: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.zf-empty-state {
  text-align: center; padding: 28px 12px; line-height: 2;
}
.zf-empty-icon { font-size: 26px; margin-bottom: 8px; opacity: .3; }
.zf-empty-title {
  font-family: 'Cinzel', serif; font-size: 10px; color: #aaa860;
  letter-spacing: 1px;
}
.zf-empty-sub { font-size: 9px; color: #aaa870; margin-top: 6px; }

/* ── Upgrade cards ── */
.zf-upg-card {
  width: 100%; padding: 10px 13px; margin-bottom: 6px;
  background: linear-gradient(135deg, #120f09, #0e0c07);
  border: 1px solid #201d10; border-radius: 5px;
  cursor: pointer; text-align: left; color: #a08850;
  transition: background .18s, border-color .18s, box-shadow .18s, transform .08s;
  touch-action: manipulation; position: relative; overflow: hidden;
}
.zf-upg-card:not(:disabled):hover {
  background: linear-gradient(135deg, #1c1811, #141209);
  border-color: #3a3820; box-shadow: 0 4px 18px #7acc0015;
  transform: translateY(-1px);
}
.zf-upg-card.affordable {
  border-color: #385800;
  box-shadow: 0 0 12px #5a9a0028, inset 0 1px 0 #2a4800;
}
.zf-upg-card:disabled { opacity: .38; cursor: not-allowed; }
.zf-upg-name {
  font-family: 'Cinzel', serif; font-size: 11px; color: #8a7858; letter-spacing: .5px;
}
.zf-upg-card.affordable .zf-upg-name { color: #88cc00; }
.zf-upg-desc { font-size: 9px; color: #8a7858; margin-top: 2px; }
.zf-upg-cost {
  font-size: 10px; color: #807048; margin-top: 4px;
  font-family: 'Share Tech Mono', monospace;
}
.zf-upg-card.affordable .zf-upg-cost { color: #cc8800; }

/* ── Quest cards ── */
.zf-quest-pending {
  padding: 10px 12px; margin-bottom: 6px;
  background: linear-gradient(135deg, #1c0e08, #130904);
  border: 1px solid #2e1a08; border-radius: 5px;
  box-shadow: inset 0 1px 0 #2a1408, 0 2px 6px #00000033;
}
.zf-quest-name {
  font-family: 'Cinzel', serif; font-size: 11px; color: #dd8833; letter-spacing: .5px;
}
.zf-quest-desc { font-size: 9px; color: #9a6034; margin-top: 2px; line-height: 1.6; }
.zf-quest-reward {
  font-size: 10px; color: #ff7711; margin-top: 4px;
  font-family: 'Share Tech Mono', monospace; text-shadow: 0 0 6px #cc440033;
}
.zf-quest-done {
  padding: 4px 10px; margin-bottom: 3px;
  background: #110800; border: 1px solid #3a2818; border-radius: 4px;
  font-size: 9px; color: #9a6040; display: flex; gap: 5px; align-items: center;
}
.zf-quest-bar {
  height: 3px; background: #14120e; border-radius: 2px;
  margin-bottom: 10px; overflow: hidden;
}
.zf-quest-bar-fill {
  height: 100%; background: linear-gradient(90deg, #3a6600, #7acc00);
  transition: width .6s; box-shadow: 0 0 6px #5a9a0044;
}

/* ── Log entries ── */
.zf-log-entry {
  padding: 14px 16px;
  background: linear-gradient(135deg, #160f08, #0f0a06);
  border: 1px solid #2e2410; border-radius: 5px; margin-bottom: 10px;
  border-left: 3px solid #4a6800;
  box-shadow: inset 0 0 20px #00000044, 0 2px 8px #00000033;
}
.zf-log-title {
  font-family: 'Cinzel', serif; font-size: 11px; color: #dd9944;
  letter-spacing: .5px; margin-bottom: 6px;
}
.zf-log-text {
  font-size: 10px; color: #cc8855; line-height: 1.75; font-style: italic;
}
.zf-log-prestige { border-left-color: #9944dd88; }
.zf-log-prestige .zf-log-title { color: #cc88ff; }
.zf-log-prestige .zf-log-text { color: #aa77cc; }
.zf-log-cycle {
  font-size: 8px; color: #9944dd; font-family: 'Cinzel', serif;
  letter-spacing: 2px; margin-bottom: 3px;
}

/* ── Stats rows ── */
.zf-stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; border-bottom: 1px solid #3a2818;
}
.zf-stat-row-label {
  font-size: 9px; color: #aa9860; font-family: 'Cinzel', serif; letter-spacing: .5px;
}
.zf-stat-row-value {
  font-size: 11px; font-family: 'Share Tech Mono', monospace;
}
.zf-section-title {
  font-size: 9px; color: #aa9860; letter-spacing: 2px;
  font-family: 'Cinzel', serif; margin: 14px 0 8px;
}

/* ── SPS breakdown bar ── */
.zf-sps-bar {
  height: 3px; background: #1a0c04; border-radius: 1px; overflow: hidden; margin-top: 2px;
}
.zf-sps-bar-fill {
  height: 100%; background: linear-gradient(90deg, #882200, #ff4400);
  transition: width .4s;
}

/* ── Synergy network ── */
.zf-synergy-row {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 0; border-bottom: 1px solid #1a0c04;
}
.zf-synergy-row.inactive { opacity: .3; }

/* ── Achievement grid ── */
.zf-ach-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.zf-ach-item {
  width: calc(50% - 3px); padding: 8px 10px;
  border-radius: 4px; transition: border-color .2s;
}
.zf-ach-done {
  background: linear-gradient(135deg, #221408, #180e04);
  border: 1px solid #cc9840;
}
.zf-ach-locked {
  background: #0e0800; border: 1px solid #5a4a28; opacity: .55;
}
.zf-ach-emoji { font-size: 18px; margin-bottom: 3px; }
.zf-ach-name {
  font-family: 'Cinzel', serif; font-size: 9px; letter-spacing: .3px; margin-bottom: 2px;
}
.zf-ach-desc { font-size: 8px; color: #cc9044; line-height: 1.4; }

/* ── Plague Core panel ── */
.zf-pc-header {
  padding: 10px 12px;
  background: linear-gradient(135deg, #200510, #140208);
  border: 1px solid #660a22; border-radius: 6px;
  margin-bottom: 12px; text-align: center;
}
.zf-pc-count {
  font-size: 22px; color: #ff88aa;
  font-family: 'Share Tech Mono', monospace;
  margin-top: 4px; text-shadow: 0 0 12px #ff003355;
}
.zf-pc-btn {
  width: 100%; padding: 10px 12px; margin-bottom: 6px;
  text-align: left; border-radius: 4px;
  color: #cc6688; transition: background .15s, border-color .15s, box-shadow .15s;
  touch-action: manipulation; cursor: pointer;
}
.zf-pc-btn.owned {
  background: linear-gradient(135deg, #200408, #140204);
  border: 1px solid #881a33; cursor: default;
}
.zf-pc-btn.can-buy {
  background: linear-gradient(135deg, #2a0810, #1a0408);
  border: 1px solid #cc3355;
  box-shadow: 0 0 12px #aa002233;
}
.zf-pc-btn.locked {
  background: #100204; border: 1px solid #2a0810; cursor: not-allowed;
}

/* ── Prestige button ── */
.zf-prestige-btn {
  width: 100%; padding: 12px 16px;
  background: linear-gradient(135deg, #1e0824, #120418);
  border: 1px solid #7733bb; border-radius: 5px; color: #cc99ff;
  cursor: pointer; font-family: 'Cinzel', serif; font-size: 12px;
  letter-spacing: 1.5px;
  transition: background .25s, border-color .25s, box-shadow .25s, transform .1s;
  box-shadow: 0 0 18px #55009944, inset 0 1px 0 #331060;
}
.zf-prestige-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #30103a, #1e0628);
  border-color: #aa55ee; color: #ddbbff;
  box-shadow: 0 8px 28px #77009966, inset 0 1px 0 #4a1880;
  transform: translateY(-1px);
}
.zf-prestige-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ── Prestige modal ── */
.zf-prestige-modal {
  position: absolute; inset: 0; background: #000000cc;
  z-index: 999; display: flex; align-items: center; justify-content: center; padding: 16px;
}
.zf-prestige-card {
  background: linear-gradient(135deg, #1e0508, #120204);
  border: 1px solid #881a22; border-radius: 10px; padding: 28px 24px;
  max-width: 400px; width: 100%;
  box-shadow: 0 0 60px #88000044, inset 0 1px 0 #441018;
  text-align: center; font-family: 'Cinzel', serif;
}

/* ── Golden tombstone ── */
.zf-golden-wrap {
  position: absolute; cursor: pointer;
  animation: zf-goldenPulse 1.1s ease-in-out infinite;
  z-index: 50; touch-action: manipulation; user-select: none;
  filter: drop-shadow(0 0 18px #ffcc0099) drop-shadow(0 0 6px #ff8800aa);
}

/* ── Buff bar ── */
.zf-buff-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 5px; z-index: 10;
}
.zf-buff-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background-size: 200% 100%;
  animation: zf-shimmer .8s linear infinite;
  transition: width 0.25s linear;
}
.zf-buff-label {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  background: #080503; border-radius: 5px; padding: 3px 14px;
  font-size: 9px; font-family: 'Cinzel', serif;
  white-space: nowrap; letter-spacing: 1.5px;
}

/* ── Ticker ── */
.zf-ticker {
  background: #090704; border-top: 1px solid #2a2818;
  height: 24px; flex-shrink: 0;
  display: flex; align-items: stretch;
  box-shadow: 0 -2px 8px #000000aa;
}
.zf-ticker-label {
  flex-shrink: 0; width: 86px; background: #090704;
  border-right: 1px solid #3a3828;
  display: flex; align-items: center; padding-left: 10px; z-index: 2;
}
.zf-ticker-label span {
  font-size: 8px; color: #77bb00; font-family: 'Cinzel', serif;
  letter-spacing: .8px; white-space: nowrap; text-shadow: 0 0 8px #55990055;
}
.zf-ticker-scroll {
  flex: 1; overflow: hidden; position: relative;
}
.zf-ticker-text {
  position: absolute; top: 50%; white-space: nowrap;
  font-family: 'Share Tech Mono', monospace; font-size: 9px;
  color: #a8a070; letter-spacing: .3px;
  animation: zf-tickerScroll 24s linear infinite;
  will-change: transform;
}

/* ── Particles ── */
.zf-particle-overlay {
  position: absolute; inset: 0; pointer-events: none; z-index: 200;
}
.zf-particle {
  position: absolute; font-family: 'Cinzel', serif; font-size: 18px;
  font-weight: bold; color: #66ff00; white-space: nowrap;
  text-shadow: 0 0 10px #44cc00, 0 0 20px #44cc00;
  animation: zf-floatUp .9s ease-out forwards;
  transform: translate(-50%, -50%);
}

/* ── Notifications ── */
.zf-notifs {
  position: absolute; bottom: 14px; right: 14px;
  display: flex; flex-direction: column; gap: 5px;
  z-index: 500; max-width: 310; pointer-events: none;
}
.zf-notif {
  padding: 10px 16px;
  background: linear-gradient(135deg, #16130d, #100e09);
  border: 1px solid #3a3218; border-radius: 5px; font-size: 11px;
  box-shadow: 0 6px 28px #00000077, 0 0 0 1px #2a2410, inset 0 1px 0 #2e2a16;
  animation: zf-notifIn .3s cubic-bezier(.175,.885,.32,1.275);
  font-family: 'Share Tech Mono', monospace;
}

/* ── Embers ── */
.zf-embers {
  position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.zf-ember {
  position: absolute; bottom: -10px; border-radius: 50%;
}

/* ── Background layers ── */
.zf-bg-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,220,80,.012) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,220,80,.012) 1px, transparent 1px);
  background-size: 36px 36px;
}
.zf-bg-vignette {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(2,2,1,.92) 100%);
}
.zf-bg-toxic {
  position: absolute; bottom: 0; left: 0; right: 0; height: 30%; z-index: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(60,120,0,.06), transparent);
}
.zf-screen-flash {
  position: absolute; inset: 0; z-index: 100; pointer-events: none;
  animation: zf-screenFlash .7s ease-out forwards;
}

/* ── Deployed count ── */
.zf-deployed {
  font-size: 8px; color: #aaa870; letter-spacing: 1.5px;
  padding: 5px 14px; border-bottom: 1px solid #2a2818;
  background: #090806; flex-shrink: 0;
  font-family: 'Cinzel', serif;
  display: flex; align-items: center; justify-content: space-between;
}
.zf-deployed-count { color: #99cc00; font-family: 'Share Tech Mono', monospace; }

/* ── Left tab bar ── */
.zf-left-tabs {
  display: flex; border-bottom: 1px solid #1f1d10;
  background: #090806; flex-shrink: 0;
}
.zf-left-tab {
  flex: 1; padding: 7px 4px;
  background: transparent; border: none;
  border-bottom: 2px solid transparent; border-top: none;
  cursor: pointer; color: #aaa870;
  font-family: 'Cinzel', serif; font-size: 9px; letter-spacing: 1.2px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  transition: color .15s, background .15s;
}
.zf-left-tab.active {
  background: linear-gradient(to bottom, #0e1008, #0a0c06);
  border-bottom-color: #5a9a00; color: #88cc00;
}

/* ── Zone panel ── */
.zf-zone-header {
  padding: 10px 12px; position: relative;
}
.zf-zone-title {
  font-family: 'Cinzel', serif; font-size: 12px; letter-spacing: .5px;
}
.zf-zone-unlock-btn {
  width: 100%; padding: 7px;
  border-radius: 4px;
  font-family: 'Cinzel', serif; font-size: 10px; letter-spacing: 1px;
  cursor: pointer; transition: all .2s;
}
.zf-zone-bldg-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; width: 100%;
  border-top: 1px solid #1a1206;
  background: transparent; border-left: none; border-right: none; border-bottom: none;
  cursor: pointer; text-align: left;
  transition: background .15s;
}
.zf-zone-bldg-row.can-buy {
  background: linear-gradient(135deg, #12100a, #0d0b08);
}

/* ── Keyframes ── */
@keyframes zf-floatUp {
  0% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-240%) scale(1.8); }
}
@keyframes zf-ember {
  0% { transform: translateY(110vh) rotate(0deg) scale(0.5); opacity: 0; }
  5% { opacity: 1; }
  90% { opacity: .15; }
  100% { transform: translateY(-10vh) rotate(720deg) scale(1.2); opacity: 0; }
}
@keyframes zf-tombFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes zf-auroraRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes zf-goldenPulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
@keyframes zf-shimmer {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}
@keyframes zf-notifIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes zf-badgePop {
  0% { transform: scale(.2); }
  65% { transform: scale(1.4); }
  100% { transform: scale(1); }
}
@keyframes zf-tickerScroll {
  from { transform: translate(100%,-50%); }
  to { transform: translate(-200%,-50%); }
}
@keyframes zf-screenFlash {
  0% { opacity: .8; }
  100% { opacity: 0; }
}
@keyframes zf-torchFlicker {
  0%,100% { opacity: 1; }
  50% { opacity: .7; }
}
@keyframes zf-groundMist {
  0%,100% { opacity: .22; transform: scaleX(1); }
  50% { opacity: .38; transform: scaleX(1.06); }
}
@keyframes zf-wispOrbit {
  0% { transform: rotate(0deg) translateX(140px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(140px) rotate(-360deg); }
}
@keyframes zf-wispPulse {
  0%,100% { opacity: .18; transform: scale(.7); }
  50% { opacity: .55; transform: scale(1.15); }
}

/* ── Mobile layout ── */
@media (max-width: 767px) {
  .zf-main { flex-direction: column; }
  .zf-left, .zf-right { display: none; }
  .zf-center { flex: 1; }
  .zf-mobile-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
  .zf-mobile-panel-scroll {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .zf-mobile-tabs {
    display: flex; background: linear-gradient(180deg, #0e0c08, #090805);
    border-top: 1px solid #1f1d10; flex-shrink: 0;
    box-shadow: 0 -2px 12px #000000aa;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .zf-mobile-tabs::-webkit-scrollbar { display: none; }
  .zf-mobile-tab {
    flex: 0 0 auto; min-width: 52px; padding: 9px 6px 7px;
    background: transparent; border: none;
    border-top: 2px solid transparent;
    cursor: pointer; color: #706848;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    touch-action: manipulation; transition: color .15s, background .15s;
    position: relative;
  }
  .zf-mobile-tab.active {
    background: linear-gradient(to bottom, #141209, #0d0b07);
    border-top-color: #5a9a00; color: #88cc00;
  }
  .zf-mobile-tab-icon { font-size: 16px; line-height: 1; position: relative; }
  .zf-mobile-tab-label { font-size: 7px; letter-spacing: .8px; font-family: 'Cinzel', serif; }
  .zf-stat-val { font-size: 15px; }
  .zf-notifs { bottom: 70px; right: 8px; left: 8px; }
  .zf-vol-slider { width: 40px; min-width: 25px; }
  .zf-vol-text { display: none; }
  .zf-toolbar { padding: 3px 6px; gap: 4px; }
  .zf-toolbar-close { padding: 2px 8px; font-size: 9px; }
}

/* ── Desktop: show left/right, hide mobile elements ── */
@media (min-width: 768px) {
  .zf-mobile-content { display: none !important; }
  .zf-mobile-tabs { display: none !important; }
}

/* ── Scrollbar ── */
.zf-overlay ::-webkit-scrollbar { width: 5px; }
.zf-overlay ::-webkit-scrollbar-track { background: #080604; }
.zf-overlay ::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #3a2810, #2a1c08);
  border-radius: 3px; border: 1px solid #1a1006;
}
.zf-overlay ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #5a4020, #3a2810);
}
