/* Dog dating — "Biscuit & Coral". Warm, rounded, mobile-first; light + dark; no build step. */
[hidden] { display: none !important; }

:root {
  color-scheme: light dark;
  --bg: #FFF8F1; --surface: #FFFFFF; --surface-2: #F5ECE3; --line: #ECDDD0;
  --ink: #1F1A17; --muted: #6B5F57;
  --brand: #FF5A4E; --brand-strong: #D7372C; --on-brand: #FFFFFF;
  --like: #12A150; --nope: #E5484D; --scrim: rgba(20, 12, 8, .55);
  --hero: linear-gradient(160deg, #FF8A5B, #FF5A4E 55%, #E8407A);
  --sh1: 0 1px 2px rgb(0 0 0 / .06), 0 1px 1px rgb(0 0 0 / .04);
  --sh2: 0 8px 24px rgb(60 30 10 / .12);
  --sh3: 0 20px 48px rgb(60 30 10 / .22);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: Nunito, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14100E; --surface: #1F1916; --surface-2: #2A221E; --line: #3A2F29;
    --ink: #F6EEE7; --muted: #B4A79D;
    --brand: #FF6E61; --brand-strong: #FF6E61; --on-brand: #1A0D0A;
    --like: #3DD68C; --nope: #FF6369; --scrim: rgba(0, 0, 0, .65);
    --sh1: 0 1px 2px rgb(0 0 0 / .5); --sh2: 0 8px 24px rgb(0 0 0 / .5); --sh3: 0 20px 48px rgb(0 0 0 / .6);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { margin: 0; font: 400 15px/1.45 var(--font); background: var(--bg); color: var(--ink); overflow: hidden; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
img { -webkit-user-drag: none; }
.i { display: inline-flex; width: 24px; height: 24px; flex: none; }
.i svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── app shell ─────────────────────────────────────────────────────────────── */
#app { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100vh; height: 100dvh; max-width: 440px; margin-inline: auto;
  background: var(--bg); position: relative; overflow: hidden; transform: translateZ(0); }
@media (min-width: 600px) {
  body { background: var(--surface-2); display: grid; place-items: center; }
  #app { width: 440px; height: min(calc(100dvh - 48px), 900px); border-radius: 28px; box-shadow: var(--sh3); }
}
#topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 56px;
  padding: calc(8px + env(safe-area-inset-top)) var(--s4) var(--s2); }
#title { font-size: 22px; font-weight: 900; letter-spacing: -.01em; }
.top-right { display: flex; align-items: center; gap: var(--s2); }
main { display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--s4) var(--s4); position: relative; }
.tab { flex: 1 0 auto; }
#swipe:not([hidden]) { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; }

/* ── buttons ───────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 48px; padding: 0 22px; border: 0;
  border-radius: 999px; background: var(--brand-strong); color: var(--on-brand); font-weight: 800; transition: transform .15s var(--ease), opacity .15s; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn.block { width: 100%; }
.btn:active, .icon-btn:active, .round:active { transform: scale(.96); }
.btn:disabled, .icon-btn:disabled { opacity: .5; cursor: default; }
[aria-busy="true"]::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .7s linear infinite; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface); box-shadow: var(--sh1); color: var(--ink); transition: transform .15s var(--ease); }
.link { background: none; border: 0; padding: var(--s2); color: var(--muted); font-weight: 700; text-decoration: underline; }

/* ── bottom tab bar ────────────────────────────────────────────────────────── */
#tabs { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
#tabs button { position: relative; display: grid; justify-items: center; align-content: center; gap: 2px; height: 64px; border: 0; background: none; color: var(--muted); font-size: 11px; font-weight: 700; }
#tabs button[aria-current="page"] { color: var(--brand); }
#tabs button[aria-current="page"]::before { content: ""; position: absolute; top: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--brand); }
#tabs button[aria-current="page"] .i { animation: pop .3s var(--ease); }
#tabs .badge { position: absolute; top: 8px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--nope); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }

