
:root {
  --cn-fondo: #0a0a0a;
  --cn-texto: #f4f4f4;
  --cn-suave: rgba(255, 255, 255, .56);
  --cn-tenue: rgba(255, 255, 255, .3);
  
  --cn-tarjeta-a: #171717;
  --cn-tarjeta-b: #0f0f0f;
  --cn-filo: rgba(255, 255, 255, .09);
  --cn-borde: rgba(255, 255, 255, .075);
  --cn-linea: rgba(255, 255, 255, .07);
  --cn-sombra: 0 1px 2px rgba(0, 0, 0, .6), 0 14px 36px rgba(0, 0, 0, .5), 0 50px 110px rgba(0, 0, 0, .6);
  --cn-icono: rgba(255, 255, 255, .055);
  
  --cn-campo-a: rgba(0, 0, 0, .34);
  --cn-campo-b: rgba(255, 255, 255, .025);
  --cn-campo-borde: rgba(255, 255, 255, .075);
  --cn-campo-encima: rgba(255, 255, 255, .15);
  --cn-campo-foco: rgba(255, 255, 255, .32);
  --cn-hondo: inset 0 1px 2px rgba(0, 0, 0, .45), inset 0 -1px 0 rgba(255, 255, 255, .03);
  
  --cn-hoja: #171717;
  --cn-hoja-filo: rgba(255, 255, 255, .13);
  --cn-hoja-sombra: rgba(0, 0, 0, .85);
  --cn-marca: rgba(255, 255, 255, .08);
  --cn-coincide: rgba(255, 255, 255, .18);
  --cn-insignia: rgba(255, 255, 255, .08);
  
  --cn-pais: rgba(255, 255, 255, .15);          
  --cn-pais-vista: rgba(255, 255, 255, .42);    
  --cn-pais-elegida: #f4f4f4;                   
  --cn-corte: rgba(14, 14, 14, .9);             
  --cn-fila: rgba(255, 255, 255, .09);          
  --cn-guia: rgba(255, 255, 255, .28);
  --cn-ok: #3ccf6e;
  --cn-curva: cubic-bezier(.22, 1, .36, 1);
  --cn-rebote: cubic-bezier(.34, 1.56, .64, 1);
  --cn-fila-alto: 42px;        
}
:root[data-tema="claro"] {
  --cn-fondo: #eeeeee;
  --cn-texto: #0a0a0a;
  --cn-suave: rgba(0, 0, 0, .55);
  --cn-tenue: rgba(0, 0, 0, .32);
  --cn-tarjeta-a: #ffffff;
  --cn-tarjeta-b: #f8f8f8;
  --cn-filo: rgba(255, 255, 255, 1);
  --cn-borde: rgba(0, 0, 0, .06);
  --cn-linea: rgba(0, 0, 0, .07);
  --cn-sombra: 0 1px 2px rgba(0, 0, 0, .06), 0 14px 36px rgba(0, 0, 0, .07), 0 50px 110px rgba(0, 0, 0, .1);
  --cn-icono: rgba(0, 0, 0, .04);
  --cn-campo-a: rgba(0, 0, 0, .045);
  --cn-campo-b: rgba(0, 0, 0, .015);
  --cn-campo-borde: rgba(0, 0, 0, .08);
  --cn-campo-encima: rgba(0, 0, 0, .16);
  --cn-campo-foco: rgba(0, 0, 0, .36);
  --cn-hondo: inset 0 1px 2px rgba(0, 0, 0, .06), inset 0 -1px 0 rgba(255, 255, 255, .8);
  --cn-hoja: #ffffff;
  --cn-hoja-filo: rgba(0, 0, 0, .12);
  --cn-hoja-sombra: rgba(0, 0, 0, .16);
  --cn-marca: rgba(0, 0, 0, .055);
  --cn-coincide: rgba(0, 0, 0, .1);
  --cn-insignia: rgba(0, 0, 0, .06);
  --cn-pais: rgba(0, 0, 0, .13);
  --cn-pais-vista: rgba(0, 0, 0, .38);
  --cn-pais-elegida: #0a0a0a;
  --cn-corte: rgba(252, 252, 252, .95);
  --cn-fila: rgba(0, 0, 0, .06);
  --cn-guia: rgba(0, 0, 0, .3);
  --cn-ok: #18a34a;
}

* { box-sizing: border-box; }


button, input { font: inherit; color: inherit; }
svg { display: block; }


