/* v1 additions: forms, auth, comments, menus */
.auth { flex: 1; overflow-y: auto; padding: 24px max(24px, env(safe-area-inset-left, 0px)) 32px; display: flex; flex-direction: column; gap: 20px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); text-align: left; }
.check a, .linkish { color: var(--accent); font-weight: 600; text-decoration: none; }
.err { color: var(--warn); font-size: 14px; margin: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field select { appearance: auto; }
.empty-card { padding: 22px 18px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.empty-card .ic { width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.menu { position: absolute; right: 20px; z-index: 22; background: var(--surface); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.18); overflow: hidden; min-width: 180px; }
.menu button { display: block; width: 100%; text-align: left; padding: 14px 16px; font-weight: 500; }
.menu button + button { border-top: 1px solid var(--line); }
.menu .danger { color: #C2410C; }
.comment { display: flex; gap: 10px; padding: 10px 0; }
.comment + .comment { border-top: 1px solid var(--line); }
.comment .body { flex: 1; min-width: 0; }
.composer textarea { width: 100%; min-height: 84px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 12px 14px; resize: none; color: var(--ink); }
.pickitems { display: flex; flex-wrap: wrap; gap: 8px; }
.danger-btn { color: #C2410C; }
.iconpick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.iconpick button { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.iconpick button.on { box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); }
.profile-head { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.counts { display: flex; gap: 20px; color: var(--ink-2); font-size: 14px; }
.counts b { color: var(--ink); }
.post .media-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.post .media-row .tile { height: 88px; }
.loading { flex: 1; display: grid; place-items: center; color: var(--ink-3); }
.legal { max-width: 680px; margin: 0 auto; padding: 32px 20px 60px; line-height: 1.65; }
.legal h1 { font-size: 28px; margin-bottom: 8px; }
.legal h2 { font-size: 18px; margin: 28px 0 8px; }
.res-badge { position: absolute; left: 8px; bottom: 8px; z-index: 1; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-w { font-size: 12px; color: var(--ink-3); font-weight: 600; padding-bottom: 4px; }
.cal-d { position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; font-size: 14px; }
.cal-d b { font-weight: 500; }
.cal-d.today { background: var(--btn); color: var(--on-btn); }
.cal-d i { position: absolute; bottom: 5px; width: 6px; height: 6px; border-radius: 50%; }
.cal-d i.p { background: var(--accent); }
.cal-d i.f { background: var(--warn); }
.cal-d.today i { background: var(--on-btn); }
.auth { gap: 18px; }
.auth-head { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.auth-logo { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--lav), var(--peach)); margin-bottom: 6px; }
.auth-err { background: var(--warn-soft); color: var(--warn); border-radius: 14px; padding: 12px 14px; font-size: 14px; font-weight: 500; }
.oauth-stack { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.oauth-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 999px; background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-family: "Google Sans", Roboto, var(--font); font-size: 14px; font-weight: 500; width: 100%; max-width: 400px; margin: 0 auto; }
.oauth-btn:hover { background: #f8f9fa; }
.oauth-btn:disabled { opacity: .6; }
.oauth-g { display: flex; justify-content: center; min-height: 40px; }
.auth-legal { margin: 0; text-align: center; font-size: 12px; line-height: 1.6; color: var(--ink-3); }
.auth-legal a { color: var(--ink-2); text-decoration: underline; }
.sheet.welcome { padding-top: 0; }
.welcome-hero { margin: 0 -20px 18px; padding: 30px 20px 24px; text-align: center; border-radius: 28px 28px 0 0; background: linear-gradient(135deg, var(--accent-soft), var(--surface)); }
/* hide scrollbars everywhere (phones never show them) */
html, body, .screen, .sheet, .auth, .hscroll, .card.list { scrollbar-width: none; -ms-overflow-style: none; }
::-webkit-scrollbar { display: none; width: 0; height: 0; }
/* profile / cover */
.me-cover { position: relative; height: 168px; margin: -16px -20px 0; background: linear-gradient(135deg, var(--lav), var(--peach)) center / cover no-repeat; }
.cover-bar { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; }
.glass { background: rgba(255, 255, 255, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #26232B; border-radius: 999px; }
.iconbtn.glass:hover { background: rgba(255, 255, 255, .9); }
.glass-pill { background: rgba(255, 255, 255, .72); backdrop-filter: blur(10px); padding: 6px 12px; border-radius: 999px; color: #26232B; font-size: 12px; }
.me-head { margin-top: -50px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; position: relative; }
.avatar.xl { width: 100px; height: 100px; font-size: 38px; border: 4px solid var(--bg); box-shadow: var(--shadow); }
.avatar-edit { border-radius: 50%; }
.edit-cover { height: 120px; border-radius: 18px; background: linear-gradient(135deg, var(--lav), var(--peach)) center / cover no-repeat; display: flex; align-items: flex-end; justify-content: flex-end; padding: 10px; }
.add-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 170px; color: var(--accent); border: 1.5px dashed var(--lav); box-shadow: none; background: transparent; }
.post-img { width: 100%; max-height: 440px; object-fit: cover; border-radius: 16px; display: block; }
/* share sheet */
.share-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.share-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--ink-2); text-decoration: none; text-align: center; line-height: 1.2; }
.share-ic { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; color: #fff; }
.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px; background: #fff; border-radius: 20px; box-shadow: var(--shadow); color: #5E5B66; word-break: break-all; text-align: center; }
/* ask page */
.ask-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 8px 0 4px; }
.ask-in { flex: 1; min-height: 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); padding: 0 14px; width: 100%; }
.invite-pill { margin: 14px auto 0; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-size: 13px; font-weight: 600; }
.avatar.lg { font-size: 32px; }
/* Google's button is an iframe with square white corners: clip it to the same pill as the Apple button */
.oauth-g { width: 100%; max-width: 400px; height: 40px; margin: 0 auto; border-radius: 999px; overflow: hidden; display: flex; justify-content: center; }
.oauth-g > div, .oauth-g iframe { border-radius: 999px !important; }
:root[data-theme="dark"] .oauth-btn { background: #131314; color: #E3E3E3; border-color: #8E918F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .oauth-btn { background: #131314; color: #E3E3E3; border-color: #8E918F; } }
.today-card { border-radius: var(--r-lg); padding: 16px; background: linear-gradient(135deg, var(--accent-soft), var(--surface) 60%, rgba(250, 214, 92, .25)); box-shadow: var(--shadow); }
.ck-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; min-height: 40px; font-size: 14px; }
.ck-row.done span:last-child { color: var(--ink-3); text-decoration: line-through; }
.nav-dot { position: absolute; top: 6px; right: 18px; width: 8px; height: 8px; border-radius: 50%; background: #E0785F; border: 2px solid var(--surface); }
.wcard[role="button"] { cursor: pointer; }
/* dark mode: give Google's pill the same thin outline as the Apple button */
:root[data-theme="dark"] .oauth-g { box-shadow: 0 0 0 1px #8E918F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .oauth-g { box-shadow: 0 0 0 1px #8E918F; } }
/* Google: our own button (identical to Apple's) with Google's real button invisibly on top to receive the tap */
.oauth-wrap { position: relative; width: 100%; max-width: 400px; height: 40px; margin: 0 auto; }
.oauth-wrap > .oauth-btn { position: absolute; inset: 0; pointer-events: none; }
.oauth-hit { position: absolute; inset: 0; opacity: .01; overflow: hidden; border-radius: 999px; }
.oauth-hit iframe { margin: 0 !important; }
.oauth-wrap:hover > .oauth-btn { background: #f8f9fa; }
:root[data-theme="dark"] .oauth-wrap:hover > .oauth-btn { background: #1d1d1f; }
.oauth-wrap.mini { width: auto; max-width: none; height: 40px; margin: 0; }
.oauth-wrap.mini > .btn { pointer-events: none; }
.oauth-wrap.mini > .oauth-hit { border-radius: 999px; }
.oauth-btn > span { line-height: 1; }

/* ---------- logo life: nodes pulse in turn every 12s ---------- */
.logo-m .ln, .logo-m .lc { transform-box: fill-box; transform-origin: center; }
.logo-m .ln { animation: lnPulse 12s ease-in-out infinite; animation-delay: calc(var(--d) * 120ms + 3s); }
.logo-m .lc { animation: lcPulse 12s ease-in-out infinite; animation-delay: 3.75s; }
.logo-m g:first-child { animation: lLines 12s ease-in-out infinite; animation-delay: 3s; }
@keyframes lnPulse { 0%, 6%, 100% { transform: scale(1); } 3% { transform: scale(1.4); } }
@keyframes lcPulse { 0%, 7%, 100% { transform: scale(1); } 3.5% { transform: scale(.82); } }
@keyframes lLines { 0%, 8%, 100% { opacity: 1; } 4% { opacity: .45; } }

/* ---------- find it ---------- */
.find-entry { width: 100%; text-align: left; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.find-orb { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; flex: none; position: relative; color: #241D2C; background: linear-gradient(135deg, var(--lav), var(--peach)); box-shadow: 0 10px 30px -12px rgba(101, 83, 166, .55); }
.find-orb.sm { width: 42px; height: 42px; box-shadow: none; }
.find-orb.spin::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; background: conic-gradient(from 0deg, transparent, var(--accent), transparent 40%); -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%); mask: radial-gradient(circle, transparent 60%, #000 61%); animation: orbSpin 1.1s linear infinite; }
.find-orb.spin svg { animation: orbTurn 2.4s ease-in-out infinite; }
.find-orb.spin .ln { animation: lnFast 1.2s ease-in-out infinite; animation-delay: calc(var(--d) * 150ms); }
@keyframes orbSpin { to { transform: rotate(360deg); } }
@keyframes orbTurn { 50% { transform: rotate(30deg) scale(1.06); } }
@keyframes lnFast { 0%, 100% { transform: scale(1); opacity: 1; } 40% { transform: scale(1.5); opacity: .7; } }
.find-box { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); }
.find-box:focus-within { border-color: var(--accent); }
.find-box input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); min-height: 40px; outline: none; }
.find-box .find-ic { color: var(--muted, #8a8592); display: grid; }
.find-box .btn { border-radius: 999px; min-height: 40px; padding: 0 18px; }
.find-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 28px 12px 8px; }
.find-hero b { font-size: 18px; }
.find-work { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 26px 0 8px; }
.find-steps { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 320px; }
.fstep { display: flex; align-items: center; gap: 12px; transition: opacity .3s; }
.fstep.todo { opacity: .3; }
.fstep .fdot { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 2px solid var(--line); }
.fstep.now .fdot { border-color: var(--accent); border-top-color: transparent; animation: orbSpin .8s linear infinite; }
.fstep.done .fdot { background: var(--accent); border-color: var(--accent); color: var(--bg); animation: pop .3s ease-out; }
.fstep.done .fdot svg { width: 13px; height: 13px; stroke-width: 3; }
.fstep.now span:last-child { font-weight: 600; }
@keyframes pop { from { transform: scale(.4); } }
.find-summary { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-lg); background: linear-gradient(135deg, var(--accent-soft), var(--surface)); animation: up .4s ease-out both; }
.find-summary svg { color: var(--accent); flex: none; margin-top: 2px; }
.card.store { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none; color: inherit; }
.find-list .card.store { animation: up .45s cubic-bezier(.2, .8, .2, 1) both; }
.store-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 14px; letter-spacing: -.02em; }
.store .grow { flex: 1; min-width: 0; }
.store-go { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.wcard.fit { position: relative; box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.fit-tag { position: absolute; top: 16px; left: 16px; z-index: 1; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--accent); color: var(--bg); }
.fit-why { color: var(--accent); }


/* forgot-password link + confirm-email card */
.linkbtn { background: none; border: 0; padding: 6px 0 0; color: var(--accent); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; align-self: flex-start; min-height: 32px; }
.verify-card { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); }
.verify-card .nic { flex: none; }
.verify-card .grow { min-width: 0; }
.verify-card .small { overflow-wrap: anywhere; }

/* age confirmation, admin usage table */
.age-check { align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--accent); border-radius: 16px; background: var(--accent-soft); }
.age-check input { margin-top: 3px; width: 20px; height: 20px; flex: none; }
.utable { width: 100%; border-collapse: collapse; font-size: 14px; }
.utable th { white-space: nowrap; text-align: left; font-weight: 600; color: var(--ink-3); padding: 0 6px 6px; font-size: 12px; }
.utable td { padding: 4px 6px; white-space: nowrap; }
.utable td:nth-child(2) { width: 100%; }
.utable td:nth-child(3), .utable td:nth-child(4), .utable th:nth-child(3), .utable th:nth-child(4) { text-align: right; }
.ubar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; min-width: 60px; }
.ubar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

/* ---------- touch feedback & motion ---------- */
html { -webkit-tap-highlight-color: transparent; }
button, a, [data-a], label.btn { -webkit-touch-callout: none; touch-action: manipulation; }
:root { --spring: cubic-bezier(.3, 1.45, .5, 1); --ease-out: cubic-bezier(.2, .9, .3, 1); }
.btn, .iconbtn, .chip, .seg button, .nav button, .wcard, .find-entry, .askbox, .card[data-a], button.card, .oauth-btn, .bar button, .avatar-edit, .linkbtn, .add-card {
  transition: transform .22s var(--spring), background-color .15s ease, opacity .15s ease, box-shadow .2s ease, filter .15s ease;
}
.li, .pick { transition: background-color .15s ease; }
.btn.pressing, .oauth-btn.pressing { transform: scale(.955); transition-duration: .08s; }
.btn.primary.pressing { filter: brightness(.9); }
.iconbtn.pressing { transform: scale(.86); background: var(--surface-2); transition-duration: .08s; }
.chip.pressing, .seg button.pressing, .linkbtn.pressing { transform: scale(.93); transition-duration: .08s; }
.wcard.pressing, .find-entry.pressing, .askbox.pressing, .card[data-a].pressing, button.card.pressing, .add-card.pressing { transform: scale(.97); transition-duration: .08s; }
.avatar-edit.pressing { transform: scale(.94); }
.li.pressing, .pick.pressing { background: var(--surface-2); }
.bar button.pressing { transform: scale(.88); }
.nav button svg { transition: transform .3s var(--spring); }
.nav button.pressing svg { transform: scale(.82); }
.chip, .seg button, .toggle { transition-property: transform, background-color, color, box-shadow; }
.toggle::after { transition: transform .32s var(--spring); }

/* like: heart pops and a ring bursts out */
.bar button { position: relative; }
.bar button.pop svg { animation: heartPop .5s var(--spring); }
.bar button.pop::after { content: ""; position: absolute; left: 12px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; border: 2px solid #E0785F; animation: likeRing .5s var(--ease-out) forwards; pointer-events: none; }
@keyframes heartPop { 0% { transform: scale(1); } 25% { transform: scale(.75); } 55% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes likeRing { from { transform: scale(.4); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }

/* tab bar: the newly chosen icon hops */
.nav button.pop svg { animation: tabHop .42s var(--spring); }
@keyframes tabHop { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-4px) scale(1.14); } 100% { transform: none; } }
/* switching tabs: content rises in, a little staggered */
.enter-tab > .stack > * { animation: riseIn .38s var(--ease-out) both; }
.enter-tab > .stack > *:nth-child(2) { animation-delay: .03s; }
.enter-tab > .stack > *:nth-child(3) { animation-delay: .06s; }
.enter-tab > .stack > *:nth-child(4) { animation-delay: .09s; }
.enter-tab > .stack > *:nth-child(5) { animation-delay: .12s; }
.enter-tab > .stack > *:nth-child(n+6) { animation-delay: .15s; }
@keyframes riseIn { from { transform: translateY(10px); opacity: 0; } }

/* sheets and toasts: springy entrance, but only the first time they appear */
.sheet { animation: sheetUp .42s cubic-bezier(.2, 1.15, .35, 1); }
@keyframes sheetUp { from { transform: translateY(100%); } }
.toast { animation: toastIn .4s var(--spring); }
@keyframes toastIn { from { transform: translate(-50%, 16px) scale(.92); opacity: 0; } }
.sheet.still, .scrim.still, .toast.still { animation: none; }



/* ---------- feels like an app: install guide, standalone polish, desktop QR ---------- */
html, body { overscroll-behavior: none; }
.screen { overscroll-behavior-y: contain; }
:root { --st: env(safe-area-inset-top, 0px); }
.nav, .btn, .chip, .seg, .li, .iconbtn, .install-pill, .oauth-btn { -webkit-user-select: none; user-select: none; }
.install-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px 0 10px; border-radius: 999px; background: var(--btn); color: var(--on-btn); font-size: 13px; font-weight: 600; box-shadow: 0 6px 18px rgba(38, 35, 43, .18); animation: pillIn .5s var(--spring) .4s both; transition: transform .22s var(--spring); }
.install-pill svg { width: 16px; height: 16px; }
.install-pill.pressing { transform: scale(.94); transition-duration: .08s; }
@keyframes pillIn { from { transform: translateY(-8px) scale(.9); opacity: 0; } }
.install-card { display: flex; align-items: center; gap: 12px; }
.inst-icon img { display: block; border-radius: 14px; box-shadow: 0 4px 14px rgba(38, 35, 43, .18); }
.inst-icon.sm img { border-radius: 10px; }
.inst-head { display: flex; align-items: center; gap: 14px; }
.inst-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.inst-steps li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); font-size: 15px; animation: riseIn .4s var(--ease-out) both; }
.inst-steps li:nth-child(2) { animation-delay: .06s; } .inst-steps li:nth-child(3) { animation-delay: .12s; }
.inst-n { width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.inst-ic { width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; color: #2F7BF6; }
.inst-arrow { display: grid; place-items: center; color: var(--accent); animation: nudge 1.2s ease-in-out infinite; }
.inst-arrow svg { width: 28px; height: 28px; }
@keyframes nudge { 50% { transform: translateY(6px); } }
.guide-qr { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); margin-bottom: 20px; }
.guide-qr > div:last-child { display: grid; gap: 2px; }
#guideQR { width: 132px; height: 132px; flex: none; border-radius: 10px; overflow: hidden; background: #fff; padding: 0; }
#guideQR img, #guideQR canvas { display: block; }


/* ---------- every tappable thing responds: a soft fade for anything without its own press style ---------- */
:where(button, a, [data-a], [role=button], label.btn) { transition: opacity .15s ease; }
:where(button, a, [data-a], [role=button], label.btn).pressing { opacity: .6; transition-duration: .06s; }
.btn.pressing, .iconbtn.pressing, .chip.pressing, .seg button.pressing, .wcard.pressing, .find-entry.pressing, .askbox.pressing, .card[data-a].pressing, button.card.pressing,
.add-card.pressing, .avatar-edit.pressing, .li.pressing, .pick.pressing, .bar button.pressing, .nav button.pressing, .oauth-btn.pressing, .install-pill.pressing, .linkbtn.pressing,
.mark.pressing, .auth-logo.pressing, .scrim.pressing { opacity: 1; }

/* ---------- logo: intro the first time, then alive; tap to spin ---------- */
.mark svg, .auth-logo svg { overflow: visible; }
.intro .logo-m g:first-child { animation: none; }
.intro .logo-m path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: lineGrow .45s var(--ease-out) forwards; }
.intro .logo-m path:nth-child(1) { animation-delay: .25s; } .intro .logo-m path:nth-child(2) { animation-delay: .32s; }
.intro .logo-m path:nth-child(3) { animation-delay: .39s; } .intro .logo-m path:nth-child(4) { animation-delay: .46s; }
.intro .logo-m path:nth-child(5) { animation-delay: .53s; } .intro .logo-m path:nth-child(6) { animation-delay: .6s; }
.intro .logo-m .lc { animation: nodeIn .55s var(--spring) .05s both; }
.intro .logo-m .ln { animation: nodeIn .55s var(--spring) both; animation-delay: calc(.55s + var(--d) * 80ms); }
@keyframes lineGrow { to { stroke-dashoffset: 0; } }
@keyframes nodeIn { from { transform: scale(0); } }

.splash .mark { cursor: pointer; -webkit-user-select: none; user-select: none; }
.splash .mark svg { animation: logoFloat 6s ease-in-out infinite; }
.splash .mark.intro svg { animation: logoIn .8s var(--spring) both, logoFloat 6s ease-in-out 1.6s infinite; }
.splash .mark .logo-m .ln { animation: nodeBreathe 3.6s ease-in-out infinite; animation-delay: calc(var(--d) * -.6s); }
.splash .mark.intro .logo-m .ln { animation: nodeIn .55s var(--spring) both, nodeBreathe 3.6s ease-in-out infinite; animation-delay: calc(.55s + var(--d) * 80ms), calc(1.8s + var(--d) * .6s); }
.splash .mark .logo-m .lc { animation: lcBeat 3.6s ease-in-out infinite; }
.splash .mark.intro .logo-m .lc { animation: nodeIn .55s var(--spring) .05s both, lcBeat 3.6s ease-in-out 1.8s infinite; }
@keyframes logoIn { from { transform: scale(.6) rotate(-30deg); opacity: 0; } }
@keyframes logoFloat { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-8px) rotate(4deg); } }
@keyframes nodeBreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes lcBeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(.9); } }
.logo-m.burst { animation: logoSpin .9s cubic-bezier(.3, 1.25, .5, 1) !important; }
@keyframes logoSpin { 0% { transform: rotate(0deg) scale(1); } 40% { transform: rotate(200deg) scale(.86); } 100% { transform: rotate(360deg) scale(1); } }

