/* ==========================================================================
   CALENDARIO · Tablero de Navegación Temporal de 100 Días (14 Semanas)
   Ambientación de Nave Espacial · Retroiluminación · Parpadeo Neón
   Pasado Rojizo · Hoy en el Centro (Más Claro) · Futuro Azulado
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@600;700;800;900&family=Rajdhani:wght@600;700&family=Share+Tech+Mono&display=swap');

:root {
  --font-hud: 'Orbitron', 'Rajdhani', sans-serif;
  --font-cell: 'Rajdhani', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Share Tech Mono', monospace;

  --bg-deep: #04070e;
  --bg-cockpit: #070d19;
  --hud-cyan: #00f0ff;
  --hud-cyan-glow: rgba(0, 240, 255, 0.45);
  --hud-red: #ff2a55;
  --hud-red-glow: rgba(255, 42, 85, 0.45);
  --hud-text: #e4f6ff;
  --hud-muted: #7da2c1;
  --board-brightness: 1;
}

/* De noche toda la aplicación está más oscura y resalta la retroiluminación y la fase lunar */
:root[data-ambient="night"] {
  --bg-deep: #020308;
  --bg-cockpit: #040710;
  --hud-cyan: #00e5ff;
  --hud-cyan-glow: rgba(0, 229, 255, 0.6);
  --board-brightness: 0.92;
}

:root[data-ambient="day"] {
  --bg-deep: #070d1a;
  --bg-cockpit: #0c1629;
  --hud-cyan: #26f7ff;
  --hud-cyan-glow: rgba(38, 247, 255, 0.4);
  --board-brightness: 1.04;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: var(--hud-text);
  font-family: var(--font-cell);
  -webkit-font-smoothing: antialiased;
}

/* Retroiluminación de cabina espacial */
.cockpit-backglow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 95% 28% at 50% 53%, rgba(0, 245, 255, 0.22), transparent 72%),
    radial-gradient(ellipse 85% 42% at 50% 22%, rgba(255, 30, 75, 0.16), transparent 70%),
    radial-gradient(ellipse 85% 42% at 50% 84%, rgba(0, 140, 255, 0.18), transparent 70%),
    linear-gradient(180deg, #09030a 0%, #050b16 50%, #020814 100%);
  animation: reactor-pulse 7s ease-in-out infinite alternate;
}

@keyframes reactor-pulse {
  0% { opacity: 0.86; }
  50% { opacity: 1; }
  100% { opacity: 0.9; }
}

/* Líneas de escaneo CRT / Holograma sutiles */
.cockpit-scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  opacity: 0.14;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 240, 255, 0.08) 3px,
    rgba(0, 0, 0, 0.35) 4px
  );
}

/* Efecto de parpadeo tipo neón de nave futurista */
.neon-flicker {
  text-shadow:
    0 0 6px var(--hud-cyan),
    0 0 14px var(--hud-cyan-glow);
  animation: neon-hum 6s infinite;
}

@keyframes neon-hum {
  0%, 18%, 20%, 22%, 62%, 64%, 92%, 100% {
    opacity: 1;
    text-shadow: 0 0 6px var(--hud-cyan), 0 0 14px var(--hud-cyan-glow);
  }
  19%, 21%, 63% {
    opacity: 0.72;
    text-shadow: 0 0 2px var(--hud-cyan);
  }
}

/* Contenedor Principal a Pantalla Completa del Móvil */
.cockpit-viewport {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 780px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top, 4px) 4px env(safe-area-inset-bottom, 4px) 4px;
  gap: 3px;
}

/* ==========================================================================
   CABECERA HUD COMPACTA (TELEMETRÍA, LUNA, INSTALAR, MEMORIA DEL MÓVIL)
   ========================================================================== */
.cockpit-hud {
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(10, 20, 38, 0.92), rgba(5, 11, 22, 0.88));
  border: 1px solid rgba(0, 240, 255, 0.42);
  box-shadow:
    0 0 12px rgba(0, 240, 255, 0.18),
    inset 0 0 12px rgba(0, 240, 255, 0.08);
  border-radius: 6px;
  padding: 4px 7px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hud-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.hud-logo {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 5px var(--hud-cyan));
}

.brand-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hud-app-name {
  font-family: var(--font-hud);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #ffffff;
  line-height: 1.05;
  white-space: nowrap;
}

