/* ============================================================
   Mesa de juego (mapa de batalla) — panel de DM y ficha del jugador
   ============================================================ */
.mt { display: flex; flex-direction: column; gap: 10px; height: 100%; min-height: 0; }
.mt-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mt-barra .campo { width: auto; min-width: 150px; margin: 0; padding: 7px 10px; }
.mt-titulo { font-weight: 800; font-size: 1.05em; }
.mt-estado { margin-left: auto; font-size: .92em; color: var(--tenue); }
.mt-estado b { color: var(--texto); }
.mt-herr { display: inline-flex; background: var(--panel-2); border-radius: 12px; padding: 3px; gap: 2px; }
.mt-herr button { border: 0; background: transparent; color: var(--texto); font: inherit; font-size: .86em; font-weight: 700; padding: 6px 9px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.mt-herr button.activo { background: var(--superficie); box-shadow: 0 1px 4px rgba(0,0,0,.12); color: var(--acento-texto); }

.mt-cuerpo { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 12px; }
.mt-vista { position: relative; overflow: hidden; border-radius: var(--radio); background: #1b1820; border: 1px solid var(--borde); touch-action: none; user-select: none; -webkit-user-select: none; min-height: 360px; outline: none; cursor: grab; }
.mt-vista:active { cursor: grabbing; }
.mt-lienzo { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.mt-img { position: absolute; left: 0; top: 0; display: block; pointer-events: none; }
.mt-svg { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.mt-grilla { stroke: rgba(255, 255, 255, .35); fill: none; mix-blend-mode: normal; }
.mt-alcance { fill: rgba(130, 200, 255, .28); stroke: rgba(130, 200, 255, .55); stroke-width: 1.5; }
.mt-niebla { fill: #0d0b10; }
.mt-niebla.dm { fill: rgba(20, 16, 30, .55); stroke: rgba(200, 180, 255, .35); stroke-width: 1; }
.mt-pincel { fill: rgba(40, 30, 60, .6); }
.mt-pincel.borrar { fill: rgba(255, 210, 120, .45); }
.mt-hover { fill: rgba(255, 255, 255, .18); stroke: #fff; stroke-width: 2; }
.mt-hover.mal { fill: rgba(240, 80, 100, .3); stroke: #f05064; }
.mt-zonas text { text-anchor: middle; opacity: .7; }
.mt-capa { position: absolute; inset: 0; }

/* fichas */
.mt-ficha { position: absolute; display: flex; align-items: center; justify-content: center; transition: left .25s ease, top .25s ease; z-index: 2; }
.mt-ficha.arrastrando { transition: none; z-index: 5; opacity: .9; }
.mt-ficha.t-movible { cursor: grab; }
.mt-disco { position: relative; width: 86%; height: 86%; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: hsl(205 45% 42%); color: #fff; font-weight: 900; border: max(2px, calc(var(--celda) * .06)) solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.45); }
.mt-disco img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.mt-disco span { font-size: calc(var(--celda) * .38); line-height: 1; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.mt-disco small { font-size: .55em; margin-left: 1px; }
.mt-ficha.t-mio .mt-disco { border-color: var(--oro); }
.mt-ficha.t-enemigo .mt-disco { background: hsl(350 50% 40%); border-color: #f3c7cf; }
.mt-ficha.t-turno .mt-disco { box-shadow: 0 0 0 max(3px, calc(var(--celda) * .07)) #ffd25e, 0 0 calc(var(--celda) * .4) #ffd25e; }
.mt-ficha.t-sel .mt-disco { outline: max(2px, calc(var(--celda) * .05)) dashed #8fd0ff; outline-offset: 2px; }
.mt-ficha.t-caido .mt-disco { filter: grayscale(1) brightness(.6); }
.mt-ficha.t-caido .mt-disco::after { content: "✝"; position: absolute; font-size: calc(var(--celda) * .5); color: #fff; }
.mt-ficha.t-oculto { opacity: .55; }
.mt-ficha.t-oculto .mt-disco { border-style: dashed; }
/* el nombre nunca pasa de ~11 px en pantalla ni de un cuarto de la casilla */
.mt-nombre { position: absolute; top: 100%; left: 50%; transform: translate(-50%, -25%); white-space: nowrap; font-size: min(calc(var(--celda) * .26), calc(11px / var(--z, 1)));
  font-weight: 700; line-height: 1.25; color: #fff; background: rgba(15, 12, 20, .68); padding: 0 .4em; border-radius: .4em; pointer-events: none; max-width: 260%; overflow: hidden; text-overflow: ellipsis; }
.mt-ficha:hover .mt-nombre, .mt-ficha.t-sel .mt-nombre { max-width: none; z-index: 3; }
.mt-vida { position: absolute; bottom: 4%; left: 14%; right: 14%; height: max(3px, calc(var(--celda) * .07)); background: rgba(0,0,0,.6); border-radius: 3px; overflow: hidden; pointer-events: none; }
.mt-vida i { display: block; height: 100%; }
.mt-vida i.alta { background: var(--vida-alta); } .mt-vida i.media { background: var(--vida-media); } .mt-vida i.baja { background: var(--vida-baja); }
.mt-salud { position: absolute; top: -6%; right: -4%; font-size: min(calc(var(--celda) * .2), calc(10px / var(--z, 1))); font-weight: 800; padding: 0 .35em; border-radius: .35em; background: #3b6; color: #fff; pointer-events: none; }
.mt-salud.s-herido { background: #c4973a; } .mt-salud.s-grave { background: #c25467; } .mt-salud.s-caído { background: #555; }

/* secretos */
.mt-secreto { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 1; cursor: pointer; }
.mt-secreto span { font-size: calc(var(--celda) * .5); filter: drop-shadow(0 1px 2px rgba(0,0,0,.7)); }
.mt-secreto em { font-style: normal; font-size: min(calc(var(--celda) * .22), calc(10px / var(--z, 1))); font-weight: 700; color: #fff; background: rgba(15,12,20,.7); padding: 0 .35em; border-radius: .35em; white-space: nowrap; }
.mt-secreto.t-escondido { opacity: .6; outline: 2px dotted rgba(255, 220, 130, .8); outline-offset: -3px; border-radius: 6px; }
.mt-secreto.t-sel { outline: 2px dashed #8fd0ff; outline-offset: -2px; }

.mt-vacio { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; text-align: center; color: #e9e2f0; padding: 20px; line-height: 1.5; }
.mt-zoom { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 6; }
.mt-zoom button { width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(255,255,255,.25); background: rgba(20, 16, 28, .75); color: #fff; font-size: 1.2em; font-weight: 800; cursor: pointer; }
.mt-pista { position: absolute; left: 10px; top: 10px; right: 64px; z-index: 6; background: rgba(20, 16, 28, .82); color: #fff; font-size: .88em; padding: 7px 11px; border-radius: 10px; pointer-events: auto; width: fit-content; }
.mt-pista a { color: #ffd25e; }

/* costado */
.mt-lado { overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding-right: 2px; }
.mt-info { display: flex; flex-direction: column; gap: 12px; }
.mt-ranura { display: flex; flex-direction: column; gap: 14px; }
.mt-ranura:empty { display: none; }
.mt-bloque { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.mt-bloque.pelea { border-color: var(--rojo); }
.mt-tit { font-weight: 800; }
.mt-chica { font-size: .85em; }
.mt-fila-btn { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mt-fila-btn .btn { margin: 0; }
.mt-orden { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.mt-orden li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: var(--panel-2); }
.mt-orden li[data-turno-de] { cursor: pointer; }
.mt-orden li.t-act { background: var(--suave-oro); color: var(--tx-oro); font-weight: 800; box-shadow: inset 3px 0 0 var(--oro); }
.mt-orden li.t-caido { opacity: .5; text-decoration: line-through; }
.mt-orden li.t-mio .mt-n { font-weight: 800; }
.mt-orden .mt-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-ini { width: 62px !important; margin: 0 !important; padding: 4px 6px !important; text-align: center; }
.mt-ini-v { min-width: 26px; text-align: center; }
.mt-tirar { display: flex; gap: 4px; align-items: center; }
.mt-tirar .campo { width: 58px; margin: 0; padding: 4px 6px; text-align: center; }
.mt-mi-turno { background: var(--suave-oro); color: var(--tx-oro); border-radius: 12px; padding: 9px 11px; display: flex; flex-direction: column; gap: 8px; }
.mt-bandeja { display: flex; flex-wrap: wrap; gap: 6px; }
.mt-chip { flex: none; white-space: nowrap; border: 1px solid var(--borde); background: var(--panel-2); color: var(--texto); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: .88em; font-weight: 700; line-height: 1.3; cursor: pointer; }
.mt-chip.t-enemigo { border-color: var(--rojo); }
.mt-chip.t-activo { background: var(--lavanda); color: var(--sobre-acento); border-color: var(--lavanda); }
.mt-tam { display: flex; gap: 6px; align-items: center; font-size: .85em; font-weight: 700; }
.mt-tam .campo { width: auto; margin: 0; padding: 4px 6px; }

/* ventanas */
.mt-modal-fondo { position: fixed; inset: 0; background: var(--velo); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.mt-modal { width: min(520px, 100%); max-height: 92vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.mt-modal .campo-et { display: flex; flex-direction: column; gap: 4px; font-size: .85em; font-weight: 700; color: var(--tenue); }
.mt-modal .campo { margin: 0; }
.mt-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mt-check { display: flex; gap: 8px; align-items: center; font-size: .92em; cursor: pointer; }
.mt-check input { width: 18px; height: 18px; accent-color: var(--lavanda); }
.mt-previa { display: none; max-width: 100%; border-radius: 10px; border: 1px solid var(--borde); margin: 4px auto; }
.mt-iconos { display: flex; gap: 6px; flex-wrap: wrap; }
.mt-iconos button { font-size: 1.3em; width: 44px; height: 40px; border-radius: 10px; border: 1px solid var(--borde); background: var(--panel-2); cursor: pointer; }
.mt-iconos button.activo { border-color: var(--lavanda); background: var(--acento-suave); }

@media (max-width: 1000px) {
  .mt-cuerpo { grid-template-columns: 1fr; grid-template-rows: minmax(360px, 62vh) auto; }
  .mt-herr span { display: none; }
}

/* marcas en el mapa */
.mt-marcas polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 0.1 0; opacity: .9; }
.mt-marcas .mt-ruta circle { opacity: .9; }
.mt-marcas text { text-anchor: middle; font-weight: 800; paint-order: stroke; stroke: rgba(255,255,255,.85); stroke-width: 3px; }
.mt-marcas .mt-senal text:first-of-type { stroke: none; }
.mt-marcas-lista { display: flex; flex-wrap: wrap; gap: 4px; }
.mt-marca-chip { display: inline-flex; align-items: center; gap: 4px; font-size: .8em; font-weight: 700; border: 2px solid var(--col); border-radius: 999px; padding: 2px 4px 2px 8px; }
.mt-marca-chip button { border: 0; background: none; cursor: pointer; color: var(--tenue); font-size: .9em; padding: 0 3px; }

/* ---------- etapa 1: medir, áreas, señales, estados, rastro ---------- */
.mt-arriba { z-index: 4; }
/* regla */
.mt-regla line { stroke: #ffd25e; stroke-linecap: round; }
.mt-regla circle { fill: #ffd25e; }
.mt-regla rect { fill: rgba(20, 16, 28, .88); }
.mt-regla text { fill: #fff; text-anchor: middle; dominant-baseline: middle; font-weight: 800; }
.mt-regla.mal line, .mt-regla.mal circle { stroke: #f05064; fill: #f05064; }
.mt-regla.mal line { fill: none; }
.mt-regla.calib line, .mt-regla.calib circle { stroke: #7fe0ff; fill: #7fe0ff; }
.mt-regla.calib line { fill: none; stroke-dasharray: 6 4; }
/* áreas de efecto */
.mt-area .celdas { fill-opacity: .28; }
.mt-area .borde > * { fill: none; stroke-linejoin: round; }
.mt-area text { text-anchor: middle; font-weight: 800; paint-order: stroke; stroke: rgba(255,255,255,.85); stroke-width: 3px; }
.mt-area.viva .celdas { fill-opacity: .38; }
.mt-area.viva .borde > * { stroke-dasharray: 8 5; }
.mt-formas { display: inline-flex; gap: 4px; flex-wrap: wrap; margin-right: 6px; }
.mt-formas button { border: 1px solid rgba(255,255,255,.3); background: transparent; color: #fff; border-radius: 8px; padding: 3px 8px; font: inherit; font-size: .92em; cursor: pointer; }
.mt-formas button.activo { background: #ffd25e; color: #2a2030; border-color: #ffd25e; font-weight: 800; }
.mt-area-pies { display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; }
.mt-area-pies input { width: 58px; padding: 3px 5px; border-radius: 6px; border: 0; font: inherit; color: #2a2030; background: #fff; }
.mt-pista .mt-formas, .mt-pista .mt-area-pies { vertical-align: middle; margin-bottom: 3px; }
.mt-areas-lista { display: flex; flex-direction: column; gap: 6px; }
.mt-area-fila { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; border-left: 4px solid var(--col); padding: 4px 0 4px 8px; }
.mt-area-fila button { border: 0; background: none; cursor: pointer; color: var(--tenue); font-size: 1em; padding: 0 4px; }
/* señales */
.mt-senal-anim circle { fill: none; transform-box: fill-box; transform-origin: center; animation: mt-onda 1.6s ease-out both; opacity: 0; }
.mt-senal-anim circle.punto { animation: mt-latido 3s ease-out both; opacity: 1; }
.mt-senal-anim text { text-anchor: middle; font-weight: 800; paint-order: stroke; stroke: rgba(255,255,255,.9); stroke-width: 3px; animation: mt-latido 3s ease-out both; }
@keyframes mt-onda { 0% { transform: scale(.1); opacity: .95; } 100% { transform: scale(1); opacity: 0; } }
@keyframes mt-latido { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
/* rastro del movimiento */
.mt-rastro { stroke: rgba(130, 200, 255, .85); stroke-linecap: round; fill: none; animation: mt-desvanece 2.6s ease-in both; }
.mt-rastro.t-enemigo { stroke: rgba(240, 120, 140, .85); }
@keyframes mt-desvanece { 0% { opacity: .95; } 100% { opacity: 0; } }
/* muros importados (solo DM) */
.mt-muros .muro { stroke: #ff8a3d; fill: none; stroke-linecap: round; opacity: .85; }
.mt-muros .puerta { stroke: #7fe0ff; stroke-linecap: round; }
.mt-muros .puerta.abierta { stroke-dasharray: 4 4; }
.mt-muros .luz { fill-opacity: .08; stroke-opacity: .5; stroke-width: 2; }
/* estados sobre la ficha */
.mt-estados { position: absolute; top: -8%; left: -8%; display: flex; flex-wrap: wrap; max-width: 116%; gap: 1px; pointer-events: none; z-index: 2; }
.mt-estados span { font-size: min(calc(var(--celda) * .26), calc(15px / var(--z, 1))); line-height: 1; background: rgba(20, 16, 28, .75); border-radius: 50%; padding: .12em; }
.mt-conds { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 4px; }
.mt-conds button { display: flex; flex-direction: column; align-items: center; gap: 1px; border: 1px solid var(--borde); background: var(--panel-2); border-radius: 8px; padding: 4px 2px; cursor: pointer; font-size: 1.1em; color: var(--texto); }
.mt-conds button small { font-size: .62em; font-weight: 700; }
.mt-conds button.activo { border-color: var(--lavanda); background: var(--acento-suave); }

/* zonas de niebla de colores (DM) */
.mt-zona { fill-opacity: .34; stroke-opacity: .6; }
.mt-zona.actual { fill-opacity: .5; stroke-opacity: 1; }
.mt-zonas.ver-fuerte .mt-zona { fill-opacity: .58; stroke-opacity: .95; }
.mt-zonas.ver-fuerte .mt-zona.actual { fill-opacity: .72; }
.mt-zonas.ver-suave .mt-zona { fill-opacity: .18; stroke-opacity: .55; }
.mt-zonas.ver-suave .mt-zona.actual { fill-opacity: .3; }
.mt-zonas .mt-zona-nombre { stroke-width: 5px !important; }
.mt-ver-zonas button { color: var(--texto) !important; border-color: var(--borde) !important; font-size: .78em !important; padding: 2px 7px !important; }
.mt-ver-zonas button.activo { background: var(--lavanda) !important; color: var(--sobre-acento) !important; }
.mt-paleta { grid-column: 1 / -1; display: flex; gap: 5px; flex-wrap: wrap; }
.mt-paleta button { width: 24px; height: 24px; border-radius: 6px; border: 2px solid transparent; background: var(--zc); cursor: pointer; }
.mt-paleta button.activo { border-color: var(--texto); }
.mt-gatillo { fill-opacity: .18; }
.mt-zonas text { text-anchor: middle; }
.mt-zonas .mt-zona-nombre { text-anchor: start; font-weight: 800; paint-order: stroke; stroke: rgba(255,255,255,.9); stroke-width: 3px; opacity: 1; }
.mt-zona-pista { display: inline-flex; align-items: center; gap: 5px; }
.mt-zona-pista i, .mt-zona-elegir i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; background: var(--zc); flex: none; }
.mt-zonas-lista { display: flex; flex-direction: column; gap: 6px; }
.mt-zona-fila { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; border-left: 4px solid var(--zc); border-radius: 6px; padding: 5px 6px 5px 8px; background: var(--panel-2); }
.mt-zona-fila.actual { outline: 2px solid var(--zc); }
.mt-zona-elegir { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: var(--texto); text-align: left; }
.mt-zona-btns { display: flex; gap: 2px; }
.mt-zona-btns button { border: 0; background: none; cursor: pointer; font-size: 1em; padding: 2px 4px; }

/* vista de jugadores, objetivo y retratos */
.mt-fuera { fill: #0d0b10; }
.mt-fuera.dm { fill: rgba(10, 8, 16, .45); stroke: #ffd25e; stroke-width: 3; stroke-dasharray: 10 6; }
.mt-retrato { width: 100%; height: 100%; display: flex !important; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--rc) 70%, #fff), var(--rc)); font-size: calc(var(--celda) * .5) !important; text-shadow: none !important; }
.mt-num { position: absolute; right: -6%; bottom: -6%; min-width: 1.4em; height: 1.4em; border-radius: 50%; background: #fff; color: #222; font-size: calc(var(--celda) * .22); display: flex; align-items: center; justify-content: center; font-weight: 900; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.mt-disco { overflow: visible; }
.mt-disco > img, .mt-disco > .mt-retrato { border-radius: 50%; overflow: hidden; }
.mt-ficha.t-objetivo .mt-disco { box-shadow: 0 0 0 max(3px, calc(var(--celda) * .07)) #ff4d5e, 0 0 calc(var(--celda) * .5) #ff4d5e; }
.mt-ficha.t-objetivo::after { content: "🎯"; position: absolute; top: -18%; right: -10%; font-size: calc(var(--celda) * .38); z-index: 3; }

/* ---------- niebla automática ---------- */
.mt-vision { pointer-events: none; }
.mt-vision .mtv-negro { fill: #07060b; }
.mt-vision .mtv-gris { fill: #0b0a12; opacity: .62; }
.mt-vision.dm .mtv-negro { opacity: .42; }
.mt-vision.dm .mtv-gris { opacity: .2; }
.mt-vision.como-jug .mtv-negro { opacity: .97; }
.mt-muros .puerta.secreta { stroke: #c38bff; stroke-dasharray: 2 3; }
.mt-muros .puerta.llave { stroke: #ffcf4a; }
.mt-muros .luz-ic { text-anchor: middle; pointer-events: none; }
.mt-muros .trazo { stroke: #ff3d7f; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 6 4; }
.mt-muros .trazo.puerta, .mt-muros .trazo.secreta { stroke: #7fe0ff; }
.mt-muros .trazo-p { fill: #ff3d7f; }
.mt-muros .puerta-j { stroke: #c8913f; stroke-linecap: butt; filter: drop-shadow(0 0 2px #000); }
.mt-muros .puerta-j.abierta { stroke: #c8913f; opacity: .55; stroke-dasharray: 3 3; }
.mt-muros .puerta-j.llave { stroke: #e0b84a; }
.mt-lado .mt-vision-modos button { color: inherit; border-color: rgba(120,100,150,.35); }
.mt-lado .mt-vision-modos button.activo { color: #2a2030; }
.mt-pista .mt-check { color: inherit; display: inline-flex; margin: 0 6px; }

/* ---------- escaleras y notas de sala ---------- */
.mt-esc { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; z-index: 1;
  border: max(2px, calc(var(--celda) * .05)) dashed rgba(255, 210, 94, .85); border-radius: 18%; background: rgba(255, 210, 94, .14); box-sizing: border-box; }
.mt-esc span { font-size: calc(var(--celda) * .42); line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.mt-esc em { position: absolute; top: 100%; white-space: nowrap; font-style: normal; font-weight: 700; font-size: max(9px, calc(var(--celda) * .2));
  background: rgba(30, 22, 40, .82); color: #ffe6a0; padding: 1px 5px; border-radius: 6px; margin-top: 2px; }
.mt-esc.t-sel { border-style: solid; background: rgba(255, 210, 94, .32); }
.mt-nota { position: absolute; transform: translate(-50%, -50%); z-index: 3; cursor: pointer; white-space: nowrap; font-weight: 800;
  font-size: max(10px, calc(var(--celda) * .26)); background: #2f2343; color: #ffe6a0; border: 2px solid #ffd25e; border-radius: 999px; padding: 2px 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,.45); user-select: none; }
.mt-nota.t-sel { background: #ffd25e; color: #2a2030; }
.mt-nota-texto { max-height: 52vh; overflow: auto; font-size: .92em; line-height: 1.45; padding-right: 4px; }
.mt-nota-texto blockquote { margin: 6px 0; padding: 6px 10px; border-left: 4px solid #b9a3e6; background: rgba(185, 163, 230, .14); border-radius: 6px; }
.mt-nota-texto ul { padding-left: 18px; margin: 4px 0; }
.mt-nota-texto p { margin: 4px 0; }
.mt-nota-texto table { border-collapse: collapse; font-size: .9em; }
.mt-nota-texto td, .mt-nota-texto th { border: 1px solid rgba(120,100,150,.35); padding: 2px 5px; }

/* terreno difícil: rayado verde suave (la niebla lo tapa) */
.mt-dificil { fill: rgba(47, 179, 111, .22); stroke: rgba(47, 179, 111, .7); stroke-width: 1.5; stroke-dasharray: 6 4; pointer-events: none; }
/* trampas: la DM las ve armadas en rojo; activadas en gris; los jugadores ven las activadas */
.mt-trampa { position: absolute; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 1;
  border: 2px dashed rgba(150, 150, 150, .8); border-radius: 6px; box-sizing: border-box; background: rgba(60, 60, 60, .25); }
.mt-trampa.armada { border-color: #e0565b; background: rgba(224, 86, 91, .18); }
.mt-trampa span { font-size: calc(var(--celda) * .42); line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }

/* NPCs en el mapa: dorado, no pelean */
.mt-ficha.t-npc .mt-disco { background: hsl(42 55% 38%); border-color: #f5dc9a; }
.mt-chip.t-npc { border-color: #c9a227; }
.mt-rastro.t-npc { stroke: rgba(230, 195, 90, .85); }

/* salvación pendiente por una trampa */
.mt-tirada { border: 2px solid #e0565b; background: rgba(224, 86, 91, .08); }

/* ============================================================
   Panel de DM compacto (estilo Mac): barra de íconos, inspector con pestañas
   ============================================================ */
.mt.es-dm { gap: 8px; }
.mt.es-dm .mt-barra { flex-wrap: nowrap; gap: 6px; min-width: 0; }
.mt.es-dm .mt-barra > * { flex: none; }
.mt-ic { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: var(--tenue); font: inherit; font-size: 1em; cursor: pointer; padding: 0; }
.mt-ic:hover { background: var(--panel-2); color: var(--texto); }
.mt-ic.activo { color: var(--acento-texto); }
.mt-mapa-sel { display: inline-flex; align-items: center; gap: 2px; min-width: 0; flex: 0 1 auto !important; }
.mt.es-dm .mt-barra .mt-mapas { min-width: 0; width: auto; max-width: 240px; font-size: .88em; font-weight: 700; padding: 5px 8px; border-radius: 8px; }
.mt.es-dm .mt-herr { border-radius: 9px; padding: 2px; gap: 1px; }
.mt.es-dm .mt-herr button { font-size: .95em; padding: 4px 7px; border-radius: 7px; line-height: 1.2; min-width: 30px; }
.mt.es-dm .mt-herr button:hover:not(.activo) { background: rgba(127, 127, 127, .14); }
.mt.es-dm .mt-herr button small { font-size: .6em; margin-left: 2px; opacity: .6; vertical-align: middle; }
.mt.es-dm .mt-estado { margin-left: auto; font-size: .82em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto !important; }
.mt-vivo { border: 1px solid var(--borde); background: var(--superficie); color: var(--tenue); font: inherit; font-size: .8em; font-weight: 800; padding: 5px 9px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.mt-vivo.si { background: var(--suave-verde, #e3f3e6); border-color: transparent; color: var(--tx-verde, #2e7d4a); }

/* menú desplegable */
.mt-menu { position: fixed; z-index: 200; min-width: 210px; background: var(--superficie); border: 1px solid var(--borde); border-radius: 10px; padding: 5px; box-shadow: 0 10px 30px rgba(0,0,0,.22); display: flex; flex-direction: column; }
.mt-menu button { display: flex; align-items: center; gap: 8px; border: 0; background: none; text-align: left; font: inherit; font-size: .88em; font-weight: 600; color: var(--texto); padding: 6px 9px; border-radius: 6px; cursor: pointer; }
.mt-menu button:hover { background: var(--lavanda); color: var(--sobre-acento); }
.mt-menu button.peligro { color: var(--tx-rojo, #b3263e); }
.mt-menu button.peligro:hover { background: var(--rojo); color: #fff; }
.mt-menu .mt-menu-ic { width: 20px; text-align: center; }
.mt-menu .mt-menu-ok { margin-left: auto; font-weight: 800; }
.mt-menu hr { border: 0; border-top: 1px solid var(--borde); margin: 4px 6px; }

/* inspector (panel derecho) */
.mt.es-dm .mt-cuerpo { grid-template-columns: minmax(0, 1fr) 290px; gap: 10px; }
.mt.es-dm.lado-oculto .mt-cuerpo { grid-template-columns: minmax(0, 1fr); }
.mt.es-dm.lado-oculto .mt-lado { display: none; }
.mt.es-dm .mt-lado { gap: 8px; font-size: .88em; }
.mt.es-dm .mt-info { gap: 8px; }
.mt.es-dm .mt-bloque { padding: 9px 11px; gap: 6px; border-radius: 12px; }
.mt.es-dm .mt-tit { font-size: .98em; }
.mt.es-dm .mt-lado .btn { font-size: .92em; }
.mt.es-dm .mt-lado .btn.mini { padding: 4px 9px; }
.mt.es-dm .mt-lado .btn.ancho { padding: 7px 10px; }
.mt.es-dm .mt-lado .mt-formas button { padding: 3px 7px; font-size: .9em; }
.mt.es-dm .mt-ranura { font-size: .95em; }
.mt-lado.es-dm-lado:not(.con-ayuda) .mt-ayuda, .mt.es-dm .mt-lado:not(.con-ayuda) .mt-ayuda { display: none; }
.mt-pestanas { position: sticky; top: 0; z-index: 3; display: flex; gap: 2px; align-items: center; background: var(--panel-2); border-radius: 9px; padding: 2px; box-shadow: 0 0 0 4px var(--fondo, transparent); }
.mt-pestanas button { flex: 1; border: 0; background: none; border-radius: 7px; padding: 5px 4px; font: inherit; font-size: .92em; font-weight: 700; color: var(--tenue); cursor: pointer; white-space: nowrap; }
.mt-pestanas button.activa { background: var(--superficie); color: var(--texto); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.mt-pestanas .mt-ayuda-btn { flex: none; width: 26px; height: 26px; padding: 0; border-radius: 50%; font-weight: 800; }
.mt-pestanas .mt-ayuda-btn.activa { background: var(--lavanda); color: var(--sobre-acento); }
.mt-badge { display: inline-block; min-width: 16px; padding: 0 4px; border-radius: 999px; background: var(--rojo); color: #fff; font-size: .78em; line-height: 16px; }
.mt-vacio-lado { color: var(--tenue); font-size: .92em; padding: 10px 4px; text-align: center; }
.mt.es-dm .mt-zoom button { width: 32px; height: 32px; border-radius: 9px; font-size: 1em; }
.mt.es-dm .mt-zoom { gap: 4px; right: 8px; bottom: 8px; }
.mt.es-dm .mt-pista { font-size: .82em; padding: 6px 10px; }

@media (max-width: 1000px) {
  .mt.es-dm .mt-barra { flex-wrap: wrap; }
  .mt.es-dm .mt-cuerpo { grid-template-columns: 1fr; }
}
/* calculadora de enemigos dentro del inspector */
.mt.es-dm .mt-ranura .en-agregar { gap: 5px; margin-top: 6px; }
.mt.es-dm .mt-ranura .en-agregar select.campo { flex: 1 1 150px; min-width: 0; max-width: 100%; width: auto; padding: 5px 7px; margin: 0; }
.mt.es-dm .mt-ranura .en-agregar .campo.num { width: 54px; padding: 5px 6px; margin: 0; }
.mt.es-dm .mt-ranura .en-agregar .btn { margin: 0; padding: 6px 12px; }
.mt.es-dm .mt-ranura .panel.grupo { padding: 10px 11px; border-radius: 12px; }
.mt.es-dm .mt-ranura .tenue { font-size: .92em; }
.mt.es-dm .mt-bloque > .mt-tit[style*="space-between"] { white-space: nowrap; }
.mt.es-dm .mt-ver-zonas { flex-wrap: nowrap; }
.mt.es-dm .mt-orden li { padding: 3px 4px 3px 8px; }
.mt.es-dm .mt-ini { width: 54px !important; padding: 2px 4px !important; }
/* avisos al pasar el mouse */
.mt-tip { position: fixed; z-index: 300; max-width: 260px; background: rgba(30, 26, 38, .96); color: #fff; font-size: .8em; line-height: 1.35; padding: 6px 9px; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.25); pointer-events: none; opacity: 0; transform: translateY(-2px); transition: opacity .12s, transform .12s; display: flex; flex-direction: column; gap: 2px; }
.mt-tip.ver { opacity: 1; transform: none; }
.mt-tip b { font-weight: 800; }
.mt-tip span { opacity: .85; }
.mt-mas { border: 0; background: none; padding: 2px 0; font: inherit; font-size: .9em; font-weight: 700; color: var(--tenue); cursor: pointer; text-align: left; }
.mt-mas:hover { color: var(--texto); }
.en-otros { border: 0; background: none; padding: 6px 2px; font: inherit; font-size: .9em; font-weight: 700; color: var(--tenue); cursor: pointer; text-align: left; }
.en-otros:hover { color: var(--texto); }
