/* ============================================================
 * CONQUISTA DE ELDORIA · EVENTO (gameplay)
 * 2026-06-15 · Lobby + mapa fullscreen con HUDs flotantes.
 * ============================================================ */

/* ----- LOBBY ----- */
.cev-screen {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  color: #fff;
}
.cev-not-allowed { display: grid; place-items: center; min-height: 60vh; }
.cev-not-allowed .cev-block {
  text-align: center; padding: 32px; border-radius: 14px;
  background: rgba(255,255,255,.04); border: 1px dashed rgba(255,255,255,.14); max-width: 520px;
}
.cev-not-allowed i { font-size: 36px; color: #ffd24a; margin-bottom: 8px; display: inline-block; }
.cev-not-allowed h2 { margin: 4px 0 8px; font-size: 20px; }
.cev-not-allowed p { margin: 0; font-size: 13.5px; color: rgba(255,255,255,.72); line-height: 1.55; }

.cev-hero {
  text-align: center; padding: 22px 18px 24px; margin-bottom: 18px; border-radius: 14px;
  background: radial-gradient(circle at 50% 0%, rgba(255,210,74,.16), rgba(0,0,0,.30) 70%), linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.20));
  border: 1px solid rgba(255,210,74,.30); position: relative; overflow: hidden;
}
.cev-hero-tag {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 11px; letter-spacing: .12em; font-weight: 800;
  background: rgba(255,210,74,.18); border: 1px solid rgba(255,210,74,.50); color: #ffd24a; margin-bottom: 10px;
}
.cev-hero-title {
  font-size: 32px; font-weight: 900; margin: 0 0 6px;
  background: linear-gradient(180deg, #ffd24a 10%, #c08a1a 95%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.cev-hero-sub { margin: 4px auto 0; font-size: 13.5px; line-height: 1.5; color: rgba(255,255,255,.78); max-width: 640px; }

.cev-status {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  padding: 14px; margin-bottom: 18px; border-radius: 12px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.10);
}
.cev-status-row { padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); }
.cev-status-label { display: flex; align-items: center; gap: 6px; font-size: 10.5px; letter-spacing: .08em; font-weight: 800; color: rgba(255,255,255,.55); margin-bottom: 4px; }
.cev-status-label i { font-size: 14px; color: #ffd24a; }
.cev-status-value { font-size: 14px; font-weight: 700; color: #fff; }
.cev-status-dev { color: #ff8a3d; }

.cev-info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 22px; }
.cev-info-card { padding: 16px 16px 14px; border-radius: 12px; background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.18)); border: 1px solid rgba(255,255,255,.10); position: relative; overflow: hidden; }
.cev-info-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 0% 0%, rgba(255,210,74,.10), transparent 60%); pointer-events: none; }
.cev-info-icon { position: relative; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,210,74,.16); border: 1px solid rgba(255,210,74,.40); color: #ffd24a; font-size: 22px; margin-bottom: 10px; }
.cev-info-card h3 { position: relative; font-size: 15px; font-weight: 800; color: #fff; margin: 0 0 4px; }
.cev-info-card p { position: relative; margin: 0; font-size: 12.5px; line-height: 1.55; color: rgba(255,255,255,.76); }

.cev-enter-btn {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  width: 100%; padding: 18px 24px; margin-bottom: 18px; border-radius: 14px;
  border: 1px solid rgba(255,210,74,.55);
  background: linear-gradient(180deg, #ffd24a 0%, #c08a1a 100%);
  color: #1a1207; font-size: 17px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
  box-shadow: 0 8px 28px -12px rgba(255,210,74,.50), 0 0 0 1px rgba(255,210,74,.20) inset;
  transition: filter .15s ease, transform .12s ease;
}
.cev-enter-btn:hover { filter: brightness(1.08); }
.cev-enter-btn:active { transform: translateY(1px); }
.cev-enter-btn i { font-size: 22px; }
.cev-enter-arrow { font-size: 18px; }

.cev-disclaimer { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 10px; background: rgba(255,138,61,.07); border: 1px dashed rgba(255,138,61,.35); font-size: 12px; line-height: 1.5; color: rgba(255,255,255,.78); margin: 0; }
.cev-disclaimer i { color: #ff8a3d; font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.cev-disclaimer b { color: #ffd24a; }

/* =============================================================
 * MAPA · OVERLAY FULLSCREEN
 * ============================================================= */
body.cev-fullscreen-on { overflow: hidden; }

.cev-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background:
    radial-gradient(ellipse at center, rgba(70,40,15,.55), rgba(0,0,0,.92) 75%),
    linear-gradient(180deg, #1a1108 0%, #0a0604 100%);
  overflow: hidden;
  user-select: none;
  color: #fff;
  font-family: inherit;
}

/* Viewport recibe los pointer events de pan */
.cev-map-viewport {
  position: absolute;
  inset: 0;
  cursor: grab;
  overflow: hidden;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,210,74,.05), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(106,166,255,.04), transparent 40%);
  background-color: #0d0907;
}
.cev-map-viewport.is-dragging { cursor: grabbing; }

/* World: el canvas conceptual que se mueve con transform */
.cev-map-world {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  transition: transform .25s ease-out;
  background: #0a0604;
  box-shadow: 0 0 0 2px rgba(255,210,74,.25), 0 0 0 1px rgba(0,0,0,.60) inset, 0 0 160px rgba(255,210,74,.10) inset;
}
.cev-map-viewport.is-dragging .cev-map-world { transition: none; }

/* Pergamino base — una sola imagen que cubre todo el world */
.cev-map-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  z-index: 1;
}
/* Legacy del tilemap (no se usa pero queda oculto por compat) */
.cev-map-tiles { display: none; }

/* SVG con los caminos (edges) — tinta marrón sobre el pergamino */
.cev-map-edges {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: multiply;
  opacity: .85;
}
.cev-map-edges line { animation: cev-edge-pulse 5s ease-in-out infinite; }
@keyframes cev-edge-pulse { 0%,100% { opacity: .85; } 50% { opacity: 1; } }

/* Capa de buildings (sprites encima del terreno+caminos) */
.cev-map-nodes { position: absolute; inset: 0; z-index: 3; }

.cev-build {
  position: absolute;
  /* anchor ligeramente arriba del centro (-54%): el dibujo queda apenas
     más alto que el punto, así la línea entra por la base del building
     y no por el techo. */
  transform: translate(-50%, -54%);
  cursor: pointer;
  --node-c: #6b4226; /* tinta marrón cálida — color dominante de los "dibujos" del mapa */
  transition: transform .18s ease;
}
.cev-build:hover {
  transform: translate(-50%, -54%) scale(1.08);
  z-index: 4;
}

/* Sprite del building — pintado sobre el pergamino con blend multiplicativo
   para que los whites se vuelvan transparentes y se sienta dibujado a mano.
   SIN drop-shadow ni scale: queremos que se vea como dibujo plano sobre el mapa. */
.cev-build-img {
  background-size: contain;
  background-position: center bottom;
  background-repeat: no-repeat;
  mix-blend-mode: multiply;
  filter: sepia(.55) saturate(.55) contrast(1.05) brightness(.92);
}

/* Sombra ovalada — desactivada: los dibujos a tinta no necesitan sombra,
   son parte del papel. */
.cev-build-shadow { display: none; }

/* Label flotante — papel crema con tinta marrón (combina con el pergamino) */
.cev-build-label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 5px 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, #f4e3bf, #e6d0a0);
  border: 1.5px solid #5c3b1c;
  color: #3a230d;
  font-family: 'Cinzel', 'Cormorant Garamond', Georgia, serif;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .04em;
  box-shadow:
    0 2px 4px rgba(40,20,8,.35),
    inset 0 1px 0 rgba(255,255,255,.4),
    inset 0 -1px 0 rgba(100,60,20,.25);
}

/* Capital tiene label más prominente */
.cev-build.is-capital .cev-build-label {
  font-size: 15px;
  padding: 6px 18px;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #efd58a, #d4ad55);
  border-color: #3a230d;
  color: #2a1606;
  font-weight: 800;
}

/* Anillo pulsante para capital — tinta marrón */
.cev-build-ring {
  position: absolute;
  left: 50%; bottom: 0;
  transform: translate(-50%, 50%);
  width: 200px; height: 50px;
  border-radius: 50%;
  border: 1.5px dashed #6b4226;
  animation: cev-build-ring 3s ease-out infinite;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: multiply;
}
@keyframes cev-build-ring {
  0%   { width: 140px; opacity: .55; }
  100% { width: 280px; opacity: 0; }
}

/* Placeholder — emblema circular dibujado a tinta sobre el pergamino */
.cev-build-placeholder {
  position: relative;
  display: grid;
  place-items: center;
}
.cev-build-ph-base { display: none; }
.cev-build-ph-disc {
  position: relative;
  width: 72%; height: 72%;
  border-radius: 50%;
  display: grid; place-items: center;
  /* Papel crema con doble anillo a tinta */
  background:
    radial-gradient(circle at 50% 40%, #f5e2b8, #d9bd80 70%, #c4a366 100%);
  border: 2.5px solid #4a2c10;
  color: #3a230d;
  font-size: 56px;
  box-shadow:
    0 0 0 3px #f0dba5,
    0 0 0 4.5px #4a2c10,
    inset 0 0 18px rgba(120,70,20,.35),
    0 4px 10px rgba(40,20,8,.4);
  mix-blend-mode: multiply;
}
.cev-build.is-capital .cev-build-ph-disc {
  font-size: 76px;
  border-width: 3px;
  color: #2a1606;
}

/* Locked (fase 2/3 — todavía no disponibles) */
.cev-build.is-locked {
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.55)) grayscale(.75) brightness(.55);
}
.cev-build.is-locked:hover {
  transform: translate(-50%, -54%) scale(1.08);
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.65)) grayscale(.5) brightness(.7);
}
.cev-build.is-locked .cev-build-label {
  color: rgba(255,255,255,.72);
  background: rgba(0,0,0,.82);
  border-color: rgba(255,255,255,.18);
}
.cev-build.is-locked.is-phase-2 .cev-build-label { border-color: rgba(126,196,255,.45); color: #cfe6ff; }
.cev-build.is-locked.is-phase-3 .cev-build-label { border-color: rgba(255,138,74,.45); color: #ffd0b3; }

/* ============================================================
   MECÁNICA DE VIAJES — 2026-06-16
   ============================================================ */

/* Path resaltado por el que viaja el char (SVG line en #cev-edges). */
.cev-travel-path {
  stroke: #b97f3a;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 18 14;
  filter: drop-shadow(0 0 6px rgba(185, 127, 58, .6));
  animation: cev-travel-dash 1.2s linear infinite;
}
/* 2026-06-17 · Viajes de OTROS jugadores: más tenue, color azulado distinto. */
.cev-travel-path.is-other {
  stroke: #5a8bc4;
  stroke-width: 5;
  stroke-dasharray: 10 8;
  opacity: .55;
  filter: drop-shadow(0 0 4px rgba(90, 139, 196, .4));
  animation: cev-travel-dash 1.6s linear infinite;
}
.cev-other-traveler { opacity: .82; }
.cev-other-traveler.is-solo { width: 44px; height: 44px; }
.cev-other-traveler::after {
  background: radial-gradient(ellipse at center, rgba(90, 139, 196, .42), transparent 70%);
}
@keyframes cev-travel-dash {
  0%   { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -32; }
}

/* Viajero / Carreta en el mapa — absolute sobre el mapa, animado con bobbing. */
.cev-traveler {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 3px 5px rgba(20, 12, 4, .55));
  will-change: left, top;
}
.cev-traveler.is-solo { width: 64px; height: 64px; }
.cev-traveler.is-cart { width: 88px; height: 70px; }
.cev-traveler img {
  width: 100%; height: 100%;
  object-fit: contain;
  user-select: none;
  animation: cev-traveler-bob 1.2s ease-in-out infinite;
}
.cev-traveler.is-flipped img { transform: scaleX(-1); }
.cev-traveler.is-flipped img { animation-name: cev-traveler-bob-flip; }
.cev-traveler::after {
  content: '';
  position: absolute;
  left: 50%; top: 100%;
  width: 70%; height: 8px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 210, 74, .42), transparent 70%);
  z-index: -1;
  animation: cev-traveler-pulse 1.5s ease-in-out infinite;
}
@keyframes cev-traveler-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}
@keyframes cev-traveler-bob-flip {
  0%, 100% { transform: scaleX(-1) translateY(0); }
  50%      { transform: scaleX(-1) translateY(-3px); }
}
@keyframes cev-traveler-pulse {
  0%, 100% { opacity: .85; }
  50%      { opacity: .4;  }
}

@media (max-width: 640px) {
  .cev-traveler.is-solo { width: 52px; height: 52px; }
  .cev-traveler.is-cart { width: 70px; height: 56px; }
}


/* Nodo donde estás parado: anillo dorado pulsante alrededor del building. */
.cev-build.is-current::before {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 110%; height: 60%;
  border-radius: 50%;
  border: 3px solid #ffd24a;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 24px rgba(255,210,74,.5), inset 0 0 12px rgba(255,210,74,.25);
  pointer-events: none;
  animation: cev-current-pulse 2s ease-in-out infinite;
  z-index: 1;
}
@keyframes cev-current-pulse {
  0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: .6; transform: translate(-50%, -50%) scale(1.08); }
}

/* Nodos viajables (vecinos del actual): un borde sutil verdoso en el label. */
.cev-build.is-reachable:not(.is-current) .cev-build-label {
  box-shadow:
    0 0 0 1.5px rgba(120,200,120,.7),
    0 2px 4px rgba(40,20,8,.35);
}

/* ====== Banner del título (top-center, decorativo, fijo) ====== */
.cev-banner {
  position: fixed;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
  max-height: 110px;
  max-width: min(560px, 86vw);
  height: auto;
  width: auto;
  pointer-events: none;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.55));
}
@media (max-width: 700px) {
  .cev-banner { max-height: 78px; }
}