.hud-storage-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.58rem;
  font-weight: 700;
  color: #72f6ff;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.memory-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00ff9d;
  box-shadow: 0 0 6px #00ff9d;
  display: inline-block;
  animation: led-blink 2s infinite alternate;
}

@keyframes led-blink {
  0% { opacity: 0.45; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1.15); }
}

.hud-actions-cluster {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

/* Botón de Alertas / Notificaciones Sonoras en Cabecera */
.btn-neon-alerts {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 26px;
  background: rgba(3, 12, 26, 0.9);
  border: 1px solid rgba(0, 240, 255, 0.45);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.25);
  border-radius: 5px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-neon-alerts.active {
  border-color: #00ff9d;
  box-shadow: 0 0 10px rgba(0, 255, 157, 0.55), inset 0 0 6px rgba(0, 255, 157, 0.25);
}

/* Píldora de Fase de la Luna */
.moon-hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(3, 9, 20, 0.88);
  border: 1px solid rgba(180, 225, 255, 0.45);
  box-shadow: 0 0 8px rgba(140, 200, 255, 0.25);
  border-radius: 5px;
  padding: 2px 6px;
  color: #eaf6ff;
  cursor: pointer;
  transition: all 0.2s ease;
}

:root[data-ambient="night"] .moon-hud-pill {
  border-color: #9be8ff;
  box-shadow: 0 0 12px rgba(155, 232, 255, 0.55), inset 0 0 6px rgba(155, 232, 255, 0.25);
}

.moon-svg-wrap {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.moon-label-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}

.moon-phase-name {
  font-family: var(--font-hud);
  font-size: 0.52rem;
  font-weight: 700;
  color: #d8f3ff;
  text-transform: uppercase;
  white-space: nowrap;
}

.moon-illum-pct {
  font-family: var(--font-mono);
  font-size: 0.54rem;
  color: #7cc9ff;
}

/* Botón Instalar PWA Neón */
.btn-neon-install {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.22), rgba(0, 120, 255, 0.35));
  border: 1.5px solid #00f0ff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.45), inset 0 0 6px rgba(0, 240, 255, 0.25);
  color: #ffffff;
  font-family: var(--font-hud);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 5px;
  cursor: pointer;
  text-transform: uppercase;
  animation: neon-border-pulse 3s infinite alternate;
}

@keyframes neon-border-pulse {
  0% { box-shadow: 0 0 6px rgba(0, 240, 255, 0.35), inset 0 0 4px rgba(0, 240, 255, 0.2); }
  100% { box-shadow: 0 0 14px rgba(0, 240, 255, 0.75), inset 0 0 8px rgba(0, 240, 255, 0.35); }
}

.btn-neon-install:active {
  transform: scale(0.95);
}

/* Barra de Telemetría: Fecha Completa, País y Hora Local */
.hud-telemetry-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border-top: 1px solid rgba(0, 240, 255, 0.22);
  padding-top: 2px;
  font-size: 0.63rem;
}

.telemetry-date {
  font-weight: 700;
  color: #d6f5ff;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.telemetry-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.telemetry-country {
  font-weight: 700;
  color: #9be8ff;
  text-transform: uppercase;
  font-size: 0.62rem;
}

.telemetry-sep {
  color: rgba(0, 240, 255, 0.35);
  font-size: 0.6rem;
}

.telemetry-clock {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #00ffcc;
  text-shadow: 0 0 6px rgba(0, 255, 204, 0.6);
  letter-spacing: 0.5px;
}

/* Aviso inicial de almacenamiento en memoria del móvil */
.hud-memory-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: rgba(0, 240, 255, 0.1);
  border: 1px dashed rgba(0, 240, 255, 0.45);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.58rem;
  color: #c8f4ff;
  line-height: 1.2;
}

.notice-dismiss-btn {
  background: transparent;
  border: none;
  color: #00f0ff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
}

/* ==========================================================================
   MATRIZ TEMPORAL DE 14 SEMANAS (98 DÍAS)
   - Cada fila es una semana (7 días)
   - La semana actual (fila central) es la más grande y vistosa
   - Las semanas anteriores (rojizas) y futuras (azuladas) van menguando
   ========================================================================== */
.temporal-matrix {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: stretch;
  filter: brightness(var(--board-brightness));
}

.week-row {
  width: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  margin: 0 auto;
  transition: transform 0.2s ease;
}

