/* =========================================================
   STRATCOM · X Congreso Internacional de Comunicación Estratégica
   App móvil (PWA) — identidad: Poppins + Comfortaa, paleta oficial
   ========================================================= */
@font-face { font-family: Poppins; src: url(../fonts/Poppins-Light.ttf) format('truetype'); font-weight: 300; font-display: swap; }
@font-face { font-family: Poppins; src: url(../fonts/Poppins-Regular.ttf) format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Poppins; src: url(../fonts/Poppins-Medium.ttf) format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: Poppins; src: url(../fonts/Poppins-MediumItalic.ttf) format('truetype'); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: Poppins; src: url(../fonts/Poppins-SemiBold.ttf) format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: Poppins; src: url(../fonts/Poppins-Bold.ttf) format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: Poppins; src: url(../fonts/Poppins-ExtraBold.ttf) format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: Comfortaa; src: url(../fonts/Comfortaa-Regular.ttf) format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Comfortaa; src: url(../fonts/Comfortaa-Bold.ttf) format('truetype'); font-weight: 700; font-display: swap; }

:root {
  /* Paleta oficial */
  --navy: #07192F; --cream: #FDE5BE; --paper: #EFEDEA; --sand: #F7E7CB;
  --orange: #FE8719; --amber: #FFB400; --yellow: #FFE600;
  --purple: #593DF1; --lavender: #6C4BF4; --blue: #03159D;
  --red: #F62354; --pink: #FF2E9F; --rose: #FF99CC;
  --teal: #00B19D; --forest: #005645; --lime: #8CC759;

  /* Tokens de interfaz */
  --bg: var(--paper);
  --grid: rgba(7, 25, 47, .07);
  --surface: #ffffff;
  --surface-2: #f6f4f1;
  --text: var(--navy);
  --muted: #5b6474;
  --line: rgba(7, 25, 47, .09);
  --hero: var(--navy);
  --shadow-sm: 0 1px 2px rgba(7, 25, 47, .06);
  --shadow: 0 1px 2px rgba(7, 25, 47, .05), 0 10px 30px -14px rgba(7, 25, 47, .28);
  --radius: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #051121; --grid: rgba(255, 255, 255, .04); --surface: #0c2039; --surface-2: #112a48;
    --text: #F2EFEA; --muted: #9aa6b8; --line: rgba(255, 255, 255, .09); --hero: #0b2140;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px -14px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #051121; --grid: rgba(255, 255, 255, .04); --surface: #0c2039; --surface-2: #112a48;
  --text: #F2EFEA; --muted: #9aa6b8; --line: rgba(255, 255, 255, .09); --hero: #0b2140;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px -14px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0; min-height: 100dvh; overflow-x: hidden;
  font: 400 15px/1.5 Poppins, system-ui, -apple-system, sans-serif; color: var(--text);
  background-color: var(--bg);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px;
  overscroll-behavior-y: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -.015em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sc-ico { width: 100%; height: 100%; display: block; overflow: visible; }

/* ---------- Franja multicolor de la identidad ---------- */
.strip { display: flex; gap: 3px; height: 6px; }
.strip i { flex: 1; border-radius: 0 0 3px 3px; }
.strip i:nth-child(1){background:var(--orange)}.strip i:nth-child(2){background:var(--amber)}.strip i:nth-child(3){background:var(--yellow)}
.strip i:nth-child(4){background:var(--blue)}.strip i:nth-child(5){background:var(--lavender)}.strip i:nth-child(6){background:var(--purple)}
.strip i:nth-child(7){background:var(--pink)}.strip i:nth-child(8){background:var(--red)}.strip i:nth-child(9){background:var(--rose)}
.strip i:nth-child(10){background:var(--forest)}.strip i:nth-child(11){background:var(--teal)}.strip i:nth-child(12){background:var(--lime)}

/* ---------- Logo ---------- */
.logo { display: inline-grid; font-family: Comfortaa, sans-serif; font-weight: 700; line-height: .82; color: currentColor; letter-spacing: -.02em; }
.logo .l1 { padding-left: .02em; }
.logo .l2 { display: flex; align-items: center; gap: .06em; }
.logo .l2 i { display: block; width: .36em; height: .36em; }
.logo .l2 span { margin-left: .04em; }
.logo small { display: block; font: 400 .1em/1.4 Comfortaa, sans-serif; letter-spacing: .02em; margin-top: .45em; opacity: .85; white-space: nowrap; }

/* ---------- Splash ---------- */
#splash {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: var(--navy); color: #F2EFEA;
  transition: opacity .5s var(--ease), transform .7s var(--ease), clip-path .7s var(--ease);
  clip-path: circle(150% at 50% 50%);
}
#splash .logo { font-size: min(26vw, 140px); }
#splash .l1 { animation: splashUp .7s .45s var(--ease) both; }
#splash .l2 span { animation: splashUp .7s .6s var(--ease) both; }
#splash .l2 i { animation: pop .6s var(--spring) both; }
#splash .l2 i:nth-child(1) { animation-delay: .05s; } #splash .l2 i:nth-child(2) { animation-delay: .15s; }
#splash .l2 i:nth-child(3) { animation-delay: .25s; } #splash .l2 i:nth-child(4) { animation-delay: .35s; }
#splash small { animation: fadeIn .6s .9s both; }
#splash.out { clip-path: circle(0% at 50% 100%); }
#splash .strip { position: absolute; left: 0; right: 0; bottom: 0; transform-origin: left; animation: stripIn .9s .2s var(--ease) both; }
#splash .strip.top { top: 0; bottom: auto; transform: rotate(180deg); }
@keyframes splashUp { from { opacity: 0; transform: translateY(40%); } }
@keyframes pop { 0% { opacity: 0; transform: scale(0) rotate(-40deg); } 100% { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes stripIn { from { transform: scaleX(0); } }

/* ---------- App bar ---------- */
.appbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 10px;
  height: calc(64px + var(--safe-t)); padding: var(--safe-t) 16px 0; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  transition: box-shadow .3s, transform .35s var(--ease);
}
.appbar.scrolled { box-shadow: 0 1px 0 var(--line); }
body.hero-page .appbar { transform: translateY(-110%); position: fixed; left: 0; right: 0; }
.appbar .logo { font-size: 25px; }
.appbar-title { font-weight: 800; font-size: 20px; }
.appbar .spacer { flex: 1; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .2s var(--spring), background .2s;
}
.icon-btn:active { transform: scale(.88); }
.icon-btn svg, .ln { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.offline-pill { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--amber); color: var(--navy); display: none; }
body.offline .offline-pill { display: inline-block; animation: pop .5s var(--spring); }

/* ---------- Vista principal ---------- */
#view { min-height: calc(100dvh - 64px); padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 28px); view-transition-name: page; }
.wrap { padding: 0 16px; max-width: 760px; margin: 0 auto; }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding: 0 16px; max-width: 760px; margin-left: auto; margin-right: auto; }
.section-head h2 { font-size: 20px; font-weight: 800; }
.section-head a { font-size: 13px; font-weight: 600; color: var(--purple); white-space: nowrap; }
.page-title { padding: 6px 16px 0; max-width: 760px; margin: 0 auto; }
.page-title h1 { font-size: 34px; font-weight: 800; }
.page-title p { color: var(--muted); margin-top: 2px; }

