:root {
  --navy: #1a1548;
  --navy-deep: #120e32;
  --navy-mid: #2a2460;
  --coral: #f2926a;
  --cream: #fff8f2;
  --mist: #b8c5d6;
  --danger: #ff6b8a;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0;
  height: 100%;
  background: var(--navy-deep);
  color: var(--cream);
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
  -webkit-user-select: none;
  user-select: none;
}
body { padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); touch-action: manipulation; }
#app { min-height: 100%; }
.bg {
  min-height: 100%;
  background: linear-gradient(#120e32, #1a1548, #241a5c);
  padding: 16px;
}
h1 { margin: 0; font-size: 26px; }
.logo { font-size: 56px; font-weight: 900; letter-spacing: -1px; text-align: center; }
.tag { text-align: center; color: var(--mist); letter-spacing: 6px; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.muted { color: var(--mist); }
.coral { color: var(--coral); }
.danger { color: var(--danger); font-weight: 700; }
.center { text-align: center; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 10px; }
input, button, textarea {
  font: inherit;
  width: 100%;
  border: 0;
  border-radius: 16px;
}
input {
  background: rgba(42, 36, 96, 0.9);
  color: var(--cream);
  padding: 14px;
  border: 1px solid rgba(255,248,242,0.12);
}
button.coral {
  background: var(--coral);
  color: var(--navy-deep);
  font-weight: 800;
  padding: 14px;
}
button.ghost {
  background: transparent;
  color: var(--mist);
  padding: 8px;
  width: auto;
}
.card {
  background: rgba(42, 36, 96, 0.9);
  border-radius: 20px;
  padding: 16px;
}
.tabs { display: flex; gap: 0; border-bottom: 1px solid rgba(255,248,242,0.15); }
.tabs button {
  background: none;
  color: var(--cream);
  font-weight: 800;
  border-radius: 0;
  padding: 12px;
}
.tabs button.on { color: var(--coral); border-bottom: 2px solid var(--coral); }
.nav {
  position: sticky;
  bottom: 0;
  display: flex;
  background: var(--navy-deep);
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
}
.nav button {
  background: none;
  color: var(--mist);
  font-size: 11px;
  font-weight: 700;
  padding: 8px 4px;
}
.nav button.on { color: var(--coral); }
.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.stamp {
  width: 100%; aspect-ratio: 1;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--navy-mid);
  font-weight: 700;
}
.stamp.on { background: var(--coral); }
.need { display: flex; align-items: center; gap: 8px; font-size: 12px; margin: 4px 0; }
.need span:first-child { width: 88px; color: var(--mist); }
.need progress { flex: 1; height: 8px; accent-color: var(--coral); }
.tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.tools button {
  background: var(--navy-mid);
  color: var(--cream);
  border-radius: 16px;
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 700;
}
.tools button.on { outline: 2px solid var(--coral); }
canvas.full {
  width: 100%;
  height: 320px;
  display: block;
  border-radius: 18px;
  background: rgba(42,36,96,.5);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.doodle-wrap {
  padding: 0;
  position: relative;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  touch-action: none;
  overscroll-behavior: none;
}
.speech {
  background: rgba(42,36,96,.85);
  border-radius: 18px;
  padding: 12px;
  font-weight: 700;
  text-align: center;
}
.otp { font-size: 32px; font-weight: 900; color: var(--coral); letter-spacing: 4px; text-align: center; }
.hidden { display: none !important; }
.list { display: flex; flex-direction: column; gap: 8px; }
.small { font-size: 13px; }
.amount { display: flex; align-items: center; justify-content: center; gap: 16px; font-size: 24px; font-weight: 900; }
.amount button { width: auto; background: none; color: var(--cream); font-size: 28px; }
.shop-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.shop-row button { width: auto; padding: 10px 16px; background: var(--coral); color: var(--navy-deep); font-weight: 800; border-radius: 22px; }
.overlay { position: fixed; inset: 0; background: var(--navy-deep); z-index: 5; overflow: auto; }
.qr { background: #fff; border-radius: 24px; padding: 16px; }
.qr img { width: 100%; display: block; }
