/* ============ Thème ============ */
:root {
  --bg: #fbf6f2;
  --surface: #ffffff;
  --surface-2: #f6efe9;
  --text: #2a2321;
  --muted: #8b807a;
  --border: #f0e7e0;
  --accent: #f0645a;
  --accent-hover: #e2544a;
  --accent-text: #ffffff;
  --accent-soft: #fde8e5;
  --ok: #23996c;
  --ok-soft: #e1f4ea;
  --danger: #d6453b;
  --shadow-sm: 0 1px 2px rgba(60, 30, 20, .04);
  --shadow: 0 2px 6px rgba(60, 30, 20, .04), 0 10px 30px rgba(60, 30, 20, .06);
  --overlay: rgba(42, 35, 33, .38);
  --tint-0: #ffe4d6; --tint-1: #dcf3e7; --tint-2: #e9e2fc;
  --tint-3: #ddebfc; --tint-4: #fff0c7; --tint-5: #fde1ea;
  --radius-lg: 24px;
  --radius: 18px;
  --radius-sm: 12px;
  --tabbar-h: 72px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161316;
    --surface: #211d21;
    --surface-2: #2b262b;
    --text: #f4eeea;
    --muted: #a69c97;
    --border: #353035;
    --accent: #ff7a6f;
    --accent-hover: #ff8d84;
    --accent-text: #2a0f0c;
    --accent-soft: #3d2423;
    --ok: #4fd39c;
    --ok-soft: #1b3329;
    --danger: #ff7a70;
    --shadow-sm: none;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --overlay: rgba(0, 0, 0, .6);
    --tint-0: #3e2a22; --tint-1: #1f3529; --tint-2: #2c2640;
    --tint-3: #1f2c3d; --tint-4: #3a331c; --tint-5: #3c2430;
    color-scheme: dark;
  }
}

/* ============ Base ============ */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.5 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom));
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon.lg { width: 24px; height: 24px; }

main { max-width: 1080px; margin: 0 auto; padding: 8px 16px 32px; }
.stack { display: grid; gap: 28px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head a, .link { color: var(--accent); font-weight: 600; font-size: .9rem; cursor: pointer; background: none; border: 0; padding: 0; font-family: inherit; }

/* ============ En-tête & navigation ============ */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1080px; margin: 0 auto; padding: 14px 16px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; letter-spacing: -0.02em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-text);
}
.brand-mark .icon { width: 19px; height: 19px; }
.topnav { display: none; gap: 4px; background: var(--surface); padding: 5px; border-radius: 999px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.topnav a { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; font-weight: 600; color: var(--muted); font-size: .92rem; }
.topnav a:hover { color: var(--text); }
.topnav a.active { background: var(--accent-soft); color: var(--accent); }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.tabbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
  height: var(--tabbar-h); display: grid; grid-template-columns: 1fr 1fr 76px 1fr 1fr; align-items: center;
  background: var(--surface); border-radius: 26px; box-shadow: var(--shadow); border: 1px solid var(--border);
  padding: 0 6px;
}
.tabbar a { display: grid; justify-items: center; gap: 3px; font-size: .7rem; font-weight: 600; color: var(--muted); padding: 8px 0; }
.tabbar a.active { color: var(--accent); }
.tabbar a.active .tab-ico { background: var(--accent-soft); }
.tab-ico { width: 48px; height: 30px; border-radius: 999px; display: grid; place-items: center; transition: background .2s; }
.fab {
  justify-self: center; width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-text); display: grid; place-items: center;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 45%, transparent);
  transform: translateY(-18px); transition: transform .15s, background .15s;
}
.fab:hover { background: var(--accent-hover); }
.fab:active { transform: translateY(-18px) scale(.95); }
.fab .icon { width: 26px; height: 26px; stroke-width: 2.3; }

@media (min-width: 820px) {
  body { padding-bottom: 40px; }
  .topnav { display: flex; }
  .tabbar { display: none; }
  main { padding: 16px 24px 40px; }
  .topbar { padding: 18px 24px; }
  h1 { font-size: 2.1rem; }
}

