/* Calculadora de talla de maillot — estilos aislados bajo .tm-calc */
.tm-calc {
  --tm-borde: #d8d4cf;
  --tm-texto: #1f1d1a;
  --tm-suave: #f4f1ed;
  --tm-acento: #8a1538;
  --tm-error: #a3121f;
  --tm-exito: #1d5c3a;
  max-width: 640px;
  margin: 1.5rem auto;
  padding: 1.25rem;
  border: 1px solid var(--tm-borde);
  border-radius: 14px;
  background: #fff;
  color: var(--tm-texto);
  font-size: 1rem;
  line-height: 1.5;
  box-sizing: border-box;
}
.tm-calc *,
.tm-calc *::before,
.tm-calc *::after { box-sizing: border-box; }

.tm-titulo {
  margin: 0 0 .35rem;
  font-size: 1.35rem;
  line-height: 1.25;
  color: inherit;
}
.tm-intro {
  margin: 0 0 1.1rem;
  color: #4a4641;
  font-size: .95rem;
}

.tm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem 1rem;
}
@media (min-width: 560px) {
  .tm-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.tm-campo { margin: 0; min-width: 0; }
.tm-campo label {
  display: block;
  margin-bottom: .3rem;
  font-weight: 600;
  font-size: .9rem;
}
.tm-input {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--tm-borde);
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
}
.tm-input:focus-within {
  border-color: var(--tm-acento);
  box-shadow: 0 0 0 3px rgba(138, 21, 56, .18);
}
.tm-input input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: .6rem .5rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  -moz-appearance: textfield;
}
.tm-input input::-webkit-outer-spin-button,
.tm-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tm-input input:focus { outline: none; }
.tm-unidad {
  display: flex;
  align-items: center;
  padding: 0 .55rem;
  background: var(--tm-suave);
  border-left: 1px solid var(--tm-borde);
  color: #5c574f;
  font-size: .85rem;
}
.tm-ayuda {
  display: block;
  margin-top: .25rem;
  color: #6b665f;
  font-size: .78rem;
  line-height: 1.35;
}
.tm-error {
  display: block;
  min-height: 0;
  color: var(--tm-error);
  font-size: .78rem;
  font-weight: 600;
}
.tm-error:empty { display: none; }
.tm-error-general {
  margin: .8rem 0 0;
  padding: .55rem .7rem;
  border-left: 3px solid var(--tm-error);
  background: #fdf1f2;
  color: var(--tm-error);
  font-size: .9rem;
}

.tm-boton {
  display: inline-block;
  margin-top: 1rem;
  padding: .7rem 1.4rem;
  border: 0;
  border-radius: 999px;
  background: var(--tm-acento);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.tm-boton:hover { background: #6f102d; }
.tm-boton:disabled,
.tm-boton[disabled] {
  opacity: .55;
  cursor: not-allowed;
}
.tm-boton:disabled:hover { background: var(--tm-acento); }
.tm-boton:focus-visible {
  outline: 3px solid #1f1d1a;
  outline-offset: 2px;
}

.tm-resultado {
  margin-top: 1.1rem;
  padding: 1rem 1.1rem;
  border-radius: 11px;
  border: 1px solid var(--tm-borde);
  background: var(--tm-suave);
}
.tm-resultado.is-ok { border-color: #bfd7c8; background: #f0f7f3; }
.tm-resultado.is-error { border-color: #e6b4ba; background: #fdf1f2; }
.tm-resultado:focus { outline: none; }
.tm-resultado__label {
  margin: 0;
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #5c574f;
}
.tm-resultado__talla {
  margin: .15rem 0 .35rem;
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--tm-exito);
}
.tm-resultado.is-error .tm-resultado__talla { color: var(--tm-error); }
.tm-resultado__tiro { font-size: 1.05rem; font-weight: 600; color: #3f3b35; }
.tm-resultado__mensaje { margin: 0 0 .5rem; font-size: .95rem; }
.tm-resultado__nota {
  margin: 0 0 .6rem;
  font-size: .85rem;
  color: #4a4641;
}

.tm-avisos {
  margin: .6rem 0 0;
  padding: .6rem .8rem .6rem 1.6rem;
  border-left: 3px solid #b07d1a;
  background: #fdf8ea;
  font-size: .88rem;
}
.tm-avisos li + li { margin-top: .3rem; }

.tm-detalle {
  width: 100%;
  margin-top: .7rem;
  border-collapse: collapse;
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
}
.tm-detalle th,
.tm-detalle td {
  padding: .35rem .4rem;
  border-bottom: 1px solid #ddd8d1;
  text-align: left;
}
.tm-detalle thead th {
  font-size: .75rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #5c574f;
}
.tm-detalle tbody th { font-weight: 600; }

.tm-tabla {
  margin-top: 1.1rem;
  border-top: 1px solid var(--tm-borde);
  padding-top: .8rem;
}
.tm-tabla summary {
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  color: var(--tm-acento);
}
.tm-tabla__scroll { overflow-x: auto; margin-top: .6rem; }
.tm-tabla table {
  width: 100%;
  min-width: 340px;
  border-collapse: collapse;
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
}
.tm-tabla th,
.tm-tabla td {
  padding: .4rem .45rem;
  border-bottom: 1px solid #e3ded8;
  text-align: left;
}
.tm-tabla thead th { background: var(--tm-suave); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }

.tm-privacidad {
  margin: .9rem 0 0;
  font-size: .78rem;
  color: #6b665f;
}

.tm-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .tm-calc * { transition: none !important; animation: none !important; }
}