/* ── swiping-as chip ───────────────────────────────────────────────────────── */
#as-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px 0 6px; border-radius: 999px; background: var(--surface); box-shadow: var(--sh1); font-weight: 800; font-size: 14px; max-width: 170px; }
#as-chip .avatar { width: 28px; height: 28px; }
#as-chip #as-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#as-chip .i { width: 16px; height: 16px; color: var(--muted); }
#as-chip select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* ── photos + avatars ──────────────────────────────────────────────────────── */
.ph { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; background: var(--surface-2); }
.ph.in { opacity: 1; }
.nophoto { display: grid; place-items: center; width: 100%; height: 100%; background: var(--surface-2); font-size: 2em; }
.avatar { display: block; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex: none; background: var(--surface-2); font-size: 22px; }
.avatar .nophoto { font-size: 1em; }

/* ── states ────────────────────────────────────────────────────────────────── */
.empty { display: grid; justify-items: center; align-content: center; gap: var(--s3); text-align: center; padding: var(--s6) var(--s4); min-height: 60%; flex: 1; }
.empty .art { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; background: var(--surface-2); font-size: 48px; }
.empty h2 { font-size: 20px; font-weight: 800; }
.empty p { color: var(--muted); max-width: 28ch; }
.skel { background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 20px; }
.skel.card { flex: 1; min-height: 0; border-radius: 28px; }
.skel.row { height: 72px; margin-bottom: var(--s3); }
.skel.tile { aspect-ratio: 4 / 5; }

/* ── toasts ────────────────────────────────────────────────────────────────── */
#status { position: absolute; z-index: 40; top: calc(60px + env(safe-area-inset-top)); left: var(--s4); right: var(--s4); display: grid; gap: var(--s2); justify-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; max-width: 100%; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); box-shadow: var(--sh2); font-weight: 700; pointer-events: auto; animation: toast-in .25s var(--ease); }
.toast .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--like); flex: none; }
.toast.err .dot { background: var(--nope); }
.toast button { background: none; border: 0; color: inherit; padding: 0 0 0 4px; font-size: 16px; opacity: .7; }
.toast.out { opacity: 0; transform: translateY(-8px); transition: .2s; }

/* ── sign-in ───────────────────────────────────────────────────────────────── */
#splash { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: var(--bg); font-size: 64px; animation: pulse 1s ease-in-out infinite; }
#signin { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: 1fr auto; background: var(--hero); color: #fff; overflow-y: auto; }
#signin .top { display: grid; align-content: center; justify-items: center; gap: var(--s4); padding: calc(var(--s6) + env(safe-area-inset-top)) var(--s5) var(--s5); text-align: center; }
#signin .floaters { display: flex; }
#signin .floaters span { display: grid; place-items: center; width: 88px; height: 88px; margin-inline: -8px; border-radius: 50%; background: rgb(255 255 255 / .22); font-size: 44px; animation: bob 6s ease-in-out infinite; }
#signin .floaters span:nth-child(2) { animation-delay: -2s; margin-top: -24px; }
#signin .floaters span:nth-child(3) { animation-delay: -4s; }
#signin h1 { font-size: 40px; line-height: 1.05; font-weight: 900; letter-spacing: -.02em; max-width: 12ch; }
#signin .sub { font-size: 17px; font-weight: 600; opacity: .95; }
#signin .card { width: min(100%, 440px); margin-inline: auto; padding: var(--s5) var(--s5) calc(var(--s5) + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: var(--surface); color: var(--ink); display: grid; gap: var(--s3); animation: sheet-up .4s var(--ease); }
#signin h2 { font-size: 20px; font-weight: 800; }
#signin form { display: grid; gap: var(--s3); }
#signin .hint { color: var(--muted); }
#code { text-align: center; font-size: 28px; font-weight: 800; letter-spacing: .5em; padding-left: .5em; }

