/* Dog Care Helper — bath-time palette: water, foam, fur. One bold thing (the tub), the rest quiet. */
:root {
  --water: #e6f4f6; --water-deep: #cfe9ed; --water-line: #b9dde3; --foam: #ffffff; --foam-warm: #fbfdfd;
  --ink: #163b4a; --ink-2: #3f6271; --muted: #7a95a0; --line: #d8e9ec;
  --fur: #e8a33d; --fur-deep: #c8821d; --fur-ink: #8d5a0f; --fur-soft: #fff1d6;
  --pink: #f28b9b; --pink-soft: #ffe6ea;
  --sage: #4f8f6e; --sage-soft: #e3f3ea;
  --amber-soft: #fff4dc; --amber-line: #f1dca4; --amber-ink: #7d5a12;
  --r-xl: 28px; --r-lg: 22px; --r-md: 16px; --r-sm: 12px;
  --shadow: 0 2px 12px rgba(22, 59, 74, .06); --shadow-lift: 0 10px 30px rgba(22, 59, 74, .12);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1); --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --t-press: 120ms; --t-ui: 220ms; --t-reveal: 420ms;
  --font: "Nunito", -apple-system, BlinkMacSystemFont, "PingFang HK", "Hiragino Sans GB", "Noto Sans HK", "Noto Sans CJK TC", "Microsoft JhengHei", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --water: #0f2733; --water-deep: #143443; --water-line: #1f4a5c; --foam: #16333f; --foam-warm: #1a3a47;
    --ink: #eaf4f6; --ink-2: #b9d0d7; --muted: #7f9ea8; --line: #244c5b;
    --fur-soft: #3a2f16; --pink-soft: #3d2228; --sage-soft: #1d3a2d; --amber-soft: #3a2f16; --amber-line: #5c4a1e; --amber-ink: #f1d08a;
    --shadow: 0 2px 12px rgba(0, 0, 0, .25); --shadow-lift: 0 10px 30px rgba(0, 0, 0, .4);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--water); line-height: 1.6; font-size: 16px; min-height: 100dvh; overflow-x: hidden; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--fur); outline-offset: 2px; border-radius: 8px; }
a { color: var(--fur-ink); }

/* ambient bubbles: CSS only, off the main thread, hidden for reduced motion */
.bubbles { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bubbles i { position: absolute; bottom: -8vh; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .9); background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, .95), rgba(255, 255, 255, .25) 55%, rgba(185, 221, 227, .25)); box-shadow: inset -2px -2px 4px rgba(185, 221, 227, .5); opacity: 0; animation: rise 22s linear infinite; }
.bubbles i:nth-child(1) { left: 8%; animation-delay: 0s; width: 14px; height: 14px; }
.bubbles i:nth-child(2) { left: 22%; animation-delay: 5s; width: 26px; height: 26px; animation-duration: 28s; }
.bubbles i:nth-child(3) { left: 36%; animation-delay: 11s; }
.bubbles i:nth-child(4) { left: 51%; animation-delay: 2s; width: 10px; height: 10px; animation-duration: 18s; }
.bubbles i:nth-child(5) { left: 63%; animation-delay: 14s; width: 32px; height: 32px; animation-duration: 32s; }
.bubbles i:nth-child(6) { left: 76%; animation-delay: 8s; }
.bubbles i:nth-child(7) { left: 88%; animation-delay: 17s; width: 12px; height: 12px; animation-duration: 20s; }
.bubbles i:nth-child(8) { left: 44%; animation-delay: 20s; width: 20px; height: 20px; animation-duration: 26s; }
@keyframes rise { 0% { transform: translate3d(0, 0, 0); opacity: 0; } 8% { opacity: .7; } 50% { transform: translate3d(14px, -55vh, 0); } 92% { opacity: .5; } 100% { transform: translate3d(-10px, -112vh, 0); opacity: 0; } }
@media (prefers-color-scheme: dark) { .bubbles i { border-color: rgba(255, 255, 255, .35); background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, .35), rgba(255, 255, 255, .05) 55%, transparent); box-shadow: none; } }

