/* ============================================================
   Sports reel demos — one small, working demo per sport.
   Built by sports.js (nothing shows without JavaScript).

   Three layouts:
   · static (reduced motion, no scroll timelines): the card sits in
     the photo panel, beside the sport's name on wide screens;
   · pinned, wide: the card floats at the right of the full-bleed
     photo, aligned with the big name;
   · pinned, phone / portrait: a "Probar demo" pill under the name
     opens the card as a sheet above it.
   ============================================================ */

.sd,
.sd-toggle {
  display: none;
}

/* ── The card ─────────────────────────────────────────────── */

.sd {
  width: 100%;
  padding: var(--sp-6);
  color: var(--on-dark-muted);
  font-size: var(--fs-15);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  text-align: left;
  text-shadow: none;
  background: #1b1240;
  border: 1px solid rgba(244, 240, 255, 0.14);
  border-radius: var(--radius-lg);
  box-shadow:
    0 2px 4px rgba(10, 6, 30, 0.4),
    0 40px 70px -28px rgba(10, 6, 30, 0.7);
}
.sd :focus-visible {
  outline-color: var(--accent-bright);
}
:where(.sd) button {
  font-family: var(--font-sans);
  color: inherit;
}
.sd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.sd-title {
  color: var(--on-dark);
  font-size: var(--fs-20);
  letter-spacing: -0.03em;
}
.sd-tag {
  flex-shrink: 0;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-pill);
  background: rgba(244, 240, 255, 0.12);
  color: var(--on-dark);
  font-size: var(--fs-13);
  font-weight: 600;
}
.sd-hint {
  margin-top: var(--sp-1);
}
.sd-body {
  margin-top: var(--sp-4);
}
.sd-note {
  margin-top: var(--sp-4);
  font-size: var(--fs-13);
  opacity: 0.7;
}
@media (max-height: 760px) {
  .sd-hint {
    display: none;
  }
  .sd-body {
    margin-top: var(--sp-3);
  }
}

/* ── Shared controls ──────────────────────────────────────── */

/* Motion language for the demos: the portal's tokens (360 ms, "settle" ease). */
.sd {
  --sd-dur: 360ms;
  --sd-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Segmented control — the highlight is a separate element that sports.js
   measures and glides (translateX + width) to the active option. */
.sd-seg {
  position: relative;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(244, 240, 255, 0.18);
  border-radius: var(--radius-pill);
}
.sd-seg-ind,
.sd-chip-ind {
  position: absolute;
  left: 0;
  width: 0;
  border-radius: var(--radius-pill);
  background: var(--on-dark);
  pointer-events: none;
  transition:
    transform var(--sd-dur) var(--sd-ease),
    width var(--sd-dur) var(--sd-ease),
    height var(--sd-dur) var(--sd-ease);
}
.sd-seg-ind {
  top: 4px;
  bottom: 4px;
}
.sd-seg-btn {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-height: 2rem;
  padding: 0.25rem 0.5rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  font-size: var(--fs-13);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: color var(--sd-dur) var(--sd-ease);
}
.sd-seg-btn:hover {
  color: var(--on-dark);
}
.sd-seg-btn.is-on {
  color: var(--night);
}
.sd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 2.5rem;
  padding: 0.5rem 1.25rem;
  border: 1px solid rgba(244, 240, 255, 0.34);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--on-dark);
  font-size: var(--fs-15);
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color var(--dur-base) var(--ease),
    border-color var(--dur-base) var(--ease),
    transform var(--dur-base) var(--ease);
}
.sd-btn:hover {
  border-color: rgba(244, 240, 255, 0.8);
  background: rgba(244, 240, 255, 0.08);
}
.sd-btn:active {
  transform: scale(0.98);
}
.sd-btn--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.sd-btn--primary:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}
.sd-pill {
  padding: 0.125rem 0.5rem;
  border-radius: 6px;
  background: rgba(244, 240, 255, 0.12);
  color: var(--on-dark);
  font-size: var(--fs-13);
  font-weight: 600;
  white-space: nowrap;
  transition:
    background-color var(--sd-dur) var(--sd-ease),
    color var(--sd-dur) var(--sd-ease);
}
.sd-count {
  margin-top: var(--sp-3);
  color: var(--on-dark);
  font-size: var(--fs-13);
  font-weight: 600;
}

