/* TIPPING POINT v0.3 — twilight / amber-stone palette */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; height: 100%; width: 100%;
  background: #1a1320;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #f3e6d2;
  user-select: none; -webkit-user-select: none;
  touch-action: none;
}
#stage {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
#game {
  display: block;
  width: 100%; height: 100%;
  touch-action: none;
  cursor: pointer;
}

/* mute toggle — small, unobtrusive, top-right */
#mute {
  position: fixed; top: 14px; right: 14px; z-index: 5;
  background: rgba(40, 28, 36, 0.55);
  color: #e8d6b8;
  border: 1px solid rgba(232, 198, 132, 0.28);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12px; letter-spacing: 0.08em; text-transform: lowercase;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.15s, opacity 0.15s;
}
#mute:hover { background: rgba(60, 42, 52, 0.7); }
#mute.muted { opacity: 0.6; }
#mute.preplay { opacity: 0; pointer-events: none; }

/* end-screen overlay */
#overlay {
  position: fixed; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  background: rgba(16, 10, 20, 0.72);
  backdrop-filter: blur(6px);
  opacity: 1; transition: opacity 0.35s ease;
}
#overlay.hidden { opacity: 0; pointer-events: none; }
#card {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px;
  max-width: 92vw;
  animation: rise 0.4s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}
@keyframes rise { from { transform: translateY(22px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
#cardimg {
  width: min(78vw, 340px);
  height: auto;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(232, 198, 132, 0.18);
}
#cardrow { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
#cardrow button {
  background: linear-gradient(180deg, #e8c684 0%, #d2a85c 100%);
  color: #2a1c12;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 15px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: lowercase;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.1s ease, filter 0.15s ease;
}
#cardrow button:hover { filter: brightness(1.08); }
#cardrow button:active { transform: translateY(2px) scale(0.98); }
#again { background: linear-gradient(180deg, #f0d9a4 0%, #e3bd6e 100%); }
.hidden { }