/* Entrada escalonada */
.reveal { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } }

/* Transición de páginas (View Transitions API) */
::view-transition-old(page) { animation: vtOut .28s var(--ease) both; }
::view-transition-new(page) { animation: vtIn .42s var(--ease) both; }
html[data-dir="back"]::view-transition-old(page) { animation-name: vtOutBack; }
html[data-dir="back"]::view-transition-new(page) { animation-name: vtInBack; }
html[data-dir="tab"]::view-transition-old(page) { animation: fadeOut .18s both; }
html[data-dir="tab"]::view-transition-new(page) { animation: vtTab .36s var(--ease) both; }
/* La barra se muestra en vivo durante la transición para que su animación propia se vea */
::view-transition-old(tabbar) { display: none; }
::view-transition-new(tabbar) { animation: none; }
@keyframes vtOut { to { opacity: 0; transform: translateX(-12%) scale(.97); } }
@keyframes vtIn { from { opacity: 0; transform: translateX(22%); } }
@keyframes vtOutBack { to { opacity: 0; transform: translateX(16%); } }
@keyframes vtInBack { from { opacity: 0; transform: translateX(-10%) scale(.97); } }
@keyframes vtTab { from { opacity: 0; transform: translateY(14px); } }
@keyframes fadeOut { to { opacity: 0; } }
/* Respaldo si no hay View Transitions */
.page-enter-forward { animation: vtIn .4s var(--ease) both; }
.page-enter-back { animation: vtInBack .4s var(--ease) both; }
.page-enter-tab { animation: vtTab .36s var(--ease) both; }

