/* =========================================================
   PENCA MULTI · APP PROTOTYPE
   Multi Soluciones · Mundial FIFA 2026
   Mobile-first interactive HTML mockup
   ========================================================= */

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }

:root {
  --navy:        #001B6B;
  --navy-deep:   #00103F;
  --navy-soft:   #0A2A8A;
  --blue:        #0172CC;
  --olive:       #95A748;
  --olive-bright:#B8CC5C;
  --cream:       #F5F1EA;
  --cream-2:     #EDE7DA;
  --bg:          #F7F4EE;
  --ink:         #0E1330;
  --muted:       #6B7280;
  --muted-soft:  #9CA3AF;
  --line:        #E8E2D5;
  --white:       #FFFFFF;
  --danger:      #DC2626;
  --success:     #059669;
  --gold:        #D4A82A;

  --radius:      18px;
  --radius-lg:   24px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(0,27,107,.06), 0 1px 3px rgba(0,27,107,.04);
  --shadow:    0 4px 14px rgba(0,27,107,.08), 0 1px 4px rgba(0,27,107,.06);
  --shadow-lg: 0 18px 40px rgba(0,27,107,.18), 0 8px 16px rgba(0,27,107,.10);

  --ease:      cubic-bezier(.22,.61,.36,1);
  --ease-out:  cubic-bezier(.16,1,.3,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
}

body {
  font-family: 'Sora', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(1200px 800px at 10% -10%, #E6DFCF 0%, transparent 60%),
    radial-gradient(1200px 800px at 110% 110%, #DDD6C5 0%, transparent 60%),
    var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 16px;
}

/* ---- Desktop: phone frame floats ---- */
.stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  min-height: 100vh;
  width: 100%;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,27,107,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,27,107,.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.brand-watermark {
  position: absolute;
  top: 28px;
  left: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  z-index: 1;
}
.brand-watermark .casita {
  width: 36px; height: 36px;
  background: var(--navy);
  -webkit-mask: var(--casita-mask);
          mask: var(--casita-mask);
  -webkit-mask-size: contain;
          mask-size: contain;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
}
.brand-watermark .name { font-weight: 700; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; }
.brand-watermark .sub  { font-size: 11px; color: var(--muted); letter-spacing: 2px; text-transform: uppercase; margin-top: 2px;}

.help-card {
  position: absolute;
  right: 28px;
  bottom: 28px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  font-size: 12px;
  color: var(--muted);
  z-index: 1;
  max-width: 240px;
  line-height: 1.5;
}
.help-card b { color: var(--navy); font-weight: 600; }

/* ---- Phone shell ---- */
.phone {
  position: relative;
  width: 390px;
  height: 844px;
  background: #0a0a0a;
  border-radius: 56px;
  padding: 12px;
  box-shadow: var(--shadow-lg), 0 0 0 2px #1a1a1a, 0 0 0 12px #2a2a2a;
  z-index: 2;
  transition: transform .3s var(--ease);
}
.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--white);
  border-radius: 44px;
  overflow: hidden;
}
/* dynamic island */
.phone::after {
  content: "";
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 32px;
  background: #0a0a0a;
  border-radius: 22px;
  z-index: 100;
  pointer-events: none;
}

/* status bar */
.statusbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 32px 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  z-index: 30;
  pointer-events: none;
  transition: color .25s var(--ease);
}
.statusbar.dark { color: #fff; }
.statusbar .signal { display: inline-flex; gap: 2px; align-items: flex-end; }
.statusbar .signal i {
  display: inline-block; width: 3px; background: currentColor; border-radius: 1px;
}
.statusbar .signal i:nth-child(1){ height: 4px;}
.statusbar .signal i:nth-child(2){ height: 6px;}
.statusbar .signal i:nth-child(3){ height: 8px;}
.statusbar .signal i:nth-child(4){ height: 10px;}
.statusbar .battery {
  width: 26px; height: 12px; border: 1.5px solid currentColor; border-radius: 3px;
  position: relative; padding: 1.5px;
}
.statusbar .battery::after {
  content: ""; position: absolute; right: -3.5px; top: 3px;
  width: 2px; height: 4px; background: currentColor; border-radius: 0 1px 1px 0;
}
.statusbar .battery i { display: block; height: 100%; width: 75%; background: currentColor; border-radius: 1px; }

/* Screen container & screens */
.screens {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 44px;
}
.screen {
  position: absolute;
  inset: 0;
  background: var(--white);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(20px);
  transition: opacity .35s var(--ease), transform .4s var(--ease), visibility 0s linear .4s;
}
.screen.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  transition: opacity .35s var(--ease), transform .4s var(--ease), visibility 0s;
  z-index: 5;
}
.screen.exit-left { transform: translateX(-20px); }

.screen-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 110px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.screen-body::-webkit-scrollbar { width: 4px; }
.screen-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }

/* ---- Reusable header for content screens ---- */
.app-header {
  padding: 60px 22px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
}
.app-header.navy { background: var(--navy); color: #fff; }
.app-header h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.3px;
}
.app-header .iconbtn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--cream);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease);
  position: relative;
}
.app-header.navy .iconbtn { background: rgba(255,255,255,.1); }
.app-header .iconbtn:active { transform: scale(.92); }
.app-header .iconbtn svg { width: 20px; height: 20px; stroke: var(--navy); }
.app-header.navy .iconbtn svg { stroke: #fff; }
.app-header .iconbtn .dot {
  position: absolute; top: 8px; right: 9px;
  width: 8px; height: 8px;
  background: var(--olive);
  border: 2px solid var(--cream);
  border-radius: 50%;
}
.app-header.navy .iconbtn .dot { border-color: var(--navy); }

/* ---- Bottom nav ---- */
.tabbar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0,27,107,.08);
  padding: 10px 12px 28px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 20;
  border-radius: 0 0 44px 44px;
  transition: transform .35s var(--ease);
}
.tabbar.hidden { transform: translateY(110%); }
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .3px;
  transition: color .2s var(--ease);
  position: relative;
}
.tab svg { width: 22px; height: 22px; stroke-width: 2; transition: transform .3s var(--ease-spring); }
.tab.active { color: var(--navy); }
.tab.active svg { transform: translateY(-2px); }
.tab .indicator {
  position: absolute;
  top: 0;
  width: 22px; height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--olive);
  transform: scaleX(0);
  transition: transform .3s var(--ease-spring);
  transform-origin: center;
}
.tab.active .indicator { transform: scaleX(1); }