/* La semana actual: franja horizontal central destacada con halo de cabina */
.week-row.is-current-week {
  position: relative;
  z-index: 10;
  padding: 2px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255, 55, 95, 0.28), rgba(255, 255, 255, 0.22), rgba(0, 235, 255, 0.28));
  box-shadow:
    0 0 16px rgba(0, 240, 255, 0.35),
    0 0 24px rgba(255, 42, 85, 0.2);
}

/* ==========================================================================
   CUADRO DE CADA DÍA: (29 - Dic - Dom) + Piedras de Colores
   ========================================================================== */
.day-cell {
  position: relative;
  min-width: 0;
  min-height: 0;
  border-radius: 4px;
  background: var(--cell-bg);
  border: 1px solid var(--cell-border);
  box-shadow: var(--cell-glow);
  color: var(--cell-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 1px 2px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.day-cell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 55%);
  pointer-events: none;
}

.day-cell:hover,
.day-cell:active {
  z-index: 15;
  transform: scale(1.06);
  border-color: #ffffff;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.75);
}

/* EL DÍA ACTUAL EN EL CENTRO: El más claro, luminoso y con parpadeo neón */
.day-cell.is-today {
  z-index: 12;
  background: radial-gradient(circle at 50% 35%, #ffffff 0%, #d4fbff 48%, #7beeff 100%) !important;
  border: 2px solid #ffffff !important;
  color: #020b18 !important;
  box-shadow:
    0 0 14px #00f7ff,
    0 0 28px rgba(0, 247, 255, 0.85),
    inset 0 0 10px #ffffff !important;
  animation: today-beacon 2.4s ease-in-out infinite alternate;
}

@keyframes today-beacon {
  0% {
    box-shadow: 0 0 10px #00f7ff, 0 0 20px rgba(0, 247, 255, 0.75), inset 0 0 6px #ffffff;
  }
  100% {
    box-shadow: 0 0 18px #ffffff, 0 0 34px rgba(0, 247, 255, 1), inset 0 0 12px #ffffff;
  }
}

/* Disposición vertical dentro de cada cuadro:
   - Arriba (solo en la semana en curso): Día de la semana (Lun..Dom) más grande
   - Centro (más grande): Número del día del mes (01..31)
   - Debajo del número: Piedras de colores
   - Abajo: Mes (Ene..Dic) */
.day-top-dow {
  width: 100%;
  text-align: center;
  font-family: var(--font-cell);
  font-weight: 900;
  font-size: calc(var(--row-font, 0.92rem) * 1.05);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.day-center-num {
  width: 100%;
  text-align: center;
  font-family: var(--font-hud);
  font-weight: 900;
  font-size: calc(var(--row-font, 0.75rem) * 1.68);
  line-height: 0.92;
  letter-spacing: -0.4px;
  white-space: nowrap;
}

.day-bottom-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0.92;
  white-space: nowrap;
}

.day-bottom-mon {
  font-family: var(--font-cell);
  font-weight: 800;
  font-size: calc(var(--row-font, 0.75rem) * 0.98);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  opacity: 0.98;
}

.day-cell.is-today .day-top-dow,
.day-cell.is-today .day-center-num,
.day-cell.is-today .day-bottom-mon,
.week-row.is-current-week .day-top-dow,
.week-row.is-current-week .day-center-num,
.week-row.is-current-week .day-bottom-mon {
  color: #000000 !important;
  font-weight: 900;
  opacity: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.day-top-dow,
.day-center-num,
.day-bottom-row {
  position: relative;
  z-index: 6;
}

/* Capa de Piedras de Colores distribuidas aleatoriamente en los espacios libres dentro del cajón del día */
.day-stones-layer {
  position: absolute;
  inset: 1px;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

/* Cada evento es una piedra preciosa con su forma (redonda, triangular, cuadrada, corazón, estrella, negra) y sombra profunda */
.event-stone {
  position: absolute;
  width: var(--stone-size, 13px);
  height: var(--stone-size, 13px);
  transform: translate(-50%, -50%) rotate(var(--stone-rot, 0deg));
  filter:
    drop-shadow(1.5px 2.5px 2px rgba(0, 0, 0, 0.95))
    drop-shadow(0 0 4px var(--stone-color));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: stone-shimmer 3s infinite alternate;
}

.event-stone .stone-svg {
  width: 100%;
  height: 100%;
  display: block;
}

@keyframes stone-shimmer {
  0% { transform: translate(-50%, -50%) rotate(var(--stone-rot, 0deg)) scale(0.96); }
  100% { transform: translate(-50%, -50%) rotate(var(--stone-rot, 0deg)) scale(1.06); }
}

.stone-more-badge {
  position: absolute;
  right: 1px;
  bottom: 1px;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 800;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.85);
  box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 0 2px;
  border-radius: 3px;
  line-height: 1.1;
}

/* ==========================================================================
   PIE DE CABINA
   ========================================================================== */
.cockpit-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 8px;
  background: rgba(5, 11, 22, 0.88);
  border: 1px solid rgba(0, 240, 255, 0.28);
  border-radius: 4px;
  font-family: var(--font-hud);
  font-size: 0.52rem;
  letter-spacing: 0.4px;
  color: var(--hud-muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  display: inline-block;
}

.past-dot {
  background: #ff2a55;
  box-shadow: 0 0 6px #ff2a55;
}

.today-dot {
  background: #ffffff;
  box-shadow: 0 0 8px #00f7ff;
}

.future-dot {
  background: #00b4ff;
  box-shadow: 0 0 6px #00b4ff;
}

/* ==========================================================================
   MODAL HOLOGRÁFICO DE EVENTOS (PIEDRAS DE COLORES)
   ========================================================================== */
.holo-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 6, 15, 0.82);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.holo-modal-backdrop.open {
  display: flex;
}

.holo-modal-panel {
  width: 100%;
  max-width: 430px;
  max-height: 90dvh;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(10, 22, 42, 0.97), rgba(4, 10, 22, 0.98));
  border: 1.5px solid var(--hud-cyan);
  box-shadow:
    0 0 25px rgba(0, 240, 255, 0.35),
    inset 0 0 18px rgba(0, 240, 255, 0.1);
  border-radius: 10px;
  color: #eaf8ff;
  display: flex;
  flex-direction: column;
}

