:root {
  color-scheme: light;
  --ink: #233043;
  --muted: #65767b;
  --teal: #287775;
  --cream: #f4f1e9;
  --purple: #8464a8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font:
    16px/1.5 system-ui,
    -apple-system,
    sans-serif;
}
main {
  max-width: 600px;
  margin: auto;
  padding: 24px 18px 44px;
}
header {
  padding: 12px 6px 22px;
}
header a {
  color: var(--teal);
  text-decoration: none;
  display: block;
  margin-bottom: 24px;
}
.eyebrow {
  display: block;
  letter-spacing: 2px;
  font-size: 10px;
  font-weight: 700;
  color: var(--teal);
}
h1 {
  font-size: 42px;
  letter-spacing: -1.8px;
  line-height: 1.04;
  margin: 10px 0 18px;
}
h1 em {
  font-family: Georgia, serif;
  font-weight: 400;
}
h2 {
  margin: 0 0 14px;
  font-size: 22px;
  letter-spacing: -0.5px;
}
p {
  color: var(--muted);
}
.card {
  border: 1px solid #e5e3db;
  background: #fffdf9;
  border-radius: 24px;
  padding: 22px;
  margin: 18px 0;
  box-shadow: 0 8px 24px #23304305;
}
button,
input,
select {
  font: inherit;
}
button {
  border: 0;
  background: var(--teal);
  color: white;
  border-radius: 13px;
  padding: 12px 16px;
  cursor: pointer;
  min-height: 46px;
  font-weight: 600;
}
button:disabled {
  opacity: 0.42;
  cursor: default;
}
button.secondary,
.minigames button {
  background: #e9eee7;
  color: var(--teal);
}
button.quiet {
  background: transparent;
  color: var(--muted);
}
button.danger {
  background: #f8e4dc;
  color: #943f35;
  margin-top: 12px;
}
input:not([type="checkbox"]),
select {
  width: 100%;
  padding: 11px;
  border: 1px solid #cfd8d1;
  border-radius: 10px;
  background: white;
  color: var(--ink);
  margin: 5px 0 12px;
}
label {
  display: block;
  font-size: 14px;
  margin: 12px 0;
}
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  vertical-align: middle;
}
.connection {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  padding: 0 5px;
}
.connection span {
  border-radius: 40px;
  background: #e2eadd;
  padding: 6px 11px;
}
.connection.off span {
  background: #f7e4d1;
  color: #945b23;
}
nav {
  display: flex;
  gap: 10px;
  margin: 14px 0;
}
nav button {
  flex: 1;
  background: white;
  color: var(--teal);
}
nav button.selected {
  background: var(--teal);
  color: white;
}
.pethead {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pethead h2 {
  font-size: 32px;
  margin: 3px 0;
}
.badge {
  background: #f4ebd9;
  border-radius: 20px;
  padding: 5px 10px;
  font-size: 12px;
}
canvas {
  width: 100%;
  display: block;
  border-radius: 18px;
  touch-action: manipulation;
}
.petcard canvas {
  margin-top: 12px;
}
#mood {
  text-align: center;
  font-size: 13px;
  margin: 12px 0;
}
#stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin: 20px 0;
}
#stats label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin: 0;
}
meter {
  width: 100%;
  height: 12px;
}
#actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}
#actions button {
  background: #edf1e9;
  color: #275955;
}
.minigames {
  display: flex;
  gap: 7px;
  margin-top: 14px;
}
.minigames button {
  flex: 1;
  font-size: 13px;
  padding: 10px 5px;
  background: #f3e8d6;
  color: #6a5537;
}
.row {
  display: flex;
  gap: 10px;
}
.row > * {
  flex: 1;
}
details {
  border-top: 1px solid #e5e3db;
  padding: 16px 0;
}
summary {
  cursor: pointer;
  font-weight: 650;
}
small {
  font-size: 12px;
  color: var(--muted);
}
footer {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin: 28px 0;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  border-radius: 14px;
  padding: 12px 20px;
  max-width: 90vw;
  width: max-content;
  box-shadow: 0 5px 25px #0003;
  display: none;
  z-index: 3;
}
dialog {
  border: 0;
  border-radius: 22px;
  padding: 22px;
  max-width: 540px;
  width: 94vw;
  background: #fffdf9;
  color: var(--ink);
}
dialog::backdrop {
  background: #233043aa;
}
dialog button {
  width: 100%;
  margin-top: 9px;
}
.member {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding: 8px 0;
}
.member button {
  font-size: 12px;
  padding: 8px;
}
body.paused .petcard {
  border: 2px solid #cfb97e;
}
[hidden] {
  display: none !important;
}
@media (min-width: 700px) {
  main {
    padding-top: 45px;
  }
  h1 {
    font-size: 54px;
  }
  #actions {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Comfortable reading and touch controls across game, guide and privacy. */
body { font-size: 18px; line-height: 1.65; }
:root { --muted: #536269; }
.eyebrow { font-size: 13px; letter-spacing: 1px; }
label, #stats label { font-size: 15px; }
input, select { font-size: 18px; }
.connection { flex-wrap: wrap; font-size: 14px; }
.badge, small, footer, .member button { font-size: 14px; }
#mood, .minigames button { font-size: 16px; }
meter { height: 18px; }
.minigames { flex-wrap: wrap; }
.minigames button { flex-basis: 120px; }
.pethead { flex-wrap: wrap; gap: 8px; }
@media (max-width: 360px) {
  main { padding-inline: 12px; }
  .card { padding: 18px; }
  .row { flex-wrap: wrap; }
  .row > * { flex-basis: 140px; }
}