/* ============== SPLASH ============== */
#screen-splash {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  align-items: center;
  justify-content: center;
  color: #fff;
}
#screen-splash::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(149,167,72,.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(1,114,204,.18) 0%, transparent 40%);
  pointer-events: none;
}
.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  z-index: 1;
  position: relative;
  padding: 0 32px;
  text-align: center;
}
.splash-logo {
  width: 110px;
  height: 110px;
  background: #fff;
  -webkit-mask: var(--casita-mask);
          mask: var(--casita-mask);
  -webkit-mask-size: contain;
          mask-size: contain;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  animation: splashLogo 1.2s var(--ease-spring) both;
}
@keyframes splashLogo {
  0% { transform: scale(.4) translateY(-20px); opacity: 0; }
  60% { transform: scale(1.08) translateY(0); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.splash-name {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  animation: splashIn .6s .4s var(--ease-out) both;
}
.splash-tag {
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--olive-bright);
  font-weight: 600;
  animation: splashIn .6s .55s var(--ease-out) both;
}
.splash-loading {
  margin-top: 24px;
  width: 60px;
  height: 3px;
  background: rgba(255,255,255,.2);
  border-radius: 2px;
  overflow: hidden;
  animation: splashIn .6s .8s var(--ease-out) both;
}
.splash-loading i {
  display: block;
  height: 100%;
  background: var(--olive-bright);
  width: 30%;
  border-radius: 2px;
  animation: splashLoad 1.2s ease-in-out infinite;
}
@keyframes splashLoad {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(300%); }
}
@keyframes splashIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============== LOGIN ============== */
#screen-login {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  padding: 60px 24px 24px;
}
#screen-login::before {
  content: "";
  position: absolute;
  bottom: -240px; right: -120px;
  width: 400px; height: 400px;
  background: var(--casita-mask);
  -webkit-mask: var(--casita-mask);
          mask: var(--casita-mask);
  -webkit-mask-size: contain;
          mask-size: contain;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  background: rgba(255,255,255,.04);
}
.login-top {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 60px;
  animation: fadeUp .6s var(--ease-out) both;
}
.login-top .casita {
  width: 42px; height: 42px;
  background: #fff;
  -webkit-mask: var(--casita-mask);
          mask: var(--casita-mask);
  -webkit-mask-size: contain;
          mask-size: contain;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
}
.login-top .name {
  font-weight: 700; font-size: 14px; letter-spacing: 2px; text-transform: uppercase;
}
.login-top .sub { font-size: 10px; color: var(--olive-bright); letter-spacing: 2px; text-transform: uppercase; }

.login-eyebrow {
  font-size: 11px; color: var(--olive-bright); letter-spacing: 3px;
  text-transform: uppercase; font-weight: 600; margin-bottom: 12px;
  animation: fadeUp .6s .1s var(--ease-out) both;
}
.login-title {
  font-size: 40px; font-weight: 800; line-height: 1.05; letter-spacing: -1.2px;
  margin-bottom: 16px;
  animation: fadeUp .6s .2s var(--ease-out) both;
}
.login-title em {
  font-style: normal; color: var(--olive-bright);
}
.login-sub {
  font-size: 15px; color: rgba(255,255,255,.7); line-height: 1.5;
  margin-bottom: 36px; max-width: 320px;
  animation: fadeUp .6s .3s var(--ease-out) both;
}

.login-form {
  display: flex; flex-direction: column; gap: 14px;
  animation: fadeUp .6s .4s var(--ease-out) both;
  position: relative;
  z-index: 1;
}
.field {
  position: relative;
  background: rgba(255,255,255,.07);
  border: 1.5px solid rgba(255,255,255,.13);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex; flex-direction: column; gap: 2px;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.field:focus-within {
  border-color: var(--olive-bright);
  background: rgba(255,255,255,.10);
}
.field label {
  font-size: 10px; color: rgba(255,255,255,.55); letter-spacing: 2px;
  text-transform: uppercase; font-weight: 600;
}
.field input {
  background: transparent; border: none; outline: none;
  color: #fff; font-family: inherit; font-size: 16px; font-weight: 500;
  padding: 4px 0;
}
.field input::placeholder { color: rgba(255,255,255,.35); }
.field .prefix { color: rgba(255,255,255,.5); margin-right: 6px; font-weight: 500; }
.field-row { display: flex; align-items: center; gap: 0; }

.btn-primary {
  background: var(--olive);
  color: var(--navy);
  border: none;
  padding: 16px 24px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .15s var(--ease), background .15s var(--ease), box-shadow .2s var(--ease);
  box-shadow: 0 6px 18px rgba(149,167,72,.45);
}
.btn-primary:active { transform: scale(.98); }
.btn-primary svg { width: 18px; height: 18px; }

.btn-ghost {
  background: transparent;
  color: rgba(255,255,255,.7);
  border: none;
  padding: 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  letter-spacing: .2px;
}
.btn-ghost b { color: var(--olive-bright); font-weight: 700; }

.login-foot {
  margin-top: auto;
  font-size: 11px; color: rgba(255,255,255,.5);
  text-align: center;
  padding-top: 24px;
  letter-spacing: .3px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============== ONBOARDING ============== */
#screen-onboard {
  background: var(--cream);
  padding: 60px 0 0;
}
.onb-track {
  display: flex;
  width: 300%;
  height: 100%;
  transition: transform .5s var(--ease);
}
.onb-slide {
  width: 33.3333%;
  padding: 20px 28px 100px;
  display: flex;
  flex-direction: column;
}
.onb-illust {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0 18px;
  position: relative;
  min-height: 280px;
}
.onb-illust .casita-bg {
  width: 220px; height: 220px;
  background: var(--navy);
  -webkit-mask: var(--casita-mask);
          mask: var(--casita-mask);
  -webkit-mask-size: contain;
          mask-size: contain;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  position: relative;
}
.onb-eyebrow {
  font-size: 11px; color: var(--olive); letter-spacing: 3px;
  text-transform: uppercase; font-weight: 700; margin-bottom: 8px;
}
.onb-title {
  font-size: 30px; font-weight: 800; color: var(--navy);
  line-height: 1.05; letter-spacing: -.8px;
  margin-bottom: 12px;
}
.onb-text {
  font-size: 14px; color: var(--muted); line-height: 1.5;
}
.onb-foot {
  position: absolute;
  bottom: 28px; left: 28px; right: 28px;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 5;
}
.onb-dots { display: flex; gap: 6px; }
.onb-dots i {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(0,27,107,.2);
  transition: width .3s var(--ease-spring), background .3s var(--ease);
}
.onb-dots i.active { width: 24px; border-radius: 4px; background: var(--navy); }
.onb-next {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--navy);
  color: var(--olive-bright);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .15s var(--ease), background .15s var(--ease);
  box-shadow: 0 8px 22px rgba(0,27,107,.25);
}
.onb-next:active { transform: scale(.94); }
.onb-skip {
  background: transparent; border: none;
  font-family: inherit;
  font-size: 12px; color: var(--muted); font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  cursor: pointer;
  position: absolute; top: 22px; right: 22px;
  z-index: 6;
}

