/* ==========================================================================
   Olimpia (1968) • Linktree Neo-Noir & Design Engineering Styles
   Inspirado en la filosofía de Emil Kowalski y estándares de Addy Osmani
   ========================================================================== */

:root {
  /* Paleta Cromática Neo-Noir */
  --bg-void: #050507;
  --bg-surface-1: #09090e;
  --bg-surface-2: #0e0e16;
  --bg-surface-3: #141420;
  --bg-surface-glass: rgba(14, 14, 22, 0.72);
  --bg-surface-glass-hover: rgba(22, 22, 34, 0.85);

  /* Acentos y Neones */
  --neon-amber: #ff3b00;
  --neon-amber-glow: rgba(255, 59, 0, 0.45);
  --neon-amber-dim: rgba(255, 59, 0, 0.12);
  --white-incandescent: #fdfdfd;
  --white-glow: rgba(253, 253, 253, 0.6);

  /* Textos y DFS */
  --text-primary: #f0f2f5;
  --text-secondary: #9da1b0;
  --text-muted: #64687a;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(255, 59, 0, 0.4);
  --border-glass: rgba(255, 255, 255, 0.12);

  /* Tipografías */
  --font-display: 'Cinzel', 'Times New Roman', serif;
  --font-mono: 'Space Mono', 'SF Mono', Consolas, monospace;
  --font-typewriter: 'Special Elite', monospace;
  --font-ui: 'Syne', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Curvas y Físicas Emil Kowalski */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);

  /* Duraciones Asimétricas & Snappy UI (Emil Kowalski) */
  --duration-press: 100ms;
  --duration-fast: 160ms;
  --duration-ui: 200ms;
  --duration-modal-in: 200ms;
  --duration-modal-out: 140ms;
}

/* ==========================================================================
   Utilidades Tipográficas y Familias
   ========================================================================== */
.font-display {
  font-family: var(--font-display);
}

.font-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.font-typewriter {
  font-family: var(--font-typewriter);
}

.profile-meta-tag,
.link-badge,
.category-header,
.footer-meta {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-ui);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Grano Fílmico y Viñeteado Cinemático (GPU Containment) */
.film-grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.04;
  contain: strict;
  transform: translateZ(0);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.vignette-overlay {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 35%, rgba(5, 5, 7, 0.85) 90%, rgba(5, 5, 7, 0.98) 100%);
}

/* Luces Volumétricas Ambientales (GPU Composited) */
.ambient-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 1;
  opacity: 0.22;
  will-change: transform;
}

.glow-top {
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--neon-amber) 0%, rgba(255, 59, 0, 0) 70%);
}

.glow-bottom {
  bottom: -200px;
  right: -100px;
  background: radial-gradient(circle, rgba(255, 120, 20, 0.35) 0%, rgba(5, 5, 7, 0) 70%);
}

/* Contenedor Principal Centrado */
.linktree-app {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  min-height: 100vh;
  padding: clamp(20px, 4vh, 48px) clamp(16px, 4vw, 28px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* Barra Superior de Controles */
.top-nav-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-nav-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.nav-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-ctrl-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(14, 14, 22, 0.65);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform var(--duration-press) var(--ease-out), color var(--duration-fast) ease, border-color var(--duration-fast) ease, background var(--duration-fast) ease;
  outline: none;
}

.icon-ctrl-btn:focus-visible {
  outline: 2px solid var(--neon-amber);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .icon-ctrl-btn:hover {
    color: var(--white-incandescent);
    border-color: var(--neon-amber);
    background: rgba(255, 59, 0, 0.15);
    transform: scale(1.05);
  }
}

.icon-ctrl-btn:active {
  transform: scale(0.95);
}

/* ==========================================================================
   Sección Hero / Perfil
   ========================================================================== */
.profile-hero {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.logo-emblem-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 75%;
  max-width: 440px;
  margin-bottom: 4px;
}

.logo-corona-halo {
  position: absolute;
  width: 85%;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, var(--neon-amber-glow) 0%, rgba(255, 59, 0, 0) 70%);
  filter: blur(28px);
  pointer-events: none;
  animation: pulseHalo 4s ease-in-out infinite alternate;
}

@keyframes pulseHalo {
  0% {
    transform: scale(0.92);
    opacity: 0.35;
  }

  100% {
    transform: scale(1.12);
    opacity: 0.85;
  }
}

