/* ===================== Mi Álbum Mundial 2026 — dark premium ===================== */
:root {
  --bg: #0b1020;
  --bg-2: #0f1629;
  --card: #151c30;
  --card-2: #1b2440;
  --line: #25304f;
  --txt: #eef2ff;
  --muted: #9aa6c7;
  --gold: #f5c451;
  --gold-2: #e0a93a;
  --teal: #2dd4bf;
  --green: #22c55e;
  --green-d: #16a34a;
  --red: #ef4444;
  --grey: #334063;
  --radius: 16px;
  --shadow: 0 8px 30px rgba(0,0,0,.45);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  color: var(--txt);
  background:
    radial-gradient(1200px 600px at 50% -10%, #16203c 0%, transparent 60%),
    radial-gradient(800px 500px at 110% 10%, #11212a 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100dvh;
}
.screen { max-width: 680px; margin: 0 auto; padding: 16px 16px 96px; }
.hidden { display: none !important; }
h1,h2,h3 { margin: 0; }

/* ---------- buttons ---------- */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px;
  border:0; border-radius: 12px; padding: 14px 18px; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: transform .06s ease, filter .15s ease; }
.btn:active { transform: scale(.98); }
.btn-block { width: 100%; margin-top: 10px; }
.btn-primary { color:#1a1300; background: linear-gradient(135deg, var(--gold), var(--gold-2));
  box-shadow: 0 6px 20px rgba(245,196,81,.28); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { color: var(--txt); background: var(--card-2); border: 1px solid var(--line); }
.icon-btn { background: var(--card-2); color: var(--muted); border:1px solid var(--line);
  border-radius: 10px; width: 40px; height: 40px; font-size: 18px; cursor: pointer; }

.msg { min-height: 20px; color: var(--red); font-size: 14px; text-align:center; margin: 10px 0 0; }
.msg.ok { color: var(--teal); }

/* ---------- login ---------- */
.login-screen { display:flex; flex-direction:column; justify-content:center; align-items:center;
  min-height: 100dvh; text-align:center; }
.login-card { width: 100%; max-width: 380px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 22px;
  box-shadow: var(--shadow); }
.brand-logo { width: 112px; height: 112px; object-fit: contain; border-radius: 24px; margin: 0 auto 6px;
  display:block; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.brand-title { font-size: 26px; line-height:1.15; letter-spacing:.3px; }
.brand-title span { display:block; background: linear-gradient(90deg,var(--gold),var(--teal));
  -webkit-background-clip:text; background-clip:text; color: transparent; font-size: 22px; }
.brand-tagline { color: var(--muted); font-size: 14.5px; margin: 10px 4px 18px; line-height:1.5; }
.field input { width:100%; padding:14px; margin:7px 0; font-size:16px; color:var(--txt);
  background: var(--bg-2); border:1px solid var(--line); border-radius:12px; }
.field input::placeholder { color:#6b779b; }
.field input:focus { outline:none; border-color: var(--gold); }
.login-foot { color:#6b779b; font-size:12.5px; margin-top:18px; max-width: 360px; }

/* ---------- topbar ---------- */
.topbar { display:flex; align-items:center; justify-content:space-between;
  padding: 6px 2px 14px; }
.topbar-brand { display:flex; align-items:center; gap:10px; }
.topbar-logo { width:38px; height:38px; border-radius:10px; object-fit:contain;
  box-shadow:0 4px 14px rgba(0,0,0,.5); }
.topbar-title { font-weight:800; font-size:18px; letter-spacing:.3px; }
.topbar-user { display:flex; align-items:center; gap:8px; }
.chip-user { background: var(--card-2); border:1px solid var(--line); color:var(--muted);
  padding:7px 12px; border-radius:20px; font-size:13px; font-weight:600; }

/* ---------- stats ---------- */
.stats { background: linear-gradient(135deg, var(--card), var(--card-2));
  border:1px solid var(--line); border-radius: var(--radius); padding:16px; box-shadow: var(--shadow); }
.stat-numbers { display:flex; align-items:baseline; gap:8px; }
.stat-numbers strong { font-size:34px; color: var(--gold); font-weight:800; }
.stat-numbers span { color: var(--muted); font-size:14px; }
.progress { height:10px; background:#0c1226; border-radius:99px; overflow:hidden; margin:10px 0 8px;
  border:1px solid var(--line); }
.progress-fill { height:100%; background: linear-gradient(90deg, var(--teal), var(--gold));
  border-radius:99px; transition: width .4s ease; }
.stat-sub { color: var(--muted); font-size:13.5px; display:flex; align-items:center; gap:6px; }
.stat-sub .sep { opacity:.4; margin:0 4px; }
.dot { width:9px; height:9px; border-radius:99px; display:inline-block; }
.dot-missing { background: var(--grey); }
.dot-dup { background: var(--gold); }

/* ---------- howto ---------- */
.howto { background: var(--card); border:1px solid var(--line); border-left:3px solid var(--teal);
  border-radius:14px; padding:16px; margin:16px 0; }
.howto h2 { font-size:18px; margin-bottom:8px; }
.howto p { color: var(--muted); font-size:14.5px; line-height:1.55; margin:6px 0; }
.howto b { color: var(--txt); }
.howto-eg { color: var(--teal) !important; font-size:14px !important; }

/* ---------- mic ---------- */
.mic-btn { width:100%; border:0; border-radius:20px; padding:26px; cursor:pointer; color:#1a1300;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  box-shadow: 0 10px 30px rgba(245,196,81,.30);
  display:flex; flex-direction:column; align-items:center; gap:8px; transition: transform .06s; }
.mic-btn:active { transform: scale(.985); }
.mic-icon { font-size:40px; }
.mic-label { font-size:18px; font-weight:800; }
.mic-btn.recording { background: linear-gradient(135deg, #ff6b6b, var(--red)); color:#fff;
  animation: pulse 1.2s infinite; box-shadow:0 0 0 0 rgba(239,68,68,.5); }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(239,68,68,.45);} 70%{box-shadow:0 0 0 18px rgba(239,68,68,0);} 100%{box-shadow:0 0 0 0 rgba(239,68,68,0);} }
.mic-state { text-align:center; color:var(--muted); font-size:13.5px; min-height:18px; margin-top:10px; }

.heard-box { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:16px; margin-top:14px; }
.heard-title { margin:0 0 10px; font-weight:700; font-size:15px; }
.heard-hint { color:var(--muted); font-size:13px; margin:10px 0 0; }
.chips { list-style:none; padding:0; margin:0; display:flex; flex-wrap:wrap; gap:8px; }
.chips li { background: var(--green-d); color:#fff; padding:9px 14px; border-radius:99px;
  font-weight:700; font-size:15px; cursor:pointer; }
.chips li.invalid { background: var(--red); text-decoration: line-through; opacity:.85; }

.or-divider { text-align:center; color:#6b779b; font-size:13px; margin:22px 0 6px; position:relative; }
.or-divider span { background: var(--bg); padding:0 12px; position:relative; z-index:1; }
.or-divider::before { content:""; position:absolute; left:0; right:0; top:50%; height:1px; background:var(--line); }

/* ---------- legend / filters ---------- */
.legend { display:flex; gap:16px; flex-wrap:wrap; color:var(--muted); font-size:13px; margin:4px 0 12px; }
.legend .sw { display:inline-block; width:14px; height:14px; border-radius:4px; vertical-align:-2px; margin-right:4px; }
.sw-have { background: var(--green); }
.sw-dup { background: var(--green); box-shadow: inset 0 0 0 2px var(--gold); }
.sw-missing { background: var(--grey); }
.filters { display:flex; gap:8px; margin-bottom:10px; }
.pill { flex:1; padding:10px; border:1px solid var(--line); background:var(--card-2); color:var(--muted);
  border-radius:99px; font-weight:700; font-size:14px; cursor:pointer; }
.pill.active { background: linear-gradient(135deg,var(--gold),var(--gold-2)); color:#1a1300; border-color:transparent; }
.grid-hint { color:#6b779b; font-size:12.5px; margin:0 2px 12px; }

/* ---------- grid ---------- */
.section-title { display:flex; align-items:center; justify-content:space-between;
  margin:16px 2px 8px; font-size:13px; color:var(--muted); font-weight:700; }
.section-title .scount { color:var(--gold); font-weight:800; }
#grid, #neighborGrid { display:grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap:6px; }
.cell { aspect-ratio:1; display:flex; align-items:center; justify-content:center;
  border-radius:10px; font-size:13px; font-weight:700; position:relative; cursor:pointer;
  background: var(--card-2); color: var(--muted); border:1px solid var(--line); user-select:none;
  transition: transform .05s; }
.cell:active { transform: scale(.92); }
.cell.have { background: linear-gradient(135deg, #1f9d54, var(--green-d)); color:#fff; border-color:transparent; }
.cell.dup { box-shadow: inset 0 0 0 2px var(--gold), 0 4px 12px rgba(245,196,81,.25); }
.cell .badge { position:absolute; top:-6px; right:-6px; background:var(--gold); color:#1a1300;
  font-size:11px; font-weight:800; min-width:18px; height:18px; line-height:18px; text-align:center;
  border-radius:99px; padding:0 4px; box-shadow:0 2px 6px rgba(0,0,0,.4); }

/* ---------- cards (trades / alerts / links) ---------- */
.tab-h { font-size:20px; margin-bottom:4px; }
.tab-desc { color:var(--muted); font-size:14px; margin:4px 0 14px; line-height:1.5; }
.cards { display:flex; flex-direction:column; gap:10px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:14px; }
.card .name { font-weight:800; font-size:16px; margin-bottom:8px; display:flex; align-items:center; gap:8px; }
.card .row { font-size:14px; color:var(--muted); margin:4px 0; }
.card .row b { color:var(--txt); }
.tag { font-size:11px; font-weight:800; padding:3px 9px; border-radius:99px; }
.tag-give { background: rgba(45,212,191,.15); color: var(--teal); }
.tag-get { background: rgba(245,196,81,.16); color: var(--gold); }
.empty { color:#6b779b; text-align:center; padding:24px; font-size:14px; }

.alert-card { background: linear-gradient(135deg,#231b2e,#2a2030); border:1px solid #4a3b2e;
  border-left:3px solid var(--gold); border-radius:14px; padding:14px; font-size:14.5px; }
.alert-card b { color: var(--gold); }

.share-block { margin-top:26px; padding-top:20px; border-top:1px solid var(--line); }
.share-block h3 { font-size:16px; margin-bottom:6px; }
.sharelink { font-size:12.5px; color:var(--teal); word-break:break-all; text-align:center; margin:10px 0; }

.match-banner { background: linear-gradient(135deg, var(--card), var(--card-2));
  border:1px solid var(--gold); border-radius:14px; padding:16px; margin:14px 0; font-size:15px;
  text-align:center; line-height:1.6; }

/* ---------- bottom nav ---------- */
.bottomnav { position:fixed; left:0; right:0; bottom:0; z-index:20;
  display:flex; max-width:680px; margin:0 auto; padding:8px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(11,16,32,.92); backdrop-filter: blur(12px); border-top:1px solid var(--line); }
.navbtn { flex:1; background:none; border:0; color:var(--muted); font-size:11px; font-weight:700;
  display:flex; flex-direction:column; align-items:center; gap:3px; padding:6px 2px; cursor:pointer; }
.navbtn span { font-size:22px; }
.navbtn.active { color: var(--gold); }

/* ---------- search / switch / select ---------- */
.search { width:100%; padding:13px 14px; margin:14px 0 10px; font-size:15px; color:var(--txt);
  background: var(--bg-2); border:1px solid var(--line); border-radius:12px; }
.search::placeholder { color:#6b779b; }
.search:focus { outline:none; border-color: var(--gold); }
.switch { display:flex; align-items:center; gap:10px; background:var(--card); border:1px solid var(--line);
  border-radius:12px; padding:12px 14px; font-size:14px; color:var(--muted); cursor:pointer; margin-bottom:10px; }
.switch input { width:42px; height:24px; appearance:none; background:#2a3556; border-radius:99px; position:relative; cursor:pointer; transition:background .2s; flex:0 0 auto; }
.switch input:checked { background: var(--gold); }
.switch input::after { content:""; position:absolute; top:2px; left:2px; width:20px; height:20px; background:#fff; border-radius:99px; transition:transform .2s; }
.switch input:checked::after { transform: translateX(18px); }
.select { width:100%; padding:13px 14px; margin:6px 0 14px; font-size:16px; color:var(--txt);
  background: var(--bg-2); border:1px solid var(--line); border-radius:12px; }

/* ---------- team accordion ---------- */
.team-list { display:flex; flex-direction:column; gap:8px; }
.team-card { background:var(--card); border:1px solid var(--line); border-radius:14px; overflow:hidden; }
.team-head { width:100%; background:none; border:0; color:var(--txt); cursor:pointer;
  display:flex; align-items:center; justify-content:space-between; gap:10px; padding:14px 14px; }
.team-name { font-weight:700; font-size:15px; text-align:left; }
.team-name .flag { font-size:19px; margin-right:2px; }
.team-meta { display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.tprog { width:54px; height:6px; background:#0c1226; border-radius:99px; overflow:hidden; border:1px solid var(--line); }
.tprog span { display:block; height:100%; background:linear-gradient(90deg,var(--teal),var(--gold)); }
.tcount { font-size:13px; font-weight:800; color:var(--muted); min-width:42px; text-align:right; }
.tcount.full { color: var(--green); }
.chev { color:var(--muted); width:14px; }
.team-body { border-top:1px solid var(--line); padding:8px; display:flex; flex-direction:column; gap:6px; }
.mark-all { margin:4px 0 6px; font-size:14px; color:#1a1300; background:linear-gradient(135deg,var(--gold),var(--gold-2)); border:0; }

/* sticker rows */
.stk-row { display:flex; align-items:center; gap:10px; padding:11px 12px; border-radius:10px;
  background:var(--card-2); border:1px solid var(--line); cursor:pointer; transition:transform .05s; }
.stk-row:active { transform:scale(.99); }
.stk-code { font-weight:800; font-size:12px; color:#1a1300; background:var(--muted); border-radius:6px;
  padding:3px 7px; flex:0 0 auto; min-width:54px; text-align:center; }
.stk-name { flex:1; font-size:14.5px; color:var(--txt); }
.stk-state { font-size:12px; font-weight:700; flex:0 0 auto; padding:4px 10px; border-radius:99px; }
.stk-row.falta { opacity:.92; }
.stk-row.falta .stk-state { background:#2a3556; color:var(--muted); }
.stk-row.tengo { border-color: rgba(34,197,94,.5); }
.stk-row.tengo .stk-code { background: var(--green); color:#06210f; }
.stk-row.tengo .stk-state { background: rgba(34,197,94,.18); color: var(--green); }
.stk-row.repe { border-color: rgba(245,196,81,.6); box-shadow: inset 0 0 0 1px rgba(245,196,81,.25); }
.stk-row.repe .stk-code { background: var(--green); color:#06210f; }
.stk-row.repe .stk-state { background: rgba(245,196,81,.2); color: var(--gold); }

/* stepper en cada lámina */
.stepper { display:flex; align-items:center; gap:4px; flex:0 0 auto; }
.stepper button { width:30px; height:30px; border-radius:8px; border:1px solid var(--line);
  background:#0c1226; color:var(--txt); font-size:18px; font-weight:800; line-height:1; cursor:pointer; padding:0; }
.stepper button:active { transform:scale(.92); }
.stepper .cnt { min-width:22px; text-align:center; font-weight:800; font-size:15px; }
.stk-row.tengo .stepper .cnt { color: var(--green); }
.stk-row.repe .stepper .cnt { color: var(--gold); }
.stk-row .stk-state { min-width:74px; text-align:right; }
.stk-row .stk-name { font-size:13.5px; }

/* selector modo de voz */
.vmode { display:flex; gap:8px; margin:0 0 12px; flex-wrap:wrap; }
.vmode .pill { flex:1 1 auto; }

/* chips apertura de sobres */
.chips li.new { background: var(--green-d); color:#fff; }
.chips li.rep { background: #4a3b1e; color: var(--gold); }

/* subtítulo en avisos */
.subh { font-size:15px; color:var(--muted); margin:24px 0 10px; font-weight:700; }

/* confirmación de captura por voz */
.last-heard { text-align:center; font-weight:800; font-size:17px; color:var(--teal); min-height:22px; margin:6px 0; }
.last-heard.flash { animation: lh 0.5s ease; }
@keyframes lh { 0%{ transform:scale(1.25); color:var(--gold);} 100%{ transform:scale(1); color:var(--teal);} }

/* teclado numérico (1-20) */
.numpad-hint { color:var(--muted); font-size:13px; margin:12px 0 8px; text-align:center; }
.numpad { display:grid; grid-template-columns:repeat(5, 1fr); gap:8px; }
.numkey { padding:14px 0; font-size:18px; font-weight:800; color:var(--txt);
  background:var(--card-2); border:1px solid var(--line); border-radius:12px; cursor:pointer; }
.numkey:active { transform:scale(.92); background:var(--gold); color:#1a1300; border-color:transparent; }