/* Illustration shapes */
.illust-1 .ball, .illust-1 .pencil, .illust-1 .pin {
  position: absolute;
}
.illust-1 .ball {
  width: 60px; height: 60px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(0,0,0,.15);
  top: 20%; right: 20%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  animation: float 3.5s var(--ease) infinite;
}
.illust-1 .ball::before { content: "⚽"; font-size: 36px; }
.illust-1 .tool {
  position: absolute;
  bottom: 12%; left: 14%;
  width: 50px; height: 50px;
  background: var(--olive); color: #fff;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 8px 20px rgba(149,167,72,.4);
  animation: float 3.5s 1s var(--ease) infinite;
}
.illust-2 .progress {
  width: 220px;
  background: var(--white);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.illust-2 .progress-row { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; }
.illust-2 .progress-row .check { width: 22px; height: 22px; border-radius: 50%; background: var(--olive); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.illust-2 .progress-row .check.empty { background: var(--cream); color: var(--muted); }
.illust-2 .progress-row .pts { margin-left: auto; color: var(--olive); font-weight: 700; }
.illust-3 .trophy {
  width: 120px; height: 120px;
  background: linear-gradient(160deg, var(--gold) 0%, #B98E1D 100%);
  border-radius: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 64px;
  box-shadow: 0 16px 40px rgba(212,168,42,.45);
  animation: float 3.5s var(--ease) infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ============== HOME ============== */
.home-hero {
  background: var(--navy);
  color: #fff;
  padding: 56px 22px 28px;
  border-radius: 0 0 32px 32px;
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: "";
  position: absolute;
  top: -40px; right: -60px;
  width: 240px; height: 240px;
  background: rgba(255,255,255,.04);
  -webkit-mask: var(--casita-mask);
          mask: var(--casita-mask);
  -webkit-mask-size: contain;
          mask-size: contain;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
}
.home-greeting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}
.greet-left .hello {
  font-size: 12px; color: rgba(255,255,255,.6);
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 4px;
}
.greet-left .name { font-size: 22px; font-weight: 700; letter-spacing: -.4px; }
.greet-right {
  display: flex; gap: 8px;
}
.greet-right .iconbtn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform .15s var(--ease), background .15s var(--ease);
}
.greet-right .iconbtn:active { transform: scale(.92); }
.greet-right .iconbtn svg { width: 18px; height: 18px; stroke: #fff; }
.greet-right .iconbtn .badge {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--olive);
  border: 2px solid var(--navy);
  border-radius: 50%;
}

/* Stats card */
.stats-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.stats-card .rank-badge {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--olive);
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 8px 20px rgba(149,167,72,.3);
  flex-shrink: 0;
}
.stats-card .rank-badge .label { font-size: 8px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; opacity: .8; }
.stats-card .rank-info { flex: 1; }
.stats-card .rank-info .lbl { font-size: 11px; color: rgba(255,255,255,.5); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 2px; }
.stats-card .rank-info .val { font-size: 14px; font-weight: 600; }
.stats-card .rank-info .val em { font-style: normal; color: var(--olive-bright); }
.stats-card .arrow {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
}
.stats-card .arrow svg { width: 16px; height: 16px; stroke: #fff; }

/* Section heading */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 28px 22px 12px;
}
.section-head h2 {
  font-size: 14px; color: var(--muted); letter-spacing: 2px;
  text-transform: uppercase; font-weight: 700;
}
.section-head .more {
  font-size: 12px; color: var(--navy); font-weight: 700;
  background: none; border: none; cursor: pointer;
  font-family: inherit;
  display: flex; align-items: center; gap: 4px;
}
.section-head .more svg { width: 12px; height: 12px; stroke: var(--navy); stroke-width: 2.5; }

/* Live match card */
.match-live {
  margin: 0 22px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: #fff;
  border-radius: 20px;
  padding: 18px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s var(--ease);
}
.match-live:active { transform: scale(.99); }
.match-live::before {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: rgba(149,167,72,.12);
  border-radius: 50%;
}
.match-live .live-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(220,38,38,.15);
  color: #FCA5A5;
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  position: relative; z-index: 1;
}
.match-live .live-tag .pulse {
  width: 6px; height: 6px;
  background: #EF4444;
  border-radius: 50%;
  animation: pulseDot 1.4s infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(239,68,68,.6); }
  70% { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}