/* ============ Boutons & champs ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 700; font-size: .92rem;
  cursor: pointer; white-space: nowrap; transition: background .15s, transform .1s, border-color .15s;
}
.btn:hover { border-color: color-mix(in srgb, var(--text) 18%, transparent); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.soft { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--surface-2); }
.btn.danger { color: var(--danger); }
.btn.sm { height: 36px; padding: 0 14px; font-size: .85rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
  display: inline-grid; place-items: center; cursor: pointer; color: var(--text); flex: none; transition: background .15s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.sm { width: 34px; height: 34px; }
.icon-btn.sm .icon { width: 17px; height: 17px; }

.field { display: grid; gap: 6px; }
.field > span { font-size: .82rem; font-weight: 700; color: var(--muted); }
.input, input[type=text], input[type=url], input[type=password], input[type=search], input[type=date], textarea, select {
  width: 100%; height: 48px; padding: 0 16px; border-radius: 14px; border: 1.5px solid transparent;
  background: var(--surface-2); color: var(--text); font: inherit; font-size: .95rem; transition: border-color .15s, background .15s;
}
textarea { height: auto; min-height: 84px; padding: 12px 16px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); background: var(--surface); }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.searchbar { position: relative; }
.searchbar .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.searchbar input { padding-left: 46px; height: 52px; border-radius: 16px; background: var(--surface); border-color: var(--border); }

.toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; }
.toggle input { appearance: none; width: 46px; height: 28px; border-radius: 999px; background: var(--border); position: relative; cursor: pointer; flex: none; transition: background .2s; margin: 0; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.toggle input:checked { background: var(--accent); }
.toggle input:checked::after { transform: translateX(18px); }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); font: inherit; font-size: .85rem; font-weight: 600;
  color: var(--text); cursor: pointer; white-space: nowrap;
}
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .count { opacity: .6; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill .icon { width: 13px; height: 13px; stroke-width: 2.4; }

/* ============ Cartes ============ */
.card { background: var(--surface); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-weight: 800; font-size: .85rem; color: #4a2c22; border: 2px solid var(--surface);
}
.avatar.lg { width: 84px; height: 84px; font-size: 1.9rem; border-width: 4px; }
.avatar.md { width: 48px; height: 48px; font-size: 1.05rem; }

.hello { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 4px; }
.hello p { margin-top: 4px; }

.hero-banner {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 22px;
  background: linear-gradient(135deg, var(--tint-0), var(--tint-5));
}
.hero-banner > :not(.big-emoji) { position: relative; z-index: 1; }
.hero-banner h2 { font-size: 1.25rem; max-width: 70%; }
.hero-banner p { margin-top: 6px; max-width: 70%; color: color-mix(in srgb, var(--text) 70%, transparent); font-size: .9rem; }
.hero-banner .big-emoji { position: absolute; right: 14px; bottom: -8px; font-size: 5.2rem; transform: rotate(-8deg); filter: drop-shadow(0 8px 14px rgba(0,0,0,.12)); }

/* Cartes de liste (pastel) */
.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.list-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 172px;
  padding: 18px; border-radius: var(--radius-lg); background: var(--tint, var(--tint-0));
  transition: transform .15s, box-shadow .15s; overflow: hidden;
}
.list-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.list-card .emoji { font-size: 2.2rem; line-height: 1; }
.list-card h3 { font-size: 1.15rem; padding-right: 40px; }
.list-card .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.list-card .meta .pill { background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--text); }
.list-card .go { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; }
.list-card .go .icon { width: 18px; height: 18px; }
.list-card .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.list-card .owner { display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; }
.list-card .owner .avatar { width: 28px; height: 28px; font-size: .72rem; }
.progress { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 60%, transparent); overflow: hidden; flex: 1; max-width: 120px; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.new-card {
  display: grid; place-items: center; align-content: center; gap: 10px; min-height: 172px; border-radius: var(--radius-lg);
  border: 2px dashed var(--border); color: var(--muted); font-weight: 700; cursor: pointer; background: transparent; font: inherit;
  transition: border-color .15s, color .15s;
}
.new-card:hover { border-color: var(--accent); color: var(--accent); }
.new-card .icon-btn { pointer-events: none; }