.cn-campo { position: relative; }
.cn-etiqueta { display: block; margin: 0 4px 9px; font-size: .93rem; font-weight: 500; letter-spacing: -.005em; }
.cn-caja {
  position: relative; display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 16px; border-radius: 16px;
  background: linear-gradient(var(--cn-campo-a), var(--cn-campo-b));
  box-shadow: var(--cn-hondo), inset 0 0 0 1px var(--cn-campo-borde); transition: box-shadow .3s var(--cn-curva);
}
.cn-caja:hover { box-shadow: var(--cn-hondo), inset 0 0 0 1px var(--cn-campo-encima); }
.cn-caja:focus-within, .cn-elige:focus-visible, .cn-campo.is-abierto .cn-caja { outline: none; box-shadow: var(--cn-hondo), inset 0 0 0 1px var(--cn-campo-foco); }
.cn-caja input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: none; font-size: 1.05rem; letter-spacing: -.005em; }
.cn-caja input::placeholder { color: var(--cn-tenue); }
.cn-lupa { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--cn-suave); stroke-width: 1.7; stroke-linecap: round; }
kbd {
  display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 7px;
  border: 1px solid var(--cn-campo-borde); color: var(--cn-suave); font: 500 .76rem var(--fuente-texto); transition: opacity .2s;
}
.cn-busca .cn-caja:focus-within kbd { opacity: 0; }


.cn-elige { cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.cn-valor { flex: 1; min-width: 0; display: grid; perspective: 300px; font-size: 1.05rem; font-weight: 500; letter-spacing: -.01em; }
.cn-valor > span { grid-area: 1 / 1; display: flex; align-items: center; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transform-origin: 50% 50% -.45em; }
.cn-valor > .is-vacio { color: var(--cn-tenue); font-weight: 400; }
.cn-valor > .is-entra { animation: cn-entra-valor .6s .07s var(--cn-curva) both; }
.cn-valor > .is-sale { animation: cn-sale-valor .26s cubic-bezier(.5, 0, .75, 0) forwards; }
@keyframes cn-entra-valor { from { transform: translateY(48%) rotateX(-75deg); opacity: 0; } }
@keyframes cn-sale-valor { to { transform: translateY(-48%) rotateX(75deg); opacity: 0; } }
.cn-flecha { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--cn-suave); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .45s var(--cn-curva); }
.cn-campo.is-abierto .cn-flecha { transform: rotate(180deg); }

.cn-listo { flex: none; width: 22px; height: 22px; margin-right: -4px; fill: none; stroke: var(--cn-ok); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: 0; scale: .6; transition: opacity .2s, scale .3s var(--cn-curva); }
.cn-listo circle, .cn-listo path { stroke-dasharray: 1 1.2; stroke-dashoffset: 1.1; transition: stroke-dashoffset .2s; }
.cn-campo.is-completo .cn-listo { opacity: 1; scale: 1; transition: opacity .2s .15s, scale .5s var(--cn-rebote) .15s; }
.cn-campo.is-completo .cn-listo circle { stroke-dashoffset: 0; transition: stroke-dashoffset .55s var(--cn-curva) .15s; }
.cn-campo.is-completo .cn-listo path { stroke-dashoffset: 0; transition: stroke-dashoffset .4s var(--cn-curva) .4s; }
.cn-campo.is-apagado .cn-elige { cursor: not-allowed; opacity: .55; }

.cn-num {
  flex: none; display: inline-grid; place-items: center; min-width: 34px; height: 24px; margin-right: 10px; padding: 0 6px; border-radius: 7px;
  background: var(--cn-insignia); box-shadow: inset 0 0 0 1px var(--cn-campo-borde);
  font-size: .74rem; font-weight: 600; letter-spacing: .02em;
}

.cn-caja::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  box-shadow: inset 0 0 0 1.5px var(--cn-texto), 0 0 0 4px var(--cn-marca);
}
.cn-campo.is-llega .cn-caja::after { animation: cn-llega 1s var(--cn-tarde, 0s) var(--cn-curva); }
@keyframes cn-llega { 0% { opacity: 0; scale: .985; } 18% { opacity: 1; scale: 1.012; } 100% { opacity: 0; scale: 1; } }