.match-live .live-time { font-size: 11px; color: rgba(255,255,255,.6); margin-left: 8px; }
.match-live .teams {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 18px;
  position: relative; z-index: 1;
}
.match-live .team {
  display: flex; flex-direction: column; align-items: center;
  flex: 1;
}
.match-live .team .flag {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  box-shadow: 0 8px 20px rgba(0,0,0,.2);
  margin-bottom: 8px;
}
.match-live .team .name {
  font-weight: 700; font-size: 14px; letter-spacing: .5px;
}
.match-live .score-block {
  display: flex; flex-direction: column; align-items: center;
  padding: 0 14px;
}
.match-live .score {
  font-size: 38px; font-weight: 800; letter-spacing: -1.5px;
  font-feature-settings: "tnum";
  display: flex; gap: 14px; align-items: baseline;
}
.match-live .score .sep { color: rgba(255,255,255,.3); font-size: 28px; }
.match-live .pred {
  margin-top: 4px;
  font-size: 10px; color: var(--olive-bright);
  letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700;
}
.match-live .live-bottom {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: space-between;
  position: relative; z-index: 1;
}
.match-live .live-bottom .your-pred {
  font-size: 11px; color: rgba(255,255,255,.6);
}
.match-live .live-bottom .your-pred b { color: #fff; font-weight: 700; }
.match-live .live-bottom .pts {
  background: var(--olive);
  color: var(--navy);
  font-size: 11px; font-weight: 800; letter-spacing: 1px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

/* Upcoming match card (small) */
.match-card {
  background: var(--white);
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform .15s var(--ease), border-color .15s var(--ease), box-shadow .2s var(--ease);
  position: relative;
}
.match-card:active { transform: scale(.99); }
.match-card.predicted { border-color: var(--olive); }
.match-card.predicted::before {
  content: "✓";
  position: absolute; top: 12px; right: 12px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--olive); color: var(--navy);
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.match-card .when {
  display: flex; flex-direction: column; align-items: center;
  width: 52px; flex-shrink: 0;
}
.match-card .when .day {
  font-size: 10px; color: var(--muted); letter-spacing: 1.5px;
  text-transform: uppercase; font-weight: 700;
}
.match-card .when .date {
  font-size: 22px; font-weight: 800; color: var(--navy);
  line-height: 1;
}
.match-card .when .time {
  font-size: 10px; color: var(--muted); margin-top: 2px;
}
.match-card .versus {
  flex: 1;
  display: flex; flex-direction: column; gap: 6px;
}
.match-card .versus .row { display: flex; align-items: center; gap: 8px; }
.match-card .versus .row .flag { font-size: 18px; }
.match-card .versus .row .nm { font-size: 13px; font-weight: 600; color: var(--ink); }
.match-card .versus .group {
  font-size: 9px; color: var(--muted); letter-spacing: 1.5px;
  text-transform: uppercase; font-weight: 700;
  margin-top: 2px;
}
.match-card .arrow-right {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.match-card .arrow-right svg { width: 12px; height: 12px; stroke: var(--navy); stroke-width: 2.5; }

/* Card stack list */
.cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 22px;
}

/* CTA banner */
.cta-banner {
  margin: 22px 22px 0;
  background: var(--olive);
  border-radius: 18px;
  padding: 18px;
  display: flex; align-items: center; gap: 14px;
  position: relative; overflow: hidden;
  cursor: pointer;
  transition: transform .15s var(--ease);
}
.cta-banner:active { transform: scale(.99); }
.cta-banner::before {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 140px; height: 140px;
  background: rgba(0,27,107,.08);
  border-radius: 50%;
}
.cta-banner .icon-wrap {
  width: 48px; height: 48px;
  background: var(--navy); color: var(--olive-bright);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  z-index: 1;
}
.cta-banner .text { z-index: 1; flex: 1; }
.cta-banner .text .t { font-size: 14px; font-weight: 700; color: var(--navy); }
.cta-banner .text .s { font-size: 12px; color: rgba(0,27,107,.7); margin-top: 2px; }
.cta-banner .arrow {
  width: 32px; height: 32px;
  background: var(--navy);
  color: var(--olive-bright);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.cta-banner .arrow svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.5; }

/* Quick stats row */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 22px;
  margin-top: 14px;
}
.qstat {
  background: var(--cream);
  border-radius: 14px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.qstat .v { font-size: 22px; font-weight: 800; color: var(--navy); letter-spacing: -.5px; }
.qstat .l { font-size: 10px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; font-weight: 600; }

/* ============== PRONÓSTICOS LIST ============== */
.filters {
  display: flex;
  gap: 8px;
  padding: 14px 22px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--muted);
  font-family: inherit;
  font-size: 12px; font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s var(--ease);
}
.chip.active {
  background: var(--navy);
  color: var(--olive-bright);
  border-color: var(--navy);
}
.chip:active { transform: scale(.96); }

/* Day group */
.day-group {
  margin-top: 18px;
}
.day-group-head {
  display: flex; align-items: center; gap: 12px;
  padding: 0 22px;
  margin-bottom: 10px;
}
.day-group-head .dot {
  width: 8px; height: 8px;
  background: var(--olive);
  border-radius: 50%;
}
.day-group-head .label {
  font-size: 11px; color: var(--ink); letter-spacing: 2px;
  text-transform: uppercase; font-weight: 700;
}
.day-group-head .count {
  font-size: 11px; color: var(--muted); margin-left: auto;
}
.day-group .cards-list { padding: 0 22px; }

/* ============== MATCH DETAIL / PREDICT ============== */
#screen-predict {
  background: var(--cream);
}
.predict-hero {
  background: var(--navy);
  color: #fff;
  padding: 56px 22px 22px;
  border-radius: 0 0 32px 32px;
  position: relative;
  overflow: hidden;
}
.predict-hero .back {
  position: absolute;
  top: 56px; left: 22px;
  width: 40px; height: 40px;
  background: rgba(255,255,255,.1);
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.predict-hero .back svg { width: 18px; height: 18px; stroke: #fff; }
.predict-hero .meta {
  text-align: center;
  margin-bottom: 8px;
}
.predict-hero .meta .group {
  font-size: 10px; color: var(--olive-bright);
  letter-spacing: 3px; text-transform: uppercase; font-weight: 700;
}
.predict-hero .meta .when {
  font-size: 12px; color: rgba(255,255,255,.65);
  margin-top: 4px;
}
.predict-hero .vs-row {
  display: flex; align-items: center; justify-content: space-around;
  padding: 22px 0 8px;
}
.predict-hero .team-block {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: 90px;
}
.predict-hero .team-block .flag {
  width: 80px; height: 80px;
  background: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
}
.predict-hero .team-block .name {
  font-weight: 700; font-size: 15px; letter-spacing: .5px;
}
.predict-hero .vs-label {
  font-size: 16px; color: rgba(255,255,255,.5);
  letter-spacing: 4px; text-transform: uppercase; font-weight: 700;
}
.predict-hero .countdown {
  margin-top: 16px;
  display: flex; gap: 14px;
  justify-content: center;
}
.predict-hero .cd-block {
  display: flex; flex-direction: column; align-items: center;
}
.predict-hero .cd-block .v { font-size: 22px; font-weight: 800; letter-spacing: -.5px; font-feature-settings: "tnum"; }
.predict-hero .cd-block .l { font-size: 9px; color: rgba(255,255,255,.5); letter-spacing: 1.5px; text-transform: uppercase; }

.predict-body { padding: 0 0 110px; }

.predict-section {
  margin-top: 22px;
  padding: 0 22px;
}
.predict-section h3 {
  font-size: 11px; color: var(--muted); letter-spacing: 2px;
  text-transform: uppercase; font-weight: 700;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.predict-section h3::before {
  content: ""; width: 4px; height: 14px;
  background: var(--olive);
  border-radius: 2px;
}

.score-pickers {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
}
.picker {
  background: var(--white);
  border-radius: 18px;
  padding: 18px 12px;
  text-align: center;
  border: 2px solid var(--line);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.picker.touched { border-color: var(--olive); box-shadow: 0 8px 24px rgba(149,167,72,.18);  }
.picker .team-mini {
  font-size: 11px; color: var(--muted); letter-spacing: 1px;
  text-transform: uppercase; font-weight: 700;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px; justify-content: center;
}
.picker .team-mini .fg { font-size: 16px; }
.picker .controls {
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.picker .ctrl {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--cream);
  color: var(--navy);
  font-size: 18px; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s var(--ease), background .15s var(--ease);
}
.picker .ctrl:active { transform: scale(.9); background: var(--olive); }
.picker .number {
  width: 56px; height: 56px;
  font-size: 36px; font-weight: 800; color: var(--navy);
  letter-spacing: -1.5px;
  display: flex; align-items: center; justify-content: center;
  font-feature-settings: "tnum";
  transition: transform .25s var(--ease-spring);
}
.picker .number.bump { transform: scale(1.15); }
.score-pickers .vs-mini {
  font-size: 14px; color: var(--muted); font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
}

/* Result type */
.result-types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}
.rtype {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px 10px;
  cursor: pointer;
  text-align: center;
  transition: all .15s var(--ease);
  font-family: inherit;
}
.rtype.active { border-color: var(--olive); background: rgba(149,167,72,.08); }
.rtype .ty { font-size: 11px; color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; margin-bottom: 4px; }
.rtype .nm { font-size: 13px; color: var(--navy); font-weight: 700; }

/* Goleador chip selector */
.scorer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.scorer-chip {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 12px 12px;
  cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  transition: all .15s var(--ease);
  font-family: inherit;
  text-align: left;
}
.scorer-chip.active { border-color: var(--olive); background: rgba(149,167,72,.06); }
.scorer-chip .ph {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.scorer-chip .info { flex: 1; min-width: 0; }
.scorer-chip .info .nm { font-size: 12px; color: var(--navy); font-weight: 700; line-height: 1.2; }
.scorer-chip .info .meta { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* Predict footer */
.predict-foot {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 18px 22px 28px;
  background: linear-gradient(to top, var(--cream) 70%, rgba(245,241,234,0));
  display: flex; gap: 10px;
  align-items: center;
  z-index: 22;
}
.predict-foot .meta {
  flex: 1;
}
.predict-foot .meta .lbl { font-size: 10px; color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; }
.predict-foot .meta .val { font-size: 14px; color: var(--navy); font-weight: 700; }
.predict-foot .meta .val em { font-style: normal; color: var(--olive); }
.predict-foot .btn-primary { padding: 14px 22px; }

/* ============== CONFIRMATION OVERLAY ============== */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,16,63,0);
  display: flex; align-items: center; justify-content: center;
  visibility: hidden;
  z-index: 50;
  transition: background .35s var(--ease), visibility 0s linear .35s;
  padding: 24px;
}
.modal-overlay.active {
  background: rgba(0,16,63,.65);
  visibility: visible;
  transition: background .35s var(--ease);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal {
  background: var(--white);
  border-radius: 28px;
  padding: 32px 22px 22px;
  width: 100%;
  text-align: center;
  transform: scale(.85);
  opacity: 0;
  transition: transform .4s var(--ease-spring), opacity .35s var(--ease);
  position: relative;
  overflow: hidden;
}
.modal-overlay.active .modal { transform: scale(1); opacity: 1; }
.modal .ribbon-bg {
  position: absolute;
  top: -100px; left: -100px; right: -100px;
  height: 220px;
  background: radial-gradient(circle at center top, rgba(149,167,72,.18), transparent 70%);
  pointer-events: none;
}
.modal .check-circle {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--olive);
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  margin: 0 auto 16px;
  position: relative;
  animation: bounceIn .5s var(--ease-spring) both;
}
@keyframes bounceIn {
  0% { transform: scale(0); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.modal .check-circle::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(149,167,72,.3);
  animation: checkRing 1.5s var(--ease) infinite;
}
@keyframes checkRing {
  0% { transform: scale(.7); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}
.modal h2 {
  font-size: 24px; font-weight: 800; color: var(--navy);
  letter-spacing: -.5px;
  margin-bottom: 6px;
}
.modal p {
  font-size: 13px; color: var(--muted); line-height: 1.5;
  margin-bottom: 18px;
}
.modal .summary {
  background: var(--cream);
  border-radius: 16px;
  padding: 14px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.modal .summary .team-mini {
  display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--navy);
}
.modal .summary .team-mini .fg { font-size: 22px; }
.modal .summary .score {
  font-size: 28px; font-weight: 800; color: var(--navy); letter-spacing: -.5px;
  font-feature-settings: "tnum";
}
.modal .actions { display: flex; flex-direction: column; gap: 10px; }
.modal .btn-secondary {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--navy);
  padding: 14px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  letter-spacing: .3px;
}
.modal .btn-secondary:active { transform: scale(.98); }

/* Confetti */
.confetti {
  position: absolute; top: 0; left: 0; right: 0; height: 200px;
  pointer-events: none;
  overflow: hidden;
}
.confetti i {
  position: absolute;
  width: 6px; height: 10px;
  top: -20px;
  opacity: 0;
}
.modal-overlay.active .confetti i {
  animation: confetti 1.2s var(--ease) forwards;
}

@keyframes confetti {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(220px) rotate(720deg); opacity: 0; }
}

/* ============== RANKING ============== */
.rank-hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  padding: 56px 22px 70px;
  position: relative;
  overflow: hidden;
}
.rank-hero::before {
  content: ""; position: absolute;
  top: -60px; right: -80px;
  width: 280px; height: 280px;
  background: rgba(255,255,255,.04);
  -webkit-mask: var(--casita-mask);
          mask: var(--casita-mask);
  -webkit-mask-size: contain;
          mask-size: contain;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
}
.rank-hero h1 {
  font-size: 26px; font-weight: 800; letter-spacing: -.6px;
  margin-bottom: 4px;
}
.rank-hero .sub { font-size: 13px; color: rgba(255,255,255,.6); letter-spacing: .3px; }

/* Podium */
.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  margin: 32px auto 0;
  max-width: 320px;
}
.podium-spot {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  position: relative;
}
.podium-spot .av {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  border: 3px solid var(--olive);
  position: relative;
}
.podium-spot.first .av { width: 70px; height: 70px; font-size: 30px; border-color: var(--gold); }
.podium-spot .crown {
  position: absolute;
  top: -22px; left: 50%; transform: translateX(-50%);
  font-size: 22px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
}
.podium-spot .nm {
  font-size: 11px; font-weight: 700;
  text-align: center;
  max-width: 80px;
}
.podium-spot .pts {
  font-size: 10px; color: var(--olive-bright);
  letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700;
}
.podium-bar {
  width: 100%;
  background: rgba(255,255,255,.08);
  border-radius: 12px 12px 0 0;
  padding: 14px 0 8px;
  margin-top: 4px;
  text-align: center;
  font-size: 18px; font-weight: 800;
  position: relative;
}
.podium-spot.first .podium-bar { height: 80px; background: var(--gold); color: var(--navy); }
.podium-spot.second .podium-bar { height: 60px; }
.podium-spot.third .podium-bar { height: 44px; }
.podium-spot.first .podium-bar .label,
.podium-spot.second .podium-bar .label,
.podium-spot.third .podium-bar .label {
  position: absolute;
  bottom: 8px; left: 0; right: 0;
  font-size: 16px; font-weight: 800;
}

/* My pos card */
.my-pos {
  margin: -40px 22px 0;
  background: var(--white);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow);
  border: 2px solid var(--olive);
  z-index: 2;
  position: relative;
}
.my-pos .pos-circle {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--olive);
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
}
.my-pos .info { flex: 1; }
.my-pos .info .you { font-size: 10px; color: var(--olive); letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; }
.my-pos .info .nm { font-size: 14px; color: var(--navy); font-weight: 700; }
.my-pos .info .change { font-size: 11px; color: var(--success); margin-top: 2px; display: flex; align-items: center; gap: 4px; }
.my-pos .points { text-align: right; }
.my-pos .points .v { font-size: 22px; font-weight: 800; color: var(--navy); letter-spacing: -.5px; font-feature-settings: "tnum"; }
.my-pos .points .l { font-size: 9px; color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; }

