/* =====================================================
   Diario Financiero — PWA v2
   - Fondo blanco puro (como el brandmark)
   - Wordmark idéntico al logo (Playfair Display)
   - Nav horizontal superior estilo WSJ/NYT
   ===================================================== */

:root {
  --navy:       #13294A;
  --navy-2:     #1C3A65;
  --navy-3:     #0B1B33;

  --bg:         #FFFFFF;
  --bg-2:       #F7F7F7;
  --bg-card:    #FFFFFF;

  --ink:        #1A1A1A;
  --ink-2:      #3B3B3B;
  --muted:      #6A6A6A;
  --faint:      #A6A6A6;

  --line:       #E5E5E5;
  --line-2:     #D1D1D1;

  --red:        #B02234;
  --gold:       #9C7A2E;
  --up:         #117A3A;
  --down:       #B02234;

  --serif-display: 'Playfair Display', 'Fraunces', Georgia, serif;
  --serif:      'Fraunces', 'Georgia', serif;
  --sans:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:       'JetBrains Mono', ui-monospace, monospace;

  --tabbar-h:   64px;
  --hdr-strip-h:34px;
  --wordmark-h: 58px;
  --hdr-nav-h:  38px;
  --ticker-h:   32px;
  --datestrip-h:26px;

  --header-total: calc(var(--hdr-strip-h) + var(--wordmark-h) + var(--hdr-nav-h));

  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: calc(var(--safe-top) + var(--header-total) + var(--ticker-h) + var(--datestrip-h));
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  /* Permitir scroll vertical natural en Android; prevenir rebote horizontal sólo en elementos internos */
  overscroll-behavior-y: contain;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }
img { max-width: 100%; display: block; }

/* ===================== HEADER (WSJ/NYT style) ===================== */
.app-header {
  position: fixed;
  top: 0;
  left: 0; right: 0;
  padding-top: var(--safe-top);
  background: var(--bg);
  border-bottom: 1px solid var(--navy);
  z-index: 50;
}

/* Fila 1: strip superior */
.hdr-strip {
  height: var(--hdr-strip-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.hdr-date {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.hdr-actions {
  display: flex;
  gap: 4px;
}
.hdr-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--navy);
  transition: background .15s;
  background: none;
  border: none;
  padding: 0;
  text-decoration: none;
  cursor: pointer;
}
.hdr-btn:active { background: var(--bg-2); }
.hdr-btn:hover { background: rgba(19,41,74,0.06); }

/* Fila 2: Wordmark (idéntico al logo) */
.wordmark {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--wordmark-h);
  font-family: var(--serif-display);
  font-weight: 900;
  font-size: 26px;
  color: var(--navy);
  letter-spacing: 0.01em;
  text-transform: none;
  user-select: none;
}

/* Fila 3: Nav horizontal */
.hdr-nav {
  height: var(--hdr-nav-h);
  border-top: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}
.hdr-nav-scroll {
  height: 100%;
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 12px;
  scroll-snap-type: x proximity;
}
.hdr-nav-scroll::-webkit-scrollbar { display: none; }
.hnav-item {
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  position: relative;
  letter-spacing: 0.01em;
  scroll-snap-align: start;
  transition: color .15s;
}
.hnav-item.active {
  color: var(--navy);
}
.hnav-item.active::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  background: var(--navy);
}
.hnav-item:active { color: var(--navy); }

