﻿/* ============================================================
   SECTORFINANCIERO · APP MÓVIL
   Shell con header sticky + bottom nav. Estilo native-feel.
   ============================================================ */

:root {
  --c-green:        #1f3828;
  --c-green-deep:   #14271b;
  --c-green-soft:   #2d4f37;
  --c-green-tint:   #e6ebe7;
  --c-cream:        #f4f4f1;
  --c-cream-deep:   #ebebe6;
  --c-white:        #ffffff;
  --c-ink:          #11171a;
  --c-text:         #1a1f23;
  --c-text-soft:    #565d62;
  --c-text-mute:    #8a9094;
  --c-line:         #d8d8d2;
  --c-line-soft:    #e6e6df;
  --c-placeholder:  #d6d6cf;
  --c-placeholder-2:#c2c2bb;
  --c-red:          #b1142c;
  --c-up:           #1d7d3e;
  --c-down:         #c0392b;

  --f-serif:        "Source Serif 4", "Source Serif Pro", "Times New Roman", Georgia, serif;
  --f-sans:         "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --h-header:       50px;
  --h-livebar:      30px;
  --h-bottomnav:    64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body.app-body {
  margin: 0;
  background: var(--c-cream);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.45;
  color: var(--c-text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
  /* En PWA standalone el viewport se extiende bajo el status bar y home indicator.
     Reservamos espacio sumando safe-area en ambos extremos. */
  padding-top:    calc(var(--h-header) + var(--h-livebar) + env(safe-area-inset-top, 0px));
  padding-bottom: calc(var(--h-bottomnav) + env(safe-area-inset-bottom, 0px));
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: rgba(31,56,40,0.08); }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 16px; }   /* 16px → iOS no hace zoom al focus */
h1, h2, h3, h4 { font-family: var(--f-serif); margin: 0; line-height: 1.15; }

/* ============================================================
   HEADER
   ============================================================ */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  /* Altura crece con el status bar (box-sizing border-box hace que padding
     se reste a la altura → sumamos ambos para conservar 50px de contenido) */
  height: calc(var(--h-header) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--c-green);
  z-index: 100;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
}
.app-header-btn {
  width: 44px; height: 44px;
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.app-header-btn:active { background: rgba(255,255,255,0.08); }
.app-header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.app-header-logo img { height: 22px; width: auto; }

/* ============================================================
   LIVEBAR (más finita que la web)
   ============================================================ */
.app-livebar {
  position: fixed;
  /* Justo debajo del header, cuyo bottom es h-header + safe-area-inset-top */
  top: calc(var(--h-header) + env(safe-area-inset-top, 0px));
  left: 0; right: 0;
  height: var(--h-livebar);
  background: var(--c-red);
  color: #fff;
  z-index: 99;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  font-size: 0.72rem;
  font-weight: 600;
  overflow: hidden;
  border-bottom: 1px solid rgba(0,0,0,0.15);
}
.app-livebar-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
  animation: app-pulse 1.4s ease-out infinite;
}
@keyframes app-pulse {
  0%   { box-shadow: 0 0 0 0  rgba(255,255,255,0.6); }
  100% { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
}
.app-livebar-label {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}
.app-livebar-viewport {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}
.app-livebar-track {
  display: inline-flex;
  white-space: nowrap;
  padding-left: 100%;
  animation: app-scroll 100s linear infinite;
}
.livebar-item {
  padding: 0 18px;
  position: relative;
}
.livebar-item + .livebar-item::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
}
@keyframes app-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ============================================================
   MAIN + VISTAS
   ============================================================ */
.app-main {
  min-height: calc(100vh - var(--h-header) - var(--h-livebar) - var(--h-bottomnav));
}
.app-view {
  padding: 14px 14px 24px;
  animation: app-fade 0.22s ease-out;
}
.app-view[hidden] { display: none; }
@keyframes app-fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.app-skel {
  text-align: center;
  color: var(--c-text-mute);
  padding: 40px 0;
  font-size: 0.9rem;
}

/* Cabecera de sección */
.app-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 24px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--c-green);
}
.app-section-head:first-child { margin-top: 4px; }
.app-section-head h2 {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.005em;
  color: var(--c-ink);
}
.app-live-tag {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-red);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ============================================================
   PLACEHOLDER GRIS (de la imagen)
   ============================================================ */
