/* Petcoraw Club — layout and movement. Colours, fonts and buttons come from ../styles.css. */
html, body.club { height: 100%; }
body.club { background: var(--lime-mist); }
[hidden] { display: none !important; }
.club-app { min-height: 100dvh; display: flex; flex-direction: column; background: #fff; }      /* phone: one column, as wide as the screen */
.side-head { display: none; }

/* the room: a wall, a floor and things placed in percentages, so it scales with the screen */
.room { touch-action: pan-y; position: relative; aspect-ratio: 10 / 9.4; max-height: 62dvh; width: 100%; overflow: hidden; background: #FDF6E3; }
/* the room is SPAN screens wide: the world slides behind the screen (app.js moves it to follow the pup); things are positioned in percent of
   ONE screen, so their left and width are divided by --span */
.world { --span: 3; position: absolute; top: 0; left: 0; height: 100%; width: calc(var(--span) * 100%); will-change: transform; }
.pan { position: absolute; top: 40%; z-index: 105; width: 38px; height: 64px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, 0.78); color: var(--navy); font: 700 2rem/1 var(--display); box-shadow: var(--shadow-soft); padding: 0 0 6px; }
.pan.l { left: 6px; } .pan.r { right: 6px; }
.in-scene .pan { display: none; }
.wall { position: absolute; inset: 0 0 34% 0; background-color: #FBF0D0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='%23A1B810' fill-opacity='0.16'%3E%3Cellipse cx='17' cy='24' rx='6.5' ry='8.5' transform='rotate(-18 17 24)'/%3E%3Cellipse cx='27.5' cy='13' rx='6.5' ry='8.5' transform='rotate(-6 27.5 13)'/%3E%3Cellipse cx='40.5' cy='13' rx='6.5' ry='8.5' transform='rotate(6 40.5 13)'/%3E%3Cellipse cx='51' cy='24' rx='6.5' ry='8.5' transform='rotate(18 51 24)'/%3E%3Cpath d='M34 30c9.5 0 18 9.3 18 17.4 0 6.6-5 9.8-10 8.8-3.6-.7-5.3-2.6-8-2.6s-4.4 1.9-8 2.6c-5 1-10-2.2-10-8.8C16 39.3 24.5 30 34 30z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 54px; border-bottom: 10px solid #fff; box-shadow: 0 3px 0 #D9D2C3; }
.floor { position: absolute; inset: 66% 0 0 0; background: linear-gradient(90deg, #E9C48F 0 98%, #D9B078 98% 100%); background-size: calc(100% / (5 * var(--span))) 100%; }
.floor::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(120, 80, 30, 0.16), transparent 30%); }
.things > svg { position: absolute; height: auto; overflow: visible; }

.walker { position: absolute; left: 50%; bottom: 5%; width: calc(36% * var(--k, 1) * var(--z, 1) / var(--span)); transform: translateX(-50%); transition: left 2.4s, bottom 2.4s, width 2.4s; transition-timing-function: cubic-bezier(0.3, 0, 0.55, 1); }   /* --z: smaller further back */
.pup { display: block; width: 100%; height: auto; overflow: visible; }
.pup-head, .pup-body, .pup-tail, .pup-eyes, .pup-ear, .pup-arm-l, .pup-arm-r, .pup-foot-l, .pup-foot-r { transform-box: fill-box; }   /* only the moving groups: placed groups keep their own transforms */
.pup-head { transform-origin: 50% 90%; animation: nod 3.6s ease-in-out infinite; }
.pup-body { transform-origin: 50% 100%; animation: breathe 3.6s ease-in-out infinite; }
.pup-tail { transform-origin: 0% 90%; animation: wag 0.7s ease-in-out infinite alternate; }
.pup-eyes { transform-origin: 50% 50%; animation: blink 4.2s infinite; }
.pup-ear { transform-origin: 80% 20%; animation: ear 5s ease-in-out infinite; }
/* Walking = a waddle. One cycle (--gait) is two steps: the left foot swings, then the right. The whole pup bounces once per step
   (gait), rocks towards the foot that stands (sway) and leans into its direction (--lean, set by app.js); the head follows a
   moment later, the ears flap, the arms swing against the feet. Bounce, rock and breathing sit on separate groups, because two
   animations on one element do not add up. Sizes are in the pup's own drawing units, so it looks the same at every size. */
.pup-gait, .pup-sway, .pup-shadow { transform-origin: 100px 250px; }        /* the ground between the feet */
.walker.walking { --lean: 3deg; }
.walking .pup-gait { animation: gait var(--gait, 0.56s) infinite; }
.walking .pup-sway { animation: sway var(--gait, 0.56s) ease-in-out infinite; }
.walking .pup-shadow { animation: shade var(--gait, 0.56s) ease-in-out infinite; }
.walking .pup-body { animation: none; }
/* sleeping: the pup lies on its side (the whole drawing turned a quarter), a little smaller so it fits a bed */
.walker .pup { transition: transform 0.5s ease-out; }
.walker.lying .pup { transform: translate(7%, 20%) rotate(-90deg) scale(0.66); transform-origin: 50% 56%; }
.walker.lying .pup-tail { animation-duration: 2.4s; }
.walking .pup-head { animation: headbob var(--gait, 0.56s) ease-in-out infinite; }
.walking .pup-ear { animation: flap calc(var(--gait, 0.56s) / 4) ease-in-out infinite alternate; }
.walking .pup-tail { animation-duration: 0.26s; }
.walking .pup-foot-l { animation: footL var(--gait, 0.56s) ease-in-out infinite; }
.walking .pup-foot-r { animation: footR var(--gait, 0.56s) ease-in-out infinite; }
.walking .pup-arm-l, .walking .pup-arm-r { transform-origin: 50% 10%; animation: swing var(--gait, 0.56s) ease-in-out infinite; }   /* both the same way, against the rocking body: they hang and swing */
.landed .pup-gait { animation: land 0.34s ease-out; }                       /* stopping: a small squash, then it settles */
.talking .pup-head { animation: yap 0.22s ease-in-out infinite alternate; }
@keyframes gait { 0%, 50%, 100% { transform: translateY(0) scale(1.05, 0.94); animation-timing-function: ease-out; } 25%, 75% { transform: translateY(-12px) scale(0.97, 1.04); animation-timing-function: ease-in; } }
@keyframes sway { 0%, 50%, 100% { transform: rotate(var(--lean, 0deg)); } 25% { transform: rotate(calc(var(--lean, 0deg) + 5deg)); } 75% { transform: rotate(calc(var(--lean, 0deg) - 5deg)); } }
@keyframes shade { 0%, 50%, 100% { transform: scale(1); } 25%, 75% { transform: scale(0.8); } }
@keyframes headbob { 0%, 100% { transform: translateY(1px) rotate(1.5deg); } 8%, 58% { transform: translateY(4px); } 33% { transform: translateY(-3px) rotate(-3deg); } 83% { transform: translateY(-3px) rotate(3deg); } }
@keyframes flap { from { transform: rotate(-5deg); } to { transform: rotate(4deg); } }
@keyframes footL { 0%, 100% { transform: translate(-5px, 0); } 25% { transform: translate(0, -15px); } 50% { transform: translate(5px, 0); } 75% { transform: translate(0, 9px); } }   /* swings in the first half; stands (while the body is up) in the second */
@keyframes footR { 0%, 100% { transform: translate(5px, 0); } 25% { transform: translate(0, 9px); } 50% { transform: translate(-5px, 0); } 75% { transform: translate(0, -15px); } }
@keyframes land { 0% { transform: scale(1.08, 0.9); } 55% { transform: scale(0.97, 1.04); } 100% { transform: scale(1); } }
@keyframes yap { to { transform: rotate(-3deg) translateY(-3px); } }
@keyframes nod { 50% { transform: rotate(2.2deg) translateY(1px); } }
@keyframes breathe { 50% { transform: scaleY(1.012); } }
@keyframes wag { from { transform: rotate(-9deg); } to { transform: rotate(14deg); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(0.1); } }
@keyframes ear { 50% { transform: rotate(-3deg); } }
@keyframes swing { 0%, 50%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-15deg); } 75% { transform: rotate(15deg); } }