/* Rows that can collapse: grid rows animate 1fr ↔ 0fr, so lists slide
   instead of snapping when something is filtered, added or removed. */
.sd-row {
  display: grid;
  grid-template-rows: 1fr;
  transition:
    grid-template-rows var(--sd-dur) var(--sd-ease),
    opacity var(--sd-dur) var(--sd-ease);
}
.sd-clip {
  min-height: 0;
  margin-inline: -4px;
  padding-inline: 4px;
  overflow: hidden;
}
.sd-row.is-filtered,
.sd-row.is-entering,
.sd-row.is-leaving {
  grid-template-rows: 0fr;
  opacity: 0;
}
.sd-row-in {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding-block: var(--sp-2);
  border-top: 1px solid rgba(244, 240, 255, 0.12);
}

/* Rolling numbers — port of the portal's AnimatedNumber (odometer wheels). */
.sd-odo {
  position: relative;
  display: inline-flex;
  vertical-align: bottom;
  font-variant-numeric: tabular-nums;
  --odo-line: 1.2em;
}
.sd-odo-track {
  display: inline-flex;
  height: var(--odo-line);
  line-height: var(--odo-line);
}
.sd-odo-mark {
  white-space: pre;
}
.sd-odo-digit {
  position: relative;
  display: inline-block;
  height: var(--odo-line);
  overflow: hidden;
  /* faces fade through the air around each digit while it rolls */
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 16%,
    #000 84%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 16%,
    #000 84%,
    transparent 100%
  );
}
.sd-odo-digit::before {
  content: "0";
  visibility: hidden;
} /* one tabular digit wide */
.sd-odo-wheel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  will-change: transform;
}
.sd-odo-face {
  display: block;
  height: var(--odo-line);
  text-align: center;
}
.sd-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  /* a value that changed "bumps" so the eye finds it */
  .sd-bump {
    animation: sd-bump 480ms var(--sd-ease);
  }
  .sd-pop {
    animation: sd-pop 320ms var(--sd-ease);
  }
  /* a card whose entrance has not played yet keeps its content hidden */
  .sd-wait .sd-body > * {
    opacity: 0;
  }
  /* fresh content settles in */
  .sd-swap {
    animation: sd-swap 380ms var(--sd-ease) both;
  }
  .sd-enter {
    animation: sd-swap 480ms var(--sd-ease) var(--d, 0ms) both;
  }
  .sd-flash .sd-row-in {
    animation: sd-flash 900ms ease-out;
  }
  @keyframes sd-pop {
    from {
      transform: scale(0.82);
    }
    to {
      transform: none;
    }
  }
  @keyframes sd-bump {
    0% {
      transform: scale(0.8);
      opacity: 0.35;
    }
    55% {
      transform: scale(1.1);
      opacity: 1;
    }
    100% {
      transform: none;
    }
  }
  @keyframes sd-swap {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
  @keyframes sd-flash {
    from {
      background-color: rgba(122, 77, 255, 0.3);
    }
    to {
      background-color: rgba(122, 77, 255, 0);
    }
  }
}

/* ── Pádel: live occupancy grid ───────────────────────────── */

