/* 艦橋 Puente de mando (24-oct-2026): entre el intro y el portal. Esfera Ω de Meshy al centro y tres tarjetas holográficas flotando.
   La escena (.sx…) es la de la Sala (js/sala-escena.js); sus reglas se copian aquí bajo .pdm porque el portal no carga hud.css. */
.pdm { position: fixed; inset: 0; z-index: 2400; overflow: hidden; background: #05060A; color: #E9E6DF; font-family: Outfit, system-ui, sans-serif; transition: opacity .45s ease; --k: 1; --mx: 0; --my: 0; }
.pdm.out { opacity: 0; pointer-events: none; }
.pdm-stage { position: absolute; inset: 0; overflow: hidden; perspective: 1400px; }
.pdm-stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 48%, transparent 42%, rgba(5,6,10,.7) 100%); }

/* escena base (copia de hud.css) */
.pdm .sx { position: absolute; left: 0; top: 0; width: 1790px; height: 768px; transform-origin: 0 0; perspective: 1500px; perspective-origin: 895px 372px; }
.pdm .sx-img { position: absolute; inset: 0; width: 1790px; height: 768px; max-width: none; user-select: none; pointer-events: none; will-change: transform;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, transparent, #000 10%, #000 86%, transparent); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, transparent, #000 10%, #000 86%, transparent); mask-composite: intersect; }
.pdm .sx-fx { position: absolute; inset: 0; width: 1790px; height: 768px; pointer-events: none; }
.pdm .sx-amb { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); max-width: none; object-fit: cover; filter: blur(26px) brightness(.45) saturate(1.1); pointer-events: none; user-select: none; }
.pdm .sx-hud { display: none; }
.pdm .sx-orb { position: absolute; inset: 0; transform-origin: 895px 372px; transform-style: preserve-3d; will-change: transform; touch-action: none; }
.pdm .sx-3d, .pdm .sx-foto { position: absolute; left: 520px; top: -3px; width: 751px; height: 751px; pointer-events: none; user-select: none; }
.pdm .sx-foto { object-fit: contain; filter: drop-shadow(0 30px 40px rgba(0,0,0,.55)); }
.pdm .sx-sobre { cursor: pointer; } .pdm .sx-drag { cursor: grabbing; }