.shell { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: 0 16px 56px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 4px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; color: var(--ink-2); white-space: nowrap; }
@media (max-width: 430px) { #privacy-link { display: none; } }
.brand svg { width: 22px; height: 22px; color: var(--fur); }
.top-right { display: flex; align-items: center; gap: 10px; }
.lang { position: relative; display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--foam); }
.lang button { position: relative; z-index: 1; border: 0; background: transparent; padding: 3px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); transition: color var(--t-ui) var(--ease-out); }
.lang button.on { color: #fff; }
.lang-pill { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px; background: var(--fur); transition: transform var(--t-ui) var(--ease-out); }
.lang.en .lang-pill { transform: translateX(100%); }
.link { border: 0; background: none; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; padding: 0; }

main { padding-top: 6px; }
.screen { animation: enter var(--t-ui) var(--ease-out) both; }
.screen.fwd { animation-name: enter-fwd; }
.screen.back { animation-name: enter-back; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes enter-fwd { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes enter-back { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }

h1 { font-size: 26px; line-height: 1.25; margin: 8px 0 10px; letter-spacing: -.01em; font-weight: 800; }
h2 { font-size: 20px; line-height: 1.3; margin: 6px 0 6px; font-weight: 800; }
p { margin: 0 0 8px; }
.lead { color: var(--ink-2); font-size: 16px; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.center { text-align: center; }

/* hero */
.hero { position: relative; margin: 6px 0 4px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; }
.hero h1 { margin: 0 0 8px; }
.hero .mascot { width: 150px; height: auto; margin-bottom: -6px; }
@media (max-width: 480px) { .hero { grid-template-columns: 1fr; gap: 0; } .hero .mascot { width: 190px; justify-self: center; order: -1; margin: -6px 0 4px; } .hero h1 { font-size: 24px; } }

/* cards */
.card { background: var(--foam); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px; margin: 14px 0; }
.card.warm { background: var(--foam-warm); }
.card.amber { background: var(--amber-soft); border-color: var(--amber-line); }
.card.sage { background: var(--sage-soft); border-color: transparent; }
.card.fur { background: var(--fur-soft); border-color: transparent; }
.entry { position: relative; display: flex; gap: 14px; align-items: flex-start; cursor: pointer; overflow: hidden; transition: transform var(--t-press) var(--ease-out), box-shadow var(--t-ui) var(--ease-out); }
.entry:active { transform: scale(.985); }
@media (hover: hover) and (pointer: fine) { .entry:hover { box-shadow: var(--shadow-lift); } }
.entry .glyph { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; }
.entry.a .glyph { background: var(--fur-soft); color: var(--fur-deep); }
.entry.b .glyph { background: var(--water-deep); color: var(--ink-2); }
.entry .glyph svg { width: 26px; height: 26px; }
.entry h2 { margin-top: 2px; font-size: 18px; }
.entry .cta { margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--fur-ink); font-weight: 800; padding: 0; }
.entry .cta svg { width: 16px; height: 16px; transition: transform var(--t-ui) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .entry:hover .cta svg { transform: translateX(3px); } }

.facts { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 10px; margin: 6px -2px 0; scrollbar-width: none; }
.facts::-webkit-scrollbar { display: none; }
.fact { flex: 0 0 82%; scroll-snap-align: start; background: var(--water-deep); border-radius: var(--r-md); padding: 12px 14px; font-size: 14px; color: var(--ink-2); }
.fact b { display: block; color: var(--ink); margin-bottom: 2px; font-size: 13px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 999px; padding: 13px 20px; font-weight: 800; font-size: 16px; min-height: 50px; transition: transform var(--t-press) var(--ease-out), box-shadow var(--t-ui) var(--ease-out), background-color var(--t-ui) var(--ease-out); }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--fur); color: #2b1d05; box-shadow: 0 8px 20px rgba(232, 163, 61, .35); }
.btn--primary:disabled { opacity: .55; box-shadow: none; }
.btn--ghost { background: var(--foam); border-color: var(--line); color: var(--ink); }
.btn--text { background: none; color: var(--muted); font-weight: 700; }
.btn--block { width: 100%; }
.btn svg { width: 18px; height: 18px; }
.stack { display: grid; gap: 10px; }
.actions { margin-top: 20px; display: grid; gap: 8px; }
.actions .split { display: flex; justify-content: space-between; gap: 8px; }

.back { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--muted); padding: 6px 0; font-size: 14px; font-weight: 700; }

/* tub progress */
.tub-progress { display: flex; align-items: center; gap: 14px; margin: 4px 0 10px; }
.tub-progress svg { width: 86px; height: auto; flex: 0 0 86px; }
.tub-progress .meta { font-size: 13px; color: var(--muted); font-weight: 700; }
.tub-progress .meta b { display: block; color: var(--ink); font-size: 15px; }
.tub-water { transform-origin: 50% 100%; transition: transform var(--t-reveal) var(--ease-out); }
.tub-bubble { opacity: 0; transition: opacity var(--t-ui) var(--ease-out), transform var(--t-reveal) var(--ease-out); transform: translateY(4px); }
.tub-bubble.on { opacity: 1; transform: none; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--foam); border-radius: 999px; padding: 9px 14px 9px 11px; font-size: 14px; font-weight: 700; color: var(--ink-2); transition: transform var(--t-press) var(--ease-out), background-color var(--t-ui) var(--ease-out), border-color var(--t-ui) var(--ease-out), color var(--t-ui) var(--ease-out); }
.chip svg { width: 18px; height: 18px; }
.chip:active { transform: scale(.96); }
.chip.on { background: var(--fur-soft); border-color: var(--fur); color: var(--fur-ink); }
.chip.on svg { color: var(--fur-deep); }

