/* Spinmoji — wheel styles. Shared page, button, and stats styles live in
   /assets/site.css. The blue stays the same in light and dark mode. */

body.game-spinmoji {
  --game-bg: #1565FF;
  --game-deep: #0B3BA8;
  --game-accent: #1565FF;
  --pale: #E6EEFF;
}

/* ── Wheel ─────────────────────────────────────────────── */

/* Mobile: the wheel is wider than the screen, its center at the top edge
   of the wrap, so only the lower half shows. */
.wheel-wrap {
  --D: 160vw;
  position: relative;
  width: 100%;
  height: calc(var(--D) / 2 + 20px);
  overflow: hidden;
  cursor: pointer;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.wheel {
  position: absolute;
  left: 50%;
  top: calc(var(--D) / -2);
  width: var(--D);
  height: var(--D);
  margin-left: calc(var(--D) / -2);
  will-change: transform;
}

.wheel svg { display: block; width: 100%; height: 100%; overflow: visible; }

.wheel .seg-a { fill: #FFFFFF; }
.wheel .seg-b { fill: var(--pale); }
.wheel .divider { stroke: var(--game-bg); stroke-width: 0.6; }
.wheel .rim { fill: none; stroke: var(--game-deep); stroke-width: 3; }
.wheel .hub { fill: var(--game-bg); stroke: var(--game-deep); stroke-width: 1.5; }
.wheel .hub-dot { fill: #FFFFFF; }

.wheel .seg-emoji {
  font-family: var(--ws-emoji-font);
  font-size: 16px;
  text-anchor: middle;
  dominant-baseline: central;
}

.pointer {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 44px;
  height: 58px;
  margin-left: -22px;
  transform-origin: 50% 75%;
  filter: drop-shadow(0 2px 3px rgba(11, 31, 77, 0.35));
  pointer-events: none;
}

/* Tablet: the full wheel, up to 520px (also shrinks on short windows so the
   Spin button stays in view). */
@media (min-width: 600px) {
  .wheel-wrap {
    --D: max(300px, min(520px, 86vw, calc(100vh - 290px)));
    height: calc(var(--D) + 20px);
  }
  .wheel { top: 0; }
  .pointer { width: 50px; height: 66px; margin-left: -25px; }
}

/* Desktop and wide: up to 640px. */
@media (min-width: 900px) {
  .wheel-wrap { --D: max(300px, min(640px, 60vw, calc(100vh - 300px))); }
}

/* ── Result ────────────────────────────────────────────── */

.result {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 104px;
  padding: 8px 16px 4px;
}

.result-emoji {
  font-family: var(--ws-emoji-font);
  font-size: 72px;
  line-height: 1;
}

.result-hint {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
}

.result-hint[hidden] { display: none; }

/* ── Stats extras ──────────────────────────────────────── */

.overdue {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.overdue li {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  border-radius: 12px;
  background: var(--pale);
}

.overdue .emoji { font-size: 28px; line-height: 1.1; }
.overdue .since { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