.profile-logo {
  width: 100%;
  height: auto;
  max-height: 180px;
  aspect-ratio: 3456 / 1821;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 20px rgba(255, 59, 0, 0.35));
  position: relative;
  z-index: 2;
  user-select: none;
}

.profile-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--neon-amber);
  background: rgba(255, 59, 0, 0.08);
  border: 1px solid rgba(255, 59, 0, 0.28);
  padding: 3px 12px;
  border-radius: 9999px;
  text-transform: uppercase;
}

.pulse-live-dot {
  font-size: 0.7rem;
  animation: pulseLiveDot 1.4s ease-in-out infinite;
}

@keyframes pulseLiveDot {

  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.9);
  }

  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

.profile-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--white-incandescent);
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
  margin-top: 2px;
}

.profile-tagline {
  font-size: clamp(0.72rem, 1.5vw, 0.84rem);
  letter-spacing: 0.14em;
  color: var(--neon-amber);
  font-style: italic;
}

.profile-bio {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 480px;
  margin-top: 2px;
}

/* ==========================================================================
   Sección Bento Grid (Emil Kowalski Design Engineering)
   ========================================================================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
}

.bento-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-primary);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  /* Sutil resalte interior en modo oscuro para dar tridimensionalidad sin bordes toscos */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 8px 30px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  outline: none;
  transition:
    transform var(--duration-fast) var(--ease-spring),
    border-color var(--duration-fast) ease,
    background-color var(--duration-fast) ease,
    box-shadow var(--duration-fast) ease;
  will-change: transform;
}

.bento-tile:focus-visible {
  outline: 2px solid var(--neon-amber);
  outline-offset: 3px;
  border-color: var(--neon-amber);
}

/* Shimmer sutil reflectivo acelerado por GPU */
.bento-tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.06) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 600ms var(--ease-out);
  pointer-events: none;
  z-index: 1;
}

@media (hover: hover) and (pointer: fine) {
  .bento-tile:hover {
    background-color: var(--bg-surface-glass-hover);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      0 14px 40px rgba(0, 0, 0, 0.85);
    transform: translateY(-2px);
  }

  .bento-tile:hover::before {
    transform: translateX(100%);
  }

  .bento-tile:hover .tile-arrow {
    transform: translate(2px, -2px);
    color: var(--white-incandescent);
  }
}

/* Feedback táctil sutil y reactivo (< 80ms) */
.bento-tile:active {
  transform: scale(0.965);
  transition-duration: 80ms;
}

/* --- Bento Hero: Verónica AI (Ocupa 2 columnas completas) --- */
/* --- Bento Hero: Estructura General (2 columnas) --- */
.bento-tile.is-hero {
  grid-column: span 2;
  padding: 22px 24px;
}

/* --- Bento Hero 1: Plataforma Principal (olimpia.lat) --- */
.bento-tile.is-platform {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(14, 14, 22, 0.88) 60%);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 12px 35px rgba(0, 0, 0, 0.8),
    0 0 22px rgba(255, 255, 255, 0.05);
}

@media (hover: hover) and (pointer: fine) {
  .bento-tile.is-platform:hover {
    border-color: rgba(255, 255, 255, 0.38);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.28),
      0 16px 45px rgba(0, 0, 0, 0.9),
      0 0 30px rgba(255, 255, 255, 0.14);
  }
}

.platform-icon {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 100%) !important;
  color: var(--white-incandescent) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}

.badge-platform {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--white-incandescent) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* --- Bento Hero 2: Verónica AI --- */
.bento-tile.is-veronica {
  background: linear-gradient(135deg, rgba(255, 59, 0, 0.12) 0%, rgba(14, 14, 22, 0.85) 60%);
  border-color: rgba(255, 59, 0, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 120, 50, 0.3),
    0 12px 35px rgba(0, 0, 0, 0.8),
    0 0 25px rgba(255, 59, 0, 0.12);
}

@media (hover: hover) and (pointer: fine) {
  .bento-tile.is-veronica:hover {
    border-color: var(--neon-amber);
    box-shadow:
      inset 0 1px 0 rgba(255, 140, 60, 0.4),
      0 16px 45px rgba(0, 0, 0, 0.9),
      0 0 32px var(--neon-amber-glow);
  }
}

.bento-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
}

.bento-hero-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 12px;
}

/* Indicador de onda de audio en vivo */
.live-wave-indicator {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  height: 14px;
}

.live-wave-indicator span {
  display: block;
  width: 2.5px;
  background: var(--neon-amber);
  border-radius: 2px;
  transform-origin: bottom;
  animation: soundWave 1.2s ease-in-out infinite alternate;
}