.cn-hoja {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30; padding: 6px; border-radius: 18px;
  background: var(--cn-hoja); box-shadow: 0 0 0 1px var(--cn-hoja-filo), 0 30px 50px -18px var(--cn-hoja-sombra), 0 10px 20px -10px var(--cn-hoja-sombra);
  transform-origin: 50% 0; opacity: 0; visibility: hidden; translate: 0 -8px; scale: .97; pointer-events: none;
  transition: opacity .18s, translate .3s var(--cn-curva), scale .3s var(--cn-curva), visibility 0s .3s;
}
.cn-hoja.is-abierta { pointer-events: auto; opacity: 1; visibility: visible; translate: 0 0; scale: 1; transition: opacity .2s, translate .5s var(--cn-curva), scale .5s var(--cn-curva); }
.cn-hoja-titulo { margin: 0; padding: 7px 12px 7px; font-size: .78rem; font-weight: 500; color: var(--cn-tenue); }
.cn-rollo { position: relative; max-height: calc(var(--cn-fila-alto) * 6); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--cn-insignia) transparent; }
.cn-pildora { position: absolute; left: 0; right: 0; top: 0; height: var(--cn-fila-alto); border-radius: 12px; background: var(--cn-marca); opacity: 0; pointer-events: none; will-change: transform; }
.cn-opciones { position: relative; }
.cn-op {
  position: relative; display: flex; align-items: center; gap: 12px; height: var(--cn-fila-alto); padding: 0 12px; border-radius: 12px;
  cursor: pointer; font-size: 1rem; letter-spacing: -.005em; color: var(--cn-texto);
}
.cn-op .cn-num { margin-right: 0; }
.cn-texto { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cn-texto mark { color: var(--cn-texto); background: var(--cn-coincide); border-radius: 4px; padding: 0 1px; margin: 0 -1px; }
.cn-de { flex: none; display: inline-flex; align-items: center; gap: 7px; font-size: .86rem; color: var(--cn-suave); }
.cn-de b { font-size: .72rem; font-weight: 600; color: var(--cn-tenue); letter-spacing: .02em; }
.cn-pin { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--cn-tenue); stroke-width: 1.6; stroke-linejoin: round; }
.cn-op.is-activa .cn-pin { stroke: var(--cn-texto); }
.cn-visto { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.cn-op.is-elegida .cn-visto { opacity: 1; }
.cn-op.is-elegida .cn-texto { font-weight: 600; }
.cn-vacio { margin: 0; padding: 4px 12px 12px; font-size: .92rem; color: var(--cn-suave); }
.cn-vacio:empty { display: none; }
.cn-aviso { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }



.cn-chile { position: relative; min-height: 0; border-left: 1px solid var(--cn-linea); }
.cn-mapa { position: absolute; inset: 22px 18px 22px 12px; }
.cn-mapa > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; }
.cn-pais { fill: var(--cn-pais); }
.cn-pais.is-vista { fill: var(--cn-pais-vista); opacity: 0; }
.cn-pais.is-elegida { fill: var(--cn-pais-elegida); }
.cn-cortes { fill: none; stroke: var(--cn-corte); stroke-width: 1; }
.cn-fila { fill: var(--cn-fila); opacity: .45; }
.cn-fila.is-vista { opacity: 0; }
.cn-guia { fill: none; stroke: var(--cn-guia); stroke-width: 1; transition: opacity .3s; }
.cn-grados line { stroke: var(--cn-tenue); stroke-width: 1; opacity: .55; }
.cn-grados line.is-mayor { opacity: 1; }
.cn-grados text { fill: var(--cn-tenue); font: 500 10px var(--fuente-texto); font-variant-numeric: tabular-nums; }
.is-sin-region .cn-pais.is-elegida, .is-sin-region .cn-fila.is-elegida { opacity: 0; }
.cn-rotulo { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform; }

.cn-rotulo-capa { position: absolute; left: 0; top: 0; translate: 0 -50%; display: grid; justify-items: start; gap: 5px; width: max-content; max-width: var(--cn-rotulo-ancho, 130px); }
.cn-rotulo-capa .cn-num { margin: 0 0 1px; }
.cn-rotulo-capa strong { font-size: 1.14rem; font-weight: 600; letter-spacing: -.03em; line-height: 1.08; }
.cn-rotulo-capa small { display: grid; font-size: .72rem; line-height: 1.35; color: var(--cn-tenue); font-variant-numeric: tabular-nums; }
.cn-rotulo-capa em { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-style: normal; font-size: .8rem; font-weight: 500; letter-spacing: -.01em; line-height: 1.2; }
.cn-rotulo-capa em .cn-pin { width: 15px; height: 15px; stroke: var(--cn-texto); }
.cn-rotulo-capa.is-vista strong { color: var(--cn-suave); }
.cn-rotulo-capa.is-vista .cn-num { background: none; }
.cn-mapa-pie { position: absolute; bottom: 0; margin: 0; display: grid; gap: 3px; font-size: .72rem; line-height: 1.2; color: var(--cn-tenue); pointer-events: none; }
.cn-mapa-pie b { font-size: .8rem; font-weight: 600; letter-spacing: -.01em; color: var(--cn-suave); }

