/* The tip penguin, its tip button and its panel: the same as the Vidoglo desktop tools
   (desktop/app/static/tool.css), driven by static/js/pet.js. */

/* The tip button in the header: warm, always in sight, its words take turns (pet.js). */
.tip-button { display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px 4px 8px; border: 0; border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 4px 12px rgba(249, 115, 22, .32); cursor: pointer; transition: box-shadow .15s, filter .15s; }
.tip-button:hover { filter: brightness(1.06); box-shadow: 0 6px 16px rgba(249, 115, 22, .42); }
.tip-button-icon { display: inline-grid; place-items: center; width: 24px; height: 27px; font-size: 18px;
  animation: tip-bow 4.2s ease-in-out infinite; transform-origin: 50% 90%; }
.tip-button-icon svg { display: block; width: 100%; height: 100%; overflow: visible; }
/* The penguin's poses in the header button: pleading, and cool in the week after a tip. */
.pet-svg.is-plead :is(.pet-eyes-big, .pet-beak-sad, .pet-rest) { display: inline; }
.pet-svg.is-plead :is(.pet-eyes-tired, .pet-beak-idle) { display: none; }
.pet-svg.is-cool :is(.pet-shades, .pet-beak-open, .pet-rest) { display: inline; }
.pet-svg.is-cool :is(.pet-eyes-tired, .pet-beak-idle) { display: none; }
.tip-button-label { display: inline-block; min-width: 4.2em; text-align: center; transition: opacity .2s, transform .2s; }
.tip-button.is-turning .tip-button-label { opacity: 0; transform: translateY(-5px); }
.tip-button.is-thanked { background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 4px 12px rgba(22, 163, 74, .28); }
.tip-button.is-thanked .tip-button-icon { animation: none; }
/* A line that pops out under the tip button every so many works saved (no dialog). */
.tip-anchor { position: relative; display: inline-flex; }
.tip-toast { position: absolute; top: calc(100% + 12px); left: 50%; z-index: 80; display: flex; align-items: center; gap: 8px;
  width: max-content; max-width: 320px; padding: 10px 10px 10px 14px; border: 1px solid #fed7aa; border-radius: 14px; background: #fff7ed;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .18); font-size: 13px; line-height: 1.5; font-weight: 600; color: #9a3412;
  white-space: normal; transform: translateX(-50%); animation: tip-pop .25s ease-out; }