.live-wave-indicator span:nth-child(1) {
  height: 6px;
  animation-delay: 0ms;
}

.live-wave-indicator span:nth-child(2) {
  height: 13px;
  animation-delay: 240ms;
}

.live-wave-indicator span:nth-child(3) {
  height: 8px;
  animation-delay: 480ms;
}

@keyframes soundWave {
  0% {
    transform: scaleY(0.35);
    opacity: 0.6;
  }

  100% {
    transform: scaleY(1);
    opacity: 1;
  }
}

.bento-hero-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.bento-hero-body .tile-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--white-incandescent);
}

.bento-hero-body .tile-desc {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.veronica-icon {
  background: linear-gradient(135deg, rgba(255, 59, 0, 0.25) 0%, rgba(255, 120, 0, 0.12) 100%) !important;
  color: var(--neon-amber) !important;
  border-color: rgba(255, 59, 0, 0.4) !important;
}

.ia-accent {
  color: var(--neon-amber);
  font-weight: 900;
}

.badge-ai {
  background: rgba(255, 59, 0, 0.18) !important;
  color: var(--neon-amber) !important;
  border-color: rgba(255, 59, 0, 0.45) !important;
  font-weight: 700;
}

/* --- Elementos Comunes de Bento Tile --- */
.tile-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 14px;
  position: relative;
  z-index: 2;
}

.tile-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--white-incandescent);
  transition: transform var(--duration-fast) var(--ease-out), border-color var(--duration-fast) ease;
}

@media (hover: hover) and (pointer: fine) {
  .bento-tile:hover .tile-icon-box {
    transform: scale(1.06);
  }
}

.tile-arrow {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease-out), color var(--duration-fast) ease;
}

.tile-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 2;
}

.tile-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.tile-title {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--white-incandescent);
}

.tile-desc {
  font-size: 0.68rem;
  line-height: 1.55;
  padding-bottom: 2px;
  color: var(--text-muted);
}

.link-badge {
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
}

/* --- Acentos Específicos de Plataforma (Subtle Depth) --- */
.bento-tile.is-instagram .tile-icon-box {
  color: #e4405f;
  background: rgba(228, 64, 95, 0.08);
  border-color: rgba(228, 64, 95, 0.25);
}

@media (hover: hover) and (pointer: fine) {
  .bento-tile.is-instagram:hover {
    border-color: rgba(228, 64, 95, 0.45);
    box-shadow:
      inset 0 1px 0 rgba(228, 64, 95, 0.2),
      0 14px 40px rgba(0, 0, 0, 0.85),
      0 0 24px rgba(228, 64, 95, 0.16);
  }
}

.bento-tile.is-youtube .tile-icon-box {
  color: #ff0000;
  background: rgba(255, 0, 0, 0.08);
  border-color: rgba(255, 0, 0, 0.25);
}

@media (hover: hover) and (pointer: fine) {
  .bento-tile.is-youtube:hover {
    border-color: rgba(255, 0, 0, 0.45);
    box-shadow:
      inset 0 1px 0 rgba(255, 0, 0, 0.2),
      0 14px 40px rgba(0, 0, 0, 0.85),
      0 0 24px rgba(255, 0, 0, 0.16);
  }
}

.bento-tile.is-tiktok .tile-icon-box {
  color: #00f2fe;
  background: rgba(0, 242, 254, 0.08);
  border-color: rgba(0, 242, 254, 0.25);
}

@media (hover: hover) and (pointer: fine) {
  .bento-tile.is-tiktok:hover {
    border-color: rgba(0, 242, 254, 0.45);
    box-shadow:
      inset 0 1px 0 rgba(0, 242, 254, 0.2),
      0 14px 40px rgba(0, 0, 0, 0.85),
      0 0 24px rgba(254, 44, 85, 0.16);
  }
}

.bento-tile.is-facebook .tile-icon-box {
  color: #1877f2;
  background: rgba(24, 119, 242, 0.08);
  border-color: rgba(24, 119, 242, 0.25);
}

@media (hover: hover) and (pointer: fine) {
  .bento-tile.is-facebook:hover {
    border-color: rgba(24, 119, 242, 0.45);
    box-shadow:
      inset 0 1px 0 rgba(24, 119, 242, 0.2),
      0 14px 40px rgba(0, 0, 0, 0.85),
      0 0 24px rgba(24, 119, 242, 0.16);
  }
}

.bento-tile.is-x .tile-icon-box {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}