.app-ph {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 55%),
    linear-gradient(180deg, var(--c-placeholder) 0%, var(--c-placeholder-2) 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-ph::before {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent 0 18px, rgba(0,0,0,0.025) 18px 19px);
}
.app-ph-icon {
  width: 22px; height: 22px;
  color: rgba(20, 39, 27, 0.22);
  position: relative;
  z-index: 1;
}
.app-ph-cat {
  position: absolute;
  top: 6px; left: 6px;
  background: rgba(31, 56, 40, 0.9);
  color: #fff;
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 6px;
  z-index: 3;
}
/* Imagen real dentro del placeholder de la app: object-fit cover */
.app-ph img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
  display: block;
}

/* ============================================================
   FEED DE NOTICIAS — formato mobile (imagen + texto)
   ============================================================ */
.app-feed {
  display: flex;
  flex-direction: column;
}
.app-card {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--c-line-soft);
  cursor: pointer;
  transition: opacity .15s ease;
}
.app-card:first-child { padding-top: 4px; }
.app-card:last-child  { border-bottom: 0; }
.app-card:active { opacity: 0.65; }

.app-card-img {
  aspect-ratio: 4/3;
  background: var(--c-cream-deep);
}
.app-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.app-card-eyebrow {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-green);
  margin: 0;
}
.app-card-title {
  font-family: var(--f-serif);
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: -0.005em;
  line-height: 1.22;
  color: var(--c-ink);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.app-card-meta {
  font-size: 0.68rem;
  color: var(--c-text-mute);
  letter-spacing: 0.02em;
  margin: auto 0 0;
  padding-top: 4px;
}

/* HERO CARD (primera del feed) */
.app-card.hero {
  grid-template-columns: 1fr;
  border-bottom: 2px solid var(--c-ink);
  padding: 0 0 16px;
  margin-bottom: 4px;
}
.app-card.hero .app-card-img {
  aspect-ratio: 16/9;
  margin-bottom: 12px;
}
.app-card.hero .app-card-title {
  font-size: 1.4rem;
  line-height: 1.12;
  -webkit-line-clamp: 4;
  letter-spacing: -0.012em;
}
.app-card.hero .app-card-eyebrow { font-size: 0.66rem; }

/* AD slot dentro del feed (cada N tarjetas) */
.app-ad {
  background: var(--c-cream-deep);
  border: 1px solid var(--c-line);
  height: 200px;
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
/* Imagen real del anuncio en la app */
.app-ad .app-ad-img {
  position: absolute;
  inset: 0;
  display: block;
  text-decoration: none;
}
.app-ad .app-ad-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.app-ad .app-ad-label { position: relative; z-index: 2; }
.app-ad-label {
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--c-text-mute);
  text-transform: uppercase;
  text-align: center;
  padding: 4px;
  border-bottom: 1px solid var(--c-line);
  background: rgba(0,0,0,0.04);
}
.app-ad-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--c-text-soft);
  background:
    linear-gradient(135deg, transparent 0%, rgba(0,0,0,0.02) 100%),
    repeating-linear-gradient(45deg, var(--c-cream-deep) 0 12px, rgba(0,0,0,0.015) 12px 13px);
}
.app-ad-size {
  font-family: var(--f-sans);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
}
.app-ad-note {
  font-size: 0.65rem;
  color: var(--c-text-mute);
  letter-spacing: 0.02em;
  margin-top: 2px;
}

/* ============================================================
   QUOTES (mercados)
   ============================================================ */
.app-quotes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.app-quote {
  background: #fff;
  border: 1px solid var(--c-line);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.app-quote-name {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--c-text-mute);
  text-transform: uppercase;
}
.app-quote-value {
  font-family: var(--f-serif);
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--c-ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.app-quote-change {
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.app-quote-change.up   { color: var(--c-up); }
.app-quote-change.down { color: var(--c-down); }
.app-quote-change.up::before   { content: "▲ "; font-size: 0.7em; }
.app-quote-change.down::before { content: "▼ "; font-size: 0.7em; }

/* ============================================================
   CURRENCY (mercados)
   ============================================================ */
.app-currency {
  background: #fff;
  border: 1px solid var(--c-line);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.app-currency-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--c-cream);
  border: 1px solid var(--c-line);
  padding: 10px 12px;
}
.app-currency-amount,
.app-currency-result {
  flex: 1;
  font-family: var(--f-serif);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--c-ink);
  font-variant-numeric: tabular-nums;
  border: 0;
  background: transparent;
  outline: none;
  padding: 0;
  min-width: 0;
}
.app-currency-result { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-currency-select {
  font-family: var(--f-sans);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-green);
  background: transparent;
  border: 0;
  outline: none;
  cursor: pointer;
  padding: 0 14px 0 4px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10' fill='none' stroke='%231f3828' stroke-width='1.8'><path d='M2 3.5l3 3 3-3'/></svg>");
  background-repeat: no-repeat;
  background-position: right center;
}
.app-currency-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-green);
}