/* Événements à venir */
.hscroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 16px 6px; margin: 0 -16px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.event-card {
  scroll-snap-align: start; flex: none; width: 168px; display: grid; gap: 8px; padding: 14px;
  background: var(--surface); border-radius: 20px; border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.event-card .top { display: flex; align-items: flex-start; justify-content: space-between; }
.event-card .emoji { font-size: 1.9rem; line-height: 1; }
.date-badge { display: grid; text-align: center; border-radius: 10px; overflow: hidden; min-width: 40px; background: var(--surface-2); }
.date-badge small { background: var(--accent); color: var(--accent-text); font-size: .62rem; font-weight: 800; text-transform: uppercase; padding: 1px 6px; }
.date-badge b { font-size: 1rem; padding: 2px 6px 3px; }
.event-card h3 { font-size: .95rem; }
.event-card .when { font-size: .78rem; color: var(--accent); font-weight: 700; display: flex; align-items: center; gap: 5px; }
.event-card .when::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Famille : regroupement par membre */
.member-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.member-row h3 { flex: 1; }
.people { display: grid; gap: 10px; }
.person {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface);
  border-radius: 20px; border: 1px solid var(--border); transition: transform .15s;
}
.person:hover { transform: translateX(3px); }
.person > div { flex: 1; min-width: 0; }