.walker { z-index: 94; touch-action: pan-y; cursor: pointer; }
.walker.hop .flip { animation: hop 0.45s ease-out 2; }
.walker.eating .pup-head { animation: munch 0.3s ease-in-out infinite alternate; }
@keyframes hop { 50% { transform: translateY(-14%); } }
.flip.left { transform: scaleX(-1); }
.walker.hop .flip.left { animation-name: hopL; }
@keyframes hopL { 0%, 100% { transform: scaleX(-1); } 50% { transform: scaleX(-1) translateY(-14%); } }
@keyframes munch { from { transform: rotate(4deg) translateY(4px); } to { transform: rotate(9deg) translateY(9px); } }
.thing { position: absolute; width: calc(var(--pw) * var(--ki, var(--k, 1)) / var(--span)); }      /* --ki: furniture scale (on a laptop larger than the pup's scale --k, so the wide room is not left empty) */      /* --pw = the item's width in the room, --k = the room's scale */
.thing svg { display: block; width: 100%; height: auto; overflow: visible; }
.deco-on .thing { cursor: grab; touch-action: none; outline: 2px dashed rgba(14, 59, 106, 0.35); outline-offset: 3px; border-radius: 8px; }
.deco-on .thing.drag { cursor: grabbing; outline-color: var(--lime-deep); z-index: 200 !important; }
.deco-on .walker { opacity: 0.35; pointer-events: none; }
.rm { position: absolute; top: -10px; right: -10px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--danger); color: #fff; font: 700 0.85rem var(--body); box-shadow: var(--shadow-soft); }