/* líneas de luz tarjeta → esfera */
.pdm-lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: visible; }
.pdm-l { fill: none; stroke: rgba(46,230,214,.35); stroke-width: 1.5; stroke-dasharray: 6 8; animation: pdm-flow 1.6s linear infinite; transition: stroke .2s, stroke-width .2s; }
.pdm-l.on { stroke: #2EE6D6; stroke-width: 2.2; filter: drop-shadow(0 0 6px rgba(46,230,214,.9)); }
.pdm-l.off { stroke: rgba(154,161,181,.18); animation: none; }
.pdm-p { fill: #2EE6D6; opacity: .7; filter: drop-shadow(0 0 5px #2EE6D6); }
@keyframes pdm-flow { to { stroke-dashoffset: -28; } }

/* saludo arriba */
.pdm-top { position: absolute; z-index: 3; top: max(28px, env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); width: min(720px, calc(100% - 32px)); text-align: center; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.pdm-kick { font-family: Syncopate, sans-serif; font-weight: 700; font-size: 10px; letter-spacing: .34em; color: #2EE6D6; }
.pdm-kick span { font-family: 'Noto Sans JP', sans-serif; color: #FF2E4D; letter-spacing: .2em; margin-right: 6px; }
.pdm-h { margin: 0; font-family: Cinzel, serif; font-weight: 600; font-size: clamp(26px, 3.2vw, 42px); letter-spacing: .04em; text-shadow: 0 2px 22px rgba(0,0,0,.9); }
.pdm-sub { margin: 0; font-size: 15px; color: #aeb6c5; text-shadow: 0 1px 10px rgba(0,0,0,.9); }

/* tarjetas holográficas: el punto (left, top) es donde nace la línea; flotan y se inclinan hacia el mouse */
.pdm-cards { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.pdm-card { position: absolute; width: 260px; box-sizing: border-box; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: 'kj ro ar' 'kj es ar' 'd d d'; column-gap: 14px; row-gap: 2px; align-items: center;
  padding: 18px 18px 16px; border-radius: 16px; color: inherit; text-decoration: none; pointer-events: auto;
  background: linear-gradient(160deg, rgba(46,230,214,.12), rgba(8,14,20,.66) 46%, rgba(255,46,77,.06)); border: 1px solid rgba(46,230,214,.34);
  box-shadow: 0 20px 50px rgba(0,0,0,.55), 0 0 32px rgba(46,230,214,.1), inset 0 1px 0 rgba(255,255,255,.07); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transform: var(--ancla) scale(var(--k)) perspective(900px) rotateY(calc(var(--giro, 0deg) + var(--mx) * 10deg)) rotateX(calc(var(--my) * -8deg));
  animation: pdm-flota 6s ease-in-out infinite; transition: border-color .2s, box-shadow .2s, background .2s, opacity .4s; }
.pdm-card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(46,230,214,.05) 0 1px, transparent 1px 4px); }
.pdm-card[data-lado="izq"] { --ancla: translate(-100%, -50%); --giro: 14deg; transform-origin: 100% 50%; }
.pdm-card[data-lado="der"] { --ancla: translate(0, -50%); --giro: -14deg; transform-origin: 0 50%; animation-delay: -2s; }
.pdm-card[data-lado="abajo"] { --ancla: translate(-50%, 0); transform-origin: 50% 0; animation-delay: -4s; }
@keyframes pdm-flota { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.pdm-card:hover, .pdm-card:focus-visible { outline: none; border-color: #2EE6D6; background: linear-gradient(160deg, rgba(46,230,214,.2), rgba(10,22,28,.78) 46%, rgba(255,46,77,.08)); box-shadow: 0 24px 60px rgba(0,0,0,.6), 0 0 44px rgba(46,230,214,.35), inset 0 1px 0 rgba(255,255,255,.1); }
.pdm-kj { grid-area: kj; white-space: nowrap; font-family: 'Noto Sans JP', sans-serif; font-weight: 700; font-size: 30px; line-height: 1; color: #FF2E4D; text-shadow: 0 0 16px rgba(255,46,77,.6); }
.pdm-ro { grid-area: ro; font-family: Syncopate, sans-serif; font-weight: 700; font-size: 9px; letter-spacing: .3em; color: #2EE6D6; }
.pdm-es { grid-area: es; font-size: 20px; font-weight: 500; }
.pdm-ar { grid-area: ar; font-size: 20px; color: #2EE6D6; transition: transform .2s; }
.pdm-card:hover .pdm-ar { transform: translateX(3px); }
.pdm-d { grid-area: d; margin-top: 10px; font-size: 13px; line-height: 1.45; color: #aeb6c5; }
.pdm-card.off { opacity: .42; pointer-events: none; border-color: rgba(154,161,181,.2); }
.pdm-card.off .pdm-kj { color: #6b7285; text-shadow: none; }

/* abajo: hablar con OMEGA · entrar al portal */
/* en las esquinas, para no tapar la tarjeta de Finanzas */
.pdm-foot { position: absolute; z-index: 4; left: 0; right: 0; bottom: max(20px, env(safe-area-inset-bottom, 0px)); display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 max(24px, env(safe-area-inset-right, 0px)) 0 max(24px, env(safe-area-inset-left, 0px)); pointer-events: none; }
.pdm-foot > * { pointer-events: auto; } .pdm-go { margin-left: auto; }
.pdm-voz, .pdm-go { min-height: 44px; padding: 0 18px; border-radius: 99px; font: 500 14px Outfit, sans-serif; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; }
.pdm-voz { border: 1px solid rgba(46,230,214,.4); background: rgba(5,6,10,.6); color: #E9E6DF; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.pdm-go { border: 0; background: #2EE6D6; color: #05060A; font-weight: 600; box-shadow: 0 0 26px rgba(46,230,214,.3); }
.pdm-voz:hover { border-color: #2EE6D6; } .pdm-go:hover { box-shadow: 0 0 40px rgba(46,230,214,.55); }
.pdm-voz:focus-visible, .pdm-go:focus-visible { outline: 2px solid #2EE6D6; outline-offset: 3px; }
.pdm-dot { width: 8px; height: 8px; border-radius: 50%; background: #2EE6D6; box-shadow: 0 0 10px #2EE6D6; animation: pdm-late 1.8s ease-in-out infinite; }
@keyframes pdm-late { 50% { opacity: .35; } }

/* celular: esfera arriba, tarjetas en columna debajo */
.pdm.col { overflow-y: auto; }
.pdm.col .pdm-stage { position: relative; height: 44vh; min-height: 260px; }
.pdm.col .pdm-top { top: 18px; } .pdm.col .pdm-go { margin-left: 0; }
.pdm.col .pdm-cards { position: relative; inset: auto; display: flex; flex-direction: column; gap: 12px; padding: 0 16px 96px; margin-top: -24px; }
.pdm.col .pdm-card { position: relative; width: 100%; transform: none; animation: none; }
.pdm.col .pdm-foot { justify-content: center; flex-wrap: wrap; position: fixed; padding-top: 12px; background: linear-gradient(transparent, #05060A 40%); bottom: 0; padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)); }

@media (prefers-reduced-motion: reduce) { .pdm-card, .pdm-l, .pdm-dot { animation: none !important; } .pdm-card { transform: var(--ancla) scale(var(--k)) perspective(900px) rotateY(var(--giro, 0deg)); } }

/* el logo Ω del portal vuelve al puente */
.om-side .om-lock { cursor: pointer; }
/* 今日 Avisos de «Mi día» en la puerta (3-nov): pastilla bajo la descripción; rojo solo si algo es crítico */
.pdm-av { grid-column: 1 / -1; justify-self: start; display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 5px 11px 5px 6px; border-radius: 99px; font-size: 12.5px; line-height: 1.3; color: #D5F7F3; background: rgba(46,230,214,.12); border: 1px solid rgba(46,230,214,.4); }
.pdm-av b { min-width: 22px; height: 22px; padding: 0 6px; box-sizing: border-box; border-radius: 99px; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: #2EE6D6; color: #0B0D12; }
.pdm-av.crit { color: #FFE3E8; background: rgba(255,46,77,.14); border-color: rgba(255,46,77,.55); }
.pdm-av.crit b { background: #E0213F; color: #fff; box-shadow: 0 0 12px rgba(255,46,77,.6); }
.pdm-av[hidden] { display: none; }
/* 人機 El ser vivo al centro del puente (3-nov): la escena del ser ocupa el mismo lugar que la máquina 3D de antes */
.pdm-stage.sv-host { background: #04050A; }
.sv { position: absolute; left: 0; top: 0; width: 1790px; height: 768px; transform-origin: 0 0; pointer-events: none; }
.sv-ser { position: absolute; border: 0; display: block; background: #04050A; pointer-events: none; }
