/* ---------- Buttons ---------- */
.btn {
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(0,0,0,.15);
  transition: transform .1s ease;
}
.btn:active { transform: translateY(3px) scale(0.94); box-shadow: 0 2px 0 rgba(0,0,0,.15); }
.btn-primary { background: linear-gradient(180deg, #ffd166, #ff9f43); color: #4a2e00; }
.btn-ghost { background: #fff; color: var(--text-dark); border: 2px solid #e0d3b8; }
.btn.small { min-height: 48px; min-width: 48px; font-size: .95rem; padding: 8px 16px; }

.icon-btn {
  position: relative;
  width: var(--tap-min);
  height: var(--tap-min);
  border-radius: 50%;
  border: 3px solid #fff;
  background: rgba(255,255,255,.75);
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(0,0,0,.1);
}
.icon-btn:active { transform: translateY(2px) scale(0.94); }

/* ---------- Hold-and-ring gesture (deliberate exits) ---------- */
.hold-btn { overflow: visible; }
.hold-ring {
  position: absolute;
  inset: -3px;
  transform: rotate(-90deg);
  pointer-events: none;
}
.hold-ring-fill {
  fill: none;
  stroke: #ff8fc7;
  stroke-width: 3;
  stroke-linecap: round;
}

/* ---------- Hero / character cards ---------- */
.hero-card {
  width: 220px;
  max-width: 82vw;
  background: rgba(255,255,255,.75);
  border: 4px solid transparent;
  border-radius: var(--r-lg);
  padding: 18px 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 8px 0 rgba(0,0,0,.08);
  min-height: var(--tap-min);
}
.hero-card:active { transform: translateY(2px) scale(0.97); }
.hero-art { width: 140px; height: 140px; margin-bottom: 8px; filter: drop-shadow(0 6px 6px rgba(0,0,0,.15)); }
.hero-art svg, .hero-art { width: 140px; height: 140px; }
.hero-name { font-weight: 800; font-size: 1.1rem; color: var(--text-dark); }
.bob { animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(1deg); } }

/* ---------- Hub tiles ---------- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-3);
  width: 100%;
  max-width: 640px;
}
.tile {
  aspect-ratio: 1;
  min-height: var(--tap-min);
  border: none;
  border-radius: var(--r-lg);
  background: rgba(255,255,255,.8);
  box-shadow: 0 6px 0 rgba(0,0,0,.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
}
.tile:active { transform: translateY(3px) scale(0.96); }
.tile-icon { font-size: 2.6rem; }
.tile-lock { position: absolute; bottom: 10px; font-size: 1.2rem; }
.tile-stars { font-size: .8rem; }
.tile-locked { opacity: .55; }

/* ---------- Toggles ---------- */
.pill {
  display: inline-block;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #d9d0c2;
  position: relative;
  transition: background .15s ease;
}
.pill-on { background: #4caf7d; }
.pill-knob {
  position: absolute;
  top: 3px; left: 3px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s ease;
}
.pill-on .pill-knob { transform: translateX(22px); }

/* ---------- Generic card / modal (used by later phases) ---------- */
.card {
  background: rgba(255,255,255,.85);
  border-radius: var(--r-lg);
  padding: var(--space-3);
  box-shadow: var(--shadow-md);
}

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(60, 40, 20, .45);
  display: none;
  align-items: center; justify-content: center;
  z-index: 150;
}
.modal-overlay.show { display: flex; }
.modal {
  background: #fff8ea;
  border-radius: var(--r-lg);
  padding: 28px 32px 32px;
  text-align: center;
  max-width: 360px;
  width: min(90vw, 360px);
  box-shadow: 0 16px 0 rgba(0,0,0,.15);
}

/* ---------- Idle hint (nudge after ~8s of no input) ---------- */
.idle-pulse { animation: idlePulse 1s ease-in-out infinite; }
@keyframes idlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.idle-point-mascot {
  position: absolute;
  width: 48px;
  height: 48px;
  pointer-events: none;
  z-index: 30;
  animation: idleBob 1.2s ease-in-out infinite;
}
.idle-point-mascot svg { width: 100%; height: 100%; }
@keyframes idleBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ---------- Toast (used later phases; base styling now) ---------- */
.toast {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  background: #4a2e00;
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: .9rem;
  z-index: 300;
}
