:root {
  --mantua-red: #c8102e;
  --text: #151515;
  --muted: #666666;
  --line: #e7e7e7;
  --bg: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

/* PÁGINA PRINCIPAL DE ENLACES */
.panel-page {
  min-height: 100vh;
  padding: 28px 18px 42px;
  background: #f4f4f4;
}

.panel-shell {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 28px;
  border: 1px solid #e7e7e7;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.06);
}

.panel-header {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--mantua-red);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.panel-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.08;
}

.panel-header p:last-child {
  max-width: 780px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.resource-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  background: #ffffff;
}

.resource-card--wide {
  grid-column: 1 / -1;
}

.resource-card h2 {
  margin: 14px 0 12px;
  font-size: 1rem;
}

.preview-card {
  overflow: hidden;
  border: 1px solid #ededed;
  border-radius: 12px;
  background: #fff;
}

.preview-card iframe {
  display: block;
  width: 100%;
  border: 0;
  background: #fff;
}

.preview-card--short iframe {
  height: 205px;
}

.preview-card--cities iframe {
  height: 255px;
}

.output-label {
  display: block;
  margin-bottom: 7px;
  color: #444444;
  font-size: 0.76rem;
  font-weight: 700;
}

.output-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.output-row input {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid #d8d8d8;
  border-radius: 9px;
  background: #ffffff;
  color: #222222;
  outline: none;
}

.output-row button {
  min-width: 112px;
  border: 0;
  border-radius: 9px;
  padding: 0 14px;
  background: #171717;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.output-row button:hover {
  background: var(--mantua-red);
}

.copy-status {
  min-height: 1.3em;
  margin: 14px 0 0;
  color: var(--mantua-red);
  font-size: 0.82rem;
  font-weight: 700;
}

/* CONTADORES INDEPENDIENTES */
.embed-page {
  overflow: hidden;
  background: #ffffff;
}

.single-counter {
  width: 100%;
  min-height: 180px;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #ffffff;
}

.single-counter--cities {
  min-height: 230px;
}

.counter-value-wrap {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  line-height: 1;
  white-space: nowrap;
}

.counter-prefix,
.counter-value {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
}

.counter-prefix {
  color: var(--mantua-red);
  font-size: clamp(1.9rem, 8vw, 3rem);
}

.counter-value {
  color: var(--text);
  font-size: clamp(3.4rem, 16vw, 5.2rem);
}

.counter-label {
  margin: 10px 0 0;
  font-size: clamp(0.82rem, 3.7vw, 1.05rem);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.counter-label::after {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  margin: 12px auto 0;
  border-radius: 999px;
  background: var(--mantua-red);
}

.counter-cities {
  max-width: 520px;
  margin: 12px 0 0;
  color: #3c3c3c;
  font-size: clamp(0.82rem, 3.2vw, 1rem);
  line-height: 1.4;
  font-weight: 700;
}

.counter-note {
  max-width: 560px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: clamp(0.74rem, 2.8vw, 0.9rem);
  line-height: 1.42;
}

.single-counter.is-ready {
  animation: counter-reveal 440ms ease-out both;
}

@keyframes counter-reveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .panel-page {
    padding: 14px 10px 28px;
  }

  .panel-shell {
    padding: 18px;
    border-radius: 14px;
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }

  .resource-card--wide {
    grid-column: auto;
  }

  .output-row {
    grid-template-columns: 1fr;
  }

  .output-row button {
    min-height: 40px;
  }
}

@media (max-width: 420px) {
  .single-counter {
    min-height: 165px;
    padding: 16px 10px;
  }

  .single-counter--cities {
    min-height: 220px;
  }

  .counter-value {
    font-size: clamp(3.1rem, 19vw, 4.4rem);
  }

  .counter-prefix {
    font-size: clamp(1.7rem, 10vw, 2.4rem);
  }

  .counter-cities {
    max-width: 310px;
  }

  .counter-note {
    max-width: 325px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