/* ====== HUD de viaje activo (top-center, debajo del banner) ====== */
.cev-hud-travel {
  position: fixed;
  top: 130px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  min-width: 320px;
  padding: 10px 14px;
  border-radius: 4px;
  background: linear-gradient(180deg, #f4e3bf, #e6d0a0);
  border: 1.5px solid #5c3b1c;
  box-shadow: 0 4px 14px rgba(0,0,0,.45);
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: #3a230d;
}
.cev-travel-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px;
  margin-bottom: 6px;
}
.cev-travel-row i { color: #6b4226; font-size: 18px; }
.cev-travel-label { opacity: .75; }
.cev-travel-dest { font-weight: 800; letter-spacing: .04em; }
.cev-travel-bar {
  height: 8px;
  border-radius: 2px;
  background: rgba(60,30,10,.18);
  border: 1px solid rgba(92,59,28,.4);
  overflow: hidden;
}
.cev-travel-fill {
  height: 100%;
  background: linear-gradient(90deg, #b97f3a, #d9a85a);
  transition: width .8s linear;
}
.cev-travel-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 6px;
  font-size: 13px;
}
.cev-travel-cancel {
  background: transparent;
  border: 1px solid #a87644;
  border-radius: 2px;
  padding: 3px 10px;
  cursor: pointer;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 11px;
  letter-spacing: .08em;
  color: #f4ead9;
}
.cev-travel-cancel:hover { background: rgba(244,234,217,.12); border-color: #d4a76a; }

/* ====== Panel HUD "Menú" estilo Leyenda — 2026-06-16 ====== */
.cev-hud-menu {
  position: fixed;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 11;
  width: 180px;
  background: transparent;
  border: none;
  padding: 0;
}
.cev-menu-frame {
  position: relative;
  background: linear-gradient(180deg, #1a0f06 0%, #2a1808 100%);
  border: 2px solid #b97f3a;
  border-radius: 4px;
  padding: 14px 12px 12px;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.6),
    0 6px 18px rgba(0,0,0,.55),
    inset 0 0 12px rgba(0,0,0,.5);
  color: #f4e3bf;
}
/* Esquinas ornamentales tipo "Leyenda" */
.cev-menu-frame::before,
.cev-menu-frame::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border: 2px solid #d4a55b;
  pointer-events: none;
}
.cev-menu-frame::before {
  top: -4px; left: -4px;
  border-right: none; border-bottom: none;
  border-radius: 4px 0 0 0;
}
.cev-menu-frame::after {
  bottom: -4px; right: -4px;
  border-left: none; border-top: none;
  border-radius: 0 0 4px 0;
}
.cev-menu-title {
  text-align: center;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 14px;
  letter-spacing: .25em;
  font-weight: 800;
  color: #d4a55b;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1.5px solid rgba(212, 165, 91, .35);
  text-shadow: 0 2px 4px rgba(0,0,0,.7);
}
.cev-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: none;
  padding: 9px 6px;
  cursor: pointer;
  color: #f4e3bf;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  text-align: left;
  border-radius: 3px;
  transition: background .15s ease;
}
.cev-menu-item i {
  font-size: 20px;
  color: #d4a55b;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  filter: drop-shadow(0 0 2px rgba(212, 165, 91, .4));
}
.cev-menu-item:hover { background: rgba(212, 165, 91, .12); }
.cev-menu-item + .cev-menu-item { margin-top: 2px; }

@media (max-width: 700px) {
  .cev-hud-menu { left: 8px; width: 150px; }
  .cev-menu-title { font-size: 12px; letter-spacing: .2em; }
  .cev-menu-item { font-size: 12px; padding: 7px 4px; }
  .cev-menu-item i { font-size: 17px; }
}

