:root {
  --rojo: #ad1519;
  --gualda: #fabd00;
  --white: #ffffff;
  --ink: #241010;
  --line: 1.5px solid var(--ink);
  --heavy: "Archivo", "Arial Black", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
body {
  display: grid;
  place-items: center;
  background: var(--rojo);
  color: var(--ink);
  font-family: var(--mono);
}
#stage {
  position: relative;
  height: 100dvh;
  width: min(100vw, 50dvh);
  container-type: size;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--white);
  border-inline: var(--line);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
#c {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.top {
  width: 100%;
  padding: 4cqw 4cqw 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
h1 {
  margin: 0;
  font-family: var(--heavy);
  font-weight: 900;
  font-stretch: 125%;
  font-size: 10.5cqw;
  line-height: 0.88;
  letter-spacing: -0.035em;
}
.chip {
  padding: 0.8cqw 1.6cqw;
  border: var(--line);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  font: 500 2.1cqw var(--mono);
  letter-spacing: 0.08em;
  cursor: pointer;
}
.chip:hover {
  background: var(--ink);
  color: var(--white);
}
.chip.off {
  background: var(--gualda);
}
#flagSlot {
  width: 92cqw;
  aspect-ratio: 3 / 2;
  margin-top: 4cqw;
  flex: none;
}
.panel {
  flex: 1;
  width: 100%;
  padding: 4cqw 4cqw calc(6cqw + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4cqw;
  animation: rise 0.4s cubic-bezier(0.2, 1.2, 0.4, 1) both;
}
[hidden] {
  display: none !important;
}
@keyframes rise {
  0% {
    opacity: 0;
    transform: translateY(6cqw);
  }
}
p {
  margin: 0;
}
.lead {
  text-align: justify;
  font-family: var(--heavy);
  font-weight: 800;
  font-stretch: 100%;
  font-size: 6cqw;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.hint {
  font-size: 2.9cqw;
  line-height: 1.45;
}
.size {
  display: flex;
  flex-direction: column;
  gap: 1cqw;
}
.size span {
  font-family: var(--heavy);
  font-weight: 900;
  font-stretch: 125%;
  font-size: 4.2cqw;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.best {
  font-size: 2.8cqw;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.best:empty {
  display: none;
}
.btn {
  appearance: none;
  width: 100%;
  padding: 3cqw 3.5cqw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: var(--line);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--heavy);
  font-weight: 900;
  font-stretch: 125%;
  font-size: 4.2cqw;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    background 0.12s,
    color 0.12s;
}
.btn em {
  font-style: normal;
  font-family: var(--mono);
  font-weight: 500;
  transition: transform 0.18s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.btn:hover em {
  transform: translate(1.5cqw);
}
.btn:active {
  transform: translateY(1.5px);
}
.btn.solid {
  background: var(--gualda);
}
.btn.ink,
.btn:hover {
  background: var(--ink);
  color: var(--white);
}
.btn.ink:hover {
  background: var(--gualda);
  color: var(--ink);
}
.btn.big {
  font-size: 8cqw;
  padding: 3cqw 3.5cqw;
  letter-spacing: -0.03em;
}
.row {
  display: flex;
  gap: 2.5cqw;
  width: 100%;
}
input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 10cqw;
  margin: 0;
  cursor: ew-resize;
  touch-action: none;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 100% 1.5px no-repeat,
    repeating-linear-gradient(
        90deg,
        var(--ink) 0 1.5px,
        transparent 1.5px 4.6cqw
      )
      center / 100% 3.4cqw no-repeat;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 10cqw;
  background: transparent;
}
input[type="range"]::-moz-range-track {
  height: 10cqw;
  background: transparent;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 5cqw;
  height: 10cqw;
  border: var(--line);
  border-radius: 0;
  background: var(--gualda);
  transition: background 0.1s;
}
input[type="range"]::-moz-range-thumb {
  width: 5cqw;
  height: 10cqw;
  border: var(--line);
  border-radius: 0;
  background: var(--gualda);
}
input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:active::-webkit-slider-thumb {
  background: var(--ink);
}
#result {
  gap: 2.5cqw;
  justify-content: flex-start;
  padding-top: 3cqw;
}
.scoreWrap small {
  display: block;
  font-size: 2.8cqw;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.score {
  font-family: var(--heavy);
  font-weight: 900;
  font-stretch: 125%;
  font-size: 17cqw;
  line-height: 0.92;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  transform-origin: left center;
}
#result.final .score {
  animation: slam 0.5s cubic-bezier(0.2, 1.6, 0.3, 1);
}
@keyframes slam {
  0% {
    transform: scale(1.35);
  }
  60% {
    transform: scale(0.97);
  }
}
.after {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2.5cqw;
  opacity: 0;
  transform: translateY(5cqw);
  pointer-events: none;
}
#result.final .after {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition:
    opacity 0.3s,
    transform 0.45s cubic-bezier(0.2, 1.2, 0.4, 1);
}
.verdict {
  padding: 2.4cqw 3cqw;
  background: var(--gualda);
  border: var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.8cqw;
}
.verdict b {
  font-family: var(--heavy);
  font-weight: 900;
  font-stretch: 125%;
  font-size: 5cqw;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.verdict span {
  font-size: 2.4cqw;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.stats {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: var(--line);
}
.stats li {
  padding: 2cqw;
  display: flex;
  flex-direction: column;
  gap: 0.6cqw;
}
.stats li + li {
  border-left: var(--line);
}
.stats b {
  font-family: var(--heavy);
  font-weight: 900;
  font-stretch: 112%;
  font-size: 4.4cqw;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stats span {
  font-size: 2.1cqw;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.stats li.record {
  background: var(--gualda);
}
#toast {
  position: absolute;
  left: 4cqw;
  right: 4cqw;
  bottom: 4cqw;
  transform: translateY(250%);
  background: var(--ink);
  color: var(--white);
  font-size: 2.8cqw;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3cqw 3.5cqw;
  transition: transform 0.3s cubic-bezier(0.2, 1.2, 0.4, 1);
  pointer-events: none;
}
#toast.on {
  transform: none;
}
.credit {
  position: absolute;
  left: 4cqw;
  right: 4cqw;
  bottom: calc(1.6cqw + env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  gap: 2cqw;
  font-size: 2.2cqw;
  letter-spacing: 0.02em;
}
.credit a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}
.credit a:hover {
  text-decoration: underline;
}
/* Compartir: en táctil, WhatsApp + Instagram + X; con ratón, X + Facebook + WhatsApp. */
.net {
  justify-content: center;
  gap: 1.6cqw;
  padding-inline: 1cqw;
  font-size: 2.9cqw;
  font-stretch: 100%;
  animation: rise 0.35s cubic-bezier(0.2, 1.2, 0.4, 1) both;
}
.net:nth-child(2) {
  animation-delay: 0.05s;
}
.net:nth-child(n + 3) {
  animation-delay: 0.1s;
}
.net svg {
  width: 4.4cqw;
  height: 4.4cqw;
  flex: none;
  fill: currentColor;
}
@media (pointer: coarse) {
  .net[data-net="facebook"] {
    display: none;
  }
  .net[data-net="whatsapp"] {
    order: -2;
  }
  .net[data-net="instagram"] {
    order: -1;
  }
}
@media not all and (pointer: coarse) {
  .net[data-net="instagram"] {
    display: none;
  }
}
/* Dato colectivo: una línea bajo el veredicto que abre el mapa de calor. */
.crowd {
  appearance: none;
  width: 100%;
  margin: 0;
  padding: 1.6cqw 2.4cqw;
  display: flex;
  justify-content: space-between;
  gap: 2cqw;
  border: var(--line);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  font: 500 2.4cqw var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}
.crowd em {
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}
.crowd:hover {
  background: var(--ink);
  color: var(--white);
}