/* ---------- Barra de pestañas (ancho completo + pestaña invertida) ---------- */
@property --ti { syntax: '<number>'; inherits: true; initial-value: 0; }
.tabbar {
  --bar: var(--navy);
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--bar); box-shadow: 0 -10px 30px -12px rgba(7, 25, 47, .45);
  view-transition-name: tabbar; transition: transform .4s var(--ease);
}
:root[data-theme="dark"] .tabbar { --bar: #0e2645; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabbar { --bar: #0e2645; } }
body.focus .tabbar { transform: translateY(calc(100% + 40px)); }
/* La pestaña activa "sube" desde la barra: una curva suave (SVG) que se desliza */
.tab-blob {
  position: absolute; top: -22px; left: 0; width: 20%; height: 23px; pointer-events: none;
  transform: translateX(calc(var(--ti, 0) * 100%)); transition: transform .6s var(--spring);
}
.tab-blob svg { position: absolute; left: 50%; bottom: 0; width: 112px; height: 23px; margin-left: -56px; fill: var(--bar); overflow: visible; }
.tab-orb {
  position: absolute; left: 50%; top: 1px; width: 48px; height: 48px; margin-left: -24px; border-radius: 50%;
  background: var(--tab-c, var(--orange)); box-shadow: 0 10px 20px -8px var(--tab-c, var(--orange)), inset 0 -3px 0 rgba(0, 0, 0, .12);
  transition: background .4s;
}
.tab-blob.pop .tab-orb { animation: orbPop .55s var(--spring); }
@keyframes orbPop { 0% { transform: translateY(30px) scale(.5); opacity: .4; } 60% { transform: translateY(-4px) scale(1.05); opacity: 1; } 100% { transform: none; } }
.tab {
  position: relative; z-index: 1; display: grid; place-items: center; align-content: center; gap: 3px;
  color: rgba(242, 239, 234, .55); font-size: 10.5px; font-weight: 600; letter-spacing: .01em; transition: color .3s;
}
.tab svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--spring), color .3s; }
.tab.active { color: color-mix(in srgb, var(--tab-c, #fff) 45%, #fff); }
.tab.active svg { color: #fff; transform: translateY(-20px) scale(1.06); transition-delay: .08s; }
.tab:focus { outline: none; }
.tab:focus-visible .tab-label { text-decoration: underline; text-underline-offset: 3px; }
.tab .badge {
  position: absolute; top: 6px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px;
  background: var(--red); color: #fff; font-size: 10px; line-height: 17px; text-align: center; transform: scale(0); transition: transform .4s var(--spring);
}
.tab .badge.on { transform: scale(1); }
.tab .badge.bump { animation: bump .5s var(--spring); }
@keyframes bump { 50% { transform: scale(1.5); } }

/* ---------- Hero de inicio ---------- */
.hero {
  position: relative; overflow: hidden; margin: 4px 12px 0; border-radius: 30px; color: #F2EFEA; background: var(--hero);
  padding: 30px 22px 22px; isolation: isolate;
}
.hero-pattern { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-pattern span { position: absolute; width: var(--s, 54px); height: var(--s, 54px); opacity: .9; animation: float 9s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes float { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(var(--dx, 6px), var(--dy, -10px)) rotate(var(--r, 12deg)); } }
.hero .logo { font-size: clamp(58px, 18.5vw, 120px); }
.hero .logo .l1, .hero .logo .l2 > span { display: inline-block; }
.hero-edition { margin-top: 14px; font: 400 13px/1.4 Comfortaa, sans-serif; opacity: .85; max-width: 300px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; }
.pill .ln { width: 15px; height: 15px; }
.hero .pill { background: rgba(255, 255, 255, .1); backdrop-filter: blur(6px); }
.hero .pill.hot { background: var(--orange); color: var(--navy); }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 20px; }
.cd { background: rgba(255, 255, 255, .07); border-radius: 18px; padding: 10px 4px 8px; text-align: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.cd b { display: block; font-size: 28px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.cd b.tick { animation: tick .45s var(--ease); }
.cd small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; opacity: .65; }
.cd:nth-child(1) b { color: var(--orange); } .cd:nth-child(2) b { color: #8f7dff; } .cd:nth-child(3) b { color: #ff5c80; } .cd:nth-child(4) b { color: #2fe0c6; }
@keyframes tick { from { transform: translateY(-40%); opacity: 0; } }
.live-banner { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 12px 14px; border-radius: 18px; background: var(--red); font-weight: 700; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: pulse 1.6s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); } 100% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); } }
.claim { margin: 28px 16px 0; text-align: center; font: 700 13px Comfortaa, sans-serif; color: var(--muted); }
.claim b { display: block; font: 800 22px/1.15 Poppins, sans-serif; color: var(--text); margin-bottom: 6px; letter-spacing: -.01em; }

/* ---------- Avisos ---------- */
.notices { display: grid; gap: 8px; padding: 0 16px; max-width: 760px; margin: 14px auto 0; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); border-left: 5px solid var(--teal); }
.notice.urgente { border-left-color: var(--red); background: color-mix(in srgb, var(--red) 8%, var(--surface)); }
.notice-ico { width: 34px; height: 34px; flex: none; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--teal) 16%, transparent); color: var(--teal); }
.notice.urgente .notice-ico { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); }
.notice strong { display: block; font-size: 14.5px; line-height: 1.3; }
.notice p { font-size: 13.5px; color: var(--muted); margin-top: 2px; white-space: pre-line; }
.notice .more { font-size: 13px; font-weight: 600; color: var(--purple); margin-top: 4px; display: inline-block; }
.notice-x { margin-left: auto; color: var(--muted); padding: 2px; flex: none; }