.say { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); width: max-content; max-width: 230px; background: #fff; color: var(--navy-ink); font: 600 0.84rem/1.3 var(--body); padding: 8px 12px; border-radius: 14px; box-shadow: var(--shadow-soft); text-align: center; z-index: 5; }
.fx { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.fx i { position: absolute; font-style: normal; animation: rise 1.2s ease-out forwards; }
.fx .plus { font: 700 1.15rem var(--display); color: var(--navy); background: var(--gold); padding: 2px 9px; border-radius: 999px; left: 34% !important; top: 0 !important; }
.fx .bubble { width: 18px; height: 18px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); box-shadow: inset -3px -3px 0 rgba(140, 200, 240, 0.7); }
.fx .heart, .fx .spark { font-size: 1.3rem; }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(0.6); } 20% { opacity: 1; } to { opacity: 0; transform: translateY(-46px) scale(1.1); } }
.ball { position: absolute; bottom: 8%; width: calc(6% * var(--k, 1) / var(--span)); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #2A5C96, var(--navy)); box-shadow: inset 0 0 0 3px var(--lime); z-index: 95; transform: translateX(-50%); transition: left linear; }
.ball.fly { animation: arc ease-out; }
@keyframes arc { 50% { transform: translate(-50%, -330%); } }
.poop { position: absolute; bottom: 9%; width: calc(9% * var(--k, 1) / var(--span)); aspect-ratio: 1; border: 0; background: none; padding: 0; z-index: 96; transform: translateX(-50%); font-size: 0; }
.poop::before { content: "💩"; font-size: clamp(22px, 7vw, 34px); }
.night { position: absolute; inset: 0; background: rgba(10, 34, 64, 0.55); z-index: 97; display: grid; place-items: start center; padding-top: 22%; pointer-events: none; }
.night span { color: #fff; font: 600 2rem var(--display); animation: nod 2.4s ease-in-out infinite; }

.hud { position: absolute; inset: 10px 10px auto; display: flex; align-items: center; gap: 7px; z-index: 110; }
.chip { border: 0; background: #fff; color: var(--navy); font: 700 0.84rem var(--display); padding: 7px 12px; border-radius: 999px; box-shadow: var(--shadow-soft); white-space: nowrap; }
.chip.gear { font-size: 1.35rem; line-height: 1; padding: 5px 9px; }
.chip.grow { flex: 1; min-width: 0; text-align: center; overflow: hidden; text-overflow: ellipsis; position: relative; padding-bottom: 10px; }
.coin { color: var(--gold); font-style: normal; }
.xp { position: absolute; left: 14px; right: 14px; bottom: 4px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.xp i { display: block; height: 100%; background: var(--lime); border-radius: 4px; transition: width 0.5s var(--ease-out); }
.hint { position: absolute; left: 10px; right: 10px; top: 54px; z-index: 120; background: #fff; border-radius: 16px; box-shadow: var(--shadow-soft); padding: 9px 12px; display: flex; align-items: center; gap: 10px; font: 700 0.86rem var(--body); color: var(--navy); }
.hint > span { flex: 1; }
.hint .bar { flex: 1; }
.bar { display: block; height: 8px; border-radius: 999px; background: rgba(14, 59, 106, 0.12); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--lime); transition: width 0.4s var(--ease-out); }

.needs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px 14px 4px; font: 700 0.7rem var(--body); color: var(--navy); }
.need { display: grid; gap: 4px; }
.need.low .bar i { background: var(--danger); }
.need.low span { color: var(--danger); }
.actions, .menu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 8px 14px; }
.menu { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
.actions button, .menu button { position: relative; border: 0; border-radius: 18px; padding: 10px 4px; display: grid; justify-items: center; gap: 2px; font: 700 0.76rem var(--body); color: var(--navy-ink); transition: transform 0.2s var(--ease-bounce); }
.actions button { background: var(--lime); box-shadow: 0 4px 0 var(--lime-deep); }
.menu button { background: var(--lime-mist); box-shadow: 0 4px 0 var(--lime-soft); }
.actions button:active, .menu button:active { transform: translateY(3px); box-shadow: none; }
.actions b, .menu b { font-size: 1.45rem; line-height: 1.1; }
.dot { position: absolute; top: 7px; right: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px #fff; }
.deco { padding: 12px 16px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 10px; }
.bag { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; }
.bag button { flex: none; width: 74px; height: 74px; border: 2px solid var(--line); border-radius: 14px; background: #fff; padding: 8px; display: grid; place-items: center; }
.bag svg { width: 100%; height: 100%; }

.sheet-back { position: fixed; inset: 0; background: rgba(10, 34, 64, 0.4); z-index: 300; }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(520px, 100%); max-height: 82dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; z-index: 310; background: #fff; border-radius: 26px 26px 0 0; padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; box-shadow: 0 -14px 40px -18px rgba(11, 44, 82, 0.5); animation: up 0.3s var(--ease-out); }
.sheet > * { flex-shrink: 0; }
@keyframes up { from { transform: translate(-50%, 30px); opacity: 0; } }
.sheet h1 { font-size: 2.3rem; } .sheet h2 { font-size: 1.45rem; line-height: 1.15; padding-right: 36px; }
.sheet .btn { width: 100%; justify-content: center; text-align: center; }
.btn.small { width: auto; padding: 9px 14px; font-size: 0.86rem; box-shadow: 0 3px 0 var(--lime-deep); }
.x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--lime-mist); color: var(--navy); font: 700 1rem var(--body); }
.row2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; }
.row2.even { grid-template-columns: 1fr 1fr; } .row2.even .btn { font-size: 0.86rem; padding: 12px 10px; }
.clubid { font: 600 1rem var(--body); color: var(--navy-ink); background: var(--lime-mist); border-radius: 12px; padding: 10px 14px; } .clubid b { font: 700 1.25rem var(--display); color: var(--navy); letter-spacing: 0.06em; margin-left: 6px; }
.have { font: 700 0.86rem var(--body); color: var(--navy); } .have summary { cursor: pointer; padding: 6px 0; } .have[open] { display: grid; gap: 10px; }
#gbtn:empty { display: none; }
.fine { font-size: 0.9rem; color: var(--muted); } .fine a { color: var(--navy); font-weight: 700; }
.big { font: 600 1.9rem var(--display); color: var(--navy); }
.field { display: grid; gap: 6px; font: 700 0.8rem var(--body); color: var(--navy); }
.field input:not(.range) { border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 11px 14px; font: 600 1rem var(--body); }
.sheet .range { background: linear-gradient(90deg, var(--lime) var(--fill, 20%), var(--lime-soft) var(--fill, 20%)); margin: 8px 0 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips button { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 13px; font: 700 0.84rem var(--body); color: var(--navy); }
.chips.filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 10px 0 4px; }
.chips.filter button { flex: 0 0 auto; white-space: nowrap; }
.chips button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.mixrow { display: flex; justify-content: space-between; font: 600 0.92rem var(--body); color: var(--muted); } .mixrow b { color: var(--navy); }
.learn { background: var(--lime-mist); border-left: 5px solid var(--lime); border-radius: 12px; padding: 10px 14px; font: 600 0.92rem/1.4 var(--body); color: var(--navy-ink); }
.cards { display: grid; gap: 8px; }
.card { background: var(--navy); color: #fff; border-radius: var(--radius-sm); padding: 12px 16px; }
.card small { display: block; color: var(--gold); font: 800 0.7rem var(--body); letter-spacing: 0.12em; text-transform: uppercase; }
.card b { font: 600 1.05rem var(--display); }
.tabs { display: flex; flex-wrap: nowrap; box-shadow: none; gap: 6px; background: var(--lime-mist); border-radius: 999px; padding: 4px; overflow-x: auto; scrollbar-width: none; }   /* many tabs: swipe sideways */
.tabs button { flex: 1 0 auto; white-space: nowrap; padding-left: 14px !important; padding-right: 14px !important; border: 0; background: transparent; border-radius: 999px; padding: 9px 6px; font: 700 0.88rem var(--body); color: var(--navy); }
.tabs button.on { background: var(--navy); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.item { border: 2px solid var(--line); border-radius: 18px; padding: 10px; display: grid; gap: 5px; justify-items: center; text-align: center; font: 700 0.84rem var(--body); color: var(--navy); }
.item.on { border-color: var(--lime); background: var(--lime-mist); }
.item .th { display: block; font: 600 0.72rem var(--body); color: var(--muted); margin-top: -4px; }
.swatch { width: 100%; height: 100%; border-radius: 12px; border: 2px solid var(--line); }
.looks { display: flex; gap: 8px; flex-wrap: wrap; }
.looks button { width: 58px; height: 58px; padding: 3px; border: 3px solid var(--line); border-radius: 14px; background: #fff; font: 700 0.7rem var(--body); color: var(--navy); }
.looks button.on { border-color: var(--lime); box-shadow: 0 0 0 3px var(--lime-soft); }
.looks .swatch { border: 0; border-radius: 9px; }
.looks .swatch, .pic .swatch { background-size: 100% auto !important; }      /* in a small box show the whole tile, not a corner of it */
.pic { width: 100%; height: 104px; display: grid; place-items: center; }
.pic svg { width: 100%; height: 100%; overflow: hidden; }   /* the drawing is fitted inside the box, whatever its shape */
.pic.wear .pup { width: 100%; height: 104px; animation: none; overflow: visible; }
.pic.wear .pup * { animation: none !important; }
.brand { font: 800 0.6rem var(--body); letter-spacing: 0.1em; padding: 2px 8px; border-radius: 999px; }
.brand.lazy { background: #17171A; color: #FF5FA2; } .brand.petco { background: var(--navy); color: var(--lime); }
.buy { width: 100%; border: 0; border-radius: 999px; padding: 8px 6px; background: var(--gold); color: var(--navy-ink); font: 700 0.86rem var(--display); }
.buy .coin { color: var(--navy); } .buy:disabled { background: var(--lime-mist); color: var(--muted); }
.meter { display: flex; align-items: center; gap: 8px; font: 700 0.78rem var(--body); color: var(--navy); }
.meter .bar { flex: 1; height: 12px; background: linear-gradient(90deg, #D8B48A, #C9C36A); }
.benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font: 600 0.88rem var(--body); color: var(--muted); }
.benefits .got { color: var(--navy-ink); }
/* the website's own .toast (styles.css) is invisible until it gets a "show" class and sits at the bottom: undo both here */
.toast { position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top)); bottom: auto; opacity: 1; transition: none; width: max-content; white-space: normal; overflow: visible; transform: translateX(-50%); z-index: 400; background: var(--navy); color: #fff; font: 700 0.9rem var(--body); padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow); max-width: 90%; text-align: center; }
.party .room::after { content: "🎉"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 5rem; z-index: 130; animation: rise 2s ease-out forwards; }
/* the town and the places: one drawing that fills the room; the home layers are hidden meanwhile */
#scene { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; touch-action: none; cursor: pointer; z-index: 50; }
.in-scene .world { display: none; }
.scene-pup { width: 200px; height: 260px; overflow: visible; }
.puff { transform-box: fill-box; transform-origin: center; pointer-events: none; animation: puff 0.5s ease-out forwards; }     /* dust behind a step */
@keyframes puff { from { opacity: 0.6; transform: scale(0.4); } to { opacity: 0; transform: translateY(-9px) scale(1.7); } }
.say.bubble { left: 0; top: 0; bottom: auto; transform: translate(-50%, -100%); z-index: 96; cursor: pointer; box-shadow: 0 3px 0 rgba(14, 59, 106, 0.16); animation: pop 0.16s ease-out; }   /* a line of a chat, placed over the dog that says it */
.say.bubble b { display: block; font-size: 0.72em; letter-spacing: 0.06em; text-transform: uppercase; color: var(--lime-deep, #7A8C0A); }
.say.bubble::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -7px; border: 7px solid transparent; border-top-color: #fff; border-bottom: 0; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -92%) scale(0.85); } }
.hop > .scene-jump { animation: hopS 0.45s ease-out 2; }
.jump > .scene-jump { animation: jumpS 0.45s ease-out; }                    /* over a bar of the agility course (AIR in app.js) */
@keyframes hopS { 50% { transform: translateY(-34px); } }
@keyframes jumpS { 45% { transform: translateY(-150px) rotate(8deg); } }
.float { pointer-events: none; animation: floatS 1s ease-out forwards; }
@keyframes floatS { from { opacity: 0; transform: translateY(14px); } 20% { opacity: 1; } to { opacity: 0; transform: translateY(-70px); } }
/* the Kitchen's scale, and the Shelter's badges */
.scale { position: relative; height: 34px; border-radius: 999px; background: var(--lime-soft); margin: 16px 0 8px; }
.scale .zone { position: absolute; top: 0; bottom: 0; background: var(--lime); border-radius: 8px; }
.scale .needle { position: absolute; top: -7px; bottom: -7px; left: 0; width: 8px; margin-left: -4px; border-radius: 4px; background: var(--navy); }
.badges { display: flex; gap: 8px; margin: 12px 0; }
.badge { flex: 1; text-align: center; border: 2px solid var(--line); border-radius: 16px; padding: 10px 4px; opacity: 0.45; filter: grayscale(1); }
.badge.got { opacity: 1; filter: none; border-color: var(--lime); background: var(--lime-mist); }
.badge b { display: block; font-size: 1.7rem; } .badge span { display: block; font: 700 0.8rem var(--body); color: var(--navy); } .badge small { color: var(--muted); }
.spot { cursor: pointer; }
.rooms { display: flex; gap: 6px; padding: 10px 14px 0; overflow-x: auto; scrollbar-width: none; }
.rooms button { flex: 0 0 auto; min-width: 40px; height: 36px; padding: 0 12px; border: 2px solid var(--line); border-radius: 999px; background: #fff; font: 700 0.9rem var(--body); color: var(--navy); }
.rooms button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.rooms button.lock { border-style: dashed; }
.rooms button:disabled { opacity: 0.45; }
.where { font-size: 1.15rem; padding: 10px 14px 0; }
.menu button.off { opacity: 0.55; }
.brand.deal { background: var(--danger); color: #fff; } .buy s { opacity: 0.6; font-weight: 500; }

@media (max-width: 899px) { .room.in-scene { aspect-ratio: auto; height: 78dvh; max-height: none; } }      /* the town and the places fill most of a phone screen */

/* a laptop or desktop browser: the room fills the screen, with the bars and buttons in a panel on the right */
@media (min-width: 900px) and (min-height: 520px) {
  body.club { overflow: hidden; }
  body.club { --panel: clamp(360px, 30vw, 470px); }
  .club-app { display: grid; grid-template-columns: minmax(0, 1fr) var(--panel); height: 100dvh; min-height: 0; background: #fff; }
  .room { --k: 0.62; --ki: 0.8; height: 100dvh; max-height: none; aspect-ratio: auto; max-width: 175dvh; justify-self: center; }   /* a wide room: things are drawn smaller, so there is more room around them */
  .panel { display: flex; flex-direction: column; justify-content: center; padding: 20px 28px; overflow-y: auto; }
  .panel > * { padding-left: 0; padding-right: 0; }
  .where { font-size: 1.5rem; padding-bottom: 6px; }
  .side-head { display: grid; gap: 4px; padding-bottom: 14px; }
  .side-head h1 { font-size: 2.2rem; } .side-head p { color: var(--muted); font-size: 0.95rem; }
  .needs { font-size: 0.8rem; padding-top: 8px; padding-bottom: 12px; }
  .actions button, .menu button { padding: 16px 4px; font-size: 0.86rem; } .actions b, .menu b { font-size: 1.8rem; }
  .menu { padding-bottom: 8px; }
  .hud { inset: 16px 18px auto; } .chip { font-size: 1rem; padding: 9px 16px; } .chip.gear { font-size: 1.6rem; padding: 6px 11px; }
  .hint { left: 18px; right: 18px; top: 70px; max-width: 560px; margin: 0 auto; font-size: 1rem; }
  .say { font-size: 1.05rem; max-width: 320px; padding: 11px 16px; }
  .sheet { left: auto; right: 0; top: 0; bottom: 0; transform: none; width: var(--panel, 420px); max-height: none; border-radius: 26px 0 0 26px; padding: 30px 26px; animation: side 0.3s var(--ease-out); box-shadow: -14px 0 40px -18px rgba(11, 44, 82, 0.5); }
  .sheet-back { background: rgba(10, 34, 64, 0.18); }
  @keyframes side { from { transform: translateX(40px); opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) { .pup g, .pup-shadow, .puff, .walker, .sheet, .fx i { animation: none !important; transition: none !important; } }

/* the first-time tutorial: a dimmed screen with a bright window around what is being explained, and a card */
.tour-back { position: fixed; inset: 0; z-index: 500; }
.tour-ring { position: fixed; z-index: 501; border-radius: 18px; pointer-events: none; box-shadow: 0 0 0 9999px rgba(10, 34, 64, 0.62), 0 0 0 3px #fff; transition: left 0.25s, top 0.25s, width 0.25s, height 0.25s; }
.tour-card { position: fixed; z-index: 502; width: min(340px, calc(100% - 28px)); background: #fff; color: var(--navy); border-radius: 20px; padding: 14px 16px 16px; box-shadow: var(--shadow); display: grid; gap: 10px; font: 600 0.95rem/1.4 var(--body); }
.tour-card small { color: var(--muted); font-weight: 700; } .tour-card .row2 { display: flex; gap: 8px; justify-content: space-between; align-items: center; }

/* first week missions */
.mission-btn { margin: 0 18px 10px; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--lime, #A1B810); background: #fff; color: var(--navy); font: 800 0.95rem var(--body); display: flex; justify-content: space-between; align-items: center; gap: 8px; width: calc(100% - 36px); cursor: pointer; }
.mission-btn .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--danger, #E4572E); }
.missions { display: grid; gap: 8px; margin: 10px 0; }
.mission { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: #F6F8EA; }
.mission.done { background: #EAF3C4; } .mission.claimed { opacity: 0.55; }
.mission b { font-size: 0.98rem; } .mission small { grid-column: 1; color: var(--muted); font-weight: 600; line-height: 1.35; }
.mission .btn { grid-column: 2; grid-row: 1 / span 2; padding: 8px 12px; font-size: 0.85rem; white-space: nowrap; }
.mission .tag { grid-column: 2; grid-row: 1 / span 2; font-weight: 800; font-size: 0.85rem; color: var(--navy); white-space: nowrap; }
@media (min-width: 900px) and (min-height: 520px) { .mission-btn { margin: 0 0 10px; width: 100%; } }

/* Grooming Salon and Vet Clinic mini-games */
.bubarea { position: relative; height: 250px; margin: 10px 0; border-radius: 18px; background: linear-gradient(#E6F6F1, #CFE8FA); overflow: hidden; touch-action: manipulation; }
.bub { position: absolute; width: 66px; height: 66px; padding: 0; border-radius: 50%; border: 3px solid #fff; background: radial-gradient(circle at 30% 28%, #fff 0 14%, #BFE0F4 40%, #8FC8EE); box-shadow: 0 4px 10px rgba(47, 127, 184, 0.3); cursor: pointer; animation: bubUp var(--life, 1.2s) linear forwards; }
.bub.popped { animation: none; transform: scale(1.5); opacity: 0; transition: transform 0.15s, opacity 0.15s; }
@keyframes bubUp { from { transform: translateY(14px) scale(0.8); } to { transform: translateY(-34px) scale(1.05); } }
.heart { position: relative; width: 190px; height: 190px; margin: 10px auto; display: grid; place-items: center; font-size: 3rem; }
.heart .target { position: absolute; width: 76px; height: 76px; border-radius: 50%; border: 4px solid var(--navy); }
.heart .ring { position: absolute; width: 76px; height: 76px; border-radius: 50%; border: 4px solid #F08A8A; opacity: 0; transform: scale(2.3); }

/* PET.CO Kitchen: real products, basket, checkout, links */
.grp { margin: 14px 0 6px; font: 700 1.05rem var(--display, var(--body)); color: var(--navy); }
.prods { display: grid; gap: 8px; }
.prod { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 14px; background: #F6F8EA; }
.prod img { width: 64px; height: 64px; object-fit: contain; border-radius: 10px; background: #fff; }
.pinfo { display: grid; gap: 3px; min-width: 0; } .pinfo b { font-size: 0.95rem; } .pinfo small { color: var(--muted); font-weight: 600; }
.pinfo .chips button { padding: 4px 9px; font-size: 0.78rem; }
.pr s { color: var(--muted); font-size: 0.8rem; } .pr em { font-style: normal; font-weight: 800; color: var(--navy); }
.prod .btn { padding: 8px 14px; font-size: 0.85rem; }
.basket-btn { width: 100%; margin: 8px 0; }
.lines { display: grid; gap: 8px; margin: 10px 0; }
.line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: #F6F8EA; font-weight: 700; }
.line small { display: block; color: var(--muted); font-weight: 600; }
.qty { display: flex; align-items: center; gap: 8px; } .qty button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--navy); background: #fff; font-size: 1.2rem; font-weight: 800; color: var(--navy); cursor: pointer; }
.sum { display: flex; justify-content: space-between; padding: 6px 4px; font-weight: 700; } .sum.web { font-size: 1.1rem; color: var(--navy); border-top: 2px dashed #D9D2C3; }
.oform { display: grid; gap: 10px; margin: 8px 0; } .oform label { display: grid; gap: 4px; font-weight: 700; font-size: 0.9rem; }
.oform input[type=text], .oform input:not([type]), .oform input[inputmode=tel] { padding: 11px 12px; border-radius: 12px; border: 2px solid #D9D2C3; font: 600 1rem var(--body); }
.deliv { display: grid; gap: 6px; } .deliv label { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 2px solid #D9D2C3; border-radius: 12px; cursor: pointer; } .deliv label.on { border-color: var(--lime, #A1B810); background: #F3F8D8; }
.deliv small { display: block; color: var(--muted); font-weight: 600; }
.err { color: var(--danger, #E4572E); font-weight: 700; min-height: 1.2em; }
.link-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 8px 0; text-decoration: none; text-align: center; } .link-btn small { font-weight: 600; opacity: 0.8; }

#platChips { margin: 4px 0 8px; }

/* optional email tick box */
.optin { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 2px; font-weight: 700; font-size: 0.92rem; cursor: pointer; }
.optin input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--lime-d, #8EA60C); flex: none; }
.mkt { display: grid; gap: 6px; margin: 8px 0; }
.plat { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 4px; } .plat img { display: block; height: 18px; width: auto; } .plat b { font-family: var(--display); font-size: 1rem; }

/* friends */
.frow { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 14px; background: #F6F8EA; margin: 6px 0; }
.frow b { display: block; } .frow small { color: var(--muted); font-weight: 600; }
.fpup { width: 52px; height: 52px; display: block; overflow: hidden; border-radius: 12px; background: #fff; } .fpup svg { width: 100%; height: 100%; }
.fbtns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; } .fbtns .btn { padding: 7px 11px; font-size: 0.82rem; }
.addrow { display: flex; gap: 8px; } .addrow input { flex: 1; min-width: 0; padding: 11px 12px; border-radius: 12px; border: 2px solid #D9D2C3; font: 700 1rem var(--body); text-transform: uppercase; } .addrow .btn { white-space: nowrap; width: auto; flex: none; padding: 11px 16px; } .addrow input { flex: 1 1 120px; }
.fbtns .btn { width: auto; }
/* the Pasar: string lights twinkle and bunting flutters (places.js PASAR) */
.pz-tw { animation: pzTw 2.6s ease-in-out infinite; }
.pz-fl { transform-box: fill-box; transform-origin: 50% 0; animation: pzFl 3s ease-in-out infinite; }
@keyframes pzTw { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes pzFl { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .pz-tw, .pz-fl { animation: none; } }
/* the live Pasar: the four emotes (no free text) */
.emotes { position: absolute; right: 10px; top: 114px; z-index: 100; display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: rgba(255,255,255,0.92); box-shadow: 0 4px 14px rgba(10,34,64,0.18); }
.emotes button { border: 0; background: var(--lime-mist); border-radius: 999px; width: 42px; height: 42px; font-size: 1.4rem; line-height: 1; transition: transform 0.15s var(--ease-bounce); }
.emotes button:active { transform: scale(0.88); } .emotes.cool { opacity: 0.55; pointer-events: none; }
[data-peer] { cursor: pointer; }
.chatbar { position: absolute; left: 10px; right: 10px; top: 62px; z-index: 100; display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: rgba(255,255,255,0.92); box-shadow: 0 4px 14px rgba(10,34,64,0.18); }
.chatbar input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 12px; font: 600 1rem var(--body); color: var(--navy); outline: none; }
.chatbar button { border: 0; background: var(--lime-mist); border-radius: 999px; width: 40px; height: 40px; font-size: 1.15rem; line-height: 1; }
/* the Boxing Arena: the fight screen (app.js openFight) and the scoreboard for those watching */
.fight { position: fixed; inset: 0; z-index: 250; display: grid; grid-template-rows: auto 1fr auto; background: #141C38; color: #fff; touch-action: none; user-select: none; -webkit-user-select: none; }
.fhud { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; padding: calc(10px + env(safe-area-inset-top)) 12px 6px; }
.fside { display: grid; gap: 4px; font: 700 0.95rem var(--body); } .fside.fr { text-align: right; }
.fside i { display: block; height: 10px; border-radius: 6px; background: rgba(255,255,255,0.15); overflow: hidden; } .fside i.st { height: 6px; }
.fside .hp span { display: block; height: 100%; background: linear-gradient(90deg, #E4572E, #EDA100); transition: width 0.15s; } .fside .st span { display: block; height: 100%; background: #2FA58A; }
.fside.fr i span { margin-left: auto; } .fside small { min-height: 1em; font-size: 0.8rem; }
.fclock { text-align: center; font: 700 1rem var(--body); display: grid; } .fclock span { font-size: 1.4rem; color: var(--lime, #A1B810); }
.fring { width: 100%; height: 100%; display: block; }
.fp.hit .fbody { filter: brightness(1.6) saturate(0.4); }
.fmsg { position: absolute; left: 0; right: 0; top: 34%; text-align: center; font: 700 3.4rem var(--display, var(--body)); color: #E5C228; text-shadow: 0 4px 0 #0A1226; pointer-events: none; opacity: 0; transition: opacity 0.15s; } .fmsg.on { opacity: 1; }
.fpad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 10px 12px calc(14px + env(safe-area-inset-bottom)); background: #0E1530; }
.fpad button { border: 0; border-radius: 16px; padding: 16px 4px; font: 700 1rem var(--body); color: #fff; background: var(--c, #33407A); box-shadow: 0 4px 0 rgba(0,0,0,0.35); }
.fpad button.hold.on { background: #2FA58A; }
.fpad #fGuard, .fpad #fSlip { grid-column: span 2; background: #33407A; } .fpad #fQuit { background: #4B5B8A; }
.fpad.off { opacity: 0.55; pointer-events: none; }  /* (no transitions, no movement: the pad never jumps) */
.fup { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); border: 0; border-radius: 999px; padding: 24px 40px; font: 700 1.6rem var(--body); background: #E5C228; color: #0A1226; box-shadow: 0 6px 0 #B8901A; }
.fup:active { transform: translate(-50%, 4px); box-shadow: none; }
.watch { position: absolute; left: 10px; right: 10px; top: 176px; z-index: 100; display: grid; grid-template-columns: auto 1fr auto 1fr auto; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 16px; background: rgba(10,18,38,0.85); color: #fff; font: 700 0.85rem var(--body); }
.watch i { display: block; height: 8px; border-radius: 5px; background: rgba(255,255,255,0.2); overflow: hidden; } .watch i span { display: block; height: 100%; background: #E4572E; }
.fpad button { touch-action: manipulation; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }
.fpad button.hit { filter: brightness(1.3); }
.fpad button.hold { touch-action: none; }   /* a held Guard / Slip never turns into a scroll or a zoom */
.fup:disabled { opacity: 0.6; box-shadow: none; }
.fside .st span.low { background: #E4572E; animation: fLow 0.6s ease-in-out infinite alternate; }   /* tired: slower, softer punches */
@keyframes fLow { from { opacity: 1; } to { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .fside .st span.low { animation: none; } }

/* "New version" / "restarting soon" bar (club/update.js): a small pill at the bottom, above everything, never in the way of the game */
.updbar { position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 500; display: flex; align-items: center; gap: 10px; max-width: min(520px, calc(100% - 24px)); padding: 9px 10px 9px 14px; border-radius: 999px; background: #0B2A4A; color: #fff; font: 600 13px/1.3 inherit; box-shadow: 0 6px 20px rgba(10, 34, 64, 0.35); }
.updbar[hidden] { display: none; }
.updbar button { flex: none; border: 0; border-radius: 999px; padding: 7px 14px; background: var(--lime, #B7F34A); color: #0B2A4A; font: 700 13px inherit; cursor: pointer; }
.updbar button[hidden] { display: none; }
/* maintenance (club/update.js): a full-screen message above everything while the server is being updated */
.maint { position: fixed; inset: 0; z-index: 600; display: grid; place-items: center; padding: 24px; background: rgba(10, 34, 64, 0.94); color: #fff; text-align: center; }
.maint[hidden] { display: none; }
.maint > div { max-width: 360px; }
.maint h2 { margin: 0 0 10px; font-size: 24px; }
.maint p { margin: 0 0 18px; font-size: 16px; line-height: 1.45; }
.maint button { border: 0; border-radius: 999px; padding: 12px 26px; background: var(--lime, #B7F34A); color: #0B2A4A; font: 700 16px inherit; cursor: pointer; }
.maint button[hidden] { display: none; }
/* "Guest · not saved" in the top bar (app.js renderHud): small, warm, a tap opens the sign-in */
.chip.guest { position: absolute; left: 0; top: calc(100% + 6px); padding: 4px 10px; background: #FFE9C7; color: #8A4B00; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; }      /* its own small line under the coins: the top bar keeps its room for the pup's name */
.chip.guest[hidden] { display: none; }
.guestnote { margin-top: 10px; }