.holo-modal-header {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.35);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.holo-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.holo-tag {
  font-family: var(--font-hud);
  font-size: 0.6rem;
  font-weight: 800;
  color: #00f0ff;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.holo-title {
  font-family: var(--font-hud);
  font-size: 1.25rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.55);
}

.holo-subtitle {
  font-size: 0.78rem;
  color: #8cb7d8;
  font-weight: 600;
}

.holo-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(0, 240, 255, 0.5);
  background: rgba(0, 240, 255, 0.1);
  color: #ffffff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.holo-modal-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-hud);
  font-size: 0.64rem;
  font-weight: 700;
  color: #7eeeff;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.day-stones-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 190px;
  overflow-y: auto;
}

.stone-event-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-left: 4px solid var(--gem-color, #00f0ff);
  border-radius: 6px;
  padding: 8px 10px;
}

.stone-card-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.stone-gem-large-svg {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(2px 3px 4px rgba(0, 0, 0, 0.92)) drop-shadow(0 0 6px var(--gem-color));
  flex-shrink: 0;
}

.stone-gem-large-svg .stone-svg {
  width: 100%;
  height: 100%;
}

.stone-card-texts {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stone-card-time {
  font-family: var(--font-mono);
  font-size: 1.12rem;
  font-weight: 800;
  color: #00ffcc;
  text-shadow: 0 0 8px rgba(0, 255, 204, 0.55);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.35);
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.stone-card-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  word-break: break-word;
}

.stone-delete-btn {
  border: 1px solid rgba(255, 55, 95, 0.6);
  background: rgba(255, 42, 85, 0.15);
  color: #ff809b;
  border-radius: 5px;
  padding: 4px 8px;
  font-family: var(--font-hud);
  font-size: 0.6rem;
  cursor: pointer;
}

.empty-stones-msg {
  text-align: center;
  padding: 12px;
  font-size: 0.8rem;
  color: #6e94b4;
  border: 1px dashed rgba(0, 240, 255, 0.22);
  border-radius: 6px;
}

/* Paleta de Piedras de Colores y Formas: 2 filas de 5 piedras sin texto */
.gem-palette {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.gem-option-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: all 0.15s ease;
}

.gem-option-btn.selected {
  background: rgba(0, 240, 255, 0.22);
  border-color: #ffffff;
  box-shadow: 0 0 12px var(--gem-color), inset 0 0 8px rgba(255, 255, 255, 0.25);
  transform: scale(1.06);
}

