    :root {
      --noche: #f6f4ee;
      --noche2: #eef0ea;
      --panel: #ffffff;
      --panel2: #faf8f3;
      --amarillo: #e8b400;
      --azul: #1747c9;
      --rojo: #DA1A35;
      --oro: #b07e12;
      --naranja: #E8590C;
      --verde: #1faa59;
      --texto: #14181f;
      --tenue: #5a6472;
      --linea: #e7e3d8;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0
    }

    html,
    body {
      background: var(--noche);
      color: var(--texto);
      font-family: 'Inter', sans-serif;
      -webkit-font-smoothing: antialiased
    }

    body {
      overflow-x: hidden
    }

    h1,
    h2,
    h3,
    .display {
      font-family: 'Anton', sans-serif;
      letter-spacing: .5px;
      text-transform: uppercase;
      line-height: .95
    }

    .cond {
      font-family: 'Archivo', sans-serif
    }

    button {
      font-family: 'Archivo', sans-serif;
      cursor: pointer;
      border: none
    }

    input,
    select {
      font-family: 'Inter', sans-serif
    }

    a {
      color: inherit
    }

    /* el wrapper <picture> no debe alterar el layout: la imagen hereda el contenedor */
    picture {
      display: contents
    }

    /* fondo estadio */
    .bg {
      position: fixed;
      inset: 0;
      z-index: -2;
      background:
        radial-gradient(1200px 500px at 50% -10%, #1b3a86 0%, transparent 60%),
        radial-gradient(900px 600px at 10% 110%, #102a63 0%, transparent 55%),
        radial-gradient(900px 600px at 90% 110%, #2a1145 0%, transparent 55%),
        var(--noche)
    }

    .bg::after {
      content: "";
      position: absolute;
      inset: 0;
      background-image: radial-gradient(circle, #ffffff22 1px, transparent 1.4px);
      background-size: 46px 46px;
      opacity: .25;
      mask-image: linear-gradient(to bottom, #000 0%, transparent 70%)
    }

    .lights {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: 6px;
      z-index: -1;
      background: linear-gradient(90deg, var(--amarillo), var(--azul), var(--rojo), var(--amarillo));
      background-size: 300% 100%;
      animation: slide 6s linear infinite
    }

    @keyframes slide {
      to {
        background-position: 300% 0
      }
    }

    .wrap {
      max-width: 1060px;
      margin: 0 auto;
      padding: 0 18px 40px
    }

    header.top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 16px 0 10px;
      flex-wrap: wrap
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px
    }

    .brand .crest {
      width: 46px;
      height: 46px;
      border-radius: 12px;
      background: linear-gradient(135deg, var(--amarillo), var(--oro));
      display: grid;
      place-items: center;
      font-size: 26px;
      box-shadow: 0 6px 20px #0008
    }

    .brand b {
      font-family: 'Inter', sans-serif;
      font-size: 17px;
      font-weight: 600;
      display: block;
      line-height: 1.2
    }

    .brand small {
      color: var(--tenue);
      font-size: 11px;
      letter-spacing: 1.5px;
      text-transform: uppercase
    }

    .toolbar {
      display: flex;
      gap: 8px;
      align-items: center
    }

    .iconbtn {
      background: var(--panel);
      border: 1px solid var(--linea);
      color: var(--texto);
      width: 44px;
      height: 44px;
      border-radius: 12px;
      font-size: 20px;
      font-weight: 700;
      display: grid;
      place-items: center;
      transition: .15s
    }

    .iconbtn:hover {
      border-color: var(--oro);
      transform: translateY(-1px)
    }

    .iconbtn.on {
      background: var(--oro);
      color: #10204a;
      border-color: var(--oro)
    }

    .iconbtn .icon-off {
      display: inline
    }

    .iconbtn .icon-on {
      display: none
    }

    .iconbtn.on .icon-off {
      display: none
    }

    .iconbtn.on .icon-on {
      display: inline
    }

    /* HERO */
    .hero {
      position: relative;
      text-align: center;
      padding: 2px 0 2px
    }

    .kicker {
      color: var(--oro);
      font-family: 'Archivo';
      font-weight: 900;
      letter-spacing: 4px;
      font-size: 13px;
      text-transform: uppercase;
      margin-bottom: 4px
    }

    .flagline {
      height: 4px;
      width: 0;
      margin: 0 auto 4px;
      border-radius: 3px;
      background: linear-gradient(90deg, var(--amarillo) 0 33%, var(--azul) 33% 66%, var(--rojo) 66% 100%);
      animation: draw 1s .3s cubic-bezier(.2, .7, .2, 1) forwards
    }

    @keyframes draw {
      to {
        width: min(180px, 55%)
      }
    }

    .hero .hero-image-wrap {
      animation: fadeUp .6s ease both;
      animation-delay: .35s;
      display: flex;
      justify-content: center;
      margin: -8px auto -10px;
      max-width: 600px
    }

    .hero .hero-image {
      width: 100%;
      height: auto;
      animation: breathe 3s ease-in-out infinite;
      filter: drop-shadow(0 4px 30px rgba(0, 0, 0, .2))
    }

    .lead {
      color: var(--tenue);
      max-width: 560px;
      margin: 2px auto 0;
      font-size: 16px
    }

    .cta {
      margin-top: 8px;
      display: inline-flex;
      gap: 12px;
      flex-wrap: wrap;
      justify-content: center
    }

    .btn {
      padding: 13px 22px;
      border-radius: 12px;
      font-weight: 600;
      font-size: 14px;
      letter-spacing: .3px;
      text-transform: uppercase;
      transition: .18s;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      text-shadow: 0 1px 2px rgba(0, 0, 0, .12)
    }

    .btn-primary {
      background: linear-gradient(135deg, var(--amarillo), var(--oro));
      color: #0c1c44;
      box-shadow: 0 10px 30px #f5c54233
    }

    .btn-primary:hover {
      transform: translateY(-2px) scale(1.02);
      box-shadow: 0 14px 38px #f5c54255
    }

    .btn-ghost {
      background: var(--panel);
      color: var(--texto);
      border: 1px solid var(--linea)
    }

    .btn-ghost:hover {
      border-color: var(--oro)
    }

    .btn-rojo {
      background: linear-gradient(135deg, var(--rojo), #ff4d63);
      color: #fff
    }

    .btn:disabled {
      opacity: .45;
      cursor: not-allowed;
      transform: none
    }

    /* fila de botones (admin) */
    .btn-row {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      align-items: center
    }

    /* tarjetas premios mini */
    .prizes {
      margin-top: 36px;
      display: flex;
      flex-direction: column;
      gap: 22px;
      max-width: 820px;
      margin-left: auto;
      margin-right: auto
    }

    .prizes+.card {
      max-width: 820px;
      margin-left: auto;
      margin-right: auto
    }

    .prize {
      display: flex;
      align-items: stretch;
      gap: 0;
      position: relative;
      overflow: visible;
      cursor: pointer
    }

    .prize-info {
      flex: 1;
      padding: 16px 26px;
      background: var(--panel);
      border: 1px solid var(--linea);
      border-radius: 16px;
      position: relative;
      z-index: 2;
      box-shadow: 6px 0 20px -6px rgba(0, 0, 0, .1);
      transition: box-shadow .3s
    }

    .prize-info::before {
      content: "";
      position: absolute;
      inset: 0 auto 0 0;
      width: 5px;
      background: var(--oro);
      border-radius: 9px 0 0 9px
    }

    .prize-info .em {
      font-size: 24px;
      margin-bottom: 0
    }

    .prize-info h4 {
      font-family: 'Archivo';
      font-weight: 700;
      font-size: 13.5px;
      margin: 4px 0 3px;
      letter-spacing: .3px
    }

    .prize-info p {
      color: var(--tenue);
      font-size: 12.5px;
      line-height: 1.4;
      margin: 0
    }

    .prize-image-wrap {
      width: 120px;
      min-height: 100px;
      flex-shrink: 0;
      margin-left: -12px;
      border-radius: 16px;
      border: 1px solid var(--linea);
      overflow: hidden;
      background: var(--panel2);
      position: relative;
      z-index: 1;
      transition: transform .45s cubic-bezier(.22, .68, .3, 1), box-shadow .3s
    }

    .prize-image-wrap img {
      width: 100%;
      height: 100%;
      min-height: 100px;
      object-fit: cover;
      display: block;
      background: var(--panel2)
    }

    .prize:hover .prize-image-wrap {
      transform: translateX(12px);
      box-shadow: -4px 0 16px rgba(0, 0, 0, .08)
    }

    .prize:hover .prize-info {
      box-shadow: 2px 0 12px -4px rgba(0, 0, 0, .06)
    }

    .prize-info .tag {
      margin-top: 8px;
      display: inline-block;
      font-size: 10.5px;
      color: var(--oro);
      border: 1px solid #f5c54255;
      border-radius: 20px;
      padding: 4px 10px;
      text-transform: uppercase;
      letter-spacing: 1px;
      font-weight: 700
    }

    /* secciones / panel */
    .section {
      display: none;
      animation: fade .35s ease
    }

    .section.active {
      display: block
    }

    @keyframes fade {
      from {
        opacity: 0;
        transform: translateY(10px)
      }

      to {
        opacity: 1;
        transform: none
      }
    }

    .card {
      background: var(--panel);
      border: 1px solid var(--linea);
      border-radius: 20px;
      padding: 32px 36px;
      margin-top: 28px;
      box-shadow: 0 20px 50px #00000035
    }

    .card h2 {
      font-size: 22px;
      margin-bottom: 4px
    }

    .card .sub {
      color: var(--tenue);
      font-size: 13px;
      margin-bottom: 16px
    }

    /* stepper */
    .steps {
      display: flex;
      gap: 8px;
      margin: 0 0 24px
    }

    .steps .s {
      flex: 1;
      height: 6px;
      border-radius: 6px;
      background: var(--linea)
    }

    .steps .s.done {
      background: var(--oro)
    }

    .steplabel {
      color: var(--oro);
      font-family: 'Archivo';
      font-weight: 900;
      letter-spacing: 2px;
      font-size: 12px;
      text-transform: uppercase;
      margin-bottom: 16px
    }

    label.f {
      display: block;
      margin: 18px 0 7px;
      font-weight: 600;
      font-size: 13.5px
    }

    label.f .req {
      color: var(--rojo)
    }

    .in {
      width: 100%;
      background: #0a1838;
      border: 1px solid var(--linea);
      color: var(--texto);
      border-radius: 12px;
      padding: 13px 14px;
      font-size: 15px;
      transition: .15s
    }

    .in:focus {
      outline: none;
      border-color: var(--oro);
      box-shadow: 0 0 0 3px #f5c54222
    }

    .grid2 {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px
    }

    .help {
      color: var(--tenue);
      font-size: 12px;
      margin-top: 5px
    }

    .err {
      color: #ff7a8c;
      font-size: 12.5px;
      margin-top: 6px;
      display: none
    }

    .err.show {
      display: block
    }

    .in.err-input,
    .in.err-input:focus {
      border-color: var(--rojo);
      box-shadow: 0 0 0 3px #da1a3522
    }

    /* marcador estilo scoreboard */
    .match {
      background: linear-gradient(180deg, #08152f, #0b1d40);
      border: 1px solid var(--linea);
      border-radius: 16px;
      padding: 16px;
      margin-top: 16px
    }

    .match .meta {
      color: var(--tenue);
      font-size: 11.5px;
      text-transform: uppercase;
      letter-spacing: 1.5px;
      margin-bottom: 12px;
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 6px
    }

    .score {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: center;
      gap: 6px
    }

    .team {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      text-align: center
    }

    .team img {
      width: 54px;
      border-radius: 6px;
      box-shadow: 0 3px 10px #0007;
      filter: drop-shadow(0 2px 4px #0005)
    }

    .team b {
      font-family: 'Archivo';
      font-weight: 900;
      font-size: 13px
    }

    .scorebox {
      display: flex;
      align-items: center;
      gap: 8px
    }

    .led {
      width: 62px;
      height: 74px;
      background: #02060f;
      border: 2px solid #16294f;
      border-radius: 12px;
      display: grid;
      place-items: center
    }

    .led input {
      width: 100%;
      height: 100%;
      background: transparent;
      border: none;
      padding: 0;
      text-align: center;
      font-family: 'Anton';
      font-size: 42px;
      color: var(--amarillo);
      text-shadow: 0 0 12px #ffd2008c;
      -moz-appearance: textfield
    }

    .led input::-webkit-inner-spin-button,
    .led input::-webkit-outer-spin-button {
      display: none
    }

    .led input:focus {
      outline: none;
      color: #fff;
      text-shadow: 0 0 16px #fff
    }

    .vs {
      font-family: 'Anton';
      color: var(--tenue);
      font-size: 18px;
      padding: 0 4px
    }

    .stepper-nav {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      margin-top: 22px
    }

    /* radios pills */
    .pills {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin-top: 6px
    }

    .pill {
      flex: 1;
      min-width: 120px;
      background: #0a1838;
      border: 1px solid var(--linea);
      border-radius: 12px;
      padding: 13px;
      text-align: center;
      font-weight: 700;
      transition: .15s;
      font-family: 'Archivo'
    }

    .pill.sel {
      background: var(--oro);
      color: #0c1c44;
      border-color: var(--oro)
    }

    .pill.sel.no {
      background: var(--rojo);
      color: #fff;
      border-color: var(--rojo)
    }

    /* resumen confirm */
    .review {
      display: grid;
      gap: 8px
    }

    .review .row {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      padding: 11px 14px;
      background: #0a1838;
      border: 1px solid var(--linea);
      border-radius: 11px;
      font-size: 14px
    }

    .review .row b {
      color: var(--oro);
      font-family: 'Archivo'
    }

    /* admin */
    .tabs {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-bottom: 6px
    }

    .tab {
      padding: 11px 18px;
      border-radius: 11px;
      background: var(--panel);
      border: 1px solid var(--linea);
      color: var(--tenue);
      font-weight: 600;
      font-family: 'Archivo';
      font-size: 13px
    }

    .tab.active {
      background: var(--oro);
      color: #0c1c44;
      border-color: var(--oro)
    }

    .admin-overlay {
      position: fixed;
      inset: 0;
      background: rgba(20, 24, 31, .92);
      z-index: 80;
      display: none;
      overflow-y: auto;
      padding: 20px;
      animation: adminIn .3s ease
    }

    .admin-overlay.show {
      display: block
    }

    @keyframes adminIn {
      from {
        opacity: 0;
        transform: scale(.96)
      }

      to {
        opacity: 1;
        transform: scale(1)
      }
    }

    .admin-overlay .wrap {
      max-width: 840px;
      margin: 0 auto;
      padding: 24px 0 50px
    }

    .admin-overlay .close-btn {
      position: fixed;
      top: 20px;
      right: 24px;
      width: 44px;
      height: 44px;
      border-radius: 12px;
      background: var(--naranja);
      color: #fff;
      border: none;
      font-size: 22px;
      display: grid;
      place-items: center;
      cursor: pointer;
      z-index: 81;
      font-weight: 700;
      transition: .15s
    }

    .admin-overlay .close-btn:hover {
      background: #d04d00;
      transform: scale(1.05)
    }

    .adminpane {
      display: none;
      padding: 8px 6px
    }

    .adminpane.active {
      display: block
    }

    table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 10px;
      font-size: 13.5px
    }

    th,
    td {
      text-align: left;
      padding: 10px 10px;
      border-bottom: 1px solid var(--linea)
    }

    th {
      color: var(--tenue);
      font-size: 11.5px;
      text-transform: uppercase;
      letter-spacing: 1px
    }

    tr:hover td {
      background: #0a183855
    }

    .kpis {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 12px;
      margin-top: 6px
    }

    .kpi {
      background: #0a1838;
      border: 1px solid var(--linea);
      border-radius: 14px;
      padding: 16px
    }

    .kpi .n {
      font-family: 'Anton';
      font-size: 34px;
      color: var(--oro)
    }

    .kpi .l {
      color: var(--tenue);
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 1px
    }

    .cfgrow {
      display: grid;
      grid-template-columns: 1fr 90px;
      gap: 10px;
      align-items: center;
      padding: 9px 0;
      border-bottom: 1px solid var(--linea)
    }

    .cfgrow span {
      font-size: 13.5px
    }

    .chartbox {
      background: #0a1838;
      border: 1px solid var(--linea);
      border-radius: 18px;
      padding: 20px;
      margin-top: 16px
    }

    /* winners reveal */
    .wcard {
      background: linear-gradient(180deg, var(--panel), #0a1838);
      border: 2px solid var(--oro);
      border-radius: 20px;
      padding: 22px;
      margin-top: 14px;
      position: relative;
      overflow: hidden
    }

    .wcard .em {
      font-size: 40px
    }

    .wcard h3 {
      font-size: 22px;
      color: var(--oro);
      margin: 6px 0
    }

    .wcard .winner {
      font-family: 'Anton';
      font-size: 30px;
      margin: 6px 0
    }

    .wcard .prizeline {
      color: var(--tenue);
      font-size: 14px
    }

    .wcard .pts {
      position: absolute;
      top: 18px;
      right: 20px;
      font-family: 'Anton';
      font-size: 30px;
      color: #4d82ff
    }

    .toast {
      position: fixed;
      left: 50%;
      bottom: 24px;
      transform: translateX(-50%) translateY(120px);
      background: var(--oro);
      color: #0c1c44;
      font-weight: 900;
      padding: 14px 22px;
      border-radius: 14px;
      font-family: 'Archivo';
      z-index: 60;
      transition: .3s;
      box-shadow: 0 14px 40px #0007
    }

    .toast.show {
      transform: translateX(-50%) translateY(0)
    }

    /* thank you overlay */
    .thank-overlay {
      position: fixed;
      inset: 0;
      z-index: 50;
      display: none;
      place-items: center;
      background: rgba(4, 8, 24, .55);
      backdrop-filter: blur(6px);
      padding: 16px
    }

    .thank-overlay.show {
      display: grid
    }

    .thank-gool {
      position: fixed;
      inset: 0;
      display: grid;
      place-items: center;
      z-index: 60;
      pointer-events: none
    }

    .thank-gool span {
      display: block;
      font-family: 'DynaPuff', sans-serif;
      font-size: clamp(80px, 22vw, 160px);
      color: var(--amarillo);
      text-shadow: 0 0 50px #ffd200, 0 6px 0 #00000040;
      animation: gb 2.8s ease forwards;
      line-height: 1;
      letter-spacing: 2px
    }

    .thank-box {
      position: relative;
      text-align: center;
      max-width: 340px;
      /* Ancho estilizado ideal para formato vertical */
      width: 100%;
      background: rgba(255, 255, 255, 0.45);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border: 1px solid rgba(255, 255, 255, 0.4);
      border-radius: 28px;
      padding: 0;
      overflow: hidden;
      box-shadow: 0 24px 60px rgba(0, 0, 0, 0.08);
      animation: thankIn .5s cubic-bezier(.2, .7, .2, 1);
    }

    picture {
      display: contents;
      /* Regresa a su estado natural */
    }

    /* === 1. EL CONTENEDOR DE LA IMAGEN (Con la bandera de Ecuador abajo) === */
    .thank-img-wrap {
      padding: 0;
      overflow: hidden;
      border-radius: 28px 28px 0 0;
      position: relative;
      z-index: 1;
      -webkit-backface-visibility: hidden;
      backface-visibility: hidden;
      transform: translate3d(0, 0, 0);
      -webkit-transform: translate3d(0, 0, 0);

      /* === TRUCO DE LA BANDERA === */
      /* Añadimos un borde inferior grueso donde pintaremos la bandera */
      border-bottom: 6px solid transparent;
      /* Gradiente con los colores exactos de la bandera de Ecuador (Amarillo 50%, Azul 25%, Rojo 25%) */
      border-image: linear-gradient(to right, #FFDD00 50%, #0033A0 50% 75%, #DA291C 75%) 1;
    }

    /* === 2. LA IMAGEN MÁS ALTA Y ENFOCADA ABAJO === */
    .thank-img {
      width: 100%;
      height: 65vh;
      /* ¡Aumentada de 50vh a 58vh para dar más espacio abajo! */
      object-fit: cover;

      /* === CAMBIO CLAVE === */
      /* Cambiado de 'top' a 'center' para que el encuadre baje y muestre más la parte inferior (césped/botas) */
      object-position: center center;

      display: block;
      border-radius: 28px 28px 0 0;
    }

    /* === 3. EL CUERPO DEL POPUP === */
    .thank-body {
      padding: 24px 20px 24px;
      background: rgba(255, 255, 255, 0.45);
    }


    .thank-sub {
      color: #E8590C;
      font-size: 14px;
      font-weight: 500;
      margin: 6px 0 14px;
      text-shadow: 0 1px 4px rgba(0, 0, 0, .3)
    }

    @keyframes thankIn {
      from {
        opacity: 0;
        transform: scale(.82) translateY(24px)
      }

      to {
        opacity: 1;
        transform: none
      }
    }

    .goalbanner {
      position: fixed;
      inset: 0;
      display: none;
      place-items: center;
      z-index: 55;
      pointer-events: none
    }

    .goalbanner.show {
      display: grid
    }

    .goalbanner b {
      font-family: 'DynaPuff', sans-serif;
      font-size: clamp(80px, 22vw, 160px);
      color: var(--amarillo);
      text-shadow: 0 0 50px #ffd200, 0 6px 0 #00000040;
      letter-spacing: 2px;
      animation: gb 1.4s ease forwards
    }

    @keyframes gb {
      0% {
        transform: scale(.4);
        opacity: 0
      }

      20% {
        transform: scale(1.08);
        opacity: 1
      }

      60% {
        opacity: 1
      }

      100% {
        transform: scale(1.2);
        opacity: 0
      }
    }

    .foot {
      color: var(--tenue);
      text-align: center;
      font-size: 12px;
      padding: 28px 20px 16px;
      margin-top: 6px;
      line-height: 1.7
    }

    .modal {
      position: fixed;
      inset: 0;
      background: #000a;
      display: none;
      place-items: center;
      z-index: 70;
      padding: 18px
    }

    .modal.show {
      display: grid
    }

    .modal .box {
      background: var(--panel);
      border: 1px solid var(--linea);
      border-radius: 18px;
      padding: 24px;
      max-width: 380px;
      width: 100%
    }

    .muted {
      color: var(--tenue)
    }

    @media(max-width:620px) {
      .grid2 {
        grid-template-columns: 1fr
      }

      .led {
        width: 54px;
        height: 64px
      }

      .led input {
        font-size: 34px;
        -moz-appearance: textfield
      }

      .led input::-webkit-inner-spin-button,
      .led input::-webkit-outer-spin-button {
        display: none
      }
    }

    /* =================== TEMA CLARO · BLOQUES TRICOLOR =================== */
    html,
    body {
      background: var(--noche)
    }

    .wrap {
      max-width: 680px
    }

    /* fondo claro */
    .bg {
      background: radial-gradient(900px 480px at 50% -8%, #fff 0%, transparent 60%), var(--noche)
    }

    .bg::after {
      background-image: radial-gradient(circle, #14181f12 1px, transparent 1.4px);
      opacity: .5;
      mask-image: linear-gradient(to bottom, #000 0%, transparent 60%)
    }

    /* barra de bandera animada suave arriba */
    .lights {
      height: 5px;
      background: linear-gradient(90deg, var(--amarillo) 0 33%, var(--azul) 33% 66%, var(--rojo) 66% 100%);
      background-size: 200% 100%;
      animation: flagslide 9s ease-in-out infinite
    }

    @keyframes flagslide {

      0%,
      100% {
        background-position: 0 0;
        filter: saturate(1)
      }

      50% {
        background-position: 60% 0;
        filter: saturate(1.15)
      }
    }

    /* marca */
    .brand .crest {
      background: linear-gradient(135deg, var(--amarillo), #f6c945);
      box-shadow: 0 6px 18px #e8b40033
    }

    .brand small {
      color: var(--tenue)
    }

    .iconbtn {
      background: #fff;
      border: 1px solid var(--linea);
      color: var(--texto);
      -webkit-text-stroke: .5px transparent
    }

    .iconbtn:hover {
      border-color: var(--naranja);
      color: var(--naranja)
    }

    .iconbtn.on {
      background: var(--naranja);
      color: #fff;
      border-color: var(--naranja)
    }

    /* HERO tipográfico claro */
    h1,
    h2,
    h3 {
      font-family: 'Archivo', sans-serif;
      font-weight: 900;
      letter-spacing: -1px;
      text-transform: none
    }

    .kicker {
      color: var(--tenue);
      font-weight: 500;
      letter-spacing: 2px;
      font-size: 11px;
      margin-bottom: 8px
    }

    .flagline {
      height: 3px;
      margin: 0 auto 10px
    }

    .hero-image-wrap {
      display: flex;
      justify-content: center;
      margin: 0 auto;
      max-width: 600px
    }

    .yr {
      display: none
    }

    /* subrayado bandera que se dibuja (acento dinámico) */

    .lead {
      color: var(--tenue);
      font-size: 15px;
      max-width: 500px;
      margin: 5px auto 0;
      line-height: 1.5
    }

    .hero-image {
      width: 100%;
      height: auto;
      animation: breathe 3s ease-in-out infinite;
      filter: drop-shadow(0 4px 20px rgba(0, 0, 0, .12))
    }

    @keyframes breathe {

      0%,
      100% {
        transform: scale(1)
      }

      50% {
        transform: scale(1.04)
      }
    }

    /* entrada escalonada */
    @keyframes fadeUp {
      from {
        opacity: 0;
        transform: translateY(18px)
      }

      to {
        opacity: 1;
        transform: translateY(0)
      }
    }

    .hero {
      animation: fadeUp .6s ease both;
      animation-delay: .1s
    }

    .hero .kicker {
      animation: fadeUp .6s ease both;
      animation-delay: .2s
    }

    .hero .hero-image-wrap {
      animation: fadeUp .6s ease both;
      animation-delay: .35s
    }

    .hero .lead,
    .hero .cta,
    .hero .art {
      animation: fadeUp .7s ease both;
      animation-delay: .7s
    }

    .prizes {
      animation: fadeUp .7s ease both;
      animation-delay: .9s
    }

    .card {
      animation: fadeUp .7s ease both;
      animation-delay: 1.1s
    }

    .section-title {
      animation: fadeUp .7s ease both;
      animation-delay: .8s
    }

    .section-title+.card {
      animation-delay: 1.3s
    }

    /* sección con líneas decorativas */
    .section-title {
      display: flex;
      align-items: center;
      gap: 16px;
      font-family: 'Archivo';
      font-weight: 700;
      font-size: 20px;
      letter-spacing: 2px;
      text-transform: uppercase;
      color: var(--tenue);
      margin: 36px 0 20px
    }

    .section-title::before,
    .section-title::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--linea)
    }

    /* botones claros */
    .btn-primary {
      background: var(--naranja);
      color: #fff;
      box-shadow: 0 6px 18px #e8590c33
    }

    .btn-primary:hover {
      background: #d04d00;
      box-shadow: 0 10px 24px #e8590c4d
    }

    .btn-ghost {
      background: #fff;
      color: var(--texto);
      border: 1px solid var(--linea)
    }

    .btn-ghost:hover {
      border-color: var(--naranja);
      color: var(--naranja)
    }

    .btn-rojo {
      background: var(--rojo);
      color: #fff
    }

    /* slot de arte de Marketing */
    .art {
      height: 850px;
      border-radius: 22px;

      margin: 34px 0;
      position: relative;
      overflow: visible;
      text-align: center;
      padding: 10px
    }

    .stadium-bg {
      position: absolute;
      left: -60%;
      right: -60%;
      top: 0;
      bottom: 0;
      z-index: 0;
      pointer-events: none;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden
    }

    .stadium-bg svg {
      width: 100%;
      height: 100%;
      object-fit: contain
    }

    .art-clip {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      width: 680px;
      height: 320px;
      border-radius: 22px;
      overflow: hidden;
      box-shadow: 0 8px 32px rgba(0, 0, 0, .3);
      z-index: 1
    }

    .art-clip img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block
    }

    /* tarjetas */
    .card {
      background: var(--panel);
      border: 1px solid var(--linea);
      padding: 32px 36px;
      margin-top: 28px;
      box-shadow: 0 16px 44px #14182010
    }

    .card h2 {
      font-size: 24px
    }

    .in {
      background: var(--panel2);
      border: 1px solid #ddd8cc;
      color: var(--texto)
    }

    .in:focus {
      border-color: var(--amarillo);
      box-shadow: 0 0 0 3px #e8b40022
    }

    /* premios pintados (colores de bandera por categoría) */
    .prizes {
      margin-top: 30px;
      padding: 0 10px
    }

    .prize-info {
      background: #fff
    }

    .prize-info::before {
      width: 6px
    }

    .prize-info.c0::before {
      background: var(--amarillo)
    }

    .prize-info.c1::before {
      background: var(--azul)
    }

    .prize-info.c2::before {
      background: var(--rojo)
    }

    .prize-info.c3::before {
      background: var(--azul)
    }

    .prize-info.c4::before {
      background: var(--amarillo)
    }

    .prize-info .tag {
      color: #fff;
      border: none
    }

    .prize-info.c0 .tag {
      background: var(--amarillo);
      color: #14181f
    }

    .prize-info.c1 .tag {
      background: var(--azul)
    }

    .prize-info.c2 .tag {
      background: var(--rojo)
    }

    .prize-info.c3 .tag {
      background: var(--azul)
    }

    .prize-info.c4 .tag {
      background: var(--amarillo);
      color: #14181f
    }

    /* pasos en tricolor */
    .steplabel {
      color: var(--naranja)
    }

    .steps .s {
      background: #e0dccf
    }

    .steps .s:nth-child(1).done {
      background: var(--amarillo)
    }

    .steps .s:nth-child(2).done {
      background: var(--azul)
    }

    .steps .s:nth-child(3).done {
      background: var(--rojo)
    }

    .steps .s:nth-child(4).done {
      background: var(--verde)
    }

    /* viñeta tras viñeta */
    .stepview {
      animation: vinieta .45s cubic-bezier(.2, .7, .2, 1)
    }

    @keyframes vinieta {
      from {
        opacity: 0;
        transform: translateY(16px)
      }

      to {
        opacity: 1;
        transform: none
      }
    }

    /* marcador (scoreboard) en claro */
    .match {
      background: #fff;
      border: 1px solid var(--linea)
    }

    .match .meta {
      color: var(--tenue)
    }

    .led {
      background: var(--panel2);
      border: 1px solid #ddd8cc
    }

    .led input {
      color: var(--texto);
      text-shadow: none;
      font-family: 'Archivo';
      font-weight: 900;
      -moz-appearance: textfield
    }

    .led input::-webkit-inner-spin-button,
    .led input::-webkit-outer-spin-button {
      display: none
    }

    .led input:focus {
      color: var(--azul);
      text-shadow: none
    }

    .team img {
      box-shadow: 0 2px 8px #14182022;
      filter: drop-shadow(0 1px 2px #14182033)
    }

    .vs {
      color: #bdb6a4
    }

    /* pills */
    .pill {
      background: var(--panel2);
      border: 1px solid #ddd8cc;
      color: var(--texto)
    }

    .pill.sel {
      background: var(--naranja);
      color: #fff;
      border-color: var(--naranja)
    }

    .pill.sel.no {
      background: var(--rojo);
      color: #fff;
      border-color: var(--rojo)
    }

    /* review */
    .review .row {
      background: var(--panel2);
      border: 1px solid var(--linea)
    }

    .review .row b {
      color: var(--naranja)
    }

    /* admin */
    .tab {
      background: #fff;
      border: 1px solid var(--linea);
      color: var(--tenue)
    }

    .tab.active {
      background: var(--naranja);
      color: #fff;
      border-color: var(--naranja)
    }

    th {
      color: var(--tenue)
    }

    td {
      color: var(--texto)
    }

    tr:hover td {
      background: var(--panel2)
    }

    .kpi {
      background: var(--panel2);
      border: 1px solid var(--linea)
    }

    .kpi .n {
      color: var(--naranja)
    }

    .kpi:nth-child(2) .n {
      color: var(--amarillo)
    }

    .kpi:nth-child(3) .n {
      color: var(--rojo)
    }

    .kpi:nth-child(4) .n {
      color: var(--verde)
    }

    .cfgrow {
      border-bottom: 1px solid var(--linea)
    }

    .chartbox {
      background: #fff;
      border: 1px solid var(--linea);
      border-radius: 18px;
      padding: 20px;
      margin-top: 16px
    }

    /* winners */
    .wcard {
      background: #fff;
      border: 2px solid var(--amarillo)
    }

    .wcard:nth-child(2) {
      border-color: var(--azul)
    }

    .wcard:nth-child(3) {
      border-color: var(--rojo)
    }

    .wcard:nth-child(4) {
      border-color: var(--azul)
    }

    .wcard:nth-child(5) {
      border-color: var(--amarillo)
    }

    .wcard h3 {
      color: var(--texto)
    }

    .wcard .pts {
      color: var(--naranja)
    }

    /* toast / banner / modal claros */
    .toast {
      background: var(--naranja);
      color: #fff
    }

    .goalbanner b {
      color: var(--amarillo);
      text-shadow: 0 0 30px #ffd200, 0 6px 0 #00000040;
      animation: gb 1.4s ease forwards
    }

    .modal {
      background: #14181fcc
    }

    .modal .box {
      background: #fff
    }

    @media(max-width:620px) {
      .wrap {
        padding: 0 14px 28px
      }

      /* banner 680×320 -> cuadrado en móvil */
      .art {
        aspect-ratio: 1 / 1;
        height: auto;
        min-height: 0;
        max-width: 420px;
        margin: 0 auto
      }


      .stadium-bg {
        display: none
      }

      .art-clip {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        border-radius: 18px;
        overflow: hidden;
        z-index: auto;
        box-shadow: 0 4px 16px rgba(0, 0, 0, .12)
      }

      .card {
        padding: 22px 16px
      }

      /* ---- HEADER centrado ---- */
      header.top {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
        padding: 18px 0 10px
      }

      .brand {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        text-align: center
      }

      .brand .crest {
        width: 52px;
        height: 52px;
        font-size: 30px
      }

      .toolbar {
        justify-content: center;
        flex-wrap: wrap
      }

      /* ---- PREMIOS: tarjeta única, imagen arriba ---- */
      .prizes {
        max-width: 100%;
        padding: 0
      }

      .prize {
        flex-direction: column;
        background: var(--panel);
        border: 1px solid var(--linea);
        border-radius: 18px;
        overflow: hidden;
        box-shadow: 0 10px 26px rgba(20, 24, 32, .10)
      }

      /* premios 800×600 / 400×300 -> proporción 4:3, imagen completa */
      .prize-image-wrap {
        order: -1;
        width: 100%;
        aspect-ratio: 4 / 3;
        height: auto;
        max-height: 300px;
        min-height: 0;
        margin: 0;
        border: none;
        border-radius: 0;
        transform: none !important
      }

      .prize-image-wrap img {
        min-height: 0
      }

      .prize-info {
        text-align: center;
        padding: 18px 20px 20px;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none !important
      }

      .prize-info::before {
        inset: 0 0 auto 0;
        width: 100%;
        height: 5px;
        border-radius: 0
      }

      .prize:hover .prize-image-wrap,
      .prize:hover .prize-info {
        transform: none !important;
        box-shadow: none !important
      }

      /* ---- GANADORES: títulos con más aire ---- */
      .card h2 {
        font-size: 21px;
        line-height: 1.2
      }

      .wcard {
        padding: 18px 16px
      }

      .wcard h3 {
        font-size: 19px
      }

      .wcard .winner {
        font-size: 24px;
        line-height: 1.05
      }

      .wcard .pts {
        position: static;
        display: block;
        margin: 0 0 6px;
        font-size: 24px
      }

      /* imagen final 920×1080 (vertical) -> más grande en móvil */
      .thank-img-wrap {
        padding: 12px 10px 0;
        border-radius: 20px 20px 0 0
      }

      .thank-img {
        max-height: 60vh
      }

      .thank-body {
        padding: 10px 14px 14px
      }

      /* ---- ADMIN ---- */
      .admin-overlay {
        padding: 12px
      }

      .admin-overlay .wrap {
        padding-top: 56px
      }

      .admin-overlay .close-btn {
        top: 10px;
        right: 12px;
        width: 42px;
        height: 42px;
        box-shadow: 0 6px 18px rgba(0, 0, 0, .3)
      }

      .adminpane {
        padding: 8px 0
      }

      .tabs {
        justify-content: center
      }

      .tab {
        padding: 9px 12px;
        font-size: 12.5px
      }

      /* botones del admin: apilados, simétricos, ancho completo */
      .btn-row {
        flex-direction: column;
        align-items: stretch
      }

      .btn-row .btn {
        width: 100%;
        margin: 0;
        justify-content: center
      }

      /* charts: que no se salgan de pantalla */
      .chartbox {
        padding: 14px;
        overflow: hidden
      }

      .chartbox canvas {
        max-width: 100% !important
      }
    }

/* ══════ FASE DE GRUPOS ══════ */
.grupos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.grupo-card {
  background: #ffffff;
  border: 2px solid #e7e3d8;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.grupo-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 15px;
  color: #E8590C;
  border-bottom: 1px solid #e7e3d8;
  padding-bottom: 8px;
}
.grupo-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  cursor: pointer;
}
.grupo-check img {
  width: 28px;
  height: auto;
  border-radius: 3px;
}
.grupo-check input[type=checkbox] {
  accent-color: #E8590C;
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.grupo-check {
  transition: opacity .15s;
}
.grupo-count {
  font-size: 13px;
  color: #9fb0d6;
  white-space: nowrap;
}
.grupo-check.sel {
  font-weight: 600;
}
.grupo-check.sel span {
  color: #E8590C;
}