.tip-toast[hidden] { display: none; }
.tip-toast::before { content: ""; position: absolute; top: -7px; left: calc(50% - 6px); width: 12px; height: 12px; background: #fff7ed;
  border-top: 1px solid #fed7aa; border-left: 1px solid #fed7aa; transform: rotate(45deg); }
.tip-toast-line { flex: 1; min-width: 170px; }
.tip-toast-go { flex: none; padding: 5px 12px; border: 0; border-radius: 999px; background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
.tip-toast-close { flex: none; padding: 0 4px; border: 0; background: none; font-size: 18px; line-height: 1; color: #c2410c; cursor: pointer; }
.tip-button.is-calling { animation: tip-call .6s ease-in-out 3; }
@keyframes tip-pop { from { opacity: 0; transform: translate(-50%, 6px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes tip-call { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg) scale(1.06); } 75% { transform: rotate(6deg) scale(1.06); } }
@keyframes tip-bow { 0%, 74%, 100% { transform: rotate(0); } 80%, 92% { transform: rotate(-22deg) translateY(2px); } 86% { transform: rotate(0); } }
@media (prefers-reduced-motion: reduce) { .tip-button-icon, .tip-button.is-calling, .tip-toast { animation: none; } .tip-button-label { transition: none; } }

.tool-link-button { padding: 0; border: 0; background: none; color: var(--brand); font-size: 13px; font-weight: 600; }
.tool-link-button:hover { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 3px; }

/* The tip pet: an original blue penguin with a brass telescope slung on its back and the look
   of someone who fixes code every night. A state class on the svg (.is-idle, .is-beg, .is-happy,
   .is-sleep, .is-reading, .is-downloading) decides what shows and how it moves. */
.pet-svg { overflow: visible; }
.pet-shadow { fill: rgba(15, 23, 42, .16); }
.pet-body { fill: #2f74e6; stroke: #12306e; stroke-width: 3; stroke-linejoin: round; }
.pet-belly { fill: #fdfdfd; }
.pet-foot { fill: #f59e0b; stroke: #b45309; stroke-width: 2.2; }
.pet-flipper { fill: #2f74e6; stroke: #12306e; stroke-width: 2.4; stroke-linejoin: round; }
.pet-tuft { fill: none; stroke: #12306e; stroke-width: 3; stroke-linecap: round; }
.pet-bandage rect { fill: #f6c48a; stroke: #a8743d; stroke-width: 1; }
.pet-bandage circle { fill: #a8743d; }
.pet-scope-tube { fill: #c58a2d; stroke: #5a3a12; stroke-width: 2.2; }
.pet-scope-ring { fill: #f1c24e; stroke: #5a3a12; stroke-width: 1.6; }
.pet-scope-lens { fill: #9ad3ff; stroke: #5a3a12; stroke-width: 1.6; }
.pet-strap { fill: none; stroke: #8b5a2b; stroke-width: 5.5; stroke-linecap: round; }
.pet-strap-stitch { fill: none; stroke: #e7c39a; stroke-width: 1; stroke-dasharray: 2.5 2.5; }
.pet-buckle { fill: #f1c24e; stroke: #5a3a12; stroke-width: 1.4; }
.pet-blush { fill: #ff8fb0; opacity: .55; }
.pet-eye { fill: #0f172a; }
.pet-shine { fill: #fff; }
.pet-lid { fill: #fdfdfd; }
.pet-lid-line, .pet-squint { fill: none; stroke: #0f172a; stroke-width: 2.6; stroke-linecap: round; }
.pet-bags { fill: none; stroke: #a5a1d6; stroke-width: 2; stroke-linecap: round; }
.pet-brows { fill: none; stroke: #0f172a; stroke-width: 2.6; stroke-linecap: round; }
.pet-water { fill: none; stroke: #9ad3ff; stroke-width: 2.4; stroke-linecap: round; }
.pet-tear, .pet-sweat { fill: #8fd0ff; }
.pet-eyes-closed path { fill: none; stroke: #0f172a; stroke-width: 2.8; stroke-linecap: round; }
.pet-shades path:first-child { fill: #0b0b10; stroke: #000; stroke-width: 1.2; }
.pet-shades-bar { fill: none; stroke: #0b0b10; stroke-width: 3; }
.pet-shades-glare { fill: none; stroke: rgba(255, 255, 255, .75); stroke-width: 1.8; stroke-linecap: round; }
.pet-beak { fill: #f59e0b; stroke: #b45309; stroke-width: 1.8; stroke-linejoin: round; }
.pet-beak-low { fill: #f97316; }
.pet-nightcap path:first-child { fill: #fbbf24; stroke: #92400e; stroke-width: 2.4; stroke-linejoin: round; }
.pet-nightcap-rim { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; }
.pet-nightcap circle { fill: #fff; stroke: #cbd5e1; stroke-width: 1.5; }
.pet-mug-body { fill: #fff; stroke: #12306e; stroke-width: 2.6; }
.pet-coffee { fill: #6b3f22; }
.pet-mug-text { font: 800 10px/1 Consolas, "Courier New", monospace; fill: #2563eb; text-anchor: middle; }
.pet-mug-handle { fill: none; stroke: #12306e; stroke-width: 2.6; stroke-linecap: round; }
.pet-steam { fill: none; stroke: #cbd5e1; stroke-width: 2; stroke-linecap: round; }
.pet-sign-board { fill: #d9a066; stroke: #5c3a1e; stroke-width: 2.6; }
.pet-sign-text { font: 800 13px/1 "Microsoft YaHei", "PingFang SC", sans-serif; fill: #3b2412; text-anchor: middle; }
.pet-sign-thanks { font-size: 12px; }
.pet-laptop-base { fill: #94a3b8; stroke: #12306e; stroke-width: 2.6; stroke-linejoin: round; }
.pet-laptop-screen { fill: #1e293b; stroke: #12306e; stroke-width: 2.6; }
.pet-arrow path { fill: none; stroke: #60a5fa; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.pet-laptop-bar { fill: #334155; }
.pet-laptop-fill { fill: #22c55e; }
.pet-heart { fill: #ff5c8a; }
.pet-heart-late { fill: #ff8fab; }
.pet-zzz text { font: 800 14px/1 "Microsoft YaHei", sans-serif; fill: #64748b; }
.pet-zzz text + text { font-size: 10px; fill: #94a3b8; }

/* What each state shows. */
.pet-svg :is(.pet-eyes-big, .pet-eyes-closed, .pet-shades, .pet-sweat, .pet-beak-sad, .pet-beak-open, .pet-beak-o,
  .pet-prop, .pet-hearts, .pet-zzz, .pet-lid-frown, .pet-sign-thanks, .pet-nightcap) { display: none; }
.pet-svg.is-idle .pet-mug { display: inline; }
.pet-svg.is-beg :is(.pet-eyes-big, .pet-beak-sad, .pet-sign) { display: inline; }
.pet-svg.is-beg :is(.pet-eyes-tired, .pet-beak-idle) { display: none; }
.pet-svg.is-happy :is(.pet-shades, .pet-beak-open, .pet-sign, .pet-sign-thanks, .pet-hearts) { display: inline; }
.pet-svg.is-happy :is(.pet-eyes-tired, .pet-beak-idle, .pet-sign-ask) { display: none; }
.pet-svg.is-sleep :is(.pet-eyes-closed, .pet-beak-o, .pet-zzz, .pet-nightcap, .pet-rest) { display: inline; }
.pet-svg.is-sleep :is(.pet-eyes-tired, .pet-beak-idle, .pet-bandage, .pet-tuft) { display: none; }
.pet-svg.is-reading .pet-spyglass { display: inline; }
.pet-svg.is-reading :is(.pet-eyes-tired, .pet-scope-back) { display: none; }
.pet-svg.is-downloading :is(.pet-laptop, .pet-sweat, .pet-lid-frown) { display: inline; }
.pet-svg.is-downloading .pet-lid-flat { display: none; }

/* How it moves. */
.pet-figure { animation: pet-bob 2.8s ease-in-out infinite; transform-box: view-box; transform-origin: 60px 126px; }
.pet-blink { animation: pet-blink 4.6s infinite; transform-box: view-box; transform-origin: 60px 51px; }
.pet-steam { animation: pet-steam 2.2s ease-out infinite; }
.pet-svg.is-idle .pet-mug { animation: pet-sip 7s ease-in-out infinite; transform-box: view-box; transform-origin: 60px 112px; }
.pet-tear { animation: pet-tear 2.2s ease-in infinite; }
.pet-tear-late { animation-delay: 1.1s; }
.pet-svg.is-beg .pet-figure { animation: pet-tremble .45s ease-in-out infinite; }
.pet-svg.is-beg .pet-sign { animation: pet-lift .9s ease-in-out infinite; }
.pet-svg.is-happy .pet-figure { animation: pet-hop .9s ease-in-out infinite; }
.pet-heart { animation: pet-heart 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.pet-heart-late { animation-delay: .9s; }
.pet-svg.is-sleep .pet-figure { animation: pet-breathe 3.6s ease-in-out infinite; }
.pet-zzz text { animation: pet-z 2.4s ease-in-out infinite; }
.pet-zzz text + text { animation-delay: 1.2s; }
.pet-spyglass-tube { animation: pet-pan 2.6s ease-in-out infinite; transform-box: view-box; transform-origin: 70px 51px; }
.pet-arrow { animation: pet-arrow 1s ease-in infinite; }
.pet-laptop-fill { animation: pet-fill 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: left center; }
.pet-type-left, .pet-type-right { animation: pet-type .32s ease-in-out infinite alternate; }
.pet-type-right { animation-delay: .16s; }
.pet-sweat { animation: pet-sweat 1.6s ease-in infinite; }
@keyframes pet-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes pet-blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
@keyframes pet-steam { 0% { transform: translateY(4px); opacity: 0; } 40% { opacity: .9; } 100% { transform: translateY(-7px); opacity: 0; } }
@keyframes pet-sip { 0%, 70%, 100% { transform: translateY(0) rotate(0); } 78%, 88% { transform: translateY(-5px) rotate(-8deg); } }
@keyframes pet-tear { 0% { transform: translateY(-2px); opacity: 0; } 15% { opacity: 1; } 85% { opacity: .9; } 100% { transform: translateY(16px); opacity: 0; } }
@keyframes pet-tremble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-2.5deg); } 75% { transform: rotate(2.5deg); } }
@keyframes pet-lift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes pet-hop { 0%, 100% { transform: translateY(0); } 40%, 60% { transform: translateY(-6px); } }
@keyframes pet-heart { 0% { transform: translateY(6px) scale(.6); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-16px) scale(1.05); opacity: 0; } }
@keyframes pet-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025, .985); } }
@keyframes pet-z { 0% { opacity: 0; transform: translate(0, 4px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(6px, -8px); } }
@keyframes pet-pan { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(5deg); } }
@keyframes pet-arrow { 0% { transform: translateY(-4px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(5px); opacity: 0; } }
@keyframes pet-fill { 0% { transform: scaleX(.12); } 100% { transform: scaleX(2.12); } }
@keyframes pet-type { from { transform: translateY(0); } to { transform: translateY(-2.5px); } }
@keyframes pet-sweat { 0% { transform: translateY(-2px); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(9px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pet-svg * { animation: none !important; } }
/* The penguin in the corner: it peeks in from the right edge and comes out to talk. */
.pet { position: fixed; right: 16px; bottom: 18px; z-index: 60; display: flex; align-items: flex-end; gap: 4px; pointer-events: none; }
.pet-button { pointer-events: auto; width: 108px; height: 120px; padding: 0; border: 0; background: none; cursor: pointer;
  transform: translateX(34%); transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); filter: drop-shadow(0 6px 12px rgba(15, 23, 42, .2)); }
.pet-button svg { display: block; width: 100%; height: 100%; }
.pet:hover .pet-button, .pet.is-out .pet-button, .pet-button:focus-visible { transform: translateX(0); }
.pet.is-asleep .pet-button { transform: translateX(50%); }
.pet-bubble { pointer-events: auto; position: relative; width: 236px; margin-bottom: 60px; padding: 12px 14px 10px; border: 1px solid var(--line);
  border-radius: 16px; background: #fff; box-shadow: 0 14px 34px rgba(15, 23, 42, .2); font-size: 13px; line-height: 1.55;
  color: var(--ink); text-align: left; animation: pet-pop .22s ease-out; }
.pet-bubble::after { content: ""; position: absolute; right: -7px; bottom: 22px; width: 12px; height: 12px; background: #fff;
  border-top: 1px solid var(--line); border-right: 1px solid var(--line); transform: rotate(45deg); }
.pet-bubble-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.pet-bubble-actions .button { min-height: 34px; padding: 0 14px; font-size: 13px; }
.pet-sleep { display: block; margin-top: 6px; padding: 0; border: 0; background: none; font-size: 12px; color: var(--muted); cursor: pointer; }
.pet-sleep:hover { color: var(--brand); }
@keyframes pet-pop { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }
.pet.is-away { visibility: hidden; transition: visibility 0s linear .35s; }
.pet.is-away .pet-button { transform: translateX(140%); }
/* The 3D penguin (pet3d.js) draws into a canvas over the 2D svg, which stays as the fallback until the 3D one has
   rendered (.has-3d); the tip window then shows a 3D still of the begging penguin too. */
.pet-button { position: relative; }
.pet-3d { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity .3s; }
.pet.has-3d .pet-3d { opacity: 1; }
.pet.has-3d .pet-button > .pet-svg { visibility: hidden; }
.pet.has-3d .pet-button > .pet-svg * { animation-play-state: paused; }
.pet-3d-on .donate-pet { background: url("../images/pet-3d-beg.webp?v=1") center / contain no-repeat; }
.pet-3d-on .donate-pet svg { visibility: hidden; }

/* The penguin on a progress bar: while a link is parsed or a profile read, a small copy of the
   corner penguin waddles along the bar, feet where the coloured part ends (telescope up while it
   reads a profile), and hops when the bar fills up. The corner one steps out of view meanwhile. */
.progress-lane.is-running { padding-top: 37px; }
.pet-runner { position: absolute; top: 0; left: 0; display: none; width: 36px; height: 40px; pointer-events: none;
  transition: transform .35s ease; filter: drop-shadow(0 2px 2px rgba(15, 23, 42, .18)); }
.progress-lane.is-running .pet-runner { display: block; }
.pet-runner .pet-svg { display: block; width: 100%; height: 100%; }
.pet-svg.is-walk :is(.pet-rest, .pet-lid-frown) { display: inline; }
.pet-svg.is-walk .pet-lid-flat { display: none; }
.pet-svg.is-walk.is-scope .pet-spyglass { display: inline; }
.pet-svg.is-walk.is-scope :is(.pet-eyes-tired, .pet-scope-back, .pet-rest) { display: none; }
.pet-runner.is-cheer .pet-svg :is(.pet-eyes-closed, .pet-beak-open, .pet-rest, .pet-scope-back) { display: inline; }
.pet-runner.is-cheer .pet-svg :is(.pet-eyes-tired, .pet-beak-idle, .pet-spyglass) { display: none; }
.progress-lane.is-walking .pet-runner .pet-figure { animation: pet-waddle .4s ease-in-out infinite alternate; }
.progress-lane.is-walking .pet-runner .pet-foot:nth-of-type(1) { animation: pet-step-left .8s ease-in-out infinite; }
.progress-lane.is-walking .pet-runner .pet-foot:nth-of-type(2) { animation: pet-step-right .8s ease-in-out infinite; }
.progress-lane.is-walking .pet-runner .pet-rest .pet-flipper:first-child {
  animation: pet-flap-left .4s ease-in-out infinite alternate; transform-box: view-box; transform-origin: 32.5px 69px; }
.progress-lane.is-walking .pet-runner .pet-rest .pet-flipper:last-child {
  animation: pet-flap-right .4s ease-in-out infinite alternate; transform-box: view-box; transform-origin: 87.5px 69px; }
.progress-lane.is-pacing .pet-runner { transition: none; animation: pet-pace 7s ease-in-out infinite alternate; }
@keyframes pet-waddle { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
@keyframes pet-step-left { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes pet-step-right { 0%, 100% { transform: translateY(-9px); } 50% { transform: translateY(0); } }
@keyframes pet-flap-left { from { transform: rotate(0); } to { transform: rotate(24deg); } }
@keyframes pet-flap-right { from { transform: rotate(-24deg); } to { transform: rotate(0); } }
@keyframes pet-pace { from { left: 0; } to { left: calc(100% - 36px); } }
@media (prefers-reduced-motion: reduce) { .pet-runner { animation: none !important; transition: none; } }

/* The tip window: a warm head with the begging penguin and today's count, the reason and the amounts
   on the left, one payment code at a time on the right (below them on phones). */
.donate-dialog { width: min(680px, calc(100vw - 24px)); max-height: min(760px, calc(100vh - 24px)); }
.donate-hero { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px 56px 16px 20px;
  border-bottom: 1px solid #fde7cf; background: linear-gradient(135deg, #fff1e0 0%, #fff8ec 55%, #fff 100%); }
.donate-pet { flex: none; width: 72px; height: 80px; }
.donate-pet svg { width: 100%; height: 100%; }
.donate-hero-text { min-width: 0; flex: 1; }
.donate-badge { display: inline-flex; align-items: baseline; gap: 4px; margin-bottom: 6px; padding: 3px 10px; border-radius: 999px;
  background: #ffedd5; font-size: 12.5px; font-weight: 700; color: #c2410c; }
.donate-badge b { font-size: 15px; }
.donate-hero h2 { font-size: 19px; line-height: 1.35; color: var(--ink); }
#donate-sub { margin-top: 3px; font-size: 13px; color: var(--muted); }
.donate-hero .updates-dialog-close { position: absolute; top: 12px; right: 12px; }
.donate-dialog button:disabled { opacity: .45; cursor: not-allowed; }
.donate-dialog .donate-body { display: grid; grid-template-columns: minmax(0, 1fr) 232px; gap: 22px; align-items: start; padding: 18px 20px 20px; }
.donate-text { font-size: 14.5px; line-height: 1.75; color: var(--text); }
.donate-text b { color: #ea580c; }
.donate-tiers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 8px; margin-top: 16px; }
.donate-tier { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 8px;
  padding: 10px 11px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 13.5px; text-align: left;
  color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.donate-tier span { font-size: 21px; line-height: 1; }
.donate-tier b { font-weight: 600; }
.donate-tier em { font-style: normal; font-size: 14px; font-weight: 800; color: #ea580c; }
.donate-tier i { position: absolute; top: -9px; right: 8px; padding: 1px 7px; border-radius: 999px; background: #f97316;
  font-style: normal; font-size: 11px; font-weight: 700; line-height: 1.6; color: #fff; }
/* ¥100 has a row of its own under the four. */
.donate-tier.is-top { grid-column: 1 / -1; grid-template-columns: auto auto auto; justify-content: center; }
.donate-tier:hover { border-color: #fdba74; transform: translateY(-1px); }
.donate-tier.is-picked { border-color: #f97316; background: #fff7ed; box-shadow: 0 0 0 2px rgba(249, 115, 22, .18); }
.donate-hint { min-height: 1.7em; margin-top: 8px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.donate-hint.is-picked { color: #c2410c; font-weight: 600; }
.donate-thanks { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 12px;
  background: #f4f6fb; font-size: 13px; line-height: 1.6; color: var(--text); }
.donate-thanks span { font-size: 16px; line-height: 1.3; }
/* WeChat Pay and Alipay as two tabs, one payment code at a time (brand colours, never mixed up). */
.donate-pay-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.donate-pay-tab { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; border: 0; border-radius: 11px;
  font-size: 14px; font-weight: 700; cursor: pointer; transition: background .15s, color .15s; }
.donate-pay-tab::before { display: grid; place-items: center; width: 18px; height: 18px; font-size: 11px; font-weight: 800; color: #fff; }
.donate-pay-tab.is-wechat { color: #07c160; background: #ecfdf3; }
.donate-pay-tab.is-wechat::before { content: "✓"; border-radius: 50%; background: #07c160; }
.donate-pay-tab.is-alipay { color: #1677ff; background: #eef5ff; }
.donate-pay-tab.is-alipay::before { content: "支"; border-radius: 5px; background: #1677ff; }
.donate-pay-tab[aria-selected="true"]::before { color: inherit; background: #fff; }
.donate-pay-tab.is-wechat[aria-selected="true"] { color: #fff; background: #07c160; }
.donate-pay-tab.is-alipay[aria-selected="true"] { color: #fff; background: #1677ff; }
.donate-pay-tab.is-wechat[aria-selected="true"]::before { color: #07c160; }
.donate-pay-tab.is-alipay[aria-selected="true"]::before { color: #1677ff; }
.donate-code { width: 100%; margin: 10px 0 0; text-align: center; }
.donate-code.is-wechat .donate-qr:has(img) { border-color: #07c160; }
.donate-code.is-alipay .donate-qr:has(img) { border-color: #1677ff; }
.donate-qr { display: grid; place-items: center; aspect-ratio: 1; padding: 10px; border: 1px dashed #cbd5e1; border-radius: 14px;
  background: #f8fafc; overflow: hidden; font-size: 13px; line-height: 1.7; color: var(--muted); white-space: pre-line; }
.donate-qr img { display: block; width: 100%; height: 100%; object-fit: contain; }
.donate-qr:has(img) { padding: 6px; border-style: solid; background: #fff; }
.donate-code figcaption { margin-top: 6px; font-size: 13px; font-weight: 700; }
.donate-code.is-wechat figcaption { color: #16a34a; }
.donate-code.is-alipay figcaption { color: #1677ff; }

/* The website around the tools' penguin. */
/* flex-basis auto, not 0: Safari (iPad, Mac) sizes a 0 basis in this auto-height window as 0 and squeezed
   the amounts and payment codes into a 38px strip. min-height 0 still lets it shrink and scroll when short. */
.tool-dialog-body { padding: 18px 20px; overflow-y: auto; flex: 1 1 auto; min-height: 0; font-size: 14px; }
.donate-dialog .updates-dialog-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--soft); }
.donate-dialog .updates-dialog-foot .button { min-height: 40px; padding: 0 18px; font-size: 14px; }
/* Phones: a smaller penguin that stays clear of the download buttons, a compact tip button. */
@media (max-width: 719px) {
  .tip-button { padding: 3px 8px 3px 5px; font-size: 13px; }
  .tip-button-label { min-width: 0; }
  .pet { right: 8px; bottom: 12px; }
  .pet-button { width: 70px; height: 78px; }
  .pet-bubble { width: min(220px, calc(100vw - 110px)); margin-bottom: 40px; font-size: 12.5px; }
  /* A sheet from the bottom like the site's other dialogs; the payment code comes before the thanks. */
  .donate-dialog { width: 100vw; max-width: 100vw; max-height: 94vh; max-height: 94dvh; }
  .donate-hero { gap: 10px; padding: 14px 48px 12px 14px; }
  .donate-pet { width: 54px; height: 60px; }
  .donate-hero h2 { font-size: 16.5px; text-wrap: balance; }
  .donate-dialog .donate-body { display: flex; flex-direction: column; gap: 0; padding: 14px 16px 16px; }
  .donate-main { display: contents; }
  .donate-text { font-size: 14px; line-height: 1.7; }
  .donate-tiers { margin-top: 12px; }
  .donate-tier { padding: 8px 10px; }
  .donate-hint { margin-top: 6px; }
  .donate-pay { order: 1; width: min(210px, 100%); margin: 4px auto 0; }
  .donate-thanks { order: 2; margin-top: 12px; }
}
@media (max-width: 460px) {
  .tip-button-label { display: none; }
  .tip-button { padding: 3px 6px; }
  .tip-toast { left: auto; right: -60px; transform: none; animation: none; }
  .tip-toast::before { left: auto; right: 72px; }
}
