/* ---------- home: house + live sky ---------- */
.yard { position: relative; width: 100%; min-height: 280px; overflow: hidden; border-radius: 28px; container-type: size; touch-action: pan-y; cursor: grab;
  background: linear-gradient(var(--top, #8fd0f2), var(--bot, #e3f5f6) 82%); box-shadow: var(--shadow); border: 3px solid var(--surface); }
.yard.scrub { cursor: grabbing; }
.yard .stars { position: absolute; inset: 0; opacity: var(--starsA, 0); pointer-events: none; }
.yard .stars i { position: absolute; width: var(--s); height: var(--s); background: #fff8d0; animation: twinkle 3s ease-in-out infinite;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
@keyframes twinkle { 50% { opacity: .35; transform: scale(.7); } }
.yard .body { position: absolute; width: clamp(54px, 18cqw, 92px); aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; }
.yard .body[hidden] { display: none; }
.yard .body svg { width: 100%; height: 100%; }
.yard .sun { filter: drop-shadow(0 0 14px color-mix(in srgb, currentColor 70%, transparent)) drop-shadow(0 0 40px color-mix(in srgb, currentColor 45%, transparent)); }
.yard .moon { width: clamp(46px, 15cqw, 76px); filter: drop-shadow(0 0 16px rgba(255, 244, 207, .5)); }
.yard .cloud { position: absolute; left: 0; transform: translateX(-130%); animation: drift linear infinite; pointer-events: none; opacity: .92; filter: drop-shadow(0 4px 6px rgba(70, 100, 150, .12)); }
.yard .cloud svg { width: 100%; height: auto; }
@keyframes drift { from { transform: translateX(-130%); } to { transform: translateX(calc(100cqw * 3.4)); } }
.yard .hill { position: absolute; left: -8%; right: -8%; bottom: 0; height: 17%; background: var(--ground, #9fd18b); border-radius: 50% 50% 0 0 / 38% 38% 0 0; }
.yard .homebox { position: absolute; left: 50%; bottom: 7%; width: min(92cqw, 92cqh); transform: translateX(-50%); }
.yard .bld { width: 100%; height: auto; }
.yard .glow { fill: #ffd95a; opacity: calc(var(--win, 0) * .55); }
.yard .smoke circle { fill: #fff; opacity: 0; animation: puff 5s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.yard .smoke circle:nth-child(2) { animation-delay: 1.7s; } .yard .smoke circle:nth-child(3) { animation-delay: 3.4s; }
@keyframes puff { 0% { opacity: .0; transform: translate(0, 0) scale(.5); } 15% { opacity: .75; } 100% { opacity: 0; transform: translate(26px, -70px) scale(1.7); } }
.yard .team { position: absolute; left: 0; right: 0; bottom: -3%; display: flex; justify-content: center; align-items: flex-end; gap: 1%; filter: brightness(var(--dim, 1)); }
.yard .pal { flex: none; width: 24%; aspect-ratio: 1; padding: 0; position: relative; -webkit-user-drag: none; }
.yard .pal.p1 { width: 29%; }
.yard .pal .m { display: block; width: 100%; height: 100%; animation: bob 3.2s ease-in-out infinite; transform-origin: 50% 90%; }
.yard .char { width: 100%; height: 100%; }
.yard button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; touch-action: manipulation; }
@keyframes bob { 50% { transform: translateY(-4%); } }
.yard .pal { transform-origin: 50% 90%; }
.yard .pal.mv-hop { animation: mv-hop .6s cubic-bezier(.3, 1.4, .5, 1); }
.yard .pal.mv-wiggle { animation: mv-wiggle .7s ease-in-out; }
.yard .pal.mv-squish { animation: mv-squish .65s ease-out; }
.yard .pal.mv-flip { animation: mv-flip .8s ease-in-out; }
.yard .pal.mv-shake { animation: mv-shake .5s linear; }
.yard .pal.mv-dance { animation: mv-dance .8s ease-in-out; }
.yard .pal.mv-stretch { animation: mv-stretch .7s ease-out; }
.yard .pal.mv-float { animation: mv-float .9s ease-in-out; }
@keyframes mv-hop { 0% { transform: scale(1.12, .84); } 35% { transform: translateY(-30%) scale(.92, 1.1); } 70% { transform: translateY(0) scale(1.1, .88); } 100% { transform: none; } }
@keyframes mv-wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 40% { transform: rotate(12deg); } 60% { transform: rotate(-9deg); } 80% { transform: rotate(6deg); } }
@keyframes mv-squish { 0% { transform: scale(1); } 25% { transform: scale(1.25, .7); } 55% { transform: scale(.85, 1.2); } 80% { transform: scale(1.08, .95); } 100% { transform: scale(1); } }
@keyframes mv-flip { 0% { transform: perspective(400px) rotateY(0); } 50% { transform: perspective(400px) rotateY(180deg) translateY(-10%); } 100% { transform: perspective(400px) rotateY(360deg); } }
@keyframes mv-shake { 0%, 100% { transform: translateX(0); } 15% { transform: translateX(-9%); } 35% { transform: translateX(8%); } 55% { transform: translateX(-6%); } 75% { transform: translateX(4%); } }
@keyframes mv-dance { 0%, 100% { transform: none; } 20% { transform: translate(-7%, -12%); } 40% { transform: translate(0, 0); } 60% { transform: translate(7%, -12%); } 80% { transform: translate(0, 0); } }
@keyframes mv-stretch { 0% { transform: none; } 30% { transform: scale(.88, 1.28); } 60% { transform: scale(1.08, .9); } 100% { transform: none; } }
@keyframes mv-float { 0% { transform: none; } 40% { transform: translateY(-26%) rotate(-8deg); } 70% { transform: translateY(-20%) rotate(8deg); } 100% { transform: none; } }
.yard .spark { position: absolute; z-index: 3; pointer-events: none; font-size: 18px; color: #ffd54a; text-shadow: 0 1px 0 rgba(0, 0, 0, .15); animation: spark .85s ease-out forwards; }
@keyframes spark { from { opacity: 1; transform: translate(0, 0) scale(.6); } to { opacity: 0; transform: translate(var(--dx), -54px) scale(1.2); } }
.yard .clock { position: absolute; left: 12px; top: 12px; display: flex; align-items: baseline; gap: 8px; background: rgba(20, 27, 61, .55); color: #fff; border-radius: 999px; padding: 4px 14px; backdrop-filter: blur(4px); pointer-events: none; }
.yard .clock .t { font: 900 18px "Nunito"; font-variant-numeric: tabular-nums; } .yard .clock .per { font: 600 14px "Mali"; opacity: .9; }
.yard .chip-btn { position: absolute; right: 12px; top: 12px; min-height: 40px; background: #fff; color: #c4571f; font: 700 14px "Mali"; border-radius: 999px; padding: 0 14px; box-shadow: 0 2px 0 rgba(0, 0, 0, .15); white-space: nowrap; }
.yard .chip-btn[hidden] { display: none; }
.yard .hint { position: absolute; left: 50%; top: 38%; transform: translateX(-50%); white-space: nowrap; background: rgba(255, 255, 255, .85); color: #34406b; font: 700 14px "Mali"; border-radius: 999px; padding: 3px 14px; opacity: 0; transition: opacity .6s; pointer-events: none; }
.yard .hint.on { opacity: 1; animation: nudge 2s ease-in-out infinite; }
@keyframes nudge { 50% { translate: 8px 0; } }
.yard .npc { position: absolute; z-index: 4; background: #1f2547; color: #fff; border: 3px solid #aab8ef; border-radius: 16px; padding: 22px 14px 12px; box-shadow: 0 5px 0 rgba(10, 15, 40, .35); cursor: pointer; }
.yard .npc[hidden] { display: none; }
.yard .npc .nm { position: absolute; top: -16px; left: 14px; background: var(--tag); color: #3a2a00; font: 800 14px/28px "Mali"; padding: 0 12px; border-radius: 9px; }
.yard .npc p { margin: 0; font: 600 17px/1.6 "Mali"; }
.yard .npc .tail { position: absolute; bottom: -10px; left: calc(var(--tail) - 8px); width: 14px; height: 14px; background: #1f2547; border-right: 3px solid #aab8ef; border-bottom: 3px solid #aab8ef; transform: rotate(45deg); }
@media (max-width: 480px) { .yard .hint { font-size: 13px; } }
