:root {
  font-family: 'Avenir Next', Avenir, ui-rounded, system-ui, sans-serif;
  color: #443247;
  background: #fcf7f0;
  font-synthesis: none;
  --ink: #493246;
  --line: #d9cbbf;
  --paper: #fffcf6;
  --plum: #653f65;
  --shadow: 0 4px 0 #d9c9bb80;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 0% 52%, #fae9dd66, transparent 47%), #fcf7f0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
button:disabled {
  cursor: wait;
}
button:active {
  translate: 0 2px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #80538e;
  outline-offset: 3px;
}
svg {
  width: 1.5rem;
  height: 1.5rem;
  pointer-events: none;
  flex: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button {
  border: 0;
}
h1,
h2,
h3,
.brand {
  font-family: Georgia, 'Iowan Old Style', serif;
}
h1,
h2,
h3 {
  font-weight: 600;
}
a {
  color: inherit;
}
[hidden] {
  display: none !important;
}
.site-head {
  border-bottom: 1px solid #e3d6ca;
  background: #fffaf3;
}
.head-inner,
main.game,
footer,
.adult {
  width: min(1160px, calc(100% - 72px));
  margin-inline: auto;
}
.head-inner {
  min-height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #50384e;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  text-decoration: none;
}
.brand-icon {
  width: 50px;
  height: 50px;
  rotate: -6deg;
}
nav {
  display: flex;
  gap: 8px;
}
.nav-pick {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 7px;
  padding: 6px 18px;
  border: 1px solid transparent;
  border-radius: 28px;
  background: transparent;
  font-size: 1rem;
  font-weight: 650;
}
.nav-pick.selected {
  background: #efe6f3;
  border-color: #d7c2dd;
}
.nav-pick svg {
  width: 28px;
  height: 28px;
}
.game {
  flex: 1;
  padding-top: clamp(18px, 3vw, 43px);
}
.title-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
}
h1 {
  font-size: clamp(2.05rem, 5vw, 3.75rem);
  letter-spacing: -0.064em;
  line-height: 1.08;
}
.heading-stars {
  width: 43px;
  height: 43px;
  rotate: 10deg;
}
.board {
  display: grid;
  grid-template-columns: minmax(0, 2.45fr) minmax(240px, 0.95fr);
  gap: 22px;
  align-items: start;
}
.landscape-wrap {
  min-width: 0;
}
.scene {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1.5px solid #b9a8a6;
  border-radius: 27px;
  background: #fbdcc7 url(world/meadow.svg) center/cover no-repeat;
  height: clamp(320px, 33vw, 450px);
  box-shadow: var(--shadow);
  touch-action: manipulation;
}
.place-sign {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: absolute;
  z-index: 2;
  left: 17px;
  top: 16px;
  border: 1px solid #c6b7ad;
  border-radius: 22px;
  padding: 5px 12px 5px 8px;
  background: #fffaf0f0;
  color: #604b56;
  font-weight: 650;
  font-size: 0.88rem;
}
.place-sign svg {
  width: 26px;
  height: 26px;
}
.pet-target {
  position: absolute;
  width: 44%;
  height: 75%;
  left: 28%;
  bottom: 9%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: transparent;
  border-radius: 44%;
  padding: 0;
  touch-action: none;
  z-index: 2;
}
.pet-target:after {
  content: '';
  position: absolute;
  bottom: 3%;
  left: 16%;
  width: 68%;
  height: 8%;
  background: #786b8c33;
  filter: blur(3px);
  border-radius: 50%;
  z-index: -1;
}
#figure {
  display: block;
  width: 100%;
  height: 100%;
}
#figure > svg,
.fallback-pony {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
.effects {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.fx {
  position: absolute;
  width: 42px;
  height: 42px;
  left: 52%;
  top: 35%;
  filter: drop-shadow(0 2px 2px #58465e33);
}
.night-stars {
  opacity: 0;
  position: absolute;
  top: 17%;
  color: #fff5cf;
  font-size: 2.25rem;
  white-space: nowrap;
  left: 8%;
  right: 0;
}
.scene:before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(#4e518c88, #62609d55);
  opacity: 0;
  transition: opacity 0.8s;
}
.scene.asleep:before,
.scene.asleep .night-stars {
  opacity: 1;
}
.speech,
.scene-tag {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  background: #fffaf2f2;
  border: 1px solid #cfb9ba;
  border-radius: 20px;
  font-weight: 650;
  padding: 5px 14px;
}
.speech {
  top: 14%;
  right: 8%;
  font-size: 1rem;
}
.scene-tag {
  bottom: 3%;
  left: 50%;
  transform: translateX(-50%);
  font-family: Georgia, serif;
  font-size: 1.05rem;
}
.action-tray {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
  margin-top: 16px;
}
.action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 101px;
  border-radius: 20px;
  border: 1.5px solid #cfb8ae;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--shadow);
  transition:
    filter 0.15s,
    translate 0.15s;
}
.action:hover {
  filter: brightness(1.035);
}
.action svg {
  width: 52px;
  height: 52px;
}
.action.feed {
  background: #f8dfd5;
}
.action.pet {
  background: #f6e6c6;
}
.action.sleep {
  background: #e8dff1;
  border-color: #c6b4d1;
}
.panel,
dialog {
  border: 1.5px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.panel {
  padding: 25px;
}
.entry {
  text-align: center;
  padding-block: 34px 27px;
}
.door-picture {
  position: relative;
  display: grid;
  place-items: center;
  width: 130px;
  height: 122px;
  margin: 1px auto 15px;
  border-radius: 51% 48% 44% 49%;
  background: #f4e8d6;
}
.door-picture svg {
  width: 97px;
  height: 97px;
}
.dot-star {
  position: absolute;
  color: #b27b38;
  font-size: 1.35rem;
}
.s1 {
  left: 1px;
  top: 13px;
}
.s2 {
  right: 1px;
  bottom: 13px;
}
.panel h2,
dialog h2,
.adult h2 {
  font-size: clamp(1.45rem, 2.4vw, 1.95rem);
  letter-spacing: -0.042em;
}
.entry p,
.offline p,
dialog p,
.adult p {
  line-height: 1.5;
  color: #695967;
}
.entry p {
  margin: 10px auto 23px;
  max-width: 250px;
}
.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  gap: 9px;
  padding: 10px 20px;
  border-radius: 15px;
  font-weight: 700;
}
.primary {
  background: var(--plum);
  border: 1px solid #51374f;
  color: #fffaf3;
  box-shadow: 0 3px 0 #472e46;
}
.primary svg {
  width: 30px;
  height: 30px;
}
.secondary {
  background: #f1e8de;
  border: 1px solid #cab9aa;
}
.panel-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 24px;
}
.panel-head svg {
  width: 36px;
  height: 36px;
}
.need {
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 12px;
  align-items: center;
  margin-bottom: 17px;
}
.need svg {
  width: 39px;
  height: 39px;
  grid-row: span 2;
}
.need span {
  font-size: 0.95rem;
  font-weight: 650;
}
.need progress {
  height: 12px;
  width: 100%;
  appearance: none;
  border: 0;
  border-radius: 9px;
  overflow: hidden;
  background: #ede4d9;
}
.need progress::-webkit-progress-bar {
  background: #ede4d9;
  border-radius: 9px;
}
.need progress::-webkit-progress-value {
  background: var(--color);
  border-radius: 9px;
}
.need progress::-moz-progress-bar {
  background: var(--color);
  border-radius: 9px;
}
.need.satiety {
  --color: #d98875;
}
.need.joy {
  --color: #d28aac;
}
.need.cleanliness {
  --color: #78b2b5;
}
.need.energy {
  --color: #a894c9;
}
.star-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  background: #fcf0d2;
  border: 1px solid #e0ca9f;
  border-radius: 14px;
  padding: 7px 11px;
  font-weight: 650;
}
.star-summary b {
  margin-left: auto;
}
.star-summary svg {
  width: 32px;
  height: 32px;
}
.treasure,
.offline {
  padding: 35px;
  text-align: center;
}
.star-medal svg,
.large-icon {
  width: 84px;
  height: 84px;
}
.treasure p,
.offline p {
  margin: 10px 0 20px;
}
#daily {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.daily-item {
  padding: 9px 13px;
  border-radius: 15px;
  background: #f8ebce;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.daily-item svg {
  width: 28px;
  height: 28px;
}
footer {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 38px;
  padding: 14px 0 max(15px, env(safe-area-inset-bottom));
  border-top: 1px solid #e1d5cb;
  color: #796a74;
  font-family: Georgia, serif;
}
footer > a {
  font:
    500 0.92rem system-ui,
    sans-serif;
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}
footer svg {
  width: 22px;
  height: 22px;
}
dialog {
  padding: 24px;
  width: min(390px, calc(100% - 26px));
  color: var(--ink);
}
dialog::backdrop {
  background: #42374765;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dialog-head svg {
  width: 50px;
  height: 50px;
}
.close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f1e6df;
  font-size: 1.6rem;
}
.dialog-head + h2 {
  margin: 12px 0 6px;
}
label {
  display: block;
  font-weight: 650;
  margin: 16px 0 5px;
}
input,
select {
  width: 100%;
  border: 1px solid #bba9b6;
  border-radius: 10px;
  padding: 12px 10px;
  background: white;
  color: var(--ink);
  font-size: 16px;
}
dialog .primary {
  width: 100%;
  margin-top: 13px;
}
[role='alert']:not(:empty) {
  padding: 9px 0;
  color: #813c48;
}
@media (max-width: 790px) {
  .head-inner,
  main.game,
  footer,
  .adult {
    width: min(100% - 32px, 620px);
  }
  .head-inner {
    min-height: 62px;
  }
  .brand-icon {
    width: 37px;
    height: 37px;
  }
  .board {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .title-row {
    margin-bottom: 13px;
  }
  .heading-stars {
    width: 32px;
    height: 32px;
  }
  .scene {
    height: clamp(280px, 65vw, 360px);
    border-radius: 22px;
  }
  .pet-target {
    width: 57%;
    left: 21.5%;
    height: 75%;
  }
  .action-tray {
    gap: 8px;
    margin-top: 11px;
  }
  .action {
    min-height: 83px;
    border-radius: 17px;
  }
  .action svg {
    width: 42px;
    height: 42px;
  }
  .panel {
    padding: 17px;
  }
  .entry {
    display: grid;
    grid-template-columns: 65px 1fr;
    gap: 2px 13px;
    align-items: center;
    text-align: left;
  }
  .door-picture {
    width: 62px;
    height: 62px;
    grid-row: span 2;
    margin: 0;
  }
  .door-picture svg {
    width: 53px;
    height: 53px;
  }
  .dot-star {
    font-size: 0.85rem;
  }
  .entry p {
    margin: 0;
    max-width: none;
    font-size: 0.93rem;
  }
  .entry .primary {
    grid-column: 1/-1;
    margin-top: 10px;
  }
  .panel-head {
    margin-bottom: 12px;
  }
  .panel-head svg {
    width: 29px;
    height: 29px;
  }
  #needs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 17px;
  }
  .need {
    margin: 0;
    grid-template-columns: 29px 1fr;
    column-gap: 7px;
  }
  .need svg {
    width: 30px;
    height: 30px;
  }
  .star-summary {
    margin-top: 15px;
  }
  .nav-pick {
    padding: 5px 10px;
    font-size: 0.88rem;
    gap: 4px;
  }
  .nav-pick svg {
    width: 24px;
    height: 24px;
  }
  footer {
    margin-top: 24px;
  }
  .game {
    padding-top: 19px;
  }
}
@media (max-width: 410px) {
  .nav-pick {
    flex-direction: column;
    gap: 0;
    line-height: 1.15;
    border-radius: 15px;
    padding: 3px 9px;
  }
  .nav-pick span {
    font-size: 0.78rem;
  }
  .head-inner {
    gap: 4px;
  }
  .scene {
    height: 270px;
  }
  .place-sign {
    left: 10px;
    top: 10px;
  }
  .action {
    font-size: 0.95rem;
  }
  nav {
    gap: 3px;
  }
}
@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .site-head {
    padding-top: env(safe-area-inset-top);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
