/* Plantify — app shell, onboarding, paywall, member app.
   Every screen fills #stage exactly; only inner bodies scroll, so the primary CTA never leaves the viewport. */
:root {
  --green: #00A862;
  --green-2: #21C97E;
  --green-dark: #074728;
  --green-soft: #EBF7F1;
  --navy: #14213D;
  --ink: #111815;
  --ink-2: #33423B;
  --muted: #66746D;
  --line: #E4EBE7;
  --bg: #F4F7F5;
  --card: #FFFFFF;
  --orange: #F38B1C;
  --red: #E5484D;
  --r-lg: 22px;
  --r-md: 16px;
  --shadow: 0 2px 10px rgba(16, 40, 28, 0.06);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  background: #0b130f; color: var(--ink); font-family: var(--font);
  -webkit-font-smoothing: antialiased; overflow: hidden;
}
button { font-family: inherit; color: inherit; }
img, video { display: block; }
.ic { width: 1em; height: 1em; flex: none; display: inline-block; vertical-align: -0.14em; }

#wrap { width: 100%; height: 100dvh; display: flex; justify-content: center; align-items: center; overflow: hidden;
  background: radial-gradient(1200px 700px at 50% -10%, #1d4a33 0%, #0d1a13 55%, #08100c 100%); }
#stage { position: relative; width: 100%; height: 100dvh; background: #fff; overflow: hidden; display: flex; flex-direction: column; }
@media (min-width: 560px) {
  #stage { width: 430px; height: min(932px, calc(100dvh - 48px)); border-radius: 40px;
    box-shadow: 0 0 0 10px #101814, 0 0 0 11px #2a3a31, 0 40px 120px rgba(0,0,0,0.6); }
}

/* Screen frame */
.scr { position: relative; flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; animation: scrIn 0.32s var(--ease); }
@keyframes scrIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fill { flex: 1; min-height: 0; }
.center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.foot { flex: none; padding: 12px 24px max(20px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.legal { font-size: 12px; line-height: 1.45; color: var(--muted); text-align: center; margin: 0 8px 2px; }
.legal a { color: var(--ink-2); }

/* Buttons */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 56px; flex: none; border: 0; border-radius: 28px;
  font-size: 17px; font-weight: 700; letter-spacing: -0.01em; cursor: pointer; transition: transform 0.12s, filter 0.15s, background 0.15s; }
.btn:active { transform: scale(0.98); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 8px 22px rgba(0,168,98,0.32); }
@media (hover: hover) { .btn-green:hover { filter: brightness(1.04); } }
.btn-white { background: #fff; color: var(--green-dark); box-shadow: 0 8px 22px rgba(0,0,0,0.16); }
.btn-outline { background: transparent; color: var(--green); border: 1.8px solid var(--green); height: 52px; font-size: 16px; }
.btn-ghost { background: none; border: 0; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; padding: 6px; }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.link-green { border: 0; background: none; color: var(--green); font-weight: 700; cursor: pointer; font-size: inherit; padding: 0; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,0.45); border-top-color: #fff; animation: rot 0.8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* Splash + wordmark */
.logo-wrap { animation: logoIn 0.9s var(--ease) both; }
@keyframes logoIn { from { opacity: 0; transform: scale(0.72); } to { opacity: 1; transform: none; } }
.pulse { animation: pulse 2.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { filter: drop-shadow(0 0 0 rgba(0,168,98,0)); } 50% { filter: drop-shadow(0 6px 22px rgba(0,168,98,0.35)); } }
.tagline { font-size: 19px; font-weight: 600; color: var(--green); margin-top: 18px; letter-spacing: -0.01em; }
.wordmark { font-size: 40px; font-weight: 800; color: var(--green); letter-spacing: -0.022em; margin-top: 14px; animation: rise 0.8s 0.25s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Collage */
.collage { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; overflow: hidden; background: #062e1a; }
.col { display: flex; flex-direction: column; gap: 4px; animation: colUp 18s linear infinite; }
.col:nth-child(2) { animation-name: colDown; animation-duration: 22s; }
.col:nth-child(3) { animation-duration: 15s; }
.col img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
@keyframes colUp { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes colDown { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.collage-badge { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); width: 120px; height: 120px; border-radius: 30px;
  background: var(--green); display: grid; place-items: center; box-shadow: 0 20px 50px rgba(0,0,0,0.45); animation: logoIn 0.8s 0.2s var(--ease) both; }
.collage-shade { position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(to top, rgba(4,30,17,0.92), transparent); }

/* Hero (brand) */
.hero-scr { background: radial-gradient(500px 420px at 50% 30%, #0c6a3c 0%, #074728 60%, #05351e 100%); color: #fff; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 26px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 99px; background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.16); font-size: 14px; font-weight: 600; animation: rise 0.6s var(--ease) both; }
.chip .ic { color: #6ff0ac; }

/* Onboarding slides */
.ob-top { flex: none; display: flex; align-items: center; gap: 14px; padding: 18px 24px 4px; height: 40px; }
.prog { width: 120px; height: 6px; border-radius: 99px; background: rgba(0,168,98,0.15); overflow: hidden; }
.prog > i { display: block; height: 100%; border-radius: 99px; background: var(--green); transition: width 0.5s var(--ease); }
.dark .prog { background: rgba(255,255,255,0.16); }
.ob-head { flex: none; padding: 10px 24px 0; }
.ob-title { font-size: 30px; line-height: 1.12; font-weight: 800; letter-spacing: -0.022em; margin: 0 0 8px; }
.ob-title .hl { color: var(--green); }
.dark .ob-title .hl { color: #2fe08f; }
.ob-sub { font-size: 15.5px; line-height: 1.42; color: var(--muted); margin: 0; }
.dark .ob-sub { color: rgba(255,255,255,0.72); }
.ob-art { flex: 1; min-height: 0; position: relative; overflow: hidden; margin-top: 14px; }
.ob-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 70%; animation: kenburns 9s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.02) translateY(0); } to { transform: scale(1.08) translateY(-1.5%); } }
.ob-art::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 34px; background: linear-gradient(var(--fade, #fff), transparent); }

/* How it works */
.steps { display: flex; flex-direction: column; gap: 10px; padding: 0 22px; }
.step { display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px; padding: 14px 16px; animation: rise 0.55s var(--ease) both; }
.step-n { width: 40px; height: 40px; border-radius: 12px; background: rgba(47,224,143,0.15); color: #2fe08f; display: grid; place-items: center; font-size: 20px; flex: none; }
.step b { display: block; font-size: 15.5px; }
.step span { font-size: 13px; color: rgba(255,255,255,0.68); }
.how-art { flex: 1; min-height: 0; overflow: hidden; margin: 14px 0 0; }
.how-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }

/* Compare */
.cmp { margin: 18px 22px 0; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09); border-radius: 20px; overflow: hidden; }
.cmp-row { display: grid; grid-template-columns: 1fr 76px 76px; align-items: center; min-height: 52px; padding: 0 14px; border-top: 1px solid rgba(255,255,255,0.07);
  font-size: 14.5px; animation: rise 0.5s var(--ease) both; }
.cmp-row:first-child { border-top: 0; min-height: 46px; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.55); }
.cmp-row > :not(:first-child) { text-align: center; display: grid; place-items: center; }
.cmp-us { color: #2fe08f; font-size: 22px; }
.cmp-them { color: rgba(255,255,255,0.35); font-size: 13px; font-weight: 600; }
.cmp-row:first-child .cmp-us { font-size: 12px; color: #2fe08f; }

/* Feature list */
.feats { display: flex; flex-direction: column; gap: 12px; padding: 18px 22px 0; }
.feat { display: flex; gap: 14px; align-items: flex-start; background: #fff; border-radius: 18px; padding: 15px 16px; box-shadow: var(--shadow); animation: rise 0.55s var(--ease) both; }
.feat-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; flex: none; }
.feat b { display: block; font-size: 15.5px; margin-bottom: 2px; }
.feat span { font-size: 13.5px; color: var(--muted); line-height: 1.4; }

/* Quiz */
.q-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 18px 22px 8px; }
.q-opt { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 74px; text-align: left; background: #fff; border: 1.8px solid var(--line);
  border-radius: 18px; padding: 12px 16px; cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.12s; animation: rise 0.45s var(--ease) both; }
.q-opt:active { transform: scale(0.985); }
.q-opt.sel { border-color: var(--green); background: var(--green-soft); }
@media (hover: hover) { .q-opt:hover { border-color: var(--green); background: var(--green-soft); } }
.q-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--green-soft); color: var(--green-dark); display: grid; place-items: center; font-size: 22px; flex: none; }
.q-txt b { display: block; font-size: 15.5px; line-height: 1.25; }
.q-txt small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.loader-list { display: flex; flex-direction: column; gap: 12px; text-align: left; width: 100%; max-width: 330px; margin: 22px auto 0; }
.loader-item { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; opacity: 0.35; transition: opacity 0.4s; }
.loader-item.on { opacity: 1; }
.loader-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.4); display: grid; place-items: center; font-size: 15px; flex: none; }
.loader-item.on .loader-dot { background: #2fe08f; border-color: #2fe08f; color: #05351e; }
.ring { width: 132px; height: 132px; }

/* Paywall */
.pw { background: #0b120e; color: #fff; }
.pw-top { flex: none; display: flex; justify-content: space-between; align-items: center; padding: 16px 22px 0; height: 44px; font-size: 14px; }
.pw-top b { color: #2fe08f; font-weight: 800; letter-spacing: -0.01em; }
.pw-top button { background: none; border: 0; color: rgba(255,255,255,0.6); font-size: 15px; cursor: pointer; }
.pw-hero { flex: 1; min-height: 70px; display: grid; place-items: center; position: relative; }
.pw-hero::before { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(0,168,98,0.35), transparent 65%); animation: pulseBg 3.2s ease-in-out infinite; }
@keyframes pulseBg { 50% { transform: scale(1.12); opacity: 0.8; } }
.pw-hero .leaf { position: relative; width: 150px; height: auto; animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px) rotate(-2deg); } }
.pw-card { flex: none; background: #151d18; border-top: 1px solid rgba(255,255,255,0.08); border-radius: 28px 28px 0 0; padding: 20px 20px max(16px, env(safe-area-inset-bottom)); }
.pw-card h2 { text-align: center; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
.pw-lead { text-align: center; font-size: 13.5px; line-height: 1.42; color: rgba(255,255,255,0.7); margin: 0 6px 14px; }
.pw-remind { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 48px; background: rgba(255,255,255,0.06); border-radius: 16px; padding: 0 14px; font-size: 14px; margin-bottom: 10px; }
.switch { width: 48px; height: 28px; flex: none; border-radius: 99px; background: var(--green); position: relative; border: 0; cursor: pointer; transition: background 0.2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 23px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left 0.2s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.switch.off { background: rgba(255,255,255,0.22); }
.switch.off::after { left: 3px; }
.plan { width: 100%; min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: rgba(255,255,255,0.03);
  border: 1.8px solid rgba(255,255,255,0.13); border-radius: 18px; padding: 10px 16px; margin-bottom: 8px; cursor: pointer; text-align: left; color: #fff; transition: border-color 0.15s, background 0.15s; }
.plan.on { border-color: var(--green); background: rgba(0,168,98,0.13); }
.plan b { font-size: 15.5px; }
.plan small { display: block; font-size: 12.5px; color: rgba(255,255,255,0.6); margin-top: 1px; }
.plan .price { text-align: right; font-weight: 800; font-size: 16px; }
.plan .price small { font-weight: 500; }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.35); display: grid; place-items: center; flex: none; font-size: 13px; }
.plan.on .radio { background: var(--green); border-color: var(--green); }
.tl { display: grid; grid-template-columns: 22px 1fr auto; gap: 4px 10px; align-items: center; font-size: 13px; color: rgba(255,255,255,0.78); margin: 12px 4px 4px; }
.tl i { width: 10px; height: 10px; border-radius: 50%; background: #2fe08f; justify-self: center; }
.tl i.mut { background: rgba(255,255,255,0.35); }
.tl em { font-style: normal; color: rgba(255,255,255,0.5); font-size: 12.5px; }
.pw-sum { text-align: center; font-size: 13.5px; color: rgba(255,255,255,0.85); margin: 10px 0; }
.pw-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 12px; margin-top: 12px; font-size: 12px; }
.pw-links a, .pw-links button { color: rgba(255,255,255,0.48); text-decoration: none; background: none; border: 0; font-size: 12px; cursor: pointer; padding: 0; }
@media (max-height: 760px) { .pw-hero { min-height: 40px; } .pw-hero .leaf { width: 96px; } .pw-lead { margin-bottom: 10px; } .tl { display: none; } }

/* Thank-you */
.ty { background: var(--green); color: #fff; }
.ty-art { flex: 1; min-height: 120px; position: relative; overflow: hidden; }
.ty-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; animation: popIn 0.9s var(--ease) both; }
@keyframes popIn { from { opacity: 0; transform: scale(0.86); } to { opacity: 1; transform: none; } }
.ty-check { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; background: #fff; color: var(--green);
  display: grid; place-items: center; font-size: 44px; box-shadow: 0 16px 40px rgba(0,0,0,0.25); animation: popIn 0.6s 0.35s var(--ease) both; }
.ty h1 { font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; margin: 18px 24px 4px; text-align: center; }
.ty p.lead { text-align: center; margin: 0 28px; font-size: 15px; opacity: 0.9; }
.receipt { margin: 16px 20px 0; background: #fff; color: var(--ink); border-radius: 20px; padding: 6px 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); }
.receipt .rr { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.receipt .rr:first-child { border-top: 0; }
.receipt .rr span { color: var(--muted); }
.receipt .rr b { text-align: right; }
.ty-manage { text-align: center; font-size: 13px; margin-top: 10px; }
.ty-manage a { color: #fff; font-weight: 700; }

/* Story welcome */
.story { color: #fff; cursor: pointer; }
.story-bars { position: absolute; top: 14px; left: 20px; right: 20px; display: flex; gap: 6px; z-index: 3; }
.story-bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,0.35); overflow: hidden; }
.story-bars i b { display: block; height: 100%; width: 0; background: #fff; }
.story-bars i.done b { width: 100%; }
.story-bars i.now b { animation: bar 4.5s linear forwards; }
@keyframes bar { to { width: 100%; } }
.story-art { flex: 1; min-height: 0; overflow: hidden; }
.story-art img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 9s ease-in-out infinite alternate; }
.story-copy { flex: none; padding: 18px 24px 0; }
.story-copy .eyebrow { opacity: 0.75; font-size: 11.5px; }
.story-copy h1 { font-size: 27px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 6px; }
.story-copy p { margin: 0; font-size: 15px; opacity: 0.85; line-height: 1.4; }

/* Prepared plant + camera demo */
.prep-card { width: 176px; height: 214px; border-radius: 24px; overflow: hidden; border: 7px solid #fff; box-shadow: 0 22px 44px rgba(0,0,0,0.18); transform: rotate(-6deg);
  animation: wobble 4s ease-in-out infinite; margin-bottom: 28px; }
@keyframes wobble { 50% { transform: rotate(-2deg) translateY(-4px); } }
.prep-card img { width: 100%; height: 100%; object-fit: cover; }
.h-xl { font-size: 28px; line-height: 1.16; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 10px; }
.p-mut { font-size: 15px; color: var(--muted); line-height: 1.45; margin: 0; max-width: 320px; }
.top-bar { flex: none; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; font-size: 20px; cursor: pointer; background: rgba(255,255,255,0.14); color: #fff; }
.icon-btn.light { background: #EEF3F0; color: var(--ink); }

.cam { background: #000; color: #fff; }
.cam-view { flex: 1; min-height: 0; position: relative; overflow: hidden; background: #0c120e; }
.cam-view video, .cam-view img.frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-view img.frame { animation: slowzoom 6s ease-in-out infinite alternate; }
@keyframes slowzoom { to { transform: scale(1.06); } }
.brackets { position: absolute; left: 50%; top: 46%; width: 230px; height: 230px; transform: translate(-50%, -50%); }
.brackets i { position: absolute; width: 46px; height: 46px; border: 4px solid #fff; border-radius: 6px; }
.brackets i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 22px; }
.brackets i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 22px; }
.brackets i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 22px; }
.brackets i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 22px; }
.brackets.scan i { animation: brk 1.2s ease-in-out infinite; }
@keyframes brk { 50% { transform: scale(0.92); } }
.beam { position: absolute; left: 6%; right: 6%; height: 3px; border-radius: 3px; top: 10%;
  background: linear-gradient(90deg, transparent, #2fe08f, #fff, #2fe08f, transparent); box-shadow: 0 0 18px 4px rgba(47,224,143,0.7); animation: beam 2s ease-in-out infinite; }
@keyframes beam { 50% { top: 88%; } }
.cam-hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); padding: 9px 16px; border-radius: 99px;
  font-size: 14px; font-weight: 600; white-space: nowrap; }
.cam-bar { flex: none; background: #fff; color: var(--ink); padding: 12px 20px max(18px, env(safe-area-inset-bottom)); }
.cam-bar.dark { background: #0c120e; color: #fff; }
.modes { display: flex; justify-content: center; gap: 2px; margin: 0 -10px 12px; overflow-x: auto; scrollbar-width: none; }
.modes::-webkit-scrollbar { display: none; }
.modes button { flex: none; border: 0; background: none; font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 99px; color: inherit; opacity: 0.6; cursor: pointer; }
.modes button.on { opacity: 1; background: rgba(0,168,98,0.18); color: #2fe08f; }
.cam-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.cam-side { justify-self: start; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; cursor: pointer; background: none; border: 0; color: inherit; }
.cam-side:last-child { justify-self: end; }
.cam-side .ic { font-size: 24px; }
.shutter { width: 76px; height: 76px; border-radius: 50%; border: 5px solid #fff; outline: 3px solid var(--green); background: var(--green); cursor: pointer;
  box-shadow: 0 0 0 0 rgba(0,168,98,0.5); animation: ping 2s infinite; }
.cam-bar:not(.dark) .shutter { border-color: #fff; }
@keyframes ping { 70% { box-shadow: 0 0 0 16px rgba(0,168,98,0); } 100% { box-shadow: 0 0 0 0 rgba(0,168,98,0); } }
.tooltip { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: #fff; color: var(--ink); padding: 10px 16px; border-radius: 14px; font-size: 15px; font-weight: 700;
  box-shadow: 0 8px 26px rgba(0,0,0,0.3); white-space: nowrap; animation: bob 1.6s ease-in-out infinite; }
.tooltip::after { content: ""; position: absolute; left: 50%; bottom: -7px; margin-left: -7px; border: 7px solid transparent; border-bottom: 0; border-top-color: #fff; }
@keyframes bob { 50% { transform: translate(-50%, -5px); } }
.searching { flex: none; padding: 20px 24px 28px; text-align: center; background: #fff; color: var(--ink); }
.searching b { display: block; font-size: 17px; margin-top: 12px; }
.searching span { font-size: 14px; color: var(--muted); }
.cam-msg { position: absolute; left: 16px; right: 16px; bottom: 16px; background: #fff; color: var(--ink); border-radius: 18px; padding: 14px 16px; box-shadow: 0 12px 30px rgba(0,0,0,0.35); font-size: 14.5px; animation: rise 0.35s var(--ease) both; }
.cam-msg b { display: block; margin-bottom: 3px; }

/* Snap tips */
.tips { background: #0f1914; color: #fff; }
.tip-good { width: 168px; height: 168px; border-radius: 50%; overflow: hidden; border: 4px solid var(--green); position: relative; margin: 0 auto 10px; }
.tip-good img, .tip img { width: 100%; height: 100%; object-fit: cover; }
.tip-badge { position: absolute; right: 12px; top: 12px; width: 30px; height: 30px; border-radius: 50%; background: var(--green); display: grid; place-items: center; font-size: 17px; }
.tip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 26px; width: 100%; }
.tip { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; border: 3px solid var(--red); margin: 0 auto 8px; position: relative; }
.tip-x { font-size: 13px; color: rgba(255,255,255,0.8); display: flex; align-items: center; justify-content: center; gap: 4px; }
.tip-x .ic { color: var(--red); }

/* Plant profile */
.pp { background: var(--bg); }
.pp-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.pp-top { position: absolute; z-index: 5; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; pointer-events: none; }
.pp-top .icon-btn { pointer-events: auto; background: rgba(255,255,255,0.92); color: var(--ink); box-shadow: 0 2px 10px rgba(0,0,0,0.12); }
.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: minmax(0,1fr) minmax(0,1fr); gap: 3px; height: 250px; background: #fff; overflow: hidden; }
.gallery img { min-height: 0; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery img:first-child { grid-row: span 2; }
.gallery.one { grid-template-columns: 1fr; grid-template-rows: minmax(0,1fr); height: 280px; }
.gallery.one img:first-child { grid-row: auto; }
.pp-title { background: #fff; padding: 16px 18px 6px; }
.pp-title h1 { margin: 0; font-size: 25px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; }
.latin { font-size: 14.5px; color: var(--green-dark); font-style: italic; margin-top: 3px; display: flex; align-items: center; gap: 6px; }
.aka { font-size: 13px; color: var(--muted); margin: 8px 0 0; line-height: 1.4; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; padding: 6px 10px; border-radius: 99px; background: var(--green-soft); color: var(--green-dark); }
.badge.warn { background: #FFF3E3; color: #9A4D00; }
.badge.bad { background: #FDECEC; color: #A8282C; }
.tabs { position: sticky; top: 0; z-index: 4; display: flex; background: #fff; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; height: 48px; border: 0; background: none; font-size: 15px; font-weight: 700; color: var(--muted); cursor: pointer; position: relative; }
.tabs button.on { color: var(--green); }
.tabs button.on::after { content: ""; position: absolute; left: 34%; right: 34%; bottom: 0; height: 3px; border-radius: 3px; background: var(--green); }
.sec { background: #fff; border-radius: 20px; padding: 16px; margin: 12px 14px; box-shadow: var(--shadow); }
.sec h3 { margin: 0 0 10px; font-size: 17.5px; font-weight: 800; letter-spacing: -0.015em; }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid #EEF2F0; font-size: 14px; }
.kv:first-of-type { border-top: 0; }
.kv span { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.kv b { text-align: right; font-weight: 700; max-width: 58%; }
.care-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.care { border-radius: 16px; padding: 13px; background: var(--bg); }
.care .ic { font-size: 22px; }
.care small { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }
.care b { font-size: 14px; display: block; margin-top: 2px; line-height: 1.3; }
.prob { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.prob img { width: 100%; height: 96px; object-fit: cover; }
.prob b { display: block; padding: 9px 11px; font-size: 13.5px; }
.prose { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); margin: 0 0 10px; }
.steps-ol { margin: 0; padding-left: 20px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.steps-ol li { margin-bottom: 6px; }
.health { display: flex; gap: 12px; align-items: center; }
.health-dot { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; flex: none; }
/* AI diagnosis */
.hx-top { display: flex; gap: 14px; align-items: center; }
.hx-top small { display: block; font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.hx-top b { display: block; font-size: 17px; line-height: 1.3; letter-spacing: -0.01em; margin-top: 2px; }
.hx-ring { width: 58px; height: 58px; border-radius: 50%; flex: none; display: grid; place-items: center; position: relative; font-size: 24px; }
.hx-ring span { width: 46px; height: 46px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 18px; font-weight: 800; color: var(--ink); }
.hx-issue { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.hx-issue summary { list-style: none; display: flex; gap: 12px; align-items: center; cursor: pointer; }
.hx-issue summary::-webkit-details-marker { display: none; }
.hx-issue summary > .ic:last-child { margin-left: auto; color: var(--muted); transition: transform .2s; transform: rotate(90deg); flex: none; }
.hx-issue[open] summary > .ic:last-child { transform: rotate(-90deg); }
.hx-ic { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; font-size: 20px; background: var(--green-soft); color: var(--green-dark); }
.hx-ic.warn { background: #FFF3E3; color: #B45309; }
.hx-ic.bad { background: #FDECEC; color: #B42318; }
.hx-name b { display: block; font-size: 15.5px; line-height: 1.3; }
.hx-name small { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 5px; }
.hx-name .badge { padding: 3px 8px; font-size: 11.5px; }
.hx-urg { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.hx-row { margin: 12px 0 0 52px; }
.hx-row > span { display: block; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; }
.hx-row p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.hx-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.hx-steps li { counter-increment: s; position: relative; padding-left: 30px; margin-bottom: 8px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.hx-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 21px; height: 21px; border-radius: 50%; background: var(--green); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.hx-prev { display: flex; gap: 8px; align-items: flex-start; background: var(--green-soft); border-radius: 12px; padding: 10px 12px; color: var(--green-dark); }
.hx-prev p { color: var(--green-dark); font-size: 13.5px; }
.hx-ok { display: flex; gap: 8px; align-items: center; margin: 12px 0 0; font-size: 14.5px; color: var(--green-dark); }
.hx-tip { display: flex; gap: 10px; align-items: center; margin: 12px 14px 0; padding: 11px 14px; border-radius: 14px; background: #FFF8E6; color: #7A5200; font-size: 13.5px; line-height: 1.4; }
.hx-alts { margin-top: 14px; }
.hx-alts > small { display: block; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.hx-alt { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.hx-alt b { font-size: 14.5px; } .hx-alt b i { font-weight: 400; color: var(--muted); }
.hx-alt span { font-size: 13px; font-weight: 700; color: var(--muted); }
.hx-alt p { grid-column: 1 / -1; margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.hx-tips { list-style: none; margin: 0; padding: 0; }
.hx-tips li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.hx-tips li .ic { color: var(--green); flex: none; margin-top: 2px; }
.pp-foot { flex: none; background: #fff; border-top: 1px solid var(--line); padding: 12px 20px max(14px, env(safe-area-inset-bottom)); display: flex; gap: 10px; }
.pp-foot .btn { height: 52px; font-size: 16px; }
.pp-foot .btn-outline { width: auto; padding: 0 18px; flex: none; }
.ai-note { font-size: 12px; color: var(--muted); text-align: center; margin: 4px 20px 18px; line-height: 1.45; }

/* Member app */
.app { background: var(--bg); }
.app-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 18px; }
.app-head { background: #fff; padding: 16px 16px 14px; }
.app-row { display: flex; justify-content: space-between; align-items: center; }
.loc { font-weight: 800; font-size: 17px; display: flex; align-items: center; gap: 4px; }
.weather { font-size: 14px; color: var(--ink-2); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.weather .ic { color: #F5A623; font-size: 18px; }
.search { position: relative; margin: 12px 0 14px; }
.search .ic { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 18px; }
.search input { width: 100%; height: 46px; border-radius: 99px; border: 1.5px solid #D7E6DD; background: #F6FAF8; padding: 0 16px 0 44px; font-size: 15px; font-family: inherit; outline: none; }
.search input:focus { border-color: var(--green); background: #fff; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick button { border: 1px solid var(--line); background: #fff; border-radius: 18px; padding: 14px 6px 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 700; box-shadow: var(--shadow); }
.qi { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; color: #fff; }
.h2 { margin: 0 0 12px; font-size: 19px; font-weight: 800; letter-spacing: -0.015em; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.h2 em { font-style: normal; color: var(--green); }
.h2 small { font-size: 13px; color: var(--muted); font-weight: 600; }
.blk { padding: 18px 16px 2px; }
.hscroll { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.pcard { flex: none; width: 150px; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; scroll-snap-align: start; border: 0; padding: 0; text-align: left; }
.pcard img { width: 100%; height: 112px; object-fit: cover; }
.pcard b { display: block; padding: 10px 12px 0; font-size: 14px; }
.pcard small { display: block; padding: 2px 12px 12px; font-size: 12px; color: var(--muted); font-style: italic; }
.bento { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: auto auto; gap: 10px; }
.bento button { border: 0; border-radius: 18px; padding: 14px; cursor: pointer; text-align: left; position: relative; overflow: hidden; min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; }
.bento button:first-child { grid-row: span 2; }
.bento b { font-size: 16px; font-weight: 800; position: relative; z-index: 1; }
.bento small { font-size: 12px; position: relative; z-index: 1; opacity: 0.8; }
.bento img { position: absolute; right: -14px; bottom: -14px; width: 92px; height: 92px; border-radius: 50%; object-fit: cover; border: 4px solid rgba(255,255,255,0.6); }
.bento button:first-child img { width: 128px; height: 128px; right: -10px; bottom: -10px; }
.protect { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.protect button { background: #fff; border: 0; border-radius: 18px; padding: 14px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; box-shadow: var(--shadow); }
.nav { flex: none; height: calc(70px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; }
.nav button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: #8A9891; cursor: pointer; padding: 6px 0; }
.nav button .ic { font-size: 23px; }
.nav button.on { color: var(--green); }
.fab { width: 60px !important; height: 60px; border-radius: 50%; background: var(--green) !important; color: #fff !important; margin: -26px auto 0; display: grid !important; place-items: center;
  border: 5px solid #fff !important; box-shadow: 0 8px 20px rgba(0,168,98,0.4); }
.fab .ic { font-size: 26px !important; }
.page-h { display: flex; justify-content: space-between; align-items: center; padding: 18px 16px 4px; }
.page-h h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.dx-hero { margin: 12px 16px 0; background: #fff; border-radius: 24px; padding: 18px; text-align: center; box-shadow: var(--shadow); }
.dx-hero img { width: 100%; height: 170px; object-fit: cover; border-radius: 16px; margin-bottom: 14px; }
.dx-hero p { margin: 0 0 14px; font-size: 15px; color: var(--ink-2); }
.btn-orange { background: var(--orange); color: #fff; box-shadow: 0 8px 20px rgba(243,139,28,0.3); }
.seg { display: flex; justify-content: center; gap: 26px; background: #fff; padding: 14px 16px 0; border-bottom: 1px solid var(--line); }
.seg button { border: 0; background: none; font-size: 16px; font-weight: 800; color: var(--muted); padding: 0 0 12px; cursor: pointer; position: relative; }
.seg button.on { color: var(--green); }
.seg button.on::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: 0; height: 3px; border-radius: 3px; background: var(--green); }
.gp { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 20px; padding: 12px; box-shadow: var(--shadow); margin-bottom: 10px; }
.gp img { width: 68px; height: 68px; border-radius: 14px; object-fit: cover; flex: none; cursor: pointer; }
.gp-main { flex: 1; min-width: 0; cursor: pointer; }
.gp-main b { display: block; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-main small { display: block; font-size: 12.5px; color: var(--muted); font-style: italic; }
.due { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: #1B6FC2; margin-top: 4px; }
.due.now { color: #C2410C; }
.water-btn { border: 0; background: #E8F2FC; color: #1B6FC2; border-radius: 12px; height: 40px; padding: 0 12px; font-size: 13px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 4px; flex: none; }
.water-btn.done { background: var(--green-soft); color: var(--green-dark); }
.empty { text-align: center; padding: 30px 20px; }
.empty .ic { font-size: 52px; color: var(--green); }
.empty b { display: block; font-size: 18px; margin-top: 10px; }
.empty p { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tools button { background: #fff; border: 0; border-radius: 18px; padding: 16px 6px 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; box-shadow: var(--shadow); }
.books { margin: 12px 16px 0; background: linear-gradient(120deg, #EFE3C2, #E3D3A6); border-radius: 22px; padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; overflow: hidden; }
.books b { display: block; font-size: 13px; color: #6E4F1D; }
.books strong { display: block; font-size: 21px; color: #4E3510; margin-top: 2px; letter-spacing: -0.02em; }
.books img { width: 118px; height: 80px; object-fit: cover; border-radius: 12px; }
.chat { background: #fff; border-radius: 22px; padding: 16px; box-shadow: var(--shadow); }
.chat-log { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin: 8px 0 12px; }
.msg { padding: 10px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; max-width: 88%; white-space: pre-line; }
.msg.a { align-self: flex-start; background: #F1F6F3; border-bottom-left-radius: 5px; }
.msg.u { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 5px; }
.msg.typing { color: var(--muted); }
.chat-in { display: flex; gap: 8px; }
.chat-in input { flex: 1; min-width: 0; height: 46px; border-radius: 99px; border: 1.5px solid #D2E2D9; padding: 0 16px; font-size: 15px; font-family: inherit; outline: none; }
.chat-in input:focus { border-color: var(--green); }
.chat-in button { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 20px; cursor: pointer; flex: none; }
.suggest { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 10px; }
.suggest button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 8px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.list { background: #fff; border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.list a, .list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 15px 16px; border: 0; border-top: 1px solid #EEF2F0; background: none; font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; cursor: pointer; text-align: left; }
.list > :first-child { border-top: 0; }
.list .ic:first-child { font-size: 20px; color: var(--green); }
.list .chev { margin-left: auto; color: #A5B2AB; }
.lang-sw { margin-left: auto; display: flex; gap: 4px; }
.lang-sw a { padding: 5px 10px !important; border: 1px solid var(--line) !important; border-radius: 99px; font-size: 13px !important; width: auto !important; }
.lang-sw a.on { background: var(--green); color: #fff !important; border-color: var(--green) !important; }
.results { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.res { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 10px; border: 1px solid var(--line); cursor: pointer; text-align: left; width: 100%; }
.res img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; }
.res b { display: block; font-size: 14.5px; }
.res small { color: var(--muted); font-style: italic; font-size: 12.5px; }

/* Sheet (login) + toast */
.sheet-dim { position: absolute; inset: 0; background: rgba(4,14,9,0.55); backdrop-filter: blur(3px); z-index: 60; animation: fade 0.2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 61; background: #fff; border-radius: 26px 26px 0 0; padding: 10px 22px max(22px, env(safe-area-inset-bottom)); animation: up 0.32s var(--ease); }
@keyframes up { from { transform: translateY(100%); } }
.grab { width: 40px; height: 5px; border-radius: 3px; background: #D5E0DA; margin: 0 auto 14px; }
.sheet h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.sheet p { margin: 0 0 16px; font-size: 14.5px; color: var(--muted); line-height: 1.45; }
.field { width: 100%; height: 54px; border-radius: 16px; border: 1.6px solid #CFE0D6; padding: 0 16px; font-size: 17px; font-family: inherit; outline: none; margin-bottom: 12px; }
.field:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,168,98,0.14); }
.field.code { letter-spacing: 0.4em; text-align: center; font-weight: 800; font-size: 22px; }
.err { background: #FDEDED; color: #B42318; border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.toast { position: absolute; left: 16px; right: 16px; bottom: 96px; z-index: 70; background: #13221A; color: #fff; padding: 13px 16px; border-radius: 16px; font-size: 14.5px; font-weight: 600;
  box-shadow: 0 12px 30px rgba(0,0,0,0.3); animation: rise 0.3s var(--ease); display: flex; align-items: center; gap: 10px; }
.toast .ic { color: #2fe08f; font-size: 20px; }

/* Video art */
.mv { width: 100%; height: 100%; object-fit: cover; display: block; }
.how-art .mv { object-position: center 40%; }

/* Collage: pull back from one flower into the grid, centre tile turns into the logo */
.cg { position: absolute; inset: -2px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(5, 1fr); gap: 4px;
  transform-origin: 50% 50%; animation: cgPull 1.5s 0.1s var(--ease) both; }
@keyframes cgPull { from { transform: scale(3.05); } to { transform: none; } }
.cg-cell { position: relative; overflow: hidden; animation: fade 0.35s both; }
.cg-cell img { width: 100%; height: 100%; object-fit: cover; }
.cg-center { animation: none; }
.cg-logo { position: absolute; inset: 0; background: #014720; display: grid; place-items: center; opacity: 0; transform: scale(0.6); animation: cgLogo 0.55s 1.75s cubic-bezier(0.34,1.56,0.64,1) forwards; }
@keyframes cgLogo { to { opacity: 1; transform: none; } }
.cg-wash { position: absolute; inset: 0; background: linear-gradient(to top, rgba(4,40,22,0.95) 0%, rgba(4,40,22,0.2) 45%, transparent 70%); opacity: 0; animation: fadeIn 0.6s 2.1s forwards; }
.cg-copy { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 24px 38px; color: #fff; text-align: center; opacity: 0; animation: rise 0.6s 2.3s var(--ease) forwards; }
@keyframes fadeIn { to { opacity: 1; } }

/* Fly-in cards, check pops, card drop */
.fly { animation: flyIn 0.7s cubic-bezier(0.34,1.3,0.64,1) both; }
@keyframes flyIn { from { opacity: 0; transform: translateY(70px) rotate(var(--r, -4deg)) scale(0.92); } 60% { opacity: 1; } to { opacity: 1; transform: none; } }
.pop { display: inline-grid; animation: popCheck 0.45s cubic-bezier(0.34,1.56,0.64,1) both; font-style: normal; }
@keyframes popCheck { from { opacity: 0; transform: scale(0.2); } to { opacity: 1; transform: none; } }
.drop { animation: dropIn 0.8s cubic-bezier(0.34,1.4,0.64,1) both, wobble 4s 0.8s ease-in-out infinite; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-120px) rotate(14deg) scale(0.8); } to { opacity: 1; transform: rotate(-6deg); } }

/* Thank-you sequence */
.ty2 { background: #F4F7F5; color: #fff; }
.ty2-intro { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--ink); animation: fadeOut 0.3s 1.5s forwards; }
.ty2-intro b { font-size: 24px; font-weight: 800; color: var(--green); margin-top: 18px; animation: rise 0.5s 0.5s var(--ease) both; }
.ty2-intro span { font-size: 15px; color: var(--muted); animation: rise 0.5s 0.65s var(--ease) both; }
.ty2-toggle { width: 112px; height: 64px; border-radius: 99px; background: #D5DED9; position: relative; animation: tgOn 0.35s 0.35s forwards; }
.ty2-toggle i { position: absolute; top: 6px; left: 6px; width: 52px; height: 52px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.2); animation: tgKnob 0.35s 0.35s var(--ease) forwards; }
@keyframes tgOn { to { background: var(--green); } }
@keyframes tgKnob { to { left: 54px; } }
@keyframes fadeOut { to { opacity: 0; visibility: hidden; } }
.ty2-wipe { position: absolute; inset: 0; background: var(--green); clip-path: circle(0% at 50% 47%); animation: wipe 0.6s 1.25s cubic-bezier(0.65,0,0.35,1) forwards; }
@keyframes wipe { to { clip-path: circle(150% at 50% 47%); } }
.ty2-wipe::after { content: ""; position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg at 50% 47%, rgba(255,255,255,0.07) 0 4deg, transparent 4deg 18deg); }
.ty2-words { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.ty2-words .w { grid-area: 1 / 1; font-size: 64px; font-weight: 800; letter-spacing: -0.03em; opacity: 0; animation: wIn 0.34s var(--in) cubic-bezier(0.34,1.56,0.64,1) both, wOut 0.12s var(--out) forwards; }
.ty2-words .w:last-child { animation: wIn 0.34s var(--in) cubic-bezier(0.34,1.56,0.64,1) both, wOut 0.25s calc(var(--out) + 0.2s) forwards; }
@keyframes wIn { from { opacity: 0; transform: scale(0.55); } to { opacity: 1; transform: none; } }
@keyframes wOut { to { opacity: 0; transform: scale(1.12); } }
.ty2-final { position: absolute; inset: 0; display: flex; flex-direction: column; }
.ty2-bubbles { position: relative; flex: 1; min-height: 190px; margin: 18px 16px 0; }
.bub { position: absolute; border-radius: 999px; overflow: hidden; border: 3px solid rgba(255,255,255,0.85); box-shadow: 0 10px 26px rgba(0,0,0,0.2);
  opacity: 0; animation: bubIn 0.6s cubic-bezier(0.34,1.56,0.64,1) forwards, bubFloat 5s ease-in-out infinite; }
.bub img { width: 100%; height: 100%; object-fit: cover; }
@keyframes bubIn { from { opacity: 0; transform: scale(0.2) rotate(var(--r)); } to { opacity: 1; transform: rotate(var(--r)); } }
@keyframes bubFloat { 50% { translate: 0 -8px; } }
@media (max-height: 740px) { .ty2-bubbles { min-height: 120px; } .bub { scale: 0.8; } .ty2-h { font-size: 28px; } }
.ty2-h { position: relative; flex: none; margin: 6px 24px 12px; font-size: 34px; line-height: 1.08; font-weight: 800; letter-spacing: -0.03em; opacity: 0; animation: rise 0.6s var(--ease) both; }
.ty2-bottom { flex: none; opacity: 0; animation: rise 0.6s var(--ease) both; }
.ty2-bottom .receipt { margin-top: 0; }
.ty2.done .w { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
}