.is-acostado .cn-mapa > svg { touch-action: pan-y; }
.is-acostado .cn-mapa-pie { display: none; }
.is-acostado .cn-rotulo-capa { translate: -50% 0; display: flex; align-items: center; gap: 8px; }
.is-acostado .cn-rotulo-capa:has(em) small { display: none; }
.is-acostado .cn-rotulo-capa em { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.is-acostado .cn-rotulo-capa em .cn-pin { display: inline-block; vertical-align: -3px; margin-right: 4px; }
.is-acostado .cn-rotulo-capa .cn-num { margin: 0; }
.is-acostado .cn-rotulo-capa strong { flex: none; font-size: 1rem; white-space: nowrap; }
.is-acostado .cn-rotulo-capa small span:first-child { display: none; }
.is-acostado .cn-rotulo-capa em { display: block; margin: 0; }


.cn-escena { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px 104px; }
.cn-tarjeta {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 330px; width: min(1090px, 100%); border-radius: 30px;
  background: linear-gradient(var(--cn-tarjeta-a), var(--cn-tarjeta-b));
  box-shadow: inset 0 1px 0 var(--cn-filo), inset 0 0 0 1px var(--cn-borde), var(--cn-sombra);
}
.cn-form { min-width: 0; padding: 42px 46px 34px; }
.cn-cabeza { display: flex; align-items: center; gap: 18px; margin-bottom: 30px; }
.cn-icono {
  display: grid; place-items: center; flex: none; width: 54px; height: 54px; border-radius: 16px;
  background: var(--cn-icono); box-shadow: inset 0 0 0 1px var(--cn-borde), inset 0 1px 0 var(--cn-filo);
}
.cn-icono svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cn-cabeza h1 { margin: 0; font-size: 1.95rem; font-weight: 600; letter-spacing: -.04em; line-height: 1.05; }
.cn-cabeza p { margin: 6px 0 0; font-size: .98rem; color: var(--cn-suave); }
.cn-comuna { display: grid; gap: 20px; margin-bottom: 20px; }
.cn-par { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cn-resumen { display: flex; align-items: center; gap: 10px; margin: 24px 4px 0; font-size: .92rem; color: var(--cn-suave); }
.cn-resumen svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.cn-resumen b { font-weight: 600; color: var(--cn-texto); }
.cn-resumen span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cn-resumen.is-cambia span { animation: cn-resumen .5s var(--cn-curva); }
@keyframes cn-resumen { from { opacity: 0; translate: 0 6px; } }

@media (prefers-reduced-motion: reduce) {
  .cn-valor > .is-entra, .cn-valor > .is-sale, .cn-resumen.is-cambia span { animation: cn-funde .15s both; }
  .cn-valor > .is-sale { animation-direction: reverse; }
  .cn-campo.is-llega .cn-caja::after { animation: none; }
  .cn-hoja, .cn-hoja.is-abierta, .cn-guia, .cn-flecha, .cn-listo, .cn-listo * { transition-duration: .01s !important; transition-delay: 0s !important; }
}
@keyframes cn-funde { from { opacity: 0; } }


@media (max-width: 760px) {
  .cn-escena { place-items: start center; padding-top: 16px; }
  .cn-tarjeta { grid-template-columns: 1fr; border-radius: 24px; }
  .cn-form { padding: 22px 18px 24px; }
  .cn-cabeza { gap: 14px; margin-bottom: 22px; }
  .cn-icono { width: 46px; height: 46px; border-radius: 14px; }
  .cn-cabeza h1 { font-size: 1.45rem; }
  .cn-cabeza p { font-size: .9rem; }
  .cn-par { grid-template-columns: 1fr; gap: 20px; }
  .cn-busca kbd { display: none; }
  .cn-caja input { font-size: 1rem; }
  .cn-chile { order: -1; height: 142px; border-left: 0; border-bottom: 1px solid var(--cn-linea); }
  .cn-mapa { inset: 16px 18px 10px; }
}