/* options */
.opts { display: grid; gap: 8px; margin: 10px 0; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--foam); border-radius: var(--r-md); padding: 13px 14px; font-size: 15px; font-weight: 600; color: var(--ink); transition: transform var(--t-press) var(--ease-out), background-color var(--t-ui) var(--ease-out), border-color var(--t-ui) var(--ease-out); animation: opt-in var(--t-ui) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 30ms); }
@keyframes opt-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.opt:active { transform: scale(.985); }
.opt .dot { flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; transition: border-color var(--t-ui) var(--ease-out), background-color var(--t-ui) var(--ease-out); }
.opt.multi .dot { border-radius: 6px; }
.opt .dot svg { width: 12px; height: 12px; color: #fff; opacity: 0; transform: scale(.6); transition: opacity var(--t-press) var(--ease-out), transform var(--t-ui) var(--ease-out); }
.opt.on { border-color: var(--fur); background: var(--fur-soft); }
.opt.on .dot { border-color: var(--fur); background: var(--fur); }
.opt.on .dot svg { opacity: 1; transform: none; }
.text-input { width: 100%; border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px 14px; font-size: 16px; background: var(--foam); color: var(--ink); transition: border-color var(--t-ui) var(--ease-out), box-shadow var(--t-ui) var(--ease-out); }
.text-input::placeholder { color: var(--muted); }
.text-input:focus { outline: none; border-color: var(--fur); box-shadow: 0 0 0 4px rgba(232, 163, 61, .18); }
.estimate { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--fur-ink); background: var(--fur-soft); border-radius: var(--r-sm); padding: 9px 12px; margin: 8px 0; }
.estimate svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 1px; }
.field { margin-top: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 6px; }