@media (hover: hover) and (pointer: fine) {
  .bento-tile.is-x:hover {
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.25),
      0 14px 40px rgba(0, 0, 0, 0.85),
      0 0 24px rgba(255, 255, 255, 0.14);
  }
}

/* En escritorio/tablet, si el número de tarjetas es impar, la última abarca ambas columnas de forma equilibrada */
@media (min-width: 541px) {
  .bento-tile:not(.is-hero):last-child:nth-child(odd) {
    grid-column: span 2;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
  }

  .bento-tile:not(.is-hero):last-child:nth-child(odd) .tile-top-row {
    width: auto;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .bento-tile:not(.is-hero):last-child:nth-child(odd) .tile-top-row .tile-arrow {
    display: none;
  }

  .bento-tile:not(.is-hero):last-child:nth-child(odd) .tile-content {
    flex: 1;
    min-width: 0;
  }

  .bento-tile:not(.is-hero):last-child:nth-child(odd)::after {
    content: '↗';
    font-family: var(--font-mono);
    font-size: 1.05rem;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: auto;
    transition: transform var(--duration-fast) var(--ease-out), color var(--duration-fast) ease;
  }

  .bento-tile:not(.is-hero):last-child:nth-child(odd):hover::after {
    transform: translate(2px, -2px);
    color: var(--white-incandescent);
  }
}

/* ==========================================================================
   Pie Institucional
   ========================================================================== */
.linktree-footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding-top: 12px;
}

.footer-divider {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-active), transparent);
}

.footer-meta {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.meta-sep {
  color: var(--neon-amber);
}

.footer-copy {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: rgba(100, 104, 122, 0.7);
}

/* ==========================================================================
   Modal Interactivo de Compartir & QR Oficial
   ========================================================================== */
.share-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 5, 7, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-modal-out) var(--ease-out), visibility var(--duration-modal-out) var(--ease-out);
}

.share-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--duration-modal-in) var(--ease-out), visibility var(--duration-modal-in) var(--ease-out);
}

.share-modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-active);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95), 0 0 35px var(--neon-amber-glow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.97) translateY(8px);
  transition: transform var(--duration-modal-out) var(--ease-out);
}

.share-modal-overlay.is-open .share-modal-card {
  transform: scale(1) translateY(0);
  transition: transform var(--duration-modal-in) var(--ease-out);
}

.share-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border-subtle);
}

.share-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-dot {
  color: var(--neon-amber);
  font-size: 0.8rem;
}

.share-title {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--white-incandescent);
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color var(--duration-fast) ease, transform var(--duration-press) var(--ease-out);
  outline: none;
}

.btn-close-modal:hover {
  color: var(--white-incandescent);
}

.btn-close-modal:active {
  transform: scale(0.95);
  transition-duration: 80ms;
}

.share-modal-body {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.qr-image {
  width: 170px;
  height: 170px;
  object-fit: contain;
  display: block;
}

.qr-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #1a1a24;
  text-align: center;
}

/* Lista de Enlaces Estáticos en Modal (redes.olimpia.lat & olimpia.lat) */
.modal-static-links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.static-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition:
    background-color var(--duration-fast) ease,
    border-color var(--duration-fast) ease,
    transform var(--duration-press) var(--ease-out),
    box-shadow var(--duration-fast) ease;
  outline: none;
}

.static-link-item:focus-visible {
  outline: 2px solid var(--neon-amber);
  outline-offset: 2px;
  border-color: var(--neon-amber);
}

.static-link-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.static-link-tag {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--neon-amber);
  font-weight: 700;
}

.static-link-url {
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  color: var(--white-incandescent);
  font-weight: 700;
}

.static-link-arrow {
  color: var(--text-muted);
  font-size: 1rem;
  transition: transform var(--duration-fast) var(--ease-out), color var(--duration-fast) ease;
}

@media (hover: hover) and (pointer: fine) {
  .static-link-item:hover {
    background: rgba(255, 59, 0, 0.08);
    border-color: var(--neon-amber);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 16px var(--neon-amber-glow);
    transform: translateY(-1px);
  }

  .static-link-item:hover .static-link-arrow {
    transform: translate(2px, -2px);
    color: var(--neon-amber);
  }
}

.static-link-item:active {
  transform: scale(0.975);
  transition-duration: 80ms;
}


/* ==========================================================================
   Animación de Entrada Escalonada (Stagger Rápido < 250ms - Emil Kowalski)
   ========================================================================== */
