/* Wishlet — "Sprinkles": pastel pink and mint, rounded type, confetti dots. */
:root {
  --bg: #FFF4F7;
  --card: #FFFFFF;
  --ink: #6B2440;
  --ink-soft: #A35A78;
  --line: #F5CFDD;
  --pink: #D4537E;
  --pink-press: #B53F67;
  --pink-tint: #FDE3EC;
  --mint: #D9F5EA;
  --mint-ink: #0F6E56;
  --butter: #FFF0C9;
  --butter-ink: #85520A;
  --lilac: #ECE8FF;
  --lilac-ink: #4B3F9E;
  --taken: #F4EEF1;
  --danger: #B3261E;
  --radius: 18px;
  --font: 'Fredoka', ui-rounded, 'SF Pro Rounded', system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
  background-color: var(--bg);
  /* Confetti: four dot colours on offset grids. */
  background-image:
    radial-gradient(circle, #F6B8CD 2px, transparent 2.5px),
    radial-gradient(circle, #A8E6CF 2px, transparent 2.5px),
    radial-gradient(circle, #FFD98A 1.6px, transparent 2px),
    radial-gradient(circle, #C9BFFF 1.6px, transparent 2px);
  background-size: 190px 190px, 230px 230px, 170px 170px, 260px 260px;
  background-position: 20px 30px, 120px 90px, 70px 150px, 160px 10px;
  background-attachment: fixed;
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: var(--pink-press); }
svg.i { width: 1.15em; height: 1.15em; vertical-align: -0.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.app {
  max-width: 520px;
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(110px + env(safe-area-inset-bottom));
}

/* ── Top bar ── */
.top { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-bottom: 8px; }
.logo { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 22px; color: var(--pink); letter-spacing: 0.2px; }
.logo svg { width: 28px; height: 28px; }
.spacer { flex: 1; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--card); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 1.5px var(--line);
}
.icon-btn:active { transform: scale(0.95); }
.avatar { font-weight: 500; background: var(--mint); color: var(--mint-ink); box-shadow: none; }

/* ── Headings ── */
.eyebrow { font-size: 14px; color: var(--ink-soft); margin: 10px 0 0; }
h1 { font-size: 30px; font-weight: 600; line-height: 1.12; margin: 2px 0 6px; }
h2 { font-size: 19px; font-weight: 500; margin: 26px 0 10px; }
.date { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--pink-press); }
svg.i.sparkle { fill: #FFD25E; stroke: #E0A400; stroke-width: 1.2; width: 1.3em; height: 1.3em; margin-left: 2px; }
.hint { font-size: 15px; color: var(--ink-soft); margin: 10px 0 4px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  border: 0; font-weight: 500; font-size: 17px;
  background: var(--pink); color: #fff;
}
.btn:active { background: var(--pink-press); transform: scale(0.98); }
.btn.soft { background: var(--pink-tint); color: var(--pink-press); }
.btn.mint { background: var(--mint); color: var(--mint-ink); }
.btn.ghost { background: transparent; color: var(--ink-soft); }
.btn.danger { background: #FCE4E2; color: var(--danger); }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn.wide { width: 100%; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.fab {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom));
  min-height: 56px; padding: 0 28px; font-size: 18px;
  box-shadow: 0 6px 18px rgba(212, 83, 126, 0.35);
  z-index: 5;
}
.fab:active { transform: translateX(-50%) scale(0.98); }

/* ── Cards ── */
.card {
  background: var(--card); border-radius: var(--radius);
  border: 1.5px solid var(--line);
  padding: 14px; margin-top: 10px;
}
.list-card { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; }
.list-card:active { transform: scale(0.99); }
.list-card .blob {
  width: 52px; height: 52px; border-radius: 16px; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.list-card .blob svg { width: 26px; height: 26px; }
.list-card .t { font-weight: 500; font-size: 18px; line-height: 1.2; }
.list-card .s { font-size: 14px; color: var(--ink-soft); }
.tone-0 { background: var(--pink-tint); color: var(--pink-press); }
.tone-1 { background: var(--mint); color: var(--mint-ink); }
.tone-2 { background: var(--butter); color: var(--butter-ink); }
.tone-3 { background: var(--lilac); color: var(--lilac-ink); }

.item { display: flex; gap: 12px; align-items: flex-start; position: relative; }
.item .pic {
  width: 76px; height: 76px; border-radius: 14px; flex: none; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.item .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item .pic svg { width: 30px; height: 30px; }
.item .body { flex: 1; min-width: 0; }
.item .t { font-weight: 500; font-size: 18px; line-height: 1.2; margin: 2px 34px 0 0; overflow-wrap: anywhere; }
.item .notes { font-size: 15px; color: var(--ink-soft); margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.item .actions { margin-top: 10px; }
.item.tap { cursor: pointer; }
.item.tap:active { transform: scale(0.99); }
.item.taken { background: var(--taken); border-style: dashed; }
.item.taken .t { text-decoration: line-through; text-decoration-color: var(--ink-soft); color: var(--ink-soft); }
.item.taken .pic { filter: grayscale(0.6); opacity: 0.7; }
.item.mine { border-color: #9FDCC4; background: #F3FCF8; }

.star {
  position: absolute; top: 8px; right: 8px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: transparent; color: #E2B8C8;
  display: flex; align-items: center; justify-content: center;
}
.star svg { width: 24px; height: 24px; }
.star.on { color: #F2A900; }
.star.on svg { fill: #FFD25E; }
span.star { pointer-events: none; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; padding: 3px 10px; border-radius: 999px;
  background: var(--pink-tint); color: var(--pink-press);
  text-decoration: none; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chip.mint { background: var(--mint); color: var(--mint-ink); }
.chip.butter { background: var(--butter); color: var(--butter-ink); }
.chip.lilac { background: var(--lilac); color: var(--lilac-ink); }
.chip.solid { background: var(--pink); color: #fff; }
a.chip { min-height: 28px; }

.notice {
  background: var(--butter); color: var(--butter-ink);
  border-radius: var(--radius); padding: 12px 14px; margin-top: 12px;
  display: flex; gap: 10px; align-items: flex-start; font-size: 15px;
}
.notice p { margin: 0 0 2px; }

.empty { text-align: center; padding: 28px 12px 8px; }
.empty .art { width: 96px; height: 96px; margin: 0 auto 8px; color: var(--pink); }
.empty .t { font-size: 20px; font-weight: 500; }
.empty p { color: var(--ink-soft); margin: 6px 0 16px; }

/* ── Sign in ── */
.welcome { min-height: 80dvh; display: flex; flex-direction: column; justify-content: center; text-align: center; gap: 6px; }
.welcome .art { width: 120px; height: 120px; margin: 0 auto; color: var(--pink); }
.welcome h1 { font-size: 40px; color: var(--pink); margin-top: 6px; }
.welcome p { color: var(--ink-soft); margin: 0 auto 18px; max-width: 320px; }
.google { background: #fff; color: #3C4043; box-shadow: 0 0 0 1.5px var(--line); }
.google:active { background: #F8F3F5; }
.devlogin { margin-top: 26px; font-size: 14px; color: var(--ink-soft); }

/* ── Sheets (bottom drawers) ── */
dialog.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 520px;
  max-height: 92dvh; border-radius: 26px 26px 0 0;
  background: var(--card); color: var(--ink);
}
dialog.sheet::backdrop { background: rgba(107, 36, 64, 0.35); }
dialog.sheet[open] { animation: up 0.22s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0.4; } }
.sheet-inner { padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); }
.grab { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 10px; }
.sheet h2 { margin-top: 4px; }

label.field { display: block; margin-top: 14px; font-size: 15px; font-weight: 500; }
label.field .opt { font-weight: 400; color: var(--ink-soft); }
.field input, .field textarea {
  display: block; width: 100%; margin-top: 6px;
  border: 1.5px solid var(--line); border-radius: 14px;
  background: #FFFBFC; padding: 12px 14px; font-size: 17px; font-weight: 400;
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px var(--pink-tint); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.error { color: var(--danger); font-size: 14px; margin: 10px 0 0; }

.photo-pick {
  display: flex; align-items: center; gap: 12px; margin-top: 4px;
  border: 1.5px dashed var(--line); border-radius: 16px; padding: 10px;
}
.photo-pick .pic { width: 72px; height: 72px; border-radius: 12px; overflow: hidden; flex: none; display: flex; align-items: center; justify-content: center; }
.photo-pick .pic img { width: 100%; height: 100%; object-fit: cover; }
.photo-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.toggle { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 14px; border-radius: 16px; background: var(--butter); color: var(--butter-ink); font-weight: 500; }
.toggle input { width: 22px; height: 22px; accent-color: #F2A900; margin: 0; }

.sheet-actions { display: flex; gap: 10px; margin-top: 20px; }
.sheet-actions .btn { flex: 1; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(90px + env(safe-area-inset-bottom));
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 15px; z-index: 20; max-width: calc(100% - 32px); text-align: center;
}

.loading { text-align: center; padding: 60px 0; color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  dialog.sheet[open] { animation: none; }
}

.center { justify-content: center; }
.mt { margin-top: 14px; }
.mt-s { margin-top: 8px; }
.sheet-actions.stack { flex-direction: column; }
.fill { margin-top: 8px; }
.btn:disabled, .photo-pick:has(input:disabled) .btn { opacity: 0.55; cursor: default; }