/* photo */
.drop { border: 1.5px dashed var(--water-line); border-radius: var(--r-lg); background: var(--foam-warm); padding: 20px 16px; text-align: center; }
.drop .mascot { width: 120px; height: auto; margin: -4px auto 2px; display: block; }
.preview { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--water-deep); }
.preview img { display: block; width: 100%; max-height: 340px; object-fit: contain; }
.preview .peek { position: absolute; right: 8px; bottom: -6px; width: 84px; height: auto; filter: drop-shadow(0 4px 8px rgba(22, 59, 74, .25)); }
.status { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); font-size: 14px; font-weight: 600; margin-top: 10px; animation: enter var(--t-ui) var(--ease-out) both; }
.status svg { width: 18px; height: 18px; flex: 0 0 18px; }
.status.busy { background: var(--foam-warm); border: 1px solid var(--line); color: var(--ink-2); }
.status.ok { background: var(--sage-soft); color: var(--sage); }
.status.warn { background: var(--amber-soft); border: 1px solid var(--amber-line); color: var(--amber-ink); }
.status.bad { background: var(--pink-soft); color: #a3404f; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--fur); border-radius: 50%; animation: spin .8s linear infinite; flex: 0 0 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.observe { font-size: 15px; color: var(--ink-2); margin-top: 8px; }
input[type=file] { display: none; }

/* result */
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--water-deep); color: var(--ink-2); }
.badge.ai { background: var(--sage-soft); color: var(--sage); }
.badge.photo { background: var(--fur-soft); color: var(--fur-ink); }
.hero-result { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; }
.hero-result .mascot { width: 118px; height: auto; }
.title-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--fur); color: #2b1d05; font-weight: 800; border-radius: 999px; padding: 6px 12px; font-size: 14px; margin: 2px 0 8px; box-shadow: 0 6px 16px rgba(232, 163, 61, .3); animation: pop var(--t-reveal) var(--ease-out) both; animation-delay: 120ms; }
.title-pill svg { width: 16px; height: 16px; }
@keyframes pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
.reveal { animation: reveal var(--t-reveal) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes reveal { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.section-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; margin-bottom: 10px; }
.section-title svg { width: 20px; height: 20px; color: var(--fur-deep); }
.card.sage .section-title svg { color: var(--sage); }
.card.amber .section-title svg { color: var(--amber-ink); }
.tips { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.tips li { display: flex; gap: 12px; }
.tips .n { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: var(--fur); color: #2b1d05; display: grid; place-items: center; font-size: 13px; font-weight: 800; margin-top: 1px; animation: pop var(--t-reveal) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms + 160ms); }
.tips .t { font-weight: 800; display: block; margin-bottom: 2px; }
.tips p { margin: 0; color: var(--ink-2); font-size: 15px; }
.plain { padding-left: 18px; margin: 0; color: var(--ink-2); font-size: 15px; }
.plain li + li { margin-top: 6px; }
.writing { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: 14px; font-weight: 700; padding: 4px 0 8px; }
.writing .mascot { width: 64px; height: auto; flex: 0 0 64px; }
.skeleton { height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--water-deep), var(--foam-warm), var(--water-deep)); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; margin: 10px 0; }
@keyframes shimmer { to { background-position: -200% 0; } }
.wait-fact { font-size: 14px; color: var(--ink-2); background: var(--water-deep); border-radius: var(--r-sm); padding: 10px 12px; margin-top: 10px; animation: enter var(--t-ui) var(--ease-out) both; }

/* checklist */
.check { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.check button { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--foam); border-radius: var(--r-md); padding: 12px 14px; font-size: 15px; color: var(--ink); transition: transform var(--t-press) var(--ease-out), background-color var(--t-ui) var(--ease-out), border-color var(--t-ui) var(--ease-out); }
.check button:active { transform: scale(.985); }
.check .box { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--line); display: grid; place-items: center; margin-top: 1px; transition: border-color var(--t-ui) var(--ease-out), background-color var(--t-ui) var(--ease-out); }
.check .box svg { width: 14px; height: 14px; color: #fff; }
.check .box svg path { stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset var(--t-ui) var(--ease-out); }
.check button.on { background: var(--sage-soft); border-color: transparent; }
.check button.on .box { background: var(--sage); border-color: var(--sage); }
.check button.on .box svg path { stroke-dashoffset: 0; }
.check button.on span.txt { text-decoration: line-through; text-decoration-color: var(--sage); color: var(--ink-2); }
.check-hint { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* ask */
.ask .q { display: flex; gap: 8px; margin-top: 10px; }
.ask .q .text-input { flex: 1; }
.ask .send { flex: 0 0 50px; width: 50px; border-radius: 50%; padding: 0; }
.ask .thread { display: grid; gap: 10px; margin-top: 12px; }
.ask .me { justify-self: end; max-width: 85%; background: var(--fur-soft); color: var(--fur-ink); border-radius: 18px 18px 4px 18px; padding: 10px 14px; font-size: 15px; font-weight: 600; animation: enter var(--t-ui) var(--ease-out) both; }
.ask .bot { display: flex; gap: 10px; align-items: flex-start; max-width: 100%; animation: enter var(--t-ui) var(--ease-out) both; }
.ask .bot .mascot { width: 40px; height: auto; flex: 0 0 40px; margin-top: 2px; }
.ask .bot .bubble { background: var(--water-deep); border-radius: 4px 18px 18px 18px; padding: 10px 14px; font-size: 15px; color: var(--ink); }
.ask .limit { font-size: 13px; color: var(--muted); margin-top: 8px; }

footer { margin-top: 28px; text-align: center; color: var(--muted); font-size: 13px; }
footer .link { display: inline-block; margin-top: 6px; }

/* sheets */
.overlay { position: fixed; inset: 0; background: rgba(22, 59, 74, .45); display: flex; align-items: flex-end; justify-content: center; z-index: 20; animation: fade var(--t-ui) var(--ease-out) both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 640px) { .overlay { align-items: center; padding: 20px; } }
.sheet { background: var(--foam); border-radius: 26px 26px 0 0; width: 100%; max-width: 560px; max-height: 92dvh; overflow: auto; padding: 10px 18px 24px; animation: up 260ms var(--ease-out) both; }
@media (min-width: 640px) { .sheet { border-radius: 26px; } }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
.sheet .handle { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 4px auto 12px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { margin: 0; }
.x { border: 0; background: var(--water-deep); color: var(--ink); width: 34px; height: 34px; border-radius: 50%; font-weight: 800; }
.privacy-list { margin: 10px 0 14px; }
.privacy-list dt { font-weight: 800; margin-top: 12px; }
.privacy-list dd { margin: 2px 0 0; color: var(--ink-2); font-size: 15px; }
.card-img { display: block; width: 100%; border-radius: 18px; margin: 10px 0; box-shadow: var(--shadow-lift); }
.share-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* toast */
#toast-root { position: fixed; left: 0; right: 0; bottom: 24px; display: grid; justify-items: center; pointer-events: none; z-index: 30; }
.toast { background: var(--ink); color: var(--water); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 700; box-shadow: var(--shadow-lift); transform: translateY(16px); opacity: 0; transition: transform var(--t-ui) var(--ease-out), opacity var(--t-ui) var(--ease-out); }
.toast.in { transform: none; opacity: 1; }

/* paw confetti: rare, once, at the reveal */
#confetti-root { position: fixed; inset: 0; pointer-events: none; z-index: 25; overflow: hidden; }
.paw { position: absolute; top: -40px; width: 22px; height: 22px; color: var(--fur); animation: paw-fall 1.5s var(--ease-out) both; }
.paw.pink { color: var(--pink); }
.paw.blue { color: var(--water-line); }
@keyframes paw-fall { 0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate3d(var(--dx, 0px), 70vh, 0) rotate(var(--rot, 180deg)); opacity: 0; } }

/* mascot */
.mascot { display: block; overflow: visible; }
.mascot .lid { transform-origin: center; transform: scaleY(0); }
.mascot.blink .lid { animation: blink 4.6s linear infinite; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(0); } 95%, 98% { transform: scaleY(1); } }
.mascot .happy-eyes, .mascot .tongue, .mascot .towel, .mascot .puzzle, .mascot .think { display: none; }
.mascot.happy .happy-eyes, .mascot.happy .tongue { display: block; }
.mascot.happy .eyes, .mascot.puzzled .eyes { display: none; }
.mascot.clean .towel { display: block; }
.mascot.puzzled .puzzle { display: block; }
.mascot.thinking .think { display: block; }
.mascot.thinking .pupil { transform: translate(1.5px, -2px); }
.mascot .think circle { animation: think-rise 1.6s var(--ease-out) infinite; transform-origin: center; }
.mascot .think circle:nth-child(2) { animation-delay: .4s; }
.mascot .think circle:nth-child(3) { animation-delay: .8s; }
@keyframes think-rise { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-14px); opacity: 0; } }
.mascot .duck { transform-origin: 50% 100%; }
.mascot.bob .duck { animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(3deg) translateY(-2px); } }
.mascot .sparkle { opacity: 0; }
.mascot.happy .sparkle { animation: twinkle 1.2s var(--ease-out) infinite; }
.mascot.happy .sparkle:nth-of-type(2) { animation-delay: .4s; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.7); } 50% { opacity: 1; transform: scale(1); } }

