:root {
  --bg: #fffdfc;
  --card: #ffffff;
  --ink: #222222;
  --muted: #6b7280;
  --accent: #ff87b7;
  --accent-ink: #7a0a3a;
  --accent-2: #8dd3ff;
  --ok: #10b981;
  --warn: #f59e0b;
  --ring: rgba(0,0,0,0.08);
  --shadow: 0 8px 24px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Nunito', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fff8fb 0%, #f7fcff 100%);
}

#app {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px clamp(12px, 4vw, 20px) 80px;
}

.app-header {
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.6));
  backdrop-filter: blur(6px);
  padding: 12px 0 8px;
  z-index: 2;
}

.title-row {
  display: flex; align-items: center; justify-content: space-between;
}
.title {
  font-weight: 800; font-size: 1.3rem;
}

.stage-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }

.progress { width: 100%; height: 14px; background: #f1f5f9; border-radius: 999px; overflow: hidden; box-shadow: inset 0 2px 6px rgba(0,0,0,0.04); }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent) 0%, #ffd1e6 100%); border-radius: 999px; transition: width 0.25s ease; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.stat { background: var(--card); border-radius: 12px; padding: 8px 10px; box-shadow: var(--shadow); text-align: center; }
.stat .label { display: block; font-size: 0.75rem; color: var(--muted); }

.content { display: grid; gap: 18px; margin-top: 14px; }

.tap-button {
  -webkit-tap-highlight-color: transparent;
  width: 100%; height: 230px; border: none; border-radius: 18px; cursor: pointer;
  background: radial-gradient(120px 80px at 30% 30%, #fff, #ffeef6 60%, #ffe1ef 100%);
  box-shadow: var(--shadow);
  display: grid; place-items: center; gap: 6px;
  transform: translateZ(0);
}
.tap-button:active { transform: scale(0.98); }
.tap-art { font-size: 56px; }
.tap-text { font-weight: 800; letter-spacing: 0.5px; color: var(--accent-ink); }

.section-title { margin: 0; font-size: 1.1rem; font-weight: 800; color: #374151; }
.shop-list { display: grid; gap: 10px; margin-top: 8px; }

.shop-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  background: var(--card); border-radius: 14px; padding: 10px; box-shadow: var(--shadow);
}
.shop-icon { font-size: 26px; }
.shop-title { font-weight: 700; }
.shop-sub { color: var(--muted); font-size: 0.85rem; }
.cost { font-weight: 800; }
.count { color: var(--muted); font-weight: 700; }

button { font-family: inherit; }
.primary, .secondary, .ghost, .shop-buy {
  -webkit-tap-highlight-color: transparent;
  border: none; border-radius: 12px; padding: 10px 14px; cursor: pointer; font-weight: 800;
}
.primary { background: linear-gradient(90deg, var(--accent) 0%, #ffd1e6 100%); color: var(--accent-ink); }
.secondary { background: #eef6ff; color: #0f3b64; }
.ghost { background: transparent; color: var(--muted); }
.small { font-size: 0.9rem; padding: 6px 10px; }

.shop-buy { background: #e8fff3; color: #065f46; }
.shop-buy:disabled { background: #f3f4f6; color: #9ca3af; cursor: not-allowed; }

.app-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 3;
  background: linear-gradient(180deg, rgba(255,255,255,0.2), rgba(255,255,255,0.95) 35% 100%);
  backdrop-filter: blur(6px);
  display: grid; place-items: center; gap: 6px; padding: 10px 12px 14px;
}
.tiny { font-size: 0.78rem; color: var(--muted); }

.modal.hidden { display: none; }
.modal { position: fixed; inset: 0; display: grid; place-items: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.25); }
.modal-card {
  position: relative; z-index: 1; background: var(--card); border-radius: 16px; box-shadow: var(--shadow);
  padding: 18px; width: min(92vw, 420px); text-align: center;
}
.reunion-art { font-size: 42px; margin-bottom: 6px; }

@media (min-width: 720px) {
  .content { grid-template-columns: 1fr 1fr; align-items: start; }
}
