/* Penguin curling (curling.js): the game over everything, like the Yeti's. */

.curling-game {
  position: fixed;
  inset: 0;
  z-index: 40;
  overflow: hidden;
  background: linear-gradient(180deg, #071431 0%, #13306a 46%, #3a64a8 100%);
  animation: fade-in 0.35s;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.curling-game.closing {
  animation: fade-out 0.3s forwards;
}
.curling-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Who's lying where: everyone in the rings, closest first. */
.curling-board {
  position: absolute;
  top: calc(66px + env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none;
}
.curling-board[hidden] {
  display: none;
}
.curling-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 3px;
  border-radius: 999px;
  background: rgba(8, 22, 46, 0.62);
  box-shadow: inset 0 0 0 2px var(--c, #fff);
  font-weight: 800;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: #fff;
  white-space: nowrap;
}
.curling-chip.lead {
  background: linear-gradient(165deg, #fff7d6, #ffd45c);
  color: #3b2a00;
  font-size: 14px;
  box-shadow: inset 0 0 0 2px var(--c, #fff), 0 0 18px rgba(255, 212, 92, 0.6);
}
.curling-chip.lead::before {
  content: '👑';
  margin: 0 -2px 0 4px;
}
.curling-face {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 2px var(--c, #fff);
  font-size: 16px;
  line-height: 1;
}
.curling-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* How hard: a bar up the right-hand side that fills as you pull. */
.curling-power {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 14px;
  height: min(240px, 34vh);
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(8, 22, 46, 0.5);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.curling-power.is-on {
  opacity: 1;
}
.curling-power i {
  position: absolute;
  inset: 2px;
  border-radius: 999px;
  transform-origin: 50% 100%;
  transform: scaleY(0);
}

/* Curl: two buttons at the foot of the ice. */
.curling-spins {
  position: absolute;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  gap: min(52vw, 240px);
}
.curling-spins[hidden] {
  display: none;
}
.curling-spin {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: rgba(8, 22, 46, 0.45);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
}
.curling-spin.on {
  background: linear-gradient(165deg, #fff7d6, #ffd45c);
  color: #3b2a00;
  border-color: #fff;
  box-shadow: 0 0 18px rgba(255, 212, 92, 0.75);
  transform: scale(1.08);
}
.curling-spin:active {
  transform: scale(0.94);
}

.curling-game .arena-hint {
  bottom: auto;
  top: 58%;
  font-size: 20px;
  pointer-events: none;
}
.curling-game .arena-msg {
  top: 30%;
}
.curling-card .btn {
  width: 100%;
}