.hidden { display: none !important; }

/* interactive: the dog watches the finger, shakes when tapped, the duck quacks, the tub gets a name tag */
.mascot .head, .mascot .duck, .tub-bubble.on { cursor: pointer; }
.mascot .eye { transition: transform 120ms var(--ease-out); }
.mascot .ear { transform-box: fill-box; transform-origin: 50% 15%; }
.mascot.wiggle .ear-l { animation: ear-l 420ms var(--ease-out); }
.mascot.wiggle .ear-r { animation: ear-r 420ms var(--ease-out); }
@keyframes ear-l { 30% { transform: rotate(-12deg); } 65% { transform: rotate(7deg); } }
@keyframes ear-r { 30% { transform: rotate(12deg); } 65% { transform: rotate(-7deg); } }
.mascot .head { transform-box: fill-box; transform-origin: 50% 85%; }
.mascot.shake .head { animation: shake 480ms var(--ease-out); }
@keyframes shake { 18% { transform: rotate(-7deg); } 42% { transform: rotate(6deg); } 66% { transform: rotate(-3deg); } 84% { transform: rotate(2deg); } }
.mascot .droplet { opacity: 0; transform-box: fill-box; transform-origin: center; }
.mascot.shake .droplet { animation: drop-fly 620ms var(--ease-out); }
@keyframes drop-fly { 0% { opacity: 1; transform: translate(0, 0) scale(.6); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1); } }
.mascot .quack { opacity: 0; transform-box: fill-box; transform-origin: 10% 100%; }
.mascot.quacking .quack { animation: quack 1000ms var(--ease-out); }
@keyframes quack { 0% { opacity: 0; transform: scale(.85); } 14%, 78% { opacity: 1; transform: none; } 100% { opacity: 0; transform: scale(.95); } }
.mascot.quacking .duck { animation: duck-hop 520ms var(--ease-out); }
@keyframes duck-hop { 30% { transform: translateY(-9px) rotate(-10deg); } 60% { transform: translateY(0) rotate(6deg); } }
.mascot .plate { opacity: 0; transition: opacity var(--t-ui) var(--ease-out); }
.mascot .plate.on { opacity: 1; }
.chip.just svg { animation: chip-wiggle 420ms var(--ease-out); }
@keyframes chip-wiggle { 25% { transform: rotate(-14deg) scale(1.15); } 60% { transform: rotate(10deg); } }
.opt { position: relative; overflow: hidden; }
.opt .ripple { position: absolute; left: var(--x); top: var(--y); width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; background: var(--fur); opacity: .35; pointer-events: none; animation: ripple 480ms var(--ease-out) forwards; }
@keyframes ripple { to { transform: scale(16); opacity: 0; } }
.tub-bubble { transform-box: fill-box; transform-origin: center; }
.tub-bubble.pop { animation: bubble-pop 340ms var(--ease-out) forwards; }
@keyframes bubble-pop { 55% { transform: scale(1.5); opacity: .7; } 100% { transform: scale(1.9); opacity: 0; } }
.drop { transition: transform var(--t-ui) var(--ease-out), border-color var(--t-ui) var(--ease-out), background-color var(--t-ui) var(--ease-out); }
.drop.over { transform: scale(1.02); border-color: var(--fur); background: var(--fur-soft); }
.swipe { touch-action: pan-y; will-change: transform; }
.swipe.snap { transition: transform 220ms var(--ease-out), opacity 220ms var(--ease-out); }
.card-img { transition: transform 120ms var(--ease-out); will-change: transform; touch-action: pan-y; }
.check .box { position: relative; }
.burst { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: var(--sage); pointer-events: none; animation: burst 560ms var(--ease-out) forwards; }
@keyframes burst { to { transform: translate(var(--dx), var(--dy)) scale(.3); opacity: 0; } }
.ring { position: fixed; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; border: 2px solid rgba(232, 163, 61, .6); pointer-events: none; z-index: 5; animation: ring 640ms var(--ease-out) forwards; }
@keyframes ring { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .mascot .eye { transition: none; }
  .mascot.wiggle .ear-l, .mascot.wiggle .ear-r, .mascot.shake .head, .mascot.shake .droplet, .mascot.quacking .duck, .chip.just svg, .tub-bubble.pop { animation: none; }
  .mascot.quacking .quack { animation: fade 1000ms ease both; }
  .opt .ripple, .burst, .ring { display: none; }
  .swipe.snap, .card-img { transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  .bubbles { display: none; }
  .screen, .screen.fwd, .screen.back, .opt, .reveal, .status, .title-pill, .tips .n, .wait-fact, .ask .me, .ask .bot { animation: fade var(--t-ui) ease both; animation-delay: 0s; }
  .sheet { animation: fade var(--t-ui) ease both; }
  .mascot.blink .lid, .mascot.bob .duck, .mascot .think circle, .mascot.happy .sparkle { animation: none; }
  .mascot.happy .sparkle { opacity: 1; }
  .paw { display: none; }
  .lang-pill, .tub-water, .tub-bubble { transition: none; }
}