/* ====== Modal genérico de info (lista de viajes / ranking / clan) ====== */
.cev-info-modal {
  position: fixed; inset: 0;
  z-index: 14;
  display: grid; place-items: center;
}
.cev-info-modal[hidden] { display: none; }
.cev-info-backdrop {
  position: absolute; inset: 0;
  background: rgba(15,9,4,.65);
  backdrop-filter: blur(3px);
}
.cev-info-card {
  position: relative;
  width: min(500px, 92vw);
  max-height: 80vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #1a0f06, #2a1808);
  border: 2px solid #b97f3a;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 18px 40px rgba(0,0,0,.65);
  color: #f4e3bf;
}
.cev-info-close {
  position: absolute; top: 6px; right: 8px;
  width: 30px; height: 30px;
  background: transparent;
  border: none;
  color: #d4a55b;
  font-size: 18px;
  cursor: pointer;
}
.cev-info-close:hover { color: #fff; }
.cev-info-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 18px;
  letter-spacing: .15em;
  font-weight: 800;
  text-align: center;
  color: #d4a55b;
  padding: 14px 40px 10px;
  border-bottom: 1.5px solid rgba(212, 165, 91, .35);
}
.cev-info-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px 14px;
}
.cev-info-loading, .cev-info-empty {
  text-align: center;
  padding: 30px 16px;
  opacity: .8;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 15px;
}
.cev-info-empty i { font-size: 36px; color: #d4a55b; display: block; margin-bottom: 8px; }
.cev-info-empty p { margin: 4px 0; }
.cev-info-hint { font-size: 12px; opacity: .6; }

.cev-info-list { display: flex; flex-direction: column; gap: 8px; }
.cev-info-row {
  background: rgba(0,0,0,.3);
  border: 1px solid rgba(212, 165, 91, .25);
  border-radius: 3px;
  padding: 8px 10px;
}
.cev-info-row.is-me {
  border-color: rgba(255, 210, 74, .6);
  background: rgba(255, 210, 74, .07);
}
.cev-info-row-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px;
  font-weight: 700;
}
.cev-info-row-head b { color: #f4e3bf; }
.cev-info-row-head .cev-tag-clan {
  color: #d4a55b;
  font-weight: 800;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 12px;
  letter-spacing: .08em;
}
.cev-info-eta {
  margin-left: auto;
  color: #d4a55b;
  font-size: 12px;
  font-family: 'Cinzel', Georgia, serif;
}
.cev-info-row-sub {
  font-size: 12px;
  opacity: .75;
  margin-top: 2px;
}
.cev-info-bar {
  height: 4px;
  margin-top: 6px;
  background: rgba(0,0,0,.4);
  border-radius: 2px;
  overflow: hidden;
}
.cev-info-fill {
  height: 100%;
  background: linear-gradient(90deg, #b97f3a, #d9a85a);
}
.cev-info-row-clan.is-offline { opacity: .55; }
.cev-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.cev-info-table th, .cev-info-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(212, 165, 91, .2);
  text-align: left;
}
.cev-info-table th {
  font-family: 'Cinzel', Georgia, serif;
  color: #d4a55b;
  letter-spacing: .06em;
}

/* ====== Modal de territorio ====== */
/* 2026-06-18 · Animación de entrada: backdrop fade + card que sube y escala desde abajo. */
.cev-territory-modal {
  position: fixed; inset: 0;
  z-index: 14;
  display: grid; place-items: center;
}
.cev-territory-modal[hidden] { display: none; }
.cev-hud-travel[hidden] { display: none; }
.cev-tm-backdrop {
  position: absolute; inset: 0;
  background: rgba(15,9,4,.55);
  backdrop-filter: blur(2px);
  animation: cev-tm-fade-in .22s ease-out both;
}
.cev-tm-card {
  position: relative;
  width: min(440px, 92vw);
  padding: 22px 24px 20px;
  background: linear-gradient(180deg, #f5e6c2, #e8d4a4);
  border: 2px solid #4a2c10;
  border-radius: 4px;
  box-shadow:
    0 0 0 4px #f0dba5,
    0 0 0 5.5px #4a2c10,
    0 18px 40px rgba(0,0,0,.55);
  color: #2a1606;
  font-family: 'Cormorant Garamond', Georgia, serif;
  animation: cev-tm-pop-in .32s cubic-bezier(.18, 1.1, .35, 1.04) both;
  transform-origin: center bottom;
}
@keyframes cev-tm-fade-in {
  from { opacity: 0; backdrop-filter: blur(0); }
  to   { opacity: 1; backdrop-filter: blur(2px); }
}
@keyframes cev-tm-pop-in {
  0%   { opacity: 0; transform: translateY(28px) scale(.88); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.cev-tm-close {
  position: absolute; top: 8px; right: 10px;
  width: 28px; height: 28px;
  background: transparent;
  border: none;
  color: #4a2c10;
  font-size: 18px;
  cursor: pointer;
  opacity: .65;
}
.cev-tm-close:hover { opacity: 1; }
.cev-tm-kind {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 4px;
}
.cev-tm-name {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .04em;
  color: #2a1606;
  margin: 0 0 6px;
}
.cev-tm-flavor {
  font-size: 15px;
  font-style: italic;
  color: #5c3b1c;
  line-height: 1.4;
  margin-bottom: 12px;
}
.cev-tm-phase {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid #5c3b1c;
  border-radius: 2px;
  background: rgba(92,59,28,.08);
  font-family: 'Cinzel', Georgia, serif;
  font-size: 11px;
  letter-spacing: .1em;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.cev-tm-actions {
  border-top: 1px solid rgba(92,59,28,.3);
  padding-top: 14px;
}
.cev-tm-here, .cev-tm-locked, .cev-tm-eta {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}
.cev-tm-here   { color: #2d6a2d; }
.cev-tm-locked { color: #7a3a1a; }
.cev-tm-eta b  { font-weight: 800; }
.cev-tm-go {
  width: 100%;
  padding: 11px 16px;
  background: linear-gradient(180deg, #efd58a, #d4ad55);
  border: 1.5px solid #4a2c10;
  border-radius: 2px;
  color: #2a1606;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 14px;
  letter-spacing: .12em;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.cev-tm-go:hover:not(:disabled) { filter: brightness(1.08); }
.cev-tm-go:disabled { opacity: .65; cursor: not-allowed; }

.cev-tm-bosses {
  width: 100%;
  margin-top: 8px;
  padding: 11px 16px;
  background: linear-gradient(180deg, #b85c5c, #862525);
  border: 1.5px solid #4a1010;
  border-radius: 2px;
  color: #fff5e6;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 14px;
  letter-spacing: .12em;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.cev-tm-bosses:hover { filter: brightness(1.1); }
.cev-tm-bosses i { color: #f6c7b8; }

/* 2026-06-17 · Bloque de estado del territorio (bosses/controller) */
.cev-tm-status {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 12px 10px;
  background: linear-gradient(180deg, rgba(255,247,228,.55), rgba(247,231,196,.35));
  border: 1px solid rgba(92,59,28,.32);
  border-radius: 3px;
}
.cev-tm-bosskill {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cev-tm-bosskill-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 12px;
  letter-spacing: .08em;
  font-weight: 700;
  text-transform: uppercase;
  color: #5c3b1c;
}
.cev-tm-bosskill-head i { color: #862525; font-size: 14px; }
.cev-tm-bosskill-head b {
  margin-left: auto;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 14px;
  color: #2a1606;
  font-weight: 800;
}
.cev-tm-bosskill-bar {
  height: 8px;
  background: rgba(74,28,16,.18);
  border: 1px solid rgba(92,59,28,.45);
  border-radius: 2px;
  overflow: hidden;
}
.cev-tm-bosskill-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #b85c5c, #862525);
  transition: width .35s ease;
}
.cev-tm-bosskill.is-full .cev-tm-bosskill-bar > span {
  background: linear-gradient(90deg, #d4ad55, #efd58a);
}
.cev-tm-bosskill.is-full .cev-tm-bosskill-head b { color: #6d4d0e; }

.cev-tm-controller {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(212,173,85,.18);
  border: 1px solid rgba(122,84,16,.5);
  border-radius: 2px;
  font-size: 13px;
  color: #4a2c10;
}
.cev-tm-controller i { color: #862525; font-size: 16px; }
.cev-tm-controller b {
  margin-left: 4px;
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 800;
  color: #2a1606;
  letter-spacing: .03em;
}

.cev-build-lock {
  position: absolute;
  left: 50%; top: 35%;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(15,9,4,.92);
  border: 2px solid color-mix(in srgb, var(--node-c) 55%, #fff 12%);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(0,0,0,.55), 0 6px 16px rgba(0,0,0,.6);
  z-index: 2;
  pointer-events: none;
}
.cev-build-lock i { font-size: 28px; color: var(--node-c); filter: drop-shadow(0 0 6px rgba(0,0,0,.6)); }
.cev-build-lock span {
  font-size: 10px; font-weight: 900; letter-spacing: .14em;
  padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--node-c) 20%, rgba(0,0,0,.55));
  border: 1px solid color-mix(in srgb, var(--node-c) 60%, transparent);
}

/* Tooltip de nodo */
.cev-node-tip {
  position: fixed;
  z-index: 9100;
  min-width: 220px;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(20,12,6,.96), rgba(0,0,0,.96));
  border: 1px solid rgba(255,210,74,.40);
  box-shadow: 0 12px 30px -8px rgba(0,0,0,.7);
  color: #fff;
  font-size: 12.5px;
  line-height: 1.5;
  pointer-events: none;
}
.cev-tip-kind { font-size: 10.5px; letter-spacing: .1em; font-weight: 800; margin-bottom: 4px; }
.cev-tip-name { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.cev-tip-flavor { color: rgba(255,255,255,.75); margin-bottom: 8px; font-style: italic; }
.cev-tip-status { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #5fd684; font-weight: 700; }
.cev-tip-status.is-locked { color: #ffd24a; }
.cev-tip-status.is-locked i { font-size: 14px; }
.cev-tip-dot { width: 8px; height: 8px; border-radius: 50%; background: #5fd684; box-shadow: 0 0 8px #5fd684; }

.cev-map-error { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); color: #fff; }
.cev-map-error button { margin-left: 8px; padding: 6px 12px; border-radius: 8px; border: 1px solid #ffd24a; background: #ffd24a; color: #1a1207; font-weight: 800; cursor: pointer; }

/* =============================================================
 * HUDs FLOTANTES
 * ============================================================= */
.cev-hud {
  position: absolute;
  z-index: 50;
  background: linear-gradient(180deg, rgba(20,12,6,.88), rgba(8,5,3,.92));
  border: 1px solid rgba(255,210,74,.35);
  border-radius: 12px;
  box-shadow: 0 10px 24px -10px rgba(0,0,0,.7), 0 0 0 1px rgba(255,210,74,.10) inset;
  backdrop-filter: blur(8px);
  color: #fff;
}

/* SALIR (top-left) */
.cev-hud-exit {
  top: 20px; left: 20px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  font-size: 13px; font-weight: 800; letter-spacing: .04em;
  color: #fff;
  cursor: pointer;
  transition: background .15s ease;
}
.cev-hud-exit:hover { background: linear-gradient(180deg, rgba(50,28,12,.95), rgba(20,12,6,.95)); }
.cev-hud-exit i { font-size: 16px; color: #ffd24a; }

/* WALLET (top-right) — pills + bell */
.cev-hud-wallet {
  top: 20px; right: 20px;
  background: none; border: none; padding: 0;
  display: flex; align-items: center; gap: 10px;
  /* 2026-06-18 · Override del backdrop-filter heredado de .cev-hud — sin él
     el bounding rect del flex container generaba un halo borroso */
  backdrop-filter: none;
  box-shadow: none;
}
.cev-wallet-stack { display: flex; flex-direction: column; gap: 6px; }
.cev-wallet-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(20, 14, 6, 0.95), rgba(10, 6, 2, 0.95));
  border: 1px solid rgba(255, 210, 74, 0.45);
  box-shadow: 0 2px 8px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,210,74,.18);
  font-size: 13px; font-weight: 800; letter-spacing: .03em;
  color: #ffe8a3; min-width: 110px;
  font-variant-numeric: tabular-nums;
}
.cev-wallet-pill i { font-size: 16px; flex: 0 0 auto; }
.cev-wallet-pill--gold i { color: #ffd24a; }
.cev-wallet-pill--gem  { color: #c7ddff; border-color: rgba(106,166,255,.45); box-shadow: 0 2px 8px rgba(0,0,0,.55), inset 0 1px 0 rgba(106,166,255,.18); }
.cev-wallet-pill--gem i { color: #6aa6ff; }
.cev-wallet-pill span { flex: 1 1 auto; text-align: right; }

/* Bell */
.cev-notif-btn {
  position: relative;
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(180deg, rgba(28, 18, 8, 0.95), rgba(12, 6, 2, 0.95));
  border: 1px solid rgba(255,210,74,.55);
  color: #ffd24a; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,210,74,.18);
  transition: transform .15s ease, box-shadow .25s ease, border-color .25s ease;
}
.cev-notif-btn i { font-size: 22px; }
.cev-notif-btn:hover { transform: translateY(-1px); border-color: #ffd24a; }
.cev-notif-btn.has-unread {
  border-color: #ff7a3a; color: #ffd24a;
  box-shadow: 0 4px 16px rgba(255,122,58,.55), inset 0 1px 0 rgba(255,210,74,.25);
  animation: cevBellGlow 2s ease-in-out infinite;
}
.cev-notif-btn.is-pulsing { animation: cevBellPulse .8s ease-out 2; }
@keyframes cevBellGlow {
  0%,100% { box-shadow: 0 4px 12px rgba(255,122,58,.35), inset 0 1px 0 rgba(255,210,74,.2); }
  50%     { box-shadow: 0 4px 22px rgba(255,122,58,.75), inset 0 1px 0 rgba(255,210,74,.3); }
}
@keyframes cevBellPulse {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.18) rotate(-10deg); }
  60%  { transform: scale(1.05) rotate(8deg); }
  100% { transform: scale(1) rotate(0); }
}
.cev-notif-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: #e84a4a; color: #fff;
  font-size: 11px; font-weight: 900; line-height: 18px; text-align: center;
  border: 1px solid #1a0a04;
  box-shadow: 0 1px 4px rgba(0,0,0,.6);
}

/* Inbox panel */
.cev-notif-panel {
  position: absolute; top: 76px; right: 20px;
  width: 340px; max-width: calc(100vw - 32px);
  background: linear-gradient(180deg, rgba(20, 14, 6, 0.98), rgba(8, 4, 2, 0.98));
  border: 1px solid rgba(255,210,74,.4);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0,0,0,.72);
  z-index: 60;
  overflow: hidden;
  display: flex; flex-direction: column;
  max-height: 60vh;
}
.cev-notif-panel[hidden] { display: none; }
.cev-notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,210,74,.22);
  background: linear-gradient(180deg, rgba(40,24,8,.65), rgba(20,12,4,.65));
}
.cev-notif-title { font-size: 13px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: #ffd24a; display: inline-flex; align-items: center; gap: 8px; }
.cev-notif-readall { background: transparent; border: 0; color: #c7ddff; font-size: 11px; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.cev-notif-readall:hover { background: rgba(255,255,255,.06); }
.cev-notif-list { overflow-y: auto; padding: 6px; flex: 1 1 auto; }
.cev-notif-empty { padding: 28px 16px; text-align: center; color: rgba(255,255,255,.45); font-size: 12px; }
.cev-notif-item {
  display: flex; gap: 10px;
  padding: 10px 10px;
  border-radius: 8px;
  border-left: 3px solid transparent;
  transition: background .15s ease;
}
.cev-notif-item + .cev-notif-item { margin-top: 4px; }
.cev-notif-item:hover { background: rgba(255,255,255,.04); }
.cev-notif-item.is-unread { background: rgba(255, 210, 74, 0.08); border-left-color: #ffd24a; }
.cev-notif-icon {
  flex: 0 0 36px; width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255, 210, 74, 0.12); color: #ffd24a;
  border: 1px solid rgba(255,210,74,.3);
}
.cev-notif-icon i { font-size: 18px; }
.cev-notif-item[data-notif-type="attack_incoming"] .cev-notif-icon,
.cev-notif-item[data-notif-type="attack_started"] .cev-notif-icon {
  background: rgba(255,122,58,.16); color: #ff7a3a; border-color: rgba(255,122,58,.4);
}
.cev-notif-item[data-notif-type="territory_lost"] .cev-notif-icon {
  background: rgba(232,74,74,.16); color: #ff8a8a; border-color: rgba(232,74,74,.4);
}
.cev-notif-item[data-notif-type="territory_won"] .cev-notif-icon {
  background: rgba(106,255,180,.14); color: #6affb4; border-color: rgba(106,255,180,.4);
}
.cev-notif-item[data-notif-type="spy_returned"] .cev-notif-icon {
  background: rgba(199,221,255,.14); color: #c7ddff; border-color: rgba(199,221,255,.4);
}
.cev-notif-item[data-notif-type="was_spied"] .cev-notif-icon {
  background: rgba(199,114,255,.14); color: #c7a4ff; border-color: rgba(199,114,255,.4);
}
.cev-notif-body { flex: 1 1 auto; min-width: 0; }
.cev-notif-row1 { font-size: 12.5px; font-weight: 800; color: #fff; line-height: 1.25; }
.cev-notif-row2 { font-size: 12px; color: rgba(255,255,255,.78); margin-top: 2px; line-height: 1.35; }
.cev-notif-row3 { font-size: 10.5px; color: rgba(255,255,255,.45); margin-top: 4px; letter-spacing: .04em; }

/* Global toast stack (center top) */
.cev-global-stack {
  position: absolute; top: 70px; left: 50%; transform: translateX(-50%);
  z-index: 70;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
  max-width: 92vw;
}
.cev-global-toast {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(28,18,8,.96), rgba(12,6,2,.96));
  border: 1px solid rgba(255,210,74,.5);
  box-shadow: 0 10px 28px rgba(0,0,0,.7), 0 0 24px rgba(255,210,74,.15);
  color: #ffe8a3; font-size: 13.5px; font-weight: 700; letter-spacing: .02em;
  opacity: 0; transform: translateY(-12px) scale(.95);
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: auto;
}
.cev-global-toast i { font-size: 20px; color: #ffd24a; flex: 0 0 auto; }
.cev-global-toast b { color: #fff; font-weight: 900; }
.cev-global-toast.is-in { opacity: 1; transform: translateY(0) scale(1); }
.cev-global-toast.is-out { opacity: 0; transform: translateY(-8px) scale(.97); }
.cev-gt--milestone i { color: #c7ddff; }
.cev-gt--milestone { border-color: rgba(199,221,255,.4); box-shadow: 0 10px 28px rgba(0,0,0,.7), 0 0 24px rgba(199,221,255,.18); }
.cev-gt--total_war i { color: #ff7a3a; }
.cev-gt--total_war { border-color: rgba(255,122,58,.6); box-shadow: 0 10px 28px rgba(0,0,0,.7), 0 0 26px rgba(255,122,58,.32); animation: cevTwPulse 1.6s ease-in-out infinite; }
.cev-gt--territory_won_final i { color: #ffd24a; }
.cev-gt--territory_won_final { border-color: rgba(255,210,74,.7); box-shadow: 0 10px 32px rgba(0,0,0,.75), 0 0 32px rgba(255,210,74,.45); }
@keyframes cevTwPulse {
  0%,100% { box-shadow: 0 10px 28px rgba(0,0,0,.7), 0 0 18px rgba(255,122,58,.32); }
  50%     { box-shadow: 0 10px 30px rgba(0,0,0,.7), 0 0 28px rgba(255,122,58,.55); }
}

/* Mobile shrink */
@media (max-width: 720px) {
  .cev-hud-wallet { top: 12px; right: 12px; gap: 6px; }
  .cev-wallet-pill { padding: 4px 9px; font-size: 12px; min-width: 92px; }
  .cev-wallet-pill i { font-size: 14px; }
  .cev-notif-btn { width: 38px; height: 38px; }
  .cev-notif-btn i { font-size: 19px; }
  .cev-notif-panel { top: 60px; right: 12px; width: calc(100vw - 24px); max-height: 70vh; }
  .cev-global-stack { top: 56px; }
  .cev-global-toast { padding: 9px 14px; font-size: 12.5px; }
}

/* VITALES (bottom-left) */
.cev-hud-vitals {
  bottom: 20px; left: 20px;
  padding: 12px 14px;
  width: 280px;
  display: flex; flex-direction: column; gap: 10px;
}
.cev-vital { display: flex; flex-direction: column; gap: 4px; }
.cev-vital-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .04em;
}
.cev-vital-head i { font-size: 14px; }
.cev-vital-text { margin-left: auto; font-size: 11.5px; font-weight: 700; color: rgba(255,255,255,.78); font-variant-numeric: tabular-nums; }
.cev-vital-bar {
  height: 8px; border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  overflow: hidden;
}
.cev-vital-fill { height: 100%; transition: width .25s ease; border-radius: 999px; }
.cev-vital-hp .cev-vital-head i { color: #ff5a5a; }
.cev-vital-hp .cev-vital-fill { background: linear-gradient(90deg, #ff5a5a, #c2532a); }
.cev-vital-mp .cev-vital-head i { color: #6aa6ff; }
.cev-vital-mp .cev-vital-fill { background: linear-gradient(90deg, #6aa6ff, #2f5dc4); }
.cev-vital-st .cev-vital-head i { color: #5fd684; }
.cev-vital-st .cev-vital-fill { background: linear-gradient(90deg, #5fd684, #2c8a4a); }

/* ZOOM CONTROLS (bottom-right, encima del chat) */
.cev-hud-zoom {
  bottom: 88px; right: 20px;
  padding: 6px;
  display: flex; flex-direction: column; gap: 4px;
}
.cev-zoom-btn {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.10);
  color: #fff; font-size: 16px; cursor: pointer; display: grid; place-items: center;
  transition: background .15s ease, border-color .15s ease;
}
.cev-zoom-btn:hover { background: rgba(255,210,74,.18); border-color: rgba(255,210,74,.45); color: #ffd24a; }

/* CHAT (bottom-right) */
.cev-hud-chat {
  bottom: 20px; right: 20px;
  width: 340px;
  padding: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.cev-hud-chat.is-open { height: 460px; max-height: calc(100vh - 80px); }
/* 2026-06-17 · Respeto del atributo hidden — el display: flex de cev-chat-body lo pisaba */
.cev-chat-body[hidden] { display: none !important; }
.cev-chat-toggle {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: transparent;
  border: none; color: #fff;
  font-size: 13.5px; font-weight: 800; letter-spacing: .04em; cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.cev-chat-toggle i { font-size: 18px; color: #ffd24a; }
.cev-chat-toggle span:nth-child(2) { flex: 1; text-align: left; }
.cev-chat-caret { transition: transform .2s ease; opacity: .7; }
.cev-hud-chat.is-open .cev-chat-caret { transform: rotate(180deg); }
.cev-chat-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* 2026-06-17 · Tabs de canales: Global / Evento / Clan */
.cev-chat-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,210,74,.22);
  background: linear-gradient(180deg, rgba(40,24,8,.55), rgba(20,12,4,.55));
}
.cev-chat-tab {
  flex: 1; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 6px;
  background: transparent; border: 0;
  color: rgba(255,232,163,.65);
  font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.cev-chat-tab i { font-size: 14px; opacity: .85; }
.cev-chat-tab:hover:not(:disabled) { color: #ffe8a3; background: rgba(255,210,74,.06); }
.cev-chat-tab.is-active {
  color: #ffd24a;
  border-bottom-color: #ffd24a;
  background: rgba(255,210,74,.08);
}
.cev-chat-tab.is-active i { opacity: 1; }
.cev-chat-tab.is-disabled, .cev-chat-tab:disabled {
  opacity: .35; cursor: not-allowed;
}

/* Mensajes con rol: VIP / BOT / MOD / ADMIN / SYSTEM (border-left definido en el bloque base más abajo) */
.cev-chat-name { color: #fff; }

.cev-chat-msg.is-system { background: rgba(255,210,74,.10); border-left-color: #ffd24a; }
.cev-chat-msg.is-system .cev-chat-name { color: #ffd24a; }

.cev-chat-msg.is-admin { background: rgba(232,74,74,.10); border-left-color: #ff4a4a; }
.cev-chat-msg.is-admin .cev-chat-name { color: #ff8a8a; }

.cev-chat-msg.is-mod { background: rgba(106,166,255,.10); border-left-color: #6aa6ff; }
.cev-chat-msg.is-mod .cev-chat-name { color: #c7ddff; }

.cev-chat-msg.is-bot { background: rgba(150,255,210,.08); border-left-color: #6affb4; }
.cev-chat-msg.is-bot .cev-chat-name { color: #6affb4; }

.cev-chat-msg.is-vip { background: rgba(255,180,74,.08); border-left-color: #ffb44a; }
.cev-chat-msg.is-vip .cev-chat-name { color: #ffce85; }

/* Badge pill (ADMIN/MOD/BOT/VIP) */
.cev-chat-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 9.5px; font-weight: 900;
  letter-spacing: .07em; text-transform: uppercase;
  vertical-align: middle;
  border: 1px solid currentColor;
  line-height: 1.4;
}
.cev-cb--admin { color: #ff4a4a; background: rgba(232,74,74,.18); }
.cev-cb--mod   { color: #6aa6ff; background: rgba(106,166,255,.18); }
.cev-cb--bot   { color: #6affb4; background: rgba(106,255,180,.16); }
.cev-cb--vip   { color: #ffb44a; background: rgba(255,180,74,.18); }

.cev-chat-msgs {
  flex: 1; min-height: 0;
  padding: 10px 12px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
  font-size: 12.5px;
}
.cev-chat-msgs::-webkit-scrollbar { width: 6px; }
.cev-chat-msgs::-webkit-scrollbar-thumb { background: rgba(255,210,74,.30); border-radius: 4px; }
.cev-chat-loading, .cev-chat-empty, .cev-chat-err {
  text-align: center; color: rgba(255,255,255,.55); font-size: 12px; padding: 18px;
}
.cev-chat-err { color: #ff7a7a; }
.cev-chat-msg {
  padding: 6px 10px 6px 10px; border-radius: 8px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.05);
  border-left: 3px solid transparent;
}
.cev-chat-msg.is-mine {
  background: rgba(255,210,74,.10); border-color: rgba(255,210,74,.30);
}
.cev-chat-meta { font-size: 10.5px; color: rgba(255,255,255,.62); margin-bottom: 2px; }
.cev-chat-meta b { color: #ffd24a; font-weight: 800; }
.cev-chat-tag { color: #6aa6ff; font-weight: 800; }
.cev-chat-time { opacity: .6; }
.cev-chat-body-text { color: #fff; line-height: 1.45; word-wrap: break-word; }
.cev-chat-form {
  display: flex; gap: 6px; padding: 8px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.30);
}
.cev-chat-form input {
  flex: 1; padding: 8px 10px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: #fff; font-size: 12.5px;
}
.cev-chat-form input:focus { outline: none; border-color: rgba(255,210,74,.50); }
.cev-chat-form button {
  width: 38px; border-radius: 8px;
  border: 1px solid rgba(255,210,74,.50);
  background: linear-gradient(180deg, #ffd24a, #c08a1a);
  color: #1a1207; font-size: 16px; cursor: pointer;
}
.cev-chat-form button:hover { filter: brightness(1.08); }

/* ----- MOBILE ----- */
@media (max-width: 640px) {
  .cev-screen { padding: 18px 14px 60px; }
  .cev-hero-title { font-size: 24px; }
  .cev-hero-sub { font-size: 12.5px; }
  .cev-status { grid-template-columns: 1fr; }
  .cev-info-grid { grid-template-columns: 1fr; }
  .cev-enter-btn { font-size: 15px; padding: 16px 18px; }

  .cev-hud-exit { top: 12px; left: 12px; padding: 8px 12px; font-size: 12px; }
  /* (wallet/bell shrinks moved to dedicated @media block above) */

  .cev-hud-vitals { bottom: 12px; left: 12px; width: calc(100vw - 24px); max-width: 280px; padding: 10px 12px; }
  .cev-vital-head { font-size: 11px; }

  .cev-hud-chat { width: calc(100vw - 24px); max-width: 340px; right: 12px; bottom: 12px; }
  .cev-hud-chat.is-open { height: 360px; }
  .cev-hud-zoom { right: 12px; bottom: 80px; }

  /* En mobile chico, ocultar vitales si chat abierto para no superponer */
  body:has(.cev-hud-chat.is-open) .cev-hud-vitals { display: none; }
}

/* ============================================================
 * CARRETAS · Cart system (2026-06-16)
 * ============================================================ */

/* Botón de carreta en el modal de territorio (al lado de Viajar solo) */
.cev-tm-cart {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; width: 100%; margin-top: 8px;
  padding: 10px 12px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(196,140,40,.22), rgba(120,75,18,.28));
  border: 1px solid rgba(255,210,74,.42);
  color: #fff7d6; font-size: 13.5px; font-weight: 700;
  cursor: pointer; transition: filter .15s, transform .1s;
}
.cev-tm-cart:hover:not(:disabled) { filter: brightness(1.12); }
.cev-tm-cart:active:not(:disabled) { transform: translateY(1px); }
.cev-tm-cart:disabled { opacity: .45; cursor: not-allowed; }
.cev-tm-cart i { color: #ffd24a; }
.cev-tm-cart-main {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  line-height: 1.1;
}
.cev-tm-cart-cost {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(255,210,74,.18);
  border: 1px solid rgba(255,210,74,.35);
  font-size: 12.5px;
}
.cev-tm-cart-cost b { color: #ffd24a; font-weight: 800; }
.cev-tm-cart-cost i { font-size: 11px; }
.cev-tm-cart-sub {
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  color: rgba(255,255,255,.72);
}

/* Lista de carretas en el modal Carretas */
.cev-cart-row {
  cursor: pointer; transition: background .15s, border-color .15s;
}
.cev-cart-row:hover { background: rgba(255,210,74,.07); border-color: rgba(255,210,74,.28); }
.cev-cart-row .cev-info-row-sub {
  font-size: 12px; color: rgba(255,255,255,.65); margin-top: 2px;
}
.cev-cart-row-actions {
  display: flex; justify-content: flex-end; margin-top: 8px;
}
.cev-cart-join-btn {
  padding: 6px 14px; border-radius: 8px;
  background: linear-gradient(180deg, #ffd24a, #c08a1a);
  border: 1px solid rgba(255,210,74,.50); color: #1a1207;
  font-size: 12.5px; font-weight: 800; cursor: pointer;
  transition: filter .15s;
}
.cev-cart-join-btn:hover { filter: brightness(1.10); }

/* Modal de detalle de carreta */
.cev-cart-head {
  text-align: center; padding: 14px 12px 16px;
  border-bottom: 1px solid rgba(255,210,74,.22); margin-bottom: 14px;
}
.cev-cart-route {
  font-size: 18px; font-weight: 800; color: #ffd24a;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 6px;
}
.cev-cart-route i { font-size: 16px; color: rgba(255,255,255,.55); }
.cev-cart-status {
  font-size: 12px; letter-spacing: .04em; color: rgba(255,255,255,.65);
}

.cev-cart-list .cev-info-row.is-me {
  border-color: rgba(255,210,74,.45);
  background: rgba(255,210,74,.06);
}

.cev-cart-actions {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.cev-cart-depart, .cev-cart-leave {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 14px; border-radius: 10px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: filter .15s, transform .1s;
}
.cev-cart-depart {
  background: linear-gradient(180deg, #ffd24a, #c08a1a);
  border: 1px solid rgba(255,210,74,.60); color: #1a1207;
}
.cev-cart-leave {
  background: rgba(255,90,90,.12);
  border: 1px solid rgba(255,90,90,.42); color: #ff8a8a;
}
.cev-cart-depart:hover, .cev-cart-leave:hover { filter: brightness(1.10); }
.cev-cart-depart:active, .cev-cart-leave:active { transform: translateY(1px); }

@media (max-width: 640px) {
  .cev-tm-cart { font-size: 12.5px; padding: 9px 10px; }
  .cev-tm-cart-main { gap: 6px; }
  .cev-cart-route { font-size: 16px; }
  .cev-cart-depart, .cev-cart-leave { font-size: 13px; padding: 9px 12px; }
}

/* ----- HUD: card de carreta activa (encima de vitales bottom-left) ----- */
.cev-hud-cart {
  position: absolute; left: 20px; z-index: 25;
  bottom: calc(20px + 165px); /* arriba del HUD vitals */
  width: 320px; max-width: calc(100vw - 40px);
  padding: 8px 12px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(40,28,12,.92), rgba(20,14,6,.95));
  border: 1px solid rgba(255,210,74,.45);
  box-shadow: 0 4px 14px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,210,74,.10);
  cursor: pointer; transition: filter .15s, transform .1s;
}
.cev-hud-cart:hover { filter: brightness(1.10); transform: translateY(-1px); }
.cev-cart-hud-row {
  display: flex; align-items: center; gap: 10px;
}
.cev-cart-hud-row > i:first-child {
  font-size: 22px; color: #ffd24a; flex-shrink: 0;
}
.cev-cart-hud-text { flex: 1; min-width: 0; }
.cev-cart-hud-label {
  font-size: 10.5px; letter-spacing: .08em; font-weight: 800;
  color: rgba(255,255,255,.55); margin-bottom: 1px;
}
.cev-cart-hud-label #cev-cart-hud-status { color: #ffd24a; }
.cev-cart-hud-route {
  font-size: 13px; font-weight: 700; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cev-cart-hud-caret {
  color: rgba(255,210,74,.55); font-size: 16px; flex-shrink: 0;
}

@media (max-width: 640px) {
  .cev-hud-cart {
    left: 12px; bottom: calc(12px + 145px);
    width: calc(100vw - 24px); max-width: 280px;
    padding: 7px 10px;
  }
  .cev-cart-hud-row > i:first-child { font-size: 18px; }
  .cev-cart-hud-route { font-size: 12px; }
  body:has(.cev-hud-chat.is-open) .cev-hud-cart { display: none; }
}

/* ----- Modal de confirmación in-game ----- */
.cev-confirm-backdrop {
  position: fixed; inset: 0; z-index: 10050;
  background: rgba(0,0,0,.72);
  display: grid; place-items: center;
  padding: 20px;
}
.cev-confirm-backdrop[hidden] { display: none; }
.cev-confirm-frame {
  width: 100%; max-width: 380px;
  padding: 24px 22px 20px; border-radius: 14px;
  background: linear-gradient(180deg, #2a1d0a 0%, #1a1207 100%);
  border: 1px solid rgba(255,210,74,.50);
  box-shadow: 0 10px 40px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,210,74,.15);
  text-align: center; color: #fff;
  animation: cevConfirmIn .18s ease-out;
}
@keyframes cevConfirmIn {
  from { transform: translateY(10px) scale(.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.cev-confirm-icon {
  width: 54px; height: 54px; margin: 0 auto 12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,210,74,.22), rgba(255,210,74,.06));
  border: 1px solid rgba(255,210,74,.40);
  display: grid; place-items: center;
}
.cev-confirm-icon i { font-size: 26px; color: #ffd24a; }
.cev-confirm-title {
  font-size: 17px; font-weight: 800; color: #ffd24a;
  margin-bottom: 8px;
}
.cev-confirm-msg {
  font-size: 13.5px; line-height: 1.5;
  color: rgba(255,255,255,.85);
  margin-bottom: 18px;
}
.cev-confirm-msg b { color: #ffd24a; font-weight: 700; }
.cev-confirm-actions {
  display: flex; gap: 10px; justify-content: stretch;
}
.cev-confirm-no, .cev-confirm-yes {
  flex: 1; padding: 10px 14px; border-radius: 10px;
  font-size: 13.5px; font-weight: 700; cursor: pointer;
  transition: filter .15s, transform .1s;
  border: 1px solid;
}
.cev-confirm-no {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.18);
  color: rgba(255,255,255,.80);
}
.cev-confirm-yes {
  background: linear-gradient(180deg, #ffd24a, #c08a1a);
  border-color: rgba(255,210,74,.60);
  color: #1a1207;
}
.cev-confirm-yes.is-danger {
  background: linear-gradient(180deg, #ff7a7a, #b03838);
  border-color: rgba(255,120,120,.60);
  color: #fff;
}
.cev-confirm-no:hover, .cev-confirm-yes:hover { filter: brightness(1.10); }
.cev-confirm-no:active, .cev-confirm-yes:active { transform: translateY(1px); }

/* ===================================================================== */
/* 2026-06-17 · Boton "Ver historial" en modal territorio                 */
/* ===================================================================== */
.cev-tm-history-btn {
  width: 100%;
  margin-top: 8px;
  padding: 9px 12px;
  background: rgba(74,28,16,0.08);
  border: 1px solid rgba(92,59,28,0.4);
  border-radius: 3px;
  color: #5c3b1c;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 12px;
  letter-spacing: .08em;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.cev-tm-history-btn:hover { background: rgba(74,28,16,0.16); }
.cev-tm-history-btn i { color: #862525; font-size: 14px; }

/* ===================================================================== */
/* Modal "Historial de control de territorio" (2026-06-17)               */
/* ===================================================================== */
.cev-history-modal {
  position: fixed; inset: 0; z-index: 10050;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.cev-history-modal[hidden] { display: none; }
.cev-hist-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(4px);
}
.cev-hist-card {
  position: relative;
  width: min(640px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background:
    radial-gradient(140% 80% at 50% 0%, rgba(212,173,85,0.12), transparent 55%),
    linear-gradient(180deg, #f7e7c4, #efd9a4);
  border: 2px solid #5c3b1c;
  border-radius: 6px;
  padding: 22px 22px 18px;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.7),
    inset 0 0 0 1px rgba(255,235,180,0.5),
    inset 0 -40px 60px rgba(122,84,16,0.08);
}
.cev-hist-card::before {
  content: "";
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 60%; height: 2px;
  background: linear-gradient(90deg, transparent, #b89545, transparent);
}
.cev-hist-close {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px;
  background: rgba(74,28,16,0.1);
  border: 1px solid rgba(92,59,28,0.4);
  border-radius: 50%;
  color: #4a2c10;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.cev-hist-close:hover { background: rgba(74,28,16,0.22); }
.cev-hist-header { text-align: center; margin-bottom: 14px; }
.cev-hist-kicker {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #7a4e22;
  margin-bottom: 4px;
}
.cev-hist-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 24px; font-weight: 800;
  color: #2a1606;
  margin: 0 0 10px;
}
.cev-hist-rule {
  font-size: 12px;
  font-style: italic;
  color: #5c3b1c;
  padding: 8px 12px;
  background: rgba(255,229,179,0.5);
  border: 1px solid rgba(92,59,28,0.25);
  border-radius: 3px;
  display: inline-block;
}
.cev-hist-rule b { color: #2a1606; font-style: normal; }
.cev-hist-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 4px;
  border: 1px solid rgba(92,59,28,0.4);
}
.cev-hist-banner i { font-size: 28px; }
.cev-hist-banner-tag {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 2px;
}
.cev-hist-banner-name {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 18px; font-weight: 800;
  color: #2a1606;
  letter-spacing: 0.3px;
}
.cev-hist-banner.is-won {
  background: linear-gradient(90deg, rgba(255,215,90,0.35), rgba(212,173,85,0.18));
  border-color: #b89545;
}
.cev-hist-banner.is-won i { color: #b89545; }
.cev-hist-banner.is-won .cev-hist-banner-tag { color: #6d4d0e; }
.cev-hist-banner.is-active {
  background: rgba(184,84,84,0.12);
  border-color: rgba(134,37,37,0.5);
}
.cev-hist-banner.is-active i { color: #862525; }
.cev-hist-banner.is-active .cev-hist-banner-tag { color: #862525; }
.cev-hist-banner.is-open {
  background: rgba(60,90,60,0.08);
  border-color: rgba(46,106,46,0.4);
}
.cev-hist-banner.is-open i { color: #2d6a2d; }
.cev-hist-banner.is-open .cev-hist-banner-tag { color: #2d6a2d; }

.cev-hist-list { display: flex; flex-direction: column; gap: 6px; }
.cev-hist-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255,247,228,0.5);
  border: 1px solid rgba(92,59,28,0.25);
  border-radius: 3px;
}
.cev-hist-row.is-controller {
  background: rgba(184,84,84,0.1);
  border-color: rgba(134,37,37,0.4);
}
.cev-hist-row.is-winner {
  background: linear-gradient(90deg, rgba(255,215,90,0.25), rgba(212,173,85,0.12));
  border-color: #b89545;
  box-shadow: 0 0 0 1px rgba(212,173,85,0.4);
}
.cev-hist-rank {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 16px; font-weight: 800;
  color: #7a4e22;
  text-align: center;
}
.cev-hist-row.is-winner .cev-hist-rank { color: #6d4d0e; }
.cev-hist-info { min-width: 0; }
.cev-hist-name-line {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.cev-hist-name {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 14px; font-weight: 700;
  color: #2a1606;
}
.cev-hist-tag { color: #7a4e22; }
.cev-hist-row-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.cev-hist-row-badge.is-winner {
  color: #6d4d0e;
  background: rgba(255,215,90,0.3);
}
.cev-hist-row-badge.is-active {
  color: #862525;
  background: rgba(184,84,84,0.15);
}
.cev-hist-row-badge i { font-size: 11px; }
.cev-hist-bar {
  position: relative;
  height: 6px;
  background: rgba(74,28,16,0.16);
  border: 1px solid rgba(92,59,28,0.3);
  border-radius: 2px;
}
.cev-hist-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #b85c5c, #862525);
  border-radius: 2px 0 0 2px;
  transition: width 0.4s ease;
}
.cev-hist-row.is-winner .cev-hist-bar-fill {
  background: linear-gradient(90deg, #d4ad55, #efd58a);
}
.cev-hist-bar-threshold {
  position: absolute;
  top: -3px; bottom: -3px;
  width: 2px;
  background: #6d4d0e;
  border-radius: 1px;
}
.cev-hist-bar-threshold::after {
  content: "3h";
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  font-family: 'Cinzel', Georgia, serif;
  font-size: 8px;
  font-weight: 800;
  color: #6d4d0e;
}
.cev-hist-time {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 14px; font-weight: 800;
  color: #2a1606;
  font-variant-numeric: tabular-nums;
  min-width: 90px;
  text-align: right;
}
.cev-hist-loading,
.cev-hist-empty {
  padding: 30px 16px;
  text-align: center;
  font-size: 14px;
  color: #5c3b1c;
  font-style: italic;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.cev-hist-loading i,
.cev-hist-empty i {
  font-size: 32px;
  color: rgba(92,59,28,0.55);
  font-style: normal;
}

@media (max-width: 600px) {
  .cev-history-modal { padding: 10px; }
  .cev-hist-card { padding: 18px 14px 14px; }
  .cev-hist-title { font-size: 20px; }
  .cev-hist-row { grid-template-columns: 28px 1fr auto; padding: 8px 10px; gap: 8px; }
  .cev-hist-rank { font-size: 13px; }
  .cev-hist-name { font-size: 12px; }
  .cev-hist-time { font-size: 12px; min-width: 72px; }
  .cev-hist-banner-name { font-size: 16px; }
}

/* 2026-06-17 · Espías */
.cev-spy-head {
  background: linear-gradient(180deg, rgba(40,24,8,.65), rgba(20,12,4,.65));
  border: 1px solid rgba(255,210,74,.25);
  border-radius: 10px; padding: 12px; margin-bottom: 12px;
}
.cev-spy-intro { display: flex; gap: 10px; font-size: 12.5px; color: rgba(255,255,255,.82); line-height: 1.45; }
.cev-spy-intro i { font-size: 22px; color: #ffd24a; flex: 0 0 auto; margin-top: 2px; }
.cev-spy-intro b { color: #ffe8a3; }
.cev-spy-form { display: flex; gap: 8px; margin-top: 10px; }
.cev-spy-form select {
  flex: 1; padding: 8px 10px; border-radius: 8px;
  background: rgba(0,0,0,.35); color: #fff;
  border: 1px solid rgba(255,210,74,.30);
  font-size: 13px;
}
.cev-spy-send {
  padding: 8px 14px; border-radius: 8px;
  background: linear-gradient(180deg, #ffd24a, #c08a1a);
  border: 1px solid rgba(255,210,74,.6);
  color: #1a0f04; font-weight: 800; font-size: 12.5px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.cev-spy-send:hover { filter: brightness(1.06); }
.cev-spy-send:disabled { opacity: .55; cursor: not-allowed; }
.cev-spy-err { color: #ff7a7a; font-size: 12px; margin-top: 8px; }
.cev-spy-list { display: flex; flex-direction: column; gap: 10px; }
.cev-spy-card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-left: 3px solid rgba(106,166,255,.6);
  border-radius: 10px; padding: 10px 12px;
}
.cev-spy-card.cev-spy-done { border-left-color: #ffd24a; }
.cev-spy-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; }
.cev-spy-terr { color: #ffe8a3; font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
.cev-spy-status { color: rgba(255,255,255,.7); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.cev-spy-card.cev-spy-done .cev-spy-status { color: #ffd24a; }
.cev-spy-report { margin-top: 10px; border-top: 1px dashed rgba(255,210,74,.18); padding-top: 8px; }
.cev-spy-owner { font-size: 12px; color: rgba(255,255,255,.82); margin-bottom: 6px; }
.cev-spy-owner b { color: #ffd24a; }
.cev-spy-chars { display: flex; flex-direction: column; gap: 4px; max-height: 240px; overflow-y: auto; }
.cev-spy-char {
  padding: 6px 8px; border-radius: 6px;
  background: rgba(255,255,255,.03);
  font-size: 12.5px;
}
.cev-spy-char b { color: #fff; }
.cev-spy-tag { color: #6aa6ff; font-weight: 800; margin-right: 4px; }
.cev-spy-sub { font-size: 11px; color: rgba(255,255,255,.55); margin-top: 1px; }

/* ===================================================================== */
/* 2026-06-18 · LOBBY V3 CINEMATOGRÁFICO · Hero + Claim Premium + Cards   */
/* ===================================================================== */

.cev-lobby-v3 {
  width: 100%;
  padding: 24px 22px 80px;
  color: #f4ead9;
  font-family: 'Inter', -apple-system, sans-serif;
}

/* ========== HERO con bg del mapa + corner frames ornados ========== */
.cev-lv3-hero {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 340px;
  background: #0a0604;
  box-shadow: 0 12px 40px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,210,74,.10);
  border: 1px solid rgba(255,210,74,.18);
}
.cev-lv3-hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(.5px) saturate(1.05);
  transform: scale(1.06);
  opacity: .55;
}
.cev-lv3-hero-veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(15,9,4,.40) 0%, rgba(8,5,3,.85) 75%),
    linear-gradient(180deg, rgba(8,5,3,.30) 0%, rgba(8,5,3,.65) 100%);
}
.cev-lv3-hero-frame {
  position: absolute; inset: 12px;
  border: 1px solid rgba(255,210,74,.22);
  border-radius: 12px;
  pointer-events: none;
}
.cev-lv3-corner {
  position: absolute;
  width: 22px; height: 22px;
  border: 2px solid #ffd24a;
  filter: drop-shadow(0 0 4px rgba(255,210,74,.55));
}
.cev-lv3-corner-tl { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.cev-lv3-corner-tr { top: -2px; right: -2px; border-left: none; border-bottom: none; }
.cev-lv3-corner-bl { bottom: -2px; left: -2px; border-right: none; border-top: none; }
.cev-lv3-corner-br { bottom: -2px; right: -2px; border-left: none; border-top: none; }
.cev-lv3-hero-content {
  position: relative; z-index: 2;
  padding: 44px 28px 36px;
  text-align: center;
}
.cev-lv3-hero-emblem {
  position: relative;
  width: 78px; height: 78px;
  margin: 0 auto 14px;
  display: grid; place-items: center;
}
.cev-lv3-hero-emblem i {
  position: relative; z-index: 2;
  font-size: 40px;
  color: #ffd24a;
  filter: drop-shadow(0 0 12px rgba(255,210,74,.65));
}
.cev-lv3-hero-emblem-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,210,74,.22), rgba(255,210,74,.05) 60%, transparent 75%);
  border: 1px solid rgba(255,210,74,.45);
  box-shadow: 0 0 28px rgba(255,210,74,.30), inset 0 1px 0 rgba(255,210,74,.35);
  animation: cev-lv3-emblem 3.5s ease-in-out infinite;
}
@keyframes cev-lv3-emblem {
  0%,100% { box-shadow: 0 0 28px rgba(255,210,74,.30), inset 0 1px 0 rgba(255,210,74,.35); transform: scale(1); }
  50%     { box-shadow: 0 0 44px rgba(255,210,74,.55), inset 0 1px 0 rgba(255,210,74,.55); transform: scale(1.04); }
}
.cev-lv3-hero-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 800;
  letter-spacing: .03em;
  color: #ffd24a;
  margin: 0 0 10px;
  text-shadow: 0 0 24px rgba(255,210,74,.35), 0 2px 4px rgba(0,0,0,.65);
}
.cev-lv3-hero-divider {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 0 auto 14px;
  max-width: 360px;
}
.cev-lv3-hero-divider span {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,210,74,.55), transparent);
}
.cev-lv3-hero-divider i {
  font-size: 10px;
  color: rgba(255,210,74,.85);
  filter: drop-shadow(0 0 6px rgba(255,210,74,.55));
}
.cev-lv3-hero-tagline {
  font-size: 14px; line-height: 1.6;
  color: rgba(255,255,255,.78);
  max-width: 580px;
  margin: 0 auto 24px;
  font-style: italic;
}
.cev-lv3-hero-stats {
  display: flex; align-items: stretch; justify-content: center;
  gap: 4px;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(20,12,6,.55), rgba(8,5,3,.70));
  border: 1px solid rgba(255,210,74,.22);
  border-radius: 10px;
  backdrop-filter: blur(6px);
}
.cev-lv3-stat {
  flex: 1 1 0;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px;
  min-width: 0;
}
.cev-lv3-stat > i {
  font-size: 22px;
  color: #ffd24a;
  filter: drop-shadow(0 0 4px rgba(255,210,74,.35));
  flex: 0 0 auto;
}
.cev-lv3-stat > div { min-width: 0; }
.cev-lv3-stat-label {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .08em;
  color: rgba(255,210,74,.65);
  text-transform: uppercase;
}
.cev-lv3-stat-val {
  font-size: 13.5px; font-weight: 700;
  color: #fff;
  margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cev-lv3-stat-sep {
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255,210,74,.25), transparent);
  margin: 4px 0;
}

/* ========== CTA "Entrar al mapa" — botón cinematográfico ========== */
.cev-lv3-enter {
  position: relative;
  display: flex; align-items: center; gap: 16px;
  width: 100%;
  margin: 28px 0 0;
  padding: 20px 28px;
  background: linear-gradient(135deg, #2a1c0a 0%, #4a2e10 50%, #2a1c0a 100%);
  border: 2px solid rgba(255,210,74,.55);
  border-radius: 14px;
  color: #ffd24a;
  cursor: pointer;
  font-family: 'Cinzel', Georgia, serif;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0,0,0,.50), inset 0 1px 0 rgba(255,210,74,.22);
  transition: transform .18s ease, box-shadow .25s ease, border-color .25s ease;
}
.cev-lv3-enter:hover {
  transform: translateY(-2px);
  border-color: #ffd24a;
  box-shadow: 0 14px 36px rgba(0,0,0,.55), 0 0 40px rgba(255,210,74,.22), inset 0 1px 0 rgba(255,210,74,.40);
}
.cev-lv3-enter:active { transform: translateY(0); }
.cev-lv3-enter-shine {
  position: absolute; top: 0; left: -60%; bottom: 0;
  width: 50%;
  background: linear-gradient(110deg, transparent, rgba(255,210,74,.18) 50%, transparent);
  animation: cev-lv3-shine 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes cev-lv3-shine {
  0%, 100% { left: -60%; }
  50%      { left: 110%; }
}
.cev-lv3-enter-icon {
  font-size: 36px;
  filter: drop-shadow(0 0 10px rgba(255,210,74,.55));
  flex: 0 0 auto;
}
.cev-lv3-enter-text { flex: 1 1 auto; text-align: left; }
.cev-lv3-enter-label {
  font-size: 18px; font-weight: 800;
  letter-spacing: .12em;
  text-shadow: 0 0 12px rgba(255,210,74,.45);
}
.cev-lv3-enter-sub {
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 500;
  letter-spacing: .02em;
  color: rgba(255,210,74,.65);
  margin-top: 3px;
}
.cev-lv3-enter-arrow {
  font-size: 26px;
  flex: 0 0 auto;
  transition: transform .25s ease;
}
.cev-lv3-enter:hover .cev-lv3-enter-arrow { transform: translateX(6px); }
.cev-lv3-enter-bottom { margin-top: 40px; }

/* ========== CLAIM PREMIUM — treasure chest grande con glow ========== */
.cev-lv3-claim {
  position: relative;
  display: flex; align-items: center; gap: 20px;
  margin: 22px 0 0;
  width: 100%;
  padding: 18px 24px;
  background:
    radial-gradient(ellipse at 18% 50%, rgba(255,210,74,.10), transparent 55%),
    linear-gradient(135deg, rgba(40,26,12,.85), rgba(18,11,5,.90));
  border: 1px solid rgba(255,210,74,.30);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0,0,0,.50), inset 0 1px 0 rgba(255,210,74,.18);
}
.cev-lv3-claim.is-disabled { filter: saturate(.85); }
.cev-lv3-claim-aura {
  position: absolute;
  width: 220px; height: 220px;
  left: -40px; top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,210,74,.22), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
  animation: cev-lv3-aura 4s ease-in-out infinite;
}
@keyframes cev-lv3-aura {
  0%,100% { opacity: .55; }
  50%     { opacity: .90; }
}
.cev-lv3-claim-rays {
  position: absolute;
  width: 320px; height: 320px;
  left: -40px; top: 50%;
  transform: translateY(-50%);
  background: conic-gradient(from 0deg, transparent 0deg, rgba(255,210,74,.06) 30deg, transparent 60deg,
    transparent 120deg, rgba(255,210,74,.06) 150deg, transparent 180deg,
    transparent 240deg, rgba(255,210,74,.06) 270deg, transparent 300deg);
  opacity: .50;
  pointer-events: none;
  animation: cev-lv3-rays 18s linear infinite;
}
@keyframes cev-lv3-rays { to { transform: translateY(-50%) rotate(360deg); } }
.cev-lv3-claim-chest {
  position: relative; z-index: 2;
  width: 96px; height: 96px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,210,74,.18), rgba(255,210,74,.04) 65%, transparent 78%);
  border: 1px solid rgba(255,210,74,.35);
  box-shadow: inset 0 1px 0 rgba(255,210,74,.30), 0 0 28px rgba(255,210,74,.20);
}
.cev-lv3-claim-chest > i {
  font-size: 50px;
  color: #ffd24a;
  filter: drop-shadow(0 0 10px rgba(255,210,74,.55));
}
.cev-lv3-claim-chest-lock {
  position: absolute; bottom: -6px; right: -6px;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #5a3416, #2a1a08);
  border: 2px solid rgba(255,210,74,.55);
  box-shadow: 0 4px 12px rgba(0,0,0,.55);
}
.cev-lv3-claim-chest-lock i { font-size: 18px; color: #ffd24a; }
.cev-lv3-claim-text {
  position: relative; z-index: 2;
  flex: 1 1 auto; min-width: 0;
}
.cev-lv3-claim-eyebrow {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 11px; font-weight: 800;
  letter-spacing: .25em;
  color: rgba(255,210,74,.70);
  margin-bottom: 4px;
}
.cev-lv3-claim-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 21px; font-weight: 800;
  letter-spacing: .04em;
  color: #ffd24a;
  margin: 0 0 5px;
  text-shadow: 0 0 14px rgba(255,210,74,.30);
}
.cev-lv3-claim-desc {
  font-size: 12.5px; line-height: 1.50;
  color: rgba(255,255,255,.74);
  margin: 0 0 14px;
  max-width: 540px;
}
.cev-lv3-claim-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  color: rgba(255,255,255,.55);
  font-weight: 800; font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: not-allowed;
}
.cev-lv3-claim-btn i { font-size: 14px; }

/* ========== SECTION HEAD ornado ========== */
.cev-lv3-section { margin-top: 40px; }
.cev-lv3-section-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 14px;
}
.cev-lv3-head-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,210,74,.40), transparent);
}
.cev-lv3-section-head > i {
  font-size: 20px;
  color: #ffd24a;
  filter: drop-shadow(0 0 6px rgba(255,210,74,.40));
}
.cev-lv3-head-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 17px; font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #ffd24a;
  text-shadow: 0 0 10px rgba(255,210,74,.25);
}
.cev-lv3-section-sub {
  text-align: center;
  font-size: 13px; color: rgba(255,255,255,.62);
  margin: 0 auto 18px;
  max-width: 580px;
  font-style: italic;
}

/* ========== INFO GRID (4 cards Cómo funciona) ========== */
.cev-lv3-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) { .cev-lv3-info-grid { grid-template-columns: repeat(2, 1fr); } }
.cev-lv3-info-card {
  padding: 22px 18px;
  background: linear-gradient(180deg, rgba(28,18,8,.65), rgba(14,9,4,.80));
  border: 1px solid rgba(255,210,74,.18);
  border-radius: 12px;
  text-align: center;
  transition: transform .2s ease, border-color .25s ease, box-shadow .25s ease;
}
.cev-lv3-info-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,210,74,.40);
  box-shadow: 0 8px 24px rgba(0,0,0,.45), 0 0 24px rgba(255,210,74,.10);
}
.cev-lv3-info-glyph {
  width: 56px; height: 56px;
  margin: 0 auto 12px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,210,74,.18), rgba(255,210,74,.04));
  border: 1px solid rgba(255,210,74,.30);
  box-shadow: inset 0 1px 0 rgba(255,210,74,.25);
}
.cev-lv3-info-glyph i {
  font-size: 28px;
  color: #ffd24a;
  filter: drop-shadow(0 0 6px rgba(255,210,74,.40));
}
.cev-lv3-info-card h3 {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 15px; font-weight: 800;
  letter-spacing: .06em;
  color: #ffd24a;
  margin: 0 0 6px;
}
.cev-lv3-info-card p {
  font-size: 12.5px; line-height: 1.55;
  color: rgba(255,255,255,.70);
  margin: 0;
}
.cev-lv3-info-card p b { color: #f4ead9; font-weight: 700; }

/* ========== TERRITORIOS GRID — cards con bg image ========== */
.cev-lv3-territories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.cev-lv3-territories .cev-lv3-territory.is-capital {
  grid-column: span 2;
  min-height: 240px;
}
@media (max-width: 1280px) {
  .cev-lv3-territories { grid-template-columns: repeat(3, 1fr); }
  .cev-lv3-territories .cev-lv3-territory.is-capital { grid-column: span 1; min-height: 200px; }
}
@media (max-width: 980px)  { .cev-lv3-territories { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .cev-lv3-territories { grid-template-columns: 1fr; } }
.cev-lv3-territory {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  min-height: 200px;
  border: 1px solid var(--territory-accent, rgba(255,210,74,.25));
  box-shadow: 0 6px 20px rgba(0,0,0,.45);
  transition: transform .25s ease, box-shadow .3s ease;
}
.cev-lv3-territory:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0,0,0,.55), 0 0 24px var(--territory-accent, rgba(255,210,74,.30));
}
.cev-lv3-terr-img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: saturate(.85) brightness(.75);
  transform: scale(1.02);
  transition: transform .5s ease, filter .35s ease;
}
.cev-lv3-territory:hover .cev-lv3-terr-img {
  transform: scale(1.08);
  filter: saturate(1.05) brightness(.85);
}
.cev-lv3-terr-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8,5,3,.10) 0%, rgba(8,5,3,.45) 35%, rgba(8,5,3,.92) 90%);
}
.cev-lv3-terr-crown {
  position: absolute; top: 12px; right: 12px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px;
  background: linear-gradient(135deg, rgba(255,210,74,.92), rgba(192,138,26,.95));
  border: 1px solid rgba(255,210,74,.85);
  border-radius: 999px;
  color: #1a1207;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 10.5px; font-weight: 800;
  letter-spacing: .12em;
  z-index: 2;
  box-shadow: 0 3px 12px rgba(0,0,0,.45);
}
.cev-lv3-terr-crown i { font-size: 12px; }
.cev-lv3-terr-content {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 16px 16px;
  z-index: 2;
}
.cev-lv3-terr-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 6px;
}
.cev-lv3-terr-head > i {
  font-size: 22px;
  color: var(--territory-accent, #ffd24a);
  filter: drop-shadow(0 0 8px currentColor);
}
.cev-lv3-terr-name {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 17px; font-weight: 800;
  letter-spacing: .04em;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,.75);
}
.cev-lv3-terr-flavor {
  font-size: 11.5px; font-style: italic;
  color: rgba(255,255,255,.62);
  margin-bottom: 10px;
}
.cev-lv3-terr-rewards {
  display: flex; gap: 8px;
}
.cev-lv3-terr-rw {
  flex: 1 1 0;
  display: flex; align-items: center; gap: 7px;
  padding: 7px 10px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 8px;
  backdrop-filter: blur(4px);
}
.cev-lv3-terr-rw > i { font-size: 16px; flex: 0 0 auto; }
.cev-lv3-terr-rw-gold > i { color: #ffd24a; filter: drop-shadow(0 0 4px rgba(255,210,74,.40)); }
.cev-lv3-terr-rw-gem  > i { color: #b884ff; filter: drop-shadow(0 0 4px rgba(184,132,255,.40)); }
.cev-lv3-terr-rw b {
  font-family: 'JetBrains Mono', 'Roboto Mono', monospace;
  font-size: 14px; font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.cev-lv3-terr-rw span {
  font-size: 10px;
  color: rgba(255,255,255,.55);
  letter-spacing: .04em;
  flex: 1 1 auto;
  text-align: right;
}
.cev-lv3-territory.is-capital {
  border-color: rgba(255,210,74,.55);
  background: rgba(40,26,12,.40);
}
.cev-lv3-territory.is-capital .cev-lv3-terr-name { color: #ffd24a; }

/* Cofre diario por territorio */
.cev-lv3-terr-box {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px; font-weight: 700;
  letter-spacing: .03em;
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.10);
}
.cev-lv3-terr-box > i { font-size: 16px; flex: 0 0 auto; }
.cev-lv3-terr-box span { line-height: 1.2; }
.cev-lv3-terr-box-uncommon {
  background: linear-gradient(135deg, rgba(95,214,132,.18), rgba(95,214,132,.06));
  border-color: rgba(95,214,132,.45);
  color: #aef0c4;
}
.cev-lv3-terr-box-uncommon > i {
  color: #5fd684;
  filter: drop-shadow(0 0 4px rgba(95,214,132,.55));
}
.cev-lv3-terr-box-rare {
  background: linear-gradient(135deg, rgba(122,138,168,.22), rgba(122,138,168,.06));
  border-color: rgba(150,170,210,.55);
  color: #d0dcff;
}
.cev-lv3-terr-box-rare > i {
  color: #93a8ff;
  filter: drop-shadow(0 0 6px rgba(147,168,255,.65));
}

/* Owner badge (territorios conquistados) */
.cev-lv3-terr-owner {
  display: flex; align-items: center; gap: 7px;
  margin: 6px 0 10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(4px);
  font-size: 11.5px;
}
.cev-lv3-terr-owner > i {
  font-size: 14px;
  flex: 0 0 auto;
}
.cev-lv3-terr-owner-label {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
  font-size: 10px;
  opacity: .85;
}
.cev-lv3-terr-owner-name {
  font-weight: 800;
  color: #fff;
  margin-left: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.cev-lv3-terr-owner.is-mine {
  background: rgba(95,214,132,.18);
  border-color: rgba(95,214,132,.55);
  color: #5fd684;
}
.cev-lv3-terr-owner.is-mine > i { color: #5fd684; filter: drop-shadow(0 0 4px rgba(95,214,132,.50)); }
.cev-lv3-terr-owner.is-enemy {
  background: rgba(255,124,74,.16);
  border-color: rgba(255,124,74,.50);
  color: #ff9b6a;
}
.cev-lv3-terr-owner.is-enemy > i { color: #ff9b6a; filter: drop-shadow(0 0 4px rgba(255,124,74,.45)); }

/* Borde resaltado del card según owner */
.cev-lv3-territory.is-owned-mine {
  border-color: rgba(95,214,132,.55) !important;
  box-shadow: 0 6px 22px rgba(0,0,0,.45), 0 0 18px rgba(95,214,132,.18);
}
.cev-lv3-territory.is-owned-enemy {
  border-color: rgba(255,124,74,.45) !important;
}

/* ========== MOBILE ========== */
@media (max-width: 720px) {
  .cev-lobby-v3 { padding: 14px 10px 60px; }
  .cev-lv3-hero { min-height: 280px; }
  .cev-lv3-hero-content { padding: 30px 16px 24px; }
  .cev-lv3-hero-emblem { width: 64px; height: 64px; }
  .cev-lv3-hero-emblem i { font-size: 32px; }
  .cev-lv3-hero-stats { flex-direction: column; gap: 8px; padding: 10px; }
  .cev-lv3-stat { width: 100%; padding: 6px; }
  .cev-lv3-stat-sep { display: none; }
  .cev-lv3-enter { padding: 16px 18px; gap: 12px; }
  .cev-lv3-enter-icon { font-size: 28px; }
  .cev-lv3-enter-label { font-size: 15px; letter-spacing: .10em; }
  .cev-lv3-enter-sub { font-size: 11px; }
  .cev-lv3-enter-arrow { font-size: 22px; }
  .cev-lv3-claim {
    flex-direction: column; align-items: center; text-align: center;
    padding: 22px 18px; gap: 16px;
  }
  .cev-lv3-claim-aura, .cev-lv3-claim-rays {
    left: 50%; transform: translate(-50%, -50%); top: 80px;
  }
  .cev-lv3-claim-chest { width: 110px; height: 110px; }
  .cev-lv3-claim-chest > i { font-size: 56px; }
  .cev-lv3-claim-title { font-size: 22px; }
  .cev-lv3-claim-desc { font-size: 12.5px; }
  .cev-lv3-info-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cev-lv3-info-card { padding: 16px 12px; }
  .cev-lv3-info-glyph { width: 48px; height: 48px; }
  .cev-lv3-info-glyph i { font-size: 24px; }
  .cev-lv3-info-card h3 { font-size: 13.5px; }
  .cev-lv3-info-card p { font-size: 11.5px; }
  .cev-lv3-territories { grid-template-columns: 1fr; gap: 12px; }
  .cev-lv3-territory { min-height: 180px; }
  .cev-lv3-head-title { font-size: 14px; letter-spacing: .10em; }
}

/* ========== TIMER DINÁMICO (countdown a fase) ========== */
.cev-lv3-timer {
  display: inline-flex; align-items: center; gap: 14px;
  margin: 18px auto 0;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255,210,74,.40);
  background: linear-gradient(180deg, rgba(40,26,12,.80), rgba(18,11,5,.85));
  box-shadow: 0 4px 18px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,210,74,.18);
}
.cev-lv3-timer > i {
  font-size: 22px;
  color: #ffd24a;
  filter: drop-shadow(0 0 6px rgba(255,210,74,.55));
}
.cev-lv3-timer.is-open > i { color: #ff7c4a; filter: drop-shadow(0 0 6px rgba(255,124,74,.6)); animation: cev-lv3-pulse 1.4s ease-in-out infinite; }
.cev-lv3-timer.is-between > i { color: #6aa6ff; filter: drop-shadow(0 0 6px rgba(106,166,255,.55)); }
@keyframes cev-lv3-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.cev-lv3-timer-text { display: flex; flex-direction: column; align-items: flex-start; }
.cev-lv3-timer-label {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 11px; font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,210,74,.70);
}
.cev-lv3-timer-val {
  font-family: 'JetBrains Mono', 'Roboto Mono', monospace;
  font-size: 22px; font-weight: 800;
  color: #ffd24a;
  letter-spacing: .04em;
  margin-top: 1px;
  text-shadow: 0 0 10px rgba(255,210,74,.25);
  font-variant-numeric: tabular-nums;
}

/* Enrolled badge en hero stats */
.cev-lv3-enrolled-pill {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 10.5px; font-weight: 800;
  letter-spacing: .04em;
  border-radius: 999px;
  background: rgba(95,214,132,.18);
  border: 1px solid rgba(95,214,132,.50);
  color: #5fd684;
  vertical-align: middle;
}
.cev-lv3-enrolled-pill i { font-size: 11px; }
.cev-lv3-enrolled-pill.is-off {
  background: rgba(255,124,74,.16);
  border-color: rgba(255,124,74,.50);
  color: #ff9b6a;
}

/* Disabled state del enter button */
.cev-lv3-enter.is-disabled,
.cev-lv3-enter[disabled] {
  cursor: not-allowed;
  filter: saturate(.4);
  opacity: .65;
}
.cev-lv3-enter.is-disabled:hover,
.cev-lv3-enter[disabled]:hover {
  transform: none;
  border-color: rgba(255,210,74,.30);
  box-shadow: 0 8px 28px rgba(0,0,0,.50), inset 0 1px 0 rgba(255,210,74,.10);
}
.cev-lv3-enter.is-disabled .cev-lv3-enter-shine,
.cev-lv3-enter[disabled] .cev-lv3-enter-shine { animation: none; opacity: 0; }

/* Claim card: chips de breakdown + último claim */
.cev-lv3-claim-list {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 10px 0 14px;
}
.cev-lv3-claim-chip {
  display: inline-flex; align-items: center;
  padding: 4px 9px;
  font-size: 11px; font-weight: 700;
  border-radius: 999px;
  background: rgba(255,210,74,.10);
  border: 1px solid rgba(255,210,74,.30);
  color: rgba(255,255,255,.85);
  font-variant-numeric: tabular-nums;
}
.cev-lv3-claim-last {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 6px 0 12px;
  padding: 7px 12px;
  font-size: 12px;
  background: rgba(95,214,132,.10);
  border: 1px solid rgba(95,214,132,.30);
  border-radius: 8px;
  color: #5fd684;
}
.cev-lv3-claim-last i { font-size: 13px; }
.cev-lv3-claim:not(.is-disabled) .cev-lv3-claim-btn {
  background: linear-gradient(180deg, #ffd24a, #c08a1a);
  border-color: rgba(255,210,74,.60);
  color: #1a1207;
  cursor: pointer;
}
.cev-lv3-claim:not(.is-disabled) .cev-lv3-claim-btn:hover { filter: brightness(1.10); }

/* Legacy hero-crown (mantengo por compat con cualquier otro lugar) */
.cev-hero-crown {
  width: 64px; height: 64px;
  margin: 0 auto 12px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,210,74,.20), rgba(255,210,74,.04) 65%, transparent 75%);
  border: 1px solid rgba(255,210,74,.40);
  box-shadow: 0 0 24px rgba(255,210,74,.22), inset 0 1px 0 rgba(255,210,74,.30);
  animation: cev-crown-glow 3s ease-in-out infinite;
}
.cev-hero-crown i {
  font-size: 32px;
  color: #ffd24a;
  filter: drop-shadow(0 0 6px rgba(255,210,74,.55));
}
@keyframes cev-crown-glow {
  0%, 100% { box-shadow: 0 0 24px rgba(255,210,74,.22), inset 0 1px 0 rgba(255,210,74,.30); }
  50%      { box-shadow: 0 0 32px rgba(255,210,74,.40), inset 0 1px 0 rgba(255,210,74,.45); }
}

/* Claim card — disabled state hasta que se libere el cierre del evento */
.cev-claim-card {
  display: flex; align-items: center; gap: 16px;
  width: 100%; max-width: 720px; margin: 24px auto 0;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(40,26,12,.78), rgba(20,12,6,.85));
  border: 1px solid rgba(255,210,74,.30);
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(0,0,0,.40), inset 0 1px 0 rgba(255,210,74,.10);
  position: relative; overflow: hidden;
}
.cev-claim-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at top right, rgba(255,210,74,.10), transparent 60%);
  pointer-events: none;
}
.cev-claim-card.is-disabled {
  opacity: .85;
  border-color: rgba(255,255,255,.10);
}
.cev-claim-left {
  flex: 1 1 auto;
  display: flex; align-items: center; gap: 14px;
  position: relative; z-index: 1;
}
.cev-claim-icon {
  width: 48px; height: 48px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,210,74,.18), rgba(255,210,74,.04));
  border: 1px solid rgba(255,210,74,.35);
}
.cev-claim-icon i { font-size: 24px; color: #ffd24a; }
.cev-claim-card.is-disabled .cev-claim-icon {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border-color: rgba(255,255,255,.12);
}
.cev-claim-card.is-disabled .cev-claim-icon i { color: rgba(255,255,255,.45); }
.cev-claim-text { flex: 1 1 auto; min-width: 0; }
.cev-claim-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 16px; font-weight: 800; letter-spacing: .04em;
  color: #ffd24a; margin-bottom: 4px;
}
.cev-claim-card.is-disabled .cev-claim-title { color: rgba(255,255,255,.78); }
.cev-claim-sub {
  font-size: 12.5px; line-height: 1.45;
  color: rgba(255,255,255,.62);
}
.cev-claim-btn {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(180deg, #ffd24a, #c08a1a);
  border: 1px solid rgba(255,210,74,.60);
  border-radius: 10px;
  color: #1a1207; font-weight: 800; font-size: 13.5px;
  letter-spacing: .03em;
  cursor: pointer;
  transition: filter .15s, transform .1s;
  position: relative; z-index: 1;
}
.cev-claim-btn:hover:not([disabled]) { filter: brightness(1.08); }
.cev-claim-btn:active:not([disabled]) { transform: translateY(1px); }
.cev-claim-btn[disabled] {
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
  border-color: rgba(255,255,255,.15);
  color: rgba(255,255,255,.50);
  cursor: not-allowed;
}
.cev-claim-btn i { font-size: 14px; }

/* Tabla de rewards por territorio */
.cev-rewards-block {
  width: 100%; max-width: 720px; margin: 22px auto 0;
  padding: 18px 18px 14px;
  background: linear-gradient(180deg, rgba(20,12,6,.65), rgba(12,7,3,.80));
  border: 1px solid rgba(255,210,74,.22);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,210,74,.08);
}
.cev-rewards-head {
  display: flex; align-items: center; gap: 10px;
  padding: 0 4px 12px;
  border-bottom: 1px solid rgba(255,210,74,.18);
  margin-bottom: 10px;
}
.cev-rewards-head i { font-size: 20px; color: #ffd24a; filter: drop-shadow(0 0 6px rgba(255,210,74,.30)); }
.cev-rewards-head span {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 14.5px; font-weight: 800;
  letter-spacing: .06em; color: #ffd24a;
  text-transform: uppercase;
}
.cev-rewards-table { display: flex; flex-direction: column; gap: 4px; }
.cev-rewards-row {
  display: grid;
  grid-template-columns: 1fr 110px 110px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.025);
  border-left: 3px solid var(--territory-accent, rgba(255,210,74,.35));
  transition: background .15s;
}
.cev-rewards-row:hover { background: rgba(255,255,255,.06); }
.cev-rewards-row.cev-rewards-head-row {
  background: transparent;
  border-left: 3px solid transparent;
  padding: 6px 10px;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,210,74,.60);
}
.cev-rewards-row.cev-rewards-head-row:hover { background: transparent; }
.cev-rewards-row.is-capital {
  background: linear-gradient(90deg, rgba(191,165,90,.10), rgba(255,255,255,.02));
}
.cev-rewards-row.is-capital:hover { background: linear-gradient(90deg, rgba(191,165,90,.18), rgba(255,255,255,.06)); }
.cev-rewards-name-col {
  display: flex; align-items: center; gap: 9px;
  font-size: 13.5px; font-weight: 700;
  color: rgba(255,255,255,.92);
}
.cev-rewards-name-col i { font-size: 17px; flex: 0 0 auto; filter: drop-shadow(0 0 5px currentColor); }
.cev-rewards-cap-badge {
  font-size: 9.5px; font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(191,165,90,.20);
  border: 1px solid rgba(191,165,90,.40);
  color: #ffd24a;
  letter-spacing: .08em;
}
.cev-rewards-row.cev-rewards-head-row .cev-rewards-num {
  color: rgba(255,210,74,.60);
  font-weight: 700;
}
.cev-rewards-num {
  display: flex; align-items: center; justify-content: flex-end; gap: 6px;
  font-family: 'JetBrains Mono', 'Roboto Mono', monospace;
  font-size: 13.5px; font-weight: 700;
  color: #f5edd6;
  font-variant-numeric: tabular-nums;
}
.cev-rewards-num i { font-size: 14px; opacity: .85; }
.cev-rewards-row.cev-rewards-head-row .cev-rewards-num i { font-size: 13px; }
.cev-rewards-foot {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(106,166,255,.08);
  border: 1px solid rgba(106,166,255,.20);
  font-size: 12px; line-height: 1.5;
  color: rgba(255,255,255,.72);
}
.cev-rewards-foot i { font-size: 14px; color: #6aa6ff; flex: 0 0 auto; margin-top: 1px; }

/* Mobile shrink */
@media (max-width: 600px) {
  .cev-claim-card { flex-direction: column; align-items: stretch; gap: 14px; padding: 14px; }
  .cev-claim-left { flex-direction: row; }
  .cev-claim-btn { width: 100%; justify-content: center; }
  .cev-rewards-block { padding: 14px 10px 10px; }
  .cev-rewards-row { grid-template-columns: 1fr 78px 70px; padding: 8px 8px; gap: 6px; }
  .cev-rewards-name-col { font-size: 12.5px; }
  .cev-rewards-name-col i { font-size: 15px; }
  .cev-rewards-cap-badge { font-size: 9px; padding: 1px 4px; }
  .cev-rewards-num { font-size: 12.5px; }
  .cev-rewards-num i { font-size: 12px; }
  .cev-rewards-head span { font-size: 12.5px; }
  .cev-hero-crown { width: 56px; height: 56px; margin-bottom: 8px; }
  .cev-hero-crown i { font-size: 28px; }
}


/* === 2026-06-19 · Ver Daño · top PvE + PvP + stats del clan === */
.cev-dmg-section { margin-bottom: 18px; }
.cev-dmg-section:last-of-type { margin-bottom: 12px; }
.cev-dmg-section-title {
  font-family: 'Cinzel', serif; font-size: 14px; font-weight: 700;
  color: #f0d27a; letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 8px; padding-bottom: 6px;
  border-bottom: 1px solid rgba(240, 210, 122, 0.25);
  display: flex; align-items: center; gap: 8px;
}
.cev-dmg-section-title i { font-size: 16px; }

.cev-dmg-list { display: flex; flex-direction: column; gap: 4px; }
.cev-dmg-row {
  display: grid; grid-template-columns: 32px 1fr auto;
  align-items: center; gap: 10px;
  padding: 6px 10px;
  background: rgba(20, 14, 8, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
}
.cev-dmg-row:hover { background: rgba(35, 24, 12, 0.6); }
.cev-dmg-rank {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #d4c896;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.cev-dmg-rank-gold   { background: linear-gradient(135deg, #f5d670, #b8923a); color: #1a1208; }
.cev-dmg-rank-silver { background: linear-gradient(135deg, #d8d8d8, #909090); color: #1a1208; }
.cev-dmg-rank-bronze { background: linear-gradient(135deg, #d49858, #8f5b2a); color: #1a1208; }

.cev-dmg-info { min-width: 0; }
.cev-dmg-name {
  font-size: 13px; color: #ece2c4; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cev-dmg-guild { color: #b89a5a; font-weight: 500; margin-left: 4px; }
.cev-dmg-extras {
  font-size: 11px; color: #a08960;
  margin-top: 2px;
  display: flex; gap: 8px; align-items: center;
}
.cev-dmg-extras i { font-size: 10px; }
.cev-dmg-value {
  font-family: 'Cinzel', serif;
  font-size: 15px; font-weight: 700; color: #f5d670;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(245, 214, 112, 0.25);
}

.cev-dmg-clan {
  margin-top: 14px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(35, 26, 14, 0.85), rgba(20, 14, 8, 0.85));
  border: 1px solid rgba(240, 210, 122, 0.28);
  border-radius: 8px;
}
.cev-dmg-clan-title {
  font-family: 'Cinzel', serif; font-size: 13px; font-weight: 700;
  color: #f0d27a; letter-spacing: 0.5px; text-transform: uppercase;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.cev-dmg-clan-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.cev-dmg-clan-cell {
  text-align: center;
  padding: 8px 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}
.cev-dmg-clan-label {
  font-size: 10px; color: #a08960;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.cev-dmg-clan-val {
  font-family: 'Cinzel', serif;
  font-size: 18px; font-weight: 700; color: #f5d670;
  text-shadow: 0 0 10px rgba(245, 214, 112, 0.3);
}
.cev-dmg-clan-sub { font-size: 10px; color: #80684a; margin-top: 2px; }

@media (max-width: 540px) {
  .cev-dmg-row { padding: 5px 8px; grid-template-columns: 26px 1fr auto; gap: 8px; }
  .cev-dmg-rank { width: 24px; height: 24px; font-size: 12px; }
  .cev-dmg-name { font-size: 12px; }
  .cev-dmg-value { font-size: 13px; }
  .cev-dmg-clan-grid { gap: 6px; }
  .cev-dmg-clan-cell { padding: 6px 4px; }
  .cev-dmg-clan-val { font-size: 15px; }
}

/* === 2026-06-20 · Ver Daño v2 · modal ancho + roster del clan === */
.cev-info-card.cev-info-wide {
  max-width: min(960px, 96vw) !important;
  width: 960px;
}

.cev-dmg-clan-count {
  margin-left: auto;
  font-size: 11px;
  color: #a08960;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: none;
}
.cev-dmg-clan-title { display: flex; align-items: center; gap: 6px; }

.cev-dmg-members-title {
  margin-top: 14px; margin-bottom: 8px;
  font-family: 'Cinzel', serif; font-size: 12.5px; font-weight: 700;
  color: #f0d27a; letter-spacing: 1px; text-transform: uppercase;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(240, 210, 122, 0.22);
}

.cev-dmg-members-wrap {
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
}
.cev-dmg-members {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.cev-dmg-members thead th {
  position: sticky; top: 0;
  background: rgba(20, 14, 8, 0.96);
  padding: 8px 10px;
  text-align: left;
  font-family: 'Cinzel', serif;
  font-size: 11px; font-weight: 700;
  color: #b89a5a; letter-spacing: 0.6px; text-transform: uppercase;
  border-bottom: 1px solid rgba(240, 210, 122, 0.2);
  z-index: 1;
}
.cev-dmg-members .cev-dmg-th-num { text-align: right; }

.cev-dmg-members tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.cev-dmg-members tbody tr:nth-child(odd) { background: rgba(20, 14, 8, 0.35); }
.cev-dmg-members tbody tr:hover { background: rgba(35, 24, 12, 0.55); }
.cev-dmg-members td {
  padding: 7px 10px;
  color: #ece2c4;
}
.cev-dmg-td-rank {
  color: #80684a; font-weight: 600;
  text-align: center;
}
.cev-dmg-td-name { font-weight: 600; }
.cev-dmg-td-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.cev-dmg-td-total {
  font-family: 'Cinzel', serif;
  color: #f5d670; font-weight: 700;
}

@media (max-width: 720px) {
  .cev-info-card.cev-info-wide { width: 100% !important; max-width: 96vw !important; }
  .cev-dmg-members thead th { padding: 6px 6px; font-size: 10px; }
  .cev-dmg-members td { padding: 5px 6px; font-size: 11.5px; }
  .cev-dmg-members .cev-dmg-th-num,
  .cev-dmg-members .cev-dmg-td-num { font-size: 11px; }
  .cev-dmg-clan-count { font-size: 10px; }
}

/* ====== 2026-06-20 · Botones plegar/desplegar HUDs (menu + vitales) ====== */
/* Botones FIXED (no dependen del HUD padre — siempre visibles y clickeables) */
.cev-collapse-btn {
  position: fixed;
  z-index: 60;
  width: 36px; height: 56px;
  border: 2px solid #d4a55b;
  border-left: none;
  border-radius: 0 10px 10px 0;
  background: linear-gradient(180deg, #3a2410 0%, #1a0f06 100%);
  color: #f4d68a;
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    3px 3px 12px rgba(0,0,0,.7),
    inset 0 0 0 1px rgba(244, 214, 138, .15),
    0 0 18px rgba(244, 214, 138, .25);
  transition: all .25s ease, transform .28s cubic-bezier(.4,.0,.2,1);
  pointer-events: auto;
  padding: 0;
}
.cev-collapse-btn:hover {
  background: linear-gradient(180deg, #5a3818, #2a1808);
  color: #fff;
  box-shadow: 3px 3px 16px rgba(0,0,0,.8), 0 0 24px rgba(244, 214, 138, .55);
  width: 40px;
}
.cev-collapse-btn:active { filter: brightness(.85); }
.cev-collapse-btn i { transition: transform .25s ease; line-height: 1; }

/* Glow sutil estático (sin animación · evita repaint constante en mobile) */

/* MENU: el HUD vive en left:18px width:180px (PC) o left:8px width:150px (mobile) */
.cev-hud-menu { transition: transform .28s cubic-bezier(.4,.0,.2,1); }
.cev-collapse-menu {
  left: calc(18px + 180px);
  top: 50%;
  transform: translateY(-50%);
  transition: left .28s cubic-bezier(.4,.0,.2,1), background .25s ease, color .25s ease, width .25s ease, box-shadow .25s ease;
}
.cev-hud-menu.is-collapsed { transform: translateY(-50%) translateX(-200%); }
body:has(.cev-hud-menu.is-collapsed) .cev-collapse-menu { left: 0; }
body:has(.cev-hud-menu.is-collapsed) .cev-collapse-menu i { transform: rotate(180deg); }

/* VITALS: el HUD vive abajo izq (bottom:20px, left:20px, width:280px en PC) */
.cev-hud-vitals { transition: transform .28s cubic-bezier(.4,.0,.2,1); }
.cev-collapse-vitals {
  left: calc(20px + 280px);
  bottom: 32px;
  top: auto;
  transform: none;
  transition: left .28s cubic-bezier(.4,.0,.2,1), background .25s ease, color .25s ease, width .25s ease, box-shadow .25s ease;
}
.cev-hud-vitals.is-collapsed { transform: translateX(-200%); }
body:has(.cev-hud-vitals.is-collapsed) .cev-collapse-vitals { left: 0; }
body:has(.cev-hud-vitals.is-collapsed) .cev-collapse-vitals i { transform: rotate(180deg); }

@media (max-width: 720px) {
  .cev-collapse-btn { width: 32px; height: 50px; font-size: 18px; }
  .cev-collapse-btn:hover { width: 36px; }
  .cev-collapse-menu { left: calc(8px + 150px); }
  .cev-collapse-vitals {
    left: calc(12px + min(280px, calc(100vw - 24px)));
    bottom: 24px;
  }

  /* PERFORMANCE FIX mobile: quitar backdrop-filter en HUDs (causa lag pesado al mover el mapa).
     El blur GPU se recalcula en cada repaint del mapa móvil. */
  .cev-hud { backdrop-filter: none !important; }
  .cev-tm-backdrop { backdrop-filter: none !important; }
  .cev-info-backdrop { backdrop-filter: none !important; }

  /* iOS standalone PWA: respetar safe-area (notch/Dynamic Island) en HUDs top */
  .cev-hud-exit   { top: calc(12px + env(safe-area-inset-top, 0px)); }
  .cev-hud-wallet { top: calc(12px + env(safe-area-inset-top, 0px)); }
  .cev-hud-travel { top: calc(80px + env(safe-area-inset-top, 0px)); }
  .cev-hud-zoom   { right: calc(12px + env(safe-area-inset-right, 0px)); }

  /* CHAT en mobile cerrado → globo circular (no tapa el botón de vitales) */
  .cev-hud-chat:not(.is-open) {
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    right: 12px;
    bottom: 12px;
    overflow: hidden;
  }
  .cev-hud-chat:not(.is-open) .cev-chat-toggle {
    width: 56px; height: 56px;
    padding: 0;
    justify-content: center;
  }
  .cev-hud-chat:not(.is-open) .cev-chat-toggle span,
  .cev-hud-chat:not(.is-open) .cev-chat-caret { display: none; }
  .cev-hud-chat:not(.is-open) .cev-chat-toggle i { font-size: 24px; margin: 0; }
}

/* ====== 2026-06-20 · Mobile responsive fix — modales sobre HUDs ====== */
/* Cuando un modal está abierto en mobile, ocultamos los HUDs que tapan el contenido.
   En PC los HUDs quedan visibles porque hay espacio. */
@media (max-width: 720px) {
  /* Tooltip de hover no tiene sentido en touch — siempre oculto en mobile */
  #cev-node-tip { display: none !important; }

  /* Con modal de territorio o info abierto: ocultar HUDs intrusivos */
  body:has(.cev-territory-modal:not([hidden])) .cev-hud-menu,
  body:has(.cev-territory-modal:not([hidden])) .cev-hud-chat,
  body:has(.cev-territory-modal:not([hidden])) .cev-hud-vitals,
  body:has(.cev-territory-modal:not([hidden])) .cev-hud-zoom,
  body:has(.cev-territory-modal:not([hidden])) .cev-hud-travel,
  body:has(.cev-territory-modal:not([hidden])) .cev-hud-cart,
  body:has(.cev-territory-modal:not([hidden])) .cev-hud-wallet,
  body:has(.cev-info-modal:not([hidden])) .cev-hud-menu,
  body:has(.cev-info-modal:not([hidden])) .cev-hud-chat,
  body:has(.cev-info-modal:not([hidden])) .cev-hud-vitals,
  body:has(.cev-info-modal:not([hidden])) .cev-hud-zoom,
  body:has(.cev-info-modal:not([hidden])) .cev-hud-travel,
  body:has(.cev-info-modal:not([hidden])) .cev-hud-cart,
  body:has(.cev-info-modal:not([hidden])) .cev-hud-wallet {
    display: none !important;
  }

  /* El modal de territorio: CENTRADO con scroll interno cuando no entra */
  .cev-territory-modal {
    overflow-y: auto;
    padding: 12px 0;
    align-items: center;
    place-items: center;
  }
  .cev-tm-card {
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    width: min(440px, 94vw);
    margin: auto;
  }
  /* Modal info (Viajes/Ranking/Daño/Clan) también centrado */
  .cev-info-modal {
    align-items: center;
    place-items: center;
  }
  .cev-info-card { margin: auto; }

  /* PERFORMANCE mobile · MATAR todas las animaciones infinitas del mapa.
     Cada una repinta su área en cada frame — multiplicado por N nodos en pantalla
     genera lag al mover el mapa. PC mantiene la polish, mobile prioriza fps. */
  .cev-map-edges line,
  .cev-build-ring,
  .cev-traveler,
  .cev-current,
  .cev-travel-path,
  .cev-travel-path-bg,
  .cev-notif-btn,
  .cev-gt--total_war {
    animation: none !important;
  }
  /* Promover el world a su propio GPU layer y deshabilitar transición SIEMPRE
     en mobile (no solo durante drag) para que el rAF nunca anime el transform */
  .cev-map-world {
    transition: none !important;
    will-change: transform;
    transform: translateZ(0);
  }
  .cev-map-viewport {
    -webkit-overflow-scrolling: touch;
    will-change: transform;
  }
}
