@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap");
:root {
  font-family: "DM Sans", sans-serif;
  color: #293f36;
  background: #b1d48c;
  font-synthesis: none;
  --pink: #cd5074;
  --green: #285945;
  --muted: #71816f;
  --paper: #fffef4ed;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
button,
a,
canvas {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
canvas:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
}
button svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.7;
  flex-shrink: 0;
}
button:hover {
  filter: brightness(0.95);
}
.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid #ffffffb0;
  background: var(--paper);
  border-radius: 50%;
  flex: none;
  box-shadow: 0 3px 12px #36512b14;
}
.icon-button[aria-pressed="true"] {
  background: #f7dde5;
}
main,
.play-layout,
.garden {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  max-width: none;
}
.garden {
  height: 100dvh;
  overflow: hidden;
  background: #b1d48c;
}
#game {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
  image-rendering: pixelated;
}
.masthead {
  position: fixed;
  z-index: 3;
  top: max(24px, env(safe-area-inset-top));
  left: max(28px, env(safe-area-inset-left));
  right: max(28px, env(safe-area-inset-right));
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}
.masthead > * {
  pointer-events: auto;
}
.wordmark {
  font:
    600 29px "Outfit",
    sans-serif;
  color: #264b36;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--paper);
  padding: 5px 15px 7px 12px;
  border-radius: 6px;
  box-shadow: 0 3px 16px #36512b14;
}
.brand-flower {
  font-size: 34px;
  color: var(--pink);
  margin-right: 7px;
}
.dot {
  color: var(--pink);
}
.view-controls {
  display: flex;
  gap: 9px;
  margin-right: 51px;
}
.dedication {
  display: none;
}
.heading {
  position: fixed;
  z-index: 2;
  top: 91px;
  left: 29px;
  pointer-events: none;
  max-width: 240px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 0;
  font-weight: 700;
  color: var(--pink);
  margin: 0 0 7px;
}
.heading .eyebrow,
.subtitle,
.session {
  display: none;
}
h1 {
  font:
    500 25px/1.15 "Outfit",
    sans-serif;
  letter-spacing: 0;
  margin: 0;
  color: #264b36;
  text-shadow: 0 1px 8px #fffff0;
}
.heading-star {
  font-size: 22px;
  color: var(--pink);
  margin-left: 9px;
}
h2 {
  font:
    500 28px/1.18 "Outfit",
    sans-serif;
  margin: 17px 0;
  color: #304d3e;
}
.collection {
  position: fixed;
  z-index: 2;
  top: max(24px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: 390px;
  background: var(--paper);
  border: 1px solid #ffffffc0;
  border-radius: 7px;
  padding: 11px 17px 10px;
  box-shadow: 0 4px 20px #36512b14;
}
.collection-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.collection-top .eyebrow {
  font-size: 8px;
  margin: 0;
}
#total {
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.collection h2,
.love-note {
  display: none;
}
.progress-track {
  height: 3px;
  background: #dfe5d6;
  margin: 7px 0 9px;
  overflow: hidden;
  border-radius: 3px;
}
#progress {
  background: var(--pink);
  height: 100%;
  width: 0;
  transition: width 0.35s;
}
.treat-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.treat-row {
  display: grid;
  grid-template-columns: 33px minmax(0, 1fr);
  align-items: center;
  column-gap: 5px;
  position: relative;
}
.treat-icon {
  height: 32px;
  width: 33px;
  image-rendering: pixelated;
  grid-row: 1/3;
}
.treat-copy {
  min-width: 0;
}
.treat-copy strong {
  display: block;
  font:
    500 11px "Outfit",
    sans-serif;
}
.treat-copy small {
  display: none;
}
.treat-count {
  display: flex;
  gap: 4px;
  margin-top: 3px;
}
.treat-count span {
  width: 4px;
  height: 4px;
  background: #cdd8c7;
  border-radius: 50%;
  transition: background 0.25s;
}
.treat-count span.filled {
  background: var(--pink);
}
.garden-label {
  position: fixed;
  bottom: 29px;
  left: 174px;
  z-index: 1;
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 8px;
  background: var(--paper);
  border-radius: 3px;
  padding: 7px 9px;
  pointer-events: none;
}
.live-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7aab77;
}
.pause {
  position: fixed;
  z-index: 3;
  right: max(28px, env(safe-area-inset-right));
  top: max(24px, env(safe-area-inset-top));
}
.game-toolbar {
  position: fixed;
  z-index: 2;
  bottom: max(27px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 25px;
  align-items: center;
  background: var(--paper);
  border: 1px solid #ffffffc0;
  border-radius: 7px;
  box-shadow: 0 4px 20px #36512b20;
  padding: 10px 15px;
  font-size: 11px;
  white-space: nowrap;
}
.outfit,
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.outfit > svg {
  width: 17px;
  height: 17px;
  color: #617559;
}
.switch {
  border: 0;
  width: 33px;
  height: 20px;
  border-radius: 20px;
  background: #cdd4c9;
  padding: 3px;
  justify-content: flex-start;
  transition: background 0.2s;
}
.switch span {
  background: white;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transition: transform 0.2s;
}
.switch[aria-checked="true"] {
  background: var(--pink);
}
.switch[aria-checked="true"] span {
  transform: translateX(13px);
}
.text-button {
  border: 0;
  background: transparent;
  font-size: 11px;
  padding: 7px 0;
  min-height: 32px;
}
#snack {
  min-width: 115px;
}
#snack[aria-pressed="true"] {
  color: var(--pink);
}
.toolbar-actions .icon-button {
  width: 30px;
  height: 30px;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.divider {
  width: 1px;
  height: 16px;
  background: #dce0d5;
  margin: 0 3px;
}
footer {
  position: fixed;
  right: 28px;
  bottom: 35px;
  z-index: 1;
  color: #294e39;
  font-size: 10px;
  text-shadow: 0 1px 5px #ffffe9;
  pointer-events: none;
}
footer > span:last-child {
  display: none;
}
.tiny-heart {
  color: var(--pink);
  font-size: 15px;
  margin-left: 4px;
}
.toast {
  position: fixed;
  z-index: 2;
  bottom: 93px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  width: max-content;
  text-align: center;
  background: var(--paper);
  padding: 11px 18px;
  border: 1px solid #fff;
  border-radius: 4px;
  font-size: 12px;
  color: #456047;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
}
.loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: radial-gradient(circle at 50% 42%, #f3f8e8, #cfe3bd);
  font:
    24px "Outfit",
    sans-serif;
  color: #264b36;
  z-index: 50;
  transition: opacity 0.4s ease;
}
.loading.leaving {
  opacity: 0;
}
.loading-title {
  margin: 22px 0 0;
  font-size: 26px;
}
.loading span {
  font:
    12px "DM Sans",
    sans-serif;
  margin-top: 8px;
  color: #5d6b61;
}
/* Right-facing run row of the pyjama atlas, four 274px cells at half size. */
.loading-runner {
  width: 137px;
  height: 133px;
  background: url("assets/samira-running-satin-pyjamas.png") 0 -147px / 724px
    543px no-repeat;
  image-rendering: pixelated;
  animation:
    loading-run 0.48s steps(4) infinite,
    loading-bob 0.24s ease-in-out infinite alternate;
}
.loading-ground {
  width: min(320px, 80vw);
  height: 10px;
  margin-top: -4px;
  border-radius: 5px;
  background: repeating-linear-gradient(
    90deg,
    #7fae5d 0 18px,
    #93c070 18px 36px
  );
  background-size: 36px 10px;
  animation: loading-ground 0.36s linear infinite;
}
.loading-bar {
  width: min(220px, 60vw);
  height: 6px;
  margin-top: 18px;
  border-radius: 3px;
  background: #ffffffa0;
  overflow: hidden;
}
.loading-bar div {
  height: 100%;
  width: 100%;
  background: var(--pink);
  transform-origin: left;
  animation: loading-fill 5s linear forwards;
}
@keyframes loading-run {
  to {
    background-position-x: -548px;
  }
}
@keyframes loading-bob {
  to {
    transform: translateY(-3px);
  }
}
@keyframes loading-ground {
  to {
    background-position-x: -36px;
  }
}
@keyframes loading-fill {
  from {
    transform: scaleX(0);
  }
}
.loading.hidden {
  display: none;
}
#minimap {
  position: fixed;
  z-index: 2;
  left: max(28px, env(safe-area-inset-left));
  bottom: max(27px, env(safe-area-inset-bottom));
  width: 126px;
  height: 84px;
  image-rendering: pixelated;
  border: 3px solid #ffffefe0;
  border-radius: 4px;
  box-shadow: 0 4px 15px #36512b26;
  cursor: crosshair;
  touch-action: none;
}
.snack-status {
  position: fixed;
  z-index: 2;
  left: 50%;
  bottom: 146px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px 9px;
  align-items: center;
  padding: 13px 17px;
  background: #fff7efed;
  border: 1px solid #fff;
  border-radius: 5px;
  min-width: 200px;
  font:
    500 13px "Outfit",
    sans-serif;
}
.snack-status[hidden] {
  display: none;
}
.snack-status svg {
  width: 18px;
  height: 18px;
  color: var(--pink);
}
.snack-status progress {
  grid-column: 1/-1;
  width: 100%;
  height: 4px;
  border: 0;
  border-radius: 3px;
  overflow: hidden;
  accent-color: var(--pink);
}
progress::-webkit-progress-bar {
  background: #ecdcd4;
}
progress::-webkit-progress-value {
  background: var(--pink);
}
.move-controls {
  display: none;
}
.joystick {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffef66 0 38%, #ffffefb3 39%);
  border: 2px solid #fff9;
  box-shadow: 0 4px 16px #264b3626;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.joystick-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  border-radius: 50%;
  background: var(--pink);
  border: 3px solid #fffff0;
  box-shadow: 0 3px 10px #264b3640;
  transition: transform 0.12s ease-out;
  pointer-events: none;
}
.joystick.active .joystick-knob {
  transition: none;
}
dialog {
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: #f9f8f5;
  width: min(410px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  color: #293f36;
}
dialog::backdrop {
  background: #17352888;
  backdrop-filter: blur(4px);
}
.modal-content {
  padding: 38px;
  text-align: center;
}
.modal-content h2 {
  font-size: 31px;
}
.modal-content h2.love-line {
  font-size: clamp(34px, min(9vw, 11vh), 64px);
  line-height: 1.12;
  color: var(--pink);
  margin: 10px 0 26px;
  text-wrap: balance;
}
.modal-content p {
  font-size: 13px;
  line-height: 1.8;
  color: #7c857e;
}
.victory-art {
  font-size: 80px;
  line-height: 1;
  color: var(--pink);
  margin: 25px 0 15px;
}
.primary-button {
  background: var(--green);
  color: white;
  border: 0;
  border-radius: 4px;
  width: 100%;
  font-size: 12px;
  padding: 14px;
  margin: 14px 0 12px;
}
.modal-content .text-button {
  display: flex;
  margin: auto;
}
@media (max-width: 1000px) {
  .collection {
    width: 330px;
  }
  .treat-list {
    gap: 6px;
  }
  .treat-row {
    grid-template-columns: 27px minmax(0, 1fr);
  }
  .treat-icon {
    width: 27px;
    height: 29px;
  }
  .garden-label,
  footer {
    display: none;
  }
}
@media (max-width: 750px) {
  .masthead {
    top: max(16px, env(safe-area-inset-top));
    left: 16px;
    right: 16px;
  }
  .wordmark {
    font-size: 24px;
    padding: 3px 11px 5px 8px;
  }
  .brand-flower {
    font-size: 29px;
  }
  .view-controls {
    margin-right: 46px;
    gap: 6px;
  }
  .icon-button {
    width: 38px;
    height: 38px;
  }
  .pause {
    top: max(16px, env(safe-area-inset-top));
    right: 16px;
  }
  .heading {
    top: 69px;
    left: 18px;
  }
  h1 {
    font-size: 17px;
  }
  .heading-star {
    font-size: 15px;
  }
  .collection {
    top: 69px;
    width: calc(100% - 32px);
    max-width: 390px;
    padding: 10px 12px;
  }
  .game-toolbar {
    bottom: max(16px, env(safe-area-inset-bottom));
    gap: 15px;
    padding: 8px 12px;
    max-width: calc(100% - 24px);
    font-size: 10px;
  }
  .outfit,
  .toolbar-actions {
    gap: 8px;
  }
  .text-button {
    font-size: 10px;
  }
  #snack {
    min-width: 99px;
  }
  .outfit > svg {
    display: none;
  }
  .move-controls {
    display: block;
    position: fixed;
    z-index: 2;
    bottom: max(85px, calc(env(safe-area-inset-bottom) + 69px));
    left: 16px;
    touch-action: none;
  }
  #minimap {
    left: auto;
    right: 16px;
    bottom: max(85px, calc(env(safe-area-inset-bottom) + 69px));
    width: 108px;
    height: 72px;
  }
  .toast {
    bottom: 188px;
    font-size: 11px;
    padding: 9px 13px;
  }
  .snack-status {
    bottom: 236px;
  }
  .modal-content {
    padding: 26px;
  }
  .modal-content h2 {
    font-size: 27px;
  }
}
@media (max-width: 360px) {
  .outfit {
    gap: 6px;
  }
  .outfit > span {
    font-size: 9px;
  }
  .game-toolbar {
    gap: 10px;
    padding: 8px 10px;
  }
  .toolbar-actions {
    gap: 5px;
  }
  .collection {
    padding: 9px;
  }
  .treat-list {
    gap: 3px;
  }
  .treat-row {
    column-gap: 3px;
  }
  .treat-copy strong {
    font-size: 10px;
  }
  .wordmark {
    font-size: 23px;
  }
  .view-controls {
    gap: 5px;
  }
}
@media (max-height: 520px) and (min-width: 600px) {
  .collection {
    top: 16px;
    width: 330px;
  }
  .masthead,
  .pause {
    top: 16px;
  }
  .heading {
    top: 68px;
  }
  .game-toolbar {
    bottom: 14px;
  }
  .move-controls {
    bottom: 78px;
    width: 96px;
    height: 96px;
  }
  .toast {
    bottom: 76px;
  }
  .snack-status {
    bottom: 123px;
  }
  #minimap {
    bottom: 14px;
    width: 105px;
    height: 70px;
  }
  .modal-content {
    padding: 20px;
  }
  .victory-art {
    font-size: 44px;
    margin: 8px 0;
  }
  .modal-content h2 {
    font-size: 25px;
    margin: 8px 0;
  }
  .modal-content p {
    margin: 8px 0;
    line-height: 1.5;
  }
  .primary-button {
    margin: 8px 0;
  }
}
button[hidden] {
  display: none;
}
@media (any-pointer: coarse) and (min-width: 751px) {
  .move-controls {
    display: block;
    position: fixed;
    z-index: 2;
    bottom: max(18px, env(safe-area-inset-bottom));
    left: 18px;
    touch-action: none;
  }
  #minimap {
    left: auto;
    right: 18px;
    bottom: 18px;
    width: 105px;
    height: 70px;
  }
}
@media (max-height: 520px) {
  .heading {
    display: none;
  }
}
.heading {
  background: var(--paper);
  padding: 5px 10px;
  border-radius: 4px;
  width: max-content;
}
body.portrait #minimap {
  width: 72px;
  height: 128px;
}
@media (max-width: 750px) {
  body.portrait .toast {
    bottom: 232px;
  }
  body.portrait .snack-status {
    bottom: 282px;
  }
}
@media (max-height: 520px) and (min-width: 600px) {
  .collection {
    width: 300px;
  }
  .wordmark {
    font-size: 21px;
  }
  .brand-flower {
    font-size: 25px;
  }
  .heading {
    top: 67px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
