/* Calczora Fun: the pup theme (Dog Age Calculator). Loaded after fun.css, only on its pages.
   Two looks: Park (a fresh lawn-green day with a tennis ball, a deep green night with fireflies; collar red and brass)
   and Cosy (a denim-blue day on a plaid blanket, a cocoa night under a lamp; mustard and denim). */

/* ================= colours ================= */
html[data-fun="pup"] {
  --fun: #e0493a; --fun-2: #f47a68; --fun-ink: #a5291b; --fun-soft: #ffe2da; --fun-line: rgba(224, 73, 58, .3);
  --go-a: #cf3a2b; --go-b: #a12517; --p-grass: #4f9d4a; --p-ball: #d9e64a; --p-paper: #fffef7;
  --tint: rgba(224, 73, 58, .07); --tint-strong: rgba(224, 73, 58, .14);
  /* the collar and the tag */
  --cl-band: linear-gradient(180deg, #e8574a, #b8301f); --cl-stud: #f6d47a; --tag: #f0c64f; --tag-edge: #b48a1f; --tag-ink: #4a3205; --tag-soft: #5a4106;
}
html[data-fun="pup"][data-fun-alt] {
  --fun: #d07a1c; --fun-2: #eba14a; --fun-ink: #7a4306; --fun-soft: #fbeccc; --fun-line: rgba(208, 122, 28, .32);
  --go-a: #b8621a; --go-b: #8f4508; --p-grass: #2f5d9a; --p-ball: #e3a21a; --p-paper: #fbfcff;
  --tint: rgba(47, 93, 154, .07); --tint-strong: rgba(47, 93, 154, .14);
  --cl-band: repeating-linear-gradient(90deg, #2f5d9a 0 10px, #e3a21a 10px 13px, #2f5d9a 13px 23px, #c84b3a 23px 25px); --cl-stud: #f7f3ea; --tag: #2f5d9a; --tag-edge: #1d3e6e; --tag-ink: #fff; --tag-soft: #cfe0f6;
}
html[data-fun="pup"][data-theme="dark"] { --fun-2: #ff8f7e; --fun-soft: rgba(255, 143, 126, .14); --fun-line: rgba(255, 160, 140, .3); --p-paper: #102419; }
html[data-fun="pup"][data-fun-alt][data-theme="dark"] { --fun-2: #f2b25c; --fun-soft: rgba(242, 178, 92, .14); --fun-line: rgba(242, 178, 92, .3); --p-paper: #22170f; --tag: #3a6cb0; }

/* ================= the sky ================= */
[data-fun="pup"] body { background: #e3f2cf; }
[data-fun="pup"] .sky { --s1: #b6dd8e !important; --s2: #def0c6 !important; --s3: #fbfdf3 !important; }
[data-fun="pup"][data-sky="clear"] .sky { --s1: #a9d77e !important; --s2: #d7edba !important; --s3: #fafdf0 !important; }
[data-fun="pup"][data-sky="cloudy"] .sky { --s1: #bfd3a8 !important; --s2: #dfe9d0 !important; --s3: #f8faf2 !important; }
[data-fun="pup"][data-theme="dark"] body { background: #0c241b; }
[data-fun="pup"][data-theme="dark"] .sky { --s1: #06140f !important; --s2: #0c241b !important; --s3: #163628 !important; }
[data-fun="pup"][data-theme="dark"][data-sky="clear"] .sky { --s1: #040f0b !important; --s2: #0a1f17 !important; --s3: #132f23 !important; }
[data-fun="pup"][data-theme="dark"][data-sky="cloudy"] .sky { --s1: #111b17 !important; --s2: #1a2a23 !important; --s3: #263a31 !important; }
[data-fun="pup"][data-fun-alt] body { background: #dbe6f3; }
[data-fun="pup"][data-fun-alt] .sky { --s1: #a7c0e0 !important; --s2: #d3e0f0 !important; --s3: #f6f9fd !important; }
[data-fun="pup"][data-fun-alt][data-sky="clear"] .sky { --s1: #9ab7dc !important; --s2: #ccdcef !important; --s3: #f4f8fd !important; }
[data-fun="pup"][data-fun-alt][data-sky="cloudy"] .sky { --s1: #b3bfcd !important; --s2: #d7dee7 !important; --s3: #f5f7fa !important; }
[data-fun="pup"][data-fun-alt][data-theme="dark"] body { background: #241811; }
[data-fun="pup"][data-fun-alt][data-theme="dark"] .sky { --s1: #140d09 !important; --s2: #241811 !important; --s3: #34241a !important; }
[data-fun="pup"][data-fun-alt][data-theme="dark"][data-sky="clear"] .sky { --s1: #0e0906 !important; --s2: #1e140e !important; --s3: #2d1f16 !important; }
[data-fun="pup"][data-fun-alt][data-theme="dark"][data-sky="cloudy"] .sky { --s1: #1b1512 !important; --s2: #2a211b !important; --s3: #3a2e26 !important; }
[data-fun="pup"] .orb { display: none; }
[data-fun="pup"] .c use { fill: #fdfffa; }
[data-fun="pup"][data-theme="dark"] .c use { fill: #173426; }
[data-fun="pup"][data-fun-alt] .c use { fill: #f8fbff; }
[data-fun="pup"][data-fun-alt][data-theme="dark"] .c use { fill: #3a2a1f; }
[data-fun="pup"] .stars { filter: hue-rotate(40deg) saturate(.8); }
[data-fun="pup"][data-fun-alt] .stars { filter: sepia(.6); }

/* ================= sky decorations ================= */
/* Park: hills along the bottom, a tennis ball bouncing by, paw prints, and fireflies at night */
.fun-fx .hills { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 22vh; min-height: 110px; }
.fun-fx .hills .h2 { fill: #a5d47a; opacity: .45; }
.fun-fx .hills .h1 { fill: #8cc562; opacity: .45; }
[data-theme="dark"] .fun-fx .hills .h2 { fill: #13301f; opacity: .9; }
[data-theme="dark"] .fun-fx .hills .h1 { fill: #0f2819; opacity: .95; }
.fun-fx .ball { position: absolute; left: 0; bottom: 12vh; width: 30px; height: 30px; opacity: 0; animation: ballRun 24s linear 3s infinite; }
.fun-fx .ball circle { fill: #d9e64a; stroke: #a7b524; stroke-width: 1; }
.fun-fx .ball path { fill: none; stroke: #fff; stroke-width: 1.600; stroke-linecap: round; }
@keyframes ballRun {
  0% { opacity: 0; transform: translate(-6vw, 0) rotate(0); } 2% { opacity: .9; }
  6% { transform: translate(14vw, -14vh) rotate(160deg); } 10% { transform: translate(30vw, 0) rotate(320deg); }
  13% { transform: translate(44vw, -8vh) rotate(460deg); } 16% { transform: translate(56vw, 0) rotate(580deg); }
  18% { transform: translate(64vw, -3vh) rotate(660deg); } 20% { transform: translate(70vw, 0) rotate(720deg); }
  24% { opacity: .9; transform: translate(84vw, 0) rotate(840deg); } 27% { opacity: 0; } 100% { opacity: 0; transform: translate(84vw, 0) rotate(840deg); } }
.fun-fx .pw { position: absolute; width: 22px; height: 22px; fill: rgba(60, 110, 30, .14); rotate: var(--r); }
[data-theme="dark"] .fun-fx .pw { fill: rgba(200, 240, 180, .07); }
.fun-fx .fly { display: none; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #f4f27a; box-shadow: 0 0 8px 2px rgba(240, 240, 110, .6);
  animation: firefly 6s ease-in-out var(--d) infinite; }
@keyframes firefly { 0%, 100% { opacity: 0; translate: 0 0; } 40% { opacity: .9; } 60% { opacity: .7; translate: var(--x) -18px; } }
[data-theme="dark"]:not([data-fun-alt]) .fun-fx .fly { display: block; }
/* Cosy: a soft plaid, a warm lamp glow and a few floating bones */
.fun-fx .plaid, .fun-fx .lamp, .fun-fx .bn { display: none; }
.fun-fx .plaid { position: absolute; inset: 0; opacity: .5;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .16) 0 26px, transparent 26px 80px, rgba(227, 162, 26, .12) 80px 86px, transparent 86px 140px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .14) 0 26px, transparent 26px 80px, rgba(200, 75, 58, .08) 80px 84px, transparent 84px 140px); }
[data-theme="dark"] .fun-fx .plaid { opacity: .25; }
.fun-fx .lamp { position: absolute; left: -18vmax; top: -18vmax; width: 60vmax; height: 60vmax; border-radius: 50%; background: radial-gradient(circle, rgba(255, 236, 190, .5), rgba(255, 236, 190, 0) 62%); }
[data-theme="dark"] .fun-fx .lamp { background: radial-gradient(circle, rgba(255, 190, 100, .32), rgba(255, 190, 100, 0) 62%); }
.fun-fx .bn { position: absolute; bottom: -40px; width: var(--s); height: calc(var(--s) * .6); fill: rgba(255, 255, 255, .7); rotate: var(--r); animation: boneUp var(--t) linear var(--d) infinite; }
[data-theme="dark"] .fun-fx .bn { fill: rgba(255, 220, 170, .2); }
@keyframes boneUp { 0% { transform: translateY(0); opacity: 0; } 8% { opacity: .8; } 85% { opacity: .5; } 100% { transform: translateY(-112vh); opacity: 0; } }
[data-fun-alt] .fun-fx .plaid, [data-fun-alt] .fun-fx .lamp, [data-fun-alt] .fun-fx .bn { display: block; }
[data-fun-alt] .fun-fx .hills, [data-fun-alt] .fun-fx .ball, [data-fun-alt] .fun-fx .pw { display: none; }
@media (prefers-reduced-motion: reduce) { .fun-fx .ball, .fun-fx .fly, .fun-fx .bn { animation: none; display: none !important; } }

/* ================= the logo: a paw for the "o" (or a bone) ================= */
html[data-fun="pup"] { --lo-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -5 16 15'%3E%3Cpath d='M0 3.2C-2.7 3.2-5 5-5 7.2-5 9-3.2 9.6 0 9.6S5 9 5 7.2C5 5 2.7 3.2 0 3.2zM-6.4 2.2a1.9 2.4-18 1 0 .01 0zM6.4 2.2a1.9 2.4 18 1 0 .01 0zM-2.6-1.8a1.9 2.5-6 1 0 .01 0zM2.6-1.8a1.9 2.5 6 1 0 .01 0z'/%3E%3C/svg%3E"); }
html[data-fun="pup"][data-fun-alt] { --lo-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -6 20 12'%3E%3Cpath d='M-7-2.2a2.6 2.6 0 1 1 2.8-2.6H4.2A2.6 2.6 0 1 1 7-2.2 2.6 2.6 0 1 1 4.2 2.6H-4.2A2.6 2.6 0 1 1-7-2.2z'/%3E%3C/svg%3E"); }
html[data-fun="pup"] .tw .lo { width: .62em; height: .62em; vertical-align: -.04em; }
html[data-fun="pup"][data-fun-alt] .tw .lo { width: .8em; height: .5em; vertical-align: .02em; }
html[data-fun="pup"]:not([data-theme="dark"]) .hd .tw b { color: var(--fun-ink); }
html[data-fun="pup"]:not([data-theme="dark"]) .tw .lo { background: var(--fun-ink); }
html[data-fun="pup"][data-theme="dark"] .hd .tw b { color: var(--fun-2); }
html[data-fun="pup"][data-theme="dark"] .tw .lo { background: var(--fun-2); }

/* ================= the love theme's pinks, swapped for this theme's colours ================= */
html[data-fun="pup"] .cf-in:focus-within, html[data-fun="pup"] .fun-name:focus { border-color: var(--fun); box-shadow: 0 0 0 3px var(--fun-line); }
html[data-fun="pup"] .btn.fun-go { box-shadow: 0 12px 22px -14px rgba(120, 30, 10, .75), inset 0 1px 0 rgba(255, 255, 255, .3); }
html[data-fun="pup"] .btn.fun-go svg { width: 20px; height: 20px; fill: currentColor; rotate: -14deg; }
html[data-fun="pup"][data-theme="dark"] .eyebrow { color: var(--fun-2); }
@media (hover: hover) { html[data-fun="pup"] .btn.soft:hover { color: var(--fun-ink); background: color-mix(in srgb, var(--fun-soft) 82%, var(--fun-2)); } }
html[data-fun="pup"][data-theme="dark"] .btn.soft { color: #ffd3ca; background: rgba(255, 143, 126, .12); box-shadow: inset 0 0 0 1px rgba(255, 143, 126, .28); }
html[data-fun="pup"][data-fun-alt][data-theme="dark"] .btn.soft { color: #ffe2b8; background: rgba(242, 178, 92, .12); box-shadow: inset 0 0 0 1px rgba(242, 178, 92, .28); }
@media (hover: hover) { html[data-fun="pup"][data-theme="dark"] .btn.soft:hover { color: #fff; background: rgba(255, 255, 255, .14); } }
html[data-fun="pup"][data-theme="dark"] .fun-block .fb-head p { color: #d4e6da; }
html[data-fun="pup"][data-fun-alt][data-theme="dark"] .fun-block .fb-head p { color: #eadccd; }
html[data-fun="pup"] .tip-line b { color: var(--fun-ink); }
html[data-fun="pup"][data-theme="dark"] .tip-line b { color: var(--fun-2); }

/* ================= night cards: forest (Park) and cocoa (Cosy) ================= */
html[data-fun="pup"][data-theme="dark"] {
  --frost: rgba(16, 40, 28, .88); --quiet: rgba(16, 40, 28, .8); --glass: rgba(16, 40, 28, .88);
  --hero-a: rgba(28, 62, 44, .86); --hero-b: rgba(12, 32, 22, .82);
  --field: rgba(4, 16, 10, .9); --solid: rgba(4, 16, 10, .86); --grade: #1f4430;
  --tint: rgba(255, 143, 126, .08); --tint-strong: rgba(255, 143, 126, .16);
  --edge: rgba(200, 240, 210, .15); --hairline: rgba(210, 240, 220, .1); --field-line: rgba(200, 235, 210, .3);
}
html[data-fun="pup"][data-fun-alt][data-theme="dark"] {
  --frost: rgba(44, 30, 21, .9); --quiet: rgba(44, 30, 21, .82); --glass: rgba(44, 30, 21, .9);
  --hero-a: rgba(64, 44, 30, .86); --hero-b: rgba(34, 22, 14, .82);
  --field: rgba(18, 11, 6, .9); --solid: rgba(18, 11, 6, .86); --grade: #4a3424;
  --tint: rgba(242, 178, 92, .09); --tint-strong: rgba(242, 178, 92, .17);
  --edge: rgba(255, 220, 180, .15); --hairline: rgba(255, 225, 195, .1); --field-line: rgba(255, 215, 175, .28);
}
html[data-fun="pup"][data-theme="dark"] .tool > .result::after { background: radial-gradient(70% 46% at 50% 30%, rgba(240, 198, 79, .12), rgba(240, 198, 79, 0) 70%); }
html[data-fun="pup"][data-fun-alt][data-theme="dark"] .tool > .result::after { background: radial-gradient(70% 46% at 50% 30%, rgba(255, 190, 100, .14), rgba(255, 190, 100, 0) 70%); }

/* ================= the buddy as the pup: ears (cat ears on the cat setting) and a bone ================= */
.pup-mascot .ear { fill: #b9814d; stroke: #6e4420; }
.pup-mascot .ear-in { stroke: #e2b585; fill: #f2b8b8; }
.pup-mascot .ear-cat .ear { fill: #f0a04b; stroke: #a5601c; }
.pup-mascot .ear-cat .ear-in { stroke: none; fill: #ffc4c4; }
[data-fun-alt] .pup-mascot .ear-dog .ear { fill: #3d3a3a; stroke: #1c1a1a; }
[data-fun-alt] .pup-mascot .ear-dog .ear-in { stroke: #6a6464; }
[data-fun-alt] .pup-mascot .ear-cat .ear { fill: #6f7781; stroke: #3c434b; }
[data-theme="dark"] .pup-mascot .ear-dog .ear { stroke: #e9c9a6; }
.ear-cat, [data-pet="cat"] .ear-dog { display: none; }
[data-pet="cat"] .ear-cat { display: inline; }
.pup-mascot .tongue path { fill: #ff8fa3; stroke: #c2456a; }
.pup-mascot .tongue { display: none; }
.pup-mascot:is([data-mood="happy"], [data-mood="great"], [data-mood="cheeky"]) .tongue { display: inline; }
[data-pet="cat"] .pup-mascot .tongue { display: none; }
.pup-mascot .bone { fill: #fff4dc; stroke: #b08d55; }
[data-pet="cat"] .pup-mascot .treat { display: none; }
.pup-mascot .ear-dog { transform-box: fill-box; transform-origin: 50% 0; }
.stage.landed .pup-mascot .ear-dog { animation: earFlop .6s ease-out; }
@keyframes earFlop { 30% { scale: 1 .9; } 60% { scale: 1 1.06; } }
@media (prefers-reduced-motion: reduce) { .stage.landed .pup-mascot .ear-dog { animation: none; } }

/* ================= the inputs: a pet profile card ================= */
.profile { position: relative; overflow: hidden; background: var(--p-paper); }
.pp-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pp-hole { flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--sky-tear, rgba(0, 0, 0, .06)); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .25), 0 0 0 4px var(--tint-strong); }
.profile h2 { margin: 0; font: 800 22px/1.2 var(--display, "Bricolage Grotesque"), system-ui, sans-serif; color: var(--navy); }
[data-theme="dark"] .profile h2 { color: #fff; }
.pp-kind { display: inline-flex; margin-left: auto; padding: 3px; border-radius: 12px; background: var(--tint-strong); }
.pp-kind button { min-width: 64px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: none; font: 750 14px/1 "Figtree", system-ui, sans-serif; color: var(--navy-2); cursor: pointer; }
.pp-kind button[aria-pressed="true"] { background: #fff; color: var(--fun-ink); box-shadow: 0 2px 6px -2px rgba(80, 20, 10, .35); }
[data-theme="dark"] .pp-kind button { color: #d4e6da; }
[data-theme="dark"] .pp-kind button[aria-pressed="true"] { background: rgba(255, 255, 255, .92); color: #10161d; }
.pp-row { margin-top: 14px; }
.profile label, .pp-lbl { display: block; margin-bottom: 6px; font: 700 14px/1.2 "Figtree", system-ui, sans-serif; color: var(--navy); }
.profile label small, .pp-lbl small { margin-left: 4px; font-weight: 600; font-size: 12.5px; color: var(--navy-2); }
[data-theme="dark"] .profile label, [data-theme="dark"] .pp-lbl { color: #fff; }
[data-theme="dark"] .profile label small, [data-theme="dark"] .pp-lbl small { color: #cfe0d4; }
.profile .fun-name { width: 100%; }
.pp-age { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pp-age > .pp-lbl { grid-column: 1 / -1; margin-bottom: -4px; }
.pp-step label { margin-bottom: 4px; font-size: 12.5px; font-weight: 650; color: var(--navy-2); }
.stp { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; height: 50px; border-radius: 14px; background: var(--field); box-shadow: inset 0 0 0 1.5px var(--field-line); overflow: hidden; }
.stp:focus-within { box-shadow: inset 0 0 0 2px var(--fun), 0 0 0 3px var(--fun-line); }
.stp input { width: 100%; min-width: 0; border: 0; background: none; text-align: center; font: 800 20px/1 var(--display, "Bricolage Grotesque"), system-ui, sans-serif; color: var(--navy); outline: 0; }
.stp input[aria-invalid="true"] { color: var(--danger, #c0392b); }
[data-theme="dark"] .stp input { color: #fff; }
.stp-b { border: 0; background: var(--tint); font: 700 22px/1 "Figtree", system-ui, sans-serif; color: var(--fun-ink); cursor: pointer; }
.stp-b:active { background: var(--tint-strong); }
[data-theme="dark"] .stp-b { color: var(--fun-2); }
.pp-breed { min-height: 18px; margin: 6px 0 0; font: 600 12.5px/1.35 "Figtree", system-ui, sans-serif; color: var(--fun-ink); }
[data-theme="dark"] .pp-breed { color: var(--fun-2); }
.pp-sizes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pp-sizes button { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; min-height: 84px; padding: 8px 4px; border: 0; border-radius: 14px;
  background: var(--tint); box-shadow: inset 0 0 0 1.5px var(--field-line); color: var(--navy-2); cursor: pointer; transition: background-color .2s, box-shadow .2s, translate .15s; }
.pp-sizes svg { color: color-mix(in srgb, var(--navy) 40%, transparent); rotate: -12deg; }
.pp-sizes b { font: 800 14px/1 "Figtree", system-ui, sans-serif; color: var(--navy); }
.pp-sizes small { font: 600 10.5px/1.15 "Figtree", system-ui, sans-serif; text-align: center; }
.pp-sizes button[aria-pressed="true"] { background: var(--fun-soft); box-shadow: inset 0 0 0 2px var(--fun); }
.pp-sizes button[aria-pressed="true"] svg { color: var(--fun); }
.pp-sizes button[aria-pressed="true"] b { color: var(--fun-ink); }
@media (hover: hover) { .pp-sizes button:hover { translate: 0 -2px; } }
[data-theme="dark"] .pp-sizes button { color: #cfe0d4; }
[data-theme="dark"] .pp-sizes b { color: #fff; }
[data-theme="dark"] .pp-sizes svg { color: rgba(255, 255, 255, .5); }
[data-theme="dark"] .pp-sizes button[aria-pressed="true"] b { color: var(--fun-2); }
[data-theme="dark"] .pp-sizes button[aria-pressed="true"] svg { color: var(--fun-2); }
.pp-dogonly[hidden], .pp-catnote[hidden] { display: none; }
.pp-catnote { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--tint); font-size: 14px; color: var(--navy-2); }
[data-theme="dark"] .pp-catnote { color: #d4e6da; }
.profile .fun-go { width: 100%; margin-top: 16px; }
.pp-paws { height: 26px; margin: 14px -18px -18px; opacity: .3;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 26'%3E%3Cg fill='%23a5291b'%3E%3Cpath transform='translate(14 9) rotate(80) scale(.8)' d='M0 3.2C-2.7 3.2-5 5-5 7.2-5 9-3.2 9.6 0 9.6S5 9 5 7.2C5 5 2.7 3.2 0 3.2zM-6.4 2.2a1.9 2.4-18 1 0 .01 0zM6.4 2.2a1.9 2.4 18 1 0 .01 0zM-2.6-1.8a1.9 2.5-6 1 0 .01 0zM2.6-1.8a1.9 2.5 6 1 0 .01 0z'/%3E%3Cpath transform='translate(44 15) rotate(100) scale(.8)' d='M0 3.2C-2.7 3.2-5 5-5 7.2-5 9-3.2 9.6 0 9.6S5 9 5 7.2C5 5 2.7 3.2 0 3.2zM-6.4 2.2a1.9 2.4-18 1 0 .01 0zM6.4 2.2a1.9 2.4 18 1 0 .01 0zM-2.6-1.8a1.9 2.5-6 1 0 .01 0zM2.6-1.8a1.9 2.5 6 1 0 .01 0z'/%3E%3C/g%3E%3C/svg%3E") 0 50% / 60px 26px repeat-x; }
[data-fun-alt] .pp-paws { filter: hue-rotate(190deg) saturate(.8); }
[data-theme="dark"] .pp-paws { opacity: .22; filter: brightness(2.2); }
@media (min-width: 521px) { .pp-paws { margin: 14px -24px -24px; } }

/* ================= the stage: a collar and a bone-shaped tag ================= */
.pup-stage { padding-top: 18px !important; }
.collar { position: relative; width: 100%; max-width: 380px; height: 22px; margin: 4px auto 0; border-radius: 11px; background: var(--cl-band);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .25), inset 0 -2px 0 rgba(0, 0, 0, .2), 0 6px 10px -6px rgba(0, 0, 0, .4); }
.cl-stud { position: absolute; inset: 7px 16px; background: radial-gradient(circle, var(--cl-stud) 0 3px, transparent 3.6px) 0 50% / 28px 8px repeat-x; }
.cl-ring { position: absolute; left: 50%; top: 12px; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; border: 4px solid #c9ced6; box-shadow: 0 2px 3px rgba(0, 0, 0, .3), inset 0 1px 1px rgba(0, 0, 0, .3); }
.tag-wrap { position: relative; display: flex; justify-content: center; margin-top: 6px; }
.tag { position: relative; flex: 0 0 auto; width: min(260px, calc(100% - 84px)); padding: 16px 24px 14px; border-radius: 22px; background: var(--tag); color: var(--tag-ink);
  box-shadow: inset 0 0 0 2px var(--tag-edge); transform-origin: 50% -10px; }
.tag::before, .tag::after { content: ""; position: absolute; top: -12px; bottom: -12px; width: 52px; z-index: -1;
  background: radial-gradient(circle at 50% 26px, var(--tag) 24px, var(--tag-edge) 24.5px 26px, transparent 26.5px), radial-gradient(circle at 50% calc(100% - 26px), var(--tag) 24px, var(--tag-edge) 24.5px 26px, transparent 26.5px); }
.tag::before { left: -30px; } .tag::after { right: -30px; }
.tag-wrap { isolation: isolate; width: 100%; padding: 14px 0; }
/* an engraved line inside the tag */
.tag > p { position: relative; }
.tg-name { margin: 0; font: 750 15px/1.2 "Figtree", system-ui, sans-serif; color: var(--tag-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pup-stage .tag .big { margin: 0; font: 800 64px/1 var(--display, "Bricolage Grotesque"), system-ui, sans-serif; letter-spacing: -.03em; color: var(--tag-ink); font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .35), 0 -1px 0 rgba(0, 0, 0, .12); }
.tg-unit { margin: 2px 0 0; font: 800 12px/1 "Figtree", system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--tag-soft); }
[data-fun-alt] .pup-stage .tag .big { text-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
.tag.flip { animation: tagFlip .8s cubic-bezier(.3, 1.3, .5, 1); }
@keyframes tagFlip { 0% { transform: perspective(500px) rotateY(0); } 45% { transform: perspective(500px) rotateY(180deg) scale(.94); } 100% { transform: perspective(500px) rotateY(360deg); } }
.stage.landed .tag { animation: tagSwing 1s ease-out; }
@keyframes tagSwing { 20% { rotate: 6deg; } 45% { rotate: -4deg; } 70% { rotate: 2deg; } 100% { rotate: 0deg; } }
@media (prefers-reduced-motion: reduce) { .tag.flip, .stage.landed .tag { animation: none; } }
/* the buddy peeks out beside the tag */
.tag-wrap .result-mascot.fun-mascot { position: absolute !important; right: -12px; top: -40px; width: 100px !important; height: 70px !important; z-index: 2; filter: drop-shadow(0 6px 8px rgba(40, 30, 10, .25)); }
.pup-stage .res-sub { margin-top: 10px; font: 800 20px/1.2 var(--display, "Bricolage Grotesque"), system-ui, sans-serif; color: var(--fun-ink); }
[data-theme="dark"] .pup-stage .res-sub { color: var(--fun-2); }
.pup-stage .fine { max-width: 44ch; margin-left: auto; margin-right: auto; }
/* the life-stage trail */
.trail { position: relative; width: 100%; margin: 26px 0 0; padding-top: 26px; }
.tr-stops { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.tr-stops::before { content: ""; position: absolute; left: 8.33%; right: 8.33%; top: 6px; border-top: 2px dashed var(--fun-line); }
.tr-stops li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font: 700 11px/1.15 "Figtree", system-ui, sans-serif; color: var(--navy-2); text-align: center; }
.tr-stops i { width: 14px; height: 14px; border-radius: 50%; background: var(--p-paper); box-shadow: inset 0 0 0 2px var(--fun-line); transition: background-color .2s, box-shadow .2s; }
.tr-stops li.lit i { background: var(--fun-2); box-shadow: none; }
.tr-stops li.on i { background: var(--fun); box-shadow: 0 0 0 4px var(--fun-soft); }
.tr-stops li.on span { color: var(--fun-ink); font-weight: 800; }
[data-theme="dark"] .tr-stops li { color: #cfe0d4; }
[data-theme="dark"] .tr-stops li.on span { color: var(--fun-2); }
.tr-paw { position: absolute; top: 0; left: calc(8.33% + var(--x, 0%) * .8333); width: 22px; height: 22px; margin-left: -11px; fill: var(--fun-ink); rotate: 90deg; }
[data-theme="dark"] .tr-paw { fill: var(--fun-2); }
/* three ways to count, as bars */
.ways { width: 100%; margin-top: 18px; padding: 12px 14px; border-radius: 16px; background: var(--tint); text-align: left; }
.ways-t { margin: 0 0 8px; font: 800 12px/1 "Figtree", system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--fun-ink); }
[data-theme="dark"] .ways-t { color: var(--fun-2); }
.way { display: grid; grid-template-columns: 116px minmax(0, 1fr) 44px; align-items: center; gap: 10px; min-height: 34px; }
.way[hidden] { display: none; }
.wy-n { font: 700 13px/1.15 "Figtree", system-ui, sans-serif; color: var(--navy); }
.wy-n small { display: block; font-size: 11px; font-weight: 600; color: var(--navy-2); }
.wy-bar { position: relative; height: 12px; border-radius: 99px; background: color-mix(in srgb, var(--navy) 8%, transparent); overflow: hidden; }
.wy-bar i { position: absolute; inset: 0 auto 0 0; width: calc(var(--p, 0) * 1%); border-radius: 99px; background: color-mix(in srgb, var(--navy) 30%, transparent); transition: width .9s cubic-bezier(.3, 1.1, .4, 1); }
.way.main .wy-bar i { background-color: var(--go-b); background-image: linear-gradient(90deg, var(--go-a), var(--fun-2)); }
.way b { justify-self: end; font: 800 18px/1 var(--display, "Bricolage Grotesque"), system-ui, sans-serif; color: var(--navy); font-variant-numeric: tabular-nums; }
.way.main b { color: var(--fun-ink); }
#wayDna b { font-size: 18px; }
.stage.instant .wy-bar i { transition: none; }
[data-theme="dark"] .wy-n, [data-theme="dark"] .way b { color: #fff; }
[data-theme="dark"] .wy-n small { color: #cfe0d4; }
[data-theme="dark"] .wy-bar { background: rgba(255, 255, 255, .08); }
[data-theme="dark"] .wy-bar i { background: rgba(255, 255, 255, .3); }
[data-theme="dark"] .way.main b { color: var(--fun-2); }
.pup-stage .bonus { margin-top: 14px; }
.stage.playing .ways { opacity: .5; transition: opacity .25s; }
@media (prefers-reduced-motion: reduce) { .wy-bar i { transition: none; } }

/* ================= below the game: every birthday in human years ================= */
.bdays { display: grid; grid-auto-flow: column; grid-auto-columns: 96px; gap: 10px; margin: 16px 0 0; padding: 4px 2px 12px; list-style: none; overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.bd { scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; min-height: 118px; padding: 12px 6px; border: 0; border-radius: 18px;
  background: var(--glass); box-shadow: inset 0 0 0 1.5px var(--fun-line), 0 10px 24px -18px rgba(40, 30, 10, .55); color: var(--navy); cursor: pointer; transition: translate .2s, box-shadow .2s; }
.bd-a { font: 800 15px/1 "Figtree", system-ui, sans-serif; color: var(--navy-2); }
.bd-a small { display: block; margin-top: 2px; font-size: 10.5px; font-weight: 650; }
.bd b { font: 800 30px/1 var(--display, "Bricolage Grotesque"), system-ui, sans-serif; color: var(--fun-ink); }
.bd-s { margin-top: auto; padding: 3px 8px; border-radius: 99px; background: var(--tint-strong); font: 700 10.5px/1.1 "Figtree", system-ui, sans-serif; color: var(--navy-2); text-align: center; }
.bd.now { background: var(--fun-soft); box-shadow: inset 0 0 0 2px var(--fun), 0 12px 24px -16px rgba(120, 30, 10, .55); }
.bd.now .bd-s { background-color: var(--go-b); background-image: linear-gradient(180deg, var(--go-a), var(--go-b)); color: #fff; }
@media (hover: hover) { .bd:hover { translate: 0 -3px; box-shadow: inset 0 0 0 1.5px var(--fun), 0 16px 28px -18px rgba(40, 30, 10, .65); } }
.bd:active { translate: 0 1px; }
[data-theme="dark"] .bd { color: #fff; }
[data-theme="dark"] .bd-a, [data-theme="dark"] .bd-s { color: #d4e6da; }
[data-theme="dark"] .bd b { color: var(--fun-2); }
[data-theme="dark"] .bd.now .bd-s { color: #fff; }
.tbl-note { margin-top: 8px; font-size: 13.5px; color: var(--navy-2); }

/* ================= desktop: the profile on the left, the tag on the right ================= */
@media (min-width: 960px) {
  html[data-fun="pup"] .tool.calc-tool { grid-template-columns: minmax(0, .95fr) minmax(440px, 1.05fr); }
  .bdays { grid-auto-columns: 104px; }
}
@media (max-width: 520px) {
  .pup-stage .tag .big { font-size: 56px; }
  .tag { padding: 14px 26px 12px; }
  .tag-wrap .result-mascot.fun-mascot { right: -14px; top: -36px; width: 84px !important; height: 59px !important; }
  .way { grid-template-columns: 100px minmax(0, 1fr) 40px; gap: 8px; }
  .tr-stops li { font-size: 10.5px; }
  .pp-sizes button { min-height: 78px; }
}
@media (max-width: 380px) { .pp-sizes small { display: none; } .pp-sizes button { min-height: 64px; } }

/* ================= Pro: calm and flat ================= */
[data-look="pro"][data-fun="pup"] body { background: #f8fbf1; }
[data-look="pro"][data-fun="pup"] .sky { background: linear-gradient(180deg, #e6f3d6 0, #f8fbf1 300px) !important; }
[data-look="pro"][data-fun="pup"][data-theme="dark"] body { background: #0b1d15; }
[data-look="pro"][data-fun="pup"][data-theme="dark"] .sky { background: linear-gradient(180deg, #143022 0, #0b1d15 300px) !important; }

/* ================= footer and header pop-ups follow the theme ================= */
html[data-fun="pup"] .sitefoot { background: linear-gradient(180deg, #eef7e2, #d8ecc0); }
html[data-fun="pup"][data-fun-alt] .sitefoot { background: linear-gradient(180deg, #eef3fa, #d6e2f0); }
html[data-fun="pup"][data-theme="dark"] .sitefoot { background: linear-gradient(180deg, #143022, #08170f); color: #d4e6da; }
html[data-fun="pup"][data-fun-alt][data-theme="dark"] .sitefoot { background: linear-gradient(180deg, #33241a, #1a110b); color: #eadccd; }
html[data-fun="pup"][data-theme="dark"] .sitefoot li a, html[data-fun="pup"][data-theme="dark"] .sitefoot p { color: #d4e6da; }
html[data-fun="pup"][data-fun-alt][data-theme="dark"] .sitefoot li a, html[data-fun="pup"][data-fun-alt][data-theme="dark"] .sitefoot p { color: #eadccd; }
html[data-fun="pup"][data-theme="dark"] .sitefoot .base { border-color: rgba(210, 240, 220, .12); }
html[data-fun="pup"] { --pop: #fcfef8; --pop-seg: #eaf5dc; --pop-on: #fff; --pop-ink: #1c2614; --pop-soft: #566447; --pop-ring: rgba(224, 73, 58, .26); }
html[data-fun="pup"][data-fun-alt] { --pop: #f9fbfe; --pop-seg: #e4ecf6; --pop-on: #fff; --pop-ink: #141d2a; --pop-soft: #4d5b70; --pop-ring: rgba(208, 122, 28, .28); }
html[data-fun="pup"][data-theme="dark"] { --pop: #142e21; --pop-seg: rgba(255, 143, 126, .1); --pop-on: rgba(255, 255, 255, .94); --pop-ink: #eef6f0; --pop-soft: #b6cdbd; }
html[data-fun="pup"][data-fun-alt][data-theme="dark"] { --pop: #2c1f16; --pop-seg: rgba(242, 178, 92, .1); --pop-on: rgba(255, 255, 255, .94); --pop-ink: #f7efe6; --pop-soft: #d2bfab; }
html[data-fun="pup"] .hd-pop { box-shadow: 0 30px 60px -26px rgba(30, 40, 20, .5), 0 0 0 1px var(--fun-line); }
html[data-fun="pup"][data-theme="dark"] .mega-cat small { background: rgba(255, 255, 255, .12); color: #fff; }
html[data-fun="pup"][data-theme="dark"] .hd-btn[aria-expanded="true"] { background: rgba(255, 143, 126, .2); }
html[data-fun="pup"][data-fun-alt][data-theme="dark"] .hd-btn[aria-expanded="true"] { background: rgba(242, 178, 92, .2); }
@media (hover: hover) { html[data-fun="pup"][data-theme="dark"] .hd-btn:hover { background: rgba(255, 143, 126, .14); } html[data-fun="pup"][data-fun-alt][data-theme="dark"] .hd-btn:hover { background: rgba(242, 178, 92, .14); } }
html[data-fun="pup"][data-theme="dark"] .hd-seg button[aria-pressed="true"] { color: #10161d; }

/* the hero's coloured word: collar red by day; Cosy: mustard-brown; warmer at night */
html[data-fun="pup"]:not([data-theme="dark"]) .hero h1 em { color: var(--fun-ink); text-shadow: 0 2px 12px rgba(255, 255, 255, .6); }
html[data-fun="pup"][data-theme="dark"] .hero h1 em { color: var(--fun-2); }
html[data-fun="pup"] .under path { stroke: var(--p-grass); }
html[data-fun="pup"][data-fun-alt] .under path { stroke: #e3a21a; }
html[data-fun="pup"][data-theme="dark"] .under path { stroke: #f0c64f; }
html[data-fun="pup"][data-fun-alt][data-theme="dark"] .under path { stroke: #7fa8e0; }