.gem-swatch-svg {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(2px 3px 4px rgba(0, 0, 0, 0.92)) drop-shadow(0 0 5px var(--gem-color));
  flex-shrink: 0;
}

.gem-swatch-svg .stone-svg {
  width: 100%;
  height: 100%;
}

.stone-inputs-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.holo-input {
  border: 1.5px solid rgba(0, 240, 255, 0.5);
  background: rgba(3, 10, 22, 0.9);
  color: #ffffff;
  border-radius: 6px;
  padding: 9px 10px;
  font-family: var(--font-cell);
  font-size: 0.95rem;
  font-weight: 700;
  outline: none;
}

.holo-input:focus {
  border-color: #ffffff;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.45);
}

.time-input {
  width: 108px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

.text-input {
  flex: 1;
  min-width: 0;
}

.holo-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.local-save-hint {
  font-size: 0.7rem;
  color: #7cc9ff;
  font-weight: 600;
}

.btn-holo-save {
  background: linear-gradient(135deg, #00f0ff, #0077ff);
  color: #020b18;
  border: 1px solid #ffffff;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.65);
  font-family: var(--font-hud);
  font-size: 0.72rem;
  font-weight: 900;
  padding: 9px 14px;
  border-radius: 6px;
  cursor: pointer;
  text-transform: uppercase;
}

/* Toast Holográfico */
.holo-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 250;
  background: rgba(4, 14, 28, 0.96);
  border: 1.5px solid #00f0ff;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.6);
  color: #ffffff;
  font-family: var(--font-hud);
  font-size: 0.68rem;
  padding: 8px 14px;
  border-radius: 6px;
  display: none;
  white-space: nowrap;
}

/* ==========================================================================
   MODAL DE ALARMA / NOTIFICACIÓN SONORA CUANDO ES LA HORA DE UN EVENTO
   ========================================================================== */
.holo-alarm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(2, 6, 16, 0.88);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.holo-alarm-backdrop.open {
  display: flex;
}

.holo-alarm-panel {
  width: 100%;
  max-width: 380px;
  background: radial-gradient(circle at 50% 25%, rgba(0, 240, 255, 0.22), rgba(5, 12, 26, 0.98) 70%);
  border: 2px solid #00ffcc;
  box-shadow:
    0 0 32px rgba(0, 255, 204, 0.65),
    inset 0 0 20px rgba(0, 240, 255, 0.25);
  border-radius: 12px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  animation: alarm-pulse-box 0.9s ease-in-out infinite alternate;
}

@keyframes alarm-pulse-box {
  0% { transform: scale(0.98); box-shadow: 0 0 22px rgba(0, 255, 204, 0.5); }
  100% { transform: scale(1.02); box-shadow: 0 0 38px rgba(0, 255, 204, 0.95), 0 0 60px rgba(0, 240, 255, 0.5); }
}

.alarm-header-tag {
  font-family: var(--font-hud);
  font-size: 0.68rem;
  font-weight: 900;
  color: #00ffcc;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(0, 255, 204, 0.8);
}

.alarm-gem-stage {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 14px #00f0ff);
}

.alarm-gem-stage .stone-svg {
  width: 100%;
  height: 100%;
}

.alarm-time-display {
  font-family: var(--font-mono);
  font-size: 2.1rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 14px #00ffcc;
  line-height: 1;
}

.alarm-title-display {
  font-family: var(--font-cell);
  font-size: 1.3rem;
  font-weight: 800;
  color: #eafaff;
  line-height: 1.25;
  word-break: break-word;
}

.alarm-actions {
  width: 100%;
  margin-top: 6px;
}

.btn-alarm-dismiss {
  width: 100%;
  background: linear-gradient(135deg, #00ffcc, #00aaff);
  color: #020b18;
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 18px rgba(0, 255, 204, 0.75);
  font-family: var(--font-hud);
  font-size: 0.8rem;
  font-weight: 900;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* Ajustes para pantallas móviles muy compactas */
@media (max-width: 420px) {
  .cockpit-viewport {
    padding: 2px;
    gap: 2px;
  }
  .cockpit-hud {
    padding: 3px 5px;
  }
  .hud-app-name {
    font-size: 0.65rem;
  }
  .day-cell {
    padding: 1px 1px;
    border-radius: 3px;
  }
  .day-label-line {
    letter-spacing: -0.4px;
  }
}
