/* ============================================================================
   STYLE.CSS - ESTÉTICA PIXEL ART 16-BIT / ARCADE MODERNO
   ============================================================================ */
:root {
  --bg-main: #10121c;
  --bg-panel: #1a1e30;
  --bg-panel-2: #242942;
  --border-dark: #06070c;
  --border-light: #4a5580;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --gold: #facc15;
  --emerald: #10b981;
  --emerald-dark: #047857;
  --coral: #ef4444;
  --purple: #a855f7;
  --cyan: #38bdf8;
  --era-glow-1: rgba(250, 204, 21, 0.14);
  --era-glow-2: rgba(56, 189, 248, 0.12);
  --era-accent: #facc15;
  --nav-h: 64px;
  --top-h: 64px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

input {
  user-select: text;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-main);
  color: var(--text-main);
  font-family: 'Courier New', 'Lucida Console', monospace;
  overflow: hidden;
  image-rendering: pixelated;
}

canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

#ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--bg-main);
  background-image:
    radial-gradient(circle at 18% 22%, var(--era-glow-1), transparent 45%),
    radial-gradient(circle at 82% 78%, var(--era-glow-2), transparent 45%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 16px 16px, 16px 16px;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #090b12; border-left: 2px solid #000; }
::-webkit-scrollbar-thumb { background: var(--border-light); border: 2px solid #000; }

#app {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
}

/* UTILIDADES */
.txt-gold { color: var(--gold); }
.txt-emerald { color: var(--emerald); }
.txt-cyan { color: var(--cyan); }
.txt-purple { color: #d8b4fe; }
.txt-amber { color: #f59e0b; }
.txt-orange { color: #fb923c; }
.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.stack-sm { display: flex; flex-direction: column; gap: 7px; }
.stack-md { display: flex; flex-direction: column; gap: 10px; }
.section-gap { margin-bottom: 12px; }

/* BARRA SUPERIOR 16-BIT */
#topbar {
  height: var(--top-h);
  min-height: var(--top-h);
  background: #141726;
  border-bottom: 4px solid #000;
  box-shadow: inset 0 -2px 0 var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  gap: 8px;
  z-index: 40;
}

.top-group { display: flex; align-items: center; gap: 8px; }

.brand-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-panel);
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000, inset 2px 2px 0 var(--border-light);
  padding: 4px 8px;
}

.level-pill {
  background: var(--gold);
  color: #000;
  border: 2px solid #000;
  font-weight: 900;
  font-size: 11px;
  padding: 2px 6px;
}

.rank-info { display: flex; flex-direction: column; line-height: 1.1; }
.rank-title { font-size: 11px; font-weight: 900; white-space: nowrap; }

.xp-bar-wrap {
  width: 76px;
  height: 6px;
  background: #06070c;
  border: 2px solid #000;
  margin-top: 3px;
}
.xp-bar-fill {
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(90deg, var(--gold) 0 6px, #ca8a04 6px 8px);
  transition: width 0.25s steps(10);
}

.money-box {
  display: flex;
  flex-direction: column;
  background: #13211b;
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000, inset 2px 2px 0 var(--emerald-dark);
  padding: 3px 10px;
  min-width: 115px;
  transition: transform 0.12s steps(2);
}
.money-box.money-pop { transform: scale(1.1); background: #1a3829; }
.money-val { font-size: 15px; font-weight: 900; color: var(--gold); }
.money-rate { font-size: 10.5px; color: var(--emerald); font-weight: 900; }

.streak-pill {
  display: none;
  align-items: center;
  gap: 4px;
  background: #431407;
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000, inset 2px 2px 0 #f97316;
  color: #fed7aa;
  padding: 4px 8px;
  font-size: 11.5px;
  font-weight: 900;
}
.streak-pill.active { display: inline-flex; }

.meter-box { display: flex; flex-direction: column; min-width: 92px; gap: 3px; }
.meter-label { display: flex; justify-content: space-between; font-size: 10.5px; font-weight: 900; color: var(--text-muted); }
.meter-track { width: 100%; height: 9px; background: #06070c; border: 2px solid #000; }
.meter-fill { height: 100%; width: 0%; transition: width 0.25s steps(10); }

.top-actions { display: flex; align-items: center; gap: 5px; }

.icon-btn {
  background: var(--bg-panel-2);
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000, inset 2px 2px 0 var(--border-light);
  color: var(--text-main);
  height: 34px;
  min-width: 34px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
}
.icon-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }
.icon-btn.prestige-ready {
  background: #3b0764;
  box-shadow: 3px 3px 0 #000, inset 2px 2px 0 var(--purple);
  color: #f3e8ff;
}

/* NAVEGACIÓN */
#workspace { display: flex; flex: 1; overflow: hidden; position: relative; }

#nav {
  background: #141726;
  border-top: 4px solid #000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: var(--nav-h);
  min-height: var(--nav-h);
  z-index: 35;
  order: 2;
}

.nav-btn {
  flex: 1;
  height: 100%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  position: relative;
}
.nav-px-ico { font-size: 19px; line-height: 1; }
.nav-btn.active {
  color: var(--era-accent);
  background: #1f243b;
  box-shadow: inset 0 3px 0 var(--era-accent);
}

.nav-badge {
  position: absolute;
  top: 5px;
  right: calc(50% - 22px);
  background: var(--emerald);
  color: #000;
  border: 2px solid #000;
  font-size: 9px;
  font-weight: 900;
  padding: 0 4px;
  display: none;
}
.nav-badge.badge-gold { background: var(--gold); color: #000; }

@media (min-width: 900px) {
  #workspace { flex-direction: row; }
  #nav {
    order: 0;
    flex-direction: column;
    width: 92px;
    height: 100%;
    border-top: none;
    border-right: 4px solid #000;
    justify-content: flex-start;
    padding-top: 10px;
    gap: 8px;
  }
  .nav-btn { flex: 0 0 auto; width: 76px; height: 64px; border: 3px solid transparent; }
  .nav-btn.active { border: 3px solid #000; box-shadow: 3px 3px 0 #000, inset 3px 0 0 var(--era-accent); }
}

@media (max-width: 760px) {
  .rank-info, .meter-box { display: none; }
  .money-box { min-width: 96px; padding: 3px 7px; }
  .money-val { font-size: 13.5px; }
  .btn-txt-hide { display: none; }
}

#main-content { flex: 1; overflow: hidden; position: relative; display: flex; flex-direction: column; }
.tab-pane { display: none; width: 100%; height: 100%; overflow-y: auto; padding: 14px; }
.tab-pane.active { display: block; }
.tab-pane.no-pad { padding: 0; overflow: hidden; }

/* TARJETAS Y BOTONES PIXEL ART */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }

.card {
  background: var(--bg-panel);
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000, inset 2px 2px 0 var(--border-light);
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-compact { padding: 10px; }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-title { font-size: 14px; font-weight: 900; display: flex; align-items: center; gap: 6px; text-transform: uppercase; }
.muted { color: var(--text-muted); font-size: 11.5px; }

.btn {
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000, inset 2px 2px 0 rgba(255, 255, 255, 0.2);
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--text-main);
  background: var(--bg-panel-2);
  text-transform: uppercase;
}
.btn:hover:not(:disabled) { filter: brightness(1.1); }
.btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }
.btn:disabled { opacity: 0.42; cursor: not-allowed; }

.btn-gold { background: var(--gold); color: #000; box-shadow: 3px 3px 0 #000, inset 2px 2px 0 #fef08a; }
.btn-emerald { background: var(--emerald); color: #000; box-shadow: 3px 3px 0 #000, inset 2px 2px 0 #6ee7b7; }
.btn-coral { background: var(--coral); color: #fff; box-shadow: 3px 3px 0 #000, inset 2px 2px 0 #fca5a5; }
.btn-purple { background: var(--purple); color: #fff; box-shadow: 3px 3px 0 #000, inset 2px 2px 0 #e9d5ff; }
.btn-cyan { background: var(--cyan); color: #000; box-shadow: 3px 3px 0 #000, inset 2px 2px 0 #bae6fd; }
.btn-sm { padding: 5px 9px; font-size: 11px; }
.btn-xs { padding: 3px 6px; font-size: 10px; }
.btn-lg { padding: 11px 14px; font-size: 13.5px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border: 2px solid #000;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.tag-common { background: #334155; color: #f1f5f9; }
.tag-rare { background: #0c4a6e; color: #7dd3fc; }
.tag-epic { background: #4c1d95; color: #e9d5ff; }
.tag-relic { background: #713f12; color: var(--gold); }

/* HQ Y BANNERS */
.bailout-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: #422006;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000, inset 2px 2px 0 var(--gold);
  padding: 10px 13px;
  margin-bottom: 12px;
}
.bailout-banner.visible { display: flex; }

.hero-banner {
  background: #1d2238;
  border: 4px solid #000;
  box-shadow: 5px 5px 0 #000, inset 2px 2px 0 var(--border-light);
  padding: 15px;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.era-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.brand-kicker { font-size: 11px; font-weight: 900; color: var(--era-accent); }
.hero-title { margin: 4px 0; font-size: 18px; }
.hero-desc { margin: 0; max-width: 560px; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.mission-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: #111421;
  border: 2px solid #000;
  padding: 8px 10px;
}
.mission-row.ready { border-color: var(--emerald); background: #0f2920; }

.stat-row { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 2px dashed #262c44; font-size: 12px; }
.stat-row:last-child { border-bottom: none; }

.relic-slot {
  background: #111421;
  border: 2px dashed var(--border-light);
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
  min-height: 100px;
  justify-content: center;
}
.relic-slot.filled { border: 3px solid #000; box-shadow: 3px 3px 0 #000, inset 2px 2px 0 var(--gold); background: #2b2108; }

/* SELECTOR DE SUBASTAS */
.guide-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  background: #131726;
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
  padding: 7px 10px;
  margin-bottom: 12px;
  font-size: 11px;
}
.guide-chip { background: #1e243a; border: 2px solid #000; padding: 2px 7px; font-weight: 900; }

.selector-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.selector-title { margin: 0; font-size: 17px; text-transform: uppercase; }

.location-card {
  background: var(--bg-panel);
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000, inset 2px 2px 0 var(--border-light);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 9px;
}
.location-card.locked { opacity: 0.55; }
.location-card.port-card { background: #112438; box-shadow: 4px 4px 0 #000, inset 2px 2px 0 var(--cyan); }

/* SALA DE SUBASTAS EN VIVO: 35% / 65% */
#auction-arena {
  display: none;
  grid-template-columns: 35% minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 10px;
  height: 100%;
}
#auction-arena.active { display: grid; }
@media (max-width: 900px) {
  #auction-arena { grid-template-columns: 1fr; grid-template-rows: auto auto auto; height: auto; }
  .arena-right { order: 1; }
  .arena-left { order: 2; }
}

.arena-top {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg-panel);
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
  padding: 8px 12px;
}
.arena-title-group { display: flex; align-items: center; gap: 10px; }
.arena-loc-name { font-weight: 900; font-size: 14px; }

.arena-left { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow-y: auto; }
.arena-right { display: flex; flex-direction: column; gap: 8px; min-height: 0; }

.auction-summary-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sum-cell { background: #111422; border: 2px solid #000; box-shadow: 2px 2px 0 #000; padding: 5px 7px; display: flex; flex-direction: column; }
.sum-lbl { font-size: 10px; color: var(--text-muted); font-weight: 900; }
.sum-val { font-size: 12px; font-weight: 900; }

.event-banner { display: none; align-items: center; gap: 6px; background: #3b0764; border: 2px solid var(--gold); padding: 4px 9px; font-size: 11px; font-weight: 900; }
.event-banner.active { display: flex; }

.phase-pill { padding: 4px 10px; border: 2px solid #000; font-size: 11px; font-weight: 900; }
.phase-inspect { background: var(--cyan); color: #000; }
.phase-bid { background: var(--gold); color: #000; }
.phase-result { background: var(--emerald); color: #000; }
.phase-paused { background: #f59e0b; color: #000; }

.canvas-wrap {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 315px;
  background: #06070c;
  border: 4px solid #000;
  box-shadow: 4px 4px 0 #000;
  overflow: hidden;
  touch-action: none;
}
@media (max-width: 900px) { .canvas-wrap { min-height: 270px; height: 280px; flex: none; } }
#warehouse-canvas { width: 100%; height: 100%; display: block; cursor: crosshair; }

.canvas-overlay-info { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; justify-content: space-between; pointer-events: none; gap: 6px; z-index: 4; }
.hud-chip { background: rgba(10, 12, 20, 0.9); border: 2px solid #000; padding: 4px 8px; font-size: 11px; font-weight: 900; }

.notes-strip {
  background: var(--bg-panel);
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
  padding: 6px 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
}
.note-slot {
  width: 44px;
  height: 42px;
  background: #0d101b;
  border: 2px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.note-slot.seen { border-color: var(--emerald); background: #10261e; }
.note-slot.scanned { border-color: var(--gold); }
.note-cond-badge { position: absolute; top: -4px; right: -4px; font-size: 10px; background: #000; padding: 0 2px; }

.skills-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
@media (max-width: 600px) { .skills-bar { grid-template-columns: repeat(2, 1fr); } }
.skill-act-btn {
  background: var(--bg-panel-2);
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
  padding: 6px 8px;
  color: var(--text-main);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  position: relative;
  overflow: hidden;
  text-align: left;
}
.skill-act-btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }
.skill-act-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.skill-act-cd { position: absolute; bottom: 0; left: 0; top: 0; background: rgba(0, 0, 0, 0.65); pointer-events: none; }

.panel-mini-title { font-weight: 900; font-size: 12.5px; }

.auctioneer-box { background: #121524; border: 2px solid #000; padding: 6px 8px; display: flex; align-items: center; gap: 8px; }
.auctioneer-avatar { width: 32px; height: 32px; background: var(--gold); border: 2px solid #000; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.auctioneer-avatar.shout { transform: scale(1.15); }
.auctioneer-text-wrap { min-width: 0; flex: 1; }
.auctioneer-kicker { font-size: 9.5px; font-weight: 900; color: var(--gold); text-transform: uppercase; }
.auctioneer-speech { font-size: 11.5px; font-weight: 900; }

.rivals-list { display: grid; grid-template-columns: 1fr; gap: 5px; }
.rival-card { background: #121524; border: 2px solid #000; padding: 5px 7px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.rival-card.leading { border-color: var(--coral); background: #2c1015; }
.rival-card.frozen { border-color: var(--cyan); }
.rival-card.out { opacity: 0.35; }
.rival-avatar { width: 26px; height: 26px; background: var(--bg-panel-2); border: 2px solid #000; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }

.bid-controls { background: var(--bg-panel); border: 3px solid #000; box-shadow: 4px 4px 0 #000; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.bid-readout-row { display: flex; justify-content: space-between; align-items: flex-end; }
.bid-thermo-row { display: flex; align-items: center; gap: 6px; }
.big-bid-num { font-size: 21px; font-weight: 900; color: var(--gold); }
.bid-leader-col { text-align: right; }
.leader-name { font-size: 11.5px; font-weight: 900; color: var(--emerald); }
.bid-btn-row { display: flex; gap: 6px; }

.custom-bid-box { background: #111421; border: 2px solid #000; padding: 7px; display: flex; flex-direction: column; gap: 5px; }
.custom-bid-head { display: flex; justify-content: space-between; font-size: 10.5px; font-weight: 900; }
.custom-bid-row { display: flex; gap: 6px; align-items: center; }
.quick-mult-row { display: flex; flex-wrap: wrap; gap: 4px; }

.num-input {
  width: 100%;
  background: #06070c;
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0 #1f243b;
  color: var(--gold);
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 900;
  font-family: inherit;
  outline: none;
}
.range-input { width: 100%; accent-color: var(--gold); cursor: pointer; }

.gavel-track { width: 100%; height: 10px; background: #06070c; border: 2px solid #000; }
.gavel-fill { height: 100%; width: 0%; background: repeating-linear-gradient(90deg, var(--gold) 0 8px, #eab308 8px 10px); }
.gavel-shake { animation: gavelShake 0.35s steps(4); }
@keyframes gavelShake { 0%,100%{transform:translate(0,0)} 25%{transform:translate(-4px,2px)} 75%{transform:translate(4px,-2px)} }
.result-stack { display: none; flex-direction: column; gap: 8px; }

/* TIENDA POR SALAS */
.shop-locked-card { max-width: 540px; margin: 30px auto; text-align: center; padding: 24px; }
.shop-locked-ico { font-size: 44px; }
.shop-unlocked-wrap { display: none; flex-direction: column; gap: 14px; }
.shop-top-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.shop-room-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.shop-room-tabs .btn.active-room { background: var(--gold); color: #000; box-shadow: 3px 3px 0 #000, inset 2px 2px 0 #fef08a; }
.shop-tags-row { display: flex; gap: 6px; flex-wrap: wrap; }
.shop-sub-title { margin: 0 0 8px; font-size: 14px; text-transform: uppercase; }

.vip-contract-card { background: #241438; border: 3px solid #000; box-shadow: 4px 4px 0 #000, inset 2px 2px 0 var(--gold); padding: 11px 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.vip-contract-left { display: flex; align-items: center; gap: 10px; }
.vip-contract-canvas { background: #0c0e18; border: 2px solid #000; }

.shop-stage-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 12px; }
@media (max-width: 850px) { .shop-stage-grid { grid-template-columns: 1fr; } }

.shop-stage-canvas { width: 100%; height: 195px; background: #0a0c14; border: 3px solid #000; display: block; touch-action: none; }

.speech-bubble-px { background: #f8fafc; color: #090b12; border: 3px solid #000; box-shadow: 3px 3px 0 #000; padding: 9px 11px; font-size: 12px; font-weight: 900; line-height: 1.35; }

.seal-pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seal-pill { background: #0d101b; border: 2px solid #000; padding: 6px; text-align: center; font-size: 10.5px; font-weight: 900; color: var(--text-muted); }
.seal-pill.found { background: #102a1f; border-color: var(--emerald); color: var(--emerald); }

.item-card { background: var(--bg-panel); border: 3px solid #000; box-shadow: 3px 3px 0 #000; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.item-card.selected-shop-item { box-shadow: 3px 3px 0 #000, inset 0 0 0 2px var(--gold); }
.item-card.relic-border { box-shadow: 3px 3px 0 #000, inset 2px 2px 0 var(--gold); }

/* ÁRBOL DE HABILIDADES */
#tab-skills { position: relative; background: #0c0e17; overflow: hidden; }
#tree-viewport { width: 100%; height: 100%; position: relative; overflow: hidden; touch-action: none; cursor: grab; }
#tree-viewport:active { cursor: grabbing; }
#tree-world {
  position: absolute;
  top: 0; left: 0; width: 2400px; height: 1800px; transform-origin: 0 0;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
}
#tree-lines { position: absolute; inset: 0; width: 2400px; height: 1800px; pointer-events: none; }

.tree-node {
  position: absolute;
  width: 74px; height: 74px; margin-left: -37px; margin-top: -37px;
  background: #181c2e; border: 3px solid #000; box-shadow: 4px 4px 0 #000, inset 2px 2px 0 #334155;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  cursor: pointer; text-align: center; padding: 4px;
}
.tree-node.selected { box-shadow: 4px 4px 0 #000, 0 0 0 3px #fff; z-index: 6; }
.tree-node.unlocked { background: #102a22; box-shadow: 4px 4px 0 #000, inset 2px 2px 0 var(--emerald); }
.tree-node.affordable { box-shadow: 4px 4px 0 #000, inset 2px 2px 0 var(--gold); }
.tree-node.prestige-node { background: #26133b; }
.tree-node.prestige-node.affordable { box-shadow: 4px 4px 0 #000, inset 2px 2px 0 var(--purple); }
.tree-node.locked { opacity: 0.42; }
.node-ico { font-size: 21px; line-height: 1; }
.node-lvl { font-size: 10px; font-weight: 900; color: var(--text-muted); }
.tree-node.unlocked .node-lvl { color: var(--emerald); }

.tree-controls { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 20; }

#node-inspector {
  position: absolute;
  bottom: 10px; left: 10px; right: 10px; max-width: 470px; margin: 0 auto;
  background: var(--bg-panel); border: 3px solid #000; box-shadow: 4px 4px 0 #000, inset 2px 2px 0 var(--border-light);
  padding: 11px; z-index: 25; display: flex; flex-direction: column; gap: 6px;
}
.insp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.insp-title { font-weight: 900; font-size: 14px; }
.insp-desc { font-size: 12px; color: #cbd5e1; }
.insp-warn { display: none; font-size: 11px; font-weight: 900; color: #000; background: var(--gold); border: 2px solid #000; padding: 4px 7px; }
.insp-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 2px; }
.insp-eff { font-size: 11.5px; font-weight: 900; color: var(--emerald); }

/* ÁLBUM */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: 8px; max-height: 55vh; overflow-y: auto; padding-right: 4px; }
.album-card { background: #111421; border: 2px solid #000; padding: 7px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.album-card.discovered { border-color: var(--emerald); background: #0f261e; }
.album-card.undiscovered { opacity: 0.4; filter: brightness(0.3); }

/* SPOTLIGHT Y MARCOS */
#spotlight-ring { position: fixed; pointer-events: none; z-index: 64; border: 4px solid var(--gold); box-shadow: 0 0 0 9999px rgba(4, 5, 10, 0.55); display: none; }

#marcos-tutorial {
  position: fixed;
  bottom: 76px;
  right: 12px;
  max-width: 375px;
  width: calc(100% - 24px);
  background: #1a2036;
  border: 4px solid #000;
  box-shadow: 5px 5px 0 #000, inset 2px 2px 0 var(--gold);
  padding: 12px;
  z-index: 68;
  display: none;
  flex-direction: column;
  gap: 8px;
}
#marcos-tutorial.visible { display: flex; }
@media (min-width: 900px) { #marcos-tutorial { bottom: 16px; right: 16px; } }
#marcos-tutorial.minimized { width: auto; max-width: 220px; padding: 8px 10px; }
#marcos-tutorial.minimized .marcos-body { display: none; }

.marcos-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.marcos-id { display: flex; align-items: center; gap: 8px; }
.marcos-avatar { width: 32px; height: 32px; background: var(--gold); border: 2px solid #000; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.marcos-name { font-weight: 900; font-size: 12.5px; color: var(--gold); }
.marcos-step { font-size: 10px; }
.marcos-win-btns { display: flex; gap: 4px; }
.marcos-body { display: flex; flex-direction: column; gap: 8px; }
.marcos-text { font-size: 12px; line-height: 1.45; color: #e2e8f0; }
.marcos-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; }

/* ADMIN, CONFETI, FLOTANTES, MODALES */
#admin-bar { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); background: #141726; border: 3px solid var(--coral); box-shadow: 4px 4px 0 #000; padding: 7px 10px; z-index: 85; display: none; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 95vw; }
#admin-bar.open { display: flex; }
.admin-label { color: var(--coral); font-size: 12px; }

#confetti-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 95; width: 100%; height: 100%; }
#float-layer { position: fixed; inset: 0; pointer-events: none; z-index: 100; overflow: hidden; }
.float-txt { position: absolute; font-weight: 900; font-size: 14px; text-shadow: 2px 2px 0 #000; animation: floatUp 1.1s steps(14) forwards; white-space: nowrap; }
@keyframes floatUp { 0%{opacity:1;transform:translate(-50%,0)} 100%{opacity:0;transform:translate(-50%,-56px)} }

#modal-backdrop { position: fixed; inset: 0; background: rgba(4, 5, 10, 0.82); display: none; align-items: center; justify-content: center; padding: 14px; z-index: 90; }
#modal-backdrop.open { display: flex; }
#modal-box {
  background: var(--bg-panel);
  border: 4px solid #000;
  box-shadow: 6px 6px 0 #000, inset 2px 2px 0 var(--border-light);
  width: 100%; max-width: 540px; max-height: 88vh; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 11px;
}

.progress-wrap { width: 100%; height: 10px; background: #06070c; border: 2px solid #000; }
.progress-fill {
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(90deg, currentColor 0 8px, rgba(0, 0, 0, 0.25) 8px 10px);
  transition: width 0.2s steps(10);
}