/* ============================================================
   ALERTAS (timeline)
   ============================================================ */
.app-alerts { display: flex; flex-direction: column; }
.app-alert {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--c-line-soft);
  cursor: pointer;
  align-items: start;
}
.app-alert:active { opacity: 0.65; }
.app-alert-time {
  font-family: var(--f-sans);
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--c-ink);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.app-alert-time::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--c-red);
  animation: app-pulse 1.4s ease-out infinite;
}
.app-alert-cat {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-green);
}
.app-alert-text {
  font-family: var(--f-serif);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--c-ink);
  margin-top: 4px;
}

/* ============================================================
   PERFIL
   ============================================================ */
.app-profile {
  text-align: center;
  padding: 24px 8px 28px;
  border-bottom: 1px solid var(--c-line);
  margin-bottom: 18px;
}
.app-profile-avatar {
  width: 72px;
  height: 72px;
  background: var(--c-green);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-serif);
  font-size: 1.7rem;
  font-weight: 900;
  margin: 0 auto 14px;
}
.app-profile-greeting {
  font-size: 1.18rem;
  font-weight: 900;
  color: var(--c-ink);
  margin: 0 0 6px;
}
.app-profile-sub {
  font-size: 0.86rem;
  color: var(--c-text-soft);
  margin: 0 14px 18px;
  line-height: 1.45;
}
.app-btn {
  display: inline-block;
  padding: 12px 22px;
  font-family: var(--f-sans);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 0;
  cursor: pointer;
  transition: background .15s ease;
  text-decoration: none;
}
.app-btn.primary { background: var(--c-green); color: #fff; }
.app-btn.primary:hover, .app-btn.primary:active { background: var(--c-green-deep); }

.app-list {
  background: #fff;
  border: 1px solid var(--c-line);
  margin-bottom: 16px;
}
.app-list-item {
  display: grid;
  grid-template-columns: 28px 1fr 14px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--c-line-soft);
  text-decoration: none;
  color: var(--c-ink);
  background: #fff;
}
.app-list-item:last-child { border-bottom: 0; }
.app-list-item:active { background: var(--c-cream-deep); }
.app-list-item-icon { color: var(--c-green); display: flex; }
.app-list-item-text {
  font-family: var(--f-sans);
  font-size: 0.94rem;
  font-weight: 600;
}
.app-list-item-arrow {
  color: var(--c-text-mute);
  font-size: 1.3rem;
  line-height: 1;
  text-align: center;
}
.app-profile-foot {
  text-align: center;
  font-size: 0.74rem;
  color: var(--c-text-mute);
  margin: 16px 8px 0;
  line-height: 1.4;
}

/* ============================================================
   BOTTOM NAV
   ============================================================ */
.app-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  /* Altura crece con el home indicator: contenido (tabs) 64px + safe area abajo */
  height: calc(var(--h-bottomnav) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #fff;
  border-top: 1px solid var(--c-line);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 100;
  box-shadow: 0 -1px 8px rgba(0,0,0,0.04);
}
.app-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--c-text-mute);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--f-sans);
  text-decoration: none;
  position: relative;
  transition: color .15s ease;
}
.app-tab:active { background: var(--c-cream-deep); }
.app-tab.active {
  color: var(--c-green);
}
.app-tab.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 3px;
  background: var(--c-green);
}
.app-tab svg { display: block; }

/* ============================================================
   SEARCH OVERLAY
   ============================================================ */
.app-search-overlay {
  position: fixed;
  inset: 0;
  background: var(--c-cream);
  z-index: 200;
  padding: 12px 12px 24px;
  padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: translateY(-100%);
  transition: transform .25s ease;
}
.app-search-overlay:not([hidden]) { transform: translateY(0); }
.app-search-overlay[hidden] {
  display: flex;
  transform: translateY(-100%);
  pointer-events: none;
}
.app-search-bar {
  display: flex;
  gap: 8px;
  align-items: center;
}
.app-search-input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--c-line);
  background: #fff;
  outline: none;
  font-size: 16px;
  font-family: var(--f-sans);
}
.app-search-input:focus { border-color: var(--c-green); }
.app-search-close {
  background: transparent;
  border: 0;
  width: 44px; height: 44px;
  font-size: 1.8rem;
  color: var(--c-text-soft);
  cursor: pointer;
  flex-shrink: 0;
}
.app-search-results {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.app-search-empty {
  text-align: center;
  color: var(--c-text-mute);
  padding: 40px 20px;
  font-size: 0.9rem;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============================================================
   SUDOKU del día
   ============================================================ */

/* Cuando estamos en la vista sudoku, ocultamos la livebar para ganar
   espacio vertical y bajamos el padding superior del body. */
body.on-sudoku .app-livebar { display: none; }
body.on-sudoku {
  padding-top: calc(var(--h-header) + env(safe-area-inset-top, 0px));
}

.sudoku-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 12px 24px;
}

.sudoku-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
}
.sudoku-eyebrow {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-green);
  margin: 0 0 2px;
}
.sudoku-title {
  font-family: var(--f-serif);
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--c-ink);
  margin: 0;
}
.sudoku-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-family: var(--f-sans);
}
.sudoku-date {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-text-mute);
}
.sudoku-timer {
  font-family: var(--f-serif);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--c-ink);
  font-variant-numeric: tabular-nums;
}