/* ===================== TICKER ===================== */
.ticker-bar {
  position: fixed;
  top: calc(var(--safe-top) + var(--header-total));
  left: 0; right: 0;
  height: var(--ticker-h);
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  z-index: 45;
  overflow: hidden;
}
.ticker-label {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  height: 100%;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  z-index: 2;
  flex-shrink: 0;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255,255,255,0.8);
  animation: pulseWhite 1.8s infinite;
  display: inline-block;
}
@keyframes pulseWhite {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,0.8); }
  70%  { box-shadow: 0 0 0 5px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.ticker-strip-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
}
.ticker-strip-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 30px;
  background: linear-gradient(to right, transparent, var(--navy));
  pointer-events: none;
}
.ticker-strip {
  display: inline-flex;
  gap: 0;
  animation: tickerFlow 45s linear infinite;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  white-space: nowrap;
  height: 100%;
  align-items: center;
}
@keyframes tickerFlow {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.t-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border-right: 1px solid rgba(255,255,255,0.08);
  height: 100%;
  font-size: 11px;
}
.t-item .tk {
  color: #E8C97B;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.t-item .pr {
  color: #fff;
  font-family: var(--mono);
  font-weight: 500;
}
.t-item .ch {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 10px;
}
.t-item .ch.up   { color: #4ADE80; }
.t-item .ch.dn   { color: #FB7185; }
.t-item .ch.flat { color: #CBD5E1; }
.t-item .stamp {
  color: rgba(255,255,255,0.45);
  font-size: 9px;
  font-family: var(--mono);
}
.t-item .live-micro {
  width: 5px; height: 5px; border-radius: 50%;
  background: #4ADE80;
  display: inline-block;
}

/* ===================== DATESTRIP ===================== */
.datestrip {
  position: fixed;
  top: calc(var(--safe-top) + var(--header-total) + var(--ticker-h));
  left: 0; right: 0;
  height: var(--datestrip-h);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 44;
}
.datestrip .mkt-open  { color: var(--up); font-weight: 600; }
.datestrip .mkt-closed{ color: var(--muted); font-weight: 600; }

/* ===================== MAIN ===================== */
.app-main {
  padding: 14px 16px 20px;
  max-width: 760px;
  margin: 0 auto;
}
.view {
  animation: fadeIn .25s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.sec-title {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--navy);
  font-weight: 700;
  text-transform: uppercase;
  border-top: 2px solid var(--navy);
  padding-top: 8px;
  margin: 20px 0 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.sec-title > span:first-child { flex: 0 0 auto; }
.sec-title > .sec-sub { flex: 0 1 auto; text-align: right; }
.sec-title .sec-sub {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
  font-weight: 500;
  text-transform: none;
}

/* ============ HERO ============ */
.art-hero {
  display: block;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.art-hero .ah-img {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--navy);
  background-size: cover;
  background-position: center;
  border-radius: 2px;
  margin-bottom: 14px;
}
.art-hero .ah-cat {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.art-hero .ah-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.15;
  color: var(--navy);
  letter-spacing: -0.005em;
  margin: 0 0 10px;
}
.art-hero .ah-excerpt {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-2);
  margin: 0 0 10px;
}
.art-hero .ah-meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ah-meta .mdot { opacity: 0.5; }

/* ============ CARD ============ */
.art-card {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.art-card:last-child { border-bottom: 0; }
.art-card .ac-text { min-width: 0; }
.art-card .ac-cat {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.art-card .ac-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
  color: var(--navy);
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.art-card .ac-meta {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.art-card .ac-img {
  width: 100px;
  height: 100px;
  background: var(--bg-2);
  background-size: cover;
  background-position: center;
  border-radius: 2px;
}
.art-card .ac-img.no-img {
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #E8C97B;
  font-family: var(--serif-display);
  font-size: 28px;
  font-weight: 800;
}

/* ============ TAB BAR ============ */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 50;
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  padding-top: 6px;
  transition: color .15s;
}
.tab svg { width: 20px; height: 20px; }
.tab span { font-size: 10px; line-height: 1.1; white-space: nowrap; }
.tab.active { color: var(--navy); font-weight: 600; }
.tab:active { opacity: 0.6; }

/* ============ SKELETONS ============ */
.skel {
  background: linear-gradient(90deg, var(--bg-2) 0%, var(--line) 50%, var(--bg-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 2px;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}
.skel-hero { aspect-ratio: 16/10; margin-bottom: 16px; }
.skel-card { height: 100px; margin-bottom: 14px; }

/* ============ ARTICLE DETAIL ============ */
.view-article { padding-bottom: 40px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 12px;
}
.back-link:active { color: var(--navy); }
.art-detail-cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.art-detail-title {
  font-family: var(--serif-display);
  font-weight: 800;
  font-size: 30px;
  line-height: 1.1;
  color: var(--navy);
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.art-detail-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.art-detail-img {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--bg-2);
  background-size: cover;
  background-position: center;
  margin-bottom: 18px;
  border-radius: 2px;
}
/* =====================================================
   CUERPO DEL ARTÍCULO — Playfair Display (serif elegante)
   ===================================================== */
.art-detail-body,
.art-detail-body * {
  font-family: 'Playfair Display', Georgia, serif;
}
.art-detail-body {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  font-weight: 400;
}

/* Forzar peso normal en CUALQUIER elemento del cuerpo — máxima especificidad */
.art-detail-body,
.art-detail-body p,
.art-detail-body div,
.art-detail-body span,
.art-detail-body li,
.art-detail-body blockquote {
  font-weight: 400 !important;
}

.art-detail-body p {
  margin: 0 0 18px;
}

/* Énfasis puntual: strong/b conservan negrita 700 en navy para resaltar,
   pero solo cuando son pequeños (palabras sueltas). El JS sanitizer ya
   "desenvuelve" los strong masivos (párrafos completos). */
.art-detail-body strong,
.art-detail-body b {
  font-weight: 700 !important;
  color: var(--navy);
}

/* Itálicas conservan su estilo */
.art-detail-body em,
.art-detail-body i {
  font-style: italic;
  font-weight: 400 !important;
}

/* Neutralizar cualquier inline style con font-weight que venga de WordPress */
.art-detail-body [style*="font-weight"] {
  font-weight: 400 !important;
}
.art-detail-body strong[style*="font-weight"],
.art-detail-body b[style*="font-weight"] {
  font-weight: 700 !important;
}
.art-detail-body p:first-of-type::first-letter {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: 62px;
  line-height: 0.9;
  float: left;
  margin: 4px 10px 0 0;
  color: var(--navy);
}
.art-detail-body h2,
.art-detail-body h3 {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-weight: 800 !important;
  color: var(--navy);
  margin: 28px 0 12px;
  line-height: 1.2;
}
.art-detail-body h2 { font-size: 22px; }
.art-detail-body h3 { font-size: 18px; }
.art-detail-body a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.art-detail-body img,
.art-detail-body video,
.art-detail-body iframe,
.art-detail-body embed,
.art-detail-body object {
  max-width: 100% !important;
  width: 100% !important;
  height: auto;
  border-radius: 2px;
  margin: 16px 0;
  display: block;
}
/* iframes de video (YouTube, Vimeo, etc.) mantienen aspecto 16:9 */
.art-detail-body iframe {
  aspect-ratio: 16 / 9;
  height: auto;
}
/* Envolturas de video (wp-block-embed, wp-video, figure, etc.) */
.art-detail-body figure,
.art-detail-body .wp-block-embed,
.art-detail-body .wp-block-video,
.art-detail-body .wp-block-image,
.art-detail-body .video-container,
.art-detail-body [class*="embed"] {
  max-width: 100% !important;
  width: 100% !important;
  margin: 16px 0;
  overflow: hidden;
}
.art-detail-body figure img,
.art-detail-body figure video,
.art-detail-body figure iframe {
  margin: 0;
}
.art-detail-body figcaption {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  margin-top: 6px;
  text-align: center;
}
/* Neutralizar width/height inline de WordPress */
.art-detail-body [style*="width"],
.art-detail-body [style*="max-width"] {
  max-width: 100% !important;
}
.art-detail-body blockquote {
  border-left: 3px solid var(--red);
  margin: 20px 0;
  padding: 4px 0 4px 16px;
  font-style: italic;
  color: var(--ink-2);
}
.art-detail-body ul, .art-detail-body ol {
  padding-left: 20px;
  margin: 0 0 16px;
}
.art-detail-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.art-ext-link {
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============ CATEGORIAS ============ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.cat-tile {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--navy);
  transition: transform .1s, background .15s;
}
.cat-tile:active {
  transform: scale(0.98);
  background: var(--bg-2);
}
.cat-tile-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
}
.cat-tile-count {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
}

/* ============ MARKETS / WATCHLIST ============ */
.mk-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.mk-tabs::-webkit-scrollbar { display: none; }
.mk-tab {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.mk-tab.active {
  color: var(--navy);
  border-bottom-color: var(--navy);
}
.mk-tab:active { color: var(--navy); }
.mk-tab-count {
  display: inline-block;
  background: var(--red, #B02234);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  margin-left: 4px;
  letter-spacing: 0;
  vertical-align: 1px;
  min-width: 18px;
  text-align: center;
}
.mk-cta-go {
  display: inline-block;
  margin-top: 14px;
  background: var(--navy, #13294A);
  color: #fff;
  border: none;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.02em;
}
.mk-cta-go:active { opacity: .85; }
.mk-row-action.added {
  color: var(--red, #B02234);
}
.mk-row-action {
  color: #B9B9B9;
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.mk-row-action svg { width: 22px; height: 22px; display: block; }

.mk-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mk-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  grid-template-areas: "logo left price action" "logo left change action";
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.mk-row-logo  { grid-area: logo; align-self: center; }
.mk-row-left   { grid-area: left; }
.mk-row-price  { grid-area: price; }
.mk-row-change { grid-area: change; justify-self: end; }
.mk-row-action { grid-area: action; }
.mk-row-logo {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #eee;
  padding: 2px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.mk-row-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.mk-row:last-child { border-bottom: 0; }
.mk-row-left { min-width: 0; }
.mk-row-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mk-row-sub {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.mk-row-price {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
  min-width: 72px;
  align-self: end;
}
.mk-row-change {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  min-width: 60px;
  text-align: right;
  padding: 2px 7px;
  border-radius: 3px;
  align-self: start;
  justify-self: end;
}
.mk-row-change.up   { color: var(--up);   background: rgba(17,122,58,0.08); }
.mk-row-change.dn   { color: var(--down); background: rgba(176,34,52,0.08); }
.mk-row-change.flat { color: var(--muted); background: var(--bg-2); }
.mk-row-price.muted { color: var(--muted); font-weight: 500; }

.settings-body {
  padding: 20px 0;
  font-family: var(--serif);
  color: var(--ink-2);
  line-height: 1.7;
  font-size: 15px;
}
.settings-body p { margin-bottom: 14px; }
.settings-body a { color: var(--red); text-decoration: underline; }

.mk-row-action {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--muted);
  display: grid;
  place-items: center;
  transition: color .15s, background .15s;
}
.mk-row-action:active { background: var(--bg-2); }
.mk-row-action.added { color: var(--red); }
.mk-row-action svg { width: 18px; height: 18px; }

.mk-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
  padding: 16px 0 8px;
  border-top: 1px solid var(--line);
  margin-top: 10px;
}

.mk-info {
  background: var(--bg-2);
  border-left: 3px solid var(--navy);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.45;
  margin: 8px 0 16px;
  border-radius: 2px;
}
.mk-info strong { color: var(--navy); }

.mk-empty-watchlist {
  text-align: center;
  padding: 30px 16px;
  background: var(--bg-2);
  border-radius: 4px;
  margin-bottom: 20px;
}
.mk-empty-watchlist .mew-title {
  font-family: var(--serif-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.mk-empty-watchlist .mew-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  max-width: 300px;
  margin: 0 auto;
}

.mk-live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--up);
  animation: pulseGreen 2s infinite;
}
@keyframes pulseGreen {
  0%   { box-shadow: 0 0 0 0 rgba(17,122,58,0.4); }
  70%  { box-shadow: 0 0 0 5px rgba(17,122,58,0); }
  100% { box-shadow: 0 0 0 0 rgba(17,122,58,0); }
}

.mk-stale {
  font-size: 9px;
  color: var(--muted);
  font-family: var(--mono);
  font-weight: 500;
  background: var(--bg-2);
  padding: 2px 5px;
  border-radius: 2px;
}

/* ============ EMPTY ============ */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.empty-title {
  font-family: var(--serif-display);
  font-size: 18px;
  color: var(--navy);
  margin-bottom: 6px;
}
.empty-sub {
  font-size: 13px;
  line-height: 1.5;
}
.empty-fill {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty-retry-btn {
  margin-top: 18px;
  padding: 10px 22px;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity .15s;
}
.empty-retry-btn:active { opacity: 0.7; }

/* ============ TOAST ============ */
.toast {
  position: fixed;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 14px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 200;
  max-width: 85%;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* ============ RESPONSIVE ============ */
/* En desktop y tablet, la app ocupa todo el ancho del contenedor
   (sin recuadro tipo teléfono). El contenido principal se centra
   con max-width. El header, ticker, datestrip y tabbar se extienden
   a todo el ancho como en WSJ/NYT. */
@media (min-width: 820px) {
  .wordmark { font-size: 34px; }
  .hnav-item { font-size: 14px; padding: 0 16px; }
  .hdr-nav-scroll { justify-content: center; }
  .app-main { max-width: 820px; }
  /* En escritorio, la nav horizontal ya da acceso a todo: ocultamos la tab bar inferior */
  .tabbar { display: none; }
  body { padding-bottom: 40px; }
  .hdr-strip { padding: 0 24px; }
}
@media (min-width: 1100px) {
  .wordmark { font-size: 40px; }
  .app-main { max-width: 900px; }
}

/* ============ HERRAMIENTAS FINANCIERAS ============ */
.view-tools {
  padding: 16px;
}
.tools-intro {
  font-size: 15px;
  line-height: 1.55;
  color: #444;
  margin: 0 0 20px 0;
  max-width: 60ch;
}
.tools-section-label {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--navy);
  margin: 28px 0 14px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--navy);
  letter-spacing: 0.2px;
}
.tools-section-label.muted {
  color: #777;
  border-bottom-color: #ddd;
}
.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 640px) {
  .tools-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
}
.tool-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(19, 41, 74, 0.08);
  border-color: var(--navy);
}
.tool-card.is-soon {
  opacity: 0.72;
  cursor: default;
}
.tool-card.is-soon:hover {
  transform: none;
  box-shadow: none;
  border-color: #e6e6e6;
}
.tool-icon {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: #fff;
  border-radius: 8px;
}
.tool-card.is-soon .tool-icon { background: #9aa3b2; }
.tool-icon svg { width: 26px; height: 26px; }
.tool-body {
  flex: 1;
  min-width: 0;
}
.tool-chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.tool-chip.live {
  background: #e8f3ec;
  color: #117A3A;
}
.tool-chip.soon {
  background: #eee;
  color: #666;
}
.tool-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
  color: var(--navy);
  margin: 0 0 6px 0;
}
.tool-desc {
  font-size: 13px;
  line-height: 1.45;
  color: #666;
  margin: 0 0 10px 0;
}
.tool-cta {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--red);
}
.tool-cta.muted { color: #999; }

/* ============ HOME · WIDGET MI LISTA ============ */
.home-watchlist {
  margin: 20px 0 24px 0;
  padding: 14px 16px 10px 16px;
  background: #FAF8F3;
  border: 1px solid #E8E3D5;
  border-left: 3px solid var(--navy);
  border-radius: 4px;
}
.hwl-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #E8E3D5;
}
.hwl-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--navy);
  letter-spacing: 0.2px;
}
.hwl-link {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--red);
  text-decoration: none;
}
.hwl-body {
  display: grid;
  gap: 2px;
}
.hwl-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #EFE9D8;
}
.hwl-row:last-child { border-bottom: none; }
.hwl-left { min-width: 0; }
.hwl-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.hwl-sub {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hwl-price {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 14px;
  color: #222;
  text-align: right;
  min-width: 64px;
}
.hwl-price.muted { color: #aaa; font-weight: 500; }
.hwl-change {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  min-width: 62px;
}
.hwl-change.up   { color: var(--up); }
.hwl-change.down { color: var(--down); }
.hwl-change.flat { color: #999; }
.hwl-more {
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #E8E3D5;
  font-size: 12px;
  color: var(--navy);
  text-decoration: none;
  text-align: center;
}
.hwl-more:hover { color: var(--red); }

/* =========================================================
   VISTA MI LISTA — Grid WSJ: tarjetas cuadradas, fondo blanco
   ========================================================= */
.view-mylist {
  padding: 0 0 24px;
}
.view-mylist .sec-title {
  margin-bottom: 8px;
}
.ml-section-label {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--muted);
  margin: 20px 0 10px;
  padding: 0 2px;
  text-transform: uppercase;
}
.ml-section-label:first-of-type { margin-top: 8px; }

.ml-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (max-width: 640px) {
  .ml-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

.ml-tile {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  min-height: 92px;
  gap: 2px;
}
.ml-tile-tic {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: .01em;
  line-height: 1.15;
  word-break: break-word;
}
.ml-tile-name {
  font-size: 9.5px;
  color: var(--muted);
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: 2px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  font-weight: 500;
}
.ml-tile-price {
  font-family: "SF Mono", "Menlo", Consolas, monospace;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-top: auto;
  font-variant-numeric: tabular-nums;
}
.ml-tile-price.up   { color: var(--up); }
.ml-tile-price.dn   { color: var(--down); }
.ml-tile-price.flat { color: var(--ink); }
.ml-tile-change {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-family: "SF Mono", "Menlo", Consolas, monospace;
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}
.ml-tile-change.up   { color: var(--up); }
.ml-tile-change.dn   { color: var(--down); }
.ml-tile-change.flat { color: var(--muted); font-weight: 500; }
.ml-arrow {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

.ml-tile-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  opacity: 0.45;
  transition: opacity .15s, color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.ml-tile-remove svg {
  width: 11px;
  height: 11px;
}
.ml-tile-remove:hover,
.ml-tile-remove:active {
  opacity: 1;
  color: var(--down);
  background: rgba(176, 34, 52, 0.08);
}

/* Estado vacío de Mi lista */
.ml-empty {
  text-align: center;
  padding: 48px 24px 36px;
  background: var(--bg-2);
  border-radius: 4px;
  margin-top: 12px;
}
.ml-empty-title {
  font-family: var(--serif-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.ml-empty-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 320px;
  margin: 0 auto 18px;
}
.ml-empty-sub strong { color: var(--navy); }
.ml-cta-go {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  border-radius: 3px;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.ml-cta-go:hover { background: #0a1a36; }

/* =====================================================
   TABLAS DE DIVISAS POR INSTITUCIÓN (Mercados > Divisas)
   ===================================================== */
.fx-block {
  margin: 0 0 24px;
}
.fx-block-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 2px 10px;
  border-bottom: 2px solid var(--navy);
  margin-bottom: 0;
}
.fx-block-title {
  font-family: var(--serif-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.01em;
  margin: 0;
}
.fx-block-title-code {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 6px;
  letter-spacing: 0.05em;
}
.fx-block-asof {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.fx-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.fx-table thead tr {
  border-bottom: 1px solid #ddd;
}
.fx-table th {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: right;
  padding: 10px 6px;
}
.fx-table th:first-child {
  text-align: left;
  padding-left: 2px;
}
.fx-table th.fx-th-star {
  width: 36px;
  padding-right: 0;
}
.fx-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
}
.fx-table tbody tr:last-child {
  border-bottom: none;
}
.fx-table td {
  padding: 12px 6px;
  vertical-align: middle;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.fx-table td.fx-td-entity {
  text-align: left;
  padding-left: 2px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.3;
  max-width: 55vw;
}
.fx-entity-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.fx-entity-logo {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2px;
  box-sizing: border-box;
}
.fx-entity-logo-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.fx-entity-logo-fallback {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--navy);
  text-align: center;
  line-height: 1;
}
.fx-entity-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.fx-td-buy, .fx-td-sell {
  font-weight: 600;
  color: var(--navy);
}
.fx-td-spread {
  color: var(--muted);
  font-size: 13px;
}
.fx-td-star {
  text-align: center;
  padding: 0;
  width: 36px;
}
.fx-star-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #c7c7c7;
  transition: color 0.15s, transform 0.1s;
}
.fx-star-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}
.fx-star-btn:hover { color: var(--navy); }
.fx-star-btn:active { transform: scale(0.92); }
.fx-star-btn.added { color: #D4A017; }

/* Indicador de variación pequeño junto a la entidad */
.fx-var-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
}
.fx-var-dot.up   { background: var(--up); }
.fx-var-dot.down { background: var(--down); }
.fx-var-dot.flat { background: #d0d0d0; }

.fx-loading {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
}
.fx-error {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  border: 1px dashed #ddd;
  border-radius: 4px;
  margin: 12px 0;
}

/* Mobile compacto */
@media (max-width: 420px) {
  .fx-table th:nth-child(4),
  .fx-table td:nth-child(4) {
    display: none; /* Ocultar Spread en móviles muy pequeños */
  }
  .fx-table td { padding: 10px 4px; font-size: 13px; }
  .fx-table td.fx-td-entity { font-size: 12px; }
}

/* ==========================================================
   Mi Lista — tile de divisa por institución (fx:moneda:slug)
   ========================================================== */
.ml-tile-fx {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ml-tile-fx .ml-tile-tic {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}
.ml-tile-fx .ml-tile-name {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 4px;
}
.ml-tile-fx-rates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 2px;
}
.ml-tile-fx-rate {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 8px;
  background: #f7f6f2;
  border-radius: 3px;
}
.ml-tile-fx-label {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}
.ml-tile-fx-val {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.ml-tile-fx .ml-tile-change {
  margin-top: auto;
}

/* Logo del banco en tile de Mi lista (ml-tile-fx) */
.ml-tile-fx-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.ml-tile-fx-head-txt {
  min-width: 0;
  flex: 1;
}
.ml-tile-fx-head-txt .ml-tile-name {
  margin-bottom: 0;
}
.ml-tile-fx-logo {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 4px;
  padding: 2px;
  box-sizing: border-box;
}

/* Estado "cargando" / "error" en tile FX de Mi lista */
.ml-tile-fx.is-pending .ml-tile-fx-val {
  color: var(--muted);
  opacity: 0.7;
}
.ml-tile-fx.is-error .ml-tile-fx-val {
  color: var(--muted);
}
.ml-tile-fx-retry {
  margin-top: auto;
  display: flex;
  justify-content: flex-start;
}
.ml-tile-fx-retry-btn {
  appearance: none;
  -webkit-appearance: none;
  background: var(--ink, #13294A);
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 6px 10px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.ml-tile-fx-retry-btn:hover,
.ml-tile-fx-retry-btn:active {
  opacity: 0.85;
}

/* Logo del emisor en tile de Mi lista (acciones BVRD) */
.ml-tile-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.ml-tile-head-txt {
  min-width: 0;
  flex: 1;
}
.ml-tile-stock-logo {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 4px;
  padding: 2px;
  box-sizing: border-box;
}

/* =====================================================
   DEPORTES (MLB Scoreboard)
   ===================================================== */
.view-sports {
  padding-bottom: 40px;
}
.sp-datenav {
  display: flex;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0 2px;
}
.sp-datenav-btn {
  flex: 1;
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  color: var(--ink, #13294A);
  border: 1px solid #d8d6cf;
  border-radius: 3px;
  padding: 10px 8px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sp-datenav-btn.active,
.sp-datenav-btn:active {
  background: var(--ink, #13294A);
  color: #fff;
  border-color: var(--ink, #13294A);
}
.sp-date-sub {
  text-transform: capitalize;
}

/* Section labels */
.sp-section-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted, #6b6b63);
  text-transform: uppercase;
  margin: 24px 2px 10px;
  font-weight: 700;
  border-top: 1px solid #e5e2d9;
  padding-top: 12px;
}
.sp-section-label:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 8px;
}

/* Grid de tarjetas */
.sp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 600px) {
  .sp-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tarjeta de partido */
.sp-card {
  background: #fff;
  border: 1px solid #e5e2d9;
  border-radius: 4px;
  padding: 12px 14px;
  font-family: var(--sans);
}
.sp-card-live {
  border-left: 3px solid #B02234;
}
.sp-card-final {
  border-left: 3px solid #13294A;
}
.sp-card-scheduled {
  opacity: 0.95;
}
.sp-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 11px;
}
.sp-status {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.sp-status-live {
  color: #B02234;
}
.sp-status-final {
  color: var(--ink, #13294A);
}
.sp-status-sched {
  color: var(--muted, #6b6b63);
}
.sp-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #B02234;
  border-radius: 50%;
  animation: spLivePulse 1.4s ease-in-out infinite;
}
@keyframes spLivePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.sp-venue {
  color: var(--muted, #6b6b63);
  font-size: 10px;
  font-weight: 500;
  text-align: right;
  max-width: 55%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tabla de resultado */
.sp-table {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sp-table-head {
  display: grid;
  grid-template-columns: 1fr 32px 32px 32px;
  gap: 6px;
  padding: 0 2px 4px;
  border-bottom: 1px solid #f0ede3;
}
.sp-stat-lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted, #6b6b63);
  text-align: center;
}
.sp-row {
  display: grid;
  grid-template-columns: 1fr 32px 32px 32px;
  gap: 6px;
  align-items: center;
  padding: 6px 2px;
}
.sp-row + .sp-row {
  border-top: 1px solid #f5f3ea;
}
.sp-team {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.sp-logo {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.sp-team-name {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink, #13294A);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-stat {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink, #13294A);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.sp-stat-runs {
  font-size: 18px;
  font-weight: 700;
}
.sp-winner .sp-team-name,
.sp-winner .sp-stat-runs {
  font-weight: 700;
}
.sp-stat-time {
  text-align: right;
  color: var(--muted, #6b6b63);
  font-size: 13px;
}

/* Extra live data (batter / pitcher / count) */
.sp-live-extra {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e5e2d9;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink, #13294A);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sp-live-lbl {
  font-weight: 700;
  color: var(--muted, #6b6b63);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-right: 4px;
}
.sp-live-count {
  color: #B02234;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
}

/* Loading, error, empty */
.sp-loading,
.sp-error,
.sp-empty {
  background: #fff;
  border: 1px solid #e5e2d9;
  border-radius: 4px;
  padding: 30px 20px;
  text-align: center;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted, #6b6b63);
}
.sp-empty-title {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink, #13294A);
  margin-bottom: 6px;
  font-weight: 700;
}
.sp-retry-btn {
  margin-top: 14px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--ink, #13294A);
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 10px 18px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
}
.sp-footer-info {
  text-align: center;
  color: var(--muted, #6b6b63);
  font-size: 11px;
  font-family: var(--sans);
  margin-top: 20px;
  padding: 14px 10px;
  border-top: 1px solid #e5e2d9;
}

/* Módulo Home Sports */
.home-sports-sec {
  margin-top: 24px;
}
.home-sport-card {
  display: block;
  background: #fff;
  border: 1px solid #e5e2d9;
  border-radius: 4px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}
.home-sport-card:active {
  border-color: var(--ink, #13294A);
}
.home-sport-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}
.home-sport-row + .home-sport-row {
  border-top: 1px solid #f5f3ea;
}
.home-sport-more {
  display: block;
  margin-top: 10px;
  padding: 10px;
  text-align: center;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink, #13294A);
  text-decoration: none;
  letter-spacing: 0.03em;
  border: 1px solid #e5e2d9;
  border-radius: 3px;
  background: #fafaf7;
  transition: background 0.15s;
}
.home-sport-more:active {
  background: var(--ink, #13294A);
  color: #fff;
}

/* ============ v1.7.6: Share button, Load more, Opinion circular, Finanzas Personales ============ */

/* Envoltura para tarjeta de artículo + botón compartir */
.art-card-wrap {
  position: relative;
  margin-bottom: 14px;
}
.art-card-wrap .art-card {
  margin-bottom: 0;
}

/* Botón compartir por tarjeta */
.ac-share {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  padding: 6px 10px 6px 0;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 4px;
  transition: color .15s ease, background .15s ease;
}
.ac-share:hover,
.ac-share:active {
  color: var(--navy);
  background: rgba(19, 41, 74, 0.06);
}
.ac-share svg {
  width: 14px;
  height: 14px;
  display: block;
}

/* Botón compartir en detalle de artículo */
.art-detail-share {
  cursor: pointer;
}

/* Cargar más */
.load-more-wrap {
  display: flex;
  justify-content: center;
  margin: 24px 0 8px;
}
.load-more-btn {
  appearance: none;
  -webkit-appearance: none;
  background: var(--navy);
  color: #fff;
  border: none;
  padding: 12px 28px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  transition: background .15s ease, transform .05s ease;
  min-width: 200px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.load-more-btn:hover { background: #0f2340; }
.load-more-btn:active { transform: translateY(1px); }
.load-more-btn:disabled { opacity: 0.6; cursor: progress; }
.load-more-end {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
  padding: 16px;
  text-align: center;
  border-top: 1px solid var(--line);
  width: 100%;
}
.lm-spin {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  animation: lmspin 0.7s linear infinite;
  display: inline-block;
}
@keyframes lmspin {
  to { transform: rotate(360deg); }
}

/* ============ Opinión: imágenes circulares ============ */
.view-opinion .art-card .ac-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  align-self: center;
  flex-shrink: 0;
}
.view-opinion .art-card .ac-img.no-img {
  border-radius: 50%;
}
.view-opinion .art-card {
  align-items: center;
}

/* ============ Sección Finanzas Personales en Home ============ */
.home-pf-sec {
  margin-top: 12px;
}
.pf-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.pf-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--bg-1, #fff);
  border: 1px solid var(--line);
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  transition: background .15s ease, border-color .15s ease;
}
.pf-item:hover {
  background: rgba(19, 41, 74, 0.02);
  border-color: rgba(19, 41, 74, 0.2);
}
.pf-img {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  background-color: var(--bg-2);
  background-size: cover;
  background-position: center;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #E8C97B;
  font-family: var(--serif-display);
  font-weight: 800;
  font-size: 22px;
}
.pf-text {
  min-width: 0;
  flex: 1;
}
.pf-title {
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.3;
  color: var(--navy);
  margin: 0 0 4px;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pf-meta {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.pf-more {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  width: 100%;
  text-align: center;
}
.pf-more:hover { color: var(--red, #B02234); }

/* ============ v1.7.8: Filtro de ligas en Deportes ============ */
.sp-leaguenav {
  display: flex;
  gap: 0;
  margin: 12px 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}
.sp-league-btn {
  flex: 1 1 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 10px 8px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  text-transform: uppercase;
  transition: background .15s, color .15s;
}
.sp-league-btn:last-child { border-right: 0; }
.sp-league-btn:hover { background: rgba(19, 41, 74, 0.04); color: var(--navy); }
.sp-league-btn.active {
  background: var(--navy);
  color: #fff;
}

/* Tarjetas de fútbol: sin columnas R/H/E */
.sp-card-soccer .sp-stat-runs {
  font-size: 28px;
}

/* =====================================================
   Notificaciones Push — v1.7.14
   ===================================================== */

/* Pop-up de activación (2da visita) */
.push-prompt-overlay {
  position: fixed;
  inset: 0;
  background: rgba(19, 41, 74, 0.55);
  z-index: 9998;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity .22s ease;
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}
@media (min-width: 640px) {
  .push-prompt-overlay { align-items: center; }
}
.push-prompt-overlay.push-prompt-show { opacity: 1; }
.push-prompt-overlay.push-prompt-closing { opacity: 0; }

.push-prompt-card {
  background: #fff;
  border-radius: 14px;
  padding: 28px 24px 22px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.22);
  transform: translateY(20px);
  transition: transform .25s cubic-bezier(.2,.9,.3,1);
}
.push-prompt-overlay.push-prompt-show .push-prompt-card {
  transform: translateY(0);
}
.push-prompt-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(19, 41, 74, 0.08);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.push-prompt-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px;
  line-height: 1.25;
}
.push-prompt-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 22px;
}
.push-prompt-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Botones push */
.push-btn {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  letter-spacing: 0.2px;
}
.push-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.push-btn.primary {
  background: var(--navy);
  color: #fff;
}
.push-btn.primary:hover:not(:disabled) { background: #1d3a6b; }
.push-btn.ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}
.push-btn.ghost:hover:not(:disabled) { background: rgba(0,0,0,0.04); color: var(--ink); }
.push-btn.small {
  padding: 7px 14px;
  font-size: 12px;
  background: #fff;
  color: var(--navy);
  border-color: var(--navy);
}
.push-btn.small:hover:not(:disabled) { background: var(--navy); color: #fff; }

/* Toast */
.df-toast {
  position: fixed;
  bottom: calc(70px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: rgba(19, 41, 74, 0.95);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 11px 18px;
  border-radius: 10px;
  max-width: calc(100vw - 32px);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.df-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Settings sections */
.settings-section {
  padding: 20px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.settings-h3 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 14px;
}
.settings-hint {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin: 4px 0 12px;
}

/* Estado de suscripción */
.push-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  background: #fafafa;
  margin-bottom: 6px;
}
.push-status-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.push-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #b5b5b5;
  display: inline-block;
}
.push-dot.on { background: #1d8a4d; box-shadow: 0 0 0 3px rgba(29,138,77,0.18); }
.push-dot.off { background: #b5b5b5; }

/* Categorías */
.push-cats {
  margin-top: 14px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition: opacity .2s ease;
}
.push-cats.disabled {
  opacity: 0.55;
}
.push-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  gap: 12px;
}
.push-cat:last-child { border-bottom: 0; }
.push-cat-info { flex: 1; min-width: 0; }
.push-cat-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
}
.push-cat-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* Switch iOS-style */
.push-switch {
  flex-shrink: 0;
  width: 48px;
  height: 28px;
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.push-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.push-switch span {
  position: absolute;
  inset: 0;
  background: #d8d8d8;
  border-radius: 999px;
  transition: background .2s;
}
.push-switch span::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.push-switch input:checked + span { background: #1d8a4d; }
.push-switch input:checked + span::before { transform: translateX(20px); }
.push-switch input:disabled + span { opacity: 0.5; cursor: not-allowed; }


/* =====================================================
   AUTH UI — Modales de login/registro/perfil/límite
   ===================================================== */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.auth-modal.show { opacity: 1; pointer-events: auto; }
.auth-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(19, 41, 74, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.auth-modal-panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow-y: auto;
  background: #FAF7F1;
  border-radius: 20px 20px 0 0;
  padding: 32px 24px 28px;
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
  transform: translateY(30px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-overflow-scrolling: touch;
}
.auth-modal.show .auth-modal-panel { transform: translateY(0); }
@media (min-width: 640px) {
  .auth-modal { align-items: center; }
  .auth-modal-panel {
    border-radius: 16px;
    margin: 20px;
    max-height: 88vh;
  }
}
.auth-modal-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(19, 41, 74, 0.08);
  border: 0;
  color: #13294A;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.auth-modal-close:active { background: rgba(19, 41, 74, 0.16); }

/* ---- Cabecera ---- */
.auth-head {
  text-align: center;
  margin-bottom: 22px;
  padding-top: 8px;
}
.auth-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 800;
  color: #13294A;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.auth-sub {
  font-size: 14px;
  color: #777;
  margin: 0;
}
.auth-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #13294A;
  color: #fff;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.auth-unverified {
  font-size: 13px;
  color: #8a6d00;
  background: #fff4d6;
  border: 1px solid #f0c869;
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 12px;
}
.auth-unverified a { color: #13294A; font-weight: 600; }

/* ---- Intro (pantalla de límite) ---- */
.auth-intro {
  text-align: center;
  padding: 12px 8px 20px;
}
.auth-intro-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.auth-intro-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 800;
  color: #13294A;
  margin: 0 0 10px;
}
.auth-intro-desc {
  font-size: 15px;
  line-height: 1.5;
  color: #555;
  margin: 0;
}
.auth-intro-desc strong { color: #13294A; }

/* ---- Form ---- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.auth-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #666;
}
.auth-field input,
.auth-field select {
  font-family: inherit;
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid #d9d2bf;
  border-radius: 8px;
  background: #fff;
  color: #13294A;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  box-sizing: border-box;
}
.auth-field input:focus,
.auth-field select:focus {
  outline: none;
  border-color: #13294A;
  box-shadow: 0 0 0 3px rgba(19, 41, 74, 0.1);
}
.auth-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2313294A' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 36px;
}
.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.auth-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #444;
  cursor: pointer;
  padding: 6px 0;
}
.auth-check input {
  width: 18px; height: 18px;
  accent-color: #13294A;
  margin: 0;
}
.auth-error {
  font-size: 13px;
  color: #c62828;
  min-height: 18px;
  line-height: 1.4;
}
.auth-error:empty { min-height: 0; }
.auth-info {
  font-size: 13px;
  color: #1b7a3c;
  min-height: 18px;
  line-height: 1.4;
}
.auth-info:empty { min-height: 0; }

/* ---- Buttons ---- */
.auth-btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  width: 100%;
  display: block;
  margin-top: 4px;
}
.auth-btn.primary {
  background: #13294A;
  color: #fff;
}
.auth-btn.primary:active { background: #0d1e38; }
.auth-btn.primary:disabled { opacity: 0.6; cursor: default; }
.auth-btn.ghost {
  background: transparent;
  color: #13294A;
  border-color: #d9d2bf;
}
.auth-btn.ghost:active { background: #efeadb; }
.auth-btn + .auth-btn { margin-top: 10px; }

.auth-cta-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}
.auth-cta-group .auth-btn { margin: 0; }

/* ---- Benefits list ---- */
.auth-benefits {
  list-style: none;
  padding: 16px 0 0;
  margin: 0;
  border-top: 1px solid #e8e2d3;
}
.auth-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #444;
  padding: 6px 0;
  line-height: 1.4;
}
.auth-benefits li span {
  color: #1b7a3c;
  font-weight: 700;
  flex-shrink: 0;
}

/* ---- Divider ---- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
  color: #aaa;
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e8e2d3;
}

/* ---- Foot ---- */
.auth-foot {
  text-align: center;
  font-size: 14px;
  color: #777;
  margin: 14px 0 0;
}
.auth-foot a {
  color: #13294A;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-legal {
  font-size: 12px;
  color: #999;
  margin: 4px 0 0;
  line-height: 1.5;
}

/* ---- Toast genérico ---- */
.auth-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 30px);
  background: #13294A;
  color: #fff;
  padding: 12px 20px;
  border-radius: 24px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 11000;
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
  max-width: 85vw;
}
.auth-toast.show { opacity: 1; transform: translate(-50%, 0); }
.auth-toast.success { background: #1b7a3c; }
.auth-toast.error { background: #c62828; }

/* ---- Entrada de auth en header/ajustes ---- */
.auth-header-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #13294A;
  padding: 6px 12px;
  border: 1px solid #d9d2bf;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}
.auth-header-pill:active { background: #efeadb; }
.auth-header-pill .auth-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #13294A;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Mi cuenta en Ajustes */
.account-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e8e2d3;
  border-radius: 10px;
  margin-bottom: 10px;
}
.account-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #13294A;
  color: #fff;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.account-info {
  flex: 1;
  min-width: 0;
}
.account-name {
  font-size: 15px;
  font-weight: 700;
  color: #13294A;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-email {
  font-size: 13px;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 4px;
}
.account-badge.ok { background: #d4edda; color: #1b7a3c; }
.account-badge.warn { background: #fff4d6; color: #8a6d00; }

/* ============ Welcome view (post-verificación) ============ */
.welcome-view {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 48px;
  background: #faf7f1;
}
.welcome-card {
  max-width: 560px;
  width: 100%;
  background: #ffffff;
  border: 1px solid #e8e2d3;
  padding: 40px 32px 32px;
  text-align: center;
}
.welcome-check {
  display: inline-block;
  margin-bottom: 20px;
}
.welcome-kicker {
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #0a7f4f;
  margin-bottom: 8px;
}
.welcome-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 800;
  color: #13294A;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.welcome-sub {
  font-family: Georgia, serif;
  font-size: 18px;
  font-style: italic;
  color: #555;
  margin-bottom: 14px;
}
.welcome-email {
  display: inline-block;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #13294A;
  background: #f4efdf;
  padding: 6px 12px;
  margin-bottom: 28px;
  border: 1px solid #e8e2d3;
}
.welcome-benefits {
  text-align: left;
  background: #faf7f1;
  border: 1px solid #e8e2d3;
  padding: 20px 20px 16px;
  margin: 4px 0 28px;
}
.welcome-benefits-title {
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #888;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8e2d3;
}
.welcome-benefit-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.welcome-benefit-list li {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #efe9d9;
}
.welcome-benefit-list li:last-child {
  border-bottom: none;
}
.welcome-benefit-list .wb-ico {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #13294A;
  color: #fff;
  font-size: 14px;
  border-radius: 50%;
  margin-top: 2px;
}
.welcome-benefit-list strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 15px;
  color: #13294A;
  margin-bottom: 2px;
}
.welcome-benefit-list span {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: #555;
}
.welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.welcome-btn {
  display: block;
  padding: 13px 20px;
  text-align: center;
  text-decoration: none;
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid #13294A;
  transition: opacity 0.15s ease;
}
.welcome-btn-primary {
  background: #13294A;
  color: #ffffff;
}
.welcome-btn-primary:hover { opacity: 0.9; }
.welcome-btn-ghost {
  background: transparent;
  color: #13294A;
}
.welcome-btn-ghost:hover { background: #f4efdf; }
@media (max-width: 480px) {
  .welcome-card { padding: 32px 20px 24px; }
  .welcome-title { font-size: 28px; }
  .welcome-sub { font-size: 16px; }
}

/* ============ Auth OAuth buttons ============ */
.auth-oauth {
  margin-bottom: 16px;
}
.auth-btn.oauth {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  background: #ffffff;
  color: #1f1f1f;
  border: 1px solid #d0d0d0;
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.auth-btn.oauth:hover {
  background: #f7f7f7;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.auth-btn.oauth:active {
  background: #eeeeee;
}
.auth-btn.oauth svg {
  flex-shrink: 0;
}
.auth-btn.oauth.google span {
  color: #1f1f1f;
}
.auth-btn.oauth.apple {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
}
.auth-btn.oauth.apple:hover {
  background: #1a1a1a;
}

/* Settings — Legal links */
.settings-legal {
  list-style: none;
  padding: 0;
  margin: 8px 0 12px;
}
.settings-legal li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border, #e5e5e5);
}
.settings-legal li:last-child { border-bottom: 0; }
.settings-legal a {
  color: var(--ink, #111);
  text-decoration: none;
  font-size: 15px;
  display: block;
}
.settings-legal a:hover { color: var(--accent, #0a3069); }
