/* pet/pet.css -- "Mi Pet", phone-first and animated (2026-10-28). Prefix pj-. Themes by the person's gender (m blue and gold, f rose and gold, n violet); the pet itself never changes.
   Platform typography (Agdasima text, Trajan Pro titles). Only transform and opacity are animated. prefers-reduced-motion switches every animation off. Secondary actions are icon-only (rule 2). */
@font-face { font-family: 'Agdasima'; src: url('/public/fonts/Agdasima-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Agdasima'; src: url('/public/fonts/Agdasima-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Trajan Pro'; src: url('/public/fonts/Trajan-Pro-Bold.ttf') format('opentype'); font-weight: 700; font-style: normal; font-display: swap; }

html[data-theme="m"] { --bg1: #0b2352; --bg2: #1f5fc4; --acc: #f5b72e; --acc2: #86b9ff; --ink: #14284b; --soft: #e8f0ff; --glow: rgba(134, 185, 255, .55); }
html[data-theme="f"] { --bg1: #4b1546; --bg2: #d9418e; --acc: #ffc84a; --acc2: #ff9ad1; --ink: #4a1d3d; --soft: #ffe9f4; --glow: rgba(255, 154, 209, .55); }
html[data-theme="n"] { --bg1: #2c2352; --bg2: #7b5cd1; --acc: #ffb347; --acc2: #c3a8ff; --ink: #2f2552; --soft: #efe9ff; --glow: rgba(195, 168, 255, .55); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body.pj { font-family: 'Agdasima', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size-adjust: .55; color: #fff; background: var(--bg1); overflow: hidden; overscroll-behavior: none; }
.pj h1, .pj h2, .pj h3 { font-family: 'Trajan Pro', Georgia, serif; font-size-adjust: none; letter-spacing: .02em; margin: 0; }
.pj input, .pj textarea { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size-adjust: none; }
.pj button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ── scene ─────────────────────────────────────────────── */
.pj-sky { position: fixed; inset: 0; background: radial-gradient(120% 70% at 50% 0%, var(--bg2) 0%, var(--bg1) 70%); z-index: 0; }
.pj-sky::before, .pj-sky::after { content: ''; position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; background: radial-gradient(closest-side, var(--glow), transparent); opacity: .5; animation: pj-drift 22s ease-in-out infinite alternate; }
.pj-sky::before { left: -30vmax; top: -20vmax; }
.pj-sky::after { right: -35vmax; bottom: -25vmax; animation-delay: -9s; }
.pj-float { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.pj-float i { position: absolute; bottom: -10vh; font-style: normal; opacity: 0; animation: pj-rise linear infinite; will-change: transform, opacity; }
.pj-fx { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.pj-fx span { position: absolute; font-style: normal; line-height: 1; animation: pj-burst .95s ease-out forwards; will-change: transform, opacity; }

.pj-app { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; padding-top: env(safe-area-inset-top); }
.pj-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem .9rem .2rem; }
.pj-name { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.pj-name h1 { font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-hearts { display: inline-flex; gap: 2px; font-size: .95rem; }
.pj-hearts b { font-weight: 400; opacity: .35; transition: opacity .4s, transform .4s; }
.pj-hearts b.on { opacity: 1; animation: pj-beat 2.4s ease-in-out infinite; }
.pj-ico { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; font-size: 1.05rem; text-decoration: none; backdrop-filter: none; transition: transform .15s, background .15s; }
.pj-ico:active { transform: scale(.9); }
.pj-ico:hover { background: rgba(255, 255, 255, .28); }
.pj-top-actions { display: flex; gap: .4rem; }
.pj-bondbar { height: 5px; margin: 0 .9rem; border-radius: 9px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.pj-bondbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--acc2), var(--acc)); border-radius: 9px; transition: width .8s cubic-bezier(.2, .9, .2, 1); }

.pj-view { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: .4rem .9rem 1rem; -webkit-overflow-scrolling: touch; }
.pj-view::-webkit-scrollbar { width: 0; }

/* ── the pet and its bubble ────────────────────────────── */
.pj-stage { position: relative; display: flex; flex-direction: column; align-items: center; padding-top: .3rem; }
.pj-bubble { position: relative; max-width: 92%; min-height: 3.4rem; padding: .7rem 1rem; border-radius: 22px; background: #fff; color: var(--ink); font-size: 1.1rem; line-height: 1.25; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); animation: pj-pop .5s cubic-bezier(.2, 1.4, .3, 1); }
.pj-bubble::after { content: ''; position: absolute; left: 50%; bottom: -9px; width: 20px; height: 20px; background: #fff; transform: translateX(-50%) rotate(45deg); border-radius: 4px; }
.pj-dots { display: inline-flex; gap: 5px; align-items: center; height: 1.2rem; }
.pj-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--bg2); animation: pj-dot 1s ease-in-out infinite; }
.pj-dots i:nth-child(2) { animation-delay: .15s; } .pj-dots i:nth-child(3) { animation-delay: .3s; }
.pj-petwrap { position: relative; margin-top: 1.1rem; width: min(50vw, 230px); aspect-ratio: 359 / 420; display: flex; align-items: flex-end; justify-content: center; cursor: pointer; }
.pj-petwrap::before { content: ''; position: absolute; left: 6%; right: 6%; bottom: -3%; height: 12%; border-radius: 50%; background: rgba(0, 0, 0, .28); filter: blur(6px); animation: pj-shadow 3.4s ease-in-out infinite; }
.pj-petwrap::after { content: ''; position: absolute; inset: 8% -8% 0; border-radius: 50%; background: radial-gradient(closest-side, var(--glow), transparent 70%); z-index: -1; animation: pj-glow 4s ease-in-out infinite; }
.pj-pet { width: 100%; height: auto; max-height: 100%; object-fit: contain; transform-origin: 50% 100%; animation: pj-breathe 3.4s ease-in-out infinite; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .25)); user-select: none; -webkit-user-drag: none; }
.pj-pet.pop { animation: pj-popin .6s cubic-bezier(.2, 1.5, .3, 1), pj-breathe 3.4s ease-in-out .6s infinite; }
.pj-pet.wiggle { animation: pj-wiggle .6s ease-in-out, pj-breathe 3.4s ease-in-out .6s infinite; }
.pj-petwrap.sleep .pj-pet { filter: grayscale(.4) brightness(.8) drop-shadow(0 10px 14px rgba(0, 0, 0, .25)); animation: pj-breathe 5.5s ease-in-out infinite; }
.pj-zzz { position: absolute; top: 4%; right: 8%; font-size: 1.6rem; font-weight: 700; color: #fff; animation: pj-zzz 2.6s ease-in-out infinite; }
.pj-userbubble { align-self: flex-end; max-width: 82%; margin: .8rem 0 0 auto; padding: .5rem .85rem; border-radius: 18px 18px 4px 18px; background: var(--acc); color: #2b1d0e; font-size: 1.05rem; animation: pj-pop .35s ease-out; }

/* ── cards (question, mirror, diary) ───────────────────── */
.pj-card { margin: 1rem 0 0; padding: 1rem; border-radius: 24px; background: #fff; color: var(--ink); box-shadow: 0 10px 28px rgba(0, 0, 0, .28); animation: pj-slide .55s cubic-bezier(.2, .9, .2, 1); }
.pj-card h2 { font-size: 1.05rem; margin-bottom: .2rem; color: var(--bg2); }
.pj-qtag { display: inline-flex; align-items: center; gap: .35rem; padding: .1rem .7rem; border-radius: 99px; background: var(--soft); color: var(--bg2); font-size: .85rem; font-weight: 700; }
.pj-q { margin: .6rem 0 .8rem; font-size: 1.2rem; line-height: 1.2; font-weight: 700; }
.pj-opts { display: grid; gap: .5rem; }
.pj-opt { text-align: left; padding: .7rem .9rem; border: 2px solid var(--soft); border-radius: 16px; background: #fff; color: var(--ink); font-size: 1.05rem; transition: transform .15s, border-color .15s, background .15s; }
.pj-opt:active { transform: scale(.97); }
.pj-opt.on { border-color: var(--acc); background: var(--soft); animation: pj-wiggle .45s; }
.pj-qfoot { display: flex; justify-content: flex-end; margin-top: .8rem; }
.pj-send { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: linear-gradient(135deg, var(--acc2), var(--bg2)); color: #fff; font-size: 1.15rem; box-shadow: 0 6px 14px rgba(0, 0, 0, .25); transition: transform .15s, opacity .15s; }
.pj-send:disabled { opacity: .4; box-shadow: none; }
.pj-send:not(:disabled):active { transform: scale(.88); }
.pj-done { display: flex; align-items: center; gap: .6rem; margin-top: 1rem; padding: .7rem 1rem; border-radius: 18px; background: rgba(255, 255, 255, .16); font-size: 1.02rem; animation: pj-slide .5s ease-out; }
.pj-done i { color: var(--acc); font-size: 1.3rem; }

/* ── chat dock ─────────────────────────────────────────── */
.pj-dock { padding: .4rem .8rem .5rem; }
.pj-chips { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .4rem; scrollbar-width: none; }
.pj-chips::-webkit-scrollbar { display: none; }
.pj-chip { flex: 0 0 auto; padding: .3rem .8rem; border: 1px solid rgba(255, 255, 255, .35); border-radius: 99px; background: rgba(255, 255, 255, .12); font-size: .95rem; white-space: nowrap; }
.pj-chip:active { transform: scale(.95); }
.pj-inputrow { display: flex; align-items: flex-end; gap: .5rem; padding: .35rem .35rem .35rem 1rem; border-radius: 28px; background: #fff; box-shadow: 0 8px 22px rgba(0, 0, 0, .3); }
.pj-inputrow textarea { flex: 1; min-height: 40px; max-height: 110px; padding: .55rem 0; border: 0; outline: 0; resize: none; background: transparent; color: var(--ink); font-size: 1rem; line-height: 1.25; }
.pj-inputrow .pj-send { width: 44px; height: 44px; flex: 0 0 auto; }
.pj-left { display: flex; justify-content: center; gap: 6px; margin-top: .35rem; font-size: .85rem; opacity: .9; }
.pj-left b { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .3); }
.pj-left b.on { background: var(--acc); box-shadow: 0 0 8px var(--acc); }

/* ── tabs ──────────────────────────────────────────────── */
.pj-tabs { display: flex; justify-content: space-around; padding: .35rem .5rem calc(.45rem + env(safe-area-inset-bottom)); background: rgba(10, 8, 30, .45); border-top: 1px solid rgba(255, 255, 255, .12); }
.pj-tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 84px; padding: .3rem .6rem; border: 0; background: transparent; font-size: .8rem; opacity: .7; transition: opacity .2s; }
.pj-tab i { font-size: 1.3rem; transition: transform .25s cubic-bezier(.2, 1.6, .3, 1); }
.pj-tab.on { opacity: 1; color: var(--acc); }
.pj-tab.on i { transform: translateY(-3px) scale(1.18); }
.pj-tab .dot { position: absolute; top: 2px; right: 24px; width: 10px; height: 10px; border-radius: 50%; background: #ff4d6d; box-shadow: 0 0 0 2px var(--bg1); animation: pj-beat 1.6s ease-in-out infinite; }

/* ── diary ─────────────────────────────────────────────── */
.pj-day { margin-top: 1rem; }
.pj-day > h3 { font-size: .95rem; opacity: .85; margin-bottom: .4rem; }
.pj-entry { margin: .4rem 0; padding: .6rem .85rem; border-radius: 18px; background: rgba(255, 255, 255, .95); color: var(--ink); font-size: 1.02rem; line-height: 1.25; animation: pj-slide .45s ease-out both; }
.pj-entry.answer { border-left: 6px solid var(--acc); }
.pj-entry.answer small { display: block; opacity: .7; margin-bottom: .15rem; }
.pj-entry.user { margin-left: 18%; background: var(--acc); color: #2b1d0e; border-radius: 18px 18px 4px 18px; }
.pj-entry.pet { margin-right: 14%; border-radius: 18px 18px 18px 4px; }
.pj-entry.note { background: #fff7c9; color: #4a3b00; transform: rotate(-.6deg); box-shadow: 0 4px 10px rgba(0, 0, 0, .2); }
.pj-entry.note::before { content: '📝 '; }
.pj-empty { margin-top: 2rem; text-align: center; opacity: .9; }
.pj-empty img { width: 120px; height: auto; margin-bottom: .6rem; animation: pj-breathe 3.4s ease-in-out infinite; }

/* ── mirror ────────────────────────────────────────────── */
.pj-mirror { text-align: center; }
.pj-mirror .pj-pet-sm { width: 150px; height: auto; margin: .2rem auto; display: block; animation: pj-breathe 3.4s ease-in-out infinite; }
.pj-ring { position: relative; width: 150px; height: 150px; margin: .6rem auto; }
.pj-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pj-ring circle { fill: none; stroke-width: 12; stroke-linecap: round; }
.pj-ring .bg { stroke: rgba(255, 255, 255, .2); }
.pj-ring .fg { stroke: var(--acc); transition: stroke-dashoffset 1s ease; }
.pj-ring span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; }
.pj-seen h2 { font-size: 1.5rem; color: var(--bg2); }
.pj-seen p { margin: .6rem 0; font-size: 1.1rem; line-height: 1.3; text-align: left; }
.pj-traits { display: grid; gap: .5rem; margin-top: .8rem; text-align: left; }
.pj-trait { display: flex; gap: .6rem; align-items: flex-start; padding: .6rem .8rem; border-radius: 16px; background: var(--soft); animation: pj-slide .6s ease-out both; }
.pj-trait:nth-child(2) { animation-delay: .12s; } .pj-trait:nth-child(3) { animation-delay: .24s; }
.pj-trait i { margin-top: 2px; color: var(--acc); font-size: 1.2rem; }
.pj-trait strong { display: block; color: var(--bg2); }
.pj-pill { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1.2rem; border: 0; border-radius: 99px; background: linear-gradient(135deg, var(--acc2), var(--bg2)); color: #fff; font-weight: 700; box-shadow: 0 6px 16px rgba(0, 0, 0, .28); }
.pj-pill:disabled { opacity: .45; box-shadow: none; }
.pj-pill:not(:disabled):active { transform: scale(.95); }
.pj-note { margin: .6rem 0 0; font-size: .9rem; opacity: .8; }

/* ── onboarding ────────────────────────────────────────── */
.pj-onb { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .9rem; min-height: 100%; padding: 1rem; }
.pj-onb h1 { font-size: 1.5rem; line-height: 1.15; }
.pj-onb p { margin: 0; font-size: 1.1rem; max-width: 22rem; }
.pj-eggwrap { position: relative; width: min(56vw, 230px); cursor: pointer; }
.pj-eggwrap::after { content: ''; position: absolute; inset: -14% -22% -4%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, var(--glow), transparent 70%); animation: pj-glow 3s ease-in-out infinite; }
.pj-egg-svg { width: 100%; height: auto; display: block; overflow: visible; animation: pj-eggidle 2.8s ease-in-out infinite; transform-origin: 50% 100%; }
.pj-egg-svg.shake { animation: pj-eggshake .5s ease-in-out; }
.pj-egg-svg .pj-crack { stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .55s cubic-bezier(.2, .8, .2, 1); }
.pj-egg-svg[data-n="1"] .k1, .pj-egg-svg[data-n="2"] .k1, .pj-egg-svg[data-n="2"] .k2, .pj-egg-svg[data-n="3"] .k1, .pj-egg-svg[data-n="3"] .k2, .pj-egg-svg[data-n="3"] .k3,
.pj-egg-svg[data-n="4"] .pj-crack { stroke-dashoffset: 0; }
.pj-egg-svg .pj-egg-light { opacity: 0; mix-blend-mode: screen; transition: opacity .5s; }
.pj-egg-svg[data-n="1"] .pj-egg-light { opacity: .22; } .pj-egg-svg[data-n="2"] .pj-egg-light { opacity: .45; } .pj-egg-svg[data-n="3"] .pj-egg-light { opacity: .7; } .pj-egg-svg[data-n="4"] .pj-egg-light { opacity: .95; }
.pj-egg-svg.pulse .pj-egg-light { animation: pj-lightpulse .5s ease-out; }
.pj-shard { position: absolute; width: 14px; height: 14px; background: linear-gradient(135deg, #fff1f8, #c9b6ff); clip-path: polygon(50% 0, 100% 100%, 0 82%); animation: pj-shard 1.1s cubic-bezier(.2, .7, .3, 1) forwards; will-change: transform, opacity; }
.pj-egg-svg.burst { animation: none; }
.pj-egg-svg.burst .pj-egg-top { animation: pj-halftop .9s ease-in forwards; transform-origin: 100px 140px; }
.pj-egg-svg.burst .pj-egg-bot { animation: pj-halfbot .9s ease-in forwards; transform-origin: 100px 160px; }
.pj-egg-svg.burst .pj-egg-cracks, .pj-egg-svg.burst .pj-egg-shadow, .pj-egg-svg.burst .pj-egg-light { opacity: 0; transition: opacity .2s; }
.pj-check { display: flex; align-items: flex-start; gap: .6rem; max-width: 22rem; padding: .7rem .9rem; border-radius: 16px; background: rgba(255, 255, 255, .14); text-align: left; font-size: 1rem; }
.pj-check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--acc); }
.pj-namein { width: 100%; max-width: 20rem; padding: .8rem 1rem; border: 0; border-radius: 18px; outline: 0; text-align: center; font-size: 1.3rem; color: var(--ink); background: #fff; box-shadow: 0 8px 22px rgba(0, 0, 0, .3); }
.pj-suggest { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; max-width: 22rem; }
.pj-err { padding: .5rem .8rem; border-radius: 12px; background: rgba(255, 77, 109, .9); font-size: 1rem; }

/* ── sheet (settings) ──────────────────────────────────── */
.pj-sheetbg { position: fixed; inset: 0; z-index: 50; background: rgba(5, 3, 20, .6); display: flex; align-items: flex-end; justify-content: center; animation: pj-fade .25s; }
.pj-sheet { width: 100%; max-width: 560px; max-height: 86vh; overflow-y: auto; padding: 1.1rem 1.1rem calc(1.2rem + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: #fff; color: var(--ink); animation: pj-up .35s cubic-bezier(.2, .9, .2, 1); }
.pj-sheet h2 { color: var(--bg2); margin-bottom: .5rem; }
.pj-sheet p, .pj-sheet li { font-size: 1.02rem; line-height: 1.3; }
.pj-sheet ul { padding-left: 1.2rem; }
.pj-sheet .row { display: flex; align-items: center; gap: .6rem; margin: .8rem 0; }
.pj-sheet .row .pj-ico { background: var(--soft); color: var(--bg2); }
.pj-sheet input[type=text] { width: 100%; padding: .6rem .8rem; border: 2px solid var(--soft); border-radius: 12px; font-size: 1rem; }
.pj-danger { border-top: 1px solid var(--soft); margin-top: 1rem; padding-top: .8rem; }
.pj-danger .pj-pill { background: #d6384f; }

/* ── landing (index.php) ───────────────────────────────── */
.pj-land { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; padding: 1.2rem 1.1rem 3rem; text-align: center; }
body.pj-landing { overflow-y: auto; height: auto; min-height: 100%; }
.pj-land h1 { font-size: 1.9rem; line-height: 1.15; margin: .8rem 0; }
.pj-land .lead { font-size: 1.25rem; max-width: 34rem; margin: 0 auto 1rem; }
.pj-land .hero { display: flex; justify-content: center; align-items: flex-end; gap: 1rem; margin-top: .5rem; }
.pj-land .hero img { width: min(48vw, 240px); height: auto; animation: pj-breathe 3.4s ease-in-out infinite; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .3)); }
.pj-land .hero .pj-eggwrap { width: min(36vw, 160px); }
.pj-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .9rem; margin: 1.6rem 0; text-align: left; }
.pj-steps article { padding: 1rem; border-radius: 22px; background: rgba(255, 255, 255, .95); color: var(--ink); box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }
.pj-steps article i { font-size: 1.6rem; color: var(--bg2); }
.pj-steps h3 { font-size: 1rem; margin: .4rem 0 .2rem; color: var(--bg2); }
.pj-steps p { margin: 0; font-size: 1.02rem; line-height: 1.25; }
.pj-faq { text-align: left; margin-top: 1.6rem; }
.pj-faq details { padding: .6rem 0; border-bottom: 1px solid rgba(255, 255, 255, .25); }
.pj-faq summary { cursor: pointer; font-weight: 700; }
.pj-faq p { margin: .4rem 0 0; font-size: 1.02rem; }
.pj-cta { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.6rem; border: 0; border-radius: 99px; background: linear-gradient(135deg, var(--acc), #ff8a3d); color: #2b1d0e; font-weight: 700; font-size: 1.15rem; text-decoration: none; box-shadow: 0 10px 22px rgba(0, 0, 0, .3); transition: transform .15s; }
.pj-cta:active { transform: scale(.95); }
.pj-soon { margin: 1rem auto; padding: .7rem 1rem; max-width: 26rem; border-radius: 18px; background: rgba(255, 255, 255, .16); }
.pj-land a:not(.pj-cta) { color: var(--acc); }
.pj-land small { display: block; margin-top: 1.2rem; opacity: .8; }

/* ── keyframes ─────────────────────────────────────────── */
@keyframes pj-drift { to { transform: translate(8vmax, 6vmax) scale(1.1); } }
@keyframes pj-rise { 0% { transform: translateY(0) rotate(0); opacity: 0; } 12% { opacity: .85; } 100% { transform: translateY(-115vh) rotate(40deg); opacity: 0; } }
@keyframes pj-burst { 0% { transform: translate(0, 0) scale(.4) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1.2) rotate(var(--rot)); opacity: 0; } }
@keyframes pj-breathe { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-5px) scale(1.02, .985); } }
@keyframes pj-shadow { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.9); opacity: .75; } }
@keyframes pj-glow { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: .95; transform: scale(1.06); } }
@keyframes pj-pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes pj-popin { 0% { transform: scale(.7) translateY(14px); } 60% { transform: scale(1.1) translateY(-6px); } 100% { transform: scale(1) translateY(0); } }
@keyframes pj-wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-6deg) scale(1.04); } 50% { transform: rotate(6deg) scale(1.06); } 80% { transform: rotate(-3deg); } }
@keyframes pj-slide { 0% { transform: translateY(26px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
@keyframes pj-up { 0% { transform: translateY(100%); } 100% { transform: translateY(0); } }
@keyframes pj-fade { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes pj-dot { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-6px); opacity: 1; } }
@keyframes pj-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } 45% { transform: scale(1.15); } }
@keyframes pj-zzz { 0%, 100% { transform: translateY(0) rotate(-6deg); opacity: .4; } 50% { transform: translateY(-12px) rotate(6deg); opacity: 1; } }
@keyframes pj-eggidle { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg) translateY(-3px); } }
@keyframes pj-eggshake { 0%, 100% { transform: rotate(0) scale(1); } 15% { transform: rotate(calc(-7deg * var(--amp, 1))) translateX(calc(-3px * var(--amp, 1))) scale(1.04); } 35% { transform: rotate(calc(6.5deg * var(--amp, 1))) translateX(calc(3px * var(--amp, 1))) scale(1.05); } 55% { transform: rotate(calc(-5deg * var(--amp, 1))) scale(1.03); } 75% { transform: rotate(calc(4deg * var(--amp, 1))); } }
@keyframes pj-lightpulse { 0% { filter: brightness(1.6); } 100% { filter: brightness(1); } }
@keyframes pj-shard { 0% { transform: translate(0, 0) rotate(0) scale(.5); opacity: 1; } 55% { opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(1); opacity: 0; } }
@keyframes pj-halftop { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(-46px, -150px) rotate(-38deg); opacity: 0; } }
@keyframes pj-halfbot { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 60% { opacity: 1; } 100% { transform: translate(14px, 70px) rotate(8deg) scale(.85); opacity: 0; } }

@media (min-width: 700px) { .pj-app { max-width: 480px; box-shadow: 0 0 60px rgba(0, 0, 0, .4); } }
@media (prefers-reduced-motion: reduce) { .pj *, .pj *::before, .pj *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } .pj-float { display: none; } }

@media (max-height: 760px) { .pj-petwrap { width: min(40vw, 175px); margin-top: .9rem; } .pj-bubble { min-height: 3rem; font-size: 1.05rem; } }