/* ── forms ─────────────────────────────────────────────────────────────────── */
input, select, textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; }
textarea { resize: none; }
label.field { display: grid; gap: 6px; font-size: 13px; font-weight: 800; color: var(--muted); }
.row-inline { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.stepper { display: grid; grid-template-columns: 44px 1fr 44px; gap: 6px; }
.stepper button { border: 2px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 20px; font-weight: 800; }
.stepper input { text-align: center; }
.segmented { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 6px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; }
.segmented span { display: grid; place-items: center; min-height: 48px; padding: 0 8px; border: 2px solid var(--line); border-radius: 12px; text-align: center; font-size: 14px; font-weight: 800; color: var(--ink); }
.segmented input:checked + span { background: var(--brand-strong); border-color: var(--brand-strong); color: var(--on-brand); }
.segmented input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.counter { justify-self: end; font-weight: 600; font-size: 12px; }
.dropzone { position: relative; display: grid; place-items: center; align-content: center; gap: 4px; height: 200px; width: 100%; border-radius: 20px; border: 2px dashed var(--line); background: var(--surface-2) center / cover no-repeat; color: var(--muted); font-weight: 800; cursor: pointer; overflow: hidden; }
.dropzone .em { font-size: 36px; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; }
.dropzone.has { border-style: solid; color: transparent; }
.dropzone.has .em { display: none; }
.loc { display: grid; gap: var(--s2); }
.loc-state { font-size: 13px; font-weight: 700; color: var(--muted); }
.loc-state.ok { color: var(--like); }
.loc-state.bad { color: var(--nope); }
.loc details summary { color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer; padding: 4px 0; }

/* ── dialogs / sheets ──────────────────────────────────────────────────────── */
dialog { color: var(--ink); }
dialog::backdrop { background: var(--scrim); }
dialog.sheet { border: 0; padding: 0; margin: auto auto 0; width: min(100%, 440px); max-width: 440px; max-height: 92dvh; background: var(--surface); border-radius: 28px 28px 0 0; box-shadow: var(--sh3); overflow: hidden; }
dialog.sheet[open] { display: flex; flex-direction: column; animation: sheet-up .32s var(--ease); }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 10px auto 0; flex: none; }
.sheet header { display: flex; align-items: center; justify-content: space-between; padding: var(--s3) 20px var(--s2); flex: none; }
.sheet header h2 { font-size: 20px; font-weight: 900; }
.sheet .body { min-height: 0; overflow-y: auto; padding: 0 20px var(--s4); display: grid; gap: var(--s4); }
.sheet .foot { padding: var(--s3) 20px calc(var(--s3) + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex: none; background: var(--surface); }
.sheet form { display: contents; }
.list-row { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 56px; padding: 0 var(--s2); border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font-weight: 700; }
.list-row.danger { color: var(--nope); }
.list-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.list-row .muted { color: var(--muted); font-weight: 600; font-size: 13px; }

/* ── swipe deck ────────────────────────────────────────────────────────────── */
#deck { flex: 1; display: flex; flex-direction: column; min-height: 0; --p: 0; }
.stage { position: relative; flex: 1; min-height: 0; padding-top: 4px; }
.swipe-card { position: absolute; inset: 4px 0 0; border-radius: 28px; overflow: hidden; background: var(--surface-2); box-shadow: var(--sh3); user-select: none; -webkit-user-select: none; }
.swipe-card.top { touch-action: none; cursor: grab; will-change: transform; }
.swipe-card.top:active { cursor: grabbing; }
.swipe-card.peek { transform: scale(calc(.94 + .06 * var(--p))) translateY(calc(14px * (1 - var(--p)))); opacity: .9; pointer-events: none; }
.swipe-card .shade { position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / .78), transparent 55%); pointer-events: none; }
.swipe-card .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px; color: #fff; pointer-events: none; }
.info h2 { font-size: 28px; font-weight: 900; line-height: 1.1; }
.info h2 span { font-weight: 400; margin-left: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { padding: 4px 10px; border-radius: 999px; background: rgb(255 255 255 / .18); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 13px; font-weight: 700; }
.info .bio { margin-top: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; opacity: .95; }
.swipe-card.open .bio { -webkit-line-clamp: unset; display: block; max-height: 40vh; overflow-y: auto; pointer-events: auto; }
.swipe-card.open .shade { background: linear-gradient(to top, rgb(0 0 0 / .88), rgb(0 0 0 / .2) 80%); }
.stamp { position: absolute; top: 28px; padding: 0 12px; border: 4px solid; border-radius: 10px; font-size: 32px; font-weight: 900; letter-spacing: .05em; opacity: 0; pointer-events: none; }
.stamp.like { left: 20px; color: var(--like); transform: rotate(-15deg); }
.stamp.nope { right: 20px; color: var(--nope); transform: rotate(15deg); }
.swipe-card.liking .stamp.like, .swipe-card.noping .stamp.nope { opacity: 1; }
.actions { display: flex; align-items: center; justify-content: center; gap: var(--s5); padding: var(--s4) 0 var(--s1); flex: none; }
.round { display: grid; place-items: center; border: 0; border-radius: 50%; transition: transform .15s var(--ease); }
.round.pass { width: 60px; height: 60px; background: var(--surface); color: var(--nope); box-shadow: var(--sh2); }
.round.like { width: 72px; height: 72px; background: var(--hero); color: #fff; box-shadow: var(--sh2); }
.round .i { width: 30px; height: 30px; }
.round.like .i { width: 34px; }
.round:disabled { opacity: .5; }
.keys { text-align: center; color: var(--muted); font-size: 12px; font-weight: 700; padding-top: 6px; display: none; }
@media (pointer: fine) { .keys { display: block; } }

/* ── my dogs ───────────────────────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); padding-bottom: var(--s4); }
.tile { position: relative; aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden; background: var(--surface-2); box-shadow: var(--sh1); }
.tile .shade { position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / .72), transparent 55%); pointer-events: none; }
.tile .cap { position: absolute; left: 12px; right: 12px; bottom: 10px; color: #fff; pointer-events: none; }
.tile .cap strong { display: block; font-size: 17px; font-weight: 800; }
.tile .cap span { font-size: 13px; opacity: .85; }
.tile .cam { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; background: rgb(0 0 0 / .45); color: #fff; box-shadow: none; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tile .cam .i { width: 18px; height: 18px; }
.tile.add { display: grid; place-items: center; align-content: center; gap: 4px; border: 2px dashed var(--line); background: none; box-shadow: none; color: var(--muted); font-weight: 800; }
.tile.add .i { width: 32px; height: 32px; }

/* ── matches ───────────────────────────────────────────────────────────────── */
.section-label { font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: var(--s2) 0; }
.strip { display: flex; gap: var(--s4); overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px var(--s3); margin-inline: -2px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip button { display: grid; justify-items: center; gap: 6px; border: 0; background: none; scroll-snap-align: start; width: 68px; flex: none; font-size: 13px; font-weight: 700; }
.strip .ring { padding: 2px; border-radius: 50%; background: var(--hero); }
.strip .ring .avatar { width: 60px; height: 60px; border: 2px solid var(--bg); }
.strip span.n { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-row { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 72px; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; }
.match-row .t { flex: 1; min-width: 0; }
.match-row strong { display: block; font-size: 17px; font-weight: 800; }
.match-row .s { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.match-row .i { color: var(--muted); width: 20px; height: 20px; }

/* ── chat ──────────────────────────────────────────────────────────────────── */
#chat { position: fixed; inset: 0; z-index: 30; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--bg);
  padding-bottom: var(--kb, 0px); transform: translateX(100%); visibility: hidden; transition: transform .32s var(--ease), visibility 0s .32s; }
#chat.open { transform: none; visibility: visible; transition: transform .32s var(--ease); }
#chat-head { display: flex; align-items: center; gap: var(--s3); padding: calc(8px + env(safe-area-inset-top)) var(--s3) var(--s2); border-bottom: 1px solid var(--line); background: var(--surface); }
#chat-head .avatar { width: 40px; height: 40px; }
#chat-head strong { display: block; font-size: 17px; font-weight: 800; line-height: 1.2; }
#chat-head small { color: var(--muted); }
#chat-lines { list-style: none; margin: 0; padding: var(--s4); overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 2px; }
#chat-lines li { max-width: 78%; padding: 10px 14px; border-radius: 20px; background: var(--surface-2); align-self: flex-start; overflow-wrap: anywhere; animation: pop-in .2s var(--ease); }
#chat-lines li.mine { align-self: flex-end; background: var(--brand-strong); color: var(--on-brand); }
#chat-lines li.mine:not(.first) { border-top-right-radius: 6px; }
#chat-lines li.mine:not(.last) { border-bottom-right-radius: 6px; }
#chat-lines li:not(.mine):not(.first) { border-top-left-radius: 6px; }
#chat-lines li:not(.mine):not(.last) { border-bottom-left-radius: 6px; }
#chat-lines li.first { margin-top: 8px; }
#chat-lines li.pending { opacity: .6; }
#chat-lines li.failed { opacity: .85; outline: 2px solid var(--nope); cursor: pointer; }
#chat-lines li.failed::after { content: " · Tap to retry"; font-size: 12px; font-weight: 800; }
#chat-lines li.divider { align-self: center; max-width: none; background: none; color: var(--muted); font-size: 12px; font-weight: 700; padding: 8px 0 2px; animation: none; }
#chat-new { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 2; }
#chat-form { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s3) max(12px, env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
#chat-input { flex: 1; min-height: 44px; border-radius: 999px; padding-inline: 18px; }
.send { width: 44px; height: 44px; flex: none; background: var(--brand-strong); color: var(--on-brand); box-shadow: none; }

/* ── match celebration ─────────────────────────────────────────────────────── */
dialog.match { border: 0; padding: 0; width: 100%; max-width: none; height: 100%; max-height: none; background: transparent; }
dialog.match[open] { display: grid; place-items: center; }
dialog.match::backdrop { background: var(--hero); opacity: .96; }
.match-inner { position: relative; display: grid; justify-items: center; gap: var(--s4); padding: var(--s5); text-align: center; color: #fff; width: min(100%, 440px); }
.match-inner h2 { font-size: 40px; font-weight: 900; letter-spacing: -.02em; line-height: 1.05; }
.match-inner p { font-size: 17px; font-weight: 600; }
.pair { display: flex; margin: var(--s4) 0; }
.pair .avatar { width: 120px; height: 120px; border: 4px solid #fff; font-size: 48px; box-shadow: var(--sh2); }
.pair .avatar:first-child { margin-right: -24px; animation: from-left .6s var(--ease); }
.pair .avatar:last-child { animation: from-right .6s var(--ease); }
.match-inner .btn { background: #fff; color: #D7372C; }
.match-inner .btn.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgb(255 255 255 / .7); }
.match-inner .stack { display: grid; gap: var(--s3); width: 100%; }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti span { position: absolute; top: -24px; left: var(--x); font-size: 22px; animation: fall 3s linear var(--delay) infinite; }

/* ── nudge (notifications / install) + steps ───────────────────────────────── */
.nudge { display: flex; align-items: center; gap: var(--s3); margin: 4px 0 var(--s3); padding: var(--s3); border-radius: 20px; background: var(--surface); box-shadow: var(--sh1); border: 1px solid var(--line); flex: none; animation: pop-in .3s var(--ease); }
.nudge .art { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); font-size: 20px; flex: none; }
.nudge .t { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.nudge .t strong { font-size: 14px; font-weight: 800; }
.nudge .t span { font-size: 13px; color: var(--muted); }
.nudge .x { width: 32px; height: 32px; box-shadow: none; background: none; color: var(--muted); }
.nudge .x .i { width: 18px; height: 18px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); }
.steps li { display: flex; align-items: flex-start; gap: var(--s3); font-size: 16px; }
.steps .n { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--brand-strong); color: var(--on-brand); font-weight: 800; font-size: 14px; }
@media (display-mode: standalone) { #topbar { padding-top: calc(12px + env(safe-area-inset-top)); } }

/* ── motion ────────────────────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes pop { 50% { transform: scale(1.15); } }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(.97); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
@keyframes bob { 50% { transform: translateY(-10px); } }
@keyframes pulse { 50% { transform: scale(1.1); } }
@keyframes from-left { from { transform: translateX(-80px); opacity: 0; } }
@keyframes from-right { from { transform: translateX(80px); opacity: 0; } }
@keyframes fall { to { transform: translateY(110vh) rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .15s !important; }
  .skel { animation: none; }
  .confetti { display: none; }
}