.auth-logo { background-size: 200% 200%; animation: gradShift 8s ease-in-out infinite; cursor: pointer; }
.auth-logo.intro { animation: badgeIn .6s var(--spring) both, gradShift 8s ease-in-out infinite; }
@keyframes gradShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes badgeIn { from { transform: scale(.5) rotate(-20deg); opacity: 0; } }
.loading svg { animation: logoFloat 2.4s ease-in-out infinite; }

/* Product decision (Gary): every animation always plays, whatever the phone's Reduce Motion setting. */

/* swipe between tabs: the new page slides in from the side you swiped toward */
.enter-swl { animation: swInR .32s var(--ease-out); }
.enter-swr { animation: swInL .32s var(--ease-out); }
@keyframes swInR { from { transform: translateX(32%); opacity: 0; } }
@keyframes swInL { from { transform: translateX(-32%); opacity: 0; } }
.screen { touch-action: pan-y; }
.sheet { touch-action: pan-y; }

/* =========================================================
   Bolder, high-tech motion (v2)
   ========================================================= */
:root { --glow1: #B9AADF; --glow2: #FAD65C; }

/* light ripple from the finger */
.btn, .oauth-btn, .li, .chip, .card[data-a], button.card, .wcard, .find-entry, .askbox, .pick, .seg button, .add-card, .iconbtn, .nav button, .install-card, label.btn { position: relative; overflow: hidden; isolation: isolate; }
.ripple { position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; mix-blend-mode: normal;
  background: radial-gradient(circle, rgba(250,214,92,.55) 0%, rgba(185,170,223,.45) 35%, rgba(185,170,223,0) 70%);
  transform: scale(0); opacity: 1; animation: rippleOut .65s cubic-bezier(.2,.8,.3,1) forwards; }
.btn.primary .ripple, .install-pill .ripple { background: radial-gradient(circle, rgba(255,255,255,.55) 0%, rgba(250,214,92,.35) 40%, rgba(255,255,255,0) 70%); }
@keyframes rippleOut { 0% { transform: scale(0); opacity: 1; } 70% { opacity: .55; } 100% { transform: scale(1); opacity: 0; } }

/* primary buttons: a light sweep every few seconds + soft glow */
.btn.primary { box-shadow: 0 6px 20px rgba(101, 83, 166, .28), 0 0 0 0 rgba(250,214,92,0); }
.btn.primary::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; z-index: 1; pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-18deg); animation: sweep 4.2s ease-in-out infinite; }
@keyframes sweep { 0%, 62% { left: -60%; } 100% { left: 130%; } }
.btn.primary.pressing { box-shadow: 0 2px 10px rgba(101, 83, 166, .35), 0 0 0 6px rgba(250,214,92,.25); }