.sd-grid {
  display: grid;
  grid-template-columns: auto repeat(6, minmax(0, 1fr));
  gap: 4px;
  align-items: center;
}
.sd-colhead {
  font-size: var(--fs-13);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.sd-rowhead {
  padding-right: var(--sp-2);
  color: var(--on-dark);
  font-size: var(--fs-13);
  font-weight: 600;
  white-space: nowrap;
}
.sd-cell {
  min-height: 1.875rem;
  padding: 0;
  border: 1px solid rgba(244, 240, 255, 0.22);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition:
    background-color var(--dur-base) var(--ease),
    border-color var(--dur-base) var(--ease);
}
.sd-cell:hover:not(:disabled) {
  border-color: var(--on-dark);
}
.sd-cell.is-taken {
  border-color: transparent;
  background: rgba(122, 77, 255, 0.34);
  cursor: default;
}
.sd-cell.is-mine {
  border-color: var(--on-dark);
  background: var(--accent);
}
.sd-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}
.sd-stat {
  padding: var(--sp-2) var(--sp-3);
  border-radius: 12px;
  background: rgba(244, 240, 255, 0.06);
}
.sd-stat-label {
  display: block;
  font-size: var(--fs-13);
}
.sd-stat-value {
  display: block;
  color: var(--on-dark);
  font-size: var(--fs-20);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.sd-bar {
  display: block;
  height: 4px;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(244, 240, 255, 0.14);
}
.sd-bar i {
  display: block;
  height: 100%;
  background: var(--accent-bright);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease);
}

/* ── Tenis: courts you can block ──────────────────────────── */

.sd-list {
  margin-top: var(--sp-3);
}
.sd-row-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  transition: opacity var(--sd-dur) var(--sd-ease);
}
.sd-row-main strong {
  color: var(--on-dark);
  font-size: var(--fs-15);
}
.sd-row-main small {
  font-size: var(--fs-13);
}
.sd-row.is-off .sd-row-main {
  opacity: 0.5;
}
.sd-row.is-off .sd-pill {
  background: rgba(244, 240, 255, 0.05);
  color: var(--on-dark-muted);
}
.sd-switch {
  position: relative;
  flex-shrink: 0;
  width: 2.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(244, 240, 255, 0.22);
  cursor: pointer;
  transition: background-color var(--sd-dur) var(--sd-ease);
}
.sd-switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 999px;
  background: #fff;
  transition:
    transform var(--sd-dur) var(--sd-ease),
    width 160ms var(--sd-ease);
}
.sd-switch:active i {
  width: 1.5rem; /* the knob stretches while pressed */
}
.sd-switch[aria-checked="true"] {
  background: var(--accent);
}
.sd-switch[aria-checked="true"] i {
  transform: translateX(1rem);
}
.sd-switch[aria-checked="true"]:active i {
  transform: translateX(0.625rem);
}

/* ── Natación: lanes ──────────────────────────────────────── */

.sd-lanes {
  display: grid;
  gap: 4px;
  margin-top: var(--sp-3);
}
.sd-lane {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) 4.25rem;
  align-items: center;
  gap: var(--sp-2);
  padding: 2px 0;
  border: 0;
  background: transparent;
  font-size: var(--fs-13);
  text-align: left;
  cursor: pointer;
}
.sd-lane:disabled {
  cursor: default;
}
.sd-lane-name {
  color: var(--on-dark);
  font-weight: 600;
  white-space: nowrap;
}
.sd-lane-state {
  justify-self: end;
  font-weight: 600;
}
.sd-track {
  container-type: inline-size;
  position: relative;
  display: block;
  height: 1.25rem;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: rgba(244, 240, 255, 0.1);
  transition: background-color var(--sd-dur) var(--sd-ease);
}
/* the lane fills from the left when it is taken or booked */
.sd-track::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(122, 77, 255, 0.32);
  transform: scaleX(0);
  transform-origin: left;
  transition:
    transform 520ms var(--sd-ease),
    background-color var(--sd-dur) var(--sd-ease);
}
.sd-lane:hover:not(:disabled) .sd-track {
  background: rgba(244, 240, 255, 0.2);
}
.sd-lane.is-taken .sd-track::before {
  transform: scaleX(1);
}
.sd-lane.is-mine .sd-track::before {
  transform: scaleX(1);
  background: rgba(122, 77, 255, 0.62);
}
.sd-swimmer {
  position: absolute;
  top: 50%;
  left: 3px;
  width: 0.875rem;
  height: 0.875rem;
  margin-top: -0.4375rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: -0.75rem 0 0.75rem -0.25rem rgba(255, 255, 255, 0.55);
  opacity: 0;
  transition: opacity var(--sd-dur) var(--sd-ease);
}
.sd-lane.is-mine .sd-swimmer {
  opacity: 1;
}
@media (prefers-reduced-motion: no-preference) {
  .sd-lane.is-mine .sd-swimmer {
    animation: sd-swim 2.6s var(--ease) infinite alternate;
  }
  @keyframes sd-swim {
    to {
      transform: translateX(calc(100cqw - 1.25rem));
    }
  }
}

