/* "Your game" in Settings (public/js/your-game.js). */
.game {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.game-summary {
  margin: 0 0 20px;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.game-empty {
  margin: 0 0 20px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.game-heading {
  display: block;
  margin: 20px 0 10px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.game-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.game-chip {
  border: 1px solid var(--border-primary);
  border-radius: 999px;
  padding: 8px 14px;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.game-chip.is-filled {
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-text);
}

.game-chip.is-filled.is-open {
  box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--accent);
}

.game-chip.is-suggestion {
  border-style: dashed;
}

.game-chip.is-avoided {
  color: var(--text-secondary);
}

.game-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.game-hint {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.game-why {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-primary);
  border-radius: 12px;
}

.game-why strong {
  display: block;
  color: var(--text-primary);
  font-size: 14px;
}

.game-why span {
  color: var(--text-secondary);
  font-size: 13px;
}

.game-why-actions {
  display: flex;
  gap: 8px;
}

.game-small {
  padding: 6px 12px;
  font-size: 13px;
}

.game-undo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 14px;
}

.game-link {
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.game-add-row {
  display: flex;
  gap: 8px;
}

.game-add-row .form-input {
  flex: 1;
  min-width: 0;
}

.game-error {
  margin: 0 0 12px;
  color: #c0392b;
  font-size: 14px;
}

.game-footnote {
  margin: 24px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

/* The seeing stone: shown until Pin Seeker has noticed something. */
.game-orb-wrap {
  --progress: 0;
  --orb-light: rgb(244, 245, 244);
  --orb-mid: rgb(201, 205, 203);
  --orb-edge: rgb(142, 148, 145);
  --orb-glow: 160, 170, 165;
  position: relative;
  height: 270px;
  margin: 4px 0 8px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.game-orb-glow {
  position: absolute;
  bottom: 34px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--orb-glow), calc(0.3 + 0.2 * var(--progress))) 0%, rgba(var(--orb-glow), 0) 68%);
  animation: game-breathe 5s ease-in-out infinite;
}

.game-orb {
  position: relative;
  z-index: 1;
  width: 140px;
  height: 140px;
  margin-bottom: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 40% 35%, var(--orb-light) 0%, var(--orb-mid) 45%, var(--orb-edge) 100%);
  box-shadow: inset 0 -12px 24px rgba(0, 0, 0, calc(0.15 + 0.2 * var(--progress))), 0 0 calc(14px + 16px * var(--progress)) rgba(var(--orb-glow), 0.5);
  animation: game-breathe 5s ease-in-out infinite;
}

.game-mist {
  position: absolute;
  left: 20%;
  top: 38%;
  width: 90px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  filter: blur(9px);
  animation: game-swirl 9s ease-in-out infinite;
}

.game-mist.m2 { animation-duration: 12s; animation-delay: -4s; top: 52%; }
.game-mist.m3 { animation-duration: 15s; animation-delay: -8s; top: 28%; width: 70px; }

.game-orb::before {
  content: '';
  position: absolute;
  inset: 25%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 70%);
  filter: blur(6px);
  animation: game-pulse 4s ease-in-out infinite;
}

.game-orb-shine {
  position: absolute;
  left: 22%;
  top: 8%;
  width: 70px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));
  filter: blur(2px);
}

.game-orb-base {
  position: absolute;
  bottom: 30px;
  width: 110px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0) 70%);
}

.game-whisper {
  position: absolute;
  z-index: 0;
  bottom: 160px;
  left: calc(50% + var(--x));
  transform: translateX(-50%);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  filter: blur(0.6px);
  opacity: 0;
  animation: game-rise 7s ease-in-out infinite;
  animation-delay: calc(var(--i) * -7s / var(--n, 7));
}

.game-orb-title {
  margin: 0 0 6px;
  text-align: center;
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 600;
}

.game-orb-text {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

@keyframes game-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}

@keyframes game-pulse {
  0%, 100% { opacity: 0.6; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

@keyframes game-swirl {
  0% { transform: translate(-30px, 6px) rotate(0deg); }
  50% { transform: translate(24px, -8px) rotate(160deg); }
  100% { transform: translate(-30px, 6px) rotate(360deg); }
}

@keyframes game-rise {
  0% { opacity: 0; transform: translate(-50%, 20px); }
  40% { opacity: 0.45; }
  75% { opacity: 0; transform: translate(-50%, -70px); }
  100% { opacity: 0; transform: translate(-50%, -70px); }
}

/* Above the summary once there are chips: smaller, same stone. */
.game-orb-wrap.is-compact {
  height: 200px;
  margin-top: -20px;
}

.game-orb-wrap.is-compact .game-whisper {
  bottom: 118px;
}

.game-orb-wrap.is-compact > * {
  scale: 0.72;
  transform-origin: 50% 100%;
}

@media (prefers-reduced-motion: reduce) {
  .game-orb, .game-orb-glow, .game-mist, .game-orb::before { animation: none; }
  .game-whisper { display: none; }
}