.bento-tile,
.profile-hero {
  opacity: 0;
  transform: translateY(10px) scale(0.99);
  animation: bentoFadeIn 200ms var(--ease-out) forwards;
}

.profile-hero {
  animation-delay: 20ms;
}

.bento-tile:nth-child(1) {
  animation-delay: 30ms;
}

.bento-tile:nth-child(2) {
  animation-delay: 60ms;
}

.bento-tile:nth-child(3) {
  animation-delay: 90ms;
}

.bento-tile:nth-child(4) {
  animation-delay: 120ms;
}

.bento-tile:nth-child(5) {
  animation-delay: 150ms;
}

.bento-tile:nth-child(6) {
  animation-delay: 180ms;
}

@keyframes bentoFadeIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   Accesibilidad: prefers-reduced-motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {

  .bento-tile,
  .profile-hero,
  .share-modal-overlay,
  .share-modal-card,
  .logo-corona-halo,
  .pulse-live-dot,
  .icon-ctrl-btn,
  .live-wave-indicator span,
  .static-link-item {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* ==========================================================================
   Adaptación Responsiva Móvil (Soporte iPhone, Android y Pantallas Táctiles)
   ========================================================================== */
@media (max-width: 540px) {
  .linktree-app {
    padding-top: max(16px, env(safe-area-inset-top));
    padding-bottom: max(28px, env(safe-area-inset-bottom));
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
    gap: 20px;
  }

  .top-nav-bar {
    padding: 0 4px;
  }

  .logo-emblem-wrap {
    width: 68%;
    max-width: 320px;
    margin-bottom: 2px;
  }

  .profile-title {
    font-size: 1.85rem;
    letter-spacing: 0.14em;
  }

  .profile-tagline {
    font-size: 0.74rem;
  }

  .profile-bio {
    font-size: 0.74rem;
    line-height: 1.5;
    padding: 0 8px;
  }

  /* Grid en 1 Columna con flujo ergonómico */
  .bento-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Tarjetas Hero en móvil */
  .bento-tile.is-hero {
    grid-column: span 1;
    padding: 16px 18px;
  }

  .bento-hero-header {
    margin-bottom: 10px;
  }

  .bento-hero-body {
    gap: 5px;
  }

  .bento-hero-body .tile-title {
    font-size: 0.98rem;
  }

  .bento-hero-body .tile-desc {
    font-size: 0.72rem;
    line-height: 1.5;
  }

  /* Tarjetas de Redes Sociales: Formato horizontal estilizado para pulgares */
  .bento-tile:not(.is-hero) {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    min-height: 62px;
  }

  .bento-tile:not(.is-hero) .tile-top-row {
    width: auto;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .bento-tile:not(.is-hero) .tile-top-row .tile-arrow {
    display: none;
  }

  .bento-tile:not(.is-hero) .tile-content {
    flex: 1;
    min-width: 0;
    gap: 2px;
  }

  .bento-tile:not(.is-hero) .tile-title {
    font-size: 0.88rem;
  }

  .bento-tile:not(.is-hero) .tile-desc {
    font-size: 0.68rem;
    line-height: 1.35;
  }

  .bento-tile:not(.is-hero)::after {
    content: '↗';
    font-family: var(--font-mono);
    font-size: 1.05rem;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: auto;
    transition: transform var(--duration-fast) var(--ease-out), color var(--duration-fast) ease;
  }

  .bento-tile:not(.is-hero):active::after {
    transform: translate(2px, -2px);
    color: var(--white-incandescent);
  }

  .tile-icon-box {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }

  /* Modal de Compartir en móvil */
  .share-modal-overlay {
    padding: 12px;
    align-items: flex-end;
  }

  .share-modal-card {
    max-height: 90vh;
    border-radius: 16px 16px 12px 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .qr-container .qr-image {
    width: 140px;
    height: 140px;
  }

  .share-modal-body {
    padding: 18px 16px;
    gap: 14px;
  }

  /* Footer en móvil */
  .linktree-footer {
    gap: 8px;
    padding-top: 4px;
  }

  .footer-meta {
    font-size: 0.62rem;
  }

  .footer-copy {
    font-size: 0.58rem;
  }
}

@media (max-width: 360px) {
  .profile-title {
    font-size: 1.6rem;
  }

  .bento-tile:not(.is-hero) {
    padding: 12px 14px;
    gap: 10px;
  }

  .bento-tile:not(.is-hero) .tile-desc {
    font-size: 0.64rem;
  }
}