/* sonidohifi · El Camino Hi-Fi — identidad «Plata mineral» (marfil, carbón, mineral, plata, perla). */
.shc {
  --shc-ivory: #f2f0eb;
  --shc-ink: #292e2b;
  --shc-muted: #59635c;
  --shc-mineral: #77837b;
  --shc-silver: #bfc5bf;
  --shc-pearl: #e4e6de;
  --shc-focus: #46544b;
  --shc-card: #ffffff;
  --shc-line: rgba(70, 84, 75, .16);
  --shc-rail: 1.6px;
  --shc-stroke: 4px;
  container-type: inline-size;
  container-name: shc;
  box-sizing: border-box;
  max-width: 960px;
  margin: 0 auto;
  padding: 8px 0 24px;
  color: var(--shc-ink);
  font-family: Chivo, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
}
.shc *, .shc *::before, .shc *::after { box-sizing: border-box; }
.shc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Encabezado */
.shc-head { margin-bottom: 28px; }
.shc-eyebrow { margin: 0 0 4px; font-size: .8rem; font-weight: 500; letter-spacing: .08em; color: var(--shc-mineral); }
.shc-title { margin: 0 0 8px; font-size: clamp(1.7rem, 4.5vw, 2.4rem); font-weight: 500; line-height: 1.15; color: var(--shc-ink); }
.shc-lead { margin: 0 0 18px; max-width: 56ch; color: var(--shc-muted); }
.shc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; }
.shc-stat { margin: 0; padding: 14px 16px; border-radius: 16px; background: var(--shc-pearl); }
.shc-stat dt { margin: 0 0 2px; font-size: .78rem; color: var(--shc-muted); }
.shc-stat dd { margin: 0; font-size: 1.05rem; font-weight: 500; }
.shc-invite { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 16px 18px; border-radius: 16px; background: var(--shc-pearl); }
.shc-invite p { margin: 0; flex: 1 1 220px; }

