/* Fair Dinkum motion kit — shared by the games and homepage.
   All motion is switched off for visitors who prefer reduced motion. */

.fd-fx-layer{position:fixed;inset:0;pointer-events:none;z-index:9999;overflow:hidden}
.fd-particle{position:absolute;left:0;top:0;width:9px;height:9px;border-radius:2px;will-change:transform,opacity}

/* Toast, e.g. "One away!" */
.fd-toast{position:fixed;left:50%;top:11%;transform:translate(-50%,0);background:#123F27;color:#fff;
  font:700 .95rem 'DM Sans',sans-serif;padding:10px 20px;border-radius:999px;
  box-shadow:0 6px 20px rgba(0,0,0,.22);z-index:10000;pointer-events:none;opacity:0;max-width:90vw;text-align:center}
.fd-toast.show{animation:fdToast 1.6s ease both}
@keyframes fdToast{
  0%{opacity:0;transform:translate(-50%,10px) scale(.95)}
  12%{opacity:1;transform:translate(-50%,0) scale(1)}
  80%{opacity:1;transform:translate(-50%,0)}
  100%{opacity:0;transform:translate(-50%,-8px)}
}

/* Rolling number (odometer style) */
.fd-roll{display:inline-block;overflow:hidden;vertical-align:bottom;height:1.3em;line-height:1.3em}
.fd-roll>span{display:block}
.fd-roll>span>span{display:block;height:1.3em}

/* Tick that draws itself inside a green circle */
.fd-check{width:64px;height:64px;margin:0 auto 8px}
.fd-check svg{width:100%;height:100%;display:block}
.fd-check circle{fill:#1A5C38;transform-origin:center;animation:fdCheckCircle .45s cubic-bezier(.2,.9,.3,1.3) both}
.fd-check path{fill:none;stroke:#fff;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;
  stroke-dasharray:48;stroke-dashoffset:48;animation:fdCheckDraw .4s .35s ease-out forwards}
.fd-check.static circle,.fd-check.static path{animation:none}
.fd-check.static path{stroke-dashoffset:0}
@keyframes fdCheckCircle{from{transform:scale(0)}to{transform:scale(1)}}
@keyframes fdCheckDraw{to{stroke-dashoffset:0}}

/* Homepage game tiles (classes added by FDMotion.initTiles) */
.fd-tile{position:relative;transition:transform .15s,box-shadow .15s;-webkit-tap-highlight-color:transparent;
  animation:fdTileIn .5s cubic-bezier(.2,.8,.3,1) backwards;animation-delay:calc(var(--i,0) * 55ms)}
@keyframes fdTileIn{from{opacity:0;transform:translateY(14px) scale(.97)}to{opacity:1;transform:none}}
.fd-tile:active{transform:scale(.97)}
.fd-tile .game-card__arrow{transition:transform .2s}
.fd-tile:hover .game-card__arrow{transform:translateX(5px)}
.fd-tile:hover .game-card__emoji{animation:fdWiggle .55s}
@keyframes fdWiggle{0%,100%{transform:rotate(0)}25%{transform:rotate(-14deg) scale(1.12)}60%{transform:rotate(10deg) scale(1.12)}}
.fd-tile__done{position:absolute;top:-8px;right:-6px;width:26px;height:26px;border-radius:50%;background:#D4A017;
  border:2px solid #fff;box-shadow:0 2px 6px rgba(0,0,0,.25);display:flex;align-items:center;justify-content:center;
  animation:fdBadgePop .5s cubic-bezier(.3,.7,.4,1.6) backwards;animation-delay:calc(var(--i,0) * 55ms + 400ms)}
.fd-tile__done svg{width:14px;height:14px}
.fd-tile__done path{fill:none;stroke:#123F27;stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round;
  stroke-dasharray:24;stroke-dashoffset:24;animation:fdCheckDraw .4s ease-out forwards;animation-delay:calc(var(--i,0) * 55ms + 650ms)}
.sr-only-fd{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@keyframes fdBadgePop{from{transform:scale(0)}to{transform:scale(1)}}

/* Circle that grows from the tap point, then the next page opens outwards from the same point */
.fd-expand{position:fixed;inset:0;z-index:10001;background:linear-gradient(135deg,#1A5C38,#123F27);color:#fff;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}
.fd-expand__emoji{font-size:3.2rem;line-height:1;animation:fdTileIn .4s .18s cubic-bezier(.3,.7,.4,1.4) backwards}
.fd-expand__title{font-family:'Righteous',cursive;font-size:1.4rem;animation:fdTileIn .4s .24s ease-out backwards}
html.fd-arriving{animation:fdArriveBg .8s linear}
html.fd-arriving body{animation:fdArriveBody .6s cubic-bezier(.3,.8,.3,1) backwards}
@keyframes fdArriveBg{0%,99%{background-color:#123F27}100%{background-color:transparent}}
@keyframes fdArriveBody{
  from{clip-path:circle(0px at var(--fd-x,50%) var(--fd-y,40%))}
  to{clip-path:circle(var(--fd-r,1600px) at var(--fd-x,50%) var(--fd-y,40%))}
}

@media (prefers-reduced-motion: reduce){
  .fd-fx-layer{display:none}
  .fd-toast.show{animation:none;opacity:1}
  .fd-check circle{animation:none !important}
  .fd-check path{animation:none !important;stroke-dashoffset:0 !important}
  .fd-tile,.fd-tile:hover .game-card__emoji,.fd-tile__done{animation:none !important}
  .fd-tile__done path{animation:none !important;stroke-dashoffset:0 !important}
  html.fd-arriving,html.fd-arriving body{animation:none !important}
}

/* sound on/off button */
.fd-sound-btn{position:fixed;right:10px;bottom:10px;z-index:60;width:40px;height:40px;opacity:.93;border-radius:50%;border:2px solid #d4a017;background:#1a5c38;color:#fff;font-size:1.1rem;line-height:1;cursor:pointer;box-shadow:0 3px 10px rgba(0,0,0,.25);display:flex;align-items:center;justify-content:center;padding:0;-webkit-tap-highlight-color:transparent}
.fd-sound-btn:active{transform:scale(.94)}
.fd-sound-btn[aria-pressed="false"]{background:#6b6b55;border-color:#bbb}
@media print{.fd-sound-btn{display:none}}

/* note explaining the sound button */
.fd-sound-note{background:#fff3c4;border:1.5px solid #d4a017;border-radius:10px;padding:9px 12px;margin:0 auto 14px;max-width:460px;font-size:.86rem;line-height:1.4;color:#5a4300;text-align:center}
.fd-sound-note b{color:#3d2f00}
.fd-sound-note button{display:inline-block;margin:6px 0 0 8px;background:#fff;border:1.5px solid #1a5c38;color:#1a5c38;border-radius:999px;padding:3px 12px;font:inherit;font-weight:700;font-size:.82rem;cursor:pointer}
/* small one-line version, shown after the first round or the first tap on the switch */
.fd-sound-note.compact{background:none;border:0;border-radius:0;padding:0;margin:0 auto 10px;font-size:.8rem;color:#6b6b55}
.fd-sound-note.compact button{margin:0 0 0 6px;padding:1px 10px;font-size:.78rem}
@media print{.fd-sound-note{display:none}}
body.fd-has-sound{padding-bottom:64px}