/* ---------- Carrusel horizontal ---------- */
.rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 14px; scroll-padding: 16px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; flex: none; }
/* Centrado cuando caben todos; si no caben, se desplaza normal */
.rail.center > :first-child { margin-left: auto; }
.rail.center > :last-child { margin-right: auto; }

/* ---------- Tiles de categoría (sub-marcas) ---------- */
.cat-tile {
  --ico-cut: var(--c); position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  width: 168px; height: 196px; padding: 16px; border-radius: 26px; background: var(--c); color: #fff;
  transition: transform .35s var(--spring), box-shadow .3s; box-shadow: 0 14px 30px -16px var(--c);
}
.cat-tile:active { transform: scale(.95) rotate(-1deg); }
.cat-tile .big-ico { position: absolute; top: 14px; left: 14px; width: 58px; height: 58px; color: rgba(255, 255, 255, .92); transition: transform .6s var(--spring); }
.cat-tile:hover .big-ico { transform: rotate(-12deg) scale(1.08); }
.cat-tile .bg-ico { position: absolute; right: -34px; top: -34px; width: 150px; height: 150px; color: #fff; opacity: .12; animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.brandword { font: 700 22px/.95 Comfortaa, sans-serif; letter-spacing: -.02em; }
.brandword i { display: block; font: italic 500 1em/1 Poppins, sans-serif; letter-spacing: -.01em; color: color-mix(in srgb, #fff 55%, var(--c)); }
.cat-tile .cname { font-size: 12.5px; font-weight: 600; opacity: .9; margin-top: 6px; }
.cat-tile .count { position: absolute; top: 16px; right: 16px; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, .22); padding: 3px 9px; border-radius: 99px; }
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px; max-width: 760px; margin: 0 auto; }
.cat-grid .cat-tile { width: auto; height: 180px; }
.cat-grid .cat-tile:first-child { grid-column: span 2; height: 150px; }
.cat-grid .cat-tile:first-child .big-ico { width: 74px; height: 74px; top: auto; bottom: 18px; left: auto; right: 18px; }
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } .cat-grid .cat-tile:first-child { grid-column: span 1; height: 180px; } .cat-grid .cat-tile:first-child .big-ico { width: 58px; height: 58px; top: 14px; left: 14px; bottom: auto; right: auto; } }

