.home-screen { width: min(960px,100%); margin: 0 auto; padding: 34px 24px 28px; text-align: center; }
.home-eyebrow { font-size: 11px; font-weight: 650; letter-spacing: 1.7px; color: var(--muted); margin: 0 0 12px; }
.home-intro h1 { font-size: clamp(44px,7vw,70px); letter-spacing: -2.5px; line-height: 1.04; margin: 0 0 18px; }
.home-intro h1 br { display: none; }
.home-description { color: var(--muted); font-size: 17px; line-height: 1.55; margin: 0; }
.home-description br { display: none; }
.sheep-meadow { width: min(700px,100%); margin: -14px auto 0; }
.sheep-stage { position: relative; aspect-ratio: 700/360; }
.sheep-scene { display: block; width: 100%; height: auto; stroke: none; }
.sheep-touch { position: absolute; min-width: 44px; min-height: 44px; padding: 0; background: transparent; border: 0; border-radius: 45%; touch-action: manipulation; }
.sheep-touch-grazer { left: 10%; top: 46%; width: 23%; height: 35%; }
.sheep-touch-grandma { left: 34%; top: 41%; width: 27%; height: 40%; }
.sheep-touch-lamb { left: 64%; top: 52%; width: 21%; height: 29%; }
.sheep-stage .sheep-touch:not(:disabled):active { transform: none; }
.sheep-touch:focus-visible { outline: 2px solid #9b7849; outline-offset: 2px; }
.sheep-caption { min-height: 1.65em; font-family: Georgia,serif; font-size: 16px; font-style: italic; color: var(--muted); margin: -8px 0 0; }
.flock-motion { background: transparent; color: var(--muted); min-height: 44px; padding: 8px 14px; margin-bottom: 10px; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; border-radius: 8px; }
.flock-motion:disabled { opacity: 1; text-decoration: none; }
.home-play { width: min(420px,100%); margin: 0 auto; }
.home-tempo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.home-tempo button { background: transparent; border: 1px solid var(--line); border-radius: 12px; padding: 12px 8px; min-height: 70px; }
.home-tempo button[aria-pressed="true"] { background: #e5eadb; border-color: #8b9d80; box-shadow: inset 0 0 0 1px #8b9d80; }
.home-tempo strong { display: block; font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.home-tempo span { display: block; font-size: 12px; color: var(--muted); line-height: 1.4; }
.home-play>.primary-button { width: 100%; min-height: 56px; font-size: 17px; }
#home-new { min-height: 44px; }
.home-best { font-size: 13px; color: var(--muted); margin: 16px 0 0; }
.home-best strong { color: var(--ink); padding: 0 4px; font-weight: 600; font-variant-numeric: tabular-nums; }
.home-resume-note { font-size: 15px; color: var(--muted); margin: 0 0 14px; }
body[data-view="home"] footer { justify-content: center; border: 0; padding-top: 10px; font-size: 12px; }
body[data-view="home"] footer>span:first-child { display: none; }
body[data-view="home"] .brand-sub { display: none; }
@media(min-width:800px) and (max-height:900px) {
  .home-screen { display: grid; grid-template-columns: 1fr 360px; column-gap: 44px; align-items: center; padding-top: 40px; }
  .home-intro { grid-column: 1; grid-row: 1; text-align: left; padding-top: 10px; }
  .home-intro h1 br, .home-description br { display: initial; }
  .home-intro h1 { font-size: 65px; }
  .sheep-meadow { grid-column: 1; grid-row: 2; margin-top: -14px; }
  .sheep-caption { margin-top: -5px; font-size: 14px; }
  .home-play { grid-column: 2; grid-row: 1/3; padding: 28px 24px; background: #fffdf680; border: 1px solid var(--line); border-radius: 20px; }
  .home-tempo { gap: 8px; }
}
@media(max-width:600px) {
  .home-screen { padding: 24px 20px 22px; }
  .home-eyebrow { font-size: 10px; letter-spacing: 1.3px; }
  .home-intro h1 { font-size: 48px; margin-bottom: 14px; }
  .home-intro h1 br, .home-description br { display: initial; }
  .home-description { font-size: 16px; }
  .sheep-meadow { margin-top: 0; }
  .sheep-caption { font-size: 14px; margin-top: -3px; margin-bottom: 0; }
  .home-tempo button { min-height: 68px; }
  .home-tempo span { font-size: 12px; }
  body[data-view="home"] footer { padding-bottom: max(18px,env(safe-area-inset-bottom)); }
}
@media(max-width:600px) and (max-height:720px) {
  .home-screen { padding-top: 18px; }
  .home-intro h1 { font-size: 42px; }
  .home-description { font-size: 15px; }
  .home-eyebrow { margin-bottom: 9px; }
  .sheep-meadow { width: min(320px,100%); margin-top: -8px; }
  .sheep-caption { margin-bottom: 0; }
}

/* Each sheep keeps its own pace. Response wrappers are separate from idle movement. */
.sheep-scene .sheep-grazer-head { transform-origin: 179px 237px; animation: sheep-nibble 11.3s ease-in-out -2s infinite; }
.sheep-scene .sheep-grazer-chew { transform-origin: 205px 270px; animation: sheep-chew 4.7s ease-in-out -.8s infinite; }
.sheep-scene .sheep-grandma-breathe { transform-origin: 326px 269px; animation: sheep-breathe 6.4s ease-in-out infinite; }
.sheep-scene .sheep-grandma-look { transform-origin: 370px 245px; animation: sheep-look 13.7s ease-in-out -1.2s infinite; }
.sheep-scene .sheep-grandma-gaze { animation: sheep-gaze 13.7s ease-in-out -1.2s infinite; }
.sheep-scene .sheep-grandma-blink { transform-origin: 370px 222px; animation: sheep-blink 7.9s ease-in-out -3.1s infinite; }
.sheep-scene .sheep-grandma-tail { transform-origin: 268px 220px; animation: sheep-tail 10.9s ease-in-out -.5s infinite; }
.sheep-scene .sheep-lamb-bounce { animation: sheep-little-hop 16.1s ease-in-out -1s infinite; }
.sheep-scene .sheep-lamb-head { transform-origin: 545px 252px; animation: sheep-curious 12.3s ease-in-out -4s infinite; }
.sheep-scene .sheep-lamb-blink { transform-origin: 545px 237px; animation: sheep-blink 9.7s ease-in-out -.6s infinite; }
.sheep-scene .sheep-flower { transform-origin: 605px 296px; animation: sheep-sway 7s ease-in-out infinite; }
.sheep-scene .sheep-grazer-response { transform-origin: 179px 237px; }
.sheep-scene .sheep-grandma-response { transform-origin: 370px 245px; }
.sheep-scene[data-reaction="grazer"] .sheep-grazer-response { animation: sheep-hello-grazer .9s ease-in-out; }
.sheep-scene[data-reaction="grandma"] .sheep-grandma-response { animation: sheep-hello-grandma .9s ease-in-out; }
.sheep-scene[data-reaction="lamb"] .sheep-lamb-response { animation: sheep-hello-lamb .9s ease-in-out; }
@keyframes sheep-nibble { 0%,20%,53%,100% { transform: rotate(0); } 27%,43% { transform: rotate(4deg); } 35% { transform: rotate(1deg); } }
@keyframes sheep-chew { 0%,8%,24%,40%,100% { transform: translateY(0); } 16%,32% { transform: translateY(1.7px) rotate(2deg); } }
@keyframes sheep-breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.012,1.018); } }
@keyframes sheep-look { 0%,28%,66%,100% { transform: rotate(0); } 38%,53% { transform: rotate(-3deg); } }
@keyframes sheep-gaze { 0%,25%,69%,100% { transform: translateX(0); } 35%,57% { transform: translateX(-1.7px); } }
@keyframes sheep-blink { 0%,43%,46%,100% { transform: scaleY(1); } 44.5% { transform: scaleY(.08); } }
@keyframes sheep-tail { 0%,65%,82%,100% { transform: rotate(0); } 70%,78% { transform: rotate(12deg); } 74% { transform: rotate(-5deg); } }
@keyframes sheep-little-hop { 0%,61%,67%,100% { transform: translateY(0); } 63% { transform: translateY(-8px); } 65.5% { transform: translateY(1px); } }
@keyframes sheep-curious { 0%,14%,56%,100% { transform: rotate(-3deg); } 27%,42% { transform: rotate(5deg); } }
@keyframes sheep-sway { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes sheep-hello-grazer { 0%,100% { transform: rotate(0); } 38%,62% { transform: rotate(-11deg); } }
@keyframes sheep-hello-grandma { 0%,100% { transform: rotate(0); } 30% { transform: rotate(5deg); } 65% { transform: rotate(-3deg); } }
@keyframes sheep-hello-lamb { 0%,100% { transform: translateY(0); } 22% { transform: translateY(1px); } 48% { transform: translateY(-12px); } 77% { transform: translateY(1px); } }
.sheep-scene[data-motion="off"] * { animation: none !important; }
body[data-view="game"] .sheep-scene * { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) { .sheep-scene * { animation: none !important; } }
