/* Lily's Wishlist */
:root, [data-theme="sky"] {
  --bg: #eef6fe; --bg2: #d8ebfb; --card: #ffffff; --ink: #213447; --muted: #6d8093;
  --line: #d6e6f5; --accent: #9ccdf3; --accent-ink: #163651; --accent-strong: #2f78b7;
  --accent-soft: #e3f1fd; --blob1: #cfe7fb; --blob2: #f7e1ee; --ribbon: #2f78b7; --fav: #f07ea5;
}
[data-theme="spring"] {
  --bg: #fff3f6; --bg2: #fde0e9; --card: #ffffff; --ink: #45263a; --muted: #8b6879;
  --line: #f6d6e1; --accent: #f7b3c8; --accent-ink: #4a1a2f; --accent-strong: #c24d78;
  --accent-soft: #fde8ef; --blob1: #fbd3e0; --blob2: #dff1d8; --ribbon: #c24d78; --fav: #e0467a;
}
[data-theme="summer"] {
  --bg: #fff7ec; --bg2: #ffe7cc; --card: #ffffff; --ink: #432d1c; --muted: #8d7058;
  --line: #f7dfc4; --accent: #ffc393; --accent-ink: #4a2610; --accent-strong: #cf6a2c;
  --accent-soft: #ffeedd; --blob1: #ffdcb8; --blob2: #fff0a8; --ribbon: #cf6a2c; --fav: #ef5f7a;
}
[data-theme="autumn"] {
  --bg: #faf1e6; --bg2: #f1dcc4; --card: #fffaf4; --ink: #3c271b; --muted: #85695a;
  --line: #ead6c0; --accent: #e0a577; --accent-ink: #3a1c09; --accent-strong: #a64f24;
  --accent-soft: #f6e4d2; --blob1: #efcfae; --blob2: #e7d6a8; --ribbon: #a64f24; --fav: #c7443e;
}
[data-theme="winter"] {
  --bg: #f3f5fc; --bg2: #e1e6f7; --card: #ffffff; --ink: #272c4a; --muted: #6c7294;
  --line: #dde2f3; --accent: #c1caf2; --accent-ink: #1f2656; --accent-strong: #5561ad;
  --accent-soft: #e9ecfb; --blob1: #d9dff7; --blob2: #ece2f7; --ribbon: #5561ad; --fav: #d9608f;
}
[data-theme="matcha"] {
  --bg: #f4f6ec; --bg2: #e2e9d0; --card: #fffffb; --ink: #2d3722; --muted: #6f7a61;
  --line: #dfe5cf; --accent: #b3cc92; --accent-ink: #1f2c12; --accent-strong: #587636;
  --accent-soft: #e9f0da; --blob1: #d6e3bf; --blob2: #f3ecd6; --ribbon: #587636; --fav: #e0718f;
}
[data-theme="coldbrew"] {
  --bg: #f7f0e7; --bg2: #eadbc8; --card: #fffbf6; --ink: #36261b; --muted: #7e6857;
  --line: #e8d9c6; --accent: #d2ad88; --accent-ink: #2f1d0f; --accent-strong: #7b4f2e;
  --accent-soft: #f1e4d4; --blob1: #e3cdb3; --blob2: #efe3d2; --ribbon: #6b4428; --fav: #d0617f;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink);
  font: 16px/1.45 "Nunito", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  transition: background-color .4s, color .4s;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40rem 28rem at 110% -5%, var(--blob2), transparent 60%),
    radial-gradient(36rem 30rem at -15% 10%, var(--blob1), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2));
}
button, input, select, textarea { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.tiny { font-size: .8rem; }
.script { font-family: "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: -.01em; }

/* ---------- Buttons ---------- */
.btn {
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; padding: .7rem 1.2rem; font-weight: 800; cursor: pointer;
  transition: transform .12s, filter .15s, background .2s; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 14px -6px var(--accent-strong); }
.btn.primary:hover { filter: brightness(1.04) saturate(1.1); }
.btn.soft { background: var(--accent-soft); color: var(--accent-strong); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.big { width: 100%; padding: .9rem; font-size: 1.05rem; }
.btn.small { padding: .45rem .9rem; font-size: .9rem; }
.btn.full { width: 100%; margin-top: .5rem; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--card); color: var(--muted);
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 10px -4px rgba(0,0,0,.15);
}
.icon-btn svg { fill: currentColor; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card {
  width: 100%; max-width: 380px; background: var(--card); border-radius: 28px; padding: 36px 28px 28px;
  box-shadow: 0 20px 50px -24px rgba(40, 90, 140, .35); text-align: center;
}
.login-emoji { font-size: 2.6rem; line-height: 1; }
.login-card h1 { font-size: 2rem; margin: .4rem 0 .1rem; }
.login-card > p.muted { margin: 0 0 1.4rem; }
.login-card label, .sheet label { display: block; text-align: left; font-weight: 700; font-size: .9rem; margin-bottom: .85rem; }
input:not([type=file]), select, textarea {
  display: block; width: 100%; margin-top: .3rem; padding: .75rem .9rem; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--bg); font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent-strong); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-error { color: #c23a4e; font-weight: 700; min-height: 1.2em; margin: 0 0 .6rem; font-size: .9rem; }

/* ---------- Layout ---------- */
.page { max-width: 1100px; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 16px 60px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-emoji {
  font-size: 1.9rem; width: 56px; height: 56px; display: grid; place-items: center; flex: none;
  background: var(--card); border-radius: 18px; box-shadow: 0 6px 18px -10px var(--accent-strong);
}
.top h1 { font-size: clamp(1.6rem, 5vw, 2.3rem); margin: 0; line-height: 1.05; }
.hello { margin: .1rem 0 0; color: var(--muted); font-weight: 600; }

.themes { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; flex-wrap: wrap; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--card); cursor: pointer; padding: 0;
  box-shadow: 0 2px 8px -3px rgba(0,0,0,.25); font-size: .95rem; display: grid; place-items: center;
  transition: transform .15s;
}
.swatch:hover { transform: scale(1.08); }
.swatch[aria-pressed="true"] { outline: 2.5px solid var(--accent-strong); outline-offset: 2px; }
.theme-name { font-weight: 700; color: var(--muted); font-size: .9rem; }

.add-bar {
  display: flex; gap: 8px; background: var(--card); padding: 8px; border-radius: 999px;
  box-shadow: 0 10px 30px -18px var(--accent-strong);
}
.add-bar input { margin: 0; border: 0; background: transparent; padding: .6rem .9rem; box-shadow: none !important; }
.add-bar input:focus { box-shadow: none; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 8px; flex-wrap: wrap; }
.tabs { display: flex; background: var(--card); border-radius: 999px; padding: 4px; box-shadow: 0 2px 10px -6px rgba(0,0,0,.2); }
.tab { border: 0; background: transparent; padding: .5rem .95rem; border-radius: 999px; font-weight: 800; color: var(--muted); cursor: pointer; }
.tab.active { background: var(--accent-soft); color: var(--accent-strong); }
.count { display: inline-block; min-width: 1.4em; padding: 0 .35em; border-radius: 999px; background: var(--bg); font-size: .78rem; margin-left: .2rem; }
.sort select { margin: 0; width: auto; padding: .55rem 2rem .55rem .9rem; border-radius: 999px; background-color: var(--card); font-weight: 700; font-size: .95rem; border-color: transparent; box-shadow: 0 2px 10px -6px rgba(0,0,0,.2); }
.summary { color: var(--muted); font-weight: 600; font-size: .9rem; margin: 4px 2px 12px; min-height: 1.2em; }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
@media (max-width: 560px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.card {
  background: var(--card); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 12px 30px -22px rgba(30, 60, 100, .45); position: relative; animation: pop .35s ease both;
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.card.is-reserved .thumb img { filter: saturate(.75); }
.thumb { position: relative; aspect-ratio: 1; background: #fff; display: block; }
.thumb > a { display: block; width: 100%; height: 100%; text-decoration: none; }
.thumb img { width: 100%; height: 100%; object-fit: contain; padding: 10px; display: block; }
.thumb .noimg { width: 100%; height: 100%; display: grid; place-items: center; font-size: 2.6rem; background: var(--accent-soft); }
.fav-btn {
  position: absolute; top: 8px; right: 8px; width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.92); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 8px -2px rgba(0,0,0,.2);
  color: #c9ced6; transition: transform .15s;
}
.fav-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.fav-btn.on { color: var(--fav); }
.fav-btn.on svg { fill: currentColor; }
.fav-btn.bump { animation: bump .35s; }
@keyframes bump { 50% { transform: scale(1.3); } }
.fav-btn[disabled] { cursor: default; }
.fav-btn[disabled]:not(.on) { display: none; }
.ribbon {
  position: absolute; left: 8px; right: 8px; bottom: 8px; background: var(--ribbon); color: #fff;
  font-weight: 800; font-size: .8rem; text-align: center; padding: .35rem .5rem; border-radius: 999px;
  box-shadow: 0 4px 12px -4px rgba(0,0,0,.35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.drop { position: absolute; top: 10px; left: 10px; background: #2f9e6b; color: #fff; font-weight: 800; font-size: .72rem; padding: .2rem .55rem; border-radius: 999px; }
.body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.title {
  font-weight: 700; line-height: 1.3; margin: 0; color: var(--ink); text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.shop { font-size: .78rem; color: var(--muted); font-weight: 600; }
.price { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.25rem; color: var(--accent-strong); margin-top: 2px; }
.price .was { font-family: "Nunito", sans-serif; font-size: .8rem; color: var(--muted); text-decoration: line-through; margin-left: .35rem; font-weight: 600; }
.price .approx { display: block; font-family: "Nunito", sans-serif; font-size: .78rem; color: var(--muted); font-weight: 600; }
.price.missing { font-family: "Nunito", sans-serif; font-size: .9rem; color: var(--muted); font-weight: 700; }
.notes { font-size: .85rem; color: var(--muted); font-style: italic; margin: 2px 0 0; overflow-wrap: anywhere; }
.card-actions { display: flex; gap: 6px; margin-top: auto; padding-top: 10px; }
.card-actions .btn { flex: 1; padding: .55rem .6rem; font-size: .88rem; }
.card-actions .more { flex: none; width: 40px; padding: 0; background: var(--accent-soft); color: var(--accent-strong); }
.btn.reserved { background: var(--accent-soft); color: var(--accent-strong); box-shadow: none; }
.card.loading .thumb { background: linear-gradient(90deg, var(--accent-soft), var(--card), var(--accent-soft)); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .big-emoji { font-size: 3rem; }
.empty h3 { font-family: "Fraunces", Georgia, serif; color: var(--ink); font-size: 1.4rem; margin: .4rem 0; }

/* ---------- Sheets ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(20, 30, 45, .35); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; animation: fade .2s;
}
.sheet-backdrop[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  background: var(--card); width: 100%; max-width: 480px; border-radius: 26px; padding: 22px 20px 20px;
  max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 30px 60px -20px rgba(0,0,0,.35); animation: up .25s ease;
}
@keyframes up { from { transform: translateY(24px); opacity: .6; } }
@media (max-width: 560px) {
  .sheet-backdrop { align-items: flex-end; padding: 0; }
  .sheet { border-radius: 26px 26px 0 0; padding-bottom: max(20px, env(safe-area-inset-bottom)); max-height: 92vh; }
}
.sheet-grab { width: 42px; height: 5px; border-radius: 99px; background: var(--line); margin: -8px auto 12px; }
.sheet h2 { font-family: "Fraunces", Georgia, serif; margin: 0 0 12px; font-size: 1.45rem; }
.sheet h3 { font-size: 1rem; margin: 18px 0 6px; color: var(--accent-strong); }
.sheet-note { background: var(--accent-soft); color: var(--accent-ink); border-radius: 14px; padding: .7rem .9rem; font-weight: 600; font-size: .9rem; margin: 0 0 14px; }
.row2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.photo-row { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.photo-preview { width: 84px; height: 84px; border-radius: 16px; background: #fff; border: 1.5px solid var(--line); flex: none; overflow: hidden; display: grid; place-items: center; font-size: 1.8rem; }
.photo-preview img { width: 100%; height: 100%; object-fit: contain; }
.photo-actions { flex: 1; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; }
.photo-actions input { margin: 0; padding: .55rem .75rem; font-size: 16px; }
.file-btn { display: inline-block; cursor: pointer; }
.sheet-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.action-list { display: flex; flex-direction: column; gap: 6px; }
.action {
  text-align: left; border: 0; background: var(--bg); padding: .85rem 1rem; border-radius: 14px; font-weight: 700; cursor: pointer; font-size: 1rem;
}
.action:hover { background: var(--accent-soft); }
.action.danger { color: #c23a4e; }
.actions-title { font-weight: 800; margin: 0 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps { padding-left: 1.3rem; margin: 0; }
.steps li { margin: .35rem 0; }
code { background: var(--accent-soft); padding: .1rem .35rem; border-radius: 6px; font-size: .85em; word-break: break-all; }

.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translate(-50%, 160%);
  background: var(--ink); color: var(--card); padding: .75rem 1.1rem; border-radius: 16px; font-weight: 700;
  max-width: calc(100% - 32px); width: max-content; z-index: 80; transition: transform .3s ease; box-shadow: 0 10px 30px -10px rgba(0,0,0,.4);
}
.toast.show { transform: translate(-50%, 0); }

/* =================== Cute layer =================== */
.hand { font-family: "Caveat", "Nunito", cursive; font-size: 1.3rem; font-weight: 600; }
.script { font-family: "Dancing Script", "Fraunces", cursive; font-weight: 700; letter-spacing: 0; }
.top h1 { font-size: clamp(2.1rem, 7vw, 2.9rem); line-height: 1; }
.login-card h1 { font-size: 2.6rem; }
.hello { font-family: "Caveat", "Nunito", cursive; font-size: 1.35rem; line-height: 1; margin-top: .2rem; }

/* Page content sits above the sprinkles */
.page, .login-wrap { position: relative; z-index: 1; }

/* ---- Mochi the mascot ---- */
.mochi { width: 100%; height: 100%; display: block; overflow: visible; }
.mochi-body { animation: mochi-bob 3.2s ease-in-out infinite; transform-origin: 60px 104px; }
.mochi-steam path { animation: mochi-steam 2.6s ease-in-out infinite; opacity: .8; }
.mochi-steam path:nth-child(2) { animation-delay: .5s; }
.mochi-steam path:nth-child(3) { animation-delay: 1s; }
.mochi-eyes { animation: mochi-blink 4.5s infinite; transform-origin: 60px 66px; }
@keyframes mochi-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-2deg); } }
@keyframes mochi-steam { 0% { transform: translateY(4px); opacity: 0; } 40% { opacity: .9; } 100% { transform: translateY(-8px); opacity: 0; } }
@keyframes mochi-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.mascot {
  position: relative; width: 66px; height: 66px; flex: none; border: 0; padding: 4px; cursor: pointer;
  background: var(--card); border-radius: 22px; box-shadow: 0 8px 20px -12px var(--accent-strong);
  -webkit-tap-highlight-color: transparent;
}
.mascot.hop { animation: mochi-hop .55s ease; }
@keyframes mochi-hop { 30% { transform: translateY(-8px) rotate(-6deg); } 60% { transform: translateY(0) rotate(4deg); } }
.mochi-say {
  position: absolute; left: 4px; top: calc(100% + 10px); z-index: 60; width: max-content; max-width: min(260px, 80vw);
  background: var(--card); color: var(--ink); font-weight: 800; font-size: .92rem; text-align: left;
  padding: .55rem .85rem; border-radius: 16px; box-shadow: 0 10px 28px -12px rgba(0,0,0,.35);
  opacity: 0; transform: translateY(-6px) scale(.9); transform-origin: 20px 0; pointer-events: none;
  transition: opacity .2s, transform .25s cubic-bezier(.3,1.5,.5,1);
}
.mochi-say::before { content: ""; position: absolute; top: -7px; left: 24px; border: 8px solid transparent; border-top: 0; border-bottom-color: var(--card); }
.mochi-say.show { opacity: 1; transform: none; }
.login-mascot { position: relative; width: 110px; height: 110px; margin: -8px auto 0; }
.login-say {
  position: absolute; right: -78px; top: 4px; background: var(--accent); color: var(--accent-ink);
  font-family: "Caveat", cursive; font-size: 1.25rem; font-weight: 700; padding: .15rem .7rem; border-radius: 14px 14px 14px 4px;
  animation: pop .5s .4s both;
}
.empty-mascot { width: 120px; height: 120px; margin: 0 auto 4px; }

/* ---- Sprinkles ---- */
#sprinkles { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#sprinkles .sp { position: absolute; top: -40px; display: block; animation: sp-fall linear infinite; will-change: transform; }
#sprinkles .sp i { display: block; width: 100%; height: 100%; animation: sp-sway ease-in-out infinite alternate; }
#sprinkles svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 1px 1px rgba(0,0,0,.06)); }
@keyframes sp-fall { from { transform: translateY(-5vh); } to { transform: translateY(110vh); } }
@keyframes sp-sway { from { transform: translateX(-18px) rotate(-25deg); } to { transform: translateX(18px) rotate(25deg); } }

/* ---- Bursts & confetti ---- */
.burst, .confetto { position: fixed; z-index: 90; pointer-events: none; display: block; }
.burst svg, .confetto svg { width: 100%; height: 100%; display: block; }

/* ---- Polaroid cards ---- */
.grid { gap: 22px 16px; padding-top: 8px; }
@media (max-width: 560px) { .grid { gap: 22px 12px; } }
.card {
  --tilt: 0deg; overflow: visible; border-radius: 10px; padding: 9px 9px 0;
  transform: rotate(var(--tilt)); transition: transform .25s ease, box-shadow .25s;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 14px 28px -20px rgba(30,40,60,.55);
  animation: card-in .45s ease both;
}
.grid .card:nth-child(4n+1) { --tilt: -1.4deg; }
.grid .card:nth-child(4n+2) { --tilt: 1.1deg; }
.grid .card:nth-child(4n+3) { --tilt: .7deg; }
.grid .card:nth-child(4n) { --tilt: -.8deg; }
.card:hover { transform: rotate(0) translateY(-3px); box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 20px 34px -20px rgba(30,40,60,.6); }
@keyframes card-in { from { opacity: 0; transform: translateY(10px) rotate(var(--tilt)) scale(.97); } to { opacity: 1; transform: rotate(var(--tilt)); } }
.card .thumb { border-radius: 4px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); }
.card .body { padding: 10px 4px 12px; }
/* washi tape */
.card::before {
  content: ""; position: absolute; z-index: 3; top: -11px; left: 50%; width: 76px; height: 22px;
  transform: translateX(-50%) rotate(-3deg); border-radius: 2px; opacity: .88;
  background: var(--accent-soft);
  background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--accent) 75%, #fff) 0 6px, color-mix(in srgb, var(--accent) 40%, #fff) 6px 12px);
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
  -webkit-mask: linear-gradient(90deg, transparent 0 2px, #000 2px calc(100% - 2px), transparent calc(100% - 2px));
          mask: linear-gradient(90deg, transparent 0 2px, #000 2px calc(100% - 2px), transparent calc(100% - 2px));
}
.grid .card:nth-child(even)::before { transform: translateX(-50%) rotate(4deg); left: 46%; }
/* reserved = wrapped with a bow instead of tape */
.card.is-reserved::before { display: none; }
.bow { position: absolute; z-index: 4; top: -20px; left: 50%; width: 62px; height: 40px; transform: translateX(-50%) rotate(-4deg); filter: drop-shadow(0 3px 4px rgba(0,0,0,.18)); }
.card.is-got::before { background: repeating-linear-gradient(-45deg, #ffe7a3 0 6px, #fff3cc 6px 12px); }
.notes { font-family: "Caveat", "Nunito", cursive; font-style: normal; font-size: 1.15rem; line-height: 1.15; color: var(--accent-strong); }
.card-actions .btn { border-radius: 12px; }
.ribbon { border-radius: 10px; }

/* little floating heart next to the add button */
.add-bar { position: relative; }

@media (prefers-reduced-motion: reduce) {
  .mochi-body, .mochi-steam path, .mochi-eyes, #sprinkles { animation: none !important; }
  #sprinkles { display: none; }
  .card { animation: none; }
}

/* keep toasts clear of an open edit sheet */
body:has(.sheet-backdrop:not([hidden])) .toast { bottom: auto; top: max(16px, env(safe-area-inset-top)); transform: translate(-50%, -160%); }
body:has(.sheet-backdrop:not([hidden])) .toast.show { transform: translate(-50%, 0); }

.toast { opacity: 0; visibility: hidden; transition: transform .3s ease, opacity .25s, visibility .3s; }
.toast.show { opacity: 1; visibility: visible; }

/* =================== Occasions, categories, secrets, notes =================== */
.countdown { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 0; }
.countdown[hidden] { display: none; }
.count-chip {
  border: 0; cursor: pointer; background: var(--card); color: var(--ink); font-weight: 700; font-size: .92rem;
  padding: .5rem .9rem; border-radius: 999px; box-shadow: 0 6px 16px -12px var(--accent-strong);
}
.count-chip b { font-family: "Fraunces", Georgia, serif; color: var(--accent-strong); font-size: 1.05rem; }
.count-chip.today { background: var(--accent); color: var(--accent-ink); animation: bump 1.2s ease-in-out infinite; }

.chips {
  display: flex; gap: 8px; overflow-x: auto; margin: 2px -16px 10px; padding: 4px 16px 6px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
}
.chips::-webkit-scrollbar { display: none; }
.chips[hidden] { display: none; }
.chip {
  flex: none; border: 1.5px solid transparent; background: var(--card); color: var(--muted); font-weight: 800; font-size: .88rem;
  padding: .42rem .8rem; border-radius: 999px; cursor: pointer; scroll-snap-align: start; white-space: nowrap;
  box-shadow: 0 2px 8px -6px rgba(0,0,0,.25);
}
.chip.on { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent); }
.chip-sep { flex: none; width: 1.5px; margin: 6px 2px; background: var(--line); border-radius: 2px; }
.linkish { border: 0; background: none; color: var(--accent-strong); font-weight: 800; text-decoration: underline; cursor: pointer; padding: 0; }

.labels { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.label { font-size: .72rem; font-weight: 800; color: var(--accent-strong); background: var(--accent-soft); padding: .12rem .5rem; border-radius: 999px; white-space: nowrap; }
.label.occ { background: color-mix(in srgb, var(--fav) 14%, #fff); color: color-mix(in srgb, var(--fav) 80%, #000); }

.envelope {
  display: flex; align-items: center; gap: .4rem; margin-top: 6px; width: 100%; text-align: left; cursor: pointer;
  border: 1.5px dashed color-mix(in srgb, var(--fav) 55%, #fff); background: color-mix(in srgb, var(--fav) 8%, #fff);
  color: color-mix(in srgb, var(--fav) 75%, #000); font-weight: 800; font-size: .82rem; padding: .4rem .6rem; border-radius: 10px;
}
.envelope span { font-size: 1.05rem; }
.envelope.open { border-style: solid; animation: bump 1.6s ease-in-out 2; }

/* secret mode toggle in the add bar (Joseph) */
.secret-toggle {
  flex: none; width: 44px; border: 0; border-radius: 50%; background: var(--bg); font-size: 1.2rem; cursor: pointer;
  filter: grayscale(1); opacity: .65; transition: all .2s;
}
.secret-toggle[aria-pressed="true"] { filter: none; opacity: 1; background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent-strong); }
.secret-badge { position: absolute; top: 10px; left: 10px; background: var(--ink); color: var(--card); font-weight: 800; font-size: .72rem; padding: .2rem .55rem; border-radius: 999px; }

/* mystery card (what Lily sees for a secret) */
.card.mystery .thumb {
  background:
    radial-gradient(circle at 20% 25%, color-mix(in srgb, var(--accent) 30%, #fff) 0 6px, transparent 7px),
    radial-gradient(circle at 75% 70%, color-mix(in srgb, var(--fav) 22%, #fff) 0 5px, transparent 6px),
    var(--accent-soft);
  background-size: 46px 46px, 38px 38px, auto;
}
.mystery-box { width: 100%; height: 100%; border: 0; background: none; cursor: pointer; display: grid; place-items: center; padding: 14%; }
.mystery-box .gift { width: 100%; height: 100%; animation: wiggle 3.5s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-6deg); } 88% { transform: rotate(5deg); } 92% { transform: rotate(-3deg); } 96% { transform: rotate(2deg); } }
.card.mystery .title { font-family: "Caveat", cursive; font-size: 1.35rem; line-height: 1.1; }

/* edit sheet additions */
.row2.even { grid-template-columns: 1fr 1fr; }
label.check { display: flex; align-items: center; gap: .5rem; font-weight: 700; background: var(--bg); padding: .7rem .85rem; border-radius: 14px; cursor: pointer; }
label.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent-strong); flex: none; }
.danger-text { color: #c23a4e; }
textarea.paper {
  font-family: "Caveat", cursive; font-size: 1.4rem; line-height: 1.5; background-color: #fffdf7;
  background-image: repeating-linear-gradient(transparent 0 calc(1.5em - 1px), color-mix(in srgb, var(--accent) 45%, #fff) calc(1.5em - 1px) 1.5em);
  background-attachment: local; padding-top: .3rem;
}

/* love letter */
.letter-sheet { background: transparent; box-shadow: none; padding: 0 12px 16px; }
.letter {
  position: relative; background: #fffdf7; border-radius: 6px; padding: 38px 26px 26px; margin: 20px 0 14px;
  box-shadow: 0 24px 50px -20px rgba(0,0,0,.45); transform: rotate(-1deg); animation: up .35s ease;
  background-image: repeating-linear-gradient(transparent 0 33px, color-mix(in srgb, var(--accent) 35%, #fff) 33px 34px);
  background-position: 0 30px;
}
.letter-seal {
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%); width: 48px; height: 48px; border-radius: 50%;
  background: var(--fav); color: #fff; display: grid; place-items: center; font-size: 1.4rem; font-weight: 800;
  box-shadow: 0 4px 10px -3px rgba(0,0,0,.35), inset 0 0 0 4px color-mix(in srgb, var(--fav) 70%, #000);
}
.letter p { margin: 0; font-family: "Caveat", cursive; color: #3a3140; }
.letter-to { font-size: 1.7rem; font-weight: 700; }
.letter-body { font-size: 1.5rem; line-height: 34px; white-space: pre-wrap; margin: 6px 0 12px !important; }
.letter-from { font-size: 1.6rem; font-weight: 700; text-align: right; }
.letter-for { font-size: 1.05rem; text-align: right; color: #8a7f8f !important; }
@media (max-width: 560px) { .letter-sheet { padding-bottom: max(16px, env(safe-area-inset-bottom)); } }
.chips { scroll-padding-inline: 16px; }
.countdown { flex-wrap: nowrap; overflow-x: auto; margin: 14px -16px 0; padding: 2px 16px 8px; scrollbar-width: none; }
.countdown::-webkit-scrollbar { display: none; }
.count-chip { flex: none; white-space: nowrap; }
@media (max-width: 420px) { .count-chip { font-size: .84rem; padding: .45rem .75rem; } }

/* =================== By-hand wishes, hearts back, memories =================== */
.thumb-link { display: block; width: 100%; height: 100%; text-decoration: none; }
.by-hand {
  display: block; margin: 8px auto 0; border: 0; background: none; cursor: pointer; color: var(--muted);
  font-weight: 700; font-size: .9rem; padding: .3rem .6rem;
}
.by-hand u { color: var(--accent-strong); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

.kind-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.kind {
  border: 2px solid var(--line); background: var(--bg); border-radius: 18px; padding: .8rem .6rem; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; color: var(--ink);
}
.kind span { font-size: 1.7rem; line-height: 1.1; }
.kind b { font-size: .95rem; }
.kind small { color: var(--muted); font-size: .76rem; font-weight: 600; }
.kind.on { border-color: var(--accent-strong); background: var(--accent-soft); }

.noimg.exp {
  font-size: 3.2rem;
  background:
    radial-gradient(circle at 22% 28%, #fff 0 5px, transparent 6px),
    radial-gradient(circle at 78% 72%, color-mix(in srgb, var(--fav) 30%, #fff) 0 5px, transparent 6px),
    linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--fav) 12%, #fff));
  background-size: 42px 42px, 36px 36px, auto;
}
.card .thumb img.mem { object-fit: cover; padding: 0; }
.card .thumb .sticker {
  position: absolute; right: 8px; bottom: 8px; width: 34%; aspect-ratio: 1; background: #fff; padding: 4px;
  border-radius: 6px; box-shadow: 0 4px 12px -4px rgba(0,0,0,.35); transform: rotate(6deg); z-index: 2;
}
.card .thumb .sticker img { width: 100%; height: 100%; object-fit: contain; padding: 0; }
.card.is-got .ribbon { right: auto; max-width: 60%; font-size: .74rem; }
.caption { margin: 2px 0 0; font-family: "Caveat", cursive; font-size: 1.2rem; line-height: 1.15; color: var(--ink); }

.reply {
  margin-top: 6px; font-size: .82rem; font-weight: 600; color: color-mix(in srgb, var(--fav) 75%, #000);
  background: color-mix(in srgb, var(--fav) 10%, #fff); border-radius: 10px; padding: .35rem .55rem; overflow-wrap: anywhere;
}
.reply.new { box-shadow: 0 0 0 2px var(--fav); animation: bump 1s ease-in-out 3; }

.memory-pick { display: block; cursor: pointer; margin-bottom: 14px; }
.memory-preview {
  display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; background: #fff; border-radius: 8px; overflow: hidden;
  border: 10px solid #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 14px 28px -18px rgba(0,0,0,.45); transform: rotate(-1.2deg);
  font-size: 2.2rem; text-align: center; color: var(--muted); outline: 2px dashed var(--line); outline-offset: -2px;
}
.memory-preview small { font-size: .9rem; font-weight: 700; }
.memory-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview img { object-fit: cover; }

.letter-reply { text-align: center; margin: -2px 0 10px; }
.letter-reply .sent { margin: 0 0 4px; color: #fff; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.letter-reply .linkish { color: #fff; }

/* =================== Delivery addresses =================== */
.under-add { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px; margin-top: 8px; }
.under-add .by-hand { margin: 0; }
.deliver-pill {
  display: inline-flex; align-items: center; gap: .35rem; background: var(--card); border-radius: 999px;
  padding: .2rem .25rem .2rem .8rem; font-weight: 700; font-size: .88rem; color: var(--muted);
  box-shadow: 0 4px 12px -8px var(--accent-strong);
}
.deliver-pill[hidden], .deliver-setup[hidden] { display: none; }
.deliver-pill select {
  width: auto; margin: 0; padding: .3rem 1.8rem .3rem .6rem; border-radius: 999px; font-size: 16px; font-weight: 800;
  color: var(--accent-strong); background-color: var(--accent-soft); border-color: transparent;
}
.deliver-setup { border: 0; background: none; cursor: pointer; font-weight: 700; font-size: .9rem; color: var(--muted); }
.deliver-setup u { color: var(--accent-strong); text-underline-offset: 3px; }
.deliver {
  align-self: flex-start; margin-top: 4px; border: 0; cursor: pointer; background: var(--bg); color: var(--ink);
  font-weight: 700; font-size: .76rem; padding: .18rem .55rem; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line);
}
.addr-list { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 12px; }
.addr-card { background: var(--bg); border-radius: 16px; padding: .8rem .95rem; box-shadow: inset 0 0 0 1.5px var(--line); }
.addr-card.big { background: var(--accent-soft); font-size: 1.05rem; margin-bottom: 12px; }
.addr-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.addr-default { font-size: .75rem; font-weight: 800; color: var(--accent-strong); background: var(--card); padding: .1rem .5rem; border-radius: 999px; }
.addr-lines { line-height: 1.45; }
.addr-note { margin-top: 4px; font-size: .88rem; color: var(--muted); }
.addr-actions { display: flex; gap: 14px; margin-top: 8px; }
.kind-pick.three { grid-template-columns: repeat(3, 1fr); }
.kind-pick.three .kind { padding: .6rem .4rem; }
#addrForm[hidden], #addrListView[hidden] { display: none; }

/* hidden always wins over component display rules */
[hidden] { display: none !important; }