/* ============ Idées (grille produits) ============ */
.items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
@media (min-width: 560px) { .items { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } }
@media (min-width: 820px) { .items { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 24px 18px; } }
.item { display: grid; gap: 10px; cursor: pointer; text-align: left; background: none; border: 0; padding: 0; font: inherit; color: inherit; }
.item .thumb {
  position: relative; aspect-ratio: 1; border-radius: 22px; background: var(--surface-2); overflow: hidden;
  display: grid; place-items: center; transition: transform .2s;
}
.item:hover .thumb { transform: scale(1.015); }
.item .thumb img { width: 100%; height: 100%; object-fit: contain; padding: 12%; mix-blend-mode: multiply; }
.item .thumb img.photo { object-fit: cover; padding: 0; mix-blend-mode: normal; }
@media (prefers-color-scheme: dark) { .item .thumb img { mix-blend-mode: normal; } .item .thumb { background: #f3eeea; } }
.item .thumb .placeholder { font-size: 3rem; opacity: .9; }
.item .status { position: absolute; top: 10px; left: 10px; }
.item .status .pill { background: var(--surface); box-shadow: var(--shadow-sm); }
.item .status .pill.ok { background: var(--ok); color: #fff; }
.item.reserved .thumb > img, .item.reserved .thumb .placeholder { opacity: .45; filter: grayscale(.6); }
.item .check-btn {
  position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: var(--surface); color: var(--muted); display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,.12); transition: transform .1s, background .15s, color .15s;
}
.item .check-btn:hover { color: var(--ok); }
.item .check-btn:active { transform: scale(.9); }
.item .check-btn.on { background: var(--ok); color: #fff; }
.item .check-btn .icon { stroke-width: 2.6; width: 18px; height: 18px; }
.item .info { display: grid; gap: 2px; padding: 0 4px; }
.item .info h3 { font-size: .93rem; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .info .price { font-weight: 700; font-size: .95rem; }
.item .info .by { font-size: .78rem; color: var(--ok); font-weight: 600; }

/* ============ Page liste ============ */
.list-hero { display: grid; gap: 14px; padding: 22px; border-radius: var(--radius-lg); background: var(--tint, var(--tint-0)); }
.list-hero .row1 { display: flex; align-items: flex-start; gap: 16px; }
.list-hero .emoji-big { font-size: 3rem; line-height: 1; width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: color-mix(in srgb, var(--surface) 65%, transparent); flex: none; }
.list-hero .owner { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; margin-top: 8px; }
.list-hero .owner .avatar { width: 26px; height: 26px; font-size: .7rem; }
.list-hero .pill { background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--text); }
.list-hero .desc { color: color-mix(in srgb, var(--text) 75%, transparent); }
.list-hero .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.list-hero .actions .btn:not(.primary) { background: color-mix(in srgb, var(--surface) 75%, transparent); border-color: transparent; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.page-head .title { font-weight: 700; }

.empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .big { font-size: 3rem; }

/* Résultats / lignes */
.rows { display: grid; gap: 4px; }
.row-item { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 16px; transition: background .15s; }
.row-item:hover { background: var(--surface-2); }
.row-item .mini { width: 58px; height: 58px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; flex: none; font-size: 1.6rem; }
.row-item .mini img { width: 100%; height: 100%; object-fit: cover; }
.row-item > div { flex: 1; min-width: 0; }
.row-item h3 { font-size: .93rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-links { display: flex; flex-wrap: wrap; gap: 8px; }

/* ============ Fenêtres (sheet) ============ */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50; background: var(--overlay); display: flex; align-items: flex-end; justify-content: center;
  animation: fade .2s ease;
}
.sheet {
  width: 100%; max-height: 92vh; overflow-y: auto; background: var(--surface); border-radius: 28px 28px 0 0;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom)); animation: up .28s cubic-bezier(.2,.9,.3,1);
}
.sheet .grabber { width: 42px; height: 5px; border-radius: 999px; background: var(--border); margin: 0 auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sheet-head h2 { font-size: 1.2rem; }
@media (min-width: 680px) {
  .sheet-backdrop { align-items: center; padding: 24px; }
  .sheet { max-width: 560px; border-radius: 28px; padding: 22px 26px 26px; animation: pop .22s ease; }
  .sheet .grabber { display: none; }
  .sheet.wide { max-width: 820px; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: .5; } }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.form { display: grid; gap: 14px; }
.form-msg { font-size: .85rem; color: var(--muted); min-height: 1.2em; }
.form-msg.err { color: var(--danger); }

/* Détail d'une idée */
.detail { display: grid; gap: 20px; }
@media (min-width: 680px) { .detail { grid-template-columns: 1fr 1fr; align-items: start; } .detail .pic { aspect-ratio: 1; } }
.detail .pic { aspect-ratio: 4 / 3; border-radius: 24px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; font-size: 5rem; }
.detail .pic img { width: 100%; height: 100%; object-fit: contain; padding: 8%; mix-blend-mode: multiply; }
.detail .pic img.photo { object-fit: cover; padding: 0; mix-blend-mode: normal; }
@media (prefers-color-scheme: dark) { .detail .pic { background: #f3eeea; } .detail .pic img { mix-blend-mode: normal; } }
.detail .body { display: grid; gap: 14px; align-content: start; }
.detail h2 { font-size: 1.45rem; }
.detail .price { font-size: 1.3rem; font-weight: 800; }
.detail .note { white-space: pre-wrap; color: color-mix(in srgb, var(--text) 80%, transparent); }
.status-box { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface-2); }
.status-box.ok { background: var(--ok-soft); color: var(--ok); font-weight: 600; }

/* Formulaire d'idée */
.photo-pick { display: flex; gap: 14px; align-items: center; }
.photo-pick .pv { width: 96px; height: 96px; border-radius: 20px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; flex: none; font-size: 2.2rem; }
.photo-pick .pv img { width: 100%; height: 100%; object-fit: cover; }
.photo-pick .btns { display: flex; flex-wrap: wrap; gap: 8px; }
.url-row { display: flex; gap: 8px; }
.url-row input { flex: 1; min-width: 0; }
.two { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 520px) { .two { grid-template-columns: 1fr 1fr; } }
.emoji-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.emoji-pick button { width: 46px; height: 46px; border-radius: 14px; border: 2px solid transparent; background: var(--surface-2); font-size: 1.4rem; cursor: pointer; }
.emoji-pick button.on { border-color: var(--accent); background: var(--accent-soft); }

/* ============ Connexion ============ */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-box { width: 100%; max-width: 420px; display: grid; gap: 22px; }
.auth-visual { position: relative; height: 210px; display: grid; place-items: center; }
.auth-visual .blob {
  position: absolute; width: 210px; height: 210px; border-radius: 42% 58% 61% 39% / 47% 41% 59% 53%;
  background: radial-gradient(circle at 30% 30%, #ffd2c2, #f7a1b5 55%, #c9b6f5);
  filter: blur(2px); animation: morph 9s ease-in-out infinite;
}
.auth-visual .gift { position: relative; font-size: 5.5rem; filter: drop-shadow(0 12px 20px rgba(0,0,0,.18)); animation: float 4s ease-in-out infinite; }
.auth-visual .bubble {
  position: absolute; background: var(--surface); border-radius: 16px; padding: 8px 12px; font-size: .78rem; font-weight: 600;
  box-shadow: var(--shadow); white-space: nowrap;
}
.auth-visual .b1 { top: 18px; left: 0; }
.auth-visual .b2 { bottom: 26px; right: 0; }
@keyframes morph { 50% { border-radius: 58% 42% 39% 61% / 41% 57% 43% 59%; transform: rotate(18deg) scale(1.04); } }
@keyframes float { 50% { transform: translateY(-8px) rotate(-4deg); } }
.auth h1 { text-align: center; font-size: 2rem; }
.auth .lead { text-align: center; color: var(--muted); margin-top: 8px; }
.auth .switch { text-align: center; font-size: .9rem; color: var(--muted); }
.hl { position: relative; white-space: nowrap; }
.hl::after { content: ""; position: absolute; left: -6px; right: -6px; top: -4px; bottom: -6px; border: 2px solid var(--accent); border-radius: 50%; transform: rotate(-3deg); opacity: .8; }

/* ============ Illustrations SVG ============ */
.ill { display: block; width: 100%; height: 100%; flex: none; }
.ill.xs { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; }
.ill.sm { display: inline-block; width: 22px; height: 22px; vertical-align: -6px; }
.ill.xl { width: 104px; height: 104px; }
.art-md { width: 56px; height: 56px; flex: none; }
.list-card .emoji {
  width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}
.list-card .emoji .ill { width: 38px; height: 38px; }
.event-card .emoji { width: 42px; height: 42px; }
.list-hero .emoji-big .ill { width: 50px; height: 50px; }
.item .thumb .placeholder, .detail .pic > .ill, .detail .pic .placeholder { width: 42%; height: auto; aspect-ratio: 1; opacity: .9; display: block; }
.item .thumb .placeholder .ill, .detail .pic .placeholder .ill { width: 100%; height: 100%; }
.row-item .mini > .ill, .row-item .mini .placeholder { width: 36px; height: 36px; }
.photo-pick .pv > .ill { width: 54px; height: 54px; }
.emoji-pick button { display: grid; place-items: center; padding: 0; width: 52px; height: 52px; }
.emoji-pick button .ill { width: 32px; height: 32px; }
.hero-banner .big-emoji { width: 112px; height: 112px; right: 10px; bottom: -6px; font-size: 0; }
.hero-banner .big-emoji.top { top: 14px; bottom: auto; width: 76px; height: 76px; transform: rotate(8deg); }
.auth-visual .gift { width: 128px; height: 128px; }
.auth-visual .float { position: absolute; animation: float 5s ease-in-out infinite; }
.auth-visual .f1 { width: 38px; height: 38px; top: 34px; right: 54px; animation-delay: -1.5s; }
.auth-visual .f2 { width: 44px; height: 44px; bottom: 12px; left: 46px; animation-delay: -3s; }
.auth-visual .bubble { display: inline-flex; align-items: center; gap: 8px; z-index: 1; }
.empty .big { display: grid; place-items: center; }
.status-box .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 4px var(--ok-soft); }
.pill .ill.xs { width: 15px; height: 15px; }

/* ============ Divers ============ */
body.no-chrome { padding-bottom: 0; }
body.guest { padding-bottom: 40px; }
.desk-only { display: none !important; }
@media (min-width: 820px) { .desk-only { display: inline-flex !important; } }
#toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 34px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: .9rem;
  transition: transform .25s, opacity .25s; max-width: calc(100% - 32px); text-align: center;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; }
@media (min-width: 820px) { #toast { bottom: 28px; } }
.loading { display: grid; place-items: center; padding: 80px 0; color: var(--muted); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.copy-box { display: flex; gap: 8px; }
.copy-box input { flex: 1; min-width: 0; font-size: .85rem; }
kbd { font: inherit; font-size: .8rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); }
.bm-btn { cursor: grab; }
ol.steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