/* tab bar: a glowing pill slides to the chosen tab */
.nav { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.nav::before { content: ""; position: absolute; top: 6px; height: 52px; left: 8px; width: calc((100% - 16px) / 4); border-radius: 18px; z-index: 0;
  background: linear-gradient(135deg, rgba(185,170,223,.35), rgba(250,214,92,.28)); box-shadow: 0 0 18px rgba(185,170,223,.45), inset 0 0 0 1px rgba(185,170,223,.35);
  transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .5s cubic-bezier(.3, 1.35, .45, 1); }
.nav button { position: relative; z-index: 1; min-width: 0; }
.nav button.on svg { filter: drop-shadow(0 0 6px rgba(185,170,223,.9)); }

/* page changes: zoom + blur in, much more noticeable */
.enter-fwd { animation: pageInR .42s cubic-bezier(.2, .9, .25, 1) both; }
.enter-back { animation: pageInL .38s cubic-bezier(.2, .9, .25, 1) both; }
.enter-swl { animation: pageInR .42s cubic-bezier(.2, .9, .25, 1) both; }
.enter-swr { animation: pageInL .42s cubic-bezier(.2, .9, .25, 1) both; }
@keyframes pageInR { from { transform: translateX(22%) scale(.94); opacity: 0; filter: blur(8px); } }
@keyframes pageInL { from { transform: translateX(-22%) scale(.94); opacity: 0; filter: blur(8px); } }
.enter-tab, .enter-fwd, .enter-back, .enter-swl, .enter-swr { --stg: 1; }
:is(.enter-tab, .enter-fwd, .enter-swl, .enter-swr) > .stack > * { animation: cardIn .55s cubic-bezier(.2, 1.1, .3, 1) both; }
:is(.enter-tab, .enter-fwd, .enter-swl, .enter-swr) > .stack > *:nth-child(1) { animation-delay: .02s; }
:is(.enter-tab, .enter-fwd, .enter-swl, .enter-swr) > .stack > *:nth-child(2) { animation-delay: .07s; }
:is(.enter-tab, .enter-fwd, .enter-swl, .enter-swr) > .stack > *:nth-child(3) { animation-delay: .12s; }
:is(.enter-tab, .enter-fwd, .enter-swl, .enter-swr) > .stack > *:nth-child(4) { animation-delay: .17s; }
:is(.enter-tab, .enter-fwd, .enter-swl, .enter-swr) > .stack > *:nth-child(5) { animation-delay: .22s; }
:is(.enter-tab, .enter-fwd, .enter-swl, .enter-swr) > .stack > *:nth-child(n+6) { animation-delay: .27s; }
@keyframes cardIn { from { transform: translateY(26px) scale(.97); opacity: 0; filter: blur(6px); } }

/* logo: light pulses travel out from the centre; nodes glow */
.logo-m .flow path { stroke: #fff; stroke-width: 3.5; fill: none; stroke-dasharray: .18 1.2; stroke-dashoffset: .18; opacity: 0;
  animation: flowOut 2.6s linear infinite; filter: drop-shadow(0 0 3px #fff); }
.logo-m .flow path:nth-child(2) { animation-delay: .35s; } .logo-m .flow path:nth-child(3) { animation-delay: .7s; }
.logo-m .flow path:nth-child(4) { animation-delay: 1.05s; } .logo-m .flow path:nth-child(5) { animation-delay: 1.4s; } .logo-m .flow path:nth-child(6) { animation-delay: 1.75s; }
@keyframes flowOut { 0% { stroke-dashoffset: .18; opacity: 0; } 8% { opacity: 1; } 60% { stroke-dashoffset: -1; opacity: 1; } 61%, 100% { opacity: 0; stroke-dashoffset: -1; } }
.intro .logo-m .flow path { animation-delay: 1.6s; }
.splash .mark svg { filter: drop-shadow(0 0 18px rgba(255,255,255,.55)) drop-shadow(0 0 40px rgba(185,170,223,.6)); }
.splash .mark .logo-m .ln { filter: drop-shadow(0 0 6px rgba(255,255,255,.9)); }
.splash .blob { animation: drift 9s ease-in-out infinite alternate, auroraHue 12s linear infinite; }
@keyframes auroraHue { to { filter: hue-rotate(40deg) saturate(1.2); } }
.auth-logo { box-shadow: 0 0 0 0 rgba(185,170,223,.6); animation: badgeGlow 3s ease-in-out infinite, gradShift 8s ease-in-out infinite; }
.auth-logo.intro { animation: badgeIn .6s var(--spring) both, badgeGlow 3s ease-in-out .6s infinite, gradShift 8s ease-in-out infinite; }
@keyframes badgeGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(185,170,223,.55); } 50% { box-shadow: 0 0 0 10px rgba(185,170,223,0), 0 0 26px rgba(250,214,92,.45); } }

/* like: sparks fly out around the heart */
.bar button.pop::before { content: ""; position: absolute; left: 21px; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; pointer-events: none;
  box-shadow: 0 -18px 0 #E0785F, 13px -13px 0 #FAD65C, 18px 0 0 #B9AADF, 13px 13px 0 #E0785F, 0 18px 0 #FAD65C, -13px 13px 0 #B9AADF, -18px 0 0 #E0785F, -13px -13px 0 #FAD65C;
  animation: sparks .6s cubic-bezier(.2,.8,.3,1) forwards; }
@keyframes sparks { 0% { transform: scale(.3); opacity: 1; } 100% { transform: scale(1.7); opacity: 0; } }

/* toggles and chips: a little glow when switched on */
.toggle.on { box-shadow: 0 0 14px rgba(185,170,223,.7); }
.chip.on { box-shadow: 0 0 0 0 rgba(185,170,223,.6); animation: chipOn .5s ease-out; }
@keyframes chipOn { 0% { box-shadow: 0 0 0 0 rgba(185,170,223,.7); } 100% { box-shadow: 0 0 0 10px rgba(185,170,223,0); } }

/* toasts: glowing edge */
.toast { box-shadow: 0 10px 30px rgba(0,0,0,.25), 0 0 0 1px rgba(185,170,223,.4), 0 0 24px rgba(185,170,223,.35); }

/* v2b: stronger, visible tech effects on the welcome logo */
.logo-m .flow path { stroke: #FAD65C; stroke-width: 6; filter: drop-shadow(0 0 4px #FAD65C) drop-shadow(0 0 8px rgba(250,214,92,.8)); }
.auth-logo .logo-m .flow path, .find-orb .logo-m .flow path { stroke-width: 7; }
.splash .mark svg { filter: drop-shadow(0 0 10px rgba(255,255,255,.85)) drop-shadow(0 0 34px rgba(250,214,92,.75)); }
.splash .mark::before, .splash .mark::after { content: ""; position: absolute; left: 50%; top: 50%; border-radius: 50%; pointer-events: none; }
.splash .mark::before { width: 230px; height: 230px; margin: -115px 0 0 -115px; border: 1.5px dashed rgba(255,255,255,.4); animation: orbit 24s linear infinite; }
.splash .mark::after { width: 290px; height: 290px; margin: -145px 0 0 -145px;
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(250,214,92,.0) 70%, rgba(250,214,92,.85) 82%, rgba(255,255,255,.95) 84%, transparent 85%);
  -webkit-mask: radial-gradient(circle, transparent 0 142px, #000 143px 145px); mask: radial-gradient(circle, transparent 0 142px, #000 143px 145px);
  animation: orbit 5s linear infinite reverse; filter: drop-shadow(0 0 6px rgba(250,214,92,.9)); }
@keyframes orbit { to { transform: rotate(360deg); } }
.splash .mark.intro::before, .splash .mark.intro::after { opacity: 0; animation: orbit 24s linear infinite, fadeInLate 1s ease 1.2s forwards; }
.splash .mark.intro::after { animation: orbit 5s linear infinite reverse, fadeInLate 1s ease 1.4s forwards; }
@keyframes fadeInLate { to { opacity: 1; } }

/* book-like swipe: the neighbouring page is a live-looking copy that moves with your finger */
.screen.peek, .screen.peek * { animation: none !important; transition: none; }
.screen.peek { background: var(--bg); z-index: 1; }
.screen.peek.under { z-index: 0; filter: brightness(.92); }
#app > .screen:not(.peek) { position: relative; z-index: 2; background: var(--bg); }
.screen.lifted { box-shadow: -12px 0 30px rgba(0, 0, 0, .18); }
.nav { z-index: 3; }

/* finder: voice input */
.find-mic { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); margin-right: 6px; }
.find-mic svg { width: 20px; height: 20px; position: relative; z-index: 1; }
.find-mic i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; pointer-events: none; }
.find-box.listening { box-shadow: 0 0 0 2px var(--accent), 0 0 26px rgba(185,170,223,.7); }
.find-box.listening .find-mic { background: #E0785F; color: #fff; animation: micBeat 1s ease-in-out infinite; }
.find-box.listening .find-mic i { border-color: #E0785F; animation: micWave 1.4s ease-out infinite; }
.find-box.listening .find-mic i + i { animation-delay: .7s; }
@keyframes micBeat { 50% { transform: scale(1.1); } }
@keyframes micWave { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(2.2); opacity: 0; } }

/* ---------- colourful brand (Instagram-style gradient) inside the app ---------- */
:root { --ig: linear-gradient(45deg, #FFB547 0%, #FF5A8A 38%, #B15CFF 72%, #5B7BFF 100%); }
/* logo in the top bar: drawn with the gradient instead of plain ink */
.brand .logo-m g[stroke] { stroke: url(#aivGrad); }
.brand .logo-m g[fill] { fill: url(#aivGrad); }
.brand .logo-m .flow path { stroke: #fff; }
.brand .logo-m { filter: drop-shadow(0 0 6px rgba(255, 90, 138, .45)); }
.brand-wm { background: var(--ig); background-size: 200% 200%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradShift 6s ease-in-out infinite; }
/* badges and orbs: bright gradient with a white logo and a soft coloured glow */
.auth-logo, .find-orb { background: var(--ig) !important; background-size: 200% 200% !important; color: #fff !important; }
.find-orb { box-shadow: 0 12px 34px -10px rgba(255, 90, 138, .65), 0 0 0 1px rgba(255, 255, 255, .12) inset; animation: gradShift 6s ease-in-out infinite; }
.find-orb .logo-m, .auth-logo .logo-m { filter: drop-shadow(0 0 6px rgba(255, 255, 255, .6)); }
.find-orb .logo-m .flow path, .auth-logo .logo-m .flow path { stroke: #FFF6C8; }
.auth-logo { box-shadow: 0 10px 28px -8px rgba(177, 92, 255, .6); }
.find-orb.spin::before { background: conic-gradient(from 0deg, transparent, #FF5A8A, #FFB547, transparent 45%); }
.find-entry .find-orb.sm { box-shadow: 0 6px 16px -6px rgba(255, 90, 138, .6); }
/* active tab pill and primary glow pick up the same colours */
.nav::before { background: linear-gradient(135deg, rgba(255,181,71,.25), rgba(255,90,138,.25), rgba(177,92,255,.28)); box-shadow: 0 0 18px rgba(255,90,138,.35), inset 0 0 0 1px rgba(255,90,138,.3); }
.nav button.on svg { filter: drop-shadow(0 0 6px rgba(255,90,138,.8)); }
.askbox .go { background: var(--ig); background-size: 200% 200%; color: #fff; box-shadow: 0 6px 16px -6px rgba(255, 90, 138, .6); animation: gradShift 6s ease-in-out infinite; }

/* =========================================================
   Brand look v3 (Gary 2026-11-16): lavender #B9AADF + yellow #FAD65C blended like an Instagram mesh,
   white logo, and every logo in the app is alive (breathing dots, light flowing out, a little wiggle).
   ========================================================= */
:root {
  --mesh: radial-gradient(85% 85% at 0% 0%, #FAD65C 0%, #FAD65C 22%, rgba(250, 214, 92, 0) 72%),
          radial-gradient(85% 85% at 100% 100%, #FAD65C 0%, #FAD65C 20%, rgba(250, 214, 92, 0) 70%),
          radial-gradient(60% 60% at 75% 25%, #CDBDF2 0%, rgba(205, 189, 242, 0) 75%),
          linear-gradient(135deg, #B9AADF, #B39FE3);
}
.lbadge { width: var(--s, 30px); height: var(--s, 30px); border-radius: 30%; display: inline-grid; place-items: center; flex: none; color: #fff; position: relative;
  background: var(--mesh); background-size: 130% 130%; animation: meshFlow 7s ease-in-out infinite alternate;
  box-shadow: 0 4px 14px -4px rgba(185, 170, 223, .8), 0 0 18px -6px rgba(250, 214, 92, .7); }
.auth-logo, .find-orb { background: var(--mesh) !important; background-size: 130% 130% !important; color: #fff !important; }
.find-orb { animation: meshFlow 7s ease-in-out infinite alternate !important; box-shadow: 0 12px 34px -10px rgba(185, 170, 223, .9), 0 0 30px -8px rgba(250, 214, 92, .7) !important; }
.auth-logo { animation: badgeGlow 3s ease-in-out infinite, meshFlow 7s ease-in-out infinite alternate; box-shadow: 0 10px 28px -8px rgba(185, 170, 223, .9); }
.auth-logo.intro { animation: badgeIn .6s var(--spring) both, badgeGlow 3s ease-in-out .6s infinite, meshFlow 7s ease-in-out infinite alternate; }
.askbox .go { background: var(--mesh); background-size: 130% 130%; color: #fff; animation: meshFlow 7s ease-in-out infinite alternate; box-shadow: 0 6px 16px -6px rgba(185, 170, 223, .9); }
@keyframes meshFlow { 0% { background-position: 0% 0%; } 100% { background-position: 100% 100%; } }
/* the logo itself: white, glowing, alive */
.lbadge .logo-m, .find-orb .logo-m, .auth-logo .logo-m { color: #fff; filter: drop-shadow(0 0 4px rgba(255, 255, 255, .7)); overflow: visible; }
.lbadge .logo-m .flow path, .find-orb .logo-m .flow path, .auth-logo .logo-m .flow path { stroke: #FAD65C; stroke-width: 9; filter: drop-shadow(0 0 3px #FAD65C); }
.lbadge .logo-m .ln, .find-orb:not(.spin) .logo-m .ln, .auth-logo .logo-m .ln { animation: nodeBreathe 2.8s ease-in-out infinite; animation-delay: calc(var(--d) * -.45s); }
.lbadge .logo-m .lc, .find-orb:not(.spin) .logo-m .lc, .auth-logo .logo-m .lc { animation: lcBeat 2.8s ease-in-out infinite; }
.lbadge .logo-m g:first-child, .find-orb .logo-m g:first-child, .auth-logo .logo-m g:first-child { animation: none; }
.lbadge .logo-m, .find-orb:not(.spin) .logo-m, .auth-logo:not(.intro) .logo-m { animation: logoWiggle 6s ease-in-out infinite; }
@keyframes logoWiggle { 0%, 84%, 100% { transform: rotate(0) scale(1); } 88% { transform: rotate(-14deg) scale(1.12); } 92% { transform: rotate(10deg) scale(1.06); } 96% { transform: rotate(-4deg) scale(1); } }
.logo-m.burst { animation: logoSpin .9s cubic-bezier(.3, 1.25, .5, 1) !important; }
/* wordmark: readable ink, with a soft lavender-to-gold shimmer passing through */
.brand-wm { background: linear-gradient(90deg, var(--ink) 0%, var(--ink) 40%, #B9AADF 50%, #FAD65C 56%, var(--ink) 66%, var(--ink) 100%); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: wmShine 5s ease-in-out infinite; }
@keyframes wmShine { 0%, 30% { background-position: 100% 0; } 70%, 100% { background-position: 0% 0; } }
.loading .lbadge { animation: meshFlow 3s ease-in-out infinite alternate, logoFloat 2.4s ease-in-out infinite; }
/* tab bar pill and glow in the brand pair */
.nav::before { background: linear-gradient(135deg, rgba(185, 170, 223, .32), rgba(250, 214, 92, .26)); box-shadow: 0 0 18px rgba(185, 170, 223, .45), inset 0 0 0 1px rgba(185, 170, 223, .35); }
.nav button.on svg { filter: drop-shadow(0 0 6px rgba(185, 170, 223, .95)); }
.find-orb.spin::before { background: conic-gradient(from 0deg, transparent, #B9AADF, #FAD65C, transparent 45%); }
.brand .logo-m g[stroke], .brand .logo-m g[fill] { stroke: currentColor; }
.brand .logo-m g[fill] { fill: currentColor; }

/* =========================================================
   Glass v1 (Gary 2026-11-16): Instagram / iOS-style frosted glass.
   Floating glass tab bar, glass top bar that content scrolls under, glass sheets and toasts.
   ========================================================= */
:root { --glass-bg: rgba(255, 255, 255, .58); --glass-hi: rgba(255, 255, 255, .85); --glass-line: rgba(255, 255, 255, .7); --glass-edge: rgba(40, 30, 60, .08); --glass-shadow: 0 12px 36px -10px rgba(60, 40, 90, .28), 0 2px 8px rgba(60, 40, 90, .08); --sheet-glass: rgba(251, 249, 254, .95); }
:root[data-theme="dark"] { --glass-bg: rgba(38, 35, 46, .55); --glass-hi: rgba(255, 255, 255, .22); --glass-line: rgba(255, 255, 255, .14); --glass-edge: rgba(0, 0, 0, .4); --glass-shadow: 0 14px 40px -10px rgba(0, 0, 0, .7), 0 2px 8px rgba(0, 0, 0, .3); --sheet-glass: rgba(27, 25, 32, .8); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --glass-bg: rgba(38, 35, 46, .55); --glass-hi: rgba(255, 255, 255, .22); --glass-line: rgba(255, 255, 255, .14); --glass-edge: rgba(0, 0, 0, .4); --glass-shadow: 0 14px 40px -10px rgba(0, 0, 0, .7), 0 2px 8px rgba(0, 0, 0, .3); --sheet-glass: rgba(27, 25, 32, .8); } }

/* floating glass tab bar: content scrolls behind it */
#app > .nav { position: absolute; z-index: 5; left: 14px; right: 14px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); padding: 6px 8px; border: 0; border-radius: 30px;
  background: var(--glass-bg); -webkit-backdrop-filter: blur(22px) saturate(190%); backdrop-filter: blur(22px) saturate(190%);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-hi), inset 0 0 0 1px var(--glass-line), 0 0 0 .5px var(--glass-edge); }
#app > .nav::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  background: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 45%), radial-gradient(120% 60% at 50% -10%, rgba(255, 255, 255, .25), transparent 60%); mix-blend-mode: soft-light; }
#app > .nav::before { border-radius: 24px; }
#app:has(> .nav) > .screen { padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }
#app:has(> .nav) .toast { bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }

/* glass top bar on the main pages: sticks and blurs what scrolls under it */
.screen > .topbar, .screen > .stack > .topbar { position: sticky; top: -16px; z-index: 4; margin: -16px -20px 0; padding: 16px 20px 8px;
  background: linear-gradient(180deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 55%, transparent) 100%);
  -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%); }

/* glass sheets, scrim and toasts */
.sheet { background: var(--sheet-glass); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); box-shadow: inset 0 1px 0 var(--glass-hi), 0 -10px 40px -12px rgba(40, 30, 60, .3); }
.scrim { -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.toast { background: var(--glass-bg); color: var(--ink); -webkit-backdrop-filter: blur(22px) saturate(190%); backdrop-filter: blur(22px) saturate(190%); box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-hi), inset 0 0 0 1px var(--glass-line); }


/* Brand look v4 (Gary 2026-11-16 icon): lavender / violet / pink / coral / yellow mesh, like his reference icon */
:root { --mesh: radial-gradient(57% 57% at 96% 8%, #FFE35A 0%, #FFE35A 16%, rgba(255, 227, 90, 0) 100%),
  radial-gradient(38% 38% at 100% 100%, #B2A8FA 0%, #B2A8FA 10%, rgba(178, 168, 250, 0) 100%),
  radial-gradient(50% 50% at 82% 48%, #FBA8A8 0%, #FBA8A8 8%, rgba(251, 168, 168, 0) 100%),
  radial-gradient(50% 50% at 62% 88%, #F7A3E6 0%, #F7A3E6 10%, rgba(247, 163, 230, 0) 100%),
  radial-gradient(60% 60% at 0% 98%, #8A57EA 0%, #8A57EA 12%, rgba(138, 87, 234, 0) 100%),
  radial-gradient(62% 62% at 5% 5%, #DCCBFA 0%, #DCCBFA 15%, rgba(220, 203, 250, 0) 100%),
  linear-gradient(135deg, #C9A6F0, #E9A6D8); }
.nav::before, #app > .nav::before { background: linear-gradient(135deg, rgba(201, 166, 240, .38), rgba(247, 163, 230, .32), rgba(255, 227, 90, .26)); box-shadow: 0 0 18px rgba(233, 166, 216, .45), inset 0 0 0 1px rgba(201, 166, 240, .35); }
.lbadge { box-shadow: 0 4px 14px -4px rgba(170, 120, 230, .7), 0 0 18px -6px rgba(247, 163, 230, .7); }

/* Welcome orb v2 (Gary 2026-11-16): no more hue-rotate snapping (yellow -> green -> jump back).
   The orb is the brand mesh: two soft colour layers turning slowly in opposite directions (a full turn loops seamlessly),
   inside a shape that keeps morphing back and forth. */
.splash .blob { background: radial-gradient(circle at 50% 50%, #E9C3F0, #C9A6F0 70%); overflow: hidden; opacity: .95; isolation: isolate;
  animation: drift 10s ease-in-out infinite alternate, orbBreath 7s ease-in-out infinite alternate; }
.splash .blob::before, .splash .blob::after { content: ""; position: absolute; inset: -30%; pointer-events: none; }
.splash .blob::before { filter: blur(26px); animation: orbTurn 22s linear infinite;
  background: radial-gradient(34% 34% at 22% 24%, #DCCBFA, rgba(220, 203, 250, 0) 100%),
              radial-gradient(36% 36% at 80% 22%, #FFE35A, rgba(255, 227, 90, 0) 100%),
              radial-gradient(36% 36% at 76% 74%, #F7A3E6, rgba(247, 163, 230, 0) 100%),
              radial-gradient(38% 38% at 22% 78%, #8A57EA, rgba(138, 87, 234, 0) 100%); }
.splash .blob::after { filter: blur(30px); opacity: .75; animation: orbTurn 31s linear infinite reverse;
  background: radial-gradient(30% 30% at 50% 18%, #FBA8A8, rgba(251, 168, 168, 0) 100%),
              radial-gradient(28% 28% at 50% 84%, #B2A8FA, rgba(178, 168, 250, 0) 100%); }
@keyframes orbTurn { to { transform: rotate(360deg); } }
@keyframes orbBreath { from { opacity: .88; } to { opacity: 1; } }
.splash:has(.mark.intro) .blob { animation: orbIn 1.4s cubic-bezier(.2, .9, .25, 1) both, drift 10s ease-in-out 1.4s infinite alternate, orbBreath 7s ease-in-out 1.4s infinite alternate; }
@keyframes orbIn { from { opacity: 0; transform: translateX(-50%) scale(.6) rotate(-30deg); filter: blur(30px); } to { opacity: .95; transform: translateX(-50%) scale(1) rotate(0); filter: blur(0); } }
.splash .mark svg { filter: drop-shadow(0 0 10px rgba(255, 255, 255, .85)) drop-shadow(0 0 34px rgba(200, 140, 240, .7)); }

/* =========================================================
   Theme v5 (Gary 2026-11-16): the whole app follows the logo — lavender, violet, pink, coral, a touch of yellow.
   Purple-tinted neutrals, a soft mesh glow behind every page, brand-gradient primary buttons.
   ========================================================= */
:root {
  --bg: #F8F5FB; --surface: #FFFFFF; --surface-2: #F1EBF8; --ink: #2A2134; --ink-2: #5F566D; --ink-3: #6E6579; --line: #E9E2F1;
  --accent: #7444D4; --accent-soft: #F1E8FD; --lav: #C9A6F0; --peach: #F9B3C2; --btn: #2A2134; --on-btn: #FFFFFF; --frame: #EEE8F5;
  --shadow: 0 1px 2px rgba(80, 40, 130, .05), 0 8px 24px rgba(80, 40, 130, .08);
  --brand-grad: linear-gradient(120deg, #7444D4 0%, #A64FC9 55%, #C54E8E 100%);
  --ig: var(--brand-grad);
  --bg-mesh: radial-gradient(70% 38% at 0% 0%, rgba(201, 166, 240, .30), rgba(201, 166, 240, 0) 100%),
             radial-gradient(55% 30% at 100% 0%, rgba(255, 227, 90, .18), rgba(255, 227, 90, 0) 100%),
             radial-gradient(70% 40% at 100% 100%, rgba(247, 163, 230, .18), rgba(247, 163, 230, 0) 100%),
             radial-gradient(60% 35% at 0% 100%, rgba(138, 87, 234, .10), rgba(138, 87, 234, 0) 100%), var(--bg);
}
:root[data-theme="dark"] {
  --bg: #16121D; --surface: #201A2A; --surface-2: #2A2236; --ink: #F5F0FA; --ink-2: #BDB3CB; --ink-3: #958AA4; --line: #352C42;
  --accent: #C9A6F8; --accent-soft: #2E2342; --lav: #7B5BC0; --peach: #A0577A; --btn: #F5F0FA; --on-btn: #1B1622; --frame: #0E0B13;
  --bg-mesh: radial-gradient(70% 38% at 0% 0%, rgba(138, 87, 234, .22), rgba(138, 87, 234, 0) 100%),
             radial-gradient(55% 30% at 100% 0%, rgba(255, 227, 90, .06), rgba(255, 227, 90, 0) 100%),
             radial-gradient(70% 40% at 100% 100%, rgba(247, 163, 230, .10), rgba(247, 163, 230, 0) 100%), var(--bg);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #16121D; --surface: #201A2A; --surface-2: #2A2236; --ink: #F5F0FA; --ink-2: #BDB3CB; --ink-3: #958AA4; --line: #352C42;
  --accent: #C9A6F8; --accent-soft: #2E2342; --lav: #7B5BC0; --peach: #A0577A; --btn: #F5F0FA; --on-btn: #1B1622; --frame: #0E0B13;
  --bg-mesh: radial-gradient(70% 38% at 0% 0%, rgba(138, 87, 234, .22), rgba(138, 87, 234, 0) 100%),
             radial-gradient(55% 30% at 100% 0%, rgba(255, 227, 90, .06), rgba(255, 227, 90, 0) 100%),
             radial-gradient(70% 40% at 100% 100%, rgba(247, 163, 230, .10), rgba(247, 163, 230, 0) 100%), var(--bg);
} }
body, #app { background: var(--bg); }
#app > .screen:not(.peek), .screen.peek, .auth, .splash { background: var(--bg-mesh); }
/* primary actions wear the brand gradient */
.btn.primary, .chip.on, .inputbar .send, .cal-d.today { background: var(--brand-grad); color: #fff; }
.btn.primary { box-shadow: 0 10px 22px -10px rgba(166, 79, 201, .75), inset 0 1px 0 rgba(255, 255, 255, .25); }
.chip.on { box-shadow: 0 6px 14px -8px rgba(166, 79, 201, .7); }
.bubble.me { background: linear-gradient(135deg, #DCC6F7, #F9C3D3); color: #2A2134; }
:root[data-theme="dark"] .bubble.me { background: linear-gradient(135deg, #5C3FA0, #8E3F70); color: #F5F0FA; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bubble.me { background: linear-gradient(135deg, #5C3FA0, #8E3F70); color: #F5F0FA; } }
.meter span { background: var(--brand-grad); }
.me-cover, .edit-cover { background-image: var(--mesh); }
.add-card { border-color: #C9A6F0; }
.splash .blob { background: radial-gradient(circle at 50% 50%, #E9C3F0, #C9A6F0 70%); }

/* Welcome orb v3 (Gary: "像大头儿子"): smaller, centred on the logo, edges melt into the page like a glow instead of a hard ball. */
.splash .blob { width: 300px; height: 300px; top: 68px; border-radius: 50%;
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, rgba(0, 0, 0, .55) 78%, transparent 100%); mask-image: radial-gradient(closest-side, #000 55%, rgba(0, 0, 0, .55) 78%, transparent 100%); }
.splash .mark svg { width: 104px; height: 104px; }
.splash .mark::before { width: 190px; height: 190px; margin: -95px 0 0 -95px; }
.splash .mark::after { width: 236px; height: 236px; margin: -118px 0 0 -118px; }
.splash .mark::after { -webkit-mask: radial-gradient(circle, transparent 0 115px, #000 116px 118px); mask: radial-gradient(circle, transparent 0 115px, #000 116px 118px); }
/* orb now lives inside .mark so it is always centred on the logo, on any screen height */
.splash .mark { isolation: isolate; }
.splash .mark .blob { left: 50%; top: 50%; margin: -150px 0 0 -150px; transform: none; z-index: -1;
  animation: orbMorph 10s ease-in-out infinite alternate, orbBreath 7s ease-in-out infinite alternate; }
.splash .mark.intro .blob { animation: orbIn2 1.4s cubic-bezier(.2, .9, .25, 1) both, orbMorph 10s ease-in-out 1.4s infinite alternate, orbBreath 7s ease-in-out 1.4s infinite alternate; }
@keyframes orbMorph { from { border-radius: 48% 52% 46% 54% / 54% 46% 54% 46%; transform: rotate(0) scale(1); } to { border-radius: 54% 46% 52% 48% / 46% 54% 46% 54%; transform: rotate(14deg) scale(1.05); } }
@keyframes orbIn2 { from { opacity: 0; transform: scale(.55) rotate(-30deg); filter: blur(24px); } to { opacity: .95; transform: scale(1) rotate(0); filter: blur(0); } }

/* tab bar pill tracks the swipe 1:1, then settles in step with the page */
#app > .nav.dragging::before { transition: none; }
#app > .nav.settle::before { transition: transform .26s cubic-bezier(.2, .8, .2, 1); }

/* =========================================================
   Marketplace (2026-11-16): Taobao-style product grid, product page with map, shop sign-up.
   ========================================================= */
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pcard { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 0 0 10px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; animation: cardIn .5s var(--spring) both; color: var(--ink); font: inherit; border: 0; }
.pcard .pimg { display: block; aspect-ratio: 1 / 1; background: var(--surface-2); overflow: hidden; }
.pcard .pimg img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--spring); }
.pcard.pressing .pimg img { transform: scale(1.05); }
.pcard .pt { padding: 0 10px; font-size: 13.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.pcard > .row { padding: 0 10px; }
.pp { color: #C54E8E; font-weight: 800; letter-spacing: -.01em; }
:root[data-theme="dark"] .pp { color: #F7A3E6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pp { color: #F7A3E6; } }
.ploc { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 7px 2px 4px; white-space: nowrap; }
.ploc .i { width: 12px; height: 12px; }
.pcard.skel { animation: none; }
.pcard.skel .pimg, .pcard.skel .pt { background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface) 50%, var(--surface-2) 70%); background-size: 300% 100%; animation: skel 1.3s linear infinite; }
.pcard.skel .pt { height: 12px; min-height: 0; margin: 4px 10px 0; border-radius: 6px; padding: 0; }
.pcard.skel .pt.short { width: 45%; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.pbig { border-radius: 22px; overflow: hidden; background: var(--surface-2); aspect-ratio: 1 / 1; box-shadow: var(--shadow); }
.pbig img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mapbox { border-radius: 16px; overflow: hidden; height: 190px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.mapbox iframe { width: 100%; height: 100%; border: 0; display: block; }
.shop-logo { width: 46px; height: 46px; border-radius: 14px; flex: none; object-fit: cover; display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent); border: 0; overflow: hidden; }
.shop-logo.lg { width: 72px; height: 72px; border-radius: 20px; }
.shop-logo img { width: 100%; height: 100%; object-fit: cover; }
.li-thumb { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; flex: none; background: var(--surface-2); }
.li-thumb.lg { width: 72px; height: 72px; }
.pimg-pick { position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 280px; align-self: center; border-radius: 22px; border: 1.5px dashed #C9A6F0; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; align-content: center; gap: 6px; overflow: hidden; }
.pimg-pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pick-busy { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .35); color: #fff; font-size: 22px; }
.form textarea { width: 100%; box-sizing: border-box; font: inherit; }

a.btn, a.btn:hover, .chips a.btn { text-decoration: none; }

/* sort switch above the product grid */
.sec-head .sortseg { display: inline-grid; grid-auto-flow: column; gap: 2px; padding: 3px; font-size: 12px; }
.sec-head .sortseg button { min-height: 30px; padding: 0 10px; font-size: 12px; }
.find-list + .pgrid, section > .card.store[data-a="showStores"] { box-shadow: var(--shadow), inset 0 0 0 1.5px rgba(166, 79, 201, .35); }

/* best place to buy + sort selector */
.sortsel { position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 0 10px; min-height: 32px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font-size: 12.5px; }
.sortsel select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 600; padding: 6px 0; outline: none; }
.best-sec .best-list { box-shadow: var(--shadow), inset 0 0 0 1.5px rgba(166, 79, 201, .35); }
.best-row .li-thumb { width: 56px; height: 56px; }
.best-n { display: grid; place-items: center; background: var(--brand-grad); color: #fff; font-weight: 800; }
.best-ask { box-shadow: var(--shadow), inset 0 0 0 1.5px rgba(166, 79, 201, .35); }
.best-row .pp { white-space: nowrap; }
.best-row .btn.sm, .near-card .btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.best-row .row .btn.sm .i, .near-card .btn.sm .i { width: 16px; height: 16px; }
.grid-sub { margin: 4px 0 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.pgrid + .grid-sub { margin-top: 18px; }

/* in-app nearby map */
.mapbox.big { height: 260px; margin-top: 12px; border-radius: 20px; position: relative; z-index: 0; }
.map-me { display: block; width: 22px; height: 22px; border-radius: 50%; background: #3B82F6; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(59, 130, 246, .25), 0 2px 6px rgba(0, 0, 0, .3); }
.map-pin { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); color: #fff; font: 700 13px/1 var(--font); box-shadow: 0 4px 10px rgba(60, 30, 90, .35); border: 2px solid #fff; }
.map-pin.best { background: var(--brand-grad); }
.map-pin.own { background: #2F7D5B; }
.map-pin.shop { background: #8E7AB5; width: 22px; height: 22px; }
.leaflet-popup-content { font: 13px/1.45 var(--font); }
.leaflet-popup-content .btn { margin-top: 6px; color: #fff; }
.leaflet-container { font-family: var(--font); background: var(--surface-2); }
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(.92) hue-rotate(180deg) brightness(.9) contrast(.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .leaflet-tile-pane { filter: invert(.92) hue-rotate(180deg) brightness(.9) contrast(.9); } }
.map-pin i { transform: rotate(45deg); font-style: normal; }

/* =========================================================
   Liquid Glass v2 (Gary 2026-11-16: "like Apple's glass").
   Clearer, brighter glass on the controls that float over content (tab bar, round buttons, search, switches),
   with a light rim, an inner highlight and a soft lens shadow. Content (cards, photos) stays solid so it's readable.
   On Chrome/Android the tab bar also bends what's behind it a little (SVG lens); other browsers get the blur only.
   ========================================================= */
:root {
  --lg-fill: rgba(255, 255, 255, .34);
  --lg-rim: linear-gradient(140deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .25) 35%, rgba(255, 255, 255, .08) 60%, rgba(255, 255, 255, .7));
  --lg-shadow: 0 10px 30px -8px rgba(70, 40, 110, .28), 0 2px 6px rgba(70, 40, 110, .10), inset 0 1px 1px rgba(255, 255, 255, .75), inset 0 -1px 2px rgba(255, 255, 255, .22);
  --lg-blur: blur(16px) saturate(210%) brightness(1.06);
}
:root[data-theme="dark"] { --lg-fill: rgba(40, 34, 54, .36); --lg-rim: linear-gradient(140deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, .08) 35%, rgba(255, 255, 255, .03) 60%, rgba(255, 255, 255, .28)); --lg-shadow: 0 12px 34px -8px rgba(0, 0, 0, .6), inset 0 1px 1px rgba(255, 255, 255, .22), inset 0 -1px 2px rgba(255, 255, 255, .06); --lg-blur: blur(16px) saturate(190%) brightness(.95); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --lg-fill: rgba(40, 34, 54, .36); --lg-rim: linear-gradient(140deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, .08) 35%, rgba(255, 255, 255, .03) 60%, rgba(255, 255, 255, .28)); --lg-shadow: 0 12px 34px -8px rgba(0, 0, 0, .6), inset 0 1px 1px rgba(255, 255, 255, .22), inset 0 -1px 2px rgba(255, 255, 255, .06); --lg-blur: blur(16px) saturate(190%) brightness(.95); } }

/* the glass recipe: translucent fill + bright rim (border-box gradient) + blur + highlight */
#app > .nav, .find-box, .screen > .topbar .iconbtn, .screen > .stack > .topbar .iconbtn, .cover-bar .iconbtn, .sortsel, .toast {
  border: 1px solid transparent !important;
  background: linear-gradient(var(--lg-fill), var(--lg-fill)) padding-box, var(--lg-rim) border-box !important;
  -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur);
  box-shadow: var(--lg-shadow) !important;
}
#app > .nav { border-radius: 32px; }
#app > .nav::after { background: radial-gradient(90% 70% at 50% -20%, rgba(255, 255, 255, .45), transparent 60%); mix-blend-mode: soft-light; }
/* the selected tab is a brighter glass "lens" */
#app > .nav::before { background: linear-gradient(rgba(255, 255, 255, .42), rgba(255, 255, 255, .18)) padding-box, var(--lg-rim) border-box !important; border: 1px solid transparent; box-shadow: 0 4px 14px -4px rgba(166, 79, 201, .45), inset 0 1px 1px rgba(255, 255, 255, .8) !important; }
:root[data-theme="dark"] #app > .nav::before { background: linear-gradient(rgba(255, 255, 255, .16), rgba(255, 255, 255, .06)) padding-box, var(--lg-rim) border-box !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #app > .nav::before { background: linear-gradient(rgba(255, 255, 255, .16), rgba(255, 255, 255, .06)) padding-box, var(--lg-rim) border-box !important; } }
.nav button.pressing svg { transform: scale(.8); }
#app > .nav button.on { color: var(--ink); }
/* round glass buttons in the top bar */
.screen > .topbar .iconbtn, .screen > .stack > .topbar .iconbtn, .cover-bar .iconbtn { width: 40px; height: 40px; margin-left: 6px; }
.toast { color: var(--ink); }
/* glass squishes a little when pressed, like Apple's controls */
.find-box:focus-within { box-shadow: var(--lg-shadow), 0 0 0 3px rgba(166, 79, 201, .25) !important; }
.iconbtn.pressing { transform: scale(.88); }
/* Chrome/Android: real refraction on the tab bar */
html.lg-refract #app > .nav { -webkit-backdrop-filter: url(#lgLens) blur(10px) saturate(210%); backdrop-filter: url(#lgLens) blur(10px) saturate(210%); }

/* invite card sheet + invite code */
.ic-wrap { display: grid; place-items: center; }
.ic-img { width: min(62vw, 240px); aspect-ratio: 9 / 16; border-radius: 22px; box-shadow: 0 16px 40px -12px rgba(90, 50, 140, .45); object-fit: cover; -webkit-touch-callout: default; }
.ic-skel { background: var(--mesh); background-size: 130% 130%; animation: meshFlow 2s ease-in-out infinite alternate; }
.ic-code { display: flex; align-items: center; justify-content: center; gap: 10px; }
.ic-code b { font-size: 18px; letter-spacing: .06em; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.code-in { flex: 1; min-height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); padding: 0 16px; font: 600 15px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }

/* dark mode: calmer tab bar (partner found it too bright) — still glass, just dimmer */
:root[data-theme="dark"] #app > .nav { background: linear-gradient(rgba(24, 20, 32, .66), rgba(24, 20, 32, .66)) padding-box, linear-gradient(140deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .04) 40%, rgba(255, 255, 255, .02) 65%, rgba(255, 255, 255, .12)) border-box !important; -webkit-backdrop-filter: blur(18px) saturate(140%) brightness(.8); backdrop-filter: blur(18px) saturate(140%) brightness(.8); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .08) !important; }
html.lg-refract[data-theme="dark"] #app > .nav { -webkit-backdrop-filter: url(#lgLens) blur(14px) saturate(140%) brightness(.8); backdrop-filter: url(#lgLens) blur(14px) saturate(140%) brightness(.8); }
:root[data-theme="dark"] #app > .nav::after { background: radial-gradient(90% 70% at 50% -20%, rgba(255, 255, 255, .10), transparent 60%); }
:root[data-theme="dark"] #app > .nav::before { background: linear-gradient(rgba(255, 255, 255, .09), rgba(255, 255, 255, .04)) padding-box, linear-gradient(140deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .05) 45%, rgba(255, 255, 255, .14)) border-box !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12) !important; }
:root[data-theme="dark"] #app > .nav button.on svg { filter: drop-shadow(0 0 4px rgba(201, 166, 240, .45)); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #app > .nav { background: linear-gradient(rgba(24, 20, 32, .66), rgba(24, 20, 32, .66)) padding-box, linear-gradient(140deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .04) 40%, rgba(255, 255, 255, .02) 65%, rgba(255, 255, 255, .12)) border-box !important; -webkit-backdrop-filter: blur(18px) saturate(140%) brightness(.8); backdrop-filter: blur(18px) saturate(140%) brightness(.8); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .08) !important; }
  html.lg-refract:not([data-theme="light"]) #app > .nav { -webkit-backdrop-filter: url(#lgLens) blur(14px) saturate(140%) brightness(.8); backdrop-filter: url(#lgLens) blur(14px) saturate(140%) brightness(.8); }
  :root:not([data-theme="light"]) #app > .nav::after { background: radial-gradient(90% 70% at 50% -20%, rgba(255, 255, 255, .10), transparent 60%); }
  :root:not([data-theme="light"]) #app > .nav::before { background: linear-gradient(rgba(255, 255, 255, .09), rgba(255, 255, 255, .04)) padding-box, linear-gradient(140deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .05) 45%, rgba(255, 255, 255, .14)) border-box !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12) !important; }
  :root:not([data-theme="light"]) #app > .nav button.on svg { filter: drop-shadow(0 0 4px rgba(201, 166, 240, .45)); }
}

/* ---------- 种草: two-column waterfall, post page, product tag ---------- */
.zgrid { columns: 2; column-gap: 10px; }
.zc { display: flex; flex-direction: column; gap: 6px; width: 100%; break-inside: avoid; margin: 0 0 10px; padding: 0 0 10px; text-align: left; color: var(--ink);
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; animation: cardIn .5s var(--spring) both; }
.zc-img { display: block; background: var(--surface-2); overflow: hidden; }
.zc-img img { display: block; width: 100%; height: auto; max-height: 300px; min-height: 120px; object-fit: cover; transition: transform .4s var(--spring); }
.zc.pressing .zc-img img { transform: scale(1.05); }
.zc-txt { display: block; padding: 18px 12px 6px; min-height: 120px; font-size: 15px; font-weight: 600; line-height: 1.45; background: var(--brand-grad, var(--accent-soft)); color: #fff; }
.zc-t { padding: 0 10px; font-size: 13.5px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.zc-p { padding: 0 10px; font-size: 14px; }
.zc-foot { display: flex; align-items: center; gap: 6px; padding: 0 10px; font-size: 11.5px; color: var(--ink-2); min-width: 0; }
.zc-foot .avatar.xs { width: 20px; height: 20px; border: 0; font-size: 10px; }
.zc-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 0 1 auto; }
.zc-like { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; flex: none; }
.zc-like .i { width: 14px; height: 14px; }
.zc-like.liked { color: #D4566A; } .zc-like.liked .i { fill: currentColor; }
.zbadge { display: inline-block; flex: none; font-size: 10.5px; font-weight: 700; line-height: 1; padding: 3px 6px; border-radius: 999px; vertical-align: 2px; }
.zbadge.off { background: var(--brand-grad, var(--accent)); color: #fff; }
.zbadge.shop { background: var(--accent-soft); color: var(--accent); }
.zp-img { width: 100%; max-height: 70vh; object-fit: cover; border-radius: 20px; display: block; box-shadow: var(--shadow); }
.ztag .nic { flex: none; }
.lens-list { display: grid; gap: 8px; max-height: 280px; overflow-y: auto; }
.lens-it { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; background: var(--surface-2); text-align: left; color: var(--ink); }
.lens-it img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex: none; background: #fff; }
.lens-it .grow { display: grid; gap: 2px; min-width: 0; }
.lens-t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* two-button rows: never let a long label overflow on narrow phones (360px Android) */
.row2 > .btn { min-width: 0; white-space: normal; line-height: 1.2; text-align: center; padding-left: 12px; padding-right: 12px; }
.row2 > .btn .i { flex: none; }
@media (max-width: 380px) { .row2 > .btn { font-size: 13.5px; gap: 6px; } }

/* Inside the phone app: behave like an app, not a web page (no zoom, no text selection, no long-press link/image menus, no scroll bars, no page bounce). */
html.native, html.native body { touch-action: pan-x pan-y; overscroll-behavior: none; }
html.native * { scrollbar-width: none; -webkit-tap-highlight-color: transparent; }
html.native *::-webkit-scrollbar { display: none; width: 0; height: 0; }
html.native body, html.native body * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html.native input, html.native textarea, html.native [contenteditable], html.native [contenteditable] * { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
html.native .ic-img { -webkit-touch-callout: default; }
html.native img { -webkit-user-drag: none; }
/* list rows that are links look like the other rows, not blue web links */
a.li, a.li:visited { color: inherit; text-decoration: none; }

/* Edge to edge, like Instagram: pages run up behind the status bar / Dynamic Island.
   A frosted strip keeps the clock readable while content scrolls under it. */
.screen { padding-top: calc(16px + var(--st)); }
.auth, .splash { padding-top: calc(24px + var(--st)); }
#app::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: var(--st); z-index: 6; pointer-events: none;
  background: color-mix(in srgb, var(--bg) 62%, transparent); -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%); }
/* pages with a back button: the glass bar sticks and reaches up behind the status bar */
.screen > .topbar, .screen > .stack > .topbar { margin-top: calc(-16px - var(--st)); padding-top: calc(16px + var(--st)); top: calc(-16px - var(--st)); }
/* main tab pages: the header scrolls away with the page */
#app:has(> .nav) > .screen > .topbar, #app:has(> .nav) > .screen > .stack > .topbar { position: relative; top: auto; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
/* profile cover fills the top of the screen */
.me-cover { margin-top: calc(-16px - var(--st)); height: calc(168px + var(--st)); }
.me-cover .cover-bar { padding-top: calc(12px + var(--st)); }

/* Android draws its own thin scroll bar on the right while scrolling, and no CSS can hide it.
   In the app, push each scroll area 14px past the right screen edge (clipped), so the bar sits off-screen. */
html.native #app { overflow: hidden; }
html.native .screen { margin-right: -14px; padding-right: calc(max(20px, env(safe-area-inset-right, 0px)) + 14px); }
html.native .auth { margin-right: -14px; padding-right: calc(max(24px, env(safe-area-inset-right, 0px)) + 14px); }
html.native .sheet { right: -14px; padding-right: 34px; clip-path: inset(0 14px 0 0 round 28px 28px 0 0); }
html.kb .nav { display: none; }
.row2 > * { min-width: 0; }
.row2 input { width: 100%; min-width: 0; }

/* Gift Groups */
.gg-screen, .gg-sheet {
  overflow-wrap: anywhere;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.gg-screen input, .gg-screen textarea, .gg-sheet input, .gg-sheet textarea {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}
.gg-stack { gap: 14px; }
.gg-stack .topbar b { min-width: 0; text-align: center; }
.gg-block { display: block; }
.gg-center { text-align: center; }
.gg-section-stack { display: grid; gap: 10px; }
.gg-section { margin: 0; min-height: 28px; }
.gg-section h2 { margin: 0; }
.gg-section .iconbtn { color: var(--accent); background: var(--glass-bg); border: 1px solid var(--glass-line); }
.gg-hero, .gg-season {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff6fc;
  border: 1px solid #af83c86c;
  background: radial-gradient(ellipse at 88% 0%, #874b7a 0%, transparent 60%),
    linear-gradient(150deg, #482a66, #28203e 72%);
  box-shadow: inset 0 1px 0 #fff2, 0 12px 26px -15px #1d1028a6;
}
.gg-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px 18px 26px;
  border-radius: 26px;
  text-align: center;
}
.gg-hero h1, .gg-hero h2, .gg-act-head h1 { margin: 0; line-height: 1.1; letter-spacing: -.035em; font-size: clamp(26px, 7vw, 34px); }
.gg-emblem, .gg-activity-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  color: #ffe2a5;
  background: linear-gradient(145deg, #ffc07034, #ffc07010);
  border: 1px solid #ffc07050;
}
.gg-emblem .i { width: 26px; height: 26px; }
.gg-hero .gg-emblem { width: 58px; height: 58px; border-radius: 19px; margin-bottom: 2px; }
.gg-kicker {
  font-weight: 700;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.gg-kicker { color: #ffdda1; }
.gg-season {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px;
  border-radius: 20px;
  text-align: left;
}
.gg-season .small { display: block; margin-top: 3px; color: #f0d3e2; }
.gg-season .gg-emblem { width: 42px; height: 42px; border-radius: 13px; }
.gg-season .gg-emblem .i { width: 22px; height: 22px; }
.gg-snow { position: absolute; z-index: -1; inset: 0; overflow: hidden; pointer-events: none; }
.gg-snow i {
  position: absolute;
  top: var(--top, 20%);
  left: var(--left, 10%);
  color: #ffe5ba;
  font-size: var(--size, 14px);
  font-style: normal;
  animation: gg-snow 6.5s ease-in-out infinite backwards;
  animation-delay: var(--delay, -4s);
}
.gg-snow i:nth-child(2) { --top: 14%; --left: 30%; --delay: -1.2s; --size: 24px; }
.gg-snow i:nth-child(3) { --top: 20%; --left: 83%; --delay: -2.6s; }
.gg-snow i:nth-child(4) { --top: 52%; --left: 92%; --delay: -4.1s; --size: 24px; }
.gg-snow i:nth-child(5) { --top: 69%; --left: 77%; --delay: -3.2s; }
.gg-snow i:nth-child(6) { --top: 64%; --left: 16%; --delay: -.8s; --size: 10px; }
.gg-snow i:nth-child(7) { --top: 86%; --left: 37%; --delay: -2s; --size: 21px; }
@keyframes gg-snow {
  0%, 100% { transform: translate3d(0, -5px, 0); opacity: .22; }
  50% { transform: translate3d(8px, 13px, 0); opacity: .85; }
}
.gg-reveal-ready h2 { font-size: 22px; max-width: 16ch; }
.gg-reveal-ready .btn { margin-top: 8px; }
.gg-revealed .gg-kicker { font-size: 12px; }
.gg-reveal-motion { animation: gg-open .55s cubic-bezier(.2, 1.28, .4, 1) both; }
.gg-reveal-motion h2 { animation: gg-open .65s .09s cubic-bezier(.2, 1.35, .4, 1) both; }
@keyframes gg-open {
  from { opacity: .2; transform: translateY(9px) scale(.91); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.gg-avatars { display: flex; align-items: center; justify-content: center; margin: 2px 0 6px; padding-left: 5px; }
.gg-avatars .avatar, .gg-avatar-more { margin-left: -5px; border: 2px solid #4b2d60; }
.gg-avatar-more {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  background: #6d507f;
}
.gg-activity, .gg-preview { display: flex; align-items: center; gap: 12px; text-align: left; }
.gg-activity {
  width: 100%;
  color: var(--ink);
  padding: 13px;
}
.gg-stack .grow, .gg-sheet .grow, .gg-season .grow { flex: 1; min-width: 0; }
.gg-activity .grow > span, .gg-activity .grow > b { display: block; }
.gg-activity .grow > b { margin: 2px 0; font-size: 15px; }
.gg-activity > .i { color: var(--ink-3); }
.gg-activity-icon {
  color: #e8cbff;
  background: linear-gradient(145deg, #6d4b9b, #45315e);
  border-color: #aa80c278;
}
.gg-previews { padding: 0 13px; }
.gg-preview { padding: 11px 0; }
.gg-preview + .gg-preview { border-top: 1px solid var(--line); }
.gg-tag {
  flex: none;
  border-radius: 99px;
  padding: 5px 9px;
  background: color-mix(in srgb, var(--accent, #a374df) 16%, transparent);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}
.gg-member .iconbtn { margin: -6px -8px -6px 0; flex: none; }
.gg-act-head { display: flex; align-items: center; gap: 12px; }
.gg-act-head h1 { margin-top: 3px; }
.gg-panel, .gg-form { display: grid; gap: 12px; align-items: start; }
.gg-panel { padding: 15px; }
.gg-panel p, .gg-sheet p { margin: 0; }
.gg-form .field { min-width: 0; }
.gg-form input, .gg-form select, .gg-form textarea { width: 100%; min-width: 0; }
.gg-form .field > input[type="date"] { display: block; }
.gg-form label { font-weight: 600; }
.gg-participants { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px; }
.gg-participants > span {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 12px;
}
.gg-participants .avatar { width: 24px; height: 24px; font-size: 11px; }
.gg-tastes { grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); }
.gg-tastes p { margin-top: 3px; color: var(--ink-2); font-size: 13px; white-space: pre-wrap; }
.gg-text-link { display: inline-flex; align-items: center; gap: 5px; justify-self: start; color: var(--ink-2); font-size: 13px; text-decoration: underline; }
.gg-text-link .i { width: 14px; height: 14px; }
.gg-price { color: var(--ink); font-size: 14px; font-weight: 700; }
.gg-thread h2 { margin: 0; font-size: 15px; line-height: 1.35; }
.gg-thread h2 .i { width: 17px; height: 17px; vertical-align: -3px; }
.gg-messages { display: grid; gap: 8px; max-height: 260px; overflow-y: auto; overscroll-behavior: contain; }
.gg-bubble-row { display: flex; align-items: center; justify-content: flex-end; }
.gg-bubble-row.incoming { justify-content: flex-start; }
.gg-bubble {
  max-width: 87%;
  border-radius: 14px 14px 4px 14px;
  padding: 8px 11px;
  color: #faf4ff;
  background: linear-gradient(135deg, #633e95, #855375);
}
.gg-bubble-row.incoming .gg-bubble { background: var(--glass-bg); color: var(--ink); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; }
.gg-bubble .tiny { opacity: .87; }
.gg-bubble p { margin-top: 2px; white-space: pre-wrap; }
.gg-chat-form { display: flex; align-items: stretch; gap: 8px; }
.gg-chat-form input {
  flex: 1;
  width: 0;
  min-width: 0;
  min-height: 43px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--glass-bg);
  color: var(--ink);
}
.gg-chat-form .btn { width: 44px; min-height: 44px; padding: 0; }
.gg-items { display: grid; gap: 12px; }
.gg-item { overflow: hidden; }
.gg-item .gg-panel { gap: 8px; }
.gg-item-media { position: relative; overflow: hidden; }
.gg-item-picture { height: clamp(122px, 38vw, 175px); border-radius: 0; }
.gg-item-picture > img { width: 100%; height: 100%; object-fit: cover; }
.gg-item-placeholder {
  color: #ffe4b1;
  background: radial-gradient(ellipse at 70% 0%, #9b647c, transparent 66%), linear-gradient(125deg, #60427f, #442b5b);
}
.gg-item-placeholder .i { width: 46px; height: 46px; }
.gg-ribbon {
  position: absolute;
  top: 12px;
  right: 0;
  border-radius: 6px 0 0 6px;
  padding: 6px 12px;
  background: #ffdf9a;
  color: #432732;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 3px 10px #22142636;
}
.gg-item-title h3 { margin: 0; font-size: 17px; }
.gg-item-title .iconbtn { margin: -8px -8px -8px 0; }
.gg-item .btn.block { margin-top: 3px; }
.gg-mine {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  padding: 8px 11px;
  color: #ffe9b9;
  background: linear-gradient(140deg, #52395d, #694050);
  font-size: 13px;
}
.gg-mine .tiny { color: #f4dfdc; }
.gg-option { justify-content: flex-start; }
.gg-friend { cursor: pointer; }
.gg-friend input { width: 20px; height: 20px; accent-color: var(--accent); }
.gg-wish-edit { min-width: 0; display: grid; gap: 8px; border: 1px solid var(--line); padding: 10px; border-radius: 12px; }
.gg-wish-edit legend { padding: 0 5px; color: var(--ink-2); font-size: 12px; }
.gg-ideas { max-height: 180px; overflow-y: auto; overscroll-behavior: contain; }
.gg-idea-thumb { width: 42px; height: 42px; border-radius: 8px; flex: none; }
.gg-qr-wrap { padding: 10px; overflow: hidden; }
.gg-qr-wrap #qrBox { display: grid; place-items: center; width: min(224px, 100%); aspect-ratio: 1; }
.gg-qr-wrap #qrBox :is(canvas, img) { max-width: 100%; height: auto; }
.gg-qr-wrap .muted { color: #5e5b66; }
.gg-sheet .share-grid { grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); }
html.kb .gg-sheet { max-height: 96%; }

.gg-theme {
  --gg-pine: var(--accent);
  --gg-red: var(--accent);
  --gg-gold: #f3d27a;
  --gg-blush: var(--accent-soft);
  --gg-mint: var(--surface-2);
  --gg-honey: var(--warn-soft);
}
.gg-theme.gg-sheet { box-shadow: 0 -10px 35px #00000029; }
.gg-theme .card { background: var(--surface); border: 0; border-radius: 18px; box-shadow: 0 3px 14px #00000010; }
.gg-theme .topbar { margin-bottom: 0; }
.gg-theme .topbar .iconbtn {
  background: var(--surface);
  color: var(--ink);
  border: 0;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  box-shadow: 0 2px 8px #00000015;
}
.gg-theme .topbar > b { text-align: center; }
.gg-head-actions { display: flex; align-items: center; gap: 5px; }
.gg-theme .gg-head-actions .iconbtn:first-child { font-weight: 800; font-size: 16px; }
.gg-theme .gg-hero { background: var(--brand-grad); color: #fff; border: 0; box-shadow: 0 4px 18px #00000014; }
.gg-theme .gg-hero h1, .gg-theme .gg-hero h2 { color: #fff; overflow-wrap: anywhere; max-width: 100%; }
.gg-theme .gg-group-hero { align-items: flex-start; padding: 20px; text-align: left; border-radius: 24px; }
.gg-theme .gg-group-hero h1 { margin: 0; font-size: clamp(23px, 6.8vw, 29px); }
.gg-theme .gg-hero .gg-avatars { margin: 0; }
.gg-theme .gg-hero .gg-avatars > * { border-color: var(--accent); }
.gg-theme .avatar.initials { background: var(--gg-gold) !important; color: #3b2a00 !important; }
.gg-theme .gg-avatar-more { background: var(--gg-gold); color: #3b2a00; }
.gg-theme .gg-kicker { color: var(--gg-gold); letter-spacing: normal; text-transform: none; }
.gg-theme .gg-activity-icon, .gg-theme .nic, .gg-theme .gg-emblem { color: var(--gg-pine); border: 0; background: var(--gg-honey); }
.gg-theme .gg-activity-icon { width: 43px; height: 43px; border-radius: 13px; font-size: 21px; }
.gg-theme .gg-tint-draw { background: var(--gg-blush); }
.gg-theme .gg-tint-claims { background: var(--gg-mint); }
.gg-theme .gg-tint-basket { background: var(--gg-honey); }
.gg-theme .gg-section h2 { color: var(--ink-3); font-size: 13px; font-weight: 750; }
.gg-theme .gg-section { min-height: 25px; }
.gg-theme .gg-tag { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 8px; background: var(--surface-2); }
.gg-theme .gg-hero .gg-tag { color: #fff; background: #ffffff24; }
.gg-theme .gg-hero button.gg-tag { color: #3b2a00; background: var(--gg-gold); }
.gg-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.gg-badges:empty { display: none; }
.gg-theme .gg-activity .grow > .gg-badges { display: flex; margin-top: 4px; }
.gg-theme .gg-activity .grow > b, .gg-theme .gg-preview > b { overflow-wrap: anywhere; }
.gg-theme .gg-activity b { color: var(--ink); }
.gg-theme .gg-now { padding: 14px; }
.gg-theme .gg-now .small { display: block; margin-top: 3px; }
.gg-theme .btn.primary.block { min-height: 48px; }
.gg-theme .btn.soft { color: var(--ink); background: var(--surface-2); border-color: transparent; }
.gg-theme .err, .gg-theme .danger-btn { color: #a02b24; }
.gg-theme .gg-bubble { background: var(--gg-pine); color: #fff; overflow-wrap: anywhere; }
.gg-theme .gg-bubble-row.incoming .gg-bubble { background: var(--gg-mint); }
.gg-theme .gg-item-placeholder { background: var(--gg-honey); color: var(--gg-pine); }
.gg-theme .gg-ribbon, .gg-theme .gg-mine { background: var(--gg-pine); color: #fff; }
.gg-theme .gg-mine .tiny { color: #fff; }
.gg-theme .gg-qr-wrap { background: var(--surface); }
.gg-theme .gg-fields { padding: 0; margin: 0; min-width: 0; border: 0; }
.gg-fields { display: grid; gap: 12px; }
.gg-theme .gg-form :is(input, textarea, select), .gg-basket-search input { color: var(--ink); }
.gg-turnstile { min-width: 0; max-width: 100%; }
.gg-profile-main { display: flex; align-items: center; gap: 12px; text-align: left; }
.gg-profile-main b { display: block; }
.gg-profile-main .gg-tag { margin-top: 3px; }
.gg-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; list-style: none; padding: 0; margin: 0; }
.gg-progress li { padding: 6px 0; background: var(--surface-2); border-radius: 10px; text-align: center; font-size: 13px; font-weight: 700; }
.gg-progress li.complete { background: var(--gg-pine); color: #fff; }
.gg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.gg-theme-note { color: var(--ink-2); font-size: 13px; overflow-wrap: anywhere; }
.gg-basket-search { display: grid; gap: 7px; }
.gg-basket-search label { font-weight: 750; }
#ggBasketResults:empty { display: none; }
.gg-basket-search .row { gap: 8px; }
.gg-basket-search input { min-width: 0; flex: 1; height: 40px; border: 1px solid var(--line); border-radius: 12px; padding: 0 10px; }
.gg-basket-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gg-basket-item { min-width: 0; overflow: hidden; }
.gg-basket-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--gg-honey); }
.gg-basket-caption { display: flex; align-items: center; gap: 4px; padding: 9px; }
.gg-basket-caption b { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.gg-basket-caption .iconbtn { flex: none; width: 32px; height: 36px; }
.gg-photo-preview { width: min(100%, 150px); overflow: hidden; border-radius: 12px; }
.gg-switch { width: 34px; height: 20px; padding: 3px; border-radius: 99px; background: var(--surface-2); }
.gg-switch::after { display: block; content: ""; width: 14px; height: 14px; background: var(--surface); border-radius: 50%; }
[aria-checked="true"] > .gg-switch { background: var(--gg-pine); }
[aria-checked="true"] > .gg-switch::after { transform: translateX(14px); }
/* Items without a photo: compact row (small gift tile on the left) instead of a big empty picture */
.gg-item:has(.gg-item-placeholder) { display: grid; grid-template-columns: 76px 1fr; align-items: start; }
.gg-item:has(.gg-item-placeholder) .gg-item-media { margin: 14px 0 0 14px; border-radius: 16px; }
.gg-item:has(.gg-item-placeholder) .gg-item-picture { width: 62px; height: 62px; border-radius: 16px; }
.gg-item:has(.gg-item-placeholder) .gg-item-placeholder .i { width: 28px; height: 28px; }
/* Create-group icon tiles */
.gg-choice-label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-3); margin-bottom: 6px; }
.gg-choice { display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); }
.gg-chip { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 16px; background: var(--surface); border: 2px solid transparent; box-shadow: 0 2px 10px #0000000d; cursor: pointer; text-align: center; transition: transform .15s; }
.gg-chip input { position: absolute; opacity: 0; pointer-events: none; }
.gg-chip-ic { font-size: 26px; line-height: 1; }
.gg-chip-t { font-size: 13px; font-weight: 700; color: var(--ink); }
.gg-chip.on { border-color: var(--accent); background: var(--accent-soft); }
.gg-chip:active { transform: scale(.96); }
/* ---- Gift group layout B: labelled steps + main card + mini tiles ---- */
.gg-steps { list-style: none; margin: 0; padding: 14px 14px 10px; display: flex; align-items: flex-start; background: var(--surface); border-radius: 20px; box-shadow: 0 3px 14px #0000000f; }
.gg-step { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 58px; font-size: 11.5px; font-weight: 800; color: var(--ink-3); text-align: center; }
.gg-step i { font-style: normal; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; background: var(--surface-2); }
.gg-step.done { color: var(--accent); } .gg-step.done i { background: var(--accent); color: #fff; font-weight: 800; }
.gg-step.now { color: var(--accent); } .gg-step.now i { background: var(--accent); box-shadow: 0 0 0 5px #00000018; }
.gg-step-line { flex: 1; height: 3px; margin-top: 19px; border-radius: 3px; background: var(--line); }
.gg-step-line.on { background: var(--accent); }
.gg-main { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 22px 18px; border-radius: 26px; color: #fff; background: var(--brand-grad); box-shadow: 0 10px 26px -12px var(--accent); }
.gg-main-av { width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; font-weight: 800; background: #f3d27a; color: #3b2a00; animation: gg-open .6s cubic-bezier(.2, 1.3, .4, 1) both; }
.gg-main h2 { margin: 2px 0 0; font-size: 21px; font-weight: 800; }
.gg-main p { margin: 0; font-size: 13px; color: #ffffffd9; font-weight: 600; }
.gg-main-wishes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.gg-main-wishes span { padding: 7px 11px; border-radius: 12px; background: #ffffff1f; font-size: 13px; font-weight: 700; }
.gg-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gg-mini { display: flex; align-items: center; gap: 10px; padding: 12px; border: 0; border-radius: 18px; background: var(--surface); box-shadow: 0 2px 10px #0000000d; text-align: left; color: var(--ink); font: inherit; cursor: pointer; min-width: 0; }
.gg-mini > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.gg-mini b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gg-mini small { font-size: 12px; font-weight: 700; color: var(--ink-3); }
.gg-mini .gg-activity-icon { flex: none; width: 40px; height: 40px; font-size: 20px; }
.gg-mini-add .gg-activity-icon { background: var(--surface-2); color: var(--accent); font-weight: 800; }
.gg-members-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.gg-members-open { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; padding: 0; }
.gg-members-open .gg-avatars { display: flex; }
.gg-members-open .gg-avatars > * { margin-right: -8px; border: 2px solid var(--surface); }
.gg-members-open b { margin-left: 10px; font-size: 13px; }
.gg-invite-btn { flex: none; background: var(--accent-soft) !important; color: var(--accent) !important; }
.gg-members-open .gg-avatars > * { margin-right: -4px !important; }
.gg-main-av { animation: gg-pop .6s cubic-bezier(.2, 1.3, .4, 1) both !important; }
@keyframes gg-pop { from { transform: scale(.6); } to { transform: scale(1); } }

#christmasPicks:empty { display: none; }
.christmas-picks { background: var(--surface); border: 1px solid #f3d27a99; border-radius: 20px; color: var(--ink); padding: 14px; box-shadow: var(--shadow); }
.christmas-picks h2, .shop-stats h2 { font-size: 16px; margin: 0 0 10px; }
.christmas-strip { display: flex; gap: 10px; overflow-x: auto; padding: 3px 3px 8px; scroll-snap-type: x proximity; }
.christmas-item { display: grid; align-content: start; flex: 0 0 132px; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--accent); padding: 6px; text-align: left; scroll-snap-align: start; }
.christmas-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 7px; background: var(--surface-2); }
.christmas-item b { font-size: 13px; overflow-wrap: anywhere; }
.christmas-item > span { color: var(--ink-3); font-size: 12px; overflow-wrap: anywhere; }
.shop-stats table { width: 100%; border-collapse: collapse; }
.shop-stats td, .shop-stats th { padding: 6px 2px; text-align: end; }
.shop-stats tbody th { text-align: start; }
.shop-stats tbody tr { border-top: 1px solid var(--line); }
/* Merchants: "My shop" card on the Me page (only shown to users who have a shop). */
#app .me-shop{display:flex;align-items:center;gap:12px;padding:14px 16px;width:100%;text-align:left;background:linear-gradient(135deg,#fff7e6,#fdeee9);border:1px solid #f3d27a66}
#app .me-shop .me-shop-ic{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;font-size:22px;background:#f3d27a;flex:none}
#app .me-shop b{display:block;font-size:15px}
:root[data-theme="dark"] #app .me-shop{background:linear-gradient(135deg,#3a3020,#3a2526);border-color:#f3d27a44}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) #app .me-shop{background:linear-gradient(135deg,#3a3020,#3a2526);border-color:#f3d27a44}}

/* ---- Christmas = small touches only (app colours stay the same) ---- */
.gg-main, .gg-theme .gg-hero { position: relative; overflow: hidden; }
.gg-main::before, .gg-main::after { content: "❄"; position: absolute; color: #ffffff; opacity: .35; pointer-events: none; animation: gg-drift 6s ease-in-out infinite alternate; }
.gg-main::before { top: 10px; left: 16px; font-size: 18px; }
.gg-main::after { right: 18px; bottom: 14px; font-size: 26px; animation-delay: -3s; }
@keyframes gg-drift { from { transform: translateY(0) rotate(0); } to { transform: translateY(6px) rotate(40deg); } }
.gg-main-av { box-shadow: 0 0 0 4px #ffffff40; }
/* Tap feedback: a tiny burst of snow and sparkles from the finger */
.gg-burst { position: fixed; z-index: 9999; pointer-events: none; font-size: 15px; line-height: 1; animation: gg-burst .7s cubic-bezier(.2, .8, .3, 1) forwards; }
@keyframes gg-burst { 0% { transform: translate(-50%, -50%) scale(.4); opacity: 1; } 100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(var(--rot)); opacity: 0; } }
.gg-screen .btn.primary:active, .gg-sheet .btn.primary:active, .gg-mini:active, .gg-chip:active { transform: scale(.96); transition: transform .12s; }
/* Home: "My groups" card (shown once you have a group) */
.gg-home { flex-direction: column; align-items: stretch; gap: 6px; padding: 14px; }
.gg-home-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 4px; }
.gg-home-head b { font-size: 15px; }
.gg-home-new { border: 0; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 700; color: #fff; background: #ffffff26; cursor: pointer; }
.gg-home-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 14px; background: #ffffff14; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.gg-home-row b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gg-home-av { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #f3d27a; color: #3b2a00; }
.gg-home-more { border: 0; background: none; color: #f0d3e2; font: inherit; font-size: 13px; font-weight: 700; padding: 6px; cursor: pointer; }
.gg-home-row:active, .gg-home-new:active { transform: scale(.97); }
/* Friends page filter chips stay on one line (scroll sideways if needed) */
.people-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.people-chips::-webkit-scrollbar { display: none; }
.people-chips .chip { flex: none; }
/* Group helper elf: a face + speech bubble with the next step */
.gg-elf { display: flex; align-items: flex-end; gap: 10px; width: 100%; padding: 0; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
div.gg-elf { cursor: default; }
.gg-elf-face { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; background: var(--surface); box-shadow: var(--shadow); animation: gg-elf-bob 2.6s ease-in-out infinite; }
.gg-elf-person { font-size: 19px; font-weight: 800; background: #f3d27a; color: #3b2a00; animation: none; }
.gg-elf-bubble { position: relative; flex: 1; min-width: 0; padding: 11px 14px; border-radius: 18px 18px 18px 6px; background: var(--surface); box-shadow: var(--shadow); font-size: 14.5px; font-weight: 650; line-height: 1.4; }
.gg-elf-bubble small { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; color: var(--ink-3); }
button.gg-elf .gg-elf-bubble::after { content: "›"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--accent); }
button.gg-elf .gg-elf-bubble { padding-right: 30px; }
button.gg-elf:active .gg-elf-bubble { transform: scale(.98); }
@keyframes gg-elf-bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-4px) rotate(4deg); } }