/* ── Fútbol: income chart ─────────────────────────────────── */

.sd-bars {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--sp-2);
  align-items: end;
}
.sd-bar-btn {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: var(--fs-13);
  cursor: pointer;
}
.sd-bar-col {
  display: flex;
  align-items: flex-end;
  height: 6.25rem;
}
.sd-bar-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px 8px 4px 4px;
  background: rgba(244, 240, 255, 0.22);
  transform: scaleY(var(--v));
  transform-origin: bottom;
  transition:
    transform 700ms var(--sd-ease) calc(var(--i, 0) * 55ms),
    background-color var(--sd-dur) var(--sd-ease);
}
.sd-bars:not(.is-in) .sd-bar-fill {
  transform: scaleY(0);
}
.sd-bar-btn:hover .sd-bar-fill {
  background: rgba(244, 240, 255, 0.4);
}
.sd-bar-btn.is-on .sd-bar-fill {
  background: var(--accent);
}
.sd-bar-label {
  transition: color var(--sd-dur) var(--sd-ease);
}
.sd-bar-btn.is-on .sd-bar-label {
  color: var(--on-dark);
  font-weight: 600;
}
.sd-sum {
  margin-top: var(--sp-3);
  padding: var(--sp-3);
  border-radius: 12px;
  background: rgba(244, 240, 255, 0.06);
}
.sd-sum small {
  display: block;
  font-size: var(--fs-13);
}
.sd-sum strong {
  display: block;
  color: var(--on-dark);
  font-size: var(--fs-32);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

/* ── Baloncesto: booking and payment ──────────────────────── */

.sd-booking {
  color: var(--on-dark);
  font-size: var(--fs-15);
  font-weight: 600;
}
.sd-ring {
  position: relative;
  width: 7.5rem;
  height: 7.5rem;
  margin: var(--sp-3) auto;
}
.sd-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.sd-ring circle {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
}
.sd-ring .sd-ring-bg {
  stroke: rgba(244, 240, 255, 0.12);
}
.sd-ring .sd-ring-fg {
  stroke: var(--accent);
  /* the countdown glides between its 4-per-second updates */
  transition:
    stroke 500ms var(--sd-ease),
    stroke-dashoffset 260ms linear;
}
[data-mode="idle"] .sd-ring-fg {
  stroke: rgba(244, 240, 255, 0.28);
}
[data-mode="paid"] .sd-ring-fg {
  stroke: var(--accent-bright);
  transition:
    stroke 500ms var(--sd-ease),
    stroke-dashoffset 800ms var(--sd-ease); /* the ring fills up on payment */
}
[data-mode="released"] .sd-ring-fg {
  stroke: rgba(244, 240, 255, 0.28);
  transition:
    stroke 500ms var(--sd-ease),
    stroke-dashoffset 600ms var(--sd-ease);
}
.sd-ring-c {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.sd-ring-c strong,
.sd-ring-c small {
  transition:
    opacity var(--sd-dur) var(--sd-ease),
    transform var(--sd-dur) var(--sd-ease);
}
.sd-ring-c strong {
  color: var(--on-dark);
  font-size: var(--fs-24);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.sd-ring-c small {
  font-size: var(--fs-13);
}
[data-mode="paid"] .sd-ring-c strong,
[data-mode="paid"] .sd-ring-c small {
  opacity: 0;
  transform: scale(0.7);
}
/* the check draws itself once the payment goes through */
.sd-check {
  position: absolute;
  left: 30%;
  top: 30%;
  width: 40%;
  height: 40%;
  fill: none;
  stroke: var(--accent-bright);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 480ms var(--sd-ease);
}
[data-mode="paid"] .sd-check {
  stroke-dashoffset: 0;
  transition-delay: 240ms;
}
/* …and a soft ripple leaves the ring */
.sd-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--accent-bright);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  [data-mode="paid"] .sd-ring::after {
    animation: sd-ripple 900ms var(--sd-ease) 260ms both;
  }
  @keyframes sd-ripple {
    from {
      opacity: 0.6;
      transform: scale(1);
    }
    to {
      opacity: 0;
      transform: scale(1.45);
    }
  }
}
.sd-status {
  min-height: 3.9em;
  text-align: center;
}
.sd-actions {
  display: flex;
  justify-content: center;
  margin-top: var(--sp-3);
}
.sd-speed {
  margin-top: var(--sp-3);
  font-size: var(--fs-13);
  text-align: center;
  opacity: 0.7;
}

/* ── Más deportes: add a facility ─────────────────────────── */

.sd-chips {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sd-chip-ind {
  top: 0;
  height: 0;
}
.sd-chip {
  position: relative;
  z-index: 1;
  min-height: 1.875rem;
  padding: 0.125rem 0.75rem;
  border: 1px solid rgba(244, 240, 255, 0.22);
  border-radius: var(--radius-pill);
  background: transparent;
  font-size: var(--fs-13);
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color var(--sd-dur) var(--sd-ease),
    color var(--sd-dur) var(--sd-ease);
}
.sd-chip:hover {
  border-color: var(--on-dark);
}
.sd-chip.is-on {
  border-color: transparent;
  color: var(--night);
}
.sd-config {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
}
.sd-config .sd-seg {
  flex: 1 1 10rem;
}
.sd-step {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: auto;
}
.sd-step button {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid rgba(244, 240, 255, 0.3);
  border-radius: 50%;
  background: transparent;
  font-size: var(--fs-17);
  line-height: 1;
  cursor: pointer;
  transition:
    border-color var(--sd-dur) var(--sd-ease),
    opacity var(--sd-dur) var(--sd-ease),
    transform 160ms var(--sd-ease);
}
.sd-step button:hover {
  border-color: var(--on-dark);
}
.sd-step button:active {
  transform: scale(0.88);
}
.sd-step button[aria-disabled="true"] {
  opacity: 0.35;
  cursor: default;
}
.sd-step-v {
  display: inline-flex;
  justify-content: center;
  min-width: 3.75rem;
  color: var(--on-dark);
  font-size: var(--fs-13);
  font-weight: 600;
}
.sd-add {
  width: 100%;
  margin-top: var(--sp-3);
}
.sd-add-check {
  width: 0;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
  transition:
    width var(--sd-dur) var(--sd-ease),
    opacity var(--sd-dur) var(--sd-ease),
    stroke-dashoffset 420ms var(--sd-ease) 120ms;
}
.sd-add.is-done .sd-add-check {
  width: 1rem;
  opacity: 1;
  stroke-dashoffset: 0;
}
.sd-facilities {
  margin-top: var(--sp-3);
}
.sd-empty {
  padding-block: var(--sp-2);
  border-top: 1px solid rgba(244, 240, 255, 0.12);
  font-size: var(--fs-13);
}

/* ── Static layout (reduced motion / no scroll timelines) ─── */

.sd-on .reel-slide {
  align-items: stretch;
}
.sd-on .reel-cap {
  width: 100%;
  min-height: clamp(16rem, 30vw, 22rem);
  justify-content: flex-end;
}
.sd-on .sd {
  display: block;
  max-width: 28rem;
  margin-top: var(--sp-4);
}
@media (min-width: 800px) {
  .sd-on .reel-cap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
    grid-template-rows: 1fr auto auto;
    column-gap: var(--sp-8);
    align-items: end;
  }
  .sd-on .reel-count {
    grid-column: 1;
    grid-row: 2;
  }
  .sd-on .reel-name {
    grid-column: 1;
    grid-row: 3;
  }
  .sd-on .sd {
    grid-column: 2;
    grid-row: 1 / span 3;
    margin-top: 0;
  }
}

/* ── Pinned, scroll-driven reel ───────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reel-track {
      position: relative;
    }
    /* invisible bands that tell sports.js which sport is on screen */
    .reel-zone {
      position: absolute;
      left: 0;
      width: 1px;
      visibility: hidden;
      pointer-events: none;
    }

    .sd-on .reel-cap {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      min-height: 0;
      width: auto;
    }
    .sd-on .reel-name {
      font-size: clamp(3rem, 7.5vw, 8rem);
    }
    /* wide screens: the card floats at the right, aligned with the name */
    .sd-on .sd {
      position: absolute;
      right: calc(clamp(1.25rem, 3vw, 3rem) + 6.75rem);
      bottom: clamp(1.25rem, 3vw, 2.5rem);
      width: clamp(19rem, 26vw, 24rem);
      max-width: none;
      margin: 0;
    }

    /* narrow landscape screens: a slightly smaller name leaves room for the card */
    @media (min-width: 900px) and (max-width: 1100px) and (min-aspect-ratio: 1/1) {
      .sd-on .reel-name {
        font-size: clamp(2.75rem, 6vw, 4.5rem);
      }
    }

    /* phones and portrait screens: "Probar demo" opens the card as a sheet */
    @media (max-width: 899px), (max-aspect-ratio: 1/1) {
      .sd-on .reel-name {
        font-size: clamp(3rem, 15vw, 6rem);
      }
      .sd-on .sd-toggle {
        display: inline-flex;
        align-self: flex-start;
        margin-top: var(--sp-3);
      }
      /* The caption is bottom-anchored and never taller than the space under
         the header; the sheet is the flexible part of it, so it takes exactly
         what is left (and scrolls inside only on very small screens). */
      .sd-on .reel-cap {
        --cap-bot: clamp(3rem, 8vh, 5.5rem);
        bottom: var(--cap-bot);
        padding-top: 0;
        max-height: calc(100dvh - var(--header-h) - var(--cap-bot) - 1rem);
      }
      .sd-on .sd {
        display: none;
        position: relative;
        right: auto;
        bottom: auto;
        order: -1;
        flex: 0 1 auto;
        min-height: 0;
        width: 100%;
        max-width: 26rem;
        margin: 0 0 var(--sp-4);
        overflow: auto;
        overscroll-behavior: contain;
      }
      .sd-on .reel-slide.sd-open .sd {
        display: block;
        animation: sd-rise var(--dur-base) var(--ease) both;
      }
      /* the long last name ("Y muchos más") must stay on one line */
      .sd-on .reel-slide:last-child .reel-name {
        font-size: clamp(2.25rem, 11.5vw, 4.5rem);
      }
      @keyframes sd-rise {
        from {
          opacity: 0;
          transform: translateY(14px);
        }
        to {
          opacity: 1;
          transform: none;
        }
      }

      /* short phones: while the sheet is open the big name shrinks so the
         whole card stays on screen */
      @media (max-height: 780px) {
        .sd-on .reel-name {
          transition: font-size var(--dur-base) var(--ease);
        }
        .sd-on .reel-slide.sd-open .reel-name,
        .sd-on .reel-slide.sd-open:last-child .reel-name {
          font-size: clamp(1.75rem, 8vw, 2.25rem);
        }
      }

      /* short phones: keep the whole card on screen */
      @media (max-height: 700px) {
        .sd-on .reel-name {
          font-size: clamp(2.5rem, 12vw, 4rem);
        }
        .sd-on .sd {
          padding: var(--sp-4);
        }
        .sd-on .sd-note {
          display: none;
        }
        .sd-on .sd-toggle {
          margin-top: var(--sp-2);
        }
        .sd-on .sd-row-in {
          padding-block: 0.375rem;
        }
        .sd-on .sd-ring {
          width: 6rem;
          height: 6rem;
          margin-block: var(--sp-2);
        }
        .sd-on .sd-bar-col {
          height: 4.75rem;
        }
        .sd-on .sd-status {
          min-height: 0;
        }
      }
    }
  }
}
