:root{font-family:ui-rounded,"Arial Rounded MT Bold",system-ui,sans-serif;color:#553c24;background:#dce8c7;--top:env(safe-area-inset-top,0px)}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body,#farm{width:100%;height:100%;margin:0;overflow:hidden;overscroll-behavior:none}
body{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#farm{position:fixed;inset:0;touch-action:none}
#farm canvas{display:block}
button,a{touch-action:manipulation}
button{font:inherit;cursor:pointer}
header{position:fixed;top:calc(var(--top) + 14px);left:16px;right:16px;display:flex;align-items:center;justify-content:space-between;gap:12px;pointer-events:none;z-index:4}
header>*{pointer-events:auto}
.circle{width:60px;height:60px;flex:none;padding:14px;background:#fffdf6;border:2px solid #ead6b0;border-radius:50%;box-shadow:0 3px 0 #61472d25;color:#553c24;display:grid;place-items:center;text-decoration:none}
.circle svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.title{background:#fffdf6ed;padding:8px 16px;border-radius:18px;text-align:center;font-weight:850;font-size:20px;box-shadow:0 2px 0 #61472d18}
.title span{display:block;font-size:11px;font-weight:650;letter-spacing:.04em;margin-top:1px}
.mute{padding:0;border:0;background:none;box-shadow:none;display:flex;align-items:center;justify-content:center}
.mute svg{width:84px;height:84px;flex:none;fill:initial;stroke:initial;stroke-width:initial}
.mute .slash{display:none}.mute.off .slash{display:inline}.mute.off .waves{display:none}
#notice{position:fixed;top:calc(var(--top) + 91px);left:50%;transform:translateX(-50%);max-width:calc(100% - 32px);background:#fffdf6ed;border-radius:16px;padding:10px 16px;text-align:center;font-size:13px;z-index:3}
#notice[hidden],#actions[hidden]{display:none}
#farm[data-graphics]:not([data-graphics="ready"]){pointer-events:none}
#farm[data-graphics]:not([data-graphics="ready"]):not([data-retained-canvas])::after{content:"";position:absolute;inset:0;background:#f3ead7;z-index:1}
#welcome{position:fixed;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;pointer-events:none;padding:110px 24px;text-align:center;background:#f3ead7}
#welcome img{width:min(192px,42vw);height:auto;border-radius:50%}
#welcome h1{font-size:clamp(24px,5vw,34px);margin:0;line-height:1.2}
#farm[data-graphics="ready"]~#welcome,#farm[data-graphics="failed"]~#welcome,#farm[data-retained-canvas]~#welcome{display:none}
#actions{position:fixed;inset:0;pointer-events:none;z-index:3}
/* The action wheel: a ring of warm sectors around the chosen animal, one per action, each with an icon in the
   same ink-and-sunshine style. The ring is drawn; the buttons sit in the middle of their sectors. */
#actions .ring{position:absolute;inset:0;width:100%;height:100%;overflow:visible;filter:drop-shadow(0 4px 8px #0004)}
#actions .spin{transform-box:view-box}
/* Each lit sector is a tile with its own little sky: Feed is day, Story is night. Empty sectors are grey. */
#actions .ring path{pointer-events:auto;cursor:pointer;stroke:#fff6dc;stroke-width:3.5;stroke-linejoin:round;transition:filter .15s}
#actions .ring path[data-for="photos"]{fill:url(#sector-day)}
#actions .ring path[data-for="story"]{fill:url(#sector-night)}
#actions .ring path.pressed{filter:brightness(1.15)}
#actions .ring path.empty{fill:#d8d4cb;stroke:#f3efe6;opacity:.75;pointer-events:none;cursor:default}
#actions .ring .star{fill:#fff3c4;pointer-events:none;transform-box:fill-box;transform-origin:center;animation:twinkle 2.2s ease-in-out infinite}
#actions .ring .star:nth-of-type(2n){animation-delay:1.1s}
#actions button{position:absolute;transform:translate(-50%,-50%);pointer-events:auto;width:72px;height:72px;padding:0;border:0;
  background:none;border-radius:50%;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
#actions button[hidden]{display:none}
/* The app's icon set (Phosphor, icons.js) on the tiles: ink on the day tile, warm gold on the night tile. */
#actions .icon .glyph{fill:#4a2706}
#actions .story .icon .glyph{fill:#ffd23f}
#actions .icon{display:block;width:46px;height:46px;margin:auto;overflow:visible;pointer-events:none;filter:drop-shadow(0 2px 2px #0003)}
/* Opening: the ring spins out from the animal; the icons pop in after it and then keep a gentle life. */
#actions.open .spin{animation:ring-open .45s cubic-bezier(.25,1.5,.5,1) both}
#actions.open button{animation:wheel-pop .4s cubic-bezier(.3,1.7,.5,1) .12s both}
#actions.open .story{animation-delay:.2s}
/* While the wheel is open every icon breathes gently, and one detail lives: the sun glows, the moon twinkles. */
#actions.open .move{animation:icon-breathe 2.8s ease-in-out .6s infinite}
#actions.open .story .move{animation-delay:2s}
@keyframes ring-open{from{transform:scale(.2) rotate(-50deg);opacity:0}to{transform:none;opacity:1}}
@keyframes wheel-pop{from{transform:translate(-50%,-50%) scale(0);opacity:0}to{transform:translate(-50%,-50%) scale(1);opacity:1}}
@keyframes twinkle{0%,100%{transform:scale(.85)}50%{transform:scale(1.12)}}
@keyframes icon-page{0%,70%,100%{transform:scaleX(1)}82%{transform:scaleX(.82)}}
@keyframes icon-breathe{0%,100%{transform:scale(1) rotate(0)}50%{transform:scale(1.06) rotate(-2deg)}}
@media (prefers-reduced-motion:reduce){#actions.open .spin,#actions.open button,#actions.open .move,#actions .ring .star{animation:none}}
button:focus-visible,a:focus-visible{outline:3px solid #3d83b1;outline-offset:3px}
button:active{filter:brightness(.96)}