/* ---------- Tarjeta de evento ---------- */
.ev-list { display: grid; gap: 10px; padding: 0 16px; max-width: 760px; margin: 0 auto; }
.ev {
  --ico-cut: var(--c); position: relative; display: flex; gap: 12px; padding: 14px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); transition: transform .25s var(--spring);
}
.ev:active { transform: scale(.98); }
.stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.ev .save-btn { z-index: 2; }
.ev-ico { flex: none; width: 46px; height: 46px; padding: 9px; border-radius: 15px; background: var(--c); color: #fff; }
.ev-ico.has-img {
  position: relative; width: 60px; height: 60px; padding: 0; border-radius: 18px; background: var(--c) center/cover no-repeat;
  box-shadow: 0 0 0 3px var(--c), 0 8px 16px -8px var(--c); margin: 3px 3px 0 3px;
}
.ev-badge { position: absolute; right: -8px; bottom: -8px; width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--c); color: #fff; box-shadow: 0 0 0 2.5px var(--surface); }
.ev-body { flex: 1; min-width: 0; }
.ev-kicker { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--c); letter-spacing: .01em; }
.ev-kicker .sub { color: var(--muted); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root[data-theme="dark"] .ev-kicker, .dark-c .ev-kicker { color: color-mix(in srgb, var(--c) 50%, #fff); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ev-kicker { color: color-mix(in srgb, var(--c) 50%, #fff); } }
.ev-title { font-size: 15.5px; font-weight: 600; line-height: 1.3; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ev-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.ev-meta span { display: inline-flex; align-items: center; gap: 4px; }
.ev-meta .ln { width: 14px; height: 14px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.tag.live { background: var(--red); color: #fff; }
.tag.live .live-dot { width: 7px; height: 7px; }
.tag.virtual { background: color-mix(in srgb, var(--purple) 14%, transparent); color: var(--purple); }
.tag.hibrido { background: color-mix(in srgb, var(--teal) 16%, transparent); color: var(--forest); }
.tag.cancel { background: var(--navy); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag.virtual { color: #b3a6ff; } :root:not([data-theme="light"]) .tag.hibrido { color: #4fe3cc; } }
.ev.cancelled .ev-title { text-decoration: line-through; opacity: .6; }
.ev.past { opacity: .6; }
.save-btn {
  position: relative; flex: none; align-self: flex-start; width: 40px; height: 40px; margin: -6px -6px 0 0; border-radius: 50%;
  display: grid; place-items: center; color: var(--muted); transition: transform .3s var(--spring), color .2s;
}
.save-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; transition: fill .2s; }
.save-btn.on { color: var(--c, var(--red)); }
.save-btn.on svg { fill: currentColor; }
.save-btn.boom { animation: boom .5s var(--spring); }
@keyframes boom { 30% { transform: scale(.7); } 70% { transform: scale(1.25); } }
.burst { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: var(--b); pointer-events: none; animation: burst .6s var(--ease) forwards; }
@keyframes burst { to { transform: translate(var(--x), var(--y)) scale(0); opacity: 0; } }

/* Tarjeta destacada grande */
.feat {
  --ico-cut: var(--c); position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  width: min(300px, 82vw); height: 210px; padding: 18px; border-radius: 26px; color: #fff; background: var(--c) center/cover;
  box-shadow: 0 16px 30px -18px var(--c);
}
.feat::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(7, 25, 47, .85)); }
.feat > * { position: relative; }
.feat .f-ico { position: absolute; top: 16px; left: 16px; width: 44px; height: 44px; }
.feat .f-ico.bg { left: auto; right: -30px; top: -30px; width: 160px; height: 160px; opacity: .14; color: #fff; animation: spin 50s linear infinite; }
.feat h3 { font-size: 18px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feat small { font-size: 12.5px; opacity: .85; font-weight: 500; }
.feat .brandword { font-size: 14px; margin-bottom: 4px; }
.feat .brandword i { display: inline; color: inherit; opacity: .8; }

/* ---------- Agenda ---------- */
.sticky-tools {
  position: sticky; top: calc(64px + var(--safe-t)); z-index: 40; padding: 8px 0 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.segment {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 0 16px; padding: 5px;
  border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm); max-width: 728px;
}
@media (min-width: 760px) { .segment { margin: 0 auto; } }
.segment button { position: relative; z-index: 1; padding: 8px 4px; border-radius: 15px; text-align: center; line-height: 1.15; transition: color .3s; }
.segment button b { display: block; font-size: 17px; font-weight: 800; }
.segment button small { font-size: 11.5px; font-weight: 600; opacity: .7; text-transform: capitalize; }
.segment button.on { color: #fff; }
.segment .seg-blob { position: absolute; top: 5px; bottom: 5px; left: 5px; border-radius: 15px; background: var(--navy); transition: transform .5s var(--spring), width .3s; }
:root[data-theme="dark"] .segment .seg-blob { background: var(--purple); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .segment .seg-blob { background: var(--purple); } }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  --ico-cut: var(--surface); flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 10px; border-radius: 99px;
  background: var(--surface); box-shadow: var(--shadow-sm); font-size: 13px; font-weight: 600; white-space: nowrap; transition: background .25s, color .25s, transform .25s var(--spring);
}
.chip i { width: 20px; height: 20px; color: var(--c, var(--navy)); }
.chip.plain { padding: 0 14px; }
.chip.on { background: var(--c, var(--navy)); color: #fff; --ico-cut: var(--c, var(--navy)); }
.chip.on i { color: #fff; }
.chip:active { transform: scale(.94); }
:root[data-theme="dark"] .chip:not(.on) i { color: color-mix(in srgb, var(--c, #fff) 60%, #fff); }
.slot { padding: 0 16px; max-width: 760px; margin: 22px auto 0; }
.slot-time { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; line-height: 1; margin-bottom: 10px; }
.slot-time small { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.slot-time::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: var(--line); }
.slot-time .n { font-size: 11.5px; font-weight: 600; color: var(--muted); order: 3; }
.slot-time.now { color: var(--red); }
.slot-time.now::after { background: color-mix(in srgb, var(--red) 40%, transparent); }
.slot .ev-list { padding: 0; }
.notice-line { display: flex; gap: 10px; align-items: center; margin: 14px 16px 0; padding: 10px 14px; border-radius: 16px; background: color-mix(in srgb, var(--amber) 22%, var(--surface)); font-size: 12.5px; font-weight: 500; max-width: 728px; }
@media (min-width: 760px) { .notice-line { margin: 14px auto 0; } }
.notice-line .ln { flex: none; color: #b07800; }
.count-line { padding: 14px 16px 0; font-size: 13px; color: var(--muted); max-width: 760px; margin: 0 auto; }

/* ---------- Encabezado de detalle / categoría ---------- */
.dhero {
  --ico-cut: var(--c); position: relative; overflow: hidden; isolation: isolate; color: #fff; background: var(--c) center/cover;
  padding: calc(70px + var(--safe-t)) 20px 46px; border-radius: 0 0 34px 34px; min-height: 260px; display: flex; flex-direction: column; justify-content: flex-end;
}
.dhero.has-img::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7, 25, 47, .35), rgba(7, 25, 47, .88)); }
.dhero .d-bg { position: absolute; right: -60px; top: -40px; width: 280px; height: 280px; z-index: -1; color: #fff; opacity: .13; animation: spin 60s linear infinite; }
.dhero .d-bg2 { position: absolute; left: -40px; bottom: -70px; width: 180px; height: 180px; z-index: -1; color: #fff; opacity: .08; animation: spin 80s linear infinite reverse; }
.dhero .d-ico { width: 64px; height: 64px; margin-bottom: 14px; animation: pop .7s .1s var(--spring) both; }
.dhero .brandword { font-size: 18px; margin-bottom: 8px; animation: rise .5s .15s var(--ease) both; }
.dhero .brandword i { display: inline; color: inherit; opacity: .75; }
.dhero h1 { font-size: clamp(24px, 6.6vw, 34px); font-weight: 800; animation: rise .55s .2s var(--ease) both; }
.dhero .d-sub { margin-top: 8px; font-weight: 500; opacity: .85; animation: rise .55s .26s var(--ease) both; }
.dhero .d-num { font: 800 92px/0.8 Poppins, sans-serif; opacity: .95; margin-bottom: 10px; animation: rise .6s .1s var(--ease) both; letter-spacing: -.04em; }
.topnav { position: fixed; top: 0; left: 0; right: 0; z-index: 55; display: flex; gap: 8px; padding: calc(10px + var(--safe-t)) 14px 10px; pointer-events: none; transition: background .3s, box-shadow .3s; }
.topnav > * { pointer-events: auto; }
.topnav .icon-btn { background: rgba(7, 25, 47, .35); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: none; }
.topnav .tn-title { flex: 1; align-self: center; font-weight: 700; font-size: 15px; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.topnav.solid { background: var(--c, var(--navy)); box-shadow: 0 6px 20px -10px rgba(0, 0, 0, .4); }
.topnav.solid .tn-title { opacity: 1; transform: none; }
.topnav.solid .icon-btn { background: rgba(255, 255, 255, .15); }
.topnav .save-btn { color: #fff; margin: 0; width: 44px; height: 44px; background: rgba(7, 25, 47, .35); backdrop-filter: blur(10px); }
.topnav .save-btn.on { color: var(--yellow); }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; max-width: 760px; margin: -22px auto 0; position: relative; z-index: 2; }
.fact { --ico-cut: var(--surface); display: flex; gap: 10px; align-items: center; background: var(--surface); padding: 12px; border-radius: 18px; box-shadow: var(--shadow); min-width: 0; }
.fact .ln { flex: none; width: 34px; height: 34px; padding: 7px; border-radius: 11px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
:root[data-theme="dark"] .fact .ln { color: color-mix(in srgb, var(--c) 50%, #fff); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fact .ln { color: color-mix(in srgb, var(--c) 50%, #fff); } }
.fact small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.fact b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.fact.wide { grid-column: span 2; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 16px; max-width: 760px; margin: 16px auto 0; }
.btn {
  flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 18px; border-radius: 18px;
  font-weight: 700; font-size: 14.5px; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .2s var(--spring), background .2s, color .2s;
}
.btn .ln { width: 20px; height: 20px; }
.btn:active { transform: scale(.95); }
.btn.primary { background: var(--c, var(--purple)); color: #fff; box-shadow: 0 12px 24px -12px var(--c, var(--purple)); }
.btn.primary.on { background: var(--navy); }
:root[data-theme="dark"] .btn.primary.on { background: var(--surface-2); }
.btn.dark { background: var(--navy); color: #fff; }
.btn.small { min-height: 40px; font-size: 13px; flex: 0 0 auto; border-radius: 14px; }
.card { background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.prose { white-space: pre-line; font-size: 15px; line-height: 1.65; }
.label { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.cancel-banner { margin: 16px; padding: 14px; border-radius: 16px; background: var(--navy); color: #fff; font-weight: 700; text-align: center; }

/* Ponencias */
.papers { display: grid; gap: 10px; padding: 0 16px; max-width: 760px; margin: 0 auto; counter-reset: paper; }
.paper { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 14px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
/* Ver más ponencias */
.papers-more { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .5s var(--ease), opacity .4s; }
.papers-more > .papers { overflow: hidden; min-height: 0; }
.papers-more.open { grid-template-rows: 1fr; opacity: 1; }
.papers-more.open > .papers { padding-top: 10px; padding-bottom: 4px; }
.more-wrap { display: flex; justify-content: center; padding: 14px 16px 0; }
.more-btn { flex: 0 0 auto; min-height: 44px; border-radius: 99px; color: var(--c); font-size: 14px; }
.more-btn .ln { width: 18px; height: 18px; transform: rotate(90deg); transition: transform .4s var(--spring); }
.more-btn.open .ln { transform: rotate(-90deg); }
.ev-speaker { display: flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 13px; font-weight: 600; }
.ev-speaker .ln { width: 15px; height: 15px; color: var(--c); flex: none; }
.paper.hl { animation: hl 2s var(--ease); }
@keyframes hl { 0%, 40% { box-shadow: 0 0 0 3px var(--c); } }
.paper-n { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); font-weight: 800; }
:root[data-theme="dark"] .paper-n { color: color-mix(in srgb, var(--c) 45%, #fff); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .paper-n { color: color-mix(in srgb, var(--c) 45%, #fff); } }
.paper h3 { font-size: 15px; font-weight: 600; line-height: 1.35; }
.authors { margin-top: 6px; font-size: 13px; line-height: 1.45; }
.authors .inst { color: var(--muted); font-style: italic; font-size: 12.5px; }
.paper .tag { margin-top: 8px; }

/* Invitados */
.sp-card { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.avatar { flex: none; width: 54px; height: 54px; border-radius: 50%; background: var(--c, var(--purple)) center/cover; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 20px; }
.avatar.xl { width: 120px; height: 120px; font-size: 44px; border: 4px solid rgba(255, 255, 255, .9); box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .4); }
.sp-card strong { display: block; font-size: 15px; line-height: 1.25; }
.sp-card small { display: block; color: var(--muted); font-size: 12.5px; }
.sp-mini { width: 96px; text-align: center; }
.sp-mini .avatar { width: 80px; height: 80px; margin: 0 auto 6px; font-size: 28px; }
.sp-mini strong { font-size: 12.5px; line-height: 1.2; display: block; }

/* Mesas */
.mesa-row { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.mesa-n { flex: none; width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-weight: 800; font-size: 19px; color: #fff; background: var(--mc, var(--blue)); }
.mesa-row strong { font-size: 14.5px; font-weight: 600; line-height: 1.3; display: block; }
.mesa-row small { color: var(--muted); font-size: 12.5px; }
.mesa-row .chev { margin-left: auto; color: var(--muted); flex: none; }
.mesa-chip { width: 120px; height: 112px; padding: 12px; border-radius: 22px; background: var(--mc); color: #fff; display: flex; flex-direction: column; justify-content: space-between; }
.mesa-chip b { font-size: 28px; font-weight: 800; line-height: 1; }
.mesa-chip span { font-size: 11.5px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 16px; max-width: 760px; margin: -22px auto 0; position: relative; z-index: 2; }
.stat { background: var(--surface); border-radius: 18px; padding: 12px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 24px; font-weight: 800; line-height: 1.1; }
.stat small { font-size: 11.5px; color: var(--muted); font-weight: 500; }

/* ---------- Búsqueda ---------- */
.searchbox { position: relative; margin: 6px 16px 0; max-width: 728px; }
@media (min-width: 760px) { .searchbox { margin: 6px auto 0; } }
.searchbox input {
  width: 100%; height: 54px; padding: 0 48px 0 50px; border-radius: 18px; border: 0; background: var(--surface); color: var(--text);
  font: 500 16px Poppins, sans-serif; box-shadow: var(--shadow); outline: none; transition: box-shadow .2s;
}
.searchbox input:focus { box-shadow: 0 0 0 3px var(--purple), var(--shadow); }
.searchbox > .ln { position: absolute; left: 16px; top: 16px; color: var(--muted); }
.searchbox .clear { position: absolute; right: 8px; top: 7px; width: 40px; height: 40px; display: grid; place-items: center; color: var(--muted); }
.fake-search { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; margin: 6px 16px 0; border-radius: 18px; background: var(--surface); color: var(--muted); box-shadow: var(--shadow); font-weight: 500; max-width: 728px; }
@media (min-width: 760px) { .fake-search { margin: 6px auto 0; } }
mark { background: color-mix(in srgb, var(--yellow) 70%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.res-paper { display: block; padding: 12px 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.res-paper strong { font-size: 14px; font-weight: 600; line-height: 1.35; display: block; }
.res-paper small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.res-paper .where { color: var(--c); font-weight: 600; }

/* ---------- Estados vacíos ---------- */
.empty { text-align: center; padding: 40px 24px; max-width: 420px; margin: 0 auto; }
.empty .e-icons { display: flex; justify-content: center; gap: 10px; margin-bottom: 18px; }
.empty .e-icons i { width: 44px; height: 44px; display: block; animation: bob 2.4s ease-in-out infinite; }
.empty .e-icons i:nth-child(2) { animation-delay: .2s; } .empty .e-icons i:nth-child(3) { animation-delay: .4s; } .empty .e-icons i:nth-child(4) { animation-delay: .6s; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(8deg); } }
.empty h3 { font-size: 20px; font-weight: 800; }
.empty p { color: var(--muted); margin: 6px 0 18px; }

/* ---------- Info ---------- */
.info-hero { margin: 4px 12px 0; padding: 26px 20px; border-radius: 30px; background: var(--cream); color: var(--navy); position: relative; overflow: hidden; }
.info-hero .logo { font-size: 64px; }
.info-hero .ring { position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; border: 26px solid var(--amber); }
.info-hero .ring::after { content: ""; position: absolute; inset: 24px; border-radius: 50%; background: var(--purple); }
.info-hero .ring::before { content: ""; position: absolute; inset: 66px; border-radius: 50%; background: var(--orange); z-index: 1; }
.info-list { display: grid; gap: 10px; }
.info-item { --ico-cut: var(--surface); display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.info-item .ln { flex: none; width: 42px; height: 42px; padding: 10px; border-radius: 14px; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); }
.info-item small { display: block; font-size: 12px; color: var(--muted); }
.info-item b { display: block; font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.info-item .chev { margin-left: auto; color: var(--muted); }
.theme-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.theme-switch button { padding: 10px 4px; border-radius: 12px; font-size: 13px; font-weight: 600; }
.theme-switch button.on { background: var(--navy); color: #fff; }
:root[data-theme="dark"] .theme-switch button.on { background: var(--purple); }
.foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 26px; padding: 0 16px; }
.foot a { color: var(--purple); font-weight: 600; }

/* ---------- Mi agenda ---------- */
.conflict { display: inline-flex; gap: 4px; align-items: center; font-size: 11px; font-weight: 700; color: #b05a00; background: color-mix(in srgb, var(--orange) 18%, transparent); padding: 3px 8px; border-radius: 99px; }
.day-head { display: flex; align-items: baseline; gap: 10px; padding: 0 16px; max-width: 760px; margin: 22px auto 10px; }
.day-head h2 { font-size: 22px; font-weight: 800; }
.day-head small { color: var(--muted); font-weight: 500; }

/* ---------- Toast & hojas ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 30px); z-index: 90; display: flex; align-items: center; gap: 10px;
  max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 18px; background: var(--navy); color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: 0 16px 30px -10px rgba(7, 25, 47, .5); transform: translate(-50%, 30px) scale(.9); opacity: 0; pointer-events: none;
  transition: transform .45s var(--spring), opacity .3s;
}
:root[data-theme="dark"] .toast { background: #1b3557; }
body.focus .toast { bottom: calc(var(--safe-b) + 20px); }
.toast.show { transform: translate(-50%, 0) scale(1); opacity: 1; pointer-events: auto; }
.toast i { width: 26px; height: 26px; flex: none; }
.toast button { color: var(--yellow); font-weight: 700; margin-left: 6px; }
.sheet-scrim { position: fixed; inset: 0; z-index: 95; background: rgba(7, 25, 47, .5); opacity: 0; transition: opacity .3s; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 96; max-width: 560px; margin: 0 auto; padding: 10px 20px calc(24px + var(--safe-b));
  background: var(--surface); border-radius: 28px 28px 0 0; transform: translateY(100%); transition: transform .45s var(--ease);
}
.sheet.open { transform: none; }
.sheet-scrim.open { opacity: 1; }
.sheet .grab { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 16px; }
.sheet h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.sheet ol { padding-left: 20px; color: var(--muted); }
.sheet li { margin: 6px 0; }

/* ---------- Skeleton ---------- */
.skel { border-radius: 20px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (min-width: 900px) {
  .ev-list.two { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.go-days { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.go-days .btn { flex: 0 0 auto; }