/* Botón */
.shc-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .65em 1.2em; border: 0; border-radius: 12px;
  background: var(--shc-ink); color: var(--shc-ivory); font: inherit; font-weight: 500; text-decoration: none; cursor: pointer;
  transition: transform .2s ease, background-color .2s ease;
}
.shc-btn:hover { transform: translateY(-1px); background: #1f2421; color: var(--shc-ivory); }
.shc-btn:disabled, .shc-btn[aria-disabled="true"] { background: var(--shc-silver); color: #4a534d; cursor: not-allowed; transform: none; }
.shc a:focus-visible, .shc button:focus-visible { outline: 3px solid var(--shc-focus); outline-offset: 3px; }

/* Aviso en vivo */
.shc-live { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; background: var(--shc-pearl); }
.shc-live:empty { display: none; }
.shc-live.is-error { background: #efe3df; color: #5b2a1e; }

/* Camino: un solo trazo continuo (curvas suaves, sin codos) que pasa por detrás de las tarjetas.
   Riel fino mineral de fondo + tramo recorrido en carbón, como el camino del banner (sh-path-track / sh-path-runner). */
.shc-trail { position: relative; }
.shc-trail__svg { position: absolute; z-index: 0; top: 0; left: 0; width: 100%; height: 100%; display: block; overflow: visible; pointer-events: none; fill: none; }
.shc-trail__svg--n { display: none; }
.shc-rail { fill: none; stroke: var(--shc-mineral); stroke-opacity: .24; stroke-width: var(--shc-rail); stroke-linecap: round; stroke-linejoin: round; }
.shc-done { fill: none; stroke: var(--shc-ink); stroke-width: var(--shc-stroke); stroke-linecap: round; stroke-linejoin: round; animation: shc-in .6s ease-out both; }
.shc-glint { fill: none; stroke: var(--shc-pearl); stroke-opacity: .5; stroke-width: calc(var(--shc-stroke) * .42); stroke-linecap: round; pointer-events: none; }
@keyframes shc-in { from { opacity: 0; } to { opacity: 1; } }
.shc-path { position: relative; margin: 0; padding: 0; list-style: none; }
.shc-row { position: relative; display: flex; align-items: center; min-height: 230px; padding: 28px 0; margin: 0; }
.shc-row.is-start { min-height: 150px; }

.shc-node {
  position: absolute; z-index: 2; top: 50%; left: var(--x-w);
  width: 36px; height: 36px; transform: translate(-50%, -50%);
  display: grid; place-items: center; border-radius: 50%;
  background: var(--shc-ivory); border: 2px solid var(--shc-silver); color: var(--shc-mineral);
}
.shc-row.is-reached .shc-node { background: var(--shc-ink); border-color: var(--shc-ink); color: var(--shc-ivory); }
.shc-icon { display: block; }
.shc-marker {
  position: absolute; z-index: 3; left: var(--mx-w); top: var(--my-w);
  width: 20px; height: 20px; transform: translate(-50%, -50%); border-radius: 50%;
  background: var(--shc-ink); border: 4px solid var(--shc-ivory); box-shadow: 0 0 0 2px var(--shc-ink);
  animation: shc-pulse 2.4s ease-out infinite; pointer-events: none;
}
.shc-trail.is-laid .shc-marker { left: var(--mx-px); top: var(--my-px); }
@keyframes shc-pulse {
  0% { box-shadow: 0 0 0 2px var(--shc-ink), 0 0 0 2px rgba(41, 46, 43, .35); }
  70% { box-shadow: 0 0 0 2px var(--shc-ink), 0 0 0 14px rgba(41, 46, 43, 0); }
  100% { box-shadow: 0 0 0 2px var(--shc-ink), 0 0 0 14px rgba(41, 46, 43, 0); }
}

/* Tarjetas de parada */
.shc-card {
  position: relative; z-index: 1; width: 46%;
  padding: 16px 18px; border-radius: 20px;
  background: var(--shc-card); border: 1px solid var(--shc-line); box-shadow: 0 8px 28px rgba(41, 46, 43, .045);
}
.shc-row--l .shc-card { margin-left: auto; }
.shc-row--r .shc-card { margin-right: auto; }
.shc-card--locked, .shc-card--start { background: #faf9f7; box-shadow: none; }
.shc-kicker { margin: 0 0 2px; font-size: .78rem; font-weight: 500; letter-spacing: .02em; color: var(--shc-mineral); }
.shc-card__title { margin: 0 0 4px; font-size: 1.15rem; font-weight: 500; line-height: 1.25; color: var(--shc-ink); }
.shc-card__text { margin: 0 0 8px; color: var(--shc-muted); font-size: .95rem; }
.shc-card__note { margin: 6px 0 0; font-size: .92rem; color: var(--shc-muted); }
.shc-card__note--small { font-size: .82rem; }
.shc-card code { padding: 1px 6px; border-radius: 6px; background: var(--shc-pearl); font-size: .9em; word-break: break-all; }
.shc-badge { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 0; padding: 2px 10px 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 500; }
.shc-badge--lock { background: var(--shc-pearl); color: var(--shc-muted); }
.shc-badge--ok { background: var(--shc-ink); color: var(--shc-ivory); }

.shc-product { display: flex; align-items: center; gap: 12px; margin: 10px 0 12px; }
.shc-product__img { flex: none; display: grid; place-items: center; width: 72px; height: 72px; overflow: hidden; border-radius: 12px; background: var(--shc-pearl); color: var(--shc-mineral); }
.shc-product__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shc-product__name { margin: 0; font-weight: 500; line-height: 1.3; }
.shc-product__name a { color: inherit; text-decoration: none; }
.shc-product__name a:hover { text-decoration: underline; }
.shc-product__cost { margin: 2px 0 0; font-size: .85rem; color: var(--shc-muted); }

/* Mis canjes y reglas */
.shc-mine { margin-top: 12px; padding: 18px; border-radius: 20px; background: var(--shc-pearl); }
.shc-mine__title { margin: 0 0 8px; font-size: 1.05rem; font-weight: 500; }
.shc-mine__list { margin: 0; padding: 0; list-style: none; }
.shc-mine__item { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--shc-line); }
.shc-mine__item:first-child { border-top: 0; }
.shc-mine__name { font-weight: 500; }
.shc-mine__state { text-align: right; font-size: .85rem; color: var(--shc-muted); }
.shc-mine__code { grid-column: 1 / -1; font-size: .88rem; color: var(--shc-muted); }
.shc-mine__code code { padding: 1px 6px; border-radius: 6px; background: var(--shc-card); }
.shc-rules { margin: 24px 0 0; padding: 0 0 0 1.1em; color: var(--shc-muted); font-size: .88rem; }
.shc-rules li { margin: 0 0 6px; }

/* Celular: el camino se angosta pegado a la izquierda y las tarjetas ocupan el resto */
@container shc (max-width: 640px) {
  .shc-trail { --shc-rail: 1.3px; --shc-stroke: 3px; }
  .shc-stats { grid-template-columns: 1fr; gap: 8px; }
  .shc-trail__svg--w { display: none; }
  .shc-trail__svg--n { display: block; }
  .shc-row { min-height: 170px; padding: 20px 0; }
  .shc-row.is-start { min-height: 120px; }
  .shc-node { left: var(--x-n); width: 30px; height: 30px; }
  .shc-marker { left: var(--mx-n); top: var(--my-n); width: 18px; height: 18px; }
  .shc-trail.is-laid .shc-marker { left: var(--mx-px); top: var(--my-px); }
  .shc-card { width: auto; margin-left: 31% !important; margin-right: 0 !important; padding: 14px; }
  .shc-product__img { width: 60px; height: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  .shc *, .shc *::before, .shc *::after { animation: none !important; transition: none !important; }
  .shc-glint { display: none; }
}