/* TABLERO 9x9 */
.sudoku-board {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  aspect-ratio: 1/1;
  max-width: min(420px, 100%);
  width: 100%;
  margin: 0 auto;
  border: 2px solid var(--c-ink);
  background: var(--c-line);
  gap: 1px;
}
.sudoku-cell {
  background: #fff;
  border: 0;
  padding: 0;
  font-family: var(--f-serif);
  font-size: clamp(1rem, 4.5vw, 1.5rem);
  font-weight: 700;
  color: var(--c-green-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
/* Pistas iniciales en peso fuerte y otro color */
.sudoku-cell.fixed {
  background: var(--c-cream-deep);
  color: var(--c-ink);
  font-weight: 900;
  cursor: default;
}
/* Líneas internas 3x3 (separadores más gruesos) */
.sudoku-cell[data-c="2"],
.sudoku-cell[data-c="5"] { box-shadow: inset -2px 0 0 var(--c-ink); }
.sudoku-cell[data-r="2"],
.sudoku-cell[data-r="5"] { box-shadow: inset 0 -2px 0 var(--c-ink); }
.sudoku-cell[data-r="2"][data-c="2"],
.sudoku-cell[data-r="2"][data-c="5"],
.sudoku-cell[data-r="5"][data-c="2"],
.sudoku-cell[data-r="5"][data-c="5"] {
  box-shadow: inset -2px -2px 0 var(--c-ink);
}

/* Celda activa */
.sudoku-cell.active {
  background: var(--c-green-tint);
  outline: 2px solid var(--c-green);
  outline-offset: -2px;
  z-index: 1;
}
/* Mismas fila/columna/caja como tono suave */
.sudoku-cell.peer { background: rgba(31, 56, 40, 0.04); }
.sudoku-cell.fixed.peer { background: color-mix(in srgb, var(--c-cream-deep) 80%, var(--c-green-tint)); }
/* Conflictos */
.sudoku-cell.error {
  color: var(--c-red);
  background: rgba(177, 20, 44, 0.08);
}
.sudoku-cell.error.active {
  outline-color: var(--c-red);
}
/* Mismos números resaltados */
.sudoku-cell.same { background: rgba(31, 56, 40, 0.12); }

/* PAD numérico */
.sudoku-pad {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  max-width: min(420px, 100%);
  width: 100%;
  margin: 0 auto;
}
.sudoku-num {
  padding: 14px 0;
  font-family: var(--f-serif);
  font-size: 1.3rem;
  font-weight: 800;
  background: #fff;
  border: 1px solid var(--c-line);
  color: var(--c-green-deep);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s ease;
}
.sudoku-num:active { background: var(--c-green-tint); }
.sudoku-num.erase {
  background: var(--c-cream-deep);
  color: var(--c-text-soft);
  font-size: 1.1rem;
}
.sudoku-num.erase:active { background: var(--c-line); }

.sudoku-actions {
  display: flex;
  gap: 8px;
  max-width: min(420px, 100%);
  width: 100%;
  margin: 0 auto;
}
.sudoku-btn {
  flex: 1;
  padding: 11px;
  background: transparent;
  border: 1px solid var(--c-line);
  color: var(--c-text);
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .15s ease;
}
.sudoku-btn:hover, .sudoku-btn:active {
  background: var(--c-cream-deep);
}

.sudoku-status {
  text-align: center;
  font-size: 0.86rem;
  color: var(--c-text-soft);
  margin: 4px 0 0;
  min-height: 22px;
}
.sudoku-status.ok    { color: var(--c-up); font-weight: 700; }
.sudoku-status.error { color: var(--c-red); font-weight: 700; }

/* Bottom-nav con 6 tabs en vez de 5 */
.app-bottom-nav { grid-template-columns: repeat(6, 1fr); }
.app-tab span { font-size: 0.56rem; }   /* baja un pelín por la falta de espacio */
