/* --- Airhockey --- */
.hockey { --p0: var(--tomato); --p1: var(--sun); }

/* marcador: dos stickers con el puntaje gordo y el "primero a 7" en el medio */
.hockey .hk-hud { display: flex; align-items: center; justify-content: center; gap: 14px 22px; flex-wrap: wrap; margin: 0 auto 16px; }
.hockey .hk-tag {
  display: inline-flex; align-items: center; gap: 10px; padding: 4px 6px 4px 12px; min-height: 54px;
  background: var(--sheet); border: var(--stroke); border-radius: var(--r-sm); box-shadow: var(--shadow);
}
.hockey .hk-tag:first-child { transform: rotate(-1.5deg); }
.hockey .hk-tag:last-child { transform: rotate(1.5deg); }
.hockey .hk-tag.me { outline: 3px dashed var(--ink); outline-offset: 4px; }
.hockey .puckdot { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); flex: none; }
.hockey .p0 .puckdot { background: var(--p0); }
.hockey .p1 .puckdot { background: var(--p1); }
.hockey .who small { display: block; font-family: var(--pixel); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); line-height: 1; }
.hockey .who b { display: block; max-width: 13ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.2; }
.hockey .score {
  display: grid; place-items: center; min-width: 52px; height: 44px; padding: 0 8px;
  font-family: var(--display); font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums;
  border: var(--stroke); border-radius: 10px;
}
.hockey .p0 .score { background: var(--p0); color: #fff; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; }
.hockey .p1 .score { background: var(--p1); color: var(--ink); }
.hockey .score.pop { animation: hk-pop .6s var(--ease-pop); }
@keyframes hk-pop { 0% { transform: scale(1); } 35% { transform: scale(1.5) rotate(-8deg); } 100% { transform: scale(1); } }
.hockey .hk-to {
  font-family: var(--pixel); font-size: 1.1rem; padding: 4px 12px; white-space: nowrap;
  background: var(--mint); border: var(--stroke); border-radius: 10px; box-shadow: var(--shadow); transform: rotate(2deg);
}

/* mesa */
.hockey .hk-stage { display: flex; justify-content: center; }
.hockey .hk-frame { position: relative; line-height: 0; }
.hockey canvas.hk-table { display: block; cursor: none; touch-action: none; user-select: none; -webkit-user-select: none; }

.hockey .hk-banner {
  position: absolute; left: 50%; top: 50%; z-index: 3; pointer-events: none; white-space: nowrap;
  font-family: var(--display); font-size: clamp(2rem, 6vw, 3.6rem); line-height: 1; letter-spacing: .02em;
  padding: 12px 28px 16px; border: 4px solid var(--ink); border-radius: var(--r); box-shadow: 7px 7px 0 var(--ink);
  background: var(--sheet); color: var(--ink); transform: translate(-50%, -50%) rotate(-4deg);
}
.hockey .hk-banner.in { animation: hk-in .55s var(--ease-pop) both; }
.hockey .hk-banner[hidden] { display: none; }
.hockey .hk-banner.go { background: var(--mint); }
.hockey .hk-banner.goal.p0 { background: var(--tomato); color: #fff; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; }
.hockey .hk-banner.goal.p1 { background: var(--sun); }
.hockey .hk-banner.goal { font-size: clamp(2.6rem, 9vw, 5rem); }
.hockey .hk-banner.ouch { background: var(--sheet); font-size: clamp(1.4rem, 4vw, 2.4rem); transform: translate(-50%, -50%) rotate(3deg); }
@keyframes hk-in { from { transform: translate(-50%, -50%) scale(.3) rotate(-18deg); opacity: 0; } }

.hockey .hk-help { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 18px; margin: 18px auto 0; max-width: 820px; text-align: center; }
.hockey .hk-role {
  display: inline-block; padding: 6px 14px; font-weight: 800;
  background: var(--sheet); border: var(--stroke); border-radius: 10px; box-shadow: var(--shadow);
}
.hockey .hk-role.p0 { background: #ffd0c4; }
.hockey .hk-role.p1 { background: #fff0b8; }

/* fin */
.hockey .hk-end h2 { margin-top: 4px; }
.hockey .hk-trophy { width: 110px; margin: -70px auto 0; animation: hk-trophy .8s var(--ease-pop) both; filter: drop-shadow(4px 4px 0 var(--ink)); }
.hockey .hk-trophy.p0 { color: var(--tomato); }
.hockey .hk-trophy.p1 { color: var(--sun); }
.hockey .hk-trophy svg { display: block; width: 100%; }
@keyframes hk-trophy { from { transform: translateY(40px) scale(.3) rotate(-30deg); opacity: 0; } }
.hockey .hk-end .row { justify-content: center; }
.hockey .hk-confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 45; }

@media (max-width: 760px) {
  .hockey .hk-to { order: -1; flex-basis: 100%; text-align: center; transform: none; }
}

/* --- tablet: que la mesa no haga scroll, zoom ni menú al mantener apretado --- */
.hockey .hk-stage, .hockey .hk-frame { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.hockey canvas.hk-table { -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
