/* Shared by every example site. On phones each one opens as a normal page,
   with a bar that stays at the top so there is always a clear way back. */
.backbar{display:none}
@media(max-width:820px){
  html:not(.framed){--back:48px;scroll-padding-top:48px}
  html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
  a,button,summary,label,select{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
  html:not(.framed) .backbar{position:sticky;top:0;z-index:60;display:flex;justify-content:space-between;height:48px;background:#006b4f;font:700 16px/1 system-ui,sans-serif;letter-spacing:0;text-transform:none}
  .backbar a{display:flex;align-items:center;gap:8px;padding:0 16px;color:#fff;text-decoration:none}
  .backbar a:last-child{color:#ffd95c}
  .backbar a:active{background:#004d3a}
  .backbar svg{flex:none}
  .backbar :focus-visible{outline:3px solid #f2c230;outline-offset:-4px}
}

/* Finger mode for the lawn and dog. The picture ignores touches until it is switched on. */
.play{display:none}
.phone .play{display:block}
.phone .toy{pointer-events:none}
.phone.playing,.phone.playing body{overflow:hidden;overscroll-behavior:none}
.phone.playing .toy{pointer-events:auto;touch-action:none!important}
.phone.playing .hush{opacity:0;visibility:hidden}
.hush{transition:opacity .25s}
.hud{position:fixed;inset:auto 0 0;z-index:70;display:grid;grid-template-columns:1fr auto;gap:10px 16px;align-items:center;padding:14px 16px calc(14px + env(safe-area-inset-bottom,0px));background:#102f2a;color:#fff;font:700 17px/1.25 system-ui,sans-serif;letter-spacing:0;-webkit-user-select:none;user-select:none}
.hud[hidden]{display:none}
.hud p{margin:0;font:inherit}
.hud .track{grid-column:1;height:10px;border-radius:9px;background:#3c5a54;overflow:hidden}
.hud .track i{display:block;height:100%;background:#ffd95c;transform:scaleX(0);transform-origin:0 50%;transition:transform .2s}
.hud button{grid-column:2;grid-row:1/3;min-width:92px;min-height:52px;border:0;border-radius:8px;background:#ffd95c;color:#102f2a;font:800 17px/1 system-ui,sans-serif}
.hud button:focus-visible{outline:3px solid #fff;outline-offset:2px}