/* Rank list */
.rank-list { padding: 18px 22px 0; display: flex; flex-direction: column; gap: 6px; }
.rank-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex; align-items: center; gap: 12px;
  transition: transform .15s var(--ease), border-color .15s var(--ease);
}
.rank-item.you { border-color: var(--olive); background: rgba(149,167,72,.04); }
.rank-item .pos { font-size: 13px; font-weight: 800; color: var(--muted); width: 28px; text-align: center; }
.rank-item .av { width: 36px; height: 36px; border-radius: 50%; background: var(--cream); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.rank-item .nm { flex: 1; font-size: 13px; font-weight: 600; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-item .pts { font-size: 14px; font-weight: 800; color: var(--navy); font-feature-settings: "tnum"; }
.rank-item .delta { font-size: 10px; color: var(--success); margin-left: 4px; font-weight: 700; }
.rank-item .delta.down { color: var(--danger); }

/* ============== PREMIOS ============== */
#screen-prizes { background: var(--cream); }
.prize-tabs {
  display: flex;
  gap: 6px;
  padding: 14px 22px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.prize-tabs::-webkit-scrollbar { display: none; }
.prize-tab {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--muted);
  font-family: inherit;
  font-size: 11px; font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: .5px;
}
.prize-tab.active {
  background: var(--navy);
  color: var(--olive-bright);
  border-color: var(--navy);
}

.prize-card {
  margin: 14px 22px;
  background: var(--white);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: relative;
  cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease);
}
.prize-card:active { transform: scale(.99); }
.prize-card.locked { opacity: .55; }
.prize-card .top {
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700;
}
.prize-card.gold .top { background: var(--gold); color: var(--navy); }
.prize-card .top .pos { color: var(--olive-bright); font-weight: 800; }
.prize-card.gold .top .pos { color: var(--navy); }
.prize-card .body {
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.prize-card .product {
  width: 90px; height: 90px;
  border-radius: 18px;
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: 44px;
  flex-shrink: 0;
}
.prize-card.gold .product { background: linear-gradient(135deg, #FFE9A8 0%, #F5D572 100%); }
.prize-card .info { flex: 1; }
.prize-card .info .cat {
  font-size: 10px; color: var(--olive); letter-spacing: 1.5px;
  text-transform: uppercase; font-weight: 700;
  margin-bottom: 4px;
}
.prize-card .info h3 { font-size: 17px; font-weight: 800; color: var(--navy); letter-spacing: -.3px; line-height: 1.15; }
.prize-card .info .desc { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.prize-card .value {
  position: absolute; top: 12px; right: 12px;
  background: var(--olive);
  color: var(--navy);
  font-size: 11px; font-weight: 800; letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.prize-card.gold .value { background: var(--navy); color: var(--gold); }

/* My coupons */
.coupon {
  margin: 12px 22px;
  background: var(--white);
  border-radius: 18px;
  padding: 16px;
  border-left: 5px solid var(--olive);
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-sm);
}
.coupon .pct {
  width: 60px; height: 60px;
  border-radius: 14px;
  background: var(--olive);
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800;
}
.coupon .info { flex: 1; }
.coupon .info .t { font-size: 14px; font-weight: 700; color: var(--navy); }
.coupon .info .s { font-size: 11px; color: var(--muted); margin-top: 2px; }
.coupon .info .exp { font-size: 10px; color: var(--danger); margin-top: 4px; font-weight: 600; letter-spacing: .5px; }
.coupon .qr { width: 44px; height: 44px; background: var(--cream); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; }

/* ============== RESULTS ============== */
.result-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 12px;
}
.result-card.correct { border-left: 4px solid var(--success); }
.result-card.partial { border-left: 4px solid var(--gold); }
.result-card.wrong { border-left: 4px solid var(--danger); }
.result-card .when-mini {
  font-size: 9px; color: var(--muted); letter-spacing: 1.5px;
  text-transform: uppercase; font-weight: 700;
  width: 42px; flex-shrink: 0;
  text-align: center;
}
.result-card .vs-mini { flex: 1; min-width: 0; }
.result-card .vs-mini .row { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--ink); }
.result-card .vs-mini .row .fg { font-size: 14px; }
.result-card .vs-mini .pred-line { font-size: 9px; color: var(--muted); margin-top: 4px; }
.result-card .scores {
  text-align: right;
  flex-shrink: 0;
}
.result-card .scores .real { font-size: 16px; font-weight: 800; color: var(--navy); font-feature-settings: "tnum"; }
.result-card .scores .pred-mini { font-size: 9px; color: var(--muted); margin-top: 2px; font-feature-settings: "tnum"; }
.result-card .pts-pill {
  background: var(--cream); color: var(--navy);
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 800;
  min-width: 36px; text-align: center;
}
.result-card.correct .pts-pill { background: var(--olive); color: var(--navy); }
.result-card.partial .pts-pill { background: rgba(212,168,42,.2); color: #8A6B11; }
.result-card.wrong .pts-pill { background: rgba(220,38,38,.1); color: var(--danger); }

/* ============== PROFILE ============== */
.profile-hero {
  background: var(--navy);
  color: #fff;
  padding: 56px 22px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 32px 32px;
}
.profile-hero::before {
  content: ""; position: absolute;
  top: -50px; right: -80px;
  width: 280px; height: 280px;
  background: rgba(255,255,255,.04);
  -webkit-mask: var(--casita-mask);
          mask: var(--casita-mask);
  -webkit-mask-size: contain;
          mask-size: contain;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
}
.profile-avatar {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: var(--olive);
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 800;
  margin: 0 auto 12px;
  border: 4px solid rgba(255,255,255,.15);
}
.profile-hero h1 { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.profile-hero .role { font-size: 11px; color: var(--olive-bright); letter-spacing: 2px; text-transform: uppercase; font-weight: 700; margin-top: 4px; }
.profile-hero .badge-row { display: flex; gap: 8px; margin-top: 16px; justify-content: center; }
.profile-hero .badge {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  padding: 6px 12px;
  font-size: 11px; font-weight: 600; color: rgba(255,255,255,.85);
  display: flex; align-items: center; gap: 6px;
}

.stats-overview {
  margin: -50px 22px 0;
  background: var(--white);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  position: relative;
  z-index: 2;
}
.stats-overview .so {
  text-align: center; padding: 4px;
  border-right: 1px solid var(--line);
}
.stats-overview .so:last-child { border-right: none; }
.stats-overview .so .v { font-size: 22px; font-weight: 800; color: var(--navy); letter-spacing: -.5px; font-feature-settings: "tnum"; }
.stats-overview .so .l { font-size: 10px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; font-weight: 700; margin-top: 2px; }

.menu-list { padding: 22px 22px 0; display: flex; flex-direction: column; gap: 6px; }
.menu-item {
  background: var(--white);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  transition: background .15s var(--ease);
  border: 1px solid var(--line);
}
.menu-item:active { background: var(--cream); }
.menu-item .icon-wrap {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.menu-item .label { flex: 1; font-size: 13px; font-weight: 600; color: var(--ink); }
.menu-item .arrow { color: var(--muted); }
.menu-item .arrow svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.5; }

/* Toast */
.toast {
  position: absolute;
  top: 70px; left: 22px; right: 22px;
  background: var(--navy);
  color: #fff;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  z-index: 99;
  transform: translateY(-120%);
  transition: transform .4s var(--ease-spring);
  box-shadow: var(--shadow);
}
.toast.show { transform: translateY(0); }
.toast .ic {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--olive);
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}

/* Notifications drawer (modal sheet) */
.sheet-overlay {
  position: absolute; inset: 0;
  background: rgba(0,16,63,0);
  display: flex; align-items: flex-end;
  visibility: hidden;
  transition: background .3s var(--ease), visibility 0s linear .3s;
  z-index: 60;
}
.sheet-overlay.active {
  background: rgba(0,16,63,.5);
  visibility: visible;
  transition: background .3s var(--ease);
  backdrop-filter: blur(4px);
}
.sheet {
  background: var(--white);
  border-radius: 28px 28px 0 0;
  width: 100%;
  max-height: 80%;
  padding: 14px 0 28px;
  transform: translateY(100%);
  transition: transform .4s var(--ease);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.sheet-overlay.active .sheet { transform: translateY(0); }
.sheet-handle {
  width: 40px; height: 4px;
  background: var(--line);
  border-radius: 2px;
  margin: 0 auto 12px;
}
.sheet-title {
  padding: 0 22px 14px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.sheet-title h2 { font-size: 16px; font-weight: 800; color: var(--navy); }
.sheet-title button {
  background: var(--cream); border: none;
  font-size: 11px; color: var(--muted);
  padding: 6px 10px; border-radius: 10px;
  font-family: inherit; font-weight: 600; cursor: pointer;
}
.notif-list { overflow-y: auto; flex: 1; }
.notif-item {
  padding: 14px 22px;
  display: flex; align-items: flex-start; gap: 12px;
  border-bottom: 1px solid var(--line);
}
.notif-item.unread { background: rgba(149,167,72,.06); }
.notif-item .ic {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--navy); color: var(--olive-bright);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.notif-item .ic.alert { background: var(--olive); color: var(--navy); }
.notif-item .ic.live { background: rgba(220,38,38,.15); color: var(--danger); }
.notif-item .body { flex: 1; }
.notif-item .body .t { font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.notif-item .body .d { font-size: 11px; color: var(--muted); line-height: 1.4; }
.notif-item .time { font-size: 10px; color: var(--muted-soft); white-space: nowrap; }

/* Responsive */
@media (max-width: 480px) {
  body { padding: 0; align-items: stretch; }
  .stage { gap: 0; }
  .brand-watermark, .help-card, .stage::before { display: none; }
  .phone {
    width: 100%; height: 100vh; max-height: -webkit-fill-available;
    border-radius: 0; padding: 0;
    box-shadow: none;
  }
  .phone-screen, .screens { border-radius: 0; }
  .tabbar { border-radius: 0; padding-bottom: max(28px, env(safe-area-inset-bottom)); }
  .phone::after { display: none; }
}
/* Casita mask used by various elements */
:root {
  --casita-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 248.9 221.6'><path d='M233.1,60.6L141.7,4.8c-10.6-6.4-23.9-6.4-34.5,0L15.9,60.6C6,66.6,0,77.3,0,88.8v99.7c0,18.3,14.8,33.1,33.1,33.1h182.7c18.3,0,33.1-14.8,33.1-33.1V88.8C248.9,77.3,242.9,66.6,233.1,60.6z'/></svg>");
}
.brand-watermark .casita,
.login-top .casita,
.splash-logo {
  -webkit-mask-image: var(--casita-mask);
          mask-image: var(--casita-mask);
}
.home-hero::before,
#screen-login::before,
.rank-hero::before,
.profile-hero::before,
.onb-illust .casita-bg {
  -webkit-mask-image: var(--casita-mask);
          mask-image: var(--casita-mask);
}

/* ============================================================
   Adiciones para páginas reales (registro, flash, errores)
   ============================================================ */
.field-label {
  font-size: 10px;
  color: rgba(255,255,255,.55);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}
.field-error {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #FFB4B4;
  font-weight: 500;
}
.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: rgba(255,255,255,.78);
  line-height: 1.45;
  margin-top: 4px;
}
.consent input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--olive-bright);
}
.penca-flash {
  margin: 8px 0 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
}
.penca-flash--success {
  background: rgba(149,167,72,.15);
  color: var(--olive-bright);
  border: 1px solid rgba(149,167,72,.3);
}
.penca-flash--error {
  background: rgba(220,38,38,.12);
  color: #FFB4B4;
  border: 1px solid rgba(220,38,38,.3);
}

/* ============================================================
   Layout override — server-rendered, mobile-first, fullscreen.
   Reemplaza el "phone frame" del mockup. Una sola pantalla
   activa por request, no hay layering ni animación de entrada.
   ============================================================ */
body {
  padding: 0;
  align-items: stretch;
  display: block;
  background: var(--bg);
}
.stage {
  display: block;
  min-height: 100vh;
  gap: 0;
}
.stage::before { display: none; }
.phone {
  position: static;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 100vh;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.phone::after { display: none; }
.phone-screen {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 100vh;
  border-radius: 0;
  background: var(--white);
}
.screens {
  position: static;
  border-radius: 0;
  height: auto;
  min-height: 100vh;
}
.screen {
  position: static;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: none !important;
  /* SIN min-height: 100vh — el padre .phone-screen ya garantiza fondo a 100vh.
     Forzarlo acá creaba aire vacío al final de pantallas con contenido corto. */
}
.brand-watermark,
.help-card,
.statusbar { display: none !important; }

/* Sticky bottom bar (predict.php) en lugar de absolute */
.predict-foot {
  position: sticky;
  bottom: 0;
}

/* Desktop: capamos el ancho y un sombreado sutil para no estirar
   el contenido en monitores grandes. Mobile-first: si no hay min-width,
   se aplica fullscreen sin cambios. */
@media (min-width: 640px) {
  body { background: linear-gradient(180deg, var(--cream-2) 0%, var(--bg) 100%); }
  .phone-screen {
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 8px 40px rgba(0,27,107,.12);
  }
}

/* Tab bar fixed al viewport, centrada en desktop dentro del contenedor de 480px */
.tabbar {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  border-radius: 0;
  z-index: 50;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
}
@media (min-width: 640px) {
  .tabbar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    max-width: 480px;
    width: 100%;
  }
}

/* Bottom clearance — tabbar fija mide ~80px (incluyendo safe-area). 90px alcanza. */
.screen-body { padding-bottom: 90px !important; }

/* Body bg que matchea el hero principal de cada pantalla — para que las
   safe-areas de iOS no se vean crema mientras la pantalla es navy/white. */
body.bn { background: var(--navy) !important; }
body.bw { background: var(--white) !important; }
@media (min-width: 640px) {
  body.bn, body.bw { background: linear-gradient(180deg, var(--cream-2) 0%, var(--bg) 100%) !important; }
}

/* Safe-area padding para pantallas sin tabbar ni predict-foot */
#screen-login,
#screen-rules,
.screen.no-tabbar {
  padding-bottom: max(40px, env(safe-area-inset-bottom, 24px)) !important;
}

/* Botón primary "flotante" en heroes navy */
#screen-login .btn-primary,
.btn-primary.lift {
  box-shadow: 0 10px 28px rgba(184, 204, 92, .35);
  font-size: 15px;
  padding: 18px 22px;
}

/* Registro/login compactos para que entre todo sin scroll forzado en iPhones SE-tier */
.phone-screen { overflow: visible !important; }
#screen-login {
  padding-top: 28px !important;
  padding-bottom: max(40px, env(safe-area-inset-bottom)) !important;
}
#screen-login .login-top { margin-bottom: 22px !important; }
#screen-login .login-eyebrow { margin-bottom: 6px !important; font-size: 10px !important; }
#screen-login .login-title { font-size: 28px !important; line-height: 1.1 !important; margin-bottom: 8px !important; letter-spacing: -.6px !important; }
#screen-login .login-sub { font-size: 13px !important; margin-bottom: 18px !important; max-width: none !important; }
#screen-login .login-form { gap: 8px !important; }
#screen-login .field { padding: 8px 14px !important; gap: 1px !important; border-radius: 12px !important; }
#screen-login .field input { font-size: 16px !important; padding: 2px 0 !important; }
#screen-login .field-label { font-size: 9px !important; letter-spacing: 1.5px !important; }
#screen-login .consent { font-size: 12px !important; margin-top: 2px !important; }
#screen-login .login-foot { font-size: 10px !important; margin-top: 16px !important; line-height: 1.5 !important; }
#screen-login .btn-primary { padding: 14px 22px !important; font-size: 14px !important; }

/* CRÍTICO: habilitar scroll del documento.
   El mockup original tenía html/body overflow:hidden y scroll interno en .screen-body.
   Para web real necesitamos document-level scroll en mobile. */
html, body {
  height: auto !important;
  min-height: 100vh !important;
  overflow: visible !important;
}
body { overflow-x: hidden !important; }
.phone-screen,
.screens,
.screen,
.screen-body {
  overflow: visible !important;
}
/* Eliminar el flex:1 + overflow-y:auto que armaba scroll interno */
.screen-body {
  flex: initial !important;
}

/* Registro no necesita ser flex column — pasa a block para fluir natural */
#screen-login {
  display: block !important;
}
.login-foot { margin-top: 16px !important; }

/* Modal overlay debe ser fixed para cubrir todo el viewport */
.modal-overlay { position: fixed !important; inset: 0 !important; z-index: 100 !important; }

/* Header compacto en registro/login — logo solo, 96px, sin texto al lado.
   Reemplaza el layout viejo (casita-mask + texto Multi Soluciones).
   El logo SVG ya contiene la marca completa engravada. */
#screen-login .login-top {
  display: flex !important;
  align-items: center !important;
  margin-bottom: 22px !important;
  gap: 0 !important;
  flex-direction: row !important;
}
#screen-login .login-top svg { display: block; }

/* Casita decorativa enorme (::before) extendía el viewport y rompía mobile.
   La ocultamos — el logo del header ya carga el peso visual de la marca. */
#screen-login::before { display: none !important; }

/* iOS Safari hace zoom automático al enfocar inputs con font-size < 16px.
   Forzamos 16px mínimo en todos los form elements de la app. */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
  font-size: 16px !important;
}